@ranger-testing/ranger-cli 3.1.6-alpha.cbf7608-55 → 3.1.6-alpha.e1ccb01-57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  71. package/build/commands/utils/sessionCache.js +1 -1
  72. package/build/commands/utils/settings.js +1 -1
  73. package/build/commands/utils/skillContent.js +1 -1
  74. package/build/commands/utils/skills.js +1 -1
  75. package/build/commands/utils/stitchWebmFiles.js +1 -1
  76. package/build/commands/utils/telemetry.js +1 -1
  77. package/build/commands/utils/tokenRefresh.js +1 -1
  78. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  79. package/build/commands/utils/tunnelClient.js +1 -1
  80. package/build/commands/utils/userApi.js +1 -1
  81. package/build/commands/utils/version.js +1 -1
  82. package/build/commands/verifyFeature.js +1 -1
  83. package/build/commands/verifyFeatureCli.js +1 -1
  84. package/build/commands/verifyFeatureNovaCli.js +1 -1
  85. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  86. package/package.json +2 -2
@@ -1 +1 @@
1
- (function(_0x5aa521,_0x406223){const _0x598f9b=_0x1b78,_0x568d80=_0x5aa521();while(!![]){try{const _0xa445b4=parseInt(_0x598f9b(0xcf))/0x1*(-parseInt(_0x598f9b(0xde))/0x2)+parseInt(_0x598f9b(0xd4))/0x3+-parseInt(_0x598f9b(0xd3))/0x4+-parseInt(_0x598f9b(0xd9))/0x5*(parseInt(_0x598f9b(0xdd))/0x6)+-parseInt(_0x598f9b(0xd0))/0x7*(-parseInt(_0x598f9b(0xdf))/0x8)+-parseInt(_0x598f9b(0xce))/0x9+parseInt(_0x598f9b(0xd7))/0xa;if(_0xa445b4===_0x406223)break;else _0x568d80['push'](_0x568d80['shift']());}catch(_0x348e36){_0x568d80['push'](_0x568d80['shift']());}}}(_0x5313,0x5c81e));function _0x1b78(_0x254af4,_0x353d53){_0x254af4=_0x254af4-0xce;const _0x5313ec=_0x5313();let _0x1b7892=_0x5313ec[_0x254af4];return _0x1b7892;}import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0x517bca=_0x1b78,_0x19edf8={'gfxMr':_0x517bca(0xd6),'Vwgir':function(_0x2ccdb2,_0x137530){return _0x2ccdb2(_0x137530);}},_0x18064c=await getMcpAuthOrigin();if(_0x18064c){console[_0x517bca(0xd2)](_0x19edf8[_0x517bca(0xd1)]),await mcpBootstrap();return;}if(!isInteractive())throw new Error(_0x517bca(0xd8));try{const _0x6c5a3f=await runDeviceAuthFlow(),_0x526943=await _0x19edf8['Vwgir'](getCurrentUser,_0x6c5a3f);_0x526943['success']?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x526943[_0x517bca(0xda)]['organizationName']):console[_0x517bca(0xd2)](_0x517bca(0xd5));}catch(_0x554f33){throw new Error(_0x517bca(0xdb)+(_0x554f33 instanceof Error?_0x554f33[_0x517bca(0xdc)]:_0x554f33));}}function _0x5313(){const _0x568075=['6695PQWJnF','user','Login\x20failed:\x20','message','456zQazuX','2rDeeLr','117016tNUswk','1548108fqXdSr','657774Sbchnz','7nDrRWg','gfxMr','log','2340764uzXfsf','1271865mLWsHJ','\x0a✅\x20API\x20key\x20stored\x20successfully','Re-authenticating\x20via\x20MCP\x20bootstrap...','14570690sIiufv','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.'];_0x5313=function(){return _0x568075;};return _0x5313();}
1
+ (function(_0x2f55ee,_0x5d9566){const _0x1f09ab=_0x19c5,_0x1bc318=_0x2f55ee();while(!![]){try{const _0x3837d5=parseInt(_0x1f09ab(0x178))/0x1*(-parseInt(_0x1f09ab(0x177))/0x2)+-parseInt(_0x1f09ab(0x17d))/0x3*(parseInt(_0x1f09ab(0x17a))/0x4)+parseInt(_0x1f09ab(0x174))/0x5*(parseInt(_0x1f09ab(0x17b))/0x6)+parseInt(_0x1f09ab(0x17c))/0x7*(parseInt(_0x1f09ab(0x182))/0x8)+parseInt(_0x1f09ab(0x17f))/0x9*(parseInt(_0x1f09ab(0x171))/0xa)+parseInt(_0x1f09ab(0x180))/0xb+-parseInt(_0x1f09ab(0x179))/0xc*(-parseInt(_0x1f09ab(0x17e))/0xd);if(_0x3837d5===_0x5d9566)break;else _0x1bc318['push'](_0x1bc318['shift']());}catch(_0x4f2a6c){_0x1bc318['push'](_0x1bc318['shift']());}}}(_0x28b0,0xed348));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x19c5(_0x57f2b4,_0x4a86ee){_0x57f2b4=_0x57f2b4-0x171;const _0x28b0d9=_0x28b0();let _0x19c574=_0x28b0d9[_0x57f2b4];return _0x19c574;}import{getCurrentUser}from'./utils/userApi.js';function _0x28b0(){const _0x591fd2=['80iUxxqL','IhCPW','message','321254hiTBZB','11jJjnUu','12xaGPAd','68ZYUuzi','110226ewAylL','119zXKevA','135357FiKZHh','24085451swFIsq','9mpsdzx','2180046fMsbdD','log','159304VwxMYU','success','8221420lOmmTl','Re-authenticating\x20via\x20MCP\x20bootstrap...','ITLVq'];_0x28b0=function(){return _0x591fd2;};return _0x28b0();}import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0x56703a=_0x19c5,_0x10cef7={'IhCPW':function(_0x17688e){return _0x17688e();},'SVnRp':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','ITLVq':function(_0x212194,_0x34f3e3){return _0x212194(_0x34f3e3);}},_0x5b46ba=await _0x10cef7[_0x56703a(0x175)](getMcpAuthOrigin);if(_0x5b46ba){console[_0x56703a(0x181)](_0x56703a(0x172)),await mcpBootstrap();return;}if(!isInteractive())throw new Error(_0x10cef7['SVnRp']);try{const _0x5bfa99=await _0x10cef7['IhCPW'](runDeviceAuthFlow),_0x5adfa4=await _0x10cef7[_0x56703a(0x173)](getCurrentUser,_0x5bfa99);_0x5adfa4[_0x56703a(0x183)]?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x5adfa4['user']['organizationName']):console['log']('\x0a✅\x20API\x20key\x20stored\x20successfully');}catch(_0x4335ea){throw new Error('Login\x20failed:\x20'+(_0x4335ea instanceof Error?_0x4335ea[_0x56703a(0x176)]:_0x4335ea));}}
@@ -1 +1 @@
1
- const _0x207f1f=_0x375a;(function(_0x2dc042,_0x3b902a){const _0x22e9e1=_0x375a,_0x20cdbc=_0x2dc042();while(!![]){try{const _0x2276c7=parseInt(_0x22e9e1(0x1c1))/0x1*(parseInt(_0x22e9e1(0x1b0))/0x2)+-parseInt(_0x22e9e1(0x1e7))/0x3+-parseInt(_0x22e9e1(0x210))/0x4*(-parseInt(_0x22e9e1(0x1b6))/0x5)+-parseInt(_0x22e9e1(0x1e1))/0x6*(parseInt(_0x22e9e1(0x1fb))/0x7)+parseInt(_0x22e9e1(0x213))/0x8*(parseInt(_0x22e9e1(0x1f1))/0x9)+-parseInt(_0x22e9e1(0x1ca))/0xa+parseInt(_0x22e9e1(0x198))/0xb;if(_0x2276c7===_0x3b902a)break;else _0x20cdbc['push'](_0x20cdbc['shift']());}catch(_0x45c8a3){_0x20cdbc['push'](_0x20cdbc['shift']());}}}(_0x24bb,0x5b026));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',_0x207f1f(0x1f2)),AUTH_ORIGIN_PATH=join(homedir(),_0x207f1f(0x19a),'auth-origin.txt');export async function getMcpAuthOrigin(){const _0x198c10=_0x207f1f,_0x2b9c25={'XJLJt':function(_0x1e1efe,_0x1d44e8){return _0x1e1efe||_0x1d44e8;}};try{const _0x330c83=(await readFile(AUTH_ORIGIN_PATH,_0x198c10(0x19c)))['trim']();return _0x2b9c25['XJLJt'](_0x330c83,null);}catch{return null;}}export async function mcpBootstrap(){const _0x40eca7=_0x207f1f,_0x1659c9={'IwIgq':function(_0x514408,_0x478d9a){return _0x514408(_0x478d9a);},'Xhcao':function(_0x2f445d){return _0x2f445d();},'weOFu':function(_0x1652af,_0x4efad1){return _0x1652af+_0x4efad1;},'oYKvU':function(_0x1c258d,_0x564d7f){return _0x1c258d(_0x564d7f);},'NLorL':function(_0x4e88b1,_0x4068f,_0x162779){return _0x4e88b1(_0x4068f,_0x162779);}},_0x2df4c9=getMcpAuthUrl();currentOrigin=_0x2df4c9;const _0x59bf80=process['stdout'][_0x40eca7(0x1d5)]??![];console[_0x40eca7(0x1e9)]('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x2df4c9+'\x0a');const _0x350f45=await _0x1659c9[_0x40eca7(0x1c0)](tryUnauthenticated,_0x2df4c9);let _0x363d21=null;if(_0x350f45===_0x40eca7(0x1e0))_0x363d21='';else{_0x363d21=await _0x1659c9[_0x40eca7(0x1a4)](loadCachedToken);if(!_0x363d21){if(!_0x59bf80)throw new Error(_0x1659c9['weOFu']('MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a',_0x40eca7(0x199)));_0x363d21=await _0x1659c9['oYKvU'](oauthFlow,_0x2df4c9);}}await _0x1659c9['NLorL'](callGetCliToken,_0x2df4c9,_0x363d21);}async function tryUnauthenticated(_0x512204){const _0x1e3377=_0x207f1f,_0x1175ef={'horsa':'application/json','vpIQB':'application/json,\x20text/event-stream','FtdKa':'initialize','aVDVn':_0x1e3377(0x1c6),'iVwQj':'ranger-cli','fTKDW':'1.0.0','sWKKv':_0x1e3377(0x1d4)},_0x552851=await fetch(_0x512204,{'method':_0x1e3377(0x204),'headers':{'Content-Type':_0x1175ef['horsa'],'Accept':_0x1175ef['vpIQB']},'body':JSON[_0x1e3377(0x1be)]({'jsonrpc':'2.0','id':0x1,'method':_0x1175ef[_0x1e3377(0x1d3)],'params':{'protocolVersion':_0x1175ef[_0x1e3377(0x1d7)],'capabilities':{},'clientInfo':{'name':_0x1175ef['iVwQj'],'version':_0x1175ef[_0x1e3377(0x1a5)]}}})});if(_0x552851['ok'])return await _0x552851['text'](),'proxied';if(_0x552851[_0x1e3377(0x1f8)]===0x191)return await _0x552851['text'](),_0x1175ef['sWKKv'];const _0x3d5b7e=await _0x552851[_0x1e3377(0x191)]();throw new Error(_0x1e3377(0x1d1)+_0x552851['status']+':\x20'+_0x3d5b7e);}function _0x375a(_0x3094e2,_0x17c70f){_0x3094e2=_0x3094e2-0x18e;const _0x24bbfb=_0x24bb();let _0x375ad1=_0x24bbfb[_0x3094e2];return _0x375ad1;}class OAuthTimeoutError extends Error{constructor(_0x4f1485){const _0x51b91b=_0x207f1f,_0x4968b7={'zTdfc':'OAuthTimeoutError'};super(_0x4f1485),this['name']=_0x4968b7[_0x51b91b(0x1f5)];}}function _0x24bb(){const _0x336615=['get_cli_token','QRTmL','resource','S256','\x0aOpening\x20browser\x20for\x20authentication...','MCP\x20initialize\x20failed:\x20','pathname','POST','<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','none','auth-origin.txt','WZbMa','clientId','state','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','sFLjd','get_cli_token\x20failed:\x20','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','headers','11636VyMMCZ','SIFaP','DXFVj','3820952sZMQEb','darwin','base64url','GkYWA','IvNiT','2.0','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','includes','ejcuX','LNrPV','RoVHR','\x0aToken\x20written\x20to\x20','close','content-type','parse','Unknown\x20error','mBFbA','text','initialize','code','oWNGY','Discovering\x20authorization\x20server...','MYKbw','VxFwE','3404335zaHukn','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','.ranger','toString','utf-8','rTGNP','NPTTC','update','searchParams','fGFYE','data:','qfluA','Xhcao','fTKDW','aNWVd','application/json,\x20text/event-stream','content','OAuth\x20error:\x20','stdout','refreshToken','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','\x20done','now','writeHead','2YAgxbB','Initializing\x20MCP\x20session...','error','token','http://localhost:','string','155suSfcE','isError','WuGQL','get','qwYXl','cpHuA','wHbkL','rzXIk','stringify','tYaaR','IwIgq','548957wxBhfm','Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','uHTDg','client_id','json','2025-03-26','sICVi','set','authorization_endpoint','349670ejYIcN','peqwi','hvaHT','/callback','message','WWwio','write','MCP\x20server\x20returned\x20HTTP\x20','vgUiG','FtdKa','needs-oauth','isTTY','prYuB','aVDVn','<html><body><h2>Authentication\x20failed</h2><p>','dONqR','DZsAx','application/json','Jxcgq','clientSecret','code_challenge_method','1.0.0','proxied','126AcAXae','end','xdg-open','length','Token\x20exchange\x20failed:\x20','text/event-stream','1022361OGGKZY','trim','log','127.0.0.1','refresh.txt','grtII','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','platform','Exchanging\x20authorization\x20code...','WmIyZ','9mbrjuF','mcp-oauth-tokens.json','Jptdh','IgOAt','zTdfc','url','Ndwgt','status','split','refresh_token','225904UqwpkE','Server\x20returned\x20error:\x20'];_0x24bb=function(){return _0x336615;};return _0x24bb();}async function oauthFlow(_0x7d273d){const _0x25cfd7=_0x207f1f,_0x4b5488={'qfluA':function(_0x43fd87,_0x5c1ad1){return _0x43fd87(_0x5c1ad1);},'ahVEo':function(_0x5de7c1,_0x81f253){return _0x5de7c1 instanceof _0x81f253;},'yujxT':function(_0x494d7f){return _0x494d7f();}};try{return await _0x4b5488[_0x25cfd7(0x1a3)](oauthFlowAttempt,_0x7d273d);}catch(_0x5b5640){if(_0x4b5488['ahVEo'](_0x5b5640,OAuthTimeoutError)&&await _0x4b5488['yujxT'](loadCachedClient))return console['log'](_0x25cfd7(0x20e)),await clearCachedClient(),await oauthFlowAttempt(_0x7d273d);throw _0x5b5640;}}async function oauthFlowAttempt(_0x2d68c8){const _0xbb140f=_0x207f1f,_0x550f51={'KhSXk':_0xbb140f(0x195),'bIIeE':function(_0x2e3f86,_0x5b85e3,_0x58e18d){return _0x2e3f86(_0x5b85e3,_0x58e18d);},'sICVi':_0xbb140f(0x204),'fZnEh':'application/json','grtII':'Ranger\x20CLI','IVNea':_0xbb140f(0x1fa),'uHTDg':_0xbb140f(0x206),'IgOAt':_0xbb140f(0x219),'WZbMa':function(_0x27583d,_0x49c0c1){return _0x27583d(_0x49c0c1);},'GocLR':'sha256','nMmyu':'hex','lyaNI':'code_challenge','wHbkL':_0xbb140f(0x1de),'yUvJd':_0xbb140f(0x20a),'Ndwgt':'resource','LNrPV':_0xbb140f(0x201),'NTDhV':function(_0x58e0db,_0x3bf440){return _0x58e0db(_0x3bf440);},'qwYXl':_0xbb140f(0x1ad)},_0x51399a=_0x2d68c8['replace'](/\/mcp$/,'');process[_0xbb140f(0x1aa)]['write'](_0x550f51['KhSXk']);const _0x40c025=await fetch(_0x51399a+'/.well-known/oauth-protected-resource');if(!_0x40c025['ok'])throw new Error(_0xbb140f(0x1c2));const _0x591458=await _0x40c025[_0xbb140f(0x1c5)](),_0x17b786=_0x591458['authorization_servers']?.[0x0];if(!_0x17b786)throw new Error('No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata');console[_0xbb140f(0x1e9)]('\x20'+_0x17b786);const _0x22835c=await fetchAuthServerMetadata(_0x17b786);let _0x5e649f,_0x42f315;const _0x50d369=await loadCachedClient();if(_0x50d369)_0x5e649f=_0x50d369['clientId'],_0x42f315=_0x50d369[_0xbb140f(0x1dd)];else{if(_0x22835c['registration_endpoint']){process[_0xbb140f(0x1aa)]['write']('Registering\x20OAuth\x20client...');const _0x5d9450=await _0x550f51['bIIeE'](fetch,_0x22835c['registration_endpoint'],{'method':_0x550f51[_0xbb140f(0x1c7)],'headers':{'Content-Type':_0x550f51['fZnEh']},'body':JSON['stringify']({'client_name':_0x550f51[_0xbb140f(0x1ec)],'redirect_uris':['http://localhost:'+CALLBACK_PORT+'/callback'],'grant_types':['authorization_code',_0x550f51['IVNea']],'response_types':[_0xbb140f(0x193)],'token_endpoint_auth_method':_0x550f51[_0xbb140f(0x1c3)]})});if(!_0x5d9450['ok']){const _0x4f9d03=await _0x5d9450['text']();throw new Error('Client\x20registration\x20failed:\x20'+_0x4f9d03);}const _0x75e0dd=await _0x5d9450[_0xbb140f(0x1c5)]();_0x5e649f=_0x75e0dd[_0xbb140f(0x1c4)],_0x42f315=_0x75e0dd['client_secret'],await saveCachedClient(_0x5e649f,_0x42f315),console[_0xbb140f(0x1e9)](_0xbb140f(0x1ad));}else throw new Error(_0x550f51[_0xbb140f(0x1f4)]);}const _0x1484f2=randomBytes(0x20)[_0xbb140f(0x19b)]('base64url'),_0x432b30=_0x550f51[_0xbb140f(0x208)](createHash,_0x550f51['GocLR'])[_0xbb140f(0x19f)](_0x1484f2)['digest'](_0xbb140f(0x215)),_0x3780ad=_0x550f51['WZbMa'](randomBytes,0x10)['toString'](_0x550f51['nMmyu']),_0x379b55=new URL(_0x22835c[_0xbb140f(0x1c9)]);_0x379b55['searchParams'][_0xbb140f(0x1c8)]('response_type','code'),_0x379b55[_0xbb140f(0x1a0)][_0xbb140f(0x1c8)](_0xbb140f(0x1c4),_0x5e649f),_0x379b55[_0xbb140f(0x1a0)][_0xbb140f(0x1c8)]('redirect_uri','http://localhost:'+CALLBACK_PORT+_0xbb140f(0x1cd)),_0x379b55['searchParams']['set'](_0x550f51['lyaNI'],_0x432b30),_0x379b55['searchParams'][_0xbb140f(0x1c8)](_0x550f51[_0xbb140f(0x1bc)],_0xbb140f(0x200)),_0x379b55[_0xbb140f(0x1a0)][_0xbb140f(0x1c8)](_0x550f51['yUvJd'],_0x3780ad);_0x591458['resource']&&_0x379b55['searchParams'][_0xbb140f(0x1c8)](_0x550f51[_0xbb140f(0x1f7)],_0x591458['resource']);console[_0xbb140f(0x1e9)](_0x550f51[_0xbb140f(0x21c)]),console['log'](_0xbb140f(0x1ed)+_0x379b55[_0xbb140f(0x19b)]()+'\x0a'),await openBrowser(_0x379b55['toString']());const _0x34f441=await _0x550f51['NTDhV'](waitForCallback,_0x3780ad);process['stdout']['write'](_0xbb140f(0x1ef));const _0x100634=new URLSearchParams({'grant_type':'authorization_code','code':_0x34f441,'redirect_uri':_0xbb140f(0x1b4)+CALLBACK_PORT+'/callback','client_id':_0x5e649f,'code_verifier':_0x1484f2});_0x42f315&&_0x100634['set']('client_secret',_0x42f315);_0x591458[_0xbb140f(0x1ff)]&&_0x100634['set'](_0xbb140f(0x1ff),_0x591458['resource']);const _0x261d6d=await _0x550f51['bIIeE'](fetch,_0x22835c['token_endpoint'],{'method':'POST','headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':_0x100634});if(!_0x261d6d['ok']){const _0x2d5de9=await _0x261d6d[_0xbb140f(0x191)]();throw new Error(_0xbb140f(0x1e5)+_0x2d5de9);}const _0x45f431=await _0x261d6d[_0xbb140f(0x1c5)]();return console[_0xbb140f(0x1e9)](_0x550f51[_0xbb140f(0x1ba)]),await saveCachedToken(_0x45f431['access_token'],_0x45f431[_0xbb140f(0x1fa)],_0x45f431['expires_in']),_0x45f431['access_token'];}async function callGetCliToken(_0x55ed6e,_0x5efad2){const _0x354a37=_0x207f1f,_0x4eb835={'UwEVW':_0x354a37(0x1db),'Jxcgq':_0x354a37(0x1b1),'oWNGY':function(_0x1637dc,_0x4b9441){return _0x1637dc(_0x4b9441);},'ejcuX':'2.0','ZBloz':'2025-03-26','dqqxa':'ranger-cli','RWFVd':_0x354a37(0x1df),'ldvWJ':'\x20done','tYaaR':function(_0x3cf02f,_0x30bbe7,_0x4afed7){return _0x3cf02f(_0x30bbe7,_0x4afed7);},'hvaHT':_0x354a37(0x204),'Htczt':'notifications/initialized','prYuB':'Requesting\x20CLI\x20token...','VxFwE':function(_0x28065e,_0x90c385){return _0x28065e(_0x90c385);},'qUkWg':_0x354a37(0x1fd),'DZsAx':'\x0aUnexpected\x20response\x20structure:','mBFbA':_0x354a37(0x1ac),'WWwio':function(_0x425632){return _0x425632();},'yNPIY':'.ranger','rzXIk':_0x354a37(0x1eb),'DGiWJ':function(_0x24448c,_0x5d3349,_0x3edf55,_0x92dcc5){return _0x24448c(_0x5d3349,_0x3edf55,_0x92dcc5);},'QHEOn':function(_0x2598bf,_0x425651,_0x248a6b){return _0x2598bf(_0x425651,_0x248a6b);},'nEhym':_0x354a37(0x207),'MYKbw':'Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a'},_0x286dba={'Content-Type':_0x4eb835['UwEVW'],'Accept':_0x354a37(0x1a7)};_0x5efad2&&(_0x286dba['Authorization']='Bearer\x20'+_0x5efad2);const _0x2ac9f2=async _0x49e075=>{const _0x5a62f2=_0x354a37,_0x3a23eb=await fetch(_0x55ed6e,{'method':'POST','headers':_0x286dba,'body':JSON['stringify'](_0x49e075)});if(!_0x3a23eb['ok']){const _0x2bab8c=await _0x3a23eb['text']();throw new Error('HTTP\x20'+_0x3a23eb[_0x5a62f2(0x1f8)]+':\x20'+_0x2bab8c);}return parseResponse(_0x3a23eb);};process['stdout'][_0x354a37(0x1d0)](_0x4eb835[_0x354a37(0x1dc)]);const _0x1037de=await _0x4eb835[_0x354a37(0x194)](_0x2ac9f2,{'jsonrpc':_0x4eb835['ejcuX'],'id':0x1,'method':_0x354a37(0x192),'params':{'protocolVersion':_0x4eb835['ZBloz'],'capabilities':{},'clientInfo':{'name':_0x4eb835['dqqxa'],'version':_0x4eb835['RWFVd']}}});if(_0x1037de['error'])throw new Error(_0x354a37(0x202)+(_0x1037de[_0x354a37(0x1b2)][_0x354a37(0x1ce)]??JSON['stringify'](_0x1037de['error'])));console[_0x354a37(0x1e9)](_0x4eb835['ldvWJ']),await _0x4eb835[_0x354a37(0x1bf)](fetch,_0x55ed6e,{'method':_0x4eb835[_0x354a37(0x1cc)],'headers':_0x286dba,'body':JSON[_0x354a37(0x1be)]({'jsonrpc':_0x4eb835[_0x354a37(0x21b)],'method':_0x4eb835['Htczt']})})['then'](_0x553e9a=>_0x553e9a[_0x354a37(0x191)]()),process[_0x354a37(0x1aa)][_0x354a37(0x1d0)](_0x4eb835[_0x354a37(0x1d6)]);const _0x1f2fe0=await _0x4eb835[_0x354a37(0x197)](_0x2ac9f2,{'jsonrpc':_0x354a37(0x218),'id':0x2,'method':'tools/call','params':{'name':_0x4eb835['qUkWg'],'arguments':{}}});if(_0x1f2fe0[_0x354a37(0x1b2)])throw new Error(_0x354a37(0x20d)+(_0x1f2fe0['error']['message']??JSON[_0x354a37(0x1be)](_0x1f2fe0['error'])));console[_0x354a37(0x1e9)]('\x20done');const _0x3515c7=_0x4eb835['oWNGY'](extractToken,_0x1f2fe0['result']);if(!_0x3515c7){console['error'](_0x4eb835[_0x354a37(0x1da)]),console['error'](JSON[_0x354a37(0x1be)](_0x1f2fe0['result'],null,0x2));throw new Error(_0x4eb835[_0x354a37(0x190)]);}const _0x38f9c7=_0x4eb835['tYaaR'](join,_0x4eb835[_0x354a37(0x1cf)](homedir),_0x4eb835['yNPIY']),_0x46e740=_0x4eb835['tYaaR'](join,_0x38f9c7,_0x4eb835[_0x354a37(0x1bd)]);await _0x4eb835['tYaaR'](mkdir,_0x38f9c7,{'recursive':!![]}),await _0x4eb835['DGiWJ'](writeFile,_0x46e740,_0x3515c7,{'mode':0x180}),await writeFile(_0x4eb835['QHEOn'](join,_0x38f9c7,_0x4eb835['nEhym']),_0x55ed6e,{'mode':0x180}),console[_0x354a37(0x1e9)](_0x354a37(0x21e)+_0x46e740),console[_0x354a37(0x1e9)](_0x4eb835[_0x354a37(0x196)]);}async function fetchAuthServerMetadata(_0x31a10d){const _0x2f3aab=_0x31a10d+'/.well-known/oauth-authorization-server',_0x5d6fb7=await fetch(_0x2f3aab);if(!_0x5d6fb7['ok'])throw new Error('Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20'+_0x2f3aab+':\x20'+_0x5d6fb7['status']);return _0x5d6fb7['json']();}function waitForCallback(_0x11dca4){const _0x5041c7={'IeFtK':function(_0x103ebf){return _0x103ebf();},'WuGQL':function(_0x3ef00b,_0x4ee61d){return _0x3ef00b(_0x4ee61d);},'cpHuA':'text/html','KCLCg':function(_0x2e3b45,_0x5840a3){return _0x2e3b45!==_0x5840a3;}};return new Promise((_0x14dc3f,_0x2a41a2)=>{const _0x5c126f=_0x375a,_0x548982=()=>{const _0xb24a34=_0x375a;_0xbe600b['closeAllConnections'](),_0xbe600b[_0xb24a34(0x21f)]();},_0x591de7=setTimeout(()=>{const _0x54ad53=_0x375a;_0x5041c7['IeFtK'](_0x548982),_0x5041c7['WuGQL'](_0x2a41a2,new OAuthTimeoutError(_0x54ad53(0x20b)));},0x1d4c0),_0xbe600b=createServer((_0x48c381,_0x172e87)=>{const _0x5928dc=_0x375a,_0xb34b4b=new URL(_0x48c381[_0x5928dc(0x1f6)]??'/','http://localhost:'+CALLBACK_PORT);if(_0xb34b4b[_0x5928dc(0x203)]!==_0x5928dc(0x1cd)){_0x172e87[_0x5928dc(0x1af)](0x194),_0x172e87[_0x5928dc(0x1e2)]('Not\x20found');return;}const _0x21f812=_0xb34b4b['searchParams'][_0x5928dc(0x1b9)]('code'),_0x26399c=_0xb34b4b[_0x5928dc(0x1a0)][_0x5928dc(0x1b9)]('state'),_0xc21a08=_0xb34b4b['searchParams'][_0x5928dc(0x1b9)](_0x5928dc(0x1b2));if(_0xc21a08){const _0x293923=_0xb34b4b['searchParams'][_0x5928dc(0x1b9)]('error_description')??_0xc21a08;_0x172e87['writeHead'](0xc8,{'Content-Type':_0x5041c7[_0x5928dc(0x1bb)]}),_0x172e87['end'](_0x5928dc(0x1d8)+_0x293923+'</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>'),_0x5041c7['WuGQL'](clearTimeout,_0x591de7),_0x5041c7['IeFtK'](_0x548982),_0x2a41a2(new Error(_0x5928dc(0x1a9)+_0x293923));return;}if(!_0x21f812||_0x5041c7['KCLCg'](_0x26399c,_0x11dca4)){_0x172e87['writeHead'](0x190,{'Content-Type':'text/html'}),_0x172e87[_0x5928dc(0x1e2)](_0x5928dc(0x205));return;}_0x172e87[_0x5928dc(0x1af)](0xc8,{'Content-Type':'text/html'}),_0x172e87['end']('<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>'),_0x5041c7[_0x5928dc(0x1b8)](clearTimeout,_0x591de7),_0x548982(),_0x14dc3f(_0x21f812);});_0xbe600b['listen'](CALLBACK_PORT,_0x5c126f(0x1ea));});}async function openBrowser(_0x2c756a){const _0x1163e5=_0x207f1f,_0x39d406={'Jptdh':function(_0x3db972,_0x2e4a26){return _0x3db972===_0x2e4a26;},'IvNiT':_0x1163e5(0x214),'cvGgY':'open','sFLjd':'win32','peqwi':function(_0x431716,_0x1288ac){return _0x431716(_0x1288ac);}},_0x35064f=_0x39d406[_0x1163e5(0x1f3)](process[_0x1163e5(0x1ee)],_0x39d406[_0x1163e5(0x217)])?_0x39d406['cvGgY']:process['platform']===_0x39d406[_0x1163e5(0x20c)]?'start':_0x1163e5(0x1e3);_0x39d406[_0x1163e5(0x1cb)](exec,_0x35064f+'\x20\x22'+_0x2c756a+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x3b46e1=_0x207f1f,_0x16bf3b={'fGFYE':_0x3b46e1(0x19c),'zBGKS':function(_0x96b666,_0x12c609){return _0x96b666!==_0x12c609;}};try{const _0x24d8a1=JSON[_0x3b46e1(0x18e)](await readFile(TOKEN_CACHE_PATH,_0x16bf3b[_0x3b46e1(0x1a1)]));if(_0x24d8a1['origin']&&_0x16bf3b['zBGKS'](_0x24d8a1['origin'],currentOrigin))return null;if(_0x24d8a1['expiresAt']&&Date[_0x3b46e1(0x1ae)]()>_0x24d8a1['expiresAt'])return null;return _0x24d8a1['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x64710a,_0x229fb5,_0x9ee55d){const _0x389af9=_0x207f1f,_0x349fbe={'QxvsV':function(_0x16ee80){return _0x16ee80();},'NPTTC':function(_0x3824a9,_0x4bc5b3){return _0x3824a9+_0x4bc5b3;},'GkYWA':function(_0x2ee375,_0x388457,_0x4445bf){return _0x2ee375(_0x388457,_0x4445bf);},'IAiAD':function(_0xb6e010){return _0xb6e010();},'DXFVj':function(_0x1e4019,_0x48aeee,_0x28fe9b,_0x122588){return _0x1e4019(_0x48aeee,_0x28fe9b,_0x122588);}},_0x396aa2=await _0x349fbe['QxvsV'](loadCachedData),_0x186dcd={..._0x396aa2,'origin':currentOrigin,'accessToken':_0x64710a,'refreshToken':_0x229fb5??_0x396aa2?.[_0x389af9(0x1ab)],'expiresAt':_0x9ee55d?_0x349fbe[_0x389af9(0x19e)](Date[_0x389af9(0x1ae)](),_0x9ee55d*0x3e8):undefined};await _0x349fbe[_0x389af9(0x216)](mkdir,join(_0x349fbe['IAiAD'](homedir),'.ranger'),{'recursive':!![]}),await _0x349fbe[_0x389af9(0x212)](writeFile,TOKEN_CACHE_PATH,JSON[_0x389af9(0x1be)](_0x186dcd),{'mode':0x180});}async function loadCachedClient(){const _0x350b8a=_0x207f1f,_0x119408={'yCani':function(_0x1f210c,_0x5a0dba){return _0x1f210c!==_0x5a0dba;}},_0x4e5ce1=await loadCachedData();if(_0x4e5ce1?.['origin']&&_0x119408['yCani'](_0x4e5ce1['origin'],currentOrigin))return null;return _0x4e5ce1?.[_0x350b8a(0x209)]?{'clientId':_0x4e5ce1[_0x350b8a(0x209)],'clientSecret':_0x4e5ce1['clientSecret']}:null;}async function clearCachedClient(){const _0x3282e7=_0x207f1f,_0x746d12={'WmIyZ':function(_0x32d657,_0x2dd4d3,_0x31be0c,_0xb0b45c){return _0x32d657(_0x2dd4d3,_0x31be0c,_0xb0b45c);}},_0xbd8247=await loadCachedData();if(!_0xbd8247)return;const {clientId:_0x11df10,clientSecret:_0x2ceabb,..._0x16cebe}=_0xbd8247;await _0x746d12[_0x3282e7(0x1f0)](writeFile,TOKEN_CACHE_PATH,JSON[_0x3282e7(0x1be)](_0x16cebe),{'mode':0x180});}async function saveCachedClient(_0x1f2c24,_0x516ac5){const _0x14d96d=_0x207f1f,_0x55a32f={'aNWVd':'.ranger'},_0x4cdf75=await loadCachedData(),_0x4f2554={..._0x4cdf75,'origin':currentOrigin,'accessToken':_0x4cdf75?.['accessToken']??'','clientId':_0x1f2c24,'clientSecret':_0x516ac5};await mkdir(join(homedir(),_0x55a32f[_0x14d96d(0x1a6)]),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON[_0x14d96d(0x1be)](_0x4f2554),{'mode':0x180});}async function loadCachedData(){try{return JSON['parse'](await readFile(TOKEN_CACHE_PATH,'utf-8'));}catch{return null;}}async function parseResponse(_0x1b1b49){const _0x495c98=_0x207f1f,_0x588cb8={'mpREq':_0x495c98(0x220),'vgUiG':_0x495c98(0x1a2),'rTGNP':function(_0x32277b,_0x393eea){return _0x32277b!==_0x393eea;},'SIFaP':'No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream'},_0x11b442=_0x1b1b49[_0x495c98(0x20f)]['get'](_0x588cb8['mpREq'])??'';if(_0x11b442[_0x495c98(0x21a)](_0x495c98(0x1e6))){const _0x3a413e=await _0x1b1b49[_0x495c98(0x191)]();for(const _0x115c2e of _0x3a413e[_0x495c98(0x1f9)]('\x0a')){const _0x12a989=_0x115c2e['trim']();if(_0x12a989['startsWith'](_0x588cb8[_0x495c98(0x1d2)])){const _0x413199=_0x12a989['slice'](_0x495c98(0x1a2)[_0x495c98(0x1e4)])[_0x495c98(0x1e8)]();if(!_0x413199)continue;try{const _0x5293b0=JSON[_0x495c98(0x18e)](_0x413199);if(_0x588cb8[_0x495c98(0x19d)](_0x5293b0['id'],undefined)||_0x5293b0['error'])return _0x5293b0;}catch{}}}throw new Error(_0x588cb8[_0x495c98(0x211)]);}return _0x1b1b49[_0x495c98(0x1c5)]();}function extractToken(_0x459d29){const _0x2545b3=_0x207f1f,_0x17c6cb={'dONqR':function(_0x275704,_0x5b3a93){return _0x275704===_0x5b3a93;},'QRTmL':'text','RoVHR':function(_0x1c1156,_0x36b507){return _0x1c1156===_0x36b507;}};if(!_0x459d29)return null;const _0x57bb28=_0x459d29['structuredContent'];if(_0x57bb28?.[_0x2545b3(0x1b3)]&&_0x17c6cb[_0x2545b3(0x1d9)](typeof _0x57bb28[_0x2545b3(0x1b3)],_0x2545b3(0x1b5)))return _0x57bb28[_0x2545b3(0x1b3)];if(_0x459d29[_0x2545b3(0x1b7)]){const _0x1e50c5=_0x459d29[_0x2545b3(0x1a8)];throw new Error(_0x2545b3(0x1fc)+(_0x1e50c5?.[0x0]?.['text']??_0x2545b3(0x18f)));}const _0x5cd4a4=_0x459d29[_0x2545b3(0x1a8)];if(_0x5cd4a4)for(const _0x6f23f2 of _0x5cd4a4){if(_0x6f23f2['type']===_0x17c6cb[_0x2545b3(0x1fe)]&&_0x6f23f2[_0x2545b3(0x191)]){try{const _0x4a3ebe=JSON['parse'](_0x6f23f2['text']);if(_0x17c6cb[_0x2545b3(0x21d)](typeof _0x4a3ebe?.['token'],'string'))return _0x4a3ebe['token'];}catch{}const _0x538c97=_0x6f23f2['text']['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x538c97)return _0x538c97[0x1];}}return null;}
1
+ const _0x1a2588=_0x2420;(function(_0x90ff3b,_0x2db658){const _0x2670db=_0x2420,_0x34e9e0=_0x90ff3b();while(!![]){try{const _0x428a2c=-parseInt(_0x2670db(0x1d3))/0x1+parseInt(_0x2670db(0x1c8))/0x2+-parseInt(_0x2670db(0x194))/0x3+-parseInt(_0x2670db(0x1d1))/0x4*(parseInt(_0x2670db(0x1a3))/0x5)+-parseInt(_0x2670db(0x18e))/0x6+parseInt(_0x2670db(0x1c2))/0x7*(-parseInt(_0x2670db(0x1a2))/0x8)+-parseInt(_0x2670db(0x200))/0x9*(-parseInt(_0x2670db(0x1d5))/0xa);if(_0x428a2c===_0x2db658)break;else _0x34e9e0['push'](_0x34e9e0['shift']());}catch(_0x2d9de1){_0x34e9e0['push'](_0x34e9e0['shift']());}}}(_0x10d0,0xb0257));import{mkdir,writeFile,readFile}from'fs/promises';function _0x2420(_0xfe6e23,_0x460c55){_0xfe6e23=_0xfe6e23-0x181;const _0x10d0d7=_0x10d0();let _0x2420ad=_0x10d0d7[_0xfe6e23];return _0x2420ad;}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(),_0x1a2588(0x1bd),_0x1a2588(0x1f3)),AUTH_ORIGIN_PATH=join(homedir(),_0x1a2588(0x1bd),_0x1a2588(0x18d));function _0x10d0(){const _0x22b921=['client_id','expiresAt','Registering\x20OAuth\x20client...','clientId','darwin','writeHead','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','GDXLS','8QRvqXC','2157550yXEAWc','\x0aOpening\x20browser\x20for\x20authentication...','Requesting\x20CLI\x20token...','aQOca','sha256','OAuth\x20error:\x20','win32','SGhcK','sJbsb','set','content-type','GJZao','MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','resource','<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','POST','ttbbt','OAuthTimeoutError','stringify','JYMCV','stdout','text','RtVBi','application/x-www-form-urlencoded','127.0.0.1','authorization_code','.ranger','base64url','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','trim','json','8317358RELTql','result','XflEV','error','ScLoy','log','2722566DZxXQc','Discovering\x20authorization\x20server...','close','utf-8','proxied','token','xpEWs','response_type','aeLgz','8zhWYcc','state','72878HHTVjI','Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','10ohPrXu','RYzek','iaMOL','end','yDMel','text/html','type','/callback','HmAEw','/.well-known/oauth-authorization-server','HHVbi','1.0.0','content','clientSecret','HWYTI','XYoed','needs-oauth','then','CZqCb','replace','TVjkb','nnlut','message','now','mALFy','RiUSq','OuJeV','data:','sUgrv','nKoVQ','mcp-oauth-tokens.json','oLjjt','origin','get_cli_token','SiGqn','tvwYz','jSnfm','structuredContent','zbQbq','split','wuMUw','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','22246821BXUKfD','ePbwy','FsESs','ujMXB','UZwsp','write','isError','ZAfeb','ZaMzw','refresh_token','hex','searchParams','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','get','MonRL','kOJks','ranger-cli','S256','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a','Mqbfm','match','Server\x20returned\x20error:\x20','YTZVs','mpGmA','Bearer\x20','status','aRGge','toString','YwXti','auth-origin.txt','5203182NTcOmh','authorization_endpoint','digest','closeAllConnections','qBrJo','/.well-known/oauth-protected-resource','361104UVIvSk','pathname','application/json','registration_endpoint','<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','authorization_servers'];_0x10d0=function(){return _0x22b921;};return _0x10d0();}export async function getMcpAuthOrigin(){const _0x57a8a4=_0x1a2588;try{const _0x55c250=(await readFile(AUTH_ORIGIN_PATH,'utf-8'))[_0x57a8a4(0x1c0)]();return _0x55c250||null;}catch{return null;}}export async function mcpBootstrap(){const _0x490207=_0x1a2588,_0x24a36c={'qXQns':function(_0x1465c8){return _0x1465c8();},'xpEWs':function(_0xcc06f4,_0x3be89c){return _0xcc06f4===_0x3be89c;},'zShDO':_0x490207(0x1cc),'NmHuq':function(_0x471af5){return _0x471af5();},'Bvmni':function(_0x535fbf,_0x2d000b){return _0x535fbf+_0x2d000b;},'ScLoy':_0x490207(0x1a0),'mlUBR':function(_0x10af4d,_0x2185d7){return _0x10af4d(_0x2185d7);},'vTrKR':function(_0x2f0d28,_0x26820d,_0xd0cde5){return _0x2f0d28(_0x26820d,_0xd0cde5);}},_0x22c487=_0x24a36c['qXQns'](getMcpAuthUrl);currentOrigin=_0x22c487;const _0x14d79d=process['stdout']['isTTY']??![];console[_0x490207(0x1c7)](_0x490207(0x181)+_0x22c487+'\x0a');const _0x1855de=await tryUnauthenticated(_0x22c487);let _0x1eb700=null;if(_0x24a36c[_0x490207(0x1ce)](_0x1855de,_0x24a36c['zShDO']))_0x1eb700='';else{_0x1eb700=await _0x24a36c['NmHuq'](loadCachedToken);if(!_0x1eb700){if(!_0x14d79d)throw new Error(_0x24a36c['Bvmni'](_0x490207(0x1af),_0x24a36c[_0x490207(0x1c6)]));_0x1eb700=await _0x24a36c['mlUBR'](oauthFlow,_0x22c487);}}await _0x24a36c['vTrKR'](callGetCliToken,_0x22c487,_0x1eb700);}async function tryUnauthenticated(_0x461a33){const _0x589b9f=_0x1a2588,_0x58f4ac={'oLjjt':function(_0x4fbcd0,_0x231fd6,_0x52ecb8){return _0x4fbcd0(_0x231fd6,_0x52ecb8);},'TEJIW':'application/json','YwXti':'application/json,\x20text/event-stream','fdMCk':_0x589b9f(0x210),'aRGge':'proxied','HZQxS':function(_0x567684,_0x3e50e2){return _0x567684===_0x3e50e2;}},_0x1dcb9d=await _0x58f4ac[_0x589b9f(0x1f4)](fetch,_0x461a33,{'method':'POST','headers':{'Content-Type':_0x58f4ac['TEJIW'],'Accept':_0x58f4ac[_0x589b9f(0x18c)]},'body':JSON[_0x589b9f(0x1b5)]({'jsonrpc':'2.0','id':0x1,'method':'initialize','params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x58f4ac['fdMCk'],'version':_0x589b9f(0x1e0)}}})});if(_0x1dcb9d['ok'])return await _0x1dcb9d['text'](),_0x58f4ac[_0x589b9f(0x18a)];if(_0x58f4ac['HZQxS'](_0x1dcb9d[_0x589b9f(0x189)],0x191))return await _0x1dcb9d['text'](),_0x589b9f(0x1e5);const _0x23e98e=await _0x1dcb9d[_0x589b9f(0x1b8)]();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0x1dcb9d['status']+':\x20'+_0x23e98e);}class OAuthTimeoutError extends Error{constructor(_0x17f770){const _0x14b643=_0x1a2588;super(_0x17f770),this['name']=_0x14b643(0x1b4);}}async function oauthFlow(_0x44b04d){const _0x5c7eee=_0x1a2588,_0x971249={'Mqbfm':function(_0x9d7755,_0x373c1c){return _0x9d7755 instanceof _0x373c1c;}};try{return await oauthFlowAttempt(_0x44b04d);}catch(_0x31371c){if(_0x971249[_0x5c7eee(0x183)](_0x31371c,OAuthTimeoutError)&&await loadCachedClient())return console['log'](_0x5c7eee(0x1bf)),await clearCachedClient(),await oauthFlowAttempt(_0x44b04d);throw _0x31371c;}}async function oauthFlowAttempt(_0x399db6){const _0x4f54bf=_0x1a2588,_0x4813db={'QTpIB':_0x4f54bf(0x1c9),'GJZao':function(_0x492e64,_0x46db8b){return _0x492e64(_0x46db8b);},'nnlut':_0x4f54bf(0x1d4),'CZqCb':function(_0x24cef1,_0x2be71f){return _0x24cef1(_0x2be71f);},'ttbbt':function(_0x397606){return _0x397606();},'zbQbq':'Ranger\x20CLI','hmtRR':'refresh_token','zCzsu':'code','iaMOL':'none','CNTyk':function(_0x3c756a,_0x835875,_0xf1e86b){return _0x3c756a(_0x835875,_0xf1e86b);},'qrncQ':'redirect_uri','UZwsp':'code_challenge','yYxZy':_0x4f54bf(0x211),'hxiuu':_0x4f54bf(0x1a4),'HHVbi':function(_0x3027b0,_0xe4835e){return _0x3027b0(_0xe4835e);},'oEooh':_0x4f54bf(0x1bc),'ePbwy':'client_secret','nKoVQ':'resource','XYoed':function(_0x57e152,_0x13d817,_0x1e8904){return _0x57e152(_0x13d817,_0x1e8904);},'rnJin':_0x4f54bf(0x1ba),'UAGll':'\x20done','uWQlt':function(_0x3c60e9,_0x19b37d,_0x4e3117,_0x27298d){return _0x3c60e9(_0x19b37d,_0x4e3117,_0x27298d);}},_0x967f55=_0x399db6[_0x4f54bf(0x1e8)](/\/mcp$/,'');process['stdout']['write'](_0x4813db['QTpIB']);const _0x33ac20=await _0x4813db[_0x4f54bf(0x1ae)](fetch,_0x967f55+_0x4f54bf(0x193));if(!_0x33ac20['ok'])throw new Error(_0x4813db[_0x4f54bf(0x1ea)]);const _0x1598a5=await _0x33ac20[_0x4f54bf(0x1c1)](),_0x17fd99=_0x1598a5[_0x4f54bf(0x199)]?.[0x0];if(!_0x17fd99)throw new Error('No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata');console['log']('\x20'+_0x17fd99);const _0x1b9619=await _0x4813db[_0x4f54bf(0x1e7)](fetchAuthServerMetadata,_0x17fd99);let _0x61efdb,_0x590bbe;const _0x35ab41=await _0x4813db[_0x4f54bf(0x1b3)](loadCachedClient);if(_0x35ab41)_0x61efdb=_0x35ab41[_0x4f54bf(0x19d)],_0x590bbe=_0x35ab41[_0x4f54bf(0x1e2)];else{if(_0x1b9619[_0x4f54bf(0x197)]){process[_0x4f54bf(0x1b7)][_0x4f54bf(0x205)](_0x4f54bf(0x19c));const _0x62bc7e=await fetch(_0x1b9619['registration_endpoint'],{'method':_0x4f54bf(0x1b2),'headers':{'Content-Type':_0x4f54bf(0x196)},'body':JSON['stringify']({'client_name':_0x4813db[_0x4f54bf(0x1fb)],'redirect_uris':['http://localhost:'+CALLBACK_PORT+_0x4f54bf(0x1dc)],'grant_types':['authorization_code',_0x4813db['hmtRR']],'response_types':[_0x4813db['zCzsu']],'token_endpoint_auth_method':_0x4813db[_0x4f54bf(0x1d7)]})});if(!_0x62bc7e['ok']){const _0x3a6ace=await _0x62bc7e[_0x4f54bf(0x1b8)]();throw new Error('Client\x20registration\x20failed:\x20'+_0x3a6ace);}const _0x254df1=await _0x62bc7e['json']();_0x61efdb=_0x254df1[_0x4f54bf(0x19a)],_0x590bbe=_0x254df1['client_secret'],await _0x4813db['CNTyk'](saveCachedClient,_0x61efdb,_0x590bbe),console['log']('\x20done');}else throw new Error('Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found');}const _0x2ac469=randomBytes(0x20)['toString'](_0x4f54bf(0x1be)),_0x3b1832=createHash(_0x4f54bf(0x1a7))['update'](_0x2ac469)[_0x4f54bf(0x190)]('base64url'),_0x2251e7=_0x4813db[_0x4f54bf(0x1e7)](randomBytes,0x10)[_0x4f54bf(0x18b)](_0x4f54bf(0x20a)),_0x5eb2ce=new URL(_0x1b9619[_0x4f54bf(0x18f)]);_0x5eb2ce[_0x4f54bf(0x20b)][_0x4f54bf(0x1ac)](_0x4f54bf(0x1cf),_0x4813db['zCzsu']),_0x5eb2ce['searchParams'][_0x4f54bf(0x1ac)](_0x4f54bf(0x19a),_0x61efdb),_0x5eb2ce[_0x4f54bf(0x20b)]['set'](_0x4813db['qrncQ'],'http://localhost:'+CALLBACK_PORT+'/callback'),_0x5eb2ce['searchParams']['set'](_0x4813db[_0x4f54bf(0x204)],_0x3b1832),_0x5eb2ce['searchParams'][_0x4f54bf(0x1ac)]('code_challenge_method',_0x4813db['yYxZy']),_0x5eb2ce['searchParams'][_0x4f54bf(0x1ac)](_0x4f54bf(0x1d2),_0x2251e7);_0x1598a5[_0x4f54bf(0x1b0)]&&_0x5eb2ce['searchParams']['set'](_0x4f54bf(0x1b0),_0x1598a5['resource']);console['log'](_0x4813db['hxiuu']),console[_0x4f54bf(0x1c7)](_0x4f54bf(0x1ff)+_0x5eb2ce[_0x4f54bf(0x18b)]()+'\x0a'),await openBrowser(_0x5eb2ce[_0x4f54bf(0x18b)]());const _0x2e2778=await _0x4813db[_0x4f54bf(0x1df)](waitForCallback,_0x2251e7);process['stdout'][_0x4f54bf(0x205)]('Exchanging\x20authorization\x20code...');const _0x3b8cbe=new URLSearchParams({'grant_type':_0x4813db['oEooh'],'code':_0x2e2778,'redirect_uri':'http://localhost:'+CALLBACK_PORT+_0x4f54bf(0x1dc),'client_id':_0x61efdb,'code_verifier':_0x2ac469});_0x590bbe&&_0x3b8cbe[_0x4f54bf(0x1ac)](_0x4813db[_0x4f54bf(0x201)],_0x590bbe);_0x1598a5['resource']&&_0x3b8cbe['set'](_0x4813db[_0x4f54bf(0x1f2)],_0x1598a5[_0x4f54bf(0x1b0)]);const _0x43bc17=await _0x4813db[_0x4f54bf(0x1e4)](fetch,_0x1b9619['token_endpoint'],{'method':_0x4f54bf(0x1b2),'headers':{'Content-Type':_0x4813db['rnJin']},'body':_0x3b8cbe});if(!_0x43bc17['ok']){const _0x21b33e=await _0x43bc17['text']();throw new Error('Token\x20exchange\x20failed:\x20'+_0x21b33e);}const _0x839d29=await _0x43bc17['json']();return console['log'](_0x4813db['UAGll']),await _0x4813db['uWQlt'](saveCachedToken,_0x839d29['access_token'],_0x839d29[_0x4f54bf(0x209)],_0x839d29['expires_in']),_0x839d29['access_token'];}async function callGetCliToken(_0x841ffd,_0x35bfd5){const _0x1538ea=_0x1a2588,_0xf8b5a6={'aQOca':'POST','sJbsb':function(_0xc0394e,_0x3eb3fb){return _0xc0394e(_0x3eb3fb);},'VCUuD':'Authorization','CdZoZ':'Initializing\x20MCP\x20session...','wuMUw':'ranger-cli','ZaMzw':'\x20done','hHfqp':function(_0x5b8743,_0x8c4b59,_0x559aa5){return _0x5b8743(_0x8c4b59,_0x559aa5);},'RiUSq':'2.0','ujMXB':function(_0x4062ab,_0xfdfe56){return _0x4062ab(_0xfdfe56);},'FsESs':'tools/call','rictJ':'\x0aUnexpected\x20response\x20structure:','YTZVs':'Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','JYMCV':function(_0x45f63f,_0x34ab27,_0x547639){return _0x45f63f(_0x34ab27,_0x547639);},'GgZZJ':function(_0x4e3417){return _0x4e3417();},'muTsk':function(_0x5cacaf,_0x253d77,_0x776796,_0x17fa39){return _0x5cacaf(_0x253d77,_0x776796,_0x17fa39);},'mpGmA':function(_0x10b822,_0x29b873,_0x5c60a3,_0x5775d7){return _0x10b822(_0x29b873,_0x5c60a3,_0x5775d7);},'tmemr':_0x1538ea(0x18d)},_0x2993de={'Content-Type':'application/json','Accept':'application/json,\x20text/event-stream'};_0x35bfd5&&(_0x2993de[_0xf8b5a6['VCUuD']]=_0x1538ea(0x188)+_0x35bfd5);const _0x52c053=async _0x2fdff8=>{const _0x304ca8=_0x1538ea,_0x34ea2f=await fetch(_0x841ffd,{'method':_0xf8b5a6[_0x304ca8(0x1a6)],'headers':_0x2993de,'body':JSON['stringify'](_0x2fdff8)});if(!_0x34ea2f['ok']){const _0x5b2bd5=await _0x34ea2f['text']();throw new Error('HTTP\x20'+_0x34ea2f[_0x304ca8(0x189)]+':\x20'+_0x5b2bd5);}return _0xf8b5a6[_0x304ca8(0x1ab)](parseResponse,_0x34ea2f);};process['stdout'][_0x1538ea(0x205)](_0xf8b5a6['CdZoZ']);const _0xfee0c8=await _0x52c053({'jsonrpc':'2.0','id':0x1,'method':'initialize','params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0xf8b5a6[_0x1538ea(0x1fd)],'version':_0x1538ea(0x1e0)}}});if(_0xfee0c8['error'])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0xfee0c8['error'][_0x1538ea(0x1eb)]??JSON['stringify'](_0xfee0c8[_0x1538ea(0x1c5)])));console[_0x1538ea(0x1c7)](_0xf8b5a6['ZaMzw']),await _0xf8b5a6['hHfqp'](fetch,_0x841ffd,{'method':'POST','headers':_0x2993de,'body':JSON['stringify']({'jsonrpc':_0xf8b5a6[_0x1538ea(0x1ee)],'method':'notifications/initialized'})})[_0x1538ea(0x1e6)](_0x1c1714=>_0x1c1714[_0x1538ea(0x1b8)]()),process[_0x1538ea(0x1b7)][_0x1538ea(0x205)](_0x1538ea(0x1a5));const _0x8246b4=await _0xf8b5a6[_0x1538ea(0x203)](_0x52c053,{'jsonrpc':'2.0','id':0x2,'method':_0xf8b5a6[_0x1538ea(0x202)],'params':{'name':_0x1538ea(0x1f6),'arguments':{}}});if(_0x8246b4['error'])throw new Error('get_cli_token\x20failed:\x20'+(_0x8246b4[_0x1538ea(0x1c5)][_0x1538ea(0x1eb)]??JSON[_0x1538ea(0x1b5)](_0x8246b4[_0x1538ea(0x1c5)])));console['log'](_0xf8b5a6[_0x1538ea(0x208)]);const _0x51b649=extractToken(_0x8246b4['result']);if(!_0x51b649){console[_0x1538ea(0x1c5)](_0xf8b5a6['rictJ']),console[_0x1538ea(0x1c5)](JSON[_0x1538ea(0x1b5)](_0x8246b4[_0x1538ea(0x1c3)],null,0x2));throw new Error(_0xf8b5a6[_0x1538ea(0x186)]);}const _0x3e1f41=_0xf8b5a6[_0x1538ea(0x1b6)](join,_0xf8b5a6['GgZZJ'](homedir),_0x1538ea(0x1bd)),_0x255208=join(_0x3e1f41,'refresh.txt');await mkdir(_0x3e1f41,{'recursive':!![]}),await _0xf8b5a6['muTsk'](writeFile,_0x255208,_0x51b649,{'mode':0x180}),await _0xf8b5a6[_0x1538ea(0x187)](writeFile,_0xf8b5a6[_0x1538ea(0x1b6)](join,_0x3e1f41,_0xf8b5a6['tmemr']),_0x841ffd,{'mode':0x180}),console['log']('\x0aToken\x20written\x20to\x20'+_0x255208),console[_0x1538ea(0x1c7)](_0x1538ea(0x182));}async function fetchAuthServerMetadata(_0x225ab3){const _0x2cf38c=_0x1a2588,_0x34acb3={'KfGBA':function(_0xbb4a44,_0x1a447f){return _0xbb4a44(_0x1a447f);}},_0xb685bd=_0x225ab3+_0x2cf38c(0x1de),_0x553f07=await _0x34acb3['KfGBA'](fetch,_0xb685bd);if(!_0x553f07['ok'])throw new Error(_0x2cf38c(0x1fe)+_0xb685bd+':\x20'+_0x553f07[_0x2cf38c(0x189)]);return _0x553f07[_0x2cf38c(0x1c1)]();}function waitForCallback(_0x236fbb){const _0x2ac8d9=_0x1a2588,_0x1deecc={'GDXLS':'Not\x20found','SGhcK':_0x2ac8d9(0x1d2),'aoJdE':'error_description','MoxHd':function(_0x1b9464,_0x55a5e1){return _0x1b9464(_0x55a5e1);},'aeLgz':function(_0x4547c5){return _0x4547c5();},'OuJeV':_0x2ac8d9(0x198),'MUFOk':_0x2ac8d9(0x1b1),'yDMel':function(_0xe328ff,_0x30fe8e,_0x1c86eb){return _0xe328ff(_0x30fe8e,_0x1c86eb);},'qbxAW':_0x2ac8d9(0x1bb)};return new Promise((_0x480dab,_0x413467)=>{const _0x3f2c3a=_0x2ac8d9,_0x404c05={'mHxIC':_0x1deecc[_0x3f2c3a(0x1a1)],'ZAfeb':_0x1deecc[_0x3f2c3a(0x1aa)],'jSnfm':_0x1deecc['aoJdE'],'dnnsB':function(_0x1c5bbd,_0x3e1874){return _0x1deecc['MoxHd'](_0x1c5bbd,_0x3e1874);},'HWYTI':function(_0x61f66a){const _0x513d78=_0x3f2c3a;return _0x1deecc[_0x513d78(0x1d0)](_0x61f66a);},'Hrzhe':function(_0x944dc,_0x2f476e){return _0x944dc!==_0x2f476e;},'TVjkb':'text/html','kOJks':_0x1deecc[_0x3f2c3a(0x1ef)],'JEnov':_0x1deecc['MUFOk']},_0x10b4d5=()=>{const _0x5de927=_0x3f2c3a;_0x3e7c07[_0x5de927(0x191)](),_0x3e7c07[_0x5de927(0x1ca)]();},_0x35f4a5=_0x1deecc[_0x3f2c3a(0x1d9)](setTimeout,()=>{_0x10b4d5(),_0x413467(new OAuthTimeoutError('OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes'));},0x1d4c0),_0x3e7c07=createServer((_0x4701ef,_0x414bac)=>{const _0xf8bb24=_0x3f2c3a,_0xe3e6a8=new URL(_0x4701ef['url']??'/','http://localhost:'+CALLBACK_PORT);if(_0xe3e6a8[_0xf8bb24(0x195)]!==_0xf8bb24(0x1dc)){_0x414bac[_0xf8bb24(0x19f)](0x194),_0x414bac[_0xf8bb24(0x1d8)](_0x404c05['mHxIC']);return;}const _0xc09163=_0xe3e6a8['searchParams'][_0xf8bb24(0x20d)]('code'),_0x5b3505=_0xe3e6a8[_0xf8bb24(0x20b)]['get'](_0x404c05[_0xf8bb24(0x207)]),_0x18a316=_0xe3e6a8['searchParams'][_0xf8bb24(0x20d)](_0xf8bb24(0x1c5));if(_0x18a316){const _0x258068=_0xe3e6a8[_0xf8bb24(0x20b)]['get'](_0x404c05[_0xf8bb24(0x1f9)])??_0x18a316;_0x414bac['writeHead'](0xc8,{'Content-Type':_0xf8bb24(0x1da)}),_0x414bac['end']('<html><body><h2>Authentication\x20failed</h2><p>'+_0x258068+_0xf8bb24(0x20c)),_0x404c05['dnnsB'](clearTimeout,_0x35f4a5),_0x404c05[_0xf8bb24(0x1e3)](_0x10b4d5),_0x404c05['dnnsB'](_0x413467,new Error(_0xf8bb24(0x1a8)+_0x258068));return;}if(!_0xc09163||_0x404c05['Hrzhe'](_0x5b3505,_0x236fbb)){_0x414bac[_0xf8bb24(0x19f)](0x190,{'Content-Type':_0x404c05[_0xf8bb24(0x1e9)]}),_0x414bac['end'](_0x404c05[_0xf8bb24(0x20f)]);return;}_0x414bac[_0xf8bb24(0x19f)](0xc8,{'Content-Type':_0x404c05['TVjkb']}),_0x414bac[_0xf8bb24(0x1d8)](_0x404c05['JEnov']),clearTimeout(_0x35f4a5),_0x10b4d5(),_0x480dab(_0xc09163);});_0x3e7c07['listen'](CALLBACK_PORT,_0x1deecc['qbxAW']);});}async function openBrowser(_0x51b318){const _0x3a15a7=_0x1a2588,_0xc2a119={'qBrJo':function(_0x331e3c,_0x157163){return _0x331e3c===_0x157163;},'LBjFg':'open','MonRL':function(_0x5d208e,_0x349342){return _0x5d208e(_0x349342);}},_0x56f815=_0xc2a119[_0x3a15a7(0x192)](process['platform'],_0x3a15a7(0x19e))?_0xc2a119['LBjFg']:process['platform']===_0x3a15a7(0x1a9)?'start':'xdg-open';_0xc2a119[_0x3a15a7(0x20e)](exec,_0x56f815+'\x20\x22'+_0x51b318+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x4b4e2e=_0x1a2588,_0x58769f={'SiGqn':function(_0x4fad78,_0x245f0c,_0x3ee294){return _0x4fad78(_0x245f0c,_0x3ee294);},'karRB':function(_0x58045a,_0xcaa776){return _0x58045a!==_0xcaa776;}};try{const _0x1ea163=JSON['parse'](await _0x58769f[_0x4b4e2e(0x1f7)](readFile,TOKEN_CACHE_PATH,'utf-8'));if(_0x1ea163[_0x4b4e2e(0x1f5)]&&_0x58769f['karRB'](_0x1ea163['origin'],currentOrigin))return null;if(_0x1ea163[_0x4b4e2e(0x19b)]&&Date[_0x4b4e2e(0x1ec)]()>_0x1ea163[_0x4b4e2e(0x19b)])return null;return _0x1ea163['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x17258a,_0x29485b,_0x2c1a11){const _0x42bcb6=_0x1a2588,_0x289eb6={'HmAEw':function(_0x2de9d3){return _0x2de9d3();}},_0x136260=await _0x289eb6[_0x42bcb6(0x1dd)](loadCachedData),_0x132ff0={..._0x136260,'origin':currentOrigin,'accessToken':_0x17258a,'refreshToken':_0x29485b??_0x136260?.['refreshToken'],'expiresAt':_0x2c1a11?Date['now']()+_0x2c1a11*0x3e8:undefined};await mkdir(join(_0x289eb6['HmAEw'](homedir),'.ranger'),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x132ff0),{'mode':0x180});}async function loadCachedClient(){const _0x31b750=_0x1a2588,_0x162dbb={'sUgrv':function(_0x35a185){return _0x35a185();}},_0x220b6b=await _0x162dbb[_0x31b750(0x1f1)](loadCachedData);if(_0x220b6b?.[_0x31b750(0x1f5)]&&_0x220b6b['origin']!==currentOrigin)return null;return _0x220b6b?.[_0x31b750(0x19d)]?{'clientId':_0x220b6b['clientId'],'clientSecret':_0x220b6b['clientSecret']}:null;}async function clearCachedClient(){const _0x4e7c2a={'TxIMT':function(_0x2f08eb){return _0x2f08eb();}},_0x293c71=await _0x4e7c2a['TxIMT'](loadCachedData);if(!_0x293c71)return;const {clientId:_0x28c311,clientSecret:_0x16337d,..._0x3ca4b2}=_0x293c71;await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x3ca4b2),{'mode':0x180});}async function saveCachedClient(_0x568085,_0x13bf27){const _0x4b127d=_0x1a2588,_0x183918={'XflEV':function(_0x35633b,_0xf1db7e,_0x21473f){return _0x35633b(_0xf1db7e,_0x21473f);},'tvwYz':function(_0xba85d2,_0x2a62b6,_0x547105){return _0xba85d2(_0x2a62b6,_0x547105);},'mALFy':function(_0x5d08ab,_0x55780d,_0x2a45c8,_0xdb7f79){return _0x5d08ab(_0x55780d,_0x2a45c8,_0xdb7f79);}},_0x30cf4e=await loadCachedData(),_0x10b4f5={..._0x30cf4e,'origin':currentOrigin,'accessToken':_0x30cf4e?.['accessToken']??'','clientId':_0x568085,'clientSecret':_0x13bf27};await _0x183918[_0x4b127d(0x1c4)](mkdir,_0x183918[_0x4b127d(0x1f8)](join,homedir(),'.ranger'),{'recursive':!![]}),await _0x183918[_0x4b127d(0x1ed)](writeFile,TOKEN_CACHE_PATH,JSON[_0x4b127d(0x1b5)](_0x10b4f5),{'mode':0x180});}async function loadCachedData(){const _0x23574c=_0x1a2588;try{return JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x23574c(0x1cb)));}catch{return null;}}async function parseResponse(_0x3346d4){const _0xa5459b=_0x1a2588,_0x19e19f={'gIINV':_0xa5459b(0x1f0),'tRGsm':function(_0x50a797,_0x21914a){return _0x50a797!==_0x21914a;},'RYzek':'No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream'},_0x16e2be=_0x3346d4['headers'][_0xa5459b(0x20d)](_0xa5459b(0x1ad))??'';if(_0x16e2be['includes']('text/event-stream')){const _0x21e8ef=await _0x3346d4['text']();for(const _0x30d972 of _0x21e8ef[_0xa5459b(0x1fc)]('\x0a')){const _0x9795f4=_0x30d972[_0xa5459b(0x1c0)]();if(_0x9795f4['startsWith'](_0xa5459b(0x1f0))){const _0x2868e8=_0x9795f4['slice'](_0x19e19f['gIINV']['length'])[_0xa5459b(0x1c0)]();if(!_0x2868e8)continue;try{const _0x29a3b5=JSON['parse'](_0x2868e8);if(_0x19e19f['tRGsm'](_0x29a3b5['id'],undefined)||_0x29a3b5[_0xa5459b(0x1c5)])return _0x29a3b5;}catch{}}}throw new Error(_0x19e19f[_0xa5459b(0x1d6)]);}return _0x3346d4[_0xa5459b(0x1c1)]();}function extractToken(_0x6926a9){const _0x5ef725=_0x1a2588,_0x1cea10={'RtVBi':'Unknown\x20error','uqkHH':'string'};if(!_0x6926a9)return null;const _0x49cc0b=_0x6926a9[_0x5ef725(0x1fa)];if(_0x49cc0b?.['token']&&typeof _0x49cc0b[_0x5ef725(0x1cd)]==='string')return _0x49cc0b[_0x5ef725(0x1cd)];if(_0x6926a9[_0x5ef725(0x206)]){const _0x5b8335=_0x6926a9['content'];throw new Error(_0x5ef725(0x185)+(_0x5b8335?.[0x0]?.[_0x5ef725(0x1b8)]??_0x1cea10[_0x5ef725(0x1b9)]));}const _0x180509=_0x6926a9[_0x5ef725(0x1e1)];if(_0x180509)for(const _0x219c9e of _0x180509){if(_0x219c9e[_0x5ef725(0x1db)]===_0x5ef725(0x1b8)&&_0x219c9e[_0x5ef725(0x1b8)]){try{const _0x4f1041=JSON['parse'](_0x219c9e['text']);if(typeof _0x4f1041?.[_0x5ef725(0x1cd)]===_0x1cea10['uqkHH'])return _0x4f1041['token'];}catch{}const _0x4bea00=_0x219c9e['text'][_0x5ef725(0x184)](/(rngr_[A-Za-z0-9_-]+)/);if(_0x4bea00)return _0x4bea00[0x1];}}return null;}
@@ -1 +1 @@
1
- function _0x4331(_0x2b731c,_0x43f8b8){_0x2b731c=_0x2b731c-0x11b;var _0x5c8437=_0x5c84();var _0x433188=_0x5c8437[_0x2b731c];return _0x433188;}function _0x5c84(){var _0x4d5b29=['12119030uzHrSc','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','1899725xrSdzr','vCrgs','60140qGgclS','ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','91588rjqxjL','85815lRfxyL','error','81VdgfeZ','4793397AveZZd','vwZCc','88Dilovo','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','2450104uKsHTG','AUYwe','12LDrclt'];_0x5c84=function(){return _0x4d5b29;};return _0x5c84();}(function(_0x28c583,_0x55b0b0){var _0x2ac845=_0x4331,_0xd124c8=_0x28c583();while(!![]){try{var _0x19b36f=-parseInt(_0x2ac845(0x11f))/0x1+parseInt(_0x2ac845(0x129))/0x2+parseInt(_0x2ac845(0x124))/0x3*(-parseInt(_0x2ac845(0x121))/0x4)+parseInt(_0x2ac845(0x11d))/0x5*(parseInt(_0x2ac845(0x12b))/0x6)+parseInt(_0x2ac845(0x125))/0x7+parseInt(_0x2ac845(0x127))/0x8*(parseInt(_0x2ac845(0x122))/0x9)+-parseInt(_0x2ac845(0x11b))/0xa;if(_0x19b36f===_0x55b0b0)break;else _0xd124c8['push'](_0xd124c8['shift']());}catch(_0x2931e6){_0xd124c8['push'](_0xd124c8['shift']());}}}(_0x5c84,0xd7e70));export async function migrateProfile(_0x4b5a8c,_0x2eb096){var _0x27d3e5=_0x4331,_0xf02faf={'ROYLO':function(_0x358317,_0x502dd8){return _0x358317+_0x502dd8;},'vwZCc':function(_0x587446,_0x3caec1){return _0x587446+_0x3caec1;},'vCrgs':function(_0x421d9c,_0x1bf5ea){return _0x421d9c+_0x1bf5ea;},'AUYwe':_0x27d3e5(0x11c),'vqAru':_0x27d3e5(0x128),'epbGZ':'Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a'};console[_0x27d3e5(0x123)](_0xf02faf['ROYLO'](_0xf02faf['vwZCc'](_0xf02faf[_0x27d3e5(0x126)](_0xf02faf['vwZCc'](_0xf02faf['vwZCc'](_0xf02faf[_0x27d3e5(0x11e)](_0x27d3e5(0x120)+'\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),_0xf02faf[_0x27d3e5(0x12a)]),'\x0a'),_0xf02faf['vqAru'])+'\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a'+'\x0a',_0xf02faf['epbGZ']),'fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.')),process['exit'](0x1);}
1
+ function _0x3dd0(_0x3cde81,_0x468a54){_0x3cde81=_0x3cde81-0xe8;var _0x50af4b=_0x50af();var _0x3dd090=_0x50af4b[_0x3cde81];return _0x3dd090;}function _0x50af(){var _0x1b0e67=['For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','FmMkI','fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.','4kDzZmY','7108630DUmaMX','1652844lWxAgX','13380497cnPvWy','ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','exit','42982ksAoBy','10gIvMDA','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','511VUdDvX','9SQeADw','73720KCFWRt','732611htsdeG','pXERC','5HHbwVz','2149317TEVKcN','132RpORKE','Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a'];_0x50af=function(){return _0x1b0e67;};return _0x50af();}(function(_0x522e5f,_0x5d0b90){var _0x21bbcc=_0x3dd0,_0x573706=_0x522e5f();while(!![]){try{var _0x1c3743=parseInt(_0x21bbcc(0xe8))/0x1*(-parseInt(_0x21bbcc(0xe9))/0x2)+-parseInt(_0x21bbcc(0xf1))/0x3*(-parseInt(_0x21bbcc(0xf7))/0x4)+-parseInt(_0x21bbcc(0xf0))/0x5*(-parseInt(_0x21bbcc(0xf9))/0x6)+parseInt(_0x21bbcc(0xeb))/0x7*(parseInt(_0x21bbcc(0xed))/0x8)+-parseInt(_0x21bbcc(0xec))/0x9*(parseInt(_0x21bbcc(0xf8))/0xa)+parseInt(_0x21bbcc(0xee))/0xb*(parseInt(_0x21bbcc(0xf2))/0xc)+-parseInt(_0x21bbcc(0xfa))/0xd;if(_0x1c3743===_0x5d0b90)break;else _0x573706['push'](_0x573706['shift']());}catch(_0x4a8be7){_0x573706['push'](_0x573706['shift']());}}}(_0x50af,0x6bf41));export async function migrateProfile(_0x2489eb,_0x119aac){var _0x25d364=_0x3dd0,_0x33864e={'FmMkI':function(_0x7090b9,_0x149a4e){return _0x7090b9+_0x149a4e;},'pXERC':function(_0x391b44,_0x59cb50){return _0x391b44+_0x59cb50;},'dKQuF':_0x25d364(0xfb)};console['error'](_0x33864e[_0x25d364(0xf5)](_0x33864e[_0x25d364(0xef)](_0x33864e['pXERC'](_0x33864e['pXERC'](_0x33864e['dKQuF']+'\x0a'+_0x25d364(0xea)+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a',_0x25d364(0xf4)),'\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a'),'\x0a')+_0x25d364(0xf3),_0x25d364(0xf6))),process[_0x25d364(0xfc)](0x1);}
@@ -1 +1 @@
1
- (function(_0x4cf266,_0x4712ea){const _0x46c98e=_0x1358,_0x2946a3=_0x4cf266();while(!![]){try{const _0x42ca63=-parseInt(_0x46c98e(0x128))/0x1*(-parseInt(_0x46c98e(0x10d))/0x2)+-parseInt(_0x46c98e(0x120))/0x3+-parseInt(_0x46c98e(0x11b))/0x4+parseInt(_0x46c98e(0x11e))/0x5*(-parseInt(_0x46c98e(0x10e))/0x6)+parseInt(_0x46c98e(0x13a))/0x7+parseInt(_0x46c98e(0x12e))/0x8*(-parseInt(_0x46c98e(0x12c))/0x9)+parseInt(_0x46c98e(0x125))/0xa*(parseInt(_0x46c98e(0x135))/0xb);if(_0x42ca63===_0x4712ea)break;else _0x2946a3['push'](_0x2946a3['shift']());}catch(_0x1ac07d){_0x2946a3['push'](_0x2946a3['shift']());}}}(_0x9cf1,0x69e1e));import{join}from'path';import{existsSync}from'fs';import _0x2ba6ee from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';function _0x1358(_0x39d1c5,_0x2e081b){_0x39d1c5=_0x39d1c5-0x107;const _0x9cf162=_0x9cf1();let _0x135839=_0x9cf162[_0x39d1c5];return _0x135839;}import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x432227){const _0x413164=_0x1358,_0x2a4b57={'FIjfl':_0x413164(0x11a),'LrWqk':_0x413164(0x108),'Hludo':function(_0x5566c7,_0x33fff0,_0xd7700e){return _0x5566c7(_0x33fff0,_0xd7700e);},'PxrsF':function(_0xd3d049){return _0xd3d049();},'mtzTW':_0x413164(0x143),'gyiZR':'\x0a📦\x20Claude\x20Code\x20Plugin\x0a','fnUQg':'pluginScope','OaFkx':'user','xDfdi':_0x413164(0x13d),'sUtJr':function(_0x1a25a5,_0x5f1e6b){return _0x1a25a5(_0x5f1e6b);},'Wsftx':_0x413164(0x133),'KUbOR':'✓\x20Marketplace\x20already\x20added','fchqy':'plugin','KIFrj':_0x413164(0x110),'qAbUY':_0x413164(0x107),'snwKJ':'ranger-testing/trailhead','JKqNC':_0x413164(0x13c),'UFUDB':function(_0x4ccdc9,_0x306c8f,_0x1c7acf){return _0x4ccdc9(_0x306c8f,_0x1c7acf);},'CkTDJ':'❌\x20Failed\x20to\x20install\x20plugin:','vmHYK':'--scope','uxSqw':function(_0x2f4f66,_0x4c5b4a){return _0x2f4f66===_0x4c5b4a;},'qVbAA':_0x413164(0x113),'PRdNI':_0x413164(0x12f)},_0x3c85d3=await isPluginInstalled(_0x2a4b57['FIjfl']);if(_0x3c85d3)return console['log'](_0x2a4b57['LrWqk']),![];const _0x1dea7f=existsSync(_0x2a4b57['Hludo'](join,_0x2a4b57['PxrsF'](getProjectRoot),_0x413164(0x11c)));let _0x27421e;if(_0x432227)_0x27421e=_0x432227;else{if(_0x1dea7f)_0x27421e=_0x2a4b57[_0x413164(0x11d)];else{console[_0x413164(0x116)](_0x2a4b57[_0x413164(0x111)]);const _0x32f166=await _0x2ba6ee['prompt']([{'type':_0x413164(0x139),'name':_0x2a4b57[_0x413164(0x123)],'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x2a4b57['OaFkx']},{'name':_0x2a4b57['xDfdi'],'value':'project'}],'default':_0x2a4b57[_0x413164(0x141)]}]);_0x27421e=_0x32f166[_0x413164(0x109)];}}console['log'](_0x413164(0x131)+_0x27421e+'\x20level)...\x0a');const _0x4124df=await _0x2a4b57[_0x413164(0x118)](isMarketplaceAdded,_0x2a4b57['Wsftx']);let _0x394052=_0x4124df;if(_0x4124df)console[_0x413164(0x116)](_0x2a4b57['KUbOR']);else{const _0x193abd=await runClaudeCommand([_0x2a4b57['fchqy'],_0x2a4b57[_0x413164(0x127)],_0x2a4b57[_0x413164(0x122)],_0x2a4b57[_0x413164(0x13f)]]);!_0x193abd['success']?(console['error'](_0x413164(0x142),_0x193abd[_0x413164(0x12b)]),console['log'](_0x2a4b57[_0x413164(0x10b)]),console[_0x413164(0x116)]('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console['log'](_0x413164(0x137)+_0x27421e)):_0x394052=!![];}if(_0x394052){const _0x18ec33=await _0x2a4b57[_0x413164(0x12d)](runClaudeCommand,['plugin',_0x413164(0x134),_0x413164(0x11a),'--scope',_0x27421e],{'cwd':_0x27421e===_0x2a4b57['mtzTW']?_0x2a4b57[_0x413164(0x10c)](getProjectRoot):undefined});if(!_0x18ec33['success'])console['error'](_0x2a4b57['CkTDJ'],_0x18ec33['error']),console[_0x413164(0x116)](_0x2a4b57['JKqNC']),console['log'](_0x413164(0x137)+_0x27421e);else{console[_0x413164(0x116)]('✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully');const _0x1139f5=[_0x413164(0x140),_0x413164(0x126),_0x413164(0x11a)];_0x27421e===_0x2a4b57['mtzTW']&&_0x1139f5['push'](_0x2a4b57[_0x413164(0x10f)],_0x2a4b57['mtzTW']);const _0x358aff=await runClaudeCommand(_0x1139f5,{'captureOutput':!![],'cwd':_0x2a4b57[_0x413164(0x117)](_0x27421e,_0x2a4b57['mtzTW'])?getProjectRoot():undefined}),_0x239759=_0x358aff['output']?.[_0x413164(0x11f)]('already\x20enabled');!_0x358aff[_0x413164(0x132)]&&!_0x239759?console['error'](_0x2a4b57['qVbAA'],_0x358aff['error']):console['log'](_0x2a4b57[_0x413164(0x124)]);}}return!![];}export async function ensureClaudeSkills(_0x59f9d2){const _0x5705d9=_0x1358,_0x4958e2={'mMZxQ':function(_0x225939,_0x18ea7b){return _0x225939(_0x18ea7b);},'Ezcme':function(_0x40298b,_0x110bd6,_0x137a09,_0x4b139a){return _0x40298b(_0x110bd6,_0x137a09,_0x4b139a);},'Cxotu':'ranger','Ligar':'project','BseOy':_0x5705d9(0x129),'HmBzu':function(_0x592162,_0x417af1){return _0x592162||_0x417af1;},'cyPbI':_0x5705d9(0x136),'bAyCl':function(_0x317cc0,_0x424929,_0x430ea0){return _0x317cc0(_0x424929,_0x430ea0);},'EJSNT':'.claude','rLDrQ':function(_0x55284c,_0x4f7686){return _0x55284c(_0x4f7686);}},_0xb0a179=_0x4958e2[_0x5705d9(0x114)](existsSync,_0x4958e2['Ezcme'](join,_0x4958e2[_0x5705d9(0x114)](getSkillsDir,_0x5705d9(0x10a)),_0x4958e2['Cxotu'],_0x5705d9(0x129))),_0x242817=existsSync(join(getSkillsDir(_0x4958e2['Ligar']),_0x5705d9(0x121),_0x4958e2[_0x5705d9(0x119)]));if(_0x4958e2[_0x5705d9(0x138)](_0xb0a179,_0x242817))return console['log'](_0x4958e2[_0x5705d9(0x130)]),![];const _0x454089=existsSync(_0x4958e2['bAyCl'](join,getProjectRoot(),_0x4958e2[_0x5705d9(0x115)]));let _0x1c1e07=!![];if(_0x59f9d2)await skillup({'autoInstall':_0x59f9d2,'suppressUsage':!![]});else{if(_0x454089)await skillup({'autoInstall':_0x4958e2['Ligar'],'suppressUsage':!![]});else{const _0x193d03=await _0x2ba6ee['prompt']([{'type':_0x5705d9(0x112),'name':_0x5705d9(0x13e),'message':_0x5705d9(0x13b),'default':!![]}]);_0x1c1e07=_0x193d03['wantsSkillup'],_0x1c1e07&&await _0x4958e2[_0x5705d9(0x12a)](skillup,{'suppressUsage':!![]});}}return _0x1c1e07;}function _0x9cf1(){const _0x43f3ef=['PxrsF','646adCFqW','6qkOSqj','vmHYK','marketplace','gyiZR','confirm','⚠\x20Failed\x20to\x20enable\x20plugin:','mMZxQ','EJSNT','log','uxSqw','sUtJr','BseOy','ranger@trailhead','3034676laLDzr','.claude','mtzTW','516855aJvtBw','includes','2096061WLUeAg','ranger','qAbUY','fnUQg','PRdNI','10oqsETt','enable','KIFrj','206CejyPS','SKILL.md','rLDrQ','error','309087oGqyur','UFUDB','56TZJWkb','✓\x20Claude\x20Code\x20plugin\x20enabled','cyPbI','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','success','trailhead','install','15332273TSyWbG','✓\x20Ranger\x20skills\x20already\x20installed','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','HmBzu','list','5421087luSvDo','Would\x20you\x20like\x20to\x20install\x20skills?','\x0aYou\x20can\x20install\x20manually\x20with:','Project\x20(shared\x20with\x20team\x20via\x20git)','wantsSkillup','snwKJ','plugin','OaFkx','❌\x20Failed\x20to\x20add\x20marketplace:','project','add','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','pluginScope','user','JKqNC'];_0x9cf1=function(){return _0x43f3ef;};return _0x9cf1();}
1
+ (function(_0x667f48,_0xe2b80){const _0x34aafb=_0x12f6,_0x2c09f7=_0x667f48();while(!![]){try{const _0x23bd98=parseInt(_0x34aafb(0x117))/0x1+-parseInt(_0x34aafb(0x109))/0x2+-parseInt(_0x34aafb(0x13e))/0x3+parseInt(_0x34aafb(0x12a))/0x4*(parseInt(_0x34aafb(0x11b))/0x5)+parseInt(_0x34aafb(0x10f))/0x6*(-parseInt(_0x34aafb(0x10d))/0x7)+parseInt(_0x34aafb(0x140))/0x8+parseInt(_0x34aafb(0x119))/0x9;if(_0x23bd98===_0xe2b80)break;else _0x2c09f7['push'](_0x2c09f7['shift']());}catch(_0xe4e9e2){_0x2c09f7['push'](_0x2c09f7['shift']());}}}(_0x2e2e,0xf3658));function _0x2e2e(){const _0x5e9454=['295XJZBPO','GWEzl','already\x20enabled','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','tqrtQ','rNxBL','qNPjT','add','MEybk','wantsSkillup','enable','project','success','includes','xMmSY','94196fsbsTK','eopCH','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','EmYWR','ebOjF','ranger','ScRys','RBVtf','FgWcf','pluginScope','\x0aYou\x20can\x20install\x20manually\x20with:','FTYOe','vFkYq','Where\x20should\x20the\x20plugin\x20be\x20installed?','cWffv','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','krBef','AKfaT','--scope','push','5734500nRJAiB','✓\x20Claude\x20Code\x20plugin\x20enabled','12522216fRLHfv','✓\x20Marketplace\x20already\x20added','987338aIHrPQ','error','log','MFPRP','4690YJcUus','❌\x20Failed\x20to\x20add\x20marketplace:','12426PHwREB','user','marketplace','.claude','MRDwN','Project\x20(shared\x20with\x20team\x20via\x20git)','ranger-testing/trailhead','plugin','136046PlICPw','frQuJ','15290793IVsXjs','\x0a📦\x20Claude\x20Code\x20Plugin\x0a'];_0x2e2e=function(){return _0x5e9454;};return _0x2e2e();}import{join}from'path';import{existsSync}from'fs';import _0xa9439d from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';function _0x12f6(_0x44c1ce,_0x306fec){_0x44c1ce=_0x44c1ce-0x108;const _0x2e2eb4=_0x2e2e();let _0x12f6e4=_0x2e2eb4[_0x44c1ce];return _0x12f6e4;}export async function ensureClaudePlugin(_0x30007c){const _0xb7e0c=_0x12f6,_0x394887={'frQuJ':function(_0x4b5ec9,_0x3e9405){return _0x4b5ec9(_0x3e9405);},'MRDwN':'ranger@trailhead','triVT':_0xb7e0c(0x12c),'fqDjL':function(_0x3c2699){return _0x3c2699();},'qNPjT':'.claude','eRzZd':_0xb7e0c(0x11a),'MoUel':'list','mlgqk':_0xb7e0c(0x137),'kpjMU':'User\x20(available\x20in\x20all\x20your\x20projects)','tqrtQ':'user','GWEzl':_0xb7e0c(0x114),'ScRys':_0xb7e0c(0x111),'ibfxE':_0xb7e0c(0x122),'FgWcf':_0xb7e0c(0x115),'rNxBL':_0xb7e0c(0x10e),'sFKeh':'install','eopCH':_0xb7e0c(0x126),'WJTiw':'❌\x20Failed\x20to\x20install\x20plugin:','HXZEv':_0xb7e0c(0x134),'AKfaT':_0xb7e0c(0x13c),'PXKZx':function(_0x43d34e,_0x1ea5d6,_0x3fc70a){return _0x43d34e(_0x1ea5d6,_0x3fc70a);},'Yupmg':function(_0x207a59,_0x54e24c){return _0x207a59===_0x54e24c;},'FvoKt':function(_0x1fc181){return _0x1fc181();},'nQDAX':_0xb7e0c(0x11d),'MFPRP':'⚠\x20Failed\x20to\x20enable\x20plugin:','ebOjF':_0xb7e0c(0x13f)},_0xd91255=await _0x394887[_0xb7e0c(0x118)](isPluginInstalled,_0x394887[_0xb7e0c(0x113)]);if(_0xd91255)return console['log'](_0x394887['triVT']),![];const _0x386b34=existsSync(join(_0x394887['fqDjL'](getProjectRoot),_0x394887[_0xb7e0c(0x121)]));let _0x2eba2d;if(_0x30007c)_0x2eba2d=_0x30007c;else{if(_0x386b34)_0x2eba2d='project';else{console[_0xb7e0c(0x10b)](_0x394887['eRzZd']);const _0x3b9a1b=await _0xa9439d['prompt']([{'type':_0x394887['MoUel'],'name':_0xb7e0c(0x133),'message':_0x394887['mlgqk'],'choices':[{'name':_0x394887['kpjMU'],'value':_0x394887[_0xb7e0c(0x11f)]},{'name':_0x394887[_0xb7e0c(0x11c)],'value':_0xb7e0c(0x126)}],'default':_0x394887[_0xb7e0c(0x11f)]}]);_0x2eba2d=_0x3b9a1b['pluginScope'];}}console[_0xb7e0c(0x10b)](_0xb7e0c(0x139)+_0x2eba2d+'\x20level)...\x0a');const _0x148244=await _0x394887[_0xb7e0c(0x118)](isMarketplaceAdded,'trailhead');let _0x413624=_0x148244;if(_0x148244)console[_0xb7e0c(0x10b)](_0xb7e0c(0x108));else{const _0x3d0c46=await runClaudeCommand([_0xb7e0c(0x116),_0x394887[_0xb7e0c(0x130)],_0x394887['ibfxE'],_0x394887[_0xb7e0c(0x132)]]);!_0x3d0c46['success']?(console['error'](_0x394887[_0xb7e0c(0x120)],_0x3d0c46['error']),console[_0xb7e0c(0x10b)]('\x0aYou\x20can\x20install\x20manually\x20with:'),console[_0xb7e0c(0x10b)]('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console['log'](_0xb7e0c(0x11e)+_0x2eba2d)):_0x413624=!![];}if(_0x413624){const _0x58064c=await runClaudeCommand([_0xb7e0c(0x116),_0x394887['sFKeh'],_0x394887[_0xb7e0c(0x113)],'--scope',_0x2eba2d],{'cwd':_0x2eba2d===_0x394887[_0xb7e0c(0x12b)]?getProjectRoot():undefined});if(!_0x58064c[_0xb7e0c(0x127)])console['error'](_0x394887['WJTiw'],_0x58064c[_0xb7e0c(0x10a)]),console[_0xb7e0c(0x10b)](_0x394887['HXZEv']),console[_0xb7e0c(0x10b)](_0xb7e0c(0x11e)+_0x2eba2d);else{console[_0xb7e0c(0x10b)]('✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully');const _0x5473b6=[_0xb7e0c(0x116),_0xb7e0c(0x125),_0x394887['MRDwN']];_0x2eba2d===_0x394887['eopCH']&&_0x5473b6[_0xb7e0c(0x13d)](_0x394887[_0xb7e0c(0x13b)],_0xb7e0c(0x126));const _0x5c265f=await _0x394887['PXKZx'](runClaudeCommand,_0x5473b6,{'captureOutput':!![],'cwd':_0x394887['Yupmg'](_0x2eba2d,_0x394887['eopCH'])?_0x394887['FvoKt'](getProjectRoot):undefined}),_0x44630f=_0x5c265f['output']?.[_0xb7e0c(0x128)](_0x394887['nQDAX']);!_0x5c265f['success']&&!_0x44630f?console['error'](_0x394887[_0xb7e0c(0x10c)],_0x5c265f[_0xb7e0c(0x10a)]):console[_0xb7e0c(0x10b)](_0x394887[_0xb7e0c(0x12e)]);}}return!![];}export async function ensureClaudeSkills(_0x2bd9cb){const _0x333397=_0x12f6,_0x27eea2={'krBef':function(_0x32f0ca,_0x360aeb,_0x3e30e0,_0x436b4e){return _0x32f0ca(_0x360aeb,_0x3e30e0,_0x436b4e);},'hXbvp':function(_0x408374,_0x2d4fdd){return _0x408374(_0x2d4fdd);},'xMmSY':_0x333397(0x110),'cWffv':'SKILL.md','vFkYq':'ranger','UHhJr':function(_0x459ca9,_0x9076dd){return _0x459ca9||_0x9076dd;},'MEybk':function(_0x593a5b,_0x20242f,_0x488336){return _0x593a5b(_0x20242f,_0x488336);},'FTYOe':function(_0x4c287d){return _0x4c287d();},'EmYWR':_0x333397(0x112),'RBVtf':function(_0x184185,_0x5a718d){return _0x184185(_0x5a718d);}},_0x27702d=existsSync(_0x27eea2[_0x333397(0x13a)](join,_0x27eea2['hXbvp'](getSkillsDir,_0x27eea2[_0x333397(0x129)]),_0x333397(0x12f),_0x27eea2['cWffv'])),_0x4d4ab9=_0x27eea2['hXbvp'](existsSync,join(getSkillsDir(_0x333397(0x126)),_0x27eea2[_0x333397(0x136)],_0x27eea2[_0x333397(0x138)]));if(_0x27eea2['UHhJr'](_0x27702d,_0x4d4ab9))return console[_0x333397(0x10b)]('✓\x20Ranger\x20skills\x20already\x20installed'),![];const _0x469fd3=existsSync(_0x27eea2[_0x333397(0x123)](join,_0x27eea2[_0x333397(0x135)](getProjectRoot),_0x27eea2[_0x333397(0x12d)]));let _0x4a75a3=!![];if(_0x2bd9cb)await _0x27eea2[_0x333397(0x131)](skillup,{'autoInstall':_0x2bd9cb,'suppressUsage':!![]});else{if(_0x469fd3)await skillup({'autoInstall':_0x333397(0x126),'suppressUsage':!![]});else{const _0x5bdabf=await _0xa9439d['prompt']([{'type':'confirm','name':'wantsSkillup','message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x4a75a3=_0x5bdabf[_0x333397(0x124)],_0x4a75a3&&await skillup({'suppressUsage':!![]});}}return _0x4a75a3;}
@@ -1 +1 @@
1
- (function(_0x4a381a,_0x1b5318){const _0x3e996a=_0x249e,_0x23b960=_0x4a381a();while(!![]){try{const _0x224ac8=parseInt(_0x3e996a(0xb3))/0x1+parseInt(_0x3e996a(0xa7))/0x2+parseInt(_0x3e996a(0xba))/0x3+-parseInt(_0x3e996a(0xb7))/0x4*(-parseInt(_0x3e996a(0xa8))/0x5)+parseInt(_0x3e996a(0xbe))/0x6*(parseInt(_0x3e996a(0xa3))/0x7)+parseInt(_0x3e996a(0xb2))/0x8*(parseInt(_0x3e996a(0xa6))/0x9)+-parseInt(_0x3e996a(0xa5))/0xa*(parseInt(_0x3e996a(0xaa))/0xb);if(_0x224ac8===_0x1b5318)break;else _0x23b960['push'](_0x23b960['shift']());}catch(_0x1ae91f){_0x23b960['push'](_0x23b960['shift']());}}}(_0xcb54,0xee223));import{join}from'path';function _0xcb54(){const _0x3fc2bc=['215316qLIQpu','365LVbxkR','User\x20(available\x20in\x20all\x20your\x20projects)','22067221upKvun','plugin','FLXeY','project','scOGN','parse','UkkSY','dkYSi','86512RuADRm','1488774YHleMX','log','opencode.json','MZWoX','80932FyaZwu','\x0a📦\x20OpenCode\x20Plugin\x0a','✓\x20OpenCode\x20plugin\x20configured','1565931eMGpGM','user','isArray','CtjYn','2027418EvJouM','YZlTC','error','pluginScope','list','21zLvqTT','Project\x20(shared\x20with\x20team\x20via\x20git)','20oSQzQM','315CcSeLT'];_0xcb54=function(){return _0x3fc2bc;};return _0xcb54();}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';function _0x249e(_0x5eb73d,_0x4f8a50){_0x5eb73d=_0x5eb73d-0x9f;const _0xcb549e=_0xcb54();let _0x249e27=_0xcb549e[_0x5eb73d];return _0x249e27;}import _0x376826 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x55cd2a){const _0x4dd4f8=_0x249e,_0xcd85cb={'zrtuY':function(_0x32bd4e,_0x36cbd5){return _0x32bd4e(_0x36cbd5);},'MZWoX':function(_0x527e9d,_0x2d8e35,_0x48d881){return _0x527e9d(_0x2d8e35,_0x48d881);},'YZlTC':_0x4dd4f8(0xad),'KNOrA':_0x4dd4f8(0xa1),'dkYSi':_0x4dd4f8(0xa4),'scOGN':function(_0x381818,_0x3b5064){return _0x381818(_0x3b5064);},'tBquY':'https://opencode.ai/config.json','CtjYn':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','UkkSY':'✓\x20OpenCode\x20plugin\x20already\x20configured','FLXeY':function(_0xd94f46,_0x47dfbb){return _0xd94f46(_0x47dfbb);}},_0x49f34a=_0xcd85cb['zrtuY'](existsSync,_0xcd85cb['MZWoX'](join,_0xcd85cb['zrtuY'](getOpencodeConfigDir,_0xcd85cb['YZlTC']),_0x4dd4f8(0xb5)));let _0x145f86;if(_0x55cd2a)_0x145f86=_0x55cd2a;else{if(_0x49f34a)_0x145f86=_0xcd85cb[_0x4dd4f8(0x9f)];else{console[_0x4dd4f8(0xb4)](_0x4dd4f8(0xb8));const _0x423566=await _0x376826['prompt']([{'type':_0x4dd4f8(0xa2),'name':_0xcd85cb['KNOrA'],'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x4dd4f8(0xa9),'value':_0x4dd4f8(0xbb)},{'name':_0xcd85cb[_0x4dd4f8(0xb1)],'value':'project'}],'default':_0x4dd4f8(0xbb)}]);_0x145f86=_0x423566[_0x4dd4f8(0xa1)];}}const _0x43c6d0=join(_0xcd85cb[_0x4dd4f8(0xae)](getOpencodeConfigDir,_0x145f86),'opencode.json'),_0x3d40c3='@ranger-testing/opencode-plugin',_0x192a3b=_0xcd85cb['tBquY'];let _0x2f33a2={};if(_0xcd85cb['scOGN'](existsSync,_0x43c6d0))try{const _0x3a4322=await _0xcd85cb['MZWoX'](readFile,_0x43c6d0,'utf-8');_0x2f33a2=JSON[_0x4dd4f8(0xaf)](_0x3a4322);}catch(_0x2907a0){return console[_0x4dd4f8(0xa0)](_0xcd85cb[_0x4dd4f8(0xbd)]),{'configured':![],'scope':_0x145f86,'error':'Failed\x20to\x20read\x20opencode.json','details':_0x2907a0};}const _0x170f53=Array[_0x4dd4f8(0xbc)](_0x2f33a2[_0x4dd4f8(0xab)])?_0x2f33a2[_0x4dd4f8(0xab)]:[];if(_0x170f53['includes'](_0x3d40c3))return console[_0x4dd4f8(0xb4)](_0xcd85cb[_0x4dd4f8(0xb0)]),{'configured':![],'scope':_0x145f86};return _0x2f33a2['$schema']=_0x2f33a2['$schema']||_0x192a3b,_0x2f33a2['plugin']=[..._0x170f53,_0x3d40c3],await _0xcd85cb[_0x4dd4f8(0xb6)](mkdir,_0xcd85cb[_0x4dd4f8(0xac)](getOpencodeConfigDir,_0x145f86),{'recursive':!![]}),await writeFile(_0x43c6d0,JSON['stringify'](_0x2f33a2,null,0x2)+'\x0a'),console['log'](_0x4dd4f8(0xb9)),{'configured':!![],'scope':_0x145f86};}
1
+ (function(_0x4beebe,_0x2bc87c){const _0x20d7c3=_0x5591,_0x3419c2=_0x4beebe();while(!![]){try{const _0x130d3b=parseInt(_0x20d7c3(0x1fb))/0x1+-parseInt(_0x20d7c3(0x1fe))/0x2*(-parseInt(_0x20d7c3(0x1f0))/0x3)+-parseInt(_0x20d7c3(0x1f6))/0x4+parseInt(_0x20d7c3(0x1ec))/0x5*(-parseInt(_0x20d7c3(0x1ee))/0x6)+parseInt(_0x20d7c3(0x207))/0x7*(parseInt(_0x20d7c3(0x1fc))/0x8)+-parseInt(_0x20d7c3(0x1ed))/0x9*(parseInt(_0x20d7c3(0x1ff))/0xa)+-parseInt(_0x20d7c3(0x1f2))/0xb;if(_0x130d3b===_0x2bc87c)break;else _0x3419c2['push'](_0x3419c2['shift']());}catch(_0x1b3eab){_0x3419c2['push'](_0x3419c2['shift']());}}}(_0x3e7f,0x279f3));import{join}from'path';import{existsSync}from'fs';function _0x3e7f(){const _0x498424=['255916LpipnY','879896tsIvsB','@ranger-testing/opencode-plugin','4LbezQJ','70VpFgOh','$schema','Failed\x20to\x20read\x20opencode.json','nQzRW','opencode.json','olaNJ','parse','Project\x20(shared\x20with\x20team\x20via\x20git)','7aMmbbw','isArray','WvJmv','31545sTfbVZ','214047vEGMIu','66FZguWC','User\x20(available\x20in\x20all\x20your\x20projects)','375006Gkcruw','dXZBG','321794cVxEPP','pluginScope','log','utf-8','753928fhCwIm','pWsqt','project','plugin','qxOZz'];_0x3e7f=function(){return _0x498424;};return _0x3e7f();}import{mkdir,readFile,writeFile}from'fs/promises';function _0x5591(_0x326fc1,_0x1ce9f9){_0x326fc1=_0x326fc1-0x1ec;const _0x3e7f78=_0x3e7f();let _0x559176=_0x3e7f78[_0x326fc1];return _0x559176;}import _0x11265b from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x5bb716){const _0x3c7d14=_0x5591,_0x17f063={'fiJnQ':function(_0x165aeb,_0x191dfe){return _0x165aeb(_0x191dfe);},'vtrPT':function(_0x58fdf3,_0x32e923,_0x25b551){return _0x58fdf3(_0x32e923,_0x25b551);},'vywJs':'project','olaNJ':_0x3c7d14(0x203),'rrgXi':_0x3c7d14(0x206),'WvJmv':'user','JdBYI':function(_0x5c4ba6,_0x530254,_0x7e25fa){return _0x5c4ba6(_0x530254,_0x7e25fa);},'tHwCT':function(_0x38d96a,_0x323fd8){return _0x38d96a(_0x323fd8);},'gJzPN':'https://opencode.ai/config.json','nQzRW':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','iMwYA':_0x3c7d14(0x201),'dXZBG':'✓\x20OpenCode\x20plugin\x20already\x20configured','vUvDJ':function(_0x3b7bc4,_0x398b78,_0x21d33b){return _0x3b7bc4(_0x398b78,_0x21d33b);},'OIMJt':function(_0x3e212b,_0x268fa3){return _0x3e212b(_0x268fa3);},'pWsqt':function(_0x4c6477,_0x2cbd25,_0x109b3d){return _0x4c6477(_0x2cbd25,_0x109b3d);},'blmVU':function(_0x2f3f96,_0x3239d1){return _0x2f3f96+_0x3239d1;},'qxOZz':'✓\x20OpenCode\x20plugin\x20configured'},_0x3e7ed6=_0x17f063['fiJnQ'](existsSync,_0x17f063['vtrPT'](join,getOpencodeConfigDir(_0x17f063['vywJs']),_0x17f063[_0x3c7d14(0x204)]));let _0x1dd785;if(_0x5bb716)_0x1dd785=_0x5bb716;else{if(_0x3e7ed6)_0x1dd785=_0x3c7d14(0x1f8);else{console[_0x3c7d14(0x1f4)]('\x0a📦\x20OpenCode\x20Plugin\x0a');const _0x16e35f=await _0x11265b['prompt']([{'type':'list','name':_0x3c7d14(0x1f3),'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x3c7d14(0x1ef),'value':'user'},{'name':_0x17f063['rrgXi'],'value':'project'}],'default':_0x17f063[_0x3c7d14(0x209)]}]);_0x1dd785=_0x16e35f['pluginScope'];}}const _0x1d4ee1=_0x17f063['JdBYI'](join,_0x17f063['tHwCT'](getOpencodeConfigDir,_0x1dd785),_0x17f063[_0x3c7d14(0x204)]),_0x35e707=_0x3c7d14(0x1fd),_0x3556a3=_0x17f063['gJzPN'];let _0x3d6fb2={};if(existsSync(_0x1d4ee1))try{const _0x5697c2=await readFile(_0x1d4ee1,_0x3c7d14(0x1f5));_0x3d6fb2=JSON[_0x3c7d14(0x205)](_0x5697c2);}catch(_0x49c715){return console['error'](_0x17f063[_0x3c7d14(0x202)]),{'configured':![],'scope':_0x1dd785,'error':_0x17f063['iMwYA'],'details':_0x49c715};}const _0x46a748=Array[_0x3c7d14(0x208)](_0x3d6fb2[_0x3c7d14(0x1f9)])?_0x3d6fb2[_0x3c7d14(0x1f9)]:[];if(_0x46a748['includes'](_0x35e707))return console['log'](_0x17f063[_0x3c7d14(0x1f1)]),{'configured':![],'scope':_0x1dd785};return _0x3d6fb2[_0x3c7d14(0x200)]=_0x3d6fb2['$schema']||_0x3556a3,_0x3d6fb2[_0x3c7d14(0x1f9)]=[..._0x46a748,_0x35e707],await _0x17f063['vUvDJ'](mkdir,_0x17f063['OIMJt'](getOpencodeConfigDir,_0x1dd785),{'recursive':!![]}),await _0x17f063[_0x3c7d14(0x1f7)](writeFile,_0x1d4ee1,_0x17f063['blmVU'](JSON['stringify'](_0x3d6fb2,null,0x2),'\x0a')),console[_0x3c7d14(0x1f4)](_0x17f063[_0x3c7d14(0x1fa)]),{'configured':!![],'scope':_0x1dd785};}
@@ -1 +1 @@
1
- function _0x438f(){var _0x484284=['QtsXd','28674JZjKqJ','exit','veSOH','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','error','6164848NUlZcB','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','4eFBRIp','15274350ERiSSt','27858nbRAOE','605XtiXHk','306584FGaLdc','18tzfFNR','11KJJwey','276OrrXNJ','5282724kIurHL','12805982Yteojs'];_0x438f=function(){return _0x484284;};return _0x438f();}function _0x2923(_0x322b4b,_0x3cd428){_0x322b4b=_0x322b4b-0x191;var _0x438fd3=_0x438f();var _0x29237c=_0x438fd3[_0x322b4b];return _0x29237c;}(function(_0x1218f9,_0x2f453a){var _0x3cb371=_0x2923,_0x3dea6f=_0x1218f9();while(!![]){try{var _0x14357d=parseInt(_0x3cb371(0x1a1))/0x1*(-parseInt(_0x3cb371(0x19d))/0x2)+-parseInt(_0x3cb371(0x195))/0x3*(parseInt(_0x3cb371(0x191))/0x4)+parseInt(_0x3cb371(0x1a0))/0x5*(parseInt(_0x3cb371(0x19f))/0x6)+-parseInt(_0x3cb371(0x193))/0x7+-parseInt(_0x3cb371(0x19b))/0x8*(-parseInt(_0x3cb371(0x1a2))/0x9)+parseInt(_0x3cb371(0x19e))/0xa+parseInt(_0x3cb371(0x1a3))/0xb*(parseInt(_0x3cb371(0x192))/0xc);if(_0x14357d===_0x2f453a)break;else _0x3dea6f['push'](_0x3dea6f['shift']());}catch(_0x2048f1){_0x3dea6f['push'](_0x3dea6f['shift']());}}}(_0x438f,0xec785));export async function setupCi(_0x594f54,_0x1526e5,_0x1493fe){var _0x2fa792=_0x2923,_0x282b27={'MkQVS':function(_0x273c29,_0x2854c5){return _0x273c29+_0x2854c5;},'QtsXd':function(_0x5ce568,_0x20fd0d){return _0x5ce568+_0x20fd0d;},'YgqCs':function(_0x24ba8b,_0xe83b7a){return _0x24ba8b+_0xe83b7a;},'rQzPn':function(_0x22fe61,_0x473443){return _0x22fe61+_0x473443;},'UEfKG':_0x2fa792(0x199),'veSOH':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console[_0x2fa792(0x19a)](_0x282b27['MkQVS'](_0x282b27[_0x2fa792(0x194)](_0x282b27['YgqCs'](_0x282b27['rQzPn'](_0x2fa792(0x19c),'\x0a')+_0x282b27['UEfKG'],_0x2fa792(0x198)),'\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x282b27[_0x2fa792(0x197)])),process[_0x2fa792(0x196)](0x1);}
1
+ function _0x35cb(_0x2e3d4e,_0x980eb5){_0x2e3d4e=_0x2e3d4e-0x135;var _0xb38b1d=_0xb38b();var _0x35cbd3=_0xb38b1d[_0x2e3d4e];return _0x35cbd3;}function _0xb38b(){var _0x3cecc9=['For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','RaoWv','error','58495dxOFuW','\x20\x20https://docs.ranger.net/main/concepts/profiles','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','exit','760GRKqLN','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','30mOzkiS','2335216oRnHrN','330056Kfhrok','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','CtvZU','266402Cuggjj','122373hLHNtJ','84cRafTM','531573DzSuZn','133357kdTegr'];_0xb38b=function(){return _0x3cecc9;};return _0xb38b();}(function(_0x483d37,_0x4dc6b){var _0x3413fc=_0x35cb,_0x51c149=_0x483d37();while(!![]){try{var _0xa40a5b=-parseInt(_0x3413fc(0x140))/0x1+-parseInt(_0x3413fc(0x13d))/0x2+parseInt(_0x3413fc(0x143))/0x3+-parseInt(_0x3413fc(0x142))/0x4*(parseInt(_0x3413fc(0x135))/0x5)+parseInt(_0x3413fc(0x13b))/0x6*(-parseInt(_0x3413fc(0x144))/0x7)+-parseInt(_0x3413fc(0x13c))/0x8+parseInt(_0x3413fc(0x141))/0x9*(parseInt(_0x3413fc(0x139))/0xa);if(_0xa40a5b===_0x4dc6b)break;else _0x51c149['push'](_0x51c149['shift']());}catch(_0x2baea1){_0x51c149['push'](_0x51c149['shift']());}}}(_0xb38b,0x23b79));export async function setupCi(_0x5022b9,_0x575eb7,_0x26d25b){var _0x244935=_0x35cb,_0x4e008f={'CtvZU':function(_0x1c1f7c,_0x96fad2){return _0x1c1f7c+_0x96fad2;},'RaoWv':function(_0x10e425,_0x14aad5){return _0x10e425+_0x14aad5;},'zVohq':_0x244935(0x13a),'lqYGe':_0x244935(0x136)};console[_0x244935(0x147)](_0x4e008f[_0x244935(0x13f)](_0x4e008f[_0x244935(0x146)](_0x4e008f[_0x244935(0x13f)](_0x244935(0x13e),'\x0a')+_0x244935(0x137)+_0x4e008f['zVohq']+'\x0a',_0x244935(0x145)),_0x4e008f['lqYGe'])),process[_0x244935(0x138)](0x1);}
@@ -1 +1 @@
1
- (function(_0x70cd4f,_0x1ab0a8){const _0x13274a=_0x483b,_0x3b95b7=_0x70cd4f();while(!![]){try{const _0x4cc95f=-parseInt(_0x13274a(0x1e8))/0x1+-parseInt(_0x13274a(0x1c9))/0x2*(-parseInt(_0x13274a(0x1df))/0x3)+-parseInt(_0x13274a(0x1da))/0x4+parseInt(_0x13274a(0x1db))/0x5*(parseInt(_0x13274a(0x1e5))/0x6)+-parseInt(_0x13274a(0x1de))/0x7+-parseInt(_0x13274a(0x1f1))/0x8+parseInt(_0x13274a(0x1d5))/0x9*(parseInt(_0x13274a(0x1c8))/0xa);if(_0x4cc95f===_0x1ab0a8)break;else _0x3b95b7['push'](_0x3b95b7['shift']());}catch(_0x5ac868){_0x3b95b7['push'](_0x3b95b7['shift']());}}}(_0x38b7,0x9cbfe));import{basename}from'path';function _0x483b(_0x35cd19,_0x54a731){_0x35cd19=_0x35cd19-0x1c7;const _0x38b724=_0x38b7();let _0x483b78=_0x38b724[_0x35cd19];return _0x483b78;}import _0x3e0a27 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0xd66cba={}){const _0x2dce42=_0x483b,_0x209210={'DPLtx':_0x2dce42(0x1e0),'jrKfD':function(_0x802a2a){return _0x802a2a();},'KTuyv':_0x2dce42(0x1f3),'bZQAR':function(_0x3fafa7,_0x1bd659){return _0x3fafa7===_0x1bd659;},'gcFIK':'opencode','EIlDO':_0x2dce42(0x1ec),'HuxVv':_0x2dce42(0x1d2),'spUmY':function(_0x139af9,_0x50aa8b){return _0x139af9(_0x50aa8b);},'heLzy':function(_0x400afc,_0x56cf2a){return _0x400afc===_0x56cf2a;},'lwVaZ':function(_0x63998,_0x5d95c6){return _0x63998(_0x5d95c6);},'qMTMG':_0x2dce42(0x1ca),'rQsOA':'installLevel','Mgyue':_0x2dce42(0x1d3),'ypwEn':_0x2dce42(0x1cd),'faNCZ':'\x0a📦\x20Installing\x20skills...\x0a','PnADh':_0x2dce42(0x1e1),'ppegY':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','DFozL':_0x2dce42(0x1ea),'kdDlS':'project-level','YaCjg':'To\x20use:','YsHAj':_0x2dce42(0x1cf)};console[_0x2dce42(0x1e2)](_0x209210[_0x2dce42(0x1d0)]);const _0x4421c8=_0xd66cba['platform']??'claude',_0x2bba5e=await _0x209210[_0x2dce42(0x1d9)](getToken);if(!_0x2bba5e){console[_0x2dce42(0x1e2)]('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a'),console[_0x2dce42(0x1e2)](_0x209210[_0x2dce42(0x1f0)]),console[_0x2dce42(0x1e2)]('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli'),console[_0x2dce42(0x1e2)]('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x209210[_0x2dce42(0x1d6)](_0x4421c8,_0x209210[_0x2dce42(0x1dc)])?_0x209210[_0x2dce42(0x1ee)]:'')+'\x20<your-api-token>'),console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x209210[_0x2dce42(0x1d6)](_0x4421c8,'opencode')?_0x209210['EIlDO']:'')+'\x0a');return;}console['log'](_0x209210['HuxVv']);const _0x5900c2=getProjectRoot(),_0x16fefa=_0x209210[_0x2dce42(0x1c7)](basename,_0x5900c2),_0xb0a289=_0x209210[_0x2dce42(0x1e9)](_0x4421c8,_0x209210['gcFIK'])?_0x209210['lwVaZ'](getOpencodeConfigDir,_0x2dce42(0x1d3))+_0x2dce42(0x1e7):getClaudeConfigDir()+_0x2dce42(0x1e7),_0x45c6ee=_0x209210['heLzy'](_0x4421c8,_0x2dce42(0x1d8))?_0x5900c2+'/.opencode/skills/':_0x5900c2+_0x2dce42(0x1cb),_0x26ecf7=process['stdin'][_0x2dce42(0x1cc)]&&process[_0x2dce42(0x1d7)]['isTTY'];let _0x3f01d9;if(_0xd66cba[_0x2dce42(0x1e3)])_0x3f01d9=_0xd66cba[_0x2dce42(0x1e3)];else{if(_0x26ecf7){const _0x48665e=await _0x3e0a27['prompt']([{'type':_0x209210['qMTMG'],'name':_0x209210['rQsOA'],'message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':'All\x20projects\x20('+_0xb0a289+')','value':_0x209210['Mgyue']},{'name':'This\x20project\x20only\x20('+_0x45c6ee+')','value':_0x2dce42(0x1cd)}]}]);_0x3f01d9=_0x48665e[_0x2dce42(0x1ed)];}else _0x3f01d9=_0x209210['ypwEn'],console['log'](_0x2dce42(0x1d4)+_0x45c6ee+')');}let _0x1766ff=0x0;const _0x4d2c60=getCurrentVersion();console[_0x2dce42(0x1e2)](_0x209210[_0x2dce42(0x1e6)]);try{const _0x46e90a=await installSkill(_0x209210[_0x2dce42(0x1dd)],{'cliVersion':_0x4d2c60,'level':_0x3f01d9,'platform':_0x4421c8});_0x46e90a&&_0x1766ff++;}catch(_0xe0dfa2){console['warn'](_0x209210[_0x2dce42(0x1e4)],_0xe0dfa2 instanceof Error?_0xe0dfa2[_0x2dce42(0x1ce)]:_0xe0dfa2);}if(_0x1766ff>0x0){const _0x2b4838=_0x3f01d9===_0x2dce42(0x1d3)?_0x209210['DFozL']:_0x209210[_0x2dce42(0x1d1)];console['log'](_0x2dce42(0x1f2)+_0x1766ff+'\x20'+_0x2b4838+'\x20skill'+(_0x1766ff>0x1?'s':'')+_0x2dce42(0x1ef)),!_0xd66cba['suppressUsage']&&(console['log'](_0x209210[_0x2dce42(0x1eb)]),_0x4421c8===_0x209210['gcFIK']?console['log']('\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'):console['log'](_0x209210['YsHAj']));}else console[_0x2dce42(0x1e2)]('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}function _0x38b7(){const _0x57a0ff=['1088866ioMOPS','heLzy','user-level','YaCjg','\x20--opencode','installLevel','EIlDO','\x20successfully!\x0a','KTuyv','1946264PsfgoR','\x0a✅\x20Installed\x20','To\x20get\x20started:','spUmY','3876310zUMJDi','2HLAxPB','list','/.claude/skills/','isTTY','project','message','\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!','DPLtx','kdDlS','✓\x20Found\x20API\x20token','user','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','9yMQLGe','bZQAR','stdout','opencode','jrKfD','369796JKjBKG','125lFlZYc','gcFIK','PnADh','1907913FdkiUz','3208641HtBqMt','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','ranger','log','autoInstall','ppegY','211686sjJGgp','faNCZ','/skills/'];_0x38b7=function(){return _0x57a0ff;};return _0x38b7();}
1
+ (function(_0x569aa7,_0xe2eb1d){const _0x253b07=_0x39ce,_0x52ae99=_0x569aa7();while(!![]){try{const _0x29097d=parseInt(_0x253b07(0x13e))/0x1*(parseInt(_0x253b07(0x144))/0x2)+-parseInt(_0x253b07(0x158))/0x3+-parseInt(_0x253b07(0x15e))/0x4*(-parseInt(_0x253b07(0x140))/0x5)+parseInt(_0x253b07(0x146))/0x6*(-parseInt(_0x253b07(0x15d))/0x7)+-parseInt(_0x253b07(0x13b))/0x8+-parseInt(_0x253b07(0x151))/0x9*(parseInt(_0x253b07(0x139))/0xa)+parseInt(_0x253b07(0x153))/0xb;if(_0x29097d===_0xe2eb1d)break;else _0x52ae99['push'](_0x52ae99['shift']());}catch(_0x3c3ef1){_0x52ae99['push'](_0x52ae99['shift']());}}}(_0x2229,0x9464a));import{basename}from'path';import _0x579f16 from'inquirer';function _0x2229(){const _0x562cf8=['CeYzF','stdout','1376937NMWudI','/skills/','12392325GLpeyF','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','\x20<your-api-token>','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','platform','764982pJIAQH','✓\x20Found\x20API\x20token','To\x20use:','suppressUsage','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','7StYKRv','1703236SJfGmh','nPeqp','project-level','10jiZDFZ','\x0a✅\x20Installed\x20','4867640CqwCGB','\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!','list','9319ITDzPf','ETCgO','5APMqLP','All\x20projects\x20(','isTTY','heSSM','212HcOSiS','EEGzA','5495628DPVTHa','Weqnt','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','user-level','This\x20project\x20only\x20(','LtWBv','\x20\x202.\x20Run:\x20ranger\x20setup','log','installLevel'];_0x2229=function(){return _0x562cf8;};return _0x2229();}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';function _0x39ce(_0x446251,_0x23ec19){_0x446251=_0x446251-0x139;const _0x222972=_0x2229();let _0x39cebb=_0x222972[_0x446251];return _0x39cebb;}import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x47fcc9={}){const _0x53c75b=_0x39ce,_0x5d0b9e={'LtWBv':function(_0x3fb85a){return _0x3fb85a();},'LmwAD':_0x53c75b(0x148),'FUSdl':function(_0x31a1f5,_0x21e205){return _0x31a1f5===_0x21e205;},'ohdbE':_0x53c75b(0x159),'ETCgO':function(_0x4068e5,_0x294716){return _0x4068e5(_0x294716);},'bILdp':function(_0x42e8bf,_0x4e2335){return _0x42e8bf===_0x4e2335;},'rkBAr':'opencode','nPeqp':'user','ESFlJ':function(_0x8883f0){return _0x8883f0();},'EEGzA':'Where\x20should\x20skills\x20be\x20installed?','CeYzF':'project','heSSM':'\x0a📦\x20Installing\x20skills...\x0a','fagPs':_0x53c75b(0x149),'Weqnt':_0x53c75b(0x160),'AYxwd':function(_0x5d0c71,_0x3c21f9){return _0x5d0c71>_0x3c21f9;},'OQpYf':function(_0x5b9983,_0x4c4d0a){return _0x5b9983===_0x4c4d0a;},'iEEXN':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'};console[_0x53c75b(0x14d)]('\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a');const _0x34f560=_0x47fcc9[_0x53c75b(0x157)]??'claude',_0x216b57=await _0x5d0b9e[_0x53c75b(0x14b)](getToken);if(!_0x216b57){console[_0x53c75b(0x14d)](_0x53c75b(0x154)),console[_0x53c75b(0x14d)]('To\x20get\x20started:'),console['log'](_0x5d0b9e['LmwAD']),console[_0x53c75b(0x14d)](_0x53c75b(0x14c)+(_0x5d0b9e['FUSdl'](_0x34f560,'opencode')?'\x20--opencode':'')+_0x53c75b(0x155)),console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x34f560==='opencode'?'\x20--opencode':'')+'\x0a');return;}console[_0x53c75b(0x14d)](_0x5d0b9e['ohdbE']);const _0x5d6f7b=_0x5d0b9e['LtWBv'](getProjectRoot),_0x5680f7=_0x5d0b9e[_0x53c75b(0x13f)](basename,_0x5d6f7b),_0x5ba4d2=_0x5d0b9e['bILdp'](_0x34f560,_0x5d0b9e['rkBAr'])?_0x5d0b9e['ETCgO'](getOpencodeConfigDir,_0x5d0b9e[_0x53c75b(0x15f)])+_0x53c75b(0x152):_0x5d0b9e['ESFlJ'](getClaudeConfigDir)+'/skills/',_0x207f1b=_0x34f560==='opencode'?_0x5d6f7b+'/.opencode/skills/':_0x5d6f7b+'/.claude/skills/',_0x50b544=process['stdin'][_0x53c75b(0x142)]&&process[_0x53c75b(0x150)]['isTTY'];let _0x533dc8;if(_0x47fcc9['autoInstall'])_0x533dc8=_0x47fcc9['autoInstall'];else{if(_0x50b544){const _0x2ef59c=await _0x579f16['prompt']([{'type':_0x53c75b(0x13d),'name':'installLevel','message':_0x5d0b9e[_0x53c75b(0x145)],'choices':[{'name':_0x53c75b(0x141)+_0x5ba4d2+')','value':'user'},{'name':_0x53c75b(0x14a)+_0x207f1b+')','value':_0x5d0b9e[_0x53c75b(0x14f)]}]}]);_0x533dc8=_0x2ef59c[_0x53c75b(0x14e)];}else _0x533dc8=_0x5d0b9e['CeYzF'],console['log'](_0x53c75b(0x156)+_0x207f1b+')');}let _0x4d626d=0x0;const _0x100ff2=getCurrentVersion();console['log'](_0x5d0b9e[_0x53c75b(0x143)]);try{const _0x3b4e47=await installSkill('ranger',{'cliVersion':_0x100ff2,'level':_0x533dc8,'platform':_0x34f560});_0x3b4e47&&_0x4d626d++;}catch(_0x36df56){console['warn'](_0x53c75b(0x15c),_0x36df56 instanceof Error?_0x36df56['message']:_0x36df56);}if(_0x4d626d>0x0){const _0x4b51f1=_0x533dc8===_0x5d0b9e[_0x53c75b(0x15f)]?_0x5d0b9e['fagPs']:_0x5d0b9e[_0x53c75b(0x147)];console['log'](_0x53c75b(0x13a)+_0x4d626d+'\x20'+_0x4b51f1+'\x20skill'+(_0x5d0b9e['AYxwd'](_0x4d626d,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x47fcc9[_0x53c75b(0x15b)]&&(console['log'](_0x53c75b(0x15a)),_0x5d0b9e['OQpYf'](_0x34f560,_0x5d0b9e['rkBAr'])?console[_0x53c75b(0x14d)](_0x5d0b9e['iEEXN']):console[_0x53c75b(0x14d)](_0x53c75b(0x13c)));}else console[_0x53c75b(0x14d)]('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
@@ -1 +1 @@
1
- const _0x1b06fb=_0x4212;(function(_0x5053a3,_0x21f91a){const _0x412048=_0x4212,_0x4f572f=_0x5053a3();while(!![]){try{const _0x192a35=parseInt(_0x412048(0x152))/0x1*(-parseInt(_0x412048(0x18a))/0x2)+-parseInt(_0x412048(0x1a2))/0x3*(-parseInt(_0x412048(0x155))/0x4)+parseInt(_0x412048(0x158))/0x5*(-parseInt(_0x412048(0x175))/0x6)+parseInt(_0x412048(0x15d))/0x7+-parseInt(_0x412048(0x176))/0x8*(parseInt(_0x412048(0x18c))/0x9)+parseInt(_0x412048(0x1b0))/0xa+parseInt(_0x412048(0x14e))/0xb;if(_0x192a35===_0x21f91a)break;else _0x4f572f['push'](_0x4f572f['shift']());}catch(_0x5d48cf){_0x4f572f['push'](_0x4f572f['shift']());}}}(_0x31d2,0xdf0d4));import{mkdir,writeFile}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{createRequire}from'module';import _0x59d167 from'inquirer';function _0x4212(_0x567d33,_0x2f627f){_0x567d33=_0x567d33-0x149;const _0x31d2aa=_0x31d2();let _0x421204=_0x31d2aa[_0x567d33];return _0x421204;}import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x31d2(){const _0x4f3bd9=['\x0a❌\x20Profile\x20setup\x20failed:','39822992gOEXKR','LNKOA','success','\x1b[0m','4PCxRrI','ErzaX','scope','4FpZPbV','GsKdP','iuOGX','20PvxajL','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','vGUvp','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','3599806QxYUtt','Authentication\x20failed:\x20','CaBgH','bnQaG','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','RfSnU','✓\x20~/.ranger/\x20directory\x20already\x20exists','trackPhaseEnd','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','device_auth','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','Installation\x20failed\x20with\x20exit\x20code\x20','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','JPVoE','warn','erOYj','platform','round','jUSRM',');\x20retrying...','organizationName','QTRGp','win32','1998300CkSyPU','80kqzyvr',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','kJZDq','moQeT','dGVKb','iokBA','\x20now?','local','xwHkU','You\x20can\x20install\x20it\x20manually\x20by\x20running:','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','ghMkG','GITHUB_ENV','execPath','UrIZg','ranger\x20profile\x20add\x20<name>','\x20and\x20prompt\x20the\x20coding','FFHfv','version','withDeps','719988tOrxMF','message','1147176OGyowC','allowInsecureLocalhost','\x20(fallback\x20version)','\x0a⚠\x20Skipping\x20Chromium\x20installation.','✓\x20Exported\x20credentials\x20for\x20CI','rCSza','ranger\x20setup\x20--scope=','tMKmG','cpMAC','KSGQN','error','ready','✓\x20Created\x20~/.ranger/\x20directory','profile','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','ziSrP','The\x20required\x20version\x20(','RANGER_CHROMIUM_INSTALL_TIMEOUT_MS','\x0aIn\x20Claude\x20Code,\x20run\x20','close','inherit','playwright/package.json','580323OWbsAy','\x0a\x20\x20Chromium\x20install\x20timed\x20out\x20(limit\x20','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','swHrh','trackPhaseStart','force','.gitignore','user','kill','✓\x20Skipping\x20authentication\x20(--skip-auth)','LStwM','sepqx','isTTY','\x0aInstalling\x20Chromium\x20browser...\x0a','6324650gzpLhy','log','ignore','\x0a🚀\x20Ranger\x20Setup\x0a','skills','skipChromium','hIdXL','\x20\x20Chromium\x20install\x20attempt\x20','GAgtO','\x20\x20npx\x20playwright@'];_0x31d2=function(){return _0x4f3bd9;};return _0x31d2();}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';import{spawn}from'child_process';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.60.0';const bold=_0x58f7f8=>'\x1b[1m'+_0x58f7f8+_0x1b06fb(0x151);export function getPlaywrightVersion(){const _0x165478=_0x1b06fb,_0xd8c439={'EbIzl':'playwright/package.json'};try{const _0x22bf6c=require['resolve'](_0xd8c439['EbIzl']),_0x15d9c1=require(_0x22bf6c);return _0x15d9c1[_0x165478(0x188)];}catch{return null;}}function resolveBundledPlaywrightCli(){const _0x6ac558=_0x1b06fb,_0xaeb585={'GsKdP':function(_0x3269c1,_0x32d07e){return _0x3269c1(_0x32d07e);}};try{const _0x3cef99=join(_0xaeb585[_0x6ac558(0x156)](dirname,require['resolve'](_0x6ac558(0x1a1))),'cli.js');return _0xaeb585['GsKdP'](existsSync,_0x3cef99)?_0x3cef99:null;}catch{return null;}}const CHROMIUM_INSTALL_TIMEOUT_MS=Number(process['env'][_0x1b06fb(0x19d)])||0x927c0;class ChromiumInstallTimeoutError extends Error{}export async function installChromiumBinary(_0x3702b6,_0x12cbae=![]){const _0x4ab97a=_0x1b06fb,_0x334145={'YweSd':'npx','ghMkG':'chromium','UrIZg':function(_0x339510,_0x5bc255){return _0x339510 instanceof _0x5bc255;},'moQeT':function(_0x5da843,_0x36881a){return _0x5da843+_0x36881a;},'QTRGp':function(_0x674734,_0x38857e){return _0x674734>=_0x38857e;},'pTyjx':function(_0x410c8d,_0x2fa981){return _0x410c8d instanceof _0x2fa981;}},_0x2d1b8c=resolveBundledPlaywrightCli(),_0x1e790f=_0x2d1b8c?process[_0x4ab97a(0x183)]:_0x334145['YweSd'],_0x461cfa=[_0x2d1b8c??'playwright@'+_0x3702b6,'install',..._0x12cbae?['--with-deps']:[],_0x334145[_0x4ab97a(0x181)]];let _0x289301=![];for(let _0x36d763=0x1;;_0x36d763++){try{await runChromiumInstall(_0x1e790f,_0x461cfa);return;}catch(_0x510cf0){_0x334145[_0x4ab97a(0x184)](_0x510cf0,ChromiumInstallTimeoutError)&&!_0x289301&&(_0x289301=!![],console[_0x4ab97a(0x1b1)](_0x334145[_0x4ab97a(0x179)](_0x4ab97a(0x1a3)+Math['round'](CHROMIUM_INSTALL_TIMEOUT_MS/0x3e8)+'s).\x20On\x20a\x20slow\x20or\x20proxied\x20connection,\x20raise\x20the\x20limit\x20and\x20retry,\x20e.g.:\x0a','\x20\x20\x20\x20RANGER_CHROMIUM_INSTALL_TIMEOUT_MS=1800000\x20ranger\x20setup\x20deps')));if(_0x334145[_0x4ab97a(0x173)](_0x36d763,0x3))throw _0x510cf0;const _0x21ee22=_0x334145['pTyjx'](_0x510cf0,Error)?_0x510cf0[_0x4ab97a(0x18b)]:String(_0x510cf0);console[_0x4ab97a(0x1b1)](_0x4ab97a(0x14a)+_0x36d763+'\x20failed\x20('+_0x21ee22+_0x4ab97a(0x171));}}}function runChromiumInstall(_0x55a52e,_0x1d22f3){const _0x1f57ca=_0x1b06fb,_0x5b688e={'LNKOA':function(_0x361bf8,_0x5a5373){return _0x361bf8(_0x5a5373);},'hEOrS':function(_0x48e6a0,_0x6ac22f){return _0x48e6a0===_0x6ac22f;},'cyTPo':function(_0x11ca4c){return _0x11ca4c();},'iokBA':function(_0x5f322d,_0x53e3c0,_0x100c13,_0x2c5413){return _0x5f322d(_0x53e3c0,_0x100c13,_0x2c5413);},'GAgtO':_0x1f57ca(0x1b2),'xwHkU':'inherit','swHrh':_0x1f57ca(0x19f)};return new Promise((_0x58b386,_0x32d7e4)=>{const _0x58703d=_0x1f57ca,_0x3c78a2={'vGUvp':function(_0x24848e,_0x5be2ab){return _0x24848e(_0x5be2ab);},'hIdXL':function(_0x75b56c,_0x25276b){return _0x5b688e['hEOrS'](_0x75b56c,_0x25276b);},'SKKRe':function(_0xf941d){return _0x5b688e['cyTPo'](_0xf941d);},'tpYQk':function(_0x17a467,_0x46aec0){const _0x1e75dd=_0x4212;return _0x5b688e[_0x1e75dd(0x14f)](_0x17a467,_0x46aec0);}},_0x5b15f3=_0x5b688e[_0x58703d(0x17b)](spawn,_0x55a52e,_0x1d22f3,{'stdio':[_0x5b688e[_0x58703d(0x14b)],_0x58703d(0x1a0),_0x5b688e[_0x58703d(0x17e)]],'shell':process[_0x58703d(0x16e)]===_0x58703d(0x174)}),_0x57f2e7=setTimeout(()=>{const _0x5f3b65=_0x58703d;_0x5b15f3[_0x5f3b65(0x1aa)]('SIGKILL'),_0x3c78a2[_0x5f3b65(0x15b)](_0x32d7e4,new ChromiumInstallTimeoutError('Chromium\x20install\x20timed\x20out\x20after\x20'+Math[_0x5f3b65(0x16f)](CHROMIUM_INSTALL_TIMEOUT_MS/0x3e8)+'s'));},CHROMIUM_INSTALL_TIMEOUT_MS);_0x5b15f3['on'](_0x5b688e[_0x58703d(0x1a5)],_0x1fb27f=>{const _0x3bed6a=_0x58703d;clearTimeout(_0x57f2e7);if(_0x3c78a2[_0x3bed6a(0x149)](_0x1fb27f,0x0))_0x3c78a2['SKKRe'](_0x58b386);else _0x3c78a2['tpYQk'](_0x32d7e4,new Error(_0x3bed6a(0x169)+_0x1fb27f));}),_0x5b15f3['on']('error',_0x5b6d56=>{const _0x323a27=_0x58703d;_0x5b688e[_0x323a27(0x14f)](clearTimeout,_0x57f2e7),_0x32d7e4(_0x5b6d56);});});}export async function authenticate(_0x145759){const _0x14c78b=_0x1b06fb,_0x35f00c={'DynJR':function(_0x54b886){return _0x54b886();},'kJZDq':function(_0x1f593e,_0x276e67){return _0x1f593e(_0x276e67);},'bnQaG':function(_0x1683c5,_0x53256c){return _0x1683c5 instanceof _0x53256c;},'FMYjE':'Validating\x20API\x20token...','EwQBU':function(_0x1a01b1,_0x34b166){return _0x1a01b1(_0x34b166);},'IvAcN':'✓\x20Stored\x20credentials\x20locally'};if(!_0x145759){const _0x4460a9=await _0x35f00c['DynJR'](getToken);if(_0x4460a9){const _0x4941ca=await _0x35f00c[_0x14c78b(0x178)](getCurrentUser,_0x4460a9);if(_0x4941ca[_0x14c78b(0x150)])return console[_0x14c78b(0x1b1)]('✓\x20Already\x20authenticated\x20to\x20'+_0x4941ca[_0x14c78b(0x1a9)]['organizationName']),{'token':_0x4460a9,'method':'existing_token'};}try{_0x145759=await _0x35f00c['DynJR'](runDeviceAuthFlow);}catch(_0x18d07b){throw new Error('Authentication\x20failed:\x20'+(_0x35f00c[_0x14c78b(0x160)](_0x18d07b,Error)?_0x18d07b['message']:_0x18d07b));}const _0x4ba7d5=await getCurrentUser(_0x145759);if(!_0x4ba7d5['success'])throw new Error(_0x14c78b(0x162)+_0x4ba7d5[_0x14c78b(0x196)]);return console['log']('✓\x20Authenticated\x20to\x20'+_0x4ba7d5[_0x14c78b(0x1a9)][_0x14c78b(0x172)]),{'token':_0x145759,'method':_0x14c78b(0x167)};}console[_0x14c78b(0x1b1)](_0x35f00c['FMYjE']);const _0x530935=await getCurrentUser(_0x145759);if(!_0x530935['success']){if(_0x530935['status'])throw new Error(_0x14c78b(0x15e)+_0x530935['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x530935['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console['log']('✓\x20Authenticated\x20to\x20'+_0x530935[_0x14c78b(0x1a9)][_0x14c78b(0x172)]),await _0x35f00c['EwQBU'](storeToken,_0x145759),console[_0x14c78b(0x1b1)](process['env'][_0x14c78b(0x182)]?_0x14c78b(0x190):_0x35f00c['IvAcN']),{'token':_0x145759,'method':'provided_token'};}export async function ensureRangerDir(_0x4a2921){const _0x504147=_0x1b06fb,_0x88122f={'erOYj':function(_0x1930c7){return _0x1930c7();},'HurkH':_0x504147(0x198)};void _0x4a2921;const _0x21cdbb=_0x88122f[_0x504147(0x16d)](getRangerHomeDir);return!existsSync(_0x21cdbb)?(await mkdir(_0x21cdbb,{'recursive':!![]}),console[_0x504147(0x1b1)](_0x88122f['HurkH']),{'path':_0x21cdbb,'installed':!![]}):(console['log'](_0x504147(0x164)),{'path':_0x21cdbb,'installed':![]});}export async function ensureChromium(_0x5de134=![]){const _0x4ea76a=_0x1b06fb,_0x19dab7={'jGvxv':function(_0x5e8d08,_0x33eb64){return _0x5e8d08??_0x33eb64;},'JPVoE':_0x4ea76a(0x1af),'vXkNT':function(_0x56b5f2,_0x915360,_0x2ce58d){return _0x56b5f2(_0x915360,_0x2ce58d);},'ziSrP':_0x4ea76a(0x161),'AGnQV':function(_0x276191,_0x4bf69d){return _0x276191 instanceof _0x4bf69d;},'SWOxq':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0x15b2a6=![];try{const _0x109d03=chromium['executablePath']();_0x15b2a6=existsSync(_0x109d03);}catch{_0x15b2a6=![];}if(_0x15b2a6)return console['log']('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x1732b9=getPlaywrightVersion(),_0x2b9fe4=_0x19dab7['jGvxv'](_0x1732b9,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x427161=!_0x1732b9,_0x1f7248=process['stdin'][_0x4ea76a(0x1ae)]&&process['stdout']['isTTY'];let _0x2c0f42=!![];if(_0x1f7248){const {install:_0x3d60f8}=await _0x59d167['prompt']([{'type':'confirm','name':'install','message':_0x427161?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x2b9fe4+_0x4ea76a(0x17c):_0x4ea76a(0x19c)+_0x2b9fe4+_0x4ea76a(0x177),'default':!![]}]);_0x2c0f42=_0x3d60f8;}else console['log'](_0x4ea76a(0x168)+_0x2b9fe4+(_0x427161?_0x4ea76a(0x18e):'')+'...');if(_0x2c0f42){console[_0x4ea76a(0x1b1)](_0x19dab7[_0x4ea76a(0x16b)]);try{await _0x19dab7['vXkNT'](installChromiumBinary,_0x2b9fe4,_0x5de134),console['log'](_0x4ea76a(0x180));}catch(_0x1463b3){console[_0x4ea76a(0x196)](_0x19dab7[_0x4ea76a(0x19b)],_0x19dab7['AGnQV'](_0x1463b3,Error)?_0x1463b3['message']:_0x1463b3),console['log'](_0x4ea76a(0x17f)),console['log'](_0x4ea76a(0x14c)+_0x2b9fe4+'\x20install\x20chromium');}}else console[_0x4ea76a(0x1b1)](_0x4ea76a(0x18f)),console['log'](_0x19dab7['SWOxq']),console['log']('\x20\x20npx\x20playwright@'+_0x2b9fe4+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x4decdd){const _0x30cb44=_0x1b06fb,_0x2518e4={'zcnNJ':function(_0x4374b7,_0x22aeed,_0x1df572){return _0x4374b7(_0x22aeed,_0x1df572);},'rCSza':_0x30cb44(0x1a8)},_0x717538=_0x2518e4['zcnNJ'](join,_0x4decdd,_0x2518e4[_0x30cb44(0x191)]),_0x2c18f7='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await _0x2518e4['zcnNJ'](writeFile,_0x717538,_0x2c18f7),console[_0x30cb44(0x1b1)]('✓\x20Created\x20.ranger/.gitignore');}export async function ensureLocalEnv(_0x241424,_0x7d3150){const _0x484669=_0x1b06fb,_0x411ce5={'RfSnU':function(_0x58874e){return _0x58874e();},'pWONh':'⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','dGVKb':_0x484669(0x17d)};if(!_0x411ce5[_0x484669(0x163)](findGitRoot)&&_0x241424?.[_0x484669(0x154)]!=='user')return console['log'](_0x411ce5['pWONh']),{'ready':![],'skipped':!![]};const _0x3b4222=_0x241424?.[_0x484669(0x154)]===_0x484669(0x1a9)?getRangerHomeDir():undefined;if(findExistingEnv(_0x411ce5[_0x484669(0x17a)],{'locations':[_0x411ce5[_0x484669(0x17a)]],'rangerDir':_0x3b4222}))return console[_0x484669(0x1b1)]('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};try{return await addEnv(_0x411ce5[_0x484669(0x17a)],{'url':_0x241424?.['url'],'force':_0x241424?.[_0x484669(0x1a7)],'allowInsecureLocalhost':_0x241424?.[_0x484669(0x18d)],'scope':_0x241424?.[_0x484669(0x154)]},_0x7d3150),{'ready':!![],'skipped':![]};}catch(_0x416e84){return console['error'](_0x484669(0x14d),_0x416e84 instanceof Error?_0x416e84[_0x484669(0x18b)]:_0x416e84),{'ready':![],'skipped':![]};}}export async function start(_0x388878,_0x4bd764,_0x3b940b){const _0x9779c4=_0x1b06fb,_0x1ae09c={'wDbJZ':_0x9779c4(0x1b3),'tpqJn':function(_0x202857,_0x52aa59){return _0x202857!==_0x52aa59;},'LStwM':function(_0x5a2776,_0x1ef897){return _0x5a2776+_0x1ef897;},'tMKmG':function(_0x45ce9d,_0x197aaa){return _0x45ce9d(_0x197aaa);},'cpMAC':function(_0x2524cb){return _0x2524cb();},'sepqx':'auth','SLugW':'chromium','KSGQN':'plugin','CaBgH':function(_0x41537d,_0x172fbd){return _0x41537d(_0x172fbd);},'UeAOD':function(_0x42b802,_0x45c7f2){return _0x42b802&&_0x45c7f2;},'XOZVr':function(_0x32166e,_0x37e109,_0x3c01a0){return _0x32166e(_0x37e109,_0x3c01a0);},'FoKvs':'ranger','iuOGX':_0x9779c4(0x1b4),'nzNbW':_0x9779c4(0x1a4),'QXApC':'user','ErzaX':_0x9779c4(0x199),'FFHfv':function(_0x3b535a,_0x469d5f){return _0x3b535a+_0x469d5f;},'dYLOk':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','KmWxU':'/ranger:enable','jUSRM':function(_0x96453f,_0x65590){return _0x96453f+_0x65590;}};console[_0x9779c4(0x1b1)](_0x1ae09c['wDbJZ']);_0x4bd764?.[_0x9779c4(0x154)]!==undefined&&_0x1ae09c['tpqJn'](_0x4bd764['scope'],_0x9779c4(0x1a9))&&(console[_0x9779c4(0x196)](_0x1ae09c[_0x9779c4(0x1ac)](_0x9779c4(0x192)+_0x1ae09c['tMKmG'](String,_0x4bd764[_0x9779c4(0x154)])+'\x20is\x20no\x20longer\x20supported.\x20'+_0x9779c4(0x15c),'project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.')),process['exit'](0x1));_0x4bd764={..._0x4bd764,'scope':_0x9779c4(0x1a9)};const _0x9be3f9=!_0x1ae09c['tMKmG'](existsSync,_0x1ae09c[_0x9779c4(0x194)](getRangerHomeDir));await ensureRangerDir(_0x9779c4(0x1a9));if(_0x4bd764?.['skipAuth'])console['log'](_0x9779c4(0x1ab)),_0x3b940b?.['trackPhaseEnd'](_0x1ae09c['sepqx'],{'isFirstRun':_0x9be3f9,'method':'skipped'});else{_0x3b940b?.['trackPhaseStart'](_0x1ae09c['sepqx']);const _0x146236=await authenticate(_0x388878);_0x3b940b?.[_0x9779c4(0x165)](_0x1ae09c[_0x9779c4(0x1ad)],{'isFirstRun':_0x9be3f9,'method':_0x146236['method']});}_0x3b940b?.[_0x9779c4(0x1a6)](_0x1ae09c['SLugW']);_0x4bd764?.['skipChromium']?console[_0x9779c4(0x1b1)](_0x9779c4(0x16a)):await ensureChromium(_0x4bd764?.[_0x9779c4(0x189)]);_0x3b940b?.['trackPhaseEnd']('chromium',{'isFirstRun':_0x9be3f9,'skipped':!!_0x4bd764?.[_0x9779c4(0x1b5)]}),console[_0x9779c4(0x1b1)](_0x9779c4(0x166));const _0x2d5a3a=_0x4bd764?.[_0x9779c4(0x154)],_0x799ac5=_0x4bd764?.['opencode']??![];let _0x42baca=null;_0x799ac5?(_0x3b940b?.[_0x9779c4(0x1a6)](_0x1ae09c['KSGQN']),_0x42baca=await _0x1ae09c['CaBgH'](ensureOpencodePluginConfig,_0x2d5a3a),_0x3b940b?.['trackPhaseEnd'](_0x1ae09c['KSGQN'],{'isFirstRun':_0x9be3f9,'opencode':!![]})):(_0x3b940b?.[_0x9779c4(0x1a6)](_0x1ae09c[_0x9779c4(0x195)]),await _0x1ae09c[_0x9779c4(0x193)](ensureClaudePlugin,_0x2d5a3a),_0x3b940b?.['trackPhaseEnd'](_0x1ae09c['KSGQN'],{'isFirstRun':_0x9be3f9}));if(_0x1ae09c['UeAOD'](_0x799ac5,_0x42baca)){_0x3b940b?.['trackPhaseStart'](_0x9779c4(0x1b4));try{await _0x1ae09c['XOZVr'](installSkill,_0x1ae09c['FoKvs'],{'level':_0x42baca[_0x9779c4(0x154)],'cliVersion':_0x1ae09c[_0x9779c4(0x194)](getCurrentVersion),'platform':'opencode'}),_0x3b940b?.[_0x9779c4(0x165)](_0x1ae09c[_0x9779c4(0x157)],{'isFirstRun':_0x9be3f9,'opencode':!![]});}catch(_0x1b070f){console[_0x9779c4(0x16c)](_0x9779c4(0x159),_0x1b070f instanceof Error?_0x1b070f['message']:_0x1b070f),_0x3b940b?.[_0x9779c4(0x165)]('skills',{'isFirstRun':_0x9be3f9,'opencode':!![],'failed':!![]});}}else _0x3b940b?.['trackPhaseStart'](_0x9779c4(0x1b4)),await _0x1ae09c[_0x9779c4(0x15f)](ensureClaudeSkills,_0x2d5a3a),_0x3b940b?.[_0x9779c4(0x165)]('skills',{'isFirstRun':_0x9be3f9});if(_0x4bd764?.['skipAuth'])console['log'](_0x1ae09c['nzNbW']);else{if(_0x4bd764?.['url']){_0x3b940b?.['trackPhaseStart'](_0x9779c4(0x199));const _0x3fc188=await ensureLocalEnv({'url':_0x4bd764['url'],'force':_0x4bd764?.[_0x9779c4(0x1a7)],'allowInsecureLocalhost':_0x4bd764?.[_0x9779c4(0x18d)],'scope':_0x1ae09c['QXApC']},_0x3b940b);_0x3b940b?.[_0x9779c4(0x165)](_0x1ae09c[_0x9779c4(0x153)],{'isFirstRun':_0x9be3f9,'profileReady':_0x3fc188[_0x9779c4(0x197)],'userSkipped':_0x3fc188['skipped']});}else console[_0x9779c4(0x1b1)](_0x1ae09c['LStwM'](_0x1ae09c['LStwM'](_0x1ae09c[_0x9779c4(0x187)]('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:','\x0a\x20\x20'+bold(_0x9779c4(0x185))),'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)')+_0x9779c4(0x15a),'\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles'));}if(_0x799ac5)console['log']('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console[_0x9779c4(0x1b1)]('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console['log'](_0x1ae09c['dYLOk']),console['log']('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x1cc7b9=_0x1ae09c['CaBgH'](bold,_0x1ae09c['KmWxU']);console['log'](_0x1ae09c[_0x9779c4(0x170)](_0x1ae09c[_0x9779c4(0x170)](_0x1ae09c['jUSRM'](_0x9779c4(0x19e)+_0x1cc7b9+_0x9779c4(0x186),'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'),'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),_0x9779c4(0x19a)));}}
1
+ const _0x5a86aa=_0x46ea;(function(_0x2efa7b,_0x1b5959){const _0x18fddb=_0x46ea,_0x207ae6=_0x2efa7b();while(!![]){try{const _0x25aea4=-parseInt(_0x18fddb(0x86))/0x1+parseInt(_0x18fddb(0x72))/0x2+parseInt(_0x18fddb(0xa5))/0x3*(-parseInt(_0x18fddb(0x69))/0x4)+-parseInt(_0x18fddb(0x84))/0x5*(-parseInt(_0x18fddb(0xbe))/0x6)+parseInt(_0x18fddb(0xd8))/0x7*(parseInt(_0x18fddb(0x6d))/0x8)+-parseInt(_0x18fddb(0xc1))/0x9+parseInt(_0x18fddb(0xab))/0xa;if(_0x25aea4===_0x1b5959)break;else _0x207ae6['push'](_0x207ae6['shift']());}catch(_0x363313){_0x207ae6['push'](_0x207ae6['shift']());}}}(_0x36a2,0x2c6a5));function _0x36a2(){const _0x4c6720=['pINhR','guNIi','url','RANGER_CHROMIUM_INSTALL_TIMEOUT_MS','log','ywYWt','plugin','trackPhaseStart','ycWPU','ELJxH','62671Ijfoan','NsJVp','WdNjf','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','KipVn','tcmcf','198244OIYfhC','IGgoD','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','AjwWF','104AbJMJl',');\x20retrying...','round','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','rSsrB','407746VKjySK','aJYir','existing_token','✓\x20~/.ranger/\x20directory\x20already\x20exists','✓\x20Created\x20~/.ranger/\x20directory','playwright/package.json','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','profile','device_auth','\x20install\x20chromium','provided_token','mePdu','wFQpi','\x20\x20Chromium\x20install\x20attempt\x20','\x20failed\x20(','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','\x0a❌\x20Profile\x20setup\x20failed:','close','275ECgcCF','/ranger:enable','16183mDsJnE','\x20\x20npx\x20playwright@','\x20\x20\x20\x20RANGER_CHROMIUM_INSTALL_TIMEOUT_MS=1800000\x20ranger\x20setup\x20deps','inherit','RvzwJ','resolve','auth','Zufov','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','ubXhI','win32','PStiQ','\x0a⚠\x20Skipping\x20Chromium\x20installation.','user','confirm','YCIPy','cli.js','scope','Validating\x20API\x20token...','ready','JGDOr','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','success','\x20and\x20prompt\x20the\x20coding','opencode','tAfIo','AutYF','\x0aIn\x20Claude\x20Code,\x20run\x20','withDeps','chromium','gPyPI','12uvMrwc','\x1b[1m','GITHUB_ENV','error','method','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','2971850snUhHi','✓\x20Exported\x20credentials\x20for\x20CI','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','NEsGz','status',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','...','BjNBI','skipAuth','version','organizationName','mMMAv','force','skills','SIGKILL','abFlF','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','\x20is\x20no\x20longer\x20supported.\x20','UPYsd','3054IxHGov','Installation\x20failed\x20with\x20exit\x20code\x20','s).\x20On\x20a\x20slow\x20or\x20proxied\x20connection,\x20raise\x20the\x20limit\x20and\x20retry,\x20e.g.:\x0a','2241810jJCKpZ','lThaT','npx','trackPhaseEnd','Txeyx','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','DMqXT','message','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','vFGSM','✓\x20Skipping\x20authentication\x20(--skip-auth)'];_0x36a2=function(){return _0x4c6720;};return _0x36a2();}import{mkdir,writeFile}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{createRequire}from'module';import _0x5568cd 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';function _0x46ea(_0x39f0bd,_0x25667b){_0x39f0bd=_0x39f0bd-0x68;const _0x36a2af=_0x36a2();let _0x46ea66=_0x36a2af[_0x39f0bd];return _0x46ea66;}import{installSkill}from'./utils/skills.js';import{spawn}from'child_process';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.60.0';const bold=_0x1a628e=>_0x5a86aa(0xa6)+_0x1a628e+'\x1b[0m';export function getPlaywrightVersion(){const _0x5f5636=_0x5a86aa,_0x49c6a6={'fVqtP':function(_0x342ae4,_0x1144b4){return _0x342ae4(_0x1144b4);}};try{const _0x453d08=require['resolve']('playwright/package.json'),_0x4b3258=_0x49c6a6['fVqtP'](require,_0x453d08);return _0x4b3258[_0x5f5636(0xb4)];}catch{return null;}}function resolveBundledPlaywrightCli(){const _0x2baf6d=_0x5a86aa,_0x34642a={'IGgoD':_0x2baf6d(0x77),'tAfIo':function(_0x26d436,_0x309e0f){return _0x26d436(_0x309e0f);}};try{const _0x26ff4f=join(dirname(require[_0x2baf6d(0x8b)](_0x34642a[_0x2baf6d(0x6a)])),_0x2baf6d(0x96));return _0x34642a[_0x2baf6d(0x9f)](existsSync,_0x26ff4f)?_0x26ff4f:null;}catch{return null;}}const CHROMIUM_INSTALL_TIMEOUT_MS=Number(process['env'][_0x5a86aa(0xd1)])||0x927c0;class ChromiumInstallTimeoutError extends Error{}export async function installChromiumBinary(_0x32c4dd,_0x4935a5=![]){const _0x138b53=_0x5a86aa,_0x23f238={'AhgaH':'install','bhFbv':'--with-deps','JGDOr':function(_0x54ae82,_0x598438){return _0x54ae82+_0x598438;},'skFVK':function(_0xe6f755,_0x4fd979){return _0xe6f755>=_0x4fd979;},'NEsGz':function(_0x3c3f43,_0x42a7ae){return _0x3c3f43 instanceof _0x42a7ae;}},_0x9040cc=resolveBundledPlaywrightCli(),_0x3ba5b1=_0x9040cc?process['execPath']:_0x138b53(0xc3),_0x262ec0=[_0x9040cc??'playwright@'+_0x32c4dd,_0x23f238['AhgaH'],..._0x4935a5?[_0x23f238['bhFbv']]:[],_0x138b53(0xa3)];let _0x8dcb98=![];for(let _0x5c268e=0x1;;_0x5c268e++){try{await runChromiumInstall(_0x3ba5b1,_0x262ec0);return;}catch(_0x2666f9){_0x2666f9 instanceof ChromiumInstallTimeoutError&&!_0x8dcb98&&(_0x8dcb98=!![],console['log'](_0x23f238[_0x138b53(0x9a)]('\x0a\x20\x20Chromium\x20install\x20timed\x20out\x20(limit\x20'+Math['round'](CHROMIUM_INSTALL_TIMEOUT_MS/0x3e8)+_0x138b53(0xc0),_0x138b53(0x88))));if(_0x23f238['skFVK'](_0x5c268e,0x3))throw _0x2666f9;const _0x27c428=_0x23f238[_0x138b53(0xae)](_0x2666f9,Error)?_0x2666f9['message']:String(_0x2666f9);console['log'](_0x138b53(0x7f)+_0x5c268e+_0x138b53(0x80)+_0x27c428+_0x138b53(0x6e));}}}function runChromiumInstall(_0x4ee3cb,_0x4cb74e){const _0x244299=_0x5a86aa,_0x254be0={'eVjDR':function(_0x8b85e0,_0x2c578b){return _0x8b85e0(_0x2c578b);},'abFlF':function(_0x531e84,_0x27ac30){return _0x531e84/_0x27ac30;},'wFQpi':function(_0x1ca077,_0x36897d){return _0x1ca077===_0x36897d;},'iOFRh':'ignore','UPYsd':_0x244299(0x90),'KipVn':_0x244299(0x83),'JBnsb':_0x244299(0xa8)};return new Promise((_0x5414a7,_0x173409)=>{const _0x147df1=_0x244299,_0x13a209={'YCIPy':function(_0x62ef90,_0x105cc8){return _0x62ef90(_0x105cc8);},'gvjpN':function(_0x3b297e,_0x102eb8){const _0x210321=_0x46ea;return _0x254be0[_0x210321(0xba)](_0x3b297e,_0x102eb8);},'mePdu':function(_0x1dfe7a,_0x4a9e8d){const _0x344fe4=_0x46ea;return _0x254be0[_0x344fe4(0x7e)](_0x1dfe7a,_0x4a9e8d);}},_0x3ca97f=spawn(_0x4ee3cb,_0x4cb74e,{'stdio':[_0x254be0['iOFRh'],_0x147df1(0x89),_0x147df1(0x89)],'shell':process['platform']===_0x254be0[_0x147df1(0xbd)]}),_0x4b51a5=setTimeout(()=>{const _0x4a50d7=_0x147df1;_0x3ca97f['kill'](_0x4a50d7(0xb9)),_0x13a209['YCIPy'](_0x173409,new ChromiumInstallTimeoutError('Chromium\x20install\x20timed\x20out\x20after\x20'+Math[_0x4a50d7(0x6f)](_0x13a209['gvjpN'](CHROMIUM_INSTALL_TIMEOUT_MS,0x3e8))+'s'));},CHROMIUM_INSTALL_TIMEOUT_MS);_0x3ca97f['on'](_0x254be0[_0x147df1(0xdc)],_0x29b11e=>{const _0x32558e=_0x147df1;_0x13a209[_0x32558e(0x95)](clearTimeout,_0x4b51a5);if(_0x13a209[_0x32558e(0x7d)](_0x29b11e,0x0))_0x5414a7();else _0x173409(new Error(_0x32558e(0xbf)+_0x29b11e));}),_0x3ca97f['on'](_0x254be0['JBnsb'],_0x7a62be=>{_0x254be0['eVjDR'](clearTimeout,_0x4b51a5),_0x173409(_0x7a62be);});});}export async function authenticate(_0x3ed4b2){const _0xf6179=_0x5a86aa,_0x3b338a={'PoalY':function(_0x467dc6,_0x58c75a){return _0x467dc6(_0x58c75a);},'NsJVp':function(_0x5c6586,_0x6e09d8){return _0x5c6586 instanceof _0x6e09d8;},'DMqXT':function(_0x2b3033,_0x2ce61e){return _0x2b3033(_0x2ce61e);},'mMMAv':_0xf6179(0x7a),'zlhVK':function(_0x3d78c3,_0x8ba830){return _0x3d78c3(_0x8ba830);},'XQvij':function(_0x4394de,_0x16d280){return _0x4394de(_0x16d280);},'dyypY':_0xf6179(0x7c)};if(!_0x3ed4b2){const _0x436156=await getToken();if(_0x436156){const _0x3948d9=await _0x3b338a['PoalY'](getCurrentUser,_0x436156);if(_0x3948d9[_0xf6179(0x9c)])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x3948d9['user']['organizationName']),{'token':_0x436156,'method':_0xf6179(0x74)};}try{_0x3ed4b2=await runDeviceAuthFlow();}catch(_0x366b36){throw new Error('Authentication\x20failed:\x20'+(_0x3b338a[_0xf6179(0xd9)](_0x366b36,Error)?_0x366b36[_0xf6179(0xca)]:_0x366b36));}const _0x14545d=await _0x3b338a[_0xf6179(0xc9)](getCurrentUser,_0x3ed4b2);if(!_0x14545d[_0xf6179(0x9c)])throw new Error(_0xf6179(0xaa)+_0x14545d[_0xf6179(0xa8)]);return console['log']('✓\x20Authenticated\x20to\x20'+_0x14545d[_0xf6179(0x93)]['organizationName']),{'token':_0x3ed4b2,'method':_0x3b338a[_0xf6179(0xb6)]};}console[_0xf6179(0xd2)](_0xf6179(0x98));const _0x4de8d3=await _0x3b338a['zlhVK'](getCurrentUser,_0x3ed4b2);if(!_0x4de8d3[_0xf6179(0x9c)]){if(_0x4de8d3[_0xf6179(0xaf)])throw new Error('Authentication\x20failed:\x20'+_0x4de8d3['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0xf6179(0xdb)+_0x4de8d3[_0xf6179(0xa8)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0xf6179(0xd2)]('✓\x20Authenticated\x20to\x20'+_0x4de8d3['user'][_0xf6179(0xb5)]),await _0x3b338a['XQvij'](storeToken,_0x3ed4b2),console[_0xf6179(0xd2)](process['env'][_0xf6179(0xa7)]?_0xf6179(0xac):'✓\x20Stored\x20credentials\x20locally'),{'token':_0x3ed4b2,'method':_0x3b338a['dyypY']};}export async function ensureRangerDir(_0x2e4cc0){const _0x1673ba=_0x5a86aa,_0x97b1e5={'pINhR':function(_0x134a78,_0xf46055,_0x32af68){return _0x134a78(_0xf46055,_0x32af68);}};void _0x2e4cc0;const _0x1db21b=getRangerHomeDir();return!existsSync(_0x1db21b)?(await _0x97b1e5[_0x1673ba(0xce)](mkdir,_0x1db21b,{'recursive':!![]}),console['log'](_0x1673ba(0x76)),{'path':_0x1db21b,'installed':!![]}):(console[_0x1673ba(0xd2)](_0x1673ba(0x75)),{'path':_0x1db21b,'installed':![]});}export async function ensureChromium(_0x53df77=![]){const _0x55af4b=_0x5a86aa,_0x117876={'LnBEV':function(_0x2152c2,_0x40b21a){return _0x2152c2(_0x40b21a);},'lThaT':function(_0x3a4769,_0x37882b){return _0x3a4769??_0x37882b;},'efDjW':'install','UWIGy':'\x0aInstalling\x20Chromium\x20browser...\x0a','JkSzP':function(_0x46cdbe,_0x224203,_0x5afcd3){return _0x46cdbe(_0x224203,_0x5afcd3);},'wFZar':_0x55af4b(0x81),'RvzwJ':_0x55af4b(0x8e)};let _0xacb1a2=![];try{const _0x282281=chromium['executablePath']();_0xacb1a2=_0x117876['LnBEV'](existsSync,_0x282281);}catch{_0xacb1a2=![];}if(_0xacb1a2)return console[_0x55af4b(0xd2)]('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x1df805=getPlaywrightVersion(),_0x5ffd5c=_0x117876[_0x55af4b(0xc2)](_0x1df805,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x42510f=!_0x1df805,_0x2ea083=process['stdin']['isTTY']&&process['stdout']['isTTY'];let _0x376a53=!![];if(_0x2ea083){const {install:_0x13d75c}=await _0x5568cd['prompt']([{'type':_0x55af4b(0x94),'name':_0x117876['efDjW'],'message':_0x42510f?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x5ffd5c+'\x20now?':'The\x20required\x20version\x20('+_0x5ffd5c+_0x55af4b(0xb0),'default':!![]}]);_0x376a53=_0x13d75c;}else console['log'](_0x55af4b(0xc8)+_0x5ffd5c+(_0x42510f?'\x20(fallback\x20version)':'')+_0x55af4b(0xb1));if(_0x376a53){console['log'](_0x117876['UWIGy']);try{await _0x117876['JkSzP'](installChromiumBinary,_0x5ffd5c,_0x53df77),console['log']('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x261cc2){console['error'](_0x117876['wFZar'],_0x261cc2 instanceof Error?_0x261cc2[_0x55af4b(0xca)]:_0x261cc2),console[_0x55af4b(0xd2)]('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),console['log'](_0x55af4b(0x87)+_0x5ffd5c+'\x20install\x20chromium');}}else console['log'](_0x55af4b(0x92)),console['log'](_0x117876[_0x55af4b(0x8a)]),console[_0x55af4b(0xd2)]('\x20\x20npx\x20playwright@'+_0x5ffd5c+_0x55af4b(0x7b));return!![];}export async function writeRangerGitignore(_0x317320){const _0x553174=_0x5a86aa,_0x143086={'gPyPI':function(_0x21d5c9,_0x119128,_0x2bcdf5){return _0x21d5c9(_0x119128,_0x2bcdf5);},'ycWPU':function(_0x240b74,_0x5195b4,_0x570d36){return _0x240b74(_0x5195b4,_0x570d36);},'FHOpz':'✓\x20Created\x20.ranger/.gitignore'},_0x34bdf8=_0x143086[_0x553174(0xa4)](join,_0x317320,'.gitignore'),_0x2e3db5='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await _0x143086[_0x553174(0xd6)](writeFile,_0x34bdf8,_0x2e3db5),console['log'](_0x143086['FHOpz']);}export async function ensureLocalEnv(_0x56d91b,_0x5438bb){const _0x302d17=_0x5a86aa,_0xcaf910={'BjNBI':function(_0x461295){return _0x461295();},'qYmYN':function(_0x93d890,_0x2e97a3){return _0x93d890!==_0x2e97a3;},'vFGSM':function(_0x47d985,_0x17ea8d,_0x401941){return _0x47d985(_0x17ea8d,_0x401941);},'ywYWt':'local','ELJxH':_0x302d17(0x82)};if(!_0xcaf910[_0x302d17(0xb2)](findGitRoot)&&_0xcaf910['qYmYN'](_0x56d91b?.['scope'],_0x302d17(0x93)))return console[_0x302d17(0xd2)](_0x302d17(0x70)),{'ready':![],'skipped':!![]};const _0x3e3ce4=_0x56d91b?.[_0x302d17(0x97)]===_0x302d17(0x93)?_0xcaf910['BjNBI'](getRangerHomeDir):undefined;if(_0xcaf910[_0x302d17(0xcc)](findExistingEnv,_0xcaf910[_0x302d17(0xd3)],{'locations':['local'],'rangerDir':_0x3e3ce4}))return console[_0x302d17(0xd2)]('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};try{return await addEnv(_0xcaf910['ywYWt'],{'url':_0x56d91b?.[_0x302d17(0xd0)],'force':_0x56d91b?.['force'],'allowInsecureLocalhost':_0x56d91b?.['allowInsecureLocalhost'],'scope':_0x56d91b?.[_0x302d17(0x97)]},_0x5438bb),{'ready':!![],'skipped':![]};}catch(_0x24aff2){return console['error'](_0xcaf910[_0x302d17(0xd7)],_0x24aff2 instanceof Error?_0x24aff2[_0x302d17(0xca)]:_0x24aff2),{'ready':![],'skipped':![]};}}export async function start(_0x118155,_0x405a76,_0x13dd2f){const _0x1d5e86=_0x5a86aa,_0x4b4c46={'WdNjf':'\x0a🚀\x20Ranger\x20Setup\x0a','SiniD':function(_0x3f199c,_0x24817a){return _0x3f199c!==_0x24817a;},'aJYir':'user','Hqxqp':function(_0x69a498,_0x25c312){return _0x69a498+_0x25c312;},'guNIi':function(_0x4e8ff5,_0x19d002){return _0x4e8ff5(_0x19d002);},'PStiQ':function(_0x48a2d5){return _0x48a2d5();},'tcmcf':function(_0x4a4e3f,_0x502860){return _0x4a4e3f(_0x502860);},'ubXhI':_0x1d5e86(0xcd),'AjwWF':_0x1d5e86(0x8c),'vNrvK':'skipped','lLUHG':_0x1d5e86(0xa3),'YtcJr':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','lXzsC':function(_0x5927da,_0x19fbfb){return _0x5927da(_0x19fbfb);},'Txeyx':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','cojTq':_0x1d5e86(0xd4),'PczXa':function(_0x227d60,_0x5f5b9e){return _0x227d60(_0x5f5b9e);},'Zufov':_0x1d5e86(0xb8),'DMEdu':_0x1d5e86(0x9b),'Dkcno':function(_0x521082,_0x479d25){return _0x521082 instanceof _0x479d25;},'FaQKj':function(_0xc7a759,_0x4f03fc,_0x18a12d){return _0xc7a759(_0x4f03fc,_0x18a12d);},'vdNrh':function(_0x2a39f2,_0xd31827){return _0x2a39f2+_0xd31827;},'rSsrB':function(_0x1a94db,_0x20708d){return _0x1a94db+_0x20708d;},'TUVPa':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','wmzIV':_0x1d5e86(0xc7),'AutYF':function(_0x1b0528,_0x1a791c){return _0x1b0528+_0x1a791c;}};console['log'](_0x4b4c46[_0x1d5e86(0xda)]);_0x4b4c46['SiniD'](_0x405a76?.['scope'],undefined)&&_0x4b4c46['SiniD'](_0x405a76[_0x1d5e86(0x97)],_0x4b4c46[_0x1d5e86(0x73)])&&(console[_0x1d5e86(0xa8)](_0x4b4c46['Hqxqp']('ranger\x20setup\x20--scope='+_0x4b4c46[_0x1d5e86(0xcf)](String,_0x405a76[_0x1d5e86(0x97)])+_0x1d5e86(0xbc),'Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20')+_0x1d5e86(0xad)),process['exit'](0x1));_0x405a76={..._0x405a76,'scope':_0x1d5e86(0x93)};const _0x1b0b82=!existsSync(_0x4b4c46[_0x1d5e86(0x91)](getRangerHomeDir));await _0x4b4c46[_0x1d5e86(0x68)](ensureRangerDir,_0x4b4c46['aJYir']);if(_0x405a76?.['skipAuth'])console[_0x1d5e86(0xd2)](_0x4b4c46[_0x1d5e86(0x8f)]),_0x13dd2f?.[_0x1d5e86(0xc4)](_0x4b4c46[_0x1d5e86(0x6c)],{'isFirstRun':_0x1b0b82,'method':_0x4b4c46['vNrvK']});else{_0x13dd2f?.[_0x1d5e86(0xd5)](_0x4b4c46[_0x1d5e86(0x6c)]);const _0xfcd3c1=await authenticate(_0x118155);_0x13dd2f?.[_0x1d5e86(0xc4)](_0x4b4c46['AjwWF'],{'isFirstRun':_0x1b0b82,'method':_0xfcd3c1[_0x1d5e86(0xa9)]});}_0x13dd2f?.[_0x1d5e86(0xd5)](_0x4b4c46['lLUHG']);_0x405a76?.['skipChromium']?console['log'](_0x4b4c46['YtcJr']):await _0x4b4c46['lXzsC'](ensureChromium,_0x405a76?.[_0x1d5e86(0xa2)]);_0x13dd2f?.[_0x1d5e86(0xc4)](_0x4b4c46['lLUHG'],{'isFirstRun':_0x1b0b82,'skipped':!!_0x405a76?.['skipChromium']}),console['log'](_0x4b4c46[_0x1d5e86(0xc5)]);const _0x2e1eef=_0x405a76?.[_0x1d5e86(0x97)],_0x3c584d=_0x405a76?.[_0x1d5e86(0x9e)]??![];let _0xbe87d8=null;_0x3c584d?(_0x13dd2f?.[_0x1d5e86(0xd5)](_0x4b4c46['cojTq']),_0xbe87d8=await ensureOpencodePluginConfig(_0x2e1eef),_0x13dd2f?.[_0x1d5e86(0xc4)](_0x1d5e86(0xd4),{'isFirstRun':_0x1b0b82,'opencode':!![]})):(_0x13dd2f?.[_0x1d5e86(0xd5)]('plugin'),await _0x4b4c46['PczXa'](ensureClaudePlugin,_0x2e1eef),_0x13dd2f?.[_0x1d5e86(0xc4)]('plugin',{'isFirstRun':_0x1b0b82}));if(_0x3c584d&&_0xbe87d8){_0x13dd2f?.['trackPhaseStart'](_0x4b4c46[_0x1d5e86(0x8d)]);try{await installSkill('ranger',{'level':_0xbe87d8['scope'],'cliVersion':getCurrentVersion(),'platform':'opencode'}),_0x13dd2f?.[_0x1d5e86(0xc4)](_0x1d5e86(0xb8),{'isFirstRun':_0x1b0b82,'opencode':!![]});}catch(_0x4bae74){console['warn'](_0x4b4c46['DMEdu'],_0x4b4c46['Dkcno'](_0x4bae74,Error)?_0x4bae74['message']:_0x4bae74),_0x13dd2f?.[_0x1d5e86(0xc4)](_0x4b4c46['Zufov'],{'isFirstRun':_0x1b0b82,'opencode':!![],'failed':!![]});}}else _0x13dd2f?.[_0x1d5e86(0xd5)](_0x1d5e86(0xb8)),await ensureClaudeSkills(_0x2e1eef),_0x13dd2f?.[_0x1d5e86(0xc4)]('skills',{'isFirstRun':_0x1b0b82});if(_0x405a76?.[_0x1d5e86(0xb3)])console[_0x1d5e86(0xd2)]('\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a');else{if(_0x405a76?.[_0x1d5e86(0xd0)]){_0x13dd2f?.['trackPhaseStart'](_0x1d5e86(0x79));const _0x3ba9bf=await _0x4b4c46['FaQKj'](ensureLocalEnv,{'url':_0x405a76['url'],'force':_0x405a76?.[_0x1d5e86(0xb7)],'allowInsecureLocalhost':_0x405a76?.['allowInsecureLocalhost'],'scope':'user'},_0x13dd2f);_0x13dd2f?.['trackPhaseEnd'](_0x1d5e86(0x79),{'isFirstRun':_0x1b0b82,'profileReady':_0x3ba9bf[_0x1d5e86(0x99)],'userSkipped':_0x3ba9bf['skipped']});}else console['log'](_0x4b4c46['vdNrh'](_0x4b4c46[_0x1d5e86(0x71)]('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+('\x0a\x20\x20'+bold('ranger\x20profile\x20add\x20<name>'))+'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)',_0x1d5e86(0xbb)),_0x1d5e86(0x6b)));}if(_0x3c584d)console[_0x1d5e86(0xd2)](_0x1d5e86(0xcb)),console['log'](_0x4b4c46['TUVPa']),console[_0x1d5e86(0xd2)](_0x4b4c46['wmzIV']),console['log']('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x4401f9=bold(_0x1d5e86(0x85));console[_0x1d5e86(0xd2)](_0x4b4c46[_0x1d5e86(0xa0)](_0x1d5e86(0xa1)+_0x4401f9+_0x1d5e86(0x9d)+_0x1d5e86(0x78)+_0x1d5e86(0xc6),'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'));}}
@@ -1 +1 @@
1
- const _0x109d16=_0x4bdc;(function(_0x5f3253,_0x3b67a4){const _0x47b43a=_0x4bdc,_0x132679=_0x5f3253();while(!![]){try{const _0x55af20=-parseInt(_0x47b43a(0x24c))/0x1+-parseInt(_0x47b43a(0x208))/0x2+-parseInt(_0x47b43a(0x252))/0x3+-parseInt(_0x47b43a(0x232))/0x4+-parseInt(_0x47b43a(0x259))/0x5*(-parseInt(_0x47b43a(0x20d))/0x6)+parseInt(_0x47b43a(0x20e))/0x7*(parseInt(_0x47b43a(0x1f5))/0x8)+parseInt(_0x47b43a(0x247))/0x9;if(_0x55af20===_0x3b67a4)break;else _0x132679['push'](_0x132679['shift']());}catch(_0xc394ad){_0x132679['push'](_0x132679['shift']());}}}(_0xd304,0xaeed0));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';function _0x4bdc(_0x416c58,_0x4a79cd){_0x416c58=_0x416c58-0x1e7;const _0xd304fe=_0xd304();let _0x4bdc8c=_0xd304fe[_0x416c58];return _0x4bdc8c;}import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';function _0xd304(){const _0x37c54d=['Unpfj','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','3999420dewhIS','API\x20URL:\x20','\x1b[0m','auth.json.enc','\x0a---\x20OpenCode\x20Plugin\x20---','PNcov','hytuF','settingsPath','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','\x20\x20\x20\x20Session:\x20','\x20\x20Run:\x20ranger\x20update','API\x20Token:\x20✗\x20Not\x20found','log','ahLMW','map','data','\x20\x20Run:\x20ranger\x20setup\x20[token]','Version:\x20','sfoaf','Root:\x20','fjMmq','18882612UtqJFm','dMBJZ','none','\x20local','gpTGL','173254DlkVGk','name','isActive','wyxhx','string','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','3190779xyhQUJ','not_installed','QSJrb','\x1b[1m','trim','WiMwU','status','110SZWXbA','scope','gmuRj','DkFVw','filter','\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)','\x1b]8;;file://','No\x20skills\x20installed','unknown','version','ignore','(not\x20found)','ysuAx','API\x20Environment:\x20','no\x20session','\x0a---\x20Profiles\x20---','pipe','sessionUpdatedAt','536DuFgVI','env','settings.json','Mwkvw','\x20\x20Run:\x20ranger\x20setup\x20--opencode','not_configured','traOP','displayName','FGXwR','FkbGF','\x20[cloud]','opencode-plugin','IRuxc','organizationName','\x20\x20Not\x20installed','FoONM','FrAQk','@ranger-testing/opencode-plugin','XEHfo','1904158DEmvhl','has','success','enabled',':\x20configured','237258Zwdcku','97923JCLtmY','stderr','RESQJ','SKILL.md','ranger@trailhead','FpoCo','close','ougpX','XpnZZ','toString','push','wyOGa','\x20\x20\x20\x20','cwd','rSORz','\x20(up\x20to\x20date)','length','path','user','eBrwP','gJUjG','\x0a\x20\x20No\x20active\x20profile\x20set','\x0a📊\x20Ranger\x20Status\x0a','details','\x20[local]','match','MLXEM','apiob','\x20plugin(s)\x20configured','OLVZQ','cTjlg','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','isArray','\x0a---\x20Claude\x20Code\x20Plugin\x20---'];_0xd304=function(){return _0x37c54d;};return _0xd304();}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=_0x3eeae3=>_0x109d16(0x255)+_0x3eeae3+_0x109d16(0x234),link=(_0x4d6e45,_0x3f58c6)=>_0x109d16(0x1e9)+_0x4d6e45+'\x07'+(_0x3f58c6||_0x4d6e45)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x5b74d3=_0x109d16,_0x2a1fde={'fjMmq':function(_0x106517,_0xf5ef77){return _0x106517(_0xf5ef77);},'QSJrb':'configured','ysuAx':function(_0x17a6d1,_0x5754d0){return _0x17a6d1(_0x5754d0);},'ZIsgg':_0x5b74d3(0x1fa),'mksgT':function(_0x5ecd58,_0x4b1ac9){return _0x5ecd58(_0x4b1ac9);},'PNcov':'config','sfoaf':'data','RCYCF':'error'};return new Promise(_0x1a0c85=>{const _0x5d427e=_0x5b74d3,_0x660e07={'XEHfo':function(_0x462e17,_0x593720){return _0x2a1fde['mksgT'](_0x462e17,_0x593720);}},_0x40df5b=spawn('opencode',['debug',_0x2a1fde[_0x5d427e(0x237)]],{'stdio':[_0x5d427e(0x1ed),_0x5d427e(0x1f3),_0x5d427e(0x1f3)]});let _0x158ee0='';_0x40df5b['stdout']?.['on'](_0x2a1fde[_0x5d427e(0x244)],_0x3d6f99=>{const _0x989974=_0x5d427e;_0x158ee0+=_0x3d6f99[_0x989974(0x217)]();}),_0x40df5b[_0x5d427e(0x20f)]?.['on'](_0x5d427e(0x241),_0x41e34c=>{const _0x9e0154=_0x5d427e;_0x158ee0+=_0x41e34c[_0x9e0154(0x217)]();}),_0x40df5b['on'](_0x2a1fde['RCYCF'],()=>{const _0xe8f02b=_0x5d427e;_0x660e07[_0xe8f02b(0x207)](_0x1a0c85,{'status':_0xe8f02b(0x253)});}),_0x40df5b['on'](_0x5d427e(0x214),_0x22ff73=>{const _0x3504de=_0x5d427e,_0x3426a9={'yGRAR':_0x3504de(0x206),'hytuF':_0x3504de(0x200)};if(_0x22ff73!==0x0){_0x2a1fde['fjMmq'](_0x1a0c85,{'status':'not_installed'});return;}const _0x4e80ae=_0x158ee0[_0x3504de(0x256)]();let _0xe5e547=null;if(_0x4e80ae)try{_0xe5e547=JSON['parse'](_0x4e80ae);}catch{const _0xc437ec=_0x4e80ae[_0x3504de(0x227)](/\{[\s\S]*\}$/);if(_0xc437ec)try{_0xe5e547=JSON['parse'](_0xc437ec[0x0]);}catch{_0xe5e547=null;}}const _0x121442=Array[_0x3504de(0x22e)](_0xe5e547?.['plugin'])?_0xe5e547?.['plugin']:[],_0x37faf4=_0x121442['some'](_0x165ba6=>{const _0x2aee55=_0x3504de;if(typeof _0x165ba6!==_0x2aee55(0x250))return![];return _0x165ba6['includes'](_0x3426a9['yGRAR'])||_0x165ba6['includes'](_0x3426a9[_0x2aee55(0x238)]);});if(_0x37faf4){_0x2a1fde[_0x3504de(0x246)](_0x1a0c85,{'status':_0x2a1fde[_0x3504de(0x254)],'details':_0x121442[_0x3504de(0x21e)]>0x0?_0x121442['length']+_0x3504de(0x22a):undefined});return;}if(_0x121442['length']>0x0){_0x2a1fde[_0x3504de(0x1ef)](_0x1a0c85,{'status':_0x3504de(0x1fa),'details':_0x121442[_0x3504de(0x21e)]+'\x20plugin(s)\x20configured'});return;}_0x2a1fde[_0x3504de(0x1ef)](_0x1a0c85,{'status':_0x2a1fde['ZIsgg']});});});}async function getSkillsFromDir(_0x39b93e,_0x58d482){const _0x55b2fd=_0x109d16,_0x1ceee9={'ZvmDf':function(_0x52f241,_0x2afd38){return _0x52f241(_0x2afd38);},'wyxhx':function(_0x5b5012,_0x78df1b,_0x375bd7,_0x50fbce){return _0x5b5012(_0x78df1b,_0x375bd7,_0x50fbce);},'uEHnS':_0x55b2fd(0x211),'IRuxc':function(_0x1a4417,_0x507a34){return _0x1a4417(_0x507a34);}};if(!_0x1ceee9['ZvmDf'](existsSync,_0x39b93e))return[];const _0xc9eeac=[];try{const _0x348957=await readdir(_0x39b93e,{'withFileTypes':!![]});for(const _0x5e1e35 of _0x348957){if(_0x5e1e35['isDirectory']()){const _0x18d623=_0x1ceee9[_0x55b2fd(0x24f)](join,_0x39b93e,_0x5e1e35['name'],_0x1ceee9['uEHnS']);if(_0x1ceee9[_0x55b2fd(0x201)](existsSync,_0x18d623)){let _0x33898b=_0x5e1e35['name'];try{const _0x259559=await readFile(_0x18d623,'utf-8'),_0x220fa6=_0x259559[_0x55b2fd(0x227)](/name:\s*(.+)/);_0x220fa6&&(_0x33898b=_0x220fa6[0x1][_0x55b2fd(0x256)]());}catch{}_0xc9eeac[_0x55b2fd(0x218)]({'name':_0x5e1e35['name'],'displayName':_0x33898b,'path':_0x18d623,'level':_0x58d482});}}}}catch{return[];}return _0xc9eeac;}async function getInstalledSkills(){const _0x5d23e9=_0x109d16,_0x54a9f8={'fptyz':function(_0x1cb30b,_0x45da5c,_0x28f9fe){return _0x1cb30b(_0x45da5c,_0x28f9fe);},'RESQJ':'project','ahLMW':function(_0x165f82){return _0x165f82();},'lVuny':_0x5d23e9(0x220)},[_0x183688,_0x3a9607]=await Promise['all']([_0x54a9f8['fptyz'](getSkillsFromDir,getProjectSkillsDir(),_0x54a9f8[_0x5d23e9(0x210)]),getSkillsFromDir(_0x54a9f8[_0x5d23e9(0x23f)](getUserSkillsDir),_0x54a9f8['lVuny'])]);return{'project':_0x183688,'user':_0x3a9607};}async function getEnvironments(){const _0x457b29=_0x109d16,_0x22cba2={'KKrZv':function(_0x5ce422,_0x55656d){return _0x5ce422(_0x55656d);},'fxMrf':function(_0x72c7ca,_0x10063c,_0x368b8b){return _0x72c7ca(_0x10063c,_0x368b8b);},'OPpML':_0x457b29(0x1f7),'NESCX':_0x457b29(0x235),'gmuRj':function(_0x9f10d8){return _0x9f10d8();},'MLXEM':function(_0x48c315,_0x4f3415){return _0x48c315(_0x4f3415);}},{envNames:_0x54054b,activeEnv:_0x4ff0eb}=await getEnvNames(),_0x5e12b6=_0x22cba2[_0x457b29(0x25b)](getRangerDir);if(!_0x22cba2[_0x457b29(0x228)](existsSync,_0x5e12b6))return{'envs':[],'activeEnv':null};const _0x406c99=_0x54054b['map'](_0x272363=>{const _0x29f183=_0x457b29,_0x3813bd=_0x22cba2['KKrZv'](getEnvDir,_0x272363),_0xf75bfc=_0x22cba2['fxMrf'](join,_0x3813bd,_0x22cba2['OPpML']),_0x1b1852=join(_0x3813bd,'auth.json'),_0x52f9a6=join(_0x3813bd,_0x22cba2['NESCX']);return{'name':_0x272363,'settingsPath':_0x22cba2['KKrZv'](existsSync,_0xf75bfc)?_0xf75bfc:_0x29f183(0x1ee),'hasPlaintextAuth':existsSync(_0x1b1852),'hasEncryptedAuth':existsSync(_0x52f9a6),'isActive':_0x272363===_0x4ff0eb};});return{'envs':_0x406c99,'activeEnv':_0x4ff0eb};}export async function status(){const _0x573c28=_0x109d16,_0x370e24={'McaZd':_0x573c28(0x224),'FoONM':function(_0xf3ec63){return _0xf3ec63();},'XpnZZ':function(_0x200729,_0x247626,_0x1e03b7){return _0x200729(_0x247626,_0x1e03b7);},'cTjlg':function(_0xa7e3f9,_0xa02a5b){return _0xa7e3f9(_0xa02a5b);},'gJUjG':function(_0x18eb40,_0x597ab0){return _0x18eb40(_0x597ab0);},'rSORz':function(_0x11993e,_0x2a8b09){return _0x11993e(_0x2a8b09);},'Unpfj':function(_0x43debd,_0x1ae98f){return _0x43debd!==_0x1ae98f;},'WZYGs':function(_0x59ae67,_0x2b4ee1){return _0x59ae67(_0x2b4ee1);},'DkFVw':function(_0x334243,_0x275afd){return _0x334243(_0x275afd);},'aiomy':_0x573c28(0x236),'gpTGL':function(_0x346305,_0x2ab742){return _0x346305===_0x2ab742;},'apiob':'configured','yBnMO':_0x573c28(0x1fa),'eBrwP':_0x573c28(0x231),'Aieck':_0x573c28(0x22f),'FGXwR':'ranger@trailhead','FrAQk':_0x573c28(0x1eb),'ougpX':_0x573c28(0x20b),'WiMwU':_0x573c28(0x251),'pGYQx':'\x0a---\x20Skills\x20---','dMBJZ':function(_0xe01367,_0x1c6656){return _0xe01367+_0x1c6656;},'Mwkvw':function(_0x21f552,_0x50fc85){return _0x21f552===_0x50fc85;},'BQlbF':_0x573c28(0x1ea),'ouAsg':function(_0x12d653,_0x5accdf){return _0x12d653>_0x5accdf;},'traOP':'\x20\x20Project-level:','FkbGF':function(_0x4b53d5,_0x35c1da){return _0x4b53d5(_0x35c1da);},'qDyRB':'\x20\x20User-level:','OLVZQ':'\x20(active)','FpoCo':function(_0x13f006,_0x46f5e6){return _0x13f006(_0x46f5e6);},'wyOGa':'plaintext','LibuK':'(not\x20found)'};console[_0x573c28(0x23e)](_0x370e24['McaZd']);const _0x2332b3=process[_0x573c28(0x21b)](),_0x212370=_0x370e24['FoONM'](getRangerDir);if(!existsSync(_0x212370)){console['log'](_0x573c28(0x245)+_0x370e24['XpnZZ'](link,_0x2332b3,_0x370e24[_0x573c28(0x22c)](bold,basename(_0x2332b3)))),console[_0x573c28(0x23e)](_0x573c28(0x22d)),console[_0x573c28(0x23e)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log'](_0x573c28(0x245)+link(_0x2332b3,_0x370e24[_0x573c28(0x222)](bold,_0x370e24[_0x573c28(0x21c)](basename,_0x2332b3))));const _0x174be7=getCurrentVersion(),_0x32d28b=_0x370e24['FoONM'](getLatestVersion);if(_0x32d28b[_0x573c28(0x1ec)]&&_0x370e24['Unpfj'](_0x32d28b['version'],_0x174be7))console[_0x573c28(0x23e)](_0x573c28(0x243)+_0x174be7+'\x20(latest:\x20'+_0x32d28b[_0x573c28(0x1ec)]+')'),console['log'](_0x573c28(0x23c));else _0x32d28b['version']?console[_0x573c28(0x23e)]('Version:\x20'+_0x174be7+_0x573c28(0x21d)):console['log']('Version:\x20'+_0x174be7);const _0x52148f=await getToken();if(_0x52148f){const _0x2d2901=await _0x370e24['WZYGs'](getCurrentUser,_0x52148f);_0x2d2901[_0x573c28(0x20a)]?console['log']('Organization:\x20'+_0x370e24[_0x573c28(0x25c)](bold,_0x2d2901['user'][_0x573c28(0x202)])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x573c28(0x23e)](_0x573c28(0x23d)),console['log'](_0x573c28(0x242));process[_0x573c28(0x1f6)]['DEBUG']&&(console['log'](_0x573c28(0x1f0)+getCurrentEnvironment()),console[_0x573c28(0x23e)](_0x573c28(0x233)+_0x370e24[_0x573c28(0x204)](getApiBaseUrl)));console[_0x573c28(0x23e)](_0x370e24['aiomy']);const _0x4e1237=await getOpencodePluginStatus();if(_0x370e24[_0x573c28(0x24b)](_0x4e1237[_0x573c28(0x258)],_0x370e24[_0x573c28(0x229)]))console[_0x573c28(0x23e)]('\x20\x20'+_0x370e24['cTjlg'](bold,_0x573c28(0x206))+_0x573c28(0x20c)),_0x4e1237['details']&&console['log']('\x20\x20'+_0x4e1237['details']);else _0x370e24[_0x573c28(0x24b)](_0x4e1237[_0x573c28(0x258)],_0x370e24['yBnMO'])?(console[_0x573c28(0x23e)]('\x20\x20Not\x20configured'),_0x4e1237[_0x573c28(0x225)]&&console[_0x573c28(0x23e)]('\x20\x20'+_0x4e1237[_0x573c28(0x225)]),console['log'](_0x573c28(0x1f9))):console[_0x573c28(0x23e)](_0x370e24[_0x573c28(0x221)]);console[_0x573c28(0x23e)](_0x370e24['Aieck']);const _0xcf9f8c=await getPluginInfo(_0x370e24[_0x573c28(0x1fd)]);if(_0xcf9f8c){const _0x27d8e2=_0xcf9f8c[_0x573c28(0x25a)]||_0x370e24[_0x573c28(0x205)],_0x531b90=_0xcf9f8c['enabled']?_0x370e24[_0x573c28(0x215)]:'disabled';console[_0x573c28(0x23e)]('\x20\x20'+bold(_0x573c28(0x212))+':\x20installed\x20('+_0x27d8e2+',\x20'+_0x531b90+')');}else console[_0x573c28(0x23e)](_0x573c28(0x203)),console[_0x573c28(0x23e)](_0x370e24[_0x573c28(0x257)]);console['log'](_0x370e24['pGYQx']);const {project:_0x586908,user:_0x3044f0}=await getInstalledSkills(),_0x1e740c=_0x586908[_0x573c28(0x1e7)](_0x2420a4=>RANGER_MANAGED_SKILLS['includes'](_0x2420a4['name'])),_0x36b9c2=_0x3044f0['filter'](_0x13f4a4=>RANGER_MANAGED_SKILLS['includes'](_0x13f4a4['name'])),_0x229d8b=_0x370e24['dMBJZ'](_0x1e740c['length'],_0x36b9c2['length']);if(_0x370e24[_0x573c28(0x1f8)](_0x229d8b,0x0))console[_0x573c28(0x23e)](_0x370e24['BQlbF']),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x370e24['ouAsg'](_0x1e740c['length'],0x0)){console['log'](_0x370e24[_0x573c28(0x1fb)]);for(const _0x3c32d4 of _0x1e740c){console['log']('\x20\x20\x20\x20'+_0x370e24['gJUjG'](bold,_0x3c32d4[_0x573c28(0x1fc)])+':\x20'+link(_0x3c32d4['path'],_0x370e24[_0x573c28(0x1fe)](basename,_0x3c32d4['path'])));}}if(_0x36b9c2['length']>0x0){console[_0x573c28(0x23e)](_0x370e24['qDyRB']);for(const _0x499788 of _0x36b9c2){console['log'](_0x573c28(0x21a)+_0x370e24['DkFVw'](bold,_0x499788[_0x573c28(0x1fc)])+':\x20'+link(_0x499788['path'],_0x370e24[_0x573c28(0x1fe)](basename,_0x499788[_0x573c28(0x21f)])));}}}console['log'](_0x573c28(0x1f2));const {envs:_0x3717b9,activeEnv:_0x3c6b79}=await getEnvironments();let _0x4fcd44=[];if(_0x52148f)try{_0x4fcd44=await _0x370e24['FoONM'](listCloudProfiles);}catch{}const _0x6b135c=_0x370e24[_0x573c28(0x248)](_0x3717b9['length'],_0x4fcd44[_0x573c28(0x21e)]);if(_0x6b135c===0x0)console['log']('No\x20profiles\x20configured'),console[_0x573c28(0x23e)](_0x573c28(0x23a));else{if(_0x6b135c>0x5){const _0x5b0bf5=[];_0x4fcd44[_0x573c28(0x21e)]>0x0&&_0x5b0bf5['push'](_0x4fcd44['length']+'\x20cloud'),_0x370e24['ouAsg'](_0x3717b9['length'],0x0)&&_0x5b0bf5['push'](_0x3717b9['length']+_0x573c28(0x24a)),console['log'](_0x6b135c+'\x20profiles\x20configured\x20('+_0x5b0bf5['join'](',\x20')+')'),_0x3c6b79&&console['log']('\x20\x20Active:\x20'+_0x370e24['FkbGF'](bold,_0x3c6b79)),console[_0x573c28(0x23e)](_0x573c28(0x1e8));}else{for(const _0x31fe89 of _0x4fcd44){const _0x49e2d8=_0x370e24['Mwkvw'](_0x31fe89['name'],_0x3c6b79)?_0x370e24[_0x573c28(0x22b)]:'';console['log']('\x20\x20'+_0x370e24[_0x573c28(0x213)](bold,_0x31fe89[_0x573c28(0x24d)])+_0x573c28(0x1ff)+_0x49e2d8);const _0x45d05c=_0x31fe89[_0x573c28(0x1f4)]?'cached\x20(updated\x20'+_0x31fe89['sessionUpdatedAt']+')':_0x573c28(0x1f1);console[_0x573c28(0x23e)](_0x573c28(0x23b)+_0x45d05c);}const _0x4f1a08=new Set(_0x4fcd44[_0x573c28(0x240)](_0x344485=>_0x344485['name']));for(const _0x5608d1 of _0x3717b9){if(_0x4f1a08[_0x573c28(0x209)](_0x5608d1[_0x573c28(0x24d)]))continue;const _0x45bd37=_0x5608d1[_0x573c28(0x24e)]?'\x20(active)':'',_0x5ca76f=_0x5608d1['hasEncryptedAuth']?'encrypted':_0x5608d1['hasPlaintextAuth']?_0x370e24[_0x573c28(0x219)]:_0x573c28(0x249);console['log']('\x20\x20'+bold(_0x5608d1[_0x573c28(0x24d)])+_0x573c28(0x226)+_0x45bd37),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x5ca76f),_0x370e24[_0x573c28(0x230)](_0x5608d1[_0x573c28(0x239)],_0x370e24['LibuK'])&&console['log']('\x20\x20\x20\x20Settings:\x20'+_0x370e24[_0x573c28(0x216)](link,_0x5608d1['settingsPath'],basename(_0x5608d1[_0x573c28(0x239)])));}if(!_0x3c6b79){console['log'](_0x573c28(0x223));const _0x17f434=[..._0x4fcd44[_0x573c28(0x240)](_0x4303e3=>_0x4303e3['name']),..._0x3717b9[_0x573c28(0x1e7)](_0xb902bb=>!_0x4f1a08['has'](_0xb902bb['name']))[_0x573c28(0x240)](_0x34e589=>_0x34e589['name'])];console[_0x573c28(0x23e)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x17f434['join'](',\x20')+')');}}}console['log']('');}
1
+ const _0x28e1ee=_0x4349;(function(_0x36ca01,_0x1ef966){const _0x2b9f7d=_0x4349,_0x2f5ca4=_0x36ca01();while(!![]){try{const _0x422fe3=-parseInt(_0x2b9f7d(0x1c3))/0x1+parseInt(_0x2b9f7d(0x198))/0x2*(-parseInt(_0x2b9f7d(0x179))/0x3)+-parseInt(_0x2b9f7d(0x1ac))/0x4*(parseInt(_0x2b9f7d(0x175))/0x5)+-parseInt(_0x2b9f7d(0x169))/0x6+parseInt(_0x2b9f7d(0x1b5))/0x7*(parseInt(_0x2b9f7d(0x164))/0x8)+-parseInt(_0x2b9f7d(0x184))/0x9+parseInt(_0x2b9f7d(0x1c4))/0xa;if(_0x422fe3===_0x1ef966)break;else _0x2f5ca4['push'](_0x2f5ca4['shift']());}catch(_0xafb4a4){_0x2f5ca4['push'](_0x2f5ca4['shift']());}}}(_0x4cd2,0x7be24));function _0x4cd2(){const _0x467152=['\x20\x20Active:\x20','AJqfI','hasPlaintextAuth','6159897ONUmAc','filter','upfoO','BHeZS','aqmPG','ABPwZ','ZeMYv','WbQKM','\x20\x20\x20\x20','vBHJp','AphDQ','project','details','WwrZL','auth.json.enc','hasEncryptedAuth','xfNrK','cwd','includes','JlqYh','8dAVoEv','not_configured','auth.json','fGzfw','QrKFl','\x1b[0m','iLIBQ','\x1b[1m','cached\x20(updated\x20','\x20(latest:\x20','tpzDq','xzjUU','configured','log','encrypted','aFgnl','pAnFz','TyKMq','waBYR','plaintext','74908Xobfka','(not\x20found)','obreO',':\x20installed\x20(','scope','Version:\x20','push','version','isActive','720902MkVAWQ','EmvOr','\x20(active)','map','\x20\x20Run:\x20ranger\x20skillup','\x1b]8;;file://','QSZKg','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','plugin','ayeBT','\x0a\x20\x20No\x20active\x20profile\x20set','\x20[cloud]','EkZdE','data','669097EKupqG','24149820iaIxQV','none','\x20plugin(s)\x20configured','oHtMk','env','isDirectory','smrDB','name','ranger@trailhead','ZIpbL','config','opencode','match','40gOpZlM','\x20\x20\x20\x20Auth:\x20','API\x20Environment:\x20','success','\x0a---\x20OpenCode\x20Plugin\x20---','1081602fgVQkY','Root:\x20','stdout',':\x20configured','cKyJe','unknown','\x20\x20User-level:','settingsPath','sessionUpdatedAt','API\x20URL:\x20','zzTxA','OMZqR','185RqVZoH','enabled','YmoLa','\x20\x20Run:\x20ranger\x20setup\x20[token]','146841pWfutF','\x0a---\x20Profiles\x20---','join','@ranger-testing/opencode-plugin','\x20\x20\x20\x20Session:\x20','path','length','\x20\x20Project-level:'];_0x4cd2=function(){return _0x467152;};return _0x4cd2();}function _0x4349(_0x44ee4a,_0xfa3778){_0x44ee4a=_0x44ee4a-0x164;const _0x4cd2f4=_0x4cd2();let _0x4349e6=_0x4cd2f4[_0x44ee4a];return _0x4349e6;}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=_0x6b525e=>_0x28e1ee(0x19f)+_0x6b525e+_0x28e1ee(0x19d),link=(_0x28c28c,_0x5bc1d2)=>_0x28e1ee(0x1ba)+_0x28c28c+'\x07'+(_0x5bc1d2||_0x28c28c)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x183884=_0x28e1ee,_0x59866a={'ojSlC':function(_0x2f0985,_0x3327d5){return _0x2f0985(_0x3327d5);},'NmQKC':function(_0x393f1a,_0x322266){return _0x393f1a>_0x322266;},'PyRbw':_0x183884(0x1cf),'zwFqU':_0x183884(0x1ce),'smrDB':'ignore','AAvTd':'pipe'};return new Promise(_0xdf0d8=>{const _0x4f919c=_0x183884,_0x530e73={'eGCdQ':function(_0x454ddd,_0x24f347){return _0x454ddd!==_0x24f347;},'xfNrK':function(_0x231c74,_0x1c5ca3){return _0x59866a['ojSlC'](_0x231c74,_0x1c5ca3);},'EkZdE':_0x4f919c(0x1a4),'WZvCe':function(_0x46095e,_0x12e52b){return _0x59866a['NmQKC'](_0x46095e,_0x12e52b);},'ZIpbL':_0x4f919c(0x199)},_0x40df69=spawn(_0x59866a['PyRbw'],['debug',_0x59866a['zwFqU']],{'stdio':[_0x59866a[_0x4f919c(0x1ca)],'pipe',_0x59866a['AAvTd']]});let _0x2bbf14='';_0x40df69[_0x4f919c(0x16b)]?.['on'](_0x4f919c(0x1c2),_0x566035=>{_0x2bbf14+=_0x566035['toString']();}),_0x40df69['stderr']?.['on']('data',_0x148cb3=>{_0x2bbf14+=_0x148cb3['toString']();}),_0x40df69['on']('error',()=>{_0xdf0d8({'status':'not_installed'});}),_0x40df69['on']('close',_0x264d44=>{const _0x2bb97f=_0x4f919c,_0x2ee90b={'vvuzv':function(_0x4e78cc,_0x2bb24c){return _0x530e73['eGCdQ'](_0x4e78cc,_0x2bb24c);},'BHeZS':'@ranger-testing/opencode-plugin'};if(_0x264d44!==0x0){_0xdf0d8({'status':'not_installed'});return;}const _0x9acf10=_0x2bbf14['trim']();let _0x34e452=null;if(_0x9acf10)try{_0x34e452=JSON['parse'](_0x9acf10);}catch{const _0x9d872f=_0x9acf10[_0x2bb97f(0x1d0)](/\{[\s\S]*\}$/);if(_0x9d872f)try{_0x34e452=JSON['parse'](_0x9d872f[0x0]);}catch{_0x34e452=null;}}const _0xe78474=Array['isArray'](_0x34e452?.['plugin'])?_0x34e452?.[_0x2bb97f(0x1bd)]:[],_0xa6cfdb=_0xe78474['some'](_0x192eba=>{const _0x46e78a=_0x2bb97f;if(_0x2ee90b['vvuzv'](typeof _0x192eba,'string'))return![];return _0x192eba[_0x46e78a(0x196)](_0x2ee90b[_0x46e78a(0x187)])||_0x192eba[_0x46e78a(0x196)]('opencode-plugin');});if(_0xa6cfdb){_0x530e73[_0x2bb97f(0x194)](_0xdf0d8,{'status':_0x530e73[_0x2bb97f(0x1c1)],'details':_0xe78474[_0x2bb97f(0x17f)]>0x0?_0xe78474['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x530e73['WZvCe'](_0xe78474['length'],0x0)){_0xdf0d8({'status':_0x530e73['ZIpbL'],'details':_0xe78474['length']+_0x2bb97f(0x1c6)});return;}_0xdf0d8({'status':_0x530e73[_0x2bb97f(0x1cd)]});});});}async function getSkillsFromDir(_0x446d48,_0x545bfd){const _0x4c8abc=_0x28e1ee,_0x49ed84={'EatNA':function(_0x1ee918,_0x241378,_0x4635c3){return _0x1ee918(_0x241378,_0x4635c3);},'aqmPG':function(_0x533e52,_0x5210fd,_0x26e0a8,_0x2b4f26){return _0x533e52(_0x5210fd,_0x26e0a8,_0x2b4f26);},'oHtMk':'SKILL.md'};if(!existsSync(_0x446d48))return[];const _0x2e8c8e=[];try{const _0x4c013b=await _0x49ed84['EatNA'](readdir,_0x446d48,{'withFileTypes':!![]});for(const _0x38e759 of _0x4c013b){if(_0x38e759[_0x4c8abc(0x1c9)]()){const _0x3b5731=_0x49ed84[_0x4c8abc(0x188)](join,_0x446d48,_0x38e759['name'],_0x49ed84[_0x4c8abc(0x1c7)]);if(existsSync(_0x3b5731)){let _0x501b71=_0x38e759['name'];try{const _0x3bc0a7=await readFile(_0x3b5731,'utf-8'),_0x12e52c=_0x3bc0a7['match'](/name:\s*(.+)/);_0x12e52c&&(_0x501b71=_0x12e52c[0x1]['trim']());}catch{}_0x2e8c8e[_0x4c8abc(0x1b2)]({'name':_0x38e759[_0x4c8abc(0x1cb)],'displayName':_0x501b71,'path':_0x3b5731,'level':_0x545bfd});}}}}catch{return[];}return _0x2e8c8e;}async function getInstalledSkills(){const _0x44f21c=_0x28e1ee,_0xade099={'AqiJH':_0x44f21c(0x18f),'BJHrc':function(_0x170f57,_0x424af8,_0x16cf1e){return _0x170f57(_0x424af8,_0x16cf1e);}},[_0x2e199e,_0xd5e794]=await Promise['all']([getSkillsFromDir(getProjectSkillsDir(),_0xade099['AqiJH']),_0xade099['BJHrc'](getSkillsFromDir,getUserSkillsDir(),'user')]);return{'project':_0x2e199e,'user':_0xd5e794};}async function getEnvironments(){const _0x1219d0=_0x28e1ee,_0x418a08={'usSMU':function(_0x3ef61e,_0x18402d){return _0x3ef61e(_0x18402d);},'AJqfI':function(_0x4488c8,_0x863ff1,_0x1893b7){return _0x4488c8(_0x863ff1,_0x1893b7);},'ZeMYv':'settings.json','WbQKM':'(not\x20found)','xzjUU':function(_0x510419,_0x4e50df){return _0x510419(_0x4e50df);},'QSZKg':function(_0x3de7e6,_0x608629){return _0x3de7e6(_0x608629);},'ICCje':function(_0x2c73a4){return _0x2c73a4();},'WwrZL':function(_0xb23e2e,_0xbfe2a8){return _0xb23e2e(_0xbfe2a8);}},{envNames:_0x1f3cac,activeEnv:_0xb0d2b2}=await getEnvNames(),_0x368c84=_0x418a08['ICCje'](getRangerDir);if(!_0x418a08[_0x1219d0(0x191)](existsSync,_0x368c84))return{'envs':[],'activeEnv':null};const _0xf69674=_0x1f3cac['map'](_0x4b7417=>{const _0x22203a=_0x1219d0,_0x1a749b=_0x418a08['usSMU'](getEnvDir,_0x4b7417),_0x5f3167=_0x418a08[_0x22203a(0x182)](join,_0x1a749b,_0x418a08[_0x22203a(0x18a)]),_0x59f089=_0x418a08[_0x22203a(0x182)](join,_0x1a749b,_0x22203a(0x19a)),_0x27a0a1=join(_0x1a749b,_0x22203a(0x192));return{'name':_0x4b7417,'settingsPath':existsSync(_0x5f3167)?_0x5f3167:_0x418a08[_0x22203a(0x18b)],'hasPlaintextAuth':_0x418a08[_0x22203a(0x1a3)](existsSync,_0x59f089),'hasEncryptedAuth':_0x418a08[_0x22203a(0x1bb)](existsSync,_0x27a0a1),'isActive':_0x4b7417===_0xb0d2b2};});return{'envs':_0xf69674,'activeEnv':_0xb0d2b2};}export async function status(){const _0x195924=_0x28e1ee,_0x35c35e={'QrKFl':function(_0x5a9a9f,_0x2b3e3b){return _0x5a9a9f(_0x2b3e3b);},'TyKMq':function(_0x298921,_0x45de1b){return _0x298921(_0x45de1b);},'vBHJp':function(_0x573ee6,_0x3b8a8b){return _0x573ee6(_0x3b8a8b);},'iLIBQ':function(_0x9da420){return _0x9da420();},'NoBaK':function(_0x3a8580,_0x2c508b){return _0x3a8580!==_0x2c508b;},'wxKoN':function(_0x9f8a0f){return _0x9f8a0f();},'waBYR':function(_0x359196){return _0x359196();},'obreO':_0x195924(0x168),'LePVg':_0x195924(0x17c),'aFgnl':'not_configured','ayeBT':'\x20\x20Not\x20configured','fGzfw':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','upfoO':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','zzTxA':_0x195924(0x1cc),'TsGLh':_0x195924(0x176),'NiVng':'\x20\x20Not\x20installed','ytmvO':'\x0a---\x20Skills\x20---','eUrrZ':'No\x20skills\x20installed','YmoLa':function(_0x27575c,_0x2c832d){return _0x27575c>_0x2c832d;},'fttzu':_0x195924(0x180),'LLRUv':function(_0x20ea21,_0x4a36c1){return _0x20ea21(_0x4a36c1);},'jUJOa':_0x195924(0x16f),'LObWg':_0x195924(0x17a),'GgrFR':function(_0x37a8c0){return _0x37a8c0();},'JlqYh':function(_0x12c0d1){return _0x12c0d1();},'ABPwZ':function(_0x3a1227,_0x75efb){return _0x3a1227+_0x75efb;},'FFaER':function(_0x118564,_0x56c100){return _0x118564===_0x56c100;},'pAnFz':function(_0x2fc839,_0x1faebd){return _0x2fc839>_0x1faebd;},'cKyJe':function(_0x38fb67,_0x5c674c){return _0x38fb67(_0x5c674c);},'vWHuI':function(_0x3b812a,_0x2d2ae1){return _0x3b812a(_0x2d2ae1);},'htSuR':_0x195924(0x1b7),'AphDQ':_0x195924(0x1a6),'OMZqR':_0x195924(0x1ab),'tpzDq':_0x195924(0x1c5),'EmvOr':function(_0x459565,_0x429cb0,_0x49833e){return _0x459565(_0x429cb0,_0x49833e);}};console['log']('\x0a📊\x20Ranger\x20Status\x0a');const _0x1da105=process[_0x195924(0x195)](),_0x1d27b4=getRangerDir();if(!_0x35c35e['QrKFl'](existsSync,_0x1d27b4)){console[_0x195924(0x1a5)](_0x195924(0x16a)+link(_0x1da105,_0x35c35e['TyKMq'](bold,_0x35c35e[_0x195924(0x1a9)](basename,_0x1da105)))),console['log']('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log'](_0x195924(0x1bc));return;}console['log'](_0x195924(0x16a)+link(_0x1da105,_0x35c35e[_0x195924(0x18d)](bold,_0x35c35e[_0x195924(0x1a9)](basename,_0x1da105))));const _0x51557a=_0x35c35e[_0x195924(0x19e)](getCurrentVersion),_0x4a3ff5=_0x35c35e[_0x195924(0x19e)](getLatestVersion);if(_0x4a3ff5[_0x195924(0x1b3)]&&_0x35c35e['NoBaK'](_0x4a3ff5['version'],_0x51557a))console[_0x195924(0x1a5)]('Version:\x20'+_0x51557a+_0x195924(0x1a1)+_0x4a3ff5['version']+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x4a3ff5['version']?console['log'](_0x195924(0x1b1)+_0x51557a+'\x20(up\x20to\x20date)'):console[_0x195924(0x1a5)](_0x195924(0x1b1)+_0x51557a);const _0x5191cc=await _0x35c35e[_0x195924(0x19e)](getToken);if(_0x5191cc){const _0x289832=await getCurrentUser(_0x5191cc);_0x289832[_0x195924(0x167)]?console['log']('Organization:\x20'+_0x35c35e['vBHJp'](bold,_0x289832['user']['organizationName'])):(console[_0x195924(0x1a5)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x195924(0x1a5)](_0x195924(0x178)));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console[_0x195924(0x1a5)](_0x195924(0x178));process[_0x195924(0x1c8)]['DEBUG']&&(console['log'](_0x195924(0x166)+_0x35c35e['wxKoN'](getCurrentEnvironment)),console['log'](_0x195924(0x172)+_0x35c35e[_0x195924(0x1aa)](getApiBaseUrl)));console['log'](_0x35c35e[_0x195924(0x1ae)]);const _0x3efd59=await _0x35c35e[_0x195924(0x19e)](getOpencodePluginStatus);if(_0x3efd59['status']===_0x195924(0x1a4))console['log']('\x20\x20'+bold(_0x35c35e['LePVg'])+_0x195924(0x16c)),_0x3efd59[_0x195924(0x190)]&&console['log']('\x20\x20'+_0x3efd59['details']);else _0x3efd59['status']===_0x35c35e[_0x195924(0x1a7)]?(console['log'](_0x35c35e[_0x195924(0x1be)]),_0x3efd59[_0x195924(0x190)]&&console[_0x195924(0x1a5)]('\x20\x20'+_0x3efd59['details']),console['log'](_0x35c35e[_0x195924(0x19b)])):console['log'](_0x35c35e[_0x195924(0x186)]);console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x2c3373=await _0x35c35e[_0x195924(0x19c)](getPluginInfo,_0x35c35e[_0x195924(0x173)]);if(_0x2c3373){const _0x4d7bfa=_0x2c3373[_0x195924(0x1b0)]||_0x195924(0x16e),_0x5c3ad2=_0x2c3373['enabled']?_0x35c35e['TsGLh']:'disabled';console[_0x195924(0x1a5)]('\x20\x20'+_0x35c35e['TyKMq'](bold,_0x195924(0x1cc))+_0x195924(0x1af)+_0x4d7bfa+',\x20'+_0x5c3ad2+')');}else console['log'](_0x35c35e['NiVng']),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console['log'](_0x35c35e['ytmvO']);const {project:_0x6c8a8d,user:_0x2e70d1}=await getInstalledSkills(),_0x3232f3=_0x6c8a8d[_0x195924(0x185)](_0x400af7=>RANGER_MANAGED_SKILLS['includes'](_0x400af7['name'])),_0x21f87d=_0x2e70d1[_0x195924(0x185)](_0x5ea5bc=>RANGER_MANAGED_SKILLS['includes'](_0x5ea5bc[_0x195924(0x1cb)])),_0x2d76a0=_0x3232f3[_0x195924(0x17f)]+_0x21f87d[_0x195924(0x17f)];if(_0x2d76a0===0x0)console['log'](_0x35c35e['eUrrZ']),console['log'](_0x195924(0x1b9));else{if(_0x35c35e[_0x195924(0x177)](_0x3232f3[_0x195924(0x17f)],0x0)){console[_0x195924(0x1a5)](_0x35c35e['fttzu']);for(const _0x35423f of _0x3232f3){console['log'](_0x195924(0x18c)+bold(_0x35423f['displayName'])+':\x20'+link(_0x35423f[_0x195924(0x17e)],_0x35c35e['LLRUv'](basename,_0x35423f['path'])));}}if(_0x21f87d[_0x195924(0x17f)]>0x0){console['log'](_0x35c35e['jUJOa']);for(const _0x1e3383 of _0x21f87d){console['log']('\x20\x20\x20\x20'+bold(_0x1e3383['displayName'])+':\x20'+link(_0x1e3383['path'],_0x35c35e['TyKMq'](basename,_0x1e3383['path'])));}}}console['log'](_0x35c35e['LObWg']);const {envs:_0x1fa89d,activeEnv:_0x40c0a3}=await _0x35c35e['GgrFR'](getEnvironments);let _0x242c2f=[];if(_0x5191cc)try{_0x242c2f=await _0x35c35e[_0x195924(0x197)](listCloudProfiles);}catch{}const _0x54e0a3=_0x35c35e[_0x195924(0x189)](_0x1fa89d['length'],_0x242c2f['length']);if(_0x35c35e['FFaER'](_0x54e0a3,0x0))console[_0x195924(0x1a5)]('No\x20profiles\x20configured'),console['log']('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{if(_0x54e0a3>0x5){const _0x314a9e=[];_0x35c35e['pAnFz'](_0x242c2f['length'],0x0)&&_0x314a9e['push'](_0x242c2f['length']+'\x20cloud'),_0x35c35e[_0x195924(0x1a8)](_0x1fa89d[_0x195924(0x17f)],0x0)&&_0x314a9e[_0x195924(0x1b2)](_0x1fa89d['length']+'\x20local'),console[_0x195924(0x1a5)](_0x54e0a3+'\x20profiles\x20configured\x20('+_0x314a9e[_0x195924(0x17b)](',\x20')+')'),_0x40c0a3&&console['log'](_0x195924(0x181)+_0x35c35e[_0x195924(0x16d)](bold,_0x40c0a3)),console[_0x195924(0x1a5)]('\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)');}else{for(const _0x480183 of _0x242c2f){const _0x578197=_0x480183[_0x195924(0x1cb)]===_0x40c0a3?'\x20(active)':'';console[_0x195924(0x1a5)]('\x20\x20'+_0x35c35e['vWHuI'](bold,_0x480183[_0x195924(0x1cb)])+_0x195924(0x1c0)+_0x578197);const _0x5d024c=_0x480183[_0x195924(0x171)]?_0x195924(0x1a0)+_0x480183[_0x195924(0x171)]+')':'no\x20session';console[_0x195924(0x1a5)](_0x195924(0x17d)+_0x5d024c);}const _0x67d77=new Set(_0x242c2f['map'](_0x43ab52=>_0x43ab52['name']));for(const _0x38354f of _0x1fa89d){if(_0x67d77['has'](_0x38354f[_0x195924(0x1cb)]))continue;const _0x28dedd=_0x38354f[_0x195924(0x1b4)]?_0x35c35e['htSuR']:'',_0x5f34a0=_0x38354f[_0x195924(0x193)]?_0x35c35e[_0x195924(0x18e)]:_0x38354f[_0x195924(0x183)]?_0x35c35e[_0x195924(0x174)]:_0x35c35e[_0x195924(0x1a2)];console[_0x195924(0x1a5)]('\x20\x20'+_0x35c35e[_0x195924(0x18d)](bold,_0x38354f[_0x195924(0x1cb)])+'\x20[local]'+_0x28dedd),console[_0x195924(0x1a5)](_0x195924(0x165)+_0x5f34a0),_0x38354f[_0x195924(0x170)]!==_0x195924(0x1ad)&&console['log']('\x20\x20\x20\x20Settings:\x20'+_0x35c35e[_0x195924(0x1b6)](link,_0x38354f[_0x195924(0x170)],_0x35c35e[_0x195924(0x16d)](basename,_0x38354f[_0x195924(0x170)])));}if(!_0x40c0a3){console['log'](_0x195924(0x1bf));const _0x3a01fa=[..._0x242c2f[_0x195924(0x1b8)](_0x4031fe=>_0x4031fe['name']),..._0x1fa89d[_0x195924(0x185)](_0x24df84=>!_0x67d77['has'](_0x24df84['name']))['map'](_0x3f13f=>_0x3f13f[_0x195924(0x1cb)])];console[_0x195924(0x1a5)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x3a01fa[_0x195924(0x17b)](',\x20')+')');}}}console['log']('');}