@ranger-testing/ranger-cli 3.0.1-alpha.f6aba6c-32 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/sessionCache.js +1 -1
  71. package/build/commands/utils/settings.js +1 -1
  72. package/build/commands/utils/skillContent.js +1 -1
  73. package/build/commands/utils/skills.js +1 -1
  74. package/build/commands/utils/stitchWebmFiles.js +1 -1
  75. package/build/commands/utils/telemetry.js +1 -1
  76. package/build/commands/utils/tokenRefresh.js +1 -1
  77. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  78. package/build/commands/utils/tunnelClient.js +1 -0
  79. package/build/commands/utils/userApi.js +1 -1
  80. package/build/commands/utils/version.js +1 -1
  81. package/build/commands/verifyFeature.js +1 -1
  82. package/build/commands/verifyFeatureCli.js +1 -1
  83. package/build/commands/verifyFeatureNovaCli.js +1 -1
  84. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  85. package/package.json +3 -1
@@ -1 +1 @@
1
- (function(_0x2a0ba2,_0x529f92){const _0x21c2d8=_0x4326,_0x13304e=_0x2a0ba2();while(!![]){try{const _0x3abc3a=-parseInt(_0x21c2d8(0xec))/0x1*(parseInt(_0x21c2d8(0xf2))/0x2)+-parseInt(_0x21c2d8(0xf6))/0x3*(-parseInt(_0x21c2d8(0xe8))/0x4)+parseInt(_0x21c2d8(0xef))/0x5*(parseInt(_0x21c2d8(0xea))/0x6)+-parseInt(_0x21c2d8(0xf5))/0x7+parseInt(_0x21c2d8(0xe7))/0x8*(parseInt(_0x21c2d8(0xe9))/0x9)+-parseInt(_0x21c2d8(0xf4))/0xa*(parseInt(_0x21c2d8(0xe6))/0xb)+-parseInt(_0x21c2d8(0xf0))/0xc;if(_0x3abc3a===_0x529f92)break;else _0x13304e['push'](_0x13304e['shift']());}catch(_0x270a7a){_0x13304e['push'](_0x13304e['shift']());}}}(_0xdad1,0x5b3be));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x4326(_0x306595,_0x4652b0){_0x306595=_0x306595-0xe5;const _0xdad11f=_0xdad1();let _0x4326e1=_0xdad11f[_0x306595];return _0x4326e1;}import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0xdad1(){const _0x246249=['2082198BdvyXi','mYPJK','\x0a✅\x20Logged\x20in\x20to\x20','tLZCL','1767821vTnHPy','16QflqeR','4gYPGvk','3024783plDzmM','6RsqdpV','\x0a✅\x20API\x20key\x20stored\x20successfully','676743lkUTFo','MSzAT','Re-authenticating\x20via\x20MCP\x20bootstrap...','3316405mGllbp','9681420GctUVZ','oErtP','2vurkgV','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','10RTvTtj','81116ESKyzg'];_0xdad1=function(){return _0x246249;};return _0xdad1();}export async function login(){const _0xd49a00=_0x4326,_0x96b2d5={'MSzAT':_0xd49a00(0xee),'oErtP':function(_0x30ce90){return _0x30ce90();},'mYPJK':_0xd49a00(0xf3),'tLZCL':_0xd49a00(0xeb),'riuRb':function(_0x1f6d99,_0x1741ed){return _0x1f6d99 instanceof _0x1741ed;}},_0x2a3d58=await getMcpAuthOrigin();if(_0x2a3d58){console['log'](_0x96b2d5[_0xd49a00(0xed)]),await _0x96b2d5[_0xd49a00(0xf1)](mcpBootstrap);return;}if(!_0x96b2d5['oErtP'](isInteractive))throw new Error(_0x96b2d5[_0xd49a00(0xf7)]);try{const _0x74fcad=await runDeviceAuthFlow(),_0xa991d=await getCurrentUser(_0x74fcad);_0xa991d['success']?console['log'](_0xd49a00(0xf8)+_0xa991d['user']['organizationName']):console['log'](_0x96b2d5[_0xd49a00(0xe5)]);}catch(_0x1f7d45){throw new Error('Login\x20failed:\x20'+(_0x96b2d5['riuRb'](_0x1f7d45,Error)?_0x1f7d45['message']:_0x1f7d45));}}
1
+ function _0x1e60(_0x5e08b4,_0x50e590){_0x5e08b4=_0x5e08b4-0x19c;const _0x4ea17b=_0x4ea1();let _0x1e609f=_0x4ea17b[_0x5e08b4];return _0x1e609f;}(function(_0x18e44d,_0x5645a3){const _0x44ea06=_0x1e60,_0x305916=_0x18e44d();while(!![]){try{const _0x1b0d54=-parseInt(_0x44ea06(0x1a8))/0x1*(-parseInt(_0x44ea06(0x1ab))/0x2)+parseInt(_0x44ea06(0x1aa))/0x3*(parseInt(_0x44ea06(0x1a4))/0x4)+parseInt(_0x44ea06(0x19e))/0x5*(-parseInt(_0x44ea06(0x1a9))/0x6)+-parseInt(_0x44ea06(0x19f))/0x7+-parseInt(_0x44ea06(0x1a1))/0x8+-parseInt(_0x44ea06(0x1a2))/0x9+parseInt(_0x44ea06(0x19d))/0xa;if(_0x1b0d54===_0x5645a3)break;else _0x305916['push'](_0x305916['shift']());}catch(_0x1f3f8b){_0x305916['push'](_0x305916['shift']());}}}(_0x4ea1,0xd230d));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x4ea1(){const _0x5d29c8=['Re-authenticating\x20via\x20MCP\x20bootstrap...','\x0a✅\x20API\x20key\x20stored\x20successfully','3968vfOeUK','12ZorcOF','11241oIrEAh','316xGohjt','user','29888230JHuQpG','1672740uhQyNG','7853027EjiUFf','vcyTU','13469608ucznzJ','3402351WWmizc','YgktG','1172JbijKB','Login\x20failed:\x20'];_0x4ea1=function(){return _0x5d29c8;};return _0x4ea1();}import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0x3a5ccd=_0x1e60,_0x11f243={'vSueR':_0x3a5ccd(0x1a6),'YgktG':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','tTIJZ':function(_0x17f4cc){return _0x17f4cc();},'HGlnx':function(_0x34faba,_0x459071){return _0x34faba(_0x459071);},'vcyTU':_0x3a5ccd(0x1a7),'HsSWD':function(_0x1f9df0,_0x1f5c63){return _0x1f9df0 instanceof _0x1f5c63;}},_0x59bb81=await getMcpAuthOrigin();if(_0x59bb81){console['log'](_0x11f243['vSueR']),await mcpBootstrap();return;}if(!isInteractive())throw new Error(_0x11f243[_0x3a5ccd(0x1a3)]);try{const _0x34f49b=await _0x11f243['tTIJZ'](runDeviceAuthFlow),_0x1aa757=await _0x11f243['HGlnx'](getCurrentUser,_0x34f49b);_0x1aa757['success']?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x1aa757[_0x3a5ccd(0x19c)]['organizationName']):console['log'](_0x11f243[_0x3a5ccd(0x1a0)]);}catch(_0x408fe3){throw new Error(_0x3a5ccd(0x1a5)+(_0x11f243['HsSWD'](_0x408fe3,Error)?_0x408fe3['message']:_0x408fe3));}}
@@ -1 +1 @@
1
- const _0x4a88ee=_0x21a5;(function(_0x3f0e99,_0xa1710d){const _0x4fbde9=_0x21a5,_0x3ab1b7=_0x3f0e99();while(!![]){try{const _0x216381=-parseInt(_0x4fbde9(0x1c9))/0x1*(-parseInt(_0x4fbde9(0x19d))/0x2)+parseInt(_0x4fbde9(0x19c))/0x3*(parseInt(_0x4fbde9(0x1e3))/0x4)+-parseInt(_0x4fbde9(0x21c))/0x5*(parseInt(_0x4fbde9(0x222))/0x6)+parseInt(_0x4fbde9(0x1de))/0x7*(parseInt(_0x4fbde9(0x209))/0x8)+-parseInt(_0x4fbde9(0x214))/0x9+-parseInt(_0x4fbde9(0x1c0))/0xa+-parseInt(_0x4fbde9(0x1df))/0xb*(parseInt(_0x4fbde9(0x1d4))/0xc);if(_0x216381===_0xa1710d)break;else _0x3ab1b7['push'](_0x3ab1b7['shift']());}catch(_0x2704de){_0x3ab1b7['push'](_0x3ab1b7['shift']());}}}(_0x6b29,0x43e34));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','mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),'.ranger',_0x4a88ee(0x200));export async function getMcpAuthOrigin(){const _0x285a20=_0x4a88ee,_0x5d1726={'WHCbq':_0x285a20(0x1a9)};try{const _0x3a75d6=(await readFile(AUTH_ORIGIN_PATH,_0x5d1726[_0x285a20(0x20f)]))['trim']();return _0x3a75d6||null;}catch{return null;}}export async function mcpBootstrap(){const _0x40394c=_0x4a88ee,_0x5b3e4b={'LaEQs':function(_0x18e52e){return _0x18e52e();},'ysCNE':function(_0x4cb788,_0x563d63){return _0x4cb788===_0x563d63;},'QMNJg':'proxied','QkWjD':function(_0x5ae7e8,_0x30ef17,_0x3e70b0){return _0x5ae7e8(_0x30ef17,_0x3e70b0);}},_0x562a41=_0x5b3e4b['LaEQs'](getMcpAuthUrl);currentOrigin=_0x562a41;const _0x1e964f=process['stdout'][_0x40394c(0x1e1)]??![];console[_0x40394c(0x203)](_0x40394c(0x1f6)+_0x562a41+'\x0a');const _0x5d40b0=await tryUnauthenticated(_0x562a41);let _0x87c441=null;if(_0x5b3e4b[_0x40394c(0x1a0)](_0x5d40b0,_0x5b3e4b[_0x40394c(0x219)]))_0x87c441='';else{_0x87c441=await loadCachedToken();if(!_0x87c441){if(!_0x1e964f)throw new Error(_0x40394c(0x1ae)+_0x40394c(0x1ef));_0x87c441=await oauthFlow(_0x562a41);}}await _0x5b3e4b['QkWjD'](callGetCliToken,_0x562a41,_0x87c441);}async function tryUnauthenticated(_0x1d13b3){const _0x4c9b5d=_0x4a88ee,_0x2344c9={'QJWAN':'application/json','wSjaP':'application/json,\x20text/event-stream','SzIbO':_0x4c9b5d(0x1c7),'QuTkx':_0x4c9b5d(0x1c3),'HeohI':function(_0x1df242,_0x1a905e){return _0x1df242===_0x1a905e;}},_0x58df0a=await fetch(_0x1d13b3,{'method':'POST','headers':{'Content-Type':_0x2344c9['QJWAN'],'Accept':_0x2344c9[_0x4c9b5d(0x1c8)]},'body':JSON['stringify']({'jsonrpc':_0x2344c9[_0x4c9b5d(0x21a)],'id':0x1,'method':'initialize','params':{'protocolVersion':_0x2344c9[_0x4c9b5d(0x1b1)],'capabilities':{},'clientInfo':{'name':'ranger-cli','version':_0x4c9b5d(0x212)}}})});if(_0x58df0a['ok'])return await _0x58df0a['text'](),'proxied';if(_0x2344c9[_0x4c9b5d(0x21e)](_0x58df0a['status'],0x191))return await _0x58df0a[_0x4c9b5d(0x1f2)](),'needs-oauth';const _0xfe82fb=await _0x58df0a[_0x4c9b5d(0x1f2)]();throw new Error(_0x4c9b5d(0x1ec)+_0x58df0a[_0x4c9b5d(0x1b7)]+':\x20'+_0xfe82fb);}class OAuthTimeoutError extends Error{constructor(_0x15888e){super(_0x15888e),this['name']='OAuthTimeoutError';}}function _0x21a5(_0x5886fb,_0x8cac93){_0x5886fb=_0x5886fb-0x191;const _0x6b29bd=_0x6b29();let _0x21a5dd=_0x6b29bd[_0x5886fb];return _0x21a5dd;}function _0x6b29(){const _0x468a28=['WHCbq','listen','headers','1.0.0','Initializing\x20MCP\x20session...','3761469fXZLXo','result','code_challenge','YneAx','text/event-stream','QMNJg','SzIbO','Jnvqm','280565ThqJLY','update','HeohI','<html><body><h2>Authentication\x20failed</h2><p>','/callback','registration_endpoint','18BfoSDU','LVgzG','platform','PIcnf','refresh_token','trim','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','expires_in','stringify','MCP\x20initialize\x20failed:\x20','1641051vtTsaH','2UYgNkG','Unknown\x20error','\x20done','ysCNE','QoIWn','expiresAt','access_token','RbGdw','token_endpoint','accessToken','yEqoU','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','utf-8','application/json','hex','base64url','toString','MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','content','data:','QuTkx','type','OAuth\x20error:\x20','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','TZAjR','stdout','status','jzhxD','get_cli_token\x20failed:\x20','clientId','length','Token\x20exchange\x20failed:\x20','writeHead','MTRnZ','svgOs','2426740QxExRI','error','string','2025-03-26','duJAJ','KJssv','MqPQT','2.0','wSjaP','380227VHLZGY','startsWith','pathname','isError','searchParams','haSKD','Authorization','ZBfrK','http://localhost:','127.0.0.1','OyOaT','12xKUJjq','Registering\x20OAuth\x20client...','resource','now','set','error_description','tTFlm','Tixij','Client\x20registration\x20failed:\x20','FzVVI','49TLKSGL','99286xhHDJl','token','isTTY','origin','4dfIwuw','KxOBd','write','get','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','message','GrLtp','slice','ecURx','MCP\x20server\x20returned\x20HTTP\x20','code','client_secret','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','url','xKxKL','text','Exchanging\x20authorization\x20code...','clientSecret','bWLMc','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','OykVe','json','XEnnI','S256','end','parse','Not\x20found','start','tools/call','auth-origin.txt','.ranger','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','log','content-type','get_cli_token','HTTP\x20','POST','replace','215776mBFPNh','response_type','nYgRL','client_id','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a','iJHUm'];_0x6b29=function(){return _0x468a28;};return _0x6b29();}async function oauthFlow(_0x151195){const _0x3c9294=_0x4a88ee,_0x1a7552={'RbGdw':function(_0x2a1647,_0x238404){return _0x2a1647(_0x238404);},'MTRnZ':function(_0x19e1ab){return _0x19e1ab();},'KxOBd':function(_0x4855ad,_0xea4e7a){return _0x4855ad(_0xea4e7a);}};try{return await _0x1a7552[_0x3c9294(0x1a4)](oauthFlowAttempt,_0x151195);}catch(_0x9206da){if(_0x9206da instanceof OAuthTimeoutError&&await _0x1a7552[_0x3c9294(0x1be)](loadCachedClient))return console[_0x3c9294(0x203)](_0x3c9294(0x198)),await clearCachedClient(),await _0x1a7552[_0x3c9294(0x1e4)](oauthFlowAttempt,_0x151195);throw _0x9206da;}}async function oauthFlowAttempt(_0x32ffd8){const _0x31295e=_0x4a88ee,_0x4822d1={'MqPQT':function(_0x453dd0,_0x1b989b){return _0x453dd0(_0x1b989b);},'vEtiI':function(_0x4e1ef9){return _0x4e1ef9();},'XEnnI':'authorization_code','Jqubg':'none','bWLMc':_0x31295e(0x196),'ecURx':'sha256','TZAjR':_0x31295e(0x1ab),'LVgzG':_0x31295e(0x20a),'nYgRL':_0x31295e(0x1fa),'HraCO':_0x31295e(0x1d6),'EELMx':function(_0x217025,_0x457459){return _0x217025(_0x457459);},'QYTps':'POST','FmZRy':'application/x-www-form-urlencoded','Tixij':function(_0x57ae03,_0x58ab5c,_0x157dcd,_0x5a3d5d){return _0x57ae03(_0x58ab5c,_0x157dcd,_0x5a3d5d);}},_0x33e7e9=_0x32ffd8[_0x31295e(0x208)](/\/mcp$/,'');process[_0x31295e(0x1b6)]['write']('Discovering\x20authorization\x20server...');const _0x2191a4=await fetch(_0x33e7e9+'/.well-known/oauth-protected-resource');if(!_0x2191a4['ok'])throw new Error('Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server');const _0x338fb1=await _0x2191a4[_0x31295e(0x1f8)](),_0x41f495=_0x338fb1['authorization_servers']?.[0x0];if(!_0x41f495)throw new Error(_0x31295e(0x197));console[_0x31295e(0x203)]('\x20'+_0x41f495);const _0x2303ff=await _0x4822d1[_0x31295e(0x1c6)](fetchAuthServerMetadata,_0x41f495);let _0x256cc7,_0x1a3086;const _0x54551f=await _0x4822d1['vEtiI'](loadCachedClient);if(_0x54551f)_0x256cc7=_0x54551f[_0x31295e(0x1ba)],_0x1a3086=_0x54551f[_0x31295e(0x1f4)];else{if(_0x2303ff[_0x31295e(0x221)]){process['stdout']['write'](_0x31295e(0x1d5));const _0x39395d=await fetch(_0x2303ff['registration_endpoint'],{'method':_0x31295e(0x207),'headers':{'Content-Type':_0x31295e(0x1aa)},'body':JSON[_0x31295e(0x19a)]({'client_name':'Ranger\x20CLI','redirect_uris':['http://localhost:'+CALLBACK_PORT+_0x31295e(0x220)],'grant_types':[_0x4822d1['XEnnI'],_0x31295e(0x194)],'response_types':['code'],'token_endpoint_auth_method':_0x4822d1['Jqubg']})});if(!_0x39395d['ok']){const _0x205408=await _0x39395d[_0x31295e(0x1f2)]();throw new Error(_0x31295e(0x1dc)+_0x205408);}const _0xd37d26=await _0x39395d[_0x31295e(0x1f8)]();_0x256cc7=_0xd37d26[_0x31295e(0x20c)],_0x1a3086=_0xd37d26[_0x31295e(0x1ee)],await saveCachedClient(_0x256cc7,_0x1a3086),console['log']('\x20done');}else throw new Error(_0x4822d1[_0x31295e(0x1f5)]);}const _0x37437a=_0x4822d1['MqPQT'](randomBytes,0x20)['toString'](_0x31295e(0x1ac)),_0x224c1a=createHash(_0x4822d1[_0x31295e(0x1eb)])[_0x31295e(0x21d)](_0x37437a)['digest'](_0x31295e(0x1ac)),_0x3c38b8=randomBytes(0x10)['toString'](_0x4822d1[_0x31295e(0x1b5)]),_0x1432bc=new URL(_0x2303ff['authorization_endpoint']);_0x1432bc[_0x31295e(0x1cd)][_0x31295e(0x1d8)](_0x4822d1[_0x31295e(0x191)],_0x31295e(0x1ed)),_0x1432bc['searchParams']['set'](_0x31295e(0x20c),_0x256cc7),_0x1432bc[_0x31295e(0x1cd)]['set']('redirect_uri',_0x31295e(0x1d1)+CALLBACK_PORT+_0x31295e(0x220)),_0x1432bc[_0x31295e(0x1cd)]['set'](_0x31295e(0x216),_0x224c1a),_0x1432bc[_0x31295e(0x1cd)]['set']('code_challenge_method',_0x4822d1[_0x31295e(0x20b)]),_0x1432bc[_0x31295e(0x1cd)][_0x31295e(0x1d8)]('state',_0x3c38b8);_0x338fb1['resource']&&_0x1432bc['searchParams']['set'](_0x4822d1['HraCO'],_0x338fb1[_0x31295e(0x1d6)]);console['log']('\x0aOpening\x20browser\x20for\x20authentication...'),console[_0x31295e(0x203)](_0x31295e(0x1a8)+_0x1432bc['toString']()+'\x0a'),await _0x4822d1['EELMx'](openBrowser,_0x1432bc[_0x31295e(0x1ad)]());const _0x177375=await _0x4822d1['EELMx'](waitForCallback,_0x3c38b8);process['stdout']['write'](_0x31295e(0x1f3));const _0x2d07a9=new URLSearchParams({'grant_type':_0x4822d1[_0x31295e(0x1f9)],'code':_0x177375,'redirect_uri':_0x31295e(0x1d1)+CALLBACK_PORT+'/callback','client_id':_0x256cc7,'code_verifier':_0x37437a});_0x1a3086&&_0x2d07a9['set'](_0x31295e(0x1ee),_0x1a3086);_0x338fb1['resource']&&_0x2d07a9['set']('resource',_0x338fb1['resource']);const _0x2b295f=await fetch(_0x2303ff[_0x31295e(0x1a5)],{'method':_0x4822d1['QYTps'],'headers':{'Content-Type':_0x4822d1['FmZRy']},'body':_0x2d07a9});if(!_0x2b295f['ok']){const _0x4c5f9a=await _0x2b295f['text']();throw new Error(_0x31295e(0x1bc)+_0x4c5f9a);}const _0x2c8124=await _0x2b295f['json']();return console['log'](_0x31295e(0x19f)),await _0x4822d1[_0x31295e(0x1db)](saveCachedToken,_0x2c8124[_0x31295e(0x1a3)],_0x2c8124[_0x31295e(0x194)],_0x2c8124[_0x31295e(0x199)]),_0x2c8124['access_token'];}async function callGetCliToken(_0x1ba37c,_0x268e00){const _0x576bdb=_0x4a88ee,_0x5980bf={'GrLtp':function(_0x2e690a,_0x143530){return _0x2e690a(_0x143530);},'YneAx':'ranger-cli','vsFih':_0x576bdb(0x212),'dIvJZ':'POST','yEqoU':'2.0','rWsom':'Requesting\x20CLI\x20token...','svgOs':_0x576bdb(0x1ff),'sUwaA':_0x576bdb(0x205),'iJHUm':_0x576bdb(0x19f),'PIcnf':function(_0x504eb8,_0x423646,_0xe920d4){return _0x504eb8(_0x423646,_0xe920d4);},'FzVVI':function(_0x58fa2e,_0x4594e7,_0x238920){return _0x58fa2e(_0x4594e7,_0x238920);},'KJssv':_0x576bdb(0x20d)},_0xa455d6={'Content-Type':'application/json','Accept':'application/json,\x20text/event-stream'};_0x268e00&&(_0xa455d6[_0x576bdb(0x1cf)]='Bearer\x20'+_0x268e00);const _0x47ef79=async _0x5ee0b2=>{const _0xf91859=_0x576bdb,_0x36bfcc=await fetch(_0x1ba37c,{'method':_0xf91859(0x207),'headers':_0xa455d6,'body':JSON[_0xf91859(0x19a)](_0x5ee0b2)});if(!_0x36bfcc['ok']){const _0x26799f=await _0x36bfcc[_0xf91859(0x1f2)]();throw new Error(_0xf91859(0x206)+_0x36bfcc[_0xf91859(0x1b7)]+':\x20'+_0x26799f);}return parseResponse(_0x36bfcc);};process['stdout'][_0x576bdb(0x1e5)](_0x576bdb(0x213));const _0x18d5d9=await _0x5980bf[_0x576bdb(0x1e9)](_0x47ef79,{'jsonrpc':'2.0','id':0x1,'method':'initialize','params':{'protocolVersion':_0x576bdb(0x1c3),'capabilities':{},'clientInfo':{'name':_0x5980bf[_0x576bdb(0x217)],'version':_0x5980bf['vsFih']}}});if(_0x18d5d9[_0x576bdb(0x1c1)])throw new Error(_0x576bdb(0x19b)+(_0x18d5d9[_0x576bdb(0x1c1)]['message']??JSON['stringify'](_0x18d5d9['error'])));console['log'](_0x576bdb(0x19f)),await fetch(_0x1ba37c,{'method':_0x5980bf['dIvJZ'],'headers':_0xa455d6,'body':JSON['stringify']({'jsonrpc':_0x5980bf[_0x576bdb(0x1a7)],'method':'notifications/initialized'})})['then'](_0x537493=>_0x537493[_0x576bdb(0x1f2)]()),process[_0x576bdb(0x1b6)][_0x576bdb(0x1e5)](_0x5980bf['rWsom']);const _0x388a5a=await _0x47ef79({'jsonrpc':'2.0','id':0x2,'method':_0x5980bf[_0x576bdb(0x1bf)],'params':{'name':_0x5980bf['sUwaA'],'arguments':{}}});if(_0x388a5a[_0x576bdb(0x1c1)])throw new Error(_0x576bdb(0x1b9)+(_0x388a5a[_0x576bdb(0x1c1)][_0x576bdb(0x1e8)]??JSON[_0x576bdb(0x19a)](_0x388a5a[_0x576bdb(0x1c1)])));console['log'](_0x5980bf[_0x576bdb(0x20e)]);const _0x1966dd=extractToken(_0x388a5a[_0x576bdb(0x215)]);if(!_0x1966dd){console['error']('\x0aUnexpected\x20response\x20structure:'),console[_0x576bdb(0x1c1)](JSON['stringify'](_0x388a5a['result'],null,0x2));throw new Error(_0x576bdb(0x1b4));}const _0x590fa5=_0x5980bf[_0x576bdb(0x193)](join,homedir(),_0x576bdb(0x201)),_0x39ee57=_0x5980bf[_0x576bdb(0x193)](join,_0x590fa5,'refresh.txt');await mkdir(_0x590fa5,{'recursive':!![]}),await writeFile(_0x39ee57,_0x1966dd,{'mode':0x180}),await writeFile(_0x5980bf[_0x576bdb(0x1dd)](join,_0x590fa5,_0x576bdb(0x200)),_0x1ba37c,{'mode':0x180}),console[_0x576bdb(0x203)]('\x0aToken\x20written\x20to\x20'+_0x39ee57),console['log'](_0x5980bf[_0x576bdb(0x1c5)]);}async function fetchAuthServerMetadata(_0x581bd1){const _0x2f895f=_0x4a88ee,_0x4cf5f6={'HizIP':function(_0x733f7f,_0x39af99){return _0x733f7f(_0x39af99);}},_0x5ca7be=_0x581bd1+'/.well-known/oauth-authorization-server',_0x57c537=await _0x4cf5f6['HizIP'](fetch,_0x5ca7be);if(!_0x57c537['ok'])throw new Error('Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20'+_0x5ca7be+':\x20'+_0x57c537[_0x2f895f(0x1b7)]);return _0x57c537['json']();}function waitForCallback(_0x160e19){const _0x243f58=_0x4a88ee,_0xdc4a43={'LPXLv':function(_0x142a57,_0x5bbbdc){return _0x142a57(_0x5bbbdc);},'haSKD':_0x243f58(0x1e7),'hVcTR':_0x243f58(0x1fd),'mpmdO':'text/html'};return new Promise((_0x2c3c9d,_0xe410b0)=>{const _0x4ab29f=_0x243f58,_0x551312={'CMnYb':function(_0x156736,_0x49dabd){return _0xdc4a43['LPXLv'](_0x156736,_0x49dabd);},'tTFlm':_0xdc4a43[_0x4ab29f(0x1ce)],'MFdum':_0x4ab29f(0x220),'hsvzN':_0xdc4a43['hVcTR'],'TRXAV':_0x4ab29f(0x1d9),'piQCE':_0xdc4a43['mpmdO']},_0x30f808=()=>{_0x1fe6b3['closeAllConnections'](),_0x1fe6b3['close']();},_0x2f6782=setTimeout(()=>{const _0xe83ddd=_0x4ab29f;_0x30f808(),_0x551312['CMnYb'](_0xe410b0,new OAuthTimeoutError(_0x551312[_0xe83ddd(0x1da)]));},0x1d4c0),_0x1fe6b3=createServer((_0x422434,_0x4651ae)=>{const _0x587053=_0x4ab29f,_0x1ae2ec=new URL(_0x422434[_0x587053(0x1f0)]??'/','http://localhost:'+CALLBACK_PORT);if(_0x1ae2ec[_0x587053(0x1cb)]!==_0x551312['MFdum']){_0x4651ae['writeHead'](0x194),_0x4651ae['end'](_0x551312['hsvzN']);return;}const _0x4a697a=_0x1ae2ec['searchParams']['get']('code'),_0x151b18=_0x1ae2ec[_0x587053(0x1cd)]['get']('state'),_0x42cd87=_0x1ae2ec[_0x587053(0x1cd)][_0x587053(0x1e6)]('error');if(_0x42cd87){const _0x5ef7ba=_0x1ae2ec['searchParams'][_0x587053(0x1e6)](_0x551312['TRXAV'])??_0x42cd87;_0x4651ae[_0x587053(0x1bd)](0xc8,{'Content-Type':'text/html'}),_0x4651ae[_0x587053(0x1fb)](_0x587053(0x21f)+_0x5ef7ba+'</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>'),clearTimeout(_0x2f6782),_0x30f808(),_0xe410b0(new Error(_0x587053(0x1b3)+_0x5ef7ba));return;}if(!_0x4a697a||_0x151b18!==_0x160e19){_0x4651ae[_0x587053(0x1bd)](0x190,{'Content-Type':_0x551312['piQCE']}),_0x4651ae[_0x587053(0x1fb)]('<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>');return;}_0x4651ae['writeHead'](0xc8,{'Content-Type':_0x551312['piQCE']}),_0x4651ae['end']('<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>'),_0x551312['CMnYb'](clearTimeout,_0x2f6782),_0x30f808(),_0x2c3c9d(_0x4a697a);});_0x1fe6b3[_0x4ab29f(0x210)](CALLBACK_PORT,_0x4ab29f(0x1d2));});}async function openBrowser(_0x800528){const _0x2bbc4a=_0x4a88ee,_0x4d7fa5={'OZnkb':function(_0x261fe1,_0x27e09a){return _0x261fe1===_0x27e09a;},'LNiSP':'open','jzhxD':_0x2bbc4a(0x1fe),'NZBAH':function(_0x838866,_0x383cc1){return _0x838866(_0x383cc1);}},_0x22afbd=_0x4d7fa5['OZnkb'](process[_0x2bbc4a(0x192)],'darwin')?_0x4d7fa5['LNiSP']:process['platform']==='win32'?_0x4d7fa5[_0x2bbc4a(0x1b8)]:'xdg-open';_0x4d7fa5['NZBAH'](exec,_0x22afbd+'\x20\x22'+_0x800528+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x211f18=_0x4a88ee,_0x5d117f={'QSsEq':_0x211f18(0x1a9)};try{const _0x2dabc7=JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x5d117f['QSsEq']));if(_0x2dabc7['origin']&&_0x2dabc7['origin']!==currentOrigin)return null;if(_0x2dabc7['expiresAt']&&Date['now']()>_0x2dabc7[_0x211f18(0x1a2)])return null;return _0x2dabc7['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x38febb,_0x391c6f,_0x2f5ff0){const _0x237487=_0x4a88ee,_0x2012a8={'QoIWn':function(_0x28358c,_0x22f1bc){return _0x28358c+_0x22f1bc;},'xKxKL':function(_0x429d00,_0x292c5b,_0x408b19){return _0x429d00(_0x292c5b,_0x408b19);},'QQAeq':function(_0x53016d){return _0x53016d();},'TMKTU':function(_0x21b4ea,_0x325965,_0x45f85b,_0x16ac67){return _0x21b4ea(_0x325965,_0x45f85b,_0x16ac67);}},_0x67a170=await loadCachedData(),_0x1bf0b2={..._0x67a170,'origin':currentOrigin,'accessToken':_0x38febb,'refreshToken':_0x391c6f??_0x67a170?.['refreshToken'],'expiresAt':_0x2f5ff0?_0x2012a8[_0x237487(0x1a1)](Date[_0x237487(0x1d7)](),_0x2f5ff0*0x3e8):undefined};await mkdir(_0x2012a8[_0x237487(0x1f1)](join,_0x2012a8['QQAeq'](homedir),'.ranger'),{'recursive':!![]}),await _0x2012a8['TMKTU'](writeFile,TOKEN_CACHE_PATH,JSON[_0x237487(0x19a)](_0x1bf0b2),{'mode':0x180});}async function loadCachedClient(){const _0x59a4d4=_0x4a88ee,_0x5d2bd8={'ZBfrK':function(_0x11eb1d,_0x5de9c2){return _0x11eb1d!==_0x5de9c2;}},_0x4c9a57=await loadCachedData();if(_0x4c9a57?.[_0x59a4d4(0x1e2)]&&_0x5d2bd8[_0x59a4d4(0x1d0)](_0x4c9a57[_0x59a4d4(0x1e2)],currentOrigin))return null;return _0x4c9a57?.['clientId']?{'clientId':_0x4c9a57[_0x59a4d4(0x1ba)],'clientSecret':_0x4c9a57[_0x59a4d4(0x1f4)]}:null;}async function clearCachedClient(){const _0x56e926=_0x4a88ee,_0x377da6={'OyOaT':function(_0x34295b,_0x20c608,_0x4cd267,_0x50740b){return _0x34295b(_0x20c608,_0x4cd267,_0x50740b);}},_0x4fdede=await loadCachedData();if(!_0x4fdede)return;const {clientId:_0x344eee,clientSecret:_0x10b811,..._0x53fd8f}=_0x4fdede;await _0x377da6[_0x56e926(0x1d3)](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x53fd8f),{'mode':0x180});}async function saveCachedClient(_0x2cbaea,_0x42a192){const _0x5e52d5=_0x4a88ee,_0x41fd9b={'duJAJ':function(_0x5adec4,_0x32f05e,_0x5b3192){return _0x5adec4(_0x32f05e,_0x5b3192);},'nSDWq':function(_0xc0e5e7){return _0xc0e5e7();}},_0x4f7ee9=await loadCachedData(),_0x143b8d={..._0x4f7ee9,'origin':currentOrigin,'accessToken':_0x4f7ee9?.[_0x5e52d5(0x1a6)]??'','clientId':_0x2cbaea,'clientSecret':_0x42a192};await mkdir(_0x41fd9b[_0x5e52d5(0x1c4)](join,_0x41fd9b['nSDWq'](homedir),_0x5e52d5(0x201)),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x143b8d),{'mode':0x180});}async function loadCachedData(){const _0x2bd3a2=_0x4a88ee;try{return JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x2bd3a2(0x1a9)));}catch{return null;}}async function parseResponse(_0x47c2a3){const _0x58fe8a=_0x4a88ee,_0x404e8b={'UbcxN':_0x58fe8a(0x202)},_0x88680a=_0x47c2a3[_0x58fe8a(0x211)][_0x58fe8a(0x1e6)](_0x58fe8a(0x204))??'';if(_0x88680a['includes'](_0x58fe8a(0x218))){const _0x320f06=await _0x47c2a3['text']();for(const _0x1491cd of _0x320f06['split']('\x0a')){const _0x3fe98e=_0x1491cd['trim']();if(_0x3fe98e[_0x58fe8a(0x1ca)]('data:')){const _0x3c490a=_0x3fe98e[_0x58fe8a(0x1ea)](_0x58fe8a(0x1b0)[_0x58fe8a(0x1bb)])[_0x58fe8a(0x195)]();if(!_0x3c490a)continue;try{const _0x19497a=JSON[_0x58fe8a(0x1fc)](_0x3c490a);if(_0x19497a['id']!==undefined||_0x19497a['error'])return _0x19497a;}catch{}}}throw new Error(_0x404e8b['UbcxN']);}return _0x47c2a3['json']();}function extractToken(_0x42d1cb){const _0x47fa7b=_0x4a88ee,_0x4dd83c={'XslIo':_0x47fa7b(0x19e),'OykVe':'text','YKpzk':function(_0x290509,_0x2e9d3b){return _0x290509===_0x2e9d3b;},'Jnvqm':_0x47fa7b(0x1c2)};if(!_0x42d1cb)return null;const _0x2997eb=_0x42d1cb['structuredContent'];if(_0x2997eb?.['token']&&typeof _0x2997eb['token']==='string')return _0x2997eb['token'];if(_0x42d1cb[_0x47fa7b(0x1cc)]){const _0x3b6526=_0x42d1cb['content'];throw new Error('Server\x20returned\x20error:\x20'+(_0x3b6526?.[0x0]?.[_0x47fa7b(0x1f2)]??_0x4dd83c['XslIo']));}const _0x45005a=_0x42d1cb[_0x47fa7b(0x1af)];if(_0x45005a)for(const _0x4077a0 of _0x45005a){if(_0x4077a0[_0x47fa7b(0x1b2)]===_0x4dd83c[_0x47fa7b(0x1f7)]&&_0x4077a0['text']){try{const _0x5e0bb1=JSON[_0x47fa7b(0x1fc)](_0x4077a0['text']);if(_0x4dd83c['YKpzk'](typeof _0x5e0bb1?.[_0x47fa7b(0x1e0)],_0x4dd83c[_0x47fa7b(0x21b)]))return _0x5e0bb1[_0x47fa7b(0x1e0)];}catch{}const _0x18c478=_0x4077a0[_0x47fa7b(0x1f2)]['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x18c478)return _0x18c478[0x1];}}return null;}
1
+ const _0x481865=_0xb0f8;(function(_0x3c88a3,_0x139728){const _0x41f235=_0xb0f8,_0x1339d8=_0x3c88a3();while(!![]){try{const _0x12c4b0=-parseInt(_0x41f235(0x1c2))/0x1+-parseInt(_0x41f235(0x18d))/0x2+-parseInt(_0x41f235(0x1e4))/0x3*(-parseInt(_0x41f235(0x176))/0x4)+-parseInt(_0x41f235(0x181))/0x5+-parseInt(_0x41f235(0x196))/0x6+parseInt(_0x41f235(0x19a))/0x7*(parseInt(_0x41f235(0x16a))/0x8)+parseInt(_0x41f235(0x1c6))/0x9;if(_0x12c4b0===_0x139728)break;else _0x1339d8['push'](_0x1339d8['shift']());}catch(_0x28fd9f){_0x1339d8['push'](_0x1339d8['shift']());}}}(_0x29fc,0x30470));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',_0x481865(0x159)),AUTH_ORIGIN_PATH=join(homedir(),_0x481865(0x1ac),_0x481865(0x1ab));export async function getMcpAuthOrigin(){const _0x284daf=_0x481865;try{const _0x41c7aa=(await readFile(AUTH_ORIGIN_PATH,'utf-8'))[_0x284daf(0x17b)]();return _0x41c7aa||null;}catch{return null;}}export async function mcpBootstrap(){const _0xd1b0a1=_0x481865,_0x7d0097={'ddrhU':function(_0x2d20da){return _0x2d20da();},'PaINh':function(_0x578131,_0x10bce1){return _0x578131(_0x10bce1);},'UinUz':function(_0x42c7f2,_0x2fb9b4){return _0x42c7f2===_0x2fb9b4;},'hMLyv':'proxied','GoWJS':function(_0xffa10d){return _0xffa10d();},'ShlCL':'MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','tNtdd':'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','eqVCi':function(_0x219dea,_0x161322,_0x15bef7){return _0x219dea(_0x161322,_0x15bef7);}},_0x2edc93=_0x7d0097[_0xd1b0a1(0x167)](getMcpAuthUrl);currentOrigin=_0x2edc93;const _0x1ad6a7=process['stdout']['isTTY']??![];console[_0xd1b0a1(0x1df)](_0xd1b0a1(0x1d3)+_0x2edc93+'\x0a');const _0x10c5c8=await _0x7d0097['PaINh'](tryUnauthenticated,_0x2edc93);let _0x838c96=null;if(_0x7d0097['UinUz'](_0x10c5c8,_0x7d0097['hMLyv']))_0x838c96='';else{_0x838c96=await _0x7d0097[_0xd1b0a1(0x1d4)](loadCachedToken);if(!_0x838c96){if(!_0x1ad6a7)throw new Error(_0x7d0097[_0xd1b0a1(0x1d5)]+_0x7d0097[_0xd1b0a1(0x199)]);_0x838c96=await _0x7d0097[_0xd1b0a1(0x17a)](oauthFlow,_0x2edc93);}}await _0x7d0097[_0xd1b0a1(0x1dd)](callGetCliToken,_0x2edc93,_0x838c96);}async function tryUnauthenticated(_0x3a232e){const _0x1e90d3=_0x481865,_0x3c605f={'SgifR':_0x1e90d3(0x1c9),'qiGxw':_0x1e90d3(0x155),'oDUXf':_0x1e90d3(0x194),'PIsxJ':_0x1e90d3(0x1b2),'JHmHM':'1.0.0','pGfIg':_0x1e90d3(0x1cd),'adGvR':_0x1e90d3(0x177)},_0x343aa3=await fetch(_0x3a232e,{'method':_0x3c605f[_0x1e90d3(0x174)],'headers':{'Content-Type':'application/json','Accept':_0x3c605f['qiGxw']},'body':JSON[_0x1e90d3(0x18a)]({'jsonrpc':_0x3c605f['oDUXf'],'id':0x1,'method':'initialize','params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x3c605f[_0x1e90d3(0x17e)],'version':_0x3c605f[_0x1e90d3(0x175)]}}})});if(_0x343aa3['ok'])return await _0x343aa3['text'](),_0x3c605f['pGfIg'];if(_0x343aa3[_0x1e90d3(0x1d7)]===0x191)return await _0x343aa3[_0x1e90d3(0x15a)](),_0x3c605f[_0x1e90d3(0x1b7)];const _0x1f276e=await _0x343aa3['text']();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0x343aa3['status']+':\x20'+_0x1f276e);}function _0x29fc(){const _0x23b2d3=['stdout','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','GoWJS','ShlCL','response_type','status','notifications/initialized','http://localhost:','expiresAt','then','split','eqVCi','HTTP\x20','log','Server\x20returned\x20error:\x20','QrjDs','Requesting\x20CLI\x20token...','RoRIV','12JaCwwU','application/json,\x20text/event-stream','\x0aToken\x20written\x20to\x20','darwin','exFNz','mcp-oauth-tokens.json','text','authorization_endpoint','parse','accessToken','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','IokQB','get_cli_token\x20failed:\x20','jGAWt','weKsZ','application/json','ZCXiV','write','error','ddrhU','initialize','code','72SqBBbj','PZroR','type','string','content-type','Unknown\x20error','otwyD','rUGuz','eSHMU','refresh_token','SgifR','JHmHM','24848VredvZ','needs-oauth','127.0.0.1','clientSecret','PaINh','trim','content','SttxF','PIsxJ','MCP\x20initialize\x20failed:\x20','pathname','1003220GHuHNs','Token\x20exchange\x20failed:\x20','lZCSH','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','zpakI','writeHead','token_endpoint','base64url','resource','stringify','client_id','/callback','389144QXnYYC','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','json','tcjAY','application/x-www-form-urlencoded','isError','iPZTE','2.0','lpOGo','2268690ADiHcE','update','now','tNtdd','281687HcehXD','clientId','IDJbA','headers','client_secret','message','win32','IzDWe','redirect_uri','searchParams','AvmzX','Bearer\x20','Not\x20found','xqtVx','listen','text/html','token','auth-origin.txt','.ranger','end','result','expires_in','1.0.0','fKTED','ranger-cli','toString','ncOeN','GVllo','Exchanging\x20authorization\x20code...','adGvR','\x20done','cVlTJ','refresh.txt','MKjoK','JuWQG','closeAllConnections','\x0aOpening\x20browser\x20for\x20authentication...','qqTSo','digest','authorization_code','307083IsbVzP','refreshToken','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','state','8020269ZIFoAy','access_token','ZfGwF','POST','origin','lwxQE','yhxLj','proxied','set','Client\x20registration\x20failed:\x20','WuJBy'];_0x29fc=function(){return _0x23b2d3;};return _0x29fc();}class OAuthTimeoutError extends Error{constructor(_0x50e085){const _0x1c73dd=_0x481865,_0x4c6d13={'exFNz':'OAuthTimeoutError'};super(_0x50e085),this['name']=_0x4c6d13[_0x1c73dd(0x158)];}}async function oauthFlow(_0x36ac27){const _0x2f9c49=_0x481865,_0x37a254={'scujT':function(_0x3c959a,_0x237d2f){return _0x3c959a instanceof _0x237d2f;},'XZUzE':'\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','hOYLL':function(_0x32fcbf){return _0x32fcbf();},'drlcS':function(_0x388c58,_0x12253f){return _0x388c58(_0x12253f);}};try{return await oauthFlowAttempt(_0x36ac27);}catch(_0x481d02){if(_0x37a254['scujT'](_0x481d02,OAuthTimeoutError)&&await loadCachedClient())return console[_0x2f9c49(0x1df)](_0x37a254['XZUzE']),await _0x37a254['hOYLL'](clearCachedClient),await _0x37a254['drlcS'](oauthFlowAttempt,_0x36ac27);throw _0x481d02;}}async function oauthFlowAttempt(_0x24965b){const _0x3a8e99=_0x481865,_0x39b303={'mEcTH':'Discovering\x20authorization\x20server...','GzNvP':'No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','SttxF':function(_0x277808,_0x2bdcd1){return _0x277808(_0x2bdcd1);},'JuWQG':'application/json','otwyD':'Ranger\x20CLI','qqTSo':_0x3a8e99(0x1c1),'WuJBy':'none','SBfqk':function(_0x58d5a0,_0x584286,_0x286d3e){return _0x58d5a0(_0x584286,_0x286d3e);},'lkRyr':_0x3a8e99(0x1b8),'PMfej':'base64url','weKsZ':'sha256','jHJuG':'hex','FJLmA':_0x3a8e99(0x1d6),'rUGuz':_0x3a8e99(0x169),'jGAWt':'state','tzXse':_0x3a8e99(0x1be),'RcRjK':_0x3a8e99(0x1b6),'cNXpe':_0x3a8e99(0x19e),'loWOz':'resource','cVlTJ':function(_0x2aa8b1,_0x213abc,_0x40790c){return _0x2aa8b1(_0x213abc,_0x40790c);},'zpakI':_0x3a8e99(0x1c9)},_0x53ef27=_0x24965b['replace'](/\/mcp$/,'');process['stdout']['write'](_0x39b303['mEcTH']);const _0x1bb5bd=await fetch(_0x53ef27+'/.well-known/oauth-protected-resource');if(!_0x1bb5bd['ok'])throw new Error('Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server');const _0x445fcf=await _0x1bb5bd[_0x3a8e99(0x18f)](),_0x5ac987=_0x445fcf['authorization_servers']?.[0x0];if(!_0x5ac987)throw new Error(_0x39b303['GzNvP']);console[_0x3a8e99(0x1df)]('\x20'+_0x5ac987);const _0x3d20b0=await _0x39b303['SttxF'](fetchAuthServerMetadata,_0x5ac987);let _0x3598b3,_0x57655d;const _0x1bac7f=await loadCachedClient();if(_0x1bac7f)_0x3598b3=_0x1bac7f[_0x3a8e99(0x19b)],_0x57655d=_0x1bac7f['clientSecret'];else{if(_0x3d20b0['registration_endpoint']){process['stdout']['write']('Registering\x20OAuth\x20client...');const _0xc4af97=await fetch(_0x3d20b0['registration_endpoint'],{'method':_0x3a8e99(0x1c9),'headers':{'Content-Type':_0x39b303[_0x3a8e99(0x1bc)]},'body':JSON[_0x3a8e99(0x18a)]({'client_name':_0x39b303[_0x3a8e99(0x170)],'redirect_uris':['http://localhost:'+CALLBACK_PORT+'/callback'],'grant_types':[_0x39b303[_0x3a8e99(0x1bf)],'refresh_token'],'response_types':[_0x3a8e99(0x169)],'token_endpoint_auth_method':_0x39b303[_0x3a8e99(0x1d0)]})});if(!_0xc4af97['ok']){const _0xd3440e=await _0xc4af97[_0x3a8e99(0x15a)]();throw new Error(_0x3a8e99(0x1cf)+_0xd3440e);}const _0x4dd96c=await _0xc4af97[_0x3a8e99(0x18f)]();_0x3598b3=_0x4dd96c[_0x3a8e99(0x18b)],_0x57655d=_0x4dd96c[_0x3a8e99(0x19e)],await _0x39b303['SBfqk'](saveCachedClient,_0x3598b3,_0x57655d),console['log'](_0x39b303['lkRyr']);}else throw new Error(_0x3a8e99(0x1c4));}const _0x4ba09d=_0x39b303[_0x3a8e99(0x17d)](randomBytes,0x20)[_0x3a8e99(0x1b3)](_0x39b303['PMfej']),_0x1a21a6=_0x39b303['SttxF'](createHash,_0x39b303[_0x3a8e99(0x162)])[_0x3a8e99(0x197)](_0x4ba09d)[_0x3a8e99(0x1c0)](_0x3a8e99(0x188)),_0x5332eb=_0x39b303['SttxF'](randomBytes,0x10)['toString'](_0x39b303['jHJuG']),_0x2b404f=new URL(_0x3d20b0[_0x3a8e99(0x15b)]);_0x2b404f[_0x3a8e99(0x1a3)][_0x3a8e99(0x1ce)](_0x39b303['FJLmA'],_0x39b303[_0x3a8e99(0x171)]),_0x2b404f['searchParams'][_0x3a8e99(0x1ce)](_0x3a8e99(0x18b),_0x3598b3),_0x2b404f[_0x3a8e99(0x1a3)][_0x3a8e99(0x1ce)](_0x3a8e99(0x1a2),_0x3a8e99(0x1d9)+CALLBACK_PORT+'/callback'),_0x2b404f[_0x3a8e99(0x1a3)]['set']('code_challenge',_0x1a21a6),_0x2b404f[_0x3a8e99(0x1a3)]['set']('code_challenge_method','S256'),_0x2b404f['searchParams'][_0x3a8e99(0x1ce)](_0x39b303[_0x3a8e99(0x161)],_0x5332eb);_0x445fcf[_0x3a8e99(0x189)]&&_0x2b404f['searchParams']['set']('resource',_0x445fcf[_0x3a8e99(0x189)]);console['log'](_0x39b303['tzXse']),console[_0x3a8e99(0x1df)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a'+_0x2b404f[_0x3a8e99(0x1b3)]()+'\x0a'),await _0x39b303[_0x3a8e99(0x17d)](openBrowser,_0x2b404f[_0x3a8e99(0x1b3)]());const _0x354a30=await _0x39b303['SttxF'](waitForCallback,_0x5332eb);process['stdout'][_0x3a8e99(0x165)](_0x39b303['RcRjK']);const _0x14d4da=new URLSearchParams({'grant_type':_0x39b303['qqTSo'],'code':_0x354a30,'redirect_uri':_0x3a8e99(0x1d9)+CALLBACK_PORT+_0x3a8e99(0x18c),'client_id':_0x3598b3,'code_verifier':_0x4ba09d});_0x57655d&&_0x14d4da[_0x3a8e99(0x1ce)](_0x39b303['cNXpe'],_0x57655d);_0x445fcf[_0x3a8e99(0x189)]&&_0x14d4da[_0x3a8e99(0x1ce)](_0x39b303['loWOz'],_0x445fcf['resource']);const _0x3f7202=await _0x39b303[_0x3a8e99(0x1b9)](fetch,_0x3d20b0[_0x3a8e99(0x187)],{'method':_0x39b303[_0x3a8e99(0x185)],'headers':{'Content-Type':_0x3a8e99(0x191)},'body':_0x14d4da});if(!_0x3f7202['ok']){const _0x16d896=await _0x3f7202[_0x3a8e99(0x15a)]();throw new Error(_0x3a8e99(0x182)+_0x16d896);}const _0x228e21=await _0x3f7202['json']();return console['log']('\x20done'),await saveCachedToken(_0x228e21[_0x3a8e99(0x1c7)],_0x228e21[_0x3a8e99(0x173)],_0x228e21[_0x3a8e99(0x1af)]),_0x228e21['access_token'];}async function callGetCliToken(_0x4011ac,_0x5c1ecc){const _0xaed81f=_0x481865,_0xdc2e08={'lpOGo':_0xaed81f(0x1c9),'IokQB':function(_0x49671a,_0x329639){return _0x49671a(_0x329639);},'PaPCQ':_0xaed81f(0x163),'GRMee':'Authorization','OqXnm':function(_0x292f4d,_0x44aaf7){return _0x292f4d(_0x44aaf7);},'eSHMU':_0xaed81f(0x168),'fCHyN':_0xaed81f(0x1d8),'MKjoK':_0xaed81f(0x1e2),'ZCXiV':'tools/call','CUeVq':_0xaed81f(0x1b8),'abNyg':_0xaed81f(0x1ac),'lwxQE':function(_0x25f461,_0x2349a8,_0x13a247){return _0x25f461(_0x2349a8,_0x13a247);},'Uuptx':function(_0x3012ce,_0x18ef1e,_0x5a32d6,_0x2b5927){return _0x3012ce(_0x18ef1e,_0x5a32d6,_0x2b5927);},'srvDL':function(_0x49461e,_0x159014,_0xa80e28){return _0x49461e(_0x159014,_0xa80e28);},'tcjAY':'auth-origin.txt'},_0x47775a={'Content-Type':_0xdc2e08['PaPCQ'],'Accept':'application/json,\x20text/event-stream'};_0x5c1ecc&&(_0x47775a[_0xdc2e08['GRMee']]=_0xaed81f(0x1a5)+_0x5c1ecc);const _0x8edfd5=async _0x436bfa=>{const _0x53eb8d=_0xaed81f,_0x2ffa35=await fetch(_0x4011ac,{'method':_0xdc2e08[_0x53eb8d(0x195)],'headers':_0x47775a,'body':JSON[_0x53eb8d(0x18a)](_0x436bfa)});if(!_0x2ffa35['ok']){const _0x54cdd6=await _0x2ffa35['text']();throw new Error(_0x53eb8d(0x1de)+_0x2ffa35['status']+':\x20'+_0x54cdd6);}return _0xdc2e08[_0x53eb8d(0x15f)](parseResponse,_0x2ffa35);};process[_0xaed81f(0x1d1)][_0xaed81f(0x165)]('Initializing\x20MCP\x20session...');const _0x28a5c6=await _0xdc2e08['OqXnm'](_0x8edfd5,{'jsonrpc':_0xaed81f(0x194),'id':0x1,'method':_0xdc2e08[_0xaed81f(0x172)],'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':'ranger-cli','version':_0xaed81f(0x1b0)}}});if(_0x28a5c6['error'])throw new Error(_0xaed81f(0x17f)+(_0x28a5c6['error']['message']??JSON[_0xaed81f(0x18a)](_0x28a5c6['error'])));console['log'](_0xaed81f(0x1b8)),await fetch(_0x4011ac,{'method':_0xaed81f(0x1c9),'headers':_0x47775a,'body':JSON[_0xaed81f(0x18a)]({'jsonrpc':_0xaed81f(0x194),'method':_0xdc2e08['fCHyN']})})[_0xaed81f(0x1db)](_0x428337=>_0x428337[_0xaed81f(0x15a)]()),process['stdout'][_0xaed81f(0x165)](_0xdc2e08[_0xaed81f(0x1bb)]);const _0x1e4f74=await _0x8edfd5({'jsonrpc':_0xaed81f(0x194),'id':0x2,'method':_0xdc2e08[_0xaed81f(0x164)],'params':{'name':'get_cli_token','arguments':{}}});if(_0x1e4f74['error'])throw new Error(_0xaed81f(0x160)+(_0x1e4f74[_0xaed81f(0x166)][_0xaed81f(0x19f)]??JSON['stringify'](_0x1e4f74['error'])));console['log'](_0xdc2e08['CUeVq']);const _0xa1169d=extractToken(_0x1e4f74[_0xaed81f(0x1ae)]);if(!_0xa1169d){console[_0xaed81f(0x166)]('\x0aUnexpected\x20response\x20structure:'),console['error'](JSON['stringify'](_0x1e4f74['result'],null,0x2));throw new Error(_0xaed81f(0x15e));}const _0x3213b5=join(homedir(),_0xdc2e08['abNyg']),_0x39b1cb=_0xdc2e08[_0xaed81f(0x1cb)](join,_0x3213b5,_0xaed81f(0x1ba));await _0xdc2e08['lwxQE'](mkdir,_0x3213b5,{'recursive':!![]}),await _0xdc2e08['Uuptx'](writeFile,_0x39b1cb,_0xa1169d,{'mode':0x180}),await writeFile(_0xdc2e08['srvDL'](join,_0x3213b5,_0xdc2e08[_0xaed81f(0x190)]),_0x4011ac,{'mode':0x180}),console['log'](_0xaed81f(0x156)+_0x39b1cb),console['log']('Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a');}async function fetchAuthServerMetadata(_0x1fc35b){const _0x3569cc=_0x481865,_0x4ed5f4={'TdCyJ':function(_0x49173e,_0x4765d4){return _0x49173e(_0x4765d4);}},_0x1bf9d9=_0x1fc35b+'/.well-known/oauth-authorization-server',_0xf382b1=await _0x4ed5f4['TdCyJ'](fetch,_0x1bf9d9);if(!_0xf382b1['ok'])throw new Error(_0x3569cc(0x1d2)+_0x1bf9d9+':\x20'+_0xf382b1['status']);return _0xf382b1[_0x3569cc(0x18f)]();}function waitForCallback(_0x50cda5){const _0x4bfbb9=_0x481865,_0x3f5369={'odyoa':_0x4bfbb9(0x1c5),'JsPCm':function(_0x1bef96,_0x3f01af){return _0x1bef96(_0x3f01af);},'JysbU':function(_0x43c813,_0x114b8b,_0x10266d){return _0x43c813(_0x114b8b,_0x10266d);},'fKTED':_0x4bfbb9(0x178)};return new Promise((_0x3d86f0,_0x1d269a)=>{const _0x5c4772=_0x4bfbb9,_0x949f71={'IDJbA':_0x5c4772(0x1a6),'QrjDs':'code','vhrZW':_0x3f5369['odyoa'],'OentM':function(_0x838aa2,_0xc654d5){return _0x3f5369['JsPCm'](_0x838aa2,_0xc654d5);},'WpSIJ':function(_0x11c4bd,_0x411c81){return _0x3f5369['JsPCm'](_0x11c4bd,_0x411c81);},'IzDWe':function(_0x345c3b){return _0x345c3b();}},_0xf918e4=()=>{const _0x779ed5=_0x5c4772;_0x1ed889[_0x779ed5(0x1bd)](),_0x1ed889['close']();},_0x27fe07=_0x3f5369['JysbU'](setTimeout,()=>{const _0x3e698f=_0x5c4772;_0xf918e4(),_0x1d269a(new OAuthTimeoutError(_0x3e698f(0x184)));},0x1d4c0),_0x1ed889=_0x3f5369['JsPCm'](createServer,(_0x2bf22c,_0x154f77)=>{const _0x92afc4=_0x5c4772,_0xc06a9c=new URL(_0x2bf22c['url']??'/','http://localhost:'+CALLBACK_PORT);if(_0xc06a9c[_0x92afc4(0x180)]!=='/callback'){_0x154f77['writeHead'](0x194),_0x154f77[_0x92afc4(0x1ad)](_0x949f71[_0x92afc4(0x19c)]);return;}const _0x48fea2=_0xc06a9c[_0x92afc4(0x1a3)]['get'](_0x949f71[_0x92afc4(0x1e1)]),_0x1f231d=_0xc06a9c[_0x92afc4(0x1a3)]['get'](_0x949f71['vhrZW']),_0x29848c=_0xc06a9c[_0x92afc4(0x1a3)]['get']('error');if(_0x29848c){const _0x2fa591=_0xc06a9c[_0x92afc4(0x1a3)]['get']('error_description')??_0x29848c;_0x154f77['writeHead'](0xc8,{'Content-Type':'text/html'}),_0x154f77['end']('<html><body><h2>Authentication\x20failed</h2><p>'+_0x2fa591+'</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>'),clearTimeout(_0x27fe07),_0xf918e4(),_0x949f71['OentM'](_0x1d269a,new Error('OAuth\x20error:\x20'+_0x2fa591));return;}if(!_0x48fea2||_0x1f231d!==_0x50cda5){_0x154f77[_0x92afc4(0x186)](0x190,{'Content-Type':_0x92afc4(0x1a9)}),_0x154f77[_0x92afc4(0x1ad)]('<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>');return;}_0x154f77[_0x92afc4(0x186)](0xc8,{'Content-Type':_0x92afc4(0x1a9)}),_0x154f77['end']('<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>'),_0x949f71['WpSIJ'](clearTimeout,_0x27fe07),_0x949f71[_0x92afc4(0x1a1)](_0xf918e4),_0x3d86f0(_0x48fea2);});_0x1ed889[_0x5c4772(0x1a8)](CALLBACK_PORT,_0x3f5369[_0x5c4772(0x1b1)]);});}async function openBrowser(_0x28e6cd){const _0x1d1d34=_0x481865,_0x2c4d24={'XsiZK':_0x1d1d34(0x157)},_0x4ecae3=process['platform']===_0x2c4d24['XsiZK']?'open':process['platform']===_0x1d1d34(0x1a0)?'start':'xdg-open';exec(_0x4ecae3+'\x20\x22'+_0x28e6cd+'\x22');}function _0xb0f8(_0x254349,_0x4b9035){_0x254349=_0x254349-0x155;const _0x29fc8b=_0x29fc();let _0xb0f857=_0x29fc8b[_0x254349];return _0xb0f857;}let currentOrigin='';async function loadCachedToken(){const _0x55a4ca=_0x481865,_0x367186={'nUybx':'utf-8'};try{const _0x11dbfe=JSON[_0x55a4ca(0x15c)](await readFile(TOKEN_CACHE_PATH,_0x367186['nUybx']));if(_0x11dbfe[_0x55a4ca(0x1ca)]&&_0x11dbfe['origin']!==currentOrigin)return null;if(_0x11dbfe['expiresAt']&&Date[_0x55a4ca(0x198)]()>_0x11dbfe[_0x55a4ca(0x1da)])return null;return _0x11dbfe['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x3ab574,_0xc8096a,_0x1498c6){const _0x394c96=_0x481865,_0x2d729c={'ncOeN':function(_0x9168e6,_0x1c90a2){return _0x9168e6*_0x1c90a2;},'RoRIV':function(_0x5d4e11,_0x1b1616,_0x15301b){return _0x5d4e11(_0x1b1616,_0x15301b);},'iPZTE':function(_0x127565,_0x52a52f,_0x4045a7){return _0x127565(_0x52a52f,_0x4045a7);},'mFHmi':function(_0x53225f,_0x34e3cf,_0x225fd3,_0x5dcff0){return _0x53225f(_0x34e3cf,_0x225fd3,_0x5dcff0);}},_0xba99bf=await loadCachedData(),_0x55efcc={..._0xba99bf,'origin':currentOrigin,'accessToken':_0x3ab574,'refreshToken':_0xc8096a??_0xba99bf?.[_0x394c96(0x1c3)],'expiresAt':_0x1498c6?Date['now']()+_0x2d729c[_0x394c96(0x1b4)](_0x1498c6,0x3e8):undefined};await _0x2d729c[_0x394c96(0x1e3)](mkdir,_0x2d729c[_0x394c96(0x193)](join,homedir(),_0x394c96(0x1ac)),{'recursive':!![]}),await _0x2d729c['mFHmi'](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x55efcc),{'mode':0x180});}async function loadCachedClient(){const _0x379c4a=_0x481865,_0x497a7f={'qRfJy':function(_0x1947a3){return _0x1947a3();},'EPGwO':function(_0x50f1b8,_0x2c98de){return _0x50f1b8!==_0x2c98de;}},_0x433966=await _0x497a7f['qRfJy'](loadCachedData);if(_0x433966?.[_0x379c4a(0x1ca)]&&_0x497a7f['EPGwO'](_0x433966['origin'],currentOrigin))return null;return _0x433966?.[_0x379c4a(0x19b)]?{'clientId':_0x433966['clientId'],'clientSecret':_0x433966[_0x379c4a(0x179)]}:null;}async function clearCachedClient(){const _0x521914=_0x481865,_0x212c1f={'TJcnB':function(_0x2adacd,_0x5f2114,_0x46ed40,_0x1f31c9){return _0x2adacd(_0x5f2114,_0x46ed40,_0x1f31c9);}},_0x507ded=await loadCachedData();if(!_0x507ded)return;const {clientId:_0x218634,clientSecret:_0x5ea2da,..._0x3a1cff}=_0x507ded;await _0x212c1f['TJcnB'](writeFile,TOKEN_CACHE_PATH,JSON[_0x521914(0x18a)](_0x3a1cff),{'mode':0x180});}async function saveCachedClient(_0x5a03e0,_0x2d6b64){const _0x560311=_0x481865,_0x327ac1={'xqtVx':function(_0x427def,_0xae3b1b,_0x10e8c2){return _0x427def(_0xae3b1b,_0x10e8c2);},'yhxLj':function(_0x2639f7){return _0x2639f7();},'mAruO':_0x560311(0x1ac)},_0x412e71=await loadCachedData(),_0x431b0e={..._0x412e71,'origin':currentOrigin,'accessToken':_0x412e71?.[_0x560311(0x15d)]??'','clientId':_0x5a03e0,'clientSecret':_0x2d6b64};await _0x327ac1[_0x560311(0x1a7)](mkdir,join(_0x327ac1[_0x560311(0x1cc)](homedir),_0x327ac1['mAruO']),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x431b0e),{'mode':0x180});}async function loadCachedData(){const _0x272832={'McvLH':function(_0x269da5,_0x1f873f,_0x2c9fc0){return _0x269da5(_0x1f873f,_0x2c9fc0);}};try{return JSON['parse'](await _0x272832['McvLH'](readFile,TOKEN_CACHE_PATH,'utf-8'));}catch{return null;}}async function parseResponse(_0x3c079c){const _0x22abd9=_0x481865,_0x4e0dbd={'ZfGwF':'data:','PZroR':function(_0x3bf1d4,_0x54218d){return _0x3bf1d4!==_0x54218d;},'fQONX':_0x22abd9(0x18e)},_0x5879c4=_0x3c079c[_0x22abd9(0x19d)]['get'](_0x22abd9(0x16e))??'';if(_0x5879c4['includes']('text/event-stream')){const _0x3e2a10=await _0x3c079c[_0x22abd9(0x15a)]();for(const _0xcb2e12 of _0x3e2a10[_0x22abd9(0x1dc)]('\x0a')){const _0x3fe108=_0xcb2e12['trim']();if(_0x3fe108['startsWith'](_0x4e0dbd[_0x22abd9(0x1c8)])){const _0x1ea0c4=_0x3fe108['slice'](_0x4e0dbd[_0x22abd9(0x1c8)]['length'])['trim']();if(!_0x1ea0c4)continue;try{const _0x439076=JSON['parse'](_0x1ea0c4);if(_0x4e0dbd[_0x22abd9(0x16b)](_0x439076['id'],undefined)||_0x439076[_0x22abd9(0x166)])return _0x439076;}catch{}}}throw new Error(_0x4e0dbd['fQONX']);}return _0x3c079c['json']();}function extractToken(_0x12056e){const _0x106511=_0x481865,_0x2ff5c9={'lZCSH':function(_0x56be7d,_0x21a010){return _0x56be7d===_0x21a010;},'GVllo':_0x106511(0x16f),'AvmzX':_0x106511(0x15a),'aolMm':_0x106511(0x16d)};if(!_0x12056e)return null;const _0x2b580f=_0x12056e['structuredContent'];if(_0x2b580f?.['token']&&_0x2ff5c9[_0x106511(0x183)](typeof _0x2b580f['token'],'string'))return _0x2b580f['token'];if(_0x12056e[_0x106511(0x192)]){const _0x1886aa=_0x12056e[_0x106511(0x17c)];throw new Error(_0x106511(0x1e0)+(_0x1886aa?.[0x0]?.['text']??_0x2ff5c9[_0x106511(0x1b5)]));}const _0x4ce85b=_0x12056e['content'];if(_0x4ce85b)for(const _0x61dadd of _0x4ce85b){if(_0x2ff5c9[_0x106511(0x183)](_0x61dadd[_0x106511(0x16c)],_0x2ff5c9[_0x106511(0x1a4)])&&_0x61dadd[_0x106511(0x15a)]){try{const _0x55fb25=JSON[_0x106511(0x15c)](_0x61dadd[_0x106511(0x15a)]);if(_0x2ff5c9[_0x106511(0x183)](typeof _0x55fb25?.[_0x106511(0x1aa)],_0x2ff5c9['aolMm']))return _0x55fb25['token'];}catch{}const _0x102532=_0x61dadd[_0x106511(0x15a)]['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x102532)return _0x102532[0x1];}}return null;}
@@ -1 +1 @@
1
- (function(_0xbfed86,_0x4af2de){var _0x371ab3=_0xd4cb,_0x573228=_0xbfed86();while(!![]){try{var _0x1bf669=parseInt(_0x371ab3(0x12e))/0x1+-parseInt(_0x371ab3(0x132))/0x2+parseInt(_0x371ab3(0x134))/0x3*(parseInt(_0x371ab3(0x13a))/0x4)+parseInt(_0x371ab3(0x136))/0x5*(parseInt(_0x371ab3(0x135))/0x6)+parseInt(_0x371ab3(0x138))/0x7*(-parseInt(_0x371ab3(0x137))/0x8)+-parseInt(_0x371ab3(0x12f))/0x9+parseInt(_0x371ab3(0x13d))/0xa;if(_0x1bf669===_0x4af2de)break;else _0x573228['push'](_0x573228['shift']());}catch(_0x514b31){_0x573228['push'](_0x573228['shift']());}}}(_0x553a,0xc0630));function _0xd4cb(_0xd3abfd,_0x4472ab){_0xd3abfd=_0xd3abfd-0x12e;var _0x553a80=_0x553a();var _0xd4cbb3=_0x553a80[_0xd3abfd];return _0xd4cbb3;}function _0x553a(){var _0x33bd0a=['177369tesQQO','3594RZlbBc','5845godLZN','153704crsFRM','175cpLamS','fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.','4ypSuXl','\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','13508950EnLIGJ','xgnVU','error','662882ATXZPo','11443653SnkFvG','hNCqW','exit','466546KFOhcH','rSKRP'];_0x553a=function(){return _0x33bd0a;};return _0x553a();}export async function migrateProfile(_0x25be8a,_0x5a050d){var _0x5c357b=_0xd4cb,_0x204308={'gHfpX':function(_0x1a74ab,_0x1ea7d8){return _0x1a74ab+_0x1ea7d8;},'rSKRP':function(_0x14ec7c,_0x1e2f95){return _0x14ec7c+_0x1e2f95;},'hNCqW':function(_0x1fc92b,_0x1c159e){return _0x1fc92b+_0x1c159e;},'zWwlm':function(_0x5f3ec7,_0x26817f){return _0x5f3ec7+_0x26817f;},'SKXwN':'ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','xgnVU':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','OeKPW':_0x5c357b(0x13b)};console[_0x5c357b(0x13f)](_0x204308['gHfpX'](_0x204308[_0x5c357b(0x133)](_0x204308['rSKRP'](_0x204308[_0x5c357b(0x130)](_0x204308['zWwlm'](_0x204308['SKXwN']+'\x0a',_0x5c357b(0x13c)),_0x204308[_0x5c357b(0x13e)])+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x204308['OeKPW'])+'\x0a','Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a'),_0x5c357b(0x139))),process[_0x5c357b(0x131)](0x1);}
1
+ (function(_0x665997,_0x3553ec){var _0x200166=_0x4381,_0x34fe4f=_0x665997();while(!![]){try{var _0x4d2a2c=-parseInt(_0x200166(0x203))/0x1+-parseInt(_0x200166(0x1fb))/0x2*(parseInt(_0x200166(0x201))/0x3)+parseInt(_0x200166(0x1f4))/0x4+parseInt(_0x200166(0x205))/0x5*(-parseInt(_0x200166(0x202))/0x6)+parseInt(_0x200166(0x200))/0x7*(-parseInt(_0x200166(0x1fc))/0x8)+parseInt(_0x200166(0x1f6))/0x9*(parseInt(_0x200166(0x1f7))/0xa)+-parseInt(_0x200166(0x1fd))/0xb*(-parseInt(_0x200166(0x204))/0xc);if(_0x4d2a2c===_0x3553ec)break;else _0x34fe4f['push'](_0x34fe4f['shift']());}catch(_0x2aee9b){_0x34fe4f['push'](_0x34fe4f['shift']());}}}(_0x115c,0x5d746));function _0x4381(_0x4963ed,_0x151884){_0x4963ed=_0x4963ed-0x1f4;var _0x115cfe=_0x115c();var _0x43816c=_0x115cfe[_0x4963ed];return _0x43816c;}export async function migrateProfile(_0x3b6c38,_0x5acfc2){var _0x516fa0=_0x4381,_0x2c3baf={'zFNUM':function(_0x3cdff9,_0x4656d4){return _0x3cdff9+_0x4656d4;},'oWGCc':function(_0x2d6e53,_0x5f3e2f){return _0x2d6e53+_0x5f3e2f;},'fefRM':function(_0xd9eac3,_0x2d8a11){return _0xd9eac3+_0x2d8a11;},'cTKgw':_0x516fa0(0x1fa),'yLCIW':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','aFESf':_0x516fa0(0x1f8)};console['error'](_0x2c3baf['zFNUM'](_0x2c3baf['oWGCc'](_0x2c3baf['fefRM'](_0x2c3baf['oWGCc']('ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','\x0a')+_0x516fa0(0x1f9)+_0x2c3baf['cTKgw'],'\x0a')+_0x2c3baf[_0x516fa0(0x1ff)],_0x516fa0(0x206))+'\x0a'+_0x516fa0(0x1f5),_0x2c3baf[_0x516fa0(0x1fe)])),process['exit'](0x1);}function _0x115c(){var _0x2c8258=['\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','754504adcyKu','Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a','9216ObjcBI','460dnTsjC','fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','2BZKlYa','1012120cXoFNn','7290690BRBeqO','aFESf','yLCIW','7PsfxiD','1825467ugghKH','26814fCRrvt','672813Yblbfz','36DfsqgB','485MKcIuo'];_0x115c=function(){return _0x2c8258;};return _0x115c();}
@@ -1 +1 @@
1
- (function(_0x378346,_0x58d679){const _0x66d046=_0x5308,_0x3671c1=_0x378346();while(!![]){try{const _0x400570=-parseInt(_0x66d046(0x10d))/0x1+parseInt(_0x66d046(0x10a))/0x2+parseInt(_0x66d046(0x12e))/0x3+-parseInt(_0x66d046(0x10e))/0x4+parseInt(_0x66d046(0x101))/0x5*(-parseInt(_0x66d046(0x129))/0x6)+parseInt(_0x66d046(0x12d))/0x7+parseInt(_0x66d046(0x106))/0x8;if(_0x400570===_0x58d679)break;else _0x3671c1['push'](_0x3671c1['shift']());}catch(_0x492a07){_0x3671c1['push'](_0x3671c1['shift']());}}}(_0x1dab,0x93ed0));import{join}from'path';import{existsSync}from'fs';import _0x3a64fc from'inquirer';function _0x1dab(){const _0x4c02c1=['marketplace','SKILL.md','ranger-testing/trailhead','pcvTV','ykPLf','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','BGPyG','ranger@trailhead','enable','fBTAQ','❌\x20Failed\x20to\x20install\x20plugin:','--scope','already\x20enabled','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','zIXIF','plugin','trailhead','⚠\x20Failed\x20to\x20enable\x20plugin:','Would\x20you\x20like\x20to\x20install\x20skills?','5413242fBwHTJ','\x0aYou\x20can\x20install\x20manually\x20with:','Where\x20should\x20the\x20plugin\x20be\x20installed?','error','6720147OasUvF','1016268dKwstQ','wantsSkillup','bKUEq','5PnQPAR','UdvJr','push','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','SrOfx','2298344qkgMPG','Project\x20(shared\x20with\x20team\x20via\x20git)','✓\x20Ranger\x20skills\x20already\x20installed','list','1593522UlYudW','prompt','project','538686SFneHd','1344136eymQfi','includes','user','log','BpuFI','add','.claude','aNYHK'];_0x1dab=function(){return _0x4c02c1;};return _0x1dab();}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';function _0x5308(_0x1e36a0,_0x511b58){_0x1e36a0=_0x1e36a0-0x101;const _0x1dab6a=_0x1dab();let _0x5308ee=_0x1dab6a[_0x1e36a0];return _0x5308ee;}export async function ensureClaudePlugin(_0x10392b){const _0x362ab9=_0x5308,_0x577fbf={'YKZrY':function(_0x54bc96,_0x3ff756){return _0x54bc96(_0x3ff756);},'HLtFI':function(_0x546c85,_0x345a57,_0x524760){return _0x546c85(_0x345a57,_0x524760);},'mnqfH':_0x362ab9(0x114),'QnVBz':_0x362ab9(0x11b),'iJArB':'pluginScope','hHSqd':_0x362ab9(0x12b),'SrOfx':_0x362ab9(0x110),'BpuFI':_0x362ab9(0x107),'zIXIF':_0x362ab9(0x10c),'bKUEq':'✓\x20Marketplace\x20already\x20added','UdvJr':function(_0x1aad02,_0xf3b0ed){return _0x1aad02(_0xf3b0ed);},'JvLKS':_0x362ab9(0x118),'nuKAB':'❌\x20Failed\x20to\x20add\x20marketplace:','pPVyO':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','rotUj':_0x362ab9(0x11d),'ykPLf':function(_0x3aa04e,_0x19d790){return _0x3aa04e===_0x19d790;},'Anljn':function(_0x2491a0){return _0x2491a0();},'IHkBj':_0x362ab9(0x12a),'TCwqn':'--scope','ODOrv':function(_0x136a21,_0x5c1478,_0x523cac){return _0x136a21(_0x5c1478,_0x523cac);},'ySZjb':_0x362ab9(0x127),'LHFgg':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x4eb8dc=await isPluginInstalled('ranger@trailhead');if(_0x4eb8dc)return console[_0x362ab9(0x111)]('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x3bd478=_0x577fbf['YKZrY'](existsSync,_0x577fbf['HLtFI'](join,getProjectRoot(),_0x577fbf['mnqfH']));let _0x53d9ac;if(_0x10392b)_0x53d9ac=_0x10392b;else{if(_0x3bd478)_0x53d9ac=_0x362ab9(0x10c);else{console['log'](_0x577fbf['QnVBz']);const _0x5e9d49=await _0x3a64fc[_0x362ab9(0x10b)]([{'type':_0x362ab9(0x109),'name':_0x577fbf['iJArB'],'message':_0x577fbf['hHSqd'],'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x577fbf[_0x362ab9(0x105)]},{'name':_0x577fbf[_0x362ab9(0x112)],'value':_0x577fbf[_0x362ab9(0x124)]}],'default':_0x577fbf[_0x362ab9(0x105)]}]);_0x53d9ac=_0x5e9d49['pluginScope'];}}console['log'](_0x362ab9(0x123)+_0x53d9ac+'\x20level)...\x0a');const _0x5c009b=await _0x577fbf['YKZrY'](isMarketplaceAdded,_0x362ab9(0x126));let _0x1bf305=_0x5c009b;if(_0x5c009b)console['log'](_0x577fbf[_0x362ab9(0x130)]);else{const _0x11ed64=await _0x577fbf[_0x362ab9(0x102)](runClaudeCommand,['plugin',_0x362ab9(0x116),_0x362ab9(0x113),_0x577fbf['JvLKS']]);!_0x11ed64['success']?(console[_0x362ab9(0x12c)](_0x577fbf['nuKAB'],_0x11ed64['error']),console['log']('\x0aYou\x20can\x20install\x20manually\x20with:'),console[_0x362ab9(0x111)](_0x577fbf['pPVyO']),console[_0x362ab9(0x111)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x53d9ac)):_0x1bf305=!![];}if(_0x1bf305){const _0xdc2dea=await runClaudeCommand([_0x362ab9(0x125),'install',_0x577fbf['rotUj'],_0x362ab9(0x121),_0x53d9ac],{'cwd':_0x577fbf['ykPLf'](_0x53d9ac,_0x577fbf['zIXIF'])?_0x577fbf['Anljn'](getProjectRoot):undefined});if(!_0xdc2dea['success'])console['error'](_0x362ab9(0x120),_0xdc2dea[_0x362ab9(0x12c)]),console['log'](_0x577fbf['IHkBj']),console['log'](_0x362ab9(0x104)+_0x53d9ac);else{console[_0x362ab9(0x111)]('✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully');const _0x5f5758=[_0x362ab9(0x125),_0x362ab9(0x11e),_0x362ab9(0x11d)];_0x53d9ac===_0x577fbf[_0x362ab9(0x124)]&&_0x5f5758[_0x362ab9(0x103)](_0x577fbf['TCwqn'],_0x577fbf[_0x362ab9(0x124)]);const _0x19faa3=await _0x577fbf['ODOrv'](runClaudeCommand,_0x5f5758,{'captureOutput':!![],'cwd':_0x577fbf[_0x362ab9(0x11a)](_0x53d9ac,_0x577fbf[_0x362ab9(0x124)])?_0x577fbf['Anljn'](getProjectRoot):undefined}),_0x115d87=_0x19faa3['output']?.[_0x362ab9(0x10f)](_0x362ab9(0x122));!_0x19faa3['success']&&!_0x115d87?console[_0x362ab9(0x12c)](_0x577fbf['ySZjb'],_0x19faa3[_0x362ab9(0x12c)]):console[_0x362ab9(0x111)](_0x577fbf['LHFgg']);}}return!![];}export async function ensureClaudeSkills(_0x23e275){const _0x31f4eb=_0x5308,_0xe13b5c={'pcvTV':function(_0x439aad,_0x22f243,_0x19cc7b,_0x80b285){return _0x439aad(_0x22f243,_0x19cc7b,_0x80b285);},'aNYHK':'ranger','VsGdz':function(_0x335dd8,_0x53a150){return _0x335dd8(_0x53a150);},'fBTAQ':'project','BGPyG':function(_0x6de4a1,_0x4377b1){return _0x6de4a1(_0x4377b1);},'CSunw':function(_0x3f4602){return _0x3f4602();},'yHPsw':function(_0x3e3c89,_0x4a890e){return _0x3e3c89(_0x4a890e);},'CMHUg':'confirm','tZfyA':'wantsSkillup'},_0x57d6a8=existsSync(_0xe13b5c[_0x31f4eb(0x119)](join,getSkillsDir('user'),_0xe13b5c['aNYHK'],_0x31f4eb(0x117))),_0x166fcf=existsSync(join(_0xe13b5c['VsGdz'](getSkillsDir,_0xe13b5c[_0x31f4eb(0x11f)]),_0xe13b5c[_0x31f4eb(0x115)],'SKILL.md'));if(_0x57d6a8||_0x166fcf)return console[_0x31f4eb(0x111)](_0x31f4eb(0x108)),![];const _0x30ad0e=_0xe13b5c[_0x31f4eb(0x11c)](existsSync,join(_0xe13b5c['CSunw'](getProjectRoot),_0x31f4eb(0x114)));let _0x77f0ce=!![];if(_0x23e275)await _0xe13b5c['yHPsw'](skillup,{'autoInstall':_0x23e275,'suppressUsage':!![]});else{if(_0x30ad0e)await skillup({'autoInstall':_0xe13b5c['fBTAQ'],'suppressUsage':!![]});else{const _0x2e9282=await _0x3a64fc[_0x31f4eb(0x10b)]([{'type':_0xe13b5c['CMHUg'],'name':_0xe13b5c['tZfyA'],'message':_0x31f4eb(0x128),'default':!![]}]);_0x77f0ce=_0x2e9282[_0x31f4eb(0x12f)],_0x77f0ce&&await _0xe13b5c[_0x31f4eb(0x11c)](skillup,{'suppressUsage':!![]});}}return _0x77f0ce;}
1
+ (function(_0x25dacd,_0xe49bee){const _0x26896b=_0x5667,_0xafca71=_0x25dacd();while(!![]){try{const _0x577d56=parseInt(_0x26896b(0x1d4))/0x1+-parseInt(_0x26896b(0x1e5))/0x2*(-parseInt(_0x26896b(0x1ba))/0x3)+parseInt(_0x26896b(0x1cc))/0x4+-parseInt(_0x26896b(0x1b2))/0x5+parseInt(_0x26896b(0x1b4))/0x6*(-parseInt(_0x26896b(0x1d7))/0x7)+-parseInt(_0x26896b(0x1cd))/0x8+-parseInt(_0x26896b(0x1c8))/0x9*(-parseInt(_0x26896b(0x1bd))/0xa);if(_0x577d56===_0xe49bee)break;else _0xafca71['push'](_0xafca71['shift']());}catch(_0x33d2ea){_0xafca71['push'](_0xafca71['shift']());}}}(_0x331e,0xa52d3));import{join}from'path';import{existsSync}from'fs';function _0x331e(){const _0x164370=['pzIac','wantsSkillup','⚠\x20Failed\x20to\x20enable\x20plugin:','xvDQx','--scope','HxAAc','tTyTy','WEHlr','12188pmOwqn','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','5442590AUXNZa','install','570966qjylOE','Where\x20should\x20the\x20plugin\x20be\x20installed?','✓\x20Marketplace\x20already\x20added','Would\x20you\x20like\x20to\x20install\x20skills?','kkOjO','\x0aYou\x20can\x20install\x20manually\x20with:','3gayicf','Yluvf','plugin','1240FhgnKk','\x20level)...\x0a','log','.claude','BYESf','Project\x20(shared\x20with\x20team\x20via\x20git)','User\x20(available\x20in\x20all\x20your\x20projects)','WevML','ranger@trailhead','add','wgWHg','162468MPPFiP','VJeyw','yFLOr','dmFmm','3149384TOSMzZ','3560352nFwWIE','push','❌\x20Failed\x20to\x20install\x20plugin:','mlYjT','already\x20enabled','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','UDlkC','34686YPNJAF','success','ranger','63dgCdTb','UKYzC','error','project','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','user'];_0x331e=function(){return _0x164370;};return _0x331e();}import _0x4f01dd from'inquirer';import{skillup}from'../skillup.js';function _0x5667(_0x4149bc,_0x2805ec){_0x4149bc=_0x4149bc-0x1b1;const _0x331eb8=_0x331e();let _0x566786=_0x331eb8[_0x4149bc];return _0x566786;}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x2c5c8b){const _0x700af7=_0x5667,_0x512591={'Yluvf':function(_0xc96271){return _0xc96271();},'wgWHg':_0x700af7(0x1c0),'VJeyw':'list','dmFmm':'pluginScope','tTyTy':_0x700af7(0x1c3),'WRaOR':_0x700af7(0x1dc),'yFLOr':_0x700af7(0x1da),'Xwiey':function(_0x407f64,_0xb1eb6b){return _0x407f64(_0xb1eb6b);},'kkOjO':'marketplace','WEHlr':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','pzIac':function(_0x35c811,_0x2eab61,_0xb77b1f){return _0x35c811(_0x2eab61,_0xb77b1f);},'lKpcM':_0x700af7(0x1bc),'mlYjT':_0x700af7(0x1e1),'LfGSF':function(_0x699916,_0x3d2df4){return _0x699916===_0x3d2df4;},'ZUTFQ':_0x700af7(0x1cf),'oqQTG':function(_0x12c9ee,_0xde4385){return _0x12c9ee===_0xde4385;}},_0x439cd2=await isPluginInstalled('ranger@trailhead');if(_0x439cd2)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x1758af=existsSync(join(_0x512591[_0x700af7(0x1bb)](getProjectRoot),_0x512591[_0x700af7(0x1c7)]));let _0x432fe0;if(_0x2c5c8b)_0x432fe0=_0x2c5c8b;else{if(_0x1758af)_0x432fe0=_0x700af7(0x1da);else{console[_0x700af7(0x1bf)]('\x0a📦\x20Claude\x20Code\x20Plugin\x0a');const _0x177891=await _0x4f01dd['prompt']([{'type':_0x512591[_0x700af7(0x1c9)],'name':_0x512591[_0x700af7(0x1cb)],'message':_0x700af7(0x1b5),'choices':[{'name':_0x512591[_0x700af7(0x1e3)],'value':_0x512591['WRaOR']},{'name':_0x700af7(0x1c2),'value':_0x512591['yFLOr']}],'default':'user'}]);_0x432fe0=_0x177891['pluginScope'];}}console['log'](_0x700af7(0x1d2)+_0x432fe0+_0x700af7(0x1be));const _0x2b0f25=await isMarketplaceAdded('trailhead');let _0x1a0efa=_0x2b0f25;if(_0x2b0f25)console['log'](_0x700af7(0x1b6));else{const _0x5a41f5=await _0x512591['Xwiey'](runClaudeCommand,[_0x700af7(0x1bc),_0x512591[_0x700af7(0x1b8)],_0x700af7(0x1c6),'ranger-testing/trailhead']);!_0x5a41f5[_0x700af7(0x1d5)]?(console['error']('❌\x20Failed\x20to\x20add\x20marketplace:',_0x5a41f5[_0x700af7(0x1d9)]),console['log']('\x0aYou\x20can\x20install\x20manually\x20with:'),console['log'](_0x512591[_0x700af7(0x1e4)]),console['log'](_0x700af7(0x1b1)+_0x432fe0)):_0x1a0efa=!![];}if(_0x1a0efa){const _0x533019=await _0x512591['pzIac'](runClaudeCommand,[_0x512591['lKpcM'],_0x700af7(0x1b3),_0x700af7(0x1c5),_0x512591[_0x700af7(0x1d0)],_0x432fe0],{'cwd':_0x512591['LfGSF'](_0x432fe0,_0x512591[_0x700af7(0x1ca)])?_0x512591['Yluvf'](getProjectRoot):undefined});if(!_0x533019[_0x700af7(0x1d5)])console[_0x700af7(0x1d9)](_0x512591['ZUTFQ'],_0x533019[_0x700af7(0x1d9)]),console['log'](_0x700af7(0x1b9)),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x432fe0);else{console['log'](_0x700af7(0x1db));const _0xd4752c=[_0x700af7(0x1bc),'enable','ranger@trailhead'];_0x512591['oqQTG'](_0x432fe0,_0x700af7(0x1da))&&_0xd4752c[_0x700af7(0x1ce)]('--scope',_0x512591[_0x700af7(0x1ca)]);const _0x5e1773=await _0x512591[_0x700af7(0x1dd)](runClaudeCommand,_0xd4752c,{'captureOutput':!![],'cwd':_0x432fe0===_0x700af7(0x1da)?getProjectRoot():undefined}),_0x23b845=_0x5e1773['output']?.['includes'](_0x700af7(0x1d1));!_0x5e1773['success']&&!_0x23b845?console[_0x700af7(0x1d9)](_0x700af7(0x1df),_0x5e1773['error']):console[_0x700af7(0x1bf)]('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}export async function ensureClaudeSkills(_0x51d3fa){const _0x8ab0ce=_0x5667,_0x352cec={'lMcOa':function(_0x35f528,_0x3ac617,_0x460c92,_0x1c66d8){return _0x35f528(_0x3ac617,_0x460c92,_0x1c66d8);},'QxHtH':_0x8ab0ce(0x1dc),'UDlkC':function(_0x3aca01,_0x2d0fac,_0x142394,_0x46b3f9){return _0x3aca01(_0x2d0fac,_0x142394,_0x46b3f9);},'MeaQg':'ranger','Eqftb':'SKILL.md','XKNla':function(_0x1c3af5,_0xff6ab){return _0x1c3af5||_0xff6ab;},'WevML':'✓\x20Ranger\x20skills\x20already\x20installed','UKYzC':function(_0x44cef7,_0x262613){return _0x44cef7(_0x262613);},'BYESf':_0x8ab0ce(0x1c0),'xvDQx':function(_0x1122cf,_0x28acab){return _0x1122cf(_0x28acab);},'HxAAc':_0x8ab0ce(0x1da),'ixbah':_0x8ab0ce(0x1b7)},_0x20e858=existsSync(_0x352cec['lMcOa'](join,getSkillsDir(_0x352cec['QxHtH']),_0x8ab0ce(0x1d6),'SKILL.md')),_0x3364de=existsSync(_0x352cec[_0x8ab0ce(0x1d3)](join,getSkillsDir(_0x8ab0ce(0x1da)),_0x352cec['MeaQg'],_0x352cec['Eqftb']));if(_0x352cec['XKNla'](_0x20e858,_0x3364de))return console['log'](_0x352cec[_0x8ab0ce(0x1c4)]),![];const _0x47eac4=_0x352cec[_0x8ab0ce(0x1d8)](existsSync,join(getProjectRoot(),_0x352cec[_0x8ab0ce(0x1c1)]));let _0x47ccdd=!![];if(_0x51d3fa)await _0x352cec[_0x8ab0ce(0x1e0)](skillup,{'autoInstall':_0x51d3fa,'suppressUsage':!![]});else{if(_0x47eac4)await _0x352cec[_0x8ab0ce(0x1d8)](skillup,{'autoInstall':_0x352cec[_0x8ab0ce(0x1e2)],'suppressUsage':!![]});else{const _0x4eac82=await _0x4f01dd['prompt']([{'type':'confirm','name':'wantsSkillup','message':_0x352cec['ixbah'],'default':!![]}]);_0x47ccdd=_0x4eac82[_0x8ab0ce(0x1de)],_0x47ccdd&&await skillup({'suppressUsage':!![]});}}return _0x47ccdd;}
@@ -1 +1 @@
1
- (function(_0x23006c,_0x176e5b){const _0x1ea49e=_0x176a,_0x5900f4=_0x23006c();while(!![]){try{const _0x34c6a1=-parseInt(_0x1ea49e(0x1d0))/0x1+parseInt(_0x1ea49e(0x1b4))/0x2+parseInt(_0x1ea49e(0x1cc))/0x3+parseInt(_0x1ea49e(0x1d4))/0x4*(parseInt(_0x1ea49e(0x1be))/0x5)+parseInt(_0x1ea49e(0x1b7))/0x6*(-parseInt(_0x1ea49e(0x1c2))/0x7)+-parseInt(_0x1ea49e(0x1c0))/0x8*(parseInt(_0x1ea49e(0x1bb))/0x9)+parseInt(_0x1ea49e(0x1bd))/0xa*(parseInt(_0x1ea49e(0x1c5))/0xb);if(_0x34c6a1===_0x176e5b)break;else _0x5900f4['push'](_0x5900f4['shift']());}catch(_0x258b1c){_0x5900f4['push'](_0x5900f4['shift']());}}}(_0x40c2,0x7b5d8));import{join}from'path';import{existsSync}from'fs';function _0x176a(_0x36a5d6,_0x4a8056){_0x36a5d6=_0x36a5d6-0x1b2;const _0x40c28f=_0x40c2();let _0x176a18=_0x40c28f[_0x36a5d6];return _0x176a18;}function _0x40c2(){const _0x49ad27=['aypTU','yDVAg','khjPD','error','list','stringify','2281095eNGoQM','xlXcq','plugin','OfQNl','917770GsPsoA','✓\x20OpenCode\x20plugin\x20configured','project','pluginScope','20668AGtEWk','Where\x20should\x20the\x20plugin\x20be\x20installed?','$schema','UYoiP','1489224hVrRYm','@ranger-testing/opencode-plugin','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','102QQYNag','prompt','ppKIo','\x0a📦\x20OpenCode\x20Plugin\x0a','149571qeuQHV','lIYcv','2650QfQoyx','515svWiwb','User\x20(available\x20in\x20all\x20your\x20projects)','32VsDCrc','https://opencode.ai/config.json','407393HrEAhU','parse','SvEOl','18337dkUdeT'];_0x40c2=function(){return _0x49ad27;};return _0x40c2();}import{mkdir,readFile,writeFile}from'fs/promises';import _0x5dc82c from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x5748f7){const _0x1a7253=_0x176a,_0x4155b8={'aypTU':function(_0x36dcbc,_0x580292){return _0x36dcbc(_0x580292);},'ppKIo':function(_0x3ea4f9,_0x2a48d1){return _0x3ea4f9(_0x2a48d1);},'SvEOl':'opencode.json','UYoiP':_0x1a7253(0x1d5),'qfiOu':_0x1a7253(0x1bf),'yDVAg':'user','khjPD':'Project\x20(shared\x20with\x20team\x20via\x20git)','sTojF':'project','cFPgD':_0x1a7253(0x1b5),'xTncQ':function(_0x2291e3,_0x3f7c57){return _0x2291e3(_0x3f7c57);},'OfQNl':function(_0x33eb6c,_0x346cda,_0x28c082){return _0x33eb6c(_0x346cda,_0x28c082);},'ATldi':'utf-8','lIYcv':'Failed\x20to\x20read\x20opencode.json','xlXcq':'✓\x20OpenCode\x20plugin\x20already\x20configured','RCMRT':function(_0xca42a5,_0x319dfa){return _0xca42a5+_0x319dfa;},'Lwlom':_0x1a7253(0x1d1)},_0x1cddf4=_0x4155b8[_0x1a7253(0x1c6)](existsSync,join(_0x4155b8[_0x1a7253(0x1b9)](getOpencodeConfigDir,_0x1a7253(0x1d2)),_0x4155b8[_0x1a7253(0x1c4)]));let _0x2b3c7e;if(_0x5748f7)_0x2b3c7e=_0x5748f7;else{if(_0x1cddf4)_0x2b3c7e='project';else{console['log'](_0x1a7253(0x1ba));const _0x2e846b=await _0x5dc82c[_0x1a7253(0x1b8)]([{'type':_0x1a7253(0x1ca),'name':_0x1a7253(0x1d3),'message':_0x4155b8[_0x1a7253(0x1b3)],'choices':[{'name':_0x4155b8['qfiOu'],'value':_0x4155b8[_0x1a7253(0x1c7)]},{'name':_0x4155b8[_0x1a7253(0x1c8)],'value':_0x4155b8['sTojF']}],'default':_0x4155b8[_0x1a7253(0x1c7)]}]);_0x2b3c7e=_0x2e846b['pluginScope'];}}const _0x4a52a0=join(getOpencodeConfigDir(_0x2b3c7e),'opencode.json'),_0x526647=_0x4155b8['cFPgD'],_0x30bac1=_0x1a7253(0x1c1);let _0x489a6c={};if(_0x4155b8['xTncQ'](existsSync,_0x4a52a0))try{const _0x646686=await _0x4155b8[_0x1a7253(0x1cf)](readFile,_0x4a52a0,_0x4155b8['ATldi']);_0x489a6c=JSON[_0x1a7253(0x1c3)](_0x646686);}catch(_0x949d1a){return console[_0x1a7253(0x1c9)](_0x1a7253(0x1b6)),{'configured':![],'scope':_0x2b3c7e,'error':_0x4155b8[_0x1a7253(0x1bc)],'details':_0x949d1a};}const _0xd0190=Array['isArray'](_0x489a6c[_0x1a7253(0x1ce)])?_0x489a6c[_0x1a7253(0x1ce)]:[];if(_0xd0190['includes'](_0x526647))return console['log'](_0x4155b8[_0x1a7253(0x1cd)]),{'configured':![],'scope':_0x2b3c7e};return _0x489a6c[_0x1a7253(0x1b2)]=_0x489a6c[_0x1a7253(0x1b2)]||_0x30bac1,_0x489a6c[_0x1a7253(0x1ce)]=[..._0xd0190,_0x526647],await mkdir(getOpencodeConfigDir(_0x2b3c7e),{'recursive':!![]}),await _0x4155b8['OfQNl'](writeFile,_0x4a52a0,_0x4155b8['RCMRT'](JSON[_0x1a7253(0x1cb)](_0x489a6c,null,0x2),'\x0a')),console['log'](_0x4155b8['Lwlom']),{'configured':!![],'scope':_0x2b3c7e};}
1
+ function _0x438a(_0x422c77,_0x5087d8){_0x422c77=_0x422c77-0x1e7;const _0x310f80=_0x310f();let _0x438a32=_0x310f80[_0x422c77];return _0x438a32;}(function(_0x11bfa2,_0xbe4f2d){const _0x3aef98=_0x438a,_0x1b28f6=_0x11bfa2();while(!![]){try{const _0x2ca8e5=parseInt(_0x3aef98(0x203))/0x1+parseInt(_0x3aef98(0x1ef))/0x2+parseInt(_0x3aef98(0x1f1))/0x3*(-parseInt(_0x3aef98(0x1e8))/0x4)+parseInt(_0x3aef98(0x1f4))/0x5*(-parseInt(_0x3aef98(0x1ed))/0x6)+-parseInt(_0x3aef98(0x1fc))/0x7+-parseInt(_0x3aef98(0x1f3))/0x8*(parseInt(_0x3aef98(0x1ea))/0x9)+parseInt(_0x3aef98(0x1fd))/0xa;if(_0x2ca8e5===_0xbe4f2d)break;else _0x1b28f6['push'](_0x1b28f6['shift']());}catch(_0x55b192){_0x1b28f6['push'](_0x1b28f6['shift']());}}}(_0x310f,0x2eb6f));import{join}from'path';function _0x310f(){const _0x381272=['$schema','user','2658971aKfhzG','6426830HhSigA','\x0a📦\x20OpenCode\x20Plugin\x0a','pluginScope','plugin','log','opencode.json','349800xmNbMf','zrDXR','44pmkEPI','✓\x20OpenCode\x20plugin\x20configured','451062kRXFSc','DUTHi','User\x20(available\x20in\x20all\x20your\x20projects)','181092TmRTjx','✓\x20OpenCode\x20plugin\x20already\x20configured','107412VwFqwv','lbPVK','50175voWuxr','project','32nYhZyg','15VkSEJV','stringify','Where\x20should\x20the\x20plugin\x20be\x20installed?','https://opencode.ai/config.json','Failed\x20to\x20read\x20opencode.json','isArray'];_0x310f=function(){return _0x381272;};return _0x310f();}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x54a800 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x3b6125){const _0x2391a6=_0x438a,_0x4fb5dc={'lbPVK':function(_0x4ed3f0,_0x53dcb8){return _0x4ed3f0(_0x53dcb8);},'zrDXR':_0x2391a6(0x1f2),'rKWGB':'pluginScope','kdalD':_0x2391a6(0x1f6),'NfMzZ':_0x2391a6(0x1fb),'uKKyL':function(_0x314afb,_0x437fc0,_0x22ae1a){return _0x314afb(_0x437fc0,_0x22ae1a);},'DUTHi':'opencode.json','fmPLb':'@ranger-testing/opencode-plugin','SdPFN':_0x2391a6(0x1f7),'hPTKX':function(_0x439546,_0x36b9a6,_0xc5ca07){return _0x439546(_0x36b9a6,_0xc5ca07);},'srfBf':'utf-8','RrMcO':_0x2391a6(0x1e9)},_0x57befb=_0x4fb5dc[_0x2391a6(0x1f0)](existsSync,join(getOpencodeConfigDir(_0x4fb5dc[_0x2391a6(0x1e7)]),_0x2391a6(0x202)));let _0x58abad;if(_0x3b6125)_0x58abad=_0x3b6125;else{if(_0x57befb)_0x58abad=_0x4fb5dc[_0x2391a6(0x1e7)];else{console[_0x2391a6(0x201)](_0x2391a6(0x1fe));const _0x238161=await _0x54a800['prompt']([{'type':'list','name':_0x4fb5dc['rKWGB'],'message':_0x4fb5dc['kdalD'],'choices':[{'name':_0x2391a6(0x1ec),'value':_0x2391a6(0x1fb)},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x4fb5dc['zrDXR']}],'default':_0x4fb5dc['NfMzZ']}]);_0x58abad=_0x238161[_0x2391a6(0x1ff)];}}const _0x2cedce=_0x4fb5dc['uKKyL'](join,getOpencodeConfigDir(_0x58abad),_0x4fb5dc[_0x2391a6(0x1eb)]),_0x537616=_0x4fb5dc['fmPLb'],_0x46f42e=_0x4fb5dc['SdPFN'];let _0x22ea30={};if(existsSync(_0x2cedce))try{const _0x55bf88=await _0x4fb5dc['hPTKX'](readFile,_0x2cedce,_0x4fb5dc['srfBf']);_0x22ea30=JSON['parse'](_0x55bf88);}catch(_0x1e910e){return console['error']('⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.'),{'configured':![],'scope':_0x58abad,'error':_0x2391a6(0x1f8),'details':_0x1e910e};}const _0x4eaceb=Array[_0x2391a6(0x1f9)](_0x22ea30['plugin'])?_0x22ea30[_0x2391a6(0x200)]:[];if(_0x4eaceb['includes'](_0x537616))return console[_0x2391a6(0x201)](_0x2391a6(0x1ee)),{'configured':![],'scope':_0x58abad};return _0x22ea30[_0x2391a6(0x1fa)]=_0x22ea30['$schema']||_0x46f42e,_0x22ea30[_0x2391a6(0x200)]=[..._0x4eaceb,_0x537616],await mkdir(getOpencodeConfigDir(_0x58abad),{'recursive':!![]}),await writeFile(_0x2cedce,JSON[_0x2391a6(0x1f5)](_0x22ea30,null,0x2)+'\x0a'),console['log'](_0x4fb5dc['RrMcO']),{'configured':!![],'scope':_0x58abad};}
@@ -1 +1 @@
1
- (function(_0x50a89a,_0x1a7e6d){var _0x2e7fbe=_0x2f71,_0x44192a=_0x50a89a();while(!![]){try{var _0x5bbadc=parseInt(_0x2e7fbe(0x1c6))/0x1+-parseInt(_0x2e7fbe(0x1c7))/0x2+-parseInt(_0x2e7fbe(0x1b9))/0x3*(-parseInt(_0x2e7fbe(0x1bd))/0x4)+-parseInt(_0x2e7fbe(0x1c5))/0x5*(parseInt(_0x2e7fbe(0x1c1))/0x6)+parseInt(_0x2e7fbe(0x1c3))/0x7*(-parseInt(_0x2e7fbe(0x1bb))/0x8)+-parseInt(_0x2e7fbe(0x1be))/0x9*(-parseInt(_0x2e7fbe(0x1ca))/0xa)+parseInt(_0x2e7fbe(0x1c4))/0xb*(-parseInt(_0x2e7fbe(0x1bf))/0xc);if(_0x5bbadc===_0x1a7e6d)break;else _0x44192a['push'](_0x44192a['shift']());}catch(_0x54b823){_0x44192a['push'](_0x44192a['shift']());}}}(_0x4ad5,0x266c4));function _0x2f71(_0x1cbf22,_0x4a500a){_0x1cbf22=_0x1cbf22-0x1b9;var _0x4ad520=_0x4ad5();var _0x2f71c8=_0x4ad520[_0x1cbf22];return _0x2f71c8;}export async function setupCi(_0x20d253,_0x3a44b9,_0x47cea4){var _0xfcf6b1=_0x2f71,_0x40a1ed={'qXyfx':function(_0x1c608a,_0x91055d){return _0x1c608a+_0x91055d;},'AMjES':function(_0x79e322,_0x8dc813){return _0x79e322+_0x8dc813;},'lyauI':function(_0x25907e,_0x59a7b8){return _0x25907e+_0x59a7b8;},'DxiCL':function(_0x2602f5,_0x51e142){return _0x2602f5+_0x51e142;},'cBFfB':_0xfcf6b1(0x1c0),'MJhff':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','qpQFH':_0xfcf6b1(0x1c2),'akwdj':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console[_0xfcf6b1(0x1c8)](_0x40a1ed[_0xfcf6b1(0x1ba)](_0x40a1ed['qXyfx'](_0x40a1ed[_0xfcf6b1(0x1bc)](_0x40a1ed[_0xfcf6b1(0x1c9)](_0x40a1ed['AMjES'](_0x40a1ed['DxiCL'](_0x40a1ed['cBFfB'],'\x0a'),_0x40a1ed['MJhff']),_0x40a1ed['qpQFH']),'\x0a'),_0x40a1ed['akwdj']),'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process['exit'](0x1);}function _0x4ad5(){var _0x2610c3=['9522pzOMrz','qXyfx','464pwjqiR','AMjES','272xyLNKb','1377cftEtM','12iHCTMp','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','606KHWrkT','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','12348rbasMS','1936814OAnnHF','11210mmOJyl','277770iNNqqJ','205326MoHtsx','error','lyauI','17730ccsmjM'];_0x4ad5=function(){return _0x2610c3;};return _0x4ad5();}
1
+ (function(_0x3a1a3c,_0x18546e){var _0x3ead8f=_0x1c4f,_0x1aa116=_0x3a1a3c();while(!![]){try{var _0x24ba8d=-parseInt(_0x3ead8f(0x73))/0x1+-parseInt(_0x3ead8f(0x77))/0x2+-parseInt(_0x3ead8f(0x6e))/0x3+parseInt(_0x3ead8f(0x72))/0x4+parseInt(_0x3ead8f(0x76))/0x5+-parseInt(_0x3ead8f(0x78))/0x6*(parseInt(_0x3ead8f(0x70))/0x7)+parseInt(_0x3ead8f(0x75))/0x8;if(_0x24ba8d===_0x18546e)break;else _0x1aa116['push'](_0x1aa116['shift']());}catch(_0x569da2){_0x1aa116['push'](_0x1aa116['shift']());}}}(_0x46d6,0x9d999));function _0x1c4f(_0x45f059,_0x288252){_0x45f059=_0x45f059-0x6c;var _0x46d6d4=_0x46d6();var _0x1c4f9b=_0x46d6d4[_0x45f059];return _0x1c4f9b;}function _0x46d6(){var _0x27d899=['19749512YkVTjr','3295805PatJjD','1431672OACGEA','29244RZxVcR','QbgZs','rAiQw','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','2968341DeYBqO','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','784Ewukvp','hbpIR','3718448FKJDmt','1160762KiSOrs','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'];_0x46d6=function(){return _0x27d899;};return _0x46d6();}export async function setupCi(_0x3a56e9,_0x32ad64,_0x64d297){var _0x182d17=_0x1c4f,_0x59f07a={'QbgZs':function(_0x39bc7e,_0x4bebc1){return _0x39bc7e+_0x4bebc1;},'rAiQw':function(_0x46089a,_0x95f857){return _0x46089a+_0x95f857;},'dVFBF':function(_0x377ae3,_0x1b4443){return _0x377ae3+_0x1b4443;},'bROiw':_0x182d17(0x6d),'hbpIR':_0x182d17(0x6f),'oFYlm':_0x182d17(0x74)};console['error'](_0x59f07a['QbgZs'](_0x59f07a[_0x182d17(0x79)](_0x59f07a[_0x182d17(0x6c)](_0x59f07a['dVFBF']('ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','\x0a'),_0x59f07a['bROiw'])+_0x59f07a[_0x182d17(0x71)],'\x0a'),_0x59f07a['oFYlm'])+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process['exit'](0x1);}
@@ -1 +1 @@
1
- (function(_0x27a1d6,_0x2fb82e){const _0x3f3c4e=_0x2d4f,_0x2760dc=_0x27a1d6();while(!![]){try{const _0x5e7381=parseInt(_0x3f3c4e(0xff))/0x1*(-parseInt(_0x3f3c4e(0xd7))/0x2)+parseInt(_0x3f3c4e(0xf0))/0x3+parseInt(_0x3f3c4e(0xd2))/0x4*(-parseInt(_0x3f3c4e(0xdd))/0x5)+parseInt(_0x3f3c4e(0xda))/0x6*(-parseInt(_0x3f3c4e(0xf2))/0x7)+parseInt(_0x3f3c4e(0xe9))/0x8*(parseInt(_0x3f3c4e(0xd4))/0x9)+-parseInt(_0x3f3c4e(0xef))/0xa*(parseInt(_0x3f3c4e(0xed))/0xb)+-parseInt(_0x3f3c4e(0xfc))/0xc*(-parseInt(_0x3f3c4e(0xd5))/0xd);if(_0x5e7381===_0x2fb82e)break;else _0x2760dc['push'](_0x2760dc['shift']());}catch(_0x21da46){_0x2760dc['push'](_0x2760dc['shift']());}}}(_0x702f,0xb4098));import{basename}from'path';import _0x2d1c81 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';function _0x2d4f(_0x250d8f,_0x13048c){_0x250d8f=_0x250d8f-0xd2;const _0x702f8c=_0x702f();let _0x2d4f5b=_0x702f8c[_0x250d8f];return _0x2d4f5b;}function _0x702f(){const _0x8a2198=['\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','mESjt','Where\x20should\x20skills\x20be\x20installed?','48965088VerIdE','PPalM','IrHUC','11534YQddRe','\x20skill','✓\x20Found\x20API\x20token','SAtzb','1866776DNhNEw','message','327141vimZGM','13iWKjxT','log','140COgtUo','\x20--opencode','project-level','1398dYzTWU','\x0a📦\x20Installing\x20skills...\x0a','zQgDR','5KilPRa','/skills/','\x20<your-api-token>','All\x20projects\x20(','VzXDr','project','KSIQB','imIzs','/.opencode/skills/','sZApP','HjgZU','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','8ibfxdO','installLevel','autoInstall','ExKPt','22GsjQul','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','6145220LRvaoN','1092108swaKyv','To\x20use:','37261IGcETq','isTTY','prompt','user-level','claude','user','\x20\x203.\x20Run:\x20ranger\x20skillup'];_0x702f=function(){return _0x8a2198;};return _0x702f();}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x547eb5={}){const _0x53f47d=_0x2d4f,_0x118563={'KSIQB':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','IrHUC':_0x53f47d(0xf6),'YPpTb':'2|5|3|1|4|0','ExKPt':function(_0x652ba7,_0x39d2b1){return _0x652ba7===_0x39d2b1;},'PPalM':'opencode','HjgZU':'To\x20get\x20started:','VzXDr':_0x53f47d(0x101),'mESjt':function(_0x4e128d,_0x51c834){return _0x4e128d(_0x51c834);},'imIzs':function(_0x153add,_0x264e1b){return _0x153add===_0x264e1b;},'SAtzb':function(_0x3d3b11){return _0x3d3b11();},'JMttJ':_0x53f47d(0xf7),'sZApP':_0x53f47d(0xf1),'ZfBge':_0x53f47d(0xe8),'zQgDR':'\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!','beXkO':_0x53f47d(0xf9)};console[_0x53f47d(0xd6)](_0x118563[_0x53f47d(0xe3)]);const _0x3cc7b6=_0x547eb5['platform']??_0x118563[_0x53f47d(0xfe)],_0x5180bf=await getToken();if(!_0x5180bf){const _0x141086=_0x118563['YPpTb']['split']('|');let _0x136e2f=0x0;while(!![]){switch(_0x141086[_0x136e2f++]){case'0':return;case'1':console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x118563[_0x53f47d(0xec)](_0x3cc7b6,_0x118563[_0x53f47d(0xfd)])?_0x53f47d(0xd8):'')+_0x53f47d(0xdf));continue;case'2':console['log']('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a');continue;case'3':console[_0x53f47d(0xd6)]('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli');continue;case'4':console['log'](_0x53f47d(0xf8)+(_0x3cc7b6==='opencode'?_0x53f47d(0xd8):'')+'\x0a');continue;case'5':console[_0x53f47d(0xd6)](_0x118563[_0x53f47d(0xe7)]);continue;}break;}}console['log'](_0x118563[_0x53f47d(0xe1)]);const _0x4afada=getProjectRoot(),_0x5430c6=_0x118563[_0x53f47d(0xfa)](basename,_0x4afada),_0x2a3078=_0x118563[_0x53f47d(0xe4)](_0x3cc7b6,_0x118563['PPalM'])?getOpencodeConfigDir(_0x53f47d(0xf7))+'/skills/':_0x118563[_0x53f47d(0x102)](getClaudeConfigDir)+_0x53f47d(0xde),_0x368f21=_0x3cc7b6===_0x118563[_0x53f47d(0xfd)]?_0x4afada+_0x53f47d(0xe5):_0x4afada+'/.claude/skills/',_0x37f08c=process['stdin']['isTTY']&&process['stdout'][_0x53f47d(0xf3)];let _0xe5ad6c;if(_0x547eb5[_0x53f47d(0xeb)])_0xe5ad6c=_0x547eb5['autoInstall'];else{if(_0x37f08c){const _0x4778b8=await _0x2d1c81[_0x53f47d(0xf4)]([{'type':'list','name':_0x53f47d(0xea),'message':_0x53f47d(0xfb),'choices':[{'name':_0x53f47d(0xe0)+_0x2a3078+')','value':_0x118563['JMttJ']},{'name':'This\x20project\x20only\x20('+_0x368f21+')','value':_0x53f47d(0xe2)}]}]);_0xe5ad6c=_0x4778b8[_0x53f47d(0xea)];}else _0xe5ad6c=_0x53f47d(0xe2),console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x368f21+')');}let _0x39282e=0x0;const _0x38c2ba=getCurrentVersion();console[_0x53f47d(0xd6)](_0x53f47d(0xdb));try{const _0x1975ee=await installSkill('ranger',{'cliVersion':_0x38c2ba,'level':_0xe5ad6c,'platform':_0x3cc7b6});_0x1975ee&&_0x39282e++;}catch(_0x385119){console['warn'](_0x53f47d(0xee),_0x385119 instanceof Error?_0x385119[_0x53f47d(0xd3)]:_0x385119);}if(_0x39282e>0x0){const _0x300246=_0xe5ad6c===_0x118563['JMttJ']?_0x53f47d(0xf5):_0x53f47d(0xd9);console[_0x53f47d(0xd6)]('\x0a✅\x20Installed\x20'+_0x39282e+'\x20'+_0x300246+_0x53f47d(0x100)+(_0x39282e>0x1?'s':'')+'\x20successfully!\x0a'),!_0x547eb5['suppressUsage']&&(console[_0x53f47d(0xd6)](_0x118563[_0x53f47d(0xe6)]),_0x3cc7b6===_0x118563['PPalM']?console['log'](_0x118563['ZfBge']):console[_0x53f47d(0xd6)](_0x118563[_0x53f47d(0xdc)]));}else console[_0x53f47d(0xd6)](_0x118563['beXkO']);}
1
+ (function(_0x23a3a3,_0x5bd8b0){const _0x2cd117=_0x23e9,_0x2a55eb=_0x23a3a3();while(!![]){try{const _0x178ea3=-parseInt(_0x2cd117(0x127))/0x1*(parseInt(_0x2cd117(0x136))/0x2)+-parseInt(_0x2cd117(0x141))/0x3*(parseInt(_0x2cd117(0x145))/0x4)+parseInt(_0x2cd117(0x12e))/0x5*(-parseInt(_0x2cd117(0x134))/0x6)+-parseInt(_0x2cd117(0x152))/0x7*(-parseInt(_0x2cd117(0x130))/0x8)+parseInt(_0x2cd117(0x12b))/0x9*(-parseInt(_0x2cd117(0x144))/0xa)+-parseInt(_0x2cd117(0x147))/0xb+-parseInt(_0x2cd117(0x137))/0xc*(-parseInt(_0x2cd117(0x13c))/0xd);if(_0x178ea3===_0x5bd8b0)break;else _0x2a55eb['push'](_0x2a55eb['shift']());}catch(_0x26b575){_0x2a55eb['push'](_0x2a55eb['shift']());}}}(_0x4941,0xc1c40));import{basename}from'path';import _0x3c011a from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';function _0x23e9(_0x2d9e8d,_0xe4c303){_0x2d9e8d=_0x2d9e8d-0x11f;const _0x494103=_0x4941();let _0x23e90c=_0x494103[_0x2d9e8d];return _0x23e90c;}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';function _0x4941(){const _0x3d310a=['project','45TSxfFG','/.claude/skills/','31992VPRjoW','isTTY','All\x20projects\x20(','log','1052442kHmedc','\x20skill','5310MbqYeW','1615284dIdoth','ranger','prompt','opencode','list','351xmFmtS','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','message','/.opencode/skills/','87618sOpFcS','installLevel','\x20--opencode','338970ZqShjL','148BEfTPJ','kYTGE','582450YQQJzw','jqvSt','MBhbu','autoInstall','stdout','POSZV','1|4|2|3|0|5','\x0a✅\x20Installed\x20','user','\x20<your-api-token>','\x20\x203.\x20Run:\x20ranger\x20skillup','1477ozDxLI','\x0a🎯\x20Ranger\x20Skill\x20Setup\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!','gZPys','TDfZx','wJlbE','mVjtg','ZqeMw','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','213vkSBrc','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','user-level','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','108Qpkjmr','✓\x20Found\x20API\x20token'];_0x4941=function(){return _0x3d310a;};return _0x4941();}export async function skillup(_0x23120c={}){const _0x4e7962=_0x23e9,_0x8ccd80={'GHKIV':_0x4e7962(0x11f),'mVjtg':'claude','TDfZx':_0x4e7962(0x143),'wJlbE':_0x4e7962(0x128),'kYTGE':function(_0x5222c2,_0x476551){return _0x5222c2===_0x476551;},'ZqeMw':_0x4e7962(0x13a),'jqvSt':function(_0x1526d3){return _0x1526d3();},'MBhbu':_0x4e7962(0x13b),'VNQbb':'Where\x20should\x20skills\x20be\x20installed?','Utzjz':_0x4e7962(0x12d),'gZPys':function(_0x33858f,_0x493578,_0x40972e){return _0x33858f(_0x493578,_0x40972e);},'bfPUp':_0x4e7962(0x12a),'YxsTS':function(_0x1f169d,_0x57b35c){return _0x1f169d>_0x57b35c;},'POSZV':_0x4e7962(0x129),'cldex':'project-level','iahnx':'To\x20use:','sxDJe':_0x4e7962(0x120)};console[_0x4e7962(0x133)](_0x8ccd80['GHKIV']);const _0x1ea59b=_0x23120c['platform']??_0x8ccd80[_0x4e7962(0x124)],_0xd3b9cd=await getToken();if(!_0xd3b9cd){const _0xff1a13=_0x4e7962(0x14d)['split']('|');let _0x55eb8d=0x0;while(!![]){switch(_0xff1a13[_0x55eb8d++]){case'0':console['log'](_0x4e7962(0x151)+(_0x1ea59b==='opencode'?_0x8ccd80[_0x4e7962(0x122)]:'')+'\x0a');continue;case'1':console['log'](_0x4e7962(0x13e));continue;case'2':console[_0x4e7962(0x133)](_0x8ccd80[_0x4e7962(0x123)]);continue;case'3':console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x8ccd80['kYTGE'](_0x1ea59b,_0x8ccd80[_0x4e7962(0x125)])?_0x4e7962(0x143):'')+_0x4e7962(0x150));continue;case'4':console['log']('To\x20get\x20started:');continue;case'5':return;}break;}}console[_0x4e7962(0x133)](_0x4e7962(0x12c));const _0x55de8c=getProjectRoot(),_0x160720=basename(_0x55de8c),_0x2d76a2=_0x8ccd80[_0x4e7962(0x146)](_0x1ea59b,_0x8ccd80[_0x4e7962(0x125)])?getOpencodeConfigDir(_0x4e7962(0x14f))+'/skills/':_0x8ccd80['jqvSt'](getClaudeConfigDir)+'/skills/',_0x4e1b2e=_0x1ea59b===_0x8ccd80[_0x4e7962(0x125)]?_0x55de8c+_0x4e7962(0x140):_0x55de8c+_0x4e7962(0x12f),_0x2aa1e6=process['stdin'][_0x4e7962(0x131)]&&process[_0x4e7962(0x14b)][_0x4e7962(0x131)];let _0x2a19d5;if(_0x23120c[_0x4e7962(0x14a)])_0x2a19d5=_0x23120c[_0x4e7962(0x14a)];else{if(_0x2aa1e6){const _0x578cac=await _0x3c011a[_0x4e7962(0x139)]([{'type':_0x8ccd80[_0x4e7962(0x149)],'name':_0x4e7962(0x142),'message':_0x8ccd80['VNQbb'],'choices':[{'name':_0x4e7962(0x132)+_0x2d76a2+')','value':'user'},{'name':'This\x20project\x20only\x20('+_0x4e1b2e+')','value':_0x8ccd80['Utzjz']}]}]);_0x2a19d5=_0x578cac[_0x4e7962(0x142)];}else _0x2a19d5=_0x4e7962(0x12d),console[_0x4e7962(0x133)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x4e1b2e+')');}let _0x43d60b=0x0;const _0x39166e=_0x8ccd80[_0x4e7962(0x148)](getCurrentVersion);console[_0x4e7962(0x133)]('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x1e91e9=await _0x8ccd80[_0x4e7962(0x121)](installSkill,_0x4e7962(0x138),{'cliVersion':_0x39166e,'level':_0x2a19d5,'platform':_0x1ea59b});_0x1e91e9&&_0x43d60b++;}catch(_0x4d919e){console['warn'](_0x8ccd80['bfPUp'],_0x4d919e instanceof Error?_0x4d919e[_0x4e7962(0x13f)]:_0x4d919e);}if(_0x8ccd80['YxsTS'](_0x43d60b,0x0)){const _0x20c3bc=_0x8ccd80[_0x4e7962(0x146)](_0x2a19d5,_0x4e7962(0x14f))?_0x8ccd80[_0x4e7962(0x14c)]:_0x8ccd80['cldex'];console['log'](_0x4e7962(0x14e)+_0x43d60b+'\x20'+_0x20c3bc+_0x4e7962(0x135)+(_0x43d60b>0x1?'s':'')+'\x20successfully!\x0a'),!_0x23120c['suppressUsage']&&(console[_0x4e7962(0x133)](_0x8ccd80['iahnx']),_0x1ea59b==='opencode'?console[_0x4e7962(0x133)](_0x4e7962(0x126)):console[_0x4e7962(0x133)](_0x8ccd80['sxDJe']));}else console[_0x4e7962(0x133)](_0x4e7962(0x13d));}
@@ -1 +1 @@
1
- const _0x5e1827=_0x13e1;(function(_0x2c1f38,_0xeb1e82){const _0x37191c=_0x13e1,_0x27ee03=_0x2c1f38();while(!![]){try{const _0x45d2a4=parseInt(_0x37191c(0x1b2))/0x1+-parseInt(_0x37191c(0x196))/0x2+-parseInt(_0x37191c(0x1c6))/0x3+parseInt(_0x37191c(0x1c5))/0x4*(-parseInt(_0x37191c(0x1bf))/0x5)+-parseInt(_0x37191c(0x1d7))/0x6*(-parseInt(_0x37191c(0x194))/0x7)+parseInt(_0x37191c(0x186))/0x8*(-parseInt(_0x37191c(0x1cc))/0x9)+parseInt(_0x37191c(0x17d))/0xa;if(_0x45d2a4===_0xeb1e82)break;else _0x27ee03['push'](_0x27ee03['shift']());}catch(_0x3919be){_0x27ee03['push'](_0x27ee03['shift']());}}}(_0x332a,0xc8bd6));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x332a(){const _0x1c7d13=['You\x20can\x20install\x20it\x20manually\x20by\x20running:','profile','ZUwfJ','EVpTI','788DjMyCR','231495HGXUBi','VuBeY','ejBeX','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','hWrgb','ouoDp','9aOXsCx','.gitignore','pAkMV','RYAcp','wVrRx','GITHUB_ENV','Jfdcz','chromium','ready','✓\x20Exported\x20credentials\x20for\x20CI','TOVmq','6YgNiHS','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','\x0a❌\x20Profile\x20setup\x20failed:','\x0a⚠\x20Skipping\x20Chromium\x20installation.','skills','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','Validating\x20API\x20token...','existing_token','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','The\x20required\x20version\x20(','✓\x20Created\x20~/.ranger/\x20directory','13003880kSBqTQ','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','\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','\x20install\x20chromium','ymzfR','wRJdl','auth','RZaDz','scope','9328128oxciGV','trackPhaseStart','xHFvC','inherit','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','playwright/package.json','user','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','log','withDeps','win32','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','qunAp','\x0a\x20\x20','8090614UHacXt','trackPhaseEnd','1349810eNuFAx','\x1b[0m','1.58.2','YpYyO','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','\x20\x20npx\x20playwright@','success','utVhW','\x20(fallback\x20version)','dmToO','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','close','✓\x20Authenticated\x20to\x20','skipAuth','resolve','zyLuz','jWmdb','playwright@','ranger\x20profile\x20add\x20<name>','install','auguP','✓\x20Created\x20.ranger/.gitignore','\x1b[1m','version','isTTY','confirm','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','PiLHA','766185ZqBWMR','error','vkkQw','message','device_auth','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','...','JILxd','stdin','skipChromium','✓\x20Playwright\x20Chromium\x20browser\x20found','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','12235AzTjRH','Authentication\x20failed:\x20'];_0x332a=function(){return _0x1c7d13;};return _0x332a();}import{createRequire}from'module';import{spawn}from'child_process';import _0x1d9bd1 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=_0x5e1827(0x198);const bold=_0x562d25=>_0x5e1827(0x1ac)+_0x562d25+_0x5e1827(0x197);export function getPlaywrightVersion(){const _0x50ed3c=_0x5e1827,_0x22c15c={'xHKmT':_0x50ed3c(0x18b)};try{const _0x5aa938=require[_0x50ed3c(0x1a4)](_0x22c15c['xHKmT']),_0x7efab9=require(_0x5aa938);return _0x7efab9[_0x50ed3c(0x1ad)];}catch{return null;}}export function installChromiumBinary(_0x3eb99a,_0x17da00=![]){const _0x56e8d1=_0x5e1827,_0x3547a2={'jWmdb':_0x56e8d1(0x1a9),'IzgWi':'--with-deps','drTbu':function(_0x3c9ff6,_0x4995d7,_0x2f6760,_0x5de9d6){return _0x3c9ff6(_0x4995d7,_0x2f6760,_0x5de9d6);},'NRkgu':'npx','wCYOy':function(_0x550e75,_0x1ccede){return _0x550e75===_0x1ccede;},'hWrgb':_0x56e8d1(0x1a1)};return new Promise((_0x5dae75,_0x37eef7)=>{const _0x29ed4c=_0x56e8d1,_0x4ec41f={'CsrJO':function(_0x5a52d7,_0x9663a4){return _0x5a52d7(_0x9663a4);}},_0x424649=[_0x29ed4c(0x1a7)+_0x3eb99a,_0x3547a2[_0x29ed4c(0x1a6)],..._0x17da00?[_0x3547a2['IzgWi']]:[],'chromium'],_0x2ddad8=_0x3547a2['drTbu'](spawn,_0x3547a2['NRkgu'],_0x424649,{'stdio':['ignore',_0x29ed4c(0x189),'inherit'],'shell':_0x3547a2['wCYOy'](process['platform'],_0x29ed4c(0x190))});_0x2ddad8['on'](_0x3547a2[_0x29ed4c(0x1ca)],_0x26b276=>{_0x26b276===0x0?_0x5dae75():_0x4ec41f['CsrJO'](_0x37eef7,new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x26b276));}),_0x2ddad8['on'](_0x29ed4c(0x1b3),_0x1cc7e4=>{_0x37eef7(_0x1cc7e4);});});}export async function authenticate(_0x1079ae){const _0x2c3bc1=_0x5e1827,_0x504605={'YzwCA':function(_0x25b9de){return _0x25b9de();},'ylWoM':function(_0x5bacfc,_0x478677){return _0x5bacfc(_0x478677);},'pAkMV':_0x2c3bc1(0x1df),'xHFvC':function(_0x34e9dd,_0x1781c2){return _0x34e9dd instanceof _0x1781c2;},'qunAp':_0x2c3bc1(0x1b6),'QVPAM':_0x2c3bc1(0x1de),'ouoDp':'provided_token'};if(!_0x1079ae){const _0x99a313=await _0x504605['YzwCA'](getToken);if(_0x99a313){const _0x5133a9=await _0x504605['ylWoM'](getCurrentUser,_0x99a313);if(_0x5133a9['success'])return console[_0x2c3bc1(0x18e)]('✓\x20Already\x20authenticated\x20to\x20'+_0x5133a9[_0x2c3bc1(0x18c)]['organizationName']),{'token':_0x99a313,'method':_0x504605[_0x2c3bc1(0x1ce)]};}try{_0x1079ae=await runDeviceAuthFlow();}catch(_0x5366d7){throw new Error(_0x2c3bc1(0x1c0)+(_0x504605[_0x2c3bc1(0x188)](_0x5366d7,Error)?_0x5366d7['message']:_0x5366d7));}const _0x3b666a=await getCurrentUser(_0x1079ae);if(!_0x3b666a['success'])throw new Error(_0x2c3bc1(0x1dd)+_0x3b666a['error']);return console[_0x2c3bc1(0x18e)](_0x2c3bc1(0x1a2)+_0x3b666a[_0x2c3bc1(0x18c)]['organizationName']),{'token':_0x1079ae,'method':_0x504605[_0x2c3bc1(0x192)]};}console['log'](_0x504605['QVPAM']);const _0xf23581=await getCurrentUser(_0x1079ae);if(!_0xf23581[_0x2c3bc1(0x19c)]){if(_0xf23581['status'])throw new Error('Authentication\x20failed:\x20'+_0xf23581[_0x2c3bc1(0x1b3)]+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0xf23581[_0x2c3bc1(0x1b3)]+_0x2c3bc1(0x1d8));}return console['log'](_0x2c3bc1(0x1a2)+_0xf23581[_0x2c3bc1(0x18c)]['organizationName']),await storeToken(_0x1079ae),console['log'](process['env'][_0x2c3bc1(0x1d1)]?_0x2c3bc1(0x1d5):'✓\x20Stored\x20credentials\x20locally'),{'token':_0x1079ae,'method':_0x504605[_0x2c3bc1(0x1cb)]};}export async function ensureRangerDir(_0x4fa0e4){const _0x2de463=_0x5e1827,_0x42e879={'zyLuz':function(_0x16095b){return _0x16095b();},'vkkQw':function(_0x53a7c3,_0x1ba96a){return _0x53a7c3(_0x1ba96a);},'VuBeY':function(_0x55fd46,_0x319149,_0x400f60){return _0x55fd46(_0x319149,_0x400f60);},'dmToO':_0x2de463(0x1e2)};void _0x4fa0e4;const _0x2cdb43=_0x42e879[_0x2de463(0x1a5)](getRangerHomeDir);return!_0x42e879[_0x2de463(0x1b4)](existsSync,_0x2cdb43)?(await _0x42e879[_0x2de463(0x1c7)](mkdir,_0x2cdb43,{'recursive':!![]}),console['log'](_0x42e879[_0x2de463(0x19f)]),{'path':_0x2cdb43,'installed':!![]}):(console[_0x2de463(0x18e)]('✓\x20~/.ranger/\x20directory\x20already\x20exists'),{'path':_0x2cdb43,'installed':![]});}export async function ensureChromium(_0x38a2d2=![]){const _0x228c93=_0x5e1827,_0x2e4337={'xUMDN':function(_0x1325fe){return _0x1325fe();},'tTnqA':_0x228c93(0x1af),'JILxd':_0x228c93(0x19e),'RYAcp':function(_0x2e6f0f,_0x426a4f,_0x2b7d96){return _0x2e6f0f(_0x426a4f,_0x2b7d96);},'PMfYX':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','ZUwfJ':_0x228c93(0x1c1),'jchDT':_0x228c93(0x1be)};let _0x17c64b=![];try{const _0x4b5738=chromium['executablePath']();_0x17c64b=existsSync(_0x4b5738);}catch{_0x17c64b=![];}if(_0x17c64b)return console[_0x228c93(0x18e)](_0x228c93(0x1bc)),![];const _0x2fa5ff=_0x2e4337['xUMDN'](getPlaywrightVersion),_0x25b39a=_0x2fa5ff??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x312719=!_0x2fa5ff,_0x15d386=process[_0x228c93(0x1ba)][_0x228c93(0x1ae)]&&process['stdout'][_0x228c93(0x1ae)];let _0x26a79f=!![];if(_0x15d386){const {install:_0x208d76}=await _0x1d9bd1['prompt']([{'type':_0x2e4337['tTnqA'],'name':_0x228c93(0x1a9),'message':_0x312719?_0x228c93(0x19a)+_0x25b39a+'\x20now?':_0x228c93(0x1e1)+_0x25b39a+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x26a79f=_0x208d76;}else console['log'](_0x228c93(0x1e0)+_0x25b39a+(_0x312719?_0x2e4337[_0x228c93(0x1b9)]:'')+_0x228c93(0x1b8));if(_0x26a79f){console[_0x228c93(0x18e)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0x2e4337[_0x228c93(0x1cf)](installChromiumBinary,_0x25b39a,_0x38a2d2),console[_0x228c93(0x18e)](_0x2e4337['PMfYX']);}catch(_0x40232e){console['error'](_0x228c93(0x1bd),_0x40232e instanceof Error?_0x40232e[_0x228c93(0x1b5)]:_0x40232e),console['log'](_0x2e4337[_0x228c93(0x1c3)]),console[_0x228c93(0x18e)]('\x20\x20npx\x20playwright@'+_0x25b39a+_0x228c93(0x180));}}else console[_0x228c93(0x18e)](_0x228c93(0x1db)),console[_0x228c93(0x18e)](_0x2e4337['jchDT']),console['log'](_0x228c93(0x19b)+_0x25b39a+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x3de165){const _0x368c16=_0x5e1827,_0x374bba=join(_0x3de165,_0x368c16(0x1cd)),_0x28f031=_0x368c16(0x17f);await writeFile(_0x374bba,_0x28f031),console['log'](_0x368c16(0x1ab));}export async function ensureLocalEnv(_0x2a6057,_0x5406ed){const _0x446522=_0x5e1827,_0xd5e76c={'wRJdl':function(_0x2fe3d5,_0x1bf273){return _0x2fe3d5!==_0x1bf273;},'nLmBw':'user','HBdSm':'local','wVrRx':function(_0x5b4f25,_0x3f892c,_0x56f244,_0x3c1abe){return _0x5b4f25(_0x3f892c,_0x56f244,_0x3c1abe);},'IxyWd':_0x446522(0x1da)};if(!findGitRoot()&&_0xd5e76c[_0x446522(0x182)](_0x2a6057?.[_0x446522(0x185)],_0x446522(0x18c)))return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.'),{'ready':![],'skipped':!![]};const _0x215761=_0x2a6057?.['scope']===_0xd5e76c['nLmBw']?getRangerHomeDir():undefined;if(findExistingEnv('local',{'locations':[_0xd5e76c['HBdSm']],'rangerDir':_0x215761}))return console[_0x446522(0x18e)]('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};try{return await _0xd5e76c[_0x446522(0x1d0)](addEnv,_0xd5e76c['HBdSm'],{'url':_0x2a6057?.['url'],'force':_0x2a6057?.['force'],'allowInsecureLocalhost':_0x2a6057?.['allowInsecureLocalhost'],'scope':_0x2a6057?.['scope']},_0x5406ed),{'ready':!![],'skipped':![]};}catch(_0x5c0dcc){return console['error'](_0xd5e76c['IxyWd'],_0x5c0dcc instanceof Error?_0x5c0dcc['message']:_0x5c0dcc),{'ready':![],'skipped':![]};}}function _0x13e1(_0x2dacd1,_0x5e7d12){_0x2dacd1=_0x2dacd1-0x17d;const _0x332a26=_0x332a();let _0x13e171=_0x332a26[_0x2dacd1];return _0x13e171;}export async function start(_0x4f9230,_0x3f5c93,_0x1cf077){const _0x314fc6=_0x5e1827,_0x121ece={'AMTzL':function(_0x25e4ec,_0x50c3c0){return _0x25e4ec!==_0x50c3c0;},'xXrmf':function(_0x3eea34,_0x4f50c3){return _0x3eea34!==_0x4f50c3;},'TOVmq':_0x314fc6(0x18c),'ymzfR':function(_0x4fc171,_0x534326){return _0x4fc171(_0x534326);},'auguP':'✓\x20Skipping\x20authentication\x20(--skip-auth)','EVpTI':_0x314fc6(0x183),'fFxwb':_0x314fc6(0x18d),'mOsnW':function(_0x4320c9,_0x38e827){return _0x4320c9(_0x38e827);},'Jfdcz':_0x314fc6(0x1d3),'utVhW':'plugin','TiSDy':function(_0x23429f,_0xfce83d){return _0x23429f&&_0xfce83d;},'oxzEw':'ranger','ejBeX':'opencode','jpBZY':function(_0x43d186,_0x4e3a85){return _0x43d186(_0x4e3a85);},'isdVs':_0x314fc6(0x1dc),'YpYyO':_0x314fc6(0x1b0),'SbQlW':function(_0x14a0e6,_0x10c4f2){return _0x14a0e6+_0x10c4f2;},'PiLHA':function(_0x1d4668,_0x4bf6c7){return _0x1d4668+_0x4bf6c7;},'RZaDz':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','PmyrC':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'};console['log']('\x0a🚀\x20Ranger\x20Setup\x0a');_0x121ece['AMTzL'](_0x3f5c93?.['scope'],undefined)&&_0x121ece['xXrmf'](_0x3f5c93[_0x314fc6(0x185)],_0x121ece[_0x314fc6(0x1d6)])&&(console[_0x314fc6(0x1b3)]('ranger\x20setup\x20--scope='+_0x121ece['ymzfR'](String,_0x3f5c93['scope'])+'\x20is\x20no\x20longer\x20supported.\x20'+'Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20'+_0x314fc6(0x1d9)),process['exit'](0x1));_0x3f5c93={..._0x3f5c93,'scope':_0x121ece[_0x314fc6(0x1d6)]};const _0x57311e=!existsSync(getRangerHomeDir());await _0x121ece['ymzfR'](ensureRangerDir,_0x121ece['TOVmq']);if(_0x3f5c93?.[_0x314fc6(0x1a3)])console[_0x314fc6(0x18e)](_0x121ece[_0x314fc6(0x1aa)]),_0x1cf077?.['trackPhaseEnd'](_0x121ece['EVpTI'],{'isFirstRun':_0x57311e,'method':'skipped'});else{_0x1cf077?.['trackPhaseStart'](_0x314fc6(0x183));const _0x3ef3a8=await _0x121ece[_0x314fc6(0x181)](authenticate,_0x4f9230);_0x1cf077?.[_0x314fc6(0x195)](_0x121ece[_0x314fc6(0x1c4)],{'isFirstRun':_0x57311e,'method':_0x3ef3a8['method']});}_0x1cf077?.['trackPhaseStart'](_0x314fc6(0x1d3));_0x3f5c93?.[_0x314fc6(0x1bb)]?console[_0x314fc6(0x18e)](_0x121ece['fFxwb']):await _0x121ece['mOsnW'](ensureChromium,_0x3f5c93?.[_0x314fc6(0x18f)]);_0x1cf077?.['trackPhaseEnd'](_0x121ece[_0x314fc6(0x1d2)],{'isFirstRun':_0x57311e,'skipped':!!_0x3f5c93?.['skipChromium']}),console['log']('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x1fc8b7=_0x3f5c93?.['scope'],_0x585979=_0x3f5c93?.['opencode']??![];let _0x58bd63=null;_0x585979?(_0x1cf077?.[_0x314fc6(0x187)](_0x121ece[_0x314fc6(0x19d)]),_0x58bd63=await ensureOpencodePluginConfig(_0x1fc8b7),_0x1cf077?.[_0x314fc6(0x195)](_0x121ece['utVhW'],{'isFirstRun':_0x57311e,'opencode':!![]})):(_0x1cf077?.[_0x314fc6(0x187)](_0x121ece[_0x314fc6(0x19d)]),await ensureClaudePlugin(_0x1fc8b7),_0x1cf077?.[_0x314fc6(0x195)](_0x121ece['utVhW'],{'isFirstRun':_0x57311e}));if(_0x121ece['TiSDy'](_0x585979,_0x58bd63)){_0x1cf077?.[_0x314fc6(0x187)]('skills');try{await installSkill(_0x121ece['oxzEw'],{'level':_0x58bd63[_0x314fc6(0x185)],'cliVersion':getCurrentVersion(),'platform':_0x121ece[_0x314fc6(0x1c8)]}),_0x1cf077?.[_0x314fc6(0x195)](_0x314fc6(0x1dc),{'isFirstRun':_0x57311e,'opencode':!![]});}catch(_0x41246c){console['warn'](_0x314fc6(0x18a),_0x41246c instanceof Error?_0x41246c[_0x314fc6(0x1b5)]:_0x41246c),_0x1cf077?.[_0x314fc6(0x195)](_0x314fc6(0x1dc),{'isFirstRun':_0x57311e,'opencode':!![],'failed':!![]});}}else _0x1cf077?.['trackPhaseStart'](_0x314fc6(0x1dc)),await _0x121ece['jpBZY'](ensureClaudeSkills,_0x1fc8b7),_0x1cf077?.[_0x314fc6(0x195)](_0x121ece['isdVs'],{'isFirstRun':_0x57311e});if(_0x3f5c93?.['skipAuth'])console['log'](_0x121ece[_0x314fc6(0x199)]);else{if(_0x3f5c93?.['url']){_0x1cf077?.[_0x314fc6(0x187)](_0x314fc6(0x1c2));const _0x5f4295=await ensureLocalEnv({'url':_0x3f5c93['url'],'force':_0x3f5c93?.['force'],'allowInsecureLocalhost':_0x3f5c93?.['allowInsecureLocalhost'],'scope':'user'},_0x1cf077);_0x1cf077?.[_0x314fc6(0x195)](_0x314fc6(0x1c2),{'isFirstRun':_0x57311e,'profileReady':_0x5f4295[_0x314fc6(0x1d4)],'userSkipped':_0x5f4295['skipped']});}else console['log'](_0x121ece['SbQlW'](_0x121ece[_0x314fc6(0x1b1)]('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:',_0x314fc6(0x193)+bold(_0x314fc6(0x1a8)))+_0x314fc6(0x1a0)+_0x314fc6(0x17e),_0x314fc6(0x1c9)));}if(_0x585979)console[_0x314fc6(0x18e)](_0x121ece[_0x314fc6(0x184)]),console[_0x314fc6(0x18e)](_0x314fc6(0x191)),console['log'](_0x121ece['PmyrC']),console['log']('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x3f1258=_0x121ece[_0x314fc6(0x181)](bold,'/ranger:enable');console[_0x314fc6(0x18e)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x3f1258+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'+_0x314fc6(0x1b7)+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
1
+ const _0x427343=_0x1863;(function(_0x66e011,_0x4aa92d){const _0x2c06aa=_0x1863,_0x2ccdad=_0x66e011();while(!![]){try{const _0x5ac6d1=parseInt(_0x2c06aa(0xb4))/0x1+parseInt(_0x2c06aa(0xc1))/0x2+-parseInt(_0x2c06aa(0xb0))/0x3+parseInt(_0x2c06aa(0x8f))/0x4+-parseInt(_0x2c06aa(0x95))/0x5*(parseInt(_0x2c06aa(0xaa))/0x6)+-parseInt(_0x2c06aa(0xc4))/0x7+-parseInt(_0x2c06aa(0x7a))/0x8*(parseInt(_0x2c06aa(0x8b))/0x9);if(_0x5ac6d1===_0x4aa92d)break;else _0x2ccdad['push'](_0x2ccdad['shift']());}catch(_0x5709e6){_0x2ccdad['push'](_0x2ccdad['shift']());}}}(_0x2f15,0x8a378));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0xa886b0 from'inquirer';function _0x1863(_0x7a062a,_0x3e5583){_0x7a062a=_0x7a062a-0x74;const _0x2f157e=_0x2f15();let _0x1863d7=_0x2f157e[_0x7a062a];return _0x1863d7;}import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x40e442=>_0x427343(0xba)+_0x40e442+_0x427343(0x86);export function getPlaywrightVersion(){const _0x1e240b=_0x427343,_0x124ca5={'IAUYt':_0x1e240b(0xbf)};try{const _0x1e9c5b=require['resolve'](_0x124ca5[_0x1e240b(0x96)]),_0x2f9c18=require(_0x1e9c5b);return _0x2f9c18[_0x1e240b(0x9a)];}catch{return null;}}export function installChromiumBinary(_0x5ee826,_0x2f20eb=![]){const _0x4bf874=_0x427343,_0x513ad1={'CNCqq':function(_0x41cb2d,_0x5a8c01){return _0x41cb2d===_0x5a8c01;},'TURWn':function(_0x500561,_0x3caaa3){return _0x500561(_0x3caaa3);},'jqntH':_0x4bf874(0x9e),'pEvKM':'chromium','CEZEM':'npx','XsDpp':'inherit','ZwQBO':function(_0x564cb8,_0x5cbbb7){return _0x564cb8===_0x5cbbb7;},'zGWcn':_0x4bf874(0xd1),'fAazO':'close'};return new Promise((_0x2e4cb1,_0x5b084f)=>{const _0x5d2af3=_0x4bf874,_0x41e148=[_0x5d2af3(0x9b)+_0x5ee826,'install',..._0x2f20eb?[_0x513ad1['jqntH']]:[],_0x513ad1[_0x5d2af3(0xcf)]],_0x2c7210=spawn(_0x513ad1[_0x5d2af3(0xd9)],_0x41e148,{'stdio':[_0x5d2af3(0xca),_0x513ad1[_0x5d2af3(0xbd)],'inherit'],'shell':_0x513ad1[_0x5d2af3(0x83)](process[_0x5d2af3(0xbb)],_0x513ad1['zGWcn'])});_0x2c7210['on'](_0x513ad1['fAazO'],_0x3f9554=>{const _0x356442=_0x5d2af3;_0x513ad1[_0x356442(0xa2)](_0x3f9554,0x0)?_0x2e4cb1():_0x5b084f(new Error(_0x356442(0xc0)+_0x3f9554));}),_0x2c7210['on'](_0x5d2af3(0xb6),_0x102cc5=>{const _0x567312=_0x5d2af3;_0x513ad1[_0x567312(0xb7)](_0x5b084f,_0x102cc5);});});}export async function authenticate(_0x159e36){const _0x2be806=_0x427343,_0x3c1dec={'FLVTF':function(_0x3c1514){return _0x3c1514();},'YuwJr':function(_0x3a5518,_0x58a030){return _0x3a5518(_0x58a030);},'yxGbA':'device_auth','eujEX':'Validating\x20API\x20token...','wxOap':function(_0x5504c9,_0x3b3bae){return _0x5504c9(_0x3b3bae);},'TawrN':'✓\x20Exported\x20credentials\x20for\x20CI','SulWf':_0x2be806(0x74)};if(!_0x159e36){const _0x3f68ee=await _0x3c1dec[_0x2be806(0x8a)](getToken);if(_0x3f68ee){const _0x312849=await _0x3c1dec['YuwJr'](getCurrentUser,_0x3f68ee);if(_0x312849[_0x2be806(0x93)])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x312849['user'][_0x2be806(0x81)]),{'token':_0x3f68ee,'method':_0x2be806(0xa0)};}try{_0x159e36=await runDeviceAuthFlow();}catch(_0x598058){throw new Error(_0x2be806(0xac)+(_0x598058 instanceof Error?_0x598058['message']:_0x598058));}const _0x714c98=await getCurrentUser(_0x159e36);if(!_0x714c98['success'])throw new Error(_0x2be806(0xa5)+_0x714c98[_0x2be806(0xb6)]);return console[_0x2be806(0x98)](_0x2be806(0x9c)+_0x714c98[_0x2be806(0x9f)][_0x2be806(0x81)]),{'token':_0x159e36,'method':_0x3c1dec['yxGbA']};}console['log'](_0x3c1dec['eujEX']);const _0x9a1ecf=await _0x3c1dec[_0x2be806(0xa4)](getCurrentUser,_0x159e36);if(!_0x9a1ecf[_0x2be806(0x93)]){if(_0x9a1ecf[_0x2be806(0x90)])throw new Error('Authentication\x20failed:\x20'+_0x9a1ecf['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x9a1ecf['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x2be806(0x98)]('✓\x20Authenticated\x20to\x20'+_0x9a1ecf['user'][_0x2be806(0x81)]),await _0x3c1dec[_0x2be806(0x8d)](storeToken,_0x159e36),console['log'](process[_0x2be806(0xd8)]['GITHUB_ENV']?_0x3c1dec['TawrN']:_0x3c1dec['SulWf']),{'token':_0x159e36,'method':'provided_token'};}export async function ensureRangerDir(_0x418ee8){const _0x621443=_0x427343,_0x3f0531={'mkwkB':function(_0x615e93){return _0x615e93();},'ObrkB':function(_0x2b4546,_0x5b936e){return _0x2b4546(_0x5b936e);},'mHynx':function(_0x109e19,_0x4deb55,_0x4c5810){return _0x109e19(_0x4deb55,_0x4c5810);}};void _0x418ee8;const _0x269207=_0x3f0531[_0x621443(0x88)](getRangerHomeDir);return!_0x3f0531[_0x621443(0xc5)](existsSync,_0x269207)?(await _0x3f0531[_0x621443(0x7f)](mkdir,_0x269207,{'recursive':!![]}),console['log'](_0x621443(0xd0)),{'path':_0x269207,'installed':!![]}):(console['log'](_0x621443(0x8e)),{'path':_0x269207,'installed':![]});}export async function ensureChromium(_0x5e3ea0=![]){const _0x124dec=_0x427343,_0x11d88c={'eqlSw':function(_0x2866ea){return _0x2866ea();},'pLlah':'confirm','UOweN':'install','MHhga':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','NHDVP':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','ZORVp':'\x0a⚠\x20Skipping\x20Chromium\x20installation.','UUlbS':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0xd2792b=![];try{const _0x29a2a6=chromium[_0x124dec(0xb5)]();_0xd2792b=existsSync(_0x29a2a6);}catch{_0xd2792b=![];}if(_0xd2792b)return console[_0x124dec(0x98)](_0x124dec(0xb2)),![];const _0x8709d2=_0x11d88c[_0x124dec(0xb3)](getPlaywrightVersion),_0x5330cc=_0x8709d2??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x50069e=!_0x8709d2,_0x54bde0=process['stdin'][_0x124dec(0x78)]&&process['stdout']['isTTY'];let _0x1644a3=!![];if(_0x54bde0){const {install:_0xbffb1e}=await _0xa886b0[_0x124dec(0xaf)]([{'type':_0x11d88c[_0x124dec(0xae)],'name':_0x11d88c['UOweN'],'message':_0x50069e?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x5330cc+'\x20now?':'The\x20required\x20version\x20('+_0x5330cc+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x1644a3=_0xbffb1e;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x5330cc+(_0x50069e?'\x20(fallback\x20version)':'')+_0x124dec(0xc8));if(_0x1644a3){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x5330cc,_0x5e3ea0),console[_0x124dec(0x98)](_0x11d88c['MHhga']);}catch(_0x147858){console['error'](_0x124dec(0xab),_0x147858 instanceof Error?_0x147858['message']:_0x147858),console[_0x124dec(0x98)](_0x11d88c[_0x124dec(0xa3)]),console[_0x124dec(0x98)]('\x20\x20npx\x20playwright@'+_0x5330cc+_0x124dec(0x84));}}else console['log'](_0x11d88c[_0x124dec(0x87)]),console[_0x124dec(0x98)](_0x11d88c['UUlbS']),console['log']('\x20\x20npx\x20playwright@'+_0x5330cc+_0x124dec(0x84));return!![];}export async function writeRangerGitignore(_0x1bdf7d){const _0x195dd4=_0x427343,_0x4587eb={'SrFJU':function(_0x4f1aed,_0x5925bc,_0x36824e){return _0x4f1aed(_0x5925bc,_0x36824e);}},_0x33e2da=_0x4587eb['SrFJU'](join,_0x1bdf7d,_0x195dd4(0xb1)),_0x270234=_0x195dd4(0xb8);await writeFile(_0x33e2da,_0x270234),console['log'](_0x195dd4(0x97));}export async function ensureLocalEnv(_0x315bb0,_0x544410){const _0x3fbfb9=_0x427343,_0x515024={'WBAkR':function(_0x55d34b){return _0x55d34b();},'toEGQ':function(_0x446e15,_0x1525e){return _0x446e15===_0x1525e;},'TBsdH':_0x3fbfb9(0x9f),'EKnPY':function(_0x4a0dd0,_0x9b97f1,_0x10fb50){return _0x4a0dd0(_0x9b97f1,_0x10fb50);},'RNFqS':_0x3fbfb9(0x80),'GmFNd':_0x3fbfb9(0x7e),'LkcAY':function(_0x26c6de,_0x121cd7,_0x429075,_0x4bea76){return _0x26c6de(_0x121cd7,_0x429075,_0x4bea76);},'pEUsb':_0x3fbfb9(0x7b),'wgFvC':function(_0x444968,_0x569ad4){return _0x444968 instanceof _0x569ad4;}};if(!_0x515024[_0x3fbfb9(0x75)](findGitRoot)&&_0x315bb0?.['scope']!==_0x3fbfb9(0x9f))return console[_0x3fbfb9(0x98)]('⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.'),{'ready':![],'skipped':!![]};const _0x20119=_0x515024[_0x3fbfb9(0xbe)](_0x315bb0?.['scope'],_0x515024['TBsdH'])?getRangerHomeDir():undefined;if(_0x515024[_0x3fbfb9(0xa8)](findExistingEnv,_0x515024[_0x3fbfb9(0xd3)],{'locations':[_0x515024[_0x3fbfb9(0xd3)]],'rangerDir':_0x20119}))return console['log'](_0x515024['GmFNd']),{'ready':!![],'skipped':![]};try{return await _0x515024['LkcAY'](addEnv,_0x3fbfb9(0x80),{'url':_0x315bb0?.['url'],'force':_0x315bb0?.[_0x3fbfb9(0x91)],'allowInsecureLocalhost':_0x315bb0?.['allowInsecureLocalhost'],'scope':_0x315bb0?.[_0x3fbfb9(0x7c)]},_0x544410),{'ready':!![],'skipped':![]};}catch(_0x43c78f){return console[_0x3fbfb9(0xb6)](_0x515024[_0x3fbfb9(0xc6)],_0x515024[_0x3fbfb9(0x79)](_0x43c78f,Error)?_0x43c78f[_0x3fbfb9(0x9d)]:_0x43c78f),{'ready':![],'skipped':![]};}}function _0x2f15(){const _0xa6f06a=['auth','ZwQBO','\x20install\x20chromium','WeUGL','\x1b[0m','ZORVp','mkwkB','opencode','FLVTF','77445jCdrIk','zIiuH','YuwJr','✓\x20~/.ranger/\x20directory\x20already\x20exists','3357752PfbdeL','status','force','plugin','success','method','3330935rtIJmy','IAUYt','✓\x20Created\x20.ranger/.gitignore','log','ranger\x20profile\x20add\x20<name>','version','playwright@','✓\x20Authenticated\x20to\x20','message','--with-deps','user','existing_token','FRHbI','CNCqq','NHDVP','wxOap','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','warn','UpRGB','EKnPY','ezFXU','6oDzgAg','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','Authentication\x20failed:\x20','mSQRA','pLlah','prompt','1181688rCwmSR','.gitignore','✓\x20Playwright\x20Chromium\x20browser\x20found','eqlSw','866481aPcpXx','executablePath','error','TURWn','\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','nYLTk','\x1b[1m','platform','allowInsecureLocalhost','XsDpp','toEGQ','playwright/package.json','Installation\x20failed\x20with\x20exit\x20code\x20','1462508FkcBYh','trackPhaseEnd','url','5616443zuTsmG','ObrkB','pEUsb','skills','...','EXxBa','ignore','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','trackPhaseStart','skipAuth','skipped','pEvKM','✓\x20Created\x20~/.ranger/\x20directory','win32','chromium','RNFqS','HGbxF','\x0aIn\x20Claude\x20Code,\x20run\x20','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','env','CEZEM','✓\x20Stored\x20credentials\x20locally','WBAkR','qTivS','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','isTTY','wgFvC','8ujmVSo','\x0a❌\x20Profile\x20setup\x20failed:','scope','\x0a🚀\x20Ranger\x20Setup\x0a','✓\x20Local\x20profile\x20already\x20exists','mHynx','local','organizationName'];_0x2f15=function(){return _0xa6f06a;};return _0x2f15();}export async function start(_0x278a3c,_0x1f46e5,_0x121ef2){const _0x1d1fd7=_0x427343,_0x380d25={'lcURH':_0x1d1fd7(0x7d),'hszvj':function(_0x54915a,_0x4526c6){return _0x54915a!==_0x4526c6;},'RCNPd':function(_0x1488b3,_0xbfcf16){return _0x1488b3!==_0xbfcf16;},'FvFZn':function(_0x64741e,_0x159fdf){return _0x64741e+_0x159fdf;},'zIiuH':_0x1d1fd7(0x9f),'nGnvn':function(_0x26d003){return _0x26d003();},'UpRGB':function(_0xb2980e,_0x52b828){return _0xb2980e(_0x52b828);},'WeUGL':'✓\x20Skipping\x20authentication\x20(--skip-auth)','HGbxF':'auth','mSQRA':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','mCNgd':'plugin','ezFXU':function(_0x3b910a,_0x30847f){return _0x3b910a&&_0x30847f;},'EXxBa':_0x1d1fd7(0xc7),'nYLTk':function(_0x3e9f73,_0x312989,_0x876ff4){return _0x3e9f73(_0x312989,_0x876ff4);},'QfQoD':'opencode','oJeSi':'\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','GPRyp':'\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','FRHbI':'profile','GBZIB':function(_0x3a4832,_0x13d8fb){return _0x3a4832+_0x13d8fb;},'mVgjZ':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','KQMwa':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','qTivS':'verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'};console['log'](_0x380d25['lcURH']);_0x380d25['hszvj'](_0x1f46e5?.['scope'],undefined)&&_0x380d25['RCNPd'](_0x1f46e5['scope'],_0x1d1fd7(0x9f))&&(console[_0x1d1fd7(0xb6)](_0x380d25['FvFZn']('ranger\x20setup\x20--scope='+String(_0x1f46e5['scope'])+'\x20is\x20no\x20longer\x20supported.\x20'+'Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20',_0x1d1fd7(0xd6))),process['exit'](0x1));_0x1f46e5={..._0x1f46e5,'scope':_0x380d25[_0x1d1fd7(0x8c)]};const _0x4ac7f0=!existsSync(_0x380d25['nGnvn'](getRangerHomeDir));await _0x380d25[_0x1d1fd7(0xa7)](ensureRangerDir,_0x1d1fd7(0x9f));if(_0x1f46e5?.['skipAuth'])console[_0x1d1fd7(0x98)](_0x380d25[_0x1d1fd7(0x85)]),_0x121ef2?.['trackPhaseEnd'](_0x1d1fd7(0x82),{'isFirstRun':_0x4ac7f0,'method':'skipped'});else{_0x121ef2?.[_0x1d1fd7(0xcc)](_0x380d25[_0x1d1fd7(0xd4)]);const _0x1753d1=await authenticate(_0x278a3c);_0x121ef2?.[_0x1d1fd7(0xc2)](_0x1d1fd7(0x82),{'isFirstRun':_0x4ac7f0,'method':_0x1753d1[_0x1d1fd7(0x94)]});}_0x121ef2?.['trackPhaseStart']('chromium');_0x1f46e5?.['skipChromium']?console[_0x1d1fd7(0x98)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await ensureChromium(_0x1f46e5?.['withDeps']);_0x121ef2?.['trackPhaseEnd'](_0x1d1fd7(0xd2),{'isFirstRun':_0x4ac7f0,'skipped':!!_0x1f46e5?.['skipChromium']}),console[_0x1d1fd7(0x98)](_0x380d25[_0x1d1fd7(0xad)]);const _0x1bb875=_0x1f46e5?.['scope'],_0x4b9741=_0x1f46e5?.[_0x1d1fd7(0x89)]??![];let _0x560781=null;_0x4b9741?(_0x121ef2?.[_0x1d1fd7(0xcc)]('plugin'),_0x560781=await ensureOpencodePluginConfig(_0x1bb875),_0x121ef2?.[_0x1d1fd7(0xc2)](_0x1d1fd7(0x92),{'isFirstRun':_0x4ac7f0,'opencode':!![]})):(_0x121ef2?.['trackPhaseStart']('plugin'),await ensureClaudePlugin(_0x1bb875),_0x121ef2?.['trackPhaseEnd'](_0x380d25['mCNgd'],{'isFirstRun':_0x4ac7f0}));if(_0x380d25[_0x1d1fd7(0xa9)](_0x4b9741,_0x560781)){_0x121ef2?.['trackPhaseStart'](_0x380d25[_0x1d1fd7(0xc9)]);try{await _0x380d25[_0x1d1fd7(0xb9)](installSkill,'ranger',{'level':_0x560781[_0x1d1fd7(0x7c)],'cliVersion':getCurrentVersion(),'platform':_0x380d25['QfQoD']}),_0x121ef2?.[_0x1d1fd7(0xc2)]('skills',{'isFirstRun':_0x4ac7f0,'opencode':!![]});}catch(_0x6088a1){console[_0x1d1fd7(0xa6)](_0x380d25['oJeSi'],_0x6088a1 instanceof Error?_0x6088a1[_0x1d1fd7(0x9d)]:_0x6088a1),_0x121ef2?.['trackPhaseEnd'](_0x380d25[_0x1d1fd7(0xc9)],{'isFirstRun':_0x4ac7f0,'opencode':!![],'failed':!![]});}}else _0x121ef2?.['trackPhaseStart'](_0x1d1fd7(0xc7)),await _0x380d25[_0x1d1fd7(0xa7)](ensureClaudeSkills,_0x1bb875),_0x121ef2?.['trackPhaseEnd'](_0x380d25[_0x1d1fd7(0xc9)],{'isFirstRun':_0x4ac7f0});if(_0x1f46e5?.[_0x1d1fd7(0xcd)])console[_0x1d1fd7(0x98)](_0x380d25['GPRyp']);else{if(_0x1f46e5?.['url']){_0x121ef2?.[_0x1d1fd7(0xcc)](_0x380d25[_0x1d1fd7(0xa1)]);const _0x1727f4=await _0x380d25[_0x1d1fd7(0xb9)](ensureLocalEnv,{'url':_0x1f46e5[_0x1d1fd7(0xc3)],'force':_0x1f46e5?.[_0x1d1fd7(0x91)],'allowInsecureLocalhost':_0x1f46e5?.[_0x1d1fd7(0xbc)],'scope':_0x1d1fd7(0x9f)},_0x121ef2);_0x121ef2?.[_0x1d1fd7(0xc2)]('profile',{'isFirstRun':_0x4ac7f0,'profileReady':_0x1727f4['ready'],'userSkipped':_0x1727f4[_0x1d1fd7(0xce)]});}else console['log'](_0x380d25['GBZIB']('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+('\x0a\x20\x20'+_0x380d25['UpRGB'](bold,_0x1d1fd7(0x99)))+_0x1d1fd7(0x77),_0x1d1fd7(0xd7))+'\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles');}if(_0x4b9741)console['log'](_0x380d25['mVgjZ']),console['log'](_0x380d25['KQMwa']),console['log']('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log'](_0x380d25[_0x1d1fd7(0x76)]);else{const _0x1105a0=_0x380d25['UpRGB'](bold,'/ranger:enable');console['log'](_0x1d1fd7(0xd5)+_0x1105a0+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'+_0x1d1fd7(0xcb));}}
@@ -1 +1 @@
1
- const _0xc59a6b=_0x41f8;function _0xabbe(){const _0x2c5e38=['PFnKr','45IhwvBB','\x20\x20User-level:','SKILL.md','nKpNG','VwIdS','aApSV','\x20plugin(s)\x20configured','RSMEE','trim','toString','273szNZut','onNxK','uxiMY','awrgX','project','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','604986cdFpmG','bnunT','682160VXEPnN','includes','98DWEsAy','\x20profiles\x20configured\x20(','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','push','\x20\x20Run:\x20ranger\x20skillup','version','user','IZjGq','\x20\x20Project-level:','some','auth.json','name','vyadA','HEjxD','KfVAA','3247908jsssXD','\x20local','\x0a\x20\x20No\x20active\x20profile\x20set','PbtJS','configured','filter','string','\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)','length','DEBUG','iBiYv','debug','2156628cpTpAp','\x1b[0m','\x20\x20Not\x20installed','WrHWz','encrypted','\x20\x20\x20\x20','match','settingsPath','1iCcBGh','\x0a---\x20Claude\x20Code\x20Plugin\x20---','stderr','(not\x20found)','log','path','opencode','ranger@trailhead','nZzLp','\x20[local]','success','\x20\x20Not\x20configured','irGhi','Root:\x20','lVxQe','stdout','Version:\x20','ignore','disabled','map','TMxZc',':\x20configured','83410KfXeez','enabled','oSRZe','isActive','utf-8','displayName','\x20(up\x20to\x20date)','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','\x1b]8;;\x07','\x0a---\x20Skills\x20---','236pakMqM','hIGWw','tQmBp','No\x20profiles\x20configured','organizationName','plaintext','not_configured','\x20[cloud]','has','lgiNh','jNnVd','SWTVU','\x20cloud','join','9621670RMiePr','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','isDirectory','details','11beaHjC','config','qEUaf','iYZvC','217725Zhuhin','EAHdw','pipe','hasEncryptedAuth'];_0xabbe=function(){return _0x2c5e38;};return _0xabbe();}(function(_0x3b1fb0,_0x384f4b){const _0x570eb7=_0x41f8,_0x47da8c=_0x3b1fb0();while(!![]){try{const _0x4a803c=parseInt(_0x570eb7(0x125))/0x1*(parseInt(_0x570eb7(0x183))/0x2)+parseInt(_0x570eb7(0x15b))/0x3+-parseInt(_0x570eb7(0x145))/0x4*(-parseInt(_0x570eb7(0x13b))/0x5)+-parseInt(_0x570eb7(0x170))/0x6*(-parseInt(_0x570eb7(0x174))/0x7)+-parseInt(_0x570eb7(0x172))/0x8*(parseInt(_0x570eb7(0x160))/0x9)+parseInt(_0x570eb7(0x153))/0xa*(parseInt(_0x570eb7(0x157))/0xb)+-parseInt(_0x570eb7(0x11d))/0xc*(parseInt(_0x570eb7(0x16a))/0xd);if(_0x4a803c===_0x384f4b)break;else _0x47da8c['push'](_0x47da8c['shift']());}catch(_0x1b0604){_0x47da8c['push'](_0x47da8c['shift']());}}}(_0xabbe,0xd0867));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';function _0x41f8(_0x2c93c1,_0x120aae){_0x2c93c1=_0x2c93c1-0x116;const _0xabbe17=_0xabbe();let _0x41f81f=_0xabbe17[_0x2c93c1];return _0x41f81f;}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=_0x40a1bc=>'\x1b[1m'+_0x40a1bc+_0xc59a6b(0x11e),link=(_0x5c7cf3,_0x23f8d7)=>'\x1b]8;;file://'+_0x5c7cf3+'\x07'+(_0x23f8d7||_0x5c7cf3)+_0xc59a6b(0x143);async function getOpencodePluginStatus(){const _0x57d9ea=_0xc59a6b,_0x4698e4={'TMxZc':'not_installed','cwycu':function(_0x57fe79,_0x1761df){return _0x57fe79!==_0x1761df;},'awrgX':_0x57d9ea(0x117),'KnCHu':'@ranger-testing/opencode-plugin','HEjxD':function(_0x29b560,_0x45ebd1){return _0x29b560(_0x45ebd1);},'rMOSK':function(_0x4e5957,_0x15fd53){return _0x4e5957>_0x15fd53;},'BRajA':_0x57d9ea(0x14b),'iBiYv':function(_0x17ebec,_0x55bdfc,_0x35e231,_0x24f019){return _0x17ebec(_0x55bdfc,_0x35e231,_0x24f019);},'bnunT':_0x57d9ea(0x158),'jNnVd':_0x57d9ea(0x136),'vyadA':_0x57d9ea(0x15d),'tQmBp':'data','SYJLs':'close'};return new Promise(_0xc52c0a=>{const _0x53488d=_0x57d9ea,_0x35dd08=_0x4698e4[_0x53488d(0x11b)](spawn,_0x53488d(0x12b),[_0x53488d(0x11c),_0x4698e4[_0x53488d(0x171)]],{'stdio':[_0x4698e4[_0x53488d(0x14f)],_0x4698e4[_0x53488d(0x180)],_0x4698e4['vyadA']]});let _0x4af215='';_0x35dd08[_0x53488d(0x134)]?.['on'](_0x4698e4[_0x53488d(0x147)],_0x42f203=>{const _0x4e2c1f=_0x53488d;_0x4af215+=_0x42f203[_0x4e2c1f(0x169)]();}),_0x35dd08[_0x53488d(0x127)]?.['on'](_0x4698e4['tQmBp'],_0x21ff3e=>{_0x4af215+=_0x21ff3e['toString']();}),_0x35dd08['on']('error',()=>{const _0x4c5e4c=_0x53488d;_0xc52c0a({'status':_0x4698e4[_0x4c5e4c(0x139)]});}),_0x35dd08['on'](_0x4698e4['SYJLs'],_0xa1627a=>{const _0x4a8749=_0x53488d,_0x3a751b={'IFtKw':function(_0x11bbe9,_0x11ea9d){return _0x4698e4['cwycu'](_0x11bbe9,_0x11ea9d);},'WrHWz':_0x4698e4[_0x4a8749(0x16d)],'ksapF':_0x4698e4['KnCHu'],'uxiMY':'opencode-plugin'};if(_0xa1627a!==0x0){_0x4698e4[_0x4a8749(0x181)](_0xc52c0a,{'status':_0x4698e4[_0x4a8749(0x139)]});return;}const _0x2fbcac=_0x4af215[_0x4a8749(0x168)]();let _0x9962a4=null;if(_0x2fbcac)try{_0x9962a4=JSON['parse'](_0x2fbcac);}catch{const _0x194fcd=_0x2fbcac[_0x4a8749(0x123)](/\{[\s\S]*\}$/);if(_0x194fcd)try{_0x9962a4=JSON['parse'](_0x194fcd[0x0]);}catch{_0x9962a4=null;}}const _0x37b460=Array['isArray'](_0x9962a4?.['plugin'])?_0x9962a4?.['plugin']:[],_0x51cdd8=_0x37b460[_0x4a8749(0x17d)](_0x144c3f=>{const _0xe4713c=_0x4a8749;if(_0x3a751b['IFtKw'](typeof _0x144c3f,_0x3a751b[_0xe4713c(0x120)]))return![];return _0x144c3f[_0xe4713c(0x173)](_0x3a751b['ksapF'])||_0x144c3f[_0xe4713c(0x173)](_0x3a751b[_0xe4713c(0x16c)]);});if(_0x51cdd8){_0xc52c0a({'status':_0x4a8749(0x187),'details':_0x4698e4['rMOSK'](_0x37b460['length'],0x0)?_0x37b460['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x37b460[_0x4a8749(0x119)]>0x0){_0xc52c0a({'status':_0x4698e4['BRajA'],'details':_0x37b460['length']+_0x4a8749(0x166)});return;}_0xc52c0a({'status':'not_configured'});});});}async function getSkillsFromDir(_0x3ba028,_0x288272){const _0x82a160=_0xc59a6b,_0x429d37={'sDbQp':_0x82a160(0x162),'mZSqT':function(_0x34bc32,_0x3efd7d){return _0x34bc32(_0x3efd7d);},'VwIdS':_0x82a160(0x13f)};if(!existsSync(_0x3ba028))return[];const _0x54f2ee=[];try{const _0x3f28b5=await readdir(_0x3ba028,{'withFileTypes':!![]});for(const _0x168a2b of _0x3f28b5){if(_0x168a2b[_0x82a160(0x155)]()){const _0x392373=join(_0x3ba028,_0x168a2b['name'],_0x429d37['sDbQp']);if(_0x429d37['mZSqT'](existsSync,_0x392373)){let _0x4f9642=_0x168a2b['name'];try{const _0x7944b6=await readFile(_0x392373,_0x429d37[_0x82a160(0x164)]),_0x555b7b=_0x7944b6['match'](/name:\s*(.+)/);_0x555b7b&&(_0x4f9642=_0x555b7b[0x1]['trim']());}catch{}_0x54f2ee['push']({'name':_0x168a2b['name'],'displayName':_0x4f9642,'path':_0x392373,'level':_0x288272});}}}}catch{return[];}return _0x54f2ee;}async function getInstalledSkills(){const _0x3ff8a7=_0xc59a6b,_0x439a50={'KfVAA':function(_0x3d25da,_0x243167,_0x3216e5){return _0x3d25da(_0x243167,_0x3216e5);},'sJdit':_0x3ff8a7(0x16e),'BWOod':_0x3ff8a7(0x17a)},[_0xe45835,_0x3c7e5b]=await Promise['all']([_0x439a50[_0x3ff8a7(0x182)](getSkillsFromDir,getProjectSkillsDir(),_0x439a50['sJdit']),getSkillsFromDir(getUserSkillsDir(),_0x439a50['BWOod'])]);return{'project':_0xe45835,'user':_0x3c7e5b};}async function getEnvironments(){const _0x3978bb=_0xc59a6b,_0x2c182e={'OIlgB':function(_0x1ac24d,_0x4d2003){return _0x1ac24d(_0x4d2003);},'HhTjU':function(_0x4b763e,_0x4badf6,_0x167f86){return _0x4b763e(_0x4badf6,_0x167f86);},'SWTVU':'auth.json.enc','iYZvC':function(_0x174f25,_0x2a2438){return _0x174f25===_0x2a2438;},'ErkPA':function(_0x15d647){return _0x15d647();}},{envNames:_0x27410a,activeEnv:_0x34c107}=await _0x2c182e['ErkPA'](getEnvNames),_0x188b26=getRangerDir();if(!existsSync(_0x188b26))return{'envs':[],'activeEnv':null};const _0x1ff04e=_0x27410a[_0x3978bb(0x138)](_0x26b492=>{const _0x2b93c9=_0x3978bb,_0x3df998=_0x2c182e['OIlgB'](getEnvDir,_0x26b492),_0x4503fc=_0x2c182e['HhTjU'](join,_0x3df998,'settings.json'),_0x518408=join(_0x3df998,_0x2b93c9(0x17e)),_0x1a8a10=join(_0x3df998,_0x2c182e[_0x2b93c9(0x150)]);return{'name':_0x26b492,'settingsPath':existsSync(_0x4503fc)?_0x4503fc:_0x2b93c9(0x128),'hasPlaintextAuth':existsSync(_0x518408),'hasEncryptedAuth':existsSync(_0x1a8a10),'isActive':_0x2c182e[_0x2b93c9(0x15a)](_0x26b492,_0x34c107)};});return{'envs':_0x1ff04e,'activeEnv':_0x34c107};}export async function status(){const _0x188629=_0xc59a6b,_0x4066fd={'nZzLp':function(_0x498864){return _0x498864();},'lVxQe':function(_0x4e309f,_0x515ced){return _0x4e309f(_0x515ced);},'aauep':function(_0x555b35,_0x6800d7,_0x1c62b6){return _0x555b35(_0x6800d7,_0x1c62b6);},'irGhi':function(_0x101ffd,_0x5a78a7){return _0x101ffd!==_0x5a78a7;},'lgiNh':function(_0x6a3405){return _0x6a3405();},'HLMBR':_0x188629(0x187),'FZRDG':function(_0x1f3fc3,_0x3f3a1c){return _0x1f3fc3(_0x3f3a1c);},'oSRZe':function(_0x2891fd,_0x24f578){return _0x2891fd===_0x24f578;},'onNxK':'not_configured','gacYa':_0x188629(0x130),'PFnKr':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','PbtJS':_0x188629(0x12c),'EAHdw':'unknown','rupvg':_0x188629(0x13c),'ILHVr':_0x188629(0x11f),'KoPxA':function(_0x3c85c5){return _0x3c85c5();},'RSMEE':function(_0x226f08,_0x47b7c3){return _0x226f08===_0x47b7c3;},'RjjAd':'No\x20skills\x20installed','nKpNG':function(_0xf99ba7,_0x544fb8){return _0xf99ba7>_0x544fb8;},'pOUPn':_0x188629(0x17c),'IZjGq':function(_0x3025e6,_0x582818){return _0x3025e6+_0x582818;},'RbwSJ':function(_0x225aef,_0x381e0f){return _0x225aef>_0x381e0f;},'WiSLX':function(_0x40b775,_0xf16253){return _0x40b775===_0xf16253;},'hIGWw':'\x20(active)','aApSV':function(_0x3d4222,_0x3c2886){return _0x3d4222(_0x3c2886);},'uinID':_0x188629(0x14a),'qEUaf':function(_0x3fe888,_0x340f8d){return _0x3fe888(_0x340f8d);}};console[_0x188629(0x129)]('\x0a📊\x20Ranger\x20Status\x0a');const _0x5e9d3b=process['cwd'](),_0x41404f=_0x4066fd[_0x188629(0x12d)](getRangerDir);if(!_0x4066fd['lVxQe'](existsSync,_0x41404f)){console['log']('Root:\x20'+link(_0x5e9d3b,bold(_0x4066fd[_0x188629(0x133)](basename,_0x5e9d3b)))),console['log'](_0x188629(0x176)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x188629(0x129)](_0x188629(0x132)+_0x4066fd['aauep'](link,_0x5e9d3b,_0x4066fd['lVxQe'](bold,basename(_0x5e9d3b))));const _0x519eaf=getCurrentVersion(),_0x5ae367=_0x4066fd['nZzLp'](getLatestVersion);if(_0x5ae367[_0x188629(0x179)]&&_0x4066fd[_0x188629(0x131)](_0x5ae367['version'],_0x519eaf))console[_0x188629(0x129)]('Version:\x20'+_0x519eaf+'\x20(latest:\x20'+_0x5ae367[_0x188629(0x179)]+')'),console[_0x188629(0x129)]('\x20\x20Run:\x20ranger\x20update');else _0x5ae367[_0x188629(0x179)]?console[_0x188629(0x129)]('Version:\x20'+_0x519eaf+_0x188629(0x141)):console[_0x188629(0x129)](_0x188629(0x135)+_0x519eaf);const _0x490726=await _0x4066fd[_0x188629(0x14e)](getToken);if(_0x490726){const _0x3ece76=await getCurrentUser(_0x490726);_0x3ece76[_0x188629(0x12f)]?console[_0x188629(0x129)]('Organization:\x20'+_0x4066fd['lVxQe'](bold,_0x3ece76[_0x188629(0x17a)][_0x188629(0x149)])):(console[_0x188629(0x129)](_0x188629(0x142)),console[_0x188629(0x129)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console[_0x188629(0x129)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env'][_0x188629(0x11a)]&&(console[_0x188629(0x129)]('API\x20Environment:\x20'+getCurrentEnvironment()),console[_0x188629(0x129)]('API\x20URL:\x20'+getApiBaseUrl()));console['log']('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x4a7417=await getOpencodePluginStatus();if(_0x4a7417['status']===_0x4066fd['HLMBR'])console[_0x188629(0x129)]('\x20\x20'+_0x4066fd['FZRDG'](bold,'@ranger-testing/opencode-plugin')+_0x188629(0x13a)),_0x4a7417[_0x188629(0x156)]&&console[_0x188629(0x129)]('\x20\x20'+_0x4a7417['details']);else _0x4066fd[_0x188629(0x13d)](_0x4a7417['status'],_0x4066fd[_0x188629(0x16b)])?(console['log'](_0x4066fd['gacYa']),_0x4a7417[_0x188629(0x156)]&&console['log']('\x20\x20'+_0x4a7417['details']),console[_0x188629(0x129)]('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console['log'](_0x4066fd[_0x188629(0x15f)]);console[_0x188629(0x129)](_0x188629(0x126));const _0xdfcb77=await getPluginInfo(_0x4066fd[_0x188629(0x186)]);if(_0xdfcb77){const _0x4ddcd9=_0xdfcb77['scope']||_0x4066fd[_0x188629(0x15c)],_0xf89a14=_0xdfcb77[_0x188629(0x13c)]?_0x4066fd['rupvg']:_0x188629(0x137);console[_0x188629(0x129)]('\x20\x20'+bold(_0x188629(0x12c))+':\x20installed\x20('+_0x4ddcd9+',\x20'+_0xf89a14+')');}else console[_0x188629(0x129)](_0x4066fd['ILHVr']),console[_0x188629(0x129)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console[_0x188629(0x129)](_0x188629(0x144));const {project:_0x240af5,user:_0x265b1d}=await _0x4066fd['KoPxA'](getInstalledSkills),_0x1e3623=_0x240af5['filter'](_0x19f3a7=>RANGER_MANAGED_SKILLS[_0x188629(0x173)](_0x19f3a7[_0x188629(0x17f)])),_0x59d480=_0x265b1d[_0x188629(0x116)](_0x1e4495=>RANGER_MANAGED_SKILLS['includes'](_0x1e4495[_0x188629(0x17f)])),_0x1a4836=_0x1e3623['length']+_0x59d480['length'];if(_0x4066fd[_0x188629(0x167)](_0x1a4836,0x0))console['log'](_0x4066fd['RjjAd']),console[_0x188629(0x129)](_0x188629(0x178));else{if(_0x4066fd['nKpNG'](_0x1e3623[_0x188629(0x119)],0x0)){console[_0x188629(0x129)](_0x4066fd['pOUPn']);for(const _0x43ee00 of _0x1e3623){console[_0x188629(0x129)]('\x20\x20\x20\x20'+bold(_0x43ee00[_0x188629(0x140)])+':\x20'+link(_0x43ee00[_0x188629(0x12a)],basename(_0x43ee00['path'])));}}if(_0x59d480[_0x188629(0x119)]>0x0){console[_0x188629(0x129)](_0x188629(0x161));for(const _0x12980c of _0x59d480){console[_0x188629(0x129)](_0x188629(0x122)+bold(_0x12980c['displayName'])+':\x20'+link(_0x12980c[_0x188629(0x12a)],basename(_0x12980c[_0x188629(0x12a)])));}}}console[_0x188629(0x129)]('\x0a---\x20Profiles\x20---');const {envs:_0x17bc40,activeEnv:_0x4af49b}=await getEnvironments();let _0x9da9c3=[];if(_0x490726)try{_0x9da9c3=await _0x4066fd['nZzLp'](listCloudProfiles);}catch{}const _0x5e981d=_0x4066fd[_0x188629(0x17b)](_0x17bc40['length'],_0x9da9c3[_0x188629(0x119)]);if(_0x5e981d===0x0)console[_0x188629(0x129)](_0x188629(0x148)),console['log'](_0x188629(0x154));else{if(_0x4066fd[_0x188629(0x163)](_0x5e981d,0x5)){const _0x5e3af1=[];_0x9da9c3[_0x188629(0x119)]>0x0&&_0x5e3af1[_0x188629(0x177)](_0x9da9c3[_0x188629(0x119)]+_0x188629(0x151)),_0x4066fd['RbwSJ'](_0x17bc40['length'],0x0)&&_0x5e3af1[_0x188629(0x177)](_0x17bc40['length']+_0x188629(0x184)),console['log'](_0x5e981d+_0x188629(0x175)+_0x5e3af1[_0x188629(0x152)](',\x20')+')'),_0x4af49b&&console[_0x188629(0x129)]('\x20\x20Active:\x20'+bold(_0x4af49b)),console['log'](_0x188629(0x118));}else{for(const _0x51d399 of _0x9da9c3){const _0x208a9e=_0x4066fd['WiSLX'](_0x51d399[_0x188629(0x17f)],_0x4af49b)?_0x4066fd[_0x188629(0x146)]:'';console[_0x188629(0x129)]('\x20\x20'+_0x4066fd[_0x188629(0x165)](bold,_0x51d399[_0x188629(0x17f)])+_0x188629(0x14c)+_0x208a9e);const _0x3af31c=_0x51d399['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x51d399['sessionUpdatedAt']+')':'no\x20session';console['log']('\x20\x20\x20\x20Session:\x20'+_0x3af31c);}const _0x55454d=new Set(_0x9da9c3['map'](_0x22d771=>_0x22d771['name']));for(const _0x3b0921 of _0x17bc40){if(_0x55454d[_0x188629(0x14d)](_0x3b0921['name']))continue;const _0x22c6af=_0x3b0921[_0x188629(0x13e)]?'\x20(active)':'',_0x28c17e=_0x3b0921[_0x188629(0x15e)]?_0x188629(0x121):_0x3b0921['hasPlaintextAuth']?_0x4066fd['uinID']:'none';console[_0x188629(0x129)]('\x20\x20'+bold(_0x3b0921['name'])+_0x188629(0x12e)+_0x22c6af),console[_0x188629(0x129)]('\x20\x20\x20\x20Auth:\x20'+_0x28c17e),_0x4066fd['irGhi'](_0x3b0921['settingsPath'],'(not\x20found)')&&console[_0x188629(0x129)]('\x20\x20\x20\x20Settings:\x20'+link(_0x3b0921[_0x188629(0x124)],_0x4066fd[_0x188629(0x159)](basename,_0x3b0921['settingsPath'])));}if(!_0x4af49b){console[_0x188629(0x129)](_0x188629(0x185));const _0x448493=[..._0x9da9c3['map'](_0x51add2=>_0x51add2[_0x188629(0x17f)]),..._0x17bc40[_0x188629(0x116)](_0x3917fc=>!_0x55454d[_0x188629(0x14d)](_0x3917fc['name']))[_0x188629(0x138)](_0x289fa0=>_0x289fa0['name'])];console['log'](_0x188629(0x16f)+_0x448493['join'](',\x20')+')');}}}console['log']('');}
1
+ const _0x47f843=_0xb791;(function(_0x26667e,_0x1a2873){const _0x11aea4=_0xb791,_0x2d77df=_0x26667e();while(!![]){try{const _0x3eba27=-parseInt(_0x11aea4(0x160))/0x1+-parseInt(_0x11aea4(0x182))/0x2*(parseInt(_0x11aea4(0x178))/0x3)+-parseInt(_0x11aea4(0x14f))/0x4+parseInt(_0x11aea4(0x180))/0x5*(-parseInt(_0x11aea4(0x131))/0x6)+parseInt(_0x11aea4(0x16d))/0x7*(parseInt(_0x11aea4(0x12b))/0x8)+parseInt(_0x11aea4(0x168))/0x9*(parseInt(_0x11aea4(0x140))/0xa)+parseInt(_0x11aea4(0x135))/0xb*(parseInt(_0x11aea4(0x146))/0xc);if(_0x3eba27===_0x1a2873)break;else _0x2d77df['push'](_0x2d77df['shift']());}catch(_0x1d29f9){_0x2d77df['push'](_0x2d77df['shift']());}}}(_0x5636,0x3406d));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{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=_0x2d4203=>'\x1b[1m'+_0x2d4203+_0x47f843(0x134),link=(_0x1ce47f,_0x1f67b8)=>'\x1b]8;;file://'+_0x1ce47f+'\x07'+(_0x1f67b8||_0x1ce47f)+_0x47f843(0x13b);async function getOpencodePluginStatus(){const _0x2f75ca=_0x47f843,_0x1aea70={'GXeXm':function(_0x3487e8,_0x50c3b7){return _0x3487e8(_0x50c3b7);},'jkgMi':'not_configured','CFkcU':function(_0x374478,_0x3bd71f,_0x330fb7,_0x32e307){return _0x374478(_0x3bd71f,_0x330fb7,_0x32e307);},'alcna':_0x2f75ca(0x188),'NMfwu':'ignore','bmsRM':'pipe','mOHyG':_0x2f75ca(0x13e),'DXYzg':'error'};return new Promise(_0xf6bb5f=>{const _0x5d5865=_0x2f75ca,_0x4f5101=_0x1aea70['CFkcU'](spawn,_0x1aea70['alcna'],['debug',_0x5d5865(0x14a)],{'stdio':[_0x1aea70[_0x5d5865(0x150)],_0x5d5865(0x145),_0x1aea70[_0x5d5865(0x137)]]});let _0x219800='';_0x4f5101['stdout']?.['on'](_0x1aea70['mOHyG'],_0x51b42b=>{const _0x392984=_0x5d5865;_0x219800+=_0x51b42b[_0x392984(0x151)]();}),_0x4f5101[_0x5d5865(0x176)]?.['on'](_0x1aea70[_0x5d5865(0x154)],_0x3f760a=>{_0x219800+=_0x3f760a['toString']();}),_0x4f5101['on'](_0x1aea70[_0x5d5865(0x171)],()=>{_0xf6bb5f({'status':'not_installed'});}),_0x4f5101['on']('close',_0x391edf=>{const _0x594036=_0x5d5865,_0xa0912b={'KeWwL':function(_0x3d5ab9,_0x17c86f){return _0x3d5ab9!==_0x17c86f;},'pCCUb':_0x594036(0x179)};if(_0x391edf!==0x0){_0xf6bb5f({'status':'not_installed'});return;}const _0x467ee3=_0x219800[_0x594036(0x16b)]();let _0x10cf63=null;if(_0x467ee3)try{_0x10cf63=JSON['parse'](_0x467ee3);}catch{const _0x44397e=_0x467ee3['match'](/\{[\s\S]*\}$/);if(_0x44397e)try{_0x10cf63=JSON[_0x594036(0x17c)](_0x44397e[0x0]);}catch{_0x10cf63=null;}}const _0x5c6fcb=Array[_0x594036(0x138)](_0x10cf63?.[_0x594036(0x19c)])?_0x10cf63?.['plugin']:[],_0x325c09=_0x5c6fcb[_0x594036(0x149)](_0x25409c=>{const _0x1fc83e=_0x594036;if(_0xa0912b[_0x1fc83e(0x192)](typeof _0x25409c,'string'))return![];return _0x25409c['includes'](_0xa0912b['pCCUb'])||_0x25409c['includes']('opencode-plugin');});if(_0x325c09){_0xf6bb5f({'status':_0x594036(0x152),'details':_0x5c6fcb[_0x594036(0x175)]>0x0?_0x5c6fcb['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x5c6fcb['length']>0x0){_0x1aea70[_0x594036(0x155)](_0xf6bb5f,{'status':_0x1aea70[_0x594036(0x16e)],'details':_0x5c6fcb['length']+'\x20plugin(s)\x20configured'});return;}_0x1aea70['GXeXm'](_0xf6bb5f,{'status':_0x1aea70['jkgMi']});});});}async function getSkillsFromDir(_0x4e71b4,_0xc9470a){const _0x1bc678=_0x47f843,_0x21bd5b={'EkfUN':function(_0x4bbd37,_0x24a967){return _0x4bbd37(_0x24a967);},'ZFwGU':function(_0x2062e2,_0x3982e5,_0x381d9d,_0x5595ed){return _0x2062e2(_0x3982e5,_0x381d9d,_0x5595ed);},'WdwmW':function(_0x1b8588,_0x231bb7,_0x40bceb){return _0x1b8588(_0x231bb7,_0x40bceb);},'gSqFd':_0x1bc678(0x173)};if(!_0x21bd5b[_0x1bc678(0x197)](existsSync,_0x4e71b4))return[];const _0x3ed883=[];try{const _0x325387=await readdir(_0x4e71b4,{'withFileTypes':!![]});for(const _0x5c7e23 of _0x325387){if(_0x5c7e23[_0x1bc678(0x19d)]()){const _0x4a2d6e=_0x21bd5b['ZFwGU'](join,_0x4e71b4,_0x5c7e23[_0x1bc678(0x153)],'SKILL.md');if(existsSync(_0x4a2d6e)){let _0x370dcd=_0x5c7e23['name'];try{const _0x210506=await _0x21bd5b['WdwmW'](readFile,_0x4a2d6e,_0x21bd5b[_0x1bc678(0x189)]),_0x127968=_0x210506['match'](/name:\s*(.+)/);_0x127968&&(_0x370dcd=_0x127968[0x1]['trim']());}catch{}_0x3ed883[_0x1bc678(0x177)]({'name':_0x5c7e23['name'],'displayName':_0x370dcd,'path':_0x4a2d6e,'level':_0xc9470a});}}}}catch{return[];}return _0x3ed883;}function _0x5636(){const _0x2c07e2=['pipe','24GEEqfs','FmCsL','includes','some','config','lAukg','\x20\x20User-level:','has','SpGgH','1239088BKlhoP','NMfwu','toString','configured','name','mOHyG','GXeXm','scope','details','(not\x20found)',':\x20configured','enabled','aiPkw','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>',':\x20installed\x20(','\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)','version','395985ISVgzg','settingsPath','ClyVO','map','BzuwW','\x0a---\x20Claude\x20Code\x20Plugin\x20---','ranger@trailhead','DEBUG','9sSutiV','sessionUpdatedAt','YnEWX','trim','Ijrci','53977cACImG','jkgMi','API\x20Token:\x20✗\x20Not\x20found','cached\x20(updated\x20','DXYzg','\x20\x20Run:\x20ranger\x20update','utf-8','\x20\x20Run:\x20ranger\x20setup\x20[token]','length','stderr','push','3UGSQDX','@ranger-testing/opencode-plugin','\x20\x20\x20\x20Auth:\x20','oZvym','parse','join','env','nihQL','186605lxAOqU','Osjcl','634194RzhOwu','fIIbQ','log','no\x20session','\x20[cloud]','\x0a---\x20Skills\x20---','opencode','gSqFd','isActive','\x0a📊\x20Ranger\x20Status\x0a','lJOBo','JlHjH','Version:\x20','HwuOH','\x20\x20Run:\x20ranger\x20skillup','njbOH','KeWwL','\x20local','\x20\x20\x20\x20Session:\x20','yRWif','displayName','EkfUN','KEoGC','\x20\x20Not\x20configured','rKGDw','\x20\x20\x20\x20','plugin','isDirectory','status','toYXQ','auth.json.enc','filter','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','unknown','72qdALrk','GEkyQ','\x20[local]','YAPtM','hzDjz','\x20\x20Run:\x20ranger\x20setup\x20--opencode','60nOWkbr','ZRDMU','project','\x1b[0m','7673083jRxdoc','\x20(up\x20to\x20date)','bmsRM','isArray','API\x20Environment:\x20','Root:\x20','\x1b]8;;\x07','xfvdu','uENDi','data','\x20(latest:\x20','1446600NEqCaD','\x20\x20Project-level:','path','xxZCj','nkShO'];_0x5636=function(){return _0x2c07e2;};return _0x5636();}async function getInstalledSkills(){const _0xf92f7a=_0x47f843,_0x32b81f={'Osjcl':function(_0x2a3112,_0x151987,_0x42d21c){return _0x2a3112(_0x151987,_0x42d21c);},'xxZCj':_0xf92f7a(0x133),'LdIvw':function(_0x6c39f8){return _0x6c39f8();},'BjLva':'user'},[_0x129da9,_0x3926bc]=await Promise['all']([_0x32b81f[_0xf92f7a(0x181)](getSkillsFromDir,getProjectSkillsDir(),_0x32b81f[_0xf92f7a(0x143)]),getSkillsFromDir(_0x32b81f['LdIvw'](getUserSkillsDir),_0x32b81f['BjLva'])]);return{'project':_0x129da9,'user':_0x3926bc};}async function getEnvironments(){const _0x25ba58=_0x47f843,_0xf242e4={'rPAmg':function(_0x5067cf,_0x8a6911){return _0x5067cf(_0x8a6911);},'yLFHB':'settings.json','YAPtM':function(_0x42fe8c,_0x4e8b9a,_0x11bf66){return _0x42fe8c(_0x4e8b9a,_0x11bf66);},'ZRDMU':_0x25ba58(0x158),'mvIgm':function(_0x41460f,_0x2b12ca){return _0x41460f===_0x2b12ca;},'KEoGC':function(_0x1f61be){return _0x1f61be();},'njbOH':function(_0x5a4a64,_0x5868bc){return _0x5a4a64(_0x5868bc);}},{envNames:_0x2a9b7e,activeEnv:_0x1a342c}=await _0xf242e4[_0x25ba58(0x198)](getEnvNames),_0x114883=getRangerDir();if(!_0xf242e4[_0x25ba58(0x191)](existsSync,_0x114883))return{'envs':[],'activeEnv':null};const _0xc9ee13=_0x2a9b7e[_0x25ba58(0x163)](_0x3994c1=>{const _0x3109fd=_0x25ba58,_0x4d04a4=_0xf242e4['rPAmg'](getEnvDir,_0x3994c1),_0x322469=join(_0x4d04a4,_0xf242e4['yLFHB']),_0x3ae3ca=_0xf242e4[_0x3109fd(0x12e)](join,_0x4d04a4,'auth.json'),_0x564c2c=join(_0x4d04a4,_0x3109fd(0x1a0));return{'name':_0x3994c1,'settingsPath':existsSync(_0x322469)?_0x322469:_0xf242e4[_0x3109fd(0x132)],'hasPlaintextAuth':existsSync(_0x3ae3ca),'hasEncryptedAuth':_0xf242e4['rPAmg'](existsSync,_0x564c2c),'isActive':_0xf242e4['mvIgm'](_0x3994c1,_0x1a342c)};});return{'envs':_0xc9ee13,'activeEnv':_0x1a342c};}function _0xb791(_0x14b21d,_0x3cf135){_0x14b21d=_0x14b21d-0x128;const _0x56367f=_0x5636();let _0xb791b0=_0x56367f[_0x14b21d];return _0xb791b0;}export async function status(){const _0x4525e9=_0x47f843,_0x5726f5={'DMIbx':_0x4525e9(0x18b),'lAukg':function(_0x894ded){return _0x894ded();},'VHrtg':function(_0x45ed73,_0x5c8893){return _0x45ed73(_0x5c8893);},'lJOBo':function(_0x2111f5,_0x1fb509,_0x3f152e){return _0x2111f5(_0x1fb509,_0x3f152e);},'Ijrci':function(_0xe35e4d,_0x3c979f){return _0xe35e4d(_0x3c979f);},'NmwUZ':function(_0x1d10c3){return _0x1d10c3();},'yRWif':function(_0x4678b1,_0x5878e8){return _0x4678b1!==_0x5878e8;},'uENDi':function(_0x47ff0a,_0x25d351){return _0x47ff0a(_0x25d351);},'Mfikx':'\x0a---\x20OpenCode\x20Plugin\x20---','kZdwG':_0x4525e9(0x152),'BzuwW':_0x4525e9(0x179),'fWebZ':function(_0x94fb94,_0x5ef911){return _0x94fb94===_0x5ef911;},'HRfzO':_0x4525e9(0x199),'oZvym':_0x4525e9(0x130),'YzyVB':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','qQlYr':_0x4525e9(0x165),'hzDjz':function(_0x29bc38,_0x5a0299){return _0x29bc38(_0x5a0299);},'nYNTA':_0x4525e9(0x12a),'ClyVO':_0x4525e9(0x15a),'LlWns':function(_0x1ce2a3,_0x3b1907){return _0x1ce2a3(_0x3b1907);},'zxwlO':_0x4525e9(0x166),'rKGDw':'\x20\x20Not\x20installed','JlHjH':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','toYXQ':_0x4525e9(0x187),'aiPkw':function(_0x50c567,_0x3746f9){return _0x50c567===_0x3746f9;},'nkShO':function(_0xbd595e,_0x55e6d8){return _0xbd595e>_0x55e6d8;},'GEkyQ':_0x4525e9(0x14c),'uUUEZ':function(_0x528352,_0x541862){return _0x528352(_0x541862);},'fIIbQ':'\x0a---\x20Profiles\x20---','CDawQ':function(_0x53f690){return _0x53f690();},'YnEWX':function(_0xb49ea4,_0x5509c0){return _0xb49ea4+_0x5509c0;},'OjtyQ':function(_0x19e32a,_0x277818){return _0x19e32a===_0x277818;},'FmCsL':function(_0x3fa145,_0xd95202){return _0x3fa145>_0xd95202;},'eZgCQ':function(_0x547524,_0x2620d6){return _0x547524===_0x2620d6;},'nihQL':'\x20(active)','HwuOH':function(_0x5eea48,_0xb02d1b){return _0x5eea48(_0xb02d1b);},'TBJbY':'encrypted','SpGgH':'plaintext','QyBWM':_0x4525e9(0x158),'xfvdu':function(_0x2e367d,_0x406937){return _0x2e367d(_0x406937);}};console[_0x4525e9(0x184)](_0x5726f5['DMIbx']);const _0x2df814=process['cwd'](),_0x4bb284=_0x5726f5['lAukg'](getRangerDir);if(!_0x5726f5['VHrtg'](existsSync,_0x4bb284)){console['log']('Root:\x20'+_0x5726f5['lJOBo'](link,_0x2df814,bold(basename(_0x2df814)))),console['log']('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x4525e9(0x184)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x4525e9(0x184)](_0x4525e9(0x13a)+_0x5726f5['lJOBo'](link,_0x2df814,_0x5726f5[_0x4525e9(0x16c)](bold,_0x5726f5[_0x4525e9(0x16c)](basename,_0x2df814))));const _0x26baae=_0x5726f5['NmwUZ'](getCurrentVersion),_0x5ce380=getLatestVersion();if(_0x5ce380['version']&&_0x5726f5[_0x4525e9(0x195)](_0x5ce380['version'],_0x26baae))console[_0x4525e9(0x184)](_0x4525e9(0x18e)+_0x26baae+_0x4525e9(0x13f)+_0x5ce380[_0x4525e9(0x15f)]+')'),console['log'](_0x4525e9(0x172));else _0x5ce380[_0x4525e9(0x15f)]?console[_0x4525e9(0x184)]('Version:\x20'+_0x26baae+_0x4525e9(0x136)):console[_0x4525e9(0x184)](_0x4525e9(0x18e)+_0x26baae);const _0x5d0e96=await _0x5726f5['NmwUZ'](getToken);if(_0x5d0e96){const _0x38dd30=await _0x5726f5[_0x4525e9(0x13d)](getCurrentUser,_0x5d0e96);_0x38dd30['success']?console['log']('Organization:\x20'+_0x5726f5[_0x4525e9(0x13d)](bold,_0x38dd30['user']['organizationName'])):(console['log'](_0x4525e9(0x129)),console[_0x4525e9(0x184)](_0x4525e9(0x174)));}else console[_0x4525e9(0x184)](_0x4525e9(0x16f)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x4525e9(0x17e)][_0x4525e9(0x167)]&&(console[_0x4525e9(0x184)](_0x4525e9(0x139)+getCurrentEnvironment()),console['log']('API\x20URL:\x20'+getApiBaseUrl()));console['log'](_0x5726f5['Mfikx']);const _0x2b3630=await getOpencodePluginStatus();if(_0x2b3630[_0x4525e9(0x19e)]===_0x5726f5['kZdwG'])console[_0x4525e9(0x184)]('\x20\x20'+bold(_0x5726f5[_0x4525e9(0x164)])+_0x4525e9(0x159)),_0x2b3630['details']&&console[_0x4525e9(0x184)]('\x20\x20'+_0x2b3630['details']);else _0x5726f5['fWebZ'](_0x2b3630['status'],'not_configured')?(console[_0x4525e9(0x184)](_0x5726f5['HRfzO']),_0x2b3630[_0x4525e9(0x157)]&&console[_0x4525e9(0x184)]('\x20\x20'+_0x2b3630[_0x4525e9(0x157)]),console['log'](_0x5726f5[_0x4525e9(0x17b)])):console[_0x4525e9(0x184)](_0x5726f5['YzyVB']);console['log'](_0x5726f5['qQlYr']);const _0xe33226=await _0x5726f5[_0x4525e9(0x12f)](getPluginInfo,_0x4525e9(0x166));if(_0xe33226){const _0xcc7561=_0xe33226[_0x4525e9(0x156)]||_0x5726f5['nYNTA'],_0x3fc5b7=_0xe33226[_0x4525e9(0x15a)]?_0x5726f5[_0x4525e9(0x162)]:'disabled';console['log']('\x20\x20'+_0x5726f5['LlWns'](bold,_0x5726f5['zxwlO'])+_0x4525e9(0x15d)+_0xcc7561+',\x20'+_0x3fc5b7+')');}else console['log'](_0x5726f5[_0x4525e9(0x19a)]),console['log'](_0x5726f5[_0x4525e9(0x18d)]);console['log'](_0x5726f5[_0x4525e9(0x19f)]);const {project:_0x9d63fc,user:_0x27d0fc}=await _0x5726f5[_0x4525e9(0x14b)](getInstalledSkills),_0x27250c=_0x9d63fc['filter'](_0x344536=>RANGER_MANAGED_SKILLS[_0x4525e9(0x148)](_0x344536[_0x4525e9(0x153)])),_0x2041b4=_0x27d0fc[_0x4525e9(0x128)](_0x5790cc=>RANGER_MANAGED_SKILLS[_0x4525e9(0x148)](_0x5790cc[_0x4525e9(0x153)])),_0x4ed90d=_0x27250c['length']+_0x2041b4[_0x4525e9(0x175)];if(_0x5726f5[_0x4525e9(0x15b)](_0x4ed90d,0x0))console[_0x4525e9(0x184)]('No\x20skills\x20installed'),console[_0x4525e9(0x184)](_0x4525e9(0x190));else{if(_0x5726f5[_0x4525e9(0x144)](_0x27250c[_0x4525e9(0x175)],0x0)){console['log'](_0x4525e9(0x141));for(const _0x35083b of _0x27250c){console[_0x4525e9(0x184)](_0x4525e9(0x19b)+_0x5726f5[_0x4525e9(0x16c)](bold,_0x35083b[_0x4525e9(0x196)])+':\x20'+link(_0x35083b[_0x4525e9(0x142)],basename(_0x35083b['path'])));}}if(_0x2041b4['length']>0x0){console[_0x4525e9(0x184)](_0x5726f5[_0x4525e9(0x12c)]);for(const _0x320949 of _0x2041b4){console['log']('\x20\x20\x20\x20'+_0x5726f5['uUUEZ'](bold,_0x320949['displayName'])+':\x20'+link(_0x320949[_0x4525e9(0x142)],_0x5726f5[_0x4525e9(0x12f)](basename,_0x320949[_0x4525e9(0x142)])));}}}console[_0x4525e9(0x184)](_0x5726f5[_0x4525e9(0x183)]);const {envs:_0x38b3b2,activeEnv:_0x2d8907}=await _0x5726f5['CDawQ'](getEnvironments);let _0x286a9d=[];if(_0x5d0e96)try{_0x286a9d=await listCloudProfiles();}catch{}const _0x35e11a=_0x5726f5[_0x4525e9(0x16a)](_0x38b3b2[_0x4525e9(0x175)],_0x286a9d[_0x4525e9(0x175)]);if(_0x5726f5['OjtyQ'](_0x35e11a,0x0))console[_0x4525e9(0x184)]('No\x20profiles\x20configured'),console[_0x4525e9(0x184)](_0x4525e9(0x15c));else{if(_0x5726f5[_0x4525e9(0x144)](_0x35e11a,0x5)){const _0x39f9ef=[];_0x286a9d['length']>0x0&&_0x39f9ef['push'](_0x286a9d[_0x4525e9(0x175)]+'\x20cloud'),_0x5726f5[_0x4525e9(0x147)](_0x38b3b2['length'],0x0)&&_0x39f9ef[_0x4525e9(0x177)](_0x38b3b2[_0x4525e9(0x175)]+_0x4525e9(0x193)),console['log'](_0x35e11a+'\x20profiles\x20configured\x20('+_0x39f9ef[_0x4525e9(0x17d)](',\x20')+')'),_0x2d8907&&console[_0x4525e9(0x184)]('\x20\x20Active:\x20'+bold(_0x2d8907)),console[_0x4525e9(0x184)](_0x4525e9(0x15e));}else{for(const _0x33339d of _0x286a9d){const _0x4a36e1=_0x5726f5['eZgCQ'](_0x33339d['name'],_0x2d8907)?_0x5726f5[_0x4525e9(0x17f)]:'';console[_0x4525e9(0x184)]('\x20\x20'+_0x5726f5[_0x4525e9(0x18f)](bold,_0x33339d[_0x4525e9(0x153)])+_0x4525e9(0x186)+_0x4a36e1);const _0x5434d3=_0x33339d['sessionUpdatedAt']?_0x4525e9(0x170)+_0x33339d[_0x4525e9(0x169)]+')':_0x4525e9(0x185);console['log'](_0x4525e9(0x194)+_0x5434d3);}const _0x4e9c75=new Set(_0x286a9d['map'](_0x75acfe=>_0x75acfe['name']));for(const _0x445312 of _0x38b3b2){if(_0x4e9c75[_0x4525e9(0x14d)](_0x445312['name']))continue;const _0x361712=_0x445312[_0x4525e9(0x18a)]?_0x5726f5[_0x4525e9(0x17f)]:'',_0x57c2bb=_0x445312['hasEncryptedAuth']?_0x5726f5['TBJbY']:_0x445312['hasPlaintextAuth']?_0x5726f5[_0x4525e9(0x14e)]:'none';console['log']('\x20\x20'+bold(_0x445312['name'])+_0x4525e9(0x12d)+_0x361712),console[_0x4525e9(0x184)](_0x4525e9(0x17a)+_0x57c2bb),_0x5726f5[_0x4525e9(0x195)](_0x445312['settingsPath'],_0x5726f5['QyBWM'])&&console[_0x4525e9(0x184)]('\x20\x20\x20\x20Settings:\x20'+_0x5726f5[_0x4525e9(0x18c)](link,_0x445312[_0x4525e9(0x161)],_0x5726f5[_0x4525e9(0x13c)](basename,_0x445312[_0x4525e9(0x161)])));}if(!_0x2d8907){console['log']('\x0a\x20\x20No\x20active\x20profile\x20set');const _0x15a730=[..._0x286a9d[_0x4525e9(0x163)](_0x9ce433=>_0x9ce433[_0x4525e9(0x153)]),..._0x38b3b2['filter'](_0x54f482=>!_0x4e9c75['has'](_0x54f482[_0x4525e9(0x153)]))[_0x4525e9(0x163)](_0x3352cb=>_0x3352cb[_0x4525e9(0x153)])];console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x15a730['join'](',\x20')+')');}}}console['log']('');}