@ranger-testing/ranger-cli 2.5.4-alpha.feb9faf-20 → 3.0.1-alpha.aab0a1c-26

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 (82) 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 -0
  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 -0
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/playwrightCli.js +1 -1
  60. package/build/commands/utils/profileMessages.js +1 -1
  61. package/build/commands/utils/profileSetupBanner.js +1 -1
  62. package/build/commands/utils/projectsConfig.js +1 -1
  63. package/build/commands/utils/rangerConfig.js +1 -1
  64. package/build/commands/utils/rangerRoot.js +1 -1
  65. package/build/commands/utils/resolveProfileContext.js +1 -1
  66. package/build/commands/utils/resolveProfileUrl.js +1 -1
  67. package/build/commands/utils/retry.js +1 -1
  68. package/build/commands/utils/sessionCache.js +1 -1
  69. package/build/commands/utils/settings.js +1 -1
  70. package/build/commands/utils/skillContent.js +1 -1
  71. package/build/commands/utils/skills.js +1 -1
  72. package/build/commands/utils/stitchWebmFiles.js +1 -1
  73. package/build/commands/utils/telemetry.js +1 -1
  74. package/build/commands/utils/tokenRefresh.js +1 -1
  75. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  76. package/build/commands/utils/userApi.js +1 -1
  77. package/build/commands/utils/version.js +1 -1
  78. package/build/commands/verifyFeature.js +1 -1
  79. package/build/commands/verifyFeatureCli.js +1 -1
  80. package/build/commands/verifyFeatureNovaCli.js +1 -0
  81. package/build/skills/ranger/SKILL.md +1 -1
  82. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x178175,_0x210e76){const _0x41c450=_0x14da,_0x4fa62b=_0x178175();while(!![]){try{const _0x25732d=-parseInt(_0x41c450(0xee))/0x1+parseInt(_0x41c450(0xf3))/0x2*(-parseInt(_0x41c450(0xf2))/0x3)+-parseInt(_0x41c450(0xfc))/0x4*(parseInt(_0x41c450(0xef))/0x5)+parseInt(_0x41c450(0xf7))/0x6*(-parseInt(_0x41c450(0xfb))/0x7)+-parseInt(_0x41c450(0xfa))/0x8*(parseInt(_0x41c450(0xec))/0x9)+-parseInt(_0x41c450(0xfd))/0xa*(-parseInt(_0x41c450(0xf1))/0xb)+parseInt(_0x41c450(0xed))/0xc;if(_0x25732d===_0x210e76)break;else _0x4fa62b['push'](_0x4fa62b['shift']());}catch(_0x3ef524){_0x4fa62b['push'](_0x4fa62b['shift']());}}}(_0x1491,0xa04b2));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';function _0x14da(_0x3bf934,_0x5dff5e){_0x3bf934=_0x3bf934-0xec;const _0x14917f=_0x1491();let _0x14da26=_0x14917f[_0x3bf934];return _0x14da26;}export async function login(){const _0xb042e2=_0x14da,_0x158021={'aBzgK':function(_0x1c4ce4){return _0x1c4ce4();},'mGUlT':'Re-authenticating\x20via\x20MCP\x20bootstrap...','DITPK':function(_0x4da965){return _0x4da965();},'fowgx':_0xb042e2(0xf4),'HrHDD':_0xb042e2(0xff)},_0x1d85d1=await _0x158021[_0xb042e2(0xf0)](getMcpAuthOrigin);if(_0x1d85d1){console[_0xb042e2(0xf5)](_0x158021['mGUlT']),await _0x158021[_0xb042e2(0xf8)](mcpBootstrap);return;}const _0x2b3daa=process['stdin']['isTTY']&&process[_0xb042e2(0xfe)]['isTTY'];if(!_0x2b3daa)throw new Error(_0x158021['fowgx']);try{const _0x118437=await runDeviceAuthFlow(),_0x75a917=await getCurrentUser(_0x118437);_0x75a917['success']?console[_0xb042e2(0xf5)](_0xb042e2(0xf9)+_0x75a917['user']['organizationName']):console[_0xb042e2(0xf5)](_0x158021['HrHDD']);}catch(_0x4e1a2e){throw new Error(_0xb042e2(0xf6)+(_0x4e1a2e instanceof Error?_0x4e1a2e['message']:_0x4e1a2e));}}function _0x1491(){const _0x2ed117=['82GgQuWV','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','log','Login\x20failed:\x20','6978HmhSAZ','DITPK','\x0a✅\x20Logged\x20in\x20to\x20','297384cTYLJk','1659utlVZs','232kupPKg','570NkIFpo','stdout','\x0a✅\x20API\x20key\x20stored\x20successfully','297GoLXoC','37235064DZdQbC','271796skbDdm','91135PtZcOR','aBzgK','237193bLFmAV','61767rMKjuj'];_0x1491=function(){return _0x2ed117;};return _0x1491();}
1
+ function _0x35c2(_0xbf9b3b,_0x1705f6){_0xbf9b3b=_0xbf9b3b-0x1cf;const _0x2527fd=_0x2527();let _0x35c22a=_0x2527fd[_0xbf9b3b];return _0x35c22a;}(function(_0x5b4770,_0x318645){const _0x1c7dcc=_0x35c2,_0x2ca36d=_0x5b4770();while(!![]){try{const _0x56fd50=-parseInt(_0x1c7dcc(0x1d1))/0x1+parseInt(_0x1c7dcc(0x1d3))/0x2*(parseInt(_0x1c7dcc(0x1d9))/0x3)+-parseInt(_0x1c7dcc(0x1d0))/0x4+-parseInt(_0x1c7dcc(0x1d4))/0x5+parseInt(_0x1c7dcc(0x1dd))/0x6*(parseInt(_0x1c7dcc(0x1de))/0x7)+parseInt(_0x1c7dcc(0x1d5))/0x8*(-parseInt(_0x1c7dcc(0x1d8))/0x9)+-parseInt(_0x1c7dcc(0x1df))/0xa*(-parseInt(_0x1c7dcc(0x1d2))/0xb);if(_0x56fd50===_0x318645)break;else _0x2ca36d['push'](_0x2ca36d['shift']());}catch(_0x61720c){_0x2ca36d['push'](_0x2ca36d['shift']());}}}(_0x2527,0xde6c4));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x2527(){const _0x568a38=['6016328VdljZE','log','Login\x20failed:\x20','9IPPBNM','155667aKHxLk','Re-authenticating\x20via\x20MCP\x20bootstrap...','ffjZd','\x0a✅\x20Logged\x20in\x20to\x20','30KMYnxP','2300186ZrGHBW','8570GgYVMs','organizationName','success','6705480YEFgzn','935206qclgLT','35563DgRfak','16Gsxehq','2770610fnGwZG'];_0x2527=function(){return _0x568a38;};return _0x2527();}export async function login(){const _0x37c8af=_0x35c2,_0x4c32e5={'ffjZd':_0x37c8af(0x1da),'melut':function(_0x45b256){return _0x45b256();},'jYopU':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','bXJfK':'\x0a✅\x20API\x20key\x20stored\x20successfully'},_0x166909=await getMcpAuthOrigin();if(_0x166909){console[_0x37c8af(0x1d6)](_0x4c32e5[_0x37c8af(0x1db)]),await mcpBootstrap();return;}if(!_0x4c32e5['melut'](isInteractive))throw new Error(_0x4c32e5['jYopU']);try{const _0x2b64d0=await _0x4c32e5['melut'](runDeviceAuthFlow),_0x4fb8ed=await getCurrentUser(_0x2b64d0);_0x4fb8ed[_0x37c8af(0x1cf)]?console['log'](_0x37c8af(0x1dc)+_0x4fb8ed['user'][_0x37c8af(0x1e0)]):console['log'](_0x4c32e5['bXJfK']);}catch(_0x306620){throw new Error(_0x37c8af(0x1d7)+(_0x306620 instanceof Error?_0x306620['message']:_0x306620));}}
@@ -1 +1 @@
1
- const _0xa3d572=_0x55ea;(function(_0x5a57f5,_0x509733){const _0x534bbf=_0x55ea,_0x24ca99=_0x5a57f5();while(!![]){try{const _0x53c42e=parseInt(_0x534bbf(0xf1))/0x1*(parseInt(_0x534bbf(0x11b))/0x2)+-parseInt(_0x534bbf(0xef))/0x3+-parseInt(_0x534bbf(0x11a))/0x4+-parseInt(_0x534bbf(0xe5))/0x5+-parseInt(_0x534bbf(0xe7))/0x6*(parseInt(_0x534bbf(0x120))/0x7)+-parseInt(_0x534bbf(0x137))/0x8*(parseInt(_0x534bbf(0xe3))/0x9)+parseInt(_0x534bbf(0x113))/0xa;if(_0x53c42e===_0x509733)break;else _0x24ca99['push'](_0x24ca99['shift']());}catch(_0x229f83){_0x24ca99['push'](_0x24ca99['shift']());}}}(_0x426e,0xc66cc));import{mkdir,writeFile,readFile}from'fs/promises';function _0x426e(){const _0x37858e=['client_id','registration_endpoint','json','content-type','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','40441610zrwHJV','WdDbA','end','\x0aUnexpected\x20response\x20structure:','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','replace','now','468432OxdRja','4990GFckEk','searchParams','name','base64url','text/html','308623FQequw','yYOzF','uNZVg','aNLbo','Requesting\x20CLI\x20token...','slice','BXjvA','uzYdm','error','Initializing\x20MCP\x20session...','Unknown\x20error','MByjT','/.well-known/oauth-authorization-server','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','TkIyN','ogIVC','get_cli_token\x20failed:\x20','digest','OAuth\x20error:\x20','get','authorization_code','token','expires_in','7116456UNXmqN','hPxSA','origin','error_description','kByRv','ScPpF','resource','OAuthTimeoutError','content','write','MCP\x20server\x20returned\x20HTTP\x20','Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','Ranger\x20CLI','Not\x20found','PJbiu','text','state','listen','dKmbw','<html><body><h2>Authentication\x20failed</h2><p>','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','status','\x20done','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','\x0aOpening\x20browser\x20for\x20authentication...','krUts','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','rpcKy','authorization_endpoint','ranger-cli','utf-8','cZgPI','aSbBu','Server\x20returned\x20error:\x20','message','darwin','xFtDG','stdout','stringify','open','close','notifications/initialized','code','set','imHPX','includes','url','clientId','XufDw','result','No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','auth-origin.txt','Exchanging\x20authorization\x20code...','gNdJK','client_secret','trim','tRciU','update','tUnUq','vRTGA','toString','POST','authorization_servers','KKBfz','isError','UuWDf','StEMe','writeHead','9MzAjnb','mRuEa','7657830NnEIlW','code_challenge_method','156BSkrMb','split','Authorization','redirect_uri','expiresAt','application/json','access_token','UMFTu','249879GlcNiO','/callback','215YVJNAI','initialize','DLCXV','http://localhost:','ajjQa','GugFN','cyysz','1.0.0','accessToken','RoVqT','clientSecret','qJErM','zhUHr','application/json,\x20text/event-stream','TbYBj','closeAllConnections','hex','ARVJS','127.0.0.1','2.0','startsWith','log','Registering\x20OAuth\x20client...','then','rzzSd','lmRjT','eqtTG','CMUYc','.ranger'];_0x426e=function(){return _0x37858e;};return _0x426e();}import{join}from'path';function _0x55ea(_0x35ee12,_0xef6851){_0x35ee12=_0x35ee12-0xc1;const _0x426e1c=_0x426e();let _0x55eaca=_0x426e1c[_0x35ee12];return _0x55eaca;}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(),_0xa3d572(0x10d),'mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),_0xa3d572(0x10d),_0xa3d572(0xd2));export async function getMcpAuthOrigin(){const _0xcc5dd7=_0xa3d572;try{const _0xd9535f=(await readFile(AUTH_ORIGIN_PATH,'utf-8'))[_0xcc5dd7(0xd6)]();return _0xd9535f||null;}catch{return null;}}export async function mcpBootstrap(){const _0x348c0e=_0xa3d572,_0x5cbb29={'ELlKL':function(_0xbedba2){return _0xbedba2();},'OHYnj':function(_0x5c92f3,_0x54396f){return _0x5c92f3(_0x54396f);},'KLCyl':'proxied','tRciU':function(_0x24c811,_0x35abee){return _0x24c811+_0x35abee;},'ogIVC':_0x348c0e(0x14e),'xrgVg':function(_0x13d7d3,_0x1034a3,_0x27a9da){return _0x13d7d3(_0x1034a3,_0x27a9da);}},_0x586818=_0x5cbb29['ELlKL'](getMcpAuthUrl);currentOrigin=_0x586818;const _0x273061=process[_0x348c0e(0xc4)]['isTTY']??![];console['log']('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x586818+'\x0a');const _0x16a813=await _0x5cbb29['OHYnj'](tryUnauthenticated,_0x586818);let _0x175308=null;if(_0x16a813===_0x5cbb29['KLCyl'])_0x175308='';else{_0x175308=await loadCachedToken();if(!_0x175308){if(!_0x273061)throw new Error(_0x5cbb29[_0x348c0e(0xd7)]('MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a',_0x5cbb29[_0x348c0e(0x12f)]));_0x175308=await _0x5cbb29['OHYnj'](oauthFlow,_0x586818);}}await _0x5cbb29['xrgVg'](callGetCliToken,_0x586818,_0x175308);}async function tryUnauthenticated(_0x1b9e26){const _0x5885c2=_0xa3d572,_0x18dce1={'LoEUP':'application/json','vRTGA':_0x5885c2(0xf2),'sdENZ':'2025-03-26','TkIyN':'ranger-cli','RoVqT':_0x5885c2(0xf8),'cLDYF':function(_0x1be7d1,_0x4035eb){return _0x1be7d1===_0x4035eb;}},_0x133bf7=await fetch(_0x1b9e26,{'method':'POST','headers':{'Content-Type':_0x18dce1['LoEUP'],'Accept':_0x5885c2(0xfe)},'body':JSON['stringify']({'jsonrpc':_0x5885c2(0x104),'id':0x1,'method':_0x18dce1[_0x5885c2(0xda)],'params':{'protocolVersion':_0x18dce1['sdENZ'],'capabilities':{},'clientInfo':{'name':_0x18dce1[_0x5885c2(0x12e)],'version':_0x18dce1[_0x5885c2(0xfa)]}}})});if(_0x133bf7['ok'])return await _0x133bf7[_0x5885c2(0x146)](),'proxied';if(_0x18dce1['cLDYF'](_0x133bf7[_0x5885c2(0x14c)],0x191))return await _0x133bf7[_0x5885c2(0x146)](),'needs-oauth';const _0x4b1924=await _0x133bf7[_0x5885c2(0x146)]();throw new Error(_0x5885c2(0x141)+_0x133bf7[_0x5885c2(0x14c)]+':\x20'+_0x4b1924);}class OAuthTimeoutError extends Error{constructor(_0x10e934){const _0x2ac381=_0xa3d572,_0x32ee8b={'cZgPI':_0x2ac381(0x13e)};super(_0x10e934),this[_0x2ac381(0x11d)]=_0x32ee8b[_0x2ac381(0x156)];}}async function oauthFlow(_0xba29eb){const _0x326057=_0xa3d572,_0x4898f1={'kZVEY':function(_0x1a03f2,_0x5063ab){return _0x1a03f2(_0x5063ab);},'iWkII':function(_0x4a340b,_0x205597){return _0x4a340b instanceof _0x205597;},'GhPOB':function(_0x1982f9){return _0x1982f9();},'PJbiu':'\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','uNnMc':function(_0x2622c3){return _0x2622c3();},'zCsuU':function(_0x97aa87,_0x19e685){return _0x97aa87(_0x19e685);}};try{return await _0x4898f1['kZVEY'](oauthFlowAttempt,_0xba29eb);}catch(_0x4edfe3){if(_0x4898f1['iWkII'](_0x4edfe3,OAuthTimeoutError)&&await _0x4898f1['GhPOB'](loadCachedClient))return console[_0x326057(0x106)](_0x4898f1[_0x326057(0x145)]),await _0x4898f1['uNnMc'](clearCachedClient),await _0x4898f1['zCsuU'](oauthFlowAttempt,_0xba29eb);throw _0x4edfe3;}}async function oauthFlowAttempt(_0x11f9d6){const _0x5460aa=_0xa3d572,_0x1175e9={'aSbBu':function(_0x467445,_0x11406f){return _0x467445(_0x11406f);},'tUnUq':function(_0x52f004,_0x1cf6f6){return _0x52f004(_0x1cf6f6);},'PLcqM':'application/json','isYKP':_0x5460aa(0x134),'hPxSA':'none','lmRjT':_0x5460aa(0x14d),'DTgAe':'sha256','rzzSd':_0x5460aa(0xc9),'mRuEa':_0x5460aa(0xea),'ZDSDe':'S256','qJErM':'state','GugFN':_0x5460aa(0xd3),'zjdxY':_0x5460aa(0x13d),'zhUHr':function(_0x3ec995,_0x40b833,_0x4f6acd){return _0x3ec995(_0x40b833,_0x4f6acd);},'tPUIy':_0x5460aa(0xdc)},_0x7002c0=_0x11f9d6[_0x5460aa(0x118)](/\/mcp$/,'');process[_0x5460aa(0xc4)]['write']('Discovering\x20authorization\x20server...');const _0x5a1ce8=await _0x1175e9[_0x5460aa(0x157)](fetch,_0x7002c0+'/.well-known/oauth-protected-resource');if(!_0x5a1ce8['ok'])throw new Error(_0x5460aa(0x142));const _0x4dd2bb=await _0x5a1ce8['json'](),_0xec982b=_0x4dd2bb[_0x5460aa(0xdd)]?.[0x0];if(!_0xec982b)throw new Error(_0x5460aa(0xd1));console[_0x5460aa(0x106)]('\x20'+_0xec982b);const _0x377cb=await _0x1175e9[_0x5460aa(0xd9)](fetchAuthServerMetadata,_0xec982b);let _0x462db9,_0x29a5d8;const _0x386829=await loadCachedClient();if(_0x386829)_0x462db9=_0x386829['clientId'],_0x29a5d8=_0x386829[_0x5460aa(0xfb)];else{if(_0x377cb['registration_endpoint']){process['stdout']['write'](_0x5460aa(0x107));const _0x2c8b06=await fetch(_0x377cb[_0x5460aa(0x10f)],{'method':'POST','headers':{'Content-Type':_0x1175e9['PLcqM']},'body':JSON[_0x5460aa(0xc5)]({'client_name':_0x5460aa(0x143),'redirect_uris':[_0x5460aa(0xf4)+CALLBACK_PORT+'/callback'],'grant_types':[_0x1175e9['isYKP'],'refresh_token'],'response_types':[_0x5460aa(0xc9)],'token_endpoint_auth_method':_0x1175e9[_0x5460aa(0x138)]})});if(!_0x2c8b06['ok']){const _0xafc7c4=await _0x2c8b06['text']();throw new Error('Client\x20registration\x20failed:\x20'+_0xafc7c4);}const _0x2222da=await _0x2c8b06['json']();_0x462db9=_0x2222da[_0x5460aa(0x10e)],_0x29a5d8=_0x2222da['client_secret'],await saveCachedClient(_0x462db9,_0x29a5d8),console['log'](_0x1175e9['lmRjT']);}else throw new Error(_0x5460aa(0x14b));}const _0x5c9d77=_0x1175e9['tUnUq'](randomBytes,0x20)[_0x5460aa(0xdb)](_0x5460aa(0x11e)),_0x538938=createHash(_0x1175e9['DTgAe'])[_0x5460aa(0xd8)](_0x5c9d77)[_0x5460aa(0x131)](_0x5460aa(0x11e)),_0x5010fe=_0x1175e9['aSbBu'](randomBytes,0x10)['toString'](_0x5460aa(0x101)),_0x1c5a5a=new URL(_0x377cb[_0x5460aa(0x153)]);_0x1c5a5a[_0x5460aa(0x11c)][_0x5460aa(0xca)]('response_type',_0x1175e9[_0x5460aa(0x109)]),_0x1c5a5a['searchParams'][_0x5460aa(0xca)](_0x5460aa(0x10e),_0x462db9),_0x1c5a5a['searchParams'][_0x5460aa(0xca)](_0x1175e9[_0x5460aa(0xe4)],'http://localhost:'+CALLBACK_PORT+'/callback'),_0x1c5a5a[_0x5460aa(0x11c)][_0x5460aa(0xca)]('code_challenge',_0x538938),_0x1c5a5a['searchParams']['set'](_0x5460aa(0xe6),_0x1175e9['ZDSDe']),_0x1c5a5a['searchParams'][_0x5460aa(0xca)](_0x1175e9[_0x5460aa(0xfc)],_0x5010fe);_0x4dd2bb[_0x5460aa(0x13d)]&&_0x1c5a5a['searchParams'][_0x5460aa(0xca)]('resource',_0x4dd2bb[_0x5460aa(0x13d)]);console[_0x5460aa(0x106)](_0x5460aa(0x14f)),console[_0x5460aa(0x106)](_0x5460aa(0x12d)+_0x1c5a5a[_0x5460aa(0xdb)]()+'\x0a'),await openBrowser(_0x1c5a5a[_0x5460aa(0xdb)]());const _0x3f89be=await waitForCallback(_0x5010fe);process[_0x5460aa(0xc4)]['write'](_0x1175e9[_0x5460aa(0xf6)]);const _0x4c3eab=new URLSearchParams({'grant_type':_0x5460aa(0x134),'code':_0x3f89be,'redirect_uri':_0x5460aa(0xf4)+CALLBACK_PORT+_0x5460aa(0xf0),'client_id':_0x462db9,'code_verifier':_0x5c9d77});_0x29a5d8&&_0x4c3eab['set'](_0x5460aa(0xd5),_0x29a5d8);_0x4dd2bb['resource']&&_0x4c3eab[_0x5460aa(0xca)](_0x1175e9['zjdxY'],_0x4dd2bb['resource']);const _0x3d8511=await _0x1175e9[_0x5460aa(0xfd)](fetch,_0x377cb['token_endpoint'],{'method':_0x1175e9['tPUIy'],'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':_0x4c3eab});if(!_0x3d8511['ok']){const _0x4e4845=await _0x3d8511[_0x5460aa(0x146)]();throw new Error('Token\x20exchange\x20failed:\x20'+_0x4e4845);}const _0x56e853=await _0x3d8511[_0x5460aa(0x110)]();return console['log'](_0x1175e9[_0x5460aa(0x10a)]),await saveCachedToken(_0x56e853[_0x5460aa(0xed)],_0x56e853['refresh_token'],_0x56e853[_0x5460aa(0x136)]),_0x56e853[_0x5460aa(0xed)];}async function callGetCliToken(_0x3f8145,_0x4e9c7f){const _0x5de3fe=_0xa3d572,_0x38a9d8={'dKmbw':function(_0x250b31,_0x53e62b,_0x36f9b7){return _0x250b31(_0x53e62b,_0x36f9b7);},'OfUEW':'application/json,\x20text/event-stream','cyysz':_0x5de3fe(0xe9),'qtZWH':function(_0x28f432,_0x14df6a){return _0x28f432(_0x14df6a);},'FKINP':'initialize','UMFTu':'2025-03-26','bFMsb':_0x5de3fe(0x154),'uNZVg':'\x20done','bnCfN':_0x5de3fe(0x104),'crWKE':_0x5de3fe(0xc8),'gNdJK':'get_cli_token','MByjT':function(_0x950a44,_0x3e7a4a){return _0x950a44(_0x3e7a4a);},'XtxJX':'refresh.txt','FmmRy':function(_0x3d5325,_0x1fe051,_0x51008a){return _0x3d5325(_0x1fe051,_0x51008a);},'krUts':_0x5de3fe(0xd2),'CMUYc':'Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a'},_0x4b6863={'Content-Type':_0x5de3fe(0xec),'Accept':_0x38a9d8['OfUEW']};_0x4e9c7f&&(_0x4b6863[_0x38a9d8[_0x5de3fe(0xf7)]]='Bearer\x20'+_0x4e9c7f);const _0x340356=async _0x3a2685=>{const _0x185510=await _0x38a9d8['dKmbw'](fetch,_0x3f8145,{'method':'POST','headers':_0x4b6863,'body':JSON['stringify'](_0x3a2685)});if(!_0x185510['ok']){const _0x491b7e=await _0x185510['text']();throw new Error('HTTP\x20'+_0x185510['status']+':\x20'+_0x491b7e);}return parseResponse(_0x185510);};process[_0x5de3fe(0xc4)]['write'](_0x5de3fe(0x129));const _0x5b4b2e=await _0x38a9d8['qtZWH'](_0x340356,{'jsonrpc':'2.0','id':0x1,'method':_0x38a9d8['FKINP'],'params':{'protocolVersion':_0x38a9d8[_0x5de3fe(0xee)],'capabilities':{},'clientInfo':{'name':_0x38a9d8['bFMsb'],'version':'1.0.0'}}});if(_0x5b4b2e['error'])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x5b4b2e['error'][_0x5de3fe(0xc1)]??JSON['stringify'](_0x5b4b2e[_0x5de3fe(0x128)])));console[_0x5de3fe(0x106)](_0x38a9d8[_0x5de3fe(0x122)]),await _0x38a9d8['dKmbw'](fetch,_0x3f8145,{'method':'POST','headers':_0x4b6863,'body':JSON[_0x5de3fe(0xc5)]({'jsonrpc':_0x38a9d8['bnCfN'],'method':_0x38a9d8['crWKE']})})[_0x5de3fe(0x108)](_0x214524=>_0x214524['text']()),process[_0x5de3fe(0xc4)][_0x5de3fe(0x140)](_0x5de3fe(0x124));const _0x36d243=await _0x38a9d8['qtZWH'](_0x340356,{'jsonrpc':_0x5de3fe(0x104),'id':0x2,'method':'tools/call','params':{'name':_0x38a9d8[_0x5de3fe(0xd4)],'arguments':{}}});if(_0x36d243['error'])throw new Error(_0x5de3fe(0x130)+(_0x36d243['error'][_0x5de3fe(0xc1)]??JSON['stringify'](_0x36d243[_0x5de3fe(0x128)])));console['log'](_0x38a9d8[_0x5de3fe(0x122)]);const _0x2d210a=_0x38a9d8[_0x5de3fe(0x12b)](extractToken,_0x36d243['result']);if(!_0x2d210a){console['error'](_0x5de3fe(0x116)),console[_0x5de3fe(0x128)](JSON[_0x5de3fe(0xc5)](_0x36d243[_0x5de3fe(0xd0)],null,0x2));throw new Error('Could\x20not\x20extract\x20token\x20from\x20MCP\x20response');}const _0xbe76d9=join(homedir(),_0x5de3fe(0x10d)),_0x457bb2=_0x38a9d8[_0x5de3fe(0x149)](join,_0xbe76d9,_0x38a9d8['XtxJX']);await _0x38a9d8['FmmRy'](mkdir,_0xbe76d9,{'recursive':!![]}),await writeFile(_0x457bb2,_0x2d210a,{'mode':0x180}),await writeFile(join(_0xbe76d9,_0x38a9d8[_0x5de3fe(0x150)]),_0x3f8145,{'mode':0x180}),console['log']('\x0aToken\x20written\x20to\x20'+_0x457bb2),console[_0x5de3fe(0x106)](_0x38a9d8[_0x5de3fe(0x10c)]);}async function fetchAuthServerMetadata(_0x500926){const _0x3a933e=_0xa3d572,_0x2a0488=_0x500926+_0x3a933e(0x12c),_0x53642f=await fetch(_0x2a0488);if(!_0x53642f['ok'])throw new Error(_0x3a933e(0x151)+_0x2a0488+':\x20'+_0x53642f['status']);return _0x53642f[_0x3a933e(0x110)]();}function waitForCallback(_0x5d0a01){const _0x14009b=_0xa3d572,_0x39d476={'BFXZa':function(_0x11a61a){return _0x11a61a();},'TbYBj':_0x14009b(0x11f),'rpcKy':function(_0x230404,_0x42de38){return _0x230404(_0x42de38);},'wimLj':function(_0x478f54,_0x710929,_0x5aca43){return _0x478f54(_0x710929,_0x5aca43);}};return new Promise((_0xae7b5,_0x426805)=>{const _0x3cd71e=_0x14009b,_0x231d9a={'yHgeN':function(_0x48d559){return _0x39d476['BFXZa'](_0x48d559);},'BXjvA':function(_0x527686,_0x582a00){return _0x527686(_0x582a00);},'ajjQa':'OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','UuWDf':_0x3cd71e(0x144),'LpaTc':_0x3cd71e(0xc9),'xFtDG':_0x39d476[_0x3cd71e(0xff)],'iNeiq':function(_0x2144b2,_0x59c820){return _0x2144b2(_0x59c820);},'kByRv':'<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','eqtTG':'<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','yYOzF':function(_0x38e1f9,_0x1125cd){const _0x4ba07c=_0x3cd71e;return _0x39d476[_0x4ba07c(0x152)](_0x38e1f9,_0x1125cd);}},_0x396201=()=>{const _0xc1000a=_0x3cd71e;_0x5e8fe5[_0xc1000a(0x100)](),_0x5e8fe5[_0xc1000a(0xc7)]();},_0x86623=_0x39d476['wimLj'](setTimeout,()=>{const _0x172f8e=_0x3cd71e;_0x231d9a['yHgeN'](_0x396201),_0x231d9a['BXjvA'](_0x426805,new OAuthTimeoutError(_0x231d9a[_0x172f8e(0xf5)]));},0x1d4c0),_0x5e8fe5=_0x39d476['rpcKy'](createServer,(_0x56b4f7,_0x28e2e0)=>{const _0xcfe1ff=_0x3cd71e,_0x3f6110=new URL(_0x56b4f7[_0xcfe1ff(0xcd)]??'/',_0xcfe1ff(0xf4)+CALLBACK_PORT);if(_0x3f6110['pathname']!==_0xcfe1ff(0xf0)){_0x28e2e0['writeHead'](0x194),_0x28e2e0[_0xcfe1ff(0x115)](_0x231d9a[_0xcfe1ff(0xe0)]);return;}const _0x522bde=_0x3f6110[_0xcfe1ff(0x11c)]['get'](_0x231d9a['LpaTc']),_0xbe158d=_0x3f6110['searchParams'][_0xcfe1ff(0x133)](_0xcfe1ff(0x147)),_0x3b1721=_0x3f6110[_0xcfe1ff(0x11c)]['get']('error');if(_0x3b1721){const _0xdf6a26=_0x3f6110[_0xcfe1ff(0x11c)][_0xcfe1ff(0x133)](_0xcfe1ff(0x13a))??_0x3b1721;_0x28e2e0['writeHead'](0xc8,{'Content-Type':_0x231d9a['xFtDG']}),_0x28e2e0[_0xcfe1ff(0x115)](_0xcfe1ff(0x14a)+_0xdf6a26+_0xcfe1ff(0x112)),_0x231d9a['iNeiq'](clearTimeout,_0x86623),_0x396201(),_0x231d9a[_0xcfe1ff(0x126)](_0x426805,new Error(_0xcfe1ff(0x132)+_0xdf6a26));return;}if(!_0x522bde||_0xbe158d!==_0x5d0a01){_0x28e2e0[_0xcfe1ff(0xe2)](0x190,{'Content-Type':_0x231d9a['xFtDG']}),_0x28e2e0[_0xcfe1ff(0x115)](_0x231d9a[_0xcfe1ff(0x13b)]);return;}_0x28e2e0['writeHead'](0xc8,{'Content-Type':_0x231d9a[_0xcfe1ff(0xc3)]}),_0x28e2e0[_0xcfe1ff(0x115)](_0x231d9a[_0xcfe1ff(0x10b)]),_0x231d9a[_0xcfe1ff(0x121)](clearTimeout,_0x86623),_0x396201(),_0xae7b5(_0x522bde);});_0x5e8fe5[_0x3cd71e(0x148)](CALLBACK_PORT,_0x3cd71e(0x103));});}async function openBrowser(_0x12a5f3){const _0x17ffc4=_0xa3d572,_0x186d71={'aNLbo':function(_0x56ec4a,_0x1db4e8){return _0x56ec4a===_0x1db4e8;},'Uilro':_0x17ffc4(0xc2),'WLzhT':_0x17ffc4(0xc6),'zTnqd':'start','imHPX':'xdg-open'},_0x288d21=_0x186d71[_0x17ffc4(0x123)](process['platform'],_0x186d71['Uilro'])?_0x186d71['WLzhT']:process['platform']==='win32'?_0x186d71['zTnqd']:_0x186d71[_0x17ffc4(0xcb)];exec(_0x288d21+'\x20\x22'+_0x12a5f3+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x533802=_0xa3d572,_0x35e1fd={'CXRRd':function(_0x4f7c29,_0x3cfe65){return _0x4f7c29!==_0x3cfe65;}};try{const _0x1ad1ee=JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x533802(0x155)));if(_0x1ad1ee['origin']&&_0x35e1fd['CXRRd'](_0x1ad1ee[_0x533802(0x139)],currentOrigin))return null;if(_0x1ad1ee['expiresAt']&&Date[_0x533802(0x119)]()>_0x1ad1ee[_0x533802(0xeb)])return null;return _0x1ad1ee[_0x533802(0xf9)]??null;}catch{return null;}}async function saveCachedToken(_0x5b24cf,_0x53a800,_0x208002){const _0x2f3133=_0xa3d572,_0x1dfba8={'KKBfz':function(_0x153c88){return _0x153c88();},'XPkwK':function(_0x4b3fbd,_0x459b07,_0x4ecde7,_0x462a6a){return _0x4b3fbd(_0x459b07,_0x4ecde7,_0x462a6a);}},_0x1d95ee=await loadCachedData(),_0x36a39b={..._0x1d95ee,'origin':currentOrigin,'accessToken':_0x5b24cf,'refreshToken':_0x53a800??_0x1d95ee?.['refreshToken'],'expiresAt':_0x208002?Date['now']()+_0x208002*0x3e8:undefined};await mkdir(join(_0x1dfba8[_0x2f3133(0xde)](homedir),'.ranger'),{'recursive':!![]}),await _0x1dfba8['XPkwK'](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x36a39b),{'mode':0x180});}async function loadCachedClient(){const _0x8eed6=_0xa3d572,_0xceb6f0={'yiXfm':function(_0x2c0118){return _0x2c0118();}},_0x58f8a3=await _0xceb6f0['yiXfm'](loadCachedData);if(_0x58f8a3?.[_0x8eed6(0x139)]&&_0x58f8a3[_0x8eed6(0x139)]!==currentOrigin)return null;return _0x58f8a3?.[_0x8eed6(0xce)]?{'clientId':_0x58f8a3[_0x8eed6(0xce)],'clientSecret':_0x58f8a3[_0x8eed6(0xfb)]}:null;}async function clearCachedClient(){const _0x4f826f=_0xa3d572,_0x155551=await loadCachedData();if(!_0x155551)return;const {clientId:_0x1ba493,clientSecret:_0x205838,..._0x5b7be3}=_0x155551;await writeFile(TOKEN_CACHE_PATH,JSON[_0x4f826f(0xc5)](_0x5b7be3),{'mode':0x180});}async function saveCachedClient(_0x333667,_0x27600e){const _0x18032a=_0xa3d572,_0x47e79e={'uzYdm':function(_0x502e09,_0x4c67e0,_0x662bbf){return _0x502e09(_0x4c67e0,_0x662bbf);},'DiJwt':function(_0x3fe96d){return _0x3fe96d();},'DLCXV':'.ranger'},_0x352481=await loadCachedData(),_0x5ef9e1={..._0x352481,'origin':currentOrigin,'accessToken':_0x352481?.[_0x18032a(0xf9)]??'','clientId':_0x333667,'clientSecret':_0x27600e};await _0x47e79e['uzYdm'](mkdir,_0x47e79e[_0x18032a(0x127)](join,_0x47e79e['DiJwt'](homedir),_0x47e79e[_0x18032a(0xf3)]),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON[_0x18032a(0xc5)](_0x5ef9e1),{'mode':0x180});}async function loadCachedData(){const _0x508667=_0xa3d572,_0xf38c7d={'XufDw':'utf-8'};try{return JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0xf38c7d[_0x508667(0xcf)]));}catch{return null;}}async function parseResponse(_0x823403){const _0x4a765a=_0xa3d572,_0x4647ee={'StEMe':_0x4a765a(0x111),'pfqxM':'text/event-stream','WdDbA':'data:','sIIyD':function(_0x4f36c6,_0x1561b2){return _0x4f36c6!==_0x1561b2;},'ziGNz':_0x4a765a(0x117)},_0x2c815c=_0x823403['headers'][_0x4a765a(0x133)](_0x4647ee[_0x4a765a(0xe1)])??'';if(_0x2c815c[_0x4a765a(0xcc)](_0x4647ee['pfqxM'])){const _0x1c8c7c=await _0x823403[_0x4a765a(0x146)]();for(const _0x216136 of _0x1c8c7c[_0x4a765a(0xe8)]('\x0a')){const _0x3aec83=_0x216136['trim']();if(_0x3aec83[_0x4a765a(0x105)]('data:')){const _0x40b5a8=_0x3aec83[_0x4a765a(0x125)](_0x4647ee[_0x4a765a(0x114)]['length'])[_0x4a765a(0xd6)]();if(!_0x40b5a8)continue;try{const _0x456f48=JSON['parse'](_0x40b5a8);if(_0x4647ee['sIIyD'](_0x456f48['id'],undefined)||_0x456f48['error'])return _0x456f48;}catch{}}}throw new Error(_0x4647ee['ziGNz']);}return _0x823403['json']();}function extractToken(_0x5ac1a9){const _0x27a731=_0xa3d572,_0x53e2ff={'ARVJS':'string','ScPpF':function(_0x8cc253,_0x235292){return _0x8cc253===_0x235292;}};if(!_0x5ac1a9)return null;const _0x1e0055=_0x5ac1a9['structuredContent'];if(_0x1e0055?.['token']&&typeof _0x1e0055[_0x27a731(0x135)]===_0x53e2ff[_0x27a731(0x102)])return _0x1e0055['token'];if(_0x5ac1a9[_0x27a731(0xdf)]){const _0x127096=_0x5ac1a9[_0x27a731(0x13f)];throw new Error(_0x27a731(0x158)+(_0x127096?.[0x0]?.['text']??_0x27a731(0x12a)));}const _0x17fd59=_0x5ac1a9['content'];if(_0x17fd59)for(const _0x410d84 of _0x17fd59){if(_0x53e2ff[_0x27a731(0x13c)](_0x410d84['type'],'text')&&_0x410d84['text']){try{const _0x1a84df=JSON['parse'](_0x410d84['text']);if(typeof _0x1a84df?.['token']===_0x53e2ff['ARVJS'])return _0x1a84df[_0x27a731(0x135)];}catch{}const _0x32651d=_0x410d84[_0x27a731(0x146)]['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x32651d)return _0x32651d[0x1];}}return null;}
1
+ const _0x419226=_0x5ecb;(function(_0x539b40,_0x40f1f0){const _0x5bd845=_0x5ecb,_0xda3602=_0x539b40();while(!![]){try{const _0x47f1d2=parseInt(_0x5bd845(0x148))/0x1+parseInt(_0x5bd845(0x10f))/0x2*(-parseInt(_0x5bd845(0x146))/0x3)+-parseInt(_0x5bd845(0x11a))/0x4*(-parseInt(_0x5bd845(0xbb))/0x5)+parseInt(_0x5bd845(0x10a))/0x6+-parseInt(_0x5bd845(0x133))/0x7+parseInt(_0x5bd845(0x150))/0x8*(parseInt(_0x5bd845(0x111))/0x9)+-parseInt(_0x5bd845(0x10e))/0xa*(-parseInt(_0x5bd845(0xe4))/0xb);if(_0x47f1d2===_0x40f1f0)break;else _0xda3602['push'](_0xda3602['shift']());}catch(_0x179560){_0xda3602['push'](_0xda3602['shift']());}}}(_0x1596,0xb2940));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(),'.ranger',_0x419226(0x12d)),AUTH_ORIGIN_PATH=join(homedir(),_0x419226(0xd3),_0x419226(0x102));export async function getMcpAuthOrigin(){const _0xfc1d31=_0x419226;try{const _0x316c5e=(await readFile(AUTH_ORIGIN_PATH,'utf-8'))[_0xfc1d31(0x127)]();return _0x316c5e||null;}catch{return null;}}export async function mcpBootstrap(){const _0x2ecbc4=_0x419226,_0x407733={'kxCvF':function(_0x48dc62,_0x8eae1d){return _0x48dc62(_0x8eae1d);},'pgVry':_0x2ecbc4(0xc7),'sBIus':function(_0x20a8a4,_0x12d6ef){return _0x20a8a4(_0x12d6ef);}},_0x514931=getMcpAuthUrl();currentOrigin=_0x514931;const _0x22cc9b=process['stdout'][_0x2ecbc4(0xd4)]??![];console['log']('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x514931+'\x0a');const _0x4b4ba8=await _0x407733['kxCvF'](tryUnauthenticated,_0x514931);let _0x3b5ab8=null;if(_0x4b4ba8===_0x2ecbc4(0x131))_0x3b5ab8='';else{_0x3b5ab8=await loadCachedToken();if(!_0x3b5ab8){if(!_0x22cc9b)throw new Error(_0x407733[_0x2ecbc4(0xd8)]+'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.');_0x3b5ab8=await _0x407733['sBIus'](oauthFlow,_0x514931);}}await callGetCliToken(_0x514931,_0x3b5ab8);}async function tryUnauthenticated(_0x3aa773){const _0x35b0b3=_0x419226,_0x4decd6={'DWifG':_0x35b0b3(0x106),'yhajD':'application/json','xDElL':_0x35b0b3(0xea),'qBDwj':_0x35b0b3(0xdb),'WOOvI':_0x35b0b3(0x114),'aBmbF':'ranger-cli','cWsWN':_0x35b0b3(0xfd),'JRHIz':_0x35b0b3(0x131)},_0x78b92e=await fetch(_0x3aa773,{'method':_0x4decd6[_0x35b0b3(0x147)],'headers':{'Content-Type':_0x4decd6['yhajD'],'Accept':_0x4decd6[_0x35b0b3(0xe0)]},'body':JSON[_0x35b0b3(0x101)]({'jsonrpc':_0x4decd6['qBDwj'],'id':0x1,'method':_0x4decd6[_0x35b0b3(0xc4)],'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x4decd6['aBmbF'],'version':_0x4decd6['cWsWN']}}})});if(_0x78b92e['ok'])return await _0x78b92e[_0x35b0b3(0xeb)](),_0x4decd6['JRHIz'];if(_0x78b92e['status']===0x191)return await _0x78b92e[_0x35b0b3(0xeb)](),'needs-oauth';const _0x5b3cef=await _0x78b92e[_0x35b0b3(0xeb)]();throw new Error(_0x35b0b3(0x112)+_0x78b92e[_0x35b0b3(0x140)]+':\x20'+_0x5b3cef);}function _0x1596(){const _0x256285=['utf-8','split','eCYtL','token','.ranger','isTTY','<html><body><h2>Authentication\x20failed</h2><p>','none','nnFcz','pgVry','now','HTTP\x20','2.0','replace','client_secret','client_id','sqUJO','xDElL','HMNOM','Ranger\x20CLI','write','33mWFwfi','platform','expiresAt','searchParams','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','FwlZs','application/json,\x20text/event-stream','text','type','rKJod','MCP\x20initialize\x20failed:\x20','SWnjR','application/x-www-form-urlencoded','WPTQE','bDhMH','open','sBEnw','\x0aUnexpected\x20response\x20structure:','content','content-type','then','oYoHR','<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','opnzg','match','1.0.0','string','access_token','code','stringify','auth-origin.txt','OaGlp','tools/call','Discovering\x20authorization\x20server...','POST','xVirB','\x0aOpening\x20browser\x20for\x20authentication...','VkXzp','2726790ntRnmk','Initializing\x20MCP\x20session...','MptHM','kSaLs','1956330hNyzzc','2vRfjkd','bGgVQ','522BOwHrA','MCP\x20server\x20returned\x20HTTP\x20','qIVYK','initialize','accessToken','OAuth\x20error:\x20','slice','clientId','<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','884616LypmUt','text/html','parse','url','CNSgQ','VJkLk','/callback','KBFLI','refresh_token','start','igxsf','writeHead','Requesting\x20CLI\x20token...','trim','omGyz','XHjfD','Tqcwi','RugcX','\x20done','mcp-oauth-tokens.json','origin','expires_in','resource','proxied','toString','9695476YwNsMc','data:','sha256','JqLQm','http://localhost:','application/json','S256','set','get_cli_token\x20failed:\x20','AFARq','NrZcL','stdout','error','status','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','Authorization','PzooR','result','nbnYC','3398757SHExuZ','DWifG','626825uwplFN','127.0.0.1','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','code_challenge','Token\x20exchange\x20failed:\x20','clientSecret','qeXgN','digest','157096YRdvJV','WzPUy','OhDzR','sOqsm','10wcFndr','log','qLuMP','dfhYS','error_description','kTuoS','bUXgw','sfrqr','get','WOOvI','end','authorization_servers','MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','state','code_challenge_method','mVGst','length','text/event-stream','\x0aToken\x20written\x20to\x20','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found'];_0x1596=function(){return _0x256285;};return _0x1596();}class OAuthTimeoutError extends Error{constructor(_0x43fcb3){const _0x1b6a1d=_0x419226,_0x36b176={'MptHM':'OAuthTimeoutError'};super(_0x43fcb3),this['name']=_0x36b176[_0x1b6a1d(0x10c)];}}async function oauthFlow(_0xa17684){const _0x2e4fd8={'meCNz':function(_0xdc3606){return _0xdc3606();},'rbYbD':function(_0x1c0b67){return _0x1c0b67();}};try{return await oauthFlowAttempt(_0xa17684);}catch(_0x2385a0){if(_0x2385a0 instanceof OAuthTimeoutError&&await _0x2e4fd8['meCNz'](loadCachedClient))return console['log']('\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a'),await _0x2e4fd8['rbYbD'](clearCachedClient),await oauthFlowAttempt(_0xa17684);throw _0x2385a0;}}async function oauthFlowAttempt(_0x2cbbc){const _0x13d536=_0x419226,_0x428edd={'VkXzp':function(_0x18a0a5,_0xcf4e5e){return _0x18a0a5(_0xcf4e5e);},'RugcX':'Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','igxsf':'POST','bGgVQ':_0x13d536(0x138),'MnbHZ':_0x13d536(0xe2),'faXzD':_0x13d536(0xd6),'WPTQE':_0x13d536(0xce),'AFARq':'base64url','oPNdp':'client_id','oYoHR':'redirect_uri','kTuoS':_0x13d536(0xc9),'gTBhS':_0x13d536(0x130),'rvgOz':function(_0x145916,_0x466bc0){return _0x145916(_0x466bc0);},'Tqcwi':'Exchanging\x20authorization\x20code...','GPIeC':'authorization_code','WzPUy':function(_0x4ba49b,_0x3768cb,_0x5a5b65){return _0x4ba49b(_0x3768cb,_0x5a5b65);},'XIdTG':_0x13d536(0xf0),'sfrqr':function(_0x127d7f,_0x2e4f79,_0x3ba3ac,_0x16ce71){return _0x127d7f(_0x2e4f79,_0x3ba3ac,_0x16ce71);}},_0x487511=_0x2cbbc[_0x13d536(0xdc)](/\/mcp$/,'');process[_0x13d536(0x13e)]['write'](_0x13d536(0x105));const _0x35eaf1=await _0x428edd['VkXzp'](fetch,_0x487511+'/.well-known/oauth-protected-resource');if(!_0x35eaf1['ok'])throw new Error(_0x428edd[_0x13d536(0x12b)]);const _0x2010c5=await _0x35eaf1['json'](),_0x29a08c=_0x2010c5[_0x13d536(0xc6)]?.[0x0];if(!_0x29a08c)throw new Error('No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata');console['log']('\x20'+_0x29a08c);const _0x502b13=await _0x428edd[_0x13d536(0x109)](fetchAuthServerMetadata,_0x29a08c);let _0x249c92,_0x489945;const _0x3b5236=await loadCachedClient();if(_0x3b5236)_0x249c92=_0x3b5236[_0x13d536(0x118)],_0x489945=_0x3b5236[_0x13d536(0x14d)];else{if(_0x502b13['registration_endpoint']){process[_0x13d536(0x13e)]['write']('Registering\x20OAuth\x20client...');const _0x5c3c83=await fetch(_0x502b13['registration_endpoint'],{'method':_0x428edd[_0x13d536(0x124)],'headers':{'Content-Type':_0x428edd[_0x13d536(0x110)]},'body':JSON['stringify']({'client_name':_0x428edd['MnbHZ'],'redirect_uris':['http://localhost:'+CALLBACK_PORT+_0x13d536(0x120)],'grant_types':['authorization_code',_0x13d536(0x122)],'response_types':[_0x13d536(0x100)],'token_endpoint_auth_method':_0x428edd['faXzD']})});if(!_0x5c3c83['ok']){const _0x4516d4=await _0x5c3c83['text']();throw new Error('Client\x20registration\x20failed:\x20'+_0x4516d4);}const _0x1d8e9b=await _0x5c3c83['json']();_0x249c92=_0x1d8e9b[_0x13d536(0xde)],_0x489945=_0x1d8e9b['client_secret'],await saveCachedClient(_0x249c92,_0x489945),console[_0x13d536(0xbc)](_0x13d536(0x12c));}else throw new Error(_0x428edd[_0x13d536(0xf1)]);}const _0x1eedb1=randomBytes(0x20)['toString'](_0x428edd[_0x13d536(0x13c)]),_0x4fa6b4=createHash(_0x13d536(0x135))['update'](_0x1eedb1)[_0x13d536(0x14f)]('base64url'),_0x416285=randomBytes(0x10)[_0x13d536(0x132)]('hex'),_0x19af95=new URL(_0x502b13['authorization_endpoint']);_0x19af95[_0x13d536(0xe7)]['set']('response_type',_0x13d536(0x100)),_0x19af95[_0x13d536(0xe7)]['set'](_0x428edd['oPNdp'],_0x249c92),_0x19af95['searchParams']['set'](_0x428edd[_0x13d536(0xf9)],'http://localhost:'+CALLBACK_PORT+_0x13d536(0x120)),_0x19af95[_0x13d536(0xe7)]['set'](_0x13d536(0x14b),_0x4fa6b4),_0x19af95[_0x13d536(0xe7)][_0x13d536(0x13a)](_0x428edd[_0x13d536(0xc0)],_0x13d536(0x139)),_0x19af95[_0x13d536(0xe7)]['set'](_0x13d536(0xc8),_0x416285);_0x2010c5['resource']&&_0x19af95['searchParams']['set'](_0x428edd['gTBhS'],_0x2010c5['resource']);console[_0x13d536(0xbc)](_0x13d536(0x108)),console['log'](_0x13d536(0xe8)+_0x19af95[_0x13d536(0x132)]()+'\x0a'),await _0x428edd['rvgOz'](openBrowser,_0x19af95['toString']());const _0x453349=await _0x428edd[_0x13d536(0x109)](waitForCallback,_0x416285);process[_0x13d536(0x13e)][_0x13d536(0xe3)](_0x428edd[_0x13d536(0x12a)]);const _0x11a78d=new URLSearchParams({'grant_type':_0x428edd['GPIeC'],'code':_0x453349,'redirect_uri':_0x13d536(0x137)+CALLBACK_PORT+'/callback','client_id':_0x249c92,'code_verifier':_0x1eedb1});_0x489945&&_0x11a78d[_0x13d536(0x13a)](_0x13d536(0xdd),_0x489945);_0x2010c5[_0x13d536(0x130)]&&_0x11a78d['set'](_0x13d536(0x130),_0x2010c5[_0x13d536(0x130)]);const _0x5bf7f2=await _0x428edd[_0x13d536(0xb8)](fetch,_0x502b13['token_endpoint'],{'method':_0x428edd['igxsf'],'headers':{'Content-Type':_0x428edd['XIdTG']},'body':_0x11a78d});if(!_0x5bf7f2['ok']){const _0x4a5a55=await _0x5bf7f2['text']();throw new Error(_0x13d536(0x14c)+_0x4a5a55);}const _0x109a1f=await _0x5bf7f2['json']();return console[_0x13d536(0xbc)](_0x13d536(0x12c)),await _0x428edd[_0x13d536(0xc2)](saveCachedToken,_0x109a1f[_0x13d536(0xff)],_0x109a1f['refresh_token'],_0x109a1f[_0x13d536(0x12f)]),_0x109a1f['access_token'];}async function callGetCliToken(_0x2df49e,_0x31c25d){const _0x109e60=_0x419226,_0x4c6fbb={'OaGlp':function(_0x3c1635,_0x425ed2){return _0x3c1635(_0x425ed2);},'FwlZs':_0x109e60(0x138),'zUTrv':_0x109e60(0x10b),'nbnYC':_0x109e60(0xdb),'xLkDp':'2025-03-26','SWnjR':'\x20done','Yraec':function(_0x3d45ef,_0x430ce3,_0x31c380){return _0x3d45ef(_0x430ce3,_0x31c380);},'CNSgQ':_0x109e60(0x106),'pCXFN':'notifications/initialized','xwVxv':_0x109e60(0x126),'omGyz':_0x109e60(0x104),'pfOhz':'get_cli_token','NrZcL':_0x109e60(0x14a),'sYBuV':'.ranger','sOqsm':function(_0x16edff,_0x41fd13,_0x1c11f8){return _0x16edff(_0x41fd13,_0x1c11f8);},'mVGst':function(_0x105ed2,_0x3d8082,_0x589c1d,_0x5964a4){return _0x105ed2(_0x3d8082,_0x589c1d,_0x5964a4);}},_0x135900={'Content-Type':_0x4c6fbb[_0x109e60(0xe9)],'Accept':'application/json,\x20text/event-stream'};_0x31c25d&&(_0x135900[_0x109e60(0x142)]='Bearer\x20'+_0x31c25d);const _0x28be52=async _0x528d71=>{const _0x737dab=_0x109e60,_0x52bfb4=await fetch(_0x2df49e,{'method':_0x737dab(0x106),'headers':_0x135900,'body':JSON[_0x737dab(0x101)](_0x528d71)});if(!_0x52bfb4['ok']){const _0x7ff4cf=await _0x52bfb4[_0x737dab(0xeb)]();throw new Error(_0x737dab(0xda)+_0x52bfb4[_0x737dab(0x140)]+':\x20'+_0x7ff4cf);}return _0x4c6fbb['OaGlp'](parseResponse,_0x52bfb4);};process['stdout']['write'](_0x4c6fbb['zUTrv']);const _0x2701e8=await _0x4c6fbb[_0x109e60(0x103)](_0x28be52,{'jsonrpc':_0x4c6fbb['nbnYC'],'id':0x1,'method':_0x109e60(0x114),'params':{'protocolVersion':_0x4c6fbb['xLkDp'],'capabilities':{},'clientInfo':{'name':'ranger-cli','version':_0x109e60(0xfd)}}});if(_0x2701e8['error'])throw new Error(_0x109e60(0xee)+(_0x2701e8[_0x109e60(0x13f)]['message']??JSON['stringify'](_0x2701e8[_0x109e60(0x13f)])));console[_0x109e60(0xbc)](_0x4c6fbb[_0x109e60(0xef)]),await _0x4c6fbb['Yraec'](fetch,_0x2df49e,{'method':_0x4c6fbb[_0x109e60(0x11e)],'headers':_0x135900,'body':JSON['stringify']({'jsonrpc':_0x4c6fbb[_0x109e60(0x145)],'method':_0x4c6fbb['pCXFN']})})[_0x109e60(0xf8)](_0x10db3a=>_0x10db3a[_0x109e60(0xeb)]()),process[_0x109e60(0x13e)]['write'](_0x4c6fbb['xwVxv']);const _0x34213a=await _0x28be52({'jsonrpc':_0x4c6fbb[_0x109e60(0x145)],'id':0x2,'method':_0x4c6fbb[_0x109e60(0x128)],'params':{'name':_0x4c6fbb['pfOhz'],'arguments':{}}});if(_0x34213a[_0x109e60(0x13f)])throw new Error(_0x109e60(0x13b)+(_0x34213a['error']['message']??JSON['stringify'](_0x34213a[_0x109e60(0x13f)])));console[_0x109e60(0xbc)](_0x4c6fbb['SWnjR']);const _0x25c418=_0x4c6fbb['OaGlp'](extractToken,_0x34213a[_0x109e60(0x144)]);if(!_0x25c418){console[_0x109e60(0x13f)](_0x109e60(0xf5)),console['error'](JSON['stringify'](_0x34213a[_0x109e60(0x144)],null,0x2));throw new Error(_0x4c6fbb[_0x109e60(0x13d)]);}const _0x3f67c2=join(homedir(),_0x4c6fbb['sYBuV']),_0x387fa5=_0x4c6fbb[_0x109e60(0xba)](join,_0x3f67c2,'refresh.txt');await _0x4c6fbb['Yraec'](mkdir,_0x3f67c2,{'recursive':!![]}),await _0x4c6fbb[_0x109e60(0xca)](writeFile,_0x387fa5,_0x25c418,{'mode':0x180}),await _0x4c6fbb['mVGst'](writeFile,join(_0x3f67c2,_0x109e60(0x102)),_0x2df49e,{'mode':0x180}),console['log'](_0x109e60(0xcd)+_0x387fa5),console[_0x109e60(0xbc)]('Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a');}async function fetchAuthServerMetadata(_0x1225d5){const _0x3a86f5=_0x419226,_0x3ad2d1={'PzooR':function(_0x3afdad,_0x2ef28a){return _0x3afdad(_0x2ef28a);}},_0x156c64=_0x1225d5+'/.well-known/oauth-authorization-server',_0x27cfb2=await _0x3ad2d1[_0x3a86f5(0x143)](fetch,_0x156c64);if(!_0x27cfb2['ok'])throw new Error('Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20'+_0x156c64+':\x20'+_0x27cfb2[_0x3a86f5(0x140)]);return _0x27cfb2['json']();}function waitForCallback(_0x26d86b){const _0x5b4ba3=_0x419226,_0x439ba1={'sqUJO':function(_0x10ce80,_0x564f55){return _0x10ce80(_0x564f55);},'TFHvZ':'code','qIVYK':'state','rKJod':_0x5b4ba3(0x13f),'JqLQm':function(_0xb10b55){return _0xb10b55();},'XHjfD':function(_0x26831c,_0x3ef3e2){return _0x26831c!==_0x3ef3e2;},'xVirB':'text/html','OhDzR':_0x5b4ba3(0x119),'kSaLs':_0x5b4ba3(0xfa),'eCYtL':function(_0x3e256f,_0x186202){return _0x3e256f(_0x186202);},'krrfi':_0x5b4ba3(0x149)};return new Promise((_0x1ba979,_0xdc7bfd)=>{const _0x3fa886=()=>{_0x56cf4f['closeAllConnections'](),_0x56cf4f['close']();},_0x2adab1=setTimeout(()=>{_0x3fa886(),_0x439ba1['sqUJO'](_0xdc7bfd,new OAuthTimeoutError('OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes'));},0x1d4c0),_0x56cf4f=_0x439ba1['eCYtL'](createServer,(_0x499843,_0x52977d)=>{const _0x1c2f3f=_0x5ecb,_0x4fb961=new URL(_0x499843[_0x1c2f3f(0x11d)]??'/',_0x1c2f3f(0x137)+CALLBACK_PORT);if(_0x4fb961['pathname']!==_0x1c2f3f(0x120)){_0x52977d['writeHead'](0x194),_0x52977d['end']('Not\x20found');return;}const _0x1bbb97=_0x4fb961[_0x1c2f3f(0xe7)][_0x1c2f3f(0xc3)](_0x439ba1['TFHvZ']),_0x2132c9=_0x4fb961['searchParams'][_0x1c2f3f(0xc3)](_0x439ba1[_0x1c2f3f(0x113)]),_0xad35c6=_0x4fb961['searchParams']['get'](_0x439ba1[_0x1c2f3f(0xed)]);if(_0xad35c6){const _0x34ffc9=_0x4fb961['searchParams'][_0x1c2f3f(0xc3)](_0x1c2f3f(0xbf))??_0xad35c6;_0x52977d[_0x1c2f3f(0x125)](0xc8,{'Content-Type':_0x1c2f3f(0x11b)}),_0x52977d['end'](_0x1c2f3f(0xd5)+_0x34ffc9+_0x1c2f3f(0x141)),clearTimeout(_0x2adab1),_0x439ba1['JqLQm'](_0x3fa886),_0xdc7bfd(new Error(_0x1c2f3f(0x116)+_0x34ffc9));return;}if(!_0x1bbb97||_0x439ba1[_0x1c2f3f(0x129)](_0x2132c9,_0x26d86b)){_0x52977d[_0x1c2f3f(0x125)](0x190,{'Content-Type':_0x439ba1[_0x1c2f3f(0x107)]}),_0x52977d['end'](_0x439ba1[_0x1c2f3f(0xb9)]);return;}_0x52977d['writeHead'](0xc8,{'Content-Type':'text/html'}),_0x52977d[_0x1c2f3f(0xc5)](_0x439ba1[_0x1c2f3f(0x10d)]),_0x439ba1[_0x1c2f3f(0xd1)](clearTimeout,_0x2adab1),_0x439ba1[_0x1c2f3f(0x136)](_0x3fa886),_0x439ba1[_0x1c2f3f(0xdf)](_0x1ba979,_0x1bbb97);});_0x56cf4f['listen'](CALLBACK_PORT,_0x439ba1['krrfi']);});}async function openBrowser(_0x317f9f){const _0x47a63d=_0x419226,_0x404ffb={'xmtDZ':function(_0x3e5f04,_0x207b87){return _0x3e5f04===_0x207b87;},'HMNOM':_0x47a63d(0xf3),'VJkLk':function(_0x298099,_0x122a1d){return _0x298099===_0x122a1d;},'iWAgF':'win32','pQeUA':function(_0x26b849,_0x24427d){return _0x26b849(_0x24427d);}},_0x27ac39=_0x404ffb['xmtDZ'](process['platform'],'darwin')?_0x404ffb[_0x47a63d(0xe1)]:_0x404ffb[_0x47a63d(0x11f)](process[_0x47a63d(0xe5)],_0x404ffb['iWAgF'])?_0x47a63d(0x123):'xdg-open';_0x404ffb['pQeUA'](exec,_0x27ac39+'\x20\x22'+_0x317f9f+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x219d92=_0x419226;try{const _0x4bef85=JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x219d92(0xcf)));if(_0x4bef85['origin']&&_0x4bef85['origin']!==currentOrigin)return null;if(_0x4bef85[_0x219d92(0xe6)]&&Date['now']()>_0x4bef85['expiresAt'])return null;return _0x4bef85['accessToken']??null;}catch{return null;}}function _0x5ecb(_0x5eb244,_0x4dce5b){_0x5eb244=_0x5eb244-0xb8;const _0x1596e0=_0x1596();let _0x5ecb89=_0x1596e0[_0x5eb244];return _0x5ecb89;}async function saveCachedToken(_0x5b9ec8,_0x145c9a,_0x405de1){const _0x19a184=_0x419226,_0x56f443={'VkoKB':function(_0x39afff){return _0x39afff();},'JqxZw':function(_0x2e83d1,_0x475b59){return _0x2e83d1+_0x475b59;},'opnzg':function(_0x48e363,_0x4bb431,_0x4df4ca){return _0x48e363(_0x4bb431,_0x4df4ca);},'bUXgw':function(_0x5b63ca,_0x47be41,_0x71f73b){return _0x5b63ca(_0x47be41,_0x71f73b);}},_0x39c1cc=await _0x56f443['VkoKB'](loadCachedData),_0x34385a={..._0x39c1cc,'origin':currentOrigin,'accessToken':_0x5b9ec8,'refreshToken':_0x145c9a??_0x39c1cc?.['refreshToken'],'expiresAt':_0x405de1?_0x56f443['JqxZw'](Date[_0x19a184(0xd9)](),_0x405de1*0x3e8):undefined};await _0x56f443[_0x19a184(0xfb)](mkdir,_0x56f443[_0x19a184(0xc1)](join,homedir(),'.ranger'),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x34385a),{'mode':0x180});}async function loadCachedClient(){const _0x3bd032=_0x419226,_0x402e22={'zDLbf':function(_0x3b2928,_0x19bda8){return _0x3b2928!==_0x19bda8;}},_0x3591f0=await loadCachedData();if(_0x3591f0?.[_0x3bd032(0x12e)]&&_0x402e22['zDLbf'](_0x3591f0[_0x3bd032(0x12e)],currentOrigin))return null;return _0x3591f0?.[_0x3bd032(0x118)]?{'clientId':_0x3591f0[_0x3bd032(0x118)],'clientSecret':_0x3591f0['clientSecret']}:null;}async function clearCachedClient(){const _0x5ea2da=_0x419226,_0xd5d20={'KBFLI':function(_0x5acfa1){return _0x5acfa1();},'sBEnw':function(_0x1a1fd1,_0x3af8dd,_0xc307df,_0x5697e0){return _0x1a1fd1(_0x3af8dd,_0xc307df,_0x5697e0);}},_0x81871d=await _0xd5d20[_0x5ea2da(0x121)](loadCachedData);if(!_0x81871d)return;const {clientId:_0xf76226,clientSecret:_0x553b03,..._0x37bc81}=_0x81871d;await _0xd5d20[_0x5ea2da(0xf4)](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x37bc81),{'mode':0x180});}async function saveCachedClient(_0x37a205,_0x14f156){const _0x95087a=_0x419226,_0x297667={'nnFcz':function(_0x4ea97f,_0x7fb692,_0x2adbd1){return _0x4ea97f(_0x7fb692,_0x2adbd1);},'APIvl':function(_0x4563be,_0x456778,_0x2e7466,_0xa65035){return _0x4563be(_0x456778,_0x2e7466,_0xa65035);}},_0x2ab262=await loadCachedData(),_0x3f0048={..._0x2ab262,'origin':currentOrigin,'accessToken':_0x2ab262?.[_0x95087a(0x115)]??'','clientId':_0x37a205,'clientSecret':_0x14f156};await _0x297667[_0x95087a(0xd7)](mkdir,_0x297667['nnFcz'](join,homedir(),_0x95087a(0xd3)),{'recursive':!![]}),await _0x297667['APIvl'](writeFile,TOKEN_CACHE_PATH,JSON[_0x95087a(0x101)](_0x3f0048),{'mode':0x180});}async function loadCachedData(){const _0x200f66=_0x419226,_0x5129b4={'bDhMH':function(_0x12d437,_0x19c88e,_0x216c65){return _0x12d437(_0x19c88e,_0x216c65);}};try{return JSON[_0x200f66(0x11c)](await _0x5129b4[_0x200f66(0xf2)](readFile,TOKEN_CACHE_PATH,'utf-8'));}catch{return null;}}async function parseResponse(_0x3cc469){const _0x2da24d=_0x419226,_0x599d50={'qLuMP':_0x2da24d(0xf7),'JVDgT':'data:','LKySh':function(_0x4566e2,_0x3346c1){return _0x4566e2!==_0x3346c1;},'dfhYS':'No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream'},_0x4e1b02=_0x3cc469['headers'][_0x2da24d(0xc3)](_0x599d50[_0x2da24d(0xbd)])??'';if(_0x4e1b02['includes'](_0x2da24d(0xcc))){const _0x46cf0c=await _0x3cc469['text']();for(const _0x3601b7 of _0x46cf0c[_0x2da24d(0xd0)]('\x0a')){const _0xb65e1a=_0x3601b7[_0x2da24d(0x127)]();if(_0xb65e1a['startsWith'](_0x2da24d(0x134))){const _0x490dee=_0xb65e1a[_0x2da24d(0x117)](_0x599d50['JVDgT'][_0x2da24d(0xcb)])[_0x2da24d(0x127)]();if(!_0x490dee)continue;try{const _0x23d50a=JSON[_0x2da24d(0x11c)](_0x490dee);if(_0x599d50['LKySh'](_0x23d50a['id'],undefined)||_0x23d50a[_0x2da24d(0x13f)])return _0x23d50a;}catch{}}}throw new Error(_0x599d50[_0x2da24d(0xbe)]);}return _0x3cc469['json']();}function extractToken(_0x1dac99){const _0x2001f6=_0x419226,_0x48fa4c={'qeXgN':'Unknown\x20error','LVrwS':function(_0x3f95a9,_0x59060c){return _0x3f95a9===_0x59060c;},'IiEZQ':_0x2001f6(0xfe)};if(!_0x1dac99)return null;const _0x4ea8db=_0x1dac99['structuredContent'];if(_0x4ea8db?.['token']&&typeof _0x4ea8db[_0x2001f6(0xd2)]==='string')return _0x4ea8db['token'];if(_0x1dac99['isError']){const _0x5ee303=_0x1dac99[_0x2001f6(0xf6)];throw new Error('Server\x20returned\x20error:\x20'+(_0x5ee303?.[0x0]?.[_0x2001f6(0xeb)]??_0x48fa4c[_0x2001f6(0x14e)]));}const _0x24b598=_0x1dac99['content'];if(_0x24b598)for(const _0x4b8bd8 of _0x24b598){if(_0x48fa4c['LVrwS'](_0x4b8bd8[_0x2001f6(0xec)],_0x2001f6(0xeb))&&_0x4b8bd8['text']){try{const _0x1ac476=JSON['parse'](_0x4b8bd8['text']);if(typeof _0x1ac476?.[_0x2001f6(0xd2)]===_0x48fa4c['IiEZQ'])return _0x1ac476['token'];}catch{}const _0x107277=_0x4b8bd8['text'][_0x2001f6(0xfc)](/(rngr_[A-Za-z0-9_-]+)/);if(_0x107277)return _0x107277[0x1];}}return null;}
@@ -1 +1 @@
1
- (function(_0x1aeb1f,_0x56a96e){var _0x42e61d=_0x4680,_0x89ae8=_0x1aeb1f();while(!![]){try{var _0xab1d0=parseInt(_0x42e61d(0xa3))/0x1*(-parseInt(_0x42e61d(0xb1))/0x2)+parseInt(_0x42e61d(0xac))/0x3+-parseInt(_0x42e61d(0xb2))/0x4+-parseInt(_0x42e61d(0xa7))/0x5*(-parseInt(_0x42e61d(0xa9))/0x6)+-parseInt(_0x42e61d(0xb0))/0x7+-parseInt(_0x42e61d(0xad))/0x8+parseInt(_0x42e61d(0xab))/0x9*(parseInt(_0x42e61d(0xa8))/0xa);if(_0xab1d0===_0x56a96e)break;else _0x89ae8['push'](_0x89ae8['shift']());}catch(_0x30c434){_0x89ae8['push'](_0x89ae8['shift']());}}}(_0x421c,0xc6608));function _0x421c(){var _0x4fcfdd=['20751039oMqLcf','1830933LZYiRD','3630384ZOTioJ','xsBYG','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','10755850lLevCF','2477788GAhDEb','1386604rpJMum','1VoZPOM','fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.','gdDdH','error','885naMvuh','10EMulKv','49914GKklEq','ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a'];_0x421c=function(){return _0x4fcfdd;};return _0x421c();}function _0x4680(_0x1ba51a,_0x40838f){_0x1ba51a=_0x1ba51a-0xa3;var _0x421cb4=_0x421c();var _0x4680c2=_0x421cb4[_0x1ba51a];return _0x4680c2;}export async function migrateProfile(_0x389ea5,_0x441bcc){var _0x3004b3=_0x4680,_0x30530c={'xsBYG':function(_0x57d5a9,_0x31e08a){return _0x57d5a9+_0x31e08a;},'cqCOD':function(_0x427d80,_0x146373){return _0x427d80+_0x146373;},'GQMAX':function(_0x7eb988,_0x339e3d){return _0x7eb988+_0x339e3d;},'wfDyC':function(_0x241e0b,_0x4e0257){return _0x241e0b+_0x4e0257;},'hsQeO':'\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','gdDdH':'Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a'};console[_0x3004b3(0xa6)](_0x30530c[_0x3004b3(0xae)](_0x30530c['cqCOD'](_0x30530c['GQMAX'](_0x30530c['wfDyC'](_0x30530c['wfDyC'](_0x30530c['wfDyC'](_0x30530c[_0x3004b3(0xae)](_0x3004b3(0xaa)+'\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),_0x3004b3(0xaf)),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'),_0x30530c['hsQeO']),'\x0a'),_0x30530c[_0x3004b3(0xa5)])+_0x3004b3(0xa4)),process['exit'](0x1);}
1
+ function _0x4c72(){var _0x2d0d89=['error','1617936LNhLoh','4061900rgdnXf','2208783FItmyU','exit','3390630mlKare','2aAimpf','FoqKs','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','FDhgR','668617amcqDr','12781071XshYOP','4359570OmobyT','rZgGm','7wdUzzw','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','GpAIG'];_0x4c72=function(){return _0x2d0d89;};return _0x4c72();}function _0x3517(_0x129d19,_0x46fbf8){_0x129d19=_0x129d19-0x79;var _0x4c7242=_0x4c72();var _0x35173a=_0x4c7242[_0x129d19];return _0x35173a;}(function(_0x264a8e,_0x34181e){var _0x27f0c5=_0x3517,_0x306e2e=_0x264a8e();while(!![]){try{var _0x30510a=-parseInt(_0x27f0c5(0x84))/0x1*(-parseInt(_0x27f0c5(0x80))/0x2)+parseInt(_0x27f0c5(0x7d))/0x3+-parseInt(_0x27f0c5(0x7c))/0x4+-parseInt(_0x27f0c5(0x86))/0x5+-parseInt(_0x27f0c5(0x7f))/0x6+-parseInt(_0x27f0c5(0x88))/0x7*(-parseInt(_0x27f0c5(0x7b))/0x8)+parseInt(_0x27f0c5(0x85))/0x9;if(_0x30510a===_0x34181e)break;else _0x306e2e['push'](_0x306e2e['shift']());}catch(_0x27cd6b){_0x306e2e['push'](_0x306e2e['shift']());}}}(_0x4c72,0x8c519));export async function migrateProfile(_0xbbda99,_0x544984){var _0x565de4=_0x3517,_0x1324cc={'FoqKs':function(_0x201a14,_0x5a26eb){return _0x201a14+_0x5a26eb;},'rZgGm':function(_0x3b916e,_0x188155){return _0x3b916e+_0x188155;},'cVsIK':function(_0x2c0dff,_0x41ffb0){return _0x2c0dff+_0x41ffb0;},'GpAIG':function(_0x1c577a,_0x493347){return _0x1c577a+_0x493347;},'QJjre':function(_0x573445,_0x3d74ec){return _0x573445+_0x3d74ec;},'FDhgR':'\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','nMCUH':'Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a'};console[_0x565de4(0x7a)](_0x1324cc[_0x565de4(0x81)](_0x1324cc[_0x565de4(0x87)](_0x1324cc['cVsIK'](_0x1324cc[_0x565de4(0x79)](_0x1324cc['rZgGm'](_0x1324cc['QJjre']('ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','\x0a'),_0x565de4(0x89)),_0x565de4(0x82)),'\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'+_0x1324cc[_0x565de4(0x83)],'\x0a'),_0x1324cc['nMCUH'])+'fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.'),process[_0x565de4(0x7e)](0x1);}
@@ -1 +1 @@
1
- (function(_0x5f37cf,_0x31c245){const _0x23758b=_0x4d50,_0x205a70=_0x5f37cf();while(!![]){try{const _0x37ed9a=parseInt(_0x23758b(0xac))/0x1*(-parseInt(_0x23758b(0x8d))/0x2)+parseInt(_0x23758b(0xa3))/0x3+parseInt(_0x23758b(0x7e))/0x4*(-parseInt(_0x23758b(0xad))/0x5)+parseInt(_0x23758b(0x8c))/0x6+parseInt(_0x23758b(0x98))/0x7+-parseInt(_0x23758b(0xab))/0x8*(-parseInt(_0x23758b(0x90))/0x9)+-parseInt(_0x23758b(0xae))/0xa;if(_0x37ed9a===_0x31c245)break;else _0x205a70['push'](_0x205a70['shift']());}catch(_0x482514){_0x205a70['push'](_0x205a70['shift']());}}}(_0x29b7,0xc7020));import{join}from'path';import{existsSync}from'fs';import _0x481de5 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';function _0x4d50(_0x3a3b1b,_0x210228){_0x3a3b1b=_0x3a3b1b-0x7d;const _0x29b764=_0x29b7();let _0x4d5056=_0x29b764[_0x3a3b1b];return _0x4d5056;}import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x6ba8b4){const _0x331039=_0x4d50,_0x2cd4cb={'nUDbY':_0x331039(0x91),'jXnoA':function(_0x48d535,_0x323a4b,_0x2f6f87){return _0x48d535(_0x323a4b,_0x2f6f87);},'HfItl':_0x331039(0xa0),'OtVcW':'list','mlAeA':'Where\x20should\x20the\x20plugin\x20be\x20installed?','zbiOu':'user','qGIpr':function(_0x12d796,_0x53703a){return _0x12d796(_0x53703a);},'rCmFy':_0x331039(0x93),'GwEQB':function(_0x1886d1,_0x4c80fd){return _0x1886d1(_0x4c80fd);},'MNFFs':_0x331039(0x82),'ttqHg':_0x331039(0x8b),'ARbyI':_0x331039(0xb1),'qDFWJ':'--scope','FhLdG':function(_0x4d4cce,_0x4dc8c2){return _0x4d4cce===_0x4dc8c2;},'wpjFT':function(_0x39bb1d){return _0x39bb1d();},'OExVd':'\x0aYou\x20can\x20install\x20manually\x20with:','AsMXM':_0x331039(0x9d),'QrHkU':_0x331039(0x9a),'LSFXj':function(_0x42e3ab,_0x24e410){return _0x42e3ab===_0x24e410;},'VPkmc':function(_0x52297e){return _0x52297e();},'zhjZX':'already\x20enabled','afdTP':_0x331039(0xa5)},_0x7e973f=await isPluginInstalled('ranger@trailhead');if(_0x7e973f)return console[_0x331039(0xa9)](_0x2cd4cb['nUDbY']),![];const _0x24f79b=existsSync(_0x2cd4cb[_0x331039(0x8e)](join,getProjectRoot(),'.claude'));let _0x4beaa5;if(_0x6ba8b4)_0x4beaa5=_0x6ba8b4;else{if(_0x24f79b)_0x4beaa5=_0x2cd4cb['HfItl'];else{console[_0x331039(0xa9)](_0x331039(0xb0));const _0x171462=await _0x481de5[_0x331039(0x97)]([{'type':_0x2cd4cb['OtVcW'],'name':_0x331039(0x89),'message':_0x2cd4cb[_0x331039(0xb2)],'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x2cd4cb[_0x331039(0xa2)]},{'name':_0x331039(0xa6),'value':_0x2cd4cb[_0x331039(0xaf)]}],'default':'user'}]);_0x4beaa5=_0x171462[_0x331039(0x89)];}}console[_0x331039(0xa9)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x4beaa5+'\x20level)...\x0a');const _0x306e6f=await _0x2cd4cb['qGIpr'](isMarketplaceAdded,_0x2cd4cb[_0x331039(0xa1)]);let _0x400af8=_0x306e6f;if(_0x306e6f)console[_0x331039(0xa9)](_0x331039(0x9f));else{const _0x49be05=await _0x2cd4cb['GwEQB'](runClaudeCommand,['plugin',_0x331039(0x8f),_0x331039(0x8a),_0x331039(0x9c)]);!_0x49be05['success']?(console['error'](_0x331039(0x7f),_0x49be05[_0x331039(0x87)]),console['log']('\x0aYou\x20can\x20install\x20manually\x20with:'),console['log'](_0x2cd4cb['MNFFs']),console[_0x331039(0xa9)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x4beaa5)):_0x400af8=!![];}if(_0x400af8){const _0xa2be9d=await runClaudeCommand([_0x2cd4cb[_0x331039(0x92)],'install',_0x2cd4cb[_0x331039(0x9b)],_0x2cd4cb['qDFWJ'],_0x4beaa5],{'cwd':_0x2cd4cb[_0x331039(0x83)](_0x4beaa5,'project')?_0x2cd4cb['wpjFT'](getProjectRoot):undefined});if(!_0xa2be9d['success'])console['error'](_0x331039(0xa8),_0xa2be9d['error']),console[_0x331039(0xa9)](_0x2cd4cb[_0x331039(0x99)]),console['log'](_0x331039(0x94)+_0x4beaa5);else{console[_0x331039(0xa9)](_0x2cd4cb['AsMXM']);const _0x52fddb=[_0x2cd4cb['ttqHg'],_0x2cd4cb[_0x331039(0x81)],_0x331039(0xb1)];_0x4beaa5===_0x2cd4cb[_0x331039(0xaf)]&&_0x52fddb['push'](_0x2cd4cb['qDFWJ'],_0x2cd4cb['HfItl']);const _0x103167=await runClaudeCommand(_0x52fddb,{'captureOutput':!![],'cwd':_0x2cd4cb['LSFXj'](_0x4beaa5,_0x331039(0xa0))?_0x2cd4cb['VPkmc'](getProjectRoot):undefined}),_0x1f680d=_0x103167['output']?.['includes'](_0x2cd4cb[_0x331039(0x80)]);!_0x103167[_0x331039(0xa7)]&&!_0x1f680d?console['error'](_0x331039(0x7d),_0x103167[_0x331039(0x87)]):console['log'](_0x2cd4cb[_0x331039(0x9e)]);}}return!![];}function _0x29b7(){const _0x15a154=['ranger-testing/trailhead','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','afdTP','✓\x20Marketplace\x20already\x20added','project','rCmFy','zbiOu','3180057YeHVtz','sKFJx','✓\x20Claude\x20Code\x20plugin\x20enabled','Project\x20(shared\x20with\x20team\x20via\x20git)','success','❌\x20Failed\x20to\x20install\x20plugin:','log','user','8GFIhQx','1nPsVdV','35zhLlhC','12942160nUluni','HfItl','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','ranger@trailhead','mlAeA','yeLKr','⚠\x20Failed\x20to\x20enable\x20plugin:','784816Wflpsv','❌\x20Failed\x20to\x20add\x20marketplace:','zhjZX','QrHkU','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','FhLdG','OIttz','confirm','.claude','error','bLWEV','pluginScope','add','plugin','3681684MpuvDb','385778vBvhRy','jXnoA','marketplace','9664587xSZtzA','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','ttqHg','trailhead','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','Would\x20you\x20like\x20to\x20install\x20skills?','HrJdu','prompt','6497351ojCylL','OExVd','enable','ARbyI'];_0x29b7=function(){return _0x15a154;};return _0x29b7();}export async function ensureClaudeSkills(_0x522115){const _0x3b40f5=_0x4d50,_0x1471b6={'OIttz':function(_0x508d53,_0x2c2892,_0x49007b,_0x2ac87c){return _0x508d53(_0x2c2892,_0x49007b,_0x2ac87c);},'yeLKr':'ranger','HrJdu':function(_0x4dbf21,_0x301606){return _0x4dbf21(_0x301606);},'vgqYq':function(_0x5a7415,_0x42f0e4){return _0x5a7415||_0x42f0e4;},'sKFJx':function(_0xd2f992,_0x31749c){return _0xd2f992(_0x31749c);},'cZRRo':function(_0x1f0bd5,_0x3839f9,_0x3421c2){return _0x1f0bd5(_0x3839f9,_0x3421c2);},'aRSFb':function(_0x3732a3){return _0x3732a3();},'NzyRI':_0x3b40f5(0x86),'bLWEV':_0x3b40f5(0x95)},_0x181304=existsSync(_0x1471b6[_0x3b40f5(0x84)](join,getSkillsDir(_0x3b40f5(0xaa)),_0x1471b6[_0x3b40f5(0xb3)],'SKILL.md')),_0x207e51=_0x1471b6['HrJdu'](existsSync,_0x1471b6['OIttz'](join,_0x1471b6['HrJdu'](getSkillsDir,_0x3b40f5(0xa0)),_0x1471b6[_0x3b40f5(0xb3)],'SKILL.md'));if(_0x1471b6['vgqYq'](_0x181304,_0x207e51))return console[_0x3b40f5(0xa9)]('✓\x20Ranger\x20skills\x20already\x20installed'),![];const _0xd8bb66=_0x1471b6[_0x3b40f5(0xa4)](existsSync,_0x1471b6['cZRRo'](join,_0x1471b6['aRSFb'](getProjectRoot),_0x1471b6['NzyRI']));let _0x3fb3a3=!![];if(_0x522115)await _0x1471b6[_0x3b40f5(0x96)](skillup,{'autoInstall':_0x522115,'suppressUsage':!![]});else{if(_0xd8bb66)await _0x1471b6[_0x3b40f5(0xa4)](skillup,{'autoInstall':'project','suppressUsage':!![]});else{const _0xd21e73=await _0x481de5[_0x3b40f5(0x97)]([{'type':_0x3b40f5(0x85),'name':'wantsSkillup','message':_0x1471b6[_0x3b40f5(0x88)],'default':!![]}]);_0x3fb3a3=_0xd21e73['wantsSkillup'],_0x3fb3a3&&await skillup({'suppressUsage':!![]});}}return _0x3fb3a3;}
1
+ (function(_0x23d56b,_0x56b725){const _0x1216ce=_0x2d31,_0x222e9f=_0x23d56b();while(!![]){try{const _0x3ab72d=-parseInt(_0x1216ce(0x8d))/0x1*(-parseInt(_0x1216ce(0x9c))/0x2)+-parseInt(_0x1216ce(0xaa))/0x3+-parseInt(_0x1216ce(0x92))/0x4+parseInt(_0x1216ce(0x95))/0x5+-parseInt(_0x1216ce(0x9b))/0x6+-parseInt(_0x1216ce(0x8c))/0x7*(-parseInt(_0x1216ce(0x88))/0x8)+parseInt(_0x1216ce(0x9d))/0x9;if(_0x3ab72d===_0x56b725)break;else _0x222e9f['push'](_0x222e9f['shift']());}catch(_0x3cc7de){_0x222e9f['push'](_0x222e9f['shift']());}}}(_0x2241,0x7244b));import{join}from'path';import{existsSync}from'fs';import _0x57368e from'inquirer';import{skillup}from'../skillup.js';function _0x2d31(_0x599ed8,_0x5d23ba){_0x599ed8=_0x599ed8-0x7f;const _0x224121=_0x2241();let _0x2d31e0=_0x224121[_0x599ed8];return _0x2d31e0;}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';function _0x2241(){const _0x969b94=['project','XdtoV','FbpPR','390480qRlBgH','26212fhDhYc','7930008eyAJBL','XEkBp','confirm','❌\x20Failed\x20to\x20add\x20marketplace:','VPcYz','ranger','ranger@trailhead','install','mpymr','TVinj','QIIDF','\x0aYou\x20can\x20install\x20manually\x20with:','mwZmk','1291332vzpmMp','PshJV','bPTIB','fZpza','plugin','Would\x20you\x20like\x20to\x20install\x20skills?','enable','kyXrM','LUeoP','xhJBc','list','user','SNBeS','.claude','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','push','ranger-testing/trailhead','FHigG','4885288fjmuoW','already\x20enabled','tiDPp','error','7IOIIBX','4zEESyl','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','prompt','marketplace','output','3286860FhnBpR','log','xlxdi','1205425FXeKNj','success','zcXcy'];_0x2241=function(){return _0x969b94;};return _0x2241();}export async function ensureClaudePlugin(_0x5466d1){const _0x158436=_0x2d31,_0x3c76fa={'bwDYf':function(_0x17f695,_0x40bc27){return _0x17f695(_0x40bc27);},'TVinj':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','tiDPp':function(_0x912bdd){return _0x912bdd();},'FbpPR':'.claude','mpymr':_0x158436(0x98),'XEkBp':'\x0a📦\x20Claude\x20Code\x20Plugin\x0a','fZpza':'pluginScope','xlxdi':'User\x20(available\x20in\x20all\x20your\x20projects)','FHigG':_0x158436(0x81),'bPTIB':function(_0x22a513,_0x4264be){return _0x22a513(_0x4264be);},'XdtoV':'trailhead','mwZmk':'plugin','zcXcy':'add','kyXrM':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','QIIDF':'ranger@trailhead','VqHgJ':function(_0x3aa4c6){return _0x3aa4c6();},'FkrKe':function(_0x5b735d,_0xfc6379){return _0x5b735d===_0xfc6379;},'iWdpg':'--scope','WDmyD':_0x158436(0x89)},_0x5940e=await _0x3c76fa['bwDYf'](isPluginInstalled,_0x158436(0xa3));if(_0x5940e)return console[_0x158436(0x93)](_0x3c76fa[_0x158436(0xa6)]),![];const _0x276fe5=existsSync(join(_0x3c76fa[_0x158436(0x8a)](getProjectRoot),_0x3c76fa[_0x158436(0x9a)]));let _0x1138d9;if(_0x5466d1)_0x1138d9=_0x5466d1;else{if(_0x276fe5)_0x1138d9=_0x3c76fa[_0x158436(0xa5)];else{console['log'](_0x3c76fa[_0x158436(0x9e)]);const _0x4e4d20=await _0x57368e[_0x158436(0x8f)]([{'type':_0x158436(0x80),'name':_0x3c76fa[_0x158436(0xad)],'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x3c76fa[_0x158436(0x94)],'value':_0x158436(0x81)},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':'project'}],'default':_0x3c76fa[_0x158436(0x87)]}]);_0x1138d9=_0x4e4d20['pluginScope'];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x1138d9+'\x20level)...\x0a');const _0x43fe24=await _0x3c76fa[_0x158436(0xac)](isMarketplaceAdded,_0x3c76fa[_0x158436(0x99)]);let _0x28a2b3=_0x43fe24;if(_0x43fe24)console[_0x158436(0x93)]('✓\x20Marketplace\x20already\x20added');else{const _0x56cece=await runClaudeCommand([_0x3c76fa[_0x158436(0xa9)],_0x158436(0x90),_0x3c76fa[_0x158436(0x97)],_0x158436(0x86)]);!_0x56cece['success']?(console[_0x158436(0x8b)](_0x158436(0xa0),_0x56cece['error']),console[_0x158436(0x93)](_0x158436(0xa8)),console[_0x158436(0x93)](_0x3c76fa[_0x158436(0xb1)]),console[_0x158436(0x93)](_0x158436(0x84)+_0x1138d9)):_0x28a2b3=!![];}if(_0x28a2b3){const _0x3743ae=await runClaudeCommand([_0x3c76fa['mwZmk'],_0x158436(0xa4),_0x3c76fa[_0x158436(0xa7)],'--scope',_0x1138d9],{'cwd':_0x1138d9===_0x3c76fa['mpymr']?_0x3c76fa['VqHgJ'](getProjectRoot):undefined});if(!_0x3743ae[_0x158436(0x96)])console[_0x158436(0x8b)]('❌\x20Failed\x20to\x20install\x20plugin:',_0x3743ae[_0x158436(0x8b)]),console['log'](_0x158436(0xa8)),console['log'](_0x158436(0x84)+_0x1138d9);else{console[_0x158436(0x93)](_0x158436(0x8e));const _0x17a798=[_0x158436(0xae),_0x158436(0xb0),'ranger@trailhead'];_0x3c76fa['FkrKe'](_0x1138d9,_0x3c76fa[_0x158436(0xa5)])&&_0x17a798[_0x158436(0x85)](_0x3c76fa['iWdpg'],'project');const _0x35dc6a=await runClaudeCommand(_0x17a798,{'captureOutput':!![],'cwd':_0x1138d9===_0x3c76fa[_0x158436(0xa5)]?getProjectRoot():undefined}),_0x1eb8ef=_0x35dc6a[_0x158436(0x91)]?.['includes'](_0x3c76fa['WDmyD']);!_0x35dc6a[_0x158436(0x96)]&&!_0x1eb8ef?console[_0x158436(0x8b)]('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x35dc6a['error']):console['log']('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}export async function ensureClaudeSkills(_0xba14f){const _0x424ef2=_0x2d31,_0x370886={'LUeoP':function(_0x456f15,_0x5bcb34){return _0x456f15(_0x5bcb34);},'SNBeS':function(_0x2b4d57,_0x286a2d){return _0x2b4d57(_0x286a2d);},'vVbIa':'user','Wfmwl':_0x424ef2(0xa2),'vruxa':'SKILL.md','ykMXs':function(_0xa5d222,_0x582756,_0x14b84c,_0x532153){return _0xa5d222(_0x582756,_0x14b84c,_0x532153);},'DgFdW':function(_0x2e1196,_0x31f985){return _0x2e1196(_0x31f985);},'xhJBc':'project','PshJV':function(_0x11f1fa,_0x572382){return _0x11f1fa||_0x572382;},'LRmes':function(_0x45bb0c,_0x4284da,_0x18b043){return _0x45bb0c(_0x4284da,_0x18b043);},'UpqpW':function(_0x379b90){return _0x379b90();},'WBmfu':_0x424ef2(0x83),'mzJNe':'wantsSkillup','VPcYz':function(_0x56db1d,_0x10c9e9){return _0x56db1d(_0x10c9e9);}},_0x42091d=_0x370886[_0x424ef2(0xb2)](existsSync,join(_0x370886['SNBeS'](getSkillsDir,_0x370886['vVbIa']),_0x370886['Wfmwl'],_0x370886['vruxa'])),_0x598e00=existsSync(_0x370886['ykMXs'](join,_0x370886['DgFdW'](getSkillsDir,_0x370886['xhJBc']),_0x370886['Wfmwl'],_0x370886['vruxa']));if(_0x370886[_0x424ef2(0xab)](_0x42091d,_0x598e00))return console[_0x424ef2(0x93)]('✓\x20Ranger\x20skills\x20already\x20installed'),![];const _0x3c985e=existsSync(_0x370886['LRmes'](join,_0x370886['UpqpW'](getProjectRoot),_0x370886['WBmfu']));let _0x5402f7=!![];if(_0xba14f)await skillup({'autoInstall':_0xba14f,'suppressUsage':!![]});else{if(_0x3c985e)await _0x370886[_0x424ef2(0x82)](skillup,{'autoInstall':_0x370886[_0x424ef2(0x7f)],'suppressUsage':!![]});else{const _0x21fcad=await _0x57368e['prompt']([{'type':_0x424ef2(0x9f),'name':_0x370886['mzJNe'],'message':_0x424ef2(0xaf),'default':!![]}]);_0x5402f7=_0x21fcad['wantsSkillup'],_0x5402f7&&await _0x370886[_0x424ef2(0xa1)](skillup,{'suppressUsage':!![]});}}return _0x5402f7;}
@@ -1 +1 @@
1
- (function(_0x42cf65,_0x2c80db){const _0x13f113=_0x20c7,_0x4baf76=_0x42cf65();while(!![]){try{const _0xa6f309=parseInt(_0x13f113(0xd9))/0x1+-parseInt(_0x13f113(0xd3))/0x2+parseInt(_0x13f113(0xc4))/0x3*(parseInt(_0x13f113(0xcc))/0x4)+parseInt(_0x13f113(0xc8))/0x5*(parseInt(_0x13f113(0xd2))/0x6)+-parseInt(_0x13f113(0xd1))/0x7+parseInt(_0x13f113(0xc3))/0x8+parseInt(_0x13f113(0xcb))/0x9*(-parseInt(_0x13f113(0xd6))/0xa);if(_0xa6f309===_0x2c80db)break;else _0x4baf76['push'](_0x4baf76['shift']());}catch(_0x2f27e8){_0x4baf76['push'](_0x4baf76['shift']());}}}(_0x2a70,0x3b0ce));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';function _0x2a70(){const _0xdb5313=['$schema','pluginScope','230424hUSdyN','tBXBb','plugin','user','project','Wgtzp','parse','list','2889384BaRiqu','52413BwgBqL','error','cWhNJ','\x0a📦\x20OpenCode\x20Plugin\x0a','10GTRcxD','isArray','Project\x20(shared\x20with\x20team\x20via\x20git)','1454049pDEhds','24AMImaQ','✓\x20OpenCode\x20plugin\x20already\x20configured','oIwSa','jEngV','duDAY','1832215OCiSGv','1303338HuXcaG','285142fihGoC','utf-8','User\x20(available\x20in\x20all\x20your\x20projects)','30UNPLeH'];_0x2a70=function(){return _0xdb5313;};return _0x2a70();}function _0x20c7(_0x99b2ba,_0x68ad6e){_0x99b2ba=_0x99b2ba-0xc0;const _0x2a707a=_0x2a70();let _0x20c7ee=_0x2a707a[_0x99b2ba];return _0x20c7ee;}import _0x230cec from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x25cc78){const _0x39c4bb=_0x20c7,_0x257a3d={'RnaYp':function(_0x3368ca,_0x54958d){return _0x3368ca(_0x54958d);},'IUFAY':'project','cWhNJ':'opencode.json','nHLKH':_0x39c4bb(0xc2),'jEngV':'Where\x20should\x20the\x20plugin\x20be\x20installed?','uCnSM':_0x39c4bb(0xdc),'wNREk':_0x39c4bb(0xca),'tBXBb':'https://opencode.ai/config.json','oIwSa':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','duDAY':'Failed\x20to\x20read\x20opencode.json','Wgtzp':_0x39c4bb(0xcd),'yaOEi':function(_0x1f7197,_0x51fa8c,_0x2171d4){return _0x1f7197(_0x51fa8c,_0x2171d4);},'FyNhl':function(_0x48b970,_0x460ff9){return _0x48b970(_0x460ff9);}},_0x5f2f70=existsSync(join(_0x257a3d['RnaYp'](getOpencodeConfigDir,_0x257a3d['IUFAY']),_0x257a3d[_0x39c4bb(0xc6)]));let _0x32464e;if(_0x25cc78)_0x32464e=_0x25cc78;else{if(_0x5f2f70)_0x32464e=_0x39c4bb(0xdd);else{console['log'](_0x39c4bb(0xc7));const _0x46c687=await _0x230cec['prompt']([{'type':_0x257a3d['nHLKH'],'name':_0x39c4bb(0xd8),'message':_0x257a3d[_0x39c4bb(0xcf)],'choices':[{'name':_0x39c4bb(0xd5),'value':_0x257a3d['uCnSM']},{'name':_0x257a3d['wNREk'],'value':'project'}],'default':_0x39c4bb(0xdc)}]);_0x32464e=_0x46c687['pluginScope'];}}const _0x41b900=join(getOpencodeConfigDir(_0x32464e),_0x257a3d['cWhNJ']),_0x276c7c='@ranger-testing/opencode-plugin',_0x4da640=_0x257a3d[_0x39c4bb(0xda)];let _0x5cb77b={};if(existsSync(_0x41b900))try{const _0x4c9247=await readFile(_0x41b900,_0x39c4bb(0xd4));_0x5cb77b=JSON[_0x39c4bb(0xc1)](_0x4c9247);}catch(_0x49d6f4){return console[_0x39c4bb(0xc5)](_0x257a3d[_0x39c4bb(0xce)]),{'configured':![],'scope':_0x32464e,'error':_0x257a3d[_0x39c4bb(0xd0)],'details':_0x49d6f4};}const _0x37c552=Array[_0x39c4bb(0xc9)](_0x5cb77b[_0x39c4bb(0xdb)])?_0x5cb77b[_0x39c4bb(0xdb)]:[];if(_0x37c552['includes'](_0x276c7c))return console['log'](_0x257a3d[_0x39c4bb(0xc0)]),{'configured':![],'scope':_0x32464e};return _0x5cb77b[_0x39c4bb(0xd7)]=_0x5cb77b[_0x39c4bb(0xd7)]||_0x4da640,_0x5cb77b[_0x39c4bb(0xdb)]=[..._0x37c552,_0x276c7c],await _0x257a3d['yaOEi'](mkdir,_0x257a3d['FyNhl'](getOpencodeConfigDir,_0x32464e),{'recursive':!![]}),await writeFile(_0x41b900,JSON['stringify'](_0x5cb77b,null,0x2)+'\x0a'),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x32464e};}
1
+ (function(_0x5c5908,_0xc9f181){const _0x6fd4ae=_0x5967,_0x34efb4=_0x5c5908();while(!![]){try{const _0x35bfc6=-parseInt(_0x6fd4ae(0x1b2))/0x1+-parseInt(_0x6fd4ae(0x1ad))/0x2*(-parseInt(_0x6fd4ae(0x1a9))/0x3)+-parseInt(_0x6fd4ae(0x1b9))/0x4+parseInt(_0x6fd4ae(0x1ab))/0x5+-parseInt(_0x6fd4ae(0x1b3))/0x6+parseInt(_0x6fd4ae(0x1a3))/0x7+parseInt(_0x6fd4ae(0x1b6))/0x8;if(_0x35bfc6===_0xc9f181)break;else _0x34efb4['push'](_0x34efb4['shift']());}catch(_0x330a8b){_0x34efb4['push'](_0x34efb4['shift']());}}}(_0x3b89,0x8748a));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';function _0x3b89(){const _0x8d46ef=['3523200pKczMJ','nuvpo','Failed\x20to\x20read\x20opencode.json','8025608KqQmLI','stringify','@ranger-testing/opencode-plugin','2172664ahsNbS','plugin','syEKh','FSzZZ','jKtie','Where\x20should\x20the\x20plugin\x20be\x20installed?','isArray','$schema','2068409jXWBAK','https://opencode.ai/config.json','log','pluginScope','uWVoE','GuNwY','291552SlrhDJ','rNvwg','3145285xlnfnX','includes','12aELcOA','list','User\x20(available\x20in\x20all\x20your\x20projects)','VBSqD','VobYO','826361lEcMFr'];_0x3b89=function(){return _0x8d46ef;};return _0x3b89();}import _0x2f09e7 from'inquirer';function _0x5967(_0x4387cb,_0x27203b){_0x4387cb=_0x4387cb-0x1a3;const _0x3b8904=_0x3b89();let _0x59676a=_0x3b8904[_0x4387cb];return _0x59676a;}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x5023e7){const _0x9910f0=_0x5967,_0x1b4780={'rNvwg':function(_0x3d361b,_0x2afb80,_0x990acf){return _0x3d361b(_0x2afb80,_0x990acf);},'uWVoE':'opencode.json','VBSqD':_0x9910f0(0x1ae),'nuvpo':_0x9910f0(0x1af),'jeitW':'user','qTkdL':_0x9910f0(0x1a4),'FSzZZ':function(_0x5f56ff,_0xc93b38){return _0x5f56ff(_0xc93b38);},'PIlEW':'utf-8','jKtie':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','syEKh':_0x9910f0(0x1b5),'VobYO':function(_0x566fc6,_0x466861){return _0x566fc6(_0x466861);},'GuNwY':function(_0x51abe5,_0x2276f3){return _0x51abe5+_0x2276f3;}},_0x1a1196=existsSync(_0x1b4780['rNvwg'](join,getOpencodeConfigDir('project'),_0x1b4780[_0x9910f0(0x1a7)]));let _0x22ba7e;if(_0x5023e7)_0x22ba7e=_0x5023e7;else{if(_0x1a1196)_0x22ba7e='project';else{console['log']('\x0a📦\x20OpenCode\x20Plugin\x0a');const _0x3a793c=await _0x2f09e7['prompt']([{'type':_0x1b4780[_0x9910f0(0x1b0)],'name':_0x9910f0(0x1a6),'message':_0x9910f0(0x1be),'choices':[{'name':_0x1b4780[_0x9910f0(0x1b4)],'value':_0x1b4780['jeitW']},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':'project'}],'default':_0x1b4780['jeitW']}]);_0x22ba7e=_0x3a793c['pluginScope'];}}const _0x46b6c3=_0x1b4780['rNvwg'](join,getOpencodeConfigDir(_0x22ba7e),_0x1b4780['uWVoE']),_0x2debcd=_0x9910f0(0x1b8),_0x48a840=_0x1b4780['qTkdL'];let _0xffc50f={};if(_0x1b4780[_0x9910f0(0x1bc)](existsSync,_0x46b6c3))try{const _0x55d2be=await _0x1b4780['rNvwg'](readFile,_0x46b6c3,_0x1b4780['PIlEW']);_0xffc50f=JSON['parse'](_0x55d2be);}catch(_0xb7fd18){return console['error'](_0x1b4780[_0x9910f0(0x1bd)]),{'configured':![],'scope':_0x22ba7e,'error':_0x1b4780[_0x9910f0(0x1bb)],'details':_0xb7fd18};}const _0x579de1=Array[_0x9910f0(0x1bf)](_0xffc50f[_0x9910f0(0x1ba)])?_0xffc50f[_0x9910f0(0x1ba)]:[];if(_0x579de1[_0x9910f0(0x1ac)](_0x2debcd))return console[_0x9910f0(0x1a5)]('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x22ba7e};return _0xffc50f[_0x9910f0(0x1c0)]=_0xffc50f[_0x9910f0(0x1c0)]||_0x48a840,_0xffc50f['plugin']=[..._0x579de1,_0x2debcd],await mkdir(_0x1b4780[_0x9910f0(0x1b1)](getOpencodeConfigDir,_0x22ba7e),{'recursive':!![]}),await _0x1b4780[_0x9910f0(0x1aa)](writeFile,_0x46b6c3,_0x1b4780[_0x9910f0(0x1a8)](JSON[_0x9910f0(0x1b7)](_0xffc50f,null,0x2),'\x0a')),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x22ba7e};}
@@ -1 +1 @@
1
- (function(_0x4c97c0,_0x4a6a84){var _0x3e0853=_0x1507,_0x2a3234=_0x4c97c0();while(!![]){try{var _0x53a720=parseInt(_0x3e0853(0x1b9))/0x1*(-parseInt(_0x3e0853(0x1bb))/0x2)+-parseInt(_0x3e0853(0x1b5))/0x3+-parseInt(_0x3e0853(0x1b4))/0x4+-parseInt(_0x3e0853(0x1af))/0x5*(-parseInt(_0x3e0853(0x1b0))/0x6)+parseInt(_0x3e0853(0x1b1))/0x7+parseInt(_0x3e0853(0x1ba))/0x8+-parseInt(_0x3e0853(0x1b2))/0x9*(-parseInt(_0x3e0853(0x1b6))/0xa);if(_0x53a720===_0x4a6a84)break;else _0x2a3234['push'](_0x2a3234['shift']());}catch(_0x1862d0){_0x2a3234['push'](_0x2a3234['shift']());}}}(_0x32c9,0x2e986));function _0x32c9(){var _0x3d97e9=['2888464cZkdqk','646550wABuvX','15THzxRz','108510QfWPcX','1578367xDSdlu','105858ycyStf','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','1085968ZBaGVb','1118103hrSfQC','440YGzopQ','\x20\x20https://docs.ranger.net/main/concepts/profiles','zXzDA','1SCHPnD'];_0x32c9=function(){return _0x3d97e9;};return _0x32c9();}function _0x1507(_0x20b238,_0x4b9da8){_0x20b238=_0x20b238-0x1af;var _0x32c919=_0x32c9();var _0x15074c=_0x32c919[_0x20b238];return _0x15074c;}export async function setupCi(_0x2a80bb,_0x4cd5be,_0x4f987e){var _0x59edeb=_0x1507,_0x45a3e5={'zXzDA':function(_0x3954b0,_0x260840){return _0x3954b0+_0x260840;},'JLYQr':'ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','TPaMT':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','Zdkjq':_0x59edeb(0x1b3),'qEIkC':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console['error'](_0x45a3e5[_0x59edeb(0x1b8)](_0x45a3e5[_0x59edeb(0x1b8)](_0x45a3e5['JLYQr']+'\x0a',_0x45a3e5['TPaMT']),_0x45a3e5['Zdkjq'])+'\x0a'+_0x45a3e5['qEIkC']+_0x59edeb(0x1b7)),process['exit'](0x1);}
1
+ function _0x5a1a(_0x32c1dc,_0x3c02db){_0x32c1dc=_0x32c1dc-0x1c9;var _0x5c6bbd=_0x5c6b();var _0x5a1a25=_0x5c6bbd[_0x32c1dc];return _0x5a1a25;}(function(_0x40ab8c,_0x364fef){var _0x9933e=_0x5a1a,_0x4c2c9f=_0x40ab8c();while(!![]){try{var _0x2cd9c7=parseInt(_0x9933e(0x1cb))/0x1+parseInt(_0x9933e(0x1ce))/0x2*(parseInt(_0x9933e(0x1d2))/0x3)+-parseInt(_0x9933e(0x1d4))/0x4*(parseInt(_0x9933e(0x1d7))/0x5)+parseInt(_0x9933e(0x1ca))/0x6+-parseInt(_0x9933e(0x1cc))/0x7+parseInt(_0x9933e(0x1d1))/0x8*(-parseInt(_0x9933e(0x1c9))/0x9)+parseInt(_0x9933e(0x1d6))/0xa;if(_0x2cd9c7===_0x364fef)break;else _0x4c2c9f['push'](_0x4c2c9f['shift']());}catch(_0x978269){_0x4c2c9f['push'](_0x4c2c9f['shift']());}}}(_0x5c6b,0xe0770));export async function setupCi(_0x2bb866,_0x4b190a,_0xb566f5){var _0xeb3887=_0x5a1a,_0x4514e6={'NABEa':function(_0xe679e,_0x568235){return _0xe679e+_0x568235;},'dQVjt':function(_0x36e512,_0x514fd7){return _0x36e512+_0x514fd7;},'HFmfa':_0xeb3887(0x1cf),'XohFR':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console[_0xeb3887(0x1d3)](_0x4514e6[_0xeb3887(0x1d5)](_0x4514e6['dQVjt'](_0x4514e6['dQVjt'](_0x4514e6['dQVjt'](_0xeb3887(0x1d0)+'\x0a'+_0x4514e6['HFmfa'],'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),'\x0a'),_0x4514e6[_0xeb3887(0x1cd)]),'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process['exit'](0x1);}function _0x5c6b(){var _0x302ff6=['901375WGSpRF','7857304hjcpxl','XohFR','4ThlKfJ','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','8ytqjic','1473837LqaOQF','error','9236qlYTqs','NABEa','5200910NXgVLf','2005XrjKTF','2937429hFsxUr','5340876ImkyvU'];_0x5c6b=function(){return _0x302ff6;};return _0x5c6b();}
@@ -1 +1 @@
1
- (function(_0x266b3c,_0x5e5c5c){const _0x13063e=_0x25e6,_0x47e2db=_0x266b3c();while(!![]){try{const _0x351d8d=parseInt(_0x13063e(0xc1))/0x1*(parseInt(_0x13063e(0xc5))/0x2)+-parseInt(_0x13063e(0xc4))/0x3*(-parseInt(_0x13063e(0xc8))/0x4)+-parseInt(_0x13063e(0xd4))/0x5*(-parseInt(_0x13063e(0xc9))/0x6)+-parseInt(_0x13063e(0xe6))/0x7+parseInt(_0x13063e(0xdd))/0x8*(-parseInt(_0x13063e(0xca))/0x9)+-parseInt(_0x13063e(0xcc))/0xa+-parseInt(_0x13063e(0xc7))/0xb*(parseInt(_0x13063e(0xbd))/0xc);if(_0x351d8d===_0x5e5c5c)break;else _0x47e2db['push'](_0x47e2db['shift']());}catch(_0x39a6d2){_0x47e2db['push'](_0x47e2db['shift']());}}}(_0x2e47,0x8bd75));import{basename}from'path';import _0x1a7bf4 from'inquirer';function _0x25e6(_0x2b07bd,_0x55cee5){_0x2b07bd=_0x2b07bd-0xbc;const _0x2e470d=_0x2e47();let _0x25e616=_0x2e470d[_0x2b07bd];return _0x25e616;}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';function _0x2e47(){const _0x1c8bf6=['148NCdUqB','GMGBn','33LQHEtp','114344GgArLM','199974huRNzk','209646Jrqpnx','log','4200840xpkXGC','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','gHbMc','\x20\x202.\x20Run:\x20ranger\x20setup','jOCAF','All\x20projects\x20(','eBhqE','hyezY','170BFeYfo','\x0a📦\x20Installing\x20skills...\x0a','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','YmlCn','To\x20use:','rmOPk','project','isTTY','HyFIV','8SuwTpJ','iuEzs','project-level','\x20\x203.\x20Run:\x20ranger\x20skillup','user-level','iFpWa','\x20<your-api-token>','user','message','3656254qRbhDl','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','\x20--opencode','warn','opencode','Sqyqg','1984428vrVzMn','stdin','FQDfI','autoInstall','206EXyXMJ','/skills/','3|4|1|0|2|5','93RyjAwo'];_0x2e47=function(){return _0x1c8bf6;};return _0x2e47();}import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x9ce04a={}){const _0x43cddf=_0x25e6,_0x1b8809={'eBhqE':_0x43cddf(0xe7),'jOCAF':'claude','YhtPZ':'\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','HyFIV':function(_0x58df3c,_0xe5e2cb){return _0x58df3c===_0xe5e2cb;},'YmlCn':_0x43cddf(0xea),'iFpWa':_0x43cddf(0xe8),'INzFn':'To\x20get\x20started:','PYDlr':'✓\x20Found\x20API\x20token','FQDfI':function(_0x3ebc13,_0x7b5239){return _0x3ebc13(_0x7b5239);},'Sqyqg':_0x43cddf(0xe4),'iGQUL':function(_0x334925,_0x22c4f8){return _0x334925===_0x22c4f8;},'rmOPk':_0x43cddf(0xda),'ernhE':function(_0x127531){return _0x127531();},'dKUWY':_0x43cddf(0xd5),'THzmi':function(_0x26f5ea,_0x4e6b9e,_0x1d5fb2){return _0x26f5ea(_0x4e6b9e,_0x1d5fb2);},'mZUjq':'ranger','hyezY':function(_0x3d8e06,_0x961c20){return _0x3d8e06 instanceof _0x961c20;},'kyUEw':function(_0x39a951,_0x366f8a){return _0x39a951>_0x366f8a;},'gHbMc':_0x43cddf(0xe1),'iuEzs':_0x43cddf(0xdf),'WbSil':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','GMGBn':'\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!'};console[_0x43cddf(0xcb)](_0x1b8809[_0x43cddf(0xd2)]);const _0xf00eed=_0x9ce04a['platform']??_0x1b8809[_0x43cddf(0xd0)],_0x15873c=await getToken();if(!_0x15873c){const _0x29f975=_0x43cddf(0xc3)['split']('|');let _0x158d3a=0x0;while(!![]){switch(_0x29f975[_0x158d3a++]){case'0':console['log'](_0x43cddf(0xcf)+(_0xf00eed===_0x43cddf(0xea)?'\x20--opencode':'')+_0x43cddf(0xe3));continue;case'1':console['log'](_0x1b8809['YhtPZ']);continue;case'2':console[_0x43cddf(0xcb)](_0x43cddf(0xe0)+(_0x1b8809[_0x43cddf(0xdc)](_0xf00eed,_0x1b8809[_0x43cddf(0xd7)])?_0x1b8809[_0x43cddf(0xe2)]:'')+'\x0a');continue;case'3':console[_0x43cddf(0xcb)]('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a');continue;case'4':console['log'](_0x1b8809['INzFn']);continue;case'5':return;}break;}}console['log'](_0x1b8809['PYDlr']);const _0x9a131e=getProjectRoot(),_0x3eb20a=_0x1b8809['FQDfI'](basename,_0x9a131e),_0x115bb6=_0xf00eed===_0x1b8809[_0x43cddf(0xd7)]?_0x1b8809[_0x43cddf(0xbf)](getOpencodeConfigDir,_0x1b8809[_0x43cddf(0xbc)])+_0x43cddf(0xc2):getClaudeConfigDir()+'/skills/',_0x180866=_0x1b8809['iGQUL'](_0xf00eed,_0x1b8809[_0x43cddf(0xd7)])?_0x9a131e+'/.opencode/skills/':_0x9a131e+'/.claude/skills/',_0x1541a5=process[_0x43cddf(0xbe)]['isTTY']&&process['stdout'][_0x43cddf(0xdb)];let _0xd81b2d;if(_0x9ce04a[_0x43cddf(0xc0)])_0xd81b2d=_0x9ce04a[_0x43cddf(0xc0)];else{if(_0x1541a5){const _0x3afc91=await _0x1a7bf4['prompt']([{'type':'list','name':'installLevel','message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':_0x43cddf(0xd1)+_0x115bb6+')','value':'user'},{'name':'This\x20project\x20only\x20('+_0x180866+')','value':_0x1b8809[_0x43cddf(0xd9)]}]}]);_0xd81b2d=_0x3afc91['installLevel'];}else _0xd81b2d=_0x1b8809[_0x43cddf(0xd9)],console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x180866+')');}let _0x40aeb6=0x0;const _0x14bba4=_0x1b8809['ernhE'](getCurrentVersion);console['log'](_0x1b8809['dKUWY']);try{const _0x21cbcc=await _0x1b8809['THzmi'](installSkill,_0x1b8809['mZUjq'],{'cliVersion':_0x14bba4,'level':_0xd81b2d,'platform':_0xf00eed});_0x21cbcc&&_0x40aeb6++;}catch(_0x657222){console[_0x43cddf(0xe9)](_0x43cddf(0xd6),_0x1b8809[_0x43cddf(0xd3)](_0x657222,Error)?_0x657222[_0x43cddf(0xe5)]:_0x657222);}if(_0x1b8809['kyUEw'](_0x40aeb6,0x0)){const _0x4a9065=_0xd81b2d===_0x1b8809['Sqyqg']?_0x1b8809[_0x43cddf(0xce)]:_0x1b8809[_0x43cddf(0xde)];console[_0x43cddf(0xcb)]('\x0a✅\x20Installed\x20'+_0x40aeb6+'\x20'+_0x4a9065+'\x20skill'+(_0x1b8809['kyUEw'](_0x40aeb6,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x9ce04a['suppressUsage']&&(console[_0x43cddf(0xcb)](_0x43cddf(0xd8)),_0xf00eed==='opencode'?console['log'](_0x1b8809['WbSil']):console[_0x43cddf(0xcb)](_0x1b8809[_0x43cddf(0xc6)]));}else console['log'](_0x43cddf(0xcd));}
1
+ (function(_0x5254c8,_0x7b1eda){const _0x15a220=_0x4f32,_0x987136=_0x5254c8();while(!![]){try{const _0x11112f=parseInt(_0x15a220(0x173))/0x1+parseInt(_0x15a220(0x191))/0x2+parseInt(_0x15a220(0x192))/0x3+parseInt(_0x15a220(0x198))/0x4*(-parseInt(_0x15a220(0x18c))/0x5)+parseInt(_0x15a220(0x178))/0x6*(-parseInt(_0x15a220(0x17f))/0x7)+parseInt(_0x15a220(0x179))/0x8*(-parseInt(_0x15a220(0x174))/0x9)+-parseInt(_0x15a220(0x18a))/0xa;if(_0x11112f===_0x7b1eda)break;else _0x987136['push'](_0x987136['shift']());}catch(_0x3a7581){_0x987136['push'](_0x987136['shift']());}}}(_0x1daf,0x47200));import{basename}from'path';import _0x15b700 from'inquirer';function _0x4f32(_0x196f05,_0x1bfe9f){_0x196f05=_0x196f05-0x16c;const _0x1dafe0=_0x1daf();let _0x4f32df=_0x1dafe0[_0x196f05];return _0x4f32df;}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x3df439={}){const _0x53b0d8=_0x4f32,_0x32711b={'CaOop':_0x53b0d8(0x18e),'kmfKL':'To\x20get\x20started:','TZZUo':_0x53b0d8(0x187),'MdHZK':function(_0x5133c4,_0x50ff41){return _0x5133c4===_0x50ff41;},'tiBzk':_0x53b0d8(0x193),'PDSyy':'✓\x20Found\x20API\x20token','FLzQH':function(_0x541a30){return _0x541a30();},'czqXE':function(_0x23064a,_0x477563){return _0x23064a(_0x477563);},'ptNvg':function(_0x4eba6f,_0x323aa8){return _0x4eba6f===_0x323aa8;},'TvdUI':_0x53b0d8(0x176),'udvUc':function(_0x1fd7c6){return _0x1fd7c6();},'pcbHs':_0x53b0d8(0x16c),'uDQls':_0x53b0d8(0x18b),'lQYsh':_0x53b0d8(0x180),'xMxRS':function(_0x48452a,_0x3d8a8e){return _0x48452a instanceof _0x3d8a8e;},'ckfjz':_0x53b0d8(0x17a),'wiKvo':function(_0x2023d5,_0x500923){return _0x2023d5>_0x500923;},'EZmMn':_0x53b0d8(0x184)};console[_0x53b0d8(0x175)](_0x53b0d8(0x186));const _0x46a157=_0x3df439['platform']??_0x53b0d8(0x185),_0x5084cd=await getToken();if(!_0x5084cd){console['log'](_0x32711b['CaOop']),console['log'](_0x32711b[_0x53b0d8(0x17e)]),console[_0x53b0d8(0x175)]('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli'),console['log'](_0x53b0d8(0x16f)+(_0x46a157===_0x32711b[_0x53b0d8(0x17d)]?_0x53b0d8(0x193):'')+'\x20<your-api-token>'),console[_0x53b0d8(0x175)](_0x53b0d8(0x197)+(_0x32711b['MdHZK'](_0x46a157,'opencode')?_0x32711b[_0x53b0d8(0x195)]:'')+'\x0a');return;}console[_0x53b0d8(0x175)](_0x32711b[_0x53b0d8(0x190)]);const _0x42eb49=_0x32711b['FLzQH'](getProjectRoot),_0x46d0ec=_0x32711b[_0x53b0d8(0x16e)](basename,_0x42eb49),_0x277e3a=_0x32711b[_0x53b0d8(0x182)](_0x46a157,'opencode')?getOpencodeConfigDir(_0x32711b['TvdUI'])+'/skills/':_0x32711b[_0x53b0d8(0x181)](getClaudeConfigDir)+'/skills/',_0x45a9ca=_0x32711b[_0x53b0d8(0x182)](_0x46a157,_0x32711b[_0x53b0d8(0x17d)])?_0x42eb49+_0x53b0d8(0x172):_0x42eb49+_0x53b0d8(0x188),_0x54afb8=process[_0x53b0d8(0x170)]['isTTY']&&process['stdout']['isTTY'];let _0x533a8d;if(_0x3df439['autoInstall'])_0x533a8d=_0x3df439['autoInstall'];else{if(_0x54afb8){const _0x5e68ce=await _0x15b700[_0x53b0d8(0x16d)]([{'type':'list','name':_0x32711b['pcbHs'],'message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':'All\x20projects\x20('+_0x277e3a+')','value':_0x32711b[_0x53b0d8(0x17b)]},{'name':_0x53b0d8(0x196)+_0x45a9ca+')','value':_0x32711b['uDQls']}]}]);_0x533a8d=_0x5e68ce['installLevel'];}else _0x533a8d=_0x32711b['uDQls'],console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x45a9ca+')');}let _0x5dba65=0x0;const _0x246c61=getCurrentVersion();console['log'](_0x32711b['lQYsh']);try{const _0x505028=await installSkill(_0x53b0d8(0x189),{'cliVersion':_0x246c61,'level':_0x533a8d,'platform':_0x46a157});_0x505028&&_0x5dba65++;}catch(_0x14c0a3){console[_0x53b0d8(0x171)]('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x32711b[_0x53b0d8(0x18d)](_0x14c0a3,Error)?_0x14c0a3['message']:_0x14c0a3);}if(_0x5dba65>0x0){const _0x4ae1d6=_0x533a8d===_0x53b0d8(0x176)?_0x32711b['ckfjz']:_0x53b0d8(0x183);console[_0x53b0d8(0x175)](_0x53b0d8(0x194)+_0x5dba65+'\x20'+_0x4ae1d6+'\x20skill'+(_0x32711b['wiKvo'](_0x5dba65,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x3df439['suppressUsage']&&(console['log'](_0x53b0d8(0x177)),_0x46a157===_0x53b0d8(0x187)?console['log'](_0x32711b['EZmMn']):console['log'](_0x53b0d8(0x18f)));}else console[_0x53b0d8(0x175)](_0x53b0d8(0x17c));}function _0x1daf(){const _0x3eacb7=['ptNvg','project-level','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','claude','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','opencode','/.claude/skills/','ranger','1308710zjAjTp','project','1260eJwnOn','xMxRS','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','\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!','PDSyy','1097478LMLywM','167595phFPRg','\x20--opencode','\x0a✅\x20Installed\x20','tiBzk','This\x20project\x20only\x20(','\x20\x203.\x20Run:\x20ranger\x20skillup','2224kSMYNE','installLevel','prompt','czqXE','\x20\x202.\x20Run:\x20ranger\x20setup','stdin','warn','/.opencode/skills/','245095UGJnNn','120735KfdUhG','log','user','To\x20use:','12354YVFALY','40DagScH','user-level','TvdUI','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','TZZUo','kmfKL','749tSvGSf','\x0a📦\x20Installing\x20skills...\x0a','udvUc'];_0x1daf=function(){return _0x3eacb7;};return _0x1daf();}
@@ -1 +1 @@
1
- const _0x5c815d=_0x120c;function _0x4a17(){const _0x4ce0eb=['skipped','error','ranger\x20setup\x20--scope=','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','qfehf','jjqHl','194078JBsHWe','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','xBtmt','EiSep','SGfeY','ntBQA','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','local','\x1b[0m','provided_token','✓\x20Created\x20.ranger/.gitignore','success','method','playwright@','smLCn','fMsgz','status','confirm','14113880fWAtVb','✓\x20Created\x20~/.ranger/\x20directory','close','allowInsecureLocalhost','stdout','user','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','1965esbnAY','354408lMhhpt','nRkcD','You\x20can\x20install\x20it\x20manually\x20by\x20running:','chromium','skipAuth','gtfve','win32','opencode','✓\x20Authenticated\x20to\x20','MOtVQ','platform','prompt','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','TRbBM','existing_token','2568843XxXHnz','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','log','37540pscOXq','organizationName','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','trackPhaseEnd','warn','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','✓\x20Already\x20authenticated\x20to\x20','url','Authentication\x20failed:\x20','SotDK','7EdzaIF','withDeps','VgWfs','\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','pZnIV','LPtVe','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','Installation\x20failed\x20with\x20exit\x20code\x20','BpTPH','\x20install\x20chromium','XLSQg','profile','neFQR','The\x20required\x20version\x20(','skipChromium','stdin','skills','SsNVQ','bxKox',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','RYdTi','ranger','env','cQkLD','trackPhaseStart','message','9704kaKgLh','scope','\x20\x20npx\x20playwright@','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','SKKgQ','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','SZHaF','inherit','1304166fePndI','✓\x20Playwright\x20Chromium\x20browser\x20found','ZVunV','vqJRi','wqLbE','432sLWlPo','28zCQJVl','...','ranger\x20profile\x20add\x20<name>','1.58.2','XsWIj'];_0x4a17=function(){return _0x4ce0eb;};return _0x4a17();}(function(_0x37191e,_0x344ffc){const _0x1dc339=_0x120c,_0x127292=_0x37191e();while(!![]){try{const _0x20f4b0=-parseInt(_0x1dc339(0x167))/0x1*(parseInt(_0x1dc339(0x130))/0x2)+parseInt(_0x1dc339(0x159))/0x3+-parseInt(_0x1dc339(0x183))/0x4*(-parseInt(_0x1dc339(0x149))/0x5)+parseInt(_0x1dc339(0x11f))/0x6*(parseInt(_0x1dc339(0x125))/0x7)+parseInt(_0x1dc339(0x14a))/0x8+-parseInt(_0x1dc339(0x124))/0x9*(parseInt(_0x1dc339(0x15c))/0xa)+-parseInt(_0x1dc339(0x142))/0xb;if(_0x20f4b0===_0x344ffc)break;else _0x127292['push'](_0x127292['shift']());}catch(_0x5bcf0f){_0x127292['push'](_0x127292['shift']());}}}(_0x4a17,0x8dd23));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';function _0x120c(_0x11b88c,_0x2fcf38){_0x11b88c=_0x11b88c-0x11e;const _0x4a177b=_0x4a17();let _0x120c0b=_0x4a177b[_0x11b88c];return _0x120c0b;}import _0x507a7e from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x5c815d(0x128);const bold=_0x457cad=>'\x1b[1m'+_0x457cad+_0x5c815d(0x138);export function getPlaywrightVersion(){const _0x12e951={'xGhSj':'playwright/package.json'};try{const _0x4bebe5=require['resolve'](_0x12e951['xGhSj']),_0x35d95e=require(_0x4bebe5);return _0x35d95e['version'];}catch{return null;}}export function installChromiumBinary(_0xe29345,_0x23ea1f=![]){const _0x211d77=_0x5c815d,_0x50178e={'qJGLp':function(_0x2bf60a,_0x76436f){return _0x2bf60a(_0x76436f);},'fzmKy':function(_0x466a9f,_0x3f5541,_0x3a9a01,_0xe95fd8){return _0x466a9f(_0x3f5541,_0x3a9a01,_0xe95fd8);},'xQUXU':'ignore','jjqHl':_0x211d77(0x11e),'lMHOo':function(_0x975044,_0x13021e){return _0x975044===_0x13021e;},'SGfeY':'error'};return new Promise((_0x4f0e25,_0x53ce9e)=>{const _0x9fa192=_0x211d77,_0x533b65={'SotDK':function(_0x5bec48,_0x471d38){return _0x50178e['qJGLp'](_0x5bec48,_0x471d38);}},_0x1ef349=[_0x9fa192(0x13d)+_0xe29345,'install',..._0x23ea1f?['--with-deps']:[],_0x9fa192(0x14d)],_0x110df7=_0x50178e['fzmKy'](spawn,'npx',_0x1ef349,{'stdio':[_0x50178e['xQUXU'],'inherit',_0x50178e[_0x9fa192(0x12f)]],'shell':_0x50178e['lMHOo'](process[_0x9fa192(0x154)],_0x9fa192(0x150))});_0x110df7['on'](_0x9fa192(0x144),_0x9ac133=>{const _0x4055c7=_0x9fa192;_0x9ac133===0x0?_0x4f0e25():_0x533b65[_0x4055c7(0x166)](_0x53ce9e,new Error(_0x4055c7(0x170)+_0x9ac133));}),_0x110df7['on'](_0x50178e[_0x9fa192(0x134)],_0x207039=>{_0x53ce9e(_0x207039);});});}export async function authenticate(_0x3253be){const _0x5c2a50=_0x5c815d,_0x1fce00={'yHKSU':function(_0x466dd1){return _0x466dd1();},'XLSQg':function(_0xaabf0b,_0x52347d){return _0xaabf0b(_0x52347d);},'XPRrN':function(_0x1aa8a6){return _0x1aa8a6();},'EBRfb':'✓\x20Exported\x20credentials\x20for\x20CI','BpTPH':'✓\x20Stored\x20credentials\x20locally','MOtVQ':_0x5c2a50(0x139)};if(!_0x3253be){const _0x18297a=await _0x1fce00['yHKSU'](getToken);if(_0x18297a){const _0x1bd2bf=await _0x1fce00[_0x5c2a50(0x173)](getCurrentUser,_0x18297a);if(_0x1bd2bf[_0x5c2a50(0x13b)])return console[_0x5c2a50(0x15b)](_0x5c2a50(0x163)+_0x1bd2bf[_0x5c2a50(0x147)][_0x5c2a50(0x15d)]),{'token':_0x18297a,'method':_0x5c2a50(0x158)};}try{_0x3253be=await _0x1fce00['XPRrN'](runDeviceAuthFlow);}catch(_0x3790bb){throw new Error('Authentication\x20failed:\x20'+(_0x3790bb instanceof Error?_0x3790bb['message']:_0x3790bb));}const _0x41c356=await getCurrentUser(_0x3253be);if(!_0x41c356[_0x5c2a50(0x13b)])throw new Error(_0x5c2a50(0x16d)+_0x41c356['error']);return console['log'](_0x5c2a50(0x152)+_0x41c356['user'][_0x5c2a50(0x15d)]),{'token':_0x3253be,'method':'device_auth'};}console[_0x5c2a50(0x15b)]('Validating\x20API\x20token...');const _0x117158=await getCurrentUser(_0x3253be);if(!_0x117158[_0x5c2a50(0x13b)]){if(_0x117158[_0x5c2a50(0x140)])throw new Error(_0x5c2a50(0x165)+_0x117158['error']+_0x5c2a50(0x12d));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x117158[_0x5c2a50(0x12b)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console['log'](_0x5c2a50(0x152)+_0x117158['user']['organizationName']),await storeToken(_0x3253be),console['log'](process[_0x5c2a50(0x17f)]['GITHUB_ENV']?_0x1fce00['EBRfb']:_0x1fce00[_0x5c2a50(0x171)]),{'token':_0x3253be,'method':_0x1fce00[_0x5c2a50(0x153)]};}export async function ensureRangerDir(_0x5c66f8){const _0x3c8a48=_0x5c815d,_0x144504={'xqGde':function(_0x232493,_0x572fc1){return _0x232493(_0x572fc1);},'SsNVQ':_0x3c8a48(0x143),'pZnIV':'✓\x20~/.ranger/\x20directory\x20already\x20exists'};void _0x5c66f8;const _0x55b8c9=getRangerHomeDir();return!_0x144504['xqGde'](existsSync,_0x55b8c9)?(await mkdir(_0x55b8c9,{'recursive':!![]}),console['log'](_0x144504[_0x3c8a48(0x17a)]),{'path':_0x55b8c9,'installed':!![]}):(console[_0x3c8a48(0x15b)](_0x144504[_0x3c8a48(0x16b)]),{'path':_0x55b8c9,'installed':![]});}export async function ensureChromium(_0x2464d2=![]){const _0xe17d50=_0x5c815d,_0x2f78ab={'EEvtp':function(_0x4c35cf,_0x5e0001){return _0x4c35cf(_0x5e0001);},'XsWIj':'install','bxKox':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','nRkcD':function(_0x1449cd,_0x539b0e){return _0x1449cd instanceof _0x539b0e;}};let _0x20d281=![];try{const _0xa01c04=chromium['executablePath']();_0x20d281=_0x2f78ab['EEvtp'](existsSync,_0xa01c04);}catch{_0x20d281=![];}if(_0x20d281)return console[_0xe17d50(0x15b)](_0xe17d50(0x120)),![];const _0x1644b6=getPlaywrightVersion(),_0x30a2a7=_0x1644b6??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x26d4de=!_0x1644b6,_0x102623=process[_0xe17d50(0x178)]['isTTY']&&process[_0xe17d50(0x146)]['isTTY'];let _0x4539f3=!![];if(_0x102623){const {install:_0x1e1cc8}=await _0x507a7e[_0xe17d50(0x155)]([{'type':_0xe17d50(0x141),'name':_0x2f78ab[_0xe17d50(0x129)],'message':_0x26d4de?_0xe17d50(0x188)+_0x30a2a7+'\x20now?':_0xe17d50(0x176)+_0x30a2a7+_0xe17d50(0x17c),'default':!![]}]);_0x4539f3=_0x1e1cc8;}else console['log'](_0xe17d50(0x186)+_0x30a2a7+(_0x26d4de?'\x20(fallback\x20version)':'')+_0xe17d50(0x126));if(_0x4539f3){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x30a2a7,_0x2464d2),console['log'](_0xe17d50(0x162));}catch(_0x293193){console['error'](_0x2f78ab[_0xe17d50(0x17b)],_0x2f78ab[_0xe17d50(0x14b)](_0x293193,Error)?_0x293193[_0xe17d50(0x182)]:_0x293193),console[_0xe17d50(0x15b)](_0xe17d50(0x14c)),console[_0xe17d50(0x15b)](_0xe17d50(0x185)+_0x30a2a7+_0xe17d50(0x172));}}else console[_0xe17d50(0x15b)]('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console[_0xe17d50(0x15b)](_0xe17d50(0x156)),console[_0xe17d50(0x15b)](_0xe17d50(0x185)+_0x30a2a7+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x3e9cb9){const _0x18a362=_0x5c815d,_0x5ac570={'sURgV':_0x18a362(0x13a)},_0x778407=join(_0x3e9cb9,'.gitignore'),_0x2565a8=_0x18a362(0x16a);await writeFile(_0x778407,_0x2565a8),console['log'](_0x5ac570['sURgV']);}export async function ensureLocalEnv(_0x107166,_0x14b47d){const _0x153d5d=_0x5c815d,_0x32eacf={'ntBQA':function(_0x699f51){return _0x699f51();},'cQkLD':_0x153d5d(0x147),'RYdTi':_0x153d5d(0x137),'ADfjE':'✓\x20Local\x20profile\x20already\x20exists','LPtVe':function(_0x14a3f3,_0x1ef60c,_0x582335,_0x7486f1){return _0x14a3f3(_0x1ef60c,_0x582335,_0x7486f1);},'hqgrR':'\x0a❌\x20Profile\x20setup\x20failed:','vstxf':function(_0x25e2fd,_0x53dbd9){return _0x25e2fd instanceof _0x53dbd9;}};if(!_0x32eacf[_0x153d5d(0x135)](findGitRoot)&&_0x107166?.['scope']!==_0x32eacf[_0x153d5d(0x180)])return console[_0x153d5d(0x15b)](_0x153d5d(0x15e)),{'ready':![],'skipped':!![]};const _0x5c30dc=_0x107166?.[_0x153d5d(0x184)]===_0x32eacf['cQkLD']?getRangerHomeDir():undefined;if(findExistingEnv('local',{'locations':[_0x32eacf[_0x153d5d(0x17d)]],'rangerDir':_0x5c30dc}))return console[_0x153d5d(0x15b)](_0x32eacf['ADfjE']),{'ready':!![],'skipped':![]};try{return await _0x32eacf[_0x153d5d(0x16c)](addEnv,_0x153d5d(0x137),{'url':_0x107166?.[_0x153d5d(0x164)],'force':_0x107166?.['force'],'allowInsecureLocalhost':_0x107166?.['allowInsecureLocalhost'],'scope':_0x107166?.['scope']},_0x14b47d),{'ready':!![],'skipped':![]};}catch(_0xfd2a17){return console['error'](_0x32eacf['hqgrR'],_0x32eacf['vstxf'](_0xfd2a17,Error)?_0xfd2a17['message']:_0xfd2a17),{'ready':![],'skipped':![]};}}export async function start(_0x4a550d,_0x2d000b,_0x490d17){const _0x85c81f=_0x5c815d,_0x56f4eb={'ZEWVt':function(_0x50729e,_0x1d0b53){return _0x50729e!==_0x1d0b53;},'vqJRi':function(_0x590eee,_0x1e7e63){return _0x590eee+_0x1e7e63;},'smLCn':function(_0x2b4421,_0x23af12){return _0x2b4421(_0x23af12);},'fMsgz':function(_0x42df65){return _0x42df65();},'gtfve':'auth','WdVRs':_0x85c81f(0x12a),'qfehf':_0x85c81f(0x14d),'kxJsr':_0x85c81f(0x136),'neFQR':'plugin','SKKgQ':function(_0x2803b5,_0x593785){return _0x2803b5&&_0x593785;},'mikla':_0x85c81f(0x179),'SZHaF':function(_0x458613){return _0x458613();},'ICsct':_0x85c81f(0x151),'JifGp':function(_0x3b7b12,_0x122cb2){return _0x3b7b12(_0x122cb2);},'fjhli':_0x85c81f(0x174),'VgWfs':function(_0x3d2e07,_0x5b84d2,_0x518c46){return _0x3d2e07(_0x5b84d2,_0x518c46);},'wqLbE':_0x85c81f(0x147),'EiSep':function(_0x32c69a,_0x40f9f0){return _0x32c69a+_0x40f9f0;},'ZVunV':function(_0x8f26be,_0x2b508f){return _0x8f26be(_0x2b508f);},'YnTqM':_0x85c81f(0x127),'TRbBM':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','gOiBS':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','xBtmt':function(_0x42873f,_0x517c4a){return _0x42873f+_0x517c4a;}};console[_0x85c81f(0x15b)]('\x0a🚀\x20Ranger\x20Setup\x0a');_0x2d000b?.['scope']!==undefined&&_0x56f4eb['ZEWVt'](_0x2d000b['scope'],'user')&&(console[_0x85c81f(0x12b)](_0x56f4eb['vqJRi'](_0x85c81f(0x12c)+_0x56f4eb[_0x85c81f(0x13e)](String,_0x2d000b['scope'])+'\x20is\x20no\x20longer\x20supported.\x20','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20')+_0x85c81f(0x16f)),process['exit'](0x1));_0x2d000b={..._0x2d000b,'scope':'user'};const _0x4379b5=!_0x56f4eb[_0x85c81f(0x13e)](existsSync,_0x56f4eb[_0x85c81f(0x13f)](getRangerHomeDir));await ensureRangerDir(_0x85c81f(0x147));if(_0x2d000b?.[_0x85c81f(0x14e)])console[_0x85c81f(0x15b)]('✓\x20Skipping\x20authentication\x20(--skip-auth)'),_0x490d17?.[_0x85c81f(0x160)](_0x56f4eb['gtfve'],{'isFirstRun':_0x4379b5,'method':_0x56f4eb['WdVRs']});else{_0x490d17?.[_0x85c81f(0x181)](_0x56f4eb[_0x85c81f(0x14f)]);const _0x51ca30=await authenticate(_0x4a550d);_0x490d17?.['trackPhaseEnd']('auth',{'isFirstRun':_0x4379b5,'method':_0x51ca30[_0x85c81f(0x13c)]});}_0x490d17?.[_0x85c81f(0x181)](_0x56f4eb[_0x85c81f(0x12e)]);_0x2d000b?.[_0x85c81f(0x177)]?console['log'](_0x56f4eb['kxJsr']):await ensureChromium(_0x2d000b?.[_0x85c81f(0x168)]);_0x490d17?.['trackPhaseEnd'](_0x56f4eb['qfehf'],{'isFirstRun':_0x4379b5,'skipped':!!_0x2d000b?.['skipChromium']}),console[_0x85c81f(0x15b)](_0x85c81f(0x16e));const _0x5e0bf0=_0x2d000b?.[_0x85c81f(0x184)],_0x2119d1=_0x2d000b?.[_0x85c81f(0x151)]??![];let _0x26df8b=null;_0x2119d1?(_0x490d17?.['trackPhaseStart'](_0x56f4eb[_0x85c81f(0x175)]),_0x26df8b=await _0x56f4eb[_0x85c81f(0x13e)](ensureOpencodePluginConfig,_0x5e0bf0),_0x490d17?.['trackPhaseEnd'](_0x56f4eb['neFQR'],{'isFirstRun':_0x4379b5,'opencode':!![]})):(_0x490d17?.[_0x85c81f(0x181)]('plugin'),await ensureClaudePlugin(_0x5e0bf0),_0x490d17?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x4379b5}));if(_0x56f4eb[_0x85c81f(0x187)](_0x2119d1,_0x26df8b)){_0x490d17?.['trackPhaseStart'](_0x56f4eb['mikla']);try{await installSkill(_0x85c81f(0x17e),{'level':_0x26df8b[_0x85c81f(0x184)],'cliVersion':_0x56f4eb[_0x85c81f(0x189)](getCurrentVersion),'platform':_0x56f4eb['ICsct']}),_0x490d17?.['trackPhaseEnd'](_0x56f4eb['mikla'],{'isFirstRun':_0x4379b5,'opencode':!![]});}catch(_0x69e5e2){console[_0x85c81f(0x161)](_0x85c81f(0x148),_0x69e5e2 instanceof Error?_0x69e5e2[_0x85c81f(0x182)]:_0x69e5e2),_0x490d17?.['trackPhaseEnd'](_0x85c81f(0x179),{'isFirstRun':_0x4379b5,'opencode':!![],'failed':!![]});}}else _0x490d17?.[_0x85c81f(0x181)]('skills'),await _0x56f4eb['JifGp'](ensureClaudeSkills,_0x5e0bf0),_0x490d17?.['trackPhaseEnd']('skills',{'isFirstRun':_0x4379b5});if(_0x2d000b?.['skipAuth'])console[_0x85c81f(0x15b)](_0x85c81f(0x15a));else{if(_0x2d000b?.[_0x85c81f(0x164)]){_0x490d17?.[_0x85c81f(0x181)](_0x56f4eb['fjhli']);const _0x179dbc=await _0x56f4eb[_0x85c81f(0x169)](ensureLocalEnv,{'url':_0x2d000b['url'],'force':_0x2d000b?.['force'],'allowInsecureLocalhost':_0x2d000b?.[_0x85c81f(0x145)],'scope':_0x56f4eb[_0x85c81f(0x123)]},_0x490d17);_0x490d17?.[_0x85c81f(0x160)](_0x85c81f(0x174),{'isFirstRun':_0x4379b5,'profileReady':_0x179dbc['ready'],'userSkipped':_0x179dbc[_0x85c81f(0x12a)]});}else console['log'](_0x56f4eb['vqJRi'](_0x56f4eb[_0x85c81f(0x133)]('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+('\x0a\x20\x20'+_0x56f4eb[_0x85c81f(0x121)](bold,_0x56f4eb['YnTqM'])),_0x85c81f(0x131))+'\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles'));}if(_0x2119d1)console[_0x85c81f(0x15b)](_0x56f4eb[_0x85c81f(0x157)]),console['log']('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console['log'](_0x56f4eb['gOiBS']),console[_0x85c81f(0x15b)]('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x25f150=_0x56f4eb['ZVunV'](bold,'/ranger:enable');console[_0x85c81f(0x15b)](_0x56f4eb[_0x85c81f(0x122)](_0x56f4eb[_0x85c81f(0x132)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x25f150+'\x20and\x20prompt\x20the\x20coding','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'),_0x85c81f(0x15f))+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
1
+ const _0xe9931d=_0x5adf;(function(_0x115024,_0x1a2f10){const _0x2f2f8a=_0x5adf,_0x410b6d=_0x115024();while(!![]){try{const _0x2878ff=parseInt(_0x2f2f8a(0x1c8))/0x1*(-parseInt(_0x2f2f8a(0x19e))/0x2)+parseInt(_0x2f2f8a(0x194))/0x3*(parseInt(_0x2f2f8a(0x16b))/0x4)+-parseInt(_0x2f2f8a(0x172))/0x5+-parseInt(_0x2f2f8a(0x173))/0x6+parseInt(_0x2f2f8a(0x17b))/0x7*(parseInt(_0x2f2f8a(0x178))/0x8)+parseInt(_0x2f2f8a(0x1c9))/0x9+parseInt(_0x2f2f8a(0x197))/0xa*(parseInt(_0x2f2f8a(0x1a3))/0xb);if(_0x2878ff===_0x1a2f10)break;else _0x410b6d['push'](_0x410b6d['shift']());}catch(_0x67abc6){_0x410b6d['push'](_0x410b6d['shift']());}}}(_0xaae9,0x6e663));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x4ca0b8 from'inquirer';function _0x5adf(_0x27ca92,_0x33171c){_0x27ca92=_0x27ca92-0x169;const _0xaae9f8=_0xaae9();let _0x5adfac=_0xaae9f8[_0x27ca92];return _0x5adfac;}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';function _0xaae9(){const _0x429c40=['TPjbV','\x20install\x20chromium','✓\x20Local\x20profile\x20already\x20exists','url','1ryHYhN','6363045hiCniy','UefQH','local','success','4JIYrpZ','auth','iwuCq','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','1.58.2','iUcHz','\x0a⚠\x20Skipping\x20Chromium\x20installation.','1370845kSBUGD','4671222NnABOe','inherit','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','PaGaV','557616GzBWkp','provided_token','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','21sPXmdK','force','playwright@','eLnQn','prompt','status','trackPhaseStart','\x0a❌\x20Profile\x20setup\x20failed:','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','--with-deps','Sspbk','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','The\x20required\x20version\x20(','\x1b[0m','GITHUB_ENV','TIHmt','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','organizationName','skipAuth','error','chromium','Authentication\x20failed:\x20','brAgC','ready','GEFvd','734259OKWKBI','JCUYQ','trackPhaseEnd','15910dcFQNg','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','.gitignore','rELvb','lkpMi','allowInsecureLocalhost','skipChromium','231524VJbtOI','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','TdQLF','XxRqY','3179ppfDma','taRcT','KulIr','withDeps','scope','user','platform','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','message','You\x20can\x20install\x20it\x20manually\x20by\x20running:','log','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','fdlBN','\x20now?','\x20and\x20prompt\x20the\x20coding','Validating\x20API\x20token...','✓\x20Authenticated\x20to\x20','xyKPe','FpzdQ','install','GEWeA','plugin','ignore','PQRNj','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','ranger','szcQm','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','\x1b[1m','\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','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','version','profile'];_0xaae9=function(){return _0x429c40;};return _0xaae9();}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=_0xe9931d(0x16f);const bold=_0x5b3bf3=>_0xe9931d(0x1bf)+_0x5b3bf3+_0xe9931d(0x188);export function getPlaywrightVersion(){const _0x3d0136=_0xe9931d;try{const _0x13c5bc=require['resolve']('playwright/package.json'),_0x2142e7=require(_0x13c5bc);return _0x2142e7[_0x3d0136(0x1c2)];}catch{return null;}}export function installChromiumBinary(_0x8e02b9,_0x14d6ce=![]){const _0x41e31d=_0xe9931d,_0x39c8ce={'desaT':_0x41e31d(0x1b6),'tChFM':_0x41e31d(0x184),'xMxvW':function(_0x1425d3,_0x3b6e52,_0x51230f,_0x7f1331){return _0x1425d3(_0x3b6e52,_0x51230f,_0x7f1331);},'GEFvd':'npx','iUcHz':_0x41e31d(0x1b9),'aMBMH':function(_0x1336f3,_0x343cd5){return _0x1336f3===_0x343cd5;},'lkpMi':_0x41e31d(0x18e)};return new Promise((_0x49e726,_0x592b69)=>{const _0xe891a4=_0x41e31d,_0x37608e=[_0xe891a4(0x17d)+_0x8e02b9,_0x39c8ce['desaT'],..._0x14d6ce?[_0x39c8ce['tChFM']]:[],'chromium'],_0xd27c4d=_0x39c8ce['xMxvW'](spawn,_0x39c8ce[_0xe891a4(0x193)],_0x37608e,{'stdio':[_0x39c8ce[_0xe891a4(0x170)],'inherit',_0xe891a4(0x174)],'shell':_0x39c8ce['aMBMH'](process[_0xe891a4(0x1a9)],'win32')});_0xd27c4d['on']('close',_0xf99c8c=>{_0xf99c8c===0x0?_0x49e726():_0x592b69(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0xf99c8c));}),_0xd27c4d['on'](_0x39c8ce[_0xe891a4(0x19b)],_0x58ac38=>{_0x592b69(_0x58ac38);});});}export async function authenticate(_0x34ac96){const _0x16644f=_0xe9931d,_0x193e3f={'ZNtYr':function(_0x213cf1){return _0x213cf1();},'RybGi':'existing_token','UfcAf':function(_0x213594,_0x33f69d){return _0x213594 instanceof _0x33f69d;},'awhlC':_0x16644f(0x1b2),'fZLNE':function(_0x4caf66,_0x17312e){return _0x4caf66(_0x17312e);},'zXvFC':'✓\x20Exported\x20credentials\x20for\x20CI','PaGaV':'✓\x20Stored\x20credentials\x20locally'};if(!_0x34ac96){const _0x52ab47=await _0x193e3f['ZNtYr'](getToken);if(_0x52ab47){const _0x3e4eaa=await getCurrentUser(_0x52ab47);if(_0x3e4eaa['success'])return console[_0x16644f(0x1ad)]('✓\x20Already\x20authenticated\x20to\x20'+_0x3e4eaa['user']['organizationName']),{'token':_0x52ab47,'method':_0x193e3f['RybGi']};}try{_0x34ac96=await runDeviceAuthFlow();}catch(_0x489c78){throw new Error(_0x16644f(0x190)+(_0x193e3f['UfcAf'](_0x489c78,Error)?_0x489c78[_0x16644f(0x1ab)]:_0x489c78));}const _0x1c5180=await getCurrentUser(_0x34ac96);if(!_0x1c5180[_0x16644f(0x16a)])throw new Error(_0x16644f(0x19f)+_0x1c5180['error']);return console[_0x16644f(0x1ad)]('✓\x20Authenticated\x20to\x20'+_0x1c5180['user'][_0x16644f(0x18c)]),{'token':_0x34ac96,'method':'device_auth'};}console['log'](_0x193e3f['awhlC']);const _0x4f6aa6=await getCurrentUser(_0x34ac96);if(!_0x4f6aa6[_0x16644f(0x16a)]){if(_0x4f6aa6[_0x16644f(0x180)])throw new Error(_0x16644f(0x190)+_0x4f6aa6['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0x16644f(0x1be)+_0x4f6aa6[_0x16644f(0x18e)]+_0x16644f(0x1a0));}return console[_0x16644f(0x1ad)](_0x16644f(0x1b3)+_0x4f6aa6[_0x16644f(0x1a8)][_0x16644f(0x18c)]),await _0x193e3f['fZLNE'](storeToken,_0x34ac96),console[_0x16644f(0x1ad)](process['env'][_0x16644f(0x189)]?_0x193e3f['zXvFC']:_0x193e3f[_0x16644f(0x177)]),{'token':_0x34ac96,'method':_0x16644f(0x179)};}export async function ensureRangerDir(_0x1200dd){const _0x5aa2f2=_0xe9931d,_0x34e63f={'EcVxW':'✓\x20Created\x20~/.ranger/\x20directory'};void _0x1200dd;const _0x402a94=getRangerHomeDir();return!existsSync(_0x402a94)?(await mkdir(_0x402a94,{'recursive':!![]}),console[_0x5aa2f2(0x1ad)](_0x34e63f['EcVxW']),{'path':_0x402a94,'installed':!![]}):(console['log']('✓\x20~/.ranger/\x20directory\x20already\x20exists'),{'path':_0x402a94,'installed':![]});}export async function ensureChromium(_0x54860b=![]){const _0x529ea0=_0xe9931d,_0x37c39e={'jqNLx':function(_0x37eb37,_0xae1ef7){return _0x37eb37??_0xae1ef7;},'pHQex':'confirm','bnNPJ':'install','gdKDJ':'\x20(fallback\x20version)','Sspbk':_0x529ea0(0x198),'MsKFQ':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','xMrSv':function(_0x2bc99f,_0x17f89){return _0x2bc99f instanceof _0x17f89;}};let _0x5cb9f9=![];try{const _0x3d3a8b=chromium['executablePath']();_0x5cb9f9=existsSync(_0x3d3a8b);}catch{_0x5cb9f9=![];}if(_0x5cb9f9)return console['log']('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x59d9bd=getPlaywrightVersion(),_0x5e5021=_0x37c39e['jqNLx'](_0x59d9bd,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0xbabbc9=!_0x59d9bd,_0x3f4ca9=process['stdin']['isTTY']&&process['stdout']['isTTY'];let _0x383a73=!![];if(_0x3f4ca9){const {install:_0x4678cf}=await _0x4ca0b8[_0x529ea0(0x17f)]([{'type':_0x37c39e['pHQex'],'name':_0x37c39e['bnNPJ'],'message':_0xbabbc9?_0x529ea0(0x1ae)+_0x5e5021+_0x529ea0(0x1b0):_0x529ea0(0x187)+_0x5e5021+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x383a73=_0x4678cf;}else console[_0x529ea0(0x1ad)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x5e5021+(_0xbabbc9?_0x37c39e['gdKDJ']:'')+'...');if(_0x383a73){console[_0x529ea0(0x1ad)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x5e5021,_0x54860b),console[_0x529ea0(0x1ad)](_0x37c39e[_0x529ea0(0x185)]);}catch(_0x1ba8a6){console['error'](_0x37c39e['MsKFQ'],_0x37c39e['xMrSv'](_0x1ba8a6,Error)?_0x1ba8a6[_0x529ea0(0x1ab)]:_0x1ba8a6),console[_0x529ea0(0x1ad)](_0x529ea0(0x1ac)),console['log']('\x20\x20npx\x20playwright@'+_0x5e5021+_0x529ea0(0x1c5));}}else console['log'](_0x529ea0(0x171)),console[_0x529ea0(0x1ad)](_0x529ea0(0x186)),console['log']('\x20\x20npx\x20playwright@'+_0x5e5021+_0x529ea0(0x1c5));return!![];}export async function writeRangerGitignore(_0x3f1111){const _0x48cfae=_0xe9931d,_0x8b9d57={'PQRNj':'✓\x20Created\x20.ranger/.gitignore'},_0x34df31=join(_0x3f1111,_0x48cfae(0x199)),_0x4090b5=_0x48cfae(0x1c0);await writeFile(_0x34df31,_0x4090b5),console[_0x48cfae(0x1ad)](_0x8b9d57[_0x48cfae(0x1ba)]);}export async function ensureLocalEnv(_0x43e13a,_0x5d735c){const _0x5015f2=_0xe9931d,_0x4f6163={'KulIr':function(_0x573915){return _0x573915();},'XxRqY':function(_0x2326a9,_0x357349){return _0x2326a9!==_0x357349;},'TIHmt':'user','opUTL':function(_0x43329f,_0x3daf81){return _0x43329f===_0x3daf81;},'rbOXI':function(_0x43d5c3,_0x263224,_0x2d5354,_0x5e7d13){return _0x43d5c3(_0x263224,_0x2d5354,_0x5e7d13);},'wuZOy':_0x5015f2(0x169)};if(!_0x4f6163[_0x5015f2(0x1a5)](findGitRoot)&&_0x4f6163[_0x5015f2(0x1a2)](_0x43e13a?.['scope'],_0x4f6163[_0x5015f2(0x18a)]))return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.'),{'ready':![],'skipped':!![]};const _0x42bbd1=_0x4f6163['opUTL'](_0x43e13a?.[_0x5015f2(0x1a7)],_0x5015f2(0x1a8))?getRangerHomeDir():undefined;if(findExistingEnv('local',{'locations':['local'],'rangerDir':_0x42bbd1}))return console['log'](_0x5015f2(0x1c6)),{'ready':!![],'skipped':![]};try{return await _0x4f6163['rbOXI'](addEnv,_0x4f6163['wuZOy'],{'url':_0x43e13a?.[_0x5015f2(0x1c7)],'force':_0x43e13a?.[_0x5015f2(0x17c)],'allowInsecureLocalhost':_0x43e13a?.[_0x5015f2(0x19c)],'scope':_0x43e13a?.[_0x5015f2(0x1a7)]},_0x5d735c),{'ready':!![],'skipped':![]};}catch(_0x3adeae){return console['error'](_0x5015f2(0x182),_0x3adeae instanceof Error?_0x3adeae['message']:_0x3adeae),{'ready':![],'skipped':![]};}}export async function start(_0x4677aa,_0x229652,_0x31dfe3){const _0x7a9910=_0xe9931d,_0x49f58e={'taRcT':function(_0x2fcdca,_0x5109ec){return _0x2fcdca+_0x5109ec;},'GEWeA':function(_0x218a14,_0x4e11b8){return _0x218a14(_0x4e11b8);},'JCUYQ':_0x7a9910(0x1a8),'Lhxcf':function(_0x294a12){return _0x294a12();},'iwuCq':'✓\x20Skipping\x20authentication\x20(--skip-auth)','xyKPe':'skipped','fdlBN':'auth','SuYVO':_0x7a9910(0x1aa),'eLnQn':'chromium','TPjbV':_0x7a9910(0x183),'TdQLF':'plugin','FpzdQ':'skills','brAgC':function(_0x3797c3,_0x2b5d99,_0x4af167){return _0x3797c3(_0x2b5d99,_0x4af167);},'iXHXI':function(_0x12b9bf){return _0x12b9bf();},'rELvb':_0x7a9910(0x17a),'szcQm':function(_0x80609a,_0x7007b1){return _0x80609a+_0x7007b1;},'IvWfq':function(_0x188b40,_0x5499c5){return _0x188b40+_0x5499c5;},'UefQH':function(_0x575b82,_0x3f4642){return _0x575b82(_0x3f4642);},'UODzf':function(_0x3eb838,_0x37ff4b){return _0x3eb838+_0x37ff4b;}};console[_0x7a9910(0x1ad)]('\x0a🚀\x20Ranger\x20Setup\x0a');_0x229652?.[_0x7a9910(0x1a7)]!==undefined&&_0x229652['scope']!=='user'&&(console['error'](_0x49f58e[_0x7a9910(0x1a4)]('ranger\x20setup\x20--scope='+_0x49f58e['GEWeA'](String,_0x229652['scope'])+'\x20is\x20no\x20longer\x20supported.\x20'+'Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20',_0x7a9910(0x1c1))),process['exit'](0x1));_0x229652={..._0x229652,'scope':_0x49f58e[_0x7a9910(0x195)]};const _0xadd1d4=!_0x49f58e['GEWeA'](existsSync,_0x49f58e['Lhxcf'](getRangerHomeDir));await _0x49f58e['GEWeA'](ensureRangerDir,_0x49f58e[_0x7a9910(0x195)]);if(_0x229652?.['skipAuth'])console[_0x7a9910(0x1ad)](_0x49f58e[_0x7a9910(0x16d)]),_0x31dfe3?.['trackPhaseEnd'](_0x7a9910(0x16c),{'isFirstRun':_0xadd1d4,'method':_0x49f58e[_0x7a9910(0x1b4)]});else{_0x31dfe3?.['trackPhaseStart'](_0x49f58e[_0x7a9910(0x1af)]);const _0x11caa7=await authenticate(_0x4677aa);_0x31dfe3?.['trackPhaseEnd'](_0x7a9910(0x16c),{'isFirstRun':_0xadd1d4,'method':_0x11caa7['method']});}_0x31dfe3?.['trackPhaseStart'](_0x7a9910(0x18f));_0x229652?.[_0x7a9910(0x19d)]?console[_0x7a9910(0x1ad)](_0x49f58e['SuYVO']):await _0x49f58e[_0x7a9910(0x1b7)](ensureChromium,_0x229652?.[_0x7a9910(0x1a6)]);_0x31dfe3?.[_0x7a9910(0x196)](_0x49f58e[_0x7a9910(0x17e)],{'isFirstRun':_0xadd1d4,'skipped':!!_0x229652?.[_0x7a9910(0x19d)]}),console[_0x7a9910(0x1ad)](_0x49f58e[_0x7a9910(0x1c4)]);const _0x14b8ed=_0x229652?.[_0x7a9910(0x1a7)],_0x493358=_0x229652?.['opencode']??![];let _0x3dc8f6=null;_0x493358?(_0x31dfe3?.[_0x7a9910(0x181)]('plugin'),_0x3dc8f6=await _0x49f58e['GEWeA'](ensureOpencodePluginConfig,_0x14b8ed),_0x31dfe3?.['trackPhaseEnd'](_0x49f58e['TdQLF'],{'isFirstRun':_0xadd1d4,'opencode':!![]})):(_0x31dfe3?.['trackPhaseStart'](_0x7a9910(0x1b8)),await ensureClaudePlugin(_0x14b8ed),_0x31dfe3?.['trackPhaseEnd'](_0x49f58e[_0x7a9910(0x1a1)],{'isFirstRun':_0xadd1d4}));if(_0x493358&&_0x3dc8f6){_0x31dfe3?.[_0x7a9910(0x181)](_0x49f58e['FpzdQ']);try{await _0x49f58e[_0x7a9910(0x191)](installSkill,_0x7a9910(0x1bc),{'level':_0x3dc8f6['scope'],'cliVersion':_0x49f58e['iXHXI'](getCurrentVersion),'platform':'opencode'}),_0x31dfe3?.['trackPhaseEnd'](_0x49f58e['FpzdQ'],{'isFirstRun':_0xadd1d4,'opencode':!![]});}catch(_0xd96454){console['warn'](_0x49f58e[_0x7a9910(0x19a)],_0xd96454 instanceof Error?_0xd96454[_0x7a9910(0x1ab)]:_0xd96454),_0x31dfe3?.['trackPhaseEnd'](_0x49f58e['FpzdQ'],{'isFirstRun':_0xadd1d4,'opencode':!![],'failed':!![]});}}else _0x31dfe3?.[_0x7a9910(0x181)](_0x49f58e[_0x7a9910(0x1b5)]),await _0x49f58e[_0x7a9910(0x1b7)](ensureClaudeSkills,_0x14b8ed),_0x31dfe3?.['trackPhaseEnd']('skills',{'isFirstRun':_0xadd1d4});if(_0x229652?.[_0x7a9910(0x18d)])console[_0x7a9910(0x1ad)]('\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a');else{if(_0x229652?.[_0x7a9910(0x1c7)]){_0x31dfe3?.[_0x7a9910(0x181)](_0x7a9910(0x1c3));const _0x52103f=await ensureLocalEnv({'url':_0x229652['url'],'force':_0x229652?.[_0x7a9910(0x17c)],'allowInsecureLocalhost':_0x229652?.[_0x7a9910(0x19c)],'scope':'user'},_0x31dfe3);_0x31dfe3?.[_0x7a9910(0x196)]('profile',{'isFirstRun':_0xadd1d4,'profileReady':_0x52103f[_0x7a9910(0x192)],'userSkipped':_0x52103f['skipped']});}else console[_0x7a9910(0x1ad)](_0x49f58e[_0x7a9910(0x1bd)](_0x49f58e['IvWfq']('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+('\x0a\x20\x20'+_0x49f58e[_0x7a9910(0x1ca)](bold,'ranger\x20profile\x20add\x20<name>'))+_0x7a9910(0x16e),'\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:'),_0x7a9910(0x1bb)));}if(_0x493358)console['log']('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console[_0x7a9910(0x1ad)]('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console[_0x7a9910(0x1ad)]('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console[_0x7a9910(0x1ad)](_0x7a9910(0x18b));else{const _0x2083dd=bold('/ranger:enable');console[_0x7a9910(0x1ad)](_0x49f58e['UODzf']('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x2083dd+_0x7a9910(0x1b1)+_0x7a9910(0x175)+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser',_0x7a9910(0x176)));}}
@@ -1 +1 @@
1
- const _0x387bd9=_0x4f62;(function(_0x249072,_0x5fb1a8){const _0x3558c0=_0x4f62,_0x248b7f=_0x249072();while(!![]){try{const _0x457d10=parseInt(_0x3558c0(0x12b))/0x1*(parseInt(_0x3558c0(0x15d))/0x2)+-parseInt(_0x3558c0(0x127))/0x3+parseInt(_0x3558c0(0xfd))/0x4*(-parseInt(_0x3558c0(0x13c))/0x5)+-parseInt(_0x3558c0(0x112))/0x6*(parseInt(_0x3558c0(0x10d))/0x7)+parseInt(_0x3558c0(0x102))/0x8*(parseInt(_0x3558c0(0x105))/0x9)+-parseInt(_0x3558c0(0x12a))/0xa+parseInt(_0x3558c0(0x14f))/0xb;if(_0x457d10===_0x5fb1a8)break;else _0x248b7f['push'](_0x248b7f['shift']());}catch(_0x3f7f49){_0x248b7f['push'](_0x248b7f['shift']());}}}(_0x89cc,0x34b5a));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';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';function _0x4f62(_0xf34354,_0x268e47){_0xf34354=_0xf34354-0xf7;const _0x89cc0=_0x89cc();let _0x4f622f=_0x89cc0[_0xf34354];return _0x4f622f;}import{spawn}from'child_process';function _0x89cc(){const _0x3624cc=['1087242uRGPhb','mpMYx','scope','2447540SEUnWP','1184KyecjG','\x20plugin(s)\x20configured','cwd','BTXCT','none','sznOS','fDiph','\x1b[0m','Version:\x20','SmYDX','isArray','hasEncryptedAuth','auth.json','length','all','not_configured','tXCXl','5myYeRp','ignore','details','\x1b[1m','push','xICDg','log','ranger@trailhead','displayName','ANweg','iaqTz','jOuoE','opencode-plugin','isActive','aHYlQ','KGrCO','disabled','stdout','version','6359859eJlJAQ','NMmgZ','opencode','env','includes','JjnCt','hasPlaintextAuth','@ranger-testing/opencode-plugin','(not\x20found)','\x1b]8;;\x07','encrypted','zoroi','enabled','eVYsM','292RVqJXw','string','coJVW','isDirectory','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','\x20\x20Run:\x20ranger\x20update','AJxAT','KyGza','plugin','filter','119772vdvZeV','Organization:\x20','LcCSn','stderr','TeVkX','312160tvYhZp','pipe','join','45BOlkhX','settings.json','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','lFYeD','\x0a---\x20Skills\x20---','name','eWQfJ','trim','14qDzRPW','IcSwa','parse','\x20(latest:\x20','TjaGo','279372plfUqM','settingsPath','VBqJU','gMcai','some','configured','\x20\x20Run:\x20ranger\x20setup\x20[token]','toString','map','KYrGq','Root:\x20','\x0a\x20\x20No\x20active\x20profile\x20set','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','\x20\x20User-level:','MHMOu','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','MblLT','\x20\x20Run:\x20ranger\x20setup\x20--opencode','rhjsJ','status','path'];_0x89cc=function(){return _0x3624cc;};return _0x89cc();}const bold=_0x395132=>_0x387bd9(0x13f)+_0x395132+_0x387bd9(0x132),link=(_0x5671e0,_0x21f53b)=>'\x1b]8;;file://'+_0x5671e0+'\x07'+(_0x21f53b||_0x5671e0)+_0x387bd9(0x158);async function getOpencodePluginStatus(){const _0x2770cf=_0x387bd9,_0x2a8287={'SmYDX':_0x2770cf(0x148),'VmidK':'not_installed','XUTZv':function(_0x4e581b,_0x2a063f){return _0x4e581b(_0x2a063f);},'EZfBY':_0x2770cf(0x151),'eVYsM':'debug','evZXF':'config','IzmSL':_0x2770cf(0x13d),'iaqTz':'close'};return new Promise(_0x28e666=>{const _0x52e150=_0x2770cf,_0x474d0b={'IcSwa':function(_0x5ce7f4,_0x47505b){return _0x5ce7f4!==_0x47505b;},'rhjsJ':_0x2a8287[_0x52e150(0x134)],'Tlheo':_0x2a8287['VmidK'],'KYrGq':function(_0x24b6df,_0x501005){return _0x2a8287['XUTZv'](_0x24b6df,_0x501005);},'aPhcf':'configured','eWQfJ':function(_0x27eab7,_0x2de142){return _0x27eab7>_0x2de142;},'ofAfw':_0x52e150(0x13a)},_0x1c9cda=spawn(_0x2a8287['EZfBY'],[_0x2a8287[_0x52e150(0x15c)],_0x2a8287['evZXF']],{'stdio':[_0x2a8287['IzmSL'],'pipe',_0x52e150(0x103)]});let _0xd1a7cb='';_0x1c9cda[_0x52e150(0x14d)]?.['on']('data',_0x309ca9=>{const _0x344d74=_0x52e150;_0xd1a7cb+=_0x309ca9[_0x344d74(0x119)]();}),_0x1c9cda[_0x52e150(0x100)]?.['on']('data',_0x480d06=>{const _0x2746e4=_0x52e150;_0xd1a7cb+=_0x480d06[_0x2746e4(0x119)]();}),_0x1c9cda['on']('error',()=>{_0x28e666({'status':'not_installed'});}),_0x1c9cda['on'](_0x2a8287[_0x52e150(0x146)],_0x431311=>{const _0x558a83=_0x52e150,_0x8de87b={'aHYlQ':function(_0x1636d7,_0x5e2e2d){return _0x474d0b['IcSwa'](_0x1636d7,_0x5e2e2d);},'zoroi':_0x558a83(0x15e),'fDiph':_0x474d0b[_0x558a83(0x124)]};if(_0x474d0b[_0x558a83(0x10e)](_0x431311,0x0)){_0x28e666({'status':_0x474d0b['Tlheo']});return;}const _0x2c1974=_0xd1a7cb[_0x558a83(0x10c)]();let _0x575312=null;if(_0x2c1974)try{_0x575312=JSON[_0x558a83(0x10f)](_0x2c1974);}catch{const _0x3f66d7=_0x2c1974['match'](/\{[\s\S]*\}$/);if(_0x3f66d7)try{_0x575312=JSON[_0x558a83(0x10f)](_0x3f66d7[0x0]);}catch{_0x575312=null;}}const _0x33a77d=Array[_0x558a83(0x135)](_0x575312?.[_0x558a83(0xfb)])?_0x575312?.[_0x558a83(0xfb)]:[],_0x1db986=_0x33a77d[_0x558a83(0x116)](_0x4c9fec=>{const _0x69b02c=_0x558a83;if(_0x8de87b[_0x69b02c(0x14a)](typeof _0x4c9fec,_0x8de87b[_0x69b02c(0x15a)]))return![];return _0x4c9fec['includes'](_0x69b02c(0x156))||_0x4c9fec['includes'](_0x8de87b[_0x69b02c(0x131)]);});if(_0x1db986){_0x474d0b[_0x558a83(0x11b)](_0x28e666,{'status':_0x474d0b['aPhcf'],'details':_0x33a77d['length']>0x0?_0x33a77d['length']+_0x558a83(0x12c):undefined});return;}if(_0x474d0b[_0x558a83(0x10b)](_0x33a77d['length'],0x0)){_0x474d0b['KYrGq'](_0x28e666,{'status':_0x474d0b['ofAfw'],'details':_0x33a77d['length']+_0x558a83(0x12c)});return;}_0x28e666({'status':'not_configured'});});});}async function getSkillsFromDir(_0x432ca4,_0x10f48b){const _0x39a2d2=_0x387bd9,_0xfba391={'JldsP':function(_0x3d1ebe,_0x50ec5f,_0x43d2ae,_0x532c90){return _0x3d1ebe(_0x50ec5f,_0x43d2ae,_0x532c90);},'JpHen':'SKILL.md','FgRsx':function(_0x4ead1e,_0x10984e){return _0x4ead1e(_0x10984e);},'jOuoE':function(_0x2e558e,_0x3fffb0,_0x1822b8){return _0x2e558e(_0x3fffb0,_0x1822b8);},'veolc':'utf-8'};if(!existsSync(_0x432ca4))return[];const _0x307080=[];try{const _0x2af523=await readdir(_0x432ca4,{'withFileTypes':!![]});for(const _0x381108 of _0x2af523){if(_0x381108[_0x39a2d2(0x160)]()){const _0x5c3f79=_0xfba391['JldsP'](join,_0x432ca4,_0x381108[_0x39a2d2(0x10a)],_0xfba391['JpHen']);if(_0xfba391['FgRsx'](existsSync,_0x5c3f79)){let _0x2a01db=_0x381108[_0x39a2d2(0x10a)];try{const _0x45d065=await _0xfba391[_0x39a2d2(0x147)](readFile,_0x5c3f79,_0xfba391['veolc']),_0x94f6a4=_0x45d065['match'](/name:\s*(.+)/);_0x94f6a4&&(_0x2a01db=_0x94f6a4[0x1]['trim']());}catch{}_0x307080[_0x39a2d2(0x140)]({'name':_0x381108[_0x39a2d2(0x10a)],'displayName':_0x2a01db,'path':_0x5c3f79,'level':_0x10f48b});}}}}catch{return[];}return _0x307080;}async function getInstalledSkills(){const _0xb035bb=_0x387bd9,_0x123427={'mpMYx':function(_0x4c3341){return _0x4c3341();},'KYHcX':function(_0x18f9c7,_0x5e82d3,_0x4e3ccb){return _0x18f9c7(_0x5e82d3,_0x4e3ccb);}},[_0x1ed950,_0x195e84]=await Promise[_0xb035bb(0x139)]([getSkillsFromDir(_0x123427[_0xb035bb(0x128)](getProjectSkillsDir),'project'),_0x123427['KYHcX'](getSkillsFromDir,_0x123427[_0xb035bb(0x128)](getUserSkillsDir),'user')]);return{'project':_0x1ed950,'user':_0x195e84};}async function getEnvironments(){const _0x2f613d=_0x387bd9,_0x5cf32f={'HDKkD':function(_0x491ba8,_0x59323e,_0x147605){return _0x491ba8(_0x59323e,_0x147605);},'KGrCO':_0x2f613d(0x106),'xICDg':function(_0x2dc347,_0x18726f,_0x57583f){return _0x2dc347(_0x18726f,_0x57583f);},'brogS':_0x2f613d(0x137),'AJxAT':function(_0x5bed85,_0x10b0fd){return _0x5bed85(_0x10b0fd);},'UKIYO':_0x2f613d(0x157),'VDnWW':function(_0x3dea56,_0xece807){return _0x3dea56(_0xece807);}},{envNames:_0x2cd8c9,activeEnv:_0xc0428d}=await getEnvNames(),_0x40a700=getRangerDir();if(!_0x5cf32f[_0x2f613d(0xf9)](existsSync,_0x40a700))return{'envs':[],'activeEnv':null};const _0x24942c=_0x2cd8c9[_0x2f613d(0x11a)](_0x4be668=>{const _0x4c12d0=_0x2f613d,_0x53347a=getEnvDir(_0x4be668),_0x54e211=_0x5cf32f['HDKkD'](join,_0x53347a,_0x5cf32f[_0x4c12d0(0x14b)]),_0x551d06=_0x5cf32f[_0x4c12d0(0x141)](join,_0x53347a,_0x5cf32f['brogS']),_0x123dff=_0x5cf32f[_0x4c12d0(0x141)](join,_0x53347a,'auth.json.enc');return{'name':_0x4be668,'settingsPath':_0x5cf32f['AJxAT'](existsSync,_0x54e211)?_0x54e211:_0x5cf32f['UKIYO'],'hasPlaintextAuth':_0x5cf32f['VDnWW'](existsSync,_0x551d06),'hasEncryptedAuth':_0x5cf32f[_0x4c12d0(0xf9)](existsSync,_0x123dff),'isActive':_0x4be668===_0xc0428d};});return{'envs':_0x24942c,'activeEnv':_0xc0428d};}export async function status(){const _0x3c05b5=_0x387bd9,_0x49125a={'DkfSw':'\x0a📊\x20Ranger\x20Status\x0a','BTXCT':function(_0x5cfd6f,_0x1337ea){return _0x5cfd6f(_0x1337ea);},'coJVW':function(_0x4ebc5f,_0x4d121d,_0x92d2d5){return _0x4ebc5f(_0x4d121d,_0x92d2d5);},'lFYeD':function(_0x1aee5e){return _0x1aee5e();},'MHMOu':function(_0x24e0cc,_0x2fb9a5){return _0x24e0cc(_0x2fb9a5);},'wItzK':function(_0x2502f8){return _0x2502f8();},'WuGnb':_0x3c05b5(0x13a),'WFGiZ':'\x20\x20Not\x20configured','haiPW':_0x3c05b5(0x121),'zVIYi':'\x0a---\x20Claude\x20Code\x20Plugin\x20---','TeVkX':_0x3c05b5(0x143),'KyGza':'unknown','LcCSn':function(_0x5250cd,_0x8cf14d){return _0x5250cd(_0x8cf14d);},'ANweg':'\x20\x20Not\x20installed','TjaGo':_0x3c05b5(0x11e),'NMmgZ':function(_0x3d4a92){return _0x3d4a92();},'tXCXl':function(_0x39d902,_0x24325b){return _0x39d902===_0x24325b;},'VBqJU':'No\x20skills\x20installed','oJLPu':function(_0x575b60,_0x445a52){return _0x575b60>_0x445a52;},'iEXZm':'\x20\x20Project-level:','Npsaa':function(_0x330baa,_0x3390be){return _0x330baa>_0x3390be;},'gMcai':_0x3c05b5(0x11f),'JjnCt':'\x20(active)','sznOS':'plaintext','EBgTA':_0x3c05b5(0x12f),'MblLT':function(_0x53983c,_0x3c7645){return _0x53983c(_0x3c7645);},'SYCEK':function(_0x48f7da,_0x3ee392,_0x344526){return _0x48f7da(_0x3ee392,_0x344526);}};console[_0x3c05b5(0x142)](_0x49125a['DkfSw']);const _0x39a2f4=process[_0x3c05b5(0x12d)](),_0x24e62f=getRangerDir();if(!_0x49125a[_0x3c05b5(0x12e)](existsSync,_0x24e62f)){console['log'](_0x3c05b5(0x11c)+_0x49125a[_0x3c05b5(0x15f)](link,_0x39a2f4,bold(basename(_0x39a2f4)))),console[_0x3c05b5(0x142)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x3c05b5(0x142)](_0x3c05b5(0xf7));return;}console['log'](_0x3c05b5(0x11c)+link(_0x39a2f4,bold(basename(_0x39a2f4))));const _0x206c2c=getCurrentVersion(),_0x442bb7=getLatestVersion();if(_0x442bb7[_0x3c05b5(0x14e)]&&_0x442bb7[_0x3c05b5(0x14e)]!==_0x206c2c)console[_0x3c05b5(0x142)](_0x3c05b5(0x133)+_0x206c2c+_0x3c05b5(0x110)+_0x442bb7['version']+')'),console['log'](_0x3c05b5(0xf8));else _0x442bb7[_0x3c05b5(0x14e)]?console['log']('Version:\x20'+_0x206c2c+'\x20(up\x20to\x20date)'):console[_0x3c05b5(0x142)](_0x3c05b5(0x133)+_0x206c2c);const _0x4157e7=await _0x49125a[_0x3c05b5(0x108)](getToken);if(_0x4157e7){const _0x57fa3f=await _0x49125a[_0x3c05b5(0x120)](getCurrentUser,_0x4157e7);_0x57fa3f['success']?console['log'](_0x3c05b5(0xfe)+bold(_0x57fa3f['user']['organizationName'])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log'](_0x3c05b5(0x118)));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console[_0x3c05b5(0x142)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x3c05b5(0x152)]['DEBUG']&&(console[_0x3c05b5(0x142)]('API\x20Environment:\x20'+_0x49125a[_0x3c05b5(0x108)](getCurrentEnvironment)),console[_0x3c05b5(0x142)]('API\x20URL:\x20'+getApiBaseUrl()));console['log']('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x5dd494=await _0x49125a['wItzK'](getOpencodePluginStatus);if(_0x5dd494['status']===_0x3c05b5(0x117))console['log']('\x20\x20'+bold('@ranger-testing/opencode-plugin')+':\x20configured'),_0x5dd494[_0x3c05b5(0x13e)]&&console[_0x3c05b5(0x142)]('\x20\x20'+_0x5dd494[_0x3c05b5(0x13e)]);else _0x5dd494[_0x3c05b5(0x125)]===_0x49125a['WuGnb']?(console[_0x3c05b5(0x142)](_0x49125a['WFGiZ']),_0x5dd494['details']&&console['log']('\x20\x20'+_0x5dd494['details']),console[_0x3c05b5(0x142)](_0x3c05b5(0x123))):console['log'](_0x49125a['haiPW']);console[_0x3c05b5(0x142)](_0x49125a['zVIYi']);const _0x326dbf=await _0x49125a['MHMOu'](getPluginInfo,_0x49125a['TeVkX']);if(_0x326dbf){const _0x31af04=_0x326dbf[_0x3c05b5(0x129)]||_0x49125a[_0x3c05b5(0xfa)],_0x2d2fb1=_0x326dbf['enabled']?_0x3c05b5(0x15b):_0x3c05b5(0x14c);console[_0x3c05b5(0x142)]('\x20\x20'+_0x49125a[_0x3c05b5(0xff)](bold,_0x49125a[_0x3c05b5(0x101)])+':\x20installed\x20('+_0x31af04+',\x20'+_0x2d2fb1+')');}else console['log'](_0x49125a[_0x3c05b5(0x145)]),console['log'](_0x49125a[_0x3c05b5(0x111)]);console['log'](_0x3c05b5(0x109));const {project:_0x421e04,user:_0x1e5415}=await _0x49125a['NMmgZ'](getInstalledSkills),_0x50db30=_0x421e04['filter'](_0x1273c4=>RANGER_MANAGED_SKILLS[_0x3c05b5(0x153)](_0x1273c4['name'])),_0x123df8=_0x1e5415[_0x3c05b5(0xfc)](_0x52563e=>RANGER_MANAGED_SKILLS['includes'](_0x52563e[_0x3c05b5(0x10a)])),_0x1f0a33=_0x50db30[_0x3c05b5(0x138)]+_0x123df8['length'];if(_0x49125a[_0x3c05b5(0x13b)](_0x1f0a33,0x0))console['log'](_0x49125a[_0x3c05b5(0x114)]),console[_0x3c05b5(0x142)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x49125a['oJLPu'](_0x50db30[_0x3c05b5(0x138)],0x0)){console['log'](_0x49125a['iEXZm']);for(const _0x477289 of _0x50db30){console[_0x3c05b5(0x142)]('\x20\x20\x20\x20'+_0x49125a['BTXCT'](bold,_0x477289[_0x3c05b5(0x144)])+':\x20'+link(_0x477289[_0x3c05b5(0x126)],basename(_0x477289['path'])));}}if(_0x49125a['Npsaa'](_0x123df8[_0x3c05b5(0x138)],0x0)){console['log'](_0x49125a[_0x3c05b5(0x115)]);for(const _0x41f112 of _0x123df8){console['log']('\x20\x20\x20\x20'+bold(_0x41f112['displayName'])+':\x20'+link(_0x41f112[_0x3c05b5(0x126)],basename(_0x41f112['path'])));}}}console['log']('\x0a---\x20Profiles\x20---');const {envs:_0x423be6,activeEnv:_0x376478}=await _0x49125a[_0x3c05b5(0x150)](getEnvironments);if(_0x49125a[_0x3c05b5(0x13b)](_0x423be6['length'],0x0))console['log']('No\x20profiles\x20configured'),console[_0x3c05b5(0x142)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x31ae9c of _0x423be6){const _0x354ce1=_0x31ae9c[_0x3c05b5(0x149)]?_0x49125a[_0x3c05b5(0x154)]:'',_0x42dd09=_0x31ae9c[_0x3c05b5(0x136)]?_0x3c05b5(0x159):_0x31ae9c[_0x3c05b5(0x155)]?_0x49125a[_0x3c05b5(0x130)]:_0x49125a['EBgTA'];console['log']('\x20\x20'+_0x49125a[_0x3c05b5(0x122)](bold,_0x31ae9c[_0x3c05b5(0x10a)])+_0x354ce1),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x42dd09),_0x31ae9c['settingsPath']!=='(not\x20found)'&&console['log']('\x20\x20\x20\x20Settings:\x20'+_0x49125a['SYCEK'](link,_0x31ae9c['settingsPath'],basename(_0x31ae9c[_0x3c05b5(0x113)])));}!_0x376478&&(console['log'](_0x3c05b5(0x11d)),console[_0x3c05b5(0x142)](_0x3c05b5(0x107)+_0x423be6[_0x3c05b5(0x11a)](_0x29c561=>_0x29c561[_0x3c05b5(0x10a)])[_0x3c05b5(0x104)](',\x20')+')'));}console[_0x3c05b5(0x142)]('');}
1
+ const _0x3dbb79=_0x2935;(function(_0x368026,_0x467622){const _0x259429=_0x2935,_0x3858e1=_0x368026();while(!![]){try{const _0xc29d98=-parseInt(_0x259429(0x21a))/0x1+parseInt(_0x259429(0x237))/0x2+-parseInt(_0x259429(0x236))/0x3*(parseInt(_0x259429(0x211))/0x4)+parseInt(_0x259429(0x20f))/0x5*(parseInt(_0x259429(0x1dd))/0x6)+-parseInt(_0x259429(0x1fb))/0x7+-parseInt(_0x259429(0x223))/0x8*(parseInt(_0x259429(0x22f))/0x9)+parseInt(_0x259429(0x201))/0xa*(parseInt(_0x259429(0x1f6))/0xb);if(_0xc29d98===_0x467622)break;else _0x3858e1['push'](_0x3858e1['shift']());}catch(_0x3c86a2){_0x3858e1['push'](_0x3858e1['shift']());}}}(_0xf656,0x28767));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';function _0x2935(_0x43357b,_0x34f1a5){_0x43357b=_0x43357b-0x1da;const _0xf6567=_0xf656();let _0x293547=_0xf6567[_0x43357b];return _0x293547;}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=_0x5e49b3=>_0x3dbb79(0x214)+_0x5e49b3+_0x3dbb79(0x1ed),link=(_0x10b0aa,_0x48076d)=>'\x1b]8;;file://'+_0x10b0aa+'\x07'+(_0x48076d||_0x10b0aa)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x1a346c=_0x3dbb79,_0x2f40eb={'Bfufa':function(_0x499ad4,_0x3b4173){return _0x499ad4(_0x3b4173);},'rboGv':_0x1a346c(0x225),'RNumb':_0x1a346c(0x20d),'YkEFs':_0x1a346c(0x1e7),'Exmsq':function(_0x501f24,_0x2ac04b){return _0x501f24!==_0x2ac04b;},'nMphg':function(_0xdd6d6f,_0x50c3b7){return _0xdd6d6f(_0x50c3b7);},'CCyGC':_0x1a346c(0x1e3),'lBjTK':_0x1a346c(0x212),'RUOKw':'debug','NFbfH':_0x1a346c(0x1fc),'beGge':'ignore','zLJXc':'pipe','WozzB':'data'};return new Promise(_0x472b46=>{const _0x33a6bb=_0x1a346c,_0x8d31d7=spawn(_0x2f40eb['lBjTK'],[_0x2f40eb[_0x33a6bb(0x213)],_0x2f40eb[_0x33a6bb(0x1f4)]],{'stdio':[_0x2f40eb['beGge'],_0x2f40eb[_0x33a6bb(0x241)],'pipe']});let _0xbc8df2='';_0x8d31d7['stdout']?.['on'](_0x2f40eb['WozzB'],_0x112bfd=>{_0xbc8df2+=_0x112bfd['toString']();}),_0x8d31d7['stderr']?.['on'](_0x2f40eb[_0x33a6bb(0x234)],_0x5312a5=>{_0xbc8df2+=_0x5312a5['toString']();}),_0x8d31d7['on'](_0x33a6bb(0x1ef),()=>{const _0x29e0fd=_0x33a6bb;_0x2f40eb['Bfufa'](_0x472b46,{'status':_0x2f40eb[_0x29e0fd(0x243)]});}),_0x8d31d7['on'](_0x33a6bb(0x229),_0x51c8c5=>{const _0x17a8c3=_0x33a6bb,_0x2b10fc={'wjYFj':function(_0x45cb75,_0x220c5b){return _0x45cb75!==_0x220c5b;},'cXVeh':_0x2f40eb['RNumb'],'PfnbF':_0x17a8c3(0x210),'BGwla':_0x2f40eb[_0x17a8c3(0x21e)]};if(_0x2f40eb[_0x17a8c3(0x249)](_0x51c8c5,0x0)){_0x472b46({'status':_0x2f40eb['rboGv']});return;}const _0xef5ac8=_0xbc8df2[_0x17a8c3(0x206)]();let _0x323db7=null;if(_0xef5ac8)try{_0x323db7=JSON['parse'](_0xef5ac8);}catch{const _0x4407f8=_0xef5ac8['match'](/\{[\s\S]*\}$/);if(_0x4407f8)try{_0x323db7=JSON['parse'](_0x4407f8[0x0]);}catch{_0x323db7=null;}}const _0x19e83d=Array[_0x17a8c3(0x24e)](_0x323db7?.['plugin'])?_0x323db7?.[_0x17a8c3(0x20c)]:[],_0x2ed9f4=_0x19e83d[_0x17a8c3(0x226)](_0x278cc6=>{const _0x379cd8=_0x17a8c3;if(_0x2b10fc['wjYFj'](typeof _0x278cc6,_0x2b10fc[_0x379cd8(0x22e)]))return![];return _0x278cc6[_0x379cd8(0x1fa)](_0x2b10fc[_0x379cd8(0x205)])||_0x278cc6[_0x379cd8(0x1fa)](_0x2b10fc['BGwla']);});if(_0x2ed9f4){_0x2f40eb[_0x17a8c3(0x22b)](_0x472b46,{'status':_0x17a8c3(0x21f),'details':_0x19e83d['length']>0x0?_0x19e83d['length']+_0x17a8c3(0x1e8):undefined});return;}if(_0x19e83d['length']>0x0){_0x2f40eb['nMphg'](_0x472b46,{'status':_0x2f40eb[_0x17a8c3(0x23d)],'details':_0x19e83d['length']+'\x20plugin(s)\x20configured'});return;}_0x472b46({'status':'not_configured'});});});}async function getSkillsFromDir(_0x3fc56e,_0x33ed71){const _0xf2d75c=_0x3dbb79,_0x5b3d18={'lnyon':function(_0x4763fc,_0x2c9b8a){return _0x4763fc(_0x2c9b8a);},'FkdxK':function(_0x3d7305,_0x22d394,_0x74bb9f){return _0x3d7305(_0x22d394,_0x74bb9f);},'rKgwL':'SKILL.md'};if(!_0x5b3d18[_0xf2d75c(0x21b)](existsSync,_0x3fc56e))return[];const _0x2e187e=[];try{const _0x36ec40=await _0x5b3d18['FkdxK'](readdir,_0x3fc56e,{'withFileTypes':!![]});for(const _0x428338 of _0x36ec40){if(_0x428338['isDirectory']()){const _0x1391f2=join(_0x3fc56e,_0x428338['name'],_0x5b3d18[_0xf2d75c(0x1dc)]);if(_0x5b3d18[_0xf2d75c(0x21b)](existsSync,_0x1391f2)){let _0x392783=_0x428338[_0xf2d75c(0x235)];try{const _0x32c3df=await readFile(_0x1391f2,_0xf2d75c(0x231)),_0x3b134d=_0x32c3df['match'](/name:\s*(.+)/);_0x3b134d&&(_0x392783=_0x3b134d[0x1]['trim']());}catch{}_0x2e187e[_0xf2d75c(0x1ea)]({'name':_0x428338['name'],'displayName':_0x392783,'path':_0x1391f2,'level':_0x33ed71});}}}}catch{return[];}return _0x2e187e;}async function getInstalledSkills(){const _0x418a60=_0x3dbb79,_0x456afc={'XlBKt':function(_0x40a143,_0x42d012,_0x28050c){return _0x40a143(_0x42d012,_0x28050c);},'uGSqD':function(_0x67c26c){return _0x67c26c();},'VUXSB':_0x418a60(0x200),'UZyqQ':'user'},[_0x2fad6f,_0x455c7e]=await Promise['all']([_0x456afc[_0x418a60(0x24f)](getSkillsFromDir,_0x456afc['uGSqD'](getProjectSkillsDir),_0x456afc['VUXSB']),getSkillsFromDir(getUserSkillsDir(),_0x456afc[_0x418a60(0x221)])]);return{'project':_0x2fad6f,'user':_0x455c7e};}async function getEnvironments(){const _0x54e237=_0x3dbb79,_0x109d66={'WgQHq':function(_0x3ced36,_0x35ed02){return _0x3ced36(_0x35ed02);},'ydHTw':function(_0x5176ec,_0x3896c9,_0x37e07a){return _0x5176ec(_0x3896c9,_0x37e07a);},'OmwAa':function(_0x37ebcf,_0x27b4ae){return _0x37ebcf(_0x27b4ae);},'clnAN':function(_0x160efe){return _0x160efe();},'RBKFV':function(_0x666018,_0x3848f7){return _0x666018(_0x3848f7);}},{envNames:_0xd094ca,activeEnv:_0x485235}=await getEnvNames(),_0x1a7bc6=_0x109d66[_0x54e237(0x1fd)](getRangerDir);if(!_0x109d66[_0x54e237(0x1fe)](existsSync,_0x1a7bc6))return{'envs':[],'activeEnv':null};const _0x5744af=_0xd094ca[_0x54e237(0x22d)](_0x4702f2=>{const _0xd68b08=_0x54e237,_0x439f3d=_0x109d66[_0xd68b08(0x215)](getEnvDir,_0x4702f2),_0x1987e0=_0x109d66[_0xd68b08(0x1ee)](join,_0x439f3d,_0xd68b08(0x239)),_0xd04975=join(_0x439f3d,_0xd68b08(0x227)),_0x40d288=join(_0x439f3d,'auth.json.enc');return{'name':_0x4702f2,'settingsPath':_0x109d66[_0xd68b08(0x222)](existsSync,_0x1987e0)?_0x1987e0:'(not\x20found)','hasPlaintextAuth':existsSync(_0xd04975),'hasEncryptedAuth':_0x109d66['WgQHq'](existsSync,_0x40d288),'isActive':_0x4702f2===_0x485235};});return{'envs':_0x5744af,'activeEnv':_0x485235};}function _0xf656(){const _0xd83904=['includes','1476965yXLQxR','config','clnAN','RBKFV','log','project','44910ulRCgP','roXob','bwyip','\x20profiles\x20configured\x20(','PfnbF','trim','BFzRq','xUumR','\x20\x20\x20\x20','\x20cloud','\x20\x20\x20\x20Auth:\x20','plugin','string','XUcfZ','20FwEMtX','@ranger-testing/opencode-plugin','4ggxPNz','opencode','RUOKw','\x1b[1m','WgQHq','Root:\x20','\x20\x20Active:\x20','path','enabled','241132iGldlw','lnyon','\x20[cloud]','\x0a\x20\x20No\x20active\x20profile\x20set','YkEFs','configured','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','UZyqQ','OmwAa','3376pPxtij','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','not_installed','some','auth.json','hasPlaintextAuth','close','join','Bfufa','VxVdJ','map','cXVeh','1467hokApd','fkTah','utf-8','success','\x0a📊\x20Ranger\x20Status\x0a','WozzB','name','264141ZFWUaQ','143796WYHycO','cached\x20(updated\x20','settings.json','Bddau','has','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','CCyGC','version','slGKD','SqGAK','zLJXc','isActive','rboGv','plaintext','vRPGY','env','API\x20Environment:\x20','none','Exmsq','\x20\x20\x20\x20Session:\x20','ranger@trailhead','details','qDCkL','isArray','XlBKt','\x20\x20User-level:','TCiYN','rKgwL','360336rtaqLa','\x20\x20Not\x20installed','cwd','displayName','rfwHO','length','not_configured','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','HrHTu','kQBwF','opencode-plugin','\x20plugin(s)\x20configured','\x20\x20Run:\x20ranger\x20skillup','push','dwhuo','hasEncryptedAuth','\x1b[0m','ydHTw','error','Version:\x20','no\x20session','\x20\x20Run:\x20ranger\x20setup\x20--opencode','\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)','NFbfH','No\x20skills\x20installed','1133UOAfuA','API\x20URL:\x20','BlMkM','\x20\x20Run:\x20ranger\x20setup\x20[token]'];_0xf656=function(){return _0xd83904;};return _0xf656();}export async function status(){const _0x292582=_0x3dbb79,_0x440016={'rfwHO':function(_0x2f1198){return _0x2f1198();},'roXob':function(_0x51acce,_0x159999){return _0x51acce!==_0x159999;},'WYtra':function(_0x36d52f,_0x2b99d6){return _0x36d52f(_0x2b99d6);},'SqGAK':function(_0x29ae7f,_0x2dc9b4){return _0x29ae7f===_0x2dc9b4;},'BlMkM':_0x292582(0x21f),'VxVdJ':'\x20\x20Not\x20configured','VTKTe':_0x292582(0x1f2),'dwhuo':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','bwyip':'\x0a---\x20Claude\x20Code\x20Plugin\x20---','triNK':function(_0x1ddf68,_0x242fa5){return _0x1ddf68(_0x242fa5);},'BFzRq':'unknown','lEbGC':_0x292582(0x219),'fkTah':'disabled','slGKD':function(_0x452b77,_0x4c4e9b){return _0x452b77(_0x4c4e9b);},'XUcfZ':_0x292582(0x1f5),'Bddau':function(_0x386bdf,_0x26ad7d){return _0x386bdf(_0x26ad7d);},'HrHTu':function(_0x2633ba,_0x4bc8e8){return _0x2633ba>_0x4bc8e8;},'TCiYN':function(_0x2fd43d,_0x1fe444,_0x32f850){return _0x2fd43d(_0x1fe444,_0x32f850);},'pFWTI':'\x0a---\x20Profiles\x20---','Opjes':function(_0x21fcb5){return _0x21fcb5();},'XacWU':function(_0x3d1e95,_0x16a08a){return _0x3d1e95+_0x16a08a;},'btDSw':'No\x20profiles\x20configured','vRPGY':function(_0x33c7df,_0x159e31){return _0x33c7df>_0x159e31;},'kQBwF':'\x20(active)','xUumR':_0x292582(0x1f1),'qDCkL':'encrypted','BuYfm':_0x292582(0x244)};console[_0x292582(0x1ff)](_0x292582(0x233));const _0x16b3bf=process[_0x292582(0x1df)](),_0x5703a2=getRangerDir();if(!existsSync(_0x5703a2)){console['log'](_0x292582(0x216)+link(_0x16b3bf,bold(basename(_0x16b3bf)))),console['log']('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x292582(0x1ff)](_0x292582(0x224));return;}console[_0x292582(0x1ff)]('Root:\x20'+link(_0x16b3bf,bold(basename(_0x16b3bf))));const _0xab9074=_0x440016[_0x292582(0x1e1)](getCurrentVersion),_0x4bcee2=getLatestVersion();if(_0x4bcee2[_0x292582(0x23e)]&&_0x440016[_0x292582(0x202)](_0x4bcee2['version'],_0xab9074))console[_0x292582(0x1ff)]('Version:\x20'+_0xab9074+'\x20(latest:\x20'+_0x4bcee2['version']+')'),console[_0x292582(0x1ff)]('\x20\x20Run:\x20ranger\x20update');else _0x4bcee2['version']?console[_0x292582(0x1ff)](_0x292582(0x1f0)+_0xab9074+'\x20(up\x20to\x20date)'):console[_0x292582(0x1ff)]('Version:\x20'+_0xab9074);const _0x37ed3e=await getToken();if(_0x37ed3e){const _0x330ed8=await getCurrentUser(_0x37ed3e);_0x330ed8[_0x292582(0x232)]?console[_0x292582(0x1ff)]('Organization:\x20'+_0x440016['WYtra'](bold,_0x330ed8['user']['organizationName'])):(console['log'](_0x292582(0x23c)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x292582(0x1ff)]('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x292582(0x1f9));process[_0x292582(0x246)]['DEBUG']&&(console[_0x292582(0x1ff)](_0x292582(0x247)+getCurrentEnvironment()),console[_0x292582(0x1ff)](_0x292582(0x1f7)+getApiBaseUrl()));console[_0x292582(0x1ff)]('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x5a4217=await getOpencodePluginStatus();if(_0x440016[_0x292582(0x240)](_0x5a4217['status'],_0x440016[_0x292582(0x1f8)]))console[_0x292582(0x1ff)]('\x20\x20'+bold(_0x292582(0x210))+':\x20configured'),_0x5a4217['details']&&console['log']('\x20\x20'+_0x5a4217['details']);else _0x5a4217['status']===_0x292582(0x1e3)?(console[_0x292582(0x1ff)](_0x440016[_0x292582(0x22c)]),_0x5a4217[_0x292582(0x24c)]&&console['log']('\x20\x20'+_0x5a4217[_0x292582(0x24c)]),console[_0x292582(0x1ff)](_0x440016['VTKTe'])):console[_0x292582(0x1ff)](_0x440016[_0x292582(0x1eb)]);console['log'](_0x440016[_0x292582(0x203)]);const _0x24b98c=await _0x440016['triNK'](getPluginInfo,_0x292582(0x24b));if(_0x24b98c){const _0x4d7db4=_0x24b98c['scope']||_0x440016[_0x292582(0x207)],_0x9aa320=_0x24b98c[_0x292582(0x219)]?_0x440016['lEbGC']:_0x440016[_0x292582(0x230)];console[_0x292582(0x1ff)]('\x20\x20'+_0x440016['slGKD'](bold,'ranger@trailhead')+':\x20installed\x20('+_0x4d7db4+',\x20'+_0x9aa320+')');}else console[_0x292582(0x1ff)](_0x292582(0x1de)),console[_0x292582(0x1ff)](_0x292582(0x220));console[_0x292582(0x1ff)]('\x0a---\x20Skills\x20---');const {project:_0x8cb6b0,user:_0x3874e6}=await _0x440016[_0x292582(0x1e1)](getInstalledSkills),_0xa23d54=_0x8cb6b0['filter'](_0x5107da=>RANGER_MANAGED_SKILLS[_0x292582(0x1fa)](_0x5107da['name'])),_0x31c0dd=_0x3874e6['filter'](_0x56aef7=>RANGER_MANAGED_SKILLS['includes'](_0x56aef7[_0x292582(0x235)])),_0x42f703=_0xa23d54[_0x292582(0x1e2)]+_0x31c0dd[_0x292582(0x1e2)];if(_0x440016['SqGAK'](_0x42f703,0x0))console[_0x292582(0x1ff)](_0x440016[_0x292582(0x20e)]),console['log'](_0x292582(0x1e9));else{if(_0xa23d54['length']>0x0){console['log']('\x20\x20Project-level:');for(const _0x2a90e3 of _0xa23d54){console[_0x292582(0x1ff)]('\x20\x20\x20\x20'+bold(_0x2a90e3[_0x292582(0x1e0)])+':\x20'+link(_0x2a90e3[_0x292582(0x218)],_0x440016[_0x292582(0x23a)](basename,_0x2a90e3['path'])));}}if(_0x440016[_0x292582(0x1e5)](_0x31c0dd[_0x292582(0x1e2)],0x0)){console[_0x292582(0x1ff)](_0x292582(0x1da));for(const _0x294932 of _0x31c0dd){console[_0x292582(0x1ff)](_0x292582(0x209)+bold(_0x294932['displayName'])+':\x20'+_0x440016[_0x292582(0x1db)](link,_0x294932[_0x292582(0x218)],basename(_0x294932[_0x292582(0x218)])));}}}console[_0x292582(0x1ff)](_0x440016['pFWTI']);const {envs:_0x1563e7,activeEnv:_0x391aa8}=await _0x440016['Opjes'](getEnvironments);let _0x20885d=[];if(_0x37ed3e)try{_0x20885d=await listCloudProfiles();}catch{}const _0x217c56=_0x440016['XacWU'](_0x1563e7[_0x292582(0x1e2)],_0x20885d[_0x292582(0x1e2)]);if(_0x217c56===0x0)console[_0x292582(0x1ff)](_0x440016['btDSw']),console[_0x292582(0x1ff)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{if(_0x440016[_0x292582(0x245)](_0x217c56,0x5)){const _0x14aad8=[];_0x20885d['length']>0x0&&_0x14aad8['push'](_0x20885d['length']+_0x292582(0x20a)),_0x1563e7['length']>0x0&&_0x14aad8['push'](_0x1563e7[_0x292582(0x1e2)]+'\x20local'),console['log'](_0x217c56+_0x292582(0x204)+_0x14aad8[_0x292582(0x22a)](',\x20')+')'),_0x391aa8&&console[_0x292582(0x1ff)](_0x292582(0x217)+bold(_0x391aa8)),console[_0x292582(0x1ff)](_0x292582(0x1f3));}else{for(const _0x1ff3af of _0x20885d){const _0x15aa13=_0x1ff3af['name']===_0x391aa8?_0x440016['kQBwF']:'';console['log']('\x20\x20'+bold(_0x1ff3af[_0x292582(0x235)])+_0x292582(0x21c)+_0x15aa13);const _0x20859b=_0x1ff3af['sessionUpdatedAt']?_0x292582(0x238)+_0x1ff3af['sessionUpdatedAt']+')':_0x440016[_0x292582(0x208)];console['log'](_0x292582(0x24a)+_0x20859b);}const _0x3b51d4=new Set(_0x20885d['map'](_0x3b27c1=>_0x3b27c1[_0x292582(0x235)]));for(const _0x34d269 of _0x1563e7){if(_0x3b51d4[_0x292582(0x23b)](_0x34d269['name']))continue;const _0x20b0c5=_0x34d269[_0x292582(0x242)]?_0x440016[_0x292582(0x1e6)]:'',_0x5e6a49=_0x34d269[_0x292582(0x1ec)]?_0x440016[_0x292582(0x24d)]:_0x34d269[_0x292582(0x228)]?_0x440016['BuYfm']:_0x292582(0x248);console['log']('\x20\x20'+_0x440016[_0x292582(0x23f)](bold,_0x34d269['name'])+'\x20[local]'+_0x20b0c5),console['log'](_0x292582(0x20b)+_0x5e6a49),_0x34d269['settingsPath']!=='(not\x20found)'&&console[_0x292582(0x1ff)]('\x20\x20\x20\x20Settings:\x20'+link(_0x34d269['settingsPath'],basename(_0x34d269['settingsPath'])));}if(!_0x391aa8){console['log'](_0x292582(0x21d));const _0x55e03d=[..._0x20885d[_0x292582(0x22d)](_0x818daf=>_0x818daf['name']),..._0x1563e7['filter'](_0x5886a3=>!_0x3b51d4['has'](_0x5886a3['name']))[_0x292582(0x22d)](_0x3e3f5d=>_0x3e3f5d['name'])];console['log'](_0x292582(0x1e4)+_0x55e03d[_0x292582(0x22a)](',\x20')+')');}}}console['log']('');}