@ranger-testing/ranger-cli 2.5.4-alpha.1d983c3-19 → 2.5.4-alpha.2709b75-22

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 (79) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -0
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/opencodeConfig.js +1 -1
  58. package/build/commands/utils/playwrightCli.js +1 -1
  59. package/build/commands/utils/profileMessages.js +1 -1
  60. package/build/commands/utils/profileSetupBanner.js +1 -1
  61. package/build/commands/utils/projectsConfig.js +1 -1
  62. package/build/commands/utils/rangerConfig.js +1 -1
  63. package/build/commands/utils/rangerRoot.js +1 -1
  64. package/build/commands/utils/resolveProfileContext.js +1 -1
  65. package/build/commands/utils/resolveProfileUrl.js +1 -1
  66. package/build/commands/utils/retry.js +1 -1
  67. package/build/commands/utils/sessionCache.js +1 -1
  68. package/build/commands/utils/settings.js +1 -1
  69. package/build/commands/utils/skillContent.js +1 -1
  70. package/build/commands/utils/skills.js +1 -1
  71. package/build/commands/utils/stitchWebmFiles.js +1 -1
  72. package/build/commands/utils/telemetry.js +1 -1
  73. package/build/commands/utils/tokenRefresh.js +1 -1
  74. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  75. package/build/commands/utils/userApi.js +1 -1
  76. package/build/commands/utils/version.js +1 -1
  77. package/build/commands/verifyFeature.js +1 -1
  78. package/build/commands/verifyFeatureCli.js +1 -1
  79. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x467961,_0x75e23e){const _0xb95bee=_0x3b5d,_0x31ec9b=_0x467961();while(!![]){try{const _0x1114c2=parseInt(_0xb95bee(0x139))/0x1*(-parseInt(_0xb95bee(0x13e))/0x2)+parseInt(_0xb95bee(0x133))/0x3+parseInt(_0xb95bee(0x135))/0x4+parseInt(_0xb95bee(0x140))/0x5+-parseInt(_0xb95bee(0x136))/0x6*(parseInt(_0xb95bee(0x13a))/0x7)+-parseInt(_0xb95bee(0x130))/0x8+-parseInt(_0xb95bee(0x13f))/0x9;if(_0x1114c2===_0x75e23e)break;else _0x31ec9b['push'](_0x31ec9b['shift']());}catch(_0x5d448c){_0x31ec9b['push'](_0x31ec9b['shift']());}}}(_0x48f0,0x5270d));function _0x48f0(){const _0x2d37f5=['isTTY','1560312KOLbaj','\x0a✅\x20API\x20key\x20stored\x20successfully','2047292RLZElX','12198fNVKqe','wxGLf','\x0a✅\x20Logged\x20in\x20to\x20','3ZvRJcQ','161vbpWfF','UXRaD','success','log','7246xdzLbI','4295664PlxwcV','1912550FxBity','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','4334688mBcZCJ','stdout'];_0x48f0=function(){return _0x2d37f5;};return _0x48f0();}function _0x3b5d(_0x8f58ee,_0x45dd39){_0x8f58ee=_0x8f58ee-0x130;const _0x48f035=_0x48f0();let _0x3b5dbf=_0x48f035[_0x8f58ee];return _0x3b5dbf;}import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';export async function login(){const _0x3114d0=_0x3b5d,_0x558f74={'wxGLf':function(_0x519a49){return _0x519a49();},'UXRaD':function(_0x50a6f8,_0x52aa92){return _0x50a6f8(_0x52aa92);},'bKQtV':_0x3114d0(0x134)},_0x37203e=await getMcpAuthOrigin();if(_0x37203e){console[_0x3114d0(0x13d)]('Re-authenticating\x20via\x20MCP\x20bootstrap...'),await mcpBootstrap();return;}const _0x2f31cf=process['stdin']['isTTY']&&process[_0x3114d0(0x131)][_0x3114d0(0x132)];if(!_0x2f31cf)throw new Error(_0x3114d0(0x141));try{const _0x57d465=await _0x558f74[_0x3114d0(0x137)](runDeviceAuthFlow),_0x193336=await _0x558f74[_0x3114d0(0x13b)](getCurrentUser,_0x57d465);_0x193336[_0x3114d0(0x13c)]?console['log'](_0x3114d0(0x138)+_0x193336['user']['organizationName']):console['log'](_0x558f74['bKQtV']);}catch(_0x2de72d){throw new Error('Login\x20failed:\x20'+(_0x2de72d instanceof Error?_0x2de72d['message']:_0x2de72d));}}
1
+ (function(_0x49df54,_0x67005c){const _0x1633dc=_0x18de,_0x419827=_0x49df54();while(!![]){try{const _0x47869e=parseInt(_0x1633dc(0xfd))/0x1*(parseInt(_0x1633dc(0xf4))/0x2)+-parseInt(_0x1633dc(0xf3))/0x3+parseInt(_0x1633dc(0xff))/0x4+-parseInt(_0x1633dc(0x100))/0x5*(parseInt(_0x1633dc(0xfe))/0x6)+parseInt(_0x1633dc(0xef))/0x7*(parseInt(_0x1633dc(0xf7))/0x8)+parseInt(_0x1633dc(0xf1))/0x9*(-parseInt(_0x1633dc(0xfc))/0xa)+-parseInt(_0x1633dc(0xf6))/0xb;if(_0x47869e===_0x67005c)break;else _0x419827['push'](_0x419827['shift']());}catch(_0x320dc1){_0x419827['push'](_0x419827['shift']());}}}(_0x4a59,0x40357));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x18de(_0x5c7887,_0x253252){_0x5c7887=_0x5c7887-0xed;const _0x4a5935=_0x4a59();let _0x18dee6=_0x4a5935[_0x5c7887];return _0x18dee6;}import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';function _0x4a59(){const _0x247297=['22UlenyP','hxubC','1141349RJCHNA','1544mhZrNp','\x0a✅\x20Logged\x20in\x20to\x20','success','log','Gopxy','90WzvTlq','46666ffvshH','12LlWMIZ','486848PlMaMh','371965HVxIrQ','\x0a✅\x20API\x20key\x20stored\x20successfully','user','stdout','16282oedADJ','isTTY','234585NnDpjt','message','1001481mEKuYL'];_0x4a59=function(){return _0x247297;};return _0x4a59();}export async function login(){const _0x1e286e=_0x18de,_0x3f42be={'Gopxy':function(_0x339e4e){return _0x339e4e();},'hxubC':function(_0x18e147,_0x11a931){return _0x18e147 instanceof _0x11a931;}},_0x5d88c0=await getMcpAuthOrigin();if(_0x5d88c0){console[_0x1e286e(0xfa)]('Re-authenticating\x20via\x20MCP\x20bootstrap...'),await _0x3f42be[_0x1e286e(0xfb)](mcpBootstrap);return;}const _0x54521e=process['stdin'][_0x1e286e(0xf0)]&&process[_0x1e286e(0xee)][_0x1e286e(0xf0)];if(!_0x54521e)throw new Error('Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.');try{const _0x37f757=await _0x3f42be['Gopxy'](runDeviceAuthFlow),_0x5ee531=await getCurrentUser(_0x37f757);_0x5ee531[_0x1e286e(0xf9)]?console['log'](_0x1e286e(0xf8)+_0x5ee531[_0x1e286e(0xed)]['organizationName']):console[_0x1e286e(0xfa)](_0x1e286e(0x101));}catch(_0x589ced){throw new Error('Login\x20failed:\x20'+(_0x3f42be[_0x1e286e(0xf5)](_0x589ced,Error)?_0x589ced[_0x1e286e(0xf2)]:_0x589ced));}}
@@ -1 +1 @@
1
- const _0x54219d=_0x271e;(function(_0x141586,_0x4423a9){const _0x474ecd=_0x271e,_0xc53347=_0x141586();while(!![]){try{const _0x2c5178=parseInt(_0x474ecd(0x1e6))/0x1*(-parseInt(_0x474ecd(0x1e4))/0x2)+-parseInt(_0x474ecd(0x1be))/0x3*(parseInt(_0x474ecd(0x1b8))/0x4)+-parseInt(_0x474ecd(0x1cc))/0x5*(-parseInt(_0x474ecd(0x1d6))/0x6)+-parseInt(_0x474ecd(0x1e8))/0x7+-parseInt(_0x474ecd(0x196))/0x8*(parseInt(_0x474ecd(0x197))/0x9)+-parseInt(_0x474ecd(0x1c5))/0xa*(-parseInt(_0x474ecd(0x1bd))/0xb)+parseInt(_0x474ecd(0x1b4))/0xc;if(_0x2c5178===_0x4423a9)break;else _0xc53347['push'](_0xc53347['shift']());}catch(_0x28afba){_0xc53347['push'](_0xc53347['shift']());}}}(_0x6583,0x22d76));import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createServer}from'http';import{randomBytes,createHash}from'crypto';function _0x271e(_0xa01bc8,_0x1125cc){_0xa01bc8=_0xa01bc8-0x171;const _0x658342=_0x6583();let _0x271e87=_0x658342[_0xa01bc8];return _0x271e87;}import{exec}from'child_process';import{getMcpAuthUrl}from'./utils/environment.js';const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),_0x54219d(0x1e3),'mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),_0x54219d(0x1e3),'auth-origin.txt');function _0x6583(){const _0x5ea95e=['klllU','GmDhe','registration_endpoint','json','then','TigjI','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','platform','/callback','Authorization','kNYTE','parse','NTMCH','notifications/initialized','IrePE','code','NfbvR','S256','4231908pEXcTR','LbhOm','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','status','8WYfraO','TjHlz','YOGzC','string','end','594YUGhRB','333120tcGDoH','Pkrsq','pathname','writeHead','POST','redirect_uri','stdout','24740mVcijx','ranger-cli','content-type','message','refresh_token','searchParams','vNxgQ','5bhVger','sLcRV','type','token','tools/call','set','log','needs-oauth','EyOdR','VNTnX','1508796KuLqrP','Token\x20exchange\x20failed:\x20','access_token','text','Registering\x20OAuth\x20client...','Initializing\x20MCP\x20session...','AmnbR','YQzTK','MCP\x20initialize\x20failed:\x20','MCP\x20server\x20returned\x20HTTP\x20','pIvLa','NxdjE','auth-origin.txt','.ranger','2wOwJlb','initialize','179271mWXaIx','expiresAt','1346198CLFWpr','Exchanging\x20authorization\x20code...','Vqvvu','hex','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','write','RompN','bynsN','DrOtD','headers','get','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a','slice','application/json','client_id','resource','refreshToken','Ranger\x20CLI','code_challenge','isTTY','error','length','application/json,\x20text/event-stream','<html><body><h2>Authentication\x20failed</h2><p>','/.well-known/oauth-protected-resource','refresh.txt','wFXSd','authorization_code','iOvZd','HTTP\x20','HNLVH','DWvEu','now','open','sDIhG','win32','LxHMc','client_secret','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','clientId','/.well-known/oauth-authorization-server','YWYtC','data:','authorization_endpoint','qrcMb','state','THNVo','2025-03-26','trim','16VURBzS','6057opzBYN','result','2.0','origin','pOGVr','token_endpoint','utf-8','CJWKw','http://localhost:','stringify','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found'];_0x6583=function(){return _0x5ea95e;};return _0x6583();}export async function getMcpAuthOrigin(){const _0x15c911=_0x54219d,_0x26ffb0={'DrOtD':'utf-8','IrePE':function(_0x27509b,_0x1b9d33){return _0x27509b||_0x1b9d33;}};try{const _0x3b5ad6=(await readFile(AUTH_ORIGIN_PATH,_0x26ffb0[_0x15c911(0x1f0)]))[_0x15c911(0x195)]();return _0x26ffb0[_0x15c911(0x1b0)](_0x3b5ad6,null);}catch{return null;}}export async function mcpBootstrap(){const _0x127b2b=_0x54219d,_0x12e823={'fTWWW':function(_0x148d43){return _0x148d43();},'TemZD':'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.'},_0x6b6724=_0x12e823['fTWWW'](getMcpAuthUrl);currentOrigin=_0x6b6724;const _0x2eba60=process[_0x127b2b(0x1c4)][_0x127b2b(0x178)]??![];console[_0x127b2b(0x1d2)]('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x6b6724+'\x0a');const _0x3270de=await tryUnauthenticated(_0x6b6724);let _0x2cbbea=null;if(_0x3270de==='proxied')_0x2cbbea='';else{_0x2cbbea=await loadCachedToken();if(!_0x2cbbea){if(!_0x2eba60)throw new Error('MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a'+_0x12e823['TemZD']);_0x2cbbea=await oauthFlow(_0x6b6724);}}await callGetCliToken(_0x6b6724,_0x2cbbea);}async function tryUnauthenticated(_0x4e44ea){const _0x9f00f2=_0x54219d,_0xdfda73={'Pkrsq':'application/json','YQzTK':_0x9f00f2(0x199),'KkfuI':'initialize','vNxgQ':_0x9f00f2(0x194),'BcTNj':'proxied'},_0x2712d4=await fetch(_0x4e44ea,{'method':_0x9f00f2(0x1c2),'headers':{'Content-Type':_0xdfda73[_0x9f00f2(0x1bf)],'Accept':_0x9f00f2(0x17b)},'body':JSON['stringify']({'jsonrpc':_0xdfda73[_0x9f00f2(0x1dd)],'id':0x1,'method':_0xdfda73['KkfuI'],'params':{'protocolVersion':_0xdfda73[_0x9f00f2(0x1cb)],'capabilities':{},'clientInfo':{'name':'ranger-cli','version':'1.0.0'}}})});if(_0x2712d4['ok'])return await _0x2712d4[_0x9f00f2(0x1d9)](),_0xdfda73['BcTNj'];if(_0x2712d4[_0x9f00f2(0x1b7)]===0x191)return await _0x2712d4[_0x9f00f2(0x1d9)](),_0x9f00f2(0x1d3);const _0x41fcb1=await _0x2712d4['text']();throw new Error(_0x9f00f2(0x1df)+_0x2712d4['status']+':\x20'+_0x41fcb1);}class OAuthTimeoutError extends Error{constructor(_0xdbe14d){const _0x486264={'RVLZG':'OAuthTimeoutError'};super(_0xdbe14d),this['name']=_0x486264['RVLZG'];}}async function oauthFlow(_0x3dfb2e){const _0x4e8d81=_0x54219d,_0x35f69a={'kNYTE':function(_0x50db41,_0x532c0d){return _0x50db41(_0x532c0d);}};try{return await oauthFlowAttempt(_0x3dfb2e);}catch(_0x5d1ebc){if(_0x5d1ebc instanceof OAuthTimeoutError&&await loadCachedClient())return console['log']('\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a'),await clearCachedClient(),await _0x35f69a[_0x4e8d81(0x1ac)](oauthFlowAttempt,_0x3dfb2e);throw _0x5d1ebc;}}async function oauthFlowAttempt(_0xe7d8e4){const _0x3ffb56=_0x54219d,_0x8edd52={'tgaRe':'Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','qrcMb':'No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','klllU':function(_0x402bb7,_0x4e369a){return _0x402bb7(_0x4e369a);},'sDIhG':'application/json','THNVo':_0x3ffb56(0x1c9),'YWYtC':'code','Itxjw':'\x20done','RompN':'base64url','QMOse':_0x3ffb56(0x1eb),'YOGzC':'response_type','TjHlz':_0x3ffb56(0x173),'GmDhe':_0x3ffb56(0x1c3),'AmnbR':_0x3ffb56(0x177),'CJWKw':'code_challenge_method','xQszi':_0x3ffb56(0x1b3),'HGCbw':_0x3ffb56(0x192),'pOGVr':function(_0x136ab1,_0x3f0472,_0x57754b){return _0x136ab1(_0x3f0472,_0x57754b);},'RoKxB':'application/x-www-form-urlencoded'},_0x271af0=_0xe7d8e4['replace'](/\/mcp$/,'');process['stdout']['write']('Discovering\x20authorization\x20server...');const _0x463653=await fetch(_0x271af0+_0x3ffb56(0x17d));if(!_0x463653['ok'])throw new Error(_0x8edd52['tgaRe']);const _0x523532=await _0x463653[_0x3ffb56(0x1a5)](),_0x186527=_0x523532['authorization_servers']?.[0x0];if(!_0x186527)throw new Error(_0x8edd52[_0x3ffb56(0x191)]);console['log']('\x20'+_0x186527);const _0x310980=await _0x8edd52['klllU'](fetchAuthServerMetadata,_0x186527);let _0x2b85c6,_0x1b0d81;const _0x1bfab8=await loadCachedClient();if(_0x1bfab8)_0x2b85c6=_0x1bfab8[_0x3ffb56(0x18c)],_0x1b0d81=_0x1bfab8['clientSecret'];else{if(_0x310980[_0x3ffb56(0x1a4)]){process[_0x3ffb56(0x1c4)][_0x3ffb56(0x1ed)](_0x3ffb56(0x1da));const _0x300db9=await fetch(_0x310980[_0x3ffb56(0x1a4)],{'method':_0x3ffb56(0x1c2),'headers':{'Content-Type':_0x8edd52[_0x3ffb56(0x187)]},'body':JSON[_0x3ffb56(0x1a0)]({'client_name':_0x3ffb56(0x176),'redirect_uris':[_0x3ffb56(0x19f)+CALLBACK_PORT+_0x3ffb56(0x1aa)],'grant_types':[_0x3ffb56(0x180),_0x8edd52[_0x3ffb56(0x193)]],'response_types':[_0x8edd52[_0x3ffb56(0x18e)]],'token_endpoint_auth_method':'none'})});if(!_0x300db9['ok']){const _0x570400=await _0x300db9['text']();throw new Error('Client\x20registration\x20failed:\x20'+_0x570400);}const _0x2ac8f8=await _0x300db9['json']();_0x2b85c6=_0x2ac8f8[_0x3ffb56(0x173)],_0x1b0d81=_0x2ac8f8[_0x3ffb56(0x18a)],await saveCachedClient(_0x2b85c6,_0x1b0d81),console[_0x3ffb56(0x1d2)](_0x8edd52['Itxjw']);}else throw new Error(_0x3ffb56(0x1a1));}const _0xf922b5=randomBytes(0x20)['toString'](_0x8edd52[_0x3ffb56(0x1ee)]),_0x4f615d=_0x8edd52['klllU'](createHash,'sha256')['update'](_0xf922b5)['digest'](_0x8edd52[_0x3ffb56(0x1ee)]),_0x475634=_0x8edd52[_0x3ffb56(0x1a2)](randomBytes,0x10)['toString'](_0x8edd52['QMOse']),_0x381506=new URL(_0x310980[_0x3ffb56(0x190)]);_0x381506['searchParams']['set'](_0x8edd52[_0x3ffb56(0x1ba)],_0x3ffb56(0x1b1)),_0x381506[_0x3ffb56(0x1ca)][_0x3ffb56(0x1d1)](_0x8edd52[_0x3ffb56(0x1b9)],_0x2b85c6),_0x381506['searchParams'][_0x3ffb56(0x1d1)](_0x8edd52[_0x3ffb56(0x1a3)],_0x3ffb56(0x19f)+CALLBACK_PORT+_0x3ffb56(0x1aa)),_0x381506['searchParams'][_0x3ffb56(0x1d1)](_0x8edd52[_0x3ffb56(0x1dc)],_0x4f615d),_0x381506[_0x3ffb56(0x1ca)][_0x3ffb56(0x1d1)](_0x8edd52[_0x3ffb56(0x19e)],_0x8edd52['xQszi']),_0x381506[_0x3ffb56(0x1ca)]['set'](_0x8edd52['HGCbw'],_0x475634);_0x523532[_0x3ffb56(0x174)]&&_0x381506[_0x3ffb56(0x1ca)]['set'](_0x3ffb56(0x174),_0x523532['resource']);console[_0x3ffb56(0x1d2)]('\x0aOpening\x20browser\x20for\x20authentication...'),console[_0x3ffb56(0x1d2)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a'+_0x381506['toString']()+'\x0a'),await openBrowser(_0x381506['toString']());const _0x5e14e3=await _0x8edd52['klllU'](waitForCallback,_0x475634);process['stdout'][_0x3ffb56(0x1ed)](_0x3ffb56(0x1e9));const _0x4b8764=new URLSearchParams({'grant_type':_0x3ffb56(0x180),'code':_0x5e14e3,'redirect_uri':_0x3ffb56(0x19f)+CALLBACK_PORT+_0x3ffb56(0x1aa),'client_id':_0x2b85c6,'code_verifier':_0xf922b5});_0x1b0d81&&_0x4b8764['set'](_0x3ffb56(0x18a),_0x1b0d81);_0x523532[_0x3ffb56(0x174)]&&_0x4b8764[_0x3ffb56(0x1d1)]('resource',_0x523532['resource']);const _0x1c3675=await _0x8edd52[_0x3ffb56(0x19b)](fetch,_0x310980[_0x3ffb56(0x19c)],{'method':'POST','headers':{'Content-Type':_0x8edd52['RoKxB']},'body':_0x4b8764});if(!_0x1c3675['ok']){const _0x20024f=await _0x1c3675[_0x3ffb56(0x1d9)]();throw new Error(_0x3ffb56(0x1d7)+_0x20024f);}const _0x513071=await _0x1c3675[_0x3ffb56(0x1a5)]();return console['log'](_0x8edd52['Itxjw']),await saveCachedToken(_0x513071[_0x3ffb56(0x1d8)],_0x513071['refresh_token'],_0x513071['expires_in']),_0x513071[_0x3ffb56(0x1d8)];}async function callGetCliToken(_0x200190,_0x3a4046){const _0x42d539=_0x54219d,_0x108d0d={'HNLVH':function(_0x61b07c,_0x35ffda,_0x113153){return _0x61b07c(_0x35ffda,_0x113153);},'rRKrz':_0x42d539(0x1c2),'wFXSd':function(_0x2ad5f1,_0x3f53ce){return _0x2ad5f1(_0x3f53ce);},'mkSVi':'application/json,\x20text/event-stream','UBrJy':_0x42d539(0x1ab),'NTMCH':_0x42d539(0x1db),'WfEWZ':_0x42d539(0x199),'NfbvR':'\x20done','Vqvvu':_0x42d539(0x1af),'LxHMc':'Requesting\x20CLI\x20token...','aYzli':'get_cli_token','UAKYe':'.ranger','THRHD':_0x42d539(0x17e),'hjIDg':function(_0x32e2e2,_0x463e44,_0x11eb46,_0x1c91cc){return _0x32e2e2(_0x463e44,_0x11eb46,_0x1c91cc);},'ZgUMq':_0x42d539(0x1f3)},_0x593d83={'Content-Type':_0x42d539(0x172),'Accept':_0x108d0d['mkSVi']};_0x3a4046&&(_0x593d83[_0x108d0d['UBrJy']]='Bearer\x20'+_0x3a4046);const _0x3e75dd=async _0x110dcf=>{const _0x24c514=_0x42d539,_0x225a08=await _0x108d0d[_0x24c514(0x183)](fetch,_0x200190,{'method':_0x108d0d['rRKrz'],'headers':_0x593d83,'body':JSON[_0x24c514(0x1a0)](_0x110dcf)});if(!_0x225a08['ok']){const _0x12621d=await _0x225a08['text']();throw new Error(_0x24c514(0x182)+_0x225a08[_0x24c514(0x1b7)]+':\x20'+_0x12621d);}return _0x108d0d['wFXSd'](parseResponse,_0x225a08);};process[_0x42d539(0x1c4)][_0x42d539(0x1ed)](_0x108d0d[_0x42d539(0x1ae)]);const _0x1f6ef2=await _0x3e75dd({'jsonrpc':_0x108d0d['WfEWZ'],'id':0x1,'method':_0x42d539(0x1e5),'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x42d539(0x1c6),'version':'1.0.0'}}});if(_0x1f6ef2[_0x42d539(0x179)])throw new Error(_0x42d539(0x1de)+(_0x1f6ef2[_0x42d539(0x179)]['message']??JSON[_0x42d539(0x1a0)](_0x1f6ef2['error'])));console[_0x42d539(0x1d2)](_0x108d0d[_0x42d539(0x1b2)]),await fetch(_0x200190,{'method':_0x108d0d['rRKrz'],'headers':_0x593d83,'body':JSON[_0x42d539(0x1a0)]({'jsonrpc':_0x108d0d['WfEWZ'],'method':_0x108d0d[_0x42d539(0x1ea)]})})[_0x42d539(0x1a6)](_0x539708=>_0x539708[_0x42d539(0x1d9)]()),process['stdout'][_0x42d539(0x1ed)](_0x108d0d[_0x42d539(0x189)]);const _0x2802af=await _0x108d0d[_0x42d539(0x17f)](_0x3e75dd,{'jsonrpc':'2.0','id':0x2,'method':_0x42d539(0x1d0),'params':{'name':_0x108d0d['aYzli'],'arguments':{}}});if(_0x2802af['error'])throw new Error('get_cli_token\x20failed:\x20'+(_0x2802af['error'][_0x42d539(0x1c8)]??JSON[_0x42d539(0x1a0)](_0x2802af['error'])));console[_0x42d539(0x1d2)](_0x108d0d['NfbvR']);const _0xcc89c2=extractToken(_0x2802af[_0x42d539(0x198)]);if(!_0xcc89c2){console['error']('\x0aUnexpected\x20response\x20structure:'),console['error'](JSON['stringify'](_0x2802af['result'],null,0x2));throw new Error(_0x42d539(0x1a8));}const _0x5d405c=join(homedir(),_0x108d0d['UAKYe']),_0x78f84=_0x108d0d['HNLVH'](join,_0x5d405c,_0x108d0d['THRHD']);await mkdir(_0x5d405c,{'recursive':!![]}),await writeFile(_0x78f84,_0xcc89c2,{'mode':0x180}),await _0x108d0d['hjIDg'](writeFile,join(_0x5d405c,_0x42d539(0x1e2)),_0x200190,{'mode':0x180}),console[_0x42d539(0x1d2)]('\x0aToken\x20written\x20to\x20'+_0x78f84),console[_0x42d539(0x1d2)](_0x108d0d['ZgUMq']);}async function fetchAuthServerMetadata(_0x4bbd3b){const _0x1cbd57=_0x54219d,_0x439eb1={'VvyEA':function(_0x402dcc,_0x5dab9f){return _0x402dcc(_0x5dab9f);}},_0x14dae3=_0x4bbd3b+_0x1cbd57(0x18d),_0x4cbcfd=await _0x439eb1['VvyEA'](fetch,_0x14dae3);if(!_0x4cbcfd['ok'])throw new Error(_0x1cbd57(0x1b6)+_0x14dae3+':\x20'+_0x4cbcfd[_0x1cbd57(0x1b7)]);return _0x4cbcfd[_0x1cbd57(0x1a5)]();}function waitForCallback(_0x57a1cf){const _0x459563=_0x54219d,_0x262802={'sLcRV':function(_0x1d6374){return _0x1d6374();},'TyLoS':function(_0x58a45f,_0x2f081a){return _0x58a45f(_0x2f081a);},'DWvEu':_0x459563(0x1aa),'keqtr':function(_0x42f69e,_0x2ad26f){return _0x42f69e!==_0x2ad26f;},'OAuTN':'<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','pavyC':'text/html','IjhnM':'<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','ecGES':function(_0x4a80ef,_0x30cfef){return _0x4a80ef(_0x30cfef);},'orLyj':'127.0.0.1'};return new Promise((_0x292810,_0x5e99a7)=>{const _0x5e8352=()=>{_0x1dac88['closeAllConnections'](),_0x1dac88['close']();},_0x28ca81=setTimeout(()=>{const _0x379c6a=_0x271e;_0x262802[_0x379c6a(0x1cd)](_0x5e8352),_0x262802['TyLoS'](_0x5e99a7,new OAuthTimeoutError(_0x379c6a(0x18b)));},0x1d4c0),_0x1dac88=createServer((_0x2e1788,_0x58b837)=>{const _0x12c596=_0x271e,_0x256c7f=new URL(_0x2e1788['url']??'/',_0x12c596(0x19f)+CALLBACK_PORT);if(_0x256c7f[_0x12c596(0x1c0)]!==_0x262802[_0x12c596(0x184)]){_0x58b837['writeHead'](0x194),_0x58b837['end']('Not\x20found');return;}const _0x3abd6b=_0x256c7f['searchParams'][_0x12c596(0x1f2)](_0x12c596(0x1b1)),_0xb1fa41=_0x256c7f['searchParams']['get'](_0x12c596(0x192)),_0xb3261d=_0x256c7f['searchParams']['get']('error');if(_0xb3261d){const _0x22d684=_0x256c7f['searchParams']['get']('error_description')??_0xb3261d;_0x58b837['writeHead'](0xc8,{'Content-Type':'text/html'}),_0x58b837[_0x12c596(0x1bc)](_0x12c596(0x17c)+_0x22d684+_0x12c596(0x1ec)),_0x262802['TyLoS'](clearTimeout,_0x28ca81),_0x262802['sLcRV'](_0x5e8352),_0x5e99a7(new Error('OAuth\x20error:\x20'+_0x22d684));return;}if(!_0x3abd6b||_0x262802['keqtr'](_0xb1fa41,_0x57a1cf)){_0x58b837['writeHead'](0x190,{'Content-Type':'text/html'}),_0x58b837[_0x12c596(0x1bc)](_0x262802['OAuTN']);return;}_0x58b837[_0x12c596(0x1c1)](0xc8,{'Content-Type':_0x262802['pavyC']}),_0x58b837[_0x12c596(0x1bc)](_0x262802['IjhnM']),_0x262802['ecGES'](clearTimeout,_0x28ca81),_0x5e8352(),_0x292810(_0x3abd6b);});_0x1dac88['listen'](CALLBACK_PORT,_0x262802['orLyj']);});}async function openBrowser(_0x19c535){const _0x2bf3af=_0x54219d,_0x1d9b43={'TigjI':function(_0x798b7d,_0x3f42a1){return _0x798b7d===_0x3f42a1;}},_0x1a869d=_0x1d9b43[_0x2bf3af(0x1a7)](process[_0x2bf3af(0x1a9)],'darwin')?_0x2bf3af(0x186):process['platform']===_0x2bf3af(0x188)?'start':'xdg-open';exec(_0x1a869d+'\x20\x22'+_0x19c535+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x2c3636=_0x54219d,_0x5b1a8f={'NUBUK':function(_0x2d09c1,_0x1be992,_0x331942){return _0x2d09c1(_0x1be992,_0x331942);},'FyYdh':'utf-8','UWPyS':function(_0x58ac00,_0x3e7f6d){return _0x58ac00!==_0x3e7f6d;},'UZihq':function(_0x3ce59e,_0x2ddb4a){return _0x3ce59e>_0x2ddb4a;}};try{const _0x59b7c6=JSON[_0x2c3636(0x1ad)](await _0x5b1a8f['NUBUK'](readFile,TOKEN_CACHE_PATH,_0x5b1a8f['FyYdh']));if(_0x59b7c6['origin']&&_0x5b1a8f['UWPyS'](_0x59b7c6[_0x2c3636(0x19a)],currentOrigin))return null;if(_0x59b7c6[_0x2c3636(0x1e7)]&&_0x5b1a8f['UZihq'](Date['now'](),_0x59b7c6['expiresAt']))return null;return _0x59b7c6['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x40ab7d,_0x48a7d1,_0x147a92){const _0x28aa7b=_0x54219d,_0x50f220={'NxdjE':function(_0x48a3be){return _0x48a3be();},'ppLLw':function(_0x4723ce,_0xf48863,_0x44eeb4){return _0x4723ce(_0xf48863,_0x44eeb4);}},_0x53b97c=await _0x50f220[_0x28aa7b(0x1e1)](loadCachedData),_0x500f48={..._0x53b97c,'origin':currentOrigin,'accessToken':_0x40ab7d,'refreshToken':_0x48a7d1??_0x53b97c?.[_0x28aa7b(0x175)],'expiresAt':_0x147a92?Date[_0x28aa7b(0x185)]()+_0x147a92*0x3e8:undefined};await _0x50f220['ppLLw'](mkdir,join(_0x50f220['NxdjE'](homedir),'.ranger'),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON[_0x28aa7b(0x1a0)](_0x500f48),{'mode':0x180});}async function loadCachedClient(){const _0x326765=_0x54219d,_0x101d10=await loadCachedData();if(_0x101d10?.[_0x326765(0x19a)]&&_0x101d10['origin']!==currentOrigin)return null;return _0x101d10?.['clientId']?{'clientId':_0x101d10[_0x326765(0x18c)],'clientSecret':_0x101d10['clientSecret']}:null;}async function clearCachedClient(){const _0xf098d={'LELZS':function(_0x54eb2a,_0x50dd49,_0x55fddc,_0x3b988b){return _0x54eb2a(_0x50dd49,_0x55fddc,_0x3b988b);}},_0x3b2dd6=await loadCachedData();if(!_0x3b2dd6)return;const {clientId:_0x4a9ecd,clientSecret:_0x336c4b,..._0x2d551c}=_0x3b2dd6;await _0xf098d['LELZS'](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x2d551c),{'mode':0x180});}async function saveCachedClient(_0x2c47dc,_0x1ff42e){const _0xe5c91d=_0x54219d,_0x567ad8={'VNTnX':function(_0x10137d){return _0x10137d();},'KmiTV':function(_0x16856c,_0x1c4c8d,_0x18c3b4){return _0x16856c(_0x1c4c8d,_0x18c3b4);},'bynsN':_0xe5c91d(0x1e3),'HNMwl':function(_0x321e30,_0x5c80cf,_0x41e8a9,_0xcf4184){return _0x321e30(_0x5c80cf,_0x41e8a9,_0xcf4184);}},_0x494443=await _0x567ad8[_0xe5c91d(0x1d5)](loadCachedData),_0x410779={..._0x494443,'origin':currentOrigin,'accessToken':_0x494443?.['accessToken']??'','clientId':_0x2c47dc,'clientSecret':_0x1ff42e};await mkdir(_0x567ad8['KmiTV'](join,_0x567ad8[_0xe5c91d(0x1d5)](homedir),_0x567ad8[_0xe5c91d(0x1ef)]),{'recursive':!![]}),await _0x567ad8['HNMwl'](writeFile,TOKEN_CACHE_PATH,JSON[_0xe5c91d(0x1a0)](_0x410779),{'mode':0x180});}async function loadCachedData(){const _0x11fa94=_0x54219d;try{return JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x11fa94(0x19d)));}catch{return null;}}async function parseResponse(_0x2e7326){const _0x516e4c=_0x54219d,_0x4b2f43={'wlmWl':_0x516e4c(0x1c7),'LbhOm':'text/event-stream','feZUw':'No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream'},_0x2de971=_0x2e7326[_0x516e4c(0x1f1)][_0x516e4c(0x1f2)](_0x4b2f43['wlmWl'])??'';if(_0x2de971['includes'](_0x4b2f43[_0x516e4c(0x1b5)])){const _0x1488b2=await _0x2e7326[_0x516e4c(0x1d9)]();for(const _0x47f0ed of _0x1488b2['split']('\x0a')){const _0x4595e6=_0x47f0ed['trim']();if(_0x4595e6['startsWith'](_0x516e4c(0x18f))){const _0x57a797=_0x4595e6[_0x516e4c(0x171)]('data:'[_0x516e4c(0x17a)])[_0x516e4c(0x195)]();if(!_0x57a797)continue;try{const _0x1cefeb=JSON['parse'](_0x57a797);if(_0x1cefeb['id']!==undefined||_0x1cefeb['error'])return _0x1cefeb;}catch{}}}throw new Error(_0x4b2f43['feZUw']);}return _0x2e7326['json']();}function extractToken(_0x1c1cc3){const _0x20366a=_0x54219d,_0x2d5a95={'iOvZd':function(_0x576723,_0x2ae561){return _0x576723===_0x2ae561;},'EyOdR':'Unknown\x20error','dCcdu':_0x20366a(0x1d9),'pIvLa':'string'};if(!_0x1c1cc3)return null;const _0x301cf9=_0x1c1cc3['structuredContent'];if(_0x301cf9?.['token']&&_0x2d5a95[_0x20366a(0x181)](typeof _0x301cf9[_0x20366a(0x1cf)],_0x20366a(0x1bb)))return _0x301cf9['token'];if(_0x1c1cc3['isError']){const _0x26674c=_0x1c1cc3['content'];throw new Error('Server\x20returned\x20error:\x20'+(_0x26674c?.[0x0]?.[_0x20366a(0x1d9)]??_0x2d5a95[_0x20366a(0x1d4)]));}const _0x821ed3=_0x1c1cc3['content'];if(_0x821ed3)for(const _0x434d16 of _0x821ed3){if(_0x434d16[_0x20366a(0x1ce)]===_0x2d5a95['dCcdu']&&_0x434d16['text']){try{const _0x37e8a3=JSON[_0x20366a(0x1ad)](_0x434d16[_0x20366a(0x1d9)]);if(_0x2d5a95['iOvZd'](typeof _0x37e8a3?.[_0x20366a(0x1cf)],_0x2d5a95[_0x20366a(0x1e0)]))return _0x37e8a3['token'];}catch{}const _0x127bc4=_0x434d16[_0x20366a(0x1d9)]['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x127bc4)return _0x127bc4[0x1];}}return null;}
1
+ const _0x86b6ea=_0x3a74;(function(_0x53c485,_0x2ee6a9){const _0xaf6d38=_0x3a74,_0xa0a029=_0x53c485();while(!![]){try{const _0x2a2432=-parseInt(_0xaf6d38(0x218))/0x1+parseInt(_0xaf6d38(0x1ed))/0x2+parseInt(_0xaf6d38(0x1be))/0x3*(-parseInt(_0xaf6d38(0x1da))/0x4)+-parseInt(_0xaf6d38(0x21e))/0x5*(parseInt(_0xaf6d38(0x1af))/0x6)+-parseInt(_0xaf6d38(0x1de))/0x7*(parseInt(_0xaf6d38(0x220))/0x8)+-parseInt(_0xaf6d38(0x219))/0x9+-parseInt(_0xaf6d38(0x1a0))/0xa*(-parseInt(_0xaf6d38(0x1bd))/0xb);if(_0x2a2432===_0x2ee6a9)break;else _0xa0a029['push'](_0xa0a029['shift']());}catch(_0x15eff1){_0xa0a029['push'](_0xa0a029['shift']());}}}(_0x3dbd,0x40189));function _0x3dbd(){const _0x454613=['result','127.0.0.1','includes','Discovering\x20authorization\x20server...','xLSwb','resource','\x20done','platform','tJquJ','11eAonkL','24IKGzuA','pathname','code_challenge_method','clientSecret','refreshToken','xdg-open','ysaux','FHRXp','refresh_token','string','trim','get','kgfay','vUlTx','state','snYem','clientId','text/html','hex','ranger-cli','CfXqy','writeHead','cfXIg','content','Bearer\x20','open','LQYzi','name','37764dXZRYk','aJCWi','text','log','1421kHIblP','structuredContent','parse','redirect_uri','accessToken','iYJDO','gWKZl','Not\x20found','WhSiF','status','WmULm','client_id','stringify','toString','YqFOC','1036624ZPcywV','auth-origin.txt','get_cli_token','initialize','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','response_type','qOkVo','IZLVL','NenFW','listen','base64url','Client\x20registration\x20failed:\x20','PnoMo','tFFGX','client_secret','OAuth\x20error:\x20','Ranger\x20CLI','replace','qUxSX','Registering\x20OAuth\x20client...','2025-03-26','set','wIcPu','Authorization','write','AiJIy','\x0aToken\x20written\x20to\x20','url','S256','origin','TnpAf','<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','code','\x0aOpening\x20browser\x20for\x20authentication...','WCVRI','message','startsWith','type','DybNe','searchParams','utf-8','http://localhost:','end','131282owpjuF','3001338WIAGQS','token','OUjha','stdout','Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','387085NZKCNj','1.0.0','9336KnfrDQ','authorization_code','application/json','MQWBE','MqXjC','authorization_endpoint','Jkjnn','8310860cwcfNy','wZsnG','2.0','QkVTq','expiresAt','.ranger','isError','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','/callback','OAuthTimeoutError','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','Initializing\x20MCP\x20session...','json','NnHbC','access_token','24ZFsBIT','POST','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','error','get_cli_token\x20failed:\x20'];_0x3dbd=function(){return _0x454613;};return _0x3dbd();}import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createServer}from'http';import{randomBytes,createHash}from'crypto';import{exec}from'child_process';import{getMcpAuthUrl}from'./utils/environment.js';const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),'.ranger','mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),'.ranger',_0x86b6ea(0x1ee));export async function getMcpAuthOrigin(){const _0x2204e9=_0x86b6ea,_0x1e8cb1={'bzqjk':function(_0x32f56e,_0x12285c,_0x1ad971){return _0x32f56e(_0x12285c,_0x1ad971);},'CjMqj':'utf-8'};try{const _0x3df6d9=(await _0x1e8cb1['bzqjk'](readFile,AUTH_ORIGIN_PATH,_0x1e8cb1['CjMqj']))[_0x2204e9(0x1c8)]();return _0x3df6d9||null;}catch{return null;}}export async function mcpBootstrap(){const _0x11c5c8=_0x86b6ea,_0x4c5a76={'CEobn':function(_0x291d63){return _0x291d63();},'AiJIy':'MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','SwDnq':function(_0x2c3f33,_0x2a1024,_0x424578){return _0x2c3f33(_0x2a1024,_0x424578);}},_0x4f2088=_0x4c5a76['CEobn'](getMcpAuthUrl);currentOrigin=_0x4f2088;const _0x2fd8d4=process['stdout']['isTTY']??![];console[_0x11c5c8(0x1dd)]('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x4f2088+'\x0a');const _0x4f3dc7=await tryUnauthenticated(_0x4f2088);let _0xa40adf=null;if(_0x4f3dc7==='proxied')_0xa40adf='';else{_0xa40adf=await loadCachedToken();if(!_0xa40adf){if(!_0x2fd8d4)throw new Error(_0x4c5a76[_0x11c5c8(0x206)]+_0x11c5c8(0x1f1));_0xa40adf=await oauthFlow(_0x4f2088);}}await _0x4c5a76['SwDnq'](callGetCliToken,_0x4f2088,_0xa40adf);}async function tryUnauthenticated(_0x3e9a58){const _0x2089d5=_0x86b6ea,_0x24687c={'qOkVo':function(_0x586e5a,_0x5ab15e,_0x5c6f36){return _0x586e5a(_0x5ab15e,_0x5c6f36);},'ItRoq':_0x2089d5(0x222),'quvOW':'application/json,\x20text/event-stream','aJCWi':function(_0x521492,_0xb35738){return _0x521492===_0xb35738;}},_0xc908b9=await _0x24687c[_0x2089d5(0x1f3)](fetch,_0x3e9a58,{'method':_0x2089d5(0x1b0),'headers':{'Content-Type':_0x24687c['ItRoq'],'Accept':_0x24687c['quvOW']},'body':JSON[_0x2089d5(0x1ea)]({'jsonrpc':_0x2089d5(0x1a2),'id':0x1,'method':_0x2089d5(0x1f0),'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':'ranger-cli','version':_0x2089d5(0x21f)}}})});if(_0xc908b9['ok'])return await _0xc908b9[_0x2089d5(0x1dc)](),'proxied';if(_0x24687c[_0x2089d5(0x1db)](_0xc908b9[_0x2089d5(0x1e7)],0x191))return await _0xc908b9[_0x2089d5(0x1dc)](),'needs-oauth';const _0x213dfe=await _0xc908b9['text']();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0xc908b9[_0x2089d5(0x1e7)]+':\x20'+_0x213dfe);}class OAuthTimeoutError extends Error{constructor(_0xecabd5){const _0x41f38f=_0x86b6ea;super(_0xecabd5),this[_0x41f38f(0x1d9)]=_0x41f38f(0x1a9);}}async function oauthFlow(_0x2e735f){const _0x311ded=_0x86b6ea,_0x327fc2={'gWKZl':function(_0x359c6a,_0xfaca37){return _0x359c6a instanceof _0xfaca37;}};try{return await oauthFlowAttempt(_0x2e735f);}catch(_0x26148c){if(_0x327fc2[_0x311ded(0x1e4)](_0x26148c,OAuthTimeoutError)&&await loadCachedClient())return console['log'](_0x311ded(0x1a7)),await clearCachedClient(),await oauthFlowAttempt(_0x2e735f);throw _0x26148c;}}async function oauthFlowAttempt(_0x501fcf){const _0xfb2140=_0x86b6ea,_0x196d82={'IhptJ':_0xfb2140(0x1b7),'FHRXp':function(_0x39ccb6,_0x5d13a9){return _0x39ccb6(_0x5d13a9);},'HeVTB':_0xfb2140(0x21d),'BWvZy':'No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','PcdBV':function(_0x4fbfd7,_0x390b8e){return _0x4fbfd7(_0x390b8e);},'lflxx':'POST','iYJDO':function(_0x108a52,_0x235a2c,_0x76a2e9){return _0x108a52(_0x235a2c,_0x76a2e9);},'QkVTq':'sha256','MdxYV':_0xfb2140(0x1f2),'IZLVL':_0xfb2140(0x20d),'OUjha':_0xfb2140(0x1e1),'qUxSX':_0xfb2140(0x20e),'rhULM':function(_0x6d4f5c,_0x896237){return _0x6d4f5c(_0x896237);},'vUlTx':'Exchanging\x20authorization\x20code...','MbtKG':_0xfb2140(0x221),'Igmgt':'client_secret','qcTnj':_0xfb2140(0x1b9),'Jkjnn':_0xfb2140(0x1ba),'KjoSD':function(_0x511565,_0xc35d1f,_0x38add7,_0x3ec17f){return _0x511565(_0xc35d1f,_0x38add7,_0x3ec17f);}},_0x330d37=_0x501fcf[_0xfb2140(0x1fe)](/\/mcp$/,'');process[_0xfb2140(0x21c)][_0xfb2140(0x205)](_0x196d82['IhptJ']);const _0x31dfb4=await _0x196d82[_0xfb2140(0x1c5)](fetch,_0x330d37+'/.well-known/oauth-protected-resource');if(!_0x31dfb4['ok'])throw new Error(_0x196d82['HeVTB']);const _0x5729f9=await _0x31dfb4[_0xfb2140(0x1ac)](),_0x51c01b=_0x5729f9['authorization_servers']?.[0x0];if(!_0x51c01b)throw new Error(_0x196d82['BWvZy']);console['log']('\x20'+_0x51c01b);const _0x24bd18=await _0x196d82['PcdBV'](fetchAuthServerMetadata,_0x51c01b);let _0xdb1882,_0x297f58;const _0x1aa31a=await loadCachedClient();if(_0x1aa31a)_0xdb1882=_0x1aa31a['clientId'],_0x297f58=_0x1aa31a['clientSecret'];else{if(_0x24bd18['registration_endpoint']){process['stdout'][_0xfb2140(0x205)](_0xfb2140(0x200));const _0x3deab0=await fetch(_0x24bd18['registration_endpoint'],{'method':_0x196d82['lflxx'],'headers':{'Content-Type':'application/json'},'body':JSON['stringify']({'client_name':_0xfb2140(0x1fd),'redirect_uris':['http://localhost:'+CALLBACK_PORT+'/callback'],'grant_types':['authorization_code',_0xfb2140(0x1c6)],'response_types':['code'],'token_endpoint_auth_method':'none'})});if(!_0x3deab0['ok']){const _0x453d1a=await _0x3deab0[_0xfb2140(0x1dc)]();throw new Error(_0xfb2140(0x1f8)+_0x453d1a);}const _0x563e2a=await _0x3deab0[_0xfb2140(0x1ac)]();_0xdb1882=_0x563e2a[_0xfb2140(0x1e9)],_0x297f58=_0x563e2a[_0xfb2140(0x1fb)],await _0x196d82[_0xfb2140(0x1e3)](saveCachedClient,_0xdb1882,_0x297f58),console['log']('\x20done');}else throw new Error('Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found');}const _0x4c667d=randomBytes(0x20)['toString']('base64url'),_0x10dd0e=createHash(_0x196d82[_0xfb2140(0x1a3)])['update'](_0x4c667d)['digest'](_0xfb2140(0x1f7)),_0x106277=randomBytes(0x10)[_0xfb2140(0x1eb)](_0xfb2140(0x1d0)),_0x206354=new URL(_0x24bd18[_0xfb2140(0x225)]);_0x206354[_0xfb2140(0x214)][_0xfb2140(0x202)](_0x196d82['MdxYV'],_0x196d82[_0xfb2140(0x1f4)]),_0x206354[_0xfb2140(0x214)][_0xfb2140(0x202)]('client_id',_0xdb1882),_0x206354['searchParams'][_0xfb2140(0x202)](_0x196d82[_0xfb2140(0x21b)],'http://localhost:'+CALLBACK_PORT+_0xfb2140(0x1a8)),_0x206354['searchParams'][_0xfb2140(0x202)]('code_challenge',_0x10dd0e),_0x206354['searchParams']['set'](_0xfb2140(0x1c0),_0xfb2140(0x209)),_0x206354[_0xfb2140(0x214)]['set'](_0xfb2140(0x1cc),_0x106277);_0x5729f9[_0xfb2140(0x1b9)]&&_0x206354['searchParams']['set']('resource',_0x5729f9[_0xfb2140(0x1b9)]);console['log'](_0x196d82[_0xfb2140(0x1ff)]),console['log']('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a'+_0x206354[_0xfb2140(0x1eb)]()+'\x0a'),await openBrowser(_0x206354['toString']());const _0x57a040=await _0x196d82['rhULM'](waitForCallback,_0x106277);process['stdout'][_0xfb2140(0x205)](_0x196d82[_0xfb2140(0x1cb)]);const _0x234474=new URLSearchParams({'grant_type':_0x196d82['MbtKG'],'code':_0x57a040,'redirect_uri':'http://localhost:'+CALLBACK_PORT+'/callback','client_id':_0xdb1882,'code_verifier':_0x4c667d});_0x297f58&&_0x234474['set'](_0x196d82['Igmgt'],_0x297f58);_0x5729f9[_0xfb2140(0x1b9)]&&_0x234474['set'](_0x196d82['qcTnj'],_0x5729f9[_0xfb2140(0x1b9)]);const _0x32f555=await fetch(_0x24bd18['token_endpoint'],{'method':_0x196d82['lflxx'],'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':_0x234474});if(!_0x32f555['ok']){const _0x108c6d=await _0x32f555['text']();throw new Error('Token\x20exchange\x20failed:\x20'+_0x108c6d);}const _0x18f26c=await _0x32f555['json']();return console[_0xfb2140(0x1dd)](_0x196d82[_0xfb2140(0x226)]),await _0x196d82['KjoSD'](saveCachedToken,_0x18f26c[_0xfb2140(0x1ae)],_0x18f26c['refresh_token'],_0x18f26c['expires_in']),_0x18f26c['access_token'];}async function callGetCliToken(_0xac771,_0x540731){const _0x5d6097=_0x86b6ea,_0x1dc472={'xLSwb':'POST','hZvYv':function(_0x8c9f4b,_0x4af8d7){return _0x8c9f4b(_0x4af8d7);},'TbTkj':_0x5d6097(0x1ab),'Drjjh':_0x5d6097(0x201),'RgARW':_0x5d6097(0x21f),'YqFOC':_0x5d6097(0x1a2),'bKVBe':'Requesting\x20CLI\x20token...','CfXqy':'tools/call','ohhgf':function(_0x2a1917,_0x3c135c,_0x83da57){return _0x2a1917(_0x3c135c,_0x83da57);},'UBehX':'.ranger','KgkuF':function(_0x3cf282,_0x11bc8d,_0x583d04){return _0x3cf282(_0x11bc8d,_0x583d04);},'OOBXg':'refresh.txt','Gvknu':function(_0x2517b9,_0x53d229,_0x4db3bd,_0x3f749d){return _0x2517b9(_0x53d229,_0x4db3bd,_0x3f749d);},'wIcPu':function(_0x2abc06,_0xa916d3,_0x5d9cc3,_0x1919b4){return _0x2abc06(_0xa916d3,_0x5d9cc3,_0x1919b4);},'ELCRa':function(_0x5c0a18,_0x502e7e,_0x2c5e36){return _0x5c0a18(_0x502e7e,_0x2c5e36);},'WmULm':'Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a'},_0x571c3b={'Content-Type':_0x5d6097(0x222),'Accept':'application/json,\x20text/event-stream'};_0x540731&&(_0x571c3b[_0x5d6097(0x204)]=_0x5d6097(0x1d6)+_0x540731);const _0x1fc676=async _0x25ec75=>{const _0x3dc46b=_0x5d6097,_0x374d00=await fetch(_0xac771,{'method':_0x1dc472[_0x3dc46b(0x1b8)],'headers':_0x571c3b,'body':JSON['stringify'](_0x25ec75)});if(!_0x374d00['ok']){const _0x4bccbc=await _0x374d00['text']();throw new Error('HTTP\x20'+_0x374d00['status']+':\x20'+_0x4bccbc);}return _0x1dc472['hZvYv'](parseResponse,_0x374d00);};process['stdout']['write'](_0x1dc472['TbTkj']);const _0x4f98a2=await _0x1fc676({'jsonrpc':_0x5d6097(0x1a2),'id':0x1,'method':'initialize','params':{'protocolVersion':_0x1dc472['Drjjh'],'capabilities':{},'clientInfo':{'name':_0x5d6097(0x1d1),'version':_0x1dc472['RgARW']}}});if(_0x4f98a2['error'])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x4f98a2['error'][_0x5d6097(0x210)]??JSON['stringify'](_0x4f98a2[_0x5d6097(0x1b2)])));console['log'](_0x5d6097(0x1ba)),await fetch(_0xac771,{'method':_0x1dc472[_0x5d6097(0x1b8)],'headers':_0x571c3b,'body':JSON[_0x5d6097(0x1ea)]({'jsonrpc':_0x1dc472[_0x5d6097(0x1ec)],'method':'notifications/initialized'})})['then'](_0x284f70=>_0x284f70['text']()),process[_0x5d6097(0x21c)]['write'](_0x1dc472['bKVBe']);const _0x4e39ca=await _0x1fc676({'jsonrpc':_0x1dc472[_0x5d6097(0x1ec)],'id':0x2,'method':_0x1dc472[_0x5d6097(0x1d2)],'params':{'name':_0x5d6097(0x1ef),'arguments':{}}});if(_0x4e39ca[_0x5d6097(0x1b2)])throw new Error(_0x5d6097(0x1b3)+(_0x4e39ca[_0x5d6097(0x1b2)]['message']??JSON[_0x5d6097(0x1ea)](_0x4e39ca['error'])));console[_0x5d6097(0x1dd)](_0x5d6097(0x1ba));const _0x1d3d34=extractToken(_0x4e39ca['result']);if(!_0x1d3d34){console[_0x5d6097(0x1b2)]('\x0aUnexpected\x20response\x20structure:'),console[_0x5d6097(0x1b2)](JSON['stringify'](_0x4e39ca[_0x5d6097(0x1b4)],null,0x2));throw new Error('Could\x20not\x20extract\x20token\x20from\x20MCP\x20response');}const _0x433ab6=_0x1dc472['ohhgf'](join,homedir(),_0x1dc472['UBehX']),_0x250dc5=_0x1dc472['KgkuF'](join,_0x433ab6,_0x1dc472['OOBXg']);await mkdir(_0x433ab6,{'recursive':!![]}),await _0x1dc472['Gvknu'](writeFile,_0x250dc5,_0x1d3d34,{'mode':0x180}),await _0x1dc472[_0x5d6097(0x203)](writeFile,_0x1dc472['ELCRa'](join,_0x433ab6,_0x5d6097(0x1ee)),_0xac771,{'mode':0x180}),console['log'](_0x5d6097(0x207)+_0x250dc5),console['log'](_0x1dc472[_0x5d6097(0x1e8)]);}async function fetchAuthServerMetadata(_0x4c7862){const _0x3ccb68=_0x86b6ea,_0x487504=_0x4c7862+'/.well-known/oauth-authorization-server',_0x54459c=await fetch(_0x487504);if(!_0x54459c['ok'])throw new Error('Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20'+_0x487504+':\x20'+_0x54459c[_0x3ccb68(0x1e7)]);return _0x54459c['json']();}function waitForCallback(_0x479c86){const _0x3896d4=_0x86b6ea,_0x44b031={'WbBgF':function(_0x511feb){return _0x511feb();},'ZNyhQ':function(_0x547341,_0x34764f){return _0x547341!==_0x34764f;},'NenFW':'code','ZUHop':'error_description','snYem':_0x3896d4(0x1cf),'WCVRI':function(_0x3fb44b,_0x2e63b0){return _0x3fb44b(_0x2e63b0);},'ysaux':function(_0x2b3afe,_0x10a702,_0x3aeecf){return _0x2b3afe(_0x10a702,_0x3aeecf);}};return new Promise((_0x56475e,_0x4428c6)=>{const _0x157a21=_0x3896d4,_0x377284=()=>{_0x1af2e['closeAllConnections'](),_0x1af2e['close']();},_0x44b169=_0x44b031[_0x157a21(0x1c4)](setTimeout,()=>{const _0xbf09d=_0x157a21;_0x44b031['WbBgF'](_0x377284),_0x4428c6(new OAuthTimeoutError(_0xbf09d(0x1b1)));},0x1d4c0),_0x1af2e=createServer((_0x18c82e,_0x56bb34)=>{const _0x5cee14=_0x157a21,_0xbf5587=new URL(_0x18c82e[_0x5cee14(0x208)]??'/',_0x5cee14(0x216)+CALLBACK_PORT);if(_0x44b031['ZNyhQ'](_0xbf5587[_0x5cee14(0x1bf)],'/callback')){_0x56bb34[_0x5cee14(0x1d3)](0x194),_0x56bb34['end'](_0x5cee14(0x1e5));return;}const _0x3b7c96=_0xbf5587['searchParams']['get'](_0x44b031[_0x5cee14(0x1f5)]),_0xf4b196=_0xbf5587[_0x5cee14(0x214)][_0x5cee14(0x1c9)](_0x5cee14(0x1cc)),_0x243a25=_0xbf5587['searchParams'][_0x5cee14(0x1c9)](_0x5cee14(0x1b2));if(_0x243a25){const _0x28a649=_0xbf5587[_0x5cee14(0x214)][_0x5cee14(0x1c9)](_0x44b031['ZUHop'])??_0x243a25;_0x56bb34['writeHead'](0xc8,{'Content-Type':'text/html'}),_0x56bb34['end']('<html><body><h2>Authentication\x20failed</h2><p>'+_0x28a649+_0x5cee14(0x1aa)),clearTimeout(_0x44b169),_0x377284(),_0x4428c6(new Error(_0x5cee14(0x1fc)+_0x28a649));return;}if(!_0x3b7c96||_0xf4b196!==_0x479c86){_0x56bb34['writeHead'](0x190,{'Content-Type':_0x44b031[_0x5cee14(0x1cd)]}),_0x56bb34[_0x5cee14(0x217)](_0x5cee14(0x20c));return;}_0x56bb34[_0x5cee14(0x1d3)](0xc8,{'Content-Type':_0x44b031['snYem']}),_0x56bb34['end']('<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>'),clearTimeout(_0x44b169),_0x44b031['WbBgF'](_0x377284),_0x44b031[_0x5cee14(0x20f)](_0x56475e,_0x3b7c96);});_0x1af2e[_0x157a21(0x1f6)](CALLBACK_PORT,_0x157a21(0x1b5));});}function _0x3a74(_0x561cfe,_0x47b602){_0x561cfe=_0x561cfe-0x1a0;const _0x3dbd94=_0x3dbd();let _0x3a7483=_0x3dbd94[_0x561cfe];return _0x3a7483;}async function openBrowser(_0x81f505){const _0x133c48=_0x86b6ea,_0x459715={'TnpAf':function(_0x5cdc17,_0x1c0b29){return _0x5cdc17===_0x1c0b29;},'SeDlx':'darwin','NaZwZ':'win32','VBGKf':'start','tJquJ':_0x133c48(0x1c3)},_0xce5088=_0x459715[_0x133c48(0x20b)](process['platform'],_0x459715['SeDlx'])?_0x133c48(0x1d7):process[_0x133c48(0x1bb)]===_0x459715['NaZwZ']?_0x459715['VBGKf']:_0x459715[_0x133c48(0x1bc)];exec(_0xce5088+'\x20\x22'+_0x81f505+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x53a570=_0x86b6ea,_0x207b67={'WhSiF':function(_0x4977fa,_0x4fb6be){return _0x4977fa!==_0x4fb6be;},'PnoMo':function(_0x560571,_0x444724){return _0x560571>_0x444724;}};try{const _0x597c7c=JSON[_0x53a570(0x1e0)](await readFile(TOKEN_CACHE_PATH,'utf-8'));if(_0x597c7c['origin']&&_0x207b67[_0x53a570(0x1e6)](_0x597c7c[_0x53a570(0x20a)],currentOrigin))return null;if(_0x597c7c[_0x53a570(0x1a4)]&&_0x207b67[_0x53a570(0x1f9)](Date['now'](),_0x597c7c['expiresAt']))return null;return _0x597c7c['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x57137f,_0x408ad8,_0x4c9a2f){const _0x48f206=_0x86b6ea,_0x2ae5b0={'NnHbC':function(_0x3eb377,_0x36a04b,_0x57debb){return _0x3eb377(_0x36a04b,_0x57debb);},'jIeWU':_0x48f206(0x1a5)},_0x3826a7=await loadCachedData(),_0x3fe1cd={..._0x3826a7,'origin':currentOrigin,'accessToken':_0x57137f,'refreshToken':_0x408ad8??_0x3826a7?.[_0x48f206(0x1c2)],'expiresAt':_0x4c9a2f?Date['now']()+_0x4c9a2f*0x3e8:undefined};await _0x2ae5b0[_0x48f206(0x1ad)](mkdir,join(homedir(),_0x2ae5b0['jIeWU']),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON[_0x48f206(0x1ea)](_0x3fe1cd),{'mode':0x180});}async function loadCachedClient(){const _0x654a6c=_0x86b6ea,_0x397766={'WDWeA':function(_0x310dac){return _0x310dac();}},_0xf89ad6=await _0x397766['WDWeA'](loadCachedData);if(_0xf89ad6?.['origin']&&_0xf89ad6['origin']!==currentOrigin)return null;return _0xf89ad6?.[_0x654a6c(0x1ce)]?{'clientId':_0xf89ad6['clientId'],'clientSecret':_0xf89ad6[_0x654a6c(0x1c1)]}:null;}async function clearCachedClient(){const _0x4fadc6=_0x86b6ea,_0x2c69c7={'MqXjC':function(_0x30beaa){return _0x30beaa();}},_0x1fa4ba=await _0x2c69c7[_0x4fadc6(0x224)](loadCachedData);if(!_0x1fa4ba)return;const {clientId:_0x597ebf,clientSecret:_0x1a97ce,..._0x2064c6}=_0x1fa4ba;await writeFile(TOKEN_CACHE_PATH,JSON[_0x4fadc6(0x1ea)](_0x2064c6),{'mode':0x180});}async function saveCachedClient(_0x28bd8d,_0x79f81f){const _0x52098a=_0x86b6ea,_0x3b0f54={'hdcHY':function(_0x44dabe){return _0x44dabe();},'MQWBE':function(_0x2fe53a,_0x2100f2,_0xc4b64c){return _0x2fe53a(_0x2100f2,_0xc4b64c);},'yCNde':function(_0x5af999){return _0x5af999();},'tFFGX':'.ranger','LQYzi':function(_0x5e06e3,_0x1d0164,_0x557e10,_0x536bcb){return _0x5e06e3(_0x1d0164,_0x557e10,_0x536bcb);}},_0x1b1283=await _0x3b0f54['hdcHY'](loadCachedData),_0x1451c2={..._0x1b1283,'origin':currentOrigin,'accessToken':_0x1b1283?.[_0x52098a(0x1e2)]??'','clientId':_0x28bd8d,'clientSecret':_0x79f81f};await mkdir(_0x3b0f54[_0x52098a(0x223)](join,_0x3b0f54['yCNde'](homedir),_0x3b0f54[_0x52098a(0x1fa)]),{'recursive':!![]}),await _0x3b0f54[_0x52098a(0x1d8)](writeFile,TOKEN_CACHE_PATH,JSON[_0x52098a(0x1ea)](_0x1451c2),{'mode':0x180});}async function loadCachedData(){const _0x17fadf=_0x86b6ea;try{return JSON[_0x17fadf(0x1e0)](await readFile(TOKEN_CACHE_PATH,_0x17fadf(0x215)));}catch{return null;}}async function parseResponse(_0x53d88f){const _0x51e430=_0x86b6ea,_0x172803={'cfXIg':'content-type','UrXII':'text/event-stream','kgfay':'data:','wZsnG':'No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream'},_0x6571d2=_0x53d88f['headers'][_0x51e430(0x1c9)](_0x172803[_0x51e430(0x1d4)])??'';if(_0x6571d2[_0x51e430(0x1b6)](_0x172803['UrXII'])){const _0x4e3ccd=await _0x53d88f[_0x51e430(0x1dc)]();for(const _0x2da648 of _0x4e3ccd['split']('\x0a')){const _0x338029=_0x2da648[_0x51e430(0x1c8)]();if(_0x338029[_0x51e430(0x211)](_0x172803[_0x51e430(0x1ca)])){const _0x4b3766=_0x338029['slice']('data:'['length'])[_0x51e430(0x1c8)]();if(!_0x4b3766)continue;try{const _0x3f899d=JSON['parse'](_0x4b3766);if(_0x3f899d['id']!==undefined||_0x3f899d[_0x51e430(0x1b2)])return _0x3f899d;}catch{}}}throw new Error(_0x172803[_0x51e430(0x1a1)]);}return _0x53d88f[_0x51e430(0x1ac)]();}function extractToken(_0x3f0df0){const _0x37edce=_0x86b6ea,_0xf38353={'DybNe':function(_0xd9b37c,_0x14763e){return _0xd9b37c===_0x14763e;},'iqYel':'text','JHMyq':_0x37edce(0x1c7)};if(!_0x3f0df0)return null;const _0x1257dd=_0x3f0df0[_0x37edce(0x1df)];if(_0x1257dd?.['token']&&_0xf38353[_0x37edce(0x213)](typeof _0x1257dd['token'],'string'))return _0x1257dd[_0x37edce(0x21a)];if(_0x3f0df0[_0x37edce(0x1a6)]){const _0x2e5032=_0x3f0df0['content'];throw new Error('Server\x20returned\x20error:\x20'+(_0x2e5032?.[0x0]?.[_0x37edce(0x1dc)]??'Unknown\x20error'));}const _0x32c280=_0x3f0df0[_0x37edce(0x1d5)];if(_0x32c280)for(const _0x56def0 of _0x32c280){if(_0x56def0[_0x37edce(0x212)]===_0xf38353['iqYel']&&_0x56def0['text']){try{const _0x4b00d1=JSON['parse'](_0x56def0[_0x37edce(0x1dc)]);if(_0xf38353[_0x37edce(0x213)](typeof _0x4b00d1?.['token'],_0xf38353['JHMyq']))return _0x4b00d1['token'];}catch{}const _0x57fd31=_0x56def0['text']['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x57fd31)return _0x57fd31[0x1];}}return null;}
@@ -1 +1 @@
1
- function _0x58f6(_0x3a241f,_0x251a9d){_0x3a241f=_0x3a241f-0x6d;var _0x2330c5=_0x2330();var _0x58f6ec=_0x2330c5[_0x3a241f];return _0x58f6ec;}(function(_0x38dc69,_0x5109ca){var _0xeb102=_0x58f6,_0x3c023d=_0x38dc69();while(!![]){try{var _0x4a3e48=-parseInt(_0xeb102(0x6d))/0x1+-parseInt(_0xeb102(0x72))/0x2*(-parseInt(_0xeb102(0x78))/0x3)+parseInt(_0xeb102(0x7c))/0x4+parseInt(_0xeb102(0x70))/0x5+-parseInt(_0xeb102(0x79))/0x6*(parseInt(_0xeb102(0x7d))/0x7)+parseInt(_0xeb102(0x74))/0x8*(parseInt(_0xeb102(0x77))/0x9)+parseInt(_0xeb102(0x7b))/0xa;if(_0x4a3e48===_0x5109ca)break;else _0x3c023d['push'](_0x3c023d['shift']());}catch(_0xe3ac25){_0x3c023d['push'](_0x3c023d['shift']());}}}(_0x2330,0x9efba));function _0x2330(){var _0x25080d=['To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','258372KxTWqN','2826Bbfiwh','6oszEpW','error','18655810nkCxbJ','1241288xPtoZh','8213639wicVro','exit','892103HHaoMl','pAVEM','Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a','790735kVrRIx','bHArb','20pVnUTR','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','104irYjsZ','zvfxO'];_0x2330=function(){return _0x25080d;};return _0x2330();}export async function migrateProfile(_0x27727b,_0x203107){var _0x1ec714=_0x58f6,_0x187af7={'bHArb':function(_0x556977,_0x5438c5){return _0x556977+_0x5438c5;},'hnyjD':function(_0x254d92,_0x5c31c4){return _0x254d92+_0x5c31c4;},'FOBjy':'ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','EwsNR':_0x1ec714(0x76),'pAVEM':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','rKLpx':_0x1ec714(0x73),'zvfxO':'\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a'};console[_0x1ec714(0x7a)](_0x187af7['bHArb'](_0x187af7['hnyjD'](_0x187af7[_0x1ec714(0x71)](_0x187af7['hnyjD'](_0x187af7['FOBjy'],'\x0a'),_0x187af7['EwsNR']),_0x187af7[_0x1ec714(0x6e)])+'\x0a'+_0x187af7['rKLpx']+_0x187af7[_0x1ec714(0x75)]+'\x0a',_0x1ec714(0x6f))+'fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.'),process[_0x1ec714(0x7e)](0x1);}
1
+ (function(_0x5847e6,_0x4aa74e){var _0x1b5793=_0x21a8,_0x21784a=_0x5847e6();while(!![]){try{var _0x49e52e=parseInt(_0x1b5793(0x1a1))/0x1*(parseInt(_0x1b5793(0x1a0))/0x2)+-parseInt(_0x1b5793(0x198))/0x3+-parseInt(_0x1b5793(0x19c))/0x4*(-parseInt(_0x1b5793(0x195))/0x5)+parseInt(_0x1b5793(0x197))/0x6+parseInt(_0x1b5793(0x19f))/0x7*(-parseInt(_0x1b5793(0x194))/0x8)+-parseInt(_0x1b5793(0x193))/0x9*(parseInt(_0x1b5793(0x1a3))/0xa)+-parseInt(_0x1b5793(0x1a4))/0xb*(parseInt(_0x1b5793(0x199))/0xc);if(_0x49e52e===_0x4aa74e)break;else _0x21784a['push'](_0x21784a['shift']());}catch(_0x7a646){_0x21784a['push'](_0x21784a['shift']());}}}(_0x2e6e,0x9ccd5));function _0x2e6e(){var _0x2f9e64=['11pvYfYg','117RUVmAJ','337992FPAJaM','8590lhtYFY','InAUz','6781494ifFVHR','2120937aAveyp','5906028TFpTjh','nVkyP','zjgwS','1876whfQUO','FJHBU','exit','28pRXcnN','1114ycjiIX','311XRMvCF','Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a','76010gFKKYV'];_0x2e6e=function(){return _0x2f9e64;};return _0x2e6e();}function _0x21a8(_0x549443,_0x11d373){_0x549443=_0x549443-0x193;var _0x2e6e26=_0x2e6e();var _0x21a8ab=_0x2e6e26[_0x549443];return _0x21a8ab;}export async function migrateProfile(_0x5e5b91,_0x594c88){var _0x1c89a8=_0x21a8,_0x28bb83={'nVkyP':function(_0x1e71ea,_0x2d8a34){return _0x1e71ea+_0x2d8a34;},'InAUz':function(_0x3979f1,_0x254090){return _0x3979f1+_0x254090;},'FJHBU':'ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','zjgwS':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console['error'](_0x28bb83[_0x1c89a8(0x19a)](_0x28bb83[_0x1c89a8(0x196)](_0x28bb83['nVkyP'](_0x28bb83[_0x1c89a8(0x19d)]+'\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a')+_0x28bb83[_0x1c89a8(0x19b)]+'\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a'+'\x0a',_0x1c89a8(0x1a2))+'fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.'),process[_0x1c89a8(0x19e)](0x1);}
@@ -1 +1 @@
1
- function _0x2501(_0x47b9fa,_0x42ba67){_0x47b9fa=_0x47b9fa-0x1e0;const _0x59d1f3=_0x59d1();let _0x2501a1=_0x59d1f3[_0x47b9fa];return _0x2501a1;}(function(_0x5235bb,_0x136019){const _0x5a0618=_0x2501,_0x414075=_0x5235bb();while(!![]){try{const _0x21bdb4=parseInt(_0x5a0618(0x1e2))/0x1*(-parseInt(_0x5a0618(0x20f))/0x2)+parseInt(_0x5a0618(0x1f6))/0x3*(parseInt(_0x5a0618(0x1e3))/0x4)+-parseInt(_0x5a0618(0x211))/0x5+-parseInt(_0x5a0618(0x203))/0x6+parseInt(_0x5a0618(0x1f9))/0x7*(-parseInt(_0x5a0618(0x1fd))/0x8)+parseInt(_0x5a0618(0x201))/0x9*(parseInt(_0x5a0618(0x209))/0xa)+parseInt(_0x5a0618(0x1ee))/0xb*(parseInt(_0x5a0618(0x1fa))/0xc);if(_0x21bdb4===_0x136019)break;else _0x414075['push'](_0x414075['shift']());}catch(_0x29d3a5){_0x414075['push'](_0x414075['shift']());}}}(_0x59d1,0xabca7));import{join}from'path';import{existsSync}from'fs';function _0x59d1(){const _0x387215=['prompt','iJyXC','Would\x20you\x20like\x20to\x20install\x20skills?','bhfWA','wdpTY','415482vxJakH','yQqCd','⚠\x20Failed\x20to\x20enable\x20plugin:','3059XfvTID','4188hTgzZh','zqiBK','XOvmM','2792qoGgfL','wmPUC','\x0aYou\x20can\x20install\x20manually\x20with:','kDvqV','162tpyDcJ','SKILL.md','316122rmFDJy','log','enable','wantsSkillup','--scope','project','474630WOMvLg','tTioM','success','SCoEu','Where\x20should\x20the\x20plugin\x20be\x20installed?','slglg','7556aQsknX','pluginScope','3663165BKAVbU','user','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','✓\x20Ranger\x20skills\x20already\x20installed','already\x20enabled','ranger@trailhead','284hYJvNw','28eXEOlJ','✓\x20Claude\x20Code\x20plugin\x20enabled','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','marketplace','CNRnd','ijFCI','trailhead','.claude','AbbYr','confirm','includes','28072qBzalh','Project\x20(shared\x20with\x20team\x20via\x20git)','error'];_0x59d1=function(){return _0x387215;};return _0x59d1();}import _0x2a16ba 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(_0x5ef4da){const _0x4b96a5=_0x2501,_0x4de801={'yQqCd':'ranger@trailhead','wmPUC':function(_0x4c50bf,_0x5e4a5a){return _0x4c50bf(_0x5e4a5a);},'YsGld':function(_0x246d41,_0x302840,_0x4a673a){return _0x246d41(_0x302840,_0x4a673a);},'tTioM':'\x0a📦\x20Claude\x20Code\x20Plugin\x0a','SyHYB':'list','glfRC':_0x4b96a5(0x210),'DsSBc':_0x4b96a5(0x20d),'iMLAG':_0x4b96a5(0x212),'aqzgu':_0x4b96a5(0x1ef),'XOvmM':'plugin','QuGgf':_0x4b96a5(0x1e6),'slglg':'add','ODOeW':'\x0aYou\x20can\x20install\x20manually\x20with:','kDvqV':_0x4b96a5(0x207),'SCoEu':_0x4b96a5(0x208),'CNRnd':'❌\x20Failed\x20to\x20install\x20plugin:','HbXRd':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','ZfayD':_0x4b96a5(0x205),'bhfWA':function(_0x56e3d4){return _0x56e3d4();},'aXSUw':_0x4b96a5(0x1e0),'zdiPw':_0x4b96a5(0x1e4)},_0x246a9b=await isPluginInstalled(_0x4de801[_0x4b96a5(0x1f7)]);if(_0x246a9b)return console[_0x4b96a5(0x204)](_0x4b96a5(0x213)),![];const _0x4cca06=_0x4de801[_0x4b96a5(0x1fe)](existsSync,_0x4de801['YsGld'](join,getProjectRoot(),_0x4b96a5(0x1ea)));let _0x31ada5;if(_0x5ef4da)_0x31ada5=_0x5ef4da;else{if(_0x4cca06)_0x31ada5=_0x4b96a5(0x208);else{console[_0x4b96a5(0x204)](_0x4de801[_0x4b96a5(0x20a)]);const _0x24c041=await _0x2a16ba[_0x4b96a5(0x1f1)]([{'type':_0x4de801['SyHYB'],'name':_0x4de801['glfRC'],'message':_0x4de801['DsSBc'],'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x4de801['iMLAG']},{'name':_0x4de801['aqzgu'],'value':'project'}],'default':_0x4de801['iMLAG']}]);_0x31ada5=_0x24c041[_0x4b96a5(0x210)];}}console[_0x4b96a5(0x204)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x31ada5+'\x20level)...\x0a');const _0x76ee07=await isMarketplaceAdded(_0x4b96a5(0x1e9));let _0x579a1e=_0x76ee07;if(_0x76ee07)console[_0x4b96a5(0x204)]('✓\x20Marketplace\x20already\x20added');else{const _0x4e7e99=await runClaudeCommand([_0x4de801[_0x4b96a5(0x1fc)],_0x4de801['QuGgf'],_0x4de801[_0x4b96a5(0x20e)],'ranger-testing/trailhead']);!_0x4e7e99[_0x4b96a5(0x20b)]?(console[_0x4b96a5(0x1f0)]('❌\x20Failed\x20to\x20add\x20marketplace:',_0x4e7e99['error']),console['log'](_0x4de801['ODOeW']),console[_0x4b96a5(0x204)]('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console[_0x4b96a5(0x204)](_0x4b96a5(0x1e5)+_0x31ada5)):_0x579a1e=!![];}if(_0x579a1e){const _0x263bd7=await runClaudeCommand([_0x4de801['XOvmM'],'install',_0x4b96a5(0x1e1),_0x4de801[_0x4b96a5(0x200)],_0x31ada5],{'cwd':_0x31ada5===_0x4de801[_0x4b96a5(0x20c)]?getProjectRoot():undefined});if(!_0x263bd7[_0x4b96a5(0x20b)])console['error'](_0x4de801[_0x4b96a5(0x1e7)],_0x263bd7[_0x4b96a5(0x1f0)]),console['log'](_0x4b96a5(0x1ff)),console[_0x4b96a5(0x204)](_0x4b96a5(0x1e5)+_0x31ada5);else{console[_0x4b96a5(0x204)](_0x4de801['HbXRd']);const _0x52fa31=['plugin',_0x4de801['ZfayD'],_0x4de801['yQqCd']];_0x31ada5===_0x4b96a5(0x208)&&_0x52fa31['push']('--scope','project');const _0x5c8c50=await runClaudeCommand(_0x52fa31,{'captureOutput':!![],'cwd':_0x31ada5===_0x4de801[_0x4b96a5(0x20c)]?_0x4de801[_0x4b96a5(0x1f4)](getProjectRoot):undefined}),_0xf791ca=_0x5c8c50['output']?.[_0x4b96a5(0x1ed)](_0x4de801['aXSUw']);!_0x5c8c50['success']&&!_0xf791ca?console['error'](_0x4b96a5(0x1f8),_0x5c8c50[_0x4b96a5(0x1f0)]):console[_0x4b96a5(0x204)](_0x4de801['zdiPw']);}}return!![];}export async function ensureClaudeSkills(_0x132a84){const _0x317e42=_0x2501,_0x5f28f7={'AbbYr':function(_0x4f9fa8,_0x254ec3,_0x3ae2ee,_0x5a4461){return _0x4f9fa8(_0x254ec3,_0x3ae2ee,_0x5a4461);},'ijFCI':function(_0x53328c,_0x3c461f){return _0x53328c(_0x3c461f);},'wdpTY':_0x317e42(0x212),'iJyXC':'ranger','GXlXG':_0x317e42(0x214),'CIEsB':_0x317e42(0x1ea),'zqiBK':_0x317e42(0x1f3)},_0x12c597=existsSync(_0x5f28f7[_0x317e42(0x1eb)](join,_0x5f28f7[_0x317e42(0x1e8)](getSkillsDir,_0x5f28f7[_0x317e42(0x1f5)]),_0x5f28f7[_0x317e42(0x1f2)],'SKILL.md')),_0x362d19=existsSync(join(getSkillsDir('project'),_0x5f28f7['iJyXC'],_0x317e42(0x202)));if(_0x12c597||_0x362d19)return console[_0x317e42(0x204)](_0x5f28f7['GXlXG']),![];const _0x35951c=existsSync(join(getProjectRoot(),_0x5f28f7['CIEsB']));let _0x183895=!![];if(_0x132a84)await _0x5f28f7['ijFCI'](skillup,{'autoInstall':_0x132a84,'suppressUsage':!![]});else{if(_0x35951c)await _0x5f28f7['ijFCI'](skillup,{'autoInstall':'project','suppressUsage':!![]});else{const _0x59ba52=await _0x2a16ba['prompt']([{'type':_0x317e42(0x1ec),'name':_0x317e42(0x206),'message':_0x5f28f7[_0x317e42(0x1fb)],'default':!![]}]);_0x183895=_0x59ba52[_0x317e42(0x206)],_0x183895&&await skillup({'suppressUsage':!![]});}}return _0x183895;}
1
+ (function(_0x13d3e4,_0x4feb89){const _0x2782b1=_0x4550,_0x831800=_0x13d3e4();while(!![]){try{const _0x39d1c7=-parseInt(_0x2782b1(0x1d2))/0x1+parseInt(_0x2782b1(0x1cf))/0x2+parseInt(_0x2782b1(0x1dd))/0x3+-parseInt(_0x2782b1(0x1e4))/0x4*(parseInt(_0x2782b1(0x1e7))/0x5)+parseInt(_0x2782b1(0x1ec))/0x6+-parseInt(_0x2782b1(0x1e5))/0x7*(-parseInt(_0x2782b1(0x1ee))/0x8)+-parseInt(_0x2782b1(0x1c8))/0x9;if(_0x39d1c7===_0x4feb89)break;else _0x831800['push'](_0x831800['shift']());}catch(_0x5d3102){_0x831800['push'](_0x831800['shift']());}}}(_0x4d8f,0xd3ff5));function _0x4d8f(){const _0x5af831=['rxiFH','962305WDQCgw','FtRNY','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','add','project','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','error','install','❌\x20Failed\x20to\x20install\x20plugin:','iLFQm','✓\x20Marketplace\x20already\x20added','1480125dVLlsN','NamBg','rGjjG','success','already\x20enabled','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','output','392Zkanlz','5733609LnAWPR','user','55045cHNITY','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','wantsSkillup','log','plugin','10041642DqDjLL','trailhead','8Ntiyhd','QjZeY','Bciah','ranger-testing/trailhead','⚠\x20Failed\x20to\x20enable\x20plugin:','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','SKILL.md','LSXVC','Project\x20(shared\x20with\x20team\x20via\x20git)','ranger@trailhead','list','13041936CnDfac','.claude','--scope','Where\x20should\x20the\x20plugin\x20be\x20installed?','xcgbZ','NqzZj','szQRA','2745126OVzBXM','\x0aYou\x20can\x20install\x20manually\x20with:'];_0x4d8f=function(){return _0x5af831;};return _0x4d8f();}import{join}from'path';import{existsSync}from'fs';import _0x5083b9 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(_0x138aa9){const _0x4aacaf=_0x4550,_0x3f9fa4={'LSXVC':function(_0x56b945,_0x5ea51a,_0x3f6dcc){return _0x56b945(_0x5ea51a,_0x3f6dcc);},'kxPYS':function(_0x30fe93){return _0x30fe93();},'Bciah':_0x4aacaf(0x1e2),'KMhJf':_0x4aacaf(0x1c7),'YNuqR':'User\x20(available\x20in\x20all\x20your\x20projects)','yJnqL':_0x4aacaf(0x1f6),'rGjjG':function(_0x15dd65,_0x1a0b64){return _0x15dd65(_0x1a0b64);},'pqNmX':function(_0x1f5397,_0x35064d){return _0x1f5397(_0x35064d);},'NqzZj':_0x4aacaf(0x1eb),'rxiFH':'❌\x20Failed\x20to\x20add\x20marketplace:','kgvZb':'--scope','NamBg':_0x4aacaf(0x1da),'spPJB':_0x4aacaf(0x1e8),'aNblV':'enable','ARjqX':'ranger@trailhead','xcgbZ':function(_0x2f8026,_0x3e48ff){return _0x2f8026===_0x3e48ff;},'iLFQm':'project','bUsUC':function(_0xefc59d){return _0xefc59d();},'PtSAt':_0x4aacaf(0x1f2),'FtRNY':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0xab8793=await isPluginInstalled(_0x4aacaf(0x1c6));if(_0xab8793)return console[_0x4aacaf(0x1ea)](_0x4aacaf(0x1d7)),![];const _0x391526=existsSync(_0x3f9fa4['LSXVC'](join,_0x3f9fa4['kxPYS'](getProjectRoot),_0x4aacaf(0x1c9)));let _0x18cecf;if(_0x138aa9)_0x18cecf=_0x138aa9;else{if(_0x391526)_0x18cecf=_0x4aacaf(0x1d6);else{console[_0x4aacaf(0x1ea)](_0x3f9fa4[_0x4aacaf(0x1f0)]);const _0x56aaed=await _0x5083b9['prompt']([{'type':_0x3f9fa4['KMhJf'],'name':'pluginScope','message':_0x4aacaf(0x1cb),'choices':[{'name':_0x3f9fa4['YNuqR'],'value':_0x4aacaf(0x1e6)},{'name':_0x3f9fa4['yJnqL'],'value':'project'}],'default':'user'}]);_0x18cecf=_0x56aaed['pluginScope'];}}console[_0x4aacaf(0x1ea)](_0x4aacaf(0x1d4)+_0x18cecf+'\x20level)...\x0a');const _0x495f9c=await _0x3f9fa4[_0x4aacaf(0x1df)](isMarketplaceAdded,_0x4aacaf(0x1ed));let _0x7b0ea=_0x495f9c;if(_0x495f9c)console[_0x4aacaf(0x1ea)](_0x4aacaf(0x1dc));else{const _0x6ca2ff=await _0x3f9fa4['pqNmX'](runClaudeCommand,[_0x3f9fa4[_0x4aacaf(0x1cd)],'marketplace',_0x4aacaf(0x1d5),_0x4aacaf(0x1f1)]);!_0x6ca2ff['success']?(console['error'](_0x3f9fa4[_0x4aacaf(0x1d1)],_0x6ca2ff[_0x4aacaf(0x1d8)]),console['log'](_0x4aacaf(0x1d0)),console['log']('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console[_0x4aacaf(0x1ea)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x18cecf)):_0x7b0ea=!![];}if(_0x7b0ea){const _0x4f4b46=await runClaudeCommand([_0x3f9fa4['NqzZj'],_0x4aacaf(0x1d9),_0x4aacaf(0x1c6),_0x3f9fa4['kgvZb'],_0x18cecf],{'cwd':_0x18cecf===_0x4aacaf(0x1d6)?_0x3f9fa4['kxPYS'](getProjectRoot):undefined});if(!_0x4f4b46['success'])console['error'](_0x3f9fa4[_0x4aacaf(0x1de)],_0x4f4b46['error']),console[_0x4aacaf(0x1ea)](_0x4aacaf(0x1d0)),console[_0x4aacaf(0x1ea)](_0x4aacaf(0x1f3)+_0x18cecf);else{console['log'](_0x3f9fa4['spPJB']);const _0x35fae9=[_0x3f9fa4[_0x4aacaf(0x1cd)],_0x3f9fa4['aNblV'],_0x3f9fa4['ARjqX']];_0x3f9fa4[_0x4aacaf(0x1cc)](_0x18cecf,_0x3f9fa4[_0x4aacaf(0x1db)])&&_0x35fae9['push'](_0x4aacaf(0x1ca),_0x3f9fa4['iLFQm']);const _0x408f78=await _0x3f9fa4[_0x4aacaf(0x1f5)](runClaudeCommand,_0x35fae9,{'captureOutput':!![],'cwd':_0x18cecf===_0x3f9fa4[_0x4aacaf(0x1db)]?_0x3f9fa4['bUsUC'](getProjectRoot):undefined}),_0x5b61ec=_0x408f78[_0x4aacaf(0x1e3)]?.['includes'](_0x4aacaf(0x1e1));!_0x408f78[_0x4aacaf(0x1e0)]&&!_0x5b61ec?console[_0x4aacaf(0x1d8)](_0x3f9fa4['PtSAt'],_0x408f78[_0x4aacaf(0x1d8)]):console[_0x4aacaf(0x1ea)](_0x3f9fa4[_0x4aacaf(0x1d3)]);}}return!![];}function _0x4550(_0x1326e4,_0x2bcad6){_0x1326e4=_0x1326e4-0x1c6;const _0x4d8f27=_0x4d8f();let _0x455092=_0x4d8f27[_0x1326e4];return _0x455092;}export async function ensureClaudeSkills(_0x507ffd){const _0x23f599=_0x4550,_0x39d0ff={'fAweo':function(_0x41745f,_0x4ebb99){return _0x41745f(_0x4ebb99);},'dbLin':'user','QjZeY':'ranger','szQRA':_0x23f599(0x1f4),'dnbaB':function(_0x41dd1d,_0x54f561,_0x300ba9,_0x35c24c){return _0x41dd1d(_0x54f561,_0x300ba9,_0x35c24c);},'rLtfX':'✓\x20Ranger\x20skills\x20already\x20installed','yfmfI':'confirm'},_0x4cc1db=_0x39d0ff['fAweo'](existsSync,join(getSkillsDir(_0x39d0ff['dbLin']),_0x39d0ff['QjZeY'],_0x39d0ff[_0x23f599(0x1ce)])),_0x4b2ee0=existsSync(_0x39d0ff['dnbaB'](join,_0x39d0ff['fAweo'](getSkillsDir,_0x23f599(0x1d6)),_0x39d0ff[_0x23f599(0x1ef)],_0x23f599(0x1f4)));if(_0x4cc1db||_0x4b2ee0)return console['log'](_0x39d0ff['rLtfX']),![];const _0xaf9757=existsSync(join(getProjectRoot(),_0x23f599(0x1c9)));let _0x1fe3c6=!![];if(_0x507ffd)await _0x39d0ff['fAweo'](skillup,{'autoInstall':_0x507ffd,'suppressUsage':!![]});else{if(_0xaf9757)await skillup({'autoInstall':_0x23f599(0x1d6),'suppressUsage':!![]});else{const _0xfd878a=await _0x5083b9['prompt']([{'type':_0x39d0ff['yfmfI'],'name':_0x23f599(0x1e9),'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x1fe3c6=_0xfd878a['wantsSkillup'],_0x1fe3c6&&await skillup({'suppressUsage':!![]});}}return _0x1fe3c6;}
@@ -1 +1 @@
1
- (function(_0x7af2a8,_0x57da3c){const _0x30529f=_0x11c5,_0x50c721=_0x7af2a8();while(!![]){try{const _0x1a106f=parseInt(_0x30529f(0xa3))/0x1*(parseInt(_0x30529f(0x87))/0x2)+-parseInt(_0x30529f(0x97))/0x3+parseInt(_0x30529f(0xa0))/0x4*(-parseInt(_0x30529f(0x8b))/0x5)+parseInt(_0x30529f(0x89))/0x6*(parseInt(_0x30529f(0x95))/0x7)+-parseInt(_0x30529f(0x96))/0x8*(parseInt(_0x30529f(0x88))/0x9)+parseInt(_0x30529f(0xa2))/0xa*(-parseInt(_0x30529f(0x99))/0xb)+parseInt(_0x30529f(0x8d))/0xc;if(_0x1a106f===_0x57da3c)break;else _0x50c721['push'](_0x50c721['shift']());}catch(_0x47c911){_0x50c721['push'](_0x50c721['shift']());}}}(_0x3d0c,0xbf299));import{join}from'path';function _0x3d0c(){const _0x5c2dab=['opencode.json','@ranger-testing/opencode-plugin','19822wsOlZg','459ODKMuW','540pvOHkv','jpObw','629635GFirzq','viqTw','52524132uqNFFG','OopIx','uXnEj','project','yeVQo','eKCsE','BAgHo','LqZNB','12649SQdked','167512UilVmw','609207CqdWeg','eqNRx','2950783zJPrKS','includes','prompt','log','qDETz','isArray','utf-8','48ktnYrr','plugin','50MZgOKC','37HpzyWe','✓\x20OpenCode\x20plugin\x20configured','stringify'];_0x3d0c=function(){return _0x5c2dab;};return _0x3d0c();}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x20ee5c from'inquirer';function _0x11c5(_0x360d6c,_0xeff569){_0x360d6c=_0x360d6c-0x86;const _0x3d0cde=_0x3d0c();let _0x11c5f8=_0x3d0cde[_0x360d6c];return _0x11c5f8;}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x313d35){const _0x42e61b=_0x11c5,_0x335423={'LqZNB':function(_0x3f7478,_0x2f6bad,_0x218ad4){return _0x3f7478(_0x2f6bad,_0x218ad4);},'OopIx':function(_0xaec46e,_0x2e2938){return _0xaec46e(_0x2e2938);},'yeVQo':_0x42e61b(0xa6),'qDETz':'project','PdgZM':'\x0a📦\x20OpenCode\x20Plugin\x0a','jpObw':'pluginScope','TBvcu':'Where\x20should\x20the\x20plugin\x20be\x20installed?','uxkAg':'Project\x20(shared\x20with\x20team\x20via\x20git)','BAgHo':_0x42e61b(0x86),'hRAVW':'https://opencode.ai/config.json','viqTw':function(_0x4ecbf1,_0x2e93a5,_0x71000c){return _0x4ecbf1(_0x2e93a5,_0x71000c);},'uXnEj':_0x42e61b(0x9f),'eqNRx':function(_0xc5188f,_0x22c39d,_0x3f8036){return _0xc5188f(_0x22c39d,_0x3f8036);},'eKCsE':function(_0x5c91e1,_0x139c53){return _0x5c91e1+_0x139c53;}},_0xdae6f9=existsSync(_0x335423[_0x42e61b(0x94)](join,_0x335423[_0x42e61b(0x8e)](getOpencodeConfigDir,_0x42e61b(0x90)),_0x335423['yeVQo']));let _0x2cda11;if(_0x313d35)_0x2cda11=_0x313d35;else{if(_0xdae6f9)_0x2cda11=_0x335423[_0x42e61b(0x9d)];else{console['log'](_0x335423['PdgZM']);const _0x1555ed=await _0x20ee5c[_0x42e61b(0x9b)]([{'type':'list','name':_0x335423[_0x42e61b(0x8a)],'message':_0x335423['TBvcu'],'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':'user'},{'name':_0x335423['uxkAg'],'value':_0x335423['qDETz']}],'default':'user'}]);_0x2cda11=_0x1555ed['pluginScope'];}}const _0x2f66ac=_0x335423['LqZNB'](join,getOpencodeConfigDir(_0x2cda11),_0x335423[_0x42e61b(0x91)]),_0x5ca733=_0x335423[_0x42e61b(0x93)],_0xddddaa=_0x335423['hRAVW'];let _0x3562f3={};if(existsSync(_0x2f66ac))try{const _0x654826=await _0x335423[_0x42e61b(0x8c)](readFile,_0x2f66ac,_0x335423[_0x42e61b(0x8f)]);_0x3562f3=JSON['parse'](_0x654826);}catch(_0x447a1c){return console['error']('⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.'),{'configured':![],'scope':_0x2cda11,'error':'Failed\x20to\x20read\x20opencode.json','details':_0x447a1c};}const _0x176e3c=Array[_0x42e61b(0x9e)](_0x3562f3[_0x42e61b(0xa1)])?_0x3562f3[_0x42e61b(0xa1)]:[];if(_0x176e3c[_0x42e61b(0x9a)](_0x5ca733))return console[_0x42e61b(0x9c)]('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x2cda11};return _0x3562f3['$schema']=_0x3562f3['$schema']||_0xddddaa,_0x3562f3['plugin']=[..._0x176e3c,_0x5ca733],await _0x335423[_0x42e61b(0x98)](mkdir,getOpencodeConfigDir(_0x2cda11),{'recursive':!![]}),await writeFile(_0x2f66ac,_0x335423[_0x42e61b(0x92)](JSON[_0x42e61b(0xa5)](_0x3562f3,null,0x2),'\x0a')),console[_0x42e61b(0x9c)](_0x42e61b(0xa4)),{'configured':!![],'scope':_0x2cda11};}
1
+ (function(_0x68c175,_0x2b7d2d){const _0xadc167=_0x156f,_0x30e3c6=_0x68c175();while(!![]){try{const _0x5ceb21=-parseInt(_0xadc167(0x159))/0x1+-parseInt(_0xadc167(0x15a))/0x2+parseInt(_0xadc167(0x149))/0x3*(parseInt(_0xadc167(0x150))/0x4)+parseInt(_0xadc167(0x141))/0x5+-parseInt(_0xadc167(0x13f))/0x6*(parseInt(_0xadc167(0x142))/0x7)+parseInt(_0xadc167(0x145))/0x8+-parseInt(_0xadc167(0x15b))/0x9*(parseInt(_0xadc167(0x14e))/0xa);if(_0x5ceb21===_0x2b7d2d)break;else _0x30e3c6['push'](_0x30e3c6['shift']());}catch(_0x359669){_0x30e3c6['push'](_0x30e3c6['shift']());}}}(_0x3608,0xc15dc));function _0x156f(_0x474270,_0x2dd485){_0x474270=_0x474270-0x13e;const _0x36088a=_0x3608();let _0x156fda=_0x36088a[_0x474270];return _0x156fda;}import{join}from'path';import{existsSync}from'fs';function _0x3608(){const _0x436ced=['BEjof','https://opencode.ai/config.json','utf-8','user','1159270xoTJrP','project','11128ghOGuW','pluginScope','TNmDU','Project\x20(shared\x20with\x20team\x20via\x20git)','✓\x20OpenCode\x20plugin\x20configured','NUpiZ','Failed\x20to\x20read\x20opencode.json','GzkhW','opencode.json','418096EzJHJP','1197386pmRwHu','18AhROLK','list','2238GnzFVx','parse','1103725SZvKjq','6027SrnzUb','log','Where\x20should\x20the\x20plugin\x20be\x20installed?','7959160LbOiwY','plugin','$schema','BJOpW','1236yQGHqf'];_0x3608=function(){return _0x436ced;};return _0x3608();}import{mkdir,readFile,writeFile}from'fs/promises';import _0xece5cd from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x37d18c){const _0x446c6c=_0x156f,_0x2a90eb={'TNmDU':function(_0x106200,_0x1d774a){return _0x106200(_0x1d774a);},'haDAV':_0x446c6c(0x158),'PjtAI':_0x446c6c(0x13e),'PeuvU':_0x446c6c(0x151),'vQrSX':_0x446c6c(0x144),'BEjof':_0x446c6c(0x14d),'UVgCb':_0x446c6c(0x153),'BJOpW':function(_0x4be98f,_0x165e1b,_0x23f70c){return _0x4be98f(_0x165e1b,_0x23f70c);},'NUpiZ':_0x446c6c(0x156),'aXMrt':'✓\x20OpenCode\x20plugin\x20already\x20configured','GzkhW':function(_0x3886c6,_0x5f42f0,_0x3ca98){return _0x3886c6(_0x5f42f0,_0x3ca98);},'yuvaj':function(_0x133cc5,_0xe0fc62,_0x314014){return _0x133cc5(_0xe0fc62,_0x314014);},'kxTpw':_0x446c6c(0x154)},_0x479559=existsSync(join(_0x2a90eb['TNmDU'](getOpencodeConfigDir,_0x446c6c(0x14f)),_0x2a90eb['haDAV']));let _0x54464c;if(_0x37d18c)_0x54464c=_0x37d18c;else{if(_0x479559)_0x54464c=_0x446c6c(0x14f);else{console[_0x446c6c(0x143)]('\x0a📦\x20OpenCode\x20Plugin\x0a');const _0x25b162=await _0xece5cd['prompt']([{'type':_0x2a90eb['PjtAI'],'name':_0x2a90eb['PeuvU'],'message':_0x2a90eb['vQrSX'],'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x2a90eb[_0x446c6c(0x14a)]},{'name':_0x2a90eb['UVgCb'],'value':'project'}],'default':_0x446c6c(0x14d)}]);_0x54464c=_0x25b162[_0x446c6c(0x151)];}}const _0x120b5f=_0x2a90eb[_0x446c6c(0x148)](join,_0x2a90eb[_0x446c6c(0x152)](getOpencodeConfigDir,_0x54464c),'opencode.json'),_0x3afe57='@ranger-testing/opencode-plugin',_0x3ae661=_0x446c6c(0x14b);let _0x575323={};if(existsSync(_0x120b5f))try{const _0x4a7f6a=await _0x2a90eb[_0x446c6c(0x148)](readFile,_0x120b5f,_0x446c6c(0x14c));_0x575323=JSON[_0x446c6c(0x140)](_0x4a7f6a);}catch(_0x9d0450){return console['error']('⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.'),{'configured':![],'scope':_0x54464c,'error':_0x2a90eb[_0x446c6c(0x155)],'details':_0x9d0450};}const _0x4d35fe=Array['isArray'](_0x575323[_0x446c6c(0x146)])?_0x575323[_0x446c6c(0x146)]:[];if(_0x4d35fe['includes'](_0x3afe57))return console['log'](_0x2a90eb['aXMrt']),{'configured':![],'scope':_0x54464c};return _0x575323[_0x446c6c(0x147)]=_0x575323['$schema']||_0x3ae661,_0x575323['plugin']=[..._0x4d35fe,_0x3afe57],await _0x2a90eb[_0x446c6c(0x157)](mkdir,_0x2a90eb[_0x446c6c(0x152)](getOpencodeConfigDir,_0x54464c),{'recursive':!![]}),await _0x2a90eb['yuvaj'](writeFile,_0x120b5f,JSON['stringify'](_0x575323,null,0x2)+'\x0a'),console[_0x446c6c(0x143)](_0x2a90eb['kxTpw']),{'configured':!![],'scope':_0x54464c};}
@@ -1 +1 @@
1
- function _0x3db3(){var _0x4c02fd=['111kywcTW','4435408WDEtDh','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','onfFN','8835750icKZIa','680KygXFw','4696MrlAZU','64550YfFTxa','811996YTOACS','3798195tnMnxA','121545Kpanvy','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','error','14903WlKoxz','LbdDQ','\x20\x20https://docs.ranger.net/main/concepts/profiles'];_0x3db3=function(){return _0x4c02fd;};return _0x3db3();}function _0x41fa(_0x2fa12a,_0x47320f){_0x2fa12a=_0x2fa12a-0x16e;var _0x3db314=_0x3db3();var _0x41fa34=_0x3db314[_0x2fa12a];return _0x41fa34;}(function(_0x62ebf9,_0x2bcbb8){var _0x4912ff=_0x41fa,_0xf36398=_0x62ebf9();while(!![]){try{var _0x195701=parseInt(_0x4912ff(0x172))/0x1+parseInt(_0x4912ff(0x171))/0x2*(-parseInt(_0x4912ff(0x17b))/0x3)+parseInt(_0x4912ff(0x17c))/0x4+parseInt(_0x4912ff(0x173))/0x5+parseInt(_0x4912ff(0x16e))/0x6+parseInt(_0x4912ff(0x178))/0x7*(-parseInt(_0x4912ff(0x170))/0x8)+-parseInt(_0x4912ff(0x174))/0x9*(parseInt(_0x4912ff(0x16f))/0xa);if(_0x195701===_0x2bcbb8)break;else _0xf36398['push'](_0xf36398['shift']());}catch(_0x963c28){_0xf36398['push'](_0xf36398['shift']());}}}(_0x3db3,0xc115a));export async function setupCi(_0x3f5e4f,_0x393669,_0x2b2736){var _0x9723f9=_0x41fa,_0x230908={'onfFN':function(_0x5936f7,_0x288df7){return _0x5936f7+_0x288df7;},'LbdDQ':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console[_0x9723f9(0x177)](_0x230908[_0x9723f9(0x17e)](_0x230908[_0x9723f9(0x17e)](_0x9723f9(0x17d)+'\x0a'+_0x9723f9(0x176),_0x9723f9(0x175))+'\x0a',_0x230908[_0x9723f9(0x179)])+_0x9723f9(0x17a)),process['exit'](0x1);}
1
+ function _0x543e(_0x5287e1,_0x581354){_0x5287e1=_0x5287e1-0x13a;var _0x3ba926=_0x3ba9();var _0x543e6d=_0x3ba926[_0x5287e1];return _0x543e6d;}(function(_0x203935,_0x42f8ba){var _0x7e4d18=_0x543e,_0x4e0043=_0x203935();while(!![]){try{var _0x3d32ed=-parseInt(_0x7e4d18(0x13b))/0x1+-parseInt(_0x7e4d18(0x140))/0x2*(-parseInt(_0x7e4d18(0x13d))/0x3)+-parseInt(_0x7e4d18(0x13c))/0x4+parseInt(_0x7e4d18(0x143))/0x5+-parseInt(_0x7e4d18(0x13e))/0x6+parseInt(_0x7e4d18(0x142))/0x7+parseInt(_0x7e4d18(0x146))/0x8*(-parseInt(_0x7e4d18(0x144))/0x9);if(_0x3d32ed===_0x42f8ba)break;else _0x4e0043['push'](_0x4e0043['shift']());}catch(_0x697dd1){_0x4e0043['push'](_0x4e0043['shift']());}}}(_0x3ba9,0xbc82c));export async function setupCi(_0x210abb,_0x10457b,_0x320279){var _0x1348fc=_0x543e,_0x52b4d6={'XsUVK':function(_0x5a18db,_0x465060){return _0x5a18db+_0x465060;},'KxXDC':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','YoPqq':_0x1348fc(0x141)};console[_0x1348fc(0x145)](_0x52b4d6['XsUVK']('ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a'+'\x0a'+_0x52b4d6[_0x1348fc(0x13a)]+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a',_0x52b4d6[_0x1348fc(0x13f)])+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process['exit'](0x1);}function _0x3ba9(){var _0x5ea099=['7483490eyzOlD','6680855nZithf','1575306tOYkMg','error','24OhdBeA','KxXDC','1255125KsPDOh','2131532ZSMQPy','30741YfNiQp','1391844HQAcaw','YoPqq','178QltPgA','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'];_0x3ba9=function(){return _0x5ea099;};return _0x3ba9();}
@@ -1 +1 @@
1
- (function(_0x19afd1,_0x24a29e){const _0x1a4ddd=_0x4c3d,_0x218ef2=_0x19afd1();while(!![]){try{const _0x29a26b=-parseInt(_0x1a4ddd(0xcd))/0x1+parseInt(_0x1a4ddd(0xc6))/0x2+parseInt(_0x1a4ddd(0xcc))/0x3*(parseInt(_0x1a4ddd(0xca))/0x4)+parseInt(_0x1a4ddd(0xb3))/0x5*(-parseInt(_0x1a4ddd(0xcf))/0x6)+parseInt(_0x1a4ddd(0xaf))/0x7+-parseInt(_0x1a4ddd(0xcb))/0x8+parseInt(_0x1a4ddd(0xc7))/0x9;if(_0x29a26b===_0x24a29e)break;else _0x218ef2['push'](_0x218ef2['shift']());}catch(_0x236127){_0x218ef2['push'](_0x218ef2['shift']());}}}(_0x54e6,0x2d159));import{basename}from'path';import _0x5bee72 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';function _0x4c3d(_0x4c9c8b,_0x1156bc){_0x4c9c8b=_0x4c9c8b-0xaa;const _0x54e658=_0x54e6();let _0x4c3d53=_0x54e658[_0x4c9c8b];return _0x4c3d53;}export async function skillup(_0x293953={}){const _0x1bf5c4=_0x4c3d,_0xe40e70={'yWPPW':'\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','XUWmQ':'\x20--opencode','sIbll':function(_0x5e4838,_0x484546){return _0x5e4838===_0x484546;},'YiDdS':'opencode','qqZVf':function(_0x305e7c){return _0x305e7c();},'PBBHY':function(_0x55733b,_0x41dcb3){return _0x55733b===_0x41dcb3;},'uGxJx':_0x1bf5c4(0xbb),'kngmP':function(_0x26c9d6,_0xdd4209){return _0x26c9d6===_0xdd4209;},'DHdtA':_0x1bf5c4(0xaa),'SBJFH':'project','cWlce':function(_0x58ff1e){return _0x58ff1e();},'ZlqZB':'\x0a📦\x20Installing\x20skills...\x0a','aEQcW':'ranger','jYeDS':function(_0x19744b,_0x18717f){return _0x19744b>_0x18717f;},'AzJLi':function(_0x361130,_0x58dd48){return _0x361130===_0x58dd48;},'ZGXbo':'user-level'};console[_0x1bf5c4(0xb0)](_0x1bf5c4(0xc3));const _0x35140e=_0x293953[_0x1bf5c4(0xc8)]??_0x1bf5c4(0xbe),_0x4083fa=await getToken();if(!_0x4083fa){console[_0x1bf5c4(0xb0)]('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a'),console['log']('To\x20get\x20started:'),console['log'](_0xe40e70[_0x1bf5c4(0xb6)]),console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x35140e===_0x1bf5c4(0xac)?_0xe40e70['XUWmQ']:'')+'\x20<your-api-token>'),console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0xe40e70[_0x1bf5c4(0xce)](_0x35140e,_0xe40e70[_0x1bf5c4(0xae)])?_0xe40e70['XUWmQ']:'')+'\x0a');return;}console[_0x1bf5c4(0xb0)]('✓\x20Found\x20API\x20token');const _0x17e135=_0xe40e70['qqZVf'](getProjectRoot),_0x4b8977=basename(_0x17e135),_0xc87183=_0xe40e70['PBBHY'](_0x35140e,_0xe40e70[_0x1bf5c4(0xae)])?getOpencodeConfigDir(_0xe40e70['uGxJx'])+_0x1bf5c4(0xc0):getClaudeConfigDir()+_0x1bf5c4(0xc0),_0x419eb1=_0xe40e70['kngmP'](_0x35140e,_0xe40e70['YiDdS'])?_0x17e135+_0x1bf5c4(0xbd):_0x17e135+_0x1bf5c4(0xb5),_0x37b91f=process['stdin']['isTTY']&&process['stdout']['isTTY'];let _0x48eb0c;if(_0x293953[_0x1bf5c4(0xb7)])_0x48eb0c=_0x293953['autoInstall'];else{if(_0x37b91f){const _0x210dfd=await _0x5bee72['prompt']([{'type':_0xe40e70['DHdtA'],'name':_0x1bf5c4(0xb2),'message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':'All\x20projects\x20('+_0xc87183+')','value':_0xe40e70['uGxJx']},{'name':_0x1bf5c4(0xab)+_0x419eb1+')','value':_0xe40e70['SBJFH']}]}]);_0x48eb0c=_0x210dfd[_0x1bf5c4(0xb2)];}else _0x48eb0c=_0x1bf5c4(0xc9),console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x419eb1+')');}let _0x20eefe=0x0;const _0x32699d=_0xe40e70[_0x1bf5c4(0xc2)](getCurrentVersion);console[_0x1bf5c4(0xb0)](_0xe40e70['ZlqZB']);try{const _0x5938d5=await installSkill(_0xe40e70[_0x1bf5c4(0xad)],{'cliVersion':_0x32699d,'level':_0x48eb0c,'platform':_0x35140e});_0x5938d5&&_0x20eefe++;}catch(_0x838b86){console[_0x1bf5c4(0xb8)](_0x1bf5c4(0xc4),_0x838b86 instanceof Error?_0x838b86['message']:_0x838b86);}if(_0xe40e70[_0x1bf5c4(0xb4)](_0x20eefe,0x0)){const _0x3e12db=_0xe40e70[_0x1bf5c4(0xc5)](_0x48eb0c,_0x1bf5c4(0xbb))?_0xe40e70['ZGXbo']:_0x1bf5c4(0xba);console[_0x1bf5c4(0xb0)](_0x1bf5c4(0xb1)+_0x20eefe+'\x20'+_0x3e12db+'\x20skill'+(_0x20eefe>0x1?'s':'')+'\x20successfully!\x0a'),!_0x293953[_0x1bf5c4(0xbf)]&&(console['log'](_0x1bf5c4(0xc1)),_0x35140e===_0xe40e70[_0x1bf5c4(0xae)]?console['log'](_0x1bf5c4(0xb9)):console['log']('\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!'));}else console[_0x1bf5c4(0xb0)](_0x1bf5c4(0xbc));}function _0x54e6(){const _0x203f0d=['YiDdS','1182272Zrfnjl','log','\x0a✅\x20Installed\x20','installLevel','10xeAJPO','jYeDS','/.claude/skills/','yWPPW','autoInstall','warn','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','project-level','user','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','/.opencode/skills/','claude','suppressUsage','/skills/','To\x20use:','cWlce','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','AzJLi','353262WisdEP','3601593LaQPue','platform','project','28716YmmURR','2373224Zodddc','27LUIVeT','106657MitytL','sIbll','667020eVLudx','list','This\x20project\x20only\x20(','opencode','aEQcW'];_0x54e6=function(){return _0x203f0d;};return _0x54e6();}
1
+ function _0x9a51(_0x5c1015,_0x3c231a){_0x5c1015=_0x5c1015-0x17b;const _0x570367=_0x5703();let _0x9a515f=_0x570367[_0x5c1015];return _0x9a515f;}(function(_0x3b5370,_0x4d30b2){const _0x150ad1=_0x9a51,_0x50472d=_0x3b5370();while(!![]){try{const _0x24af16=parseInt(_0x150ad1(0x1a7))/0x1+-parseInt(_0x150ad1(0x197))/0x2+-parseInt(_0x150ad1(0x1a6))/0x3*(-parseInt(_0x150ad1(0x18b))/0x4)+-parseInt(_0x150ad1(0x195))/0x5+-parseInt(_0x150ad1(0x17d))/0x6*(-parseInt(_0x150ad1(0x191))/0x7)+parseInt(_0x150ad1(0x1a5))/0x8+-parseInt(_0x150ad1(0x18d))/0x9;if(_0x24af16===_0x4d30b2)break;else _0x50472d['push'](_0x50472d['shift']());}catch(_0x99b70e){_0x50472d['push'](_0x50472d['shift']());}}}(_0x5703,0x27f7c));import{basename}from'path';import _0x3abae1 from'inquirer';function _0x5703(){const _0x38e872=['165156pNPYMY','opencode','All\x20projects\x20(','This\x20project\x20only\x20(','user-level','KkMHO','iYkCK','IgdTk','/.opencode/skills/','/skills/','prompt','isTTY','uDWlN','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','1664208qzgkMS','12lUFlDU','324405wjxGXo','To\x20use:','uEkmJ','Where\x20should\x20skills\x20be\x20installed?','614988SbQdOa','stdout','suppressUsage','autoInstall','\x20\x203.\x20Run:\x20ranger\x20skillup','installLevel','\x20\x202.\x20Run:\x20ranger\x20setup','XYbAe','\x20successfully!\x0a','\x20skill','\x20--opencode','claude','QIcuk','enyor','57532AZaGka','project-level','4915026MdULPV','log','pRBdv','YKmxK','14FBJtMX','user','ranger','ehxFU','12795JWznQK','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('];_0x5703=function(){return _0x38e872;};return _0x5703();}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(_0x43695c={}){const _0x4852a2=_0x9a51,_0x1516bd={'tYNGP':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','FomOL':'5|4|2|3|1|0','ehxFU':'opencode','iYkCK':_0x4852a2(0x1a4),'XYbAe':_0x4852a2(0x187),'ycTtb':'❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','oTviX':function(_0xa3978e,_0x372a4b){return _0xa3978e===_0x372a4b;},'tjTaf':function(_0x41d9c3,_0x253b6c){return _0x41d9c3(_0x253b6c);},'YKmxK':'list','uDWlN':_0x4852a2(0x182),'yGglf':_0x4852a2(0x17c),'pRBdv':_0x4852a2(0x192),'uEkmJ':'project','uvJtJ':function(_0x258cf6){return _0x258cf6();},'TySKA':'\x0a📦\x20Installing\x20skills...\x0a','tvGFW':_0x4852a2(0x193),'enyor':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','IgdTk':function(_0xcd7dd3,_0x3d678d){return _0xcd7dd3 instanceof _0x3d678d;},'fPpgg':function(_0xe4d7a,_0x22c22c){return _0xe4d7a>_0x22c22c;},'KkMHO':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','QIcuk':'\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!'};console[_0x4852a2(0x18e)](_0x1516bd['tYNGP']);const _0x43def8=_0x43695c['platform']??_0x4852a2(0x188),_0x64571c=await getToken();if(!_0x64571c){const _0x27f65a=_0x1516bd['FomOL']['split']('|');let _0x34faa7=0x0;while(!![]){switch(_0x27f65a[_0x34faa7++]){case'0':return;case'1':console[_0x4852a2(0x18e)](_0x4852a2(0x181)+(_0x43def8===_0x1516bd['ehxFU']?'\x20--opencode':'')+'\x0a');continue;case'2':console['log'](_0x1516bd[_0x4852a2(0x19d)]);continue;case'3':console['log'](_0x4852a2(0x183)+(_0x43def8===_0x4852a2(0x198)?_0x1516bd[_0x4852a2(0x184)]:'')+'\x20<your-api-token>');continue;case'4':console['log']('To\x20get\x20started:');continue;case'5':console[_0x4852a2(0x18e)](_0x1516bd['ycTtb']);continue;}break;}}console[_0x4852a2(0x18e)]('✓\x20Found\x20API\x20token');const _0x48decd=getProjectRoot(),_0x47e310=basename(_0x48decd),_0x49bb6f=_0x1516bd['oTviX'](_0x43def8,'opencode')?_0x1516bd['tjTaf'](getOpencodeConfigDir,'user')+_0x4852a2(0x1a0):getClaudeConfigDir()+'/skills/',_0x1831f6=_0x1516bd['oTviX'](_0x43def8,'opencode')?_0x48decd+_0x4852a2(0x19f):_0x48decd+'/.claude/skills/',_0x3e9848=process['stdin'][_0x4852a2(0x1a2)]&&process[_0x4852a2(0x17e)]['isTTY'];let _0x1e934c;if(_0x43695c[_0x4852a2(0x180)])_0x1e934c=_0x43695c['autoInstall'];else{if(_0x3e9848){const _0xb6074=await _0x3abae1[_0x4852a2(0x1a1)]([{'type':_0x1516bd[_0x4852a2(0x190)],'name':_0x1516bd[_0x4852a2(0x1a3)],'message':_0x1516bd['yGglf'],'choices':[{'name':_0x4852a2(0x199)+_0x49bb6f+')','value':_0x1516bd[_0x4852a2(0x18f)]},{'name':_0x4852a2(0x19a)+_0x1831f6+')','value':_0x1516bd['uEkmJ']}]}]);_0x1e934c=_0xb6074[_0x4852a2(0x182)];}else _0x1e934c=_0x1516bd[_0x4852a2(0x17b)],console['log'](_0x4852a2(0x196)+_0x1831f6+')');}let _0x22f09c=0x0;const _0x269ce1=_0x1516bd['uvJtJ'](getCurrentVersion);console['log'](_0x1516bd['TySKA']);try{const _0x14d7bc=await installSkill(_0x1516bd['tvGFW'],{'cliVersion':_0x269ce1,'level':_0x1e934c,'platform':_0x43def8});_0x14d7bc&&_0x22f09c++;}catch(_0x1000c0){console['warn'](_0x1516bd[_0x4852a2(0x18a)],_0x1516bd[_0x4852a2(0x19e)](_0x1000c0,Error)?_0x1000c0['message']:_0x1000c0);}if(_0x22f09c>0x0){const _0x215fad=_0x1e934c===_0x4852a2(0x192)?_0x4852a2(0x19b):_0x4852a2(0x18c);console['log']('\x0a✅\x20Installed\x20'+_0x22f09c+'\x20'+_0x215fad+_0x4852a2(0x186)+(_0x1516bd['fPpgg'](_0x22f09c,0x1)?'s':'')+_0x4852a2(0x185)),!_0x43695c[_0x4852a2(0x17f)]&&(console[_0x4852a2(0x18e)](_0x4852a2(0x1a8)),_0x43def8===_0x1516bd[_0x4852a2(0x194)]?console[_0x4852a2(0x18e)](_0x1516bd[_0x4852a2(0x19c)]):console['log'](_0x1516bd[_0x4852a2(0x189)]));}else console['log']('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
@@ -1 +1 @@
1
- const _0x362f4a=_0x255a;(function(_0x187122,_0x4a7f8a){const _0x221343=_0x255a,_0x4b5a9a=_0x187122();while(!![]){try{const _0x11cafc=parseInt(_0x221343(0x18f))/0x1*(-parseInt(_0x221343(0x157))/0x2)+-parseInt(_0x221343(0x19c))/0x3+parseInt(_0x221343(0x1a3))/0x4+parseInt(_0x221343(0x15b))/0x5*(-parseInt(_0x221343(0x13a))/0x6)+parseInt(_0x221343(0x196))/0x7*(parseInt(_0x221343(0x138))/0x8)+parseInt(_0x221343(0x160))/0x9+parseInt(_0x221343(0x19a))/0xa;if(_0x11cafc===_0x4a7f8a)break;else _0x4b5a9a['push'](_0x4b5a9a['shift']());}catch(_0x22471e){_0x4b5a9a['push'](_0x4b5a9a['shift']());}}}(_0x30fd,0x706e1));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';function _0x255a(_0x30b8fd,_0x284415){_0x30b8fd=_0x30b8fd-0x137;const _0x30fdd5=_0x30fd();let _0x255a09=_0x30fdd5[_0x30b8fd];return _0x255a09;}import _0x8ebeba 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='1.58.2';const bold=_0x2bdc7e=>_0x362f4a(0x139)+_0x2bdc7e+'\x1b[0m';export function getPlaywrightVersion(){const _0x47fd2f=_0x362f4a,_0x35c064={'TZtVc':_0x47fd2f(0x17a)};try{const _0x454ee5=require[_0x47fd2f(0x1a7)](_0x35c064['TZtVc']),_0x38a1e1=require(_0x454ee5);return _0x38a1e1['version'];}catch{return null;}}function _0x30fd(){const _0x16b842=['isTTY','executablePath','34peGpXK','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','UFRIS','23675ZqqHQF','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','JJZVc','trackPhaseEnd','✓\x20Created\x20.ranger/.gitignore','2849175IVcwTf','SEgcT','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','NgsOo','ncOVr','allowInsecureLocalhost','trackPhaseStart','install','\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','YaMxq','playwright@','\x20install\x20chromium','.gitignore','sZdBr','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','url','local','organizationName','confirm','✓\x20Local\x20profile\x20already\x20exists','HKWvR','log','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','success','wYQrO','KsNzK','playwright/package.json','skills','skipChromium','...','ranger\x20profile\x20add\x20<name>','HeEwu','MOkno','RMKvz','TxsHg','✓\x20Stored\x20credentials\x20locally','\x20(fallback\x20version)','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','close','✓\x20Exported\x20credentials\x20for\x20CI','mMJFF','✓\x20~/.ranger/\x20directory\x20already\x20exists','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','\x20\x20npx\x20playwright@','opencode','wmPPt','user','21687HxuuSi','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','env','✓\x20Playwright\x20Chromium\x20browser\x20found','existing_token','\x0a⚠\x20Skipping\x20Chromium\x20installation.','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','10878lTkHSo','✓\x20Authenticated\x20to\x20','platform','error','660430JfXSfB','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','458253TMZqvy','XhDgZ','\x0aInstalling\x20Chromium\x20browser...\x0a','\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:','message','\x0a🚀\x20Ranger\x20Setup\x0a','rMcKS','3366368daGPJx','ePepz','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','resolve',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','inherit','profile','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','NiJmk','776ZSyFTp','\x1b[1m','498vudHVx','ouqMk','skipped','GYTxM','aOLPe','cNKoY','hCVSB','force','win32','\x0a\x20\x20','tWfOV','plugin','method','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','ToEmU','ozkms','xZxop','tqQbG','pFeIl','ready','SaTIz','The\x20required\x20version\x20(','ncxUr','chromium','nBMLb','irXlO','scope'];_0x30fd=function(){return _0x16b842;};return _0x30fd();}export function installChromiumBinary(_0x3e65a8,_0xdf90e0=![]){const _0x967e79=_0x362f4a,_0x59b52a={'XOxLs':_0x967e79(0x167),'RMKvz':function(_0x297c2c,_0x2597d4,_0x4c5c8a,_0x55e97c){return _0x297c2c(_0x2597d4,_0x4c5c8a,_0x55e97c);},'XhDgZ':'npx','ZSPkS':_0x967e79(0x1a9),'lfRzT':function(_0x369e30,_0x27dbf2){return _0x369e30===_0x27dbf2;},'IayCZ':_0x967e79(0x199)};return new Promise((_0x5c0f80,_0x161556)=>{const _0x56777e=_0x967e79,_0x1b09fc=[_0x56777e(0x16a)+_0x3e65a8,_0x59b52a['XOxLs'],..._0xdf90e0?['--with-deps']:[],'chromium'],_0x181635=_0x59b52a[_0x56777e(0x181)](spawn,_0x59b52a[_0x56777e(0x19d)],_0x1b09fc,{'stdio':['ignore',_0x56777e(0x1a9),_0x59b52a['ZSPkS']],'shell':_0x59b52a['lfRzT'](process[_0x56777e(0x198)],_0x56777e(0x142))});_0x181635['on'](_0x56777e(0x186),_0x2fe11a=>{_0x2fe11a===0x0?_0x5c0f80():_0x161556(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x2fe11a));}),_0x181635['on'](_0x59b52a['IayCZ'],_0x364a75=>{_0x161556(_0x364a75);});});}export async function authenticate(_0x1b7f96){const _0x4070f5=_0x362f4a,_0xb5ea5e={'ePepz':function(_0x206088,_0x40bdce){return _0x206088(_0x40bdce);},'rARMH':function(_0x56f360){return _0x56f360();},'tqQbG':function(_0x1eb254,_0x5ba6c6){return _0x1eb254(_0x5ba6c6);},'GYTxM':_0x4070f5(0x187),'UFRIS':_0x4070f5(0x183)};if(!_0x1b7f96){const _0xfc228d=await getToken();if(_0xfc228d){const _0x57595d=await _0xb5ea5e[_0x4070f5(0x1a4)](getCurrentUser,_0xfc228d);if(_0x57595d[_0x4070f5(0x177)])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x57595d['user'][_0x4070f5(0x171)]),{'token':_0xfc228d,'method':_0x4070f5(0x193)};}try{_0x1b7f96=await _0xb5ea5e['rARMH'](runDeviceAuthFlow);}catch(_0x2ff002){throw new Error('Authentication\x20failed:\x20'+(_0x2ff002 instanceof Error?_0x2ff002['message']:_0x2ff002));}const _0x551870=await _0xb5ea5e[_0x4070f5(0x1a4)](getCurrentUser,_0x1b7f96);if(!_0x551870[_0x4070f5(0x177)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x551870['error']);return console['log'](_0x4070f5(0x197)+_0x551870[_0x4070f5(0x18e)][_0x4070f5(0x171)]),{'token':_0x1b7f96,'method':'device_auth'};}console['log']('Validating\x20API\x20token...');const _0xf740d5=await getCurrentUser(_0x1b7f96);if(!_0xf740d5[_0x4070f5(0x177)]){if(_0xf740d5['status'])throw new Error('Authentication\x20failed:\x20'+_0xf740d5[_0x4070f5(0x199)]+_0x4070f5(0x176));else throw new Error(_0x4070f5(0x162)+_0xf740d5[_0x4070f5(0x199)]+_0x4070f5(0x159));}return console[_0x4070f5(0x175)](_0x4070f5(0x197)+_0xf740d5['user']['organizationName']),await _0xb5ea5e[_0x4070f5(0x14b)](storeToken,_0x1b7f96),console[_0x4070f5(0x175)](process[_0x4070f5(0x191)]['GITHUB_ENV']?_0xb5ea5e[_0x4070f5(0x13d)]:_0xb5ea5e[_0x4070f5(0x15a)]),{'token':_0x1b7f96,'method':'provided_token'};}export async function ensureRangerDir(_0x26da54){const _0x543f59=_0x362f4a,_0x55a9f4={'SEgcT':function(_0x2b49a0,_0x313221){return _0x2b49a0(_0x313221);},'xZxop':function(_0x1728eb,_0x1b104e,_0x5b8b81){return _0x1728eb(_0x1b104e,_0x5b8b81);},'mMJFF':'✓\x20Created\x20~/.ranger/\x20directory','ncxUr':_0x543f59(0x189)};void _0x26da54;const _0x1ff589=getRangerHomeDir();return!_0x55a9f4[_0x543f59(0x161)](existsSync,_0x1ff589)?(await _0x55a9f4[_0x543f59(0x14a)](mkdir,_0x1ff589,{'recursive':!![]}),console['log'](_0x55a9f4[_0x543f59(0x188)]),{'path':_0x1ff589,'installed':!![]}):(console[_0x543f59(0x175)](_0x55a9f4[_0x543f59(0x150)]),{'path':_0x1ff589,'installed':![]});}export async function ensureChromium(_0x3e7b08=![]){const _0xbd6958=_0x362f4a,_0x583d1e={'HeEwu':function(_0x278dda,_0x11d6f0){return _0x278dda(_0x11d6f0);},'ufiZn':function(_0x12d129){return _0x12d129();},'cNKoY':function(_0x590425,_0x3bfac5){return _0x590425??_0x3bfac5;},'nbtzY':_0xbd6958(0x172),'nOoAL':_0xbd6958(0x167),'YvTeT':_0xbd6958(0x184),'UrnvL':_0xbd6958(0x19e),'QUPPW':function(_0x134bb5,_0x2f4031,_0x43c719){return _0x134bb5(_0x2f4031,_0x43c719);},'DyetX':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','TxsHg':_0xbd6958(0x194)};let _0x3ab0f7=![];try{const _0x122475=chromium[_0xbd6958(0x156)]();_0x3ab0f7=_0x583d1e[_0xbd6958(0x17f)](existsSync,_0x122475);}catch{_0x3ab0f7=![];}if(_0x3ab0f7)return console[_0xbd6958(0x175)](_0xbd6958(0x192)),![];const _0x125b00=_0x583d1e['ufiZn'](getPlaywrightVersion),_0x216322=_0x583d1e[_0xbd6958(0x13f)](_0x125b00,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x4ead79=!_0x125b00,_0x2f1ceb=process['stdin'][_0xbd6958(0x155)]&&process['stdout'][_0xbd6958(0x155)];let _0x5d2a17=!![];if(_0x2f1ceb){const {install:_0x4dd187}=await _0x8ebeba['prompt']([{'type':_0x583d1e['nbtzY'],'name':_0x583d1e['nOoAL'],'message':_0x4ead79?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x216322+'\x20now?':_0xbd6958(0x14f)+_0x216322+_0xbd6958(0x1a8),'default':!![]}]);_0x5d2a17=_0x4dd187;}else console[_0xbd6958(0x175)](_0xbd6958(0x195)+_0x216322+(_0x4ead79?_0x583d1e['YvTeT']:'')+_0xbd6958(0x17d));if(_0x5d2a17){console[_0xbd6958(0x175)](_0x583d1e['UrnvL']);try{await _0x583d1e['QUPPW'](installChromiumBinary,_0x216322,_0x3e7b08),console['log'](_0x583d1e['DyetX']);}catch(_0x8f9d3a){console[_0xbd6958(0x199)](_0xbd6958(0x18a),_0x8f9d3a instanceof Error?_0x8f9d3a['message']:_0x8f9d3a),console[_0xbd6958(0x175)]('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),console[_0xbd6958(0x175)](_0xbd6958(0x18b)+_0x216322+'\x20install\x20chromium');}}else console[_0xbd6958(0x175)](_0x583d1e[_0xbd6958(0x182)]),console['log']('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),console['log'](_0xbd6958(0x18b)+_0x216322+_0xbd6958(0x16b));return!![];}export async function writeRangerGitignore(_0x24835a){const _0x5a61eb=_0x362f4a,_0x452c9f={'bawkX':_0x5a61eb(0x16c),'NgsOo':function(_0x5b7b9c,_0x1063f9,_0x21c509){return _0x5b7b9c(_0x1063f9,_0x21c509);},'XJKYj':_0x5a61eb(0x15f)},_0x2d2476=join(_0x24835a,_0x452c9f['bawkX']),_0x39a6d5=_0x5a61eb(0x168);await _0x452c9f[_0x5a61eb(0x163)](writeFile,_0x2d2476,_0x39a6d5),console[_0x5a61eb(0x175)](_0x452c9f['XJKYj']);}export async function ensureLocalEnv(_0xa0ac5f,_0xffe200){const _0x5459ea=_0x362f4a,_0x8305ae={'SWlrA':function(_0x2cad9b){return _0x2cad9b();},'urNoe':function(_0x7a0f58,_0x4f0d46){return _0x7a0f58!==_0x4f0d46;},'gbqFp':function(_0x109210,_0x56ad23){return _0x109210===_0x56ad23;},'ozkms':function(_0x20bd1a,_0x473b7b,_0x1e12e7){return _0x20bd1a(_0x473b7b,_0x1e12e7);},'oFoNz':_0x5459ea(0x170),'YaMxq':_0x5459ea(0x173)};if(!_0x8305ae['SWlrA'](findGitRoot)&&_0x8305ae['urNoe'](_0xa0ac5f?.[_0x5459ea(0x154)],_0x5459ea(0x18e)))return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.'),{'ready':![],'skipped':!![]};const _0x11d244=_0x8305ae['gbqFp'](_0xa0ac5f?.[_0x5459ea(0x154)],'user')?getRangerHomeDir():undefined;if(_0x8305ae[_0x5459ea(0x149)](findExistingEnv,'local',{'locations':[_0x8305ae['oFoNz']],'rangerDir':_0x11d244}))return console['log'](_0x8305ae[_0x5459ea(0x169)]),{'ready':!![],'skipped':![]};try{return await addEnv(_0x5459ea(0x170),{'url':_0xa0ac5f?.['url'],'force':_0xa0ac5f?.[_0x5459ea(0x141)],'allowInsecureLocalhost':_0xa0ac5f?.['allowInsecureLocalhost'],'scope':_0xa0ac5f?.['scope']},_0xffe200),{'ready':!![],'skipped':![]};}catch(_0x12bed2){return console['error']('\x0a❌\x20Profile\x20setup\x20failed:',_0x12bed2 instanceof Error?_0x12bed2['message']:_0x12bed2),{'ready':![],'skipped':![]};}}export async function start(_0x3b7634,_0x796122,_0x2a35aa){const _0x3da4e3=_0x362f4a,_0x4af574={'ouqMk':function(_0x3fe0c4,_0x459a03){return _0x3fe0c4!==_0x459a03;},'ncOVr':function(_0x48e824,_0x20b1b0){return _0x48e824+_0x20b1b0;},'rMcKS':function(_0x4e994c,_0x4ee65f){return _0x4e994c(_0x4ee65f);},'wmPPt':'user','tWfOV':function(_0x19ca2c,_0xac3775){return _0x19ca2c(_0xac3775);},'odhNs':function(_0x35d948){return _0x35d948();},'KsNzK':'✓\x20Skipping\x20authentication\x20(--skip-auth)','YjbVy':'auth','HKWvR':_0x3da4e3(0x13c),'sZdBr':function(_0xdaa07c,_0xd722a7){return _0xdaa07c(_0xd722a7);},'pFeIl':_0x3da4e3(0x151),'uuwGB':_0x3da4e3(0x1a6),'JJZVc':'plugin','MOkno':_0x3da4e3(0x17b),'NiJmk':function(_0x2455a1,_0x4e91f7,_0x2d8ac2){return _0x2455a1(_0x4e91f7,_0x2d8ac2);},'Nctyx':'ranger','SaTIz':function(_0x2a6415,_0xd7ef36){return _0x2a6415 instanceof _0xd7ef36;},'ZIoqG':_0x3da4e3(0x1a5),'ToEmU':function(_0x1c5ad8,_0x5a5d70,_0x2cb9be){return _0x1c5ad8(_0x5a5d70,_0x2cb9be);},'BLxyy':'profile','aOLPe':function(_0x464774,_0x1da712){return _0x464774+_0x1da712;},'wYQrO':function(_0x35315a,_0x39d7f7){return _0x35315a(_0x39d7f7);},'yCcvB':_0x3da4e3(0x147),'irXlO':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','hCVSB':'verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','nBMLb':'/ranger:enable'};console['log'](_0x3da4e3(0x1a1));_0x4af574[_0x3da4e3(0x13b)](_0x796122?.['scope'],undefined)&&_0x796122[_0x3da4e3(0x154)]!=='user'&&(console['error'](_0x4af574[_0x3da4e3(0x164)]('ranger\x20setup\x20--scope='+_0x4af574['rMcKS'](String,_0x796122[_0x3da4e3(0x154)])+'\x20is\x20no\x20longer\x20supported.\x20'+_0x3da4e3(0x158),'project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.')),process['exit'](0x1));_0x796122={..._0x796122,'scope':_0x4af574[_0x3da4e3(0x18d)]};const _0x4550d0=!_0x4af574['tWfOV'](existsSync,_0x4af574['odhNs'](getRangerHomeDir));await ensureRangerDir(_0x4af574[_0x3da4e3(0x18d)]);if(_0x796122?.['skipAuth'])console[_0x3da4e3(0x175)](_0x4af574[_0x3da4e3(0x179)]),_0x2a35aa?.[_0x3da4e3(0x15e)](_0x4af574['YjbVy'],{'isFirstRun':_0x4550d0,'method':_0x4af574[_0x3da4e3(0x174)]});else{_0x2a35aa?.[_0x3da4e3(0x166)]('auth');const _0x5922a9=await _0x4af574[_0x3da4e3(0x16d)](authenticate,_0x3b7634);_0x2a35aa?.[_0x3da4e3(0x15e)]('auth',{'isFirstRun':_0x4550d0,'method':_0x5922a9[_0x3da4e3(0x146)]});}_0x2a35aa?.[_0x3da4e3(0x166)]('chromium');_0x796122?.[_0x3da4e3(0x17c)]?console[_0x3da4e3(0x175)](_0x3da4e3(0x16e)):await ensureChromium(_0x796122?.['withDeps']);_0x2a35aa?.[_0x3da4e3(0x15e)](_0x4af574[_0x3da4e3(0x14c)],{'isFirstRun':_0x4550d0,'skipped':!!_0x796122?.[_0x3da4e3(0x17c)]}),console['log'](_0x4af574['uuwGB']);const _0x4a190d=_0x796122?.['scope'],_0xe1dfc2=_0x796122?.['opencode']??![];let _0x3522ed=null;_0xe1dfc2?(_0x2a35aa?.['trackPhaseStart'](_0x4af574[_0x3da4e3(0x15d)]),_0x3522ed=await _0x4af574[_0x3da4e3(0x1a2)](ensureOpencodePluginConfig,_0x4a190d),_0x2a35aa?.[_0x3da4e3(0x15e)](_0x3da4e3(0x145),{'isFirstRun':_0x4550d0,'opencode':!![]})):(_0x2a35aa?.['trackPhaseStart']('plugin'),await ensureClaudePlugin(_0x4a190d),_0x2a35aa?.[_0x3da4e3(0x15e)](_0x4af574['JJZVc'],{'isFirstRun':_0x4550d0}));if(_0xe1dfc2&&_0x3522ed){_0x2a35aa?.[_0x3da4e3(0x166)](_0x4af574[_0x3da4e3(0x180)]);try{await _0x4af574[_0x3da4e3(0x137)](installSkill,_0x4af574['Nctyx'],{'level':_0x3522ed['scope'],'cliVersion':getCurrentVersion(),'platform':_0x3da4e3(0x18c)}),_0x2a35aa?.[_0x3da4e3(0x15e)](_0x3da4e3(0x17b),{'isFirstRun':_0x4550d0,'opencode':!![]});}catch(_0x51b245){console['warn'](_0x3da4e3(0x1ab),_0x4af574[_0x3da4e3(0x14e)](_0x51b245,Error)?_0x51b245[_0x3da4e3(0x1a0)]:_0x51b245),_0x2a35aa?.[_0x3da4e3(0x15e)]('skills',{'isFirstRun':_0x4550d0,'opencode':!![],'failed':!![]});}}else _0x2a35aa?.[_0x3da4e3(0x166)](_0x4af574['MOkno']),await _0x4af574[_0x3da4e3(0x144)](ensureClaudeSkills,_0x4a190d),_0x2a35aa?.['trackPhaseEnd'](_0x4af574[_0x3da4e3(0x180)],{'isFirstRun':_0x4550d0});if(_0x796122?.['skipAuth'])console['log'](_0x4af574['ZIoqG']);else{if(_0x796122?.['url']){_0x2a35aa?.[_0x3da4e3(0x166)](_0x3da4e3(0x1aa));const _0xceec18=await _0x4af574[_0x3da4e3(0x148)](ensureLocalEnv,{'url':_0x796122[_0x3da4e3(0x16f)],'force':_0x796122?.['force'],'allowInsecureLocalhost':_0x796122?.[_0x3da4e3(0x165)],'scope':'user'},_0x2a35aa);_0x2a35aa?.['trackPhaseEnd'](_0x4af574['BLxyy'],{'isFirstRun':_0x4550d0,'profileReady':_0xceec18[_0x3da4e3(0x14d)],'userSkipped':_0xceec18[_0x3da4e3(0x13c)]});}else console[_0x3da4e3(0x175)](_0x4af574[_0x3da4e3(0x164)](_0x4af574['aOLPe'](_0x3da4e3(0x19f)+(_0x3da4e3(0x143)+_0x4af574[_0x3da4e3(0x178)](bold,_0x3da4e3(0x17e))),'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)')+_0x3da4e3(0x190),_0x3da4e3(0x15c)));}if(_0xe1dfc2)console[_0x3da4e3(0x175)](_0x4af574['yCcvB']),console['log'](_0x3da4e3(0x185)),console['log'](_0x4af574[_0x3da4e3(0x153)]),console[_0x3da4e3(0x175)](_0x4af574[_0x3da4e3(0x140)]);else{const _0x1323c7=_0x4af574[_0x3da4e3(0x16d)](bold,_0x4af574[_0x3da4e3(0x152)]);console[_0x3da4e3(0x175)](_0x4af574[_0x3da4e3(0x13e)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x1323c7+'\x20and\x20prompt\x20the\x20coding','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with')+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'+_0x3da4e3(0x19b));}}
1
+ const _0x335357=_0xeb41;(function(_0x41c8a5,_0x226fed){const _0x140423=_0xeb41,_0x2c2868=_0x41c8a5();while(!![]){try{const _0x318f5e=parseInt(_0x140423(0xe0))/0x1+-parseInt(_0x140423(0xdd))/0x2*(parseInt(_0x140423(0xe7))/0x3)+parseInt(_0x140423(0xdf))/0x4*(parseInt(_0x140423(0xea))/0x5)+parseInt(_0x140423(0xef))/0x6+-parseInt(_0x140423(0x103))/0x7+parseInt(_0x140423(0x119))/0x8*(parseInt(_0x140423(0x102))/0x9)+-parseInt(_0x140423(0xdb))/0xa*(parseInt(_0x140423(0xf1))/0xb);if(_0x318f5e===_0x226fed)break;else _0x2c2868['push'](_0x2c2868['shift']());}catch(_0x12f877){_0x2c2868['push'](_0x2c2868['shift']());}}}(_0x1f87,0xa0097));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x263c17 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);function _0xeb41(_0x3f582a,_0x3347cd){_0x3f582a=_0x3f582a-0xc6;const _0x1f8717=_0x1f87();let _0xeb415d=_0x1f8717[_0x3f582a];return _0xeb415d;}export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x335357(0x107);function _0x1f87(){const _0x3679cb=['platform','✓\x20Skipping\x20authentication\x20(--skip-auth)','device_auth','ignore','\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','✓\x20Created\x20.ranger/.gitignore','provided_token','NyLXg','trackPhaseEnd','trackPhaseStart','opencode',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','RhkhC','error','log','user','/ranger:enable','jDAqS','.gitignore','uPEMa','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','dAUHH','bPTGF','\x1b[1m','xKDTL','xHZPk','close','skills','✓\x20Playwright\x20Chromium\x20browser\x20found','DYxSZ','chromium','6446460oJctoi','EArQt','148StfNPY','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','4605156yyEBRd','870066hMBnGN','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','Validating\x20API\x20token...','\x1b[0m','exit','VmyNG','prompt','27552liSLtU','scope','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','5wQcFFE','stdin','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','force','ready','2434824yoNkgB','PAbNi','22owEXVd','Ftthw','zKcNz','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','Authentication\x20failed:\x20','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','bnfGV','success','TMmPu','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','BnYPI','nIkcx','\x20(fallback\x20version)','method','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','You\x20can\x20install\x20it\x20manually\x20by\x20running:','CZome','27oDCpao','6731984idggMU','ranger','EjiPS','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','1.58.2','MBxsi','confirm','isTTY','✓\x20~/.ranger/\x20directory\x20already\x20exists','ypxKs','playwright@','PUWBk','mvCIc','✓\x20Authenticated\x20to\x20','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','npx','✓\x20Stored\x20credentials\x20locally','message','existing_token','...','\x20install\x20chromium','\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:','3090592zKtqMc','✓\x20Created\x20~/.ranger/\x20directory','\x0a⚠\x20Skipping\x20Chromium\x20installation.','profile','UymPk','LYPcT','install','ranger\x20profile\x20add\x20<name>','xkzwF','pzXnG','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','inherit','✓\x20Already\x20authenticated\x20to\x20','version','url','ShPfu'];_0x1f87=function(){return _0x3679cb;};return _0x1f87();}const bold=_0x5d98e6=>_0x335357(0xd3)+_0x5d98e6+_0x335357(0xe3);export function getPlaywrightVersion(){const _0x4a3926=_0x335357,_0xe8a7ff={'SsyQL':'playwright/package.json'};try{const _0x3b5e34=require['resolve'](_0xe8a7ff['SsyQL']),_0x1b8c84=require(_0x3b5e34);return _0x1b8c84[_0x4a3926(0x126)];}catch{return null;}}export function installChromiumBinary(_0x17a4dd,_0x2b7e05=![]){const _0x409611=_0x335357,_0x208b0f={'xKDTL':function(_0x4a4d6c,_0x43a9ab){return _0x4a4d6c(_0x43a9ab);},'okAEI':'--with-deps','bPTGF':_0x409611(0xda),'uPEMa':function(_0x1f15a9,_0x38be44,_0x40cff4,_0x1bcebc){return _0x1f15a9(_0x38be44,_0x40cff4,_0x1bcebc);},'zKcNz':_0x409611(0x112),'nIkcx':'win32','jnEtA':_0x409611(0xd6),'bnfGV':_0x409611(0xc9)};return new Promise((_0x2704b7,_0x133cbc)=>{const _0x3992ca=_0x409611,_0x33951c={'LuNVc':function(_0x1d5471){return _0x1d5471();},'HUrEG':function(_0x2daf6d,_0x2de184){const _0xcb4a11=_0xeb41;return _0x208b0f[_0xcb4a11(0xd4)](_0x2daf6d,_0x2de184);}},_0xca1c31=[_0x3992ca(0x10d)+_0x17a4dd,'install',..._0x2b7e05?[_0x208b0f['okAEI']]:[],_0x208b0f[_0x3992ca(0xd2)]],_0x542e4f=_0x208b0f[_0x3992ca(0xcf)](spawn,_0x208b0f[_0x3992ca(0xf3)],_0xca1c31,{'stdio':[_0x3992ca(0x12c),_0x3992ca(0x124),_0x3992ca(0x124)],'shell':process[_0x3992ca(0x129)]===_0x208b0f[_0x3992ca(0xfc)]});_0x542e4f['on'](_0x208b0f['jnEtA'],_0x3c5f82=>{_0x3c5f82===0x0?_0x33951c['LuNVc'](_0x2704b7):_0x33951c['HUrEG'](_0x133cbc,new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x3c5f82));}),_0x542e4f['on'](_0x208b0f[_0x3992ca(0xf7)],_0x321379=>{_0x133cbc(_0x321379);});});}export async function authenticate(_0x17a15b){const _0x5823d3=_0x335357,_0x18370a={'UymPk':function(_0x533c89){return _0x533c89();},'CoiJD':function(_0x40b55f){return _0x40b55f();},'jDAqS':function(_0xaf1f04,_0x50007a){return _0xaf1f04(_0x50007a);},'DYxSZ':_0x5823d3(0xe2),'UYMMs':_0x5823d3(0x12f)};if(!_0x17a15b){const _0xdf79c5=await _0x18370a[_0x5823d3(0x11d)](getToken);if(_0xdf79c5){const _0x10257e=await getCurrentUser(_0xdf79c5);if(_0x10257e[_0x5823d3(0xf8)])return console[_0x5823d3(0xca)](_0x5823d3(0x125)+_0x10257e[_0x5823d3(0xcb)]['organizationName']),{'token':_0xdf79c5,'method':_0x5823d3(0x115)};}try{_0x17a15b=await _0x18370a['CoiJD'](runDeviceAuthFlow);}catch(_0x4ee67e){throw new Error(_0x5823d3(0xf5)+(_0x4ee67e instanceof Error?_0x4ee67e[_0x5823d3(0x114)]:_0x4ee67e));}const _0x286d37=await _0x18370a['jDAqS'](getCurrentUser,_0x17a15b);if(!_0x286d37[_0x5823d3(0xf8)])throw new Error(_0x5823d3(0xde)+_0x286d37['error']);return console[_0x5823d3(0xca)](_0x5823d3(0x110)+_0x286d37['user']['organizationName']),{'token':_0x17a15b,'method':_0x5823d3(0x12b)};}console[_0x5823d3(0xca)](_0x18370a[_0x5823d3(0xd9)]);const _0x87fba6=await _0x18370a[_0x5823d3(0xcd)](getCurrentUser,_0x17a15b);if(!_0x87fba6[_0x5823d3(0xf8)]){if(_0x87fba6['status'])throw new Error(_0x5823d3(0xf5)+_0x87fba6[_0x5823d3(0xc9)]+_0x5823d3(0xec));else throw new Error(_0x5823d3(0xf6)+_0x87fba6[_0x5823d3(0xc9)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console['log'](_0x5823d3(0x110)+_0x87fba6[_0x5823d3(0xcb)]['organizationName']),await storeToken(_0x17a15b),console['log'](process['env']['GITHUB_ENV']?'✓\x20Exported\x20credentials\x20for\x20CI':_0x5823d3(0x113)),{'token':_0x17a15b,'method':_0x18370a['UYMMs']};}export async function ensureRangerDir(_0x2e41ec){const _0x3e421b=_0x335357,_0x46a0cb={'jnNGu':function(_0x555d43){return _0x555d43();},'sScMU':function(_0x453080,_0x93d366){return _0x453080(_0x93d366);},'bLWCg':function(_0x31bb94,_0x2be370,_0x3f2c55){return _0x31bb94(_0x2be370,_0x3f2c55);},'Ftthw':_0x3e421b(0x11a)};void _0x2e41ec;const _0x48a544=_0x46a0cb['jnNGu'](getRangerHomeDir);return!_0x46a0cb['sScMU'](existsSync,_0x48a544)?(await _0x46a0cb['bLWCg'](mkdir,_0x48a544,{'recursive':!![]}),console[_0x3e421b(0xca)](_0x46a0cb[_0x3e421b(0xf2)]),{'path':_0x48a544,'installed':!![]}):(console[_0x3e421b(0xca)](_0x3e421b(0x10b)),{'path':_0x48a544,'installed':![]});}export async function ensureChromium(_0x181310=![]){const _0x33108c=_0x335357,_0x19cabf={'avdCs':function(_0x1fa150){return _0x1fa150();},'SxBpS':_0x33108c(0x11f),'zqDYA':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','RhkhC':function(_0x500f62,_0x2ec389){return _0x500f62 instanceof _0x2ec389;}};let _0x25f366=![];try{const _0x54e5fc=chromium['executablePath']();_0x25f366=existsSync(_0x54e5fc);}catch{_0x25f366=![];}if(_0x25f366)return console['log'](_0x33108c(0xd8)),![];const _0x3d9542=_0x19cabf['avdCs'](getPlaywrightVersion),_0x44bf34=_0x3d9542??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x1f9084=!_0x3d9542,_0xc89bea=process[_0x33108c(0xeb)][_0x33108c(0x10a)]&&process['stdout'][_0x33108c(0x10a)];let _0x5b9a51=!![];if(_0xc89bea){const {install:_0x3170ec}=await _0x263c17[_0x33108c(0xe6)]([{'type':_0x33108c(0x109),'name':_0x19cabf['SxBpS'],'message':_0x1f9084?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x44bf34+'\x20now?':'The\x20required\x20version\x20('+_0x44bf34+_0x33108c(0xc7),'default':!![]}]);_0x5b9a51=_0x3170ec;}else console[_0x33108c(0xca)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x44bf34+(_0x1f9084?_0x33108c(0xfd):'')+_0x33108c(0x116));if(_0x5b9a51){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x44bf34,_0x181310),console[_0x33108c(0xca)](_0x33108c(0x106));}catch(_0x3f1cda){console['error'](_0x19cabf['zqDYA'],_0x19cabf[_0x33108c(0xc8)](_0x3f1cda,Error)?_0x3f1cda['message']:_0x3f1cda),console[_0x33108c(0xca)](_0x33108c(0x100)),console['log']('\x20\x20npx\x20playwright@'+_0x44bf34+_0x33108c(0x117));}}else console['log'](_0x33108c(0x11b)),console['log']('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),console['log']('\x20\x20npx\x20playwright@'+_0x44bf34+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x264eeb){const _0x44369b=_0x335357,_0x46a8da={'MnHbv':_0x44369b(0xce)},_0x4c06be=join(_0x264eeb,_0x46a8da['MnHbv']),_0x283b8f=_0x44369b(0x12d);await writeFile(_0x4c06be,_0x283b8f),console['log'](_0x44369b(0x12e));}export async function ensureLocalEnv(_0x2e6e03,_0x46d1c2){const _0x573af4=_0x335357,_0x3c451b={'CZome':function(_0x10b989){return _0x10b989();},'WXIyC':'user','yTOqt':function(_0x2c9d04,_0x1b8d2d){return _0x2c9d04===_0x1b8d2d;},'NXXLR':function(_0x382b25,_0x2f8b3f,_0x3d74a2){return _0x382b25(_0x2f8b3f,_0x3d74a2);},'TMmPu':'local','gCdCR':function(_0x177b96,_0x10cb7c,_0x346390,_0x52b9e4){return _0x177b96(_0x10cb7c,_0x346390,_0x52b9e4);}};if(!_0x3c451b[_0x573af4(0x101)](findGitRoot)&&_0x2e6e03?.['scope']!==_0x3c451b['WXIyC'])return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.'),{'ready':![],'skipped':!![]};const _0x5991a1=_0x3c451b['yTOqt'](_0x2e6e03?.[_0x573af4(0xe8)],_0x573af4(0xcb))?_0x3c451b['CZome'](getRangerHomeDir):undefined;if(_0x3c451b['NXXLR'](findExistingEnv,_0x3c451b[_0x573af4(0xf9)],{'locations':['local'],'rangerDir':_0x5991a1}))return console[_0x573af4(0xca)]('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};try{return await _0x3c451b['gCdCR'](addEnv,_0x3c451b[_0x573af4(0xf9)],{'url':_0x2e6e03?.['url'],'force':_0x2e6e03?.['force'],'allowInsecureLocalhost':_0x2e6e03?.['allowInsecureLocalhost'],'scope':_0x2e6e03?.['scope']},_0x46d1c2),{'ready':!![],'skipped':![]};}catch(_0x54e0af){return console[_0x573af4(0xc9)]('\x0a❌\x20Profile\x20setup\x20failed:',_0x54e0af instanceof Error?_0x54e0af['message']:_0x54e0af),{'ready':![],'skipped':![]};}}export async function start(_0x21c747,_0x5d1767,_0x2448fc){const _0x361129=_0x335357,_0x1354b8={'EjiPS':'\x0a🚀\x20Ranger\x20Setup\x0a','LYPcT':function(_0x212079,_0x2d795b){return _0x212079!==_0x2d795b;},'NyLXg':_0x361129(0xcb),'MBxsi':function(_0x37f04f,_0x3cca7e){return _0x37f04f+_0x3cca7e;},'vugyK':function(_0x5038a1,_0x2015b4){return _0x5038a1+_0x2015b4;},'xHZPk':function(_0x196e3d,_0x89d7f6){return _0x196e3d(_0x89d7f6);},'PUWBk':_0x361129(0x12a),'PAbNi':'auth','BhSEQ':_0x361129(0xe1),'FBTlH':'chromium','ypxKs':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','BnYPI':'plugin','ONDen':function(_0x5a4997,_0x22f085){return _0x5a4997(_0x22f085);},'VmyNG':function(_0x2f0cd0){return _0x2f0cd0();},'ShPfu':'opencode','pzXnG':'skills','dAUHH':_0x361129(0xfa),'mvCIc':_0x361129(0x11c),'EArQt':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','xkzwF':function(_0x3e1238,_0x1c96b2){return _0x3e1238+_0x1c96b2;}};console['log'](_0x1354b8[_0x361129(0x105)]);_0x1354b8[_0x361129(0x11e)](_0x5d1767?.[_0x361129(0xe8)],undefined)&&_0x5d1767['scope']!==_0x1354b8['NyLXg']&&(console['error'](_0x1354b8[_0x361129(0x108)](_0x1354b8['vugyK']('ranger\x20setup\x20--scope='+_0x1354b8['xHZPk'](String,_0x5d1767[_0x361129(0xe8)])+'\x20is\x20no\x20longer\x20supported.\x20','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20'),'project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.')),process[_0x361129(0xe4)](0x1));_0x5d1767={..._0x5d1767,'scope':_0x361129(0xcb)};const _0x44115b=!_0x1354b8[_0x361129(0xd5)](existsSync,getRangerHomeDir());await ensureRangerDir(_0x1354b8['NyLXg']);if(_0x5d1767?.['skipAuth'])console[_0x361129(0xca)](_0x1354b8[_0x361129(0x10e)]),_0x2448fc?.[_0x361129(0x131)](_0x1354b8['PAbNi'],{'isFirstRun':_0x44115b,'method':'skipped'});else{_0x2448fc?.[_0x361129(0x132)]('auth');const _0x545b70=await _0x1354b8[_0x361129(0xd5)](authenticate,_0x21c747);_0x2448fc?.[_0x361129(0x131)](_0x1354b8[_0x361129(0xf0)],{'isFirstRun':_0x44115b,'method':_0x545b70[_0x361129(0xfe)]});}_0x2448fc?.[_0x361129(0x132)](_0x361129(0xda));_0x5d1767?.['skipChromium']?console[_0x361129(0xca)](_0x1354b8['BhSEQ']):await ensureChromium(_0x5d1767?.['withDeps']);_0x2448fc?.['trackPhaseEnd'](_0x1354b8['FBTlH'],{'isFirstRun':_0x44115b,'skipped':!!_0x5d1767?.['skipChromium']}),console['log'](_0x1354b8[_0x361129(0x10c)]);const _0x73cf47=_0x5d1767?.['scope'],_0x2d406e=_0x5d1767?.[_0x361129(0xc6)]??![];let _0x505602=null;_0x2d406e?(_0x2448fc?.[_0x361129(0x132)]('plugin'),_0x505602=await ensureOpencodePluginConfig(_0x73cf47),_0x2448fc?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x44115b,'opencode':!![]})):(_0x2448fc?.['trackPhaseStart'](_0x1354b8[_0x361129(0xfb)]),await _0x1354b8['ONDen'](ensureClaudePlugin,_0x73cf47),_0x2448fc?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x44115b}));if(_0x2d406e&&_0x505602){_0x2448fc?.[_0x361129(0x132)](_0x361129(0xd7));try{await installSkill(_0x361129(0x104),{'level':_0x505602['scope'],'cliVersion':_0x1354b8[_0x361129(0xe5)](getCurrentVersion),'platform':_0x1354b8[_0x361129(0x128)]}),_0x2448fc?.['trackPhaseEnd'](_0x1354b8[_0x361129(0x122)],{'isFirstRun':_0x44115b,'opencode':!![]});}catch(_0x17034f){console['warn'](_0x361129(0xf4),_0x17034f instanceof Error?_0x17034f['message']:_0x17034f),_0x2448fc?.['trackPhaseEnd'](_0x361129(0xd7),{'isFirstRun':_0x44115b,'opencode':!![],'failed':!![]});}}else _0x2448fc?.[_0x361129(0x132)](_0x1354b8[_0x361129(0x122)]),await _0x1354b8['ONDen'](ensureClaudeSkills,_0x73cf47),_0x2448fc?.[_0x361129(0x131)](_0x1354b8[_0x361129(0x122)],{'isFirstRun':_0x44115b});if(_0x5d1767?.['skipAuth'])console['log'](_0x1354b8[_0x361129(0xd1)]);else{if(_0x5d1767?.[_0x361129(0x127)]){_0x2448fc?.[_0x361129(0x132)](_0x361129(0x11c));const _0x146f90=await ensureLocalEnv({'url':_0x5d1767['url'],'force':_0x5d1767?.[_0x361129(0xed)],'allowInsecureLocalhost':_0x5d1767?.['allowInsecureLocalhost'],'scope':_0x1354b8[_0x361129(0x130)]},_0x2448fc);_0x2448fc?.['trackPhaseEnd'](_0x1354b8[_0x361129(0x10f)],{'isFirstRun':_0x44115b,'profileReady':_0x146f90[_0x361129(0xee)],'userSkipped':_0x146f90['skipped']});}else console[_0x361129(0xca)](_0x1354b8[_0x361129(0x108)](_0x361129(0x118)+('\x0a\x20\x20'+bold(_0x361129(0x120))),_0x361129(0xff))+_0x361129(0xd0)+_0x361129(0x123));}if(_0x2d406e)console['log']('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console['log'](_0x361129(0x111)),console[_0x361129(0xca)](_0x1354b8[_0x361129(0xdc)]),console[_0x361129(0xca)]('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0xbb8e69=_0x1354b8['xHZPk'](bold,_0x361129(0xcc));console['log'](_0x1354b8['MBxsi'](_0x1354b8[_0x361129(0x121)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0xbb8e69+'\x20and\x20prompt\x20the\x20coding','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'),_0x361129(0xe9))+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
@@ -1 +1 @@
1
- const _0x20f506=_0x243f;(function(_0x3de954,_0x2d4333){const _0xae7b41=_0x243f,_0x53b498=_0x3de954();while(!![]){try{const _0x3791fb=-parseInt(_0xae7b41(0x1db))/0x1+parseInt(_0xae7b41(0x1e5))/0x2*(-parseInt(_0xae7b41(0x222))/0x3)+parseInt(_0xae7b41(0x200))/0x4+-parseInt(_0xae7b41(0x215))/0x5+-parseInt(_0xae7b41(0x1ed))/0x6*(parseInt(_0xae7b41(0x1ee))/0x7)+-parseInt(_0xae7b41(0x1cd))/0x8+-parseInt(_0xae7b41(0x220))/0x9*(-parseInt(_0xae7b41(0x22b))/0xa);if(_0x3791fb===_0x2d4333)break;else _0x53b498['push'](_0x53b498['shift']());}catch(_0x576fd8){_0x53b498['push'](_0x53b498['shift']());}}}(_0x92c9,0xd680e));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';function _0x92c9(){const _0x523b1f=['lrdEK','name','\x0a---\x20Profiles\x20---','details','FJTUQ','log','OoHUE','path','disabled','qTpVJ','putkK','\x20\x20Run:\x20ranger\x20setup\x20[token]','\x20\x20\x20\x20','No\x20skills\x20installed','string','length','plugin','DpEON','match','data','4499075ycbbkV','env','(not\x20found)','BKqqI','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','hasEncryptedAuth','oeuuq','Xhzft','SJgrr','\x0a\x20\x20No\x20active\x20profile\x20set','\x20plugin(s)\x20configured','38817FITFCO','\x20(up\x20to\x20date)','132tQknvU','version','scope','\x0a📊\x20Ranger\x20Status\x0a','opencode-plugin','\x20\x20\x20\x20Settings:\x20','JpnYj','Organization:\x20','DEBUG','13730JJduUW','configured','some','8592192EQadAG','displayName','config','API\x20Token:\x20✗\x20Not\x20found','includes','trim','LiBND','IfEgm','\x20(active)','AlUoU','@ranger-testing/opencode-plugin','\x20\x20Not\x20installed','parse','\x20\x20Not\x20configured','602960gvXvht','user','Root:\x20','nTtdb','\x0a---\x20OpenCode\x20Plugin\x20---','gBXHb','stderr','settingsPath',':\x20configured','opencode','53282lZqzky','Version:\x20','FCmyP','none','not_configured','status','isDirectory','API\x20URL:\x20','12WCOwPF','4867163KgkjFG','\x1b]8;;file://','ZwUhu','jKKue','toString','pipe','PIcsr','encrypted','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','ranger@trailhead','oVFzE','push','SvWTE','enabled','plaintext','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','\x1b]8;;\x07','cwd','385912AeZzQz'];_0x92c9=function(){return _0x523b1f;};return _0x92c9();}import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';function _0x243f(_0x559f26,_0x219bd1){_0x559f26=_0x559f26-0x1cc;const _0x92c9a3=_0x92c9();let _0x243f84=_0x92c9a3[_0x559f26];return _0x243f84;}const bold=_0x543e6c=>'\x1b[1m'+_0x543e6c+'\x1b[0m',link=(_0x451ddf,_0x183f08)=>_0x20f506(0x1ef)+_0x451ddf+'\x07'+(_0x183f08||_0x451ddf)+_0x20f506(0x1fe);async function getOpencodePluginStatus(){const _0xbce8e8=_0x20f506,_0x471dc6={'CqyTZ':_0xbce8e8(0x226),'QsAxR':function(_0x7f04d7,_0x2b9afa){return _0x7f04d7>_0x2b9afa;},'sdXOc':'debug','PIcsr':_0xbce8e8(0x214)};return new Promise(_0x2151c9=>{const _0x2dd75a=_0xbce8e8,_0x4971f7={'ZwUhu':_0x2dd75a(0x20f),'LiBND':_0x471dc6['CqyTZ'],'sNibO':function(_0x163402,_0x41d8d7){return _0x471dc6['QsAxR'](_0x163402,_0x41d8d7);}},_0x92e6e0=spawn(_0x2dd75a(0x1e4),[_0x471dc6['sdXOc'],_0x2dd75a(0x1cf)],{'stdio':['ignore',_0x2dd75a(0x1f3),'pipe']});let _0x3c5e63='';_0x92e6e0['stdout']?.['on'](_0x471dc6[_0x2dd75a(0x1f4)],_0x4506fb=>{_0x3c5e63+=_0x4506fb['toString']();}),_0x92e6e0[_0x2dd75a(0x1e1)]?.['on'](_0x471dc6['PIcsr'],_0x116057=>{const _0x40e2ad=_0x2dd75a;_0x3c5e63+=_0x116057[_0x40e2ad(0x1f2)]();}),_0x92e6e0['on']('error',()=>{_0x2151c9({'status':'not_installed'});}),_0x92e6e0['on']('close',_0x35192f=>{const _0x2b933f=_0x2dd75a;if(_0x35192f!==0x0){_0x2151c9({'status':'not_installed'});return;}const _0x985bc3=_0x3c5e63['trim']();let _0x200df5=null;if(_0x985bc3)try{_0x200df5=JSON[_0x2b933f(0x1d9)](_0x985bc3);}catch{const _0x2a2f3b=_0x985bc3[_0x2b933f(0x213)](/\{[\s\S]*\}$/);if(_0x2a2f3b)try{_0x200df5=JSON['parse'](_0x2a2f3b[0x0]);}catch{_0x200df5=null;}}const _0x4650a0=Array['isArray'](_0x200df5?.['plugin'])?_0x200df5?.[_0x2b933f(0x211)]:[],_0x564252=_0x4650a0[_0x2b933f(0x1cc)](_0x1217fe=>{const _0x1de103=_0x2b933f;if(typeof _0x1217fe!==_0x4971f7[_0x1de103(0x1f0)])return![];return _0x1217fe[_0x1de103(0x1d1)](_0x1de103(0x1d7))||_0x1217fe[_0x1de103(0x1d1)](_0x4971f7[_0x1de103(0x1d3)]);});if(_0x564252){_0x2151c9({'status':'configured','details':_0x4650a0['length']>0x0?_0x4650a0[_0x2b933f(0x210)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0x4971f7['sNibO'](_0x4650a0['length'],0x0)){_0x2151c9({'status':_0x2b933f(0x1e9),'details':_0x4650a0[_0x2b933f(0x210)]+_0x2b933f(0x21f)});return;}_0x2151c9({'status':'not_configured'});});});}async function getSkillsFromDir(_0x391727,_0x523dd4){const _0x142d63=_0x20f506,_0x562dfe={'nTtdb':function(_0x3d0753,_0x96a4c0){return _0x3d0753(_0x96a4c0);},'ACmOa':'SKILL.md','AlUoU':function(_0x14826c,_0x436be8,_0x518031){return _0x14826c(_0x436be8,_0x518031);},'IfEgm':'utf-8'};if(!_0x562dfe[_0x142d63(0x1de)](existsSync,_0x391727))return[];const _0x132f37=[];try{const _0x188b5d=await readdir(_0x391727,{'withFileTypes':!![]});for(const _0x134d67 of _0x188b5d){if(_0x134d67[_0x142d63(0x1eb)]()){const _0x485090=join(_0x391727,_0x134d67['name'],_0x562dfe['ACmOa']);if(existsSync(_0x485090)){let _0x64c8c7=_0x134d67['name'];try{const _0x31c7bd=await _0x562dfe[_0x142d63(0x1d6)](readFile,_0x485090,_0x562dfe[_0x142d63(0x1d4)]),_0x49d80b=_0x31c7bd[_0x142d63(0x213)](/name:\s*(.+)/);_0x49d80b&&(_0x64c8c7=_0x49d80b[0x1][_0x142d63(0x1d2)]());}catch{}_0x132f37[_0x142d63(0x1f9)]({'name':_0x134d67['name'],'displayName':_0x64c8c7,'path':_0x485090,'level':_0x523dd4});}}}}catch{return[];}return _0x132f37;}async function getInstalledSkills(){const [_0x5a17ed,_0x45a629]=await Promise['all']([getSkillsFromDir(getProjectSkillsDir(),'project'),getSkillsFromDir(getUserSkillsDir(),'user')]);return{'project':_0x5a17ed,'user':_0x45a629};}async function getEnvironments(){const _0x221ac1=_0x20f506,_0x418eb4={'BKqqI':function(_0x248bde,_0x4a6749){return _0x248bde(_0x4a6749);},'DnSdB':function(_0x46f68e,_0x221e89,_0x29d749){return _0x46f68e(_0x221e89,_0x29d749);},'oeuuq':'auth.json','JpnYj':function(_0x310e68,_0x263aef,_0x287046){return _0x310e68(_0x263aef,_0x287046);},'SJgrr':'(not\x20found)','gBXHb':function(_0x51c603,_0x2d2317){return _0x51c603(_0x2d2317);},'Xhzft':function(_0x4e032b,_0x4ced0f){return _0x4e032b===_0x4ced0f;}},{envNames:_0x3413fa,activeEnv:_0x53bd72}=await getEnvNames(),_0x1f8be9=getRangerDir();if(!_0x418eb4[_0x221ac1(0x218)](existsSync,_0x1f8be9))return{'envs':[],'activeEnv':null};const _0xc00d16=_0x3413fa['map'](_0xf3cb53=>{const _0x24e547=_0x221ac1,_0x4825ba=_0x418eb4[_0x24e547(0x218)](getEnvDir,_0xf3cb53),_0x56f0e0=_0x418eb4['DnSdB'](join,_0x4825ba,'settings.json'),_0x23194f=join(_0x4825ba,_0x418eb4[_0x24e547(0x21b)]),_0x3682fa=_0x418eb4[_0x24e547(0x228)](join,_0x4825ba,'auth.json.enc');return{'name':_0xf3cb53,'settingsPath':existsSync(_0x56f0e0)?_0x56f0e0:_0x418eb4[_0x24e547(0x21d)],'hasPlaintextAuth':_0x418eb4[_0x24e547(0x1e0)](existsSync,_0x23194f),'hasEncryptedAuth':_0x418eb4['BKqqI'](existsSync,_0x3682fa),'isActive':_0x418eb4[_0x24e547(0x21c)](_0xf3cb53,_0x53bd72)};});return{'envs':_0xc00d16,'activeEnv':_0x53bd72};}export async function status(){const _0xc6c7f9=_0x20f506,_0x3ef07f={'MgMBF':function(_0x56143c){return _0x56143c();},'FCmyP':function(_0x2aee5e,_0x2d5c67){return _0x2aee5e(_0x2d5c67);},'jKKue':function(_0x175dfe,_0x12e0fb){return _0x175dfe(_0x12e0fb);},'fesZd':function(_0x101139){return _0x101139();},'dYDpw':function(_0x5452fd,_0x53a633){return _0x5452fd!==_0x53a633;},'TEykG':function(_0x16550d){return _0x16550d();},'feglv':_0xc6c7f9(0x22c),'OoHUE':_0xc6c7f9(0x1da),'oVFzE':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','lrdEK':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','bwENK':function(_0xaba7d,_0x5dbeda){return _0xaba7d(_0x5dbeda);},'SvWTE':'unknown','qTpVJ':'enabled','FJTUQ':'\x0a---\x20Skills\x20---','Pwxou':'\x20\x20Project-level:','Plxso':function(_0x430bb6,_0x187d44){return _0x430bb6>_0x187d44;},'dIBtY':'\x20\x20User-level:','PNJdf':function(_0x3186d2){return _0x3186d2();},'fNhHW':function(_0x5eb3a6,_0x367978){return _0x5eb3a6===_0x367978;},'putkK':'No\x20profiles\x20configured','DpEON':_0xc6c7f9(0x1d5),'HgSmp':function(_0x5e7cb4,_0x391bc8,_0x502afa){return _0x5e7cb4(_0x391bc8,_0x502afa);}};console['log'](_0xc6c7f9(0x225));const _0x23caa8=process[_0xc6c7f9(0x1ff)](),_0x269c04=_0x3ef07f['MgMBF'](getRangerDir);if(!existsSync(_0x269c04)){console['log'](_0xc6c7f9(0x1dd)+link(_0x23caa8,_0x3ef07f[_0xc6c7f9(0x1e7)](bold,_0x3ef07f['FCmyP'](basename,_0x23caa8)))),console[_0xc6c7f9(0x206)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log']('Root:\x20'+link(_0x23caa8,bold(_0x3ef07f[_0xc6c7f9(0x1f1)](basename,_0x23caa8))));const _0x4ab9d7=_0x3ef07f['fesZd'](getCurrentVersion),_0x517c74=_0x3ef07f['fesZd'](getLatestVersion);if(_0x517c74['version']&&_0x3ef07f['dYDpw'](_0x517c74[_0xc6c7f9(0x223)],_0x4ab9d7))console[_0xc6c7f9(0x206)](_0xc6c7f9(0x1e6)+_0x4ab9d7+'\x20(latest:\x20'+_0x517c74['version']+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x517c74[_0xc6c7f9(0x223)]?console['log']('Version:\x20'+_0x4ab9d7+_0xc6c7f9(0x221)):console[_0xc6c7f9(0x206)]('Version:\x20'+_0x4ab9d7);const _0xe9d349=await getToken();if(_0xe9d349){const _0x4e724c=await getCurrentUser(_0xe9d349);_0x4e724c['success']?console['log'](_0xc6c7f9(0x229)+bold(_0x4e724c[_0xc6c7f9(0x1dc)]['organizationName'])):(console['log'](_0xc6c7f9(0x1fd)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0xc6c7f9(0x206)](_0xc6c7f9(0x1d0)),console['log'](_0xc6c7f9(0x20c));process[_0xc6c7f9(0x216)][_0xc6c7f9(0x22a)]&&(console[_0xc6c7f9(0x206)]('API\x20Environment:\x20'+_0x3ef07f['TEykG'](getCurrentEnvironment)),console['log'](_0xc6c7f9(0x1ec)+getApiBaseUrl()));console['log'](_0xc6c7f9(0x1df));const _0x9d722c=await getOpencodePluginStatus();if(_0x9d722c[_0xc6c7f9(0x1ea)]===_0x3ef07f['feglv'])console['log']('\x20\x20'+_0x3ef07f['jKKue'](bold,_0xc6c7f9(0x1d7))+_0xc6c7f9(0x1e3)),_0x9d722c['details']&&console['log']('\x20\x20'+_0x9d722c[_0xc6c7f9(0x204)]);else _0x9d722c['status']==='not_configured'?(console['log'](_0x3ef07f[_0xc6c7f9(0x207)]),_0x9d722c[_0xc6c7f9(0x204)]&&console[_0xc6c7f9(0x206)]('\x20\x20'+_0x9d722c[_0xc6c7f9(0x204)]),console['log'](_0x3ef07f[_0xc6c7f9(0x1f8)])):console['log'](_0x3ef07f[_0xc6c7f9(0x201)]);console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0xebbdaf=await _0x3ef07f['bwENK'](getPluginInfo,_0xc6c7f9(0x1f7));if(_0xebbdaf){const _0x49f7e2=_0xebbdaf[_0xc6c7f9(0x224)]||_0x3ef07f[_0xc6c7f9(0x1fa)],_0x1eaccf=_0xebbdaf[_0xc6c7f9(0x1fb)]?_0x3ef07f[_0xc6c7f9(0x20a)]:_0xc6c7f9(0x209);console[_0xc6c7f9(0x206)]('\x20\x20'+bold(_0xc6c7f9(0x1f7))+':\x20installed\x20('+_0x49f7e2+',\x20'+_0x1eaccf+')');}else console[_0xc6c7f9(0x206)](_0xc6c7f9(0x1d8)),console[_0xc6c7f9(0x206)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console['log'](_0x3ef07f[_0xc6c7f9(0x205)]);const {project:_0x2ca7ad,user:_0x1cb9f8}=await getInstalledSkills(),_0x1abecc=_0x2ca7ad['filter'](_0x5aa7c9=>RANGER_MANAGED_SKILLS['includes'](_0x5aa7c9['name'])),_0x2c0ae1=_0x1cb9f8['filter'](_0x994357=>RANGER_MANAGED_SKILLS[_0xc6c7f9(0x1d1)](_0x994357['name'])),_0x3a8729=_0x1abecc[_0xc6c7f9(0x210)]+_0x2c0ae1[_0xc6c7f9(0x210)];if(_0x3a8729===0x0)console[_0xc6c7f9(0x206)](_0xc6c7f9(0x20e)),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x1abecc['length']>0x0){console[_0xc6c7f9(0x206)](_0x3ef07f['Pwxou']);for(const _0x2dd6f0 of _0x1abecc){console['log'](_0xc6c7f9(0x20d)+bold(_0x2dd6f0[_0xc6c7f9(0x1ce)])+':\x20'+link(_0x2dd6f0['path'],basename(_0x2dd6f0[_0xc6c7f9(0x208)])));}}if(_0x3ef07f['Plxso'](_0x2c0ae1[_0xc6c7f9(0x210)],0x0)){console[_0xc6c7f9(0x206)](_0x3ef07f['dIBtY']);for(const _0x216f49 of _0x2c0ae1){console[_0xc6c7f9(0x206)]('\x20\x20\x20\x20'+bold(_0x216f49['displayName'])+':\x20'+link(_0x216f49['path'],_0x3ef07f['FCmyP'](basename,_0x216f49[_0xc6c7f9(0x208)])));}}}console['log'](_0xc6c7f9(0x203));const {envs:_0x49e765,activeEnv:_0x58697a}=await _0x3ef07f['PNJdf'](getEnvironments);if(_0x3ef07f['fNhHW'](_0x49e765[_0xc6c7f9(0x210)],0x0))console[_0xc6c7f9(0x206)](_0x3ef07f[_0xc6c7f9(0x20b)]),console['log'](_0xc6c7f9(0x1f6));else{for(const _0x5b9ffc of _0x49e765){const _0x376ce7=_0x5b9ffc['isActive']?_0x3ef07f[_0xc6c7f9(0x212)]:'',_0x12e619=_0x5b9ffc[_0xc6c7f9(0x21a)]?_0xc6c7f9(0x1f5):_0x5b9ffc['hasPlaintextAuth']?_0xc6c7f9(0x1fc):_0xc6c7f9(0x1e8);console['log']('\x20\x20'+bold(_0x5b9ffc['name'])+_0x376ce7),console[_0xc6c7f9(0x206)]('\x20\x20\x20\x20Auth:\x20'+_0x12e619),_0x5b9ffc['settingsPath']!==_0xc6c7f9(0x217)&&console[_0xc6c7f9(0x206)](_0xc6c7f9(0x227)+_0x3ef07f['HgSmp'](link,_0x5b9ffc[_0xc6c7f9(0x1e2)],_0x3ef07f['bwENK'](basename,_0x5b9ffc['settingsPath'])));}!_0x58697a&&(console[_0xc6c7f9(0x206)](_0xc6c7f9(0x21e)),console[_0xc6c7f9(0x206)](_0xc6c7f9(0x219)+_0x49e765['map'](_0x3c7d10=>_0x3c7d10[_0xc6c7f9(0x202)])['join'](',\x20')+')'));}console['log']('');}
1
+ const _0x54e6da=_0x5617;(function(_0x48dd79,_0x36d183){const _0x2f33d9=_0x5617,_0x136228=_0x48dd79();while(!![]){try{const _0xcbb314=-parseInt(_0x2f33d9(0x151))/0x1+parseInt(_0x2f33d9(0x108))/0x2+parseInt(_0x2f33d9(0x124))/0x3+-parseInt(_0x2f33d9(0x117))/0x4+parseInt(_0x2f33d9(0xe9))/0x5*(parseInt(_0x2f33d9(0x12e))/0x6)+parseInt(_0x2f33d9(0xf2))/0x7+-parseInt(_0x2f33d9(0x13b))/0x8;if(_0xcbb314===_0x36d183)break;else _0x136228['push'](_0x136228['shift']());}catch(_0x43392f){_0x136228['push'](_0x136228['shift']());}}}(_0x3125,0x5f6d5));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';function _0x3125(){const _0xe8d136=['isArray','RGtwW','nfuIv','No\x20skills\x20installed','PIxUQ','parse','debug','string','data','Root:\x20','AyLwy','Organization:\x20','eefhw','rTAJD','BPEzk','project','928894gLNgYk','RVtEn','includes','BwMUl','\x20(active)','API\x20Token:\x20✗\x20Not\x20found','UJygZ','SKILL.md','caGkf','qhyVa','jnCgK','toString','close','\x20\x20\x20\x20Auth:\x20','vnAjg','1275392lAjmhj','displayName','config','configured','user','\x0a---\x20Skills\x20---','vLpeL','DDimY','unknown','name','hFxRv','auth.json','disabled','2142567OEBFPZ','success','\x0a\x20\x20No\x20active\x20profile\x20set','VHguf','trim','\x1b[0m','\x20\x20Not\x20configured','status','map',':\x20installed\x20(','2494938fURJzB','match','IKuzq','\x20\x20Run:\x20ranger\x20update','not_installed','\x20\x20Project-level:','enabled','aZWfQ','encrypted','MMhYt','(not\x20found)','nuRyp','\x1b]8;;\x07','10181000cDLCWS','hasEncryptedAuth','GBhMf','\x20\x20Run:\x20ranger\x20setup\x20--opencode','\x20\x20\x20\x20Settings:\x20','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','aVbhn','VsVdQ','hasPlaintextAuth','\x20\x20Run:\x20ranger\x20setup\x20[token]','length','rMQyB','not_configured','\x0a---\x20OpenCode\x20Plugin\x20---','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','VBSTq','swcBu','version','\x20plugin(s)\x20configured','path','details','log','122dhuWPq','settingsPath','jVHpQ','opencode','\x1b]8;;file://','BxnOd','5upSZJt','ZuKaO','utf-8','RZAyY','filter','lTHok','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','\x1b[1m','API\x20URL:\x20','2716035AuglMF','ranger@trailhead','@ranger-testing/opencode-plugin','mlyXd','VefYm','plugin'];_0x3125=function(){return _0xe8d136;};return _0x3125();}import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';function _0x5617(_0x1c08bd,_0x89240c){_0x1c08bd=_0x1c08bd-0xe7;const _0x312580=_0x3125();let _0x561705=_0x312580[_0x1c08bd];return _0x561705;}import{spawn}from'child_process';const bold=_0x3e9683=>_0x54e6da(0xf0)+_0x3e9683+_0x54e6da(0x129),link=(_0x104932,_0x20d18e)=>_0x54e6da(0xe7)+_0x104932+'\x07'+(_0x20d18e||_0x104932)+_0x54e6da(0x13a);async function getOpencodePluginStatus(){const _0x4b7346=_0x54e6da,_0x4d4001={'iTGNz':function(_0x1b06ec,_0x12b563){return _0x1b06ec(_0x12b563);},'eODSS':_0x4b7346(0xff),'wHUFs':'opencode-plugin','SUgLu':function(_0x166086,_0x4967a0){return _0x166086>_0x4967a0;},'VBSTq':'not_configured','GBhMf':function(_0x5e966e,_0xc7905e){return _0x5e966e(_0xc7905e);},'vLpeL':_0x4b7346(0x154),'RVtEn':_0x4b7346(0xfe),'OHmdY':'pipe','lTHok':_0x4b7346(0x100),'QATbY':'error'};return new Promise(_0x15b178=>{const _0x310299=_0x4b7346,_0x513fc6={'aVbhn':function(_0x465172,_0x45a59){return _0x4d4001['iTGNz'](_0x465172,_0x45a59);},'ZuKaO':'not_installed','IIriA':_0x4d4001['eODSS'],'RWWxq':_0x4d4001['wHUFs'],'AJDhU':_0x310299(0x11a),'XJGKe':function(_0x127e21,_0x3c9590){return _0x4d4001['SUgLu'](_0x127e21,_0x3c9590);},'FFnSh':_0x4d4001[_0x310299(0x14a)],'nfuIv':function(_0x28b67f,_0x1f350){const _0x25f1a4=_0x310299;return _0x4d4001[_0x25f1a4(0x13d)](_0x28b67f,_0x1f350);}},_0x529a0c=spawn(_0x4d4001[_0x310299(0x11d)],[_0x4d4001[_0x310299(0x109)],_0x310299(0x119)],{'stdio':['ignore',_0x4d4001['OHmdY'],'pipe']});let _0xc2739c='';_0x529a0c['stdout']?.['on'](_0x4d4001['lTHok'],_0x2b27d5=>{_0xc2739c+=_0x2b27d5['toString']();}),_0x529a0c['stderr']?.['on'](_0x4d4001[_0x310299(0xee)],_0x502b63=>{const _0x349098=_0x310299;_0xc2739c+=_0x502b63[_0x349098(0x113)]();}),_0x529a0c['on'](_0x4d4001['QATbY'],()=>{const _0x39761d=_0x310299;_0x513fc6[_0x39761d(0x141)](_0x15b178,{'status':_0x513fc6[_0x39761d(0xea)]});}),_0x529a0c['on'](_0x310299(0x114),_0x322d23=>{const _0x4a4792=_0x310299,_0x5cbdfc={'jnCgK':_0x513fc6['IIriA'],'DDimY':_0x513fc6['RWWxq']};if(_0x322d23!==0x0){_0x513fc6[_0x4a4792(0x141)](_0x15b178,{'status':_0x4a4792(0x132)});return;}const _0x1f0771=_0xc2739c[_0x4a4792(0x128)]();let _0x507082=null;if(_0x1f0771)try{_0x507082=JSON[_0x4a4792(0xfd)](_0x1f0771);}catch{const _0x99cb1=_0x1f0771[_0x4a4792(0x12f)](/\{[\s\S]*\}$/);if(_0x99cb1)try{_0x507082=JSON[_0x4a4792(0xfd)](_0x99cb1[0x0]);}catch{_0x507082=null;}}const _0x335df5=Array[_0x4a4792(0xf8)](_0x507082?.[_0x4a4792(0xf7)])?_0x507082?.['plugin']:[],_0x3081d2=_0x335df5['some'](_0x2c8f10=>{const _0x27c57f=_0x4a4792;if(typeof _0x2c8f10!==_0x5cbdfc[_0x27c57f(0x112)])return![];return _0x2c8f10[_0x27c57f(0x10a)](_0x27c57f(0xf4))||_0x2c8f10[_0x27c57f(0x10a)](_0x5cbdfc[_0x27c57f(0x11e)]);});if(_0x3081d2){_0x15b178({'status':_0x513fc6['AJDhU'],'details':_0x335df5['length']>0x0?_0x335df5[_0x4a4792(0x145)]+_0x4a4792(0x14d):undefined});return;}if(_0x513fc6['XJGKe'](_0x335df5['length'],0x0)){_0x15b178({'status':_0x513fc6['FFnSh'],'details':_0x335df5[_0x4a4792(0x145)]+'\x20plugin(s)\x20configured'});return;}_0x513fc6[_0x4a4792(0xfa)](_0x15b178,{'status':_0x513fc6['FFnSh']});});});}async function getSkillsFromDir(_0x50466e,_0x119ddf){const _0x5aad21=_0x54e6da,_0x214450={'UJygZ':function(_0x3bb8a9,_0x510208){return _0x3bb8a9(_0x510208);},'hFxRv':function(_0x3d1205,_0x305850,_0x4bbc08){return _0x3d1205(_0x305850,_0x4bbc08);},'vnAjg':function(_0x38eca3,_0x348b57,_0x194f5c,_0x592816){return _0x38eca3(_0x348b57,_0x194f5c,_0x592816);},'BPEzk':function(_0x4c4cd9,_0x287d43,_0x4cc5ea){return _0x4c4cd9(_0x287d43,_0x4cc5ea);},'IKuzq':_0x5aad21(0xeb)};if(!_0x214450[_0x5aad21(0x10e)](existsSync,_0x50466e))return[];const _0x5a4e9e=[];try{const _0x103c50=await _0x214450[_0x5aad21(0x121)](readdir,_0x50466e,{'withFileTypes':!![]});for(const _0x26fd19 of _0x103c50){if(_0x26fd19['isDirectory']()){const _0x1d6cb4=_0x214450[_0x5aad21(0x116)](join,_0x50466e,_0x26fd19[_0x5aad21(0x120)],_0x5aad21(0x10f));if(_0x214450['UJygZ'](existsSync,_0x1d6cb4)){let _0x320766=_0x26fd19['name'];try{const _0x3b3baa=await _0x214450[_0x5aad21(0x106)](readFile,_0x1d6cb4,_0x214450[_0x5aad21(0x130)]),_0x324014=_0x3b3baa[_0x5aad21(0x12f)](/name:\s*(.+)/);_0x324014&&(_0x320766=_0x324014[0x1][_0x5aad21(0x128)]());}catch{}_0x5a4e9e['push']({'name':_0x26fd19[_0x5aad21(0x120)],'displayName':_0x320766,'path':_0x1d6cb4,'level':_0x119ddf});}}}}catch{return[];}return _0x5a4e9e;}async function getInstalledSkills(){const _0x55b2f3=_0x54e6da,_0x13d3d2={'nuRyp':function(_0x1349a6,_0x4aee4d,_0x397aa8){return _0x1349a6(_0x4aee4d,_0x397aa8);},'rTAJD':function(_0x23d9a8){return _0x23d9a8();},'YbAks':_0x55b2f3(0x107),'tlczR':_0x55b2f3(0x11b)},[_0x418627,_0x2711a0]=await Promise['all']([_0x13d3d2[_0x55b2f3(0x139)](getSkillsFromDir,_0x13d3d2[_0x55b2f3(0x105)](getProjectSkillsDir),_0x13d3d2['YbAks']),getSkillsFromDir(getUserSkillsDir(),_0x13d3d2['tlczR'])]);return{'project':_0x418627,'user':_0x2711a0};}async function getEnvironments(){const _0x45b5e4=_0x54e6da,_0x8af609={'PIxUQ':function(_0x213008,_0x50e45b){return _0x213008(_0x50e45b);},'AAVYA':function(_0x4971a9,_0x21c714,_0x59627c){return _0x4971a9(_0x21c714,_0x59627c);},'Smzdp':'settings.json','mivYE':_0x45b5e4(0x122),'rsOJK':_0x45b5e4(0x138),'aZWfQ':function(_0xd0210b,_0x1d97b8){return _0xd0210b===_0x1d97b8;},'VefYm':function(_0x521bcc){return _0x521bcc();}},{envNames:_0x3568e0,activeEnv:_0x1b0e56}=await _0x8af609[_0x45b5e4(0xf6)](getEnvNames),_0xcbeaca=_0x8af609[_0x45b5e4(0xf6)](getRangerDir);if(!existsSync(_0xcbeaca))return{'envs':[],'activeEnv':null};const _0x39900d=_0x3568e0[_0x45b5e4(0x12c)](_0x2f4663=>{const _0x307bb6=_0x45b5e4,_0x36866e=_0x8af609[_0x307bb6(0xfc)](getEnvDir,_0x2f4663),_0x16b811=_0x8af609['AAVYA'](join,_0x36866e,_0x8af609['Smzdp']),_0x3a7c54=join(_0x36866e,_0x8af609['mivYE']),_0xa11d2b=join(_0x36866e,'auth.json.enc');return{'name':_0x2f4663,'settingsPath':_0x8af609[_0x307bb6(0xfc)](existsSync,_0x16b811)?_0x16b811:_0x8af609['rsOJK'],'hasPlaintextAuth':existsSync(_0x3a7c54),'hasEncryptedAuth':_0x8af609['PIxUQ'](existsSync,_0xa11d2b),'isActive':_0x8af609[_0x307bb6(0x135)](_0x2f4663,_0x1b0e56)};});return{'envs':_0x39900d,'activeEnv':_0x1b0e56};}export async function status(){const _0x2d3bf1=_0x54e6da,_0x5211d6={'swcBu':'\x0a📊\x20Ranger\x20Status\x0a','xrqVk':function(_0x520c0c,_0x43c5bc,_0x254bab){return _0x520c0c(_0x43c5bc,_0x254bab);},'BxnOd':function(_0x48fa86,_0x1e44ee){return _0x48fa86(_0x1e44ee);},'PBvUK':function(_0x4b4e35){return _0x4b4e35();},'LHmKy':function(_0x3d34da){return _0x3d34da();},'VsVdQ':function(_0x37c25f,_0x306d2f){return _0x37c25f(_0x306d2f);},'RRgPa':function(_0x2cc14e){return _0x2cc14e();},'dLqzs':function(_0x205c47,_0x8b0f){return _0x205c47===_0x8b0f;},'KljBP':function(_0x123ed7,_0x52c754){return _0x123ed7===_0x52c754;},'ucWia':_0x2d3bf1(0x12a),'mlyXd':_0x2d3bf1(0x13e),'XBUMA':_0x2d3bf1(0x140),'jVHpQ':function(_0x2b2149,_0x2d5a64){return _0x2b2149(_0x2d5a64);},'PGJmN':_0x2d3bf1(0xf3),'RkPgA':_0x2d3bf1(0x11c),'VHguf':function(_0x38dec8,_0x522a50){return _0x38dec8+_0x522a50;},'AyLwy':function(_0x7b7929,_0x2d6a27){return _0x7b7929===_0x2d6a27;},'qhyVa':function(_0x40a970,_0x63137a){return _0x40a970>_0x63137a;},'LugWx':_0x2d3bf1(0x133),'watLA':function(_0x1662dc,_0x3ce58d){return _0x1662dc>_0x3ce58d;},'BwMUl':'\x20\x20User-level:','HSgYS':function(_0x106b7d,_0x3b5051){return _0x106b7d(_0x3b5051);},'MMhYt':function(_0xd9c244,_0x517787,_0x5916ec){return _0xd9c244(_0x517787,_0x5916ec);},'bDCni':'\x0a---\x20Profiles\x20---','eefhw':function(_0x577da9,_0x2b6a53){return _0x577da9===_0x2b6a53;},'RZAyY':_0x2d3bf1(0x10c),'caGkf':'plaintext','uwZnD':'none','RGtwW':'(not\x20found)','rMQyB':function(_0x204988,_0x13e5e6){return _0x204988(_0x13e5e6);}};console[_0x2d3bf1(0x150)](_0x5211d6[_0x2d3bf1(0x14b)]);const _0x13b826=process['cwd'](),_0x11c653=getRangerDir();if(!existsSync(_0x11c653)){console[_0x2d3bf1(0x150)](_0x2d3bf1(0x101)+_0x5211d6['xrqVk'](link,_0x13b826,_0x5211d6['BxnOd'](bold,basename(_0x13b826)))),console[_0x2d3bf1(0x150)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log'](_0x2d3bf1(0x101)+link(_0x13b826,_0x5211d6['BxnOd'](bold,_0x5211d6['BxnOd'](basename,_0x13b826))));const _0x4bfe2=_0x5211d6['PBvUK'](getCurrentVersion),_0x2d8874=getLatestVersion();if(_0x2d8874['version']&&_0x2d8874[_0x2d3bf1(0x14c)]!==_0x4bfe2)console[_0x2d3bf1(0x150)]('Version:\x20'+_0x4bfe2+'\x20(latest:\x20'+_0x2d8874['version']+')'),console['log'](_0x2d3bf1(0x131));else _0x2d8874['version']?console['log']('Version:\x20'+_0x4bfe2+'\x20(up\x20to\x20date)'):console[_0x2d3bf1(0x150)]('Version:\x20'+_0x4bfe2);const _0x5c4240=await _0x5211d6['LHmKy'](getToken);if(_0x5c4240){const _0x4b8ce6=await _0x5211d6[_0x2d3bf1(0x142)](getCurrentUser,_0x5c4240);_0x4b8ce6[_0x2d3bf1(0x125)]?console['log'](_0x2d3bf1(0x103)+bold(_0x4b8ce6[_0x2d3bf1(0x11b)]['organizationName'])):(console['log'](_0x2d3bf1(0x149)),console['log'](_0x2d3bf1(0x144)));}else console['log'](_0x2d3bf1(0x10d)),console[_0x2d3bf1(0x150)](_0x2d3bf1(0x144));process['env']['DEBUG']&&(console['log']('API\x20Environment:\x20'+getCurrentEnvironment()),console['log'](_0x2d3bf1(0xf1)+getApiBaseUrl()));console[_0x2d3bf1(0x150)](_0x2d3bf1(0x148));const _0x560730=await _0x5211d6['RRgPa'](getOpencodePluginStatus);if(_0x5211d6['dLqzs'](_0x560730[_0x2d3bf1(0x12b)],'configured'))console[_0x2d3bf1(0x150)]('\x20\x20'+bold('@ranger-testing/opencode-plugin')+':\x20configured'),_0x560730['details']&&console[_0x2d3bf1(0x150)]('\x20\x20'+_0x560730['details']);else _0x5211d6['KljBP'](_0x560730['status'],_0x2d3bf1(0x147))?(console[_0x2d3bf1(0x150)](_0x5211d6['ucWia']),_0x560730[_0x2d3bf1(0x14f)]&&console[_0x2d3bf1(0x150)]('\x20\x20'+_0x560730[_0x2d3bf1(0x14f)]),console[_0x2d3bf1(0x150)](_0x5211d6[_0x2d3bf1(0xf5)])):console['log'](_0x5211d6['XBUMA']);console[_0x2d3bf1(0x150)]('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x1af38e=await getPluginInfo('ranger@trailhead');if(_0x1af38e){const _0x35735e=_0x1af38e['scope']||_0x2d3bf1(0x11f),_0x187f6d=_0x1af38e[_0x2d3bf1(0x134)]?'enabled':_0x2d3bf1(0x123);console[_0x2d3bf1(0x150)]('\x20\x20'+_0x5211d6[_0x2d3bf1(0x153)](bold,_0x5211d6['PGJmN'])+_0x2d3bf1(0x12d)+_0x35735e+',\x20'+_0x187f6d+')');}else console[_0x2d3bf1(0x150)]('\x20\x20Not\x20installed'),console['log'](_0x2d3bf1(0xef));console[_0x2d3bf1(0x150)](_0x5211d6['RkPgA']);const {project:_0x3724c6,user:_0x55b7af}=await getInstalledSkills(),_0x12260c=_0x3724c6[_0x2d3bf1(0xed)](_0x33e413=>RANGER_MANAGED_SKILLS[_0x2d3bf1(0x10a)](_0x33e413[_0x2d3bf1(0x120)])),_0x9899b5=_0x55b7af[_0x2d3bf1(0xed)](_0x38c119=>RANGER_MANAGED_SKILLS[_0x2d3bf1(0x10a)](_0x38c119['name'])),_0x5f6a9e=_0x5211d6[_0x2d3bf1(0x127)](_0x12260c[_0x2d3bf1(0x145)],_0x9899b5[_0x2d3bf1(0x145)]);if(_0x5211d6[_0x2d3bf1(0x102)](_0x5f6a9e,0x0))console['log'](_0x2d3bf1(0xfb)),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x5211d6[_0x2d3bf1(0x111)](_0x12260c['length'],0x0)){console['log'](_0x5211d6['LugWx']);for(const _0x34f9cb of _0x12260c){console[_0x2d3bf1(0x150)]('\x20\x20\x20\x20'+_0x5211d6[_0x2d3bf1(0xe8)](bold,_0x34f9cb[_0x2d3bf1(0x118)])+':\x20'+_0x5211d6['xrqVk'](link,_0x34f9cb[_0x2d3bf1(0x14e)],basename(_0x34f9cb['path'])));}}if(_0x5211d6['watLA'](_0x9899b5[_0x2d3bf1(0x145)],0x0)){console[_0x2d3bf1(0x150)](_0x5211d6[_0x2d3bf1(0x10b)]);for(const _0x460494 of _0x9899b5){console['log']('\x20\x20\x20\x20'+_0x5211d6['HSgYS'](bold,_0x460494['displayName'])+':\x20'+_0x5211d6[_0x2d3bf1(0x137)](link,_0x460494['path'],basename(_0x460494['path'])));}}}console['log'](_0x5211d6['bDCni']);const {envs:_0x451385,activeEnv:_0x481076}=await getEnvironments();if(_0x5211d6[_0x2d3bf1(0x104)](_0x451385[_0x2d3bf1(0x145)],0x0))console['log']('No\x20profiles\x20configured'),console[_0x2d3bf1(0x150)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x52f14f of _0x451385){const _0x50146f=_0x52f14f['isActive']?_0x5211d6[_0x2d3bf1(0xec)]:'',_0x13b290=_0x52f14f[_0x2d3bf1(0x13c)]?_0x2d3bf1(0x136):_0x52f14f[_0x2d3bf1(0x143)]?_0x5211d6[_0x2d3bf1(0x110)]:_0x5211d6['uwZnD'];console[_0x2d3bf1(0x150)]('\x20\x20'+bold(_0x52f14f['name'])+_0x50146f),console[_0x2d3bf1(0x150)](_0x2d3bf1(0x115)+_0x13b290),_0x52f14f['settingsPath']!==_0x5211d6[_0x2d3bf1(0xf9)]&&console['log'](_0x2d3bf1(0x13f)+link(_0x52f14f['settingsPath'],_0x5211d6[_0x2d3bf1(0x146)](basename,_0x52f14f[_0x2d3bf1(0x152)])));}!_0x481076&&(console[_0x2d3bf1(0x150)](_0x2d3bf1(0x126)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x451385[_0x2d3bf1(0x12c)](_0x126b9b=>_0x126b9b[_0x2d3bf1(0x120)])['join'](',\x20')+')'));}console[_0x2d3bf1(0x150)]('');}