@ranger-testing/ranger-cli 3.0.1-alpha.ffffb5b-28 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -0
  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 -0
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/sessionCache.js +1 -1
  71. package/build/commands/utils/settings.js +1 -1
  72. package/build/commands/utils/skillContent.js +1 -1
  73. package/build/commands/utils/skills.js +1 -1
  74. package/build/commands/utils/stitchWebmFiles.js +1 -1
  75. package/build/commands/utils/telemetry.js +1 -1
  76. package/build/commands/utils/tokenRefresh.js +1 -1
  77. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  78. package/build/commands/utils/tunnelClient.js +1 -0
  79. package/build/commands/utils/userApi.js +1 -1
  80. package/build/commands/utils/version.js +1 -1
  81. package/build/commands/verifyFeature.js +1 -1
  82. package/build/commands/verifyFeatureCli.js +1 -1
  83. package/build/commands/verifyFeatureNovaCli.js +1 -1
  84. package/build/commands/verifyFeatureRangerwrightCli.js +1 -0
  85. package/package.json +4 -1
@@ -1 +1 @@
1
- (function(_0x5a7edc,_0x16dcdb){const _0x442d50=_0xb4e6,_0x52d138=_0x5a7edc();while(!![]){try{const _0x54c05b=-parseInt(_0x442d50(0x1a9))/0x1*(parseInt(_0x442d50(0x1ab))/0x2)+parseInt(_0x442d50(0x1ac))/0x3+-parseInt(_0x442d50(0x1a6))/0x4*(parseInt(_0x442d50(0x1a7))/0x5)+parseInt(_0x442d50(0x1a8))/0x6+-parseInt(_0x442d50(0x1ae))/0x7+-parseInt(_0x442d50(0x1a5))/0x8+parseInt(_0x442d50(0x1a1))/0x9;if(_0x54c05b===_0x16dcdb)break;else _0x52d138['push'](_0x52d138['shift']());}catch(_0x5207ff){_0x52d138['push'](_0x52d138['shift']());}}}(_0x5d05,0x1c6f3));function _0x5d05(){const _0x2f7df7=['log','1567048hImKiR','580OkjMJK','1870rqEHJR','1037028sCtgcw','20chYqeE','Xmzpv','1146fkAPsp','6471IDzayr','\x0a✅\x20API\x20key\x20stored\x20successfully','595812hpZWOL','organizationName','MgASk','2593431ArYTUY','ysEJD','message'];_0x5d05=function(){return _0x2f7df7;};return _0x5d05();}import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0xb4e6(_0x507982,_0x15547d){_0x507982=_0x507982-0x1a0;const _0x5d05c5=_0x5d05();let _0xb4e6c6=_0x5d05c5[_0x507982];return _0xb4e6c6;}export async function login(){const _0x82fc2f=_0xb4e6,_0x32000b={'Xmzpv':function(_0x4ed462){return _0x4ed462();},'ysEJD':function(_0x46bef2,_0x36735d){return _0x46bef2(_0x36735d);},'MgASk':function(_0x1fbfe7,_0xf69e60){return _0x1fbfe7 instanceof _0xf69e60;}},_0x576889=await _0x32000b[_0x82fc2f(0x1aa)](getMcpAuthOrigin);if(_0x576889){console['log']('Re-authenticating\x20via\x20MCP\x20bootstrap...'),await mcpBootstrap();return;}if(!_0x32000b[_0x82fc2f(0x1aa)](isInteractive))throw new Error('Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.');try{const _0x194ad4=await runDeviceAuthFlow(),_0x3e1690=await _0x32000b[_0x82fc2f(0x1a2)](getCurrentUser,_0x194ad4);_0x3e1690['success']?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x3e1690['user'][_0x82fc2f(0x1af)]):console[_0x82fc2f(0x1a4)](_0x82fc2f(0x1ad));}catch(_0x5df24f){throw new Error('Login\x20failed:\x20'+(_0x32000b[_0x82fc2f(0x1a0)](_0x5df24f,Error)?_0x5df24f[_0x82fc2f(0x1a3)]:_0x5df24f));}}
1
+ function _0x1e60(_0x5e08b4,_0x50e590){_0x5e08b4=_0x5e08b4-0x19c;const _0x4ea17b=_0x4ea1();let _0x1e609f=_0x4ea17b[_0x5e08b4];return _0x1e609f;}(function(_0x18e44d,_0x5645a3){const _0x44ea06=_0x1e60,_0x305916=_0x18e44d();while(!![]){try{const _0x1b0d54=-parseInt(_0x44ea06(0x1a8))/0x1*(-parseInt(_0x44ea06(0x1ab))/0x2)+parseInt(_0x44ea06(0x1aa))/0x3*(parseInt(_0x44ea06(0x1a4))/0x4)+parseInt(_0x44ea06(0x19e))/0x5*(-parseInt(_0x44ea06(0x1a9))/0x6)+-parseInt(_0x44ea06(0x19f))/0x7+-parseInt(_0x44ea06(0x1a1))/0x8+-parseInt(_0x44ea06(0x1a2))/0x9+parseInt(_0x44ea06(0x19d))/0xa;if(_0x1b0d54===_0x5645a3)break;else _0x305916['push'](_0x305916['shift']());}catch(_0x1f3f8b){_0x305916['push'](_0x305916['shift']());}}}(_0x4ea1,0xd230d));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x4ea1(){const _0x5d29c8=['Re-authenticating\x20via\x20MCP\x20bootstrap...','\x0a✅\x20API\x20key\x20stored\x20successfully','3968vfOeUK','12ZorcOF','11241oIrEAh','316xGohjt','user','29888230JHuQpG','1672740uhQyNG','7853027EjiUFf','vcyTU','13469608ucznzJ','3402351WWmizc','YgktG','1172JbijKB','Login\x20failed:\x20'];_0x4ea1=function(){return _0x5d29c8;};return _0x4ea1();}import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0x3a5ccd=_0x1e60,_0x11f243={'vSueR':_0x3a5ccd(0x1a6),'YgktG':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','tTIJZ':function(_0x17f4cc){return _0x17f4cc();},'HGlnx':function(_0x34faba,_0x459071){return _0x34faba(_0x459071);},'vcyTU':_0x3a5ccd(0x1a7),'HsSWD':function(_0x1f9df0,_0x1f5c63){return _0x1f9df0 instanceof _0x1f5c63;}},_0x59bb81=await getMcpAuthOrigin();if(_0x59bb81){console['log'](_0x11f243['vSueR']),await mcpBootstrap();return;}if(!isInteractive())throw new Error(_0x11f243[_0x3a5ccd(0x1a3)]);try{const _0x34f49b=await _0x11f243['tTIJZ'](runDeviceAuthFlow),_0x1aa757=await _0x11f243['HGlnx'](getCurrentUser,_0x34f49b);_0x1aa757['success']?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x1aa757[_0x3a5ccd(0x19c)]['organizationName']):console['log'](_0x11f243[_0x3a5ccd(0x1a0)]);}catch(_0x408fe3){throw new Error(_0x3a5ccd(0x1a5)+(_0x11f243['HsSWD'](_0x408fe3,Error)?_0x408fe3['message']:_0x408fe3));}}
@@ -1 +1 @@
1
- const _0x530b10=_0x5dc1;(function(_0x270c26,_0x2482f3){const _0x4c7ce6=_0x5dc1,_0x2df368=_0x270c26();while(!![]){try{const _0x225079=-parseInt(_0x4c7ce6(0x122))/0x1*(-parseInt(_0x4c7ce6(0xd6))/0x2)+parseInt(_0x4c7ce6(0x12a))/0x3+-parseInt(_0x4c7ce6(0x110))/0x4*(-parseInt(_0x4c7ce6(0x125))/0x5)+-parseInt(_0x4c7ce6(0xeb))/0x6+parseInt(_0x4c7ce6(0xfd))/0x7*(parseInt(_0x4c7ce6(0xb0))/0x8)+-parseInt(_0x4c7ce6(0x118))/0x9+parseInt(_0x4c7ce6(0x11c))/0xa*(-parseInt(_0x4c7ce6(0xfa))/0xb);if(_0x225079===_0x2482f3)break;else _0x2df368['push'](_0x2df368['shift']());}catch(_0x53df1b){_0x2df368['push'](_0x2df368['shift']());}}}(_0x2e1b,0x755e0));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(),_0x530b10(0x114),'mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),'.ranger','auth-origin.txt');export async function getMcpAuthOrigin(){const _0x47f09d=_0x530b10,_0x427d41={'YYazz':'utf-8','tuaZl':function(_0x5bac57,_0x2693b5){return _0x5bac57||_0x2693b5;}};try{const _0x6802ea=(await readFile(AUTH_ORIGIN_PATH,_0x427d41['YYazz']))[_0x47f09d(0xa3)]();return _0x427d41['tuaZl'](_0x6802ea,null);}catch{return null;}}export async function mcpBootstrap(){const _0xe1ae0c=_0x530b10,_0x42bf20={'yajPw':function(_0x558593,_0x340ee0){return _0x558593(_0x340ee0);},'iKAHl':function(_0x2c675e){return _0x2c675e();},'NQCAM':function(_0xe637a7,_0x59b868){return _0xe637a7+_0x59b868;},'fmrXN':'MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','CYxNU':function(_0x29388a,_0x2d3de3,_0x200cc3){return _0x29388a(_0x2d3de3,_0x200cc3);}},_0x1e4941=getMcpAuthUrl();currentOrigin=_0x1e4941;const _0x49839a=process['stdout']['isTTY']??![];console['log'](_0xe1ae0c(0xed)+_0x1e4941+'\x0a');const _0x52aef8=await _0x42bf20['yajPw'](tryUnauthenticated,_0x1e4941);let _0x176769=null;if(_0x52aef8===_0xe1ae0c(0x121))_0x176769='';else{_0x176769=await _0x42bf20['iKAHl'](loadCachedToken);if(!_0x176769){if(!_0x49839a)throw new Error(_0x42bf20['NQCAM'](_0x42bf20[_0xe1ae0c(0x10c)],_0xe1ae0c(0x107)));_0x176769=await _0x42bf20[_0xe1ae0c(0xe3)](oauthFlow,_0x1e4941);}}await _0x42bf20[_0xe1ae0c(0x9f)](callGetCliToken,_0x1e4941,_0x176769);}function _0x2e1b(){const _0x4f4a81=['/.well-known/oauth-protected-resource','url','close','client_id','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','yajPw','state','base64url','error','UhLjW','get','sytvs','cUACs','893820wnLZUJ','isError','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','Initializing\x20MCP\x20session...','startsWith','OIJmw','log','origin','UuHGR','status','pathname','refresh_token','Token\x20exchange\x20failed:\x20','iwMJX','Exchanging\x20authorization\x20code...','12860441ALMfcz','application/json,\x20text/event-stream','mZLon','604170RrFgZq','get_cli_token\x20failed:\x20','OGedG','DPGDS','BQVms','2.0','aOddD','ydnCA','end','MCP\x20initialize\x20failed:\x20','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','expires_in','token','ZPMNx','gpMad','fmrXN','qpzwQ','flqRP','Yoojg','1268876rvJMho','registration_endpoint','\x20done','FgWgd','.ranger','code','headers','yxzSj','4423959VVKhqO','CWjIH','zOFoh','uvuvt','10wiaIGd','Registering\x20OAuth\x20client...','2025-03-26','string','aVLax','proxied','411RfBONH','UPnOH','needs-oauth','10UdzApF','POST','xdg-open','toString','structuredContent','1003755NvUSYR','utf-8','length','listen','RwivN','\x0aOpening\x20browser\x20for\x20authentication...','VjwaW','access_token','\x0aToken\x20written\x20to\x20','CYxNU','update','Requesting\x20CLI\x20token...','NeDQW','trim','HTTP\x20','text','write','/callback','vKBlj','xJlNS','clientId','now','json','match','1.0.0','expiresAt','88qNwElw','slice','writeHead','text/html','CYHbr','data:','authorization_servers','Qmptu','127.0.0.1','clientSecret','content','includes','redirect_uri','notifications/initialized','resource','parse','token_endpoint','searchParams','CdVZi','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','replace','initialize','darwin','stdout','stringify','VCBUn','none','message','ranger-cli','\x0aUnexpected\x20response\x20structure:','authorization_code','name','http://localhost:','set','faOpt','Qfbcu','digest','code_challenge_method','1810kCXEjN','text/event-stream','uxhWC','uYCdo','kGQfH','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','sha256','No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata'];_0x2e1b=function(){return _0x4f4a81;};return _0x2e1b();}function _0x5dc1(_0x43ae25,_0x247cf8){_0x43ae25=_0x43ae25-0x9b;const _0x2e1bf2=_0x2e1b();let _0x5dc12b=_0x2e1bf2[_0x43ae25];return _0x5dc12b;}async function tryUnauthenticated(_0x19a120){const _0x277099=_0x530b10,_0x44396b={'gpncf':'POST','pMkcS':_0x277099(0xfb),'ydnCA':_0x277099(0x11e),'Dhjna':function(_0x3839dd,_0x4a29a6){return _0x3839dd===_0x4a29a6;},'NeDQW':_0x277099(0x124)},_0xaedeae=await fetch(_0x19a120,{'method':_0x44396b['gpncf'],'headers':{'Content-Type':'application/json','Accept':_0x44396b['pMkcS']},'body':JSON['stringify']({'jsonrpc':'2.0','id':0x1,'method':'initialize','params':{'protocolVersion':_0x44396b[_0x277099(0x104)],'capabilities':{},'clientInfo':{'name':_0x277099(0xcc),'version':_0x277099(0xae)}}})});if(_0xaedeae['ok'])return await _0xaedeae[_0x277099(0xa5)](),'proxied';if(_0x44396b['Dhjna'](_0xaedeae[_0x277099(0xf4)],0x191))return await _0xaedeae['text'](),_0x44396b[_0x277099(0xa2)];const _0x42498f=await _0xaedeae['text']();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0xaedeae[_0x277099(0xf4)]+':\x20'+_0x42498f);}class OAuthTimeoutError extends Error{constructor(_0x4700e7){const _0x16062f=_0x530b10;super(_0x4700e7),this[_0x16062f(0xcf)]='OAuthTimeoutError';}}async function oauthFlow(_0x54e94e){const _0x3dac65=_0x530b10,_0x4872a0={'Qmptu':'\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a'};try{return await oauthFlowAttempt(_0x54e94e);}catch(_0x5b7474){if(_0x5b7474 instanceof OAuthTimeoutError&&await loadCachedClient())return console['log'](_0x4872a0[_0x3dac65(0xb7)]),await clearCachedClient(),await oauthFlowAttempt(_0x54e94e);throw _0x5b7474;}}async function oauthFlowAttempt(_0x40eb47){const _0x4096ce=_0x530b10,_0x5d453d={'VnAJl':function(_0x1812dd){return _0x1812dd();},'CYHbr':function(_0x1d7165,_0x5f33c5,_0xcd1148){return _0x1d7165(_0x5f33c5,_0xcd1148);},'yVgMK':'POST','NCmvg':'application/json','RwivN':_0x4096ce(0xce),'uvuvt':'refresh_token','kGQfH':_0x4096ce(0xe5),'UuHGR':_0x4096ce(0xd5),'aVLax':'S256','DPGDS':_0x4096ce(0xe4),'YRGAL':_0x4096ce(0xbe),'DPJqo':function(_0x25fb94,_0x4d3188){return _0x25fb94(_0x4d3188);},'rsgcT':function(_0x53d877,_0x5dac4f){return _0x53d877(_0x5dac4f);},'CWjIH':_0x4096ce(0xf9),'uxhWC':'client_secret','Qfbcu':'application/x-www-form-urlencoded','faOpt':'\x20done','qtGTK':function(_0x240d0f,_0xd73cf0,_0x3b51cd,_0x5248b4){return _0x240d0f(_0xd73cf0,_0x3b51cd,_0x5248b4);}},_0x4afd56=_0x40eb47[_0x4096ce(0xc4)](/\/mcp$/,'');process['stdout']['write']('Discovering\x20authorization\x20server...');const _0x51318b=await fetch(_0x4afd56+_0x4096ce(0xde));if(!_0x51318b['ok'])throw new Error('Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server');const _0x459143=await _0x51318b['json'](),_0x3efa65=_0x459143[_0x4096ce(0xb6)]?.[0x0];if(!_0x3efa65)throw new Error(_0x4096ce(0xdd));console['log']('\x20'+_0x3efa65);const _0x47afea=await fetchAuthServerMetadata(_0x3efa65);let _0x5d8cc7,_0x2d8dd4;const _0x45d6e4=await _0x5d453d['VnAJl'](loadCachedClient);if(_0x45d6e4)_0x5d8cc7=_0x45d6e4['clientId'],_0x2d8dd4=_0x45d6e4[_0x4096ce(0xb9)];else{if(_0x47afea['registration_endpoint']){process[_0x4096ce(0xc7)][_0x4096ce(0xa6)](_0x4096ce(0x11d));const _0x5d3116=await _0x5d453d[_0x4096ce(0xb4)](fetch,_0x47afea[_0x4096ce(0x111)],{'method':_0x5d453d['yVgMK'],'headers':{'Content-Type':_0x5d453d['NCmvg']},'body':JSON['stringify']({'client_name':'Ranger\x20CLI','redirect_uris':[_0x4096ce(0xd0)+CALLBACK_PORT+_0x4096ce(0xa7)],'grant_types':[_0x5d453d['RwivN'],_0x5d453d[_0x4096ce(0x11b)]],'response_types':[_0x4096ce(0x115)],'token_endpoint_auth_method':_0x4096ce(0xca)})});if(!_0x5d3116['ok']){const _0x583f92=await _0x5d3116['text']();throw new Error('Client\x20registration\x20failed:\x20'+_0x583f92);}const _0x329fc1=await _0x5d3116[_0x4096ce(0xac)]();_0x5d8cc7=_0x329fc1[_0x4096ce(0xe1)],_0x2d8dd4=_0x329fc1['client_secret'],await saveCachedClient(_0x5d8cc7,_0x2d8dd4),console[_0x4096ce(0xf1)](_0x4096ce(0x112));}else throw new Error(_0x4096ce(0xc3));}const _0x12868d=randomBytes(0x20)['toString']('base64url'),_0x5b440e=createHash(_0x4096ce(0xdc))[_0x4096ce(0xa0)](_0x12868d)[_0x4096ce(0xd4)](_0x5d453d[_0x4096ce(0xda)]),_0x27afa4=randomBytes(0x10)[_0x4096ce(0x128)]('hex'),_0x1b9ffe=new URL(_0x47afea['authorization_endpoint']);_0x1b9ffe['searchParams']['set']('response_type','code'),_0x1b9ffe[_0x4096ce(0xc1)]['set'](_0x4096ce(0xe1),_0x5d8cc7),_0x1b9ffe['searchParams'][_0x4096ce(0xd1)](_0x4096ce(0xbc),'http://localhost:'+CALLBACK_PORT+'/callback'),_0x1b9ffe['searchParams'][_0x4096ce(0xd1)]('code_challenge',_0x5b440e),_0x1b9ffe[_0x4096ce(0xc1)]['set'](_0x5d453d[_0x4096ce(0xf3)],_0x5d453d[_0x4096ce(0x120)]),_0x1b9ffe[_0x4096ce(0xc1)][_0x4096ce(0xd1)](_0x5d453d[_0x4096ce(0x100)],_0x27afa4);_0x459143[_0x4096ce(0xbe)]&&_0x1b9ffe[_0x4096ce(0xc1)]['set'](_0x5d453d['YRGAL'],_0x459143['resource']);console[_0x4096ce(0xf1)](_0x4096ce(0x9b)),console['log'](_0x4096ce(0xe2)+_0x1b9ffe[_0x4096ce(0x128)]()+'\x0a'),await _0x5d453d['DPJqo'](openBrowser,_0x1b9ffe['toString']());const _0x34533b=await _0x5d453d['rsgcT'](waitForCallback,_0x27afa4);process['stdout'][_0x4096ce(0xa6)](_0x5d453d[_0x4096ce(0x119)]);const _0x421a93=new URLSearchParams({'grant_type':_0x5d453d[_0x4096ce(0x12e)],'code':_0x34533b,'redirect_uri':'http://localhost:'+CALLBACK_PORT+'/callback','client_id':_0x5d8cc7,'code_verifier':_0x12868d});_0x2d8dd4&&_0x421a93['set'](_0x5d453d[_0x4096ce(0xd8)],_0x2d8dd4);_0x459143[_0x4096ce(0xbe)]&&_0x421a93[_0x4096ce(0xd1)]('resource',_0x459143[_0x4096ce(0xbe)]);const _0xa35a49=await _0x5d453d['CYHbr'](fetch,_0x47afea[_0x4096ce(0xc0)],{'method':'POST','headers':{'Content-Type':_0x5d453d[_0x4096ce(0xd3)]},'body':_0x421a93});if(!_0xa35a49['ok']){const _0x102276=await _0xa35a49['text']();throw new Error(_0x4096ce(0xf7)+_0x102276);}const _0x5b013b=await _0xa35a49[_0x4096ce(0xac)]();return console['log'](_0x5d453d[_0x4096ce(0xd2)]),await _0x5d453d['qtGTK'](saveCachedToken,_0x5b013b[_0x4096ce(0x9d)],_0x5b013b[_0x4096ce(0xf6)],_0x5b013b[_0x4096ce(0x108)]),_0x5b013b[_0x4096ce(0x9d)];}async function callGetCliToken(_0x2f3783,_0x214404){const _0x163056=_0x530b10,_0x1d7aba={'zOFoh':function(_0x3c79fb,_0x31c0ab){return _0x3c79fb(_0x31c0ab);},'StFFk':'application/json','sytvs':'application/json,\x20text/event-stream','UhLjW':'Authorization','mETke':_0x163056(0xee),'MdBLh':_0x163056(0x102),'xJlNS':_0x163056(0xc5),'vSVRW':_0x163056(0xae),'igbVU':_0x163056(0x112),'iwMJX':function(_0x12533c,_0x613d56,_0x5029a2){return _0x12533c(_0x613d56,_0x5029a2);},'QfIMV':_0x163056(0x126),'cUACs':_0x163056(0xa1),'kOvWb':'tools/call','gpMad':function(_0x7ff7be,_0x47d5f5){return _0x7ff7be(_0x47d5f5);},'IubIf':'Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','tkFuu':function(_0x594931){return _0x594931();},'flqRP':function(_0x47c0c9,_0x24f78c,_0x190b81,_0x45854e){return _0x47c0c9(_0x24f78c,_0x190b81,_0x45854e);},'IFUen':'Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a'},_0x5671d2={'Content-Type':_0x1d7aba['StFFk'],'Accept':_0x1d7aba[_0x163056(0xe9)]};_0x214404&&(_0x5671d2[_0x1d7aba[_0x163056(0xe7)]]='Bearer\x20'+_0x214404);const _0x1f575b=async _0x4512b2=>{const _0x5c1a5d=_0x163056,_0x5e38df=await fetch(_0x2f3783,{'method':_0x5c1a5d(0x126),'headers':_0x5671d2,'body':JSON[_0x5c1a5d(0xc8)](_0x4512b2)});if(!_0x5e38df['ok']){const _0x2deeb3=await _0x5e38df[_0x5c1a5d(0xa5)]();throw new Error(_0x5c1a5d(0xa4)+_0x5e38df[_0x5c1a5d(0xf4)]+':\x20'+_0x2deeb3);}return _0x1d7aba[_0x5c1a5d(0x11a)](parseResponse,_0x5e38df);};process[_0x163056(0xc7)]['write'](_0x1d7aba['mETke']);const _0x40c278=await _0x1f575b({'jsonrpc':_0x1d7aba['MdBLh'],'id':0x1,'method':_0x1d7aba[_0x163056(0xa9)],'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x163056(0xcc),'version':_0x1d7aba['vSVRW']}}});if(_0x40c278['error'])throw new Error(_0x163056(0x106)+(_0x40c278[_0x163056(0xe6)][_0x163056(0xcb)]??JSON[_0x163056(0xc8)](_0x40c278[_0x163056(0xe6)])));console['log'](_0x1d7aba['igbVU']),await _0x1d7aba[_0x163056(0xf8)](fetch,_0x2f3783,{'method':_0x1d7aba['QfIMV'],'headers':_0x5671d2,'body':JSON[_0x163056(0xc8)]({'jsonrpc':'2.0','method':_0x163056(0xbd)})})['then'](_0xd2728b=>_0xd2728b[_0x163056(0xa5)]()),process['stdout'][_0x163056(0xa6)](_0x1d7aba[_0x163056(0xea)]);const _0x303447=await _0x1f575b({'jsonrpc':_0x163056(0x102),'id':0x2,'method':_0x1d7aba['kOvWb'],'params':{'name':'get_cli_token','arguments':{}}});if(_0x303447[_0x163056(0xe6)])throw new Error(_0x163056(0xfe)+(_0x303447['error'][_0x163056(0xcb)]??JSON['stringify'](_0x303447['error'])));console[_0x163056(0xf1)](_0x1d7aba['igbVU']);const _0x48cc8e=_0x1d7aba[_0x163056(0x10b)](extractToken,_0x303447['result']);if(!_0x48cc8e){console[_0x163056(0xe6)](_0x163056(0xcd)),console[_0x163056(0xe6)](JSON['stringify'](_0x303447['result'],null,0x2));throw new Error(_0x1d7aba['IubIf']);}const _0xd9ae96=join(_0x1d7aba['tkFuu'](homedir),_0x163056(0x114)),_0x1639ef=_0x1d7aba['iwMJX'](join,_0xd9ae96,'refresh.txt');await mkdir(_0xd9ae96,{'recursive':!![]}),await _0x1d7aba['flqRP'](writeFile,_0x1639ef,_0x48cc8e,{'mode':0x180}),await _0x1d7aba[_0x163056(0x10e)](writeFile,join(_0xd9ae96,'auth-origin.txt'),_0x2f3783,{'mode':0x180}),console[_0x163056(0xf1)](_0x163056(0x9e)+_0x1639ef),console['log'](_0x1d7aba['IFUen']);}async function fetchAuthServerMetadata(_0x3ad8a8){const _0x4ca1c7=_0x530b10,_0x3479aa=_0x3ad8a8+'/.well-known/oauth-authorization-server',_0x175134=await fetch(_0x3479aa);if(!_0x175134['ok'])throw new Error(_0x4ca1c7(0xdb)+_0x3479aa+':\x20'+_0x175134[_0x4ca1c7(0xf4)]);return _0x175134[_0x4ca1c7(0xac)]();}function waitForCallback(_0x506077){const _0x3d2584=_0x530b10,_0xbbf426={'DAQRh':function(_0x180aff){return _0x180aff();},'ftKEJ':_0x3d2584(0xa7),'zLwaa':'error','BQVms':function(_0x3502e2,_0x157b19){return _0x3502e2(_0x157b19);},'zpFRO':'text/html','FgWgd':'<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','VsWmz':_0x3d2584(0xb8)};return new Promise((_0x4e212a,_0x2c7152)=>{const _0x4faec5=_0x3d2584,_0x28ad13={'KttTl':function(_0x5801cd){return _0xbbf426['DAQRh'](_0x5801cd);},'qpzwQ':function(_0x5a10d9,_0x3cb7fd){return _0x5a10d9!==_0x3cb7fd;},'VjwaW':_0xbbf426['ftKEJ'],'bOIdp':'Not\x20found','ZPMNx':_0xbbf426['zLwaa'],'TmLQr':function(_0x1829b0,_0x3b6896){const _0x24b569=_0x5dc1;return _0xbbf426[_0x24b569(0x101)](_0x1829b0,_0x3b6896);},'VXHUb':function(_0x458a69){return _0x458a69();},'vKBlj':_0xbbf426['zpFRO'],'yxzSj':_0xbbf426[_0x4faec5(0x113)],'rZFlC':function(_0x1c8dfa,_0x5785c0){return _0x1c8dfa(_0x5785c0);}},_0x4ad5f8=()=>{const _0x5ad6f0=_0x4faec5;_0x54a58c['closeAllConnections'](),_0x54a58c[_0x5ad6f0(0xe0)]();},_0x39b4b8=setTimeout(()=>{_0x28ad13['KttTl'](_0x4ad5f8),_0x2c7152(new OAuthTimeoutError('OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes'));},0x1d4c0),_0x54a58c=_0xbbf426['BQVms'](createServer,(_0x131cbe,_0x2a340d)=>{const _0x76d9c1=_0x4faec5,_0x5b95e2=new URL(_0x131cbe[_0x76d9c1(0xdf)]??'/','http://localhost:'+CALLBACK_PORT);if(_0x28ad13[_0x76d9c1(0x10d)](_0x5b95e2[_0x76d9c1(0xf5)],_0x28ad13[_0x76d9c1(0x9c)])){_0x2a340d[_0x76d9c1(0xb2)](0x194),_0x2a340d[_0x76d9c1(0x105)](_0x28ad13['bOIdp']);return;}const _0xfc928b=_0x5b95e2[_0x76d9c1(0xc1)][_0x76d9c1(0xe8)]('code'),_0x115e36=_0x5b95e2['searchParams']['get'](_0x76d9c1(0xe4)),_0xaa3f04=_0x5b95e2['searchParams']['get'](_0x28ad13[_0x76d9c1(0x10a)]);if(_0xaa3f04){const _0x25ba43=_0x5b95e2['searchParams'][_0x76d9c1(0xe8)]('error_description')??_0xaa3f04;_0x2a340d['writeHead'](0xc8,{'Content-Type':_0x76d9c1(0xb3)}),_0x2a340d[_0x76d9c1(0x105)]('<html><body><h2>Authentication\x20failed</h2><p>'+_0x25ba43+'</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>'),_0x28ad13['TmLQr'](clearTimeout,_0x39b4b8),_0x28ad13['VXHUb'](_0x4ad5f8),_0x2c7152(new Error('OAuth\x20error:\x20'+_0x25ba43));return;}if(!_0xfc928b||_0x28ad13[_0x76d9c1(0x10d)](_0x115e36,_0x506077)){_0x2a340d['writeHead'](0x190,{'Content-Type':_0x28ad13[_0x76d9c1(0xa8)]}),_0x2a340d[_0x76d9c1(0x105)]('<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>');return;}_0x2a340d['writeHead'](0xc8,{'Content-Type':_0x28ad13['vKBlj']}),_0x2a340d[_0x76d9c1(0x105)](_0x28ad13[_0x76d9c1(0x117)]),_0x28ad13['rZFlC'](clearTimeout,_0x39b4b8),_0x4ad5f8(),_0x4e212a(_0xfc928b);});_0x54a58c[_0x4faec5(0x12d)](CALLBACK_PORT,_0xbbf426['VsWmz']);});}async function openBrowser(_0x56d8c2){const _0x36332d=_0x530b10,_0x453c48={'vafYl':'win32'},_0x19c18c=process['platform']===_0x36332d(0xc6)?'open':process['platform']===_0x453c48['vafYl']?'start':_0x36332d(0x127);exec(_0x19c18c+'\x20\x22'+_0x56d8c2+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x50661c=_0x530b10,_0x332210={'CdVZi':function(_0x23ac4e,_0x15272c,_0xd5c003){return _0x23ac4e(_0x15272c,_0xd5c003);},'naCPg':'utf-8'};try{const _0x59020c=JSON[_0x50661c(0xbf)](await _0x332210[_0x50661c(0xc2)](readFile,TOKEN_CACHE_PATH,_0x332210['naCPg']));if(_0x59020c['origin']&&_0x59020c['origin']!==currentOrigin)return null;if(_0x59020c['expiresAt']&&Date[_0x50661c(0xab)]()>_0x59020c[_0x50661c(0xaf)])return null;return _0x59020c['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x488e65,_0x2b014d,_0xe3f1c6){const _0x46acd6=_0x530b10,_0x3106b1={'OIJmw':function(_0x5906fe){return _0x5906fe();}},_0x4d19a1=await _0x3106b1[_0x46acd6(0xf0)](loadCachedData),_0x4e481e={..._0x4d19a1,'origin':currentOrigin,'accessToken':_0x488e65,'refreshToken':_0x2b014d??_0x4d19a1?.['refreshToken'],'expiresAt':_0xe3f1c6?Date['now']()+_0xe3f1c6*0x3e8:undefined};await mkdir(join(homedir(),_0x46acd6(0x114)),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x4e481e),{'mode':0x180});}async function loadCachedClient(){const _0x3705b0=_0x530b10,_0xaa275b={'UQoxD':function(_0x5647b3){return _0x5647b3();},'aOddD':function(_0x36f8ef,_0x171837){return _0x36f8ef!==_0x171837;}},_0x4f9df7=await _0xaa275b['UQoxD'](loadCachedData);if(_0x4f9df7?.[_0x3705b0(0xf2)]&&_0xaa275b[_0x3705b0(0x103)](_0x4f9df7['origin'],currentOrigin))return null;return _0x4f9df7?.[_0x3705b0(0xaa)]?{'clientId':_0x4f9df7['clientId'],'clientSecret':_0x4f9df7['clientSecret']}:null;}async function clearCachedClient(){const _0x51c97d=_0x530b10,_0x2a7ce6={'Mrvsi':function(_0x38d2db){return _0x38d2db();}},_0x3a48e9=await _0x2a7ce6['Mrvsi'](loadCachedData);if(!_0x3a48e9)return;const {clientId:_0x2760d7,clientSecret:_0x5eb1ea,..._0x483d8b}=_0x3a48e9;await writeFile(TOKEN_CACHE_PATH,JSON[_0x51c97d(0xc8)](_0x483d8b),{'mode':0x180});}async function saveCachedClient(_0x7f266,_0x1b2c01){const _0x47c235=_0x530b10,_0x1ed429={'IEnol':function(_0xd80f6c){return _0xd80f6c();},'UPnOH':function(_0x1d39df,_0x243c0e,_0x1912fe){return _0x1d39df(_0x243c0e,_0x1912fe);},'bdGgn':function(_0x33cebf,_0x2d80cc,_0x3bf408){return _0x33cebf(_0x2d80cc,_0x3bf408);},'VCBUn':function(_0x3df4aa){return _0x3df4aa();},'mZLon':'.ranger'},_0x19d126=await _0x1ed429['IEnol'](loadCachedData),_0x580575={..._0x19d126,'origin':currentOrigin,'accessToken':_0x19d126?.['accessToken']??'','clientId':_0x7f266,'clientSecret':_0x1b2c01};await _0x1ed429[_0x47c235(0x123)](mkdir,_0x1ed429['bdGgn'](join,_0x1ed429[_0x47c235(0xc9)](homedir),_0x1ed429[_0x47c235(0xfc)]),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON[_0x47c235(0xc8)](_0x580575),{'mode':0x180});}async function loadCachedData(){const _0x3c1978=_0x530b10,_0x132bda={'uYCdo':function(_0x355964,_0x4a68d5,_0x22d1af){return _0x355964(_0x4a68d5,_0x22d1af);}};try{return JSON['parse'](await _0x132bda[_0x3c1978(0xd9)](readFile,TOKEN_CACHE_PATH,_0x3c1978(0x12b)));}catch{return null;}}async function parseResponse(_0x180647){const _0x2f4568=_0x530b10,_0x20f215={'oKwbN':_0x2f4568(0xd7),'isBDD':_0x2f4568(0xb5),'OGedG':function(_0x2e82a8,_0x54a8e7){return _0x2e82a8!==_0x54a8e7;}},_0xa879ab=_0x180647[_0x2f4568(0x116)][_0x2f4568(0xe8)]('content-type')??'';if(_0xa879ab[_0x2f4568(0xbb)](_0x20f215['oKwbN'])){const _0xc1e20d=await _0x180647[_0x2f4568(0xa5)]();for(const _0x37319b of _0xc1e20d['split']('\x0a')){const _0xb3be2b=_0x37319b['trim']();if(_0xb3be2b[_0x2f4568(0xef)](_0x20f215['isBDD'])){const _0x49c404=_0xb3be2b[_0x2f4568(0xb1)]('data:'[_0x2f4568(0x12c)])['trim']();if(!_0x49c404)continue;try{const _0x13e5c9=JSON['parse'](_0x49c404);if(_0x20f215[_0x2f4568(0xff)](_0x13e5c9['id'],undefined)||_0x13e5c9[_0x2f4568(0xe6)])return _0x13e5c9;}catch{}}}throw new Error('No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream');}return _0x180647[_0x2f4568(0xac)]();}function extractToken(_0x557c5c){const _0x5d3e90=_0x530b10,_0x8fbd3c={'bjrGQ':'Unknown\x20error','Yoojg':function(_0xd218ad,_0x34cf78){return _0xd218ad===_0x34cf78;},'Svmkw':_0x5d3e90(0x11f)};if(!_0x557c5c)return null;const _0x6ec253=_0x557c5c[_0x5d3e90(0x129)];if(_0x6ec253?.['token']&&typeof _0x6ec253[_0x5d3e90(0x109)]===_0x5d3e90(0x11f))return _0x6ec253['token'];if(_0x557c5c[_0x5d3e90(0xec)]){const _0x332c75=_0x557c5c['content'];throw new Error('Server\x20returned\x20error:\x20'+(_0x332c75?.[0x0]?.['text']??_0x8fbd3c['bjrGQ']));}const _0xad464f=_0x557c5c[_0x5d3e90(0xba)];if(_0xad464f)for(const _0x4b7646 of _0xad464f){if(_0x8fbd3c[_0x5d3e90(0x10f)](_0x4b7646['type'],'text')&&_0x4b7646[_0x5d3e90(0xa5)]){try{const _0x4e062c=JSON['parse'](_0x4b7646[_0x5d3e90(0xa5)]);if(typeof _0x4e062c?.['token']===_0x8fbd3c['Svmkw'])return _0x4e062c['token'];}catch{}const _0xd0d45d=_0x4b7646[_0x5d3e90(0xa5)][_0x5d3e90(0xad)](/(rngr_[A-Za-z0-9_-]+)/);if(_0xd0d45d)return _0xd0d45d[0x1];}}return null;}
1
+ const _0x481865=_0xb0f8;(function(_0x3c88a3,_0x139728){const _0x41f235=_0xb0f8,_0x1339d8=_0x3c88a3();while(!![]){try{const _0x12c4b0=-parseInt(_0x41f235(0x1c2))/0x1+-parseInt(_0x41f235(0x18d))/0x2+-parseInt(_0x41f235(0x1e4))/0x3*(-parseInt(_0x41f235(0x176))/0x4)+-parseInt(_0x41f235(0x181))/0x5+-parseInt(_0x41f235(0x196))/0x6+parseInt(_0x41f235(0x19a))/0x7*(parseInt(_0x41f235(0x16a))/0x8)+parseInt(_0x41f235(0x1c6))/0x9;if(_0x12c4b0===_0x139728)break;else _0x1339d8['push'](_0x1339d8['shift']());}catch(_0x28fd9f){_0x1339d8['push'](_0x1339d8['shift']());}}}(_0x29fc,0x30470));import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createServer}from'http';import{randomBytes,createHash}from'crypto';import{exec}from'child_process';import{getMcpAuthUrl}from'./utils/environment.js';const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),'.ranger',_0x481865(0x159)),AUTH_ORIGIN_PATH=join(homedir(),_0x481865(0x1ac),_0x481865(0x1ab));export async function getMcpAuthOrigin(){const _0x284daf=_0x481865;try{const _0x41c7aa=(await readFile(AUTH_ORIGIN_PATH,'utf-8'))[_0x284daf(0x17b)]();return _0x41c7aa||null;}catch{return null;}}export async function mcpBootstrap(){const _0xd1b0a1=_0x481865,_0x7d0097={'ddrhU':function(_0x2d20da){return _0x2d20da();},'PaINh':function(_0x578131,_0x10bce1){return _0x578131(_0x10bce1);},'UinUz':function(_0x42c7f2,_0x2fb9b4){return _0x42c7f2===_0x2fb9b4;},'hMLyv':'proxied','GoWJS':function(_0xffa10d){return _0xffa10d();},'ShlCL':'MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','tNtdd':'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','eqVCi':function(_0x219dea,_0x161322,_0x15bef7){return _0x219dea(_0x161322,_0x15bef7);}},_0x2edc93=_0x7d0097[_0xd1b0a1(0x167)](getMcpAuthUrl);currentOrigin=_0x2edc93;const _0x1ad6a7=process['stdout']['isTTY']??![];console[_0xd1b0a1(0x1df)](_0xd1b0a1(0x1d3)+_0x2edc93+'\x0a');const _0x10c5c8=await _0x7d0097['PaINh'](tryUnauthenticated,_0x2edc93);let _0x838c96=null;if(_0x7d0097['UinUz'](_0x10c5c8,_0x7d0097['hMLyv']))_0x838c96='';else{_0x838c96=await _0x7d0097[_0xd1b0a1(0x1d4)](loadCachedToken);if(!_0x838c96){if(!_0x1ad6a7)throw new Error(_0x7d0097[_0xd1b0a1(0x1d5)]+_0x7d0097[_0xd1b0a1(0x199)]);_0x838c96=await _0x7d0097[_0xd1b0a1(0x17a)](oauthFlow,_0x2edc93);}}await _0x7d0097[_0xd1b0a1(0x1dd)](callGetCliToken,_0x2edc93,_0x838c96);}async function tryUnauthenticated(_0x3a232e){const _0x1e90d3=_0x481865,_0x3c605f={'SgifR':_0x1e90d3(0x1c9),'qiGxw':_0x1e90d3(0x155),'oDUXf':_0x1e90d3(0x194),'PIsxJ':_0x1e90d3(0x1b2),'JHmHM':'1.0.0','pGfIg':_0x1e90d3(0x1cd),'adGvR':_0x1e90d3(0x177)},_0x343aa3=await fetch(_0x3a232e,{'method':_0x3c605f[_0x1e90d3(0x174)],'headers':{'Content-Type':'application/json','Accept':_0x3c605f['qiGxw']},'body':JSON[_0x1e90d3(0x18a)]({'jsonrpc':_0x3c605f['oDUXf'],'id':0x1,'method':'initialize','params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x3c605f[_0x1e90d3(0x17e)],'version':_0x3c605f[_0x1e90d3(0x175)]}}})});if(_0x343aa3['ok'])return await _0x343aa3['text'](),_0x3c605f['pGfIg'];if(_0x343aa3[_0x1e90d3(0x1d7)]===0x191)return await _0x343aa3[_0x1e90d3(0x15a)](),_0x3c605f[_0x1e90d3(0x1b7)];const _0x1f276e=await _0x343aa3['text']();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0x343aa3['status']+':\x20'+_0x1f276e);}function _0x29fc(){const _0x23b2d3=['stdout','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','GoWJS','ShlCL','response_type','status','notifications/initialized','http://localhost:','expiresAt','then','split','eqVCi','HTTP\x20','log','Server\x20returned\x20error:\x20','QrjDs','Requesting\x20CLI\x20token...','RoRIV','12JaCwwU','application/json,\x20text/event-stream','\x0aToken\x20written\x20to\x20','darwin','exFNz','mcp-oauth-tokens.json','text','authorization_endpoint','parse','accessToken','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','IokQB','get_cli_token\x20failed:\x20','jGAWt','weKsZ','application/json','ZCXiV','write','error','ddrhU','initialize','code','72SqBBbj','PZroR','type','string','content-type','Unknown\x20error','otwyD','rUGuz','eSHMU','refresh_token','SgifR','JHmHM','24848VredvZ','needs-oauth','127.0.0.1','clientSecret','PaINh','trim','content','SttxF','PIsxJ','MCP\x20initialize\x20failed:\x20','pathname','1003220GHuHNs','Token\x20exchange\x20failed:\x20','lZCSH','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','zpakI','writeHead','token_endpoint','base64url','resource','stringify','client_id','/callback','389144QXnYYC','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','json','tcjAY','application/x-www-form-urlencoded','isError','iPZTE','2.0','lpOGo','2268690ADiHcE','update','now','tNtdd','281687HcehXD','clientId','IDJbA','headers','client_secret','message','win32','IzDWe','redirect_uri','searchParams','AvmzX','Bearer\x20','Not\x20found','xqtVx','listen','text/html','token','auth-origin.txt','.ranger','end','result','expires_in','1.0.0','fKTED','ranger-cli','toString','ncOeN','GVllo','Exchanging\x20authorization\x20code...','adGvR','\x20done','cVlTJ','refresh.txt','MKjoK','JuWQG','closeAllConnections','\x0aOpening\x20browser\x20for\x20authentication...','qqTSo','digest','authorization_code','307083IsbVzP','refreshToken','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','state','8020269ZIFoAy','access_token','ZfGwF','POST','origin','lwxQE','yhxLj','proxied','set','Client\x20registration\x20failed:\x20','WuJBy'];_0x29fc=function(){return _0x23b2d3;};return _0x29fc();}class OAuthTimeoutError extends Error{constructor(_0x50e085){const _0x1c73dd=_0x481865,_0x4c6d13={'exFNz':'OAuthTimeoutError'};super(_0x50e085),this['name']=_0x4c6d13[_0x1c73dd(0x158)];}}async function oauthFlow(_0x36ac27){const _0x2f9c49=_0x481865,_0x37a254={'scujT':function(_0x3c959a,_0x237d2f){return _0x3c959a instanceof _0x237d2f;},'XZUzE':'\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','hOYLL':function(_0x32fcbf){return _0x32fcbf();},'drlcS':function(_0x388c58,_0x12253f){return _0x388c58(_0x12253f);}};try{return await oauthFlowAttempt(_0x36ac27);}catch(_0x481d02){if(_0x37a254['scujT'](_0x481d02,OAuthTimeoutError)&&await loadCachedClient())return console[_0x2f9c49(0x1df)](_0x37a254['XZUzE']),await _0x37a254['hOYLL'](clearCachedClient),await _0x37a254['drlcS'](oauthFlowAttempt,_0x36ac27);throw _0x481d02;}}async function oauthFlowAttempt(_0x24965b){const _0x3a8e99=_0x481865,_0x39b303={'mEcTH':'Discovering\x20authorization\x20server...','GzNvP':'No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','SttxF':function(_0x277808,_0x2bdcd1){return _0x277808(_0x2bdcd1);},'JuWQG':'application/json','otwyD':'Ranger\x20CLI','qqTSo':_0x3a8e99(0x1c1),'WuJBy':'none','SBfqk':function(_0x58d5a0,_0x584286,_0x286d3e){return _0x58d5a0(_0x584286,_0x286d3e);},'lkRyr':_0x3a8e99(0x1b8),'PMfej':'base64url','weKsZ':'sha256','jHJuG':'hex','FJLmA':_0x3a8e99(0x1d6),'rUGuz':_0x3a8e99(0x169),'jGAWt':'state','tzXse':_0x3a8e99(0x1be),'RcRjK':_0x3a8e99(0x1b6),'cNXpe':_0x3a8e99(0x19e),'loWOz':'resource','cVlTJ':function(_0x2aa8b1,_0x213abc,_0x40790c){return _0x2aa8b1(_0x213abc,_0x40790c);},'zpakI':_0x3a8e99(0x1c9)},_0x53ef27=_0x24965b['replace'](/\/mcp$/,'');process['stdout']['write'](_0x39b303['mEcTH']);const _0x1bb5bd=await fetch(_0x53ef27+'/.well-known/oauth-protected-resource');if(!_0x1bb5bd['ok'])throw new Error('Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server');const _0x445fcf=await _0x1bb5bd[_0x3a8e99(0x18f)](),_0x5ac987=_0x445fcf['authorization_servers']?.[0x0];if(!_0x5ac987)throw new Error(_0x39b303['GzNvP']);console[_0x3a8e99(0x1df)]('\x20'+_0x5ac987);const _0x3d20b0=await _0x39b303['SttxF'](fetchAuthServerMetadata,_0x5ac987);let _0x3598b3,_0x57655d;const _0x1bac7f=await loadCachedClient();if(_0x1bac7f)_0x3598b3=_0x1bac7f[_0x3a8e99(0x19b)],_0x57655d=_0x1bac7f['clientSecret'];else{if(_0x3d20b0['registration_endpoint']){process['stdout']['write']('Registering\x20OAuth\x20client...');const _0xc4af97=await fetch(_0x3d20b0['registration_endpoint'],{'method':_0x3a8e99(0x1c9),'headers':{'Content-Type':_0x39b303[_0x3a8e99(0x1bc)]},'body':JSON[_0x3a8e99(0x18a)]({'client_name':_0x39b303[_0x3a8e99(0x170)],'redirect_uris':['http://localhost:'+CALLBACK_PORT+'/callback'],'grant_types':[_0x39b303[_0x3a8e99(0x1bf)],'refresh_token'],'response_types':[_0x3a8e99(0x169)],'token_endpoint_auth_method':_0x39b303[_0x3a8e99(0x1d0)]})});if(!_0xc4af97['ok']){const _0xd3440e=await _0xc4af97[_0x3a8e99(0x15a)]();throw new Error(_0x3a8e99(0x1cf)+_0xd3440e);}const _0x4dd96c=await _0xc4af97[_0x3a8e99(0x18f)]();_0x3598b3=_0x4dd96c[_0x3a8e99(0x18b)],_0x57655d=_0x4dd96c[_0x3a8e99(0x19e)],await _0x39b303['SBfqk'](saveCachedClient,_0x3598b3,_0x57655d),console['log'](_0x39b303['lkRyr']);}else throw new Error(_0x3a8e99(0x1c4));}const _0x4ba09d=_0x39b303[_0x3a8e99(0x17d)](randomBytes,0x20)[_0x3a8e99(0x1b3)](_0x39b303['PMfej']),_0x1a21a6=_0x39b303['SttxF'](createHash,_0x39b303[_0x3a8e99(0x162)])[_0x3a8e99(0x197)](_0x4ba09d)[_0x3a8e99(0x1c0)](_0x3a8e99(0x188)),_0x5332eb=_0x39b303['SttxF'](randomBytes,0x10)['toString'](_0x39b303['jHJuG']),_0x2b404f=new URL(_0x3d20b0[_0x3a8e99(0x15b)]);_0x2b404f[_0x3a8e99(0x1a3)][_0x3a8e99(0x1ce)](_0x39b303['FJLmA'],_0x39b303[_0x3a8e99(0x171)]),_0x2b404f['searchParams'][_0x3a8e99(0x1ce)](_0x3a8e99(0x18b),_0x3598b3),_0x2b404f[_0x3a8e99(0x1a3)][_0x3a8e99(0x1ce)](_0x3a8e99(0x1a2),_0x3a8e99(0x1d9)+CALLBACK_PORT+'/callback'),_0x2b404f[_0x3a8e99(0x1a3)]['set']('code_challenge',_0x1a21a6),_0x2b404f[_0x3a8e99(0x1a3)]['set']('code_challenge_method','S256'),_0x2b404f['searchParams'][_0x3a8e99(0x1ce)](_0x39b303[_0x3a8e99(0x161)],_0x5332eb);_0x445fcf[_0x3a8e99(0x189)]&&_0x2b404f['searchParams']['set']('resource',_0x445fcf[_0x3a8e99(0x189)]);console['log'](_0x39b303['tzXse']),console[_0x3a8e99(0x1df)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a'+_0x2b404f[_0x3a8e99(0x1b3)]()+'\x0a'),await _0x39b303[_0x3a8e99(0x17d)](openBrowser,_0x2b404f[_0x3a8e99(0x1b3)]());const _0x354a30=await _0x39b303['SttxF'](waitForCallback,_0x5332eb);process['stdout'][_0x3a8e99(0x165)](_0x39b303['RcRjK']);const _0x14d4da=new URLSearchParams({'grant_type':_0x39b303['qqTSo'],'code':_0x354a30,'redirect_uri':_0x3a8e99(0x1d9)+CALLBACK_PORT+_0x3a8e99(0x18c),'client_id':_0x3598b3,'code_verifier':_0x4ba09d});_0x57655d&&_0x14d4da[_0x3a8e99(0x1ce)](_0x39b303['cNXpe'],_0x57655d);_0x445fcf[_0x3a8e99(0x189)]&&_0x14d4da[_0x3a8e99(0x1ce)](_0x39b303['loWOz'],_0x445fcf['resource']);const _0x3f7202=await _0x39b303[_0x3a8e99(0x1b9)](fetch,_0x3d20b0[_0x3a8e99(0x187)],{'method':_0x39b303[_0x3a8e99(0x185)],'headers':{'Content-Type':_0x3a8e99(0x191)},'body':_0x14d4da});if(!_0x3f7202['ok']){const _0x16d896=await _0x3f7202[_0x3a8e99(0x15a)]();throw new Error(_0x3a8e99(0x182)+_0x16d896);}const _0x228e21=await _0x3f7202['json']();return console['log']('\x20done'),await saveCachedToken(_0x228e21[_0x3a8e99(0x1c7)],_0x228e21[_0x3a8e99(0x173)],_0x228e21[_0x3a8e99(0x1af)]),_0x228e21['access_token'];}async function callGetCliToken(_0x4011ac,_0x5c1ecc){const _0xaed81f=_0x481865,_0xdc2e08={'lpOGo':_0xaed81f(0x1c9),'IokQB':function(_0x49671a,_0x329639){return _0x49671a(_0x329639);},'PaPCQ':_0xaed81f(0x163),'GRMee':'Authorization','OqXnm':function(_0x292f4d,_0x44aaf7){return _0x292f4d(_0x44aaf7);},'eSHMU':_0xaed81f(0x168),'fCHyN':_0xaed81f(0x1d8),'MKjoK':_0xaed81f(0x1e2),'ZCXiV':'tools/call','CUeVq':_0xaed81f(0x1b8),'abNyg':_0xaed81f(0x1ac),'lwxQE':function(_0x25f461,_0x2349a8,_0x13a247){return _0x25f461(_0x2349a8,_0x13a247);},'Uuptx':function(_0x3012ce,_0x18ef1e,_0x5a32d6,_0x2b5927){return _0x3012ce(_0x18ef1e,_0x5a32d6,_0x2b5927);},'srvDL':function(_0x49461e,_0x159014,_0xa80e28){return _0x49461e(_0x159014,_0xa80e28);},'tcjAY':'auth-origin.txt'},_0x47775a={'Content-Type':_0xdc2e08['PaPCQ'],'Accept':'application/json,\x20text/event-stream'};_0x5c1ecc&&(_0x47775a[_0xdc2e08['GRMee']]=_0xaed81f(0x1a5)+_0x5c1ecc);const _0x8edfd5=async _0x436bfa=>{const _0x53eb8d=_0xaed81f,_0x2ffa35=await fetch(_0x4011ac,{'method':_0xdc2e08[_0x53eb8d(0x195)],'headers':_0x47775a,'body':JSON[_0x53eb8d(0x18a)](_0x436bfa)});if(!_0x2ffa35['ok']){const _0x54cdd6=await _0x2ffa35['text']();throw new Error(_0x53eb8d(0x1de)+_0x2ffa35['status']+':\x20'+_0x54cdd6);}return _0xdc2e08[_0x53eb8d(0x15f)](parseResponse,_0x2ffa35);};process[_0xaed81f(0x1d1)][_0xaed81f(0x165)]('Initializing\x20MCP\x20session...');const _0x28a5c6=await _0xdc2e08['OqXnm'](_0x8edfd5,{'jsonrpc':_0xaed81f(0x194),'id':0x1,'method':_0xdc2e08[_0xaed81f(0x172)],'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':'ranger-cli','version':_0xaed81f(0x1b0)}}});if(_0x28a5c6['error'])throw new Error(_0xaed81f(0x17f)+(_0x28a5c6['error']['message']??JSON[_0xaed81f(0x18a)](_0x28a5c6['error'])));console['log'](_0xaed81f(0x1b8)),await fetch(_0x4011ac,{'method':_0xaed81f(0x1c9),'headers':_0x47775a,'body':JSON[_0xaed81f(0x18a)]({'jsonrpc':_0xaed81f(0x194),'method':_0xdc2e08['fCHyN']})})[_0xaed81f(0x1db)](_0x428337=>_0x428337[_0xaed81f(0x15a)]()),process['stdout'][_0xaed81f(0x165)](_0xdc2e08[_0xaed81f(0x1bb)]);const _0x1e4f74=await _0x8edfd5({'jsonrpc':_0xaed81f(0x194),'id':0x2,'method':_0xdc2e08[_0xaed81f(0x164)],'params':{'name':'get_cli_token','arguments':{}}});if(_0x1e4f74['error'])throw new Error(_0xaed81f(0x160)+(_0x1e4f74[_0xaed81f(0x166)][_0xaed81f(0x19f)]??JSON['stringify'](_0x1e4f74['error'])));console['log'](_0xdc2e08['CUeVq']);const _0xa1169d=extractToken(_0x1e4f74[_0xaed81f(0x1ae)]);if(!_0xa1169d){console[_0xaed81f(0x166)]('\x0aUnexpected\x20response\x20structure:'),console['error'](JSON['stringify'](_0x1e4f74['result'],null,0x2));throw new Error(_0xaed81f(0x15e));}const _0x3213b5=join(homedir(),_0xdc2e08['abNyg']),_0x39b1cb=_0xdc2e08[_0xaed81f(0x1cb)](join,_0x3213b5,_0xaed81f(0x1ba));await _0xdc2e08['lwxQE'](mkdir,_0x3213b5,{'recursive':!![]}),await _0xdc2e08['Uuptx'](writeFile,_0x39b1cb,_0xa1169d,{'mode':0x180}),await writeFile(_0xdc2e08['srvDL'](join,_0x3213b5,_0xdc2e08[_0xaed81f(0x190)]),_0x4011ac,{'mode':0x180}),console['log'](_0xaed81f(0x156)+_0x39b1cb),console['log']('Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a');}async function fetchAuthServerMetadata(_0x1fc35b){const _0x3569cc=_0x481865,_0x4ed5f4={'TdCyJ':function(_0x49173e,_0x4765d4){return _0x49173e(_0x4765d4);}},_0x1bf9d9=_0x1fc35b+'/.well-known/oauth-authorization-server',_0xf382b1=await _0x4ed5f4['TdCyJ'](fetch,_0x1bf9d9);if(!_0xf382b1['ok'])throw new Error(_0x3569cc(0x1d2)+_0x1bf9d9+':\x20'+_0xf382b1['status']);return _0xf382b1[_0x3569cc(0x18f)]();}function waitForCallback(_0x50cda5){const _0x4bfbb9=_0x481865,_0x3f5369={'odyoa':_0x4bfbb9(0x1c5),'JsPCm':function(_0x1bef96,_0x3f01af){return _0x1bef96(_0x3f01af);},'JysbU':function(_0x43c813,_0x114b8b,_0x10266d){return _0x43c813(_0x114b8b,_0x10266d);},'fKTED':_0x4bfbb9(0x178)};return new Promise((_0x3d86f0,_0x1d269a)=>{const _0x5c4772=_0x4bfbb9,_0x949f71={'IDJbA':_0x5c4772(0x1a6),'QrjDs':'code','vhrZW':_0x3f5369['odyoa'],'OentM':function(_0x838aa2,_0xc654d5){return _0x3f5369['JsPCm'](_0x838aa2,_0xc654d5);},'WpSIJ':function(_0x11c4bd,_0x411c81){return _0x3f5369['JsPCm'](_0x11c4bd,_0x411c81);},'IzDWe':function(_0x345c3b){return _0x345c3b();}},_0xf918e4=()=>{const _0x779ed5=_0x5c4772;_0x1ed889[_0x779ed5(0x1bd)](),_0x1ed889['close']();},_0x27fe07=_0x3f5369['JysbU'](setTimeout,()=>{const _0x3e698f=_0x5c4772;_0xf918e4(),_0x1d269a(new OAuthTimeoutError(_0x3e698f(0x184)));},0x1d4c0),_0x1ed889=_0x3f5369['JsPCm'](createServer,(_0x2bf22c,_0x154f77)=>{const _0x92afc4=_0x5c4772,_0xc06a9c=new URL(_0x2bf22c['url']??'/','http://localhost:'+CALLBACK_PORT);if(_0xc06a9c[_0x92afc4(0x180)]!=='/callback'){_0x154f77['writeHead'](0x194),_0x154f77[_0x92afc4(0x1ad)](_0x949f71[_0x92afc4(0x19c)]);return;}const _0x48fea2=_0xc06a9c[_0x92afc4(0x1a3)]['get'](_0x949f71[_0x92afc4(0x1e1)]),_0x1f231d=_0xc06a9c[_0x92afc4(0x1a3)]['get'](_0x949f71['vhrZW']),_0x29848c=_0xc06a9c[_0x92afc4(0x1a3)]['get']('error');if(_0x29848c){const _0x2fa591=_0xc06a9c[_0x92afc4(0x1a3)]['get']('error_description')??_0x29848c;_0x154f77['writeHead'](0xc8,{'Content-Type':'text/html'}),_0x154f77['end']('<html><body><h2>Authentication\x20failed</h2><p>'+_0x2fa591+'</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>'),clearTimeout(_0x27fe07),_0xf918e4(),_0x949f71['OentM'](_0x1d269a,new Error('OAuth\x20error:\x20'+_0x2fa591));return;}if(!_0x48fea2||_0x1f231d!==_0x50cda5){_0x154f77[_0x92afc4(0x186)](0x190,{'Content-Type':_0x92afc4(0x1a9)}),_0x154f77[_0x92afc4(0x1ad)]('<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>');return;}_0x154f77[_0x92afc4(0x186)](0xc8,{'Content-Type':_0x92afc4(0x1a9)}),_0x154f77['end']('<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>'),_0x949f71['WpSIJ'](clearTimeout,_0x27fe07),_0x949f71[_0x92afc4(0x1a1)](_0xf918e4),_0x3d86f0(_0x48fea2);});_0x1ed889[_0x5c4772(0x1a8)](CALLBACK_PORT,_0x3f5369[_0x5c4772(0x1b1)]);});}async function openBrowser(_0x28e6cd){const _0x1d1d34=_0x481865,_0x2c4d24={'XsiZK':_0x1d1d34(0x157)},_0x4ecae3=process['platform']===_0x2c4d24['XsiZK']?'open':process['platform']===_0x1d1d34(0x1a0)?'start':'xdg-open';exec(_0x4ecae3+'\x20\x22'+_0x28e6cd+'\x22');}function _0xb0f8(_0x254349,_0x4b9035){_0x254349=_0x254349-0x155;const _0x29fc8b=_0x29fc();let _0xb0f857=_0x29fc8b[_0x254349];return _0xb0f857;}let currentOrigin='';async function loadCachedToken(){const _0x55a4ca=_0x481865,_0x367186={'nUybx':'utf-8'};try{const _0x11dbfe=JSON[_0x55a4ca(0x15c)](await readFile(TOKEN_CACHE_PATH,_0x367186['nUybx']));if(_0x11dbfe[_0x55a4ca(0x1ca)]&&_0x11dbfe['origin']!==currentOrigin)return null;if(_0x11dbfe['expiresAt']&&Date[_0x55a4ca(0x198)]()>_0x11dbfe[_0x55a4ca(0x1da)])return null;return _0x11dbfe['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x3ab574,_0xc8096a,_0x1498c6){const _0x394c96=_0x481865,_0x2d729c={'ncOeN':function(_0x9168e6,_0x1c90a2){return _0x9168e6*_0x1c90a2;},'RoRIV':function(_0x5d4e11,_0x1b1616,_0x15301b){return _0x5d4e11(_0x1b1616,_0x15301b);},'iPZTE':function(_0x127565,_0x52a52f,_0x4045a7){return _0x127565(_0x52a52f,_0x4045a7);},'mFHmi':function(_0x53225f,_0x34e3cf,_0x225fd3,_0x5dcff0){return _0x53225f(_0x34e3cf,_0x225fd3,_0x5dcff0);}},_0xba99bf=await loadCachedData(),_0x55efcc={..._0xba99bf,'origin':currentOrigin,'accessToken':_0x3ab574,'refreshToken':_0xc8096a??_0xba99bf?.[_0x394c96(0x1c3)],'expiresAt':_0x1498c6?Date['now']()+_0x2d729c[_0x394c96(0x1b4)](_0x1498c6,0x3e8):undefined};await _0x2d729c[_0x394c96(0x1e3)](mkdir,_0x2d729c[_0x394c96(0x193)](join,homedir(),_0x394c96(0x1ac)),{'recursive':!![]}),await _0x2d729c['mFHmi'](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x55efcc),{'mode':0x180});}async function loadCachedClient(){const _0x379c4a=_0x481865,_0x497a7f={'qRfJy':function(_0x1947a3){return _0x1947a3();},'EPGwO':function(_0x50f1b8,_0x2c98de){return _0x50f1b8!==_0x2c98de;}},_0x433966=await _0x497a7f['qRfJy'](loadCachedData);if(_0x433966?.[_0x379c4a(0x1ca)]&&_0x497a7f['EPGwO'](_0x433966['origin'],currentOrigin))return null;return _0x433966?.[_0x379c4a(0x19b)]?{'clientId':_0x433966['clientId'],'clientSecret':_0x433966[_0x379c4a(0x179)]}:null;}async function clearCachedClient(){const _0x521914=_0x481865,_0x212c1f={'TJcnB':function(_0x2adacd,_0x5f2114,_0x46ed40,_0x1f31c9){return _0x2adacd(_0x5f2114,_0x46ed40,_0x1f31c9);}},_0x507ded=await loadCachedData();if(!_0x507ded)return;const {clientId:_0x218634,clientSecret:_0x5ea2da,..._0x3a1cff}=_0x507ded;await _0x212c1f['TJcnB'](writeFile,TOKEN_CACHE_PATH,JSON[_0x521914(0x18a)](_0x3a1cff),{'mode':0x180});}async function saveCachedClient(_0x5a03e0,_0x2d6b64){const _0x560311=_0x481865,_0x327ac1={'xqtVx':function(_0x427def,_0xae3b1b,_0x10e8c2){return _0x427def(_0xae3b1b,_0x10e8c2);},'yhxLj':function(_0x2639f7){return _0x2639f7();},'mAruO':_0x560311(0x1ac)},_0x412e71=await loadCachedData(),_0x431b0e={..._0x412e71,'origin':currentOrigin,'accessToken':_0x412e71?.[_0x560311(0x15d)]??'','clientId':_0x5a03e0,'clientSecret':_0x2d6b64};await _0x327ac1[_0x560311(0x1a7)](mkdir,join(_0x327ac1[_0x560311(0x1cc)](homedir),_0x327ac1['mAruO']),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x431b0e),{'mode':0x180});}async function loadCachedData(){const _0x272832={'McvLH':function(_0x269da5,_0x1f873f,_0x2c9fc0){return _0x269da5(_0x1f873f,_0x2c9fc0);}};try{return JSON['parse'](await _0x272832['McvLH'](readFile,TOKEN_CACHE_PATH,'utf-8'));}catch{return null;}}async function parseResponse(_0x3c079c){const _0x22abd9=_0x481865,_0x4e0dbd={'ZfGwF':'data:','PZroR':function(_0x3bf1d4,_0x54218d){return _0x3bf1d4!==_0x54218d;},'fQONX':_0x22abd9(0x18e)},_0x5879c4=_0x3c079c[_0x22abd9(0x19d)]['get'](_0x22abd9(0x16e))??'';if(_0x5879c4['includes']('text/event-stream')){const _0x3e2a10=await _0x3c079c[_0x22abd9(0x15a)]();for(const _0xcb2e12 of _0x3e2a10[_0x22abd9(0x1dc)]('\x0a')){const _0x3fe108=_0xcb2e12['trim']();if(_0x3fe108['startsWith'](_0x4e0dbd[_0x22abd9(0x1c8)])){const _0x1ea0c4=_0x3fe108['slice'](_0x4e0dbd[_0x22abd9(0x1c8)]['length'])['trim']();if(!_0x1ea0c4)continue;try{const _0x439076=JSON['parse'](_0x1ea0c4);if(_0x4e0dbd[_0x22abd9(0x16b)](_0x439076['id'],undefined)||_0x439076[_0x22abd9(0x166)])return _0x439076;}catch{}}}throw new Error(_0x4e0dbd['fQONX']);}return _0x3c079c['json']();}function extractToken(_0x12056e){const _0x106511=_0x481865,_0x2ff5c9={'lZCSH':function(_0x56be7d,_0x21a010){return _0x56be7d===_0x21a010;},'GVllo':_0x106511(0x16f),'AvmzX':_0x106511(0x15a),'aolMm':_0x106511(0x16d)};if(!_0x12056e)return null;const _0x2b580f=_0x12056e['structuredContent'];if(_0x2b580f?.['token']&&_0x2ff5c9[_0x106511(0x183)](typeof _0x2b580f['token'],'string'))return _0x2b580f['token'];if(_0x12056e[_0x106511(0x192)]){const _0x1886aa=_0x12056e[_0x106511(0x17c)];throw new Error(_0x106511(0x1e0)+(_0x1886aa?.[0x0]?.['text']??_0x2ff5c9[_0x106511(0x1b5)]));}const _0x4ce85b=_0x12056e['content'];if(_0x4ce85b)for(const _0x61dadd of _0x4ce85b){if(_0x2ff5c9[_0x106511(0x183)](_0x61dadd[_0x106511(0x16c)],_0x2ff5c9[_0x106511(0x1a4)])&&_0x61dadd[_0x106511(0x15a)]){try{const _0x55fb25=JSON[_0x106511(0x15c)](_0x61dadd[_0x106511(0x15a)]);if(_0x2ff5c9[_0x106511(0x183)](typeof _0x55fb25?.[_0x106511(0x1aa)],_0x2ff5c9['aolMm']))return _0x55fb25['token'];}catch{}const _0x102532=_0x61dadd[_0x106511(0x15a)]['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x102532)return _0x102532[0x1];}}return null;}
@@ -1 +1 @@
1
- function _0x3913(_0x36d0fe,_0x19d9f1){_0x36d0fe=_0x36d0fe-0x90;var _0x1fa9b5=_0x1fa9();var _0x39133c=_0x1fa9b5[_0x36d0fe];return _0x39133c;}(function(_0x21a80a,_0x2fa89e){var _0x4b36c9=_0x3913,_0x3751fc=_0x21a80a();while(!![]){try{var _0x551699=-parseInt(_0x4b36c9(0x9f))/0x1+parseInt(_0x4b36c9(0x96))/0x2+parseInt(_0x4b36c9(0x95))/0x3*(-parseInt(_0x4b36c9(0x99))/0x4)+parseInt(_0x4b36c9(0x9a))/0x5+parseInt(_0x4b36c9(0x94))/0x6+parseInt(_0x4b36c9(0x9e))/0x7*(parseInt(_0x4b36c9(0x9b))/0x8)+-parseInt(_0x4b36c9(0x91))/0x9;if(_0x551699===_0x2fa89e)break;else _0x3751fc['push'](_0x3751fc['shift']());}catch(_0x29f064){_0x3751fc['push'](_0x3751fc['shift']());}}}(_0x1fa9,0xbb965));function _0x1fa9(){var _0x1eec33=['\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','error','673169vXCSaJ','455815iBdEcS','fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.','21088287TbALeM','ifnQx','eZnws','8379978rfPaHx','51CwVEAH','2930208SUGraC','exit','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','222532XFAJXL','3929030DdVqfL','72ifTPhI'];_0x1fa9=function(){return _0x1eec33;};return _0x1fa9();}export async function migrateProfile(_0x5b68ec,_0x347344){var _0x47a160=_0x3913,_0x50068b={'vaZsB':function(_0xce8f6b,_0x4fa634){return _0xce8f6b+_0x4fa634;},'yGkro':function(_0x5791a3,_0x1843cf){return _0x5791a3+_0x1843cf;},'ifnQx':function(_0x3cd550,_0x7396ac){return _0x3cd550+_0x7396ac;},'zjuWP':function(_0x18dbbb,_0x50d46e){return _0x18dbbb+_0x50d46e;},'eZnws':'ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','ZCcUA':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'};console[_0x47a160(0x9d)](_0x50068b['vaZsB'](_0x50068b['yGkro'](_0x50068b['ifnQx'](_0x50068b['zjuWP'](_0x50068b[_0x47a160(0x92)](_0x50068b[_0x47a160(0x93)],'\x0a')+_0x50068b['ZCcUA'],_0x47a160(0x98))+'\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+_0x47a160(0x9c),'\x0a')+'Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a',_0x47a160(0x90))),process[_0x47a160(0x97)](0x1);}
1
+ (function(_0x665997,_0x3553ec){var _0x200166=_0x4381,_0x34fe4f=_0x665997();while(!![]){try{var _0x4d2a2c=-parseInt(_0x200166(0x203))/0x1+-parseInt(_0x200166(0x1fb))/0x2*(parseInt(_0x200166(0x201))/0x3)+parseInt(_0x200166(0x1f4))/0x4+parseInt(_0x200166(0x205))/0x5*(-parseInt(_0x200166(0x202))/0x6)+parseInt(_0x200166(0x200))/0x7*(-parseInt(_0x200166(0x1fc))/0x8)+parseInt(_0x200166(0x1f6))/0x9*(parseInt(_0x200166(0x1f7))/0xa)+-parseInt(_0x200166(0x1fd))/0xb*(-parseInt(_0x200166(0x204))/0xc);if(_0x4d2a2c===_0x3553ec)break;else _0x34fe4f['push'](_0x34fe4f['shift']());}catch(_0x2aee9b){_0x34fe4f['push'](_0x34fe4f['shift']());}}}(_0x115c,0x5d746));function _0x4381(_0x4963ed,_0x151884){_0x4963ed=_0x4963ed-0x1f4;var _0x115cfe=_0x115c();var _0x43816c=_0x115cfe[_0x4963ed];return _0x43816c;}export async function migrateProfile(_0x3b6c38,_0x5acfc2){var _0x516fa0=_0x4381,_0x2c3baf={'zFNUM':function(_0x3cdff9,_0x4656d4){return _0x3cdff9+_0x4656d4;},'oWGCc':function(_0x2d6e53,_0x5f3e2f){return _0x2d6e53+_0x5f3e2f;},'fefRM':function(_0xd9eac3,_0x2d8a11){return _0xd9eac3+_0x2d8a11;},'cTKgw':_0x516fa0(0x1fa),'yLCIW':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','aFESf':_0x516fa0(0x1f8)};console['error'](_0x2c3baf['zFNUM'](_0x2c3baf['oWGCc'](_0x2c3baf['fefRM'](_0x2c3baf['oWGCc']('ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','\x0a')+_0x516fa0(0x1f9)+_0x2c3baf['cTKgw'],'\x0a')+_0x2c3baf[_0x516fa0(0x1ff)],_0x516fa0(0x206))+'\x0a'+_0x516fa0(0x1f5),_0x2c3baf[_0x516fa0(0x1fe)])),process['exit'](0x1);}function _0x115c(){var _0x2c8258=['\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','754504adcyKu','Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a','9216ObjcBI','460dnTsjC','fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','2BZKlYa','1012120cXoFNn','7290690BRBeqO','aFESf','yLCIW','7PsfxiD','1825467ugghKH','26814fCRrvt','672813Yblbfz','36DfsqgB','485MKcIuo'];_0x115c=function(){return _0x2c8258;};return _0x115c();}
@@ -1 +1 @@
1
- (function(_0x43d541,_0x39be3f){const _0x9ed88f=_0x2b22,_0xfb3a0a=_0x43d541();while(!![]){try{const _0x55d5d7=parseInt(_0x9ed88f(0xd6))/0x1+parseInt(_0x9ed88f(0xbc))/0x2+-parseInt(_0x9ed88f(0xe5))/0x3*(parseInt(_0x9ed88f(0xd9))/0x4)+-parseInt(_0x9ed88f(0xd7))/0x5+-parseInt(_0x9ed88f(0xc3))/0x6+parseInt(_0x9ed88f(0xbe))/0x7*(parseInt(_0x9ed88f(0xed))/0x8)+parseInt(_0x9ed88f(0xda))/0x9*(parseInt(_0x9ed88f(0xf2))/0xa);if(_0x55d5d7===_0x39be3f)break;else _0xfb3a0a['push'](_0xfb3a0a['shift']());}catch(_0x552393){_0xfb3a0a['push'](_0xfb3a0a['shift']());}}}(_0x11ef,0xe6838));function _0x2b22(_0x3f9a90,_0x2bac72){_0x3f9a90=_0x3f9a90-0xbc;const _0x11ef46=_0x11ef();let _0x2b2207=_0x11ef46[_0x3f9a90];return _0x2b2207;}function _0x11ef(){const _0x25a82a=['enable','SKILL.md','pluginScope','FVaoN','output','error','uqPJX','ranger@trailhead','579197VbxQws','2226465XnjzQM','list','8412ptTmEn','940986kfgPjX','QvKwX','wantsSkillup','Project\x20(shared\x20with\x20team\x20via\x20git)','✓\x20Ranger\x20skills\x20already\x20installed','plugin','kaPal','Where\x20should\x20the\x20plugin\x20be\x20installed?','add','ilcdh','IxFHD','2331wdVboq','YsdmS','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','ialoy','❌\x20Failed\x20to\x20add\x20marketplace:','project','\x0aYou\x20can\x20install\x20manually\x20with:','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','12527008BTmlty','bMkiL','VkQgM','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','success','130EwFgZt','2011100TFQcpY','ranger','7TJFShe','JNXfc','log','Vejlu','LwmyI','8917902ldXhrf','HgWDI','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','Would\x20you\x20like\x20to\x20install\x20skills?','prompt','✓\x20Marketplace\x20already\x20added','YGfNH','--scope','user','qQpsP','OtRsL'];_0x11ef=function(){return _0x25a82a;};return _0x11ef();}import{join}from'path';import{existsSync}from'fs';import _0x128821 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x5c66f2){const _0x1398b0=_0x2b22,_0x1e4efb={'kaPal':function(_0x169f8f,_0x33a235){return _0x169f8f(_0x33a235);},'IxFHD':_0x1398b0(0xd5),'ZJETK':_0x1398b0(0xec),'YGfNH':function(_0x5a05cb){return _0x5a05cb();},'LwmyI':_0x1398b0(0xea),'VkQgM':_0x1398b0(0xe7),'iGJsz':_0x1398b0(0xd8),'FVaoN':_0x1398b0(0xd0),'VwzBX':_0x1398b0(0xe1),'Vejlu':'User\x20(available\x20in\x20all\x20your\x20projects)','YsdmS':'trailhead','ilcdh':'marketplace','zMKUo':_0x1398b0(0xe2),'OKOFQ':_0x1398b0(0xeb),'UPbdK':_0x1398b0(0xc5),'HgWDI':'install','qQpsP':_0x1398b0(0xca),'ztGrF':function(_0x28754b,_0x4ff989){return _0x28754b===_0x4ff989;},'ePJtB':_0x1398b0(0xf0),'obfjI':'plugin','MIxJi':_0x1398b0(0xce),'uqPJX':'already\x20enabled','mnJVd':'⚠\x20Failed\x20to\x20enable\x20plugin:'},_0xd92ce1=await _0x1e4efb[_0x1398b0(0xe0)](isPluginInstalled,_0x1e4efb['IxFHD']);if(_0xd92ce1)return console[_0x1398b0(0xc0)](_0x1e4efb['ZJETK']),![];const _0x56212c=existsSync(join(_0x1e4efb[_0x1398b0(0xc9)](getProjectRoot),'.claude'));let _0x295cca;if(_0x5c66f2)_0x295cca=_0x5c66f2;else{if(_0x56212c)_0x295cca=_0x1e4efb[_0x1398b0(0xc2)];else{console[_0x1398b0(0xc0)](_0x1e4efb[_0x1398b0(0xef)]);const _0x3e7c0b=await _0x128821[_0x1398b0(0xc7)]([{'type':_0x1e4efb['iGJsz'],'name':_0x1e4efb[_0x1398b0(0xd1)],'message':_0x1e4efb['VwzBX'],'choices':[{'name':_0x1e4efb[_0x1398b0(0xc1)],'value':_0x1398b0(0xcb)},{'name':_0x1398b0(0xdd),'value':'project'}],'default':'user'}]);_0x295cca=_0x3e7c0b['pluginScope'];}}console[_0x1398b0(0xc0)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x295cca+'\x20level)...\x0a');const _0x17a0bb=await _0x1e4efb[_0x1398b0(0xe0)](isMarketplaceAdded,_0x1e4efb[_0x1398b0(0xe6)]);let _0x24d812=_0x17a0bb;if(_0x17a0bb)console['log'](_0x1398b0(0xc8));else{const _0x2d1444=await runClaudeCommand(['plugin',_0x1e4efb[_0x1398b0(0xe3)],_0x1e4efb['zMKUo'],'ranger-testing/trailhead']);!_0x2d1444['success']?(console[_0x1398b0(0xd3)](_0x1398b0(0xe9),_0x2d1444[_0x1398b0(0xd3)]),console[_0x1398b0(0xc0)](_0x1e4efb['OKOFQ']),console[_0x1398b0(0xc0)](_0x1e4efb['UPbdK']),console[_0x1398b0(0xc0)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x295cca)):_0x24d812=!![];}if(_0x24d812){const _0x23ba9b=await runClaudeCommand([_0x1398b0(0xdf),_0x1e4efb[_0x1398b0(0xc4)],'ranger@trailhead',_0x1e4efb[_0x1398b0(0xcc)],_0x295cca],{'cwd':_0x1e4efb['ztGrF'](_0x295cca,_0x1398b0(0xea))?getProjectRoot():undefined});if(!_0x23ba9b[_0x1398b0(0xf1)])console[_0x1398b0(0xd3)]('❌\x20Failed\x20to\x20install\x20plugin:',_0x23ba9b[_0x1398b0(0xd3)]),console[_0x1398b0(0xc0)]('\x0aYou\x20can\x20install\x20manually\x20with:'),console[_0x1398b0(0xc0)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x295cca);else{console['log'](_0x1e4efb['ePJtB']);const _0xe0cde8=[_0x1e4efb['obfjI'],_0x1e4efb['MIxJi'],_0x1e4efb[_0x1398b0(0xe4)]];_0x295cca===_0x1e4efb[_0x1398b0(0xc2)]&&_0xe0cde8['push']('--scope',_0x1e4efb['LwmyI']);const _0x4154ee=await runClaudeCommand(_0xe0cde8,{'captureOutput':!![],'cwd':_0x1e4efb['ztGrF'](_0x295cca,_0x1398b0(0xea))?_0x1e4efb[_0x1398b0(0xc9)](getProjectRoot):undefined}),_0x5ed5a6=_0x4154ee[_0x1398b0(0xd2)]?.['includes'](_0x1e4efb[_0x1398b0(0xd4)]);!_0x4154ee[_0x1398b0(0xf1)]&&!_0x5ed5a6?console['error'](_0x1e4efb['mnJVd'],_0x4154ee[_0x1398b0(0xd3)]):console['log']('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}export async function ensureClaudeSkills(_0x2fabd2){const _0x45db90=_0x2b22,_0x1f21f7={'ialoy':function(_0x5d2f8b,_0x4bd963){return _0x5d2f8b(_0x4bd963);},'QvKwX':function(_0x272372,_0x300317,_0x497069,_0x48aa6a){return _0x272372(_0x300317,_0x497069,_0x48aa6a);},'JNXfc':'user','bMkiL':_0x45db90(0xbd),'oAnJI':_0x45db90(0xde),'OtRsL':function(_0x539584,_0x4f6fce,_0x969569){return _0x539584(_0x4f6fce,_0x969569);}},_0x11cfc2=_0x1f21f7['ialoy'](existsSync,_0x1f21f7[_0x45db90(0xdb)](join,_0x1f21f7[_0x45db90(0xe8)](getSkillsDir,_0x1f21f7[_0x45db90(0xbf)]),_0x45db90(0xbd),_0x45db90(0xcf))),_0xf887e9=_0x1f21f7['ialoy'](existsSync,_0x1f21f7[_0x45db90(0xdb)](join,_0x1f21f7['ialoy'](getSkillsDir,_0x45db90(0xea)),_0x1f21f7[_0x45db90(0xee)],'SKILL.md'));if(_0x11cfc2||_0xf887e9)return console['log'](_0x1f21f7['oAnJI']),![];const _0xc02183=_0x1f21f7['ialoy'](existsSync,_0x1f21f7[_0x45db90(0xcd)](join,getProjectRoot(),'.claude'));let _0x2fe3e4=!![];if(_0x2fabd2)await _0x1f21f7['ialoy'](skillup,{'autoInstall':_0x2fabd2,'suppressUsage':!![]});else{if(_0xc02183)await _0x1f21f7['ialoy'](skillup,{'autoInstall':_0x45db90(0xea),'suppressUsage':!![]});else{const _0x13d202=await _0x128821[_0x45db90(0xc7)]([{'type':'confirm','name':_0x45db90(0xdc),'message':_0x45db90(0xc6),'default':!![]}]);_0x2fe3e4=_0x13d202[_0x45db90(0xdc)],_0x2fe3e4&&await _0x1f21f7['ialoy'](skillup,{'suppressUsage':!![]});}}return _0x2fe3e4;}
1
+ (function(_0x25dacd,_0xe49bee){const _0x26896b=_0x5667,_0xafca71=_0x25dacd();while(!![]){try{const _0x577d56=parseInt(_0x26896b(0x1d4))/0x1+-parseInt(_0x26896b(0x1e5))/0x2*(-parseInt(_0x26896b(0x1ba))/0x3)+parseInt(_0x26896b(0x1cc))/0x4+-parseInt(_0x26896b(0x1b2))/0x5+parseInt(_0x26896b(0x1b4))/0x6*(-parseInt(_0x26896b(0x1d7))/0x7)+-parseInt(_0x26896b(0x1cd))/0x8+-parseInt(_0x26896b(0x1c8))/0x9*(-parseInt(_0x26896b(0x1bd))/0xa);if(_0x577d56===_0xe49bee)break;else _0xafca71['push'](_0xafca71['shift']());}catch(_0x33d2ea){_0xafca71['push'](_0xafca71['shift']());}}}(_0x331e,0xa52d3));import{join}from'path';import{existsSync}from'fs';function _0x331e(){const _0x164370=['pzIac','wantsSkillup','⚠\x20Failed\x20to\x20enable\x20plugin:','xvDQx','--scope','HxAAc','tTyTy','WEHlr','12188pmOwqn','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','5442590AUXNZa','install','570966qjylOE','Where\x20should\x20the\x20plugin\x20be\x20installed?','✓\x20Marketplace\x20already\x20added','Would\x20you\x20like\x20to\x20install\x20skills?','kkOjO','\x0aYou\x20can\x20install\x20manually\x20with:','3gayicf','Yluvf','plugin','1240FhgnKk','\x20level)...\x0a','log','.claude','BYESf','Project\x20(shared\x20with\x20team\x20via\x20git)','User\x20(available\x20in\x20all\x20your\x20projects)','WevML','ranger@trailhead','add','wgWHg','162468MPPFiP','VJeyw','yFLOr','dmFmm','3149384TOSMzZ','3560352nFwWIE','push','❌\x20Failed\x20to\x20install\x20plugin:','mlYjT','already\x20enabled','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','UDlkC','34686YPNJAF','success','ranger','63dgCdTb','UKYzC','error','project','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','user'];_0x331e=function(){return _0x164370;};return _0x331e();}import _0x4f01dd from'inquirer';import{skillup}from'../skillup.js';function _0x5667(_0x4149bc,_0x2805ec){_0x4149bc=_0x4149bc-0x1b1;const _0x331eb8=_0x331e();let _0x566786=_0x331eb8[_0x4149bc];return _0x566786;}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x2c5c8b){const _0x700af7=_0x5667,_0x512591={'Yluvf':function(_0xc96271){return _0xc96271();},'wgWHg':_0x700af7(0x1c0),'VJeyw':'list','dmFmm':'pluginScope','tTyTy':_0x700af7(0x1c3),'WRaOR':_0x700af7(0x1dc),'yFLOr':_0x700af7(0x1da),'Xwiey':function(_0x407f64,_0xb1eb6b){return _0x407f64(_0xb1eb6b);},'kkOjO':'marketplace','WEHlr':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','pzIac':function(_0x35c811,_0x2eab61,_0xb77b1f){return _0x35c811(_0x2eab61,_0xb77b1f);},'lKpcM':_0x700af7(0x1bc),'mlYjT':_0x700af7(0x1e1),'LfGSF':function(_0x699916,_0x3d2df4){return _0x699916===_0x3d2df4;},'ZUTFQ':_0x700af7(0x1cf),'oqQTG':function(_0x12c9ee,_0xde4385){return _0x12c9ee===_0xde4385;}},_0x439cd2=await isPluginInstalled('ranger@trailhead');if(_0x439cd2)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x1758af=existsSync(join(_0x512591[_0x700af7(0x1bb)](getProjectRoot),_0x512591[_0x700af7(0x1c7)]));let _0x432fe0;if(_0x2c5c8b)_0x432fe0=_0x2c5c8b;else{if(_0x1758af)_0x432fe0=_0x700af7(0x1da);else{console[_0x700af7(0x1bf)]('\x0a📦\x20Claude\x20Code\x20Plugin\x0a');const _0x177891=await _0x4f01dd['prompt']([{'type':_0x512591[_0x700af7(0x1c9)],'name':_0x512591[_0x700af7(0x1cb)],'message':_0x700af7(0x1b5),'choices':[{'name':_0x512591[_0x700af7(0x1e3)],'value':_0x512591['WRaOR']},{'name':_0x700af7(0x1c2),'value':_0x512591['yFLOr']}],'default':'user'}]);_0x432fe0=_0x177891['pluginScope'];}}console['log'](_0x700af7(0x1d2)+_0x432fe0+_0x700af7(0x1be));const _0x2b0f25=await isMarketplaceAdded('trailhead');let _0x1a0efa=_0x2b0f25;if(_0x2b0f25)console['log'](_0x700af7(0x1b6));else{const _0x5a41f5=await _0x512591['Xwiey'](runClaudeCommand,[_0x700af7(0x1bc),_0x512591[_0x700af7(0x1b8)],_0x700af7(0x1c6),'ranger-testing/trailhead']);!_0x5a41f5[_0x700af7(0x1d5)]?(console['error']('❌\x20Failed\x20to\x20add\x20marketplace:',_0x5a41f5[_0x700af7(0x1d9)]),console['log']('\x0aYou\x20can\x20install\x20manually\x20with:'),console['log'](_0x512591[_0x700af7(0x1e4)]),console['log'](_0x700af7(0x1b1)+_0x432fe0)):_0x1a0efa=!![];}if(_0x1a0efa){const _0x533019=await _0x512591['pzIac'](runClaudeCommand,[_0x512591['lKpcM'],_0x700af7(0x1b3),_0x700af7(0x1c5),_0x512591[_0x700af7(0x1d0)],_0x432fe0],{'cwd':_0x512591['LfGSF'](_0x432fe0,_0x512591[_0x700af7(0x1ca)])?_0x512591['Yluvf'](getProjectRoot):undefined});if(!_0x533019[_0x700af7(0x1d5)])console[_0x700af7(0x1d9)](_0x512591['ZUTFQ'],_0x533019[_0x700af7(0x1d9)]),console['log'](_0x700af7(0x1b9)),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x432fe0);else{console['log'](_0x700af7(0x1db));const _0xd4752c=[_0x700af7(0x1bc),'enable','ranger@trailhead'];_0x512591['oqQTG'](_0x432fe0,_0x700af7(0x1da))&&_0xd4752c[_0x700af7(0x1ce)]('--scope',_0x512591[_0x700af7(0x1ca)]);const _0x5e1773=await _0x512591[_0x700af7(0x1dd)](runClaudeCommand,_0xd4752c,{'captureOutput':!![],'cwd':_0x432fe0===_0x700af7(0x1da)?getProjectRoot():undefined}),_0x23b845=_0x5e1773['output']?.['includes'](_0x700af7(0x1d1));!_0x5e1773['success']&&!_0x23b845?console[_0x700af7(0x1d9)](_0x700af7(0x1df),_0x5e1773['error']):console[_0x700af7(0x1bf)]('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}export async function ensureClaudeSkills(_0x51d3fa){const _0x8ab0ce=_0x5667,_0x352cec={'lMcOa':function(_0x35f528,_0x3ac617,_0x460c92,_0x1c66d8){return _0x35f528(_0x3ac617,_0x460c92,_0x1c66d8);},'QxHtH':_0x8ab0ce(0x1dc),'UDlkC':function(_0x3aca01,_0x2d0fac,_0x142394,_0x46b3f9){return _0x3aca01(_0x2d0fac,_0x142394,_0x46b3f9);},'MeaQg':'ranger','Eqftb':'SKILL.md','XKNla':function(_0x1c3af5,_0xff6ab){return _0x1c3af5||_0xff6ab;},'WevML':'✓\x20Ranger\x20skills\x20already\x20installed','UKYzC':function(_0x44cef7,_0x262613){return _0x44cef7(_0x262613);},'BYESf':_0x8ab0ce(0x1c0),'xvDQx':function(_0x1122cf,_0x28acab){return _0x1122cf(_0x28acab);},'HxAAc':_0x8ab0ce(0x1da),'ixbah':_0x8ab0ce(0x1b7)},_0x20e858=existsSync(_0x352cec['lMcOa'](join,getSkillsDir(_0x352cec['QxHtH']),_0x8ab0ce(0x1d6),'SKILL.md')),_0x3364de=existsSync(_0x352cec[_0x8ab0ce(0x1d3)](join,getSkillsDir(_0x8ab0ce(0x1da)),_0x352cec['MeaQg'],_0x352cec['Eqftb']));if(_0x352cec['XKNla'](_0x20e858,_0x3364de))return console['log'](_0x352cec[_0x8ab0ce(0x1c4)]),![];const _0x47eac4=_0x352cec[_0x8ab0ce(0x1d8)](existsSync,join(getProjectRoot(),_0x352cec[_0x8ab0ce(0x1c1)]));let _0x47ccdd=!![];if(_0x51d3fa)await _0x352cec[_0x8ab0ce(0x1e0)](skillup,{'autoInstall':_0x51d3fa,'suppressUsage':!![]});else{if(_0x47eac4)await _0x352cec[_0x8ab0ce(0x1d8)](skillup,{'autoInstall':_0x352cec[_0x8ab0ce(0x1e2)],'suppressUsage':!![]});else{const _0x4eac82=await _0x4f01dd['prompt']([{'type':'confirm','name':'wantsSkillup','message':_0x352cec['ixbah'],'default':!![]}]);_0x47ccdd=_0x4eac82[_0x8ab0ce(0x1de)],_0x47ccdd&&await skillup({'suppressUsage':!![]});}}return _0x47ccdd;}
@@ -1 +1 @@
1
- function _0x322e(){const _0x3b24fa=['63hAAtZY','\x0a📦\x20OpenCode\x20Plugin\x0a','7602oTNSUK','User\x20(available\x20in\x20all\x20your\x20projects)','2028rIGWeL','prompt','42zGgaNn','Project\x20(shared\x20with\x20team\x20via\x20git)','✓\x20OpenCode\x20plugin\x20configured','Failed\x20to\x20read\x20opencode.json','@ranger-testing/opencode-plugin','user','577256XQDaZZ','5269oXMAlb','plugin','opencode.json','pluginScope','XgHsq','75140bDumnk','pUjcM','parse','project','utf-8','27845gvdAYx','12420SjKOCw','680MUPQWK','1446bjIfoL','TcyqW','includes','13165MrRgHz','384912EyfOmF','$schema','Where\x20should\x20the\x20plugin\x20be\x20installed?','log'];_0x322e=function(){return _0x3b24fa;};return _0x322e();}(function(_0x3d80e3,_0x53b50f){const _0x5071f2=_0x46f1,_0x557e51=_0x3d80e3();while(!![]){try{const _0x2b07c0=-parseInt(_0x5071f2(0x1af))/0x1*(parseInt(_0x5071f2(0x1c0))/0x2)+-parseInt(_0x5071f2(0x1b6))/0x3+parseInt(_0x5071f2(0x1b1))/0x4*(parseInt(_0x5071f2(0x1b5))/0x5)+parseInt(_0x5071f2(0x1b2))/0x6*(-parseInt(_0x5071f2(0x1bc))/0x7)+-parseInt(_0x5071f2(0x1a4))/0x8*(-parseInt(_0x5071f2(0x1ba))/0x9)+-parseInt(_0x5071f2(0x1b0))/0xa*(parseInt(_0x5071f2(0x1a5))/0xb)+-parseInt(_0x5071f2(0x1be))/0xc*(-parseInt(_0x5071f2(0x1aa))/0xd);if(_0x2b07c0===_0x53b50f)break;else _0x557e51['push'](_0x557e51['shift']());}catch(_0x235453){_0x557e51['push'](_0x557e51['shift']());}}}(_0x322e,0x57d9c));import{join}from'path';function _0x46f1(_0x494566,_0x37e6d5){_0x494566=_0x494566-0x19f;const _0x322e4b=_0x322e();let _0x46f167=_0x322e4b[_0x494566];return _0x46f167;}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x2ed354 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x15d76e){const _0x151c3e=_0x46f1,_0x1029a8={'dwQWd':function(_0xf56e19,_0x41c561){return _0xf56e19(_0x41c561);},'XgHsq':_0x151c3e(0x1bb),'lmNxg':'pluginScope','pUjcM':_0x151c3e(0x1b8),'zNQiz':_0x151c3e(0x1bd),'bikTD':_0x151c3e(0x19f),'JtnuT':function(_0x4fe248,_0x596bae){return _0x4fe248(_0x596bae);},'negpd':'https://opencode.ai/config.json','TcyqW':_0x151c3e(0x1ae),'lWweY':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','yBMCu':_0x151c3e(0x1a1),'OiMEw':function(_0x5d58b9,_0x1a1413,_0xffd11a){return _0x5d58b9(_0x1a1413,_0xffd11a);},'KwJCc':function(_0x5a0da6,_0x48590a){return _0x5a0da6(_0x48590a);},'SwKXe':_0x151c3e(0x1a0)},_0xe113a8=_0x1029a8['dwQWd'](existsSync,join(getOpencodeConfigDir('project'),_0x151c3e(0x1a7)));let _0x17a74d;if(_0x15d76e)_0x17a74d=_0x15d76e;else{if(_0xe113a8)_0x17a74d='project';else{console['log'](_0x1029a8[_0x151c3e(0x1a9)]);const _0x2bb8ee=await _0x2ed354[_0x151c3e(0x1bf)]([{'type':'list','name':_0x1029a8['lmNxg'],'message':_0x1029a8[_0x151c3e(0x1ab)],'choices':[{'name':_0x1029a8['zNQiz'],'value':'user'},{'name':_0x1029a8['bikTD'],'value':_0x151c3e(0x1ad)}],'default':_0x151c3e(0x1a3)}]);_0x17a74d=_0x2bb8ee[_0x151c3e(0x1a8)];}}const _0x6d6409=join(_0x1029a8['JtnuT'](getOpencodeConfigDir,_0x17a74d),'opencode.json'),_0x25be4d=_0x151c3e(0x1a2),_0x44e3dc=_0x1029a8['negpd'];let _0x1ebf2b={};if(existsSync(_0x6d6409))try{const _0x5163d5=await readFile(_0x6d6409,_0x1029a8[_0x151c3e(0x1b3)]);_0x1ebf2b=JSON[_0x151c3e(0x1ac)](_0x5163d5);}catch(_0x49e5d7){return console['error'](_0x1029a8['lWweY']),{'configured':![],'scope':_0x17a74d,'error':_0x1029a8['yBMCu'],'details':_0x49e5d7};}const _0x2e8396=Array['isArray'](_0x1ebf2b['plugin'])?_0x1ebf2b[_0x151c3e(0x1a6)]:[];if(_0x2e8396[_0x151c3e(0x1b4)](_0x25be4d))return console['log']('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x17a74d};return _0x1ebf2b[_0x151c3e(0x1b7)]=_0x1ebf2b[_0x151c3e(0x1b7)]||_0x44e3dc,_0x1ebf2b[_0x151c3e(0x1a6)]=[..._0x2e8396,_0x25be4d],await _0x1029a8['OiMEw'](mkdir,_0x1029a8['KwJCc'](getOpencodeConfigDir,_0x17a74d),{'recursive':!![]}),await writeFile(_0x6d6409,JSON['stringify'](_0x1ebf2b,null,0x2)+'\x0a'),console[_0x151c3e(0x1b9)](_0x1029a8['SwKXe']),{'configured':!![],'scope':_0x17a74d};}
1
+ function _0x438a(_0x422c77,_0x5087d8){_0x422c77=_0x422c77-0x1e7;const _0x310f80=_0x310f();let _0x438a32=_0x310f80[_0x422c77];return _0x438a32;}(function(_0x11bfa2,_0xbe4f2d){const _0x3aef98=_0x438a,_0x1b28f6=_0x11bfa2();while(!![]){try{const _0x2ca8e5=parseInt(_0x3aef98(0x203))/0x1+parseInt(_0x3aef98(0x1ef))/0x2+parseInt(_0x3aef98(0x1f1))/0x3*(-parseInt(_0x3aef98(0x1e8))/0x4)+parseInt(_0x3aef98(0x1f4))/0x5*(-parseInt(_0x3aef98(0x1ed))/0x6)+-parseInt(_0x3aef98(0x1fc))/0x7+-parseInt(_0x3aef98(0x1f3))/0x8*(parseInt(_0x3aef98(0x1ea))/0x9)+parseInt(_0x3aef98(0x1fd))/0xa;if(_0x2ca8e5===_0xbe4f2d)break;else _0x1b28f6['push'](_0x1b28f6['shift']());}catch(_0x55b192){_0x1b28f6['push'](_0x1b28f6['shift']());}}}(_0x310f,0x2eb6f));import{join}from'path';function _0x310f(){const _0x381272=['$schema','user','2658971aKfhzG','6426830HhSigA','\x0a📦\x20OpenCode\x20Plugin\x0a','pluginScope','plugin','log','opencode.json','349800xmNbMf','zrDXR','44pmkEPI','✓\x20OpenCode\x20plugin\x20configured','451062kRXFSc','DUTHi','User\x20(available\x20in\x20all\x20your\x20projects)','181092TmRTjx','✓\x20OpenCode\x20plugin\x20already\x20configured','107412VwFqwv','lbPVK','50175voWuxr','project','32nYhZyg','15VkSEJV','stringify','Where\x20should\x20the\x20plugin\x20be\x20installed?','https://opencode.ai/config.json','Failed\x20to\x20read\x20opencode.json','isArray'];_0x310f=function(){return _0x381272;};return _0x310f();}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x54a800 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x3b6125){const _0x2391a6=_0x438a,_0x4fb5dc={'lbPVK':function(_0x4ed3f0,_0x53dcb8){return _0x4ed3f0(_0x53dcb8);},'zrDXR':_0x2391a6(0x1f2),'rKWGB':'pluginScope','kdalD':_0x2391a6(0x1f6),'NfMzZ':_0x2391a6(0x1fb),'uKKyL':function(_0x314afb,_0x437fc0,_0x22ae1a){return _0x314afb(_0x437fc0,_0x22ae1a);},'DUTHi':'opencode.json','fmPLb':'@ranger-testing/opencode-plugin','SdPFN':_0x2391a6(0x1f7),'hPTKX':function(_0x439546,_0x36b9a6,_0xc5ca07){return _0x439546(_0x36b9a6,_0xc5ca07);},'srfBf':'utf-8','RrMcO':_0x2391a6(0x1e9)},_0x57befb=_0x4fb5dc[_0x2391a6(0x1f0)](existsSync,join(getOpencodeConfigDir(_0x4fb5dc[_0x2391a6(0x1e7)]),_0x2391a6(0x202)));let _0x58abad;if(_0x3b6125)_0x58abad=_0x3b6125;else{if(_0x57befb)_0x58abad=_0x4fb5dc[_0x2391a6(0x1e7)];else{console[_0x2391a6(0x201)](_0x2391a6(0x1fe));const _0x238161=await _0x54a800['prompt']([{'type':'list','name':_0x4fb5dc['rKWGB'],'message':_0x4fb5dc['kdalD'],'choices':[{'name':_0x2391a6(0x1ec),'value':_0x2391a6(0x1fb)},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x4fb5dc['zrDXR']}],'default':_0x4fb5dc['NfMzZ']}]);_0x58abad=_0x238161[_0x2391a6(0x1ff)];}}const _0x2cedce=_0x4fb5dc['uKKyL'](join,getOpencodeConfigDir(_0x58abad),_0x4fb5dc[_0x2391a6(0x1eb)]),_0x537616=_0x4fb5dc['fmPLb'],_0x46f42e=_0x4fb5dc['SdPFN'];let _0x22ea30={};if(existsSync(_0x2cedce))try{const _0x55bf88=await _0x4fb5dc['hPTKX'](readFile,_0x2cedce,_0x4fb5dc['srfBf']);_0x22ea30=JSON['parse'](_0x55bf88);}catch(_0x1e910e){return console['error']('⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.'),{'configured':![],'scope':_0x58abad,'error':_0x2391a6(0x1f8),'details':_0x1e910e};}const _0x4eaceb=Array[_0x2391a6(0x1f9)](_0x22ea30['plugin'])?_0x22ea30[_0x2391a6(0x200)]:[];if(_0x4eaceb['includes'](_0x537616))return console[_0x2391a6(0x201)](_0x2391a6(0x1ee)),{'configured':![],'scope':_0x58abad};return _0x22ea30[_0x2391a6(0x1fa)]=_0x22ea30['$schema']||_0x46f42e,_0x22ea30[_0x2391a6(0x200)]=[..._0x4eaceb,_0x537616],await mkdir(getOpencodeConfigDir(_0x58abad),{'recursive':!![]}),await writeFile(_0x2cedce,JSON[_0x2391a6(0x1f5)](_0x22ea30,null,0x2)+'\x0a'),console['log'](_0x4fb5dc['RrMcO']),{'configured':!![],'scope':_0x58abad};}
@@ -1 +1 @@
1
- function _0x1def(_0x101f91,_0xee37){_0x101f91=_0x101f91-0x159;var _0xe03d98=_0xe03d();var _0x1def60=_0xe03d98[_0x101f91];return _0x1def60;}(function(_0xed2c77,_0x30d800){var _0x262057=_0x1def,_0x74396b=_0xed2c77();while(!![]){try{var _0x122b2e=-parseInt(_0x262057(0x15d))/0x1+-parseInt(_0x262057(0x160))/0x2*(-parseInt(_0x262057(0x15a))/0x3)+parseInt(_0x262057(0x15b))/0x4+-parseInt(_0x262057(0x15f))/0x5+parseInt(_0x262057(0x15c))/0x6*(parseInt(_0x262057(0x159))/0x7)+parseInt(_0x262057(0x167))/0x8*(-parseInt(_0x262057(0x161))/0x9)+-parseInt(_0x262057(0x166))/0xa*(-parseInt(_0x262057(0x165))/0xb);if(_0x122b2e===_0x30d800)break;else _0x74396b['push'](_0x74396b['shift']());}catch(_0x336b62){_0x74396b['push'](_0x74396b['shift']());}}}(_0xe03d,0xaddc8));export async function setupCi(_0x1e253b,_0x2494ac,_0x10d007){var _0x139b0f=_0x1def,_0x375fc4={'JFmSe':function(_0x5965f1,_0x2bb1b1){return _0x5965f1+_0x2bb1b1;},'hUrJi':'ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','EKqnA':_0x139b0f(0x162)};console['error'](_0x375fc4[_0x139b0f(0x163)](_0x375fc4['JFmSe'](_0x375fc4['hUrJi']+'\x0a'+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x375fc4['EKqnA'])+'\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+_0x139b0f(0x164)),process[_0x139b0f(0x15e)](0x1);}function _0xe03d(){var _0x177702=['\x20\x20ranger\x20profile\x20add\x20<name>\x0a','JFmSe','\x20\x20https://docs.ranger.net/main/concepts/profiles','1892ixPaLG','2670rvpPLH','1888JzKokN','77oonurN','341595siEXji','4413032kgAZvQ','355692NcksqE','557637WJWnWa','exit','2318845saGSBg','4jaqMnk','11268yQwLDP'];_0xe03d=function(){return _0x177702;};return _0xe03d();}
1
+ (function(_0x3a1a3c,_0x18546e){var _0x3ead8f=_0x1c4f,_0x1aa116=_0x3a1a3c();while(!![]){try{var _0x24ba8d=-parseInt(_0x3ead8f(0x73))/0x1+-parseInt(_0x3ead8f(0x77))/0x2+-parseInt(_0x3ead8f(0x6e))/0x3+parseInt(_0x3ead8f(0x72))/0x4+parseInt(_0x3ead8f(0x76))/0x5+-parseInt(_0x3ead8f(0x78))/0x6*(parseInt(_0x3ead8f(0x70))/0x7)+parseInt(_0x3ead8f(0x75))/0x8;if(_0x24ba8d===_0x18546e)break;else _0x1aa116['push'](_0x1aa116['shift']());}catch(_0x569da2){_0x1aa116['push'](_0x1aa116['shift']());}}}(_0x46d6,0x9d999));function _0x1c4f(_0x45f059,_0x288252){_0x45f059=_0x45f059-0x6c;var _0x46d6d4=_0x46d6();var _0x1c4f9b=_0x46d6d4[_0x45f059];return _0x1c4f9b;}function _0x46d6(){var _0x27d899=['19749512YkVTjr','3295805PatJjD','1431672OACGEA','29244RZxVcR','QbgZs','rAiQw','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','2968341DeYBqO','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','784Ewukvp','hbpIR','3718448FKJDmt','1160762KiSOrs','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'];_0x46d6=function(){return _0x27d899;};return _0x46d6();}export async function setupCi(_0x3a56e9,_0x32ad64,_0x64d297){var _0x182d17=_0x1c4f,_0x59f07a={'QbgZs':function(_0x39bc7e,_0x4bebc1){return _0x39bc7e+_0x4bebc1;},'rAiQw':function(_0x46089a,_0x95f857){return _0x46089a+_0x95f857;},'dVFBF':function(_0x377ae3,_0x1b4443){return _0x377ae3+_0x1b4443;},'bROiw':_0x182d17(0x6d),'hbpIR':_0x182d17(0x6f),'oFYlm':_0x182d17(0x74)};console['error'](_0x59f07a['QbgZs'](_0x59f07a[_0x182d17(0x79)](_0x59f07a[_0x182d17(0x6c)](_0x59f07a['dVFBF']('ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','\x0a'),_0x59f07a['bROiw'])+_0x59f07a[_0x182d17(0x71)],'\x0a'),_0x59f07a['oFYlm'])+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process['exit'](0x1);}
@@ -1 +1 @@
1
- (function(_0x5cebb4,_0x5040d8){const _0x2c364d=_0x1400,_0x484eb2=_0x5cebb4();while(!![]){try{const _0x5dbdd8=-parseInt(_0x2c364d(0xc4))/0x1+-parseInt(_0x2c364d(0xc0))/0x2+-parseInt(_0x2c364d(0xdc))/0x3*(-parseInt(_0x2c364d(0xbf))/0x4)+-parseInt(_0x2c364d(0xe8))/0x5*(parseInt(_0x2c364d(0xc7))/0x6)+parseInt(_0x2c364d(0xbb))/0x7*(-parseInt(_0x2c364d(0xbc))/0x8)+parseInt(_0x2c364d(0xca))/0x9*(-parseInt(_0x2c364d(0xe5))/0xa)+parseInt(_0x2c364d(0xe0))/0xb*(parseInt(_0x2c364d(0xdb))/0xc);if(_0x5dbdd8===_0x5040d8)break;else _0x484eb2['push'](_0x484eb2['shift']());}catch(_0x988f1a){_0x484eb2['push'](_0x484eb2['shift']());}}}(_0x24c2,0x2065a));function _0x1400(_0x22455a,_0x326843){_0x22455a=_0x22455a-0xbb;const _0x24c2d7=_0x24c2();let _0x14002f=_0x24c2d7[_0x22455a];return _0x14002f;}import{basename}from'path';import _0x4ccc69 from'inquirer';function _0x24c2(){const _0x11997c=['150ilgxjs','aiIdY','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','556848GTIoVh','user-level','\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!','project-level','Bzbwa','warn','prompt','installLevel','opencode','project','guFtw','\x20successfully!\x0a','message','3|4|0|1|2|5','JVBwn','ranger','\x20--opencode','48XbvktW','471avkDuq','\x20skill','\x0a✅\x20Installed\x20','log','2129083alEoiW','rRQMU','/skills/','/.claude/skills/','✓\x20Found\x20API\x20token','20rIHZFZ','user','\x20<your-api-token>','47375HPWAiG','\x0a📦\x20Installing\x20skills...\x0a','RKlgY','list','28iIiORB','234448zMHCts','This\x20project\x20only\x20(','GdMaF','4252IkOpKN','195684UhEoln','\x20\x203.\x20Run:\x20ranger\x20skillup','dMvWX','suppressUsage','232720kfVhCf','autoInstall','To\x20use:'];_0x24c2=function(){return _0x11997c;};return _0x24c2();}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(_0x5df915={}){const _0xa51fa8=_0x1400,_0x2580a2={'RKlgY':'claude','dMvWX':function(_0x5df9f9){return _0x5df9f9();},'HDmgm':'\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','CFrzv':function(_0x62361,_0x140229){return _0x62361===_0x140229;},'rRQMU':'opencode','aiIdY':_0xa51fa8(0xda),'aUtPu':'❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','JVBwn':'user','Bzbwa':_0xa51fa8(0xd1),'DRdhP':_0xa51fa8(0xd3),'GdMaF':_0xa51fa8(0xe9),'guFtw':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','uXioR':_0xa51fa8(0xcc)};console[_0xa51fa8(0xdf)]('\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a');const _0x22947a=_0x5df915['platform']??_0x2580a2[_0xa51fa8(0xea)],_0x4051cd=await _0x2580a2[_0xa51fa8(0xc2)](getToken);if(!_0x4051cd){const _0x360c97=_0xa51fa8(0xd7)['split']('|');let _0x2653ec=0x0;while(!![]){switch(_0x360c97[_0x2653ec++]){case'0':console[_0xa51fa8(0xdf)](_0x2580a2['HDmgm']);continue;case'1':console[_0xa51fa8(0xdf)]('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x2580a2['CFrzv'](_0x22947a,_0x2580a2[_0xa51fa8(0xe1)])?_0x2580a2[_0xa51fa8(0xc8)]:'')+_0xa51fa8(0xe7));continue;case'2':console[_0xa51fa8(0xdf)](_0xa51fa8(0xc1)+(_0x22947a===_0xa51fa8(0xd2)?'\x20--opencode':'')+'\x0a');continue;case'3':console[_0xa51fa8(0xdf)](_0x2580a2['aUtPu']);continue;case'4':console['log']('To\x20get\x20started:');continue;case'5':return;}break;}}console[_0xa51fa8(0xdf)](_0xa51fa8(0xe4));const _0x2ed0b7=_0x2580a2[_0xa51fa8(0xc2)](getProjectRoot),_0x3346be=basename(_0x2ed0b7),_0x425bc0=_0x22947a===_0x2580a2['rRQMU']?getOpencodeConfigDir(_0x2580a2[_0xa51fa8(0xd8)])+'/skills/':getClaudeConfigDir()+_0xa51fa8(0xe2),_0xbf653b=_0x2580a2['CFrzv'](_0x22947a,_0x2580a2[_0xa51fa8(0xe1)])?_0x2ed0b7+'/.opencode/skills/':_0x2ed0b7+_0xa51fa8(0xe3),_0x5b16a5=process['stdin']['isTTY']&&process['stdout']['isTTY'];let _0xbe2d1;if(_0x5df915[_0xa51fa8(0xc5)])_0xbe2d1=_0x5df915[_0xa51fa8(0xc5)];else{if(_0x5b16a5){const _0x586755=await _0x4ccc69[_0xa51fa8(0xd0)]([{'type':_0xa51fa8(0xeb),'name':_0x2580a2[_0xa51fa8(0xce)],'message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':'All\x20projects\x20('+_0x425bc0+')','value':'user'},{'name':_0xa51fa8(0xbd)+_0xbf653b+')','value':_0x2580a2['DRdhP']}]}]);_0xbe2d1=_0x586755[_0xa51fa8(0xd1)];}else _0xbe2d1=_0x2580a2['DRdhP'],console['log'](_0xa51fa8(0xc9)+_0xbf653b+')');}let _0xb999b2=0x0;const _0x386a01=_0x2580a2['dMvWX'](getCurrentVersion);console['log'](_0x2580a2[_0xa51fa8(0xbe)]);try{const _0x322cc7=await installSkill(_0xa51fa8(0xd9),{'cliVersion':_0x386a01,'level':_0xbe2d1,'platform':_0x22947a});_0x322cc7&&_0xb999b2++;}catch(_0x1feb43){console[_0xa51fa8(0xcf)](_0x2580a2[_0xa51fa8(0xd4)],_0x1feb43 instanceof Error?_0x1feb43[_0xa51fa8(0xd6)]:_0x1feb43);}if(_0xb999b2>0x0){const _0x4a5cb2=_0xbe2d1===_0xa51fa8(0xe6)?_0xa51fa8(0xcb):_0xa51fa8(0xcd);console[_0xa51fa8(0xdf)](_0xa51fa8(0xde)+_0xb999b2+'\x20'+_0x4a5cb2+_0xa51fa8(0xdd)+(_0xb999b2>0x1?'s':'')+_0xa51fa8(0xd5)),!_0x5df915[_0xa51fa8(0xc3)]&&(console[_0xa51fa8(0xdf)](_0xa51fa8(0xc6)),_0x22947a===_0xa51fa8(0xd2)?console[_0xa51fa8(0xdf)]('\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'):console[_0xa51fa8(0xdf)](_0x2580a2['uXioR']));}else console['log']('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
1
+ (function(_0x23a3a3,_0x5bd8b0){const _0x2cd117=_0x23e9,_0x2a55eb=_0x23a3a3();while(!![]){try{const _0x178ea3=-parseInt(_0x2cd117(0x127))/0x1*(parseInt(_0x2cd117(0x136))/0x2)+-parseInt(_0x2cd117(0x141))/0x3*(parseInt(_0x2cd117(0x145))/0x4)+parseInt(_0x2cd117(0x12e))/0x5*(-parseInt(_0x2cd117(0x134))/0x6)+-parseInt(_0x2cd117(0x152))/0x7*(-parseInt(_0x2cd117(0x130))/0x8)+parseInt(_0x2cd117(0x12b))/0x9*(-parseInt(_0x2cd117(0x144))/0xa)+-parseInt(_0x2cd117(0x147))/0xb+-parseInt(_0x2cd117(0x137))/0xc*(-parseInt(_0x2cd117(0x13c))/0xd);if(_0x178ea3===_0x5bd8b0)break;else _0x2a55eb['push'](_0x2a55eb['shift']());}catch(_0x26b575){_0x2a55eb['push'](_0x2a55eb['shift']());}}}(_0x4941,0xc1c40));import{basename}from'path';import _0x3c011a from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';function _0x23e9(_0x2d9e8d,_0xe4c303){_0x2d9e8d=_0x2d9e8d-0x11f;const _0x494103=_0x4941();let _0x23e90c=_0x494103[_0x2d9e8d];return _0x23e90c;}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';function _0x4941(){const _0x3d310a=['project','45TSxfFG','/.claude/skills/','31992VPRjoW','isTTY','All\x20projects\x20(','log','1052442kHmedc','\x20skill','5310MbqYeW','1615284dIdoth','ranger','prompt','opencode','list','351xmFmtS','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','message','/.opencode/skills/','87618sOpFcS','installLevel','\x20--opencode','338970ZqShjL','148BEfTPJ','kYTGE','582450YQQJzw','jqvSt','MBhbu','autoInstall','stdout','POSZV','1|4|2|3|0|5','\x0a✅\x20Installed\x20','user','\x20<your-api-token>','\x20\x203.\x20Run:\x20ranger\x20skillup','1477ozDxLI','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!','gZPys','TDfZx','wJlbE','mVjtg','ZqeMw','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','213vkSBrc','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','user-level','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','108Qpkjmr','✓\x20Found\x20API\x20token'];_0x4941=function(){return _0x3d310a;};return _0x4941();}export async function skillup(_0x23120c={}){const _0x4e7962=_0x23e9,_0x8ccd80={'GHKIV':_0x4e7962(0x11f),'mVjtg':'claude','TDfZx':_0x4e7962(0x143),'wJlbE':_0x4e7962(0x128),'kYTGE':function(_0x5222c2,_0x476551){return _0x5222c2===_0x476551;},'ZqeMw':_0x4e7962(0x13a),'jqvSt':function(_0x1526d3){return _0x1526d3();},'MBhbu':_0x4e7962(0x13b),'VNQbb':'Where\x20should\x20skills\x20be\x20installed?','Utzjz':_0x4e7962(0x12d),'gZPys':function(_0x33858f,_0x493578,_0x40972e){return _0x33858f(_0x493578,_0x40972e);},'bfPUp':_0x4e7962(0x12a),'YxsTS':function(_0x1f169d,_0x57b35c){return _0x1f169d>_0x57b35c;},'POSZV':_0x4e7962(0x129),'cldex':'project-level','iahnx':'To\x20use:','sxDJe':_0x4e7962(0x120)};console[_0x4e7962(0x133)](_0x8ccd80['GHKIV']);const _0x1ea59b=_0x23120c['platform']??_0x8ccd80[_0x4e7962(0x124)],_0xd3b9cd=await getToken();if(!_0xd3b9cd){const _0xff1a13=_0x4e7962(0x14d)['split']('|');let _0x55eb8d=0x0;while(!![]){switch(_0xff1a13[_0x55eb8d++]){case'0':console['log'](_0x4e7962(0x151)+(_0x1ea59b==='opencode'?_0x8ccd80[_0x4e7962(0x122)]:'')+'\x0a');continue;case'1':console['log'](_0x4e7962(0x13e));continue;case'2':console[_0x4e7962(0x133)](_0x8ccd80[_0x4e7962(0x123)]);continue;case'3':console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x8ccd80['kYTGE'](_0x1ea59b,_0x8ccd80[_0x4e7962(0x125)])?_0x4e7962(0x143):'')+_0x4e7962(0x150));continue;case'4':console['log']('To\x20get\x20started:');continue;case'5':return;}break;}}console[_0x4e7962(0x133)](_0x4e7962(0x12c));const _0x55de8c=getProjectRoot(),_0x160720=basename(_0x55de8c),_0x2d76a2=_0x8ccd80[_0x4e7962(0x146)](_0x1ea59b,_0x8ccd80[_0x4e7962(0x125)])?getOpencodeConfigDir(_0x4e7962(0x14f))+'/skills/':_0x8ccd80['jqvSt'](getClaudeConfigDir)+'/skills/',_0x4e1b2e=_0x1ea59b===_0x8ccd80[_0x4e7962(0x125)]?_0x55de8c+_0x4e7962(0x140):_0x55de8c+_0x4e7962(0x12f),_0x2aa1e6=process['stdin'][_0x4e7962(0x131)]&&process[_0x4e7962(0x14b)][_0x4e7962(0x131)];let _0x2a19d5;if(_0x23120c[_0x4e7962(0x14a)])_0x2a19d5=_0x23120c[_0x4e7962(0x14a)];else{if(_0x2aa1e6){const _0x578cac=await _0x3c011a[_0x4e7962(0x139)]([{'type':_0x8ccd80[_0x4e7962(0x149)],'name':_0x4e7962(0x142),'message':_0x8ccd80['VNQbb'],'choices':[{'name':_0x4e7962(0x132)+_0x2d76a2+')','value':'user'},{'name':'This\x20project\x20only\x20('+_0x4e1b2e+')','value':_0x8ccd80['Utzjz']}]}]);_0x2a19d5=_0x578cac[_0x4e7962(0x142)];}else _0x2a19d5=_0x4e7962(0x12d),console[_0x4e7962(0x133)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x4e1b2e+')');}let _0x43d60b=0x0;const _0x39166e=_0x8ccd80[_0x4e7962(0x148)](getCurrentVersion);console[_0x4e7962(0x133)]('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x1e91e9=await _0x8ccd80[_0x4e7962(0x121)](installSkill,_0x4e7962(0x138),{'cliVersion':_0x39166e,'level':_0x2a19d5,'platform':_0x1ea59b});_0x1e91e9&&_0x43d60b++;}catch(_0x4d919e){console['warn'](_0x8ccd80['bfPUp'],_0x4d919e instanceof Error?_0x4d919e[_0x4e7962(0x13f)]:_0x4d919e);}if(_0x8ccd80['YxsTS'](_0x43d60b,0x0)){const _0x20c3bc=_0x8ccd80[_0x4e7962(0x146)](_0x2a19d5,_0x4e7962(0x14f))?_0x8ccd80[_0x4e7962(0x14c)]:_0x8ccd80['cldex'];console['log'](_0x4e7962(0x14e)+_0x43d60b+'\x20'+_0x20c3bc+_0x4e7962(0x135)+(_0x43d60b>0x1?'s':'')+'\x20successfully!\x0a'),!_0x23120c['suppressUsage']&&(console[_0x4e7962(0x133)](_0x8ccd80['iahnx']),_0x1ea59b==='opencode'?console[_0x4e7962(0x133)](_0x4e7962(0x126)):console[_0x4e7962(0x133)](_0x8ccd80['sxDJe']));}else console[_0x4e7962(0x133)](_0x4e7962(0x13d));}
@@ -1 +1 @@
1
- const _0x5071b4=_0xa611;(function(_0x481740,_0x2269b7){const _0x89418=_0xa611,_0x182230=_0x481740();while(!![]){try{const _0x396d11=parseInt(_0x89418(0xc2))/0x1*(parseInt(_0x89418(0xaf))/0x2)+-parseInt(_0x89418(0xe1))/0x3+-parseInt(_0x89418(0xda))/0x4*(-parseInt(_0x89418(0xe2))/0x5)+-parseInt(_0x89418(0xb0))/0x6*(-parseInt(_0x89418(0xa8))/0x7)+parseInt(_0x89418(0xf9))/0x8*(parseInt(_0x89418(0xe0))/0x9)+parseInt(_0x89418(0xbd))/0xa*(parseInt(_0x89418(0xb4))/0xb)+parseInt(_0x89418(0xe9))/0xc*(-parseInt(_0x89418(0xf2))/0xd);if(_0x396d11===_0x2269b7)break;else _0x182230['push'](_0x182230['shift']());}catch(_0x23bd5a){_0x182230['push'](_0x182230['shift']());}}}(_0xea47,0x56cf9));function _0xa611(_0x2b0afe,_0x5b400d){_0x2b0afe=_0x2b0afe-0x98;const _0xea47fc=_0xea47();let _0xa61153=_0xea47fc[_0x2b0afe];return _0xa61153;}import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x43049a from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x5071b4(0xf6);function _0xea47(){const _0x42f9ae=['You\x20can\x20install\x20it\x20manually\x20by\x20running:','Authentication\x20failed:\x20','GITHUB_ENV','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','68agyVxJ','knxHp','scope','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','ranger\x20profile\x20add\x20<name>','oAZhu','UEdit','NwUiA','npx','success','slopL','chromium','version','\x0a❌\x20Profile\x20setup\x20failed:','allowInsecureLocalhost','yMJMQ','bBeQr','✓\x20Playwright\x20Chromium\x20browser\x20found','inherit','FmlcH','skipped','QKGIC','vtlOh','\x20is\x20no\x20longer\x20supported.\x20','20paSrti','skipChromium','error','trackPhaseStart','user','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','126HfjlZs','243249TMYodR','566025KtBimk','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','SjFTn','auth','platform','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x0a\x20\x20','1291692jlSLzs','kUDzj','CfZEL','✓\x20Created\x20.ranger/.gitignore','\x20install\x20chromium','install','✓\x20Created\x20~/.ranger/\x20directory','trackPhaseEnd','HqZxD','208ygWmCz','AgJEo','naVBn','message','1.58.2','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','cQQqe','218096DiXzlq','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','The\x20required\x20version\x20(','opencode','exit','PgtdA','close','aqvvA','nBycZ','ranger','status','warn','/ranger:enable','oRKpd','resolve','log','playwright/package.json','CQPsA','url','VDkpv','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','organizationName','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','✓\x20Exported\x20credentials\x20for\x20CI','2254nhiPDv','joiio','\x0a🚀\x20Ranger\x20Setup\x0a',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','.gitignore','\x0aIn\x20Claude\x20Code,\x20run\x20','isTTY','6158EXQkRP','8106GmxFSM','✓\x20~/.ranger/\x20directory\x20already\x20exists','ignore','cipvg','11cSmQRo','✓\x20Authenticated\x20to\x20','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','\x0a⚠\x20Skipping\x20Chromium\x20installation.','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','plugin','zFRtL','provided_token','prompt','5668290ycyDDi'];_0xea47=function(){return _0x42f9ae;};return _0xea47();}const bold=_0x113809=>'\x1b[1m'+_0x113809+'\x1b[0m';export function getPlaywrightVersion(){const _0x4e5837=_0x5071b4,_0x4f2d70={'AgJEo':_0x4e5837(0x9f),'aqvvA':function(_0x3327bf,_0x4444b9){return _0x3327bf(_0x4444b9);}};try{const _0x3421c9=require[_0x4e5837(0x9d)](_0x4f2d70[_0x4e5837(0xf3)]),_0x48f374=_0x4f2d70[_0x4e5837(0x100)](require,_0x3421c9);return _0x48f374[_0x4e5837(0xce)];}catch{return null;}}export function installChromiumBinary(_0x1aaa73,_0x3e5832=![]){const _0x4ffbbd=_0x5071b4,_0x35c3a9={'joiio':function(_0x3c286e,_0x39bd45){return _0x3c286e(_0x39bd45);},'VabGo':_0x4ffbbd(0xee),'slopL':_0x4ffbbd(0xcd),'yVALp':function(_0x4b0c2d,_0x59454d,_0x5b3ade,_0x2015bb){return _0x4b0c2d(_0x59454d,_0x5b3ade,_0x2015bb);},'qfqKr':_0x4ffbbd(0xb2),'FmlcH':_0x4ffbbd(0xd4),'guwcN':'win32','SjFTn':_0x4ffbbd(0xff),'YcaRO':'error'};return new Promise((_0x35d6c5,_0xe47e9d)=>{const _0xe49cfd=_0x4ffbbd,_0x33f688=['playwright@'+_0x1aaa73,_0x35c3a9['VabGo'],..._0x3e5832?['--with-deps']:[],_0x35c3a9[_0xe49cfd(0xcc)]],_0x140478=_0x35c3a9['yVALp'](spawn,_0xe49cfd(0xca),_0x33f688,{'stdio':[_0x35c3a9['qfqKr'],_0x35c3a9[_0xe49cfd(0xd5)],_0x35c3a9['FmlcH']],'shell':process[_0xe49cfd(0xe6)]===_0x35c3a9['guwcN']});_0x140478['on'](_0x35c3a9[_0xe49cfd(0xe4)],_0x3d68f5=>{const _0x372b27=_0xe49cfd;_0x3d68f5===0x0?_0x35d6c5():_0x35c3a9[_0x372b27(0xa9)](_0xe47e9d,new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x3d68f5));}),_0x140478['on'](_0x35c3a9['YcaRO'],_0x50ba48=>{_0xe47e9d(_0x50ba48);});});}export async function authenticate(_0x3c3559){const _0x154730=_0x5071b4,_0x382005={'JWffR':function(_0x5b7873){return _0x5b7873();},'zFRtL':'device_auth','xTlIn':'Validating\x20API\x20token...','EzCvD':'✓\x20Stored\x20credentials\x20locally'};if(!_0x3c3559){const _0x25e074=await _0x382005['JWffR'](getToken);if(_0x25e074){const _0x34ff74=await getCurrentUser(_0x25e074);if(_0x34ff74['success'])return console[_0x154730(0x9e)]('✓\x20Already\x20authenticated\x20to\x20'+_0x34ff74[_0x154730(0xde)][_0x154730(0xa5)]),{'token':_0x25e074,'method':'existing_token'};}try{_0x3c3559=await runDeviceAuthFlow();}catch(_0x1f4c97){throw new Error(_0x154730(0xbf)+(_0x1f4c97 instanceof Error?_0x1f4c97['message']:_0x1f4c97));}const _0x26d99e=await getCurrentUser(_0x3c3559);if(!_0x26d99e[_0x154730(0xcb)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x26d99e['error']);return console['log']('✓\x20Authenticated\x20to\x20'+_0x26d99e[_0x154730(0xde)]['organizationName']),{'token':_0x3c3559,'method':_0x382005[_0x154730(0xba)]};}console['log'](_0x382005['xTlIn']);const _0xe32222=await getCurrentUser(_0x3c3559);if(!_0xe32222[_0x154730(0xcb)]){if(_0xe32222[_0x154730(0x99)])throw new Error(_0x154730(0xbf)+_0xe32222['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0xe32222['error']+_0x154730(0xb6));}return console['log'](_0x154730(0xb5)+_0xe32222[_0x154730(0xde)][_0x154730(0xa5)]),await storeToken(_0x3c3559),console['log'](process['env'][_0x154730(0xc0)]?_0x154730(0xa7):_0x382005['EzCvD']),{'token':_0x3c3559,'method':_0x154730(0xbb)};}export async function ensureRangerDir(_0x1282b8){const _0x36cbba=_0x5071b4,_0x2e7cc3={'KrVOR':function(_0x5bb5bf){return _0x5bb5bf();},'qBGDb':_0x36cbba(0xb1)};void _0x1282b8;const _0x2ddcf6=_0x2e7cc3['KrVOR'](getRangerHomeDir);return!existsSync(_0x2ddcf6)?(await mkdir(_0x2ddcf6,{'recursive':!![]}),console[_0x36cbba(0x9e)](_0x36cbba(0xef)),{'path':_0x2ddcf6,'installed':!![]}):(console['log'](_0x2e7cc3['qBGDb']),{'path':_0x2ddcf6,'installed':![]});}export async function ensureChromium(_0xd49fe8=![]){const _0x14d772=_0x5071b4,_0x2e4207={'yMJMQ':'\x20(fallback\x20version)','UEdit':'\x0aInstalling\x20Chromium\x20browser...\x0a','knxHp':_0x14d772(0xa6),'PuZEr':function(_0x33f637,_0x16c6dc){return _0x33f637 instanceof _0x16c6dc;},'nBycZ':_0x14d772(0xbe),'oAZhu':_0x14d772(0xb7),'bBeQr':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0x1db60d=![];try{const _0x4fc80d=chromium['executablePath']();_0x1db60d=existsSync(_0x4fc80d);}catch{_0x1db60d=![];}if(_0x1db60d)return console['log'](_0x14d772(0xd3)),![];const _0x142927=getPlaywrightVersion(),_0xa20970=_0x142927??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x1bcbdb=!_0x142927,_0x135424=process['stdin'][_0x14d772(0xae)]&&process['stdout']['isTTY'];let _0x3581b9=!![];if(_0x135424){const {install:_0x49ee6a}=await _0x43049a[_0x14d772(0xbc)]([{'type':'confirm','name':_0x14d772(0xee),'message':_0x1bcbdb?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0xa20970+'\x20now?':_0x14d772(0xfb)+_0xa20970+_0x14d772(0xab),'default':!![]}]);_0x3581b9=_0x49ee6a;}else console[_0x14d772(0x9e)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0xa20970+(_0x1bcbdb?_0x2e4207[_0x14d772(0xd1)]:'')+'...');if(_0x3581b9){console['log'](_0x2e4207[_0x14d772(0xc8)]);try{await installChromiumBinary(_0xa20970,_0xd49fe8),console[_0x14d772(0x9e)]('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x411962){console[_0x14d772(0xdc)](_0x2e4207[_0x14d772(0xc3)],_0x2e4207['PuZEr'](_0x411962,Error)?_0x411962[_0x14d772(0xf5)]:_0x411962),console['log'](_0x2e4207[_0x14d772(0x101)]),console[_0x14d772(0x9e)]('\x20\x20npx\x20playwright@'+_0xa20970+_0x14d772(0xed));}}else console['log'](_0x2e4207[_0x14d772(0xc7)]),console['log'](_0x2e4207[_0x14d772(0xd2)]),console[_0x14d772(0x9e)]('\x20\x20npx\x20playwright@'+_0xa20970+_0x14d772(0xed));return!![];}export async function writeRangerGitignore(_0x25f82e){const _0x57efa9=_0x5071b4,_0x353a59={'naVBn':_0x57efa9(0xec)},_0x5cfc48=join(_0x25f82e,_0x57efa9(0xac)),_0x52f151='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await writeFile(_0x5cfc48,_0x52f151),console[_0x57efa9(0x9e)](_0x353a59[_0x57efa9(0xf4)]);}export async function ensureLocalEnv(_0x217f87,_0x38dbd4){const _0x45181f=_0x5071b4,_0x1847d7={'MDUYk':function(_0x59f2f7){return _0x59f2f7();},'HkZSG':function(_0x3471a0,_0x55dfb0){return _0x3471a0!==_0x55dfb0;},'qOtiC':_0x45181f(0xde),'zsppW':'⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','rJipg':function(_0x25db7f){return _0x25db7f();},'vtlOh':'local','jOJTI':function(_0x2b7b89,_0x115a80,_0x9fb389,_0xbe72d8){return _0x2b7b89(_0x115a80,_0x9fb389,_0xbe72d8);},'jksyd':_0x45181f(0xcf),'TcqLQ':function(_0xebee52,_0x4b1d4a){return _0xebee52 instanceof _0x4b1d4a;}};if(!_0x1847d7['MDUYk'](findGitRoot)&&_0x1847d7['HkZSG'](_0x217f87?.['scope'],_0x1847d7['qOtiC']))return console['log'](_0x1847d7['zsppW']),{'ready':![],'skipped':!![]};const _0x41eeae=_0x217f87?.['scope']===_0x45181f(0xde)?_0x1847d7['rJipg'](getRangerHomeDir):undefined;if(findExistingEnv(_0x1847d7[_0x45181f(0xd8)],{'locations':[_0x1847d7[_0x45181f(0xd8)]],'rangerDir':_0x41eeae}))return console['log']('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};try{return await _0x1847d7['jOJTI'](addEnv,'local',{'url':_0x217f87?.[_0x45181f(0xa1)],'force':_0x217f87?.['force'],'allowInsecureLocalhost':_0x217f87?.[_0x45181f(0xd0)],'scope':_0x217f87?.['scope']},_0x38dbd4),{'ready':!![],'skipped':![]};}catch(_0x38d814){return console[_0x45181f(0xdc)](_0x1847d7['jksyd'],_0x1847d7['TcqLQ'](_0x38d814,Error)?_0x38d814[_0x45181f(0xf5)]:_0x38d814),{'ready':![],'skipped':![]};}}export async function start(_0x44f8e0,_0xe22092,_0x5a1ef9){const _0x1168ef=_0x5071b4,_0x5764b7={'QxCpq':'user','PgtdA':function(_0x118c1b,_0x364eaf){return _0x118c1b(_0x364eaf);},'cipvg':function(_0x333a50){return _0x333a50();},'CfZEL':_0x1168ef(0xd6),'SzAzr':_0x1168ef(0xe5),'oRKpd':function(_0x5d9449,_0x4984dd){return _0x5d9449(_0x4984dd);},'Jntlh':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','vyjse':'chromium','IdPEo':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','NwUiA':_0x1168ef(0xb9),'HqZxD':function(_0x43012d,_0x5a9429){return _0x43012d(_0x5a9429);},'cQQqe':function(_0x378339,_0x445a12){return _0x378339&&_0x445a12;},'CQPsA':'skills','QKGIC':function(_0x147c55,_0x14ec06,_0x4e2dad){return _0x147c55(_0x14ec06,_0x4e2dad);},'Dyjpl':_0x1168ef(0x98),'PVVaw':_0x1168ef(0xfc),'sSfgC':function(_0x46d90c,_0x330524){return _0x46d90c instanceof _0x330524;},'kUDzj':function(_0x3be144,_0x4c4e94){return _0x3be144(_0x4c4e94);},'TZpET':_0x1168ef(0xa4),'UlGEN':function(_0x5a0704,_0x3c203d,_0x2ae8ea){return _0x5a0704(_0x3c203d,_0x2ae8ea);},'VDkpv':'profile','FeKAB':_0x1168ef(0xc6),'gsylj':_0x1168ef(0xfa),'fXgbY':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','OdvpU':_0x1168ef(0xe7),'oBgEc':function(_0x8bd2eb,_0x490721){return _0x8bd2eb+_0x490721;}};console[_0x1168ef(0x9e)](_0x1168ef(0xaa));_0xe22092?.['scope']!==undefined&&_0xe22092['scope']!==_0x5764b7['QxCpq']&&(console[_0x1168ef(0xdc)]('ranger\x20setup\x20--scope='+String(_0xe22092['scope'])+_0x1168ef(0xd9)+_0x1168ef(0xc5)+_0x1168ef(0xb8)),process[_0x1168ef(0xfd)](0x1));_0xe22092={..._0xe22092,'scope':_0x1168ef(0xde)};const _0x4ab3f4=!_0x5764b7[_0x1168ef(0xfe)](existsSync,_0x5764b7[_0x1168ef(0xb3)](getRangerHomeDir));await ensureRangerDir(_0x1168ef(0xde));if(_0xe22092?.['skipAuth'])console['log']('✓\x20Skipping\x20authentication\x20(--skip-auth)'),_0x5a1ef9?.['trackPhaseEnd'](_0x1168ef(0xe5),{'isFirstRun':_0x4ab3f4,'method':_0x5764b7[_0x1168ef(0xeb)]});else{_0x5a1ef9?.[_0x1168ef(0xdd)](_0x5764b7['SzAzr']);const _0x427694=await _0x5764b7[_0x1168ef(0x9c)](authenticate,_0x44f8e0);_0x5a1ef9?.['trackPhaseEnd'](_0x5764b7['SzAzr'],{'isFirstRun':_0x4ab3f4,'method':_0x427694['method']});}_0x5a1ef9?.[_0x1168ef(0xdd)](_0x1168ef(0xcd));_0xe22092?.['skipChromium']?console['log'](_0x5764b7['Jntlh']):await _0x5764b7['PgtdA'](ensureChromium,_0xe22092?.['withDeps']);_0x5a1ef9?.['trackPhaseEnd'](_0x5764b7['vyjse'],{'isFirstRun':_0x4ab3f4,'skipped':!!_0xe22092?.[_0x1168ef(0xdb)]}),console['log'](_0x5764b7['IdPEo']);const _0x3b113d=_0xe22092?.['scope'],_0x4510d4=_0xe22092?.[_0x1168ef(0xfc)]??![];let _0x5b5fc8=null;_0x4510d4?(_0x5a1ef9?.['trackPhaseStart'](_0x5764b7['NwUiA']),_0x5b5fc8=await ensureOpencodePluginConfig(_0x3b113d),_0x5a1ef9?.[_0x1168ef(0xf0)](_0x5764b7[_0x1168ef(0xc9)],{'isFirstRun':_0x4ab3f4,'opencode':!![]})):(_0x5a1ef9?.['trackPhaseStart'](_0x1168ef(0xb9)),await _0x5764b7[_0x1168ef(0xf1)](ensureClaudePlugin,_0x3b113d),_0x5a1ef9?.[_0x1168ef(0xf0)]('plugin',{'isFirstRun':_0x4ab3f4}));if(_0x5764b7[_0x1168ef(0xf8)](_0x4510d4,_0x5b5fc8)){_0x5a1ef9?.['trackPhaseStart'](_0x5764b7['CQPsA']);try{await _0x5764b7[_0x1168ef(0xd7)](installSkill,_0x5764b7['Dyjpl'],{'level':_0x5b5fc8[_0x1168ef(0xc4)],'cliVersion':getCurrentVersion(),'platform':_0x5764b7['PVVaw']}),_0x5a1ef9?.[_0x1168ef(0xf0)](_0x5764b7[_0x1168ef(0xa0)],{'isFirstRun':_0x4ab3f4,'opencode':!![]});}catch(_0x1cff47){console[_0x1168ef(0x9a)](_0x1168ef(0xdf),_0x5764b7['sSfgC'](_0x1cff47,Error)?_0x1cff47[_0x1168ef(0xf5)]:_0x1cff47),_0x5a1ef9?.[_0x1168ef(0xf0)](_0x5764b7['CQPsA'],{'isFirstRun':_0x4ab3f4,'opencode':!![],'failed':!![]});}}else _0x5a1ef9?.['trackPhaseStart']('skills'),await _0x5764b7[_0x1168ef(0xea)](ensureClaudeSkills,_0x3b113d),_0x5a1ef9?.[_0x1168ef(0xf0)](_0x5764b7['CQPsA'],{'isFirstRun':_0x4ab3f4});if(_0xe22092?.['skipAuth'])console['log'](_0x5764b7['TZpET']);else{if(_0xe22092?.[_0x1168ef(0xa1)]){_0x5a1ef9?.[_0x1168ef(0xdd)]('profile');const _0x27d255=await _0x5764b7['UlGEN'](ensureLocalEnv,{'url':_0xe22092[_0x1168ef(0xa1)],'force':_0xe22092?.['force'],'allowInsecureLocalhost':_0xe22092?.[_0x1168ef(0xd0)],'scope':_0x5764b7['QxCpq']},_0x5a1ef9);_0x5a1ef9?.[_0x1168ef(0xf0)](_0x5764b7[_0x1168ef(0xa2)],{'isFirstRun':_0x4ab3f4,'profileReady':_0x27d255['ready'],'userSkipped':_0x27d255[_0x1168ef(0xd6)]});}else console[_0x1168ef(0x9e)]('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+(_0x1168ef(0xe8)+_0x5764b7[_0x1168ef(0xfe)](bold,_0x5764b7['FeKAB']))+'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)'+'\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:'+_0x1168ef(0xe3));}if(_0x4510d4)console[_0x1168ef(0x9e)](_0x5764b7['gsylj']),console['log'](_0x1168ef(0xc1)),console[_0x1168ef(0x9e)](_0x5764b7['fXgbY']),console['log'](_0x5764b7['OdvpU']);else{const _0x2075c1=bold(_0x1168ef(0x9b));console['log'](_0x5764b7['oBgEc'](_0x5764b7['oBgEc'](_0x1168ef(0xad)+_0x2075c1+'\x20and\x20prompt\x20the\x20coding','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'),_0x1168ef(0xa3))+_0x1168ef(0xf7));}}
1
+ const _0x427343=_0x1863;(function(_0x66e011,_0x4aa92d){const _0x2c06aa=_0x1863,_0x2ccdad=_0x66e011();while(!![]){try{const _0x5ac6d1=parseInt(_0x2c06aa(0xb4))/0x1+parseInt(_0x2c06aa(0xc1))/0x2+-parseInt(_0x2c06aa(0xb0))/0x3+parseInt(_0x2c06aa(0x8f))/0x4+-parseInt(_0x2c06aa(0x95))/0x5*(parseInt(_0x2c06aa(0xaa))/0x6)+-parseInt(_0x2c06aa(0xc4))/0x7+-parseInt(_0x2c06aa(0x7a))/0x8*(parseInt(_0x2c06aa(0x8b))/0x9);if(_0x5ac6d1===_0x4aa92d)break;else _0x2ccdad['push'](_0x2ccdad['shift']());}catch(_0x5709e6){_0x2ccdad['push'](_0x2ccdad['shift']());}}}(_0x2f15,0x8a378));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0xa886b0 from'inquirer';function _0x1863(_0x7a062a,_0x3e5583){_0x7a062a=_0x7a062a-0x74;const _0x2f157e=_0x2f15();let _0x1863d7=_0x2f157e[_0x7a062a];return _0x1863d7;}import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x40e442=>_0x427343(0xba)+_0x40e442+_0x427343(0x86);export function getPlaywrightVersion(){const _0x1e240b=_0x427343,_0x124ca5={'IAUYt':_0x1e240b(0xbf)};try{const _0x1e9c5b=require['resolve'](_0x124ca5[_0x1e240b(0x96)]),_0x2f9c18=require(_0x1e9c5b);return _0x2f9c18[_0x1e240b(0x9a)];}catch{return null;}}export function installChromiumBinary(_0x5ee826,_0x2f20eb=![]){const _0x4bf874=_0x427343,_0x513ad1={'CNCqq':function(_0x41cb2d,_0x5a8c01){return _0x41cb2d===_0x5a8c01;},'TURWn':function(_0x500561,_0x3caaa3){return _0x500561(_0x3caaa3);},'jqntH':_0x4bf874(0x9e),'pEvKM':'chromium','CEZEM':'npx','XsDpp':'inherit','ZwQBO':function(_0x564cb8,_0x5cbbb7){return _0x564cb8===_0x5cbbb7;},'zGWcn':_0x4bf874(0xd1),'fAazO':'close'};return new Promise((_0x2e4cb1,_0x5b084f)=>{const _0x5d2af3=_0x4bf874,_0x41e148=[_0x5d2af3(0x9b)+_0x5ee826,'install',..._0x2f20eb?[_0x513ad1['jqntH']]:[],_0x513ad1[_0x5d2af3(0xcf)]],_0x2c7210=spawn(_0x513ad1[_0x5d2af3(0xd9)],_0x41e148,{'stdio':[_0x5d2af3(0xca),_0x513ad1[_0x5d2af3(0xbd)],'inherit'],'shell':_0x513ad1[_0x5d2af3(0x83)](process[_0x5d2af3(0xbb)],_0x513ad1['zGWcn'])});_0x2c7210['on'](_0x513ad1['fAazO'],_0x3f9554=>{const _0x356442=_0x5d2af3;_0x513ad1[_0x356442(0xa2)](_0x3f9554,0x0)?_0x2e4cb1():_0x5b084f(new Error(_0x356442(0xc0)+_0x3f9554));}),_0x2c7210['on'](_0x5d2af3(0xb6),_0x102cc5=>{const _0x567312=_0x5d2af3;_0x513ad1[_0x567312(0xb7)](_0x5b084f,_0x102cc5);});});}export async function authenticate(_0x159e36){const _0x2be806=_0x427343,_0x3c1dec={'FLVTF':function(_0x3c1514){return _0x3c1514();},'YuwJr':function(_0x3a5518,_0x58a030){return _0x3a5518(_0x58a030);},'yxGbA':'device_auth','eujEX':'Validating\x20API\x20token...','wxOap':function(_0x5504c9,_0x3b3bae){return _0x5504c9(_0x3b3bae);},'TawrN':'✓\x20Exported\x20credentials\x20for\x20CI','SulWf':_0x2be806(0x74)};if(!_0x159e36){const _0x3f68ee=await _0x3c1dec[_0x2be806(0x8a)](getToken);if(_0x3f68ee){const _0x312849=await _0x3c1dec['YuwJr'](getCurrentUser,_0x3f68ee);if(_0x312849[_0x2be806(0x93)])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x312849['user'][_0x2be806(0x81)]),{'token':_0x3f68ee,'method':_0x2be806(0xa0)};}try{_0x159e36=await runDeviceAuthFlow();}catch(_0x598058){throw new Error(_0x2be806(0xac)+(_0x598058 instanceof Error?_0x598058['message']:_0x598058));}const _0x714c98=await getCurrentUser(_0x159e36);if(!_0x714c98['success'])throw new Error(_0x2be806(0xa5)+_0x714c98[_0x2be806(0xb6)]);return console[_0x2be806(0x98)](_0x2be806(0x9c)+_0x714c98[_0x2be806(0x9f)][_0x2be806(0x81)]),{'token':_0x159e36,'method':_0x3c1dec['yxGbA']};}console['log'](_0x3c1dec['eujEX']);const _0x9a1ecf=await _0x3c1dec[_0x2be806(0xa4)](getCurrentUser,_0x159e36);if(!_0x9a1ecf[_0x2be806(0x93)]){if(_0x9a1ecf[_0x2be806(0x90)])throw new Error('Authentication\x20failed:\x20'+_0x9a1ecf['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x9a1ecf['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x2be806(0x98)]('✓\x20Authenticated\x20to\x20'+_0x9a1ecf['user'][_0x2be806(0x81)]),await _0x3c1dec[_0x2be806(0x8d)](storeToken,_0x159e36),console['log'](process[_0x2be806(0xd8)]['GITHUB_ENV']?_0x3c1dec['TawrN']:_0x3c1dec['SulWf']),{'token':_0x159e36,'method':'provided_token'};}export async function ensureRangerDir(_0x418ee8){const _0x621443=_0x427343,_0x3f0531={'mkwkB':function(_0x615e93){return _0x615e93();},'ObrkB':function(_0x2b4546,_0x5b936e){return _0x2b4546(_0x5b936e);},'mHynx':function(_0x109e19,_0x4deb55,_0x4c5810){return _0x109e19(_0x4deb55,_0x4c5810);}};void _0x418ee8;const _0x269207=_0x3f0531[_0x621443(0x88)](getRangerHomeDir);return!_0x3f0531[_0x621443(0xc5)](existsSync,_0x269207)?(await _0x3f0531[_0x621443(0x7f)](mkdir,_0x269207,{'recursive':!![]}),console['log'](_0x621443(0xd0)),{'path':_0x269207,'installed':!![]}):(console['log'](_0x621443(0x8e)),{'path':_0x269207,'installed':![]});}export async function ensureChromium(_0x5e3ea0=![]){const _0x124dec=_0x427343,_0x11d88c={'eqlSw':function(_0x2866ea){return _0x2866ea();},'pLlah':'confirm','UOweN':'install','MHhga':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','NHDVP':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','ZORVp':'\x0a⚠\x20Skipping\x20Chromium\x20installation.','UUlbS':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0xd2792b=![];try{const _0x29a2a6=chromium[_0x124dec(0xb5)]();_0xd2792b=existsSync(_0x29a2a6);}catch{_0xd2792b=![];}if(_0xd2792b)return console[_0x124dec(0x98)](_0x124dec(0xb2)),![];const _0x8709d2=_0x11d88c[_0x124dec(0xb3)](getPlaywrightVersion),_0x5330cc=_0x8709d2??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x50069e=!_0x8709d2,_0x54bde0=process['stdin'][_0x124dec(0x78)]&&process['stdout']['isTTY'];let _0x1644a3=!![];if(_0x54bde0){const {install:_0xbffb1e}=await _0xa886b0[_0x124dec(0xaf)]([{'type':_0x11d88c[_0x124dec(0xae)],'name':_0x11d88c['UOweN'],'message':_0x50069e?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x5330cc+'\x20now?':'The\x20required\x20version\x20('+_0x5330cc+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x1644a3=_0xbffb1e;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x5330cc+(_0x50069e?'\x20(fallback\x20version)':'')+_0x124dec(0xc8));if(_0x1644a3){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x5330cc,_0x5e3ea0),console[_0x124dec(0x98)](_0x11d88c['MHhga']);}catch(_0x147858){console['error'](_0x124dec(0xab),_0x147858 instanceof Error?_0x147858['message']:_0x147858),console[_0x124dec(0x98)](_0x11d88c[_0x124dec(0xa3)]),console[_0x124dec(0x98)]('\x20\x20npx\x20playwright@'+_0x5330cc+_0x124dec(0x84));}}else console['log'](_0x11d88c[_0x124dec(0x87)]),console[_0x124dec(0x98)](_0x11d88c['UUlbS']),console['log']('\x20\x20npx\x20playwright@'+_0x5330cc+_0x124dec(0x84));return!![];}export async function writeRangerGitignore(_0x1bdf7d){const _0x195dd4=_0x427343,_0x4587eb={'SrFJU':function(_0x4f1aed,_0x5925bc,_0x36824e){return _0x4f1aed(_0x5925bc,_0x36824e);}},_0x33e2da=_0x4587eb['SrFJU'](join,_0x1bdf7d,_0x195dd4(0xb1)),_0x270234=_0x195dd4(0xb8);await writeFile(_0x33e2da,_0x270234),console['log'](_0x195dd4(0x97));}export async function ensureLocalEnv(_0x315bb0,_0x544410){const _0x3fbfb9=_0x427343,_0x515024={'WBAkR':function(_0x55d34b){return _0x55d34b();},'toEGQ':function(_0x446e15,_0x1525e){return _0x446e15===_0x1525e;},'TBsdH':_0x3fbfb9(0x9f),'EKnPY':function(_0x4a0dd0,_0x9b97f1,_0x10fb50){return _0x4a0dd0(_0x9b97f1,_0x10fb50);},'RNFqS':_0x3fbfb9(0x80),'GmFNd':_0x3fbfb9(0x7e),'LkcAY':function(_0x26c6de,_0x121cd7,_0x429075,_0x4bea76){return _0x26c6de(_0x121cd7,_0x429075,_0x4bea76);},'pEUsb':_0x3fbfb9(0x7b),'wgFvC':function(_0x444968,_0x569ad4){return _0x444968 instanceof _0x569ad4;}};if(!_0x515024[_0x3fbfb9(0x75)](findGitRoot)&&_0x315bb0?.['scope']!==_0x3fbfb9(0x9f))return console[_0x3fbfb9(0x98)]('⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.'),{'ready':![],'skipped':!![]};const _0x20119=_0x515024[_0x3fbfb9(0xbe)](_0x315bb0?.['scope'],_0x515024['TBsdH'])?getRangerHomeDir():undefined;if(_0x515024[_0x3fbfb9(0xa8)](findExistingEnv,_0x515024[_0x3fbfb9(0xd3)],{'locations':[_0x515024[_0x3fbfb9(0xd3)]],'rangerDir':_0x20119}))return console['log'](_0x515024['GmFNd']),{'ready':!![],'skipped':![]};try{return await _0x515024['LkcAY'](addEnv,_0x3fbfb9(0x80),{'url':_0x315bb0?.['url'],'force':_0x315bb0?.[_0x3fbfb9(0x91)],'allowInsecureLocalhost':_0x315bb0?.['allowInsecureLocalhost'],'scope':_0x315bb0?.[_0x3fbfb9(0x7c)]},_0x544410),{'ready':!![],'skipped':![]};}catch(_0x43c78f){return console[_0x3fbfb9(0xb6)](_0x515024[_0x3fbfb9(0xc6)],_0x515024[_0x3fbfb9(0x79)](_0x43c78f,Error)?_0x43c78f[_0x3fbfb9(0x9d)]:_0x43c78f),{'ready':![],'skipped':![]};}}function _0x2f15(){const _0xa6f06a=['auth','ZwQBO','\x20install\x20chromium','WeUGL','\x1b[0m','ZORVp','mkwkB','opencode','FLVTF','77445jCdrIk','zIiuH','YuwJr','✓\x20~/.ranger/\x20directory\x20already\x20exists','3357752PfbdeL','status','force','plugin','success','method','3330935rtIJmy','IAUYt','✓\x20Created\x20.ranger/.gitignore','log','ranger\x20profile\x20add\x20<name>','version','playwright@','✓\x20Authenticated\x20to\x20','message','--with-deps','user','existing_token','FRHbI','CNCqq','NHDVP','wxOap','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','warn','UpRGB','EKnPY','ezFXU','6oDzgAg','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','Authentication\x20failed:\x20','mSQRA','pLlah','prompt','1181688rCwmSR','.gitignore','✓\x20Playwright\x20Chromium\x20browser\x20found','eqlSw','866481aPcpXx','executablePath','error','TURWn','\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a','nYLTk','\x1b[1m','platform','allowInsecureLocalhost','XsDpp','toEGQ','playwright/package.json','Installation\x20failed\x20with\x20exit\x20code\x20','1462508FkcBYh','trackPhaseEnd','url','5616443zuTsmG','ObrkB','pEUsb','skills','...','EXxBa','ignore','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','trackPhaseStart','skipAuth','skipped','pEvKM','✓\x20Created\x20~/.ranger/\x20directory','win32','chromium','RNFqS','HGbxF','\x0aIn\x20Claude\x20Code,\x20run\x20','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','env','CEZEM','✓\x20Stored\x20credentials\x20locally','WBAkR','qTivS','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','isTTY','wgFvC','8ujmVSo','\x0a❌\x20Profile\x20setup\x20failed:','scope','\x0a🚀\x20Ranger\x20Setup\x0a','✓\x20Local\x20profile\x20already\x20exists','mHynx','local','organizationName'];_0x2f15=function(){return _0xa6f06a;};return _0x2f15();}export async function start(_0x278a3c,_0x1f46e5,_0x121ef2){const _0x1d1fd7=_0x427343,_0x380d25={'lcURH':_0x1d1fd7(0x7d),'hszvj':function(_0x54915a,_0x4526c6){return _0x54915a!==_0x4526c6;},'RCNPd':function(_0x1488b3,_0xbfcf16){return _0x1488b3!==_0xbfcf16;},'FvFZn':function(_0x64741e,_0x159fdf){return _0x64741e+_0x159fdf;},'zIiuH':_0x1d1fd7(0x9f),'nGnvn':function(_0x26d003){return _0x26d003();},'UpRGB':function(_0xb2980e,_0x52b828){return _0xb2980e(_0x52b828);},'WeUGL':'✓\x20Skipping\x20authentication\x20(--skip-auth)','HGbxF':'auth','mSQRA':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','mCNgd':'plugin','ezFXU':function(_0x3b910a,_0x30847f){return _0x3b910a&&_0x30847f;},'EXxBa':_0x1d1fd7(0xc7),'nYLTk':function(_0x3e9f73,_0x312989,_0x876ff4){return _0x3e9f73(_0x312989,_0x876ff4);},'QfQoD':'opencode','oJeSi':'\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','GPRyp':'\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','FRHbI':'profile','GBZIB':function(_0x3a4832,_0x13d8fb){return _0x3a4832+_0x13d8fb;},'mVgjZ':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','KQMwa':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','qTivS':'verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'};console['log'](_0x380d25['lcURH']);_0x380d25['hszvj'](_0x1f46e5?.['scope'],undefined)&&_0x380d25['RCNPd'](_0x1f46e5['scope'],_0x1d1fd7(0x9f))&&(console[_0x1d1fd7(0xb6)](_0x380d25['FvFZn']('ranger\x20setup\x20--scope='+String(_0x1f46e5['scope'])+'\x20is\x20no\x20longer\x20supported.\x20'+'Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20',_0x1d1fd7(0xd6))),process['exit'](0x1));_0x1f46e5={..._0x1f46e5,'scope':_0x380d25[_0x1d1fd7(0x8c)]};const _0x4ac7f0=!existsSync(_0x380d25['nGnvn'](getRangerHomeDir));await _0x380d25[_0x1d1fd7(0xa7)](ensureRangerDir,_0x1d1fd7(0x9f));if(_0x1f46e5?.['skipAuth'])console[_0x1d1fd7(0x98)](_0x380d25[_0x1d1fd7(0x85)]),_0x121ef2?.['trackPhaseEnd'](_0x1d1fd7(0x82),{'isFirstRun':_0x4ac7f0,'method':'skipped'});else{_0x121ef2?.[_0x1d1fd7(0xcc)](_0x380d25[_0x1d1fd7(0xd4)]);const _0x1753d1=await authenticate(_0x278a3c);_0x121ef2?.[_0x1d1fd7(0xc2)](_0x1d1fd7(0x82),{'isFirstRun':_0x4ac7f0,'method':_0x1753d1[_0x1d1fd7(0x94)]});}_0x121ef2?.['trackPhaseStart']('chromium');_0x1f46e5?.['skipChromium']?console[_0x1d1fd7(0x98)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await ensureChromium(_0x1f46e5?.['withDeps']);_0x121ef2?.['trackPhaseEnd'](_0x1d1fd7(0xd2),{'isFirstRun':_0x4ac7f0,'skipped':!!_0x1f46e5?.['skipChromium']}),console[_0x1d1fd7(0x98)](_0x380d25[_0x1d1fd7(0xad)]);const _0x1bb875=_0x1f46e5?.['scope'],_0x4b9741=_0x1f46e5?.[_0x1d1fd7(0x89)]??![];let _0x560781=null;_0x4b9741?(_0x121ef2?.[_0x1d1fd7(0xcc)]('plugin'),_0x560781=await ensureOpencodePluginConfig(_0x1bb875),_0x121ef2?.[_0x1d1fd7(0xc2)](_0x1d1fd7(0x92),{'isFirstRun':_0x4ac7f0,'opencode':!![]})):(_0x121ef2?.['trackPhaseStart']('plugin'),await ensureClaudePlugin(_0x1bb875),_0x121ef2?.['trackPhaseEnd'](_0x380d25['mCNgd'],{'isFirstRun':_0x4ac7f0}));if(_0x380d25[_0x1d1fd7(0xa9)](_0x4b9741,_0x560781)){_0x121ef2?.['trackPhaseStart'](_0x380d25[_0x1d1fd7(0xc9)]);try{await _0x380d25[_0x1d1fd7(0xb9)](installSkill,'ranger',{'level':_0x560781[_0x1d1fd7(0x7c)],'cliVersion':getCurrentVersion(),'platform':_0x380d25['QfQoD']}),_0x121ef2?.[_0x1d1fd7(0xc2)]('skills',{'isFirstRun':_0x4ac7f0,'opencode':!![]});}catch(_0x6088a1){console[_0x1d1fd7(0xa6)](_0x380d25['oJeSi'],_0x6088a1 instanceof Error?_0x6088a1[_0x1d1fd7(0x9d)]:_0x6088a1),_0x121ef2?.['trackPhaseEnd'](_0x380d25[_0x1d1fd7(0xc9)],{'isFirstRun':_0x4ac7f0,'opencode':!![],'failed':!![]});}}else _0x121ef2?.['trackPhaseStart'](_0x1d1fd7(0xc7)),await _0x380d25[_0x1d1fd7(0xa7)](ensureClaudeSkills,_0x1bb875),_0x121ef2?.['trackPhaseEnd'](_0x380d25[_0x1d1fd7(0xc9)],{'isFirstRun':_0x4ac7f0});if(_0x1f46e5?.[_0x1d1fd7(0xcd)])console[_0x1d1fd7(0x98)](_0x380d25['GPRyp']);else{if(_0x1f46e5?.['url']){_0x121ef2?.[_0x1d1fd7(0xcc)](_0x380d25[_0x1d1fd7(0xa1)]);const _0x1727f4=await _0x380d25[_0x1d1fd7(0xb9)](ensureLocalEnv,{'url':_0x1f46e5[_0x1d1fd7(0xc3)],'force':_0x1f46e5?.[_0x1d1fd7(0x91)],'allowInsecureLocalhost':_0x1f46e5?.[_0x1d1fd7(0xbc)],'scope':_0x1d1fd7(0x9f)},_0x121ef2);_0x121ef2?.[_0x1d1fd7(0xc2)]('profile',{'isFirstRun':_0x4ac7f0,'profileReady':_0x1727f4['ready'],'userSkipped':_0x1727f4[_0x1d1fd7(0xce)]});}else console['log'](_0x380d25['GBZIB']('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+('\x0a\x20\x20'+_0x380d25['UpRGB'](bold,_0x1d1fd7(0x99)))+_0x1d1fd7(0x77),_0x1d1fd7(0xd7))+'\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles');}if(_0x4b9741)console['log'](_0x380d25['mVgjZ']),console['log'](_0x380d25['KQMwa']),console['log']('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log'](_0x380d25[_0x1d1fd7(0x76)]);else{const _0x1105a0=_0x380d25['UpRGB'](bold,'/ranger:enable');console['log'](_0x1d1fd7(0xd5)+_0x1105a0+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'+_0x1d1fd7(0xcb));}}
@@ -1 +1 @@
1
- const _0x50e73a=_0x17d5;(function(_0x50bac9,_0x31a000){const _0x36dd0e=_0x17d5,_0xe4db85=_0x50bac9();while(!![]){try{const _0xa3e6d6=parseInt(_0x36dd0e(0xef))/0x1*(parseInt(_0x36dd0e(0xcf))/0x2)+parseInt(_0x36dd0e(0xbb))/0x3+-parseInt(_0x36dd0e(0xec))/0x4+-parseInt(_0x36dd0e(0xa9))/0x5+-parseInt(_0x36dd0e(0xdf))/0x6+parseInt(_0x36dd0e(0x9e))/0x7+-parseInt(_0x36dd0e(0xe9))/0x8*(-parseInt(_0x36dd0e(0xb6))/0x9);if(_0xa3e6d6===_0x31a000)break;else _0xe4db85['push'](_0xe4db85['shift']());}catch(_0x224d0e){_0xe4db85['push'](_0xe4db85['shift']());}}}(_0x5988,0x19e5f));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';function _0x5988(){const _0x4c70e7=['\x20\x20\x20\x20Auth:\x20','settings.json','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','VGsez','\x0a---\x20Claude\x20Code\x20Plugin\x20---','DEBUG','QEnCx','isDirectory','GYPWl','BrmTw','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','hasPlaintextAuth','\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)','trim','nAGhI','toString','krfDh','1094XLUVFm','\x20\x20Not\x20configured','ranger@trailhead','muywj','env','\x0a\x20\x20No\x20active\x20profile\x20set','API\x20Token:\x20✗\x20Not\x20found','pipe','\x20[local]','plugin','\x20(latest:\x20','scope','MEKTY','\x20\x20User-level:','\x20local','LyZSQ','608190xETKZk','UYmXS','tBvoR','hasEncryptedAuth','vTJMa','no\x20session','ulrze','\x20\x20Project-level:','log','\x1b[0m','32720vQnzAx','cached\x20(updated\x20','filter','618396sIfeKh','\x20(up\x20to\x20date)','not_configured','31nKNSzX','AihiS','\x20\x20Run:\x20ranger\x20update','Tyxlj','user','ZXLhd',':\x20installed\x20(','includes','\x0a---\x20Profiles\x20---','data','\x20\x20Run:\x20ranger\x20setup\x20--opencode','length','SKILL.md','mxwTJ','\x20\x20Run:\x20ranger\x20setup\x20[token]','cwd','\x0a---\x20OpenCode\x20Plugin\x20---','AxiMm','\x20plugin(s)\x20configured','opencode','organizationName','Organization:\x20','path','displayName','(not\x20found)','AuPQa','match','Version:\x20','LzSmF','close','1271907fXQrtV','parse','iDCIk','vhOtl','ABcKp','map','sessionUpdatedAt','\x20[cloud]','\x20cloud','Groro','enabled','323685SnNLaP','configured','has','GjcpK','vnRRk','debug','push','version','\x20\x20Not\x20installed','\x20profiles\x20configured\x20(','oIxjz','uLLMi','fnQQZ','450mACmKg','UgXaS','name','API\x20Environment:\x20','\x20\x20Active:\x20','70866aUahkq','status'];_0x5988=function(){return _0x4c70e7;};return _0x5988();}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';function _0x17d5(_0x2fddc6,_0x157cf8){_0x2fddc6=_0x2fddc6-0x95;const _0x598886=_0x5988();let _0x17d537=_0x598886[_0x2fddc6];return _0x17d537;}const bold=_0x4e2489=>'\x1b[1m'+_0x4e2489+_0x50e73a(0xe8),link=(_0x1fdf95,_0x243c40)=>'\x1b]8;;file://'+_0x1fdf95+'\x07'+(_0x243c40||_0x1fdf95)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x517c55=_0x50e73a,_0x5d469b={'LzSmF':'not_installed','mxwTJ':function(_0x4328b9,_0x6707f){return _0x4328b9(_0x6707f);},'pDFhe':function(_0x3be071,_0x145d5b){return _0x3be071>_0x145d5b;},'DiYSt':function(_0x308fec,_0x4f160e){return _0x308fec(_0x4f160e);},'poeSV':'string','GjcpK':_0x517c55(0xae),'vTJMa':'config','Tyxlj':'ignore','UgXaS':_0x517c55(0xd6),'GYPWl':_0x517c55(0xf8),'AihiS':_0x517c55(0x9d)};return new Promise(_0x3e15f9=>{const _0x3b4a6d=_0x517c55,_0xa06055={'rlNDG':function(_0x30819f,_0x5e47a7){return _0x30819f(_0x5e47a7);},'FNAff':_0x5d469b[_0x3b4a6d(0x9c)],'weXso':_0x5d469b['poeSV']},_0x3c874a=spawn(_0x3b4a6d(0x102),[_0x5d469b[_0x3b4a6d(0xac)],_0x5d469b[_0x3b4a6d(0xe3)]],{'stdio':[_0x5d469b[_0x3b4a6d(0xf2)],_0x5d469b[_0x3b4a6d(0xb7)],_0x5d469b[_0x3b4a6d(0xb7)]]});let _0x9915d1='';_0x3c874a['stdout']?.['on'](_0x5d469b[_0x3b4a6d(0xc6)],_0x2b0225=>{_0x9915d1+=_0x2b0225['toString']();}),_0x3c874a['stderr']?.['on'](_0x5d469b[_0x3b4a6d(0xc6)],_0x392ac6=>{const _0x548d46=_0x3b4a6d;_0x9915d1+=_0x392ac6[_0x548d46(0xcd)]();}),_0x3c874a['on']('error',()=>{_0xa06055['rlNDG'](_0x3e15f9,{'status':_0xa06055['FNAff']});}),_0x3c874a['on'](_0x5d469b[_0x3b4a6d(0xf0)],_0x188ded=>{const _0x1de884=_0x3b4a6d;if(_0x188ded!==0x0){_0x3e15f9({'status':_0x5d469b['LzSmF']});return;}const _0x431a9d=_0x9915d1[_0x1de884(0xcb)]();let _0x2195cf=null;if(_0x431a9d)try{_0x2195cf=JSON[_0x1de884(0x9f)](_0x431a9d);}catch{const _0x41d74c=_0x431a9d[_0x1de884(0x9a)](/\{[\s\S]*\}$/);if(_0x41d74c)try{_0x2195cf=JSON['parse'](_0x41d74c[0x0]);}catch{_0x2195cf=null;}}const _0x4a572b=Array['isArray'](_0x2195cf?.[_0x1de884(0xd8)])?_0x2195cf?.[_0x1de884(0xd8)]:[],_0x4f690a=_0x4a572b['some'](_0x1ea02d=>{const _0x21248c=_0x1de884;if(typeof _0x1ea02d!==_0xa06055['weXso'])return![];return _0x1ea02d[_0x21248c(0xf6)]('@ranger-testing/opencode-plugin')||_0x1ea02d['includes']('opencode-plugin');});if(_0x4f690a){_0x5d469b[_0x1de884(0xfc)](_0x3e15f9,{'status':_0x1de884(0xaa),'details':_0x5d469b['pDFhe'](_0x4a572b[_0x1de884(0xfa)],0x0)?_0x4a572b['length']+_0x1de884(0x101):undefined});return;}if(_0x5d469b['pDFhe'](_0x4a572b[_0x1de884(0xfa)],0x0)){_0x5d469b['DiYSt'](_0x3e15f9,{'status':_0x1de884(0xee),'details':_0x4a572b['length']+_0x1de884(0x101)});return;}_0x3e15f9({'status':_0x1de884(0xee)});});});}async function getSkillsFromDir(_0x5c039a,_0x2a82a1){const _0x10b153=_0x50e73a,_0x6abe21={'tBvoR':function(_0x1aa745,_0x5136ae){return _0x1aa745(_0x5136ae);},'oIxjz':function(_0x2c8b8f,_0x1b07d9,_0x319bbe){return _0x2c8b8f(_0x1b07d9,_0x319bbe);},'BrmTw':_0x10b153(0xfb),'tlFoS':'utf-8'};if(!_0x6abe21[_0x10b153(0xe1)](existsSync,_0x5c039a))return[];const _0x3e0877=[];try{const _0x1b2edd=await _0x6abe21[_0x10b153(0xb3)](readdir,_0x5c039a,{'withFileTypes':!![]});for(const _0x55044e of _0x1b2edd){if(_0x55044e[_0x10b153(0xc5)]()){const _0x3a9d00=join(_0x5c039a,_0x55044e['name'],_0x6abe21[_0x10b153(0xc7)]);if(existsSync(_0x3a9d00)){let _0x3397e0=_0x55044e['name'];try{const _0x89d04f=await readFile(_0x3a9d00,_0x6abe21['tlFoS']),_0x5c7789=_0x89d04f['match'](/name:\s*(.+)/);_0x5c7789&&(_0x3397e0=_0x5c7789[0x1]['trim']());}catch{}_0x3e0877['push']({'name':_0x55044e[_0x10b153(0xb8)],'displayName':_0x3397e0,'path':_0x3a9d00,'level':_0x2a82a1});}}}}catch{return[];}return _0x3e0877;}async function getInstalledSkills(){const _0x26ed98={'xvqZj':'project','rKtcw':function(_0x95fca8,_0x2e39df,_0x1f42b2){return _0x95fca8(_0x2e39df,_0x1f42b2);},'Fdqft':function(_0x10db7a){return _0x10db7a();}},[_0x37b261,_0x42a65b]=await Promise['all']([getSkillsFromDir(getProjectSkillsDir(),_0x26ed98['xvqZj']),_0x26ed98['rKtcw'](getSkillsFromDir,_0x26ed98['Fdqft'](getUserSkillsDir),'user')]);return{'project':_0x37b261,'user':_0x42a65b};}async function getEnvironments(){const _0x5f0c01=_0x50e73a,_0x578fbf={'vhOtl':function(_0x4c7b70,_0x2d29f3){return _0x4c7b70(_0x2d29f3);},'nAGhI':function(_0x22fcea,_0xadf5ef,_0x7ed983){return _0x22fcea(_0xadf5ef,_0x7ed983);},'nZxhj':_0x5f0c01(0xbe),'IOzZC':function(_0x20412f,_0x4c2da7){return _0x20412f(_0x4c2da7);},'VGsez':function(_0x4e1ac2){return _0x4e1ac2();}},{envNames:_0x1bfe23,activeEnv:_0x3727e3}=await _0x578fbf[_0x5f0c01(0xc1)](getEnvNames),_0x4627db=getRangerDir();if(!existsSync(_0x4627db))return{'envs':[],'activeEnv':null};const _0x2d0113=_0x1bfe23[_0x5f0c01(0xa3)](_0x51d9fa=>{const _0x4bc166=_0x5f0c01,_0x1f0005=_0x578fbf[_0x4bc166(0xa1)](getEnvDir,_0x51d9fa),_0x2fabc6=_0x578fbf[_0x4bc166(0xcc)](join,_0x1f0005,_0x578fbf['nZxhj']),_0x1dac73=join(_0x1f0005,'auth.json'),_0x2b2eca=_0x578fbf['nAGhI'](join,_0x1f0005,'auth.json.enc');return{'name':_0x51d9fa,'settingsPath':_0x578fbf['vhOtl'](existsSync,_0x2fabc6)?_0x2fabc6:_0x4bc166(0x98),'hasPlaintextAuth':existsSync(_0x1dac73),'hasEncryptedAuth':_0x578fbf['IOzZC'](existsSync,_0x2b2eca),'isActive':_0x51d9fa===_0x3727e3};});return{'envs':_0x2d0113,'activeEnv':_0x3727e3};}export async function status(){const _0x4a75e0=_0x50e73a,_0x32d95f={'QEnCx':'\x0a📊\x20Ranger\x20Status\x0a','muywj':function(_0x25da02,_0x245da8){return _0x25da02(_0x245da8);},'Groro':function(_0x283dfe,_0x275196,_0x513080){return _0x283dfe(_0x275196,_0x513080);},'ZXLhd':function(_0x44f627,_0x3945f9){return _0x44f627(_0x3945f9);},'AuPQa':function(_0x56bc5b){return _0x56bc5b();},'ulrze':function(_0x992db0,_0x490216){return _0x992db0!==_0x490216;},'gDUsT':function(_0x345972){return _0x345972();},'SwGtP':_0x4a75e0(0xaa),'AxiMm':function(_0x5cd06a,_0x14edbf){return _0x5cd06a===_0x14edbf;},'hrtBM':_0x4a75e0(0xee),'YgdjW':_0x4a75e0(0xd0),'krfDh':function(_0x42fd5c,_0x428a92){return _0x42fd5c(_0x428a92);},'UYmXS':_0x4a75e0(0xd1),'vnRRk':'unknown','SUrQf':'disabled','zIMXl':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','iDCIk':'\x0a---\x20Skills\x20---','etNCj':function(_0x1dd5e4,_0x2b03a7){return _0x1dd5e4>_0x2b03a7;},'QQPYC':_0x4a75e0(0xdc),'fnQQZ':_0x4a75e0(0xf7),'MEKTY':function(_0x5f18eb){return _0x5f18eb();},'uLLMi':function(_0x28cd4f,_0x322230){return _0x28cd4f+_0x322230;},'ABcKp':'No\x20profiles\x20configured','ILksC':function(_0x193d56,_0x360f66){return _0x193d56>_0x360f66;},'CUdOS':'\x20(active)','LyZSQ':function(_0x192ae8,_0x397bd3){return _0x192ae8(_0x397bd3);},'NTVpE':_0x4a75e0(0xe4),'bmNaQ':'encrypted','cTpsc':'(not\x20found)'};console['log'](_0x32d95f[_0x4a75e0(0xc4)]);const _0x5f4591=process[_0x4a75e0(0xfe)](),_0x1231c2=getRangerDir();if(!_0x32d95f['muywj'](existsSync,_0x1231c2)){console['log']('Root:\x20'+_0x32d95f[_0x4a75e0(0xa7)](link,_0x5f4591,_0x32d95f[_0x4a75e0(0xd2)](bold,basename(_0x5f4591)))),console['log'](_0x4a75e0(0xc0)),console[_0x4a75e0(0xe7)](_0x4a75e0(0xc8));return;}console[_0x4a75e0(0xe7)]('Root:\x20'+link(_0x5f4591,_0x32d95f['ZXLhd'](bold,_0x32d95f['ZXLhd'](basename,_0x5f4591))));const _0x419951=_0x32d95f[_0x4a75e0(0x99)](getCurrentVersion),_0x5e1f49=getLatestVersion();if(_0x5e1f49['version']&&_0x32d95f[_0x4a75e0(0xe5)](_0x5e1f49[_0x4a75e0(0xb0)],_0x419951))console[_0x4a75e0(0xe7)](_0x4a75e0(0x9b)+_0x419951+_0x4a75e0(0xd9)+_0x5e1f49['version']+')'),console[_0x4a75e0(0xe7)](_0x4a75e0(0xf1));else _0x5e1f49['version']?console['log']('Version:\x20'+_0x419951+_0x4a75e0(0xed)):console['log'](_0x4a75e0(0x9b)+_0x419951);const _0x4a2822=await getToken();if(_0x4a2822){const _0x90059b=await _0x32d95f[_0x4a75e0(0xd2)](getCurrentUser,_0x4a2822);_0x90059b['success']?console[_0x4a75e0(0xe7)](_0x4a75e0(0x95)+_0x32d95f[_0x4a75e0(0xf4)](bold,_0x90059b[_0x4a75e0(0xf3)][_0x4a75e0(0x103)])):(console['log'](_0x4a75e0(0xbf)),console[_0x4a75e0(0xe7)](_0x4a75e0(0xfd)));}else console['log'](_0x4a75e0(0xd5)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x4a75e0(0xd3)][_0x4a75e0(0xc3)]&&(console[_0x4a75e0(0xe7)](_0x4a75e0(0xb9)+_0x32d95f['AuPQa'](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+getApiBaseUrl()));console['log'](_0x4a75e0(0xff));const _0x216350=await _0x32d95f['gDUsT'](getOpencodePluginStatus);if(_0x216350['status']===_0x32d95f['SwGtP'])console['log']('\x20\x20'+bold('@ranger-testing/opencode-plugin')+':\x20configured'),_0x216350['details']&&console['log']('\x20\x20'+_0x216350['details']);else _0x32d95f[_0x4a75e0(0x100)](_0x216350[_0x4a75e0(0xbc)],_0x32d95f['hrtBM'])?(console['log'](_0x32d95f['YgdjW']),_0x216350['details']&&console[_0x4a75e0(0xe7)]('\x20\x20'+_0x216350['details']),console[_0x4a75e0(0xe7)](_0x4a75e0(0xf9))):console[_0x4a75e0(0xe7)]('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console['log'](_0x4a75e0(0xc2));const _0x55579f=await _0x32d95f[_0x4a75e0(0xce)](getPluginInfo,_0x32d95f[_0x4a75e0(0xe0)]);if(_0x55579f){const _0x338a90=_0x55579f[_0x4a75e0(0xda)]||_0x32d95f[_0x4a75e0(0xad)],_0x5e98bd=_0x55579f[_0x4a75e0(0xa8)]?'enabled':_0x32d95f['SUrQf'];console[_0x4a75e0(0xe7)]('\x20\x20'+_0x32d95f['krfDh'](bold,_0x4a75e0(0xd1))+_0x4a75e0(0xf5)+_0x338a90+',\x20'+_0x5e98bd+')');}else console['log'](_0x4a75e0(0xb1)),console['log'](_0x32d95f['zIMXl']);console['log'](_0x32d95f[_0x4a75e0(0xa0)]);const {project:_0x22b6ae,user:_0xf0c510}=await _0x32d95f[_0x4a75e0(0x99)](getInstalledSkills),_0x30a236=_0x22b6ae[_0x4a75e0(0xeb)](_0x276e38=>RANGER_MANAGED_SKILLS[_0x4a75e0(0xf6)](_0x276e38['name'])),_0x3bad95=_0xf0c510['filter'](_0x1a8389=>RANGER_MANAGED_SKILLS[_0x4a75e0(0xf6)](_0x1a8389[_0x4a75e0(0xb8)])),_0x320287=_0x30a236['length']+_0x3bad95[_0x4a75e0(0xfa)];if(_0x32d95f['AxiMm'](_0x320287,0x0))console['log']('No\x20skills\x20installed'),console[_0x4a75e0(0xe7)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x32d95f['etNCj'](_0x30a236['length'],0x0)){console['log'](_0x4a75e0(0xe6));for(const _0x275e17 of _0x30a236){console['log']('\x20\x20\x20\x20'+bold(_0x275e17['displayName'])+':\x20'+_0x32d95f[_0x4a75e0(0xa7)](link,_0x275e17['path'],_0x32d95f[_0x4a75e0(0xce)](basename,_0x275e17[_0x4a75e0(0x96)])));}}if(_0x3bad95[_0x4a75e0(0xfa)]>0x0){console['log'](_0x32d95f['QQPYC']);for(const _0x441c2a of _0x3bad95){console[_0x4a75e0(0xe7)]('\x20\x20\x20\x20'+bold(_0x441c2a[_0x4a75e0(0x97)])+':\x20'+_0x32d95f[_0x4a75e0(0xa7)](link,_0x441c2a['path'],_0x32d95f['krfDh'](basename,_0x441c2a['path'])));}}}console['log'](_0x32d95f[_0x4a75e0(0xb5)]);const {envs:_0x500df7,activeEnv:_0x369aae}=await getEnvironments();let _0xa41ca2=[];if(_0x4a2822)try{_0xa41ca2=await _0x32d95f[_0x4a75e0(0xdb)](listCloudProfiles);}catch{}const _0xf33bd2=_0x32d95f[_0x4a75e0(0xb4)](_0x500df7['length'],_0xa41ca2['length']);if(_0x32d95f[_0x4a75e0(0x100)](_0xf33bd2,0x0))console[_0x4a75e0(0xe7)](_0x32d95f[_0x4a75e0(0xa2)]),console[_0x4a75e0(0xe7)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{if(_0x32d95f['etNCj'](_0xf33bd2,0x5)){const _0x3a6220=[];_0x32d95f['etNCj'](_0xa41ca2['length'],0x0)&&_0x3a6220['push'](_0xa41ca2[_0x4a75e0(0xfa)]+_0x4a75e0(0xa6)),_0x32d95f['ILksC'](_0x500df7[_0x4a75e0(0xfa)],0x0)&&_0x3a6220[_0x4a75e0(0xaf)](_0x500df7[_0x4a75e0(0xfa)]+_0x4a75e0(0xdd)),console['log'](_0xf33bd2+_0x4a75e0(0xb2)+_0x3a6220['join'](',\x20')+')'),_0x369aae&&console['log'](_0x4a75e0(0xba)+bold(_0x369aae)),console[_0x4a75e0(0xe7)](_0x4a75e0(0xca));}else{for(const _0x51cc8a of _0xa41ca2){const _0xe3bc35=_0x32d95f[_0x4a75e0(0x100)](_0x51cc8a['name'],_0x369aae)?_0x32d95f['CUdOS']:'';console[_0x4a75e0(0xe7)]('\x20\x20'+_0x32d95f[_0x4a75e0(0xde)](bold,_0x51cc8a[_0x4a75e0(0xb8)])+_0x4a75e0(0xa5)+_0xe3bc35);const _0xe4ad7b=_0x51cc8a[_0x4a75e0(0xa4)]?_0x4a75e0(0xea)+_0x51cc8a['sessionUpdatedAt']+')':_0x32d95f['NTVpE'];console[_0x4a75e0(0xe7)]('\x20\x20\x20\x20Session:\x20'+_0xe4ad7b);}const _0x109a81=new Set(_0xa41ca2[_0x4a75e0(0xa3)](_0x4cc34a=>_0x4cc34a['name']));for(const _0x19d2b0 of _0x500df7){if(_0x109a81['has'](_0x19d2b0[_0x4a75e0(0xb8)]))continue;const _0x19956b=_0x19d2b0['isActive']?_0x32d95f['CUdOS']:'',_0x1bdaab=_0x19d2b0[_0x4a75e0(0xe2)]?_0x32d95f['bmNaQ']:_0x19d2b0[_0x4a75e0(0xc9)]?'plaintext':'none';console[_0x4a75e0(0xe7)]('\x20\x20'+_0x32d95f['ZXLhd'](bold,_0x19d2b0[_0x4a75e0(0xb8)])+_0x4a75e0(0xd7)+_0x19956b),console['log'](_0x4a75e0(0xbd)+_0x1bdaab),_0x19d2b0['settingsPath']!==_0x32d95f['cTpsc']&&console['log']('\x20\x20\x20\x20Settings:\x20'+_0x32d95f[_0x4a75e0(0xa7)](link,_0x19d2b0['settingsPath'],basename(_0x19d2b0['settingsPath'])));}if(!_0x369aae){console[_0x4a75e0(0xe7)](_0x4a75e0(0xd4));const _0xb832d=[..._0xa41ca2[_0x4a75e0(0xa3)](_0x5787bf=>_0x5787bf['name']),..._0x500df7['filter'](_0x508a4e=>!_0x109a81[_0x4a75e0(0xab)](_0x508a4e['name']))['map'](_0x26cd40=>_0x26cd40[_0x4a75e0(0xb8)])];console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0xb832d['join'](',\x20')+')');}}}console['log']('');}
1
+ const _0x47f843=_0xb791;(function(_0x26667e,_0x1a2873){const _0x11aea4=_0xb791,_0x2d77df=_0x26667e();while(!![]){try{const _0x3eba27=-parseInt(_0x11aea4(0x160))/0x1+-parseInt(_0x11aea4(0x182))/0x2*(parseInt(_0x11aea4(0x178))/0x3)+-parseInt(_0x11aea4(0x14f))/0x4+parseInt(_0x11aea4(0x180))/0x5*(-parseInt(_0x11aea4(0x131))/0x6)+parseInt(_0x11aea4(0x16d))/0x7*(parseInt(_0x11aea4(0x12b))/0x8)+parseInt(_0x11aea4(0x168))/0x9*(parseInt(_0x11aea4(0x140))/0xa)+parseInt(_0x11aea4(0x135))/0xb*(parseInt(_0x11aea4(0x146))/0xc);if(_0x3eba27===_0x1a2873)break;else _0x2d77df['push'](_0x2d77df['shift']());}catch(_0x1d29f9){_0x2d77df['push'](_0x2d77df['shift']());}}}(_0x5636,0x3406d));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{listCloudProfiles}from'./utils/cloudProfile.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x2d4203=>'\x1b[1m'+_0x2d4203+_0x47f843(0x134),link=(_0x1ce47f,_0x1f67b8)=>'\x1b]8;;file://'+_0x1ce47f+'\x07'+(_0x1f67b8||_0x1ce47f)+_0x47f843(0x13b);async function getOpencodePluginStatus(){const _0x2f75ca=_0x47f843,_0x1aea70={'GXeXm':function(_0x3487e8,_0x50c3b7){return _0x3487e8(_0x50c3b7);},'jkgMi':'not_configured','CFkcU':function(_0x374478,_0x3bd71f,_0x330fb7,_0x32e307){return _0x374478(_0x3bd71f,_0x330fb7,_0x32e307);},'alcna':_0x2f75ca(0x188),'NMfwu':'ignore','bmsRM':'pipe','mOHyG':_0x2f75ca(0x13e),'DXYzg':'error'};return new Promise(_0xf6bb5f=>{const _0x5d5865=_0x2f75ca,_0x4f5101=_0x1aea70['CFkcU'](spawn,_0x1aea70['alcna'],['debug',_0x5d5865(0x14a)],{'stdio':[_0x1aea70[_0x5d5865(0x150)],_0x5d5865(0x145),_0x1aea70[_0x5d5865(0x137)]]});let _0x219800='';_0x4f5101['stdout']?.['on'](_0x1aea70['mOHyG'],_0x51b42b=>{const _0x392984=_0x5d5865;_0x219800+=_0x51b42b[_0x392984(0x151)]();}),_0x4f5101[_0x5d5865(0x176)]?.['on'](_0x1aea70[_0x5d5865(0x154)],_0x3f760a=>{_0x219800+=_0x3f760a['toString']();}),_0x4f5101['on'](_0x1aea70[_0x5d5865(0x171)],()=>{_0xf6bb5f({'status':'not_installed'});}),_0x4f5101['on']('close',_0x391edf=>{const _0x594036=_0x5d5865,_0xa0912b={'KeWwL':function(_0x3d5ab9,_0x17c86f){return _0x3d5ab9!==_0x17c86f;},'pCCUb':_0x594036(0x179)};if(_0x391edf!==0x0){_0xf6bb5f({'status':'not_installed'});return;}const _0x467ee3=_0x219800[_0x594036(0x16b)]();let _0x10cf63=null;if(_0x467ee3)try{_0x10cf63=JSON['parse'](_0x467ee3);}catch{const _0x44397e=_0x467ee3['match'](/\{[\s\S]*\}$/);if(_0x44397e)try{_0x10cf63=JSON[_0x594036(0x17c)](_0x44397e[0x0]);}catch{_0x10cf63=null;}}const _0x5c6fcb=Array[_0x594036(0x138)](_0x10cf63?.[_0x594036(0x19c)])?_0x10cf63?.['plugin']:[],_0x325c09=_0x5c6fcb[_0x594036(0x149)](_0x25409c=>{const _0x1fc83e=_0x594036;if(_0xa0912b[_0x1fc83e(0x192)](typeof _0x25409c,'string'))return![];return _0x25409c['includes'](_0xa0912b['pCCUb'])||_0x25409c['includes']('opencode-plugin');});if(_0x325c09){_0xf6bb5f({'status':_0x594036(0x152),'details':_0x5c6fcb[_0x594036(0x175)]>0x0?_0x5c6fcb['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x5c6fcb['length']>0x0){_0x1aea70[_0x594036(0x155)](_0xf6bb5f,{'status':_0x1aea70[_0x594036(0x16e)],'details':_0x5c6fcb['length']+'\x20plugin(s)\x20configured'});return;}_0x1aea70['GXeXm'](_0xf6bb5f,{'status':_0x1aea70['jkgMi']});});});}async function getSkillsFromDir(_0x4e71b4,_0xc9470a){const _0x1bc678=_0x47f843,_0x21bd5b={'EkfUN':function(_0x4bbd37,_0x24a967){return _0x4bbd37(_0x24a967);},'ZFwGU':function(_0x2062e2,_0x3982e5,_0x381d9d,_0x5595ed){return _0x2062e2(_0x3982e5,_0x381d9d,_0x5595ed);},'WdwmW':function(_0x1b8588,_0x231bb7,_0x40bceb){return _0x1b8588(_0x231bb7,_0x40bceb);},'gSqFd':_0x1bc678(0x173)};if(!_0x21bd5b[_0x1bc678(0x197)](existsSync,_0x4e71b4))return[];const _0x3ed883=[];try{const _0x325387=await readdir(_0x4e71b4,{'withFileTypes':!![]});for(const _0x5c7e23 of _0x325387){if(_0x5c7e23[_0x1bc678(0x19d)]()){const _0x4a2d6e=_0x21bd5b['ZFwGU'](join,_0x4e71b4,_0x5c7e23[_0x1bc678(0x153)],'SKILL.md');if(existsSync(_0x4a2d6e)){let _0x370dcd=_0x5c7e23['name'];try{const _0x210506=await _0x21bd5b['WdwmW'](readFile,_0x4a2d6e,_0x21bd5b[_0x1bc678(0x189)]),_0x127968=_0x210506['match'](/name:\s*(.+)/);_0x127968&&(_0x370dcd=_0x127968[0x1]['trim']());}catch{}_0x3ed883[_0x1bc678(0x177)]({'name':_0x5c7e23['name'],'displayName':_0x370dcd,'path':_0x4a2d6e,'level':_0xc9470a});}}}}catch{return[];}return _0x3ed883;}function _0x5636(){const _0x2c07e2=['pipe','24GEEqfs','FmCsL','includes','some','config','lAukg','\x20\x20User-level:','has','SpGgH','1239088BKlhoP','NMfwu','toString','configured','name','mOHyG','GXeXm','scope','details','(not\x20found)',':\x20configured','enabled','aiPkw','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>',':\x20installed\x20(','\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)','version','395985ISVgzg','settingsPath','ClyVO','map','BzuwW','\x0a---\x20Claude\x20Code\x20Plugin\x20---','ranger@trailhead','DEBUG','9sSutiV','sessionUpdatedAt','YnEWX','trim','Ijrci','53977cACImG','jkgMi','API\x20Token:\x20✗\x20Not\x20found','cached\x20(updated\x20','DXYzg','\x20\x20Run:\x20ranger\x20update','utf-8','\x20\x20Run:\x20ranger\x20setup\x20[token]','length','stderr','push','3UGSQDX','@ranger-testing/opencode-plugin','\x20\x20\x20\x20Auth:\x20','oZvym','parse','join','env','nihQL','186605lxAOqU','Osjcl','634194RzhOwu','fIIbQ','log','no\x20session','\x20[cloud]','\x0a---\x20Skills\x20---','opencode','gSqFd','isActive','\x0a📊\x20Ranger\x20Status\x0a','lJOBo','JlHjH','Version:\x20','HwuOH','\x20\x20Run:\x20ranger\x20skillup','njbOH','KeWwL','\x20local','\x20\x20\x20\x20Session:\x20','yRWif','displayName','EkfUN','KEoGC','\x20\x20Not\x20configured','rKGDw','\x20\x20\x20\x20','plugin','isDirectory','status','toYXQ','auth.json.enc','filter','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','unknown','72qdALrk','GEkyQ','\x20[local]','YAPtM','hzDjz','\x20\x20Run:\x20ranger\x20setup\x20--opencode','60nOWkbr','ZRDMU','project','\x1b[0m','7673083jRxdoc','\x20(up\x20to\x20date)','bmsRM','isArray','API\x20Environment:\x20','Root:\x20','\x1b]8;;\x07','xfvdu','uENDi','data','\x20(latest:\x20','1446600NEqCaD','\x20\x20Project-level:','path','xxZCj','nkShO'];_0x5636=function(){return _0x2c07e2;};return _0x5636();}async function getInstalledSkills(){const _0xf92f7a=_0x47f843,_0x32b81f={'Osjcl':function(_0x2a3112,_0x151987,_0x42d21c){return _0x2a3112(_0x151987,_0x42d21c);},'xxZCj':_0xf92f7a(0x133),'LdIvw':function(_0x6c39f8){return _0x6c39f8();},'BjLva':'user'},[_0x129da9,_0x3926bc]=await Promise['all']([_0x32b81f[_0xf92f7a(0x181)](getSkillsFromDir,getProjectSkillsDir(),_0x32b81f[_0xf92f7a(0x143)]),getSkillsFromDir(_0x32b81f['LdIvw'](getUserSkillsDir),_0x32b81f['BjLva'])]);return{'project':_0x129da9,'user':_0x3926bc};}async function getEnvironments(){const _0x25ba58=_0x47f843,_0xf242e4={'rPAmg':function(_0x5067cf,_0x8a6911){return _0x5067cf(_0x8a6911);},'yLFHB':'settings.json','YAPtM':function(_0x42fe8c,_0x4e8b9a,_0x11bf66){return _0x42fe8c(_0x4e8b9a,_0x11bf66);},'ZRDMU':_0x25ba58(0x158),'mvIgm':function(_0x41460f,_0x2b12ca){return _0x41460f===_0x2b12ca;},'KEoGC':function(_0x1f61be){return _0x1f61be();},'njbOH':function(_0x5a4a64,_0x5868bc){return _0x5a4a64(_0x5868bc);}},{envNames:_0x2a9b7e,activeEnv:_0x1a342c}=await _0xf242e4[_0x25ba58(0x198)](getEnvNames),_0x114883=getRangerDir();if(!_0xf242e4[_0x25ba58(0x191)](existsSync,_0x114883))return{'envs':[],'activeEnv':null};const _0xc9ee13=_0x2a9b7e[_0x25ba58(0x163)](_0x3994c1=>{const _0x3109fd=_0x25ba58,_0x4d04a4=_0xf242e4['rPAmg'](getEnvDir,_0x3994c1),_0x322469=join(_0x4d04a4,_0xf242e4['yLFHB']),_0x3ae3ca=_0xf242e4[_0x3109fd(0x12e)](join,_0x4d04a4,'auth.json'),_0x564c2c=join(_0x4d04a4,_0x3109fd(0x1a0));return{'name':_0x3994c1,'settingsPath':existsSync(_0x322469)?_0x322469:_0xf242e4[_0x3109fd(0x132)],'hasPlaintextAuth':existsSync(_0x3ae3ca),'hasEncryptedAuth':_0xf242e4['rPAmg'](existsSync,_0x564c2c),'isActive':_0xf242e4['mvIgm'](_0x3994c1,_0x1a342c)};});return{'envs':_0xc9ee13,'activeEnv':_0x1a342c};}function _0xb791(_0x14b21d,_0x3cf135){_0x14b21d=_0x14b21d-0x128;const _0x56367f=_0x5636();let _0xb791b0=_0x56367f[_0x14b21d];return _0xb791b0;}export async function status(){const _0x4525e9=_0x47f843,_0x5726f5={'DMIbx':_0x4525e9(0x18b),'lAukg':function(_0x894ded){return _0x894ded();},'VHrtg':function(_0x45ed73,_0x5c8893){return _0x45ed73(_0x5c8893);},'lJOBo':function(_0x2111f5,_0x1fb509,_0x3f152e){return _0x2111f5(_0x1fb509,_0x3f152e);},'Ijrci':function(_0xe35e4d,_0x3c979f){return _0xe35e4d(_0x3c979f);},'NmwUZ':function(_0x1d10c3){return _0x1d10c3();},'yRWif':function(_0x4678b1,_0x5878e8){return _0x4678b1!==_0x5878e8;},'uENDi':function(_0x47ff0a,_0x25d351){return _0x47ff0a(_0x25d351);},'Mfikx':'\x0a---\x20OpenCode\x20Plugin\x20---','kZdwG':_0x4525e9(0x152),'BzuwW':_0x4525e9(0x179),'fWebZ':function(_0x94fb94,_0x5ef911){return _0x94fb94===_0x5ef911;},'HRfzO':_0x4525e9(0x199),'oZvym':_0x4525e9(0x130),'YzyVB':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','qQlYr':_0x4525e9(0x165),'hzDjz':function(_0x29bc38,_0x5a0299){return _0x29bc38(_0x5a0299);},'nYNTA':_0x4525e9(0x12a),'ClyVO':_0x4525e9(0x15a),'LlWns':function(_0x1ce2a3,_0x3b1907){return _0x1ce2a3(_0x3b1907);},'zxwlO':_0x4525e9(0x166),'rKGDw':'\x20\x20Not\x20installed','JlHjH':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','toYXQ':_0x4525e9(0x187),'aiPkw':function(_0x50c567,_0x3746f9){return _0x50c567===_0x3746f9;},'nkShO':function(_0xbd595e,_0x55e6d8){return _0xbd595e>_0x55e6d8;},'GEkyQ':_0x4525e9(0x14c),'uUUEZ':function(_0x528352,_0x541862){return _0x528352(_0x541862);},'fIIbQ':'\x0a---\x20Profiles\x20---','CDawQ':function(_0x53f690){return _0x53f690();},'YnEWX':function(_0xb49ea4,_0x5509c0){return _0xb49ea4+_0x5509c0;},'OjtyQ':function(_0x19e32a,_0x277818){return _0x19e32a===_0x277818;},'FmCsL':function(_0x3fa145,_0xd95202){return _0x3fa145>_0xd95202;},'eZgCQ':function(_0x547524,_0x2620d6){return _0x547524===_0x2620d6;},'nihQL':'\x20(active)','HwuOH':function(_0x5eea48,_0xb02d1b){return _0x5eea48(_0xb02d1b);},'TBJbY':'encrypted','SpGgH':'plaintext','QyBWM':_0x4525e9(0x158),'xfvdu':function(_0x2e367d,_0x406937){return _0x2e367d(_0x406937);}};console[_0x4525e9(0x184)](_0x5726f5['DMIbx']);const _0x2df814=process['cwd'](),_0x4bb284=_0x5726f5['lAukg'](getRangerDir);if(!_0x5726f5['VHrtg'](existsSync,_0x4bb284)){console['log']('Root:\x20'+_0x5726f5['lJOBo'](link,_0x2df814,bold(basename(_0x2df814)))),console['log']('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x4525e9(0x184)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x4525e9(0x184)](_0x4525e9(0x13a)+_0x5726f5['lJOBo'](link,_0x2df814,_0x5726f5[_0x4525e9(0x16c)](bold,_0x5726f5[_0x4525e9(0x16c)](basename,_0x2df814))));const _0x26baae=_0x5726f5['NmwUZ'](getCurrentVersion),_0x5ce380=getLatestVersion();if(_0x5ce380['version']&&_0x5726f5[_0x4525e9(0x195)](_0x5ce380['version'],_0x26baae))console[_0x4525e9(0x184)](_0x4525e9(0x18e)+_0x26baae+_0x4525e9(0x13f)+_0x5ce380[_0x4525e9(0x15f)]+')'),console['log'](_0x4525e9(0x172));else _0x5ce380[_0x4525e9(0x15f)]?console[_0x4525e9(0x184)]('Version:\x20'+_0x26baae+_0x4525e9(0x136)):console[_0x4525e9(0x184)](_0x4525e9(0x18e)+_0x26baae);const _0x5d0e96=await _0x5726f5['NmwUZ'](getToken);if(_0x5d0e96){const _0x38dd30=await _0x5726f5[_0x4525e9(0x13d)](getCurrentUser,_0x5d0e96);_0x38dd30['success']?console['log']('Organization:\x20'+_0x5726f5[_0x4525e9(0x13d)](bold,_0x38dd30['user']['organizationName'])):(console['log'](_0x4525e9(0x129)),console[_0x4525e9(0x184)](_0x4525e9(0x174)));}else console[_0x4525e9(0x184)](_0x4525e9(0x16f)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x4525e9(0x17e)][_0x4525e9(0x167)]&&(console[_0x4525e9(0x184)](_0x4525e9(0x139)+getCurrentEnvironment()),console['log']('API\x20URL:\x20'+getApiBaseUrl()));console['log'](_0x5726f5['Mfikx']);const _0x2b3630=await getOpencodePluginStatus();if(_0x2b3630[_0x4525e9(0x19e)]===_0x5726f5['kZdwG'])console[_0x4525e9(0x184)]('\x20\x20'+bold(_0x5726f5[_0x4525e9(0x164)])+_0x4525e9(0x159)),_0x2b3630['details']&&console[_0x4525e9(0x184)]('\x20\x20'+_0x2b3630['details']);else _0x5726f5['fWebZ'](_0x2b3630['status'],'not_configured')?(console[_0x4525e9(0x184)](_0x5726f5['HRfzO']),_0x2b3630[_0x4525e9(0x157)]&&console[_0x4525e9(0x184)]('\x20\x20'+_0x2b3630[_0x4525e9(0x157)]),console['log'](_0x5726f5[_0x4525e9(0x17b)])):console[_0x4525e9(0x184)](_0x5726f5['YzyVB']);console['log'](_0x5726f5['qQlYr']);const _0xe33226=await _0x5726f5[_0x4525e9(0x12f)](getPluginInfo,_0x4525e9(0x166));if(_0xe33226){const _0xcc7561=_0xe33226[_0x4525e9(0x156)]||_0x5726f5['nYNTA'],_0x3fc5b7=_0xe33226[_0x4525e9(0x15a)]?_0x5726f5[_0x4525e9(0x162)]:'disabled';console['log']('\x20\x20'+_0x5726f5['LlWns'](bold,_0x5726f5['zxwlO'])+_0x4525e9(0x15d)+_0xcc7561+',\x20'+_0x3fc5b7+')');}else console['log'](_0x5726f5[_0x4525e9(0x19a)]),console['log'](_0x5726f5[_0x4525e9(0x18d)]);console['log'](_0x5726f5[_0x4525e9(0x19f)]);const {project:_0x9d63fc,user:_0x27d0fc}=await _0x5726f5[_0x4525e9(0x14b)](getInstalledSkills),_0x27250c=_0x9d63fc['filter'](_0x344536=>RANGER_MANAGED_SKILLS[_0x4525e9(0x148)](_0x344536[_0x4525e9(0x153)])),_0x2041b4=_0x27d0fc[_0x4525e9(0x128)](_0x5790cc=>RANGER_MANAGED_SKILLS[_0x4525e9(0x148)](_0x5790cc[_0x4525e9(0x153)])),_0x4ed90d=_0x27250c['length']+_0x2041b4[_0x4525e9(0x175)];if(_0x5726f5[_0x4525e9(0x15b)](_0x4ed90d,0x0))console[_0x4525e9(0x184)]('No\x20skills\x20installed'),console[_0x4525e9(0x184)](_0x4525e9(0x190));else{if(_0x5726f5[_0x4525e9(0x144)](_0x27250c[_0x4525e9(0x175)],0x0)){console['log'](_0x4525e9(0x141));for(const _0x35083b of _0x27250c){console[_0x4525e9(0x184)](_0x4525e9(0x19b)+_0x5726f5[_0x4525e9(0x16c)](bold,_0x35083b[_0x4525e9(0x196)])+':\x20'+link(_0x35083b[_0x4525e9(0x142)],basename(_0x35083b['path'])));}}if(_0x2041b4['length']>0x0){console[_0x4525e9(0x184)](_0x5726f5[_0x4525e9(0x12c)]);for(const _0x320949 of _0x2041b4){console['log']('\x20\x20\x20\x20'+_0x5726f5['uUUEZ'](bold,_0x320949['displayName'])+':\x20'+link(_0x320949[_0x4525e9(0x142)],_0x5726f5[_0x4525e9(0x12f)](basename,_0x320949[_0x4525e9(0x142)])));}}}console[_0x4525e9(0x184)](_0x5726f5[_0x4525e9(0x183)]);const {envs:_0x38b3b2,activeEnv:_0x2d8907}=await _0x5726f5['CDawQ'](getEnvironments);let _0x286a9d=[];if(_0x5d0e96)try{_0x286a9d=await listCloudProfiles();}catch{}const _0x35e11a=_0x5726f5[_0x4525e9(0x16a)](_0x38b3b2[_0x4525e9(0x175)],_0x286a9d[_0x4525e9(0x175)]);if(_0x5726f5['OjtyQ'](_0x35e11a,0x0))console[_0x4525e9(0x184)]('No\x20profiles\x20configured'),console[_0x4525e9(0x184)](_0x4525e9(0x15c));else{if(_0x5726f5[_0x4525e9(0x144)](_0x35e11a,0x5)){const _0x39f9ef=[];_0x286a9d['length']>0x0&&_0x39f9ef['push'](_0x286a9d[_0x4525e9(0x175)]+'\x20cloud'),_0x5726f5[_0x4525e9(0x147)](_0x38b3b2['length'],0x0)&&_0x39f9ef[_0x4525e9(0x177)](_0x38b3b2[_0x4525e9(0x175)]+_0x4525e9(0x193)),console['log'](_0x35e11a+'\x20profiles\x20configured\x20('+_0x39f9ef[_0x4525e9(0x17d)](',\x20')+')'),_0x2d8907&&console[_0x4525e9(0x184)]('\x20\x20Active:\x20'+bold(_0x2d8907)),console[_0x4525e9(0x184)](_0x4525e9(0x15e));}else{for(const _0x33339d of _0x286a9d){const _0x4a36e1=_0x5726f5['eZgCQ'](_0x33339d['name'],_0x2d8907)?_0x5726f5[_0x4525e9(0x17f)]:'';console[_0x4525e9(0x184)]('\x20\x20'+_0x5726f5[_0x4525e9(0x18f)](bold,_0x33339d[_0x4525e9(0x153)])+_0x4525e9(0x186)+_0x4a36e1);const _0x5434d3=_0x33339d['sessionUpdatedAt']?_0x4525e9(0x170)+_0x33339d[_0x4525e9(0x169)]+')':_0x4525e9(0x185);console['log'](_0x4525e9(0x194)+_0x5434d3);}const _0x4e9c75=new Set(_0x286a9d['map'](_0x75acfe=>_0x75acfe['name']));for(const _0x445312 of _0x38b3b2){if(_0x4e9c75[_0x4525e9(0x14d)](_0x445312['name']))continue;const _0x361712=_0x445312[_0x4525e9(0x18a)]?_0x5726f5[_0x4525e9(0x17f)]:'',_0x57c2bb=_0x445312['hasEncryptedAuth']?_0x5726f5['TBJbY']:_0x445312['hasPlaintextAuth']?_0x5726f5[_0x4525e9(0x14e)]:'none';console['log']('\x20\x20'+bold(_0x445312['name'])+_0x4525e9(0x12d)+_0x361712),console[_0x4525e9(0x184)](_0x4525e9(0x17a)+_0x57c2bb),_0x5726f5[_0x4525e9(0x195)](_0x445312['settingsPath'],_0x5726f5['QyBWM'])&&console[_0x4525e9(0x184)]('\x20\x20\x20\x20Settings:\x20'+_0x5726f5[_0x4525e9(0x18c)](link,_0x445312[_0x4525e9(0x161)],_0x5726f5[_0x4525e9(0x13c)](basename,_0x445312[_0x4525e9(0x161)])));}if(!_0x2d8907){console['log']('\x0a\x20\x20No\x20active\x20profile\x20set');const _0x15a730=[..._0x286a9d[_0x4525e9(0x163)](_0x9ce433=>_0x9ce433[_0x4525e9(0x153)]),..._0x38b3b2['filter'](_0x54f482=>!_0x4e9c75['has'](_0x54f482[_0x4525e9(0x153)]))[_0x4525e9(0x163)](_0x3352cb=>_0x3352cb[_0x4525e9(0x153)])];console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x15a730['join'](',\x20')+')');}}}console['log']('');}