@ranger-testing/ranger-cli 3.1.1-alpha.08fb70e-39 → 3.1.1

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.
Files changed (85) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/sessionCache.js +1 -1
  71. package/build/commands/utils/settings.js +1 -1
  72. package/build/commands/utils/skillContent.js +1 -1
  73. package/build/commands/utils/skills.js +1 -1
  74. package/build/commands/utils/stitchWebmFiles.js +1 -1
  75. package/build/commands/utils/telemetry.js +1 -1
  76. package/build/commands/utils/tokenRefresh.js +1 -1
  77. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  78. package/build/commands/utils/tunnelClient.js +1 -1
  79. package/build/commands/utils/userApi.js +1 -1
  80. package/build/commands/utils/version.js +1 -1
  81. package/build/commands/verifyFeature.js +1 -1
  82. package/build/commands/verifyFeatureCli.js +1 -1
  83. package/build/commands/verifyFeatureNovaCli.js +1 -1
  84. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  85. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x1b9a00,_0x542d53){const _0x161a21=_0xf954,_0x365e34=_0x1b9a00();while(!![]){try{const _0x20da29=parseInt(_0x161a21(0x19e))/0x1+-parseInt(_0x161a21(0x199))/0x2+parseInt(_0x161a21(0x1a5))/0x3+parseInt(_0x161a21(0x196))/0x4+-parseInt(_0x161a21(0x19a))/0x5+parseInt(_0x161a21(0x1a3))/0x6*(parseInt(_0x161a21(0x19d))/0x7)+-parseInt(_0x161a21(0x1a4))/0x8;if(_0x20da29===_0x542d53)break;else _0x365e34['push'](_0x365e34['shift']());}catch(_0x5ebcda){_0x365e34['push'](_0x365e34['shift']());}}}(_0x7d33,0x7d1fb));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x7d33(){const _0x45661b=['5649vlymCX','979041iEzflA','hwFRk','Hhvdf','message','success','3102MMwXyc','14324056hYcUGI','2964102mXoXIa','log','3563996CPLkcX','kSDjF','organizationName','1061126EVsSMc','2208580SCsYWS','\x0a✅\x20API\x20key\x20stored\x20successfully','Re-authenticating\x20via\x20MCP\x20bootstrap...'];_0x7d33=function(){return _0x45661b;};return _0x7d33();}import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';function _0xf954(_0x483c95,_0x9f8b23){_0x483c95=_0x483c95-0x195;const _0x7d33da=_0x7d33();let _0xf954b8=_0x7d33da[_0x483c95];return _0xf954b8;}import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0x2d2ab1=_0xf954,_0x36831a={'kSDjF':function(_0x1c9e99){return _0x1c9e99();},'Hhvdf':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','hwFRk':_0x2d2ab1(0x19b)},_0x443a81=await getMcpAuthOrigin();if(_0x443a81){console['log'](_0x2d2ab1(0x19c)),await _0x36831a[_0x2d2ab1(0x197)](mcpBootstrap);return;}if(!isInteractive())throw new Error(_0x36831a[_0x2d2ab1(0x1a0)]);try{const _0x51e5e1=await _0x36831a[_0x2d2ab1(0x197)](runDeviceAuthFlow),_0x30f560=await getCurrentUser(_0x51e5e1);_0x30f560[_0x2d2ab1(0x1a2)]?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x30f560['user'][_0x2d2ab1(0x198)]):console[_0x2d2ab1(0x195)](_0x36831a[_0x2d2ab1(0x19f)]);}catch(_0x51ec81){throw new Error('Login\x20failed:\x20'+(_0x51ec81 instanceof Error?_0x51ec81[_0x2d2ab1(0x1a1)]:_0x51ec81));}}
1
+ (function(_0x5fea29,_0x28ef44){const _0x49693f=_0x5ee5,_0x5de434=_0x5fea29();while(!![]){try{const _0x3e8fee=-parseInt(_0x49693f(0x11a))/0x1+-parseInt(_0x49693f(0x126))/0x2+parseInt(_0x49693f(0x123))/0x3*(parseInt(_0x49693f(0x129))/0x4)+-parseInt(_0x49693f(0x120))/0x5*(-parseInt(_0x49693f(0x11b))/0x6)+-parseInt(_0x49693f(0x11e))/0x7+parseInt(_0x49693f(0x11d))/0x8*(-parseInt(_0x49693f(0x122))/0x9)+parseInt(_0x49693f(0x12a))/0xa;if(_0x3e8fee===_0x28ef44)break;else _0x5de434['push'](_0x5de434['shift']());}catch(_0x197c90){_0x5de434['push'](_0x5de434['shift']());}}}(_0x7894,0x8c023));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x5ee5(_0x326a73,_0x54f089){_0x326a73=_0x326a73-0x117;const _0x7894bb=_0x7894();let _0x5ee543=_0x7894bb[_0x326a73];return _0x5ee543;}function _0x7894(){const _0x4cdbae=['2006890XyABKE','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','234JgFOwC','1262121hESKPe','KtNYM','\x0a✅\x20API\x20key\x20stored\x20successfully','1845556CFYWih','success','dhgDx','4urBWPN','20553200VHAdrg','log','xTwBh','Re-authenticating\x20via\x20MCP\x20bootstrap...','\x0a✅\x20Logged\x20in\x20to\x20','674789GajoDE','12IHhkvt','organizationName','236152BgeUCw','2381729Lxakpj','Login\x20failed:\x20'];_0x7894=function(){return _0x4cdbae;};return _0x7894();}import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0x311eec=_0x5ee5,_0x5d93d6={'xTwBh':function(_0x3493e5){return _0x3493e5();},'KtNYM':_0x311eec(0x121),'dhgDx':function(_0x11b123,_0x3bce93){return _0x11b123(_0x3bce93);}},_0x2d8455=await _0x5d93d6[_0x311eec(0x117)](getMcpAuthOrigin);if(_0x2d8455){console[_0x311eec(0x12b)](_0x311eec(0x118)),await _0x5d93d6['xTwBh'](mcpBootstrap);return;}if(!isInteractive())throw new Error(_0x5d93d6[_0x311eec(0x124)]);try{const _0x36e68=await runDeviceAuthFlow(),_0x32954a=await _0x5d93d6[_0x311eec(0x128)](getCurrentUser,_0x36e68);_0x32954a[_0x311eec(0x127)]?console[_0x311eec(0x12b)](_0x311eec(0x119)+_0x32954a['user'][_0x311eec(0x11c)]):console[_0x311eec(0x12b)](_0x311eec(0x125));}catch(_0x2516b1){throw new Error(_0x311eec(0x11f)+(_0x2516b1 instanceof Error?_0x2516b1['message']:_0x2516b1));}}
@@ -1 +1 @@
1
- const _0x957390=_0x5b46;(function(_0x27c270,_0x3d91e7){const _0x4b498c=_0x5b46,_0x391a35=_0x27c270();while(!![]){try{const _0x3b17a2=-parseInt(_0x4b498c(0x203))/0x1*(-parseInt(_0x4b498c(0x22d))/0x2)+-parseInt(_0x4b498c(0x23e))/0x3+parseInt(_0x4b498c(0x24f))/0x4+parseInt(_0x4b498c(0x208))/0x5*(-parseInt(_0x4b498c(0x247))/0x6)+-parseInt(_0x4b498c(0x242))/0x7*(-parseInt(_0x4b498c(0x207))/0x8)+-parseInt(_0x4b498c(0x26c))/0x9+parseInt(_0x4b498c(0x23a))/0xa;if(_0x3b17a2===_0x3d91e7)break;else _0x391a35['push'](_0x391a35['shift']());}catch(_0x51fb37){_0x391a35['push'](_0x391a35['shift']());}}}(_0x1b32,0x254a5));import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createServer}from'http';import{randomBytes,createHash}from'crypto';import{exec}from'child_process';import{getMcpAuthUrl}from'./utils/environment.js';const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),_0x957390(0x1df),_0x957390(0x1e4)),AUTH_ORIGIN_PATH=join(homedir(),_0x957390(0x1df),_0x957390(0x21d));export async function getMcpAuthOrigin(){const _0x29f4d8=_0x957390,_0x5c5780={'sgwyX':_0x29f4d8(0x1fa),'ObeRh':function(_0x27eb0d,_0x137e43){return _0x27eb0d||_0x137e43;}};try{const _0x47f22d=(await readFile(AUTH_ORIGIN_PATH,_0x5c5780[_0x29f4d8(0x1fe)]))[_0x29f4d8(0x243)]();return _0x5c5780['ObeRh'](_0x47f22d,null);}catch{return null;}}export async function mcpBootstrap(){const _0x19a310=_0x957390,_0x29f111={'GFdMI':function(_0x17979d){return _0x17979d();},'FhCcG':function(_0x27e7c7,_0x447601){return _0x27e7c7(_0x447601);},'bRnZB':function(_0x2704b8,_0x493cdf){return _0x2704b8===_0x493cdf;},'GZuBL':'proxied','TkuBm':'MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','glPxU':'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.'},_0x4c81fa=_0x29f111['GFdMI'](getMcpAuthUrl);currentOrigin=_0x4c81fa;const _0x2523db=process[_0x19a310(0x1e1)][_0x19a310(0x214)]??![];console['log'](_0x19a310(0x21b)+_0x4c81fa+'\x0a');const _0x14a27a=await _0x29f111[_0x19a310(0x209)](tryUnauthenticated,_0x4c81fa);let _0x30bfb4=null;if(_0x29f111[_0x19a310(0x1fd)](_0x14a27a,_0x29f111[_0x19a310(0x260)]))_0x30bfb4='';else{_0x30bfb4=await loadCachedToken();if(!_0x30bfb4){if(!_0x2523db)throw new Error(_0x29f111[_0x19a310(0x271)]+_0x29f111['glPxU']);_0x30bfb4=await oauthFlow(_0x4c81fa);}}await callGetCliToken(_0x4c81fa,_0x30bfb4);}async function tryUnauthenticated(_0x167def){const _0xed664=_0x957390,_0x2d5a0d={'wENiJ':'POST','FDSDp':'application/json','PahkM':'application/json,\x20text/event-stream','yulkK':_0xed664(0x27b),'faDRd':_0xed664(0x24c),'zXvak':_0xed664(0x223),'sqKNl':_0xed664(0x262)},_0x3b12d9=await fetch(_0x167def,{'method':_0x2d5a0d[_0xed664(0x24e)],'headers':{'Content-Type':_0x2d5a0d[_0xed664(0x21c)],'Accept':_0x2d5a0d['PahkM']},'body':JSON[_0xed664(0x22e)]({'jsonrpc':_0x2d5a0d['yulkK'],'id':0x1,'method':_0x2d5a0d[_0xed664(0x255)],'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x2d5a0d['zXvak'],'version':_0xed664(0x23f)}}})});if(_0x3b12d9['ok'])return await _0x3b12d9['text'](),_0xed664(0x219);if(_0x3b12d9[_0xed664(0x211)]===0x191)return await _0x3b12d9[_0xed664(0x252)](),_0x2d5a0d['sqKNl'];const _0x5f5ba5=await _0x3b12d9[_0xed664(0x252)]();throw new Error(_0xed664(0x277)+_0x3b12d9['status']+':\x20'+_0x5f5ba5);}function _0x5b46(_0x1080d0,_0xe72a58){_0x1080d0=_0x1080d0-0x1dd;const _0x1b3274=_0x1b32();let _0x5b465b=_0x1b3274[_0x1080d0];return _0x5b465b;}function _0x1b32(){const _0x40cfb2=['1993284rMBHft','authorization_endpoint','deHvW','<html><body><h2>Authentication\x20failed</h2><p>','QzIWh','TkuBm','OAuthTimeoutError','expiresAt','accessToken','platform','access_token','MCP\x20server\x20returned\x20HTTP\x20','structuredContent','MhWUJ','EDrqX','2.0','NrRBf','code_challenge','.ranger','content-type','stdout','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','EPVbg','mcp-oauth-tokens.json','<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','registration_endpoint','base64url','update','gFJSq','Discovering\x20authorization\x20server...','kOAJk','VndvL','string','TSpaJ','127.0.0.1','includes','close','LgRYN','Token\x20exchange\x20failed:\x20','No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','TGCLO','nwOqv','OAuth\x20error:\x20','PADgR','Ranger\x20CLI','utf-8','\x20done','refreshToken','bRnZB','sgwyX','kapFs','Initializing\x20MCP\x20session...','S256','pathname','1227nUUoZp','application/json,\x20text/event-stream','Exchanging\x20authorization\x20code...','log','32nPOSdG','12295uamBJW','FhCcG','code','Requesting\x20CLI\x20token...','Registering\x20OAuth\x20client...','yecfu','content','write','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','status','FxDwJ','wKJRV','isTTY','expires_in','listen','get','client_id','proxied','refresh.txt','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','FDSDp','auth-origin.txt','token','resource','2025-03-26','Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','start','ranger-cli','daQEi','Authorization','\x0aToken\x20written\x20to\x20','now','POST','name','end','Unknown\x20error','application/json','474TbeICe','stringify','sha256','application/x-www-form-urlencoded','origin','parse','ugZpF','Pjprz','/.well-known/oauth-protected-resource','JENJY','LWOdz','/callback','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','699020gULXmS','KmQcS','kYTpR','redirect_uri','342129CfZsep','1.0.0','url','whUDS','428743qyGsPC','trim','startsWith','code_challenge_method','error','720jnTHVj','set','slice','http://localhost:','text/event-stream','initialize','LgaXp','wENiJ','710572sbZbUJ','jiXzS','message','text','OjPCb','get_cli_token\x20failed:\x20','faDRd','Mitsv','/.well-known/oauth-authorization-server','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','HTTP\x20','hwvzt','state','json','toString','xdg-open','text/html','GZuBL','split','needs-oauth','oBIOa','authorization_servers','MCP\x20initialize\x20failed:\x20','match','TEsNT','TJUUC','OgJwl','KQkDT','searchParams'];_0x1b32=function(){return _0x40cfb2;};return _0x1b32();}class OAuthTimeoutError extends Error{constructor(_0x530272){const _0x298957=_0x957390,_0x46c46c={'wKJRV':_0x298957(0x272)};super(_0x530272),this[_0x298957(0x229)]=_0x46c46c[_0x298957(0x213)];}}async function oauthFlow(_0x5818b5){const _0x5ec315=_0x957390,_0x123bf8={'kUzyw':_0x5ec315(0x210),'vNalT':function(_0x3cdb54,_0x59633b){return _0x3cdb54(_0x59633b);}};try{return await oauthFlowAttempt(_0x5818b5);}catch(_0xe51440){if(_0xe51440 instanceof OAuthTimeoutError&&await loadCachedClient())return console[_0x5ec315(0x206)](_0x123bf8['kUzyw']),await clearCachedClient(),await _0x123bf8['vNalT'](oauthFlowAttempt,_0x5818b5);throw _0xe51440;}}async function oauthFlowAttempt(_0x2cce5b){const _0x4d84a7=_0x957390,_0x44466c={'FAgdJ':_0x4d84a7(0x1ea),'LgRYN':function(_0x3d930b,_0x48e18d){return _0x3d930b(_0x48e18d);},'oBIOa':function(_0x39ea48){return _0x39ea48();},'YiDZm':_0x4d84a7(0x20c),'deHvW':'POST','daQEi':'application/json','IPcTJ':_0x4d84a7(0x1f9),'OgJwl':'\x20done','aljxq':function(_0x348f07,_0x36f1c0){return _0x348f07(_0x36f1c0);},'GGIkT':_0x4d84a7(0x1e7),'kYTpR':_0x4d84a7(0x22f),'TGCLO':'hex','FxDwJ':'response_type','EDrqX':'code','whUDS':_0x4d84a7(0x23d),'JDNoJ':_0x4d84a7(0x245),'MhWUJ':_0x4d84a7(0x201),'LWOdz':_0x4d84a7(0x25b),'WfhCS':'resource','VndvL':function(_0x2c7fd9,_0x579225){return _0x2c7fd9(_0x579225);},'lMoQu':'client_secret','zKBCl':function(_0x18c3b1,_0x1f6ef3,_0x324743,_0x207e0e){return _0x18c3b1(_0x1f6ef3,_0x324743,_0x207e0e);}},_0x400d99=_0x2cce5b['replace'](/\/mcp$/,'');process[_0x4d84a7(0x1e1)][_0x4d84a7(0x20f)](_0x44466c['FAgdJ']);const _0xb6a409=await fetch(_0x400d99+_0x4d84a7(0x235));if(!_0xb6a409['ok'])throw new Error(_0x4d84a7(0x221));const _0x1f6498=await _0xb6a409['json'](),_0x48d905=_0x1f6498[_0x4d84a7(0x264)]?.[0x0];if(!_0x48d905)throw new Error(_0x4d84a7(0x1f4));console[_0x4d84a7(0x206)]('\x20'+_0x48d905);const _0xcecb0d=await _0x44466c[_0x4d84a7(0x1f2)](fetchAuthServerMetadata,_0x48d905);let _0x3f11ae,_0x3f6868;const _0x41cb37=await _0x44466c[_0x4d84a7(0x263)](loadCachedClient);if(_0x41cb37)_0x3f11ae=_0x41cb37['clientId'],_0x3f6868=_0x41cb37['clientSecret'];else{if(_0xcecb0d[_0x4d84a7(0x1e6)]){process[_0x4d84a7(0x1e1)]['write'](_0x44466c['YiDZm']);const _0x3411ec=await fetch(_0xcecb0d['registration_endpoint'],{'method':_0x44466c[_0x4d84a7(0x26e)],'headers':{'Content-Type':_0x44466c[_0x4d84a7(0x224)]},'body':JSON[_0x4d84a7(0x22e)]({'client_name':_0x44466c['IPcTJ'],'redirect_uris':[_0x4d84a7(0x24a)+CALLBACK_PORT+'/callback'],'grant_types':['authorization_code','refresh_token'],'response_types':[_0x4d84a7(0x20a)],'token_endpoint_auth_method':'none'})});if(!_0x3411ec['ok']){const _0x264ada=await _0x3411ec[_0x4d84a7(0x252)]();throw new Error('Client\x20registration\x20failed:\x20'+_0x264ada);}const _0x14a5f7=await _0x3411ec[_0x4d84a7(0x25c)]();_0x3f11ae=_0x14a5f7[_0x4d84a7(0x218)],_0x3f6868=_0x14a5f7['client_secret'],await saveCachedClient(_0x3f11ae,_0x3f6868),console['log'](_0x44466c['OgJwl']);}else throw new Error('Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found');}const _0x28035b=_0x44466c['aljxq'](randomBytes,0x20)['toString'](_0x44466c['GGIkT']),_0x30c604=createHash(_0x44466c[_0x4d84a7(0x23c)])[_0x4d84a7(0x1e8)](_0x28035b)['digest']('base64url'),_0x76656d=randomBytes(0x10)['toString'](_0x44466c[_0x4d84a7(0x1f5)]),_0x5da3e9=new URL(_0xcecb0d[_0x4d84a7(0x26d)]);_0x5da3e9[_0x4d84a7(0x26b)]['set'](_0x44466c[_0x4d84a7(0x212)],_0x44466c[_0x4d84a7(0x27a)]),_0x5da3e9['searchParams']['set']('client_id',_0x3f11ae),_0x5da3e9[_0x4d84a7(0x26b)][_0x4d84a7(0x248)](_0x44466c[_0x4d84a7(0x241)],_0x4d84a7(0x24a)+CALLBACK_PORT+'/callback'),_0x5da3e9[_0x4d84a7(0x26b)]['set'](_0x4d84a7(0x1de),_0x30c604),_0x5da3e9[_0x4d84a7(0x26b)][_0x4d84a7(0x248)](_0x44466c['JDNoJ'],_0x44466c[_0x4d84a7(0x279)]),_0x5da3e9['searchParams']['set'](_0x44466c[_0x4d84a7(0x237)],_0x76656d);_0x1f6498['resource']&&_0x5da3e9['searchParams'][_0x4d84a7(0x248)](_0x44466c['WfhCS'],_0x1f6498['resource']);console[_0x4d84a7(0x206)]('\x0aOpening\x20browser\x20for\x20authentication...'),console[_0x4d84a7(0x206)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a'+_0x5da3e9[_0x4d84a7(0x25d)]()+'\x0a'),await openBrowser(_0x5da3e9[_0x4d84a7(0x25d)]());const _0x204195=await _0x44466c[_0x4d84a7(0x1ec)](waitForCallback,_0x76656d);process['stdout']['write'](_0x4d84a7(0x205));const _0x3cab1f=new URLSearchParams({'grant_type':'authorization_code','code':_0x204195,'redirect_uri':_0x4d84a7(0x24a)+CALLBACK_PORT+_0x4d84a7(0x238),'client_id':_0x3f11ae,'code_verifier':_0x28035b});_0x3f6868&&_0x3cab1f[_0x4d84a7(0x248)](_0x44466c['lMoQu'],_0x3f6868);_0x1f6498['resource']&&_0x3cab1f['set'](_0x4d84a7(0x21f),_0x1f6498[_0x4d84a7(0x21f)]);const _0x3f32a9=await fetch(_0xcecb0d['token_endpoint'],{'method':_0x44466c['deHvW'],'headers':{'Content-Type':_0x4d84a7(0x230)},'body':_0x3cab1f});if(!_0x3f32a9['ok']){const _0x45da3e=await _0x3f32a9['text']();throw new Error(_0x4d84a7(0x1f3)+_0x45da3e);}const _0xc6cc44=await _0x3f32a9['json']();return console[_0x4d84a7(0x206)](_0x44466c[_0x4d84a7(0x269)]),await _0x44466c['zKBCl'](saveCachedToken,_0xc6cc44[_0x4d84a7(0x276)],_0xc6cc44['refresh_token'],_0xc6cc44[_0x4d84a7(0x215)]),_0xc6cc44['access_token'];}async function callGetCliToken(_0x54ec96,_0x281555){const _0x177884=_0x957390,_0x59b50f={'EPVbg':function(_0x4cee7f,_0x3e23d2,_0x48740d){return _0x4cee7f(_0x3e23d2,_0x48740d);},'bHYDb':_0x177884(0x228),'qJeEo':_0x177884(0x22c),'NrRBf':_0x177884(0x204),'ugZpF':_0x177884(0x225),'PfnmT':function(_0x318e8b,_0x101ef3){return _0x318e8b(_0x101ef3);},'hwvzt':_0x177884(0x24c),'XcJxb':_0x177884(0x220),'QzIWh':_0x177884(0x223),'gFJSq':'1.0.0','yLhbA':'2.0','TEsNT':'tools/call','JENJY':'\x20done','pzxHx':'\x0aUnexpected\x20response\x20structure:','vCyOl':'Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','Pjprz':function(_0x37ff76){return _0x37ff76();},'jXABl':_0x177884(0x1df),'euDsR':_0x177884(0x21a),'KQkDT':function(_0xf5ccd0,_0x4388dc,_0x344b10,_0x12bc3a){return _0xf5ccd0(_0x4388dc,_0x344b10,_0x12bc3a);},'nwOqv':function(_0x518dc1,_0x27b1a9,_0x1a8ce5){return _0x518dc1(_0x27b1a9,_0x1a8ce5);}},_0x4dc3cf={'Content-Type':_0x59b50f['qJeEo'],'Accept':_0x59b50f[_0x177884(0x1dd)]};_0x281555&&(_0x4dc3cf[_0x59b50f[_0x177884(0x233)]]='Bearer\x20'+_0x281555);const _0x52ba8e=async _0x5b16d0=>{const _0x532022=_0x177884,_0x3f05fd=await _0x59b50f[_0x532022(0x1e3)](fetch,_0x54ec96,{'method':_0x59b50f['bHYDb'],'headers':_0x4dc3cf,'body':JSON[_0x532022(0x22e)](_0x5b16d0)});if(!_0x3f05fd['ok']){const _0x260381=await _0x3f05fd[_0x532022(0x252)]();throw new Error(_0x532022(0x259)+_0x3f05fd[_0x532022(0x211)]+':\x20'+_0x260381);}return parseResponse(_0x3f05fd);};process[_0x177884(0x1e1)]['write'](_0x177884(0x200));const _0x406085=await _0x59b50f['PfnmT'](_0x52ba8e,{'jsonrpc':'2.0','id':0x1,'method':_0x59b50f[_0x177884(0x25a)],'params':{'protocolVersion':_0x59b50f['XcJxb'],'capabilities':{},'clientInfo':{'name':_0x59b50f[_0x177884(0x270)],'version':_0x59b50f[_0x177884(0x1e9)]}}});if(_0x406085[_0x177884(0x246)])throw new Error(_0x177884(0x265)+(_0x406085[_0x177884(0x246)][_0x177884(0x251)]??JSON[_0x177884(0x22e)](_0x406085[_0x177884(0x246)])));console['log'](_0x177884(0x1fb)),await fetch(_0x54ec96,{'method':_0x177884(0x228),'headers':_0x4dc3cf,'body':JSON[_0x177884(0x22e)]({'jsonrpc':_0x177884(0x27b),'method':'notifications/initialized'})})['then'](_0x1d70a5=>_0x1d70a5[_0x177884(0x252)]()),process['stdout'][_0x177884(0x20f)](_0x177884(0x20b));const _0x20cb04=await _0x52ba8e({'jsonrpc':_0x59b50f['yLhbA'],'id':0x2,'method':_0x59b50f[_0x177884(0x267)],'params':{'name':'get_cli_token','arguments':{}}});if(_0x20cb04[_0x177884(0x246)])throw new Error(_0x177884(0x254)+(_0x20cb04['error'][_0x177884(0x251)]??JSON['stringify'](_0x20cb04[_0x177884(0x246)])));console[_0x177884(0x206)](_0x59b50f[_0x177884(0x236)]);const _0x35e805=extractToken(_0x20cb04['result']);if(!_0x35e805){console['error'](_0x59b50f['pzxHx']),console[_0x177884(0x246)](JSON[_0x177884(0x22e)](_0x20cb04['result'],null,0x2));throw new Error(_0x59b50f['vCyOl']);}const _0x5d8099=join(_0x59b50f[_0x177884(0x234)](homedir),_0x59b50f['jXABl']),_0x5cbea6=join(_0x5d8099,_0x59b50f['euDsR']);await mkdir(_0x5d8099,{'recursive':!![]}),await writeFile(_0x5cbea6,_0x35e805,{'mode':0x180}),await _0x59b50f[_0x177884(0x26a)](writeFile,_0x59b50f[_0x177884(0x1f6)](join,_0x5d8099,'auth-origin.txt'),_0x54ec96,{'mode':0x180}),console['log'](_0x177884(0x226)+_0x5cbea6),console[_0x177884(0x206)]('Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a');}async function fetchAuthServerMetadata(_0x20241f){const _0x19f272=_0x957390,_0x550029=_0x20241f+_0x19f272(0x257),_0x2ea9da=await fetch(_0x550029);if(!_0x2ea9da['ok'])throw new Error('Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20'+_0x550029+':\x20'+_0x2ea9da['status']);return _0x2ea9da[_0x19f272(0x25c)]();}function waitForCallback(_0x4a7c31){const _0x264121=_0x957390,_0x563468={'DVrki':_0x264121(0x238),'LgaXp':'Not\x20found','eeWWe':'state','MsOSK':function(_0x84a3d0,_0x29b00b){return _0x84a3d0(_0x29b00b);},'ldxzP':'text/html','znquX':_0x264121(0x1e5),'OjPCb':'<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','PADgR':function(_0x20f160,_0x203284){return _0x20f160(_0x203284);},'jJUpU':function(_0x4b76b2){return _0x4b76b2();},'KmQcS':function(_0x1fc51c){return _0x1fc51c();}};return new Promise((_0x4eb031,_0x12dc91)=>{const _0x7961bd=_0x264121,_0x3008e1={'oKNai':function(_0x3d41c2){const _0x57654c=_0x5b46;return _0x563468[_0x57654c(0x23b)](_0x3d41c2);},'OlKIx':function(_0x18b6f2,_0x3505c8){return _0x18b6f2(_0x3505c8);}},_0x363b61=()=>{const _0x12d8d1=_0x5b46;_0xaf83eb['closeAllConnections'](),_0xaf83eb[_0x12d8d1(0x1f1)]();},_0x3ce15a=setTimeout(()=>{const _0x1d42fa=_0x5b46;_0x3008e1['oKNai'](_0x363b61),_0x3008e1['OlKIx'](_0x12dc91,new OAuthTimeoutError(_0x1d42fa(0x239)));},0x1d4c0),_0xaf83eb=_0x563468['PADgR'](createServer,(_0x1de2aa,_0x3c4448)=>{const _0x5a913c=_0x5b46,_0x456095=new URL(_0x1de2aa[_0x5a913c(0x240)]??'/','http://localhost:'+CALLBACK_PORT);if(_0x456095[_0x5a913c(0x202)]!==_0x563468['DVrki']){_0x3c4448['writeHead'](0x194),_0x3c4448['end'](_0x563468[_0x5a913c(0x24d)]);return;}const _0x349e6b=_0x456095['searchParams']['get']('code'),_0x4677b4=_0x456095['searchParams']['get'](_0x563468['eeWWe']),_0x1351e8=_0x456095['searchParams'][_0x5a913c(0x217)](_0x5a913c(0x246));if(_0x1351e8){const _0x56b9f9=_0x456095['searchParams'][_0x5a913c(0x217)]('error_description')??_0x1351e8;_0x3c4448['writeHead'](0xc8,{'Content-Type':'text/html'}),_0x3c4448[_0x5a913c(0x22a)](_0x5a913c(0x26f)+_0x56b9f9+_0x5a913c(0x1e2)),_0x563468['MsOSK'](clearTimeout,_0x3ce15a),_0x363b61(),_0x12dc91(new Error(_0x5a913c(0x1f7)+_0x56b9f9));return;}if(!_0x349e6b||_0x4677b4!==_0x4a7c31){_0x3c4448['writeHead'](0x190,{'Content-Type':_0x563468['ldxzP']}),_0x3c4448['end'](_0x563468['znquX']);return;}_0x3c4448['writeHead'](0xc8,{'Content-Type':_0x5a913c(0x25f)}),_0x3c4448[_0x5a913c(0x22a)](_0x563468[_0x5a913c(0x253)]),_0x563468[_0x5a913c(0x1f8)](clearTimeout,_0x3ce15a),_0x563468['jJUpU'](_0x363b61),_0x4eb031(_0x349e6b);});_0xaf83eb[_0x7961bd(0x216)](CALLBACK_PORT,_0x7961bd(0x1ef));});}async function openBrowser(_0x5a5a26){const _0x1093c6=_0x957390,_0x597621={'MvLCi':function(_0x55b14b,_0x2488e5){return _0x55b14b===_0x2488e5;},'qDfZU':'open','yecfu':function(_0x31987c,_0x3cea04){return _0x31987c===_0x3cea04;},'kOAJk':_0x1093c6(0x222),'jiXzS':function(_0x12d719,_0x223baf){return _0x12d719(_0x223baf);}},_0x4e1e9b=_0x597621['MvLCi'](process[_0x1093c6(0x275)],'darwin')?_0x597621['qDfZU']:_0x597621[_0x1093c6(0x20d)](process['platform'],'win32')?_0x597621[_0x1093c6(0x1eb)]:_0x1093c6(0x25e);_0x597621[_0x1093c6(0x250)](exec,_0x4e1e9b+'\x20\x22'+_0x5a5a26+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x56eefd=_0x957390,_0x576f27={'fvllb':function(_0x3295a2,_0xd2e4e0){return _0x3295a2!==_0xd2e4e0;}};try{const _0x38d40f=JSON['parse'](await readFile(TOKEN_CACHE_PATH,'utf-8'));if(_0x38d40f['origin']&&_0x576f27['fvllb'](_0x38d40f['origin'],currentOrigin))return null;if(_0x38d40f[_0x56eefd(0x273)]&&Date['now']()>_0x38d40f['expiresAt'])return null;return _0x38d40f[_0x56eefd(0x274)]??null;}catch{return null;}}async function saveCachedToken(_0x4ec445,_0x5b42fb,_0x481f01){const _0x1c52c4=_0x957390,_0x1482d3={'BVzLd':function(_0x5ceca7,_0x33cbae){return _0x5ceca7*_0x33cbae;},'JuICJ':function(_0x34b1a4){return _0x34b1a4();}},_0x66620d=await loadCachedData(),_0x267cc3={..._0x66620d,'origin':currentOrigin,'accessToken':_0x4ec445,'refreshToken':_0x5b42fb??_0x66620d?.[_0x1c52c4(0x1fc)],'expiresAt':_0x481f01?Date[_0x1c52c4(0x227)]()+_0x1482d3['BVzLd'](_0x481f01,0x3e8):undefined};await mkdir(join(_0x1482d3['JuICJ'](homedir),_0x1c52c4(0x1df)),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON[_0x1c52c4(0x22e)](_0x267cc3),{'mode':0x180});}async function loadCachedClient(){const _0x512e5d=_0x957390,_0x5c22d0={'jMNsb':function(_0x5ba777,_0x593fd0){return _0x5ba777!==_0x593fd0;}},_0x2c0a96=await loadCachedData();if(_0x2c0a96?.['origin']&&_0x5c22d0['jMNsb'](_0x2c0a96[_0x512e5d(0x231)],currentOrigin))return null;return _0x2c0a96?.['clientId']?{'clientId':_0x2c0a96['clientId'],'clientSecret':_0x2c0a96['clientSecret']}:null;}async function clearCachedClient(){const _0xda9dbe=_0x957390,_0x23e132={'ejFhn':function(_0x32e637){return _0x32e637();},'Mitsv':function(_0x3d4566,_0x5bd262,_0x4a3812,_0x4a1609){return _0x3d4566(_0x5bd262,_0x4a3812,_0x4a1609);}},_0x15b66b=await _0x23e132['ejFhn'](loadCachedData);if(!_0x15b66b)return;const {clientId:_0xdbfd1c,clientSecret:_0x5613ea,..._0x2c53dd}=_0x15b66b;await _0x23e132[_0xda9dbe(0x256)](writeFile,TOKEN_CACHE_PATH,JSON[_0xda9dbe(0x22e)](_0x2c53dd),{'mode':0x180});}async function saveCachedClient(_0x55d2dc,_0x1a67d5){const _0xdfae=_0x957390,_0x3c1373={'TSpaJ':function(_0x1a3af1,_0x2f93ff,_0x5668ac,_0x4f2dda){return _0x1a3af1(_0x2f93ff,_0x5668ac,_0x4f2dda);}},_0x3cebb7=await loadCachedData(),_0x24c443={..._0x3cebb7,'origin':currentOrigin,'accessToken':_0x3cebb7?.[_0xdfae(0x274)]??'','clientId':_0x55d2dc,'clientSecret':_0x1a67d5};await mkdir(join(homedir(),'.ranger'),{'recursive':!![]}),await _0x3c1373[_0xdfae(0x1ee)](writeFile,TOKEN_CACHE_PATH,JSON[_0xdfae(0x22e)](_0x24c443),{'mode':0x180});}async function loadCachedData(){const _0x284b4a=_0x957390,_0x523ffc={'CdUyZ':function(_0xdf60d1,_0x40716c,_0x2c50d1){return _0xdf60d1(_0x40716c,_0x2c50d1);},'egZXM':_0x284b4a(0x1fa)};try{return JSON[_0x284b4a(0x232)](await _0x523ffc['CdUyZ'](readFile,TOKEN_CACHE_PATH,_0x523ffc['egZXM']));}catch{return null;}}async function parseResponse(_0x313db5){const _0x118d7c=_0x957390,_0x26f859={'kapFs':_0x118d7c(0x1e0),'adSfj':_0x118d7c(0x258)},_0x421251=_0x313db5['headers']['get'](_0x26f859[_0x118d7c(0x1ff)])??'';if(_0x421251[_0x118d7c(0x1f0)](_0x118d7c(0x24b))){const _0x35d3ad=await _0x313db5[_0x118d7c(0x252)]();for(const _0xbcefe6 of _0x35d3ad[_0x118d7c(0x261)]('\x0a')){const _0x5ee6cd=_0xbcefe6['trim']();if(_0x5ee6cd[_0x118d7c(0x244)]('data:')){const _0x2bb231=_0x5ee6cd[_0x118d7c(0x249)]('data:'['length'])[_0x118d7c(0x243)]();if(!_0x2bb231)continue;try{const _0x2aa38f=JSON['parse'](_0x2bb231);if(_0x2aa38f['id']!==undefined||_0x2aa38f[_0x118d7c(0x246)])return _0x2aa38f;}catch{}}}throw new Error(_0x26f859['adSfj']);}return _0x313db5[_0x118d7c(0x25c)]();}function extractToken(_0x4343ae){const _0x59ed8d=_0x957390,_0x574325={'Mybsc':function(_0x213480,_0x22c524){return _0x213480===_0x22c524;},'TJUUC':_0x59ed8d(0x252),'Oyrsd':'string'};if(!_0x4343ae)return null;const _0x20b377=_0x4343ae[_0x59ed8d(0x278)];if(_0x20b377?.['token']&&typeof _0x20b377['token']===_0x59ed8d(0x1ed))return _0x20b377[_0x59ed8d(0x21e)];if(_0x4343ae['isError']){const _0x34baf7=_0x4343ae['content'];throw new Error('Server\x20returned\x20error:\x20'+(_0x34baf7?.[0x0]?.[_0x59ed8d(0x252)]??_0x59ed8d(0x22b)));}const _0x16b1aa=_0x4343ae[_0x59ed8d(0x20e)];if(_0x16b1aa)for(const _0x3c2a75 of _0x16b1aa){if(_0x574325['Mybsc'](_0x3c2a75['type'],_0x574325[_0x59ed8d(0x268)])&&_0x3c2a75[_0x59ed8d(0x252)]){try{const _0x1ee3af=JSON[_0x59ed8d(0x232)](_0x3c2a75['text']);if(typeof _0x1ee3af?.[_0x59ed8d(0x21e)]===_0x574325['Oyrsd'])return _0x1ee3af[_0x59ed8d(0x21e)];}catch{}const _0x5ba70e=_0x3c2a75[_0x59ed8d(0x252)][_0x59ed8d(0x266)](/(rngr_[A-Za-z0-9_-]+)/);if(_0x5ba70e)return _0x5ba70e[0x1];}}return null;}
1
+ const _0x10f084=_0x4402;(function(_0x4e4a77,_0x7301a3){const _0x5a781a=_0x4402,_0x136048=_0x4e4a77();while(!![]){try{const _0x23405d=parseInt(_0x5a781a(0x211))/0x1+parseInt(_0x5a781a(0x218))/0x2+parseInt(_0x5a781a(0x21c))/0x3+-parseInt(_0x5a781a(0x1c8))/0x4+parseInt(_0x5a781a(0x1e5))/0x5*(parseInt(_0x5a781a(0x1ee))/0x6)+parseInt(_0x5a781a(0x219))/0x7*(parseInt(_0x5a781a(0x1b1))/0x8)+-parseInt(_0x5a781a(0x1ff))/0x9;if(_0x23405d===_0x7301a3)break;else _0x136048['push'](_0x136048['shift']());}catch(_0x46992a){_0x136048['push'](_0x136048['shift']());}}}(_0xdc2b,0x36353));import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createServer}from'http';import{randomBytes,createHash}from'crypto';import{exec}from'child_process';import{getMcpAuthUrl}from'./utils/environment.js';const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),_0x10f084(0x202),'mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),'.ranger','auth-origin.txt');function _0x4402(_0x5cca37,_0x3a07c9){_0x5cca37=_0x5cca37-0x1a1;const _0xdc2b41=_0xdc2b();let _0x440201=_0xdc2b41[_0x5cca37];return _0x440201;}export async function getMcpAuthOrigin(){const _0x197dab=_0x10f084,_0x46be82={'emBwD':'utf-8','sYAPN':function(_0x7b05ce,_0x579d2d){return _0x7b05ce||_0x579d2d;}};try{const _0x572036=(await readFile(AUTH_ORIGIN_PATH,_0x46be82[_0x197dab(0x1e6)]))[_0x197dab(0x203)]();return _0x46be82[_0x197dab(0x1c6)](_0x572036,null);}catch{return null;}}export async function mcpBootstrap(){const _0x360f8d=_0x10f084,_0x446847={'vmKNa':'proxied','PQJqM':function(_0x2cb595){return _0x2cb595();},'UTVdH':_0x360f8d(0x221),'LIvRa':function(_0x34efc9,_0x4c934d,_0x56ade1){return _0x34efc9(_0x4c934d,_0x56ade1);}},_0x58d9a5=getMcpAuthUrl();currentOrigin=_0x58d9a5;const _0x2d61fe=process[_0x360f8d(0x1e1)]['isTTY']??![];console['log'](_0x360f8d(0x214)+_0x58d9a5+'\x0a');const _0x403af9=await tryUnauthenticated(_0x58d9a5);let _0x577bd1=null;if(_0x403af9===_0x446847['vmKNa'])_0x577bd1='';else{_0x577bd1=await _0x446847['PQJqM'](loadCachedToken);if(!_0x577bd1){if(!_0x2d61fe)throw new Error('MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a'+_0x446847[_0x360f8d(0x1e9)]);_0x577bd1=await oauthFlow(_0x58d9a5);}}await _0x446847[_0x360f8d(0x1c2)](callGetCliToken,_0x58d9a5,_0x577bd1);}async function tryUnauthenticated(_0x3d65c3){const _0x1008ec=_0x10f084,_0x288010={'yTvVs':_0x1008ec(0x1dd),'tOYTj':'application/json,\x20text/event-stream','HQNTO':'ranger-cli'},_0x2b9a70=await fetch(_0x3d65c3,{'method':_0x288010['yTvVs'],'headers':{'Content-Type':_0x1008ec(0x1c9),'Accept':_0x288010[_0x1008ec(0x1be)]},'body':JSON[_0x1008ec(0x1bf)]({'jsonrpc':_0x1008ec(0x21d),'id':0x1,'method':'initialize','params':{'protocolVersion':_0x1008ec(0x207),'capabilities':{},'clientInfo':{'name':_0x288010[_0x1008ec(0x1c0)],'version':_0x1008ec(0x206)}}})});if(_0x2b9a70['ok'])return await _0x2b9a70[_0x1008ec(0x229)](),'proxied';if(_0x2b9a70[_0x1008ec(0x1f9)]===0x191)return await _0x2b9a70['text'](),'needs-oauth';const _0x2b93cd=await _0x2b9a70['text']();throw new Error(_0x1008ec(0x1f6)+_0x2b9a70['status']+':\x20'+_0x2b93cd);}class OAuthTimeoutError extends Error{constructor(_0x24c7f4){const _0x47842c=_0x10f084,_0x3986dd={'FRKFW':'OAuthTimeoutError'};super(_0x24c7f4),this['name']=_0x3986dd[_0x47842c(0x1ec)];}}function _0xdc2b(){const _0x23c3f2=['set','clientId','LwvmP','vGSTw','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a','rpArx','type','access_token','UtRZY','632568hErEtQ','EMmzn','state','resource','aCquw','/.well-known/oauth-protected-resource','GZBYS','darwin','oYTHJ','onMZU','registration_endpoint','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','qKxEN','tOYTj','stringify','HQNTO','result','LIvRa','dUmez','end','CjYKs','sYAPN','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','1009520sftHFG','application/json','get','127.0.0.1','token_endpoint','teGUP','tools/call','Requesting\x20CLI\x20token...','OhIbX','ZhDnv','json','UMdYO','slice','refreshToken','PWlso','expiresAt','content-type','client_id','Ynyfm','log','xdg-open','POST','headers','KddaG','mIvYR','stdout','Token\x20exchange\x20failed:\x20','xyglE','error_description','11190PKCBWP','emBwD','TSgtW','client_secret','UTVdH','bMuqG','authorization_code','FRKFW','initialize','702NLTWbE','<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','error','string','code','writeHead','\x0aToken\x20written\x20to\x20','No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','MCP\x20server\x20returned\x20HTTP\x20','Registering\x20OAuth\x20client...','code_challenge_method','status','Server\x20returned\x20error:\x20','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','refresh_token','token','data:','9653535qBKiOU','apFmx','OKZcV','.ranger','trim','OAuth\x20error:\x20','clientSecret','1.0.0','2025-03-26','rGzeQ','hex','RPNoo','http://localhost:','/callback','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','expires_in','parse','authorization_endpoint','370780RyWVib','YHgwK','wYFkr','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','CGcwx','LCufy','564962gbOmWg','21SufxvK','accessToken','searchParams','1184130jbDOOX','2.0','message','open','platform','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','text/html','Ranger\x20CLI','<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','\x0aUnexpected\x20response\x20structure:','qNbNN','application/x-www-form-urlencoded','\x20done','text','content','VOkHg','toString','write','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','EvHUC','Bearer\x20','gnQoF'];_0xdc2b=function(){return _0x23c3f2;};return _0xdc2b();}async function oauthFlow(_0x5e18e8){const _0x2bc5a0=_0x10f084,_0x1aefd4={'qKxpM':function(_0x3465e3){return _0x3465e3();},'UMdYO':'\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','teGUP':function(_0x5e13cc){return _0x5e13cc();},'hhndB':function(_0x398e5a,_0x2aac3e){return _0x398e5a(_0x2aac3e);}};try{return await oauthFlowAttempt(_0x5e18e8);}catch(_0x169693){if(_0x169693 instanceof OAuthTimeoutError&&await _0x1aefd4['qKxpM'](loadCachedClient))return console[_0x2bc5a0(0x1db)](_0x1aefd4[_0x2bc5a0(0x1d3)]),await _0x1aefd4[_0x2bc5a0(0x1cd)](clearCachedClient),await _0x1aefd4['hhndB'](oauthFlowAttempt,_0x5e18e8);throw _0x169693;}}async function oauthFlowAttempt(_0x2c8462){const _0x37a869=_0x10f084,_0x4e0690={'LwvmP':function(_0x2ab706,_0x571978){return _0x2ab706(_0x571978);},'aCquw':_0x37a869(0x215),'KddaG':_0x37a869(0x1f5),'aCduj':function(_0x2d8eac){return _0x2d8eac();},'cAhpw':_0x37a869(0x1f7),'mBNPU':function(_0x3ac75e,_0x200605,_0x5e4987){return _0x3ac75e(_0x200605,_0x5e4987);},'apFmx':_0x37a869(0x1dd),'mxMVq':'none','xyglE':function(_0x395ccc,_0x204ec1,_0xcf468c){return _0x395ccc(_0x204ec1,_0xcf468c);},'EMmzn':_0x37a869(0x228),'xHGom':function(_0x50e935,_0x374b18){return _0x50e935(_0x374b18);},'EvHUC':'response_type','uFEcD':'code','VOkHg':_0x37a869(0x1d9),'rGzeQ':_0x37a869(0x1f8),'uDmOq':'\x0aOpening\x20browser\x20for\x20authentication...','wYFkr':'Exchanging\x20authorization\x20code...','dUmez':_0x37a869(0x1eb),'UtRZY':_0x37a869(0x1e8),'GZBYS':_0x37a869(0x227)},_0x3b496e=_0x2c8462['replace'](/\/mcp$/,'');process['stdout']['write']('Discovering\x20authorization\x20server...');const _0x1a5957=await _0x4e0690['LwvmP'](fetch,_0x3b496e+_0x37a869(0x1b6));if(!_0x1a5957['ok'])throw new Error(_0x4e0690[_0x37a869(0x1b5)]);const _0x6e5b2d=await _0x1a5957[_0x37a869(0x1d2)](),_0x241e43=_0x6e5b2d['authorization_servers']?.[0x0];if(!_0x241e43)throw new Error(_0x4e0690[_0x37a869(0x1df)]);console['log']('\x20'+_0x241e43);const _0xed77b6=await _0x4e0690['LwvmP'](fetchAuthServerMetadata,_0x241e43);let _0x1e4231,_0xc224e6;const _0x3a5be6=await _0x4e0690['aCduj'](loadCachedClient);if(_0x3a5be6)_0x1e4231=_0x3a5be6[_0x37a869(0x1a9)],_0xc224e6=_0x3a5be6[_0x37a869(0x205)];else{if(_0xed77b6[_0x37a869(0x1bb)]){process[_0x37a869(0x1e1)][_0x37a869(0x1a3)](_0x4e0690['cAhpw']);const _0x2f3159=await _0x4e0690['mBNPU'](fetch,_0xed77b6['registration_endpoint'],{'method':_0x4e0690[_0x37a869(0x200)],'headers':{'Content-Type':_0x37a869(0x1c9)},'body':JSON[_0x37a869(0x1bf)]({'client_name':_0x37a869(0x223),'redirect_uris':[_0x37a869(0x20b)+CALLBACK_PORT+_0x37a869(0x20c)],'grant_types':['authorization_code',_0x37a869(0x1fc)],'response_types':['code'],'token_endpoint_auth_method':_0x4e0690['mxMVq']})});if(!_0x2f3159['ok']){const _0x52ebad=await _0x2f3159[_0x37a869(0x229)]();throw new Error('Client\x20registration\x20failed:\x20'+_0x52ebad);}const _0x2f7b16=await _0x2f3159['json']();_0x1e4231=_0x2f7b16[_0x37a869(0x1d9)],_0xc224e6=_0x2f7b16['client_secret'],await _0x4e0690[_0x37a869(0x1e3)](saveCachedClient,_0x1e4231,_0xc224e6),console['log'](_0x4e0690[_0x37a869(0x1b2)]);}else throw new Error(_0x37a869(0x20d));}const _0x10ddc0=randomBytes(0x20)[_0x37a869(0x1a2)]('base64url'),_0x49771b=createHash('sha256')['update'](_0x10ddc0)['digest']('base64url'),_0x13a504=_0x4e0690['xHGom'](randomBytes,0x10)['toString'](_0x37a869(0x209)),_0x3721f9=new URL(_0xed77b6[_0x37a869(0x210)]);_0x3721f9[_0x37a869(0x21b)][_0x37a869(0x1a8)](_0x4e0690[_0x37a869(0x1a5)],_0x4e0690['uFEcD']),_0x3721f9[_0x37a869(0x21b)]['set'](_0x4e0690[_0x37a869(0x1a1)],_0x1e4231),_0x3721f9['searchParams'][_0x37a869(0x1a8)]('redirect_uri',_0x37a869(0x20b)+CALLBACK_PORT+_0x37a869(0x20c)),_0x3721f9[_0x37a869(0x21b)]['set']('code_challenge',_0x49771b),_0x3721f9[_0x37a869(0x21b)]['set'](_0x4e0690[_0x37a869(0x208)],'S256'),_0x3721f9['searchParams'][_0x37a869(0x1a8)](_0x37a869(0x1b3),_0x13a504);_0x6e5b2d['resource']&&_0x3721f9['searchParams']['set']('resource',_0x6e5b2d['resource']);console['log'](_0x4e0690['uDmOq']),console[_0x37a869(0x1db)](_0x37a869(0x1c7)+_0x3721f9[_0x37a869(0x1a2)]()+'\x0a'),await _0x4e0690[_0x37a869(0x1aa)](openBrowser,_0x3721f9[_0x37a869(0x1a2)]());const _0x4d4a99=await _0x4e0690[_0x37a869(0x1aa)](waitForCallback,_0x13a504);process['stdout'][_0x37a869(0x1a3)](_0x4e0690[_0x37a869(0x213)]);const _0x49160a=new URLSearchParams({'grant_type':_0x4e0690[_0x37a869(0x1c3)],'code':_0x4d4a99,'redirect_uri':_0x37a869(0x20b)+CALLBACK_PORT+'/callback','client_id':_0x1e4231,'code_verifier':_0x10ddc0});_0xc224e6&&_0x49160a[_0x37a869(0x1a8)](_0x4e0690[_0x37a869(0x1b0)],_0xc224e6);_0x6e5b2d['resource']&&_0x49160a[_0x37a869(0x1a8)](_0x37a869(0x1b4),_0x6e5b2d['resource']);const _0x3e966a=await fetch(_0xed77b6[_0x37a869(0x1cc)],{'method':_0x37a869(0x1dd),'headers':{'Content-Type':_0x4e0690[_0x37a869(0x1b7)]},'body':_0x49160a});if(!_0x3e966a['ok']){const _0x41b983=await _0x3e966a[_0x37a869(0x229)]();throw new Error(_0x37a869(0x1e2)+_0x41b983);}const _0x293ccb=await _0x3e966a['json']();return console[_0x37a869(0x1db)](_0x37a869(0x228)),await saveCachedToken(_0x293ccb['access_token'],_0x293ccb[_0x37a869(0x1fc)],_0x293ccb[_0x37a869(0x20e)]),_0x293ccb[_0x37a869(0x1af)];}async function callGetCliToken(_0x72c7ef,_0x5b6123){const _0x2cc37e=_0x10f084,_0x541135={'bMuqG':_0x2cc37e(0x1dd),'jgHWL':'Authorization','SLmOK':function(_0x85f769,_0x1a5142){return _0x85f769(_0x1a5142);},'mIvYR':'2.0','mgobB':_0x2cc37e(0x1ed),'NGcPc':function(_0x2dd676,_0x24dcef,_0x2f4d18){return _0x2dd676(_0x24dcef,_0x2f4d18);},'XelrY':'notifications/initialized','FuTil':_0x2cc37e(0x1cf),'NhNHQ':_0x2cc37e(0x1ce),'VACnB':'get_cli_token','ptNhK':_0x2cc37e(0x228),'qNbNN':_0x2cc37e(0x1bc),'LCufy':'.ranger','GJEwG':'refresh.txt','OKZcV':function(_0x415288,_0x110683,_0x314ddc,_0x25cb7a){return _0x415288(_0x110683,_0x314ddc,_0x25cb7a);},'vwlGZ':'auth-origin.txt','PWlso':_0x2cc37e(0x1ac)},_0x29da04={'Content-Type':'application/json','Accept':'application/json,\x20text/event-stream'};_0x5b6123&&(_0x29da04[_0x541135['jgHWL']]=_0x2cc37e(0x1a6)+_0x5b6123);const _0x36771d=async _0x16c6f2=>{const _0x5f34ee=_0x2cc37e,_0x1e5419=await fetch(_0x72c7ef,{'method':_0x541135[_0x5f34ee(0x1ea)],'headers':_0x29da04,'body':JSON['stringify'](_0x16c6f2)});if(!_0x1e5419['ok']){const _0x30c53c=await _0x1e5419[_0x5f34ee(0x229)]();throw new Error('HTTP\x20'+_0x1e5419[_0x5f34ee(0x1f9)]+':\x20'+_0x30c53c);}return parseResponse(_0x1e5419);};process[_0x2cc37e(0x1e1)][_0x2cc37e(0x1a3)]('Initializing\x20MCP\x20session...');const _0x24ecaa=await _0x541135['SLmOK'](_0x36771d,{'jsonrpc':_0x541135['mIvYR'],'id':0x1,'method':_0x541135['mgobB'],'params':{'protocolVersion':_0x2cc37e(0x207),'capabilities':{},'clientInfo':{'name':'ranger-cli','version':'1.0.0'}}});if(_0x24ecaa[_0x2cc37e(0x1f0)])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x24ecaa['error'][_0x2cc37e(0x21e)]??JSON[_0x2cc37e(0x1bf)](_0x24ecaa[_0x2cc37e(0x1f0)])));console[_0x2cc37e(0x1db)](_0x2cc37e(0x228)),await _0x541135['NGcPc'](fetch,_0x72c7ef,{'method':_0x2cc37e(0x1dd),'headers':_0x29da04,'body':JSON[_0x2cc37e(0x1bf)]({'jsonrpc':_0x2cc37e(0x21d),'method':_0x541135['XelrY']})})['then'](_0xabf31b=>_0xabf31b['text']()),process[_0x2cc37e(0x1e1)]['write'](_0x541135['FuTil']);const _0x1bf512=await _0x36771d({'jsonrpc':_0x541135[_0x2cc37e(0x1e0)],'id':0x2,'method':_0x541135['NhNHQ'],'params':{'name':_0x541135['VACnB'],'arguments':{}}});if(_0x1bf512[_0x2cc37e(0x1f0)])throw new Error('get_cli_token\x20failed:\x20'+(_0x1bf512['error']['message']??JSON['stringify'](_0x1bf512[_0x2cc37e(0x1f0)])));console[_0x2cc37e(0x1db)](_0x541135['ptNhK']);const _0x38125f=extractToken(_0x1bf512[_0x2cc37e(0x1c1)]);if(!_0x38125f){console['error'](_0x2cc37e(0x225)),console[_0x2cc37e(0x1f0)](JSON[_0x2cc37e(0x1bf)](_0x1bf512['result'],null,0x2));throw new Error(_0x541135[_0x2cc37e(0x226)]);}const _0x1f8c69=join(homedir(),_0x541135[_0x2cc37e(0x217)]),_0x5b9160=join(_0x1f8c69,_0x541135['GJEwG']);await _0x541135['NGcPc'](mkdir,_0x1f8c69,{'recursive':!![]}),await _0x541135[_0x2cc37e(0x201)](writeFile,_0x5b9160,_0x38125f,{'mode':0x180}),await writeFile(join(_0x1f8c69,_0x541135['vwlGZ']),_0x72c7ef,{'mode':0x180}),console['log'](_0x2cc37e(0x1f4)+_0x5b9160),console['log'](_0x541135[_0x2cc37e(0x1d6)]);}async function fetchAuthServerMetadata(_0x372cff){const _0x11b269=_0x10f084,_0x56825e=_0x372cff+'/.well-known/oauth-authorization-server',_0x3ef8ac=await fetch(_0x56825e);if(!_0x3ef8ac['ok'])throw new Error(_0x11b269(0x1a4)+_0x56825e+':\x20'+_0x3ef8ac['status']);return _0x3ef8ac['json']();}function waitForCallback(_0x32dd74){const _0x5cfe18={'sQZHY':function(_0x4c7bee){return _0x4c7bee();},'ZhDnv':function(_0x57c696,_0x4e33dd){return _0x57c696(_0x4e33dd);},'JkwKR':function(_0x1d0a9b,_0xd2049){return _0x1d0a9b(_0xd2049);},'NsHkn':function(_0x4b6489,_0x480184){return _0x4b6489!==_0x480184;},'ykJOP':function(_0x2a4613,_0x2cbb5d,_0x2a5ca6){return _0x2a4613(_0x2cbb5d,_0x2a5ca6);}};return new Promise((_0x256df3,_0x1ba964)=>{const _0x48ff5c=_0x4402,_0x3601aa={'BUSjx':_0x48ff5c(0x20c),'vGSTw':'Not\x20found','CjYKs':'state','EgSfK':_0x48ff5c(0x1f0),'CGcwx':function(_0xbe4eb9,_0x271e18){return _0x5cfe18['JkwKR'](_0xbe4eb9,_0x271e18);},'onMZU':function(_0x243aa2){return _0x243aa2();},'gnQoF':function(_0x4e4ed3,_0x51d6cf){return _0x4e4ed3(_0x51d6cf);},'qKxEN':function(_0x2d172f,_0x464fa1){return _0x5cfe18['NsHkn'](_0x2d172f,_0x464fa1);},'fhECA':_0x48ff5c(0x222),'VrXIK':_0x48ff5c(0x1ef),'TSgtW':_0x48ff5c(0x224)},_0x59e239=()=>{_0x2369cb['closeAllConnections'](),_0x2369cb['close']();},_0x34e6f0=_0x5cfe18['ykJOP'](setTimeout,()=>{_0x5cfe18['sQZHY'](_0x59e239),_0x5cfe18['ZhDnv'](_0x1ba964,new OAuthTimeoutError('OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes'));},0x1d4c0),_0x2369cb=_0x5cfe18[_0x48ff5c(0x1d1)](createServer,(_0x4a5231,_0x1eb81b)=>{const _0x5d84b8=_0x48ff5c,_0x364a2f=new URL(_0x4a5231['url']??'/','http://localhost:'+CALLBACK_PORT);if(_0x364a2f['pathname']!==_0x3601aa['BUSjx']){_0x1eb81b[_0x5d84b8(0x1f3)](0x194),_0x1eb81b['end'](_0x3601aa[_0x5d84b8(0x1ab)]);return;}const _0x21a6cd=_0x364a2f[_0x5d84b8(0x21b)][_0x5d84b8(0x1ca)](_0x5d84b8(0x1f2)),_0x54051c=_0x364a2f['searchParams']['get'](_0x3601aa[_0x5d84b8(0x1c5)]),_0x40c710=_0x364a2f['searchParams']['get'](_0x3601aa['EgSfK']);if(_0x40c710){const _0x2fb21f=_0x364a2f[_0x5d84b8(0x21b)][_0x5d84b8(0x1ca)](_0x5d84b8(0x1e4))??_0x40c710;_0x1eb81b[_0x5d84b8(0x1f3)](0xc8,{'Content-Type':_0x5d84b8(0x222)}),_0x1eb81b[_0x5d84b8(0x1c4)]('<html><body><h2>Authentication\x20failed</h2><p>'+_0x2fb21f+'</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>'),_0x3601aa[_0x5d84b8(0x216)](clearTimeout,_0x34e6f0),_0x3601aa[_0x5d84b8(0x1ba)](_0x59e239),_0x3601aa[_0x5d84b8(0x1a7)](_0x1ba964,new Error(_0x5d84b8(0x204)+_0x2fb21f));return;}if(!_0x21a6cd||_0x3601aa[_0x5d84b8(0x1bd)](_0x54051c,_0x32dd74)){_0x1eb81b['writeHead'](0x190,{'Content-Type':_0x3601aa['fhECA']}),_0x1eb81b[_0x5d84b8(0x1c4)](_0x3601aa['VrXIK']);return;}_0x1eb81b[_0x5d84b8(0x1f3)](0xc8,{'Content-Type':_0x3601aa['fhECA']}),_0x1eb81b['end'](_0x3601aa[_0x5d84b8(0x1e7)]),_0x3601aa['gnQoF'](clearTimeout,_0x34e6f0),_0x59e239(),_0x256df3(_0x21a6cd);});_0x2369cb['listen'](CALLBACK_PORT,_0x48ff5c(0x1cb));});}async function openBrowser(_0x40f292){const _0x4d089c=_0x10f084,_0x191963={'qegqI':function(_0x396b92,_0x36af5c){return _0x396b92===_0x36af5c;},'RPNoo':_0x4d089c(0x1b8),'iHHwN':'win32','BssKS':'start'},_0x34a13e=_0x191963['qegqI'](process[_0x4d089c(0x220)],_0x191963[_0x4d089c(0x20a)])?_0x4d089c(0x21f):process['platform']===_0x191963['iHHwN']?_0x191963['BssKS']:_0x4d089c(0x1dc);exec(_0x34a13e+'\x20\x22'+_0x40f292+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x1aa9d8=_0x10f084,_0x5b20be={'IvbpL':function(_0x401027,_0x5c8441){return _0x401027>_0x5c8441;}};try{const _0x225c16=JSON['parse'](await readFile(TOKEN_CACHE_PATH,'utf-8'));if(_0x225c16['origin']&&_0x225c16['origin']!==currentOrigin)return null;if(_0x225c16[_0x1aa9d8(0x1d7)]&&_0x5b20be['IvbpL'](Date['now'](),_0x225c16['expiresAt']))return null;return _0x225c16[_0x1aa9d8(0x21a)]??null;}catch{return null;}}async function saveCachedToken(_0x5e0a03,_0x39dde7,_0x2e44c3){const _0x4771a8=_0x10f084,_0x2c4c6b={'rpArx':function(_0x43418d){return _0x43418d();},'rnMPe':function(_0x7faf16,_0x41ae73){return _0x7faf16+_0x41ae73;},'gESjG':function(_0x2ad729,_0x7871c6,_0x3a4006,_0x42a23c){return _0x2ad729(_0x7871c6,_0x3a4006,_0x42a23c);}},_0x4d0e20=await _0x2c4c6b['rpArx'](loadCachedData),_0x2ec66d={..._0x4d0e20,'origin':currentOrigin,'accessToken':_0x5e0a03,'refreshToken':_0x39dde7??_0x4d0e20?.[_0x4771a8(0x1d5)],'expiresAt':_0x2e44c3?_0x2c4c6b['rnMPe'](Date['now'](),_0x2e44c3*0x3e8):undefined};await mkdir(join(_0x2c4c6b[_0x4771a8(0x1ad)](homedir),'.ranger'),{'recursive':!![]}),await _0x2c4c6b['gESjG'](writeFile,TOKEN_CACHE_PATH,JSON[_0x4771a8(0x1bf)](_0x2ec66d),{'mode':0x180});}async function loadCachedClient(){const _0x3c80a1=_0x10f084,_0xfdfee={'oYTHJ':function(_0x352e1e){return _0x352e1e();},'MKeIX':function(_0xa63846,_0x49e1b6){return _0xa63846!==_0x49e1b6;}},_0x7aae06=await _0xfdfee[_0x3c80a1(0x1b9)](loadCachedData);if(_0x7aae06?.['origin']&&_0xfdfee['MKeIX'](_0x7aae06['origin'],currentOrigin))return null;return _0x7aae06?.[_0x3c80a1(0x1a9)]?{'clientId':_0x7aae06['clientId'],'clientSecret':_0x7aae06['clientSecret']}:null;}async function clearCachedClient(){const _0x6fce5d=_0x10f084,_0x508301={'Ynyfm':function(_0xd9cd70,_0xd5e6d0,_0x1aa0ca,_0x368431){return _0xd9cd70(_0xd5e6d0,_0x1aa0ca,_0x368431);}},_0x2b227e=await loadCachedData();if(!_0x2b227e)return;const {clientId:_0x886ec4,clientSecret:_0x27f6ea,..._0x596927}=_0x2b227e;await _0x508301[_0x6fce5d(0x1da)](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x596927),{'mode':0x180});}async function saveCachedClient(_0x34718a,_0x2efe21){const _0x52bb88={'UlTcV':function(_0x3bca62){return _0x3bca62();},'Nmimu':function(_0x4347bc,_0x2cee51,_0x27fe81){return _0x4347bc(_0x2cee51,_0x27fe81);}},_0x3bd5c3=await _0x52bb88['UlTcV'](loadCachedData),_0x44aed5={..._0x3bd5c3,'origin':currentOrigin,'accessToken':_0x3bd5c3?.['accessToken']??'','clientId':_0x34718a,'clientSecret':_0x2efe21};await mkdir(_0x52bb88['Nmimu'](join,homedir(),'.ranger'),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x44aed5),{'mode':0x180});}async function loadCachedData(){const _0x422ac6=_0x10f084,_0x3d0246={'nHuIO':'utf-8'};try{return JSON[_0x422ac6(0x20f)](await readFile(TOKEN_CACHE_PATH,_0x3d0246['nHuIO']));}catch{return null;}}async function parseResponse(_0x521dc0){const _0x1e352c=_0x10f084,_0x12491d={'cNhwV':_0x1e352c(0x1d8),'OhIbX':_0x1e352c(0x1fe)},_0x25421b=_0x521dc0[_0x1e352c(0x1de)]['get'](_0x12491d['cNhwV'])??'';if(_0x25421b['includes']('text/event-stream')){const _0x25077d=await _0x521dc0[_0x1e352c(0x229)]();for(const _0x3692ec of _0x25077d['split']('\x0a')){const _0x2de814=_0x3692ec[_0x1e352c(0x203)]();if(_0x2de814['startsWith'](_0x12491d['OhIbX'])){const _0x179c8e=_0x2de814[_0x1e352c(0x1d4)](_0x12491d[_0x1e352c(0x1d0)]['length'])['trim']();if(!_0x179c8e)continue;try{const _0x1678a8=JSON[_0x1e352c(0x20f)](_0x179c8e);if(_0x1678a8['id']!==undefined||_0x1678a8[_0x1e352c(0x1f0)])return _0x1678a8;}catch{}}}throw new Error(_0x1e352c(0x1fb));}return _0x521dc0['json']();}function extractToken(_0x3fd596){const _0xa0d205=_0x10f084,_0x560d21={'YHgwK':_0xa0d205(0x1f1),'pUhrX':function(_0x927e88,_0x5a6184){return _0x927e88===_0x5a6184;},'AJXsU':_0xa0d205(0x229)};if(!_0x3fd596)return null;const _0xffe745=_0x3fd596['structuredContent'];if(_0xffe745?.[_0xa0d205(0x1fd)]&&typeof _0xffe745['token']===_0x560d21[_0xa0d205(0x212)])return _0xffe745[_0xa0d205(0x1fd)];if(_0x3fd596['isError']){const _0x1bf687=_0x3fd596[_0xa0d205(0x22a)];throw new Error(_0xa0d205(0x1fa)+(_0x1bf687?.[0x0]?.[_0xa0d205(0x229)]??'Unknown\x20error'));}const _0x4a284b=_0x3fd596['content'];if(_0x4a284b)for(const _0x3a3058 of _0x4a284b){if(_0x560d21['pUhrX'](_0x3a3058[_0xa0d205(0x1ae)],_0x560d21['AJXsU'])&&_0x3a3058[_0xa0d205(0x229)]){try{const _0x4b1b1e=JSON[_0xa0d205(0x20f)](_0x3a3058['text']);if(typeof _0x4b1b1e?.[_0xa0d205(0x1fd)]===_0x560d21[_0xa0d205(0x212)])return _0x4b1b1e[_0xa0d205(0x1fd)];}catch{}const _0x467dc6=_0x3a3058['text']['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x467dc6)return _0x467dc6[0x1];}}return null;}
@@ -1 +1 @@
1
- (function(_0x4e9376,_0x5ce5c6){var _0x473115=_0x17cd,_0x50f578=_0x4e9376();while(!![]){try{var _0x5e786b=parseInt(_0x473115(0xa9))/0x1*(parseInt(_0x473115(0xa7))/0x2)+-parseInt(_0x473115(0xb1))/0x3+parseInt(_0x473115(0xac))/0x4+-parseInt(_0x473115(0xaa))/0x5+-parseInt(_0x473115(0xab))/0x6*(parseInt(_0x473115(0xb0))/0x7)+parseInt(_0x473115(0xaf))/0x8*(-parseInt(_0x473115(0xa6))/0x9)+-parseInt(_0x473115(0xae))/0xa*(-parseInt(_0x473115(0xb2))/0xb);if(_0x5e786b===_0x5ce5c6)break;else _0x50f578['push'](_0x50f578['shift']());}catch(_0xf68b71){_0x50f578['push'](_0x50f578['shift']());}}}(_0x58e2,0x84a1e));function _0x17cd(_0x660deb,_0x1ec127){_0x660deb=_0x660deb-0xa5;var _0x58e283=_0x58e2();var _0x17cd71=_0x58e283[_0x660deb];return _0x17cd71;}export async function migrateProfile(_0x258322,_0x22b716){var _0x2f052f=_0x17cd,_0x2e5fac={'QmJix':function(_0x356d18,_0x4bb847){return _0x356d18+_0x4bb847;},'mvLgl':function(_0x28736f,_0x10e92a){return _0x28736f+_0x10e92a;},'rImMP':function(_0x13f599,_0x46beb0){return _0x13f599+_0x46beb0;},'yjLgq':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','KELoW':_0x2f052f(0xad)};console['error'](_0x2e5fac[_0x2f052f(0xb3)](_0x2e5fac[_0x2f052f(0xb3)](_0x2e5fac['mvLgl'](_0x2e5fac[_0x2f052f(0xb3)](_0x2e5fac['rImMP'](_0x2f052f(0xa8),'\x0a')+_0x2e5fac['yjLgq'],'\x20\x20ranger\x20profile\x20add\x20<name>\x0a')+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x2e5fac[_0x2f052f(0xa5)])+'\x0a','Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a'),'fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.')),process['exit'](0x1);}function _0x58e2(){var _0x4fe8ea=['KELoW','215235wGYZie','4xDAJyk','ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','8731hHHdaQ','1381670aaBigs','6uvvJsK','3684536CbvBuh','\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','255430NMGjhG','24ysckwr','4260424QXbXqH','921255RdWuOX','374VbrZvn','QmJix'];_0x58e2=function(){return _0x4fe8ea;};return _0x58e2();}
1
+ function _0x29bf(){var _0x249a90=['1338mKjLGy','1WOROZt','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','7FNneWj','27475OjDFkn','rarMQ','\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','FZFYd','14647259gqcfkz','2883178JkMhAd','eChkv','859461PfmDMn','2809630CzCAVT','8858392YwNjLL','18GGztKR','error','2263976LrcUGX'];_0x29bf=function(){return _0x249a90;};return _0x29bf();}(function(_0x5c70c9,_0x2f1a4f){var _0x2a24b1=_0x496d,_0x41a549=_0x5c70c9();while(!![]){try{var _0x452df9=parseInt(_0x2a24b1(0x1e1))/0x1*(parseInt(_0x2a24b1(0x1d8))/0x2)+parseInt(_0x2a24b1(0x1da))/0x3+parseInt(_0x2a24b1(0x1df))/0x4+parseInt(_0x2a24b1(0x1d2))/0x5*(-parseInt(_0x2a24b1(0x1e0))/0x6)+-parseInt(_0x2a24b1(0x1d1))/0x7*(parseInt(_0x2a24b1(0x1dc))/0x8)+-parseInt(_0x2a24b1(0x1dd))/0x9*(parseInt(_0x2a24b1(0x1db))/0xa)+parseInt(_0x2a24b1(0x1d7))/0xb;if(_0x452df9===_0x2f1a4f)break;else _0x41a549['push'](_0x41a549['shift']());}catch(_0x1aa15c){_0x41a549['push'](_0x41a549['shift']());}}}(_0x29bf,0xb2795));function _0x496d(_0x5daacf,_0x312c95){_0x5daacf=_0x5daacf-0x1d1;var _0x29bf33=_0x29bf();var _0x496df9=_0x29bf33[_0x5daacf];return _0x496df9;}export async function migrateProfile(_0x2671c7,_0x27493a){var _0x1d94b7=_0x496d,_0x4e47fa={'FZFYd':function(_0x41d178,_0x1a3d0b){return _0x41d178+_0x1a3d0b;},'RStmn':function(_0x1e505a,_0x3ef35e){return _0x1e505a+_0x3ef35e;},'iOpsI':function(_0x472155,_0x46e011){return _0x472155+_0x46e011;},'eChkv':function(_0x5d474e,_0x183b97){return _0x5d474e+_0x183b97;},'rarMQ':'ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a'};console[_0x1d94b7(0x1de)](_0x4e47fa['FZFYd'](_0x4e47fa[_0x1d94b7(0x1d6)](_0x4e47fa[_0x1d94b7(0x1d6)](_0x4e47fa['RStmn'](_0x4e47fa['iOpsI'](_0x4e47fa['iOpsI'](_0x4e47fa[_0x1d94b7(0x1d9)](_0x4e47fa[_0x1d94b7(0x1d3)],'\x0a')+_0x1d94b7(0x1d5)+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a'),_0x1d94b7(0x1e2)),_0x1d94b7(0x1d4)),'\x0a'),'Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a'),'fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.')),process['exit'](0x1);}
@@ -1 +1 @@
1
- (function(_0x19f21e,_0x4e3645){const _0x56be21=_0x4c7d,_0x27830f=_0x19f21e();while(!![]){try{const _0x38d353=-parseInt(_0x56be21(0x17e))/0x1*(-parseInt(_0x56be21(0x17f))/0x2)+-parseInt(_0x56be21(0x15a))/0x3+-parseInt(_0x56be21(0x170))/0x4+parseInt(_0x56be21(0x174))/0x5+-parseInt(_0x56be21(0x172))/0x6*(parseInt(_0x56be21(0x15d))/0x7)+-parseInt(_0x56be21(0x159))/0x8*(parseInt(_0x56be21(0x17b))/0x9)+parseInt(_0x56be21(0x164))/0xa;if(_0x38d353===_0x4e3645)break;else _0x27830f['push'](_0x27830f['shift']());}catch(_0x2d4948){_0x27830f['push'](_0x27830f['shift']());}}}(_0x2fd6,0xf2c61));import{join}from'path';import{existsSync}from'fs';import _0x1ad4de from'inquirer';function _0x4c7d(_0x970f22,_0xfcd1cd){_0x970f22=_0x970f22-0x157;const _0x2fd6b6=_0x2fd6();let _0x4c7dc9=_0x2fd6b6[_0x970f22];return _0x4c7dc9;}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x52c041){const _0x316edb=_0x4c7d,_0x3af656={'zKaoc':function(_0x27820b,_0x13c0f1){return _0x27820b(_0x13c0f1);},'NvWLu':_0x316edb(0x169),'mPDXW':function(_0x473cf2,_0x2600ca){return _0x473cf2(_0x2600ca);},'WIVvf':function(_0x368dba,_0x565ee6,_0x3093d2){return _0x368dba(_0x565ee6,_0x3093d2);},'iSqkQ':function(_0x52b829){return _0x52b829();},'YgJLO':'.claude','aquLA':'project','lhQbl':_0x316edb(0x16d),'lgcRy':_0x316edb(0x18c),'eFrok':'Where\x20should\x20the\x20plugin\x20be\x20installed?','vhuuP':'user','MVAtU':_0x316edb(0x18d),'nLtiE':'plugin','lWfCa':'marketplace','tmHIO':'add','YWEDh':_0x316edb(0x188),'HXMSx':function(_0x1331dc,_0x2e354e,_0x2d88e8){return _0x1331dc(_0x2e354e,_0x2d88e8);},'eBUBO':'install','kOaKs':_0x316edb(0x161),'DSwiu':'❌\x20Failed\x20to\x20install\x20plugin:','OrRGi':'enable','WcNtR':function(_0x426f13,_0x51782c){return _0x426f13===_0x51782c;}},_0x5411c2=await _0x3af656[_0x316edb(0x171)](isPluginInstalled,_0x3af656[_0x316edb(0x17c)]);if(_0x5411c2)return console[_0x316edb(0x16c)]('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x3fce7e=_0x3af656['mPDXW'](existsSync,_0x3af656[_0x316edb(0x178)](join,_0x3af656[_0x316edb(0x189)](getProjectRoot),_0x3af656['YgJLO']));let _0x33d7f1;if(_0x52c041)_0x33d7f1=_0x52c041;else{if(_0x3fce7e)_0x33d7f1=_0x3af656[_0x316edb(0x183)];else{console[_0x316edb(0x16c)](_0x3af656['lhQbl']);const _0x14ed53=await _0x1ad4de['prompt']([{'type':_0x3af656[_0x316edb(0x163)],'name':_0x316edb(0x190),'message':_0x3af656[_0x316edb(0x165)],'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x3af656['vhuuP']},{'name':_0x316edb(0x179),'value':_0x3af656['aquLA']}],'default':'user'}]);_0x33d7f1=_0x14ed53['pluginScope'];}}console['log'](_0x316edb(0x187)+_0x33d7f1+'\x20level)...\x0a');const _0x4c7898=await isMarketplaceAdded(_0x3af656[_0x316edb(0x16b)]);let _0x29acb0=_0x4c7898;if(_0x4c7898)console[_0x316edb(0x16c)](_0x316edb(0x168));else{const _0x1118a4=await runClaudeCommand([_0x3af656[_0x316edb(0x182)],_0x3af656['lWfCa'],_0x3af656[_0x316edb(0x184)],_0x316edb(0x15c)]);!_0x1118a4[_0x316edb(0x16a)]?(console[_0x316edb(0x160)]('❌\x20Failed\x20to\x20add\x20marketplace:',_0x1118a4['error']),console[_0x316edb(0x16c)](_0x316edb(0x181)),console[_0x316edb(0x16c)](_0x3af656[_0x316edb(0x18a)]),console[_0x316edb(0x16c)](_0x316edb(0x18f)+_0x33d7f1)):_0x29acb0=!![];}if(_0x29acb0){const _0x531e0f=await _0x3af656['HXMSx'](runClaudeCommand,[_0x316edb(0x15b),_0x3af656['eBUBO'],_0x3af656[_0x316edb(0x17c)],_0x3af656[_0x316edb(0x17d)],_0x33d7f1],{'cwd':_0x33d7f1==='project'?getProjectRoot():undefined});if(!_0x531e0f[_0x316edb(0x16a)])console[_0x316edb(0x160)](_0x3af656[_0x316edb(0x186)],_0x531e0f[_0x316edb(0x160)]),console[_0x316edb(0x16c)](_0x316edb(0x181)),console['log'](_0x316edb(0x18f)+_0x33d7f1);else{console['log'](_0x316edb(0x180));const _0x16d3ab=[_0x316edb(0x15b),_0x3af656[_0x316edb(0x16f)],_0x3af656['NvWLu']];_0x33d7f1===_0x316edb(0x173)&&_0x16d3ab['push'](_0x316edb(0x161),_0x3af656['aquLA']);const _0x33a8d2=await runClaudeCommand(_0x16d3ab,{'captureOutput':!![],'cwd':_0x3af656[_0x316edb(0x18e)](_0x33d7f1,_0x3af656['aquLA'])?_0x3af656[_0x316edb(0x189)](getProjectRoot):undefined}),_0x59ba20=_0x33a8d2['output']?.['includes'](_0x316edb(0x18b));!_0x33a8d2[_0x316edb(0x16a)]&&!_0x59ba20?console['error']('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x33a8d2[_0x316edb(0x160)]):console['log'](_0x316edb(0x175));}}return!![];}export async function ensureClaudeSkills(_0x590790){const _0xfa9f81=_0x4c7d,_0x3648bb={'DqEAt':function(_0x27d23b,_0x55f75f){return _0x27d23b(_0x55f75f);},'yjRCC':_0xfa9f81(0x177),'VCknD':_0xfa9f81(0x15e),'SyXBU':_0xfa9f81(0x173),'hDRbV':'SKILL.md','YDLyT':function(_0xf12c4b,_0x3791f7){return _0xf12c4b||_0x3791f7;},'UTPFK':_0xfa9f81(0x162),'vfURW':function(_0x315076,_0x352b68){return _0x315076(_0x352b68);},'dZHDd':function(_0x437141,_0x2e8d4d,_0x144321){return _0x437141(_0x2e8d4d,_0x144321);},'muAzV':'wantsSkillup'},_0x488692=existsSync(join(_0x3648bb[_0xfa9f81(0x158)](getSkillsDir,_0x3648bb['yjRCC']),_0x3648bb[_0xfa9f81(0x16e)],_0xfa9f81(0x15f))),_0x2535df=existsSync(join(getSkillsDir(_0x3648bb['SyXBU']),_0xfa9f81(0x15e),_0x3648bb[_0xfa9f81(0x176)]));if(_0x3648bb[_0xfa9f81(0x185)](_0x488692,_0x2535df))return console[_0xfa9f81(0x16c)](_0x3648bb['UTPFK']),![];const _0x10afa7=_0x3648bb[_0xfa9f81(0x166)](existsSync,_0x3648bb['dZHDd'](join,getProjectRoot(),'.claude'));let _0x381333=!![];if(_0x590790)await skillup({'autoInstall':_0x590790,'suppressUsage':!![]});else{if(_0x10afa7)await skillup({'autoInstall':_0x3648bb[_0xfa9f81(0x157)],'suppressUsage':!![]});else{const _0x4e033f=await _0x1ad4de['prompt']([{'type':'confirm','name':_0x3648bb['muAzV'],'message':_0xfa9f81(0x167),'default':!![]}]);_0x381333=_0x4e033f[_0xfa9f81(0x17a)],_0x381333&&await skillup({'suppressUsage':!![]});}}return _0x381333;}function _0x2fd6(){const _0x24e4af=['4259874xbkgtp','plugin','ranger-testing/trailhead','7OdqBKY','ranger','SKILL.md','error','--scope','✓\x20Ranger\x20skills\x20already\x20installed','lgcRy','30126340VZlEwk','eFrok','vfURW','Would\x20you\x20like\x20to\x20install\x20skills?','✓\x20Marketplace\x20already\x20added','ranger@trailhead','success','MVAtU','log','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','VCknD','OrRGi','689560NfIkPU','zKaoc','6758742LIBgvq','project','86595iJcifh','✓\x20Claude\x20Code\x20plugin\x20enabled','hDRbV','user','WIVvf','Project\x20(shared\x20with\x20team\x20via\x20git)','wantsSkillup','144hwbjVo','NvWLu','kOaKs','1MxxeMv','2681962jYsUAz','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','\x0aYou\x20can\x20install\x20manually\x20with:','nLtiE','aquLA','tmHIO','YDLyT','DSwiu','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','iSqkQ','YWEDh','already\x20enabled','list','trailhead','WcNtR','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','pluginScope','SyXBU','DqEAt','328864orvbfP'];_0x2fd6=function(){return _0x24e4af;};return _0x2fd6();}
1
+ (function(_0x1ddc30,_0x4bdd62){const _0x4e4585=_0xe837,_0x4fd33e=_0x1ddc30();while(!![]){try{const _0x3ed56c=parseInt(_0x4e4585(0xc4))/0x1*(parseInt(_0x4e4585(0xc3))/0x2)+parseInt(_0x4e4585(0xc8))/0x3*(parseInt(_0x4e4585(0xbd))/0x4)+-parseInt(_0x4e4585(0xb8))/0x5*(parseInt(_0x4e4585(0xc6))/0x6)+parseInt(_0x4e4585(0xc5))/0x7*(parseInt(_0x4e4585(0xac))/0x8)+-parseInt(_0x4e4585(0xc2))/0x9*(-parseInt(_0x4e4585(0xaf))/0xa)+-parseInt(_0x4e4585(0xb5))/0xb+-parseInt(_0x4e4585(0xaa))/0xc;if(_0x3ed56c===_0x4bdd62)break;else _0x4fd33e['push'](_0x4fd33e['shift']());}catch(_0x41bbc8){_0x4fd33e['push'](_0x4fd33e['shift']());}}}(_0x4f56,0xefc50));import{join}from'path';import{existsSync}from'fs';import _0x531c04 from'inquirer';import{skillup}from'../skillup.js';function _0x4f56(){const _0x165728=['.claude','SlttS','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','⚠\x20Failed\x20to\x20enable\x20plugin:','ltQJV','11888393OQInRM','jhJJm','yRsiL','8031245wFJyhi','ranger@trailhead','\x0aYou\x20can\x20install\x20manually\x20with:','marketplace','MvqST','3220532qbSpLJ','cFDmh','plugin','yyniS','fnHGG','45owhLXP','44122rjGQwG','89cWvhyU','39466gMlRGc','6lBHjNL','error','3HAOWoO','log','voJId','confirm','kuvil','❌\x20Failed\x20to\x20add\x20marketplace:','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','tDdDX','install','Would\x20you\x20like\x20to\x20install\x20skills?','pluginScope','wantsSkillup','gpUnY','list','trailhead','ozueK','jtzmf','project','✓\x20Ranger\x20skills\x20already\x20installed','KQzym','includes','user','--scope','yxntw','enable','pszyi','24618660ngkQlC','ranger','2256ZuMqdE','Fgxdl','success','2724370FCYnyY'];_0x4f56=function(){return _0x165728;};return _0x4f56();}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x3a342b){const _0xe61d41=_0xe837,_0x3667b2={'SoxUf':function(_0xb236be,_0x46fbc2){return _0xb236be(_0x46fbc2);},'cFDmh':_0xe61d41(0xb9),'pszyi':function(_0x253e11,_0x109eaf,_0x588d00){return _0x253e11(_0x109eaf,_0x588d00);},'tDdDX':'\x0a📦\x20Claude\x20Code\x20Plugin\x0a','iobeF':_0xe61d41(0xd5),'yRsiL':_0xe61d41(0xa5),'SlttS':'Project\x20(shared\x20with\x20team\x20via\x20git)','fmkoy':function(_0x545c6e,_0x4f131b){return _0x545c6e(_0x4f131b);},'fnHGG':'✓\x20Marketplace\x20already\x20added','Fgxdl':function(_0x4122d1,_0x655a3b){return _0x4122d1(_0x655a3b);},'ltQJV':_0xe61d41(0xbb),'TdoQo':_0xe61d41(0xcd),'SOXnc':_0xe61d41(0xd9),'voJId':_0xe61d41(0xce),'IugUr':'plugin','NfJpJ':'--scope','zCqeU':function(_0xfe4fef,_0x5e83dd){return _0xfe4fef===_0x5e83dd;},'jtzmf':function(_0x44b6e0){return _0x44b6e0();},'jhJJm':'already\x20enabled','SCHzs':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x4e6bd7=await _0x3667b2['SoxUf'](isPluginInstalled,_0x3667b2[_0xe61d41(0xbe)]);if(_0x4e6bd7)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x5797d9=_0x3667b2['SoxUf'](existsSync,_0x3667b2[_0xe61d41(0xa9)](join,getProjectRoot(),_0xe61d41(0xb0)));let _0x3e018d;if(_0x3a342b)_0x3e018d=_0x3a342b;else{if(_0x5797d9)_0x3e018d='project';else{console[_0xe61d41(0xc9)](_0x3667b2[_0xe61d41(0xcf)]);const _0x37eed9=await _0x531c04['prompt']([{'type':_0x3667b2['iobeF'],'name':'pluginScope','message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x3667b2[_0xe61d41(0xb7)]},{'name':_0x3667b2[_0xe61d41(0xb1)],'value':_0xe61d41(0xd9)}],'default':'user'}]);_0x3e018d=_0x37eed9[_0xe61d41(0xd2)];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x3e018d+'\x20level)...\x0a');const _0x2efcb9=await _0x3667b2['fmkoy'](isMarketplaceAdded,_0xe61d41(0xd6));let _0xcc2e27=_0x2efcb9;if(_0x2efcb9)console[_0xe61d41(0xc9)](_0x3667b2[_0xe61d41(0xc1)]);else{const _0x6207cb=await _0x3667b2[_0xe61d41(0xad)](runClaudeCommand,[_0xe61d41(0xbf),_0x3667b2[_0xe61d41(0xb4)],'add','ranger-testing/trailhead']);!_0x6207cb[_0xe61d41(0xae)]?(console[_0xe61d41(0xc7)](_0x3667b2['TdoQo'],_0x6207cb['error']),console[_0xe61d41(0xc9)](_0xe61d41(0xba)),console['log']('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console[_0xe61d41(0xc9)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x3e018d)):_0xcc2e27=!![];}if(_0xcc2e27){const _0x233e3d=await runClaudeCommand(['plugin',_0xe61d41(0xd0),_0x3667b2[_0xe61d41(0xbe)],_0xe61d41(0xa6),_0x3e018d],{'cwd':_0x3e018d===_0x3667b2['SOXnc']?getProjectRoot():undefined});if(!_0x233e3d[_0xe61d41(0xae)])console[_0xe61d41(0xc7)]('❌\x20Failed\x20to\x20install\x20plugin:',_0x233e3d['error']),console['log'](_0xe61d41(0xba)),console['log'](_0xe61d41(0xb2)+_0x3e018d);else{console['log'](_0x3667b2[_0xe61d41(0xca)]);const _0xd5a926=[_0x3667b2['IugUr'],_0xe61d41(0xa8),'ranger@trailhead'];_0x3e018d===_0xe61d41(0xd9)&&_0xd5a926['push'](_0x3667b2['NfJpJ'],_0xe61d41(0xd9));const _0x4f91df=await _0x3667b2[_0xe61d41(0xa9)](runClaudeCommand,_0xd5a926,{'captureOutput':!![],'cwd':_0x3667b2['zCqeU'](_0x3e018d,_0xe61d41(0xd9))?_0x3667b2[_0xe61d41(0xd8)](getProjectRoot):undefined}),_0x475643=_0x4f91df['output']?.[_0xe61d41(0xa4)](_0x3667b2[_0xe61d41(0xb6)]);!_0x4f91df[_0xe61d41(0xae)]&&!_0x475643?console['error'](_0xe61d41(0xb3),_0x4f91df[_0xe61d41(0xc7)]):console['log'](_0x3667b2['SCHzs']);}}return!![];}function _0xe837(_0x6f2aea,_0x2ecb6f){_0x6f2aea=_0x6f2aea-0xa4;const _0x4f5685=_0x4f56();let _0xe837f5=_0x4f5685[_0x6f2aea];return _0xe837f5;}export async function ensureClaudeSkills(_0x3f26ef){const _0x23af94=_0xe837,_0x1af278={'MvqST':function(_0x5c4814,_0x54903b){return _0x5c4814(_0x54903b);},'iojhK':_0x23af94(0xa5),'yxntw':'SKILL.md','kuvil':'project','EKPur':_0x23af94(0xda),'fsPNG':function(_0x5f3104){return _0x5f3104();},'KQzym':_0x23af94(0xb0),'yyniS':_0x23af94(0xcb),'gpUnY':_0x23af94(0xd3),'ozueK':_0x23af94(0xd1)},_0x34389e=_0x1af278['MvqST'](existsSync,join(getSkillsDir(_0x1af278['iojhK']),_0x23af94(0xab),_0x1af278[_0x23af94(0xa7)])),_0x51f23b=_0x1af278[_0x23af94(0xbc)](existsSync,join(getSkillsDir(_0x1af278[_0x23af94(0xcc)]),_0x23af94(0xab),_0x1af278['yxntw']));if(_0x34389e||_0x51f23b)return console[_0x23af94(0xc9)](_0x1af278['EKPur']),![];const _0x5b8aad=existsSync(join(_0x1af278['fsPNG'](getProjectRoot),_0x1af278[_0x23af94(0xdb)]));let _0x21d7ef=!![];if(_0x3f26ef)await skillup({'autoInstall':_0x3f26ef,'suppressUsage':!![]});else{if(_0x5b8aad)await skillup({'autoInstall':_0x1af278['kuvil'],'suppressUsage':!![]});else{const _0x1b320a=await _0x531c04['prompt']([{'type':_0x1af278[_0x23af94(0xc0)],'name':_0x1af278[_0x23af94(0xd4)],'message':_0x1af278[_0x23af94(0xd7)],'default':!![]}]);_0x21d7ef=_0x1b320a['wantsSkillup'],_0x21d7ef&&await skillup({'suppressUsage':!![]});}}return _0x21d7ef;}
@@ -1 +1 @@
1
- (function(_0x4337ab,_0x4a92bc){const _0x59df6a=_0x1ca4,_0x378983=_0x4337ab();while(!![]){try{const _0x48d7d9=parseInt(_0x59df6a(0x1e6))/0x1+-parseInt(_0x59df6a(0x1d6))/0x2+parseInt(_0x59df6a(0x1da))/0x3*(parseInt(_0x59df6a(0x1ea))/0x4)+parseInt(_0x59df6a(0x1d7))/0x5*(parseInt(_0x59df6a(0x1e9))/0x6)+parseInt(_0x59df6a(0x1f1))/0x7+-parseInt(_0x59df6a(0x1ef))/0x8*(parseInt(_0x59df6a(0x1e8))/0x9)+-parseInt(_0x59df6a(0x1de))/0xa*(-parseInt(_0x59df6a(0x1f2))/0xb);if(_0x48d7d9===_0x4a92bc)break;else _0x378983['push'](_0x378983['shift']());}catch(_0x22ffdf){_0x378983['push'](_0x378983['shift']());}}}(_0x2b51,0xa9e55));function _0x2b51(){const _0x497726=['1748828AtUYBC','isArray','opencode.json','gVkmK','Failed\x20to\x20read\x20opencode.json','8hePowc','\x0a📦\x20OpenCode\x20Plugin\x0a','996982UDOzEe','612095ieIiwu','utf-8','fItXM','LNhCL','FiohA','1230678kTvnGP','763025lnFpab','QVmjo','cVlKr','3YSrdHZ','xSHli','YbbtU','user','20FGYwuB','zsUxF','ZYQBB','plugin','$schema','log','https://opencode.ai/config.json','@ranger-testing/opencode-plugin','837852hUSBwT','project','8825112cGDAed','30lXgSue'];_0x2b51=function(){return _0x497726;};return _0x2b51();}import{join}from'path';import{existsSync}from'fs';function _0x1ca4(_0x4d30ce,_0x4d3c59){_0x4d30ce=_0x4d30ce-0x1d3;const _0x2b51bf=_0x2b51();let _0x1ca4e2=_0x2b51bf[_0x4d30ce];return _0x1ca4e2;}import{mkdir,readFile,writeFile}from'fs/promises';import _0x5b6fe3 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x321efe){const _0x2d3bcc=_0x1ca4,_0x174418={'QVmjo':_0x2d3bcc(0x1e7),'gVkmK':_0x2d3bcc(0x1f0),'ZYQBB':'Project\x20(shared\x20with\x20team\x20via\x20git)','LNhCL':_0x2d3bcc(0x1dd),'FiohA':function(_0x21d6b5,_0x4e646c){return _0x21d6b5(_0x4e646c);},'YbbtU':'opencode.json','BUQUJ':_0x2d3bcc(0x1e4),'kqpqy':function(_0x283f87,_0x8ee817,_0x314ac3){return _0x283f87(_0x8ee817,_0x314ac3);},'zsUxF':_0x2d3bcc(0x1f3),'fItXM':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','cVlKr':_0x2d3bcc(0x1ee),'xSHli':'✓\x20OpenCode\x20plugin\x20already\x20configured','YrGjt':function(_0x240103,_0x5cf93e,_0x44b802){return _0x240103(_0x5cf93e,_0x44b802);}},_0x45df0a=existsSync(join(getOpencodeConfigDir(_0x174418[_0x2d3bcc(0x1d8)]),_0x2d3bcc(0x1ec)));let _0x15f990;if(_0x321efe)_0x15f990=_0x321efe;else{if(_0x45df0a)_0x15f990=_0x174418['QVmjo'];else{console[_0x2d3bcc(0x1e3)](_0x174418[_0x2d3bcc(0x1ed)]);const _0x206e5a=await _0x5b6fe3['prompt']([{'type':'list','name':'pluginScope','message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x2d3bcc(0x1dd)},{'name':_0x174418[_0x2d3bcc(0x1e0)],'value':_0x2d3bcc(0x1e7)}],'default':_0x174418[_0x2d3bcc(0x1d4)]}]);_0x15f990=_0x206e5a['pluginScope'];}}const _0x59eb54=join(_0x174418[_0x2d3bcc(0x1d5)](getOpencodeConfigDir,_0x15f990),_0x174418[_0x2d3bcc(0x1dc)]),_0x4af081=_0x2d3bcc(0x1e5),_0x589afb=_0x174418['BUQUJ'];let _0x42e465={};if(_0x174418['FiohA'](existsSync,_0x59eb54))try{const _0x333ee4=await _0x174418['kqpqy'](readFile,_0x59eb54,_0x174418[_0x2d3bcc(0x1df)]);_0x42e465=JSON['parse'](_0x333ee4);}catch(_0x483116){return console['error'](_0x174418[_0x2d3bcc(0x1d3)]),{'configured':![],'scope':_0x15f990,'error':_0x174418[_0x2d3bcc(0x1d9)],'details':_0x483116};}const _0x139dbb=Array[_0x2d3bcc(0x1eb)](_0x42e465['plugin'])?_0x42e465[_0x2d3bcc(0x1e1)]:[];if(_0x139dbb['includes'](_0x4af081))return console[_0x2d3bcc(0x1e3)](_0x174418[_0x2d3bcc(0x1db)]),{'configured':![],'scope':_0x15f990};return _0x42e465[_0x2d3bcc(0x1e2)]=_0x42e465['$schema']||_0x589afb,_0x42e465[_0x2d3bcc(0x1e1)]=[..._0x139dbb,_0x4af081],await mkdir(getOpencodeConfigDir(_0x15f990),{'recursive':!![]}),await _0x174418['YrGjt'](writeFile,_0x59eb54,JSON['stringify'](_0x42e465,null,0x2)+'\x0a'),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x15f990};}
1
+ (function(_0x546e80,_0x57427b){const _0x2e977a=_0x5355,_0x590b88=_0x546e80();while(!![]){try{const _0x2ea96c=-parseInt(_0x2e977a(0xeb))/0x1*(-parseInt(_0x2e977a(0xe8))/0x2)+parseInt(_0x2e977a(0xd6))/0x3+parseInt(_0x2e977a(0xde))/0x4+-parseInt(_0x2e977a(0xef))/0x5+parseInt(_0x2e977a(0xec))/0x6+parseInt(_0x2e977a(0xe7))/0x7*(parseInt(_0x2e977a(0xda))/0x8)+-parseInt(_0x2e977a(0xd7))/0x9;if(_0x2ea96c===_0x57427b)break;else _0x590b88['push'](_0x590b88['shift']());}catch(_0x2c08bb){_0x590b88['push'](_0x590b88['shift']());}}}(_0x147d,0x7f9fb));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x5185c1 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';function _0x5355(_0x4d663d,_0x157601){_0x4d663d=_0x4d663d-0xd6;const _0x147d96=_0x147d();let _0x535528=_0x147d96[_0x4d663d];return _0x535528;}export async function ensureOpencodePluginConfig(_0x4c0507){const _0x5e0a62=_0x5355,_0x426320={'EOnPt':function(_0xa8b7f8,_0x8216ed){return _0xa8b7f8(_0x8216ed);},'eYyNd':'opencode.json','TlgKv':_0x5e0a62(0xe1),'srBWo':'\x0a📦\x20OpenCode\x20Plugin\x0a','lLvxf':_0x5e0a62(0xf1),'XzkAk':'User\x20(available\x20in\x20all\x20your\x20projects)','GzEUM':'user','PNwTA':_0x5e0a62(0xed),'Whzul':function(_0x56663c,_0xef5e37,_0x5cea85){return _0x56663c(_0xef5e37,_0x5cea85);},'ZdzeP':function(_0x334db6,_0x5ca462){return _0x334db6+_0x5ca462;},'wSuBb':'✓\x20OpenCode\x20plugin\x20configured'},_0x512cf0=_0x426320[_0x5e0a62(0xdd)](existsSync,join(_0x426320['EOnPt'](getOpencodeConfigDir,_0x5e0a62(0xe1)),_0x426320[_0x5e0a62(0xe9)]));let _0x44ac07;if(_0x4c0507)_0x44ac07=_0x4c0507;else{if(_0x512cf0)_0x44ac07=_0x426320['TlgKv'];else{console[_0x5e0a62(0xee)](_0x426320[_0x5e0a62(0xe5)]);const _0x4892d4=await _0x5185c1[_0x5e0a62(0xf3)]([{'type':_0x5e0a62(0xe3),'name':_0x5e0a62(0xea),'message':_0x426320['lLvxf'],'choices':[{'name':_0x426320['XzkAk'],'value':_0x426320[_0x5e0a62(0xe0)]},{'name':_0x5e0a62(0xdb),'value':'project'}],'default':_0x426320['GzEUM']}]);_0x44ac07=_0x4892d4['pluginScope'];}}const _0x375780=join(_0x426320['EOnPt'](getOpencodeConfigDir,_0x44ac07),_0x426320['eYyNd']),_0x194bcf=_0x5e0a62(0xe4),_0x2f7a0a='https://opencode.ai/config.json';let _0x438f2a={};if(existsSync(_0x375780))try{const _0x31a02b=await readFile(_0x375780,_0x5e0a62(0xdf));_0x438f2a=JSON['parse'](_0x31a02b);}catch(_0x559d82){return console[_0x5e0a62(0xf2)](_0x426320['PNwTA']),{'configured':![],'scope':_0x44ac07,'error':'Failed\x20to\x20read\x20opencode.json','details':_0x559d82};}const _0x33ba0e=Array[_0x5e0a62(0xe6)](_0x438f2a['plugin'])?_0x438f2a[_0x5e0a62(0xd9)]:[];if(_0x33ba0e['includes'](_0x194bcf))return console[_0x5e0a62(0xee)]('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x44ac07};return _0x438f2a[_0x5e0a62(0xf0)]=_0x438f2a[_0x5e0a62(0xf0)]||_0x2f7a0a,_0x438f2a[_0x5e0a62(0xd9)]=[..._0x33ba0e,_0x194bcf],await _0x426320['Whzul'](mkdir,getOpencodeConfigDir(_0x44ac07),{'recursive':!![]}),await writeFile(_0x375780,_0x426320[_0x5e0a62(0xe2)](JSON[_0x5e0a62(0xd8)](_0x438f2a,null,0x2),'\x0a')),console[_0x5e0a62(0xee)](_0x426320[_0x5e0a62(0xdc)]),{'configured':!![],'scope':_0x44ac07};}function _0x147d(){const _0x40fcea=['list','@ranger-testing/opencode-plugin','srBWo','isArray','6879733Sacilm','1395574vDAEuW','eYyNd','pluginScope','1gZPCyY','2930388IrkPki','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','log','2159030MxQwrc','$schema','Where\x20should\x20the\x20plugin\x20be\x20installed?','error','prompt','2097105ZJuySv','24894081iiKXfB','stringify','plugin','8OvaRbl','Project\x20(shared\x20with\x20team\x20via\x20git)','wSuBb','EOnPt','3410092HaWUuE','utf-8','GzEUM','project','ZdzeP'];_0x147d=function(){return _0x40fcea;};return _0x147d();}
@@ -1 +1 @@
1
- function _0x793f(_0x3328ca,_0x99eb1){_0x3328ca=_0x3328ca-0x158;var _0x1133ec=_0x1133();var _0x793f82=_0x1133ec[_0x3328ca];return _0x793f82;}(function(_0x16254b,_0x1d7a24){var _0x4d9fe2=_0x793f,_0x246b8a=_0x16254b();while(!![]){try{var _0x5dd772=-parseInt(_0x4d9fe2(0x158))/0x1+parseInt(_0x4d9fe2(0x160))/0x2+-parseInt(_0x4d9fe2(0x15e))/0x3+parseInt(_0x4d9fe2(0x15f))/0x4+parseInt(_0x4d9fe2(0x15c))/0x5+parseInt(_0x4d9fe2(0x15d))/0x6+-parseInt(_0x4d9fe2(0x161))/0x7;if(_0x5dd772===_0x1d7a24)break;else _0x246b8a['push'](_0x246b8a['shift']());}catch(_0x39d681){_0x246b8a['push'](_0x246b8a['shift']());}}}(_0x1133,0x28ed5));export async function setupCi(_0x21895f,_0x540ec6,_0x3efe38){var _0x2e45ac=_0x793f,_0x2ebdda={'VgWOC':function(_0x3fa96e,_0x3b27ea){return _0x3fa96e+_0x3b27ea;}};console['error'](_0x2ebdda[_0x2e45ac(0x15a)](_0x2ebdda[_0x2e45ac(0x15a)](_0x2ebdda[_0x2e45ac(0x15a)](_0x2e45ac(0x159)+'\x0a'+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x2e45ac(0x15b)),'\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles')),process[_0x2e45ac(0x162)](0x1);}function _0x1133(){var _0x15f4fc=['91314VbeRgB','112263ajLmVb','872416XnxyVR','416648MbDIgR','1320025mTcKSe','exit','303539hnCDeP','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','VgWOC','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','1277625yhPFWN'];_0x1133=function(){return _0x15f4fc;};return _0x1133();}
1
+ function _0x206b(_0x162a4c,_0xd58782){_0x162a4c=_0x162a4c-0x94;var _0x94f85c=_0x94f8();var _0x206b03=_0x94f85c[_0x162a4c];return _0x206b03;}(function(_0x3a6a88,_0x53a384){var _0x47ef14=_0x206b,_0x448ea4=_0x3a6a88();while(!![]){try{var _0x6f83b3=parseInt(_0x47ef14(0x9f))/0x1+parseInt(_0x47ef14(0x9a))/0x2*(parseInt(_0x47ef14(0x99))/0x3)+-parseInt(_0x47ef14(0x94))/0x4+parseInt(_0x47ef14(0x96))/0x5*(-parseInt(_0x47ef14(0xa0))/0x6)+parseInt(_0x47ef14(0x9d))/0x7*(parseInt(_0x47ef14(0xa2))/0x8)+parseInt(_0x47ef14(0x98))/0x9+parseInt(_0x47ef14(0x9e))/0xa;if(_0x6f83b3===_0x53a384)break;else _0x448ea4['push'](_0x448ea4['shift']());}catch(_0x696cb5){_0x448ea4['push'](_0x448ea4['shift']());}}}(_0x94f8,0xb00b9));function _0x94f8(){var _0x3aa5b2=['88zjbVBd','afEbb','1721620iLcWJQ','ZpVse','3434815pKMhpA','exit','8578323pSeYFy','15earHoY','33870lOcSSp','oSSOI','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','503853sgqqoZ','2165190BlkZoe','479302izWDJd','12cfnrUB','\x20\x20ranger\x20profile\x20add\x20<name>\x0a'];_0x94f8=function(){return _0x3aa5b2;};return _0x94f8();}export async function setupCi(_0x2aac5a,_0x1982f2,_0x4aacfb){var _0x2e15ab=_0x206b,_0x4b89d6={'yotrD':function(_0x4160b2,_0x4d0f8d){return _0x4160b2+_0x4d0f8d;},'afEbb':function(_0x3de9fc,_0x56f03e){return _0x3de9fc+_0x56f03e;},'DgARf':function(_0x1f2e08,_0x18d435){return _0x1f2e08+_0x18d435;},'oSSOI':function(_0x342425,_0x41a61e){return _0x342425+_0x41a61e;},'ZpVse':_0x2e15ab(0xa1)};console['error'](_0x4b89d6['yotrD'](_0x4b89d6[_0x2e15ab(0xa3)](_0x4b89d6['DgARf'](_0x4b89d6[_0x2e15ab(0x9b)]('ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','\x0a')+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x4b89d6[_0x2e15ab(0x95)]),'\x0a'),_0x2e15ab(0x9c))+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x2e15ab(0x97)](0x1);}
@@ -1 +1 @@
1
- (function(_0x59ffc3,_0x29301e){const _0x2d37e5=_0x1e74,_0x322df6=_0x59ffc3();while(!![]){try{const _0x240b2e=-parseInt(_0x2d37e5(0xe1))/0x1+parseInt(_0x2d37e5(0xe6))/0x2*(parseInt(_0x2d37e5(0xd5))/0x3)+parseInt(_0x2d37e5(0x101))/0x4*(parseInt(_0x2d37e5(0xf3))/0x5)+parseInt(_0x2d37e5(0xfd))/0x6*(parseInt(_0x2d37e5(0xd8))/0x7)+-parseInt(_0x2d37e5(0xfc))/0x8*(parseInt(_0x2d37e5(0xe2))/0x9)+parseInt(_0x2d37e5(0xf9))/0xa*(-parseInt(_0x2d37e5(0xe8))/0xb)+parseInt(_0x2d37e5(0xed))/0xc*(parseInt(_0x2d37e5(0xeb))/0xd);if(_0x240b2e===_0x29301e)break;else _0x322df6['push'](_0x322df6['shift']());}catch(_0x36552a){_0x322df6['push'](_0x322df6['shift']());}}}(_0x5d44,0x826aa));import{basename}from'path';import _0x390ffe from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';function _0x1e74(_0x3963bb,_0x3cb604){_0x3963bb=_0x3963bb-0xd5;const _0x5d4463=_0x5d44();let _0x1e74ae=_0x5d4463[_0x3963bb];return _0x1e74ae;}function _0x5d44(){const _0x20b80f=['\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!','24WhUZYu','156468KyYCnk','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','\x20--opencode','4rhWbrF','All\x20projects\x20(','1569YYCybk','list','user-level','7IkAbsj','project','UXHQe','NVGyX','NFmBG','platform','pBmKy','\x20successfully!\x0a','eySTf','1047424AZKvkj','21843psGTrA','qDPhp','warn','ZjUTE','1822NzNqbV','To\x20get\x20started:','1760zIwnkS','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','Where\x20should\x20skills\x20be\x20installed?','26AqALWj','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','5674572ZTNbOB','prompt','/.opencode/skills/','/skills/','ranger','PlDjo','2578990YELOBc','qBkbW','isTTY','\x20skill','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','SeTdh','23450tOmcVR','log'];_0x5d44=function(){return _0x20b80f;};return _0x5d44();}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x29f23a={}){const _0x2904e9=_0x1e74,_0x391fee={'JLSKZ':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','wAiTU':'claude','NFmBG':'\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','NVGyX':'opencode','IViae':'\x20--opencode','ZjUTE':function(_0x430bd5,_0x3a4442){return _0x430bd5===_0x3a4442;},'eySTf':function(_0x4cbfb4,_0x4ee395){return _0x4cbfb4(_0x4ee395);},'UXHQe':'user','qBkbW':function(_0x2e9279,_0xcf9912){return _0x2e9279===_0xcf9912;},'yQEyY':_0x2904e9(0xea),'SeTdh':'\x0a📦\x20Installing\x20skills...\x0a','GPpUe':_0x2904e9(0xf1),'PlDjo':function(_0x4135d2,_0x565c25){return _0x4135d2>_0x565c25;},'qDPhp':_0x2904e9(0xd7),'pBmKy':function(_0x24fe33,_0x539059){return _0x24fe33>_0x539059;}};console[_0x2904e9(0xfa)](_0x391fee['JLSKZ']);const _0xd0f1f9=_0x29f23a[_0x2904e9(0xdd)]??_0x391fee['wAiTU'],_0x93ba77=await getToken();if(!_0x93ba77){console[_0x2904e9(0xfa)](_0x2904e9(0xff)),console['log'](_0x2904e9(0xe7)),console['log'](_0x391fee[_0x2904e9(0xdc)]),console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0xd0f1f9===_0x391fee[_0x2904e9(0xdb)]?_0x391fee['IViae']:'')+'\x20<your-api-token>'),console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x391fee[_0x2904e9(0xe5)](_0xd0f1f9,_0x391fee['NVGyX'])?_0x2904e9(0x100):'')+'\x0a');return;}console['log']('✓\x20Found\x20API\x20token');const _0xf24e9c=getProjectRoot(),_0x459eec=_0x391fee[_0x2904e9(0xe0)](basename,_0xf24e9c),_0x2ae00b=_0xd0f1f9===_0x391fee['NVGyX']?getOpencodeConfigDir(_0x391fee['UXHQe'])+_0x2904e9(0xf0):getClaudeConfigDir()+_0x2904e9(0xf0),_0x59f8d3=_0x391fee['qBkbW'](_0xd0f1f9,'opencode')?_0xf24e9c+_0x2904e9(0xef):_0xf24e9c+'/.claude/skills/',_0x2ffc1d=process['stdin'][_0x2904e9(0xf5)]&&process['stdout']['isTTY'];let _0x26e545;if(_0x29f23a['autoInstall'])_0x26e545=_0x29f23a['autoInstall'];else{if(_0x2ffc1d){const _0x8cc84d=await _0x390ffe[_0x2904e9(0xee)]([{'type':_0x2904e9(0xd6),'name':'installLevel','message':_0x391fee['yQEyY'],'choices':[{'name':_0x2904e9(0x102)+_0x2ae00b+')','value':'user'},{'name':'This\x20project\x20only\x20('+_0x59f8d3+')','value':'project'}]}]);_0x26e545=_0x8cc84d['installLevel'];}else _0x26e545=_0x2904e9(0xd9),console['log'](_0x2904e9(0xec)+_0x59f8d3+')');}let _0x33bb43=0x0;const _0x884cd0=getCurrentVersion();console[_0x2904e9(0xfa)](_0x391fee[_0x2904e9(0xf8)]);try{const _0x5a8981=await installSkill(_0x391fee['GPpUe'],{'cliVersion':_0x884cd0,'level':_0x26e545,'platform':_0xd0f1f9});_0x5a8981&&_0x33bb43++;}catch(_0x2f9397){console[_0x2904e9(0xe4)](_0x2904e9(0xf7),_0x2f9397 instanceof Error?_0x2f9397['message']:_0x2f9397);}if(_0x391fee[_0x2904e9(0xf2)](_0x33bb43,0x0)){const _0x2f711c=_0x391fee['qBkbW'](_0x26e545,_0x391fee[_0x2904e9(0xda)])?_0x391fee[_0x2904e9(0xe3)]:'project-level';console['log']('\x0a✅\x20Installed\x20'+_0x33bb43+'\x20'+_0x2f711c+_0x2904e9(0xf6)+(_0x391fee[_0x2904e9(0xde)](_0x33bb43,0x1)?'s':'')+_0x2904e9(0xdf)),!_0x29f23a['suppressUsage']&&(console[_0x2904e9(0xfa)]('To\x20use:'),_0x391fee[_0x2904e9(0xf4)](_0xd0f1f9,'opencode')?console['log'](_0x2904e9(0xe9)):console['log'](_0x2904e9(0xfb)));}else console[_0x2904e9(0xfa)](_0x2904e9(0xfe));}
1
+ (function(_0x45a939,_0x4598ed){const _0x186a80=_0x263c,_0xb2e02f=_0x45a939();while(!![]){try{const _0x1db408=parseInt(_0x186a80(0x114))/0x1+parseInt(_0x186a80(0xf5))/0x2+parseInt(_0x186a80(0xfe))/0x3+-parseInt(_0x186a80(0x10c))/0x4*(parseInt(_0x186a80(0x111))/0x5)+parseInt(_0x186a80(0x113))/0x6+parseInt(_0x186a80(0x104))/0x7*(parseInt(_0x186a80(0xef))/0x8)+-parseInt(_0x186a80(0x10d))/0x9;if(_0x1db408===_0x4598ed)break;else _0xb2e02f['push'](_0xb2e02f['shift']());}catch(_0x2657a6){_0xb2e02f['push'](_0xb2e02f['shift']());}}}(_0x2442,0xc256e));import{basename}from'path';import _0x183501 from'inquirer';import{getToken}from'./utils/keychain.js';function _0x2442(){const _0xe3d7a1=['\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','lvkYe','/skills/','201789mmvjko','log','Where\x20should\x20skills\x20be\x20installed?','suppressUsage','\x20successfully!\x0a','hEqUq','55006PCFtWk','\x20skill','ranger','fmBpe','cxQXv','UBuuG','\x0a📦\x20Installing\x20skills...\x0a','mvGIm','12KbxdGH','15456618WDLIuf','list','claude','\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!','414160ZhqgJo','This\x20project\x20only\x20(','9512280ZsNbFC','227079dmjCFZ','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','\x20--opencode','ocoRz','456GjvfKD','message','All\x20projects\x20(','prompt','Rngcz','To\x20use:','868568PEKUVz','project-level','project','matMc','autoInstall','vXGNX'];_0x2442=function(){return _0xe3d7a1;};return _0x2442();}import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';function _0x263c(_0x2d4dd2,_0x267532){_0x2d4dd2=_0x2d4dd2-0xef;const _0x2442e0=_0x2442();let _0x263c7d=_0x2442e0[_0x2d4dd2];return _0x263c7d;}import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x383591={}){const _0x2ab05d=_0x263c,_0xdf6ca1={'idILp':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','GbEkr':'❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','nLiYs':'\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','fmBpe':'opencode','Rngcz':function(_0x27e7ac,_0x109556){return _0x27e7ac===_0x109556;},'DXepe':_0x2ab05d(0x116),'matMc':'✓\x20Found\x20API\x20token','lvkYe':function(_0x433364,_0x2c8fcd){return _0x433364===_0x2c8fcd;},'hEqUq':function(_0x10ea62,_0xec367e){return _0x10ea62===_0xec367e;},'vXGNX':_0x2ab05d(0x10e),'MFQvR':function(_0x4f9f42){return _0x4f9f42();},'mvGIm':function(_0x56f9ab,_0x38d405){return _0x56f9ab instanceof _0x38d405;},'ocoRz':function(_0x2465d7,_0x2ae757){return _0x2465d7>_0x2ae757;},'UBuuG':_0x2ab05d(0xf6),'cxQXv':_0x2ab05d(0xfb),'nDIQb':'\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a'};console['log'](_0xdf6ca1['idILp']);const _0x4ce444=_0x383591['platform']??_0x2ab05d(0x10f),_0x96ae47=await getToken();if(!_0x96ae47){console[_0x2ab05d(0xff)](_0xdf6ca1['GbEkr']),console['log']('To\x20get\x20started:'),console['log'](_0xdf6ca1['nLiYs']),console[_0x2ab05d(0xff)]('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x4ce444===_0xdf6ca1[_0x2ab05d(0x107)]?_0x2ab05d(0x116):'')+'\x20<your-api-token>'),console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0xdf6ca1[_0x2ab05d(0xf3)](_0x4ce444,'opencode')?_0xdf6ca1['DXepe']:'')+'\x0a');return;}console[_0x2ab05d(0xff)](_0xdf6ca1[_0x2ab05d(0xf8)]);const _0x54d5d3=getProjectRoot(),_0x3e3b59=basename(_0x54d5d3),_0x30724a=_0xdf6ca1[_0x2ab05d(0xfc)](_0x4ce444,_0xdf6ca1[_0x2ab05d(0x107)])?getOpencodeConfigDir('user')+_0x2ab05d(0xfd):getClaudeConfigDir()+'/skills/',_0x266a98=_0xdf6ca1[_0x2ab05d(0x103)](_0x4ce444,_0xdf6ca1['fmBpe'])?_0x54d5d3+'/.opencode/skills/':_0x54d5d3+'/.claude/skills/',_0x371a90=process['stdin']['isTTY']&&process['stdout']['isTTY'];let _0xc804fa;if(_0x383591['autoInstall'])_0xc804fa=_0x383591[_0x2ab05d(0xf9)];else{if(_0x371a90){const _0x57cd73=await _0x183501[_0x2ab05d(0xf2)]([{'type':_0xdf6ca1[_0x2ab05d(0xfa)],'name':'installLevel','message':_0x2ab05d(0x100),'choices':[{'name':_0x2ab05d(0xf1)+_0x30724a+')','value':'user'},{'name':_0x2ab05d(0x112)+_0x266a98+')','value':_0x2ab05d(0xf7)}]}]);_0xc804fa=_0x57cd73['installLevel'];}else _0xc804fa=_0x2ab05d(0xf7),console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x266a98+')');}let _0xe32428=0x0;const _0x295eaa=_0xdf6ca1['MFQvR'](getCurrentVersion);console['log'](_0x2ab05d(0x10a));try{const _0x3f2019=await installSkill(_0x2ab05d(0x106),{'cliVersion':_0x295eaa,'level':_0xc804fa,'platform':_0x4ce444});_0x3f2019&&_0xe32428++;}catch(_0x83786a){console['warn'](_0x2ab05d(0x115),_0xdf6ca1[_0x2ab05d(0x10b)](_0x83786a,Error)?_0x83786a[_0x2ab05d(0xf0)]:_0x83786a);}if(_0xdf6ca1[_0x2ab05d(0x117)](_0xe32428,0x0)){const _0x1a2667=_0xdf6ca1['hEqUq'](_0xc804fa,'user')?'user-level':_0xdf6ca1[_0x2ab05d(0x109)];console['log']('\x0a✅\x20Installed\x20'+_0xe32428+'\x20'+_0x1a2667+_0x2ab05d(0x105)+(_0xe32428>0x1?'s':'')+_0x2ab05d(0x102)),!_0x383591[_0x2ab05d(0x101)]&&(console[_0x2ab05d(0xff)](_0x2ab05d(0xf4)),_0xdf6ca1[_0x2ab05d(0xf3)](_0x4ce444,_0xdf6ca1[_0x2ab05d(0x107)])?console[_0x2ab05d(0xff)](_0xdf6ca1[_0x2ab05d(0x108)]):console[_0x2ab05d(0xff)](_0x2ab05d(0x110)));}else console['log'](_0xdf6ca1['nDIQb']);}
@@ -1 +1 @@
1
- const _0x4af01b=_0x4f5d;(function(_0x299cd2,_0x37095c){const _0x2c639c=_0x4f5d,_0x570231=_0x299cd2();while(!![]){try{const _0x32a438=parseInt(_0x2c639c(0x1e8))/0x1+-parseInt(_0x2c639c(0x1d3))/0x2+parseInt(_0x2c639c(0x20c))/0x3+-parseInt(_0x2c639c(0x222))/0x4+-parseInt(_0x2c639c(0x205))/0x5+-parseInt(_0x2c639c(0x1f0))/0x6+-parseInt(_0x2c639c(0x1f1))/0x7*(-parseInt(_0x2c639c(0x1d5))/0x8);if(_0x32a438===_0x37095c)break;else _0x570231['push'](_0x570231['shift']());}catch(_0x4dff60){_0x570231['push'](_0x570231['shift']());}}}(_0x4497,0x863c4));import{mkdir,writeFile}from'fs/promises';import{join}from'path';function _0x4f5d(_0x2a53f0,_0x169b28){_0x2a53f0=_0x2a53f0-0x1c1;const _0x449707=_0x4497();let _0x4f5dd2=_0x449707[_0x2a53f0];return _0x4f5dd2;}import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x265b21 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x4497(){const _0x528d50=['\x20and\x20prompt\x20the\x20coding','GITHUB_ENV','lCTSm','warn','status','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','ranger\x20setup\x20--scope=','uJHRw','organizationName','\x20\x20npx\x20playwright@','QyfzZ','user','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','chromium','873384PEjmou','Ddcsc','playwright@','confirm','scope','error','withDeps','\x20install\x20chromium','2503920GqdeHe','14581553cjqPjS','DNEWZ','nITBE','XoWtw','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','local','crWcq','allowInsecureLocalhost','Bvvzd','ksfCi','NzMgQ','\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a','expxo','message','skipChromium','\x0aInstalling\x20Chromium\x20browser...\x0a','--with-deps','VeGmB','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','XPRPo','3456830kGhWOX','success','✓\x20~/.ranger/\x20directory\x20already\x20exists','profile','\x1b[0m','nQGnK','KMrKu','230115hRjHrZ','iSNmY','\x0aIn\x20Claude\x20Code,\x20run\x20','\x0a❌\x20Profile\x20setup\x20failed:','ZZtSs','✓\x20Created\x20.ranger/.gitignore','skills','\x20now?','✓\x20Playwright\x20Chromium\x20browser\x20found','ZHuJt','✓\x20Already\x20authenticated\x20to\x20','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','platform','CPGfT','skipAuth','url','version','log','PAmds','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','lSPao','prompt','2064112DeAvZk','trackPhaseStart','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','GvqIv','trackPhaseEnd','playwright/package.json','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','opencode','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','bohAh','isTTY','stdout','The\x20required\x20version\x20(','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','inherit','force','skipped','\x0a⚠\x20Skipping\x20Chromium\x20installation.','env','nOenM','You\x20can\x20install\x20it\x20manually\x20by\x20running:','exit','✓\x20Local\x20profile\x20already\x20exists','QsJvW','uNHZT','nEHaC','RcMTp','plugin','1717252oShMLs',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','8uMfVZj','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','method','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','install'];_0x4497=function(){return _0x528d50;};return _0x4497();}import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x378fb7=>'\x1b[1m'+_0x378fb7+_0x4af01b(0x209);export function getPlaywrightVersion(){const _0x4dc051=_0x4af01b;try{const _0x29185e=require['resolve'](_0x4dc051(0x227)),_0x1d9a2f=require(_0x29185e);return _0x1d9a2f[_0x4dc051(0x21c)];}catch{return null;}}export function installChromiumBinary(_0x48e354,_0x378e02=![]){const _0x226063=_0x4af01b,_0x2728c0={'ZHuJt':function(_0x51a0b1,_0x34d0e1){return _0x51a0b1===_0x34d0e1;},'Bvvzd':_0x226063(0x201),'nEHaC':'chromium','SKHZX':'npx','khTEG':'ignore','lCTSm':'close'};return new Promise((_0xbc62fe,_0x32a0c9)=>{const _0x436608=_0x226063,_0x85c4c3={'ZZtSs':function(_0x1ed9f1,_0x5e79bf){const _0x4c31a5=_0x4f5d;return _0x2728c0[_0x4c31a5(0x215)](_0x1ed9f1,_0x5e79bf);},'XPRPo':function(_0x81ffa){return _0x81ffa();},'GvqIv':function(_0x4c33bd,_0x4f602a){return _0x4c33bd(_0x4f602a);}},_0x20d0d6=[_0x436608(0x1ea)+_0x48e354,'install',..._0x378e02?[_0x2728c0[_0x436608(0x1f9)]]:[],_0x2728c0[_0x436608(0x1d0)]],_0x54ec8a=spawn(_0x2728c0['SKHZX'],_0x20d0d6,{'stdio':[_0x2728c0['khTEG'],_0x436608(0x1c5),'inherit'],'shell':process[_0x436608(0x218)]==='win32'});_0x54ec8a['on'](_0x2728c0[_0x436608(0x1dc)],_0x34e83a=>{const _0x465297=_0x436608;_0x85c4c3[_0x465297(0x210)](_0x34e83a,0x0)?_0x85c4c3[_0x465297(0x204)](_0xbc62fe):_0x85c4c3[_0x465297(0x225)](_0x32a0c9,new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x34e83a));}),_0x54ec8a['on'](_0x436608(0x1ed),_0x219443=>{_0x32a0c9(_0x219443);});});}export async function authenticate(_0x4e5aa2){const _0x21eef9=_0x4af01b,_0x3317ff={'XoWtw':function(_0xdceeed){return _0xdceeed();},'ksfCi':'existing_token','cphzm':'Validating\x20API\x20token...','PAmds':function(_0x744742,_0x84ef6){return _0x744742(_0x84ef6);},'KMrKu':function(_0x268750,_0x22fbfd){return _0x268750(_0x22fbfd);},'PgOQF':'✓\x20Stored\x20credentials\x20locally','dHECB':'provided_token'};if(!_0x4e5aa2){const _0x38d95a=await _0x3317ff[_0x21eef9(0x1f4)](getToken);if(_0x38d95a){const _0x50042d=await getCurrentUser(_0x38d95a);if(_0x50042d[_0x21eef9(0x206)])return console['log'](_0x21eef9(0x216)+_0x50042d['user']['organizationName']),{'token':_0x38d95a,'method':_0x3317ff[_0x21eef9(0x1fa)]};}try{_0x4e5aa2=await runDeviceAuthFlow();}catch(_0x3b3a43){throw new Error('Authentication\x20failed:\x20'+(_0x3b3a43 instanceof Error?_0x3b3a43['message']:_0x3b3a43));}const _0x1165fe=await getCurrentUser(_0x4e5aa2);if(!_0x1165fe[_0x21eef9(0x206)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x1165fe[_0x21eef9(0x1ed)]);return console[_0x21eef9(0x21d)]('✓\x20Authenticated\x20to\x20'+_0x1165fe[_0x21eef9(0x1e5)][_0x21eef9(0x1e2)]),{'token':_0x4e5aa2,'method':'device_auth'};}console['log'](_0x3317ff['cphzm']);const _0x3660b6=await _0x3317ff[_0x21eef9(0x21e)](getCurrentUser,_0x4e5aa2);if(!_0x3660b6['success']){if(_0x3660b6[_0x21eef9(0x1de)])throw new Error('Authentication\x20failed:\x20'+_0x3660b6['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0x21eef9(0x21f)+_0x3660b6[_0x21eef9(0x1ed)]+_0x21eef9(0x203));}return console[_0x21eef9(0x21d)]('✓\x20Authenticated\x20to\x20'+_0x3660b6['user'][_0x21eef9(0x1e2)]),await _0x3317ff[_0x21eef9(0x20b)](storeToken,_0x4e5aa2),console['log'](process[_0x21eef9(0x1c9)][_0x21eef9(0x1db)]?'✓\x20Exported\x20credentials\x20for\x20CI':_0x3317ff['PgOQF']),{'token':_0x4e5aa2,'method':_0x3317ff['dHECB']};}export async function ensureRangerDir(_0xf3f19d){const _0x52bb06=_0x4af01b;void _0xf3f19d;const _0x2010fc=getRangerHomeDir();return!existsSync(_0x2010fc)?(await mkdir(_0x2010fc,{'recursive':!![]}),console[_0x52bb06(0x21d)]('✓\x20Created\x20~/.ranger/\x20directory'),{'path':_0x2010fc,'installed':!![]}):(console['log'](_0x52bb06(0x207)),{'path':_0x2010fc,'installed':![]});}export async function ensureChromium(_0x489ee6=![]){const _0x531116=_0x4af01b,_0x3b4dc2={'qRmvd':function(_0x9f46c5){return _0x9f46c5();},'seSmn':_0x531116(0x1eb),'nQGnK':_0x531116(0x200),'expxo':function(_0x17aa06,_0x13c62b,_0x46fc05){return _0x17aa06(_0x13c62b,_0x46fc05);},'SeRgm':function(_0x417f56,_0x5e3857){return _0x417f56 instanceof _0x5e3857;},'noYXt':_0x531116(0x1cb),'VeJxu':_0x531116(0x1c8)};let _0x411efe=![];try{const _0x5e23f4=chromium['executablePath']();_0x411efe=existsSync(_0x5e23f4);}catch{_0x411efe=![];}if(_0x411efe)return console[_0x531116(0x21d)](_0x531116(0x214)),![];const _0x2f86cd=_0x3b4dc2['qRmvd'](getPlaywrightVersion),_0x368146=_0x2f86cd??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x13da6a=!_0x2f86cd,_0x32b826=process['stdin']['isTTY']&&process[_0x531116(0x1c2)][_0x531116(0x1c1)];let _0x59f06c=!![];if(_0x32b826){const {install:_0x26b24c}=await _0x265b21[_0x531116(0x221)]([{'type':_0x3b4dc2['seSmn'],'name':_0x531116(0x1d9),'message':_0x13da6a?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x368146+_0x531116(0x213):_0x531116(0x1c3)+_0x368146+_0x531116(0x1d4),'default':!![]}]);_0x59f06c=_0x26b24c;}else console[_0x531116(0x21d)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x368146+(_0x13da6a?'\x20(fallback\x20version)':'')+'...');if(_0x59f06c){console[_0x531116(0x21d)](_0x3b4dc2[_0x531116(0x20a)]);try{await _0x3b4dc2[_0x531116(0x1fd)](installChromiumBinary,_0x368146,_0x489ee6),console[_0x531116(0x21d)](_0x531116(0x1e6));}catch(_0x5c6e03){console['error'](_0x531116(0x1d8),_0x3b4dc2['SeRgm'](_0x5c6e03,Error)?_0x5c6e03[_0x531116(0x1fe)]:_0x5c6e03),console['log'](_0x3b4dc2['noYXt']),console['log']('\x20\x20npx\x20playwright@'+_0x368146+_0x531116(0x1ef));}}else console['log'](_0x3b4dc2['VeJxu']),console[_0x531116(0x21d)]('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),console[_0x531116(0x21d)](_0x531116(0x1e3)+_0x368146+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0xdec19c){const _0x4042bd=_0x4af01b,_0xe700f3=join(_0xdec19c,'.gitignore'),_0x2c9a14=_0x4042bd(0x1fc);await writeFile(_0xe700f3,_0x2c9a14),console['log'](_0x4042bd(0x211));}export async function ensureLocalEnv(_0x312f63,_0x414efe){const _0x39bf72=_0x4af01b,_0x1a31f1={'VeGmB':function(_0x3fe4ef){return _0x3fe4ef();},'iSNmY':function(_0x4fc17d,_0x49e1fd){return _0x4fc17d!==_0x49e1fd;},'QbkaF':function(_0x4a59b0,_0x42a728){return _0x4a59b0===_0x42a728;},'kCsOs':function(_0x385915,_0x23d706,_0x3ee2c4){return _0x385915(_0x23d706,_0x3ee2c4);},'uJHRw':_0x39bf72(0x1f6),'zALXA':function(_0x338863,_0x36c1f3,_0x45ee32,_0x20dff7){return _0x338863(_0x36c1f3,_0x45ee32,_0x20dff7);},'Znfug':function(_0x207fc4,_0x3d9d0e){return _0x207fc4 instanceof _0x3d9d0e;}};if(!_0x1a31f1[_0x39bf72(0x202)](findGitRoot)&&_0x1a31f1[_0x39bf72(0x20d)](_0x312f63?.['scope'],_0x39bf72(0x1e5)))return console['log'](_0x39bf72(0x224)),{'ready':![],'skipped':!![]};const _0x6015f8=_0x1a31f1['QbkaF'](_0x312f63?.[_0x39bf72(0x1ec)],_0x39bf72(0x1e5))?getRangerHomeDir():undefined;if(_0x1a31f1['kCsOs'](findExistingEnv,_0x1a31f1[_0x39bf72(0x1e1)],{'locations':[_0x1a31f1[_0x39bf72(0x1e1)]],'rangerDir':_0x6015f8}))return console[_0x39bf72(0x21d)](_0x39bf72(0x1cd)),{'ready':!![],'skipped':![]};try{return await _0x1a31f1['zALXA'](addEnv,_0x1a31f1[_0x39bf72(0x1e1)],{'url':_0x312f63?.['url'],'force':_0x312f63?.[_0x39bf72(0x1c6)],'allowInsecureLocalhost':_0x312f63?.['allowInsecureLocalhost'],'scope':_0x312f63?.['scope']},_0x414efe),{'ready':!![],'skipped':![]};}catch(_0x372ef9){return console[_0x39bf72(0x1ed)](_0x39bf72(0x20f),_0x1a31f1['Znfug'](_0x372ef9,Error)?_0x372ef9[_0x39bf72(0x1fe)]:_0x372ef9),{'ready':![],'skipped':![]};}}export async function start(_0x1ab33d,_0x2bbf7d,_0x19d421){const _0x151159=_0x4af01b,_0x3a34ae={'YQsMK':'\x0a🚀\x20Ranger\x20Setup\x0a','QsJvW':function(_0x6e149c,_0x23b095){return _0x6e149c!==_0x23b095;},'nITBE':_0x151159(0x1e5),'uNHZT':function(_0x559b90,_0x344937){return _0x559b90+_0x344937;},'Ddcsc':function(_0x34acfb,_0x47c6cd){return _0x34acfb(_0x47c6cd);},'dsmDL':function(_0x599a92){return _0x599a92();},'VPprD':'auth','nOenM':_0x151159(0x1e7),'DNEWZ':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','NzMgQ':_0x151159(0x1d2),'WHOVE':function(_0x4cbd02,_0x48f7e3){return _0x4cbd02(_0x48f7e3);},'bohAh':function(_0x405f95,_0x2e301b,_0x52e89d){return _0x405f95(_0x2e301b,_0x52e89d);},'nHZtK':'ranger','mhwtg':function(_0x1fc0f1){return _0x1fc0f1();},'QyfzZ':'opencode','AXUGV':_0x151159(0x212),'CPGfT':_0x151159(0x208),'jiEEb':function(_0x28a6f9,_0xc7c2bd){return _0x28a6f9(_0xc7c2bd);},'RcMTp':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','crWcq':'/ranger:enable','MWMJH':function(_0x206b44,_0x47e1eb){return _0x206b44+_0x47e1eb;},'lSPao':function(_0x55f559,_0x4288d6){return _0x55f559+_0x4288d6;}};console[_0x151159(0x21d)](_0x3a34ae['YQsMK']);_0x3a34ae[_0x151159(0x1ce)](_0x2bbf7d?.[_0x151159(0x1ec)],undefined)&&_0x3a34ae['QsJvW'](_0x2bbf7d[_0x151159(0x1ec)],_0x3a34ae['nITBE'])&&(console['error'](_0x3a34ae['uNHZT'](_0x151159(0x1e0)+String(_0x2bbf7d['scope'])+'\x20is\x20no\x20longer\x20supported.\x20'+_0x151159(0x1f5),_0x151159(0x1c4))),process[_0x151159(0x1cc)](0x1));_0x2bbf7d={..._0x2bbf7d,'scope':_0x3a34ae['nITBE']};const _0x42058e=!_0x3a34ae[_0x151159(0x1e9)](existsSync,_0x3a34ae['dsmDL'](getRangerHomeDir));await _0x3a34ae['Ddcsc'](ensureRangerDir,_0x3a34ae['nITBE']);if(_0x2bbf7d?.[_0x151159(0x21a)])console[_0x151159(0x21d)]('✓\x20Skipping\x20authentication\x20(--skip-auth)'),_0x19d421?.[_0x151159(0x226)]('auth',{'isFirstRun':_0x42058e,'method':_0x151159(0x1c7)});else{_0x19d421?.[_0x151159(0x223)](_0x3a34ae['VPprD']);const _0x19125d=await _0x3a34ae[_0x151159(0x1e9)](authenticate,_0x1ab33d);_0x19d421?.['trackPhaseEnd'](_0x3a34ae['VPprD'],{'isFirstRun':_0x42058e,'method':_0x19125d[_0x151159(0x1d7)]});}_0x19d421?.['trackPhaseStart'](_0x3a34ae[_0x151159(0x1ca)]);_0x2bbf7d?.['skipChromium']?console['log'](_0x151159(0x22a)):await _0x3a34ae['Ddcsc'](ensureChromium,_0x2bbf7d?.[_0x151159(0x1ee)]);_0x19d421?.[_0x151159(0x226)](_0x3a34ae[_0x151159(0x1ca)],{'isFirstRun':_0x42058e,'skipped':!!_0x2bbf7d?.[_0x151159(0x1ff)]}),console['log'](_0x3a34ae[_0x151159(0x1f2)]);const _0x2e1280=_0x2bbf7d?.[_0x151159(0x1ec)],_0xb62d1e=_0x2bbf7d?.[_0x151159(0x229)]??![];let _0x22013c=null;_0xb62d1e?(_0x19d421?.[_0x151159(0x223)](_0x3a34ae[_0x151159(0x1fb)]),_0x22013c=await ensureOpencodePluginConfig(_0x2e1280),_0x19d421?.['trackPhaseEnd'](_0x3a34ae['NzMgQ'],{'isFirstRun':_0x42058e,'opencode':!![]})):(_0x19d421?.[_0x151159(0x223)](_0x3a34ae['NzMgQ']),await _0x3a34ae['WHOVE'](ensureClaudePlugin,_0x2e1280),_0x19d421?.['trackPhaseEnd'](_0x3a34ae['NzMgQ'],{'isFirstRun':_0x42058e}));if(_0xb62d1e&&_0x22013c){_0x19d421?.['trackPhaseStart'](_0x151159(0x212));try{await _0x3a34ae['bohAh'](installSkill,_0x3a34ae['nHZtK'],{'level':_0x22013c[_0x151159(0x1ec)],'cliVersion':_0x3a34ae['mhwtg'](getCurrentVersion),'platform':_0x3a34ae[_0x151159(0x1e4)]}),_0x19d421?.[_0x151159(0x226)](_0x3a34ae['AXUGV'],{'isFirstRun':_0x42058e,'opencode':!![]});}catch(_0x16d294){console[_0x151159(0x1dd)]('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x16d294 instanceof Error?_0x16d294['message']:_0x16d294),_0x19d421?.[_0x151159(0x226)](_0x3a34ae['AXUGV'],{'isFirstRun':_0x42058e,'opencode':!![],'failed':!![]});}}else _0x19d421?.['trackPhaseStart'](_0x3a34ae['AXUGV']),await ensureClaudeSkills(_0x2e1280),_0x19d421?.['trackPhaseEnd']('skills',{'isFirstRun':_0x42058e});if(_0x2bbf7d?.['skipAuth'])console['log']('\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a');else{if(_0x2bbf7d?.['url']){_0x19d421?.[_0x151159(0x223)](_0x3a34ae[_0x151159(0x219)]);const _0x5c9c78=await _0x3a34ae[_0x151159(0x22b)](ensureLocalEnv,{'url':_0x2bbf7d[_0x151159(0x21b)],'force':_0x2bbf7d?.['force'],'allowInsecureLocalhost':_0x2bbf7d?.[_0x151159(0x1f8)],'scope':_0x3a34ae[_0x151159(0x1f3)]},_0x19d421);_0x19d421?.[_0x151159(0x226)](_0x3a34ae['CPGfT'],{'isFirstRun':_0x42058e,'profileReady':_0x5c9c78['ready'],'userSkipped':_0x5c9c78[_0x151159(0x1c7)]});}else console[_0x151159(0x21d)](_0x3a34ae['uNHZT']('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+('\x0a\x20\x20'+_0x3a34ae['jiEEb'](bold,'ranger\x20profile\x20add\x20<name>'))+_0x151159(0x228),_0x151159(0x217))+'\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles');}if(_0xb62d1e)console['log'](_0x3a34ae[_0x151159(0x1d1)]),console[_0x151159(0x21d)](_0x151159(0x1df)),console[_0x151159(0x21d)]('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console[_0x151159(0x21d)](_0x151159(0x1d6));else{const _0x3639db=bold(_0x3a34ae[_0x151159(0x1f7)]);console['log'](_0x3a34ae['MWMJH'](_0x3a34ae[_0x151159(0x1cf)](_0x3a34ae[_0x151159(0x220)](_0x151159(0x20e)+_0x3639db+_0x151159(0x1da),'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'),'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'));}}
1
+ const _0x4c7a97=_0x442d;(function(_0x5283bf,_0x219087){const _0x2a0980=_0x442d,_0x511611=_0x5283bf();while(!![]){try{const _0x45efae=-parseInt(_0x2a0980(0x136))/0x1+-parseInt(_0x2a0980(0xf2))/0x2*(-parseInt(_0x2a0980(0xee))/0x3)+parseInt(_0x2a0980(0xeb))/0x4*(-parseInt(_0x2a0980(0x134))/0x5)+-parseInt(_0x2a0980(0xfb))/0x6*(-parseInt(_0x2a0980(0x106))/0x7)+-parseInt(_0x2a0980(0xfd))/0x8+parseInt(_0x2a0980(0xf9))/0x9+parseInt(_0x2a0980(0xef))/0xa;if(_0x45efae===_0x219087)break;else _0x511611['push'](_0x511611['shift']());}catch(_0xb7723f){_0x511611['push'](_0x511611['shift']());}}}(_0x3c90,0x2b72f));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x2ac3a2 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x292e93=>'\x1b[1m'+_0x292e93+_0x4c7a97(0x12e);function _0x442d(_0x26bf27,_0x1055a0){_0x26bf27=_0x26bf27-0xd5;const _0x3c9077=_0x3c90();let _0x442d2a=_0x3c9077[_0x26bf27];return _0x442d2a;}export function getPlaywrightVersion(){const _0x553897=_0x4c7a97,_0x12b2f4={'qqHeW':function(_0x26fb5c,_0x499b27){return _0x26fb5c(_0x499b27);}};try{const _0x3f5f90=require[_0x553897(0xe6)]('playwright/package.json'),_0x186560=_0x12b2f4['qqHeW'](require,_0x3f5f90);return _0x186560[_0x553897(0x114)];}catch{return null;}}export function installChromiumBinary(_0x31e866,_0x36e4ef=![]){const _0x128f3a=_0x4c7a97,_0x24ccfd={'EGHvv':function(_0x5a146f,_0x17b506){return _0x5a146f===_0x17b506;},'dBUZB':function(_0x12a06b,_0x16d0e8){return _0x12a06b(_0x16d0e8);},'cagml':_0x128f3a(0x129),'lziVf':_0x128f3a(0xe2),'KwRmF':_0x128f3a(0x137),'ODeha':_0x128f3a(0x108),'haPJC':'error'};return new Promise((_0x14506f,_0x3b3287)=>{const _0x23deb5=_0x128f3a,_0xb5599f=['playwright@'+_0x31e866,_0x24ccfd['cagml'],..._0x36e4ef?[_0x23deb5(0x135)]:[],'chromium'],_0x2310e7=spawn(_0x24ccfd['lziVf'],_0xb5599f,{'stdio':[_0x24ccfd['KwRmF'],'inherit','inherit'],'shell':_0x24ccfd['EGHvv'](process[_0x23deb5(0x112)],_0x24ccfd[_0x23deb5(0x111)])});_0x2310e7['on']('close',_0x3932d6=>{const _0x342a92=_0x23deb5;_0x24ccfd['EGHvv'](_0x3932d6,0x0)?_0x14506f():_0x24ccfd[_0x342a92(0x119)](_0x3b3287,new Error(_0x342a92(0x107)+_0x3932d6));}),_0x2310e7['on'](_0x24ccfd['haPJC'],_0x2ab6ab=>{const _0x1e31fe=_0x23deb5;_0x24ccfd[_0x1e31fe(0x119)](_0x3b3287,_0x2ab6ab);});});}export async function authenticate(_0x2f5531){const _0xdb40b5=_0x4c7a97,_0x202dde={'UWHSh':function(_0x38fce2){return _0x38fce2();},'MJSxH':function(_0x5a0327,_0x3a25d8){return _0x5a0327(_0x3a25d8);},'MwbZB':_0xdb40b5(0x12d)};if(!_0x2f5531){const _0x72caeb=await _0x202dde['UWHSh'](getToken);if(_0x72caeb){const _0x9625f3=await _0x202dde[_0xdb40b5(0x123)](getCurrentUser,_0x72caeb);if(_0x9625f3['success'])return console['log'](_0xdb40b5(0x13c)+_0x9625f3[_0xdb40b5(0x11e)]['organizationName']),{'token':_0x72caeb,'method':_0xdb40b5(0x10d)};}try{_0x2f5531=await _0x202dde[_0xdb40b5(0x12f)](runDeviceAuthFlow);}catch(_0x45951f){throw new Error(_0xdb40b5(0xd9)+(_0x45951f instanceof Error?_0x45951f['message']:_0x45951f));}const _0x53890f=await getCurrentUser(_0x2f5531);if(!_0x53890f[_0xdb40b5(0xda)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x53890f['error']);return console['log'](_0xdb40b5(0x10e)+_0x53890f[_0xdb40b5(0x11e)][_0xdb40b5(0xdc)]),{'token':_0x2f5531,'method':_0x202dde[_0xdb40b5(0x11a)]};}console['log']('Validating\x20API\x20token...');const _0x57bf41=await getCurrentUser(_0x2f5531);if(!_0x57bf41['success']){if(_0x57bf41[_0xdb40b5(0x100)])throw new Error(_0xdb40b5(0xd9)+_0x57bf41['error']+_0xdb40b5(0x101));else throw new Error(_0xdb40b5(0xe4)+_0x57bf41[_0xdb40b5(0x103)]+_0xdb40b5(0x131));}return console['log'](_0xdb40b5(0x10e)+_0x57bf41['user']['organizationName']),await storeToken(_0x2f5531),console[_0xdb40b5(0x13e)](process['env']['GITHUB_ENV']?'✓\x20Exported\x20credentials\x20for\x20CI':_0xdb40b5(0xfe)),{'token':_0x2f5531,'method':_0xdb40b5(0xe5)};}export async function ensureRangerDir(_0x29f89f){const _0x4cf9b0=_0x4c7a97,_0x5c563a={'GRsnI':function(_0x30cdae,_0x4460eb){return _0x30cdae(_0x4460eb);},'ytMmL':'✓\x20Created\x20~/.ranger/\x20directory','hliCd':'✓\x20~/.ranger/\x20directory\x20already\x20exists'};void _0x29f89f;const _0x20e345=getRangerHomeDir();return!_0x5c563a[_0x4cf9b0(0xd6)](existsSync,_0x20e345)?(await mkdir(_0x20e345,{'recursive':!![]}),console[_0x4cf9b0(0x13e)](_0x5c563a[_0x4cf9b0(0x11c)]),{'path':_0x20e345,'installed':!![]}):(console['log'](_0x5c563a[_0x4cf9b0(0xf0)]),{'path':_0x20e345,'installed':![]});}function _0x3c90(){const _0x4a3e5b=['\x0a✅\x20Ranger\x20setup\x20complete!\x0a','12360ObhHaI','--with-deps','348972rrOEVh','ignore','✓\x20Local\x20profile\x20already\x20exists','stdin','skipAuth','✓\x20Playwright\x20Chromium\x20browser\x20found','✓\x20Already\x20authenticated\x20to\x20','EpgOu','log','hQKgn','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','\x0aIn\x20Claude\x20Code,\x20run\x20','.gitignore','GRsnI','PiaLk','zudND','Authentication\x20failed:\x20','success','trackPhaseStart','organizationName','SNStS','cWnBM','stdout','message','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','npx','DAHrZ','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','provided_token','resolve','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','opencode','plugin','\x0a\x20\x20','344TIscHv','local','XdJDV','3zrhyms','5155580UfdQdt','hliCd','KLSyx','85458hmTRSP','\x20(fallback\x20version)','/ranger:enable','bFPih','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','ready','prompt','1063584CwYswt','skipChromium','37194UOVhRd','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','1528728kyZyxn','✓\x20Stored\x20credentials\x20locally','OxRdb','status','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','skills','error','\x20install\x20chromium','ranger\x20setup\x20--scope=','287NiotGy','Installation\x20failed\x20with\x20exit\x20code\x20','win32','ZzYIB','✓\x20Created\x20.ranger/.gitignore','EIUdA','chromium','existing_token','✓\x20Authenticated\x20to\x20','\x0a🚀\x20Ranger\x20Setup\x0a','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','ODeha','platform','method','version','\x20is\x20no\x20longer\x20supported.\x20','HQUtX','XXKoe','The\x20required\x20version\x20(','dBUZB','MwbZB','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','ytMmL','vWbsT','user','confirm','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','MJSxH','url','yfXGj','skipped','FxAdM','rsQgM','install','allowInsecureLocalhost','scope','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','device_auth','\x1b[0m','UWHSh','trackPhaseEnd','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'];_0x3c90=function(){return _0x4a3e5b;};return _0x3c90();}export async function ensureChromium(_0x35440c=![]){const _0x3b5950=_0x4c7a97,_0x47c9eb={'Acfrn':function(_0x25c530,_0x3f3b77){return _0x25c530(_0x3f3b77);},'CSoll':_0x3b5950(0xf3),'owjQC':function(_0x4b7000,_0x5cd24f,_0x580ef3){return _0x4b7000(_0x5cd24f,_0x580ef3);},'ETrUX':_0x3b5950(0x140),'MMpzl':_0x3b5950(0x110),'lqByv':'You\x20can\x20install\x20it\x20manually\x20by\x20running:'};let _0x3786f7=![];try{const _0x4db899=chromium['executablePath']();_0x3786f7=_0x47c9eb['Acfrn'](existsSync,_0x4db899);}catch{_0x3786f7=![];}if(_0x3786f7)return console['log'](_0x3b5950(0x13b)),![];const _0x57540c=getPlaywrightVersion(),_0x395ada=_0x57540c??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x43a0bb=!_0x57540c,_0xfc66c9=process[_0x3b5950(0x139)]['isTTY']&&process[_0x3b5950(0xdf)]['isTTY'];let _0x136f46=!![];if(_0xfc66c9){const {install:_0x5a4a93}=await _0x2ac3a2[_0x3b5950(0xf8)]([{'type':_0x3b5950(0x11f),'name':_0x3b5950(0x129),'message':_0x43a0bb?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x395ada+'\x20now?':_0x3b5950(0x118)+_0x395ada+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x136f46=_0x5a4a93;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x395ada+(_0x43a0bb?_0x47c9eb['CSoll']:'')+'...');if(_0x136f46){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0x47c9eb['owjQC'](installChromiumBinary,_0x395ada,_0x35440c),console['log'](_0x47c9eb['ETrUX']);}catch(_0x5f3a61){console['error'](_0x47c9eb['MMpzl'],_0x5f3a61 instanceof Error?_0x5f3a61[_0x3b5950(0xe0)]:_0x5f3a61),console[_0x3b5950(0x13e)](_0x47c9eb['lqByv']),console['log']('\x20\x20npx\x20playwright@'+_0x395ada+_0x3b5950(0x104));}}else console['log']('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console['log']('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),console[_0x3b5950(0x13e)]('\x20\x20npx\x20playwright@'+_0x395ada+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x5945d4){const _0x4e5562=_0x4c7a97,_0x1b383f=join(_0x5945d4,_0x4e5562(0xd5)),_0x3c0e08='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await writeFile(_0x1b383f,_0x3c0e08),console['log'](_0x4e5562(0x10a));}export async function ensureLocalEnv(_0x1b52e1,_0x5ac053){const _0x2d2b44=_0x4c7a97,_0x13a3e4={'vWbsT':'⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','fbskQ':_0x2d2b44(0x11e),'bsjnQ':function(_0x1d0d3f){return _0x1d0d3f();},'itsME':function(_0x483d6c,_0x17aa7f,_0xc5665b){return _0x483d6c(_0x17aa7f,_0xc5665b);},'KLSyx':_0x2d2b44(0xec),'JfxiZ':function(_0x159876,_0xb153cf,_0x5038ec,_0x3ee879){return _0x159876(_0xb153cf,_0x5038ec,_0x3ee879);},'EpgOu':function(_0x41434d,_0x5ec3dc){return _0x41434d instanceof _0x5ec3dc;}};if(!findGitRoot()&&_0x1b52e1?.[_0x2d2b44(0x12b)]!==_0x2d2b44(0x11e))return console['log'](_0x13a3e4[_0x2d2b44(0x11d)]),{'ready':![],'skipped':!![]};const _0x341d4f=_0x1b52e1?.[_0x2d2b44(0x12b)]===_0x13a3e4['fbskQ']?_0x13a3e4['bsjnQ'](getRangerHomeDir):undefined;if(_0x13a3e4['itsME'](findExistingEnv,_0x13a3e4[_0x2d2b44(0xf1)],{'locations':['local'],'rangerDir':_0x341d4f}))return console[_0x2d2b44(0x13e)](_0x2d2b44(0x138)),{'ready':!![],'skipped':![]};try{return await _0x13a3e4['JfxiZ'](addEnv,_0x13a3e4[_0x2d2b44(0xf1)],{'url':_0x1b52e1?.[_0x2d2b44(0x124)],'force':_0x1b52e1?.['force'],'allowInsecureLocalhost':_0x1b52e1?.['allowInsecureLocalhost'],'scope':_0x1b52e1?.['scope']},_0x5ac053),{'ready':!![],'skipped':![]};}catch(_0x4028cc){return console[_0x2d2b44(0x103)]('\x0a❌\x20Profile\x20setup\x20failed:',_0x13a3e4[_0x2d2b44(0x13d)](_0x4028cc,Error)?_0x4028cc[_0x2d2b44(0xe0)]:_0x4028cc),{'ready':![],'skipped':![]};}}export async function start(_0x121685,_0x2b3351,_0x533f50){const _0x4a5f81=_0x4c7a97,_0x273a8c={'XXKoe':_0x4a5f81(0x10f),'rNxzI':function(_0x23b5d1,_0x4bf90e){return _0x23b5d1!==_0x4bf90e;},'cWnBM':'user','zudND':function(_0x45928d,_0x1e293f){return _0x45928d+_0x1e293f;},'mNOEF':function(_0x426a14,_0x4f72a0){return _0x426a14(_0x4f72a0);},'FxAdM':function(_0x3bae2f,_0x241941){return _0x3bae2f(_0x241941);},'EIUdA':function(_0x10e97a,_0x1c34c6){return _0x10e97a(_0x1c34c6);},'HQUtX':'chromium','XdJDV':function(_0xec285a,_0x2a2901){return _0xec285a(_0x2a2901);},'SNStS':'plugin','bFPih':_0x4a5f81(0x102),'PiaLk':function(_0x26fbe6,_0x558b39,_0x367ca7){return _0x26fbe6(_0x558b39,_0x367ca7);},'rsQgM':'ranger','BHNJl':_0x4a5f81(0xe8),'yfXGj':_0x4a5f81(0xe1),'KUcRa':function(_0x4404d6,_0x1040dd){return _0x4404d6(_0x1040dd);},'DXqGx':'\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','hQKgn':function(_0x445196,_0x4b42c5,_0x2b8453){return _0x445196(_0x4b42c5,_0x2b8453);},'ZzYIB':'ranger\x20profile\x20add\x20<name>','vooOk':_0x4a5f81(0x122),'OxRdb':_0x4a5f81(0xf4),'DAHrZ':function(_0x2081b0,_0x435454){return _0x2081b0+_0x435454;}};console[_0x4a5f81(0x13e)](_0x273a8c[_0x4a5f81(0x117)]);_0x2b3351?.['scope']!==undefined&&_0x273a8c['rNxzI'](_0x2b3351[_0x4a5f81(0x12b)],_0x273a8c['cWnBM'])&&(console[_0x4a5f81(0x103)](_0x273a8c['zudND'](_0x4a5f81(0x105)+String(_0x2b3351[_0x4a5f81(0x12b)])+_0x4a5f81(0x115)+_0x4a5f81(0x120),_0x4a5f81(0x12c))),process['exit'](0x1));_0x2b3351={..._0x2b3351,'scope':_0x4a5f81(0x11e)};const _0x3bc9b5=!_0x273a8c['mNOEF'](existsSync,getRangerHomeDir());await ensureRangerDir('user');if(_0x2b3351?.[_0x4a5f81(0x13a)])console['log']('✓\x20Skipping\x20authentication\x20(--skip-auth)'),_0x533f50?.[_0x4a5f81(0x130)]('auth',{'isFirstRun':_0x3bc9b5,'method':_0x4a5f81(0x126)});else{_0x533f50?.[_0x4a5f81(0xdb)]('auth');const _0x2bbe11=await _0x273a8c[_0x4a5f81(0x127)](authenticate,_0x121685);_0x533f50?.['trackPhaseEnd']('auth',{'isFirstRun':_0x3bc9b5,'method':_0x2bbe11[_0x4a5f81(0x113)]});}_0x533f50?.[_0x4a5f81(0xdb)](_0x4a5f81(0x10c));_0x2b3351?.[_0x4a5f81(0xfa)]?console['log'](_0x4a5f81(0xe7)):await _0x273a8c[_0x4a5f81(0x10b)](ensureChromium,_0x2b3351?.['withDeps']);_0x533f50?.[_0x4a5f81(0x130)](_0x273a8c[_0x4a5f81(0x116)],{'isFirstRun':_0x3bc9b5,'skipped':!!_0x2b3351?.['skipChromium']}),console['log'](_0x4a5f81(0x133));const _0xfb1392=_0x2b3351?.['scope'],_0x2572c4=_0x2b3351?.[_0x4a5f81(0xe8)]??![];let _0x38b4f2=null;_0x2572c4?(_0x533f50?.['trackPhaseStart'](_0x4a5f81(0xe9)),_0x38b4f2=await _0x273a8c[_0x4a5f81(0xed)](ensureOpencodePluginConfig,_0xfb1392),_0x533f50?.['trackPhaseEnd'](_0x273a8c[_0x4a5f81(0xdd)],{'isFirstRun':_0x3bc9b5,'opencode':!![]})):(_0x533f50?.['trackPhaseStart']('plugin'),await ensureClaudePlugin(_0xfb1392),_0x533f50?.[_0x4a5f81(0x130)](_0x273a8c[_0x4a5f81(0xdd)],{'isFirstRun':_0x3bc9b5}));if(_0x2572c4&&_0x38b4f2){_0x533f50?.[_0x4a5f81(0xdb)](_0x273a8c[_0x4a5f81(0xf5)]);try{await _0x273a8c[_0x4a5f81(0xd7)](installSkill,_0x273a8c[_0x4a5f81(0x128)],{'level':_0x38b4f2['scope'],'cliVersion':getCurrentVersion(),'platform':_0x273a8c['BHNJl']}),_0x533f50?.[_0x4a5f81(0x130)](_0x273a8c['bFPih'],{'isFirstRun':_0x3bc9b5,'opencode':!![]});}catch(_0x4d8bbc){console['warn'](_0x273a8c[_0x4a5f81(0x125)],_0x4d8bbc instanceof Error?_0x4d8bbc['message']:_0x4d8bbc),_0x533f50?.['trackPhaseEnd'](_0x273a8c['bFPih'],{'isFirstRun':_0x3bc9b5,'opencode':!![],'failed':!![]});}}else _0x533f50?.['trackPhaseStart'](_0x273a8c[_0x4a5f81(0xf5)]),await _0x273a8c['KUcRa'](ensureClaudeSkills,_0xfb1392),_0x533f50?.['trackPhaseEnd']('skills',{'isFirstRun':_0x3bc9b5});if(_0x2b3351?.[_0x4a5f81(0x13a)])console[_0x4a5f81(0x13e)](_0x273a8c['DXqGx']);else{if(_0x2b3351?.[_0x4a5f81(0x124)]){_0x533f50?.[_0x4a5f81(0xdb)]('profile');const _0x845787=await _0x273a8c[_0x4a5f81(0x13f)](ensureLocalEnv,{'url':_0x2b3351['url'],'force':_0x2b3351?.['force'],'allowInsecureLocalhost':_0x2b3351?.[_0x4a5f81(0x12a)],'scope':_0x273a8c[_0x4a5f81(0xde)]},_0x533f50);_0x533f50?.[_0x4a5f81(0x130)]('profile',{'isFirstRun':_0x3bc9b5,'profileReady':_0x845787[_0x4a5f81(0xf7)],'userSkipped':_0x845787[_0x4a5f81(0x126)]});}else console['log'](_0x273a8c[_0x4a5f81(0xd8)](_0x273a8c['zudND'](_0x273a8c[_0x4a5f81(0xd8)]('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+(_0x4a5f81(0xea)+_0x273a8c['KUcRa'](bold,_0x273a8c[_0x4a5f81(0x109)])),'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)'),_0x4a5f81(0x141)),_0x4a5f81(0xfc)));}if(_0x2572c4)console['log'](_0x273a8c['vooOk']),console[_0x4a5f81(0x13e)](_0x4a5f81(0x11b)),console[_0x4a5f81(0x13e)](_0x4a5f81(0x121)),console[_0x4a5f81(0x13e)](_0x4a5f81(0x132));else{const _0x35c44f=_0x273a8c['FxAdM'](bold,_0x273a8c[_0x4a5f81(0xff)]);console['log'](_0x273a8c[_0x4a5f81(0xe3)](_0x4a5f81(0x142)+_0x35c44f+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with',_0x4a5f81(0xf6))+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
@@ -1 +1 @@
1
- const _0x263f84=_0x57af;(function(_0x189476,_0x2c7239){const _0x4f77b0=_0x57af,_0x518551=_0x189476();while(!![]){try{const _0x38527c=parseInt(_0x4f77b0(0x1ba))/0x1+parseInt(_0x4f77b0(0x202))/0x2+parseInt(_0x4f77b0(0x20a))/0x3*(parseInt(_0x4f77b0(0x1bf))/0x4)+-parseInt(_0x4f77b0(0x22d))/0x5*(-parseInt(_0x4f77b0(0x1f0))/0x6)+-parseInt(_0x4f77b0(0x205))/0x7+-parseInt(_0x4f77b0(0x226))/0x8+parseInt(_0x4f77b0(0x209))/0x9*(-parseInt(_0x4f77b0(0x1ec))/0xa);if(_0x38527c===_0x2c7239)break;else _0x518551['push'](_0x518551['shift']());}catch(_0x3f5ee7){_0x518551['push'](_0x518551['shift']());}}}(_0x2b33,0x789de));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';function _0x57af(_0x14f284,_0x44a76f){_0x14f284=_0x14f284-0x1b8;const _0x2b3313=_0x2b33();let _0x57af27=_0x2b3313[_0x14f284];return _0x57af27;}import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{listCloudProfiles}from'./utils/cloudProfile.js';function _0x2b33(){const _0x1fb0e4=['\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','gAYSD','organizationName','trim','iDgEb','eGuTG','\x20(active)','No\x20skills\x20installed','toString','plugin','status','API\x20URL:\x20','OPxGD','env','\x20\x20\x20\x20','UtYPf','kNlVC','includes','CkGix','user','\x0a📊\x20Ranger\x20Status\x0a','log','sessionUpdatedAt','some','\x1b[1m','(not\x20found)','project','jlZVN','path','isActive','\x20\x20Not\x20configured','kDUih','\x20[local]','Ithxs','\x0a---\x20Skills\x20---','ihNUJ','enabled','push','\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)','9590KUfhfg','\x20\x20\x20\x20Session:\x20','hasPlaintextAuth','TbHsT','6cmPWEY','\x20local','GoFUV','ruHEZ','lFJip','luAUD','API\x20Environment:\x20','map','vWeRx','Tlkem','UjJjZ','dcWgA','\x0a---\x20Claude\x20Code\x20Plugin\x20---','RsTHP','isArray','stdout','kDMua','\x0a\x20\x20No\x20active\x20profile\x20set','774118NMwoRW','\x20\x20\x20\x20Settings:\x20','\x20\x20Run:\x20ranger\x20setup\x20[token]','3057831oZyLUy','length','settingsPath','success','1962jbrApS','14589wxhDfN','Version:\x20','pxSqY','UrOsp','pqLZT',':\x20installed\x20(','opencode','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','nwBKk','data','cached\x20(updated\x20','ranger@trailhead','filter','pipe','\x1b]8;;file://','@ranger-testing/opencode-plugin','MzSIm','version','settings.json','RbUiM','HrAGK','\x20\x20User-level:','has','jaGwI','Root:\x20','\x20cloud','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','join','841704qWnKOI','\x20plugin(s)\x20configured','unknown','config','Ipsdj','\x20\x20Run:\x20ranger\x20update','\x20\x20Run:\x20ranger\x20skillup','3003415EavkbF','opencode-plugin','aDjey','9399CSyGxC','\x20\x20Active:\x20','Organization:\x20','\x20(up\x20to\x20date)','name','204Iyrfdy','API\x20Token:\x20✗\x20Not\x20found','scope','IldkK','parse','all'];_0x2b33=function(){return _0x1fb0e4;};return _0x2b33();}import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x459b52=>_0x263f84(0x1dd)+_0x459b52+'\x1b[0m',link=(_0xf53db9,_0x5efce2)=>_0x263f84(0x218)+_0xf53db9+'\x07'+(_0x5efce2||_0xf53db9)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x4260fe=_0x263f84,_0x4dbf6f={'SvHww':function(_0x3de946,_0x32ee63){return _0x3de946(_0x32ee63);},'sZaly':function(_0x4ca3ca,_0x4a0286){return _0x4ca3ca!==_0x4a0286;},'GoFUV':function(_0x740d2b,_0x2530bc){return _0x740d2b(_0x2530bc);},'fhUus':function(_0x318632,_0xb50cae){return _0x318632>_0xb50cae;},'UjJjZ':'not_configured','dpWWw':_0x4260fe(0x1b8),'TbHsT':function(_0x544852,_0x483ff7,_0x41e7dd,_0x152478){return _0x544852(_0x483ff7,_0x41e7dd,_0x152478);},'xAfpk':'ignore','kDMua':_0x4260fe(0x217),'jaGwI':'data'};return new Promise(_0x283d77=>{const _0x4f53c2=_0x4260fe,_0xa44268={'ihNUJ':'@ranger-testing/opencode-plugin','IldkK':_0x4dbf6f['dpWWw']},_0x152095=_0x4dbf6f[_0x4f53c2(0x1ef)](spawn,_0x4f53c2(0x210),['debug',_0x4f53c2(0x229)],{'stdio':[_0x4dbf6f['xAfpk'],_0x4dbf6f[_0x4f53c2(0x200)],_0x4f53c2(0x217)]});let _0x4da4b1='';_0x152095[_0x4f53c2(0x1ff)]?.['on'](_0x4dbf6f[_0x4f53c2(0x221)],_0x59325a=>{const _0x239e94=_0x4f53c2;_0x4da4b1+=_0x59325a[_0x239e94(0x1cd)]();}),_0x152095['stderr']?.['on'](_0x4f53c2(0x213),_0x35b3ae=>{_0x4da4b1+=_0x35b3ae['toString']();}),_0x152095['on']('error',()=>{_0x4dbf6f['SvHww'](_0x283d77,{'status':'not_installed'});}),_0x152095['on']('close',_0x4b1319=>{const _0x1da5c3=_0x4f53c2;if(_0x4dbf6f['sZaly'](_0x4b1319,0x0)){_0x283d77({'status':'not_installed'});return;}const _0x2917e9=_0x4da4b1[_0x1da5c3(0x1c8)]();let _0x23d1f7=null;if(_0x2917e9)try{_0x23d1f7=JSON['parse'](_0x2917e9);}catch{const _0x31aa04=_0x2917e9['match'](/\{[\s\S]*\}$/);if(_0x31aa04)try{_0x23d1f7=JSON[_0x1da5c3(0x1c3)](_0x31aa04[0x0]);}catch{_0x23d1f7=null;}}const _0x1372f1=Array[_0x1da5c3(0x1fe)](_0x23d1f7?.['plugin'])?_0x23d1f7?.[_0x1da5c3(0x1ce)]:[],_0x13d1af=_0x1372f1[_0x1da5c3(0x1dc)](_0x339e4a=>{const _0x3cf2ee=_0x1da5c3;if(typeof _0x339e4a!=='string')return![];return _0x339e4a['includes'](_0xa44268[_0x3cf2ee(0x1e8)])||_0x339e4a[_0x3cf2ee(0x1d6)](_0xa44268[_0x3cf2ee(0x1c2)]);});if(_0x13d1af){_0x4dbf6f[_0x1da5c3(0x1f2)](_0x283d77,{'status':'configured','details':_0x4dbf6f['fhUus'](_0x1372f1['length'],0x0)?_0x1372f1['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x1372f1[_0x1da5c3(0x206)]>0x0){_0x283d77({'status':_0x4dbf6f[_0x1da5c3(0x1fa)],'details':_0x1372f1['length']+_0x1da5c3(0x227)});return;}_0x283d77({'status':_0x4dbf6f['UjJjZ']});});});}async function getSkillsFromDir(_0x766fe5,_0x5c1f8e){const _0x4fecbe=_0x263f84,_0x454676={'gAYSD':function(_0x413a14,_0x131a7a,_0x12f91b){return _0x413a14(_0x131a7a,_0x12f91b);},'Ipsdj':'SKILL.md','eGuTG':function(_0x339406,_0x19a4f4){return _0x339406(_0x19a4f4);},'gcPLh':'utf-8'};if(!existsSync(_0x766fe5))return[];const _0x5d1b50=[];try{const _0x5d4be8=await _0x454676[_0x4fecbe(0x1c6)](readdir,_0x766fe5,{'withFileTypes':!![]});for(const _0x52c05e of _0x5d4be8){if(_0x52c05e['isDirectory']()){const _0x50b9aa=join(_0x766fe5,_0x52c05e['name'],_0x454676[_0x4fecbe(0x22a)]);if(_0x454676[_0x4fecbe(0x1ca)](existsSync,_0x50b9aa)){let _0x18703b=_0x52c05e[_0x4fecbe(0x1be)];try{const _0x5052a1=await _0x454676['gAYSD'](readFile,_0x50b9aa,_0x454676['gcPLh']),_0x442af6=_0x5052a1['match'](/name:\s*(.+)/);_0x442af6&&(_0x18703b=_0x442af6[0x1]['trim']());}catch{}_0x5d1b50['push']({'name':_0x52c05e[_0x4fecbe(0x1be)],'displayName':_0x18703b,'path':_0x50b9aa,'level':_0x5c1f8e});}}}}catch{return[];}return _0x5d1b50;}async function getInstalledSkills(){const _0x5a1730=_0x263f84,_0x908163={'WjDJV':function(_0x43e361,_0x135639,_0x3ad673){return _0x43e361(_0x135639,_0x3ad673);},'FHACV':function(_0x5b94d5){return _0x5b94d5();},'UtYPf':_0x5a1730(0x1df),'ruHEZ':_0x5a1730(0x1d8)},[_0x3c8a25,_0x1217ac]=await Promise[_0x5a1730(0x1c4)]([_0x908163['WjDJV'](getSkillsFromDir,_0x908163['FHACV'](getProjectSkillsDir),_0x908163[_0x5a1730(0x1d4)]),getSkillsFromDir(getUserSkillsDir(),_0x908163[_0x5a1730(0x1f3)])]);return{'project':_0x3c8a25,'user':_0x1217ac};}async function getEnvironments(){const _0x4a37f1=_0x263f84,_0x4c29ff={'OcJPX':function(_0x554280,_0x39c092,_0x499538){return _0x554280(_0x39c092,_0x499538);},'nwBKk':'auth.json','TzInN':'auth.json.enc','LRvhC':function(_0x4f15dd,_0x4e8069){return _0x4f15dd(_0x4e8069);},'poaZr':function(_0x559d8a,_0x4f9a0d){return _0x559d8a===_0x4f9a0d;},'PUzyk':function(_0x15835d){return _0x15835d();},'iDgEb':function(_0x22ba09,_0x2fd1c1){return _0x22ba09(_0x2fd1c1);}},{envNames:_0x4eaf5a,activeEnv:_0x1121f4}=await _0x4c29ff['PUzyk'](getEnvNames),_0x16fd3f=getRangerDir();if(!_0x4c29ff[_0x4a37f1(0x1c9)](existsSync,_0x16fd3f))return{'envs':[],'activeEnv':null};const _0x4149dd=_0x4eaf5a['map'](_0x360cfd=>{const _0xfbcb18=_0x4a37f1,_0x5bae71=getEnvDir(_0x360cfd),_0xbe455b=join(_0x5bae71,_0xfbcb18(0x21c)),_0x30c11c=_0x4c29ff['OcJPX'](join,_0x5bae71,_0x4c29ff[_0xfbcb18(0x212)]),_0x3e823b=join(_0x5bae71,_0x4c29ff['TzInN']);return{'name':_0x360cfd,'settingsPath':_0x4c29ff['LRvhC'](existsSync,_0xbe455b)?_0xbe455b:'(not\x20found)','hasPlaintextAuth':existsSync(_0x30c11c),'hasEncryptedAuth':existsSync(_0x3e823b),'isActive':_0x4c29ff['poaZr'](_0x360cfd,_0x1121f4)};});return{'envs':_0x4149dd,'activeEnv':_0x1121f4};}export async function status(){const _0x16c63b=_0x263f84,_0x38ba4f={'EoHjq':function(_0x70df7a,_0x1998b5,_0x58412b){return _0x70df7a(_0x1998b5,_0x58412b);},'RbUiM':function(_0x57b3f8,_0x32ab1d){return _0x57b3f8(_0x32ab1d);},'pxSqY':function(_0x10e95,_0x159246){return _0x10e95(_0x159246);},'dKtEG':function(_0xbd4433){return _0xbd4433();},'lFJip':function(_0x52efce){return _0x52efce();},'RsTHP':function(_0x300df6,_0x11a89d){return _0x300df6===_0x11a89d;},'RLQEA':'configured','kNlVC':function(_0x19d337,_0x134d4f){return _0x19d337(_0x134d4f);},'pqLZT':'not_configured','Tlkem':'ranger@trailhead','kDUih':_0x16c63b(0x228),'luAUD':_0x16c63b(0x224),'HrAGK':_0x16c63b(0x1e7),'OPxGD':function(_0x44bf55){return _0x44bf55();},'DWGxC':_0x16c63b(0x1cc),'oLkpY':function(_0x520397,_0x103604){return _0x520397>_0x103604;},'vWeRx':_0x16c63b(0x21f),'CkGix':function(_0x370894,_0x3d463e){return _0x370894(_0x3d463e);},'EaXnc':function(_0x2bca7d,_0x47dd5b){return _0x2bca7d+_0x47dd5b;},'MzSIm':'no\x20session','aDjey':'plaintext','jlZVN':'none','UrOsp':function(_0x44a079,_0x1ee3db){return _0x44a079(_0x1ee3db);},'dcWgA':function(_0x3c47f6,_0x28a48e){return _0x3c47f6!==_0x28a48e;},'Ithxs':_0x16c63b(0x1de)};console['log'](_0x16c63b(0x1d9));const _0x24c58d=process['cwd'](),_0x3ccf9f=getRangerDir();if(!existsSync(_0x3ccf9f)){console[_0x16c63b(0x1da)]('Root:\x20'+_0x38ba4f['EoHjq'](link,_0x24c58d,_0x38ba4f['RbUiM'](bold,_0x38ba4f[_0x16c63b(0x21d)](basename,_0x24c58d)))),console['log']('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log'](_0x16c63b(0x211));return;}console['log'](_0x16c63b(0x222)+link(_0x24c58d,_0x38ba4f[_0x16c63b(0x20c)](bold,_0x38ba4f['RbUiM'](basename,_0x24c58d))));const _0x5f08fa=_0x38ba4f['dKtEG'](getCurrentVersion),_0x2e9479=getLatestVersion();if(_0x2e9479['version']&&_0x2e9479[_0x16c63b(0x21b)]!==_0x5f08fa)console['log']('Version:\x20'+_0x5f08fa+'\x20(latest:\x20'+_0x2e9479['version']+')'),console['log'](_0x16c63b(0x22b));else _0x2e9479[_0x16c63b(0x21b)]?console['log'](_0x16c63b(0x20b)+_0x5f08fa+_0x16c63b(0x1bd)):console[_0x16c63b(0x1da)](_0x16c63b(0x20b)+_0x5f08fa);const _0x4fe4de=await getToken();if(_0x4fe4de){const _0x1ae857=await getCurrentUser(_0x4fe4de);_0x1ae857[_0x16c63b(0x208)]?console['log'](_0x16c63b(0x1bc)+bold(_0x1ae857[_0x16c63b(0x1d8)][_0x16c63b(0x1c7)])):(console[_0x16c63b(0x1da)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log'](_0x16c63b(0x204)));}else console['log'](_0x16c63b(0x1c0)),console['log'](_0x16c63b(0x204));process[_0x16c63b(0x1d2)]['DEBUG']&&(console['log'](_0x16c63b(0x1f6)+getCurrentEnvironment()),console[_0x16c63b(0x1da)](_0x16c63b(0x1d0)+getApiBaseUrl()));console[_0x16c63b(0x1da)]('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x46d178=await _0x38ba4f[_0x16c63b(0x1f4)](getOpencodePluginStatus);if(_0x38ba4f['RsTHP'](_0x46d178['status'],_0x38ba4f['RLQEA']))console['log']('\x20\x20'+_0x38ba4f[_0x16c63b(0x1d5)](bold,_0x16c63b(0x219))+':\x20configured'),_0x46d178['details']&&console[_0x16c63b(0x1da)]('\x20\x20'+_0x46d178['details']);else _0x38ba4f[_0x16c63b(0x1fd)](_0x46d178[_0x16c63b(0x1cf)],_0x38ba4f[_0x16c63b(0x20e)])?(console['log'](_0x16c63b(0x1e3)),_0x46d178['details']&&console['log']('\x20\x20'+_0x46d178['details']),console[_0x16c63b(0x1da)]('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console['log']('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console['log'](_0x16c63b(0x1fc));const _0x37adb5=await getPluginInfo(_0x38ba4f[_0x16c63b(0x1f9)]);if(_0x37adb5){const _0x23af5e=_0x37adb5[_0x16c63b(0x1c1)]||_0x38ba4f[_0x16c63b(0x1e4)],_0x2dbf5f=_0x37adb5['enabled']?_0x16c63b(0x1e9):'disabled';console[_0x16c63b(0x1da)]('\x20\x20'+bold(_0x16c63b(0x215))+_0x16c63b(0x20f)+_0x23af5e+',\x20'+_0x2dbf5f+')');}else console['log']('\x20\x20Not\x20installed'),console[_0x16c63b(0x1da)](_0x38ba4f[_0x16c63b(0x1f5)]);console[_0x16c63b(0x1da)](_0x38ba4f[_0x16c63b(0x21e)]);const {project:_0x6ffff6,user:_0xa9991f}=await _0x38ba4f[_0x16c63b(0x1d1)](getInstalledSkills),_0xd8fd77=_0x6ffff6['filter'](_0x22fb9e=>RANGER_MANAGED_SKILLS[_0x16c63b(0x1d6)](_0x22fb9e[_0x16c63b(0x1be)])),_0xa2a411=_0xa9991f['filter'](_0x247ace=>RANGER_MANAGED_SKILLS['includes'](_0x247ace['name'])),_0x531a41=_0xd8fd77['length']+_0xa2a411['length'];if(_0x531a41===0x0)console[_0x16c63b(0x1da)](_0x38ba4f['DWGxC']),console['log'](_0x16c63b(0x22c));else{if(_0x38ba4f['oLkpY'](_0xd8fd77[_0x16c63b(0x206)],0x0)){console['log']('\x20\x20Project-level:');for(const _0x59687b of _0xd8fd77){console[_0x16c63b(0x1da)](_0x16c63b(0x1d3)+bold(_0x59687b['displayName'])+':\x20'+link(_0x59687b[_0x16c63b(0x1e1)],basename(_0x59687b['path'])));}}if(_0xa2a411['length']>0x0){console[_0x16c63b(0x1da)](_0x38ba4f[_0x16c63b(0x1f8)]);for(const _0x249cd7 of _0xa2a411){console[_0x16c63b(0x1da)](_0x16c63b(0x1d3)+bold(_0x249cd7['displayName'])+':\x20'+_0x38ba4f['EoHjq'](link,_0x249cd7[_0x16c63b(0x1e1)],_0x38ba4f[_0x16c63b(0x1d7)](basename,_0x249cd7['path'])));}}}console[_0x16c63b(0x1da)]('\x0a---\x20Profiles\x20---');const {envs:_0x280cda,activeEnv:_0x13cc10}=await getEnvironments();let _0x1cfd13=[];if(_0x4fe4de)try{_0x1cfd13=await _0x38ba4f[_0x16c63b(0x1f4)](listCloudProfiles);}catch{}const _0x55405b=_0x38ba4f['EaXnc'](_0x280cda['length'],_0x1cfd13[_0x16c63b(0x206)]);if(_0x55405b===0x0)console['log']('No\x20profiles\x20configured'),console[_0x16c63b(0x1da)](_0x16c63b(0x1c5));else{if(_0x55405b>0x5){const _0x56ed1c=[];_0x1cfd13['length']>0x0&&_0x56ed1c['push'](_0x1cfd13[_0x16c63b(0x206)]+_0x16c63b(0x223)),_0x280cda[_0x16c63b(0x206)]>0x0&&_0x56ed1c[_0x16c63b(0x1ea)](_0x280cda[_0x16c63b(0x206)]+_0x16c63b(0x1f1)),console[_0x16c63b(0x1da)](_0x55405b+'\x20profiles\x20configured\x20('+_0x56ed1c[_0x16c63b(0x225)](',\x20')+')'),_0x13cc10&&console[_0x16c63b(0x1da)](_0x16c63b(0x1bb)+_0x38ba4f['RbUiM'](bold,_0x13cc10)),console['log'](_0x16c63b(0x1eb));}else{for(const _0x4d8bca of _0x1cfd13){const _0x4bdffc=_0x38ba4f[_0x16c63b(0x1fd)](_0x4d8bca[_0x16c63b(0x1be)],_0x13cc10)?_0x16c63b(0x1cb):'';console['log']('\x20\x20'+bold(_0x4d8bca['name'])+'\x20[cloud]'+_0x4bdffc);const _0xfd916=_0x4d8bca[_0x16c63b(0x1db)]?_0x16c63b(0x214)+_0x4d8bca['sessionUpdatedAt']+')':_0x38ba4f[_0x16c63b(0x21a)];console['log'](_0x16c63b(0x1ed)+_0xfd916);}const _0x517ab9=new Set(_0x1cfd13['map'](_0x1e6538=>_0x1e6538['name']));for(const _0x42df72 of _0x280cda){if(_0x517ab9[_0x16c63b(0x220)](_0x42df72[_0x16c63b(0x1be)]))continue;const _0x4a4669=_0x42df72[_0x16c63b(0x1e2)]?'\x20(active)':'',_0x53a712=_0x42df72['hasEncryptedAuth']?'encrypted':_0x42df72[_0x16c63b(0x1ee)]?_0x38ba4f[_0x16c63b(0x1b9)]:_0x38ba4f[_0x16c63b(0x1e0)];console['log']('\x20\x20'+_0x38ba4f[_0x16c63b(0x20d)](bold,_0x42df72['name'])+_0x16c63b(0x1e5)+_0x4a4669),console[_0x16c63b(0x1da)]('\x20\x20\x20\x20Auth:\x20'+_0x53a712),_0x38ba4f[_0x16c63b(0x1fb)](_0x42df72[_0x16c63b(0x207)],_0x38ba4f[_0x16c63b(0x1e6)])&&console['log'](_0x16c63b(0x203)+link(_0x42df72['settingsPath'],_0x38ba4f[_0x16c63b(0x21d)](basename,_0x42df72['settingsPath'])));}if(!_0x13cc10){console['log'](_0x16c63b(0x201));const _0x32c67f=[..._0x1cfd13['map'](_0x3c5840=>_0x3c5840[_0x16c63b(0x1be)]),..._0x280cda[_0x16c63b(0x216)](_0x47f33c=>!_0x517ab9[_0x16c63b(0x220)](_0x47f33c[_0x16c63b(0x1be)]))[_0x16c63b(0x1f7)](_0x4af643=>_0x4af643[_0x16c63b(0x1be)])];console[_0x16c63b(0x1da)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x32c67f['join'](',\x20')+')');}}}console[_0x16c63b(0x1da)]('');}
1
+ const _0x3a3058=_0x2e98;(function(_0x3d395d,_0x5cd112){const _0x5afadf=_0x2e98,_0x5f1396=_0x3d395d();while(!![]){try{const _0x43e96f=parseInt(_0x5afadf(0x196))/0x1*(parseInt(_0x5afadf(0x164))/0x2)+-parseInt(_0x5afadf(0x18c))/0x3*(parseInt(_0x5afadf(0x199))/0x4)+parseInt(_0x5afadf(0x17a))/0x5+parseInt(_0x5afadf(0x186))/0x6*(-parseInt(_0x5afadf(0x1a0))/0x7)+-parseInt(_0x5afadf(0x1b4))/0x8+parseInt(_0x5afadf(0x188))/0x9+parseInt(_0x5afadf(0x1a6))/0xa;if(_0x43e96f===_0x5cd112)break;else _0x5f1396['push'](_0x5f1396['shift']());}catch(_0x53b043){_0x5f1396['push'](_0x5f1396['shift']());}}}(_0x4294,0xddcc6));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';function _0x2e98(_0x5372eb,_0x58a32e){_0x5372eb=_0x5372eb-0x15b;const _0x429482=_0x4294();let _0x2e98bc=_0x429482[_0x5372eb];return _0x2e98bc;}import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{listCloudProfiles}from'./utils/cloudProfile.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x301b09=>_0x3a3058(0x173)+_0x301b09+'\x1b[0m',link=(_0x531b31,_0x47c102)=>_0x3a3058(0x17e)+_0x531b31+'\x07'+(_0x47c102||_0x531b31)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x215e58=_0x3a3058,_0x43a59e={'ntEJJ':function(_0xc7a3d5,_0x5b5c0b){return _0xc7a3d5(_0x5b5c0b);},'MsopP':'not_installed','UPwYu':_0x215e58(0x190),'VqRDy':function(_0x20ca99,_0x63542b){return _0x20ca99!==_0x63542b;},'NBSvH':'@ranger-testing/opencode-plugin','cOoVQ':_0x215e58(0x19b),'KCUGE':function(_0x74a646,_0x5ec132,_0x2dd5cc,_0x13c476){return _0x74a646(_0x5ec132,_0x2dd5cc,_0x13c476);},'mmope':_0x215e58(0x161),'spcNb':_0x215e58(0x193),'EsRKv':_0x215e58(0x15f),'YvCTC':_0x215e58(0x15d)};return new Promise(_0x382981=>{const _0x1026e5=_0x215e58,_0x5ae149={'IThjb':function(_0x1c96a0,_0x94516d){return _0x43a59e['VqRDy'](_0x1c96a0,_0x94516d);},'wGWVD':'string','kzPQt':_0x43a59e['NBSvH'],'BhnPp':_0x43a59e['cOoVQ']},_0x2716ff=_0x43a59e['KCUGE'](spawn,_0x43a59e['mmope'],[_0x1026e5(0x1a3),'config'],{'stdio':['ignore','pipe',_0x1026e5(0x17c)]});let _0x132365='';_0x2716ff['stdout']?.['on'](_0x43a59e['spcNb'],_0x4f5567=>{const _0x31f543=_0x1026e5;_0x132365+=_0x4f5567[_0x31f543(0x160)]();}),_0x2716ff[_0x1026e5(0x19a)]?.['on'](_0x43a59e['spcNb'],_0x8ac610=>{const _0x3bab16=_0x1026e5;_0x132365+=_0x8ac610[_0x3bab16(0x160)]();}),_0x2716ff['on'](_0x43a59e[_0x1026e5(0x19e)],()=>{const _0x2934b8=_0x1026e5;_0x43a59e[_0x2934b8(0x1b7)](_0x382981,{'status':_0x43a59e[_0x2934b8(0x1ae)]});}),_0x2716ff['on'](_0x43a59e[_0x1026e5(0x19f)],_0x3efd02=>{const _0x5c3d35=_0x1026e5;if(_0x3efd02!==0x0){_0x382981({'status':_0x5c3d35(0x1c5)});return;}const _0x5dbb5c=_0x132365[_0x5c3d35(0x1c6)]();let _0x571b2b=null;if(_0x5dbb5c)try{_0x571b2b=JSON[_0x5c3d35(0x1b9)](_0x5dbb5c);}catch{const _0x2d20f6=_0x5dbb5c[_0x5c3d35(0x1ba)](/\{[\s\S]*\}$/);if(_0x2d20f6)try{_0x571b2b=JSON['parse'](_0x2d20f6[0x0]);}catch{_0x571b2b=null;}}const _0x50d06d=Array['isArray'](_0x571b2b?.['plugin'])?_0x571b2b?.[_0x5c3d35(0x177)]:[],_0x4f9793=_0x50d06d[_0x5c3d35(0x162)](_0x531bc6=>{const _0x3f7b5d=_0x5c3d35;if(_0x5ae149[_0x3f7b5d(0x1a5)](typeof _0x531bc6,_0x5ae149['wGWVD']))return![];return _0x531bc6['includes'](_0x5ae149[_0x3f7b5d(0x165)])||_0x531bc6['includes'](_0x5ae149['BhnPp']);});if(_0x4f9793){_0x43a59e[_0x5c3d35(0x1b7)](_0x382981,{'status':'configured','details':_0x50d06d['length']>0x0?_0x50d06d[_0x5c3d35(0x175)]+_0x5c3d35(0x179):undefined});return;}if(_0x50d06d['length']>0x0){_0x43a59e[_0x5c3d35(0x1b7)](_0x382981,{'status':_0x43a59e[_0x5c3d35(0x168)],'details':_0x50d06d['length']+_0x5c3d35(0x179)});return;}_0x43a59e[_0x5c3d35(0x1b7)](_0x382981,{'status':_0x43a59e[_0x5c3d35(0x168)]});});});}async function getSkillsFromDir(_0x4e4690,_0x46874f){const _0x1dfce4=_0x3a3058,_0x532854={'nfshJ':function(_0x916e9e,_0x27e010,_0x2b3a11){return _0x916e9e(_0x27e010,_0x2b3a11);},'MXnsT':_0x1dfce4(0x1ab),'NzQpu':'utf-8'};if(!existsSync(_0x4e4690))return[];const _0x4dfe60=[];try{const _0x498dfe=await _0x532854[_0x1dfce4(0x18d)](readdir,_0x4e4690,{'withFileTypes':!![]});for(const _0x1e5004 of _0x498dfe){if(_0x1e5004[_0x1dfce4(0x16a)]()){const _0x394b22=join(_0x4e4690,_0x1e5004['name'],_0x532854['MXnsT']);if(existsSync(_0x394b22)){let _0x40078c=_0x1e5004[_0x1dfce4(0x172)];try{const _0xe17d56=await readFile(_0x394b22,_0x532854['NzQpu']),_0x544fa7=_0xe17d56[_0x1dfce4(0x1ba)](/name:\s*(.+)/);_0x544fa7&&(_0x40078c=_0x544fa7[0x1][_0x1dfce4(0x1c6)]());}catch{}_0x4dfe60['push']({'name':_0x1e5004[_0x1dfce4(0x172)],'displayName':_0x40078c,'path':_0x394b22,'level':_0x46874f});}}}}catch{return[];}return _0x4dfe60;}function _0x4294(){const _0x9900a6=['error','toString','opencode','some','ZyCxy','26eIBqmh','kzPQt','includes','bXhGk','UPwYu','details','isDirectory','project','fOgDg','\x20\x20\x20\x20Auth:\x20','auth.json.enc','sessionUpdatedAt','configured','path','name','\x1b[1m','env','length','dudip','plugin','No\x20profiles\x20configured','\x20plugin(s)\x20configured','2434425jOhGzH','imBuV','pipe','Root:\x20','\x1b]8;;file://','no\x20session','cached\x20(updated\x20','Jotdc','\x20\x20Run:\x20ranger\x20setup\x20--opencode','none','has','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','480372VkUJta','\x20\x20Active:\x20','2433861wQNJzP','isActive','qTTNz','Version:\x20','6BwnaqP','nfshJ','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','\x0a📊\x20Ranger\x20Status\x0a','not_configured','\x20(active)','MzHZN','data','\x20(up\x20to\x20date)','\x0a---\x20Skills\x20---','104074PSPsCQ','saSAl','\x20cloud','496004xEREAq','stderr','opencode-plugin','gJfmQ','YyEFY','EsRKv','YvCTC','119eDxwEh','pCSpm','wVUWg','debug','hpmta','IThjb','18534300FEhsYI','user','\x20\x20\x20\x20','hasPlaintextAuth','organizationName','SKILL.md','displayName','yJDtJ','MsopP','\x20\x20Project-level:','enabled','DjNDo','filter','KfTZp','11569312WWRBUR','\x20\x20\x20\x20Session:\x20',':\x20installed\x20(','ntEJJ','join','parse','match','success','HugxX','log','DEBUG','API\x20Token:\x20✗\x20Not\x20found','\x20\x20\x20\x20Settings:\x20','Uwjmi','\x0a\x20\x20No\x20active\x20profile\x20set','encrypted','status','not_installed','trim','\x20\x20Not\x20installed','(not\x20found)','close','map'];_0x4294=function(){return _0x9900a6;};return _0x4294();}async function getInstalledSkills(){const _0x4463d3=_0x3a3058,_0x1efabe={'Uwjmi':function(_0x552561,_0x35df56,_0x48043f){return _0x552561(_0x35df56,_0x48043f);},'BXjiN':_0x4463d3(0x16b),'yJDtJ':'user'},[_0x2e5c8b,_0x2d307e]=await Promise['all']([_0x1efabe[_0x4463d3(0x1c1)](getSkillsFromDir,getProjectSkillsDir(),_0x1efabe['BXjiN']),getSkillsFromDir(getUserSkillsDir(),_0x1efabe[_0x4463d3(0x1ad)])]);return{'project':_0x2e5c8b,'user':_0x2d307e};}async function getEnvironments(){const _0x107dbe=_0x3a3058,_0x5e9071={'HugxX':function(_0x204259,_0x5bbf21){return _0x204259(_0x5bbf21);},'bXhGk':'settings.json','NDmUK':_0x107dbe(0x16e),'wVUWg':_0x107dbe(0x15c),'AlsNr':function(_0x77a031){return _0x77a031();},'YYcXA':function(_0x2f4ec5,_0x3681f3){return _0x2f4ec5(_0x3681f3);}},{envNames:_0x1a65d0,activeEnv:_0x58d57e}=await _0x5e9071['AlsNr'](getEnvNames),_0x23c28b=_0x5e9071['AlsNr'](getRangerDir);if(!_0x5e9071['YYcXA'](existsSync,_0x23c28b))return{'envs':[],'activeEnv':null};const _0x1450c5=_0x1a65d0['map'](_0x6eaca6=>{const _0x5b3580=_0x107dbe,_0x5bd47f=_0x5e9071[_0x5b3580(0x1bc)](getEnvDir,_0x6eaca6),_0x146633=join(_0x5bd47f,_0x5e9071[_0x5b3580(0x167)]),_0x14320d=join(_0x5bd47f,'auth.json'),_0x4ac7b5=join(_0x5bd47f,_0x5e9071['NDmUK']);return{'name':_0x6eaca6,'settingsPath':existsSync(_0x146633)?_0x146633:_0x5e9071[_0x5b3580(0x1a2)],'hasPlaintextAuth':_0x5e9071['HugxX'](existsSync,_0x14320d),'hasEncryptedAuth':_0x5e9071[_0x5b3580(0x1bc)](existsSync,_0x4ac7b5),'isActive':_0x6eaca6===_0x58d57e};});return{'envs':_0x1450c5,'activeEnv':_0x58d57e};}export async function status(){const _0x5b6f4b=_0x3a3058,_0x2a5e02={'fOgDg':_0x5b6f4b(0x18f),'hpmta':function(_0x30e515,_0x527d19,_0x2d3bc5){return _0x30e515(_0x527d19,_0x2d3bc5);},'gJfmQ':function(_0x2a80cf,_0x278994){return _0x2a80cf(_0x278994);},'HEuIO':function(_0x1647c1){return _0x1647c1();},'YyEFY':function(_0x5b27d6,_0x135750){return _0x5b27d6!==_0x135750;},'ZDlmb':function(_0x5dfb87){return _0x5dfb87();},'imBuV':function(_0x5e871f){return _0x5e871f();},'saSAl':function(_0x21c4ce,_0x337e61){return _0x21c4ce===_0x337e61;},'AdXTo':'\x20\x20Not\x20configured','XoJnw':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','pCSpm':function(_0x17e9bb,_0x5746b){return _0x17e9bb(_0x5746b);},'sLQlO':'unknown','duIaf':'ranger@trailhead','ZyCxy':_0x5b6f4b(0x15b),'mUpRl':_0x5b6f4b(0x18e),'nAqKl':function(_0x21d4b2,_0x2440d0){return _0x21d4b2===_0x2440d0;},'Rvnzl':'No\x20skills\x20installed','DjNDo':function(_0x2758a3,_0x1cc9f7){return _0x2758a3>_0x1cc9f7;},'qTTNz':_0x5b6f4b(0x1af),'PCAoc':function(_0x413484,_0x502bc3,_0x4a4419){return _0x413484(_0x502bc3,_0x4a4419);},'Jotdc':'\x0a---\x20Profiles\x20---','xIlyZ':function(_0x5f0c48,_0x82aace){return _0x5f0c48(_0x82aace);},'KfTZp':_0x5b6f4b(0x191),'dudip':function(_0x5b5bfc,_0x5273f7){return _0x5b5bfc(_0x5273f7);},'MzHZN':'plaintext','ZcmeC':_0x5b6f4b(0x183),'xdWON':'(not\x20found)'};console[_0x5b6f4b(0x1bd)](_0x2a5e02[_0x5b6f4b(0x16c)]);const _0x558381=process['cwd'](),_0x211624=getRangerDir();if(!existsSync(_0x211624)){console[_0x5b6f4b(0x1bd)](_0x5b6f4b(0x17d)+_0x2a5e02[_0x5b6f4b(0x1a4)](link,_0x558381,bold(basename(_0x558381)))),console['log'](_0x5b6f4b(0x185)),console[_0x5b6f4b(0x1bd)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x5b6f4b(0x1bd)]('Root:\x20'+link(_0x558381,_0x2a5e02[_0x5b6f4b(0x19c)](bold,basename(_0x558381))));const _0x32d042=getCurrentVersion(),_0x666935=_0x2a5e02['HEuIO'](getLatestVersion);if(_0x666935['version']&&_0x2a5e02['YyEFY'](_0x666935['version'],_0x32d042))console[_0x5b6f4b(0x1bd)]('Version:\x20'+_0x32d042+'\x20(latest:\x20'+_0x666935['version']+')'),console[_0x5b6f4b(0x1bd)]('\x20\x20Run:\x20ranger\x20update');else _0x666935['version']?console[_0x5b6f4b(0x1bd)]('Version:\x20'+_0x32d042+_0x5b6f4b(0x194)):console[_0x5b6f4b(0x1bd)](_0x5b6f4b(0x18b)+_0x32d042);const _0x26feb1=await getToken();if(_0x26feb1){const _0x156ae0=await getCurrentUser(_0x26feb1);_0x156ae0[_0x5b6f4b(0x1bb)]?console[_0x5b6f4b(0x1bd)]('Organization:\x20'+bold(_0x156ae0[_0x5b6f4b(0x1a7)][_0x5b6f4b(0x1aa)])):(console[_0x5b6f4b(0x1bd)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x5b6f4b(0x1bd)](_0x5b6f4b(0x1bf)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x5b6f4b(0x174)][_0x5b6f4b(0x1be)]&&(console['log']('API\x20Environment:\x20'+_0x2a5e02['ZDlmb'](getCurrentEnvironment)),console[_0x5b6f4b(0x1bd)]('API\x20URL:\x20'+_0x2a5e02[_0x5b6f4b(0x17b)](getApiBaseUrl)));console['log']('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x56f273=await _0x2a5e02['ZDlmb'](getOpencodePluginStatus);if(_0x2a5e02[_0x5b6f4b(0x197)](_0x56f273[_0x5b6f4b(0x1c4)],_0x5b6f4b(0x170)))console[_0x5b6f4b(0x1bd)]('\x20\x20'+bold('@ranger-testing/opencode-plugin')+':\x20configured'),_0x56f273['details']&&console['log']('\x20\x20'+_0x56f273['details']);else _0x56f273[_0x5b6f4b(0x1c4)]===_0x5b6f4b(0x190)?(console[_0x5b6f4b(0x1bd)](_0x2a5e02['AdXTo']),_0x56f273['details']&&console[_0x5b6f4b(0x1bd)]('\x20\x20'+_0x56f273[_0x5b6f4b(0x169)]),console['log'](_0x5b6f4b(0x182))):console['log'](_0x2a5e02['XoJnw']);console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x3f9b24=await _0x2a5e02[_0x5b6f4b(0x1a1)](getPluginInfo,'ranger@trailhead');if(_0x3f9b24){const _0x3f8f1d=_0x3f9b24['scope']||_0x2a5e02['sLQlO'],_0x32e31f=_0x3f9b24[_0x5b6f4b(0x1b0)]?_0x5b6f4b(0x1b0):'disabled';console[_0x5b6f4b(0x1bd)]('\x20\x20'+bold(_0x2a5e02['duIaf'])+_0x5b6f4b(0x1b6)+_0x3f8f1d+',\x20'+_0x32e31f+')');}else console[_0x5b6f4b(0x1bd)](_0x2a5e02[_0x5b6f4b(0x163)]),console['log'](_0x2a5e02['mUpRl']);console[_0x5b6f4b(0x1bd)](_0x5b6f4b(0x195));const {project:_0x5b71e1,user:_0x4310dd}=await getInstalledSkills(),_0x1caa0b=_0x5b71e1[_0x5b6f4b(0x1b2)](_0x212aec=>RANGER_MANAGED_SKILLS[_0x5b6f4b(0x166)](_0x212aec[_0x5b6f4b(0x172)])),_0x520f63=_0x4310dd['filter'](_0x568e4f=>RANGER_MANAGED_SKILLS[_0x5b6f4b(0x166)](_0x568e4f['name'])),_0x1aabba=_0x1caa0b['length']+_0x520f63[_0x5b6f4b(0x175)];if(_0x2a5e02['nAqKl'](_0x1aabba,0x0))console['log'](_0x2a5e02['Rvnzl']),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x2a5e02[_0x5b6f4b(0x1b1)](_0x1caa0b[_0x5b6f4b(0x175)],0x0)){console[_0x5b6f4b(0x1bd)](_0x2a5e02[_0x5b6f4b(0x18a)]);for(const _0x4b371c of _0x1caa0b){console[_0x5b6f4b(0x1bd)](_0x5b6f4b(0x1a8)+_0x2a5e02['gJfmQ'](bold,_0x4b371c[_0x5b6f4b(0x1ac)])+':\x20'+link(_0x4b371c[_0x5b6f4b(0x171)],basename(_0x4b371c[_0x5b6f4b(0x171)])));}}if(_0x520f63['length']>0x0){console['log']('\x20\x20User-level:');for(const _0x2a0478 of _0x520f63){console[_0x5b6f4b(0x1bd)]('\x20\x20\x20\x20'+_0x2a5e02[_0x5b6f4b(0x1a1)](bold,_0x2a0478['displayName'])+':\x20'+_0x2a5e02['PCAoc'](link,_0x2a0478[_0x5b6f4b(0x171)],basename(_0x2a0478[_0x5b6f4b(0x171)])));}}}console['log'](_0x2a5e02[_0x5b6f4b(0x181)]);const {envs:_0x18fba0,activeEnv:_0x485547}=await getEnvironments();let _0x2ef6f1=[];if(_0x26feb1)try{_0x2ef6f1=await _0x2a5e02['HEuIO'](listCloudProfiles);}catch{}const _0xc301d=_0x18fba0[_0x5b6f4b(0x175)]+_0x2ef6f1['length'];if(_0xc301d===0x0)console[_0x5b6f4b(0x1bd)](_0x5b6f4b(0x178)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{if(_0x2a5e02['DjNDo'](_0xc301d,0x5)){const _0x55689f=[];_0x2a5e02['DjNDo'](_0x2ef6f1['length'],0x0)&&_0x55689f['push'](_0x2ef6f1[_0x5b6f4b(0x175)]+_0x5b6f4b(0x198)),_0x2a5e02['DjNDo'](_0x18fba0[_0x5b6f4b(0x175)],0x0)&&_0x55689f['push'](_0x18fba0[_0x5b6f4b(0x175)]+'\x20local'),console['log'](_0xc301d+'\x20profiles\x20configured\x20('+_0x55689f[_0x5b6f4b(0x1b8)](',\x20')+')'),_0x485547&&console['log'](_0x5b6f4b(0x187)+_0x2a5e02['xIlyZ'](bold,_0x485547)),console[_0x5b6f4b(0x1bd)]('\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)');}else{for(const _0x4222ce of _0x2ef6f1){const _0x16d3ab=_0x4222ce['name']===_0x485547?_0x2a5e02[_0x5b6f4b(0x1b3)]:'';console['log']('\x20\x20'+_0x2a5e02[_0x5b6f4b(0x176)](bold,_0x4222ce['name'])+'\x20[cloud]'+_0x16d3ab);const _0x2ba5b3=_0x4222ce['sessionUpdatedAt']?_0x5b6f4b(0x180)+_0x4222ce[_0x5b6f4b(0x16f)]+')':_0x5b6f4b(0x17f);console[_0x5b6f4b(0x1bd)](_0x5b6f4b(0x1b5)+_0x2ba5b3);}const _0x4b9a46=new Set(_0x2ef6f1[_0x5b6f4b(0x15e)](_0x2795f7=>_0x2795f7[_0x5b6f4b(0x172)]));for(const _0x15fbd5 of _0x18fba0){if(_0x4b9a46['has'](_0x15fbd5[_0x5b6f4b(0x172)]))continue;const _0x6363ae=_0x15fbd5[_0x5b6f4b(0x189)]?_0x2a5e02['KfTZp']:'',_0x12dee4=_0x15fbd5['hasEncryptedAuth']?_0x5b6f4b(0x1c3):_0x15fbd5[_0x5b6f4b(0x1a9)]?_0x2a5e02[_0x5b6f4b(0x192)]:_0x2a5e02['ZcmeC'];console[_0x5b6f4b(0x1bd)]('\x20\x20'+bold(_0x15fbd5[_0x5b6f4b(0x172)])+'\x20[local]'+_0x6363ae),console[_0x5b6f4b(0x1bd)](_0x5b6f4b(0x16d)+_0x12dee4),_0x2a5e02[_0x5b6f4b(0x19d)](_0x15fbd5['settingsPath'],_0x2a5e02['xdWON'])&&console['log'](_0x5b6f4b(0x1c0)+_0x2a5e02[_0x5b6f4b(0x1a4)](link,_0x15fbd5['settingsPath'],basename(_0x15fbd5['settingsPath'])));}if(!_0x485547){console['log'](_0x5b6f4b(0x1c2));const _0x35d8dc=[..._0x2ef6f1[_0x5b6f4b(0x15e)](_0x3ec85e=>_0x3ec85e[_0x5b6f4b(0x172)]),..._0x18fba0['filter'](_0x29a4d1=>!_0x4b9a46[_0x5b6f4b(0x184)](_0x29a4d1['name']))['map'](_0x3193af=>_0x3193af['name'])];console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x35d8dc[_0x5b6f4b(0x1b8)](',\x20')+')');}}}console[_0x5b6f4b(0x1bd)]('');}