@ranger-testing/ranger-cli 3.1.3-alpha.e1ca941-42 → 3.1.4-alpha.96fdd81-47

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 (86) 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/scenarioOriginCheck.js +1 -0
  71. package/build/commands/utils/sessionCache.js +1 -1
  72. package/build/commands/utils/settings.js +1 -1
  73. package/build/commands/utils/skillContent.js +1 -1
  74. package/build/commands/utils/skills.js +1 -1
  75. package/build/commands/utils/stitchWebmFiles.js +1 -1
  76. package/build/commands/utils/telemetry.js +1 -1
  77. package/build/commands/utils/tokenRefresh.js +1 -1
  78. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  79. package/build/commands/utils/tunnelClient.js +1 -1
  80. package/build/commands/utils/userApi.js +1 -1
  81. package/build/commands/utils/version.js +1 -1
  82. package/build/commands/verifyFeature.js +1 -1
  83. package/build/commands/verifyFeatureCli.js +1 -1
  84. package/build/commands/verifyFeatureNovaCli.js +1 -1
  85. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  86. package/package.json +3 -2
@@ -1 +1 @@
1
- (function(_0x2e49b8,_0x593794){const _0x5793ed=_0x2919,_0x27913b=_0x2e49b8();while(!![]){try{const _0x124cd1=parseInt(_0x5793ed(0xc1))/0x1*(parseInt(_0x5793ed(0xb9))/0x2)+parseInt(_0x5793ed(0xbf))/0x3*(parseInt(_0x5793ed(0xbc))/0x4)+parseInt(_0x5793ed(0xc2))/0x5*(parseInt(_0x5793ed(0xb8))/0x6)+-parseInt(_0x5793ed(0xc5))/0x7*(parseInt(_0x5793ed(0xc6))/0x8)+parseInt(_0x5793ed(0xbd))/0x9+parseInt(_0x5793ed(0xba))/0xa+-parseInt(_0x5793ed(0xbb))/0xb;if(_0x124cd1===_0x593794)break;else _0x27913b['push'](_0x27913b['shift']());}catch(_0x311b86){_0x27913b['push'](_0x27913b['shift']());}}}(_0x1f5f,0xcfa2c));function _0x1f5f(){const _0x1b0154=['4SxRcMt','13544973XpXGMv','\x0a✅\x20API\x20key\x20stored\x20successfully','14199hQqiCB','VfHsH','2qjbsOp','5rTzlpL','log','\x0a✅\x20Logged\x20in\x20to\x20','596106UdSfsN','48bnPpog','ANasI','7929498hUHBbP','993272uDbtaO','12752980PDZRlV','41123049gwRVfw'];_0x1f5f=function(){return _0x1b0154;};return _0x1f5f();}import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x2919(_0x5b41f3,_0x18ae64){_0x5b41f3=_0x5b41f3-0xb8;const _0x1f5ff5=_0x1f5f();let _0x2919b2=_0x1f5ff5[_0x5b41f3];return _0x2919b2;}import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0x2890ba=_0x2919,_0x3f1386={'qpClf':function(_0x1f64aa){return _0x1f64aa();},'ANasI':'Re-authenticating\x20via\x20MCP\x20bootstrap...','rYaIt':function(_0x234cb3){return _0x234cb3();},'VfHsH':function(_0x1abbf5,_0x40d162){return _0x1abbf5(_0x40d162);},'bEubQ':function(_0x3e08f6,_0x106ede){return _0x3e08f6 instanceof _0x106ede;}},_0x166c86=await _0x3f1386['qpClf'](getMcpAuthOrigin);if(_0x166c86){console['log'](_0x3f1386[_0x2890ba(0xc7)]),await _0x3f1386['rYaIt'](mcpBootstrap);return;}if(!isInteractive())throw new Error('Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.');try{const _0x4320d7=await runDeviceAuthFlow(),_0x47327f=await _0x3f1386[_0x2890ba(0xc0)](getCurrentUser,_0x4320d7);_0x47327f['success']?console['log'](_0x2890ba(0xc4)+_0x47327f['user']['organizationName']):console[_0x2890ba(0xc3)](_0x2890ba(0xbe));}catch(_0xc3e824){throw new Error('Login\x20failed:\x20'+(_0x3f1386['bEubQ'](_0xc3e824,Error)?_0xc3e824['message']:_0xc3e824));}}
1
+ (function(_0x2aab62,_0x3b3ee3){const _0xd5c760=_0x3e21,_0x1c280e=_0x2aab62();while(!![]){try{const _0x2ccb4c=parseInt(_0xd5c760(0x105))/0x1*(-parseInt(_0xd5c760(0x10a))/0x2)+parseInt(_0xd5c760(0x10b))/0x3*(-parseInt(_0xd5c760(0x10d))/0x4)+parseInt(_0xd5c760(0x106))/0x5+-parseInt(_0xd5c760(0x10e))/0x6*(parseInt(_0xd5c760(0x112))/0x7)+-parseInt(_0xd5c760(0x103))/0x8+-parseInt(_0xd5c760(0x111))/0x9*(-parseInt(_0xd5c760(0x108))/0xa)+parseInt(_0xd5c760(0xfd))/0xb*(parseInt(_0xd5c760(0x107))/0xc);if(_0x2ccb4c===_0x3b3ee3)break;else _0x1c280e['push'](_0x1c280e['shift']());}catch(_0x3c20c7){_0x1c280e['push'](_0x1c280e['shift']());}}}(_0x10b3,0xf3c3e));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x3e21(_0x42b3c1,_0x4cb90d){_0x42b3c1=_0x42b3c1-0xfd;const _0x10b30b=_0x10b3();let _0x3e219c=_0x10b30b[_0x42b3c1];return _0x3e219c;}function _0x10b3(){const _0x484400=['log','NlkBx','11335392pZXPyR','\x0a✅\x20API\x20key\x20stored\x20successfully','325aIukOg','9674335ISzqhF','1440996flgeGK','70JCUDwy','UiIKl','7610fYmNdg','7785yJMjcu','Re-authenticating\x20via\x20MCP\x20bootstrap...','1756SiJiEi','167142eoTbKK','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','organizationName','1535643GseEYk','35YpPJdQ','165vHDItL','Login\x20failed:\x20','message','hgwlX'];_0x10b3=function(){return _0x484400;};return _0x10b3();}import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0x3b7c54=_0x3e21,_0x3c6c90={'dMuxS':function(_0x3c74b2){return _0x3c74b2();},'UiIKl':_0x3b7c54(0x10c),'hgwlX':function(_0x54114a){return _0x54114a();},'HASmK':function(_0x14e7f5){return _0x14e7f5();},'NlkBx':function(_0x7c2172,_0x32e611){return _0x7c2172 instanceof _0x32e611;}},_0x278ca7=await _0x3c6c90['dMuxS'](getMcpAuthOrigin);if(_0x278ca7){console[_0x3b7c54(0x101)](_0x3c6c90[_0x3b7c54(0x109)]),await _0x3c6c90[_0x3b7c54(0x100)](mcpBootstrap);return;}if(!_0x3c6c90['HASmK'](isInteractive))throw new Error(_0x3b7c54(0x10f));try{const _0x1df2cf=await runDeviceAuthFlow(),_0x574a9c=await getCurrentUser(_0x1df2cf);_0x574a9c['success']?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x574a9c['user'][_0x3b7c54(0x110)]):console[_0x3b7c54(0x101)](_0x3b7c54(0x104));}catch(_0x3b80c1){throw new Error(_0x3b7c54(0xfe)+(_0x3c6c90[_0x3b7c54(0x102)](_0x3b80c1,Error)?_0x3b80c1[_0x3b7c54(0xff)]:_0x3b80c1));}}
@@ -1 +1 @@
1
- const _0x3e5f9f=_0x4f7e;(function(_0xf561c7,_0x22e5ef){const _0x589946=_0x4f7e,_0x4bb780=_0xf561c7();while(!![]){try{const _0x2801ff=-parseInt(_0x589946(0x1bd))/0x1+-parseInt(_0x589946(0x1fe))/0x2+parseInt(_0x589946(0x232))/0x3*(parseInt(_0x589946(0x201))/0x4)+-parseInt(_0x589946(0x235))/0x5+-parseInt(_0x589946(0x1ec))/0x6+parseInt(_0x589946(0x20e))/0x7+parseInt(_0x589946(0x222))/0x8;if(_0x2801ff===_0x22e5ef)break;else _0x4bb780['push'](_0x4bb780['shift']());}catch(_0x144566){_0x4bb780['push'](_0x4bb780['shift']());}}}(_0x402d,0x9e9a3));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(),_0x3e5f9f(0x228),_0x3e5f9f(0x1eb)),AUTH_ORIGIN_PATH=join(homedir(),'.ranger','auth-origin.txt');function _0x4f7e(_0x51ec39,_0x22c921){_0x51ec39=_0x51ec39-0x1bd;const _0x402d50=_0x402d();let _0x4f7e16=_0x402d50[_0x51ec39];return _0x4f7e16;}export async function getMcpAuthOrigin(){const _0x4e4e7e=_0x3e5f9f,_0x1e0e3c={'eDJDj':function(_0x41982f,_0x51996b){return _0x41982f||_0x51996b;}};try{const _0x936b3d=(await readFile(AUTH_ORIGIN_PATH,_0x4e4e7e(0x20b)))['trim']();return _0x1e0e3c[_0x4e4e7e(0x1e4)](_0x936b3d,null);}catch{return null;}}export async function mcpBootstrap(){const _0x39a96e=_0x3e5f9f,_0x215bbf={'vFRDb':function(_0x27d45c,_0x527963){return _0x27d45c(_0x527963);},'gbouf':function(_0x5a8d12,_0xf63bb7){return _0x5a8d12===_0xf63bb7;},'ROTpf':'proxied','jDXrP':function(_0x2caf10){return _0x2caf10();},'JPsQB':function(_0x81e665,_0x4948b8){return _0x81e665+_0x4948b8;},'iSokj':function(_0x41d137,_0x282668,_0x4e32b3){return _0x41d137(_0x282668,_0x4e32b3);}},_0x1b7c1a=getMcpAuthUrl();currentOrigin=_0x1b7c1a;const _0x5d7bf9=process['stdout'][_0x39a96e(0x213)]??![];console['log'](_0x39a96e(0x207)+_0x1b7c1a+'\x0a');const _0x443832=await _0x215bbf['vFRDb'](tryUnauthenticated,_0x1b7c1a);let _0x41989a=null;if(_0x215bbf[_0x39a96e(0x1dd)](_0x443832,_0x215bbf[_0x39a96e(0x1bf)]))_0x41989a='';else{_0x41989a=await _0x215bbf[_0x39a96e(0x217)](loadCachedToken);if(!_0x41989a){if(!_0x5d7bf9)throw new Error(_0x215bbf[_0x39a96e(0x1f6)]('MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a',_0x39a96e(0x1f1)));_0x41989a=await oauthFlow(_0x1b7c1a);}}await _0x215bbf['iSokj'](callGetCliToken,_0x1b7c1a,_0x41989a);}async function tryUnauthenticated(_0x1b7df4){const _0x4e7808=_0x3e5f9f,_0x49a94d={'mVAFZ':function(_0xcc3ab6,_0x65b67b,_0x26c42c){return _0xcc3ab6(_0x65b67b,_0x26c42c);},'yBafm':'application/json','yGqtn':_0x4e7808(0x1d2),'Bcgth':_0x4e7808(0x215),'NIMBe':'2025-03-26','IqiZk':_0x4e7808(0x239),'pDPPT':function(_0xdecb08,_0x50a975){return _0xdecb08===_0x50a975;},'tyVOk':_0x4e7808(0x1e2)},_0x1cc78f=await _0x49a94d[_0x4e7808(0x21b)](fetch,_0x1b7df4,{'method':_0x4e7808(0x220),'headers':{'Content-Type':_0x49a94d[_0x4e7808(0x230)],'Accept':_0x49a94d[_0x4e7808(0x1c1)]},'body':JSON[_0x4e7808(0x1f7)]({'jsonrpc':_0x49a94d[_0x4e7808(0x1ff)],'id':0x1,'method':'initialize','params':{'protocolVersion':_0x49a94d[_0x4e7808(0x200)],'capabilities':{},'clientInfo':{'name':_0x49a94d[_0x4e7808(0x1fd)],'version':_0x4e7808(0x227)}}})});if(_0x1cc78f['ok'])return await _0x1cc78f['text'](),'proxied';if(_0x49a94d['pDPPT'](_0x1cc78f['status'],0x191))return await _0x1cc78f[_0x4e7808(0x1be)](),_0x49a94d[_0x4e7808(0x22e)];const _0x4b5f10=await _0x1cc78f[_0x4e7808(0x1be)]();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0x1cc78f[_0x4e7808(0x22b)]+':\x20'+_0x4b5f10);}function _0x402d(){const _0x3e8913=['EubvA','No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','hKHAO','accessToken','open','update','platform','/callback','jkQMZ','rqwHz','Token\x20exchange\x20failed:\x20','startsWith','data:','text/event-stream','get','Client\x20registration\x20failed:\x20','gJLzQ','PxAyN','86471eIGZkd','text','ROTpf','application/json','yGqtn','resource','set','UTPqf','NSInv','string','xdg-open','code','code_challenge_method','XvDer','JWiOC','headers','PRIUu','clientId','end','authorization_code','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','application/json,\x20text/event-stream','JugaR','result','token_endpoint','log','QEyzg','origin','iMLTv','hPVgz','\x20done','toString','gbouf','error','JgQRK','\x0aUnexpected\x20response\x20structure:','sha256','needs-oauth','dKOGi','eDJDj','wGsqa','writeHead','write','client_secret','expires_in','dLUBm','mcp-oauth-tokens.json','739008EtgdCj','closeAllConnections','pathname','initialize','error_description','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','content-type','type','slice','searchParams','JPsQB','stringify','uRmAo','ulOZS','http://localhost:','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','refresh_token','IqiZk','1749024MDIGHh','Bcgth','NIMBe','4SThiqz','stdout','message','content','sWzWl','fMFkq','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','client_id','split','YPqTG','utf-8','HTTP\x20','trim','4110519kmcVgE','parse','127.0.0.1','OpyoQ','auth-origin.txt','isTTY','uWYLo','2.0','TGrrV','jDXrP','yKsPu','OAKQH','AwtBc','mVAFZ','OAuthTimeoutError','token','json','QXwPY','POST','<html><body><h2>Authentication\x20failed</h2><p>','4991752jnKebZ','authorization_servers','none','isError','expiresAt','1.0.0','.ranger','listen','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','status','LYAaV','BnAlV','tyVOk','/.well-known/oauth-protected-resource','yBafm','now','3101910AiGnaD','Exchanging\x20authorization\x20code...','text/html','2556850JeRrmn','wXvXn','Registering\x20OAuth\x20client...','application/x-www-form-urlencoded','ranger-cli','get_cli_token\x20failed:\x20','QSNma','<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a'];_0x402d=function(){return _0x3e8913;};return _0x402d();}class OAuthTimeoutError extends Error{constructor(_0x2bf774){const _0x182f1d=_0x3e5f9f;super(_0x2bf774),this['name']=_0x182f1d(0x21c);}}async function oauthFlow(_0x3709f8){const _0x26e6fc={'NwYkw':function(_0x3df782){return _0x3df782();}};try{return await oauthFlowAttempt(_0x3709f8);}catch(_0x420bf9){if(_0x420bf9 instanceof OAuthTimeoutError&&await loadCachedClient())return console['log']('\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a'),await _0x26e6fc['NwYkw'](clearCachedClient),await oauthFlowAttempt(_0x3709f8);throw _0x420bf9;}}async function oauthFlowAttempt(_0x1f5e9a){const _0x223478=_0x3e5f9f,_0x2a3306={'LYAaV':function(_0x4b54be,_0x51b3fc){return _0x4b54be(_0x51b3fc);},'ulOZS':'Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','qJUaj':_0x223478(0x23f),'YNrVR':function(_0xc8516b){return _0xc8516b();},'QSNma':_0x223478(0x237),'EubvA':_0x223478(0x1c0),'fMFkq':_0x223478(0x1d0),'zDoWa':'refresh_token','rkLeF':_0x223478(0x224),'uRmAo':function(_0x11f937,_0x19ea59,_0x365864){return _0x11f937(_0x19ea59,_0x365864);},'kxRqt':'base64url','dKOGi':'hex','GDLTN':'code','XvDer':_0x223478(0x208),'lBzml':'S256','tOnre':'state','VuVCV':'\x0aOpening\x20browser\x20for\x20authentication...','byWMl':function(_0x1729cd,_0x5cf745){return _0x1729cd(_0x5cf745);},'RehoI':_0x223478(0x1e8),'vhplv':'\x20done','PRIUu':function(_0x5b80ec,_0x44df6f,_0x19f141,_0x95959f){return _0x5b80ec(_0x44df6f,_0x19f141,_0x95959f);}},_0x3fd1c5=_0x1f5e9a['replace'](/\/mcp$/,'');process[_0x223478(0x202)][_0x223478(0x1e7)]('Discovering\x20authorization\x20server...');const _0x26f210=await _0x2a3306['LYAaV'](fetch,_0x3fd1c5+_0x223478(0x22f));if(!_0x26f210['ok'])throw new Error(_0x2a3306[_0x223478(0x1f9)]);const _0x38968d=await _0x26f210[_0x223478(0x21e)](),_0x26286c=_0x38968d[_0x223478(0x223)]?.[0x0];if(!_0x26286c)throw new Error(_0x2a3306['qJUaj']);console[_0x223478(0x1d6)]('\x20'+_0x26286c);const _0x2138c6=await fetchAuthServerMetadata(_0x26286c);let _0x2a5d03,_0x2abf7a;const _0x30284c=await _0x2a3306['YNrVR'](loadCachedClient);if(_0x30284c)_0x2a5d03=_0x30284c[_0x223478(0x1ce)],_0x2abf7a=_0x30284c['clientSecret'];else{if(_0x2138c6['registration_endpoint']){process[_0x223478(0x202)]['write'](_0x2a3306[_0x223478(0x23b)]);const _0x3e6f88=await fetch(_0x2138c6['registration_endpoint'],{'method':'POST','headers':{'Content-Type':_0x2a3306[_0x223478(0x23e)]},'body':JSON['stringify']({'client_name':'Ranger\x20CLI','redirect_uris':['http://localhost:'+CALLBACK_PORT+'/callback'],'grant_types':[_0x2a3306[_0x223478(0x206)],_0x2a3306['zDoWa']],'response_types':[_0x223478(0x1c8)],'token_endpoint_auth_method':_0x2a3306['rkLeF']})});if(!_0x3e6f88['ok']){const _0x4c8f7e=await _0x3e6f88['text']();throw new Error(_0x223478(0x24e)+_0x4c8f7e);}const _0x4f983d=await _0x3e6f88[_0x223478(0x21e)]();_0x2a5d03=_0x4f983d['client_id'],_0x2abf7a=_0x4f983d['client_secret'],await _0x2a3306[_0x223478(0x1f8)](saveCachedClient,_0x2a5d03,_0x2abf7a),console['log'](_0x223478(0x1db));}else throw new Error(_0x223478(0x22a));}const _0x2b5779=_0x2a3306['LYAaV'](randomBytes,0x20)['toString'](_0x2a3306['kxRqt']),_0xa2e82d=createHash(_0x223478(0x1e1))[_0x223478(0x244)](_0x2b5779)['digest']('base64url'),_0x36ab45=_0x2a3306[_0x223478(0x22c)](randomBytes,0x10)['toString'](_0x2a3306[_0x223478(0x1e3)]),_0x4707ed=new URL(_0x2138c6['authorization_endpoint']);_0x4707ed['searchParams'][_0x223478(0x1c3)]('response_type',_0x2a3306['GDLTN']),_0x4707ed['searchParams']['set'](_0x2a3306[_0x223478(0x1ca)],_0x2a5d03),_0x4707ed[_0x223478(0x1f5)]['set']('redirect_uri','http://localhost:'+CALLBACK_PORT+_0x223478(0x246)),_0x4707ed['searchParams']['set']('code_challenge',_0xa2e82d),_0x4707ed[_0x223478(0x1f5)]['set'](_0x223478(0x1c9),_0x2a3306['lBzml']),_0x4707ed[_0x223478(0x1f5)][_0x223478(0x1c3)](_0x2a3306['tOnre'],_0x36ab45);_0x38968d['resource']&&_0x4707ed['searchParams']['set'](_0x223478(0x1c2),_0x38968d['resource']);console['log'](_0x2a3306['VuVCV']),console['log']('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a'+_0x4707ed[_0x223478(0x1dc)]()+'\x0a'),await _0x2a3306['LYAaV'](openBrowser,_0x4707ed['toString']());const _0x9a447=await _0x2a3306['byWMl'](waitForCallback,_0x36ab45);process[_0x223478(0x202)][_0x223478(0x1e7)](_0x223478(0x233));const _0x159652=new URLSearchParams({'grant_type':'authorization_code','code':_0x9a447,'redirect_uri':_0x223478(0x1fa)+CALLBACK_PORT+_0x223478(0x246),'client_id':_0x2a5d03,'code_verifier':_0x2b5779});_0x2abf7a&&_0x159652['set'](_0x2a3306['RehoI'],_0x2abf7a);_0x38968d[_0x223478(0x1c2)]&&_0x159652['set'](_0x223478(0x1c2),_0x38968d[_0x223478(0x1c2)]);const _0x4e497e=await _0x2a3306[_0x223478(0x1f8)](fetch,_0x2138c6[_0x223478(0x1d5)],{'method':'POST','headers':{'Content-Type':_0x223478(0x238)},'body':_0x159652});if(!_0x4e497e['ok']){const _0x16235d=await _0x4e497e[_0x223478(0x1be)]();throw new Error(_0x223478(0x249)+_0x16235d);}const _0x53d62d=await _0x4e497e['json']();return console['log'](_0x2a3306['vhplv']),await _0x2a3306[_0x223478(0x1cd)](saveCachedToken,_0x53d62d['access_token'],_0x53d62d[_0x223478(0x1fc)],_0x53d62d[_0x223478(0x1e9)]),_0x53d62d['access_token'];}async function callGetCliToken(_0x2fe39c,_0x3b79fb){const _0x36d842=_0x3e5f9f,_0x2debb3={'xcImF':function(_0x549d05,_0xe47641,_0xe31372){return _0x549d05(_0xe47641,_0xe31372);},'OpyoQ':_0x36d842(0x1d2),'yZVMB':'Initializing\x20MCP\x20session...','hKHAO':function(_0x2fd93e,_0x1ecffd){return _0x2fd93e(_0x1ecffd);},'CIKyW':_0x36d842(0x1ef),'hPVgz':'POST','JWiOC':_0x36d842(0x215),'zIefW':'notifications/initialized','wDQHS':'Requesting\x20CLI\x20token...','EOnnN':'tools/call','wXvXn':'get_cli_token','iMLTv':_0x36d842(0x1e0),'YPqTG':_0x36d842(0x1d1),'EyEXU':function(_0x1b8eaa,_0x512ab2,_0x348c27){return _0x1b8eaa(_0x512ab2,_0x348c27);},'FARjY':function(_0x357261){return _0x357261();},'KpPwH':'refresh.txt','yKsPu':function(_0x7dff20,_0xb3ce9d,_0x3cf233,_0x1ea9ac){return _0x7dff20(_0xb3ce9d,_0x3cf233,_0x1ea9ac);},'GOBiv':_0x36d842(0x212),'aJiYs':_0x36d842(0x23d)},_0x4f2824={'Content-Type':_0x36d842(0x1c0),'Accept':_0x2debb3[_0x36d842(0x211)]};_0x3b79fb&&(_0x4f2824['Authorization']='Bearer\x20'+_0x3b79fb);const _0x2f90ca=async _0x465948=>{const _0x1fea61=_0x36d842,_0x14e884=await _0x2debb3['xcImF'](fetch,_0x2fe39c,{'method':'POST','headers':_0x4f2824,'body':JSON[_0x1fea61(0x1f7)](_0x465948)});if(!_0x14e884['ok']){const _0xa1680d=await _0x14e884[_0x1fea61(0x1be)]();throw new Error(_0x1fea61(0x20c)+_0x14e884['status']+':\x20'+_0xa1680d);}return parseResponse(_0x14e884);};process[_0x36d842(0x202)][_0x36d842(0x1e7)](_0x2debb3['yZVMB']);const _0x3335eb=await _0x2debb3[_0x36d842(0x241)](_0x2f90ca,{'jsonrpc':_0x36d842(0x215),'id':0x1,'method':_0x2debb3['CIKyW'],'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x36d842(0x239),'version':_0x36d842(0x227)}}});if(_0x3335eb[_0x36d842(0x1de)])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x3335eb[_0x36d842(0x1de)][_0x36d842(0x203)]??JSON[_0x36d842(0x1f7)](_0x3335eb['error'])));console[_0x36d842(0x1d6)]('\x20done'),await fetch(_0x2fe39c,{'method':_0x2debb3[_0x36d842(0x1da)],'headers':_0x4f2824,'body':JSON['stringify']({'jsonrpc':_0x2debb3[_0x36d842(0x1cb)],'method':_0x2debb3['zIefW']})})['then'](_0x2ad55e=>_0x2ad55e['text']()),process[_0x36d842(0x202)][_0x36d842(0x1e7)](_0x2debb3['wDQHS']);const _0x1d424a=await _0x2f90ca({'jsonrpc':_0x2debb3[_0x36d842(0x1cb)],'id':0x2,'method':_0x2debb3['EOnnN'],'params':{'name':_0x2debb3[_0x36d842(0x236)],'arguments':{}}});if(_0x1d424a[_0x36d842(0x1de)])throw new Error(_0x36d842(0x23a)+(_0x1d424a['error'][_0x36d842(0x203)]??JSON['stringify'](_0x1d424a[_0x36d842(0x1de)])));console[_0x36d842(0x1d6)]('\x20done');const _0x57a996=extractToken(_0x1d424a[_0x36d842(0x1d4)]);if(!_0x57a996){console[_0x36d842(0x1de)](_0x2debb3[_0x36d842(0x1d9)]),console['error'](JSON[_0x36d842(0x1f7)](_0x1d424a[_0x36d842(0x1d4)],null,0x2));throw new Error(_0x2debb3[_0x36d842(0x20a)]);}const _0x4c7c9d=_0x2debb3['EyEXU'](join,_0x2debb3['FARjY'](homedir),_0x36d842(0x228)),_0x37dc5a=join(_0x4c7c9d,_0x2debb3['KpPwH']);await _0x2debb3['xcImF'](mkdir,_0x4c7c9d,{'recursive':!![]}),await _0x2debb3['yKsPu'](writeFile,_0x37dc5a,_0x57a996,{'mode':0x180}),await _0x2debb3[_0x36d842(0x218)](writeFile,join(_0x4c7c9d,_0x2debb3['GOBiv']),_0x2fe39c,{'mode':0x180}),console['log']('\x0aToken\x20written\x20to\x20'+_0x37dc5a),console['log'](_0x2debb3['aJiYs']);}async function fetchAuthServerMetadata(_0x15b71d){const _0x21ea15=_0x3e5f9f,_0x1ae214={'QXwPY':function(_0x402032,_0x2c556c){return _0x402032(_0x2c556c);}},_0xe51054=_0x15b71d+'/.well-known/oauth-authorization-server',_0x119f8f=await _0x1ae214[_0x21ea15(0x21f)](fetch,_0xe51054);if(!_0x119f8f['ok'])throw new Error('Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20'+_0xe51054+':\x20'+_0x119f8f['status']);return _0x119f8f['json']();}function waitForCallback(_0x2c5b56){const _0x3818bc=_0x3e5f9f,_0x218cb7={'qxEXD':'/callback','PesBo':'Not\x20found','QEyzg':_0x3818bc(0x1c8),'yzeSR':'state','BnAlV':_0x3818bc(0x1f0),'rqwHz':function(_0x50a52,_0x36fe5a){return _0x50a52!==_0x36fe5a;},'TcDdT':'text/html','rpoWa':function(_0x772bc7){return _0x772bc7();},'rOtGj':function(_0x2d397e,_0x527af5){return _0x2d397e(_0x527af5);},'gWPMi':function(_0xda2b8d,_0x3b38fb,_0x31161d){return _0xda2b8d(_0x3b38fb,_0x31161d);}};return new Promise((_0x59e5e5,_0x3cc775)=>{const _0x92baef=_0x3818bc,_0xee2623=()=>{const _0x51dfb8=_0x4f7e;_0x2391df[_0x51dfb8(0x1ed)](),_0x2391df['close']();},_0x3d8cc1=_0x218cb7['gWPMi'](setTimeout,()=>{const _0x348720=_0x4f7e;_0xee2623(),_0x3cc775(new OAuthTimeoutError(_0x348720(0x240)));},0x1d4c0),_0x2391df=createServer((_0x455151,_0x230b82)=>{const _0x62e9a6=_0x4f7e,_0x291686=new URL(_0x455151['url']??'/','http://localhost:'+CALLBACK_PORT);if(_0x291686[_0x62e9a6(0x1ee)]!==_0x218cb7['qxEXD']){_0x230b82[_0x62e9a6(0x1e6)](0x194),_0x230b82['end'](_0x218cb7['PesBo']);return;}const _0x4f4ac6=_0x291686['searchParams'][_0x62e9a6(0x24d)](_0x218cb7[_0x62e9a6(0x1d7)]),_0x332c9b=_0x291686[_0x62e9a6(0x1f5)][_0x62e9a6(0x24d)](_0x218cb7['yzeSR']),_0x16a4b8=_0x291686[_0x62e9a6(0x1f5)]['get'](_0x62e9a6(0x1de));if(_0x16a4b8){const _0x45699f=_0x291686['searchParams']['get'](_0x218cb7[_0x62e9a6(0x22d)])??_0x16a4b8;_0x230b82['writeHead'](0xc8,{'Content-Type':'text/html'}),_0x230b82[_0x62e9a6(0x1cf)](_0x62e9a6(0x221)+_0x45699f+'</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>'),clearTimeout(_0x3d8cc1),_0xee2623(),_0x3cc775(new Error('OAuth\x20error:\x20'+_0x45699f));return;}if(!_0x4f4ac6||_0x218cb7[_0x62e9a6(0x248)](_0x332c9b,_0x2c5b56)){_0x230b82['writeHead'](0x190,{'Content-Type':_0x218cb7['TcDdT']}),_0x230b82[_0x62e9a6(0x1cf)]('<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>');return;}_0x230b82['writeHead'](0xc8,{'Content-Type':_0x62e9a6(0x234)}),_0x230b82['end'](_0x62e9a6(0x23c)),clearTimeout(_0x3d8cc1),_0x218cb7['rpoWa'](_0xee2623),_0x218cb7['rOtGj'](_0x59e5e5,_0x4f4ac6);});_0x2391df[_0x92baef(0x229)](CALLBACK_PORT,_0x92baef(0x210));});}async function openBrowser(_0x4a9772){const _0x459d75=_0x3e5f9f,_0x2a47d7={'dLUBm':function(_0x4aa6a2,_0x5e7a05){return _0x4aa6a2===_0x5e7a05;},'vQLPF':_0x459d75(0x243),'sWzWl':'start','uWYLo':function(_0x20589f,_0xccf0ff){return _0x20589f(_0xccf0ff);}},_0x383213=_0x2a47d7[_0x459d75(0x1ea)](process[_0x459d75(0x245)],'darwin')?_0x2a47d7['vQLPF']:_0x2a47d7[_0x459d75(0x1ea)](process[_0x459d75(0x245)],'win32')?_0x2a47d7[_0x459d75(0x205)]:_0x459d75(0x1c7);_0x2a47d7[_0x459d75(0x214)](exec,_0x383213+'\x20\x22'+_0x4a9772+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x3c1eb5=_0x3e5f9f,_0x5244b2={'Qwkdl':function(_0x3da622,_0x524de6,_0x2e18b4){return _0x3da622(_0x524de6,_0x2e18b4);},'jkQMZ':function(_0x276965,_0x49686d){return _0x276965!==_0x49686d;},'wGsqa':function(_0x1ffefb,_0x51154f){return _0x1ffefb>_0x51154f;}};try{const _0x2f3729=JSON['parse'](await _0x5244b2['Qwkdl'](readFile,TOKEN_CACHE_PATH,'utf-8'));if(_0x2f3729[_0x3c1eb5(0x1d8)]&&_0x5244b2[_0x3c1eb5(0x247)](_0x2f3729[_0x3c1eb5(0x1d8)],currentOrigin))return null;if(_0x2f3729[_0x3c1eb5(0x226)]&&_0x5244b2[_0x3c1eb5(0x1e5)](Date[_0x3c1eb5(0x231)](),_0x2f3729[_0x3c1eb5(0x226)]))return null;return _0x2f3729['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x460008,_0x1608ba,_0x138232){const _0x253329=_0x3e5f9f,_0xb8bc15={'TGrrV':function(_0x504e27,_0x17405e){return _0x504e27+_0x17405e;},'rdxQt':function(_0x52b1f7,_0x1f6197){return _0x52b1f7*_0x1f6197;},'FFOFC':function(_0x55fb6c,_0xc82b55,_0x282fd5){return _0x55fb6c(_0xc82b55,_0x282fd5);},'vkSmH':function(_0x4c554a){return _0x4c554a();}},_0x38c937=await loadCachedData(),_0x1cf8d1={..._0x38c937,'origin':currentOrigin,'accessToken':_0x460008,'refreshToken':_0x1608ba??_0x38c937?.['refreshToken'],'expiresAt':_0x138232?_0xb8bc15[_0x253329(0x216)](Date['now'](),_0xb8bc15['rdxQt'](_0x138232,0x3e8)):undefined};await _0xb8bc15['FFOFC'](mkdir,join(_0xb8bc15['vkSmH'](homedir),'.ranger'),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON[_0x253329(0x1f7)](_0x1cf8d1),{'mode':0x180});}async function loadCachedClient(){const _0x4c1da7=_0x3e5f9f,_0x2dfd4c={'OAKQH':function(_0x3bca55,_0x4f12e2){return _0x3bca55!==_0x4f12e2;}},_0x55acd1=await loadCachedData();if(_0x55acd1?.['origin']&&_0x2dfd4c[_0x4c1da7(0x219)](_0x55acd1[_0x4c1da7(0x1d8)],currentOrigin))return null;return _0x55acd1?.['clientId']?{'clientId':_0x55acd1[_0x4c1da7(0x1ce)],'clientSecret':_0x55acd1['clientSecret']}:null;}async function clearCachedClient(){const _0x1899d4={'FXkug':function(_0x34fb54,_0x7a4de4,_0x18d01d,_0x4c305d){return _0x34fb54(_0x7a4de4,_0x18d01d,_0x4c305d);}},_0x571ea3=await loadCachedData();if(!_0x571ea3)return;const {clientId:_0x44f127,clientSecret:_0x168def,..._0x18db01}=_0x571ea3;await _0x1899d4['FXkug'](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x18db01),{'mode':0x180});}async function saveCachedClient(_0x5200a4,_0x362611){const _0x519ab8=_0x3e5f9f,_0x331a1e={'EtJkQ':function(_0x476dc9,_0x4d2e3f,_0x2c4aaa){return _0x476dc9(_0x4d2e3f,_0x2c4aaa);},'Zndlg':function(_0x2a555f){return _0x2a555f();},'AwtBc':_0x519ab8(0x228),'FDWsu':function(_0x4a9378,_0x2e965c,_0x504f47,_0x4257f6){return _0x4a9378(_0x2e965c,_0x504f47,_0x4257f6);}},_0x48487d=await loadCachedData(),_0x4e1364={..._0x48487d,'origin':currentOrigin,'accessToken':_0x48487d?.[_0x519ab8(0x242)]??'','clientId':_0x5200a4,'clientSecret':_0x362611};await _0x331a1e['EtJkQ'](mkdir,join(_0x331a1e['Zndlg'](homedir),_0x331a1e[_0x519ab8(0x21a)]),{'recursive':!![]}),await _0x331a1e['FDWsu'](writeFile,TOKEN_CACHE_PATH,JSON[_0x519ab8(0x1f7)](_0x4e1364),{'mode':0x180});}async function loadCachedData(){const _0x282c42=_0x3e5f9f,_0x2e04c1={'UTPqf':'utf-8'};try{return JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x2e04c1[_0x282c42(0x1c4)]));}catch{return null;}}async function parseResponse(_0x4f2135){const _0x10a6da=_0x3e5f9f,_0x2702e8={'JugaR':_0x10a6da(0x1f2),'bkLNQ':'data:','PxAyN':function(_0x5bbde1,_0x38f9d6){return _0x5bbde1!==_0x38f9d6;},'gJLzQ':_0x10a6da(0x1fb)},_0x394cf5=_0x4f2135[_0x10a6da(0x1cc)]['get'](_0x2702e8[_0x10a6da(0x1d3)])??'';if(_0x394cf5['includes'](_0x10a6da(0x24c))){const _0x1b0f75=await _0x4f2135[_0x10a6da(0x1be)]();for(const _0x53242c of _0x1b0f75[_0x10a6da(0x209)]('\x0a')){const _0x5dee56=_0x53242c[_0x10a6da(0x20d)]();if(_0x5dee56[_0x10a6da(0x24a)](_0x2702e8['bkLNQ'])){const _0x2274b0=_0x5dee56[_0x10a6da(0x1f4)](_0x10a6da(0x24b)['length'])['trim']();if(!_0x2274b0)continue;try{const _0x222c38=JSON[_0x10a6da(0x20f)](_0x2274b0);if(_0x2702e8[_0x10a6da(0x250)](_0x222c38['id'],undefined)||_0x222c38['error'])return _0x222c38;}catch{}}}throw new Error(_0x2702e8[_0x10a6da(0x24f)]);}return _0x4f2135['json']();}function extractToken(_0x26e6b6){const _0x2c4d74=_0x3e5f9f,_0x5926d5={'NSInv':function(_0xf185d5,_0x3c1c8e){return _0xf185d5===_0x3c1c8e;},'fURVx':_0x2c4d74(0x1c6),'JgQRK':'text'};if(!_0x26e6b6)return null;const _0x1f353b=_0x26e6b6['structuredContent'];if(_0x1f353b?.['token']&&_0x5926d5[_0x2c4d74(0x1c5)](typeof _0x1f353b['token'],_0x5926d5['fURVx']))return _0x1f353b[_0x2c4d74(0x21d)];if(_0x26e6b6[_0x2c4d74(0x225)]){const _0x2713cb=_0x26e6b6[_0x2c4d74(0x204)];throw new Error('Server\x20returned\x20error:\x20'+(_0x2713cb?.[0x0]?.['text']??'Unknown\x20error'));}const _0x5195ef=_0x26e6b6[_0x2c4d74(0x204)];if(_0x5195ef)for(const _0x4a4bfb of _0x5195ef){if(_0x4a4bfb[_0x2c4d74(0x1f3)]===_0x5926d5[_0x2c4d74(0x1df)]&&_0x4a4bfb[_0x2c4d74(0x1be)]){try{const _0x131e32=JSON['parse'](_0x4a4bfb[_0x2c4d74(0x1be)]);if(typeof _0x131e32?.['token']===_0x5926d5['fURVx'])return _0x131e32[_0x2c4d74(0x21d)];}catch{}const _0x47a360=_0x4a4bfb[_0x2c4d74(0x1be)]['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x47a360)return _0x47a360[0x1];}}return null;}
1
+ const _0x304232=_0x156e;(function(_0x4420f0,_0x1a9c7f){const _0x36c6a0=_0x156e,_0x279499=_0x4420f0();while(!![]){try{const _0x28e668=parseInt(_0x36c6a0(0x163))/0x1*(-parseInt(_0x36c6a0(0x1a7))/0x2)+-parseInt(_0x36c6a0(0x13d))/0x3+parseInt(_0x36c6a0(0x150))/0x4+-parseInt(_0x36c6a0(0x1a6))/0x5*(-parseInt(_0x36c6a0(0x173))/0x6)+parseInt(_0x36c6a0(0x143))/0x7+parseInt(_0x36c6a0(0x193))/0x8*(parseInt(_0x36c6a0(0x1b5))/0x9)+parseInt(_0x36c6a0(0x14c))/0xa*(-parseInt(_0x36c6a0(0x190))/0xb);if(_0x28e668===_0x1a9c7f)break;else _0x279499['push'](_0x279499['shift']());}catch(_0x5acdf5){_0x279499['push'](_0x279499['shift']());}}}(_0x81f0,0x652e9));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(),_0x304232(0x1bb),'mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),_0x304232(0x1bb),_0x304232(0x133));export async function getMcpAuthOrigin(){const _0x47a144=_0x304232,_0x146b19={'nqHpG':_0x47a144(0x13e),'UGVBj':function(_0x2d48ef,_0x29942d){return _0x2d48ef||_0x29942d;}};try{const _0x366ce1=(await readFile(AUTH_ORIGIN_PATH,_0x146b19['nqHpG']))['trim']();return _0x146b19['UGVBj'](_0x366ce1,null);}catch{return null;}}export async function mcpBootstrap(){const _0xffa336=_0x304232,_0x5663c9={'rybec':function(_0x54e912,_0x2dc84d){return _0x54e912(_0x2dc84d);},'YRBGs':function(_0x1fc32c,_0x3441da,_0x2a7d52){return _0x1fc32c(_0x3441da,_0x2a7d52);}},_0x393ef0=getMcpAuthUrl();currentOrigin=_0x393ef0;const _0x4b9a15=process['stdout']['isTTY']??![];console['log']('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x393ef0+'\x0a');const _0x2064b6=await tryUnauthenticated(_0x393ef0);let _0x35e7d6=null;if(_0x2064b6===_0xffa336(0x1a3))_0x35e7d6='';else{_0x35e7d6=await loadCachedToken();if(!_0x35e7d6){if(!_0x4b9a15)throw new Error(_0xffa336(0x19d)+'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.');_0x35e7d6=await _0x5663c9['rybec'](oauthFlow,_0x393ef0);}}await _0x5663c9[_0xffa336(0x1be)](callGetCliToken,_0x393ef0,_0x35e7d6);}async function tryUnauthenticated(_0x260888){const _0x4fa732=_0x304232,_0x3e9fb6={'dOZKg':_0x4fa732(0x139),'Wgaeg':'2025-03-26','KyXYU':_0x4fa732(0x1b3)},_0x1def58=await fetch(_0x260888,{'method':_0x3e9fb6[_0x4fa732(0x14e)],'headers':{'Content-Type':'application/json','Accept':_0x4fa732(0x154)},'body':JSON[_0x4fa732(0x170)]({'jsonrpc':'2.0','id':0x1,'method':'initialize','params':{'protocolVersion':_0x3e9fb6[_0x4fa732(0x140)],'capabilities':{},'clientInfo':{'name':_0x3e9fb6[_0x4fa732(0x17a)],'version':'1.0.0'}}})});if(_0x1def58['ok'])return await _0x1def58['text'](),'proxied';if(_0x1def58['status']===0x191)return await _0x1def58['text'](),_0x4fa732(0x1bf);const _0x2ff52c=await _0x1def58['text']();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0x1def58[_0x4fa732(0x1a5)]+':\x20'+_0x2ff52c);}class OAuthTimeoutError extends Error{constructor(_0x41bb59){const _0x3b09bf=_0x304232;super(_0x41bb59),this[_0x3b09bf(0x151)]=_0x3b09bf(0x178);}}async function oauthFlow(_0xca72fb){const _0x38cdb=_0x304232,_0x14ea75={'djCpB':function(_0x512d6f,_0x3e1125){return _0x512d6f(_0x3e1125);},'kbVrF':function(_0x1a8cef){return _0x1a8cef();},'WNGRF':'\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','OCDyl':function(_0x48b97c){return _0x48b97c();}};try{return await _0x14ea75[_0x38cdb(0x181)](oauthFlowAttempt,_0xca72fb);}catch(_0x1016c7){if(_0x1016c7 instanceof OAuthTimeoutError&&await _0x14ea75['kbVrF'](loadCachedClient))return console[_0x38cdb(0x16c)](_0x14ea75['WNGRF']),await _0x14ea75[_0x38cdb(0x1a2)](clearCachedClient),await _0x14ea75['djCpB'](oauthFlowAttempt,_0xca72fb);throw _0x1016c7;}}async function oauthFlowAttempt(_0x1f9ad2){const _0x16aee5=_0x304232,_0xeccc59={'vSEGB':_0x16aee5(0x186),'qgOnU':_0x16aee5(0x19a),'VaZMP':function(_0xf85c84,_0x186d43){return _0xf85c84(_0x186d43);},'aDyHU':'Registering\x20OAuth\x20client...','uLYsg':function(_0x48d4e7,_0x5cbaac,_0xb7b5fb){return _0x48d4e7(_0x5cbaac,_0xb7b5fb);},'mcbzL':'refresh_token','ZwYop':_0x16aee5(0x145),'EkCbi':_0x16aee5(0x16f),'CUOeV':'Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','AYjGo':function(_0xadee52,_0x535a50){return _0xadee52(_0x535a50);},'MMrzr':function(_0xd5a341,_0x292c8a){return _0xd5a341(_0x292c8a);},'jDoxm':'sha256','Nmeds':_0x16aee5(0x138),'NfNKl':'hex','zfYOK':_0x16aee5(0x1bc),'vVHsH':'state','NQetR':'resource','TsXZT':'\x0aOpening\x20browser\x20for\x20authentication...','tjaDy':_0x16aee5(0x1b0),'xnUwE':_0x16aee5(0x1ac),'VSgwS':'client_secret','ffIoN':'POST','LNDxD':'\x20done','kpwgW':function(_0x3dcd77,_0x33d082,_0x3b018d,_0x5d8637){return _0x3dcd77(_0x33d082,_0x3b018d,_0x5d8637);}},_0x46bd34=_0x1f9ad2[_0x16aee5(0x188)](/\/mcp$/,'');process['stdout'][_0x16aee5(0x19f)](_0xeccc59[_0x16aee5(0x15d)]);const _0x281dce=await fetch(_0x46bd34+'/.well-known/oauth-protected-resource');if(!_0x281dce['ok'])throw new Error(_0x16aee5(0x172));const _0x31a9a7=await _0x281dce[_0x16aee5(0x189)](),_0x4d4dcf=_0x31a9a7[_0x16aee5(0x14d)]?.[0x0];if(!_0x4d4dcf)throw new Error(_0xeccc59['qgOnU']);console['log']('\x20'+_0x4d4dcf);const _0x3032ec=await _0xeccc59[_0x16aee5(0x179)](fetchAuthServerMetadata,_0x4d4dcf);let _0x351657,_0x4d702a;const _0x2607c4=await loadCachedClient();if(_0x2607c4)_0x351657=_0x2607c4[_0x16aee5(0x15f)],_0x4d702a=_0x2607c4[_0x16aee5(0x17c)];else{if(_0x3032ec['registration_endpoint']){process[_0x16aee5(0x18d)][_0x16aee5(0x19f)](_0xeccc59[_0x16aee5(0x153)]);const _0x549ac0=await _0xeccc59[_0x16aee5(0x191)](fetch,_0x3032ec['registration_endpoint'],{'method':_0x16aee5(0x139),'headers':{'Content-Type':_0x16aee5(0x18f)},'body':JSON['stringify']({'client_name':_0x16aee5(0x195),'redirect_uris':['http://localhost:'+CALLBACK_PORT+'/callback'],'grant_types':[_0x16aee5(0x1ac),_0xeccc59[_0x16aee5(0x155)]],'response_types':[_0xeccc59['ZwYop']],'token_endpoint_auth_method':_0xeccc59[_0x16aee5(0x1ad)]})});if(!_0x549ac0['ok']){const _0x5ea10c=await _0x549ac0[_0x16aee5(0x1c3)]();throw new Error(_0x16aee5(0x19e)+_0x5ea10c);}const _0x4b7845=await _0x549ac0['json']();_0x351657=_0x4b7845[_0x16aee5(0x182)],_0x4d702a=_0x4b7845[_0x16aee5(0x149)],await saveCachedClient(_0x351657,_0x4d702a),console['log'](_0x16aee5(0x144));}else throw new Error(_0xeccc59[_0x16aee5(0x130)]);}const _0x32d6be=_0xeccc59['AYjGo'](randomBytes,0x20)[_0x16aee5(0x17f)](_0x16aee5(0x138)),_0xd314=_0xeccc59[_0x16aee5(0x18a)](createHash,_0xeccc59[_0x16aee5(0x1c2)])[_0x16aee5(0x16d)](_0x32d6be)[_0x16aee5(0x15e)](_0xeccc59['Nmeds']),_0x1936da=_0xeccc59[_0x16aee5(0x18a)](randomBytes,0x10)['toString'](_0xeccc59['NfNKl']),_0x2c2141=new URL(_0x3032ec['authorization_endpoint']);_0x2c2141[_0x16aee5(0x164)][_0x16aee5(0x185)](_0x16aee5(0x1c5),_0xeccc59[_0x16aee5(0x15a)]),_0x2c2141[_0x16aee5(0x164)]['set'](_0x16aee5(0x182),_0x351657),_0x2c2141[_0x16aee5(0x164)][_0x16aee5(0x185)](_0xeccc59[_0x16aee5(0x1c6)],'http://localhost:'+CALLBACK_PORT+_0x16aee5(0x135)),_0x2c2141['searchParams']['set'](_0x16aee5(0x12f),_0xd314),_0x2c2141['searchParams'][_0x16aee5(0x185)]('code_challenge_method','S256'),_0x2c2141[_0x16aee5(0x164)][_0x16aee5(0x185)](_0xeccc59['vVHsH'],_0x1936da);_0x31a9a7['resource']&&_0x2c2141['searchParams']['set'](_0xeccc59[_0x16aee5(0x1af)],_0x31a9a7[_0x16aee5(0x194)]);console[_0x16aee5(0x16c)](_0xeccc59[_0x16aee5(0x167)]),console[_0x16aee5(0x16c)](_0x16aee5(0x18c)+_0x2c2141[_0x16aee5(0x17f)]()+'\x0a'),await _0xeccc59['AYjGo'](openBrowser,_0x2c2141['toString']());const _0x44e975=await waitForCallback(_0x1936da);process['stdout']['write'](_0xeccc59['tjaDy']);const _0x1cc166=new URLSearchParams({'grant_type':_0xeccc59[_0x16aee5(0x160)],'code':_0x44e975,'redirect_uri':_0x16aee5(0x19c)+CALLBACK_PORT+_0x16aee5(0x135),'client_id':_0x351657,'code_verifier':_0x32d6be});_0x4d702a&&_0x1cc166[_0x16aee5(0x185)](_0xeccc59[_0x16aee5(0x1bd)],_0x4d702a);_0x31a9a7['resource']&&_0x1cc166[_0x16aee5(0x185)](_0xeccc59[_0x16aee5(0x1af)],_0x31a9a7['resource']);const _0x344597=await fetch(_0x3032ec[_0x16aee5(0x146)],{'method':_0xeccc59[_0x16aee5(0x147)],'headers':{'Content-Type':_0x16aee5(0x134)},'body':_0x1cc166});if(!_0x344597['ok']){const _0x39962f=await _0x344597['text']();throw new Error('Token\x20exchange\x20failed:\x20'+_0x39962f);}const _0x42fe1c=await _0x344597[_0x16aee5(0x189)]();return console[_0x16aee5(0x16c)](_0xeccc59['LNDxD']),await _0xeccc59[_0x16aee5(0x196)](saveCachedToken,_0x42fe1c['access_token'],_0x42fe1c[_0x16aee5(0x1a8)],_0x42fe1c[_0x16aee5(0x13b)]),_0x42fe1c[_0x16aee5(0x16a)];}async function callGetCliToken(_0x8aefd0,_0x519b12){const _0x4e9ecc=_0x304232,_0x304672={'gDuRW':_0x4e9ecc(0x154),'jcZnL':function(_0x2632d0,_0x28514c){return _0x2632d0(_0x28514c);},'vmBCf':_0x4e9ecc(0x156),'UmzJj':'2025-03-26','EoNRu':function(_0x286756,_0x59f887,_0x1bc62d){return _0x286756(_0x59f887,_0x1bc62d);},'uxYeP':'POST','XSqEM':_0x4e9ecc(0x157),'SRdAa':'Requesting\x20CLI\x20token...','BcHlW':'get_cli_token','MNaWL':function(_0x94b412){return _0x94b412();},'QGudD':function(_0xb95c82,_0xebe0fc,_0x198d8c,_0x597c4f){return _0xb95c82(_0xebe0fc,_0x198d8c,_0x597c4f);},'DGNUs':'auth-origin.txt'},_0x24ad9a={'Content-Type':'application/json','Accept':_0x304672[_0x4e9ecc(0x166)]};_0x519b12&&(_0x24ad9a[_0x4e9ecc(0x168)]=_0x4e9ecc(0x158)+_0x519b12);const _0x856240=async _0x23ccdd=>{const _0x5cfa1b=_0x4e9ecc,_0x27dc99=await fetch(_0x8aefd0,{'method':'POST','headers':_0x24ad9a,'body':JSON['stringify'](_0x23ccdd)});if(!_0x27dc99['ok']){const _0xe9ca0=await _0x27dc99[_0x5cfa1b(0x1c3)]();throw new Error('HTTP\x20'+_0x27dc99['status']+':\x20'+_0xe9ca0);}return parseResponse(_0x27dc99);};process[_0x4e9ecc(0x18d)][_0x4e9ecc(0x19f)]('Initializing\x20MCP\x20session...');const _0x241999=await _0x304672[_0x4e9ecc(0x1b8)](_0x856240,{'jsonrpc':_0x304672['vmBCf'],'id':0x1,'method':_0x4e9ecc(0x142),'params':{'protocolVersion':_0x304672[_0x4e9ecc(0x159)],'capabilities':{},'clientInfo':{'name':'ranger-cli','version':'1.0.0'}}});if(_0x241999[_0x4e9ecc(0x1b9)])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x241999['error']['message']??JSON['stringify'](_0x241999[_0x4e9ecc(0x1b9)])));console['log'](_0x4e9ecc(0x144)),await _0x304672['EoNRu'](fetch,_0x8aefd0,{'method':_0x304672[_0x4e9ecc(0x13f)],'headers':_0x24ad9a,'body':JSON['stringify']({'jsonrpc':'2.0','method':_0x304672['XSqEM']})})[_0x4e9ecc(0x1ae)](_0x1ca405=>_0x1ca405['text']()),process['stdout']['write'](_0x304672[_0x4e9ecc(0x17d)]);const _0x3651e9=await _0x856240({'jsonrpc':_0x4e9ecc(0x156),'id':0x2,'method':'tools/call','params':{'name':_0x304672['BcHlW'],'arguments':{}}});if(_0x3651e9[_0x4e9ecc(0x1b9)])throw new Error(_0x4e9ecc(0x165)+(_0x3651e9[_0x4e9ecc(0x1b9)][_0x4e9ecc(0x174)]??JSON[_0x4e9ecc(0x170)](_0x3651e9['error'])));console[_0x4e9ecc(0x16c)]('\x20done');const _0x31d90f=_0x304672[_0x4e9ecc(0x1b8)](extractToken,_0x3651e9['result']);if(!_0x31d90f){console['error']('\x0aUnexpected\x20response\x20structure:'),console[_0x4e9ecc(0x1b9)](JSON[_0x4e9ecc(0x170)](_0x3651e9['result'],null,0x2));throw new Error(_0x4e9ecc(0x198));}const _0x18d634=_0x304672['EoNRu'](join,_0x304672[_0x4e9ecc(0x1b7)](homedir),'.ranger'),_0x467537=join(_0x18d634,'refresh.txt');await mkdir(_0x18d634,{'recursive':!![]}),await writeFile(_0x467537,_0x31d90f,{'mode':0x180}),await _0x304672['QGudD'](writeFile,join(_0x18d634,_0x304672[_0x4e9ecc(0x1a1)]),_0x8aefd0,{'mode':0x180}),console[_0x4e9ecc(0x16c)](_0x4e9ecc(0x199)+_0x467537),console['log'](_0x4e9ecc(0x1c4));}function _0x81f0(){const _0x248d46=['resource','Ranger\x20CLI','kpwgW','end','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','\x0aToken\x20written\x20to\x20','No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','wFwCP','http://localhost:','MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','Client\x20registration\x20failed:\x20','write','text/event-stream','DGNUs','OCDyl','proxied','trim','status','35WWnuoU','2JqPHWl','refresh_token','127.0.0.1','text/html','yujNs','authorization_code','EkCbi','then','NQetR','Exchanging\x20authorization\x20code...','parse','listen','ranger-cli','slice','1789794EOwyIc','Not\x20found','MNaWL','jcZnL','error','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','.ranger','redirect_uri','VSgwS','YRBGs','needs-oauth','length','SJMTw','jDoxm','text','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a','response_type','zfYOK','code_challenge','CUOeV','data:','state','auth-origin.txt','application/x-www-form-urlencoded','/callback','content','KVmtf','base64url','POST','token','expires_in','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','726903DkPbSz','utf-8','uxYeP','Wgaeg','qFWSH','initialize','2166311caJOoO','\x20done','code','token_endpoint','ffIoN','JHsqn','client_secret','headers','WeNNN','10pnVwBs','authorization_servers','dOZKg','start','1655076HUxvCK','name','accessToken','aDyHU','application/json,\x20text/event-stream','mcbzL','2.0','notifications/initialized','Bearer\x20','UmzJj','ZwYop','pathname','startsWith','vSEGB','digest','clientId','xnUwE','get','refreshToken','236171zTNVPQ','searchParams','get_cli_token\x20failed:\x20','gDuRW','TsXZT','Authorization','string','access_token','ONsgB','log','update','match','none','stringify','Unknown\x20error','Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','6012GhvbNp','message','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','url','xISKL','OAuthTimeoutError','VaZMP','KyXYU','origin','clientSecret','SRdAa','writeHead','toString','YZdle','djCpB','client_id','content-type','AtLbw','set','Discovering\x20authorization\x20server...','iuTXR','replace','json','MMrzr','<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','stdout','darwin','application/json','398299JWSRXG','uLYsg','kCjzZ','8RWugyY'];_0x81f0=function(){return _0x248d46;};return _0x81f0();}async function fetchAuthServerMetadata(_0x55ad61){const _0x167b21=_0x304232,_0x3e29b7=_0x55ad61+'/.well-known/oauth-authorization-server',_0x4d1a3a=await fetch(_0x3e29b7);if(!_0x4d1a3a['ok'])throw new Error('Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20'+_0x3e29b7+':\x20'+_0x4d1a3a['status']);return _0x4d1a3a[_0x167b21(0x189)]();}function waitForCallback(_0x48fa4b){const _0x3b7930=_0x304232,_0x1ed086={'qFWSH':_0x3b7930(0x135),'oZUod':_0x3b7930(0x1b6),'fnNOX':function(_0x16768b){return _0x16768b();},'SJMTw':function(_0x1b2c86,_0x5a9e6b){return _0x1b2c86!==_0x5a9e6b;},'nIlGU':function(_0x2e9a41,_0x482e12,_0x153800){return _0x2e9a41(_0x482e12,_0x153800);},'Revmz':function(_0x9c90c9,_0x422593){return _0x9c90c9(_0x422593);}};return new Promise((_0x5cbc63,_0x12b00b)=>{const _0x139a56=_0x3b7930,_0x4bc1a0={'gDQHN':function(_0x115e41,_0x4a37a4){return _0x115e41!==_0x4a37a4;},'kCjzZ':_0x1ed086[_0x139a56(0x141)],'voEyQ':_0x1ed086['oZUod'],'ELjFO':_0x139a56(0x1aa),'qrIgf':function(_0x449f5e){return _0x1ed086['fnNOX'](_0x449f5e);},'ONsgB':function(_0x257d8e,_0x952c00){return _0x257d8e(_0x952c00);},'IzBMU':function(_0x4524d1,_0x1abe29){const _0x530e5c=_0x139a56;return _0x1ed086[_0x530e5c(0x1c1)](_0x4524d1,_0x1abe29);}},_0x2a620c=()=>{_0x1e8913['closeAllConnections'](),_0x1e8913['close']();},_0x2a0996=_0x1ed086['nIlGU'](setTimeout,()=>{const _0x5bf5fc=_0x139a56;_0x2a620c(),_0x12b00b(new OAuthTimeoutError(_0x5bf5fc(0x1ba)));},0x1d4c0),_0x1e8913=_0x1ed086['Revmz'](createServer,(_0x2a2237,_0x3a3788)=>{const _0x19ebb5=_0x139a56,_0x34b61a=new URL(_0x2a2237[_0x19ebb5(0x176)]??'/',_0x19ebb5(0x19c)+CALLBACK_PORT);if(_0x4bc1a0['gDQHN'](_0x34b61a[_0x19ebb5(0x15b)],_0x4bc1a0[_0x19ebb5(0x192)])){_0x3a3788['writeHead'](0x194),_0x3a3788['end'](_0x4bc1a0['voEyQ']);return;}const _0x2c5c86=_0x34b61a[_0x19ebb5(0x164)][_0x19ebb5(0x161)]('code'),_0x31196c=_0x34b61a['searchParams'][_0x19ebb5(0x161)](_0x19ebb5(0x132)),_0x413f20=_0x34b61a[_0x19ebb5(0x164)]['get']('error');if(_0x413f20){const _0x1aea1d=_0x34b61a[_0x19ebb5(0x164)][_0x19ebb5(0x161)]('error_description')??_0x413f20;_0x3a3788['writeHead'](0xc8,{'Content-Type':_0x4bc1a0['ELjFO']}),_0x3a3788['end']('<html><body><h2>Authentication\x20failed</h2><p>'+_0x1aea1d+_0x19ebb5(0x13c)),clearTimeout(_0x2a0996),_0x4bc1a0['qrIgf'](_0x2a620c),_0x4bc1a0[_0x19ebb5(0x16b)](_0x12b00b,new Error('OAuth\x20error:\x20'+_0x1aea1d));return;}if(!_0x2c5c86||_0x4bc1a0['IzBMU'](_0x31196c,_0x48fa4b)){_0x3a3788['writeHead'](0x190,{'Content-Type':_0x4bc1a0['ELjFO']}),_0x3a3788[_0x19ebb5(0x197)]('<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>');return;}_0x3a3788[_0x19ebb5(0x17e)](0xc8,{'Content-Type':_0x4bc1a0['ELjFO']}),_0x3a3788[_0x19ebb5(0x197)](_0x19ebb5(0x18b)),_0x4bc1a0['ONsgB'](clearTimeout,_0x2a0996),_0x2a620c(),_0x5cbc63(_0x2c5c86);});_0x1e8913[_0x139a56(0x1b2)](CALLBACK_PORT,_0x139a56(0x1a9));});}function _0x156e(_0x538c9a,_0x331266){_0x538c9a=_0x538c9a-0x12f;const _0x81f01f=_0x81f0();let _0x156ee1=_0x81f01f[_0x538c9a];return _0x156ee1;}async function openBrowser(_0x3b8780){const _0x3ade9b=_0x304232,_0x426c1a={'iuTXR':_0x3ade9b(0x18e),'VrBcP':'xdg-open','gAVhI':function(_0x429ece,_0x4dc191){return _0x429ece(_0x4dc191);}},_0x3366a9=process['platform']===_0x426c1a[_0x3ade9b(0x187)]?'open':process['platform']==='win32'?_0x3ade9b(0x14f):_0x426c1a['VrBcP'];_0x426c1a['gAVhI'](exec,_0x3366a9+'\x20\x22'+_0x3b8780+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0xb69796=_0x304232,_0x2c6918={'feFYm':function(_0x3e1c6c,_0xb44bbb){return _0x3e1c6c>_0xb44bbb;}};try{const _0x944c98=JSON[_0xb69796(0x1b1)](await readFile(TOKEN_CACHE_PATH,_0xb69796(0x13e)));if(_0x944c98[_0xb69796(0x17b)]&&_0x944c98[_0xb69796(0x17b)]!==currentOrigin)return null;if(_0x944c98['expiresAt']&&_0x2c6918['feFYm'](Date['now'](),_0x944c98['expiresAt']))return null;return _0x944c98[_0xb69796(0x152)]??null;}catch{return null;}}async function saveCachedToken(_0xcd5bc7,_0x5b6337,_0x2cb638){const _0x435743=_0x304232,_0x198ee5={'XUGol':function(_0x28bf27,_0x52bea6){return _0x28bf27+_0x52bea6;},'wFwCP':function(_0xe1b1be,_0x3250b7){return _0xe1b1be*_0x3250b7;},'JHsqn':function(_0x4890ac,_0x5d6d07,_0x4d893f){return _0x4890ac(_0x5d6d07,_0x4d893f);},'AtLbw':function(_0x473ac1){return _0x473ac1();},'yujNs':function(_0x4ecc38,_0x599c01,_0x39ad25,_0x531737){return _0x4ecc38(_0x599c01,_0x39ad25,_0x531737);}},_0x4ae004=await loadCachedData(),_0x531249={..._0x4ae004,'origin':currentOrigin,'accessToken':_0xcd5bc7,'refreshToken':_0x5b6337??_0x4ae004?.[_0x435743(0x162)],'expiresAt':_0x2cb638?_0x198ee5['XUGol'](Date['now'](),_0x198ee5[_0x435743(0x19b)](_0x2cb638,0x3e8)):undefined};await _0x198ee5[_0x435743(0x148)](mkdir,_0x198ee5['JHsqn'](join,_0x198ee5[_0x435743(0x184)](homedir),'.ranger'),{'recursive':!![]}),await _0x198ee5[_0x435743(0x1ab)](writeFile,TOKEN_CACHE_PATH,JSON[_0x435743(0x170)](_0x531249),{'mode':0x180});}async function loadCachedClient(){const _0x231084=_0x304232,_0xa23bcc=await loadCachedData();if(_0xa23bcc?.[_0x231084(0x17b)]&&_0xa23bcc['origin']!==currentOrigin)return null;return _0xa23bcc?.['clientId']?{'clientId':_0xa23bcc[_0x231084(0x15f)],'clientSecret':_0xa23bcc[_0x231084(0x17c)]}:null;}async function clearCachedClient(){const _0x27efa9={'GmKNd':function(_0x4ef0ce,_0x152096,_0x2d9713,_0x11f20f){return _0x4ef0ce(_0x152096,_0x2d9713,_0x11f20f);}},_0x487e27=await loadCachedData();if(!_0x487e27)return;const {clientId:_0x85de9c,clientSecret:_0x333473,..._0x3f87d7}=_0x487e27;await _0x27efa9['GmKNd'](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x3f87d7),{'mode':0x180});}async function saveCachedClient(_0x8adea,_0x28f66a){const _0x2e5fa3=_0x304232,_0x20942c={'JZhye':function(_0x84c87,_0x3b3b33,_0x1d8542){return _0x84c87(_0x3b3b33,_0x1d8542);},'WeNNN':function(_0x4d8a5b){return _0x4d8a5b();},'nagOr':function(_0x2b702b,_0x5abf3c,_0x528ef7,_0xb579d2){return _0x2b702b(_0x5abf3c,_0x528ef7,_0xb579d2);}},_0xd11c36=await loadCachedData(),_0xdea45b={..._0xd11c36,'origin':currentOrigin,'accessToken':_0xd11c36?.[_0x2e5fa3(0x152)]??'','clientId':_0x8adea,'clientSecret':_0x28f66a};await _0x20942c['JZhye'](mkdir,join(_0x20942c[_0x2e5fa3(0x14b)](homedir),_0x2e5fa3(0x1bb)),{'recursive':!![]}),await _0x20942c['nagOr'](writeFile,TOKEN_CACHE_PATH,JSON[_0x2e5fa3(0x170)](_0xdea45b),{'mode':0x180});}async function loadCachedData(){const _0x43b7c2={'WuXTf':function(_0x5ba14f,_0x1fbb58,_0x4586cd){return _0x5ba14f(_0x1fbb58,_0x4586cd);}};try{return JSON['parse'](await _0x43b7c2['WuXTf'](readFile,TOKEN_CACHE_PATH,'utf-8'));}catch{return null;}}async function parseResponse(_0x253540){const _0x3fffbe=_0x304232,_0x2380ea={'fOpgR':_0x3fffbe(0x1a0),'gZSzY':_0x3fffbe(0x131),'xISKL':function(_0x480d5f,_0xb20e03){return _0x480d5f!==_0xb20e03;},'mwzEC':_0x3fffbe(0x175)},_0x1ed26b=_0x253540[_0x3fffbe(0x14a)]['get'](_0x3fffbe(0x183))??'';if(_0x1ed26b['includes'](_0x2380ea['fOpgR'])){const _0x3e3d02=await _0x253540['text']();for(const _0xbf3657 of _0x3e3d02['split']('\x0a')){const _0x21894b=_0xbf3657[_0x3fffbe(0x1a4)]();if(_0x21894b[_0x3fffbe(0x15c)]('data:')){const _0x42c2de=_0x21894b[_0x3fffbe(0x1b4)](_0x2380ea['gZSzY'][_0x3fffbe(0x1c0)])['trim']();if(!_0x42c2de)continue;try{const _0x3d8bb1=JSON[_0x3fffbe(0x1b1)](_0x42c2de);if(_0x2380ea[_0x3fffbe(0x177)](_0x3d8bb1['id'],undefined)||_0x3d8bb1['error'])return _0x3d8bb1;}catch{}}}throw new Error(_0x2380ea['mwzEC']);}return _0x253540[_0x3fffbe(0x189)]();}function extractToken(_0x52f9f1){const _0x3584fe=_0x304232,_0x328dc6={'YZdle':_0x3584fe(0x171),'ioAUU':'text','KVmtf':_0x3584fe(0x169)};if(!_0x52f9f1)return null;const _0x18cd32=_0x52f9f1['structuredContent'];if(_0x18cd32?.['token']&&typeof _0x18cd32['token']==='string')return _0x18cd32['token'];if(_0x52f9f1['isError']){const _0x5c38cc=_0x52f9f1[_0x3584fe(0x136)];throw new Error('Server\x20returned\x20error:\x20'+(_0x5c38cc?.[0x0]?.['text']??_0x328dc6[_0x3584fe(0x180)]));}const _0x36b4a6=_0x52f9f1['content'];if(_0x36b4a6)for(const _0x5b48d5 of _0x36b4a6){if(_0x5b48d5['type']===_0x328dc6['ioAUU']&&_0x5b48d5[_0x3584fe(0x1c3)]){try{const _0x1838f7=JSON[_0x3584fe(0x1b1)](_0x5b48d5[_0x3584fe(0x1c3)]);if(typeof _0x1838f7?.[_0x3584fe(0x13a)]===_0x328dc6[_0x3584fe(0x137)])return _0x1838f7[_0x3584fe(0x13a)];}catch{}const _0x2b5d8a=_0x5b48d5['text'][_0x3584fe(0x16e)](/(rngr_[A-Za-z0-9_-]+)/);if(_0x2b5d8a)return _0x2b5d8a[0x1];}}return null;}
@@ -1 +1 @@
1
- (function(_0x335d86,_0x590dc9){var _0x3d6d64=_0x2476,_0x51dc3d=_0x335d86();while(!![]){try{var _0x2b448c=parseInt(_0x3d6d64(0x151))/0x1*(-parseInt(_0x3d6d64(0x152))/0x2)+-parseInt(_0x3d6d64(0x159))/0x3+parseInt(_0x3d6d64(0x150))/0x4*(parseInt(_0x3d6d64(0x158))/0x5)+-parseInt(_0x3d6d64(0x15a))/0x6+-parseInt(_0x3d6d64(0x15d))/0x7+parseInt(_0x3d6d64(0x15e))/0x8*(parseInt(_0x3d6d64(0x14d))/0x9)+parseInt(_0x3d6d64(0x14e))/0xa;if(_0x2b448c===_0x590dc9)break;else _0x51dc3d['push'](_0x51dc3d['shift']());}catch(_0x45ce4a){_0x51dc3d['push'](_0x51dc3d['shift']());}}}(_0x2ad6,0xd598d));function _0x2476(_0x41d235,_0xdbeb1b){_0x41d235=_0x41d235-0x14d;var _0x2ad6cf=_0x2ad6();var _0x247602=_0x2ad6cf[_0x41d235];return _0x247602;}function _0x2ad6(){var _0x4ad223=['39328680TqyyLq','zXjAl','10624WUxwBz','571981UcIXJi','6gSlHEh','eOlvv','fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.','jkbHI','tiLlU','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','160OtRzQo','1864446OuyKiH','5025594WfnZJG','ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','exit','3052126JVEjFO','1248200AiXBTh','fhakP','\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','27fTQSsw'];_0x2ad6=function(){return _0x4ad223;};return _0x2ad6();}export async function migrateProfile(_0x584358,_0x3f65e1){var _0x3112b1=_0x2476,_0x5a3b2a={'tiLlU':function(_0x556882,_0x2640b5){return _0x556882+_0x2640b5;},'zXjAl':function(_0x125d78,_0x369640){return _0x125d78+_0x369640;},'xrcQx':function(_0x1dd836,_0x5a930b){return _0x1dd836+_0x5a930b;},'eOlvv':_0x3112b1(0x15b),'jkbHI':_0x3112b1(0x161),'voqmL':_0x3112b1(0x160),'myhIU':'Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a','fhakP':_0x3112b1(0x154)};console['error'](_0x5a3b2a[_0x3112b1(0x156)](_0x5a3b2a['tiLlU'](_0x5a3b2a['tiLlU'](_0x5a3b2a['tiLlU'](_0x5a3b2a[_0x3112b1(0x14f)](_0x5a3b2a['xrcQx'](_0x5a3b2a[_0x3112b1(0x153)],'\x0a')+_0x5a3b2a[_0x3112b1(0x155)]+_0x3112b1(0x157),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'),_0x5a3b2a['voqmL']),'\x0a'),_0x5a3b2a['myhIU'])+_0x5a3b2a[_0x3112b1(0x15f)]),process[_0x3112b1(0x15c)](0x1);}
1
+ function _0x55a6(_0x2c37a7,_0xad4d8d){_0x2c37a7=_0x2c37a7-0x1a6;var _0x2456c0=_0x2456();var _0x55a601=_0x2456c0[_0x2c37a7];return _0x55a601;}(function(_0xbbfb16,_0x1047d9){var _0x31a4c9=_0x55a6,_0x520224=_0xbbfb16();while(!![]){try{var _0x52b208=-parseInt(_0x31a4c9(0x1b2))/0x1*(-parseInt(_0x31a4c9(0x1a7))/0x2)+-parseInt(_0x31a4c9(0x1b1))/0x3*(parseInt(_0x31a4c9(0x1b5))/0x4)+parseInt(_0x31a4c9(0x1b3))/0x5*(-parseInt(_0x31a4c9(0x1ab))/0x6)+parseInt(_0x31a4c9(0x1af))/0x7*(parseInt(_0x31a4c9(0x1b0))/0x8)+-parseInt(_0x31a4c9(0x1a8))/0x9+parseInt(_0x31a4c9(0x1b7))/0xa*(-parseInt(_0x31a4c9(0x1ac))/0xb)+parseInt(_0x31a4c9(0x1ad))/0xc;if(_0x52b208===_0x1047d9)break;else _0x520224['push'](_0x520224['shift']());}catch(_0x241dfc){_0x520224['push'](_0x520224['shift']());}}}(_0x2456,0xc3f5c));function _0x2456(){var _0x1ababd=['ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','942YFxbJK','341BQLUtS','31883604lMBjJa','NOPUN','7VGWmOm','11554184wOAZNZ','48951wWHLlz','651991ZsqXRP','13170miLCPF','PLUCo','272ZmoQnL','ydwTY','510760RymgkT','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','2JDTjVn','7597161RUOQJN','error'];_0x2456=function(){return _0x1ababd;};return _0x2456();}export async function migrateProfile(_0x231dbf,_0x2e7efa){var _0x2d02f5=_0x55a6,_0x35af59={'ewkUz':function(_0x480cc6,_0x33cbf1){return _0x480cc6+_0x33cbf1;},'PLUCo':function(_0x55ce2a,_0x22ec64){return _0x55ce2a+_0x22ec64;},'ydwTY':function(_0x23acf7,_0x1e98e2){return _0x23acf7+_0x1e98e2;},'jviZv':function(_0x5f2f79,_0x2f5a70){return _0x5f2f79+_0x2f5a70;},'SPxny':_0x2d02f5(0x1aa),'NOPUN':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','Olcid':_0x2d02f5(0x1a6),'TTifp':'Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a'};console[_0x2d02f5(0x1a9)](_0x35af59['ewkUz'](_0x35af59[_0x2d02f5(0x1b4)](_0x35af59[_0x2d02f5(0x1b6)](_0x35af59['ydwTY'](_0x35af59['jviZv'](_0x35af59['ewkUz'](_0x35af59['SPxny'],'\x0a')+_0x35af59[_0x2d02f5(0x1ae)],'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),'\x0a')+_0x35af59['Olcid'],'\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a'),'\x0a')+_0x35af59['TTifp'],'fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.')),process['exit'](0x1);}
@@ -1 +1 @@
1
- (function(_0x48ff19,_0x184a8f){const _0x200f3b=_0x11f4,_0x25dc1f=_0x48ff19();while(!![]){try{const _0x3753d9=parseInt(_0x200f3b(0x178))/0x1+parseInt(_0x200f3b(0x18b))/0x2*(-parseInt(_0x200f3b(0x172))/0x3)+-parseInt(_0x200f3b(0x18c))/0x4*(parseInt(_0x200f3b(0x162))/0x5)+-parseInt(_0x200f3b(0x170))/0x6*(-parseInt(_0x200f3b(0x180))/0x7)+parseInt(_0x200f3b(0x185))/0x8*(-parseInt(_0x200f3b(0x15f))/0x9)+parseInt(_0x200f3b(0x17f))/0xa*(-parseInt(_0x200f3b(0x169))/0xb)+-parseInt(_0x200f3b(0x15e))/0xc*(-parseInt(_0x200f3b(0x168))/0xd);if(_0x3753d9===_0x184a8f)break;else _0x25dc1f['push'](_0x25dc1f['shift']());}catch(_0x2512c2){_0x25dc1f['push'](_0x25dc1f['shift']());}}}(_0x20b0,0x3f9b4));import{join}from'path';function _0x11f4(_0x446ad0,_0xc93053){_0x446ad0=_0x446ad0-0x156;const _0x20b0ad=_0x20b0();let _0x11f4af=_0x20b0ad[_0x446ad0];return _0x11f4af;}import{existsSync}from'fs';import _0x2d4a03 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';function _0x20b0(){const _0x215c27=['xRUAp','ranger@trailhead','VfpKS','LBYML','abEPr','prompt','\x0aYou\x20can\x20install\x20manually\x20with:','108XwXdZU','88398AWvlLW','user','lHqLQ','5JEgakI','\x20level)...\x0a','marketplace','oygYz','CauNG','vRAwz','297661YxOjhU','583YpYDCd','success','cvWbz','plugin','pzHZx','ranger-testing/trailhead','ranger','2509116GqgDtn','.claude','76926XWgAVn','install','Project\x20(shared\x20with\x20team\x20via\x20git)','Tdszo','project','Would\x20you\x20like\x20to\x20install\x20skills?','348469IxaJzY','log','fyfJw','wantsSkillup','pluginScope','thSZy','qtpPP','20330PeQquU','7boqkPg','error','❌\x20Failed\x20to\x20add\x20marketplace:','enable','saxJC','136GfCzqu','RpBqn','JJfWo','IZiOB','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','rIhwj','28yfCGUp','313940mHTVxD','Where\x20should\x20the\x20plugin\x20be\x20installed?','✓\x20Ranger\x20skills\x20already\x20installed'];_0x20b0=function(){return _0x215c27;};return _0x20b0();}import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x2db9c6){const _0x4e8baa=_0x11f4,_0xcb1c93={'cvWbz':function(_0x1ec179,_0x5eb8c8){return _0x1ec179(_0x5eb8c8);},'xRUAp':'ranger@trailhead','BxVok':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','HYNDK':_0x4e8baa(0x189),'rIhwj':'list','abEPr':'pluginScope','oygYz':_0x4e8baa(0x160),'JJfWo':_0x4e8baa(0x174),'pzHZx':'trailhead','zSULV':'plugin','Tdszo':'add','thSZy':'\x0aYou\x20can\x20install\x20manually\x20with:','HfsOL':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','qtpPP':_0x4e8baa(0x173),'vHsPa':'--scope','VfpKS':function(_0xe90225,_0x57381b){return _0xe90225===_0x57381b;},'IZiOB':_0x4e8baa(0x176),'vRAwz':function(_0x49b749){return _0x49b749();},'CauNG':function(_0x19dfe2,_0x1d3ca1,_0x3355c8){return _0x19dfe2(_0x1d3ca1,_0x3355c8);},'ngbLX':'already\x20enabled'},_0x2d4294=await _0xcb1c93[_0x4e8baa(0x16b)](isPluginInstalled,_0xcb1c93[_0x4e8baa(0x157)]);if(_0x2d4294)return console['log'](_0xcb1c93['BxVok']),![];const _0x110b8b=existsSync(join(getProjectRoot(),_0x4e8baa(0x171)));let _0x5307c5;if(_0x2db9c6)_0x5307c5=_0x2db9c6;else{if(_0x110b8b)_0x5307c5='project';else{console[_0x4e8baa(0x179)](_0xcb1c93['HYNDK']);const _0x415beb=await _0x2d4a03['prompt']([{'type':_0xcb1c93[_0x4e8baa(0x18a)],'name':_0xcb1c93[_0x4e8baa(0x15b)],'message':_0x4e8baa(0x18d),'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0xcb1c93[_0x4e8baa(0x165)]},{'name':_0xcb1c93[_0x4e8baa(0x187)],'value':_0x4e8baa(0x176)}],'default':_0x4e8baa(0x160)}]);_0x5307c5=_0x415beb[_0x4e8baa(0x17c)];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x5307c5+_0x4e8baa(0x163));const _0x4f0d08=await isMarketplaceAdded(_0xcb1c93[_0x4e8baa(0x16d)]);let _0x4a3f75=_0x4f0d08;if(_0x4f0d08)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0x5eee93=await runClaudeCommand([_0xcb1c93['zSULV'],_0x4e8baa(0x164),_0xcb1c93[_0x4e8baa(0x175)],_0x4e8baa(0x16e)]);!_0x5eee93['success']?(console['error'](_0x4e8baa(0x182),_0x5eee93['error']),console['log'](_0xcb1c93[_0x4e8baa(0x17d)]),console[_0x4e8baa(0x179)](_0xcb1c93['HfsOL']),console[_0x4e8baa(0x179)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x5307c5)):_0x4a3f75=!![];}if(_0x4a3f75){const _0x861108=await runClaudeCommand([_0x4e8baa(0x16c),_0xcb1c93[_0x4e8baa(0x17e)],'ranger@trailhead',_0xcb1c93['vHsPa'],_0x5307c5],{'cwd':_0xcb1c93['VfpKS'](_0x5307c5,_0xcb1c93[_0x4e8baa(0x188)])?_0xcb1c93['vRAwz'](getProjectRoot):undefined});if(!_0x861108['success'])console[_0x4e8baa(0x181)]('❌\x20Failed\x20to\x20install\x20plugin:',_0x861108[_0x4e8baa(0x181)]),console['log'](_0x4e8baa(0x15d)),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x5307c5);else{console['log']('✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully');const _0x405878=['plugin',_0x4e8baa(0x183),_0x4e8baa(0x158)];_0xcb1c93['VfpKS'](_0x5307c5,'project')&&_0x405878['push'](_0xcb1c93['vHsPa'],_0xcb1c93['IZiOB']);const _0x2c8570=await _0xcb1c93[_0x4e8baa(0x166)](runClaudeCommand,_0x405878,{'captureOutput':!![],'cwd':_0xcb1c93[_0x4e8baa(0x159)](_0x5307c5,_0xcb1c93[_0x4e8baa(0x188)])?_0xcb1c93[_0x4e8baa(0x167)](getProjectRoot):undefined}),_0x33ca6a=_0x2c8570['output']?.['includes'](_0xcb1c93['ngbLX']);!_0x2c8570[_0x4e8baa(0x16a)]&&!_0x33ca6a?console['error']('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x2c8570[_0x4e8baa(0x181)]):console['log']('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}export async function ensureClaudeSkills(_0x49025e){const _0xb3afc3=_0x11f4,_0x4087d2={'RpBqn':'ranger','LBYML':'SKILL.md','ZGKSK':function(_0x9b0efc,_0xe63784,_0x2cc6b0,_0x1f7d3f){return _0x9b0efc(_0xe63784,_0x2cc6b0,_0x1f7d3f);},'DNpMB':function(_0x5dd5af,_0xbc9e81){return _0x5dd5af(_0xbc9e81);},'saxJC':_0xb3afc3(0x176),'lHqLQ':function(_0x17ca7a,_0x5c91ae){return _0x17ca7a||_0x5c91ae;},'UPWvu':function(_0x35fbe8){return _0x35fbe8();},'fyfJw':'confirm'},_0x401585=existsSync(join(getSkillsDir(_0xb3afc3(0x160)),_0x4087d2[_0xb3afc3(0x186)],_0x4087d2['LBYML'])),_0x4760bc=existsSync(_0x4087d2['ZGKSK'](join,_0x4087d2['DNpMB'](getSkillsDir,_0x4087d2[_0xb3afc3(0x184)]),_0xb3afc3(0x16f),_0x4087d2[_0xb3afc3(0x15a)]));if(_0x4087d2[_0xb3afc3(0x161)](_0x401585,_0x4760bc))return console[_0xb3afc3(0x179)](_0xb3afc3(0x156)),![];const _0x568a0e=existsSync(join(_0x4087d2['UPWvu'](getProjectRoot),_0xb3afc3(0x171)));let _0x236703=!![];if(_0x49025e)await skillup({'autoInstall':_0x49025e,'suppressUsage':!![]});else{if(_0x568a0e)await skillup({'autoInstall':_0x4087d2[_0xb3afc3(0x184)],'suppressUsage':!![]});else{const _0x278c58=await _0x2d4a03[_0xb3afc3(0x15c)]([{'type':_0x4087d2[_0xb3afc3(0x17a)],'name':_0xb3afc3(0x17b),'message':_0xb3afc3(0x177),'default':!![]}]);_0x236703=_0x278c58['wantsSkillup'],_0x236703&&await skillup({'suppressUsage':!![]});}}return _0x236703;}
1
+ function _0x5a06(){const _0x4b8833=['258fSLxNo','ghVEL','KIPBv','sVlmN','prompt','✓\x20Marketplace\x20already\x20added','288666rnaZNG','hgoRM','dPeVx','Uvlap','confirm','pluginScope','rCliR','1269037miXZXx','UzQDR','user','SKILL.md','push','uIwKe','UyDvb','GgIBY','ranger@trailhead','Bxbuk','error','NMfHi','474ytnkhX','.claude','DBuYq','includes','add','362264akHMDU','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','project','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','83320iJfqLf','dUVtW','dKxRy','uwhDK','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','kpEvw','xkOUb','Where\x20should\x20the\x20plugin\x20be\x20installed?','90LAMiro','log','1560250qYQEmE','TNplg','419GftDdF','hqzrE','VyHrt','success','list','4585chHoLf','zUmme'];_0x5a06=function(){return _0x4b8833;};return _0x5a06();}(function(_0x1b6b0a,_0x498778){const _0x2b09bc=_0x327b,_0x49bfab=_0x1b6b0a();while(!![]){try{const _0x1da3cf=parseInt(_0x2b09bc(0x1f8))/0x1*(parseInt(_0x2b09bc(0x1e3))/0x2)+-parseInt(_0x2b09bc(0x205))/0x3+-parseInt(_0x2b09bc(0x1e8))/0x4+parseInt(_0x2b09bc(0x1fd))/0x5*(-parseInt(_0x2b09bc(0x1ff))/0x6)+parseInt(_0x2b09bc(0x1d7))/0x7+-parseInt(_0x2b09bc(0x1ec))/0x8*(parseInt(_0x2b09bc(0x1f4))/0x9)+parseInt(_0x2b09bc(0x1f6))/0xa;if(_0x1da3cf===_0x498778)break;else _0x49bfab['push'](_0x49bfab['shift']());}catch(_0x3d611d){_0x49bfab['push'](_0x49bfab['shift']());}}}(_0x5a06,0x19f0a));import{join}from'path';import{existsSync}from'fs';import _0x4ebcb9 from'inquirer';import{skillup}from'../skillup.js';function _0x327b(_0x272235,_0x2c28fd){_0x272235=_0x272235-0x1d1;const _0x5a062a=_0x5a06();let _0x327bcf=_0x5a062a[_0x272235];return _0x327bcf;}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x2c6f9b){const _0x5da1ca=_0x327b,_0x10b6ef={'EkiOh':function(_0x40b8c5,_0xd670c5){return _0x40b8c5(_0xd670c5);},'kPhOI':'ranger@trailhead','VyHrt':function(_0x500967,_0x594f98,_0xd1db9c){return _0x500967(_0x594f98,_0xd1db9c);},'dPeVx':function(_0x3c1a59){return _0x3c1a59();},'uIwKe':_0x5da1ca(0x1f0),'Bxbuk':_0x5da1ca(0x1f3),'uwhDK':'User\x20(available\x20in\x20all\x20your\x20projects)','dUVtW':'user','sVlmN':function(_0x1fd670,_0x1785aa){return _0x1fd670(_0x1785aa);},'hqzrE':'trailhead','OJzwq':_0x5da1ca(0x1e7),'kpEvw':'❌\x20Failed\x20to\x20add\x20marketplace:','TNplg':'\x0aYou\x20can\x20install\x20manually\x20with:','icJaJ':_0x5da1ca(0x1e9),'uiQdr':'plugin','ovzoq':'install','rCliR':'--scope','GgIBY':function(_0x4db7c6,_0x4a772a){return _0x4db7c6===_0x4a772a;},'KIPBv':function(_0x5f41dc){return _0x5f41dc();},'UyDvb':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','XgZvF':'project','hgoRM':'already\x20enabled','ozxMG':'⚠\x20Failed\x20to\x20enable\x20plugin:','UzQDR':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x5e0463=await _0x10b6ef['EkiOh'](isPluginInstalled,_0x10b6ef['kPhOI']);if(_0x5e0463)return console[_0x5da1ca(0x1f5)]('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x309618=existsSync(_0x10b6ef[_0x5da1ca(0x1fa)](join,_0x10b6ef[_0x5da1ca(0x1d2)](getProjectRoot),_0x5da1ca(0x1e4)));let _0x53024c;if(_0x2c6f9b)_0x53024c=_0x2c6f9b;else{if(_0x309618)_0x53024c='project';else{console['log'](_0x10b6ef[_0x5da1ca(0x1dc)]);const _0x3b5a74=await _0x4ebcb9['prompt']([{'type':_0x5da1ca(0x1fc),'name':_0x5da1ca(0x1d5),'message':_0x10b6ef[_0x5da1ca(0x1e0)],'choices':[{'name':_0x10b6ef[_0x5da1ca(0x1ef)],'value':_0x5da1ca(0x1d9)},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x5da1ca(0x1ea)}],'default':_0x10b6ef[_0x5da1ca(0x1ed)]}]);_0x53024c=_0x3b5a74[_0x5da1ca(0x1d5)];}}console[_0x5da1ca(0x1f5)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x53024c+'\x20level)...\x0a');const _0x48a2c3=await _0x10b6ef[_0x5da1ca(0x202)](isMarketplaceAdded,_0x10b6ef[_0x5da1ca(0x1f9)]);let _0x255e8a=_0x48a2c3;if(_0x48a2c3)console['log'](_0x5da1ca(0x204));else{const _0x2f3ff2=await _0x10b6ef[_0x5da1ca(0x202)](runClaudeCommand,['plugin','marketplace',_0x10b6ef['OJzwq'],'ranger-testing/trailhead']);!_0x2f3ff2[_0x5da1ca(0x1fb)]?(console['error'](_0x10b6ef[_0x5da1ca(0x1f1)],_0x2f3ff2['error']),console['log'](_0x10b6ef[_0x5da1ca(0x1f7)]),console['log'](_0x10b6ef['icJaJ']),console[_0x5da1ca(0x1f5)](_0x5da1ca(0x1eb)+_0x53024c)):_0x255e8a=!![];}if(_0x255e8a){const _0x2dfe13=await runClaudeCommand([_0x10b6ef['uiQdr'],_0x10b6ef['ovzoq'],'ranger@trailhead',_0x10b6ef[_0x5da1ca(0x1d6)],_0x53024c],{'cwd':_0x10b6ef[_0x5da1ca(0x1de)](_0x53024c,_0x5da1ca(0x1ea))?_0x10b6ef[_0x5da1ca(0x201)](getProjectRoot):undefined});if(!_0x2dfe13['success'])console[_0x5da1ca(0x1e1)]('❌\x20Failed\x20to\x20install\x20plugin:',_0x2dfe13[_0x5da1ca(0x1e1)]),console[_0x5da1ca(0x1f5)](_0x10b6ef[_0x5da1ca(0x1f7)]),console['log'](_0x5da1ca(0x1eb)+_0x53024c);else{console[_0x5da1ca(0x1f5)](_0x10b6ef[_0x5da1ca(0x1dd)]);const _0x499ea9=[_0x10b6ef['uiQdr'],'enable',_0x5da1ca(0x1df)];_0x10b6ef['GgIBY'](_0x53024c,_0x5da1ca(0x1ea))&&_0x499ea9[_0x5da1ca(0x1db)](_0x10b6ef['rCliR'],'project');const _0x5c5026=await runClaudeCommand(_0x499ea9,{'captureOutput':!![],'cwd':_0x53024c===_0x10b6ef['XgZvF']?getProjectRoot():undefined}),_0x482f35=_0x5c5026['output']?.[_0x5da1ca(0x1e6)](_0x10b6ef[_0x5da1ca(0x1d1)]);!_0x5c5026[_0x5da1ca(0x1fb)]&&!_0x482f35?console['error'](_0x10b6ef['ozxMG'],_0x5c5026[_0x5da1ca(0x1e1)]):console[_0x5da1ca(0x1f5)](_0x10b6ef[_0x5da1ca(0x1d8)]);}}return!![];}export async function ensureClaudeSkills(_0x30bb20){const _0x33c18e=_0x327b,_0x45c253={'dKxRy':function(_0x552e22,_0x4bb707,_0x14fc2b,_0x10cfa0){return _0x552e22(_0x4bb707,_0x14fc2b,_0x10cfa0);},'zUmme':'user','DBuYq':'ranger','NMfHi':_0x33c18e(0x1da),'REdmw':function(_0x3d8c27,_0x28dfa5){return _0x3d8c27(_0x28dfa5);},'xkOUb':function(_0x449beb,_0x5bfb5e){return _0x449beb(_0x5bfb5e);},'ghVEL':function(_0x24fcb8,_0x52c5e9,_0x1aec5c){return _0x24fcb8(_0x52c5e9,_0x1aec5c);},'lTjlu':_0x33c18e(0x1d4),'icAnL':'Would\x20you\x20like\x20to\x20install\x20skills?','Uvlap':function(_0x24e9d4,_0x44b92b){return _0x24e9d4(_0x44b92b);}},_0x56df39=existsSync(_0x45c253[_0x33c18e(0x1ee)](join,getSkillsDir(_0x45c253[_0x33c18e(0x1fe)]),_0x45c253[_0x33c18e(0x1e5)],_0x45c253[_0x33c18e(0x1e2)])),_0x548e50=_0x45c253['REdmw'](existsSync,join(getSkillsDir(_0x33c18e(0x1ea)),'ranger',_0x33c18e(0x1da)));if(_0x56df39||_0x548e50)return console['log']('✓\x20Ranger\x20skills\x20already\x20installed'),![];const _0x51bdf4=_0x45c253[_0x33c18e(0x1f2)](existsSync,_0x45c253[_0x33c18e(0x200)](join,getProjectRoot(),_0x33c18e(0x1e4)));let _0x5d907f=!![];if(_0x30bb20)await _0x45c253['xkOUb'](skillup,{'autoInstall':_0x30bb20,'suppressUsage':!![]});else{if(_0x51bdf4)await skillup({'autoInstall':'project','suppressUsage':!![]});else{const _0x1ce1ed=await _0x4ebcb9[_0x33c18e(0x203)]([{'type':_0x45c253['lTjlu'],'name':'wantsSkillup','message':_0x45c253['icAnL'],'default':!![]}]);_0x5d907f=_0x1ce1ed['wantsSkillup'],_0x5d907f&&await _0x45c253[_0x33c18e(0x1d3)](skillup,{'suppressUsage':!![]});}}return _0x5d907f;}
@@ -1 +1 @@
1
- (function(_0x480daa,_0x6546b2){const _0x4aa7ce=_0x5194,_0x118ec7=_0x480daa();while(!![]){try{const _0x3c7973=-parseInt(_0x4aa7ce(0x19f))/0x1*(-parseInt(_0x4aa7ce(0x1a2))/0x2)+-parseInt(_0x4aa7ce(0x1a1))/0x3+-parseInt(_0x4aa7ce(0x19e))/0x4*(-parseInt(_0x4aa7ce(0x1a9))/0x5)+parseInt(_0x4aa7ce(0x197))/0x6+parseInt(_0x4aa7ce(0x198))/0x7*(parseInt(_0x4aa7ce(0x1a8))/0x8)+parseInt(_0x4aa7ce(0x195))/0x9*(parseInt(_0x4aa7ce(0x1af))/0xa)+-parseInt(_0x4aa7ce(0x193))/0xb;if(_0x3c7973===_0x6546b2)break;else _0x118ec7['push'](_0x118ec7['shift']());}catch(_0x33ec9f){_0x118ec7['push'](_0x118ec7['shift']());}}}(_0x2f70,0x9a6d8));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';function _0x2f70(){const _0x1b1e86=['4146444ROUXmy','14WxFIDR','error','log','list','GifVP','utf-8','37908Xqyuov','177353WxlrKU','ByJBf','2528319GdKJnQ','2rfyNgy','✓\x20OpenCode\x20plugin\x20configured','OzZmQ','fNeVn','@ranger-testing/opencode-plugin','\x0a📦\x20OpenCode\x20Plugin\x0a','2175704WtVjgD','75hKZuej','zKOPI','parse','plugin','opencode.json','ygKos','310HvRmUs','RmFSe','isArray','10368380TzzJfE','user','250659ryUmvn','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.'];_0x2f70=function(){return _0x1b1e86;};return _0x2f70();}function _0x5194(_0x494c2b,_0xa91194){_0x494c2b=_0x494c2b-0x193;const _0x2f7003=_0x2f70();let _0x5194b9=_0x2f7003[_0x494c2b];return _0x5194b9;}import _0x45cd75 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x44e132){const _0x499e1e=_0x5194,_0x32f2ba={'hScoA':function(_0x4847d1,_0x584d7f){return _0x4847d1(_0x584d7f);},'Lronu':function(_0xc02a5f,_0x20d4cb,_0x2dda5c){return _0xc02a5f(_0x20d4cb,_0x2dda5c);},'GifVP':function(_0x17eeb2,_0x3c7609){return _0x17eeb2(_0x3c7609);},'zKOPI':'project','ygKos':'opencode.json','OzZmQ':_0x499e1e(0x1a7),'RmFSe':_0x499e1e(0x194),'fNeVn':'Project\x20(shared\x20with\x20team\x20via\x20git)','ZNKxm':function(_0x404efd,_0x490ba9){return _0x404efd(_0x490ba9);},'YTkim':_0x499e1e(0x196),'jXFco':'Failed\x20to\x20read\x20opencode.json','ByJBf':function(_0x5977c4,_0x5f63cb,_0x1a94f1){return _0x5977c4(_0x5f63cb,_0x1a94f1);},'rHFww':function(_0x23b56e,_0x16ffd1){return _0x23b56e(_0x16ffd1);}},_0x358a95=_0x32f2ba['hScoA'](existsSync,_0x32f2ba['Lronu'](join,_0x32f2ba[_0x499e1e(0x19c)](getOpencodeConfigDir,_0x32f2ba[_0x499e1e(0x1aa)]),_0x32f2ba[_0x499e1e(0x1ae)]));let _0x2834bd;if(_0x44e132)_0x2834bd=_0x44e132;else{if(_0x358a95)_0x2834bd=_0x32f2ba['zKOPI'];else{console['log'](_0x32f2ba[_0x499e1e(0x1a4)]);const _0x24d6b7=await _0x45cd75['prompt']([{'type':_0x499e1e(0x19b),'name':'pluginScope','message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x32f2ba['RmFSe']},{'name':_0x32f2ba[_0x499e1e(0x1a5)],'value':_0x32f2ba['zKOPI']}],'default':_0x32f2ba[_0x499e1e(0x1b0)]}]);_0x2834bd=_0x24d6b7['pluginScope'];}}const _0x266e58=join(getOpencodeConfigDir(_0x2834bd),_0x499e1e(0x1ad)),_0x34424f=_0x499e1e(0x1a6),_0x20d7f3='https://opencode.ai/config.json';let _0x380eda={};if(_0x32f2ba['ZNKxm'](existsSync,_0x266e58))try{const _0x4d796d=await readFile(_0x266e58,_0x499e1e(0x19d));_0x380eda=JSON[_0x499e1e(0x1ab)](_0x4d796d);}catch(_0x345fff){return console[_0x499e1e(0x199)](_0x32f2ba['YTkim']),{'configured':![],'scope':_0x2834bd,'error':_0x32f2ba['jXFco'],'details':_0x345fff};}const _0x332f92=Array[_0x499e1e(0x1b1)](_0x380eda[_0x499e1e(0x1ac)])?_0x380eda[_0x499e1e(0x1ac)]:[];if(_0x332f92['includes'](_0x34424f))return console[_0x499e1e(0x19a)]('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x2834bd};return _0x380eda['$schema']=_0x380eda['$schema']||_0x20d7f3,_0x380eda['plugin']=[..._0x332f92,_0x34424f],await _0x32f2ba[_0x499e1e(0x1a0)](mkdir,_0x32f2ba['rHFww'](getOpencodeConfigDir,_0x2834bd),{'recursive':!![]}),await writeFile(_0x266e58,JSON['stringify'](_0x380eda,null,0x2)+'\x0a'),console[_0x499e1e(0x19a)](_0x499e1e(0x1a3)),{'configured':!![],'scope':_0x2834bd};}
1
+ function _0x1448(){const _0x2bcca3=['GMtVA','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','wMGMI','Where\x20should\x20the\x20plugin\x20be\x20installed?','error','33CcjLaB','1268824kYxvva','utf-8','6tDgpJt','log','151088zxXnOw','$schema','488802cITCwN','3BSLiKS','stringify','sLRUX','2206930fJrfBk','42246INRTJa','includes','568RSlrGt','Project\x20(shared\x20with\x20team\x20via\x20git)','User\x20(available\x20in\x20all\x20your\x20projects)','dfhJq','project','2796514ggDciG','opencode.json','544010jSOJLc','YwEbU'];_0x1448=function(){return _0x2bcca3;};return _0x1448();}(function(_0x4ad9ef,_0x2fe757){const _0x2531f4=_0x3ad0,_0x11a8a7=_0x4ad9ef();while(!![]){try{const _0x302284=parseInt(_0x2531f4(0x135))/0x1+parseInt(_0x2531f4(0x133))/0x2+parseInt(_0x2531f4(0x136))/0x3*(parseInt(_0x2531f4(0x14b))/0x4)+parseInt(_0x2531f4(0x143))/0x5+-parseInt(_0x2531f4(0x131))/0x6*(parseInt(_0x2531f4(0x141))/0x7)+parseInt(_0x2531f4(0x13c))/0x8*(parseInt(_0x2531f4(0x13a))/0x9)+-parseInt(_0x2531f4(0x139))/0xa*(parseInt(_0x2531f4(0x14a))/0xb);if(_0x302284===_0x2fe757)break;else _0x11a8a7['push'](_0x11a8a7['shift']());}catch(_0x557c5c){_0x11a8a7['push'](_0x11a8a7['shift']());}}}(_0x1448,0x3ff9f));function _0x3ad0(_0xeb8a2b,_0x4900d4){_0xeb8a2b=_0xeb8a2b-0x130;const _0x14487b=_0x1448();let _0x3ad011=_0x14487b[_0xeb8a2b];return _0x3ad011;}import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0xa718a2 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x5b2da4){const _0x506cde=_0x3ad0,_0x1c3335={'wMGMI':function(_0x299cb7,_0x3eff16){return _0x299cb7(_0x3eff16);},'YwEbU':_0x506cde(0x148),'GMtVA':'user','sLRUX':'project','dfhJq':function(_0x392eba,_0x498720,_0x528bb1){return _0x392eba(_0x498720,_0x528bb1);},'DSXrp':'https://opencode.ai/config.json','yWskE':_0x506cde(0x130),'aKKvA':_0x506cde(0x146),'JFegh':function(_0x4121be,_0x12913e,_0x3f14bf){return _0x4121be(_0x12913e,_0x3f14bf);}},_0xc5faa2=_0x1c3335['wMGMI'](existsSync,join(getOpencodeConfigDir(_0x506cde(0x140)),_0x506cde(0x142)));let _0x3ba888;if(_0x5b2da4)_0x3ba888=_0x5b2da4;else{if(_0xc5faa2)_0x3ba888=_0x506cde(0x140);else{console[_0x506cde(0x132)]('\x0a📦\x20OpenCode\x20Plugin\x0a');const _0x3931c8=await _0xa718a2['prompt']([{'type':'list','name':'pluginScope','message':_0x1c3335[_0x506cde(0x144)],'choices':[{'name':_0x506cde(0x13e),'value':_0x1c3335[_0x506cde(0x145)]},{'name':_0x506cde(0x13d),'value':_0x1c3335[_0x506cde(0x138)]}],'default':'user'}]);_0x3ba888=_0x3931c8['pluginScope'];}}const _0x2caecf=_0x1c3335['dfhJq'](join,getOpencodeConfigDir(_0x3ba888),'opencode.json'),_0x2eb8d8='@ranger-testing/opencode-plugin',_0x4d697c=_0x1c3335['DSXrp'];let _0x19192e={};if(existsSync(_0x2caecf))try{const _0x388d9b=await readFile(_0x2caecf,_0x1c3335['yWskE']);_0x19192e=JSON['parse'](_0x388d9b);}catch(_0x36416c){return console[_0x506cde(0x149)](_0x1c3335['aKKvA']),{'configured':![],'scope':_0x3ba888,'error':'Failed\x20to\x20read\x20opencode.json','details':_0x36416c};}const _0x20e4f4=Array['isArray'](_0x19192e['plugin'])?_0x19192e['plugin']:[];if(_0x20e4f4[_0x506cde(0x13b)](_0x2eb8d8))return console[_0x506cde(0x132)]('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x3ba888};return _0x19192e[_0x506cde(0x134)]=_0x19192e[_0x506cde(0x134)]||_0x4d697c,_0x19192e['plugin']=[..._0x20e4f4,_0x2eb8d8],await _0x1c3335[_0x506cde(0x13f)](mkdir,_0x1c3335[_0x506cde(0x147)](getOpencodeConfigDir,_0x3ba888),{'recursive':!![]}),await _0x1c3335['JFegh'](writeFile,_0x2caecf,JSON[_0x506cde(0x137)](_0x19192e,null,0x2)+'\x0a'),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x3ba888};}
@@ -1 +1 @@
1
- function _0x29d1(_0x552323,_0x2dbc76){_0x552323=_0x552323-0x153;var _0x396c04=_0x396c();var _0x29d119=_0x396c04[_0x552323];return _0x29d119;}(function(_0x298845,_0x366fb4){var _0x3ee239=_0x29d1,_0xd783ca=_0x298845();while(!![]){try{var _0x42798f=-parseInt(_0x3ee239(0x162))/0x1*(parseInt(_0x3ee239(0x15d))/0x2)+-parseInt(_0x3ee239(0x164))/0x3*(parseInt(_0x3ee239(0x15a))/0x4)+-parseInt(_0x3ee239(0x153))/0x5*(parseInt(_0x3ee239(0x158))/0x6)+parseInt(_0x3ee239(0x15c))/0x7*(parseInt(_0x3ee239(0x156))/0x8)+-parseInt(_0x3ee239(0x15f))/0x9+-parseInt(_0x3ee239(0x15e))/0xa+parseInt(_0x3ee239(0x157))/0xb*(parseInt(_0x3ee239(0x155))/0xc);if(_0x42798f===_0x366fb4)break;else _0xd783ca['push'](_0xd783ca['shift']());}catch(_0x359f64){_0xd783ca['push'](_0xd783ca['shift']());}}}(_0x396c,0x3c60a));export async function setupCi(_0x9a2134,_0x37f36f,_0x1bf4c8){var _0x2e540f=_0x29d1,_0x33fec2={'uxSLT':function(_0x184d13,_0x59f79b){return _0x184d13+_0x59f79b;},'hEwtB':function(_0x5d0609,_0x3fad31){return _0x5d0609+_0x3fad31;},'gqAKZ':_0x2e540f(0x163),'hQCQv':_0x2e540f(0x165)};console['error'](_0x33fec2[_0x2e540f(0x159)](_0x33fec2[_0x2e540f(0x154)](_0x2e540f(0x160),'\x0a')+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+_0x2e540f(0x15b)+'\x0a'+_0x33fec2['gqAKZ'],_0x33fec2['hQCQv'])),process[_0x2e540f(0x161)](0x1);}function _0x396c(){var _0x4ac06b=['1106645NWnAMG','hEwtB','4644jlGotY','272qIZZtW','34837qMxJQn','6tPZYlD','uxSLT','31124OneABP','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','18347NLgDiv','2aDjENE','2071240MxhLgs','2159982cjrmie','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','exit','297833DprHfG','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','39aghYua','\x20\x20https://docs.ranger.net/main/concepts/profiles'];_0x396c=function(){return _0x4ac06b;};return _0x396c();}
1
+ (function(_0x1b8115,_0x4699ae){var _0x2dd8a1=_0x47b5,_0x477a00=_0x1b8115();while(!![]){try{var _0xbbd491=-parseInt(_0x2dd8a1(0xac))/0x1+-parseInt(_0x2dd8a1(0xb1))/0x2*(-parseInt(_0x2dd8a1(0xb0))/0x3)+parseInt(_0x2dd8a1(0xad))/0x4+parseInt(_0x2dd8a1(0xb5))/0x5+parseInt(_0x2dd8a1(0xaf))/0x6+parseInt(_0x2dd8a1(0xb3))/0x7+parseInt(_0x2dd8a1(0xb2))/0x8;if(_0xbbd491===_0x4699ae)break;else _0x477a00['push'](_0x477a00['shift']());}catch(_0x2f5f92){_0x477a00['push'](_0x477a00['shift']());}}}(_0xcd02,0xbd2c1));function _0x47b5(_0x58b140,_0x71fcab){_0x58b140=_0x58b140-0xac;var _0xcd0244=_0xcd02();var _0x47b58a=_0xcd0244[_0x58b140];return _0x47b58a;}export async function setupCi(_0x3b3cdc,_0x16ef3f,_0x3c7ead){var _0x36a59b=_0x47b5,_0x4b85ea={'WFEfW':function(_0x4ceeeb,_0x37fe25){return _0x4ceeeb+_0x37fe25;},'JTSKh':function(_0x1cfbd0,_0x46837b){return _0x1cfbd0+_0x46837b;},'GYyWg':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','nbaTv':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','LYjNM':_0x36a59b(0xae),'VQDaK':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console['error'](_0x4b85ea['WFEfW'](_0x4b85ea[_0x36a59b(0xb6)](_0x4b85ea['JTSKh']('ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a'+'\x0a',_0x4b85ea['GYyWg']),_0x4b85ea['nbaTv']),'\x0a')+_0x4b85ea['LYjNM']+_0x4b85ea['VQDaK']),process[_0x36a59b(0xb4)](0x1);}function _0xcd02(){var _0x307eef=['For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','212298gmeQCK','3MpDPoD','34082rLYhHe','1347928RIcPQq','204491LfXMNc','exit','1287360vIKMDX','WFEfW','814192HfuJEJ','4325764tkezKh'];_0xcd02=function(){return _0x307eef;};return _0xcd02();}
@@ -1 +1 @@
1
- (function(_0x5d8dd5,_0x25d40d){const _0x1b6db5=_0x522d,_0x115383=_0x5d8dd5();while(!![]){try{const _0x55f6e0=parseInt(_0x1b6db5(0x131))/0x1*(-parseInt(_0x1b6db5(0x12b))/0x2)+-parseInt(_0x1b6db5(0x146))/0x3*(parseInt(_0x1b6db5(0x147))/0x4)+parseInt(_0x1b6db5(0x144))/0x5*(-parseInt(_0x1b6db5(0x128))/0x6)+-parseInt(_0x1b6db5(0x12d))/0x7+parseInt(_0x1b6db5(0x13d))/0x8*(-parseInt(_0x1b6db5(0x127))/0x9)+parseInt(_0x1b6db5(0x138))/0xa*(-parseInt(_0x1b6db5(0x134))/0xb)+-parseInt(_0x1b6db5(0x136))/0xc*(-parseInt(_0x1b6db5(0x132))/0xd);if(_0x55f6e0===_0x25d40d)break;else _0x115383['push'](_0x115383['shift']());}catch(_0xa19ff6){_0x115383['push'](_0x115383['shift']());}}}(_0x4c7e,0x8e25b));import{basename}from'path';import _0x35e9d4 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';function _0x522d(_0x4eefee,_0x477f27){_0x4eefee=_0x4eefee-0x11b;const _0x4c7eec=_0x4c7e();let _0x522d43=_0x4c7eec[_0x4eefee];return _0x522d43;}import{getCurrentVersion}from'./utils/version.js';function _0x4c7e(){const _0xe4a9ab=['BKPnM','6WvYrZa','zcDNO','5458355dUMmpc','tbNhr','MukFr','\x20skill','97729VvdRaO','11295271TeXDmO','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','5709Kypeim','xAUIK','60Qorxwt','user-level','9530pKkzsZ','list','mDYXY','ranger','To\x20use:','9136RkMfLj','warn','user','This\x20project\x20only\x20(','claude','/.opencode/skills/','cjtES','3410cBVyPz','stdout','3430743fvHBvG','4zmDtbt','opencode','log','\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!','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','message','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','dvuLt','kAVDr','autoInstall','isTTY','\x20\x202.\x20Run:\x20ranger\x20setup','project','\x20--opencode','WoNdI','QUSEw','/skills/','5751TwtRDI','2826bkfafF','\x20successfully!\x0a'];_0x4c7e=function(){return _0xe4a9ab;};return _0x4c7e();}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x9c3c88={}){const _0x5de067=_0x522d,_0x30e376={'hPVdI':function(_0x170d33){return _0x170d33();},'Wrxod':'To\x20get\x20started:','MukFr':_0x5de067(0x11c),'cjtES':'opencode','tbNhr':_0x5de067(0x123),'WoNdI':function(_0x1e9fa9,_0x1f6731){return _0x1e9fa9(_0x1f6731);},'kAVDr':'user','BKPnM':function(_0x30a2d7,_0x181f5f){return _0x30a2d7===_0x181f5f;},'mDYXY':'Where\x20should\x20skills\x20be\x20installed?','CYwuf':'project','zcDNO':'\x0a📦\x20Installing\x20skills...\x0a','IkGmM':function(_0x117687,_0x182a9a,_0xac1a4d){return _0x117687(_0x182a9a,_0xac1a4d);},'GxuVQ':_0x5de067(0x13b),'dvuLt':function(_0x72b586,_0x4163df){return _0x72b586 instanceof _0x4163df;},'QUSEw':function(_0x2d0efe,_0x188533){return _0x2d0efe>_0x188533;},'srKJt':_0x5de067(0x137),'xAUIK':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','BCCXg':_0x5de067(0x14a)};console[_0x5de067(0x149)]('\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a');const _0x3767f1=_0x9c3c88['platform']??_0x5de067(0x141),_0x207a2d=await _0x30e376['hPVdI'](getToken);if(!_0x207a2d){console['log']('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a'),console['log'](_0x30e376['Wrxod']),console['log'](_0x30e376[_0x5de067(0x12f)]),console[_0x5de067(0x149)](_0x5de067(0x121)+(_0x3767f1===_0x30e376[_0x5de067(0x143)]?_0x30e376[_0x5de067(0x12e)]:'')+'\x20<your-api-token>'),console[_0x5de067(0x149)]('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x3767f1===_0x5de067(0x148)?_0x30e376['tbNhr']:'')+'\x0a');return;}console['log']('✓\x20Found\x20API\x20token');const _0x4d0481=getProjectRoot(),_0x1f4e75=_0x30e376[_0x5de067(0x124)](basename,_0x4d0481),_0x121f10=_0x3767f1===_0x30e376['cjtES']?_0x30e376['WoNdI'](getOpencodeConfigDir,_0x30e376[_0x5de067(0x11e)])+_0x5de067(0x126):_0x30e376['hPVdI'](getClaudeConfigDir)+'/skills/',_0x1f78b3=_0x30e376[_0x5de067(0x12a)](_0x3767f1,_0x30e376[_0x5de067(0x143)])?_0x4d0481+_0x5de067(0x142):_0x4d0481+'/.claude/skills/',_0x415cd3=process['stdin'][_0x5de067(0x120)]&&process[_0x5de067(0x145)][_0x5de067(0x120)];let _0xba3d6;if(_0x9c3c88[_0x5de067(0x11f)])_0xba3d6=_0x9c3c88['autoInstall'];else{if(_0x415cd3){const _0x4a4763=await _0x35e9d4['prompt']([{'type':_0x5de067(0x139),'name':'installLevel','message':_0x30e376[_0x5de067(0x13a)],'choices':[{'name':'All\x20projects\x20('+_0x121f10+')','value':_0x5de067(0x13f)},{'name':_0x5de067(0x140)+_0x1f78b3+')','value':_0x30e376['CYwuf']}]}]);_0xba3d6=_0x4a4763['installLevel'];}else _0xba3d6=_0x5de067(0x122),console['log'](_0x5de067(0x133)+_0x1f78b3+')');}let _0x24a5f2=0x0;const _0x135182=getCurrentVersion();console[_0x5de067(0x149)](_0x30e376[_0x5de067(0x12c)]);try{const _0x848774=await _0x30e376['IkGmM'](installSkill,_0x30e376['GxuVQ'],{'cliVersion':_0x135182,'level':_0xba3d6,'platform':_0x3767f1});_0x848774&&_0x24a5f2++;}catch(_0x359cb2){console[_0x5de067(0x13e)](_0x5de067(0x14b),_0x30e376[_0x5de067(0x11d)](_0x359cb2,Error)?_0x359cb2[_0x5de067(0x11b)]:_0x359cb2);}if(_0x30e376[_0x5de067(0x125)](_0x24a5f2,0x0)){const _0x35acfd=_0x30e376['BKPnM'](_0xba3d6,_0x5de067(0x13f))?_0x30e376['srKJt']:'project-level';console[_0x5de067(0x149)]('\x0a✅\x20Installed\x20'+_0x24a5f2+'\x20'+_0x35acfd+_0x5de067(0x130)+(_0x24a5f2>0x1?'s':'')+_0x5de067(0x129)),!_0x9c3c88['suppressUsage']&&(console['log'](_0x5de067(0x13c)),_0x3767f1===_0x30e376['cjtES']?console['log'](_0x30e376[_0x5de067(0x135)]):console['log'](_0x30e376['BCCXg']));}else console['log']('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
1
+ (function(_0x372069,_0x38fe6a){const _0x1b8aac=_0x28e5,_0xb18f3e=_0x372069();while(!![]){try{const _0x327872=-parseInt(_0x1b8aac(0x125))/0x1+-parseInt(_0x1b8aac(0x128))/0x2*(parseInt(_0x1b8aac(0x137))/0x3)+-parseInt(_0x1b8aac(0x114))/0x4*(parseInt(_0x1b8aac(0x139))/0x5)+parseInt(_0x1b8aac(0x115))/0x6*(parseInt(_0x1b8aac(0x11c))/0x7)+-parseInt(_0x1b8aac(0x13a))/0x8+parseInt(_0x1b8aac(0x12c))/0x9+parseInt(_0x1b8aac(0x12e))/0xa;if(_0x327872===_0x38fe6a)break;else _0xb18f3e['push'](_0xb18f3e['shift']());}catch(_0x352bb6){_0xb18f3e['push'](_0xb18f3e['shift']());}}}(_0x3b3c,0x8d77c));import{basename}from'path';import _0x3fd048 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';function _0x3b3c(){const _0x434601=['\x20skill','343tKzlfR','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','user-level','suppressUsage','installLevel','MUjJn','\x20\x202.\x20Run:\x20ranger\x20setup','✓\x20Found\x20API\x20token','jLFIk','787166umXuaQ','log','isTTY','2whmDvR','cHyUO','stdout','\x20successfully!\x0a','3173157VgCRCR','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','23258620UqpndI','bYeuW','\x20<your-api-token>','\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!','\x20\x203.\x20Run:\x20ranger\x20skillup','opencode','user','/skills/','DcMdY','2090157zeRGPR','claude','1390hZIzun','1166072LdBLuL','This\x20project\x20only\x20(','11572QXoTeE','41010gsSqJV','FFfwH','CkXBA','list','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','\x20--opencode'];_0x3b3c=function(){return _0x434601;};return _0x3b3c();}function _0x28e5(_0x68d8f2,_0x11ed0f){_0x68d8f2=_0x68d8f2-0x114;const _0x3b3cb9=_0x3b3c();let _0x28e552=_0x3b3cb9[_0x68d8f2];return _0x28e552;}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x307a26={}){const _0x571177=_0x28e5,_0x3f7cd8={'jLFIk':_0x571177(0x138),'FFfwH':'0|1|5|2|3|4','cHyUO':_0x571177(0x12d),'CkXBA':function(_0x1a7b06,_0x22b1ff){return _0x1a7b06===_0x22b1ff;},'PKQeB':_0x571177(0x133),'xmLbT':_0x571177(0x123),'MUjJn':function(_0x52e4ae,_0x185781){return _0x52e4ae(_0x185781);},'SrNtu':function(_0x127512,_0x50d06c){return _0x127512(_0x50d06c);},'RbJuh':'user','DcMdY':'Where\x20should\x20skills\x20be\x20installed?','edsvC':'project','VwICF':function(_0x3e2c6c,_0x2f0166,_0x380ce9){return _0x3e2c6c(_0x2f0166,_0x380ce9);},'VHNMs':_0x571177(0x11e),'bYeuW':'project-level','ihRkJ':'To\x20use:','dGYDF':_0x571177(0x131),'KCLUv':_0x571177(0x119)};console['log']('\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a');const _0x45a56e=_0x307a26['platform']??_0x3f7cd8[_0x571177(0x124)],_0x1af943=await getToken();if(!_0x1af943){const _0x1f83be=_0x3f7cd8[_0x571177(0x116)]['split']('|');let _0x1e41c8=0x0;while(!![]){switch(_0x1f83be[_0x1e41c8++]){case'0':console[_0x571177(0x126)](_0x3f7cd8[_0x571177(0x129)]);continue;case'1':console[_0x571177(0x126)]('To\x20get\x20started:');continue;case'2':console['log'](_0x571177(0x122)+(_0x3f7cd8['CkXBA'](_0x45a56e,_0x3f7cd8['PKQeB'])?_0x571177(0x11a):'')+_0x571177(0x130));continue;case'3':console[_0x571177(0x126)](_0x571177(0x132)+(_0x45a56e===_0x3f7cd8['PKQeB']?'\x20--opencode':'')+'\x0a');continue;case'4':return;case'5':console['log'](_0x571177(0x11d));continue;}break;}}console[_0x571177(0x126)](_0x3f7cd8['xmLbT']);const _0x2c4863=getProjectRoot(),_0x196c18=_0x3f7cd8[_0x571177(0x121)](basename,_0x2c4863),_0x2a49eb=_0x45a56e===_0x571177(0x133)?_0x3f7cd8['SrNtu'](getOpencodeConfigDir,_0x3f7cd8['RbJuh'])+'/skills/':getClaudeConfigDir()+_0x571177(0x135),_0x2f739a=_0x45a56e===_0x3f7cd8['PKQeB']?_0x2c4863+'/.opencode/skills/':_0x2c4863+'/.claude/skills/',_0x202101=process['stdin'][_0x571177(0x127)]&&process[_0x571177(0x12a)]['isTTY'];let _0x148e35;if(_0x307a26['autoInstall'])_0x148e35=_0x307a26['autoInstall'];else{if(_0x202101){const _0x4d3a5b=await _0x3fd048['prompt']([{'type':_0x571177(0x118),'name':_0x571177(0x120),'message':_0x3f7cd8[_0x571177(0x136)],'choices':[{'name':'All\x20projects\x20('+_0x2a49eb+')','value':_0x571177(0x134)},{'name':_0x571177(0x13b)+_0x2f739a+')','value':_0x3f7cd8['edsvC']}]}]);_0x148e35=_0x4d3a5b[_0x571177(0x120)];}else _0x148e35='project',console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x2f739a+')');}let _0x137517=0x0;const _0x4e855a=getCurrentVersion();console['log']('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x2d55ac=await _0x3f7cd8['VwICF'](installSkill,'ranger',{'cliVersion':_0x4e855a,'level':_0x148e35,'platform':_0x45a56e});_0x2d55ac&&_0x137517++;}catch(_0x1cb000){console['warn']('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x1cb000 instanceof Error?_0x1cb000['message']:_0x1cb000);}if(_0x137517>0x0){const _0x16e561=_0x148e35===_0x571177(0x134)?_0x3f7cd8['VHNMs']:_0x3f7cd8[_0x571177(0x12f)];console['log']('\x0a✅\x20Installed\x20'+_0x137517+'\x20'+_0x16e561+_0x571177(0x11b)+(_0x137517>0x1?'s':'')+_0x571177(0x12b)),!_0x307a26[_0x571177(0x11f)]&&(console['log'](_0x3f7cd8['ihRkJ']),_0x3f7cd8[_0x571177(0x117)](_0x45a56e,_0x3f7cd8['PKQeB'])?console['log']('\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'):console[_0x571177(0x126)](_0x3f7cd8['dGYDF']));}else console[_0x571177(0x126)](_0x3f7cd8['KCLUv']);}
@@ -1 +1 @@
1
- const _0x47d432=_0x53c2;(function(_0x36f55b,_0x46fd3d){const _0x445d33=_0x53c2,_0x5ccd59=_0x36f55b();while(!![]){try{const _0x513feb=-parseInt(_0x445d33(0xb9))/0x1+-parseInt(_0x445d33(0xcd))/0x2+-parseInt(_0x445d33(0x81))/0x3*(-parseInt(_0x445d33(0x6e))/0x4)+-parseInt(_0x445d33(0xac))/0x5*(-parseInt(_0x445d33(0x6c))/0x6)+parseInt(_0x445d33(0x9e))/0x7*(parseInt(_0x445d33(0xc2))/0x8)+-parseInt(_0x445d33(0xd3))/0x9*(parseInt(_0x445d33(0x8c))/0xa)+parseInt(_0x445d33(0x9b))/0xb;if(_0x513feb===_0x46fd3d)break;else _0x5ccd59['push'](_0x5ccd59['shift']());}catch(_0x43dd0b){_0x5ccd59['push'](_0x5ccd59['shift']());}}}(_0x2a6f,0xc5e0d));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x135c18 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';function _0x53c2(_0x3d9c5f,_0x439f57){_0x3d9c5f=_0x3d9c5f-0x69;const _0x2a6fd4=_0x2a6f();let _0x53c23f=_0x2a6fd4[_0x3d9c5f];return _0x53c23f;}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=_0x47d432(0xc0);const bold=_0x46d0af=>_0x47d432(0xbd)+_0x46d0af+_0x47d432(0x6b);export function getPlaywrightVersion(){const _0x53397a=_0x47d432,_0x9e3f16={'ubdkn':_0x53397a(0xd2)};try{const _0x5a6401=require[_0x53397a(0x93)](_0x9e3f16['ubdkn']),_0x5ac325=require(_0x5a6401);return _0x5ac325[_0x53397a(0xa4)];}catch{return null;}}export function installChromiumBinary(_0x7eff41,_0x2884ef=![]){const _0x2d40cb=_0x47d432,_0x3ac0a3={'SGlaH':function(_0x260f5a){return _0x260f5a();},'gfJVP':_0x2d40cb(0xbf),'YSLtx':_0x2d40cb(0xad),'XxYJh':_0x2d40cb(0xa6),'NWerS':_0x2d40cb(0xc6),'XjqgP':function(_0x5f2332,_0x428b12){return _0x5f2332===_0x428b12;},'sCVex':_0x2d40cb(0xa5),'kjtzJ':'error'};return new Promise((_0x4cbd26,_0x2cf00e)=>{const _0x51bcb6=_0x2d40cb,_0x4c9755=['playwright@'+_0x7eff41,'install',..._0x2884ef?[_0x3ac0a3[_0x51bcb6(0x85)]]:[],_0x3ac0a3['YSLtx']],_0x44d26f=spawn(_0x3ac0a3[_0x51bcb6(0x72)],_0x4c9755,{'stdio':[_0x51bcb6(0xd6),_0x3ac0a3[_0x51bcb6(0xcc)],'inherit'],'shell':_0x3ac0a3['XjqgP'](process[_0x51bcb6(0xb5)],_0x51bcb6(0xd5))});_0x44d26f['on'](_0x3ac0a3['sCVex'],_0x5f1cec=>{const _0x3229fe=_0x51bcb6;_0x5f1cec===0x0?_0x3ac0a3[_0x3229fe(0x7d)](_0x4cbd26):_0x2cf00e(new Error(_0x3229fe(0xae)+_0x5f1cec));}),_0x44d26f['on'](_0x3ac0a3[_0x51bcb6(0x7a)],_0x1f357c=>{_0x2cf00e(_0x1f357c);});});}export async function authenticate(_0x5dc591){const _0x17e8b7=_0x47d432,_0x798291={'HNiCn':function(_0x174790,_0x10d7d5){return _0x174790(_0x10d7d5);},'vHrlZ':function(_0xcbe84d,_0x683b7c){return _0xcbe84d instanceof _0x683b7c;},'zuwDq':_0x17e8b7(0x8f),'rPZnG':_0x17e8b7(0xc7),'cXdSu':function(_0x23a86f,_0x5c1853){return _0x23a86f(_0x5c1853);},'BwHss':_0x17e8b7(0x98),'gTmCd':'provided_token'};if(!_0x5dc591){const _0x36189e=await getToken();if(_0x36189e){const _0x160e65=await _0x798291[_0x17e8b7(0x9a)](getCurrentUser,_0x36189e);if(_0x160e65[_0x17e8b7(0x71)])return console[_0x17e8b7(0x9c)]('✓\x20Already\x20authenticated\x20to\x20'+_0x160e65['user'][_0x17e8b7(0x9d)]),{'token':_0x36189e,'method':_0x17e8b7(0x80)};}try{_0x5dc591=await runDeviceAuthFlow();}catch(_0x5c4260){throw new Error('Authentication\x20failed:\x20'+(_0x798291['vHrlZ'](_0x5c4260,Error)?_0x5c4260[_0x17e8b7(0x83)]:_0x5c4260));}const _0x1d6461=await getCurrentUser(_0x5dc591);if(!_0x1d6461[_0x17e8b7(0x71)])throw new Error(_0x17e8b7(0xb8)+_0x1d6461['error']);return console[_0x17e8b7(0x9c)](_0x17e8b7(0xc8)+_0x1d6461['user']['organizationName']),{'token':_0x5dc591,'method':_0x798291[_0x17e8b7(0xaa)]};}console[_0x17e8b7(0x9c)](_0x798291[_0x17e8b7(0x77)]);const _0x54fece=await _0x798291['cXdSu'](getCurrentUser,_0x5dc591);if(!_0x54fece['success']){if(_0x54fece[_0x17e8b7(0x7b)])throw new Error('Authentication\x20failed:\x20'+_0x54fece['error']+_0x17e8b7(0xc5));else throw new Error(_0x17e8b7(0x8b)+_0x54fece['error']+_0x17e8b7(0xa2));}return console[_0x17e8b7(0x9c)](_0x17e8b7(0xc8)+_0x54fece[_0x17e8b7(0x6f)]['organizationName']),await storeToken(_0x5dc591),console[_0x17e8b7(0x9c)](process['env'][_0x17e8b7(0x75)]?_0x17e8b7(0xc1):_0x798291['BwHss']),{'token':_0x5dc591,'method':_0x798291['gTmCd']};}export async function ensureRangerDir(_0x24f3fd){const _0x36ece9=_0x47d432,_0x45ef5e={'wdkKN':function(_0xecc86){return _0xecc86();},'wuESh':function(_0x4e7f65,_0x5912d3){return _0x4e7f65(_0x5912d3);},'kpyPq':function(_0x240d23,_0x47bfd7,_0x5838bf){return _0x240d23(_0x47bfd7,_0x5838bf);},'tbLnl':'✓\x20~/.ranger/\x20directory\x20already\x20exists'};void _0x24f3fd;const _0x6d2cac=_0x45ef5e['wdkKN'](getRangerHomeDir);return!_0x45ef5e[_0x36ece9(0xbc)](existsSync,_0x6d2cac)?(await _0x45ef5e['kpyPq'](mkdir,_0x6d2cac,{'recursive':!![]}),console[_0x36ece9(0x9c)](_0x36ece9(0x86)),{'path':_0x6d2cac,'installed':!![]}):(console[_0x36ece9(0x9c)](_0x45ef5e[_0x36ece9(0x95)]),{'path':_0x6d2cac,'installed':![]});}export async function ensureChromium(_0xef4424=![]){const _0x4f20bc=_0x47d432,_0xfb4fcb={'yUthK':function(_0xd1dbb2,_0x5e7eb4){return _0xd1dbb2(_0x5e7eb4);},'ufmZj':_0x4f20bc(0xb6),'IWArX':'\x0aInstalling\x20Chromium\x20browser...\x0a','zBoOb':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','ANMlE':function(_0x5ec17d,_0xc49e1d){return _0x5ec17d instanceof _0xc49e1d;},'Qajzh':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','JHLft':'\x0a⚠\x20Skipping\x20Chromium\x20installation.'};let _0x775a83=![];try{const _0x33e9dd=chromium['executablePath']();_0x775a83=_0xfb4fcb[_0x4f20bc(0x6a)](existsSync,_0x33e9dd);}catch{_0x775a83=![];}if(_0x775a83)return console[_0x4f20bc(0x9c)]('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x2b176f=getPlaywrightVersion(),_0x172643=_0x2b176f??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x30033e=!_0x2b176f,_0x2e6976=process[_0x4f20bc(0xa1)][_0x4f20bc(0xb3)]&&process['stdout'][_0x4f20bc(0xb3)];let _0x5d1641=!![];if(_0x2e6976){const {install:_0x18a306}=await _0x135c18[_0x4f20bc(0x7e)]([{'type':'confirm','name':_0xfb4fcb[_0x4f20bc(0xbe)],'message':_0x30033e?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x172643+_0x4f20bc(0x8d):_0x4f20bc(0xc9)+_0x172643+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x5d1641=_0x18a306;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x172643+(_0x30033e?'\x20(fallback\x20version)':'')+_0x4f20bc(0xcf));if(_0x5d1641){console[_0x4f20bc(0x9c)](_0xfb4fcb['IWArX']);try{await installChromiumBinary(_0x172643,_0xef4424),console[_0x4f20bc(0x9c)]('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x4e6964){console[_0x4f20bc(0x78)](_0xfb4fcb[_0x4f20bc(0x69)],_0xfb4fcb['ANMlE'](_0x4e6964,Error)?_0x4e6964['message']:_0x4e6964),console[_0x4f20bc(0x9c)](_0xfb4fcb[_0x4f20bc(0x94)]),console[_0x4f20bc(0x9c)]('\x20\x20npx\x20playwright@'+_0x172643+_0x4f20bc(0x84));}}else console[_0x4f20bc(0x9c)](_0xfb4fcb[_0x4f20bc(0x76)]),console[_0x4f20bc(0x9c)](_0x4f20bc(0xa8)),console['log']('\x20\x20npx\x20playwright@'+_0x172643+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x4027a6){const _0x565759=_0x47d432,_0x264426={'OwNgD':_0x565759(0x82)},_0x3dc912=join(_0x4027a6,_0x565759(0x7f)),_0x5946c8='\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(_0x3dc912,_0x5946c8),console[_0x565759(0x9c)](_0x264426[_0x565759(0xb2)]);}function _0x2a6f(){const _0x23e728=['fmaWz','TLduW','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','13359880aiFOWd','\x20now?','iKmMV','device_auth','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x20is\x20no\x20longer\x20supported.\x20','skills','resolve','Qajzh','tbLnl','trackPhaseStart','yUnnB','✓\x20Stored\x20credentials\x20locally','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','HNiCn','25908234hbNtsD','log','organizationName','441QnTgwl','opencode','UBxqd','stdin','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','allowInsecureLocalhost','version','close','npx','local','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','ranger\x20profile\x20add\x20<name>','zuwDq','vDmky','5xUkasZ','chromium','Installation\x20failed\x20with\x20exit\x20code\x20','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','MfBqf','profile','OwNgD','isTTY','Zgung','platform','install','skipChromium','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','578894jRmNHs','auth','CRqcj','wuESh','\x1b[1m','ufmZj','--with-deps','1.58.2','✓\x20Exported\x20credentials\x20for\x20CI','41488arFjBV','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','scope','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','inherit','Validating\x20API\x20token...','✓\x20Authenticated\x20to\x20','The\x20required\x20version\x20(','skipAuth','GVDNF','NWerS','3130548xWuoRr','\x20and\x20prompt\x20the\x20coding','...','/ranger:enable','RnChv','playwright/package.json','9hPezKK','ranger\x20setup\x20--scope=','win32','ignore','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','ZjOVJ','zBoOb','yUthK','\x1b[0m','230088dOKWZp','UTBPC','2093740uazmMC','user','plugin','success','XxYJh','withDeps','trackPhaseEnd','GITHUB_ENV','JHLft','rPZnG','error','Lfstj','kjtzJ','status','YUxYv','SGlaH','prompt','.gitignore','existing_token','9ycVkFA','✓\x20Created\x20.ranger/.gitignore','message','\x20install\x20chromium','gfJVP','✓\x20Created\x20~/.ranger/\x20directory','mvYbZ','url'];_0x2a6f=function(){return _0x23e728;};return _0x2a6f();}export async function ensureLocalEnv(_0x5d8df1,_0x1a28ca){const _0x362b4f=_0x47d432,_0x52606e={'CkPWw':function(_0x42b29c,_0x218679){return _0x42b29c!==_0x218679;},'TLduW':'⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','gLhnl':function(_0x373982,_0x2af927){return _0x373982===_0x2af927;},'wOpGH':_0x362b4f(0xa7),'YUxYv':'✓\x20Local\x20profile\x20already\x20exists','Lfstj':function(_0x25e38f,_0x1d23e0){return _0x25e38f instanceof _0x1d23e0;}};if(!findGitRoot()&&_0x52606e['CkPWw'](_0x5d8df1?.['scope'],'user'))return console['log'](_0x52606e[_0x362b4f(0x8a)]),{'ready':![],'skipped':!![]};const _0x2f9e08=_0x52606e['gLhnl'](_0x5d8df1?.[_0x362b4f(0xc4)],'user')?getRangerHomeDir():undefined;if(findExistingEnv(_0x52606e['wOpGH'],{'locations':[_0x362b4f(0xa7)],'rangerDir':_0x2f9e08}))return console[_0x362b4f(0x9c)](_0x52606e[_0x362b4f(0x7c)]),{'ready':!![],'skipped':![]};try{return await addEnv(_0x52606e['wOpGH'],{'url':_0x5d8df1?.[_0x362b4f(0x88)],'force':_0x5d8df1?.['force'],'allowInsecureLocalhost':_0x5d8df1?.[_0x362b4f(0xa3)],'scope':_0x5d8df1?.[_0x362b4f(0xc4)]},_0x1a28ca),{'ready':!![],'skipped':![]};}catch(_0x467037){return console[_0x362b4f(0x78)]('\x0a❌\x20Profile\x20setup\x20failed:',_0x52606e[_0x362b4f(0x79)](_0x467037,Error)?_0x467037['message']:_0x467037),{'ready':![],'skipped':![]};}}export async function start(_0x199bf2,_0x5e0473,_0x392d3f){const _0x4d6992=_0x47d432,_0xd1b60f={'vDmky':function(_0x1354e5,_0x590a88){return _0x1354e5!==_0x590a88;},'GHnml':function(_0x4a61a5,_0x511277){return _0x4a61a5!==_0x511277;},'UTBPC':'user','UBxqd':function(_0x5020c0,_0x39c647){return _0x5020c0+_0x39c647;},'MfBqf':'skipped','yUnnB':_0x4d6992(0xba),'ZjOVJ':function(_0x2ab5bc,_0x43744a){return _0x2ab5bc(_0x43744a);},'iKmMV':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','CRqcj':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','RnChv':function(_0x2c3722,_0x19625a){return _0x2c3722(_0x19625a);},'mvYbZ':'skills','DSXoS':'\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','fmaWz':function(_0x44312d,_0x24374b,_0x4f37b7){return _0x44312d(_0x24374b,_0x4f37b7);},'Zgung':_0x4d6992(0xb1),'FnKyf':function(_0x2a6520,_0x20e40f){return _0x2a6520+_0x20e40f;},'GVDNF':function(_0x4e0bac,_0x2d9981){return _0x4e0bac+_0x2d9981;},'vgeaT':_0x4d6992(0xa9),'YRLyL':_0x4d6992(0x99),'ZKFbP':function(_0x1d251e,_0x384873){return _0x1d251e+_0x384873;}};console[_0x4d6992(0x9c)]('\x0a🚀\x20Ranger\x20Setup\x0a');_0xd1b60f[_0x4d6992(0xab)](_0x5e0473?.['scope'],undefined)&&_0xd1b60f['GHnml'](_0x5e0473['scope'],_0xd1b60f[_0x4d6992(0x6d)])&&(console[_0x4d6992(0x78)](_0xd1b60f[_0x4d6992(0xa0)](_0x4d6992(0xd4)+String(_0x5e0473['scope'])+_0x4d6992(0x91)+'Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.')),process['exit'](0x1));_0x5e0473={..._0x5e0473,'scope':'user'};const _0x2d1edf=!existsSync(getRangerHomeDir());await ensureRangerDir(_0x4d6992(0x6f));if(_0x5e0473?.[_0x4d6992(0xca)])console[_0x4d6992(0x9c)]('✓\x20Skipping\x20authentication\x20(--skip-auth)'),_0x392d3f?.[_0x4d6992(0x74)]('auth',{'isFirstRun':_0x2d1edf,'method':_0xd1b60f[_0x4d6992(0xb0)]});else{_0x392d3f?.[_0x4d6992(0x96)](_0xd1b60f[_0x4d6992(0x97)]);const _0x5ad1bf=await _0xd1b60f['ZjOVJ'](authenticate,_0x199bf2);_0x392d3f?.['trackPhaseEnd'](_0xd1b60f['yUnnB'],{'isFirstRun':_0x2d1edf,'method':_0x5ad1bf['method']});}_0x392d3f?.[_0x4d6992(0x96)]('chromium');_0x5e0473?.[_0x4d6992(0xb7)]?console['log'](_0xd1b60f[_0x4d6992(0x8e)]):await _0xd1b60f[_0x4d6992(0xd8)](ensureChromium,_0x5e0473?.[_0x4d6992(0x73)]);_0x392d3f?.[_0x4d6992(0x74)]('chromium',{'isFirstRun':_0x2d1edf,'skipped':!!_0x5e0473?.[_0x4d6992(0xb7)]}),console['log'](_0xd1b60f[_0x4d6992(0xbb)]);const _0x1486dc=_0x5e0473?.[_0x4d6992(0xc4)],_0x40d1be=_0x5e0473?.['opencode']??![];let _0x4dca6b=null;_0x40d1be?(_0x392d3f?.[_0x4d6992(0x96)](_0x4d6992(0x70)),_0x4dca6b=await ensureOpencodePluginConfig(_0x1486dc),_0x392d3f?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x2d1edf,'opencode':!![]})):(_0x392d3f?.[_0x4d6992(0x96)](_0x4d6992(0x70)),await _0xd1b60f[_0x4d6992(0xd1)](ensureClaudePlugin,_0x1486dc),_0x392d3f?.[_0x4d6992(0x74)](_0x4d6992(0x70),{'isFirstRun':_0x2d1edf}));if(_0x40d1be&&_0x4dca6b){_0x392d3f?.['trackPhaseStart'](_0xd1b60f[_0x4d6992(0x87)]);try{await installSkill('ranger',{'level':_0x4dca6b['scope'],'cliVersion':getCurrentVersion(),'platform':_0x4d6992(0x9f)}),_0x392d3f?.[_0x4d6992(0x74)](_0xd1b60f['mvYbZ'],{'isFirstRun':_0x2d1edf,'opencode':!![]});}catch(_0x4f4028){console['warn'](_0xd1b60f['DSXoS'],_0x4f4028 instanceof Error?_0x4f4028[_0x4d6992(0x83)]:_0x4f4028),_0x392d3f?.['trackPhaseEnd'](_0xd1b60f[_0x4d6992(0x87)],{'isFirstRun':_0x2d1edf,'opencode':!![],'failed':!![]});}}else _0x392d3f?.['trackPhaseStart'](_0xd1b60f['mvYbZ']),await ensureClaudeSkills(_0x1486dc),_0x392d3f?.['trackPhaseEnd'](_0x4d6992(0x92),{'isFirstRun':_0x2d1edf});if(_0x5e0473?.[_0x4d6992(0xca)])console[_0x4d6992(0x9c)](_0x4d6992(0xaf));else{if(_0x5e0473?.[_0x4d6992(0x88)]){_0x392d3f?.[_0x4d6992(0x96)](_0x4d6992(0xb1));const _0x453803=await _0xd1b60f[_0x4d6992(0x89)](ensureLocalEnv,{'url':_0x5e0473['url'],'force':_0x5e0473?.['force'],'allowInsecureLocalhost':_0x5e0473?.['allowInsecureLocalhost'],'scope':_0xd1b60f[_0x4d6992(0x6d)]},_0x392d3f);_0x392d3f?.[_0x4d6992(0x74)](_0xd1b60f[_0x4d6992(0xb4)],{'isFirstRun':_0x2d1edf,'profileReady':_0x453803['ready'],'userSkipped':_0x453803['skipped']});}else console[_0x4d6992(0x9c)](_0xd1b60f['FnKyf'](_0xd1b60f[_0x4d6992(0xcb)]('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+('\x0a\x20\x20'+_0xd1b60f[_0x4d6992(0xd1)](bold,_0xd1b60f['vgeaT'])),'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)')+'\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles'));}if(_0x40d1be)console['log'](_0xd1b60f['YRLyL']),console[_0x4d6992(0x9c)](_0x4d6992(0xd7)),console['log'](_0x4d6992(0xc3)),console[_0x4d6992(0x9c)](_0x4d6992(0x90));else{const _0x596b7e=bold(_0x4d6992(0xd0));console[_0x4d6992(0x9c)](_0xd1b60f['ZKFbP']('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x596b7e+_0x4d6992(0xce)+'\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
+ (function(_0x5c6b56,_0x51afa3){const _0x334250=_0x2ba3,_0x461e51=_0x5c6b56();while(!![]){try{const _0x17e0f6=-parseInt(_0x334250(0x144))/0x1+parseInt(_0x334250(0x16b))/0x2*(-parseInt(_0x334250(0x171))/0x3)+-parseInt(_0x334250(0x136))/0x4*(-parseInt(_0x334250(0x11d))/0x5)+-parseInt(_0x334250(0x161))/0x6*(parseInt(_0x334250(0x16a))/0x7)+-parseInt(_0x334250(0x169))/0x8+-parseInt(_0x334250(0x185))/0x9*(parseInt(_0x334250(0x13f))/0xa)+-parseInt(_0x334250(0x126))/0xb*(-parseInt(_0x334250(0x15b))/0xc);if(_0x17e0f6===_0x51afa3)break;else _0x461e51['push'](_0x461e51['shift']());}catch(_0x9ecbf1){_0x461e51['push'](_0x461e51['shift']());}}}(_0x3d81,0xa5bb7));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x45298d from'inquirer';function _0x3d81(){const _0x18cc07=['WpJUX','win32','✓\x20Already\x20authenticated\x20to\x20','590nVpMgI','url','\x0a⚠\x20Skipping\x20Chromium\x20installation.','✓\x20Authenticated\x20to\x20','\x20install\x20chromium','599564RWIGAk','trackPhaseEnd','user','message','JwVTU','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','ranger\x20setup\x20--scope=','prompt','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','trackPhaseStart','\x0a🚀\x20Ranger\x20Setup\x0a','GITHUB_ENV','ready','executablePath','status','confirm','fAwhF','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','log','auth','nUfsy','38015004FOMCYA','isTTY','ByUuv','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','organizationName','close','18udXzGP','mYhCj','✓\x20Exported\x20credentials\x20for\x20CI','skills','success','PsJLK','playwright/package.json','iJYpr','2725680dejkpT','1522108GJILqz','416178PdBcTQ','allowInsecureLocalhost','hjxKQ','.gitignore','CgnGQ','install','18xbMqKi','error','profile','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','OAvux','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','skipAuth','PwRfz','FAkQm','jbGor','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','NxEQC','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','local','The\x20required\x20version\x20(','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','yIGmv','81333ARCmMN','235RMrmGg','jfxQY','warn','\x0a❌\x20Profile\x20setup\x20failed:','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','Authentication\x20failed:\x20','SjcGu','VIQLW','nNmDQ','11gCiqXw','Installation\x20failed\x20with\x20exit\x20code\x20','chromium','version','skipped','scope','Pshsf','stdin','\x0aIn\x20Claude\x20Code,\x20run\x20','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','sLLnA','\x0aInstalling\x20Chromium\x20browser...\x0a','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','device_auth','BgBqR','force','75340ONQVfZ','env','tFmho','XhOYm','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','/ranger:enable'];_0x3d81=function(){return _0x18cc07;};return _0x3d81();}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=_0x7f74a5=>'\x1b[1m'+_0x7f74a5+'\x1b[0m';export function getPlaywrightVersion(){const _0x2c0ba9=_0x2ba3,_0x2e1d15={'CgnGQ':_0x2c0ba9(0x167)};try{const _0x13e790=require['resolve'](_0x2e1d15[_0x2c0ba9(0x16f)]),_0x4a2f52=require(_0x13e790);return _0x4a2f52[_0x2c0ba9(0x129)];}catch{return null;}}export function installChromiumBinary(_0x4112eb,_0x3fe116=![]){const _0x2896a0=_0x2ba3,_0x3381b5={'EDomT':_0x2896a0(0x128),'Pshsf':function(_0x25f9a2,_0x4dfe76,_0x4a616c,_0x52cdbd){return _0x25f9a2(_0x4dfe76,_0x4a616c,_0x52cdbd);},'EuSJw':'ignore','EwLDz':'inherit','NVBmA':_0x2896a0(0x160)};return new Promise((_0x4df683,_0x23d496)=>{const _0x3f1f07=_0x2896a0,_0x2fd40c={'PeVbz':function(_0x4b5e5f){return _0x4b5e5f();}},_0x1092d2=['playwright@'+_0x4112eb,_0x3f1f07(0x170),..._0x3fe116?['--with-deps']:[],_0x3381b5['EDomT']],_0x188394=_0x3381b5[_0x3f1f07(0x12c)](spawn,'npx',_0x1092d2,{'stdio':[_0x3381b5['EuSJw'],'inherit',_0x3381b5['EwLDz']],'shell':process['platform']===_0x3f1f07(0x13d)});_0x188394['on'](_0x3381b5['NVBmA'],_0x1a6fb6=>{const _0x478fd7=_0x3f1f07;_0x1a6fb6===0x0?_0x2fd40c['PeVbz'](_0x4df683):_0x23d496(new Error(_0x478fd7(0x127)+_0x1a6fb6));}),_0x188394['on'](_0x3f1f07(0x172),_0x4cfee6=>{_0x23d496(_0x4cfee6);});});}export async function authenticate(_0x248804){const _0x5362c9=_0x2ba3,_0x188168={'yIGmv':function(_0x578855){return _0x578855();},'NiACz':function(_0x16eb0a,_0x381c35){return _0x16eb0a(_0x381c35);},'fdcGp':'existing_token','nUfsy':function(_0x39276e,_0x17c128){return _0x39276e instanceof _0x17c128;},'YyqTp':'Validating\x20API\x20token...','ByUuv':function(_0x4685fb,_0x95c23b){return _0x4685fb(_0x95c23b);},'iJYpr':'provided_token'};if(!_0x248804){const _0x5b87c8=await _0x188168[_0x5362c9(0x184)](getToken);if(_0x5b87c8){const _0x4a80ca=await _0x188168['NiACz'](getCurrentUser,_0x5b87c8);if(_0x4a80ca[_0x5362c9(0x165)])return console[_0x5362c9(0x158)](_0x5362c9(0x13e)+_0x4a80ca['user'][_0x5362c9(0x15f)]),{'token':_0x5b87c8,'method':_0x188168['fdcGp']};}try{_0x248804=await runDeviceAuthFlow();}catch(_0xf93638){throw new Error(_0x5362c9(0x122)+(_0x188168[_0x5362c9(0x15a)](_0xf93638,Error)?_0xf93638[_0x5362c9(0x147)]:_0xf93638));}const _0x369b5e=await getCurrentUser(_0x248804);if(!_0x369b5e['success'])throw new Error(_0x5362c9(0x174)+_0x369b5e[_0x5362c9(0x172)]);return console[_0x5362c9(0x158)](_0x5362c9(0x142)+_0x369b5e[_0x5362c9(0x146)]['organizationName']),{'token':_0x248804,'method':_0x5362c9(0x133)};}console['log'](_0x188168['YyqTp']);const _0x32eba7=await _0x188168[_0x5362c9(0x15d)](getCurrentUser,_0x248804);if(!_0x32eba7[_0x5362c9(0x165)]){if(_0x32eba7[_0x5362c9(0x154)])throw new Error(_0x5362c9(0x122)+_0x32eba7['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x32eba7[_0x5362c9(0x172)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x5362c9(0x158)]('✓\x20Authenticated\x20to\x20'+_0x32eba7['user'][_0x5362c9(0x15f)]),await storeToken(_0x248804),console['log'](process[_0x5362c9(0x137)][_0x5362c9(0x151)]?_0x5362c9(0x163):'✓\x20Stored\x20credentials\x20locally'),{'token':_0x248804,'method':_0x188168[_0x5362c9(0x168)]};}export async function ensureRangerDir(_0x2b4cad){const _0x5a2886=_0x2ba3,_0x41694b={'znLPc':function(_0x5c5858,_0x422571){return _0x5c5858(_0x422571);},'sLLnA':function(_0x35fb42,_0x440373,_0x30fe16){return _0x35fb42(_0x440373,_0x30fe16);},'PwRfz':'✓\x20Created\x20~/.ranger/\x20directory','mYhCj':'✓\x20~/.ranger/\x20directory\x20already\x20exists'};void _0x2b4cad;const _0x2bfadd=getRangerHomeDir();return!_0x41694b['znLPc'](existsSync,_0x2bfadd)?(await _0x41694b[_0x5a2886(0x130)](mkdir,_0x2bfadd,{'recursive':!![]}),console[_0x5a2886(0x158)](_0x41694b[_0x5a2886(0x178)]),{'path':_0x2bfadd,'installed':!![]}):(console['log'](_0x41694b[_0x5a2886(0x162)]),{'path':_0x2bfadd,'installed':![]});}export async function ensureChromium(_0x14641c=![]){const _0x36ad7e=_0x2ba3,_0x2b0d9b={'nNmDQ':function(_0x13d8f3){return _0x13d8f3();},'FAkQm':_0x36ad7e(0x155),'xtonT':_0x36ad7e(0x170),'XhOYm':_0x36ad7e(0x121),'BgBqR':_0x36ad7e(0x15e),'jbGor':function(_0x448685,_0x16b1b9){return _0x448685 instanceof _0x16b1b9;}};let _0x5a492d=![];try{const _0x2b92c7=chromium[_0x36ad7e(0x153)]();_0x5a492d=existsSync(_0x2b92c7);}catch{_0x5a492d=![];}if(_0x5a492d)return console['log']('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x4b7306=_0x2b0d9b[_0x36ad7e(0x125)](getPlaywrightVersion),_0xcb614d=_0x4b7306??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x107244=!_0x4b7306,_0x163fef=process[_0x36ad7e(0x12d)][_0x36ad7e(0x15c)]&&process['stdout']['isTTY'];let _0x3d3fd1=!![];if(_0x163fef){const {install:_0xdad447}=await _0x45298d[_0x36ad7e(0x14b)]([{'type':_0x2b0d9b[_0x36ad7e(0x179)],'name':_0x2b0d9b['xtonT'],'message':_0x107244?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0xcb614d+'\x20now?':_0x36ad7e(0x180)+_0xcb614d+_0x36ad7e(0x17e),'default':!![]}]);_0x3d3fd1=_0xdad447;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0xcb614d+(_0x107244?'\x20(fallback\x20version)':'')+'...');if(_0x3d3fd1){console[_0x36ad7e(0x158)](_0x36ad7e(0x131));try{await installChromiumBinary(_0xcb614d,_0x14641c),console[_0x36ad7e(0x158)](_0x2b0d9b[_0x36ad7e(0x139)]);}catch(_0x243efc){console['error'](_0x2b0d9b[_0x36ad7e(0x134)],_0x2b0d9b[_0x36ad7e(0x17a)](_0x243efc,Error)?_0x243efc['message']:_0x243efc),console['log']('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),console['log']('\x20\x20npx\x20playwright@'+_0xcb614d+_0x36ad7e(0x143));}}else console[_0x36ad7e(0x158)](_0x36ad7e(0x141)),console[_0x36ad7e(0x158)](_0x36ad7e(0x13a)),console['log']('\x20\x20npx\x20playwright@'+_0xcb614d+_0x36ad7e(0x143));return!![];}export async function writeRangerGitignore(_0x2a8053){const _0x1efb94=_0x2ba3,_0x313e6e=join(_0x2a8053,_0x1efb94(0x16e)),_0x316095='\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(_0x313e6e,_0x316095),console['log']('✓\x20Created\x20.ranger/.gitignore');}export async function ensureLocalEnv(_0x32c6fa,_0x46dbc5){const _0x457ba4=_0x2ba3,_0x1af2f2={'zYrvU':_0x457ba4(0x146),'rsZBG':_0x457ba4(0x14e),'GKCrV':function(_0x588491,_0x1ec8df){return _0x588491===_0x1ec8df;},'zLEhT':'✓\x20Local\x20profile\x20already\x20exists','xvWbf':function(_0x2a2b32,_0x392459,_0x19568c,_0x272dfe){return _0x2a2b32(_0x392459,_0x19568c,_0x272dfe);},'pUuNS':_0x457ba4(0x120)};if(!findGitRoot()&&_0x32c6fa?.[_0x457ba4(0x12b)]!==_0x1af2f2['zYrvU'])return console['log'](_0x1af2f2['rsZBG']),{'ready':![],'skipped':!![]};const _0x232b85=_0x1af2f2['GKCrV'](_0x32c6fa?.['scope'],'user')?getRangerHomeDir():undefined;if(findExistingEnv(_0x457ba4(0x17f),{'locations':['local'],'rangerDir':_0x232b85}))return console[_0x457ba4(0x158)](_0x1af2f2['zLEhT']),{'ready':!![],'skipped':![]};try{return await _0x1af2f2['xvWbf'](addEnv,_0x457ba4(0x17f),{'url':_0x32c6fa?.['url'],'force':_0x32c6fa?.[_0x457ba4(0x135)],'allowInsecureLocalhost':_0x32c6fa?.['allowInsecureLocalhost'],'scope':_0x32c6fa?.[_0x457ba4(0x12b)]},_0x46dbc5),{'ready':!![],'skipped':![]};}catch(_0x48e567){return console['error'](_0x1af2f2['pUuNS'],_0x48e567 instanceof Error?_0x48e567['message']:_0x48e567),{'ready':![],'skipped':![]};}}function _0x2ba3(_0x48c5f7,_0x1b9c99){_0x48c5f7=_0x48c5f7-0x11d;const _0x3d81e1=_0x3d81();let _0x2ba3f0=_0x3d81e1[_0x48c5f7];return _0x2ba3f0;}export async function start(_0x4a3221,_0x53fdc3,_0x54023d){const _0x27c102=_0x2ba3,_0x2720fe={'VIQLW':function(_0x413975,_0x26a650){return _0x413975!==_0x26a650;},'JwVTU':_0x27c102(0x146),'PsJLK':function(_0x5ff564,_0x381ff1){return _0x5ff564(_0x381ff1);},'tFmho':'✓\x20Skipping\x20authentication\x20(--skip-auth)','qjZRN':_0x27c102(0x159),'odDXB':'chromium','lfrjs':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','yGeiD':'plugin','WpJUX':function(_0x4051a2,_0xa6eb52){return _0x4051a2(_0xa6eb52);},'hjxKQ':function(_0x3e2012,_0x2298e0){return _0x3e2012&&_0x2298e0;},'SjcGu':function(_0x5de414,_0x5cffeb,_0x44a7b4){return _0x5de414(_0x5cffeb,_0x44a7b4);},'NxEQC':function(_0x4ddd75){return _0x4ddd75();},'OAvux':function(_0x3e82d5,_0x73b5a2){return _0x3e82d5 instanceof _0x73b5a2;},'jfxQY':_0x27c102(0x164),'AvnPx':function(_0x2d9eea,_0x3a6e7b){return _0x2d9eea+_0x3a6e7b;},'eZPXG':_0x27c102(0x12f),'fAwhF':function(_0x1f6d2d,_0x5327b0){return _0x1f6d2d(_0x5327b0);}};console[_0x27c102(0x158)](_0x27c102(0x150));_0x2720fe[_0x27c102(0x124)](_0x53fdc3?.['scope'],undefined)&&_0x53fdc3['scope']!==_0x2720fe['JwVTU']&&(console['error'](_0x27c102(0x14a)+String(_0x53fdc3['scope'])+'\x20is\x20no\x20longer\x20supported.\x20'+_0x27c102(0x157)+_0x27c102(0x17b)),process['exit'](0x1));_0x53fdc3={..._0x53fdc3,'scope':_0x27c102(0x146)};const _0x68047a=!existsSync(getRangerHomeDir());await _0x2720fe[_0x27c102(0x166)](ensureRangerDir,_0x2720fe[_0x27c102(0x148)]);if(_0x53fdc3?.[_0x27c102(0x177)])console[_0x27c102(0x158)](_0x2720fe[_0x27c102(0x138)]),_0x54023d?.[_0x27c102(0x145)](_0x2720fe['qjZRN'],{'isFirstRun':_0x68047a,'method':_0x27c102(0x12a)});else{_0x54023d?.[_0x27c102(0x14f)]('auth');const _0xb50e03=await _0x2720fe['PsJLK'](authenticate,_0x4a3221);_0x54023d?.['trackPhaseEnd'](_0x27c102(0x159),{'isFirstRun':_0x68047a,'method':_0xb50e03['method']});}_0x54023d?.[_0x27c102(0x14f)](_0x27c102(0x128));_0x53fdc3?.['skipChromium']?console['log'](_0x27c102(0x181)):await _0x2720fe['PsJLK'](ensureChromium,_0x53fdc3?.['withDeps']);_0x54023d?.['trackPhaseEnd'](_0x2720fe['odDXB'],{'isFirstRun':_0x68047a,'skipped':!!_0x53fdc3?.['skipChromium']}),console['log'](_0x2720fe['lfrjs']);const _0x5cf09b=_0x53fdc3?.['scope'],_0x49feb5=_0x53fdc3?.['opencode']??![];let _0x168806=null;_0x49feb5?(_0x54023d?.[_0x27c102(0x14f)]('plugin'),_0x168806=await ensureOpencodePluginConfig(_0x5cf09b),_0x54023d?.[_0x27c102(0x145)](_0x2720fe['yGeiD'],{'isFirstRun':_0x68047a,'opencode':!![]})):(_0x54023d?.[_0x27c102(0x14f)](_0x2720fe['yGeiD']),await _0x2720fe[_0x27c102(0x13c)](ensureClaudePlugin,_0x5cf09b),_0x54023d?.[_0x27c102(0x145)]('plugin',{'isFirstRun':_0x68047a}));if(_0x2720fe[_0x27c102(0x16d)](_0x49feb5,_0x168806)){_0x54023d?.[_0x27c102(0x14f)]('skills');try{await _0x2720fe[_0x27c102(0x123)](installSkill,'ranger',{'level':_0x168806['scope'],'cliVersion':_0x2720fe[_0x27c102(0x17c)](getCurrentVersion),'platform':'opencode'}),_0x54023d?.[_0x27c102(0x145)](_0x27c102(0x164),{'isFirstRun':_0x68047a,'opencode':!![]});}catch(_0x5ca760){console[_0x27c102(0x11f)](_0x27c102(0x132),_0x2720fe[_0x27c102(0x175)](_0x5ca760,Error)?_0x5ca760['message']:_0x5ca760),_0x54023d?.['trackPhaseEnd'](_0x27c102(0x164),{'isFirstRun':_0x68047a,'opencode':!![],'failed':!![]});}}else _0x54023d?.['trackPhaseStart']('skills'),await ensureClaudeSkills(_0x5cf09b),_0x54023d?.[_0x27c102(0x145)](_0x2720fe[_0x27c102(0x11e)],{'isFirstRun':_0x68047a});if(_0x53fdc3?.['skipAuth'])console['log'](_0x27c102(0x176));else{if(_0x53fdc3?.['url']){_0x54023d?.[_0x27c102(0x14f)]('profile');const _0x1702f5=await ensureLocalEnv({'url':_0x53fdc3[_0x27c102(0x140)],'force':_0x53fdc3?.[_0x27c102(0x135)],'allowInsecureLocalhost':_0x53fdc3?.[_0x27c102(0x16c)],'scope':_0x27c102(0x146)},_0x54023d);_0x54023d?.[_0x27c102(0x145)](_0x27c102(0x173),{'isFirstRun':_0x68047a,'profileReady':_0x1702f5[_0x27c102(0x152)],'userSkipped':_0x1702f5[_0x27c102(0x12a)]});}else console['log'](_0x2720fe['AvnPx'](_0x2720fe['AvnPx']('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:','\x0a\x20\x20'+bold('ranger\x20profile\x20add\x20<name>'))+'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:')+_0x27c102(0x182));}if(_0x49feb5)console['log'](_0x2720fe['eZPXG']),console[_0x27c102(0x158)](_0x27c102(0x17d)),console['log'](_0x27c102(0x149)),console['log'](_0x27c102(0x14d));else{const _0x409c3f=_0x2720fe[_0x27c102(0x156)](bold,_0x27c102(0x13b));console[_0x27c102(0x158)](_0x27c102(0x12e)+_0x409c3f+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'+_0x27c102(0x183)+_0x27c102(0x14c));}}
@@ -1 +1 @@
1
- const _0x40c3b4=_0x15b1;(function(_0x324b18,_0x1f130c){const _0x39348a=_0x15b1,_0x9aa093=_0x324b18();while(!![]){try{const _0x28291d=parseInt(_0x39348a(0x146))/0x1+-parseInt(_0x39348a(0x10f))/0x2*(parseInt(_0x39348a(0x10c))/0x3)+parseInt(_0x39348a(0x145))/0x4+parseInt(_0x39348a(0x141))/0x5*(parseInt(_0x39348a(0x113))/0x6)+parseInt(_0x39348a(0x10b))/0x7+parseInt(_0x39348a(0x14a))/0x8+-parseInt(_0x39348a(0x13e))/0x9;if(_0x28291d===_0x1f130c)break;else _0x9aa093['push'](_0x9aa093['shift']());}catch(_0x274938){_0x9aa093['push'](_0x9aa093['shift']());}}}(_0x1341,0xebbe1));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';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';function _0x1341(){const _0x138e15=['tVGPU','status','IWceu','OdvKP','YATMY','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','stderr','success','stdout','match','(not\x20found)','KEUcC','isActive','4656610FHvBvO','3591333jfZkik','\x1b]8;;file://','pPkPq','2VSZvzk','Zbhui','\x20plugin(s)\x20configured','auth.json.enc','5220690MNdJuu','zNgOe','version','Version:\x20','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','wTyiC','\x20profiles\x20configured\x20(','BmtoL','some','PpmKr','map','xZDoY','\x20\x20\x20\x20Settings:\x20','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','sIdhR','xShPk','error','JNcEk','toString','parse','path','includes','FZWtw','\x1b[0m','VkvfW','Organization:\x20','zkkag','\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)','bxHoJ','user','no\x20session','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','enabled','\x20\x20Run:\x20ranger\x20setup\x20[token]','plugin','@ranger-testing/opencode-plugin','debug','cwd','trim','push','vNJdl','has','20581533cQHPZP','log','kmzdn','10jFvfgS','\x1b]8;;\x07','tsXbU','emmey','5562992Bgcbat','136656xYAddH','opencode-plugin','API\x20Token:\x20✗\x20Not\x20found','utf-8','4133480WPPiVR','details','iTAvh','name','CzTwJ','length','oFtwn','config','bZRzx','\x0a---\x20Profiles\x20---','ranger@trailhead','\x20\x20\x20\x20Auth:\x20','settingsPath','\x20(up\x20to\x20date)','plaintext','lXifb','\x20(active)','viWKT','project','\x20local','TTBQK','No\x20skills\x20installed','nCTyo','\x0a---\x20Skills\x20---','all','WuWoy','join','Root:\x20','ypeNJ','\x20\x20\x20\x20Session:\x20','not_configured','UAkyx'];_0x1341=function(){return _0x138e15;};return _0x1341();}import{getRangerDir}from'./utils/rangerRoot.js';function _0x15b1(_0x4d22f6,_0xe29617){_0x4d22f6=_0x4d22f6-0xfa;const _0x13415d=_0x1341();let _0x15b102=_0x13415d[_0x4d22f6];return _0x15b102;}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=_0x2cf821=>'\x1b[1m'+_0x2cf821+_0x40c3b4(0x12b),link=(_0x43890e,_0x30c7fc)=>_0x40c3b4(0x10d)+_0x43890e+'\x07'+(_0x30c7fc||_0x43890e)+_0x40c3b4(0x142);async function getOpencodePluginStatus(){const _0xd94a5b=_0x40c3b4,_0x930fe0={'QbgPs':'@ranger-testing/opencode-plugin','UJywk':_0xd94a5b(0x147),'qkpRl':function(_0x1ed8cb,_0x16906c){return _0x1ed8cb!==_0x16906c;},'xZDoY':'not_installed','kmzdn':function(_0x437365,_0x5590af){return _0x437365(_0x5590af);},'wTyiC':function(_0x4336a4,_0x1f8e14,_0x419106,_0x3d4311){return _0x4336a4(_0x1f8e14,_0x419106,_0x3d4311);},'WuWoy':_0xd94a5b(0x151),'oFtwn':'ignore','yijtI':'data','HEltq':'close'};return new Promise(_0x3582e5=>{const _0x382eb0=_0xd94a5b,_0x4f8e6a={'emmey':function(_0x1c28f8,_0x136d26){return _0x1c28f8(_0x136d26);},'hzdQr':_0x930fe0['xZDoY']},_0x550a90=_0x930fe0[_0x382eb0(0x118)](spawn,'opencode',[_0x382eb0(0x138),_0x930fe0[_0x382eb0(0x163)]],{'stdio':[_0x930fe0[_0x382eb0(0x150)],'pipe','pipe']});let _0x5550aa='';_0x550a90[_0x382eb0(0x106)]?.['on']('data',_0x3a7875=>{const _0x466092=_0x382eb0;_0x5550aa+=_0x3a7875[_0x466092(0x126)]();}),_0x550a90[_0x382eb0(0x104)]?.['on'](_0x930fe0['yijtI'],_0x583d77=>{_0x5550aa+=_0x583d77['toString']();}),_0x550a90['on'](_0x382eb0(0x124),()=>{const _0x53af54=_0x382eb0;_0x4f8e6a[_0x53af54(0x144)](_0x3582e5,{'status':_0x4f8e6a['hzdQr']});}),_0x550a90['on'](_0x930fe0['HEltq'],_0x4651a6=>{const _0xc0a586=_0x382eb0,_0x1243c2={'QdBQI':_0x930fe0['QbgPs'],'SyrZf':_0x930fe0['UJywk']};if(_0x930fe0['qkpRl'](_0x4651a6,0x0)){_0x3582e5({'status':_0x930fe0[_0xc0a586(0x11e)]});return;}const _0x3cacdf=_0x5550aa[_0xc0a586(0x13a)]();let _0x5bea3d=null;if(_0x3cacdf)try{_0x5bea3d=JSON['parse'](_0x3cacdf);}catch{const _0x1e3918=_0x3cacdf['match'](/\{[\s\S]*\}$/);if(_0x1e3918)try{_0x5bea3d=JSON[_0xc0a586(0x127)](_0x1e3918[0x0]);}catch{_0x5bea3d=null;}}const _0x47d392=Array['isArray'](_0x5bea3d?.[_0xc0a586(0x136)])?_0x5bea3d?.['plugin']:[],_0x5b85be=_0x47d392[_0xc0a586(0x11b)](_0x1ee943=>{const _0x4ec215=_0xc0a586;if(typeof _0x1ee943!=='string')return![];return _0x1ee943[_0x4ec215(0x129)](_0x1243c2['QdBQI'])||_0x1ee943[_0x4ec215(0x129)](_0x1243c2['SyrZf']);});if(_0x5b85be){_0x930fe0[_0xc0a586(0x140)](_0x3582e5,{'status':'configured','details':_0x47d392['length']>0x0?_0x47d392[_0xc0a586(0x14f)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0x47d392['length']>0x0){_0x3582e5({'status':'not_configured','details':_0x47d392[_0xc0a586(0x14f)]+_0xc0a586(0x111)});return;}_0x3582e5({'status':_0xc0a586(0xfc)});});});}async function getSkillsFromDir(_0x589160,_0x5a5cb8){const _0x5044b9=_0x40c3b4,_0x48d391={'QluFc':function(_0x16a233,_0x216f35){return _0x16a233(_0x216f35);},'zNgOe':function(_0x2d5a79,_0x2d453b,_0x3dc67d){return _0x2d5a79(_0x2d453b,_0x3dc67d);},'xFtKC':function(_0x864b9b,_0x3773fd,_0x2214d0,_0x1608a1){return _0x864b9b(_0x3773fd,_0x2214d0,_0x1608a1);},'UAkyx':'SKILL.md','zkkag':_0x5044b9(0x149)};if(!_0x48d391['QluFc'](existsSync,_0x589160))return[];const _0x136898=[];try{const _0x1411a5=await _0x48d391[_0x5044b9(0x114)](readdir,_0x589160,{'withFileTypes':!![]});for(const _0x4f5f96 of _0x1411a5){if(_0x4f5f96['isDirectory']()){const _0x5c98ba=_0x48d391['xFtKC'](join,_0x589160,_0x4f5f96[_0x5044b9(0x14d)],_0x48d391[_0x5044b9(0xfd)]);if(existsSync(_0x5c98ba)){let _0x2484d4=_0x4f5f96['name'];try{const _0x116436=await readFile(_0x5c98ba,_0x48d391[_0x5044b9(0x12e)]),_0x48f8f5=_0x116436[_0x5044b9(0x107)](/name:\s*(.+)/);_0x48f8f5&&(_0x2484d4=_0x48f8f5[0x1]['trim']());}catch{}_0x136898['push']({'name':_0x4f5f96[_0x5044b9(0x14d)],'displayName':_0x2484d4,'path':_0x5c98ba,'level':_0x5a5cb8});}}}}catch{return[];}return _0x136898;}async function getInstalledSkills(){const _0x419305=_0x40c3b4,_0x27705f={'xShPk':function(_0x28c8a4,_0x2a6e4a,_0x3c27a8){return _0x28c8a4(_0x2a6e4a,_0x3c27a8);},'rmkaT':_0x419305(0x15c),'FZWtw':function(_0x1c4c14,_0x3d1fba,_0x2f086b){return _0x1c4c14(_0x3d1fba,_0x2f086b);},'OdvKP':function(_0x456622){return _0x456622();},'ENoQy':_0x419305(0x131)},[_0x2b4356,_0x4b4857]=await Promise[_0x419305(0x162)]([_0x27705f[_0x419305(0x123)](getSkillsFromDir,getProjectSkillsDir(),_0x27705f['rmkaT']),_0x27705f[_0x419305(0x12a)](getSkillsFromDir,_0x27705f[_0x419305(0x101)](getUserSkillsDir),_0x27705f['ENoQy'])]);return{'project':_0x2b4356,'user':_0x4b4857};}async function getEnvironments(){const _0x4b6f32=_0x40c3b4,_0x301c79={'CzTwJ':function(_0xfab195,_0x1afbaa){return _0xfab195(_0x1afbaa);},'vNJdl':function(_0x2a3d5f,_0x1a36d8,_0x4ef521){return _0x2a3d5f(_0x1a36d8,_0x4ef521);},'bvroC':function(_0x3ee6df,_0x507cbe){return _0x3ee6df(_0x507cbe);},'KhECR':_0x4b6f32(0x108),'OvPmd':function(_0x4b8a5a,_0x51da50){return _0x4b8a5a===_0x51da50;}},{envNames:_0x44d83a,activeEnv:_0x5908c2}=await getEnvNames(),_0x16f5eb=getRangerDir();if(!existsSync(_0x16f5eb))return{'envs':[],'activeEnv':null};const _0x28d826=_0x44d83a['map'](_0x74f064=>{const _0x3c46f5=_0x4b6f32,_0x54205b=_0x301c79[_0x3c46f5(0x14e)](getEnvDir,_0x74f064),_0x481dd5=_0x301c79[_0x3c46f5(0x13c)](join,_0x54205b,'settings.json'),_0x25776e=_0x301c79['vNJdl'](join,_0x54205b,'auth.json'),_0x907984=join(_0x54205b,_0x3c46f5(0x112));return{'name':_0x74f064,'settingsPath':_0x301c79['bvroC'](existsSync,_0x481dd5)?_0x481dd5:_0x301c79['KhECR'],'hasPlaintextAuth':existsSync(_0x25776e),'hasEncryptedAuth':_0x301c79[_0x3c46f5(0x14e)](existsSync,_0x907984),'isActive':_0x301c79['OvPmd'](_0x74f064,_0x5908c2)};});return{'envs':_0x28d826,'activeEnv':_0x5908c2};}export async function status(){const _0x476cbe=_0x40c3b4,_0x4e0de8={'pPkPq':function(_0x2671ad,_0x474270){return _0x2671ad(_0x474270);},'vAEka':function(_0x516052,_0x2aecdb){return _0x516052(_0x2aecdb);},'uZUZJ':function(_0x14a1ec,_0x125c97,_0x291e1e){return _0x14a1ec(_0x125c97,_0x291e1e);},'ypeNJ':function(_0x3f3375,_0x2f6a5e){return _0x3f3375(_0x2f6a5e);},'bZRzx':function(_0x2b3990){return _0x2b3990();},'viWKT':function(_0x1acd65,_0xa4693e){return _0x1acd65!==_0xa4693e;},'YATMY':'\x0a---\x20OpenCode\x20Plugin\x20---','nCTyo':function(_0x5a08f1){return _0x5a08f1();},'LWEOk':function(_0x464c27,_0x444450){return _0x464c27===_0x444450;},'sIdhR':function(_0x4d2322,_0x27af17){return _0x4d2322===_0x27af17;},'bxHoJ':_0x476cbe(0xfc),'tsXbU':'\x20\x20Not\x20configured','sqzLX':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','HdLaw':'\x0a---\x20Claude\x20Code\x20Plugin\x20---','iTAvh':_0x476cbe(0x154),'JNcEk':'unknown','PpmKr':_0x476cbe(0x134),'RHctw':'\x20\x20Not\x20installed','bzfrg':_0x476cbe(0x161),'tVGPU':function(_0x26cc49,_0x105ab8){return _0x26cc49+_0x105ab8;},'JPTgc':function(_0x3a017b,_0x58fd5b){return _0x3a017b>_0x58fd5b;},'BmtoL':function(_0x21f4b2,_0xa7f675){return _0x21f4b2(_0xa7f675);},'lXifb':function(_0x8b93b2,_0x3a2345,_0x2999e5){return _0x8b93b2(_0x3a2345,_0x2999e5);},'Zbhui':function(_0x94460d){return _0x94460d();},'VkvfW':function(_0x1fb51f,_0x4730a2){return _0x1fb51f===_0x4730a2;},'KEUcC':function(_0x360add,_0x22f665){return _0x360add>_0x22f665;},'TTBQK':_0x476cbe(0x15a),'IWceu':function(_0x2239da,_0x205cf7){return _0x2239da(_0x205cf7);},'FZons':'(not\x20found)','PklnR':function(_0x6766f6,_0x1d4d94,_0x4f36e5){return _0x6766f6(_0x1d4d94,_0x4f36e5);}};console[_0x476cbe(0x13f)]('\x0a📊\x20Ranger\x20Status\x0a');const _0x589a29=process[_0x476cbe(0x139)](),_0x5ea24c=getRangerDir();if(!_0x4e0de8[_0x476cbe(0x10e)](existsSync,_0x5ea24c)){console[_0x476cbe(0x13f)](_0x476cbe(0x165)+link(_0x589a29,_0x4e0de8['vAEka'](bold,basename(_0x589a29)))),console['log']('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x476cbe(0x13f)](_0x476cbe(0x133));return;}console[_0x476cbe(0x13f)]('Root:\x20'+_0x4e0de8['uZUZJ'](link,_0x589a29,_0x4e0de8['pPkPq'](bold,_0x4e0de8[_0x476cbe(0xfa)](basename,_0x589a29))));const _0x8d6009=getCurrentVersion(),_0x376a15=_0x4e0de8['bZRzx'](getLatestVersion);if(_0x376a15['version']&&_0x4e0de8[_0x476cbe(0x15b)](_0x376a15['version'],_0x8d6009))console['log'](_0x476cbe(0x116)+_0x8d6009+'\x20(latest:\x20'+_0x376a15[_0x476cbe(0x115)]+')'),console[_0x476cbe(0x13f)]('\x20\x20Run:\x20ranger\x20update');else _0x376a15['version']?console['log']('Version:\x20'+_0x8d6009+_0x476cbe(0x157)):console[_0x476cbe(0x13f)](_0x476cbe(0x116)+_0x8d6009);const _0x5500d8=await getToken();if(_0x5500d8){const _0x249dad=await getCurrentUser(_0x5500d8);_0x249dad[_0x476cbe(0x105)]?console[_0x476cbe(0x13f)](_0x476cbe(0x12d)+bold(_0x249dad[_0x476cbe(0x131)]['organizationName'])):(console[_0x476cbe(0x13f)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x476cbe(0x13f)](_0x476cbe(0x135)));}else console[_0x476cbe(0x13f)](_0x476cbe(0x148)),console[_0x476cbe(0x13f)](_0x476cbe(0x135));process['env']['DEBUG']&&(console[_0x476cbe(0x13f)]('API\x20Environment:\x20'+getCurrentEnvironment()),console[_0x476cbe(0x13f)]('API\x20URL:\x20'+getApiBaseUrl()));console[_0x476cbe(0x13f)](_0x4e0de8[_0x476cbe(0x102)]);const _0x5edb8a=await _0x4e0de8[_0x476cbe(0x160)](getOpencodePluginStatus);if(_0x4e0de8['LWEOk'](_0x5edb8a['status'],'configured'))console[_0x476cbe(0x13f)]('\x20\x20'+_0x4e0de8[_0x476cbe(0xfa)](bold,_0x476cbe(0x137))+':\x20configured'),_0x5edb8a['details']&&console[_0x476cbe(0x13f)]('\x20\x20'+_0x5edb8a[_0x476cbe(0x14b)]);else _0x4e0de8[_0x476cbe(0x122)](_0x5edb8a[_0x476cbe(0xff)],_0x4e0de8[_0x476cbe(0x130)])?(console['log'](_0x4e0de8[_0x476cbe(0x143)]),_0x5edb8a['details']&&console['log']('\x20\x20'+_0x5edb8a[_0x476cbe(0x14b)]),console[_0x476cbe(0x13f)](_0x4e0de8['sqzLX'])):console[_0x476cbe(0x13f)](_0x476cbe(0x120));console[_0x476cbe(0x13f)](_0x4e0de8['HdLaw']);const _0x3f7add=await getPluginInfo(_0x4e0de8['iTAvh']);if(_0x3f7add){const _0xd8447a=_0x3f7add['scope']||_0x4e0de8[_0x476cbe(0x125)],_0x5c7bb6=_0x3f7add[_0x476cbe(0x134)]?_0x4e0de8[_0x476cbe(0x11c)]:'disabled';console['log']('\x20\x20'+bold(_0x4e0de8[_0x476cbe(0x14c)])+':\x20installed\x20('+_0xd8447a+',\x20'+_0x5c7bb6+')');}else console[_0x476cbe(0x13f)](_0x4e0de8['RHctw']),console[_0x476cbe(0x13f)](_0x476cbe(0x117));console[_0x476cbe(0x13f)](_0x4e0de8['bzfrg']);const {project:_0x558aff,user:_0x5e0ccf}=await getInstalledSkills(),_0xb314ce=_0x558aff['filter'](_0x24e4d0=>RANGER_MANAGED_SKILLS[_0x476cbe(0x129)](_0x24e4d0['name'])),_0x2c6c1b=_0x5e0ccf['filter'](_0x4bbafd=>RANGER_MANAGED_SKILLS['includes'](_0x4bbafd[_0x476cbe(0x14d)])),_0x41bc73=_0x4e0de8[_0x476cbe(0xfe)](_0xb314ce[_0x476cbe(0x14f)],_0x2c6c1b[_0x476cbe(0x14f)]);if(_0x41bc73===0x0)console[_0x476cbe(0x13f)](_0x476cbe(0x15f)),console[_0x476cbe(0x13f)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x4e0de8['JPTgc'](_0xb314ce['length'],0x0)){console[_0x476cbe(0x13f)]('\x20\x20Project-level:');for(const _0xe37969 of _0xb314ce){console[_0x476cbe(0x13f)]('\x20\x20\x20\x20'+_0x4e0de8[_0x476cbe(0x11a)](bold,_0xe37969['displayName'])+':\x20'+link(_0xe37969[_0x476cbe(0x128)],basename(_0xe37969['path'])));}}if(_0x2c6c1b[_0x476cbe(0x14f)]>0x0){console['log']('\x20\x20User-level:');for(const _0x4eedb1 of _0x2c6c1b){console[_0x476cbe(0x13f)]('\x20\x20\x20\x20'+bold(_0x4eedb1['displayName'])+':\x20'+_0x4e0de8[_0x476cbe(0x159)](link,_0x4eedb1[_0x476cbe(0x128)],basename(_0x4eedb1[_0x476cbe(0x128)])));}}}console[_0x476cbe(0x13f)](_0x476cbe(0x153));const {envs:_0x3b84a0,activeEnv:_0x3a2446}=await _0x4e0de8[_0x476cbe(0x110)](getEnvironments);let _0xc238fd=[];if(_0x5500d8)try{_0xc238fd=await _0x4e0de8[_0x476cbe(0x152)](listCloudProfiles);}catch{}const _0x5ade10=_0x4e0de8[_0x476cbe(0xfe)](_0x3b84a0['length'],_0xc238fd['length']);if(_0x4e0de8[_0x476cbe(0x12c)](_0x5ade10,0x0))console[_0x476cbe(0x13f)]('No\x20profiles\x20configured'),console['log'](_0x476cbe(0x103));else{if(_0x4e0de8[_0x476cbe(0x109)](_0x5ade10,0x5)){const _0x480135=[];_0xc238fd['length']>0x0&&_0x480135['push'](_0xc238fd['length']+'\x20cloud'),_0x3b84a0[_0x476cbe(0x14f)]>0x0&&_0x480135[_0x476cbe(0x13b)](_0x3b84a0['length']+_0x476cbe(0x15d)),console[_0x476cbe(0x13f)](_0x5ade10+_0x476cbe(0x119)+_0x480135[_0x476cbe(0x164)](',\x20')+')'),_0x3a2446&&console['log']('\x20\x20Active:\x20'+_0x4e0de8['ypeNJ'](bold,_0x3a2446)),console[_0x476cbe(0x13f)](_0x476cbe(0x12f));}else{for(const _0x10fcdc of _0xc238fd){const _0x4e27e4=_0x10fcdc[_0x476cbe(0x14d)]===_0x3a2446?_0x4e0de8[_0x476cbe(0x15e)]:'';console['log']('\x20\x20'+_0x4e0de8[_0x476cbe(0x100)](bold,_0x10fcdc['name'])+'\x20[cloud]'+_0x4e27e4);const _0x3b3538=_0x10fcdc['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x10fcdc['sessionUpdatedAt']+')':_0x476cbe(0x132);console[_0x476cbe(0x13f)](_0x476cbe(0xfb)+_0x3b3538);}const _0x17691a=new Set(_0xc238fd[_0x476cbe(0x11d)](_0x13fc57=>_0x13fc57[_0x476cbe(0x14d)]));for(const _0x42b113 of _0x3b84a0){if(_0x17691a[_0x476cbe(0x13d)](_0x42b113['name']))continue;const _0x4b027e=_0x42b113[_0x476cbe(0x10a)]?_0x476cbe(0x15a):'',_0x1db7b5=_0x42b113['hasEncryptedAuth']?'encrypted':_0x42b113['hasPlaintextAuth']?_0x476cbe(0x158):'none';console[_0x476cbe(0x13f)]('\x20\x20'+bold(_0x42b113[_0x476cbe(0x14d)])+'\x20[local]'+_0x4b027e),console[_0x476cbe(0x13f)](_0x476cbe(0x155)+_0x1db7b5),_0x4e0de8[_0x476cbe(0x15b)](_0x42b113[_0x476cbe(0x156)],_0x4e0de8['FZons'])&&console[_0x476cbe(0x13f)](_0x476cbe(0x11f)+_0x4e0de8['PklnR'](link,_0x42b113['settingsPath'],basename(_0x42b113[_0x476cbe(0x156)])));}if(!_0x3a2446){console[_0x476cbe(0x13f)]('\x0a\x20\x20No\x20active\x20profile\x20set');const _0x5233f0=[..._0xc238fd[_0x476cbe(0x11d)](_0x2b8016=>_0x2b8016['name']),..._0x3b84a0['filter'](_0x52c558=>!_0x17691a['has'](_0x52c558[_0x476cbe(0x14d)]))['map'](_0x3498cb=>_0x3498cb['name'])];console['log'](_0x476cbe(0x121)+_0x5233f0['join'](',\x20')+')');}}}console[_0x476cbe(0x13f)]('');}
1
+ const _0x3ee617=_0x29d7;(function(_0x423521,_0x21abdc){const _0x14fd40=_0x29d7,_0x20982e=_0x423521();while(!![]){try{const _0x3631fd=-parseInt(_0x14fd40(0x14e))/0x1*(-parseInt(_0x14fd40(0x14a))/0x2)+parseInt(_0x14fd40(0x178))/0x3*(-parseInt(_0x14fd40(0x173))/0x4)+parseInt(_0x14fd40(0x15b))/0x5+-parseInt(_0x14fd40(0x135))/0x6*(-parseInt(_0x14fd40(0x127))/0x7)+-parseInt(_0x14fd40(0x13c))/0x8*(-parseInt(_0x14fd40(0x167))/0x9)+parseInt(_0x14fd40(0x131))/0xa+-parseInt(_0x14fd40(0x181))/0xb;if(_0x3631fd===_0x21abdc)break;else _0x20982e['push'](_0x20982e['shift']());}catch(_0x426724){_0x20982e['push'](_0x20982e['shift']());}}}(_0x1fd1,0x4f3d9));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 _0x1fd1(){const _0x5516a5=['\x20(up\x20to\x20date)','jdFnC','jKhdp','(not\x20found)','3804548nFyVxc','displayName','version','\x20(latest:\x20','\x1b[1m','GKSRo','not_configured','filter','kseIk','\x20\x20Run:\x20ranger\x20setup\x20[token]','\x20cloud','npivj','PeqGO','No\x20skills\x20installed','auth.json.enc','not_installed','hasPlaintextAuth','stderr','35336iHzOLK','API\x20URL:\x20','map','settingsPath','stdout','plugin','@ranger-testing/opencode-plugin','isDirectory','FDvSC','jJqgk','6396090saRFTH','ASyKr','tUQsn','mmlOY','96DRQgMO','isActive','scope','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','data','yaJao','API\x20Token:\x20✗\x20Not\x20found','219656JPOqKf','\x0a---\x20Skills\x20---','\x20\x20\x20\x20Auth:\x20','Erbfv','name','pipe','\x20\x20Run:\x20ranger\x20update','JxQDH','details','XntKU','\x20[local]','\x0a\x20\x20No\x20active\x20profile\x20set','sessionUpdatedAt','\x20\x20Project-level:','6dLyJwi','unknown','utf-8','OCkQj','120723CLOVUK','wbVvT','ranger@trailhead','close','enabled','bJRjq','log','BRvRL','settings.json','Version:\x20','\x20(active)','MRJSG','no\x20session','145475DtkkFf','error','cwd','encrypted','\x20\x20\x20\x20','trim','parse','length','ignore','kgHpT','includes','\x0a---\x20Profiles\x20---','36JdVHfk',':\x20configured','nGTvF','none','ooFme','path','\x20\x20Run:\x20ranger\x20skillup','configured','nywaP','\x20\x20\x20\x20Settings:\x20','UkRAN','user','16ManGok','\x1b]8;;file://','has','rNnvc','string','413274WFEOPq','push','HRTIZ','hasEncryptedAuth','\x20\x20\x20\x20Session:\x20'];_0x1fd1=function(){return _0x5516a5;};return _0x1fd1();}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=_0x125aaf=>_0x3ee617(0x185)+_0x125aaf+'\x1b[0m',link=(_0x2df574,_0x495d9a)=>_0x3ee617(0x174)+_0x2df574+'\x07'+(_0x495d9a||_0x2df574)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x118a18=_0x3ee617,_0x14f1e4={'wbVvT':function(_0x5dd2c2,_0x2f775f){return _0x5dd2c2(_0x2f775f);},'lpEJz':_0x118a18(0x12d),'pIibf':function(_0x5ebda0,_0x1b27ce){return _0x5ebda0!==_0x1b27ce;},'jJqgk':_0x118a18(0x124),'aGKFt':function(_0x1acd71,_0x5f1dc8){return _0x1acd71>_0x5f1dc8;},'kgHpT':'debug','JxQDH':'config','nywaP':_0x118a18(0x163),'LOdSV':_0x118a18(0x141),'sOFbe':_0x118a18(0x139),'VBHvy':_0x118a18(0x151)};return new Promise(_0x4408a6=>{const _0x5cc213=_0x118a18,_0x22a7c4={'OCkQj':_0x5cc213(0x177),'rNnvc':_0x14f1e4['lpEJz'],'gungK':function(_0x298d5b,_0x2d1f7b){return _0x14f1e4['pIibf'](_0x298d5b,_0x2d1f7b);},'kseIk':_0x14f1e4[_0x5cc213(0x130)],'dxPsk':function(_0xd3abd3,_0xd0bdbe){return _0x14f1e4['aGKFt'](_0xd3abd3,_0xd0bdbe);},'EiyMj':function(_0x1688bf,_0x6ca1f1){return _0x1688bf(_0x6ca1f1);}},_0x3ffa84=spawn('opencode',[_0x14f1e4[_0x5cc213(0x164)],_0x14f1e4[_0x5cc213(0x143)]],{'stdio':[_0x14f1e4[_0x5cc213(0x16f)],'pipe',_0x14f1e4['LOdSV']]});let _0x250511='';_0x3ffa84[_0x5cc213(0x12b)]?.['on'](_0x14f1e4['sOFbe'],_0x4ff057=>{_0x250511+=_0x4ff057['toString']();}),_0x3ffa84[_0x5cc213(0x126)]?.['on'](_0x5cc213(0x139),_0x3fc995=>{_0x250511+=_0x3fc995['toString']();}),_0x3ffa84['on'](_0x5cc213(0x15c),()=>{const _0xcee8dc=_0x5cc213;_0x14f1e4[_0xcee8dc(0x14f)](_0x4408a6,{'status':'not_installed'});}),_0x3ffa84['on'](_0x14f1e4['VBHvy'],_0x42dfd2=>{const _0x4ac958=_0x5cc213;if(_0x22a7c4['gungK'](_0x42dfd2,0x0)){_0x4408a6({'status':_0x22a7c4[_0x4ac958(0x189)]});return;}const _0x48f443=_0x250511['trim']();let _0x2e50e8=null;if(_0x48f443)try{_0x2e50e8=JSON[_0x4ac958(0x161)](_0x48f443);}catch{const _0xb1be85=_0x48f443['match'](/\{[\s\S]*\}$/);if(_0xb1be85)try{_0x2e50e8=JSON[_0x4ac958(0x161)](_0xb1be85[0x0]);}catch{_0x2e50e8=null;}}const _0x3853a8=Array['isArray'](_0x2e50e8?.[_0x4ac958(0x12c)])?_0x2e50e8?.[_0x4ac958(0x12c)]:[],_0x57d6bf=_0x3853a8['some'](_0x2f360f=>{const _0x3a1b39=_0x4ac958;if(typeof _0x2f360f!==_0x22a7c4[_0x3a1b39(0x14d)])return![];return _0x2f360f[_0x3a1b39(0x165)](_0x22a7c4[_0x3a1b39(0x176)])||_0x2f360f['includes']('opencode-plugin');});if(_0x57d6bf){_0x4408a6({'status':_0x4ac958(0x16e),'details':_0x22a7c4['dxPsk'](_0x3853a8[_0x4ac958(0x162)],0x0)?_0x3853a8['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x3853a8['length']>0x0){_0x4408a6({'status':'not_configured','details':_0x3853a8[_0x4ac958(0x162)]+'\x20plugin(s)\x20configured'});return;}_0x22a7c4['EiyMj'](_0x4408a6,{'status':_0x4ac958(0x187)});});});}function _0x29d7(_0x386139,_0xa220cd){_0x386139=_0x386139-0x122;const _0x1fd1ed=_0x1fd1();let _0x29d720=_0x1fd1ed[_0x386139];return _0x29d720;}async function getSkillsFromDir(_0xfb009a,_0x235f3d){const _0x12ec4b=_0x3ee617,_0x3293c9={'jdFnC':function(_0x22f57b,_0x545bca,_0x181dcb){return _0x22f57b(_0x545bca,_0x181dcb);}};if(!existsSync(_0xfb009a))return[];const _0x15f584=[];try{const _0x43a0ae=await readdir(_0xfb009a,{'withFileTypes':!![]});for(const _0x473b7c of _0x43a0ae){if(_0x473b7c[_0x12ec4b(0x12e)]()){const _0x4a7b06=join(_0xfb009a,_0x473b7c['name'],'SKILL.md');if(existsSync(_0x4a7b06)){let _0x35d464=_0x473b7c[_0x12ec4b(0x140)];try{const _0x263bbc=await _0x3293c9[_0x12ec4b(0x17e)](readFile,_0x4a7b06,_0x12ec4b(0x14c)),_0xc3a9e=_0x263bbc['match'](/name:\s*(.+)/);_0xc3a9e&&(_0x35d464=_0xc3a9e[0x1][_0x12ec4b(0x160)]());}catch{}_0x15f584[_0x12ec4b(0x179)]({'name':_0x473b7c['name'],'displayName':_0x35d464,'path':_0x4a7b06,'level':_0x235f3d});}}}}catch{return[];}return _0x15f584;}async function getInstalledSkills(){const _0x5d0581=_0x3ee617,_0x1fabd4={'yaJao':function(_0x1bd6fb,_0x706c47,_0x145c62){return _0x1bd6fb(_0x706c47,_0x145c62);},'MRJSG':'project','ooFme':function(_0x3ad162){return _0x3ad162();},'EugJp':_0x5d0581(0x172)},[_0x1e43fd,_0x3ba8ca]=await Promise['all']([_0x1fabd4[_0x5d0581(0x13a)](getSkillsFromDir,getProjectSkillsDir(),_0x1fabd4[_0x5d0581(0x159)]),getSkillsFromDir(_0x1fabd4[_0x5d0581(0x16b)](getUserSkillsDir),_0x1fabd4['EugJp'])]);return{'project':_0x1e43fd,'user':_0x3ba8ca};}async function getEnvironments(){const _0x4206d9=_0x3ee617,_0x7fadcf={'EWtVa':_0x4206d9(0x156),'mmlOY':function(_0x348f56,_0x4b609d,_0x1febca){return _0x348f56(_0x4b609d,_0x1febca);},'orupo':'auth.json','PeqGO':_0x4206d9(0x180),'apdmm':function(_0x53a7cd,_0x4f3ece){return _0x53a7cd(_0x4f3ece);}},{envNames:_0x19b332,activeEnv:_0x496a5c}=await getEnvNames(),_0x53f9e5=getRangerDir();if(!_0x7fadcf['apdmm'](existsSync,_0x53f9e5))return{'envs':[],'activeEnv':null};const _0x2b7b67=_0x19b332[_0x4206d9(0x129)](_0x32fa81=>{const _0x244f0a=_0x4206d9,_0x14eda5=getEnvDir(_0x32fa81),_0xd57ebf=join(_0x14eda5,_0x7fadcf['EWtVa']),_0xb387a4=_0x7fadcf[_0x244f0a(0x134)](join,_0x14eda5,_0x7fadcf['orupo']),_0x3cafbd=_0x7fadcf[_0x244f0a(0x134)](join,_0x14eda5,_0x244f0a(0x123));return{'name':_0x32fa81,'settingsPath':existsSync(_0xd57ebf)?_0xd57ebf:_0x7fadcf[_0x244f0a(0x18d)],'hasPlaintextAuth':existsSync(_0xb387a4),'hasEncryptedAuth':_0x7fadcf['apdmm'](existsSync,_0x3cafbd),'isActive':_0x32fa81===_0x496a5c};});return{'envs':_0x2b7b67,'activeEnv':_0x496a5c};}export async function status(){const _0x10008f=_0x3ee617,_0x14843b={'bJRjq':function(_0x408de0,_0x1228e2){return _0x408de0(_0x1228e2);},'HRTIZ':function(_0x11ad6c,_0x3bfe5e,_0x1c37a0){return _0x11ad6c(_0x3bfe5e,_0x1c37a0);},'UkRAN':function(_0x4f8e97,_0xbba061){return _0x4f8e97!==_0xbba061;},'JxgCz':function(_0x171aa0){return _0x171aa0();},'GkMCh':'\x0a---\x20OpenCode\x20Plugin\x20---','npivj':function(_0x38e44b){return _0x38e44b();},'Erbfv':function(_0x2d6f7,_0x22226f){return _0x2d6f7===_0x22226f;},'rZOkW':_0x10008f(0x16e),'pqsnY':function(_0x3320fb,_0x562912){return _0x3320fb===_0x562912;},'XntKU':'\x20\x20Not\x20configured','uLjuH':'ranger@trailhead','lKGlt':'\x20\x20Not\x20installed','CubQf':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','GKSRo':_0x10008f(0x13d),'WMaOs':function(_0x20f09b,_0x2178d3){return _0x20f09b>_0x2178d3;},'BRvRL':function(_0x29cac6,_0x3ae5b6){return _0x29cac6(_0x3ae5b6);},'tUQsn':function(_0x136b6e,_0x32261c){return _0x136b6e(_0x32261c);},'jKhdp':'No\x20profiles\x20configured','nGTvF':function(_0x5c24f2,_0x3c3547){return _0x5c24f2>_0x3c3547;},'hgYCg':function(_0x5e4734,_0x2335cb){return _0x5e4734>_0x2335cb;},'FDvSC':function(_0x503b96,_0x474477){return _0x503b96(_0x474477);},'OxiCM':_0x10008f(0x158),'YfBLh':_0x10008f(0x16a),'taoSK':'(not\x20found)','ASyKr':function(_0x3c8008,_0x1bb753,_0x233175){return _0x3c8008(_0x1bb753,_0x233175);}};console[_0x10008f(0x154)]('\x0a📊\x20Ranger\x20Status\x0a');const _0x286f8f=process[_0x10008f(0x15d)](),_0xe29985=getRangerDir();if(!_0x14843b[_0x10008f(0x153)](existsSync,_0xe29985)){console[_0x10008f(0x154)]('Root:\x20'+_0x14843b['HRTIZ'](link,_0x286f8f,bold(basename(_0x286f8f)))),console[_0x10008f(0x154)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log'](_0x10008f(0x138));return;}console['log']('Root:\x20'+link(_0x286f8f,bold(basename(_0x286f8f))));const _0x529501=getCurrentVersion(),_0x3f584b=getLatestVersion();if(_0x3f584b[_0x10008f(0x183)]&&_0x14843b[_0x10008f(0x171)](_0x3f584b[_0x10008f(0x183)],_0x529501))console[_0x10008f(0x154)](_0x10008f(0x157)+_0x529501+_0x10008f(0x184)+_0x3f584b[_0x10008f(0x183)]+')'),console['log'](_0x10008f(0x142));else _0x3f584b[_0x10008f(0x183)]?console['log']('Version:\x20'+_0x529501+_0x10008f(0x17d)):console[_0x10008f(0x154)]('Version:\x20'+_0x529501);const _0xa16235=await getToken();if(_0xa16235){const _0x12acf5=await getCurrentUser(_0xa16235);_0x12acf5['success']?console[_0x10008f(0x154)]('Organization:\x20'+_0x14843b['bJRjq'](bold,_0x12acf5[_0x10008f(0x172)]['organizationName'])):(console[_0x10008f(0x154)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x10008f(0x154)](_0x10008f(0x18a)));}else console['log'](_0x10008f(0x13b)),console[_0x10008f(0x154)](_0x10008f(0x18a));process['env']['DEBUG']&&(console[_0x10008f(0x154)]('API\x20Environment:\x20'+getCurrentEnvironment()),console[_0x10008f(0x154)](_0x10008f(0x128)+_0x14843b['JxgCz'](getApiBaseUrl)));console[_0x10008f(0x154)](_0x14843b['GkMCh']);const _0x43b55c=await _0x14843b[_0x10008f(0x18c)](getOpencodePluginStatus);if(_0x14843b[_0x10008f(0x13f)](_0x43b55c['status'],_0x14843b['rZOkW']))console[_0x10008f(0x154)]('\x20\x20'+_0x14843b[_0x10008f(0x153)](bold,_0x10008f(0x12d))+_0x10008f(0x168)),_0x43b55c[_0x10008f(0x144)]&&console[_0x10008f(0x154)]('\x20\x20'+_0x43b55c[_0x10008f(0x144)]);else _0x14843b['pqsnY'](_0x43b55c['status'],'not_configured')?(console['log'](_0x14843b[_0x10008f(0x145)]),_0x43b55c['details']&&console['log']('\x20\x20'+_0x43b55c[_0x10008f(0x144)]),console[_0x10008f(0x154)]('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console['log']('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x5468e9=await _0x14843b[_0x10008f(0x153)](getPluginInfo,_0x14843b['uLjuH']);if(_0x5468e9){const _0x296a09=_0x5468e9[_0x10008f(0x137)]||_0x10008f(0x14b),_0x365e5e=_0x5468e9['enabled']?_0x10008f(0x152):'disabled';console['log']('\x20\x20'+_0x14843b['bJRjq'](bold,_0x10008f(0x150))+':\x20installed\x20('+_0x296a09+',\x20'+_0x365e5e+')');}else console['log'](_0x14843b['lKGlt']),console[_0x10008f(0x154)](_0x14843b['CubQf']);console[_0x10008f(0x154)](_0x14843b[_0x10008f(0x186)]);const {project:_0x50076c,user:_0x8b1f94}=await _0x14843b['JxgCz'](getInstalledSkills),_0xadaec3=_0x50076c[_0x10008f(0x188)](_0x34ee1c=>RANGER_MANAGED_SKILLS[_0x10008f(0x165)](_0x34ee1c[_0x10008f(0x140)])),_0x5ab45e=_0x8b1f94[_0x10008f(0x188)](_0x540b64=>RANGER_MANAGED_SKILLS['includes'](_0x540b64['name'])),_0x1aa4a5=_0xadaec3[_0x10008f(0x162)]+_0x5ab45e['length'];if(_0x1aa4a5===0x0)console[_0x10008f(0x154)](_0x10008f(0x122)),console[_0x10008f(0x154)](_0x10008f(0x16d));else{if(_0x14843b['WMaOs'](_0xadaec3['length'],0x0)){console[_0x10008f(0x154)](_0x10008f(0x149));for(const _0x38f050 of _0xadaec3){console['log'](_0x10008f(0x15f)+bold(_0x38f050[_0x10008f(0x182)])+':\x20'+_0x14843b[_0x10008f(0x17a)](link,_0x38f050[_0x10008f(0x16c)],_0x14843b['bJRjq'](basename,_0x38f050['path'])));}}if(_0x5ab45e[_0x10008f(0x162)]>0x0){console[_0x10008f(0x154)]('\x20\x20User-level:');for(const _0x6bed55 of _0x5ab45e){console['log'](_0x10008f(0x15f)+_0x14843b[_0x10008f(0x155)](bold,_0x6bed55['displayName'])+':\x20'+link(_0x6bed55['path'],_0x14843b[_0x10008f(0x133)](basename,_0x6bed55['path'])));}}}console['log'](_0x10008f(0x166));const {envs:_0x58081e,activeEnv:_0x1ffdd1}=await getEnvironments();let _0x39022a=[];if(_0xa16235)try{_0x39022a=await listCloudProfiles();}catch{}const _0xb0d76c=_0x58081e['length']+_0x39022a[_0x10008f(0x162)];if(_0xb0d76c===0x0)console['log'](_0x14843b[_0x10008f(0x17f)]),console[_0x10008f(0x154)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{if(_0x14843b[_0x10008f(0x169)](_0xb0d76c,0x5)){const _0x135638=[];_0x14843b['hgYCg'](_0x39022a[_0x10008f(0x162)],0x0)&&_0x135638[_0x10008f(0x179)](_0x39022a['length']+_0x10008f(0x18b)),_0x58081e[_0x10008f(0x162)]>0x0&&_0x135638['push'](_0x58081e[_0x10008f(0x162)]+'\x20local'),console[_0x10008f(0x154)](_0xb0d76c+'\x20profiles\x20configured\x20('+_0x135638['join'](',\x20')+')'),_0x1ffdd1&&console['log']('\x20\x20Active:\x20'+_0x14843b['FDvSC'](bold,_0x1ffdd1)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)');}else{for(const _0x56120d of _0x39022a){const _0xde50fe=_0x56120d[_0x10008f(0x140)]===_0x1ffdd1?_0x14843b['OxiCM']:'';console['log']('\x20\x20'+bold(_0x56120d[_0x10008f(0x140)])+'\x20[cloud]'+_0xde50fe);const _0x3ba4e6=_0x56120d['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x56120d[_0x10008f(0x148)]+')':_0x10008f(0x15a);console[_0x10008f(0x154)](_0x10008f(0x17c)+_0x3ba4e6);}const _0x5c5937=new Set(_0x39022a['map'](_0x2ddba7=>_0x2ddba7['name']));for(const _0x4918d4 of _0x58081e){if(_0x5c5937[_0x10008f(0x175)](_0x4918d4['name']))continue;const _0x1a4ffa=_0x4918d4[_0x10008f(0x136)]?'\x20(active)':'',_0x286164=_0x4918d4[_0x10008f(0x17b)]?_0x10008f(0x15e):_0x4918d4[_0x10008f(0x125)]?'plaintext':_0x14843b['YfBLh'];console[_0x10008f(0x154)]('\x20\x20'+_0x14843b[_0x10008f(0x12f)](bold,_0x4918d4['name'])+_0x10008f(0x146)+_0x1a4ffa),console[_0x10008f(0x154)](_0x10008f(0x13e)+_0x286164),_0x14843b['UkRAN'](_0x4918d4[_0x10008f(0x12a)],_0x14843b['taoSK'])&&console[_0x10008f(0x154)](_0x10008f(0x170)+_0x14843b[_0x10008f(0x132)](link,_0x4918d4['settingsPath'],basename(_0x4918d4['settingsPath'])));}if(!_0x1ffdd1){console[_0x10008f(0x154)](_0x10008f(0x147));const _0x5a0023=[..._0x39022a[_0x10008f(0x129)](_0x5ab3d5=>_0x5ab3d5['name']),..._0x58081e[_0x10008f(0x188)](_0x1bc96f=>!_0x5c5937[_0x10008f(0x175)](_0x1bc96f['name']))[_0x10008f(0x129)](_0x44b1aa=>_0x44b1aa['name'])];console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x5a0023['join'](',\x20')+')');}}}console['log']('');}