@ranger-testing/ranger-cli 3.0.1-alpha.d9f4572-27 → 3.0.1-alpha.ebe0997-35

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 (84) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -0
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -0
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/sessionCache.js +1 -1
  71. package/build/commands/utils/settings.js +1 -1
  72. package/build/commands/utils/skillContent.js +1 -1
  73. package/build/commands/utils/skills.js +1 -1
  74. package/build/commands/utils/stitchWebmFiles.js +1 -1
  75. package/build/commands/utils/telemetry.js +1 -1
  76. package/build/commands/utils/tokenRefresh.js +1 -1
  77. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  78. package/build/commands/utils/userApi.js +1 -1
  79. package/build/commands/utils/version.js +1 -1
  80. package/build/commands/verifyFeature.js +1 -1
  81. package/build/commands/verifyFeatureCli.js +1 -1
  82. package/build/commands/verifyFeatureNovaCli.js +1 -1
  83. package/build/commands/verifyFeatureRangerwrightCli.js +1 -0
  84. package/package.json +3 -2
@@ -1 +1 @@
1
- (function(_0x2f0d15,_0x27981e){const _0x2fb3f8=_0x5f55,_0x1e22f2=_0x2f0d15();while(!![]){try{const _0x9ee772=-parseInt(_0x2fb3f8(0x16b))/0x1+-parseInt(_0x2fb3f8(0x163))/0x2*(parseInt(_0x2fb3f8(0x15e))/0x3)+parseInt(_0x2fb3f8(0x170))/0x4*(parseInt(_0x2fb3f8(0x164))/0x5)+parseInt(_0x2fb3f8(0x171))/0x6+-parseInt(_0x2fb3f8(0x167))/0x7+parseInt(_0x2fb3f8(0x16e))/0x8+parseInt(_0x2fb3f8(0x161))/0x9*(parseInt(_0x2fb3f8(0x16c))/0xa);if(_0x9ee772===_0x27981e)break;else _0x1e22f2['push'](_0x1e22f2['shift']());}catch(_0x216742){_0x1e22f2['push'](_0x1e22f2['shift']());}}}(_0x2d15,0x436c5));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x2d15(){const _0x247a67=['587043vYUpru','\x0a✅\x20Logged\x20in\x20to\x20','1756nIOfID','1995kNyfnp','success','MYLkd','383586HeeLSf','\x0a✅\x20API\x20key\x20stored\x20successfully','message','user','539351GtkjXj','10UdPibu','log','1783336AWUGZd','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','5516WuEfaT','1529766xfzqdV','pHnXW','762bSCvEZ','Login\x20failed:\x20','organizationName'];_0x2d15=function(){return _0x247a67;};return _0x2d15();}function _0x5f55(_0x317919,_0x58895f){_0x317919=_0x317919-0x15e;const _0x2d159e=_0x2d15();let _0x5f559e=_0x2d159e[_0x317919];return _0x5f559e;}import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0x58e5ea=_0x5f55,_0x2b0131={'uPOdO':function(_0x41739f){return _0x41739f();},'tDnnD':function(_0x2afad9){return _0x2afad9();},'MYLkd':function(_0xb591d,_0x200e1d){return _0xb591d(_0x200e1d);},'pHnXW':_0x58e5ea(0x168)},_0x3f2403=await getMcpAuthOrigin();if(_0x3f2403){console['log']('Re-authenticating\x20via\x20MCP\x20bootstrap...'),await mcpBootstrap();return;}if(!_0x2b0131['uPOdO'](isInteractive))throw new Error(_0x58e5ea(0x16f));try{const _0xbd6563=await _0x2b0131['tDnnD'](runDeviceAuthFlow),_0x3ba24d=await _0x2b0131[_0x58e5ea(0x166)](getCurrentUser,_0xbd6563);_0x3ba24d[_0x58e5ea(0x165)]?console[_0x58e5ea(0x16d)](_0x58e5ea(0x162)+_0x3ba24d[_0x58e5ea(0x16a)][_0x58e5ea(0x160)]):console[_0x58e5ea(0x16d)](_0x2b0131[_0x58e5ea(0x172)]);}catch(_0xa75ef6){throw new Error(_0x58e5ea(0x15f)+(_0xa75ef6 instanceof Error?_0xa75ef6[_0x58e5ea(0x169)]:_0xa75ef6));}}
1
+ (function(_0xfb5968,_0x3f712e){const _0x30618a=_0x34d6,_0x2ff989=_0xfb5968();while(!![]){try{const _0x5d5e4f=parseInt(_0x30618a(0xcf))/0x1*(-parseInt(_0x30618a(0xc9))/0x2)+parseInt(_0x30618a(0xd0))/0x3*(-parseInt(_0x30618a(0xc1))/0x4)+parseInt(_0x30618a(0xc2))/0x5+-parseInt(_0x30618a(0xc8))/0x6*(-parseInt(_0x30618a(0xc0))/0x7)+parseInt(_0x30618a(0xc7))/0x8*(-parseInt(_0x30618a(0xc5))/0x9)+parseInt(_0x30618a(0xce))/0xa+parseInt(_0x30618a(0xd1))/0xb*(-parseInt(_0x30618a(0xcb))/0xc);if(_0x5d5e4f===_0x3f712e)break;else _0x2ff989['push'](_0x2ff989['shift']());}catch(_0x578d43){_0x2ff989['push'](_0x2ff989['shift']());}}}(_0x2a1a,0x532cf));function _0x2a1a(){const _0x284f5e=['cgwWA','Re-authenticating\x20via\x20MCP\x20bootstrap...','5054800fPCuls','142942rfWhPA','3RRuaBq','11ocJiFs','log','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','22687oTYMQE','1357388ZQozfE','3144000YXGqHp','mNzrt','user','333PYHTGT','Login\x20failed:\x20','11576mHhprD','678hjOqXI','8sQFMCR','organizationName','2342064BgTzSS'];_0x2a1a=function(){return _0x284f5e;};return _0x2a1a();}function _0x34d6(_0x1c0586,_0x3694d2){_0x1c0586=_0x1c0586-0xc0;const _0x2a1a35=_0x2a1a();let _0x34d60c=_0x2a1a35[_0x1c0586];return _0x34d60c;}import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0x4c8c14=_0x34d6,_0x5b7d02={'mNzrt':_0x4c8c14(0xcd),'QWLjC':function(_0x19596f){return _0x19596f();},'cgwWA':_0x4c8c14(0xd3),'mNIUv':function(_0x11e8e9,_0x53685c){return _0x11e8e9(_0x53685c);},'dauyJ':'\x0a✅\x20API\x20key\x20stored\x20successfully'},_0x4c0f91=await getMcpAuthOrigin();if(_0x4c0f91){console['log'](_0x5b7d02[_0x4c8c14(0xc3)]),await _0x5b7d02['QWLjC'](mcpBootstrap);return;}if(!isInteractive())throw new Error(_0x5b7d02[_0x4c8c14(0xcc)]);try{const _0x1df709=await _0x5b7d02['QWLjC'](runDeviceAuthFlow),_0x3254b9=await _0x5b7d02['mNIUv'](getCurrentUser,_0x1df709);_0x3254b9['success']?console[_0x4c8c14(0xd2)]('\x0a✅\x20Logged\x20in\x20to\x20'+_0x3254b9[_0x4c8c14(0xc4)][_0x4c8c14(0xca)]):console['log'](_0x5b7d02['dauyJ']);}catch(_0x387bda){throw new Error(_0x4c8c14(0xc6)+(_0x387bda instanceof Error?_0x387bda['message']:_0x387bda));}}
@@ -1 +1 @@
1
- const _0xd16e64=_0x37e3;(function(_0x1bbf01,_0xf9d92f){const _0x17bc92=_0x37e3,_0x6615c7=_0x1bbf01();while(!![]){try{const _0x368aef=parseInt(_0x17bc92(0x16a))/0x1+parseInt(_0x17bc92(0x12d))/0x2*(-parseInt(_0x17bc92(0x136))/0x3)+parseInt(_0x17bc92(0x131))/0x4*(-parseInt(_0x17bc92(0x126))/0x5)+parseInt(_0x17bc92(0x133))/0x6+-parseInt(_0x17bc92(0xf9))/0x7*(-parseInt(_0x17bc92(0x129))/0x8)+parseInt(_0x17bc92(0x114))/0x9+-parseInt(_0x17bc92(0x125))/0xa;if(_0x368aef===_0xf9d92f)break;else _0x6615c7['push'](_0x6615c7['shift']());}catch(_0x29da56){_0x6615c7['push'](_0x6615c7['shift']());}}}(_0x21af,0x58dff));import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';function _0x21af(){const _0x640595=['none','pLTmd','32NdEIzg','OAuthTimeoutError','vndHr','status','4gDcoXe','Exchanging\x20authorization\x20code...','2031858pNUVhl','base64url','rovJG','64065JFERet','xdg-open','error','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','maBrq','IHdNj','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','resource','sha256','closeAllConnections','writeHead','oLrIt','nzBLK','2.0','owWIV','mIauN','DAtUb','slice','registration_endpoint','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','ZWqux','VxZTC','127.0.0.1','code','get_cli_token\x20failed:\x20','bupnD','HNPlk','auth-origin.txt','FVrVE','Bearer\x20','<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','origin','No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','split','fAtkj','cLltm','tools/call','xocOr','close','http://localhost:','RCmoB','proxied','goGJq','YwZCA','POST','toString','/.well-known/oauth-authorization-server','isError','\x0aUnexpected\x20response\x20structure:','stdout','tAJsD','mcp-oauth-tokens.json','53244dlYYOL','clientId','QCjlX','SChMl','bLPqD','\x0aOpening\x20browser\x20for\x20authentication...','authorization_endpoint','MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','UEcaT','utf-8','set','headers','hfJQF','update','Client\x20registration\x20failed:\x20','get','end','rzjmV','json','/.well-known/oauth-protected-resource','/callback','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','2025-03-26','LEvmp','SCnYb','notifications/initialized','state','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','cphlD','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','.ranger','384083ZnOalH','stringify','isTTY','token','ZyOlB','application/x-www-form-urlencoded','result','trim','access_token','clientSecret','client_id','mZjKp','expiresAt','FVqjC','Server\x20returned\x20error:\x20','aKFAB','text','text/html','application/json,\x20text/event-stream','structuredContent','\x20done','fIEGO','IHjBG','LBheb','content','MtlCs','log','4324644eFqBEN','get_cli_token','parse','PmwoO','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','ranger-cli','cHcYD','Authorization','OAuth\x20error:\x20','YpukZ','S256','message','searchParams','MsvsB','type','pxQnJ','upYwW','2929750QyFUdI','2112035Jqjare','authorization_code','GJODu','80RCRmxi','MsfXQ'];_0x21af=function(){return _0x640595;};return _0x21af();}import{homedir}from'os';import{createServer}from'http';function _0x37e3(_0x342382,_0x1c141b){_0x342382=_0x342382-0xea;const _0x21af60=_0x21af();let _0x37e307=_0x21af60[_0x342382];return _0x37e307;}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(),_0xd16e64(0xf8),_0xd16e64(0x169)),AUTH_ORIGIN_PATH=join(homedir(),'.ranger',_0xd16e64(0x151));export async function getMcpAuthOrigin(){const _0x184bbf=_0xd16e64,_0x1426aa={'fIEGO':_0x184bbf(0x173),'NAizl':function(_0x24b27c,_0x48c0c7){return _0x24b27c||_0x48c0c7;}};try{const _0xf56d1e=(await readFile(AUTH_ORIGIN_PATH,_0x1426aa[_0x184bbf(0x10e)]))['trim']();return _0x1426aa['NAizl'](_0xf56d1e,null);}catch{return null;}}export async function mcpBootstrap(){const _0x159587=_0xd16e64,_0x3f4623={'pxQnJ':function(_0x286899){return _0x286899();},'XMwWB':function(_0x557b98,_0x17de41){return _0x557b98===_0x17de41;},'LoIZG':function(_0x41fbaf,_0x362dad){return _0x41fbaf+_0x362dad;},'UsJhC':_0x159587(0x139),'uTMSJ':function(_0x52f8ef,_0x4d5f71){return _0x52f8ef(_0x4d5f71);},'YSywd':function(_0x3fd52b,_0x238687,_0x3ef46c){return _0x3fd52b(_0x238687,_0x3ef46c);}},_0x2aaa20=_0x3f4623[_0x159587(0x123)](getMcpAuthUrl);currentOrigin=_0x2aaa20;const _0x11e8be=process[_0x159587(0x167)][_0x159587(0xfb)]??![];console[_0x159587(0x113)]('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x2aaa20+'\x0a');const _0x85aa1f=await tryUnauthenticated(_0x2aaa20);let _0x37bdb4=null;if(_0x3f4623['XMwWB'](_0x85aa1f,_0x159587(0x15f)))_0x37bdb4='';else{_0x37bdb4=await loadCachedToken();if(!_0x37bdb4){if(!_0x11e8be)throw new Error(_0x3f4623['LoIZG'](_0x159587(0x171),_0x3f4623['UsJhC']));_0x37bdb4=await _0x3f4623['uTMSJ'](oauthFlow,_0x2aaa20);}}await _0x3f4623['YSywd'](callGetCliToken,_0x2aaa20,_0x37bdb4);}async function tryUnauthenticated(_0x565f0f){const _0x5ca257=_0xd16e64,_0x54ed77={'FVrVE':_0x5ca257(0x162),'vKciK':'application/json,\x20text/event-stream','xnKZQ':'initialize','cLltm':'2025-03-26','UEcaT':'proxied','sRpYp':function(_0x21578b,_0x5513d8){return _0x21578b===_0x5513d8;},'QwJFP':'needs-oauth'},_0x5d8a9c=await fetch(_0x565f0f,{'method':_0x54ed77[_0x5ca257(0x152)],'headers':{'Content-Type':'application/json','Accept':_0x54ed77['vKciK']},'body':JSON['stringify']({'jsonrpc':_0x5ca257(0x143),'id':0x1,'method':_0x54ed77['xnKZQ'],'params':{'protocolVersion':_0x54ed77[_0x5ca257(0x159)],'capabilities':{},'clientInfo':{'name':'ranger-cli','version':'1.0.0'}}})});if(_0x5d8a9c['ok'])return await _0x5d8a9c[_0x5ca257(0x109)](),_0x54ed77[_0x5ca257(0x172)];if(_0x54ed77['sRpYp'](_0x5d8a9c['status'],0x191))return await _0x5d8a9c['text'](),_0x54ed77['QwJFP'];const _0x5f2288=await _0x5d8a9c['text']();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0x5d8a9c['status']+':\x20'+_0x5f2288);}class OAuthTimeoutError extends Error{constructor(_0x23e55a){const _0x49bf6c=_0xd16e64,_0x222b20={'hfJQF':_0x49bf6c(0x12e)};super(_0x23e55a),this['name']=_0x222b20[_0x49bf6c(0x176)];}}async function oauthFlow(_0x56d47f){const _0x5cede8=_0xd16e64,_0x27400f={'BsBJc':function(_0x312b14,_0x486288){return _0x312b14(_0x486288);},'idITM':function(_0x125748,_0x3b72f1){return _0x125748 instanceof _0x3b72f1;},'ewFXl':function(_0x20c790){return _0x20c790();},'maBrq':_0x5cede8(0xef)};try{return await _0x27400f['BsBJc'](oauthFlowAttempt,_0x56d47f);}catch(_0x1244cc){if(_0x27400f['idITM'](_0x1244cc,OAuthTimeoutError)&&await _0x27400f['ewFXl'](loadCachedClient))return console[_0x5cede8(0x113)](_0x27400f[_0x5cede8(0x13a)]),await clearCachedClient(),await oauthFlowAttempt(_0x56d47f);throw _0x1244cc;}}async function oauthFlowAttempt(_0x745047){const _0x7c7e6f=_0xd16e64,_0x5c163e={'upYwW':'Discovering\x20authorization\x20server...','GJODu':function(_0x5dd63a,_0x5bbd41){return _0x5dd63a(_0x5bbd41);},'pLTmd':function(_0x41e4d3){return _0x41e4d3();},'mIauN':function(_0x4e08a6,_0x351e6c,_0x26878c){return _0x4e08a6(_0x351e6c,_0x26878c);},'DAtUb':'POST','lOFMl':'refresh_token','CBJPf':'code','VglRe':_0x7c7e6f(0x12b),'cphlD':'Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','IMHWu':_0x7c7e6f(0x134),'cogka':_0x7c7e6f(0x13e),'QCjlX':function(_0x325b4a,_0x2c305e){return _0x325b4a(_0x2c305e);},'pbDhp':'redirect_uri','MsvsB':'code_challenge','IHjBG':'state','PmwoO':_0x7c7e6f(0x13d),'oLrIt':function(_0x4c3032,_0x5c368e){return _0x4c3032(_0x5c368e);},'rujVM':_0x7c7e6f(0x132),'OjdcY':'client_secret','wzoyX':_0x7c7e6f(0xfe),'IHdNj':function(_0x528bdb,_0x51f5e1,_0x282007,_0x411b78){return _0x528bdb(_0x51f5e1,_0x282007,_0x411b78);}},_0x47a72c=_0x745047['replace'](/\/mcp$/,'');process['stdout']['write'](_0x5c163e[_0x7c7e6f(0x124)]);const _0x4f752e=await fetch(_0x47a72c+_0x7c7e6f(0xed));if(!_0x4f752e['ok'])throw new Error('Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server');const _0x4849a1=await _0x4f752e['json'](),_0x2f79df=_0x4849a1['authorization_servers']?.[0x0];if(!_0x2f79df)throw new Error(_0x7c7e6f(0x156));console['log']('\x20'+_0x2f79df);const _0x485a5e=await _0x5c163e['GJODu'](fetchAuthServerMetadata,_0x2f79df);let _0x40d937,_0x297d3e;const _0x33ddbb=await _0x5c163e[_0x7c7e6f(0x12c)](loadCachedClient);if(_0x33ddbb)_0x40d937=_0x33ddbb[_0x7c7e6f(0x16b)],_0x297d3e=_0x33ddbb[_0x7c7e6f(0x102)];else{if(_0x485a5e[_0x7c7e6f(0x148)]){process['stdout']['write']('Registering\x20OAuth\x20client...');const _0x14518c=await _0x5c163e[_0x7c7e6f(0x145)](fetch,_0x485a5e['registration_endpoint'],{'method':_0x5c163e['DAtUb'],'headers':{'Content-Type':'application/json'},'body':JSON['stringify']({'client_name':'Ranger\x20CLI','redirect_uris':['http://localhost:'+CALLBACK_PORT+_0x7c7e6f(0xee)],'grant_types':[_0x7c7e6f(0x127),_0x5c163e['lOFMl']],'response_types':[_0x5c163e['CBJPf']],'token_endpoint_auth_method':_0x5c163e['VglRe']})});if(!_0x14518c['ok']){const _0x3c92c1=await _0x14518c[_0x7c7e6f(0x109)]();throw new Error(_0x7c7e6f(0x178)+_0x3c92c1);}const _0x2d0724=await _0x14518c[_0x7c7e6f(0xec)]();_0x40d937=_0x2d0724[_0x7c7e6f(0x103)],_0x297d3e=_0x2d0724['client_secret'],await _0x5c163e['mIauN'](saveCachedClient,_0x40d937,_0x297d3e),console[_0x7c7e6f(0x113)]('\x20done');}else throw new Error(_0x5c163e[_0x7c7e6f(0xf6)]);}const _0x5b85ef=_0x5c163e[_0x7c7e6f(0x128)](randomBytes,0x20)['toString'](_0x5c163e['IMHWu']),_0x43e6c4=createHash(_0x5c163e['cogka'])[_0x7c7e6f(0x177)](_0x5b85ef)['digest'](_0x5c163e['IMHWu']),_0x1660d6=_0x5c163e[_0x7c7e6f(0x16c)](randomBytes,0x10)[_0x7c7e6f(0x163)]('hex'),_0x1d1326=new URL(_0x485a5e[_0x7c7e6f(0x170)]);_0x1d1326['searchParams'][_0x7c7e6f(0x174)]('response_type',_0x5c163e['CBJPf']),_0x1d1326['searchParams'][_0x7c7e6f(0x174)]('client_id',_0x40d937),_0x1d1326[_0x7c7e6f(0x120)][_0x7c7e6f(0x174)](_0x5c163e['pbDhp'],'http://localhost:'+CALLBACK_PORT+'/callback'),_0x1d1326['searchParams'][_0x7c7e6f(0x174)](_0x5c163e[_0x7c7e6f(0x121)],_0x43e6c4),_0x1d1326['searchParams']['set']('code_challenge_method',_0x7c7e6f(0x11e)),_0x1d1326['searchParams']['set'](_0x5c163e[_0x7c7e6f(0x10f)],_0x1660d6);_0x4849a1[_0x7c7e6f(0x13d)]&&_0x1d1326['searchParams']['set'](_0x5c163e[_0x7c7e6f(0x117)],_0x4849a1['resource']);console['log'](_0x7c7e6f(0x16f)),console[_0x7c7e6f(0x113)](_0x7c7e6f(0xf7)+_0x1d1326['toString']()+'\x0a'),await _0x5c163e[_0x7c7e6f(0x141)](openBrowser,_0x1d1326[_0x7c7e6f(0x163)]());const _0x43550b=await waitForCallback(_0x1660d6);process['stdout']['write'](_0x5c163e['rujVM']);const _0x2a1e85=new URLSearchParams({'grant_type':_0x7c7e6f(0x127),'code':_0x43550b,'redirect_uri':_0x7c7e6f(0x15d)+CALLBACK_PORT+_0x7c7e6f(0xee),'client_id':_0x40d937,'code_verifier':_0x5b85ef});_0x297d3e&&_0x2a1e85[_0x7c7e6f(0x174)](_0x5c163e['OjdcY'],_0x297d3e);_0x4849a1[_0x7c7e6f(0x13d)]&&_0x2a1e85[_0x7c7e6f(0x174)](_0x5c163e[_0x7c7e6f(0x117)],_0x4849a1['resource']);const _0x7eabc2=await _0x5c163e[_0x7c7e6f(0x145)](fetch,_0x485a5e['token_endpoint'],{'method':_0x5c163e[_0x7c7e6f(0x146)],'headers':{'Content-Type':_0x5c163e['wzoyX']},'body':_0x2a1e85});if(!_0x7eabc2['ok']){const _0x9b8ec=await _0x7eabc2[_0x7c7e6f(0x109)]();throw new Error('Token\x20exchange\x20failed:\x20'+_0x9b8ec);}const _0x6a59f8=await _0x7eabc2[_0x7c7e6f(0xec)]();return console[_0x7c7e6f(0x113)](_0x7c7e6f(0x10d)),await _0x5c163e[_0x7c7e6f(0x13b)](saveCachedToken,_0x6a59f8[_0x7c7e6f(0x101)],_0x6a59f8['refresh_token'],_0x6a59f8['expires_in']),_0x6a59f8['access_token'];}async function callGetCliToken(_0x507283,_0x3ba948){const _0x223a58=_0xd16e64,_0x1ab407={'ZyOlB':function(_0x444cb0,_0x459ff2,_0x21187b){return _0x444cb0(_0x459ff2,_0x21187b);},'RCmoB':'POST','ZWqux':function(_0x4db27a,_0x4ac7b9){return _0x4db27a(_0x4ac7b9);},'LEvmp':function(_0x17070f,_0x8716c1){return _0x17070f(_0x8716c1);},'goGJq':'2.0','FVqjC':_0x223a58(0x119),'SCnYb':'1.0.0','Fywve':function(_0x1ea8d4,_0x39a502,_0x421e3f){return _0x1ea8d4(_0x39a502,_0x421e3f);},'HNPlk':_0x223a58(0xf3),'MtlCs':'Requesting\x20CLI\x20token...','wfAIO':function(_0x138f54,_0x484efb){return _0x138f54(_0x484efb);},'mZjKp':_0x223a58(0x15a),'xocOr':_0x223a58(0x166),'owWIV':function(_0x1be0ce,_0x5d037f,_0x44b959){return _0x1be0ce(_0x5d037f,_0x44b959);},'YwZCA':'refresh.txt','tAJsD':function(_0x230b30,_0x4d1512,_0x952a7e){return _0x230b30(_0x4d1512,_0x952a7e);},'OUeAm':function(_0x28116e,_0x1d4ed5,_0x363057,_0x24a394){return _0x28116e(_0x1d4ed5,_0x363057,_0x24a394);}},_0x3c16c2={'Content-Type':'application/json','Accept':_0x223a58(0x10b)};_0x3ba948&&(_0x3c16c2[_0x223a58(0x11b)]=_0x223a58(0x153)+_0x3ba948);const _0x28de7d=async _0x4d928a=>{const _0x45bb53=_0x223a58,_0x30051a=await _0x1ab407[_0x45bb53(0xfd)](fetch,_0x507283,{'method':_0x1ab407[_0x45bb53(0x15e)],'headers':_0x3c16c2,'body':JSON[_0x45bb53(0xfa)](_0x4d928a)});if(!_0x30051a['ok']){const _0x10459a=await _0x30051a['text']();throw new Error('HTTP\x20'+_0x30051a[_0x45bb53(0x130)]+':\x20'+_0x10459a);}return _0x1ab407[_0x45bb53(0x14a)](parseResponse,_0x30051a);};process[_0x223a58(0x167)]['write']('Initializing\x20MCP\x20session...');const _0xd8eb4f=await _0x1ab407[_0x223a58(0xf1)](_0x28de7d,{'jsonrpc':_0x1ab407[_0x223a58(0x160)],'id':0x1,'method':'initialize','params':{'protocolVersion':_0x223a58(0xf0),'capabilities':{},'clientInfo':{'name':_0x1ab407[_0x223a58(0x106)],'version':_0x1ab407[_0x223a58(0xf2)]}}});if(_0xd8eb4f['error'])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0xd8eb4f[_0x223a58(0x138)][_0x223a58(0x11f)]??JSON['stringify'](_0xd8eb4f[_0x223a58(0x138)])));console['log'](_0x223a58(0x10d)),await _0x1ab407['Fywve'](fetch,_0x507283,{'method':'POST','headers':_0x3c16c2,'body':JSON['stringify']({'jsonrpc':_0x1ab407[_0x223a58(0x160)],'method':_0x1ab407[_0x223a58(0x150)]})})['then'](_0x41bd75=>_0x41bd75['text']()),process['stdout']['write'](_0x1ab407[_0x223a58(0x112)]);const _0x274b78=await _0x1ab407['wfAIO'](_0x28de7d,{'jsonrpc':_0x1ab407[_0x223a58(0x160)],'id':0x2,'method':_0x1ab407[_0x223a58(0x104)],'params':{'name':_0x223a58(0x115),'arguments':{}}});if(_0x274b78['error'])throw new Error(_0x223a58(0x14e)+(_0x274b78[_0x223a58(0x138)]['message']??JSON[_0x223a58(0xfa)](_0x274b78['error'])));console['log']('\x20done');const _0x5ee619=extractToken(_0x274b78[_0x223a58(0xff)]);if(!_0x5ee619){console['error'](_0x1ab407[_0x223a58(0x15b)]),console[_0x223a58(0x138)](JSON['stringify'](_0x274b78['result'],null,0x2));throw new Error(_0x223a58(0x118));}const _0x243704=join(homedir(),_0x223a58(0xf8)),_0x4c1879=_0x1ab407[_0x223a58(0x144)](join,_0x243704,_0x1ab407[_0x223a58(0x161)]);await _0x1ab407[_0x223a58(0x168)](mkdir,_0x243704,{'recursive':!![]}),await writeFile(_0x4c1879,_0x5ee619,{'mode':0x180}),await _0x1ab407['OUeAm'](writeFile,join(_0x243704,'auth-origin.txt'),_0x507283,{'mode':0x180}),console[_0x223a58(0x113)]('\x0aToken\x20written\x20to\x20'+_0x4c1879),console['log']('Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a');}async function fetchAuthServerMetadata(_0x5aab1e){const _0x3de883=_0xd16e64,_0x3bf237={'Qlnbp':function(_0x231d87,_0x5ce81f){return _0x231d87(_0x5ce81f);}},_0x9ef753=_0x5aab1e+_0x3de883(0x164),_0x3f0190=await _0x3bf237['Qlnbp'](fetch,_0x9ef753);if(!_0x3f0190['ok'])throw new Error('Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20'+_0x9ef753+':\x20'+_0x3f0190['status']);return _0x3f0190['json']();}function waitForCallback(_0x77ef5d){const _0x2a883b=_0xd16e64,_0xf1b5a8={'MsfXQ':function(_0x4fbc96){return _0x4fbc96();},'Nypmb':'<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','nzBLK':function(_0x4be66f,_0x590bf2){return _0x4be66f(_0x590bf2);},'ikBvr':function(_0x414323,_0x46b3eb,_0x117a8c){return _0x414323(_0x46b3eb,_0x117a8c);},'YZama':_0x2a883b(0x14c)};return new Promise((_0x113a9d,_0x2c6341)=>{const _0x284370=_0x2a883b,_0x169d7f={'xxkWA':function(_0x181d8a){const _0x1d49c0=_0x37e3;return _0xf1b5a8[_0x1d49c0(0x12a)](_0x181d8a);},'IRzUl':'Not\x20found','gpqJG':_0x284370(0xf4),'SChMl':_0x284370(0x10a),'IgmGe':function(_0x58254a,_0x2ab0dd){return _0x58254a(_0x2ab0dd);},'ntkbQ':_0xf1b5a8['Nypmb'],'rzjmV':function(_0x113290,_0x5eb420){return _0x113290(_0x5eb420);},'YpukZ':function(_0x1fae15,_0xde3708){const _0x5b2eb6=_0x284370;return _0xf1b5a8[_0x5b2eb6(0x142)](_0x1fae15,_0xde3708);}},_0x4ca611=()=>{const _0x48f12c=_0x284370;_0x30edac[_0x48f12c(0x13f)](),_0x30edac[_0x48f12c(0x15c)]();},_0x1c766c=_0xf1b5a8['ikBvr'](setTimeout,()=>{const _0x44c7ab=_0x284370;_0x169d7f['xxkWA'](_0x4ca611),_0x2c6341(new OAuthTimeoutError(_0x44c7ab(0xf5)));},0x1d4c0),_0x30edac=createServer((_0xa767e3,_0x267842)=>{const _0x464e81=_0x284370,_0x4aa95d=new URL(_0xa767e3['url']??'/',_0x464e81(0x15d)+CALLBACK_PORT);if(_0x4aa95d['pathname']!=='/callback'){_0x267842['writeHead'](0x194),_0x267842[_0x464e81(0xea)](_0x169d7f['IRzUl']);return;}const _0x1b35a3=_0x4aa95d[_0x464e81(0x120)][_0x464e81(0x179)](_0x464e81(0x14d)),_0x44904e=_0x4aa95d['searchParams'][_0x464e81(0x179)](_0x169d7f['gpqJG']),_0x44393c=_0x4aa95d[_0x464e81(0x120)]['get']('error');if(_0x44393c){const _0x2e27a6=_0x4aa95d[_0x464e81(0x120)][_0x464e81(0x179)]('error_description')??_0x44393c;_0x267842['writeHead'](0xc8,{'Content-Type':_0x169d7f['SChMl']}),_0x267842[_0x464e81(0xea)]('<html><body><h2>Authentication\x20failed</h2><p>'+_0x2e27a6+_0x464e81(0x13c)),_0x169d7f['IgmGe'](clearTimeout,_0x1c766c),_0x169d7f['xxkWA'](_0x4ca611),_0x2c6341(new Error(_0x464e81(0x11c)+_0x2e27a6));return;}if(!_0x1b35a3||_0x44904e!==_0x77ef5d){_0x267842[_0x464e81(0x140)](0x190,{'Content-Type':_0x169d7f[_0x464e81(0x16d)]}),_0x267842['end'](_0x464e81(0x154));return;}_0x267842['writeHead'](0xc8,{'Content-Type':_0x464e81(0x10a)}),_0x267842['end'](_0x169d7f['ntkbQ']),_0x169d7f[_0x464e81(0xeb)](clearTimeout,_0x1c766c),_0x4ca611(),_0x169d7f[_0x464e81(0x11d)](_0x113a9d,_0x1b35a3);});_0x30edac['listen'](CALLBACK_PORT,_0xf1b5a8['YZama']);});}async function openBrowser(_0xd7aa4){const _0x45ebf8=_0xd16e64,_0x8786d7={'LsaHW':'win32','yJvjF':_0x45ebf8(0x137)},_0x592bca=process['platform']==='darwin'?'open':process['platform']===_0x8786d7['LsaHW']?'start':_0x8786d7['yJvjF'];exec(_0x592bca+'\x20\x22'+_0xd7aa4+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x52baf1=_0xd16e64,_0x5938f8={'nPTYH':function(_0x1dec33,_0x4e0928,_0xf46930){return _0x1dec33(_0x4e0928,_0xf46930);},'bupnD':_0x52baf1(0x173)};try{const _0x1a0185=JSON[_0x52baf1(0x116)](await _0x5938f8['nPTYH'](readFile,TOKEN_CACHE_PATH,_0x5938f8[_0x52baf1(0x14f)]));if(_0x1a0185[_0x52baf1(0x155)]&&_0x1a0185[_0x52baf1(0x155)]!==currentOrigin)return null;if(_0x1a0185['expiresAt']&&Date['now']()>_0x1a0185[_0x52baf1(0x105)])return null;return _0x1a0185['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x4f82bb,_0x229f39,_0x353179){const _0x44a026=_0xd16e64,_0x3ffc2b={'RBmLR':function(_0xc8cee6){return _0xc8cee6();},'nlAMI':function(_0x1b34f5,_0x3579ef){return _0x1b34f5+_0x3579ef;},'KhrHH':function(_0x4f4806,_0x22f707,_0x5dd5e7){return _0x4f4806(_0x22f707,_0x5dd5e7);},'fAtkj':_0x44a026(0xf8)},_0x5b4cc=await _0x3ffc2b['RBmLR'](loadCachedData),_0x46d5ce={..._0x5b4cc,'origin':currentOrigin,'accessToken':_0x4f82bb,'refreshToken':_0x229f39??_0x5b4cc?.['refreshToken'],'expiresAt':_0x353179?_0x3ffc2b['nlAMI'](Date['now'](),_0x353179*0x3e8):undefined};await _0x3ffc2b['KhrHH'](mkdir,join(homedir(),_0x3ffc2b[_0x44a026(0x158)]),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON[_0x44a026(0xfa)](_0x46d5ce),{'mode':0x180});}async function loadCachedClient(){const _0x16d776=_0xd16e64,_0x277195={'CuPvR':function(_0x5ef9e3){return _0x5ef9e3();},'aKFAB':function(_0x8a0d61,_0x27e214){return _0x8a0d61!==_0x27e214;}},_0x2b8f86=await _0x277195['CuPvR'](loadCachedData);if(_0x2b8f86?.[_0x16d776(0x155)]&&_0x277195[_0x16d776(0x108)](_0x2b8f86['origin'],currentOrigin))return null;return _0x2b8f86?.['clientId']?{'clientId':_0x2b8f86[_0x16d776(0x16b)],'clientSecret':_0x2b8f86['clientSecret']}:null;}async function clearCachedClient(){const _0x4b9489=_0xd16e64,_0x5ca65c={'VxZTC':function(_0x374235,_0x4732b4,_0x255e20,_0x2cb932){return _0x374235(_0x4732b4,_0x255e20,_0x2cb932);}},_0x5b2ce4=await loadCachedData();if(!_0x5b2ce4)return;const {clientId:_0x5cdd8e,clientSecret:_0x1449b3,..._0x5ae27d}=_0x5b2ce4;await _0x5ca65c[_0x4b9489(0x14b)](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x5ae27d),{'mode':0x180});}async function saveCachedClient(_0x3b7dac,_0x2caf06){const _0x30c3e8=_0xd16e64,_0x1a7e53={'ekfLJ':function(_0x1a893d,_0x2a0708,_0x29ac31){return _0x1a893d(_0x2a0708,_0x29ac31);},'XPgcL':function(_0x3573ce){return _0x3573ce();},'oYmYS':function(_0x46af5d,_0x1c5669,_0x17066e,_0x5d2c83){return _0x46af5d(_0x1c5669,_0x17066e,_0x5d2c83);}},_0x1cf158=await loadCachedData(),_0x17d9ba={..._0x1cf158,'origin':currentOrigin,'accessToken':_0x1cf158?.['accessToken']??'','clientId':_0x3b7dac,'clientSecret':_0x2caf06};await _0x1a7e53['ekfLJ'](mkdir,join(_0x1a7e53['XPgcL'](homedir),'.ranger'),{'recursive':!![]}),await _0x1a7e53['oYmYS'](writeFile,TOKEN_CACHE_PATH,JSON[_0x30c3e8(0xfa)](_0x17d9ba),{'mode':0x180});}async function loadCachedData(){const _0x1478db=_0xd16e64,_0x5f01df={'cHcYD':function(_0x1e86e9,_0x4716a3,_0x1730a3){return _0x1e86e9(_0x4716a3,_0x1730a3);},'vndHr':'utf-8'};try{return JSON['parse'](await _0x5f01df[_0x1478db(0x11a)](readFile,TOKEN_CACHE_PATH,_0x5f01df[_0x1478db(0x12f)]));}catch{return null;}}async function parseResponse(_0x945389){const _0x3ede76=_0xd16e64,_0x337b50={'rovJG':'text/event-stream','LBheb':'data:'},_0x56b0aa=_0x945389[_0x3ede76(0x175)]['get']('content-type')??'';if(_0x56b0aa['includes'](_0x337b50[_0x3ede76(0x135)])){const _0x36a004=await _0x945389['text']();for(const _0x1ac268 of _0x36a004[_0x3ede76(0x157)]('\x0a')){const _0x4c6c67=_0x1ac268['trim']();if(_0x4c6c67['startsWith'](_0x337b50[_0x3ede76(0x110)])){const _0x59e192=_0x4c6c67[_0x3ede76(0x147)](_0x337b50[_0x3ede76(0x110)]['length'])[_0x3ede76(0x100)]();if(!_0x59e192)continue;try{const _0x251d15=JSON['parse'](_0x59e192);if(_0x251d15['id']!==undefined||_0x251d15['error'])return _0x251d15;}catch{}}}throw new Error(_0x3ede76(0x149));}return _0x945389['json']();}function extractToken(_0x25c390){const _0x3f8bbd=_0xd16e64,_0x3d446b={'bLPqD':function(_0x51b436,_0x384c0e){return _0x51b436===_0x384c0e;},'Pomoe':_0x3f8bbd(0x109)};if(!_0x25c390)return null;const _0x42bd96=_0x25c390[_0x3f8bbd(0x10c)];if(_0x42bd96?.[_0x3f8bbd(0xfc)]&&_0x3d446b['bLPqD'](typeof _0x42bd96['token'],'string'))return _0x42bd96['token'];if(_0x25c390[_0x3f8bbd(0x165)]){const _0x33d9d6=_0x25c390[_0x3f8bbd(0x111)];throw new Error(_0x3f8bbd(0x107)+(_0x33d9d6?.[0x0]?.[_0x3f8bbd(0x109)]??'Unknown\x20error'));}const _0x41ea23=_0x25c390['content'];if(_0x41ea23)for(const _0x5bea51 of _0x41ea23){if(_0x5bea51[_0x3f8bbd(0x122)]===_0x3d446b['Pomoe']&&_0x5bea51['text']){try{const _0x399746=JSON[_0x3f8bbd(0x116)](_0x5bea51[_0x3f8bbd(0x109)]);if(_0x3d446b[_0x3f8bbd(0x16e)](typeof _0x399746?.['token'],'string'))return _0x399746['token'];}catch{}const _0xe95f22=_0x5bea51['text']['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0xe95f22)return _0xe95f22[0x1];}}return null;}
1
+ const _0x3ab8d0=_0x29e4;(function(_0xb16e25,_0x14dd5d){const _0x1058d7=_0x29e4,_0x545d07=_0xb16e25();while(!![]){try{const _0x15884a=parseInt(_0x1058d7(0x266))/0x1+parseInt(_0x1058d7(0x284))/0x2+-parseInt(_0x1058d7(0x217))/0x3+-parseInt(_0x1058d7(0x1ff))/0x4*(-parseInt(_0x1058d7(0x250))/0x5)+-parseInt(_0x1058d7(0x21e))/0x6*(parseInt(_0x1058d7(0x255))/0x7)+parseInt(_0x1058d7(0x23e))/0x8*(-parseInt(_0x1058d7(0x1fd))/0x9)+-parseInt(_0x1058d7(0x1f7))/0xa;if(_0x15884a===_0x14dd5d)break;else _0x545d07['push'](_0x545d07['shift']());}catch(_0x770a9b){_0x545d07['push'](_0x545d07['shift']());}}}(_0x708d,0x35eca));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';function _0x708d(){const _0x48625d=['accessToken','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','Server\x20returned\x20error:\x20','auth-origin.txt','<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','xdg-open','bKOAy','content-type','Not\x20found','end','set','2365GpZnjf','http://localhost:','MMUUA','YeCUj','mszVR','63rTpoMd','UlKwo','open','2.0','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','IpVEn','write','text/event-stream','error_description','text','expiresAt','expires_in','Discovering\x20authorization\x20server...','log','Wqbsf','mmRpr','token','394466XxJdeF','token_endpoint','Registering\x20OAuth\x20client...','xOuBS','eKqtX','sahKT','now','state','client_secret','registration_endpoint','proxied','pathname','isError','Fdhyi','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','BOPFw','initialize','\x0aOpening\x20browser\x20for\x20authentication...','/.well-known/oauth-protected-resource','Unknown\x20error','data:','/.well-known/oauth-authorization-server','application/x-www-form-urlencoded','searchParams','status','json','MGOdW','update','code_challenge_method','authorization_servers','768220XStbEb','access_token','code_challenge','cTOiH','startsWith','Asbvi','clientId','application/json','YScWh','code','2262890tivqIH','OAuthTimeoutError','WHJEM','VTLcb','/callback','client_id','134910JcfCbr','MLNLp','2316tCxhJM','toString','DtqWZ','Ranger\x20CLI','origin','CIrXM','ranger-cli','QyvgC','GmpGj','win32','lOfEH','isTTY','yzPoI','eOPgC','stdout','result','QIRto','DCarW','EANrm','start','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','mcp-oauth-tokens.json','writeHead','authorization_endpoint','126228AGJUNh','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','nbokd','CyKMk','NGFlk','ClGdI','platform','245556lHKUky','utf-8','RSryl','psdnS','hex','topVn','glFIr','tools/call','get_cli_token\x20failed:\x20','YonOj','parse','.ranger','application/json,\x20text/event-stream','length','IeXVs','POST','then','ngTbG','<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','\x20done','refresh_token','zOUmM','base64url','get','RmSvd','refreshToken','wjENN','oWKKZ','xzUWC','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','stringify','\x0aUnexpected\x20response\x20structure:','104uzSNgT','resource','type','error','clientSecret','DQXGh','Zbdhi'];_0x708d=function(){return _0x48625d;};return _0x708d();}const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),'.ranger',_0x3ab8d0(0x214)),AUTH_ORIGIN_PATH=join(homedir(),'.ranger',_0x3ab8d0(0x248));export async function getMcpAuthOrigin(){const _0x43439d=_0x3ab8d0,_0x2decd2={'ngTbG':function(_0x527d53,_0x525ecb,_0x245182){return _0x527d53(_0x525ecb,_0x245182);},'cuIYn':function(_0x613fb3,_0x61fd36){return _0x613fb3||_0x61fd36;}};try{const _0x3204de=(await _0x2decd2[_0x43439d(0x22f)](readFile,AUTH_ORIGIN_PATH,_0x43439d(0x21f)))['trim']();return _0x2decd2['cuIYn'](_0x3204de,null);}catch{return null;}}export async function mcpBootstrap(){const _0x47676f=_0x3ab8d0,_0x414ef8={'YXtWR':_0x47676f(0x270),'BOPFw':function(_0x1c915e){return _0x1c915e();},'MLNLp':function(_0x5819f5,_0x34e34a){return _0x5819f5+_0x34e34a;},'eKqtX':'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','mmRpr':function(_0x471288,_0x1a8567){return _0x471288(_0x1a8567);},'cOqpe':function(_0x16635a,_0x17ddf1,_0x5f473c){return _0x16635a(_0x17ddf1,_0x5f473c);}},_0x44c195=getMcpAuthUrl();currentOrigin=_0x44c195;const _0x5312c2=process[_0x47676f(0x20d)][_0x47676f(0x20a)]??![];console[_0x47676f(0x262)]('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x44c195+'\x0a');const _0x52d046=await tryUnauthenticated(_0x44c195);let _0x1f31d1=null;if(_0x52d046===_0x414ef8['YXtWR'])_0x1f31d1='';else{_0x1f31d1=await _0x414ef8[_0x47676f(0x275)](loadCachedToken);if(!_0x1f31d1){if(!_0x5312c2)throw new Error(_0x414ef8[_0x47676f(0x1fe)]('MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a',_0x414ef8[_0x47676f(0x26a)]));_0x1f31d1=await _0x414ef8[_0x47676f(0x264)](oauthFlow,_0x44c195);}}await _0x414ef8['cOqpe'](callGetCliToken,_0x44c195,_0x1f31d1);}async function tryUnauthenticated(_0x447116){const _0x2aabea=_0x3ab8d0,_0x4a6e4d={'jzrqD':function(_0x316da2,_0x5d6889,_0x4c1067){return _0x316da2(_0x5d6889,_0x4c1067);},'Asbvi':_0x2aabea(0x22d),'oWKKZ':_0x2aabea(0x22a)},_0xa1302=await _0x4a6e4d['jzrqD'](fetch,_0x447116,{'method':_0x4a6e4d[_0x2aabea(0x1f2)],'headers':{'Content-Type':'application/json','Accept':_0x4a6e4d[_0x2aabea(0x239)]},'body':JSON['stringify']({'jsonrpc':_0x2aabea(0x258),'id':0x1,'method':_0x2aabea(0x276),'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x2aabea(0x205),'version':'1.0.0'}}})});if(_0xa1302['ok'])return await _0xa1302[_0x2aabea(0x25e)](),_0x2aabea(0x270);if(_0xa1302[_0x2aabea(0x27e)]===0x191)return await _0xa1302[_0x2aabea(0x25e)](),'needs-oauth';const _0x545231=await _0xa1302[_0x2aabea(0x25e)]();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0xa1302['status']+':\x20'+_0x545231);}class OAuthTimeoutError extends Error{constructor(_0x352dcc){const _0x405d63=_0x3ab8d0;super(_0x352dcc),this['name']=_0x405d63(0x1f8);}}async function oauthFlow(_0x467271){const _0x1dc37a=_0x3ab8d0,_0x200b48={'WHJEM':function(_0x620f74,_0x1b4b3e){return _0x620f74(_0x1b4b3e);},'QIRto':function(_0x438ab8,_0x20c3ac){return _0x438ab8 instanceof _0x20c3ac;},'YjXLj':function(_0x38ec16){return _0x38ec16();}};try{return await _0x200b48[_0x1dc37a(0x1f9)](oauthFlowAttempt,_0x467271);}catch(_0x32af9a){if(_0x200b48[_0x1dc37a(0x20f)](_0x32af9a,OAuthTimeoutError)&&await loadCachedClient())return console['log'](_0x1dc37a(0x218)),await _0x200b48['YjXLj'](clearCachedClient),await _0x200b48[_0x1dc37a(0x1f9)](oauthFlowAttempt,_0x467271);throw _0x32af9a;}}async function oauthFlowAttempt(_0x1901aa){const _0xe72ace=_0x3ab8d0,_0x2dbf86={'ImjSw':function(_0xf5acad,_0x2a52f4){return _0xf5acad(_0x2a52f4);},'uXgFr':'Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','RmSvd':'No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','GmpGj':function(_0x1ab6a2){return _0x1ab6a2();},'UlKwo':_0xe72ace(0x268),'LPkhB':'POST','CIrXM':'authorization_code','zOUmM':_0xe72ace(0x1f6),'mszVR':'none','xOuBS':_0xe72ace(0x231),'cTOiH':_0xe72ace(0x23b),'YonOj':'base64url','sahKT':'sha256','XOGBL':_0xe72ace(0x282),'YScWh':'S256','CeqWK':_0xe72ace(0x277),'SmufX':function(_0xbfbe69,_0xa87577){return _0xbfbe69(_0xa87577);},'qOfAY':_0xe72ace(0x26e),'HJvGt':function(_0x1e78a3,_0x2b6d28,_0x3eb613){return _0x1e78a3(_0x2b6d28,_0x3eb613);},'TspYJ':_0xe72ace(0x27c)},_0x367ed8=_0x1901aa['replace'](/\/mcp$/,'');process[_0xe72ace(0x20d)]['write'](_0xe72ace(0x261));const _0xacdf31=await _0x2dbf86['ImjSw'](fetch,_0x367ed8+_0xe72ace(0x278));if(!_0xacdf31['ok'])throw new Error(_0x2dbf86['uXgFr']);const _0x561d5f=await _0xacdf31[_0xe72ace(0x27f)](),_0x16fd5c=_0x561d5f[_0xe72ace(0x283)]?.[0x0];if(!_0x16fd5c)throw new Error(_0x2dbf86[_0xe72ace(0x236)]);console['log']('\x20'+_0x16fd5c);const _0x28e546=await fetchAuthServerMetadata(_0x16fd5c);let _0x262491,_0x3a422b;const _0x4c467f=await _0x2dbf86[_0xe72ace(0x207)](loadCachedClient);if(_0x4c467f)_0x262491=_0x4c467f['clientId'],_0x3a422b=_0x4c467f['clientSecret'];else{if(_0x28e546[_0xe72ace(0x26f)]){process[_0xe72ace(0x20d)]['write'](_0x2dbf86[_0xe72ace(0x256)]);const _0x573d4d=await fetch(_0x28e546['registration_endpoint'],{'method':_0x2dbf86['LPkhB'],'headers':{'Content-Type':_0xe72ace(0x1f4)},'body':JSON['stringify']({'client_name':_0xe72ace(0x202),'redirect_uris':[_0xe72ace(0x251)+CALLBACK_PORT+_0xe72ace(0x1fb)],'grant_types':[_0x2dbf86[_0xe72ace(0x204)],'refresh_token'],'response_types':[_0x2dbf86[_0xe72ace(0x233)]],'token_endpoint_auth_method':_0x2dbf86[_0xe72ace(0x254)]})});if(!_0x573d4d['ok']){const _0x49c31b=await _0x573d4d['text']();throw new Error('Client\x20registration\x20failed:\x20'+_0x49c31b);}const _0x485428=await _0x573d4d[_0xe72ace(0x27f)]();_0x262491=_0x485428[_0xe72ace(0x1fc)],_0x3a422b=_0x485428['client_secret'],await saveCachedClient(_0x262491,_0x3a422b),console['log'](_0x2dbf86[_0xe72ace(0x269)]);}else throw new Error(_0x2dbf86[_0xe72ace(0x1f0)]);}const _0x2e001a=randomBytes(0x20)['toString'](_0x2dbf86[_0xe72ace(0x227)]),_0x3e0292=createHash(_0x2dbf86[_0xe72ace(0x26b)])[_0xe72ace(0x281)](_0x2e001a)['digest'](_0xe72ace(0x234)),_0x37fb20=randomBytes(0x10)['toString'](_0xe72ace(0x222)),_0xc55c8d=new URL(_0x28e546[_0xe72ace(0x216)]);_0xc55c8d['searchParams']['set']('response_type','code'),_0xc55c8d[_0xe72ace(0x27d)][_0xe72ace(0x24f)](_0xe72ace(0x1fc),_0x262491),_0xc55c8d[_0xe72ace(0x27d)][_0xe72ace(0x24f)]('redirect_uri','http://localhost:'+CALLBACK_PORT+'/callback'),_0xc55c8d['searchParams'][_0xe72ace(0x24f)](_0xe72ace(0x1ef),_0x3e0292),_0xc55c8d['searchParams']['set'](_0x2dbf86['XOGBL'],_0x2dbf86[_0xe72ace(0x1f5)]),_0xc55c8d[_0xe72ace(0x27d)][_0xe72ace(0x24f)]('state',_0x37fb20);_0x561d5f['resource']&&_0xc55c8d['searchParams'][_0xe72ace(0x24f)]('resource',_0x561d5f[_0xe72ace(0x23f)]);console['log'](_0x2dbf86['CeqWK']),console['log']('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a'+_0xc55c8d[_0xe72ace(0x200)]()+'\x0a'),await _0x2dbf86['ImjSw'](openBrowser,_0xc55c8d[_0xe72ace(0x200)]());const _0x2cfde8=await _0x2dbf86['SmufX'](waitForCallback,_0x37fb20);process['stdout']['write']('Exchanging\x20authorization\x20code...');const _0x4d4e97=new URLSearchParams({'grant_type':_0x2dbf86[_0xe72ace(0x204)],'code':_0x2cfde8,'redirect_uri':'http://localhost:'+CALLBACK_PORT+_0xe72ace(0x1fb),'client_id':_0x262491,'code_verifier':_0x2e001a});_0x3a422b&&_0x4d4e97[_0xe72ace(0x24f)](_0x2dbf86['qOfAY'],_0x3a422b);_0x561d5f[_0xe72ace(0x23f)]&&_0x4d4e97['set'](_0xe72ace(0x23f),_0x561d5f[_0xe72ace(0x23f)]);const _0x365293=await _0x2dbf86['HJvGt'](fetch,_0x28e546[_0xe72ace(0x267)],{'method':_0x2dbf86['LPkhB'],'headers':{'Content-Type':_0x2dbf86['TspYJ']},'body':_0x4d4e97});if(!_0x365293['ok']){const _0x393097=await _0x365293['text']();throw new Error('Token\x20exchange\x20failed:\x20'+_0x393097);}const _0x20ccb8=await _0x365293['json']();return console['log'](_0x2dbf86['xOuBS']),await saveCachedToken(_0x20ccb8[_0xe72ace(0x1ee)],_0x20ccb8[_0xe72ace(0x232)],_0x20ccb8[_0xe72ace(0x260)]),_0x20ccb8[_0xe72ace(0x1ee)];}async function callGetCliToken(_0x64c6a6,_0x433356){const _0x4087af=_0x3ab8d0,_0x28c410={'DCarW':function(_0x178ce8,_0x339aa5,_0x4d1149){return _0x178ce8(_0x339aa5,_0x4d1149);},'WxEwx':'POST','wjENN':function(_0x286d43,_0x24c78e){return _0x286d43(_0x24c78e);},'Wqbsf':'Initializing\x20MCP\x20session...','GfOvR':'2025-03-26','RAUdE':'notifications/initialized','VTLcb':'Requesting\x20CLI\x20token...','ljsid':function(_0x567ff3,_0x5a532d){return _0x567ff3(_0x5a532d);},'OcVZx':'2.0','EANrm':_0x4087af(0x225),'eOPgC':'get_cli_token','sTzaT':'\x20done','NGFlk':_0x4087af(0x23d),'FnBej':_0x4087af(0x213),'yzPoI':'refresh.txt','OOSSv':function(_0x4a5144,_0x3def38,_0x262960){return _0x4a5144(_0x3def38,_0x262960);},'CyKMk':'Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a'},_0x2943f3={'Content-Type':_0x4087af(0x1f4),'Accept':_0x4087af(0x22a)};_0x433356&&(_0x2943f3['Authorization']='Bearer\x20'+_0x433356);const _0x182944=async _0x1e611e=>{const _0x1a1e63=_0x4087af,_0x1cd5b2=await _0x28c410[_0x1a1e63(0x210)](fetch,_0x64c6a6,{'method':_0x28c410['WxEwx'],'headers':_0x2943f3,'body':JSON['stringify'](_0x1e611e)});if(!_0x1cd5b2['ok']){const _0x1d44ad=await _0x1cd5b2['text']();throw new Error('HTTP\x20'+_0x1cd5b2['status']+':\x20'+_0x1d44ad);}return _0x28c410[_0x1a1e63(0x238)](parseResponse,_0x1cd5b2);};process[_0x4087af(0x20d)]['write'](_0x28c410[_0x4087af(0x263)]);const _0x3ea027=await _0x182944({'jsonrpc':_0x4087af(0x258),'id':0x1,'method':'initialize','params':{'protocolVersion':_0x28c410['GfOvR'],'capabilities':{},'clientInfo':{'name':'ranger-cli','version':'1.0.0'}}});if(_0x3ea027[_0x4087af(0x241)])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x3ea027[_0x4087af(0x241)]['message']??JSON[_0x4087af(0x23c)](_0x3ea027['error'])));console['log'](_0x4087af(0x231)),await _0x28c410['DCarW'](fetch,_0x64c6a6,{'method':_0x4087af(0x22d),'headers':_0x2943f3,'body':JSON['stringify']({'jsonrpc':'2.0','method':_0x28c410['RAUdE']})})[_0x4087af(0x22e)](_0x518833=>_0x518833['text']()),process[_0x4087af(0x20d)][_0x4087af(0x25b)](_0x28c410[_0x4087af(0x1fa)]);const _0x23549=await _0x28c410['ljsid'](_0x182944,{'jsonrpc':_0x28c410['OcVZx'],'id':0x2,'method':_0x28c410[_0x4087af(0x211)],'params':{'name':_0x28c410[_0x4087af(0x20c)],'arguments':{}}});if(_0x23549[_0x4087af(0x241)])throw new Error(_0x4087af(0x226)+(_0x23549['error']['message']??JSON['stringify'](_0x23549[_0x4087af(0x241)])));console['log'](_0x28c410['sTzaT']);const _0x4cef8f=_0x28c410['ljsid'](extractToken,_0x23549[_0x4087af(0x20e)]);if(!_0x4cef8f){console['error'](_0x28c410[_0x4087af(0x21b)]),console[_0x4087af(0x241)](JSON[_0x4087af(0x23c)](_0x23549['result'],null,0x2));throw new Error(_0x28c410['FnBej']);}const _0x312692=join(homedir(),'.ranger'),_0x3e0c76=join(_0x312692,_0x28c410[_0x4087af(0x20b)]);await _0x28c410['OOSSv'](mkdir,_0x312692,{'recursive':!![]}),await writeFile(_0x3e0c76,_0x4cef8f,{'mode':0x180}),await writeFile(join(_0x312692,_0x4087af(0x248)),_0x64c6a6,{'mode':0x180}),console[_0x4087af(0x262)]('\x0aToken\x20written\x20to\x20'+_0x3e0c76),console[_0x4087af(0x262)](_0x28c410[_0x4087af(0x21a)]);}async function fetchAuthServerMetadata(_0x3939a5){const _0xadf8b4=_0x3ab8d0,_0x34d141=_0x3939a5+_0xadf8b4(0x27b),_0x171498=await fetch(_0x34d141);if(!_0x171498['ok'])throw new Error(_0xadf8b4(0x246)+_0x34d141+':\x20'+_0x171498['status']);return _0x171498[_0xadf8b4(0x27f)]();}function waitForCallback(_0x261eb5){const _0x488d51=_0x3ab8d0,_0x4c071d={'nFXKj':function(_0x11a44d,_0x546695){return _0x11a44d!==_0x546695;},'Mxnkl':_0x488d51(0x1f6),'wbGVb':_0x488d51(0x26d),'xzUWC':_0x488d51(0x25d),'topVn':'text/html','CLCsq':function(_0x38c1a4,_0x452dfa){return _0x38c1a4(_0x452dfa);},'nbokd':_0x488d51(0x230),'ClGdI':function(_0x2de70e){return _0x2de70e();},'UktJc':function(_0x3f491e,_0x5e84ba,_0x1efcb2){return _0x3f491e(_0x5e84ba,_0x1efcb2);}};return new Promise((_0x342b5e,_0x484be0)=>{const _0x135102={'bKOAy':function(_0x59b0b7){return _0x59b0b7();}},_0x1854e4=()=>{_0x4ca5e5['closeAllConnections'](),_0x4ca5e5['close']();},_0x7d8dc2=_0x4c071d['UktJc'](setTimeout,()=>{const _0x2bdcdf=_0x29e4;_0x135102[_0x2bdcdf(0x24b)](_0x1854e4),_0x484be0(new OAuthTimeoutError('OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes'));},0x1d4c0),_0x4ca5e5=createServer((_0x1972b1,_0x1c96aa)=>{const _0x4ac325=_0x29e4,_0x596847=new URL(_0x1972b1['url']??'/','http://localhost:'+CALLBACK_PORT);if(_0x4c071d['nFXKj'](_0x596847[_0x4ac325(0x271)],'/callback')){_0x1c96aa['writeHead'](0x194),_0x1c96aa['end'](_0x4ac325(0x24d));return;}const _0x4b0887=_0x596847[_0x4ac325(0x27d)]['get'](_0x4c071d['Mxnkl']),_0x1a3960=_0x596847['searchParams'][_0x4ac325(0x235)](_0x4c071d['wbGVb']),_0x21c35a=_0x596847['searchParams']['get'](_0x4ac325(0x241));if(_0x21c35a){const _0x38ee5a=_0x596847[_0x4ac325(0x27d)]['get'](_0x4c071d[_0x4ac325(0x23a)])??_0x21c35a;_0x1c96aa['writeHead'](0xc8,{'Content-Type':_0x4c071d['topVn']}),_0x1c96aa[_0x4ac325(0x24e)]('<html><body><h2>Authentication\x20failed</h2><p>'+_0x38ee5a+_0x4ac325(0x274)),_0x4c071d['CLCsq'](clearTimeout,_0x7d8dc2),_0x1854e4(),_0x484be0(new Error('OAuth\x20error:\x20'+_0x38ee5a));return;}if(!_0x4b0887||_0x4c071d['nFXKj'](_0x1a3960,_0x261eb5)){_0x1c96aa[_0x4ac325(0x215)](0x190,{'Content-Type':_0x4c071d[_0x4ac325(0x223)]}),_0x1c96aa[_0x4ac325(0x24e)](_0x4c071d[_0x4ac325(0x219)]);return;}_0x1c96aa[_0x4ac325(0x215)](0xc8,{'Content-Type':'text/html'}),_0x1c96aa['end'](_0x4ac325(0x249)),clearTimeout(_0x7d8dc2),_0x4c071d[_0x4ac325(0x21c)](_0x1854e4),_0x4c071d['CLCsq'](_0x342b5e,_0x4b0887);});_0x4ca5e5['listen'](CALLBACK_PORT,'127.0.0.1');});}async function openBrowser(_0x173dfc){const _0x2ee351=_0x3ab8d0,_0x5d0571={'RSryl':function(_0x35af0d,_0x274c68){return _0x35af0d===_0x274c68;},'Zbdhi':_0x2ee351(0x208),'IeXVs':_0x2ee351(0x212),'MMUUA':_0x2ee351(0x24a)},_0x555310=_0x5d0571[_0x2ee351(0x220)](process[_0x2ee351(0x21d)],'darwin')?_0x2ee351(0x257):_0x5d0571[_0x2ee351(0x220)](process['platform'],_0x5d0571[_0x2ee351(0x244)])?_0x5d0571[_0x2ee351(0x22c)]:_0x5d0571[_0x2ee351(0x252)];exec(_0x555310+'\x20\x22'+_0x173dfc+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x33c5bc=_0x3ab8d0,_0x4cacb3={'ylnLy':_0x33c5bc(0x21f)};try{const _0x540067=JSON[_0x33c5bc(0x228)](await readFile(TOKEN_CACHE_PATH,_0x4cacb3['ylnLy']));if(_0x540067['origin']&&_0x540067[_0x33c5bc(0x203)]!==currentOrigin)return null;if(_0x540067[_0x33c5bc(0x25f)]&&Date[_0x33c5bc(0x26c)]()>_0x540067[_0x33c5bc(0x25f)])return null;return _0x540067[_0x33c5bc(0x245)]??null;}catch{return null;}}function _0x29e4(_0x5c8017,_0xeaac59){_0x5c8017=_0x5c8017-0x1ee;const _0x708d65=_0x708d();let _0x29e4fb=_0x708d65[_0x5c8017];return _0x29e4fb;}async function saveCachedToken(_0x5c0dc1,_0x18aa9d,_0x416b15){const _0x50c1c2=_0x3ab8d0,_0x3331be={'MGOdW':function(_0x4db5fe){return _0x4db5fe();},'ZdHFR':function(_0x2433b7,_0xe6fb2a){return _0x2433b7*_0xe6fb2a;},'opfpI':function(_0x130fcf,_0x99761,_0x519594){return _0x130fcf(_0x99761,_0x519594);},'VYfJE':_0x50c1c2(0x229),'psdnS':function(_0x5dc94d,_0x53289b,_0x115503,_0x1ef109){return _0x5dc94d(_0x53289b,_0x115503,_0x1ef109);}},_0x6519dc=await _0x3331be[_0x50c1c2(0x280)](loadCachedData),_0x83089f={..._0x6519dc,'origin':currentOrigin,'accessToken':_0x5c0dc1,'refreshToken':_0x18aa9d??_0x6519dc?.[_0x50c1c2(0x237)],'expiresAt':_0x416b15?Date['now']()+_0x3331be['ZdHFR'](_0x416b15,0x3e8):undefined};await mkdir(_0x3331be['opfpI'](join,homedir(),_0x3331be['VYfJE']),{'recursive':!![]}),await _0x3331be[_0x50c1c2(0x221)](writeFile,TOKEN_CACHE_PATH,JSON[_0x50c1c2(0x23c)](_0x83089f),{'mode':0x180});}async function loadCachedClient(){const _0x952117=_0x3ab8d0,_0x5947a2={'iFbQB':function(_0x270df1){return _0x270df1();}},_0xafa5bf=await _0x5947a2['iFbQB'](loadCachedData);if(_0xafa5bf?.['origin']&&_0xafa5bf['origin']!==currentOrigin)return null;return _0xafa5bf?.['clientId']?{'clientId':_0xafa5bf[_0x952117(0x1f3)],'clientSecret':_0xafa5bf[_0x952117(0x242)]}:null;}async function clearCachedClient(){const _0x17ad18=_0x3ab8d0,_0x43f63={'kGGuC':function(_0x524c12){return _0x524c12();},'lOfEH':function(_0x21e8ff,_0x427e46,_0x309d45,_0x109be7){return _0x21e8ff(_0x427e46,_0x309d45,_0x109be7);}},_0x32b69f=await _0x43f63['kGGuC'](loadCachedData);if(!_0x32b69f)return;const {clientId:_0x1dbf1e,clientSecret:_0x1b0122,..._0x1d5dc6}=_0x32b69f;await _0x43f63[_0x17ad18(0x209)](writeFile,TOKEN_CACHE_PATH,JSON[_0x17ad18(0x23c)](_0x1d5dc6),{'mode':0x180});}async function saveCachedClient(_0x48f921,_0x336cd2){const _0x16949f=_0x3ab8d0,_0x527662={'DxHBP':function(_0x50ebef){return _0x50ebef();},'VgWUA':function(_0x4e2f23,_0x128e0e,_0x40e4ef){return _0x4e2f23(_0x128e0e,_0x40e4ef);},'glFIr':function(_0x3800ac){return _0x3800ac();}},_0x3e27b9=await _0x527662['DxHBP'](loadCachedData),_0x53623c={..._0x3e27b9,'origin':currentOrigin,'accessToken':_0x3e27b9?.[_0x16949f(0x245)]??'','clientId':_0x48f921,'clientSecret':_0x336cd2};await mkdir(_0x527662['VgWUA'](join,_0x527662[_0x16949f(0x224)](homedir),_0x16949f(0x229)),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x53623c),{'mode':0x180});}async function loadCachedData(){const _0x4f2fc2=_0x3ab8d0,_0x3b4d20={'IpVEn':function(_0x5ca07e,_0x1987cb,_0x1c5f73){return _0x5ca07e(_0x1987cb,_0x1c5f73);}};try{return JSON[_0x4f2fc2(0x228)](await _0x3b4d20[_0x4f2fc2(0x25a)](readFile,TOKEN_CACHE_PATH,'utf-8'));}catch{return null;}}async function parseResponse(_0x499afa){const _0x1fc149=_0x3ab8d0,_0x1ca8a3={'DtqWZ':_0x1fc149(0x24c),'HzBlD':_0x1fc149(0x25c),'Fdhyi':_0x1fc149(0x27a),'KmXkt':function(_0x863b0f,_0x479e4c){return _0x863b0f!==_0x479e4c;},'DQXGh':_0x1fc149(0x259)},_0x579475=_0x499afa['headers']['get'](_0x1ca8a3[_0x1fc149(0x201)])??'';if(_0x579475['includes'](_0x1ca8a3['HzBlD'])){const _0xa4dc2f=await _0x499afa[_0x1fc149(0x25e)]();for(const _0x578fd8 of _0xa4dc2f['split']('\x0a')){const _0xe11c5c=_0x578fd8['trim']();if(_0xe11c5c[_0x1fc149(0x1f1)](_0x1ca8a3[_0x1fc149(0x273)])){const _0x3c0be1=_0xe11c5c['slice'](_0x1ca8a3[_0x1fc149(0x273)][_0x1fc149(0x22b)])['trim']();if(!_0x3c0be1)continue;try{const _0x3c8582=JSON[_0x1fc149(0x228)](_0x3c0be1);if(_0x1ca8a3['KmXkt'](_0x3c8582['id'],undefined)||_0x3c8582['error'])return _0x3c8582;}catch{}}}throw new Error(_0x1ca8a3[_0x1fc149(0x243)]);}return _0x499afa['json']();}function extractToken(_0x57c24b){const _0x1507fb=_0x3ab8d0,_0x1f941f={'QyvgC':function(_0x35e239,_0x1f8175){return _0x35e239===_0x1f8175;},'YeCUj':'string'};if(!_0x57c24b)return null;const _0xfacb1a=_0x57c24b['structuredContent'];if(_0xfacb1a?.['token']&&_0x1f941f['QyvgC'](typeof _0xfacb1a[_0x1507fb(0x265)],_0x1f941f[_0x1507fb(0x253)]))return _0xfacb1a['token'];if(_0x57c24b[_0x1507fb(0x272)]){const _0x2c7c74=_0x57c24b['content'];throw new Error(_0x1507fb(0x247)+(_0x2c7c74?.[0x0]?.[_0x1507fb(0x25e)]??_0x1507fb(0x279)));}const _0x22a887=_0x57c24b['content'];if(_0x22a887)for(const _0x57b257 of _0x22a887){if(_0x57b257[_0x1507fb(0x240)]==='text'&&_0x57b257[_0x1507fb(0x25e)]){try{const _0x120e32=JSON[_0x1507fb(0x228)](_0x57b257[_0x1507fb(0x25e)]);if(_0x1f941f[_0x1507fb(0x206)](typeof _0x120e32?.[_0x1507fb(0x265)],_0x1f941f[_0x1507fb(0x253)]))return _0x120e32['token'];}catch{}const _0xaafd9e=_0x57b257['text']['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0xaafd9e)return _0xaafd9e[0x1];}}return null;}
@@ -1 +1 @@
1
- function _0x17d4(){var _0x24d5a9=['4710810zlKbSt','560004jFRwxY','99447rjZOov','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a','1629FRrClp','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','6504sVKwYJ','2IyxgMQ','SIyDE','exit','205028ABzEjI','ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','60981qXcRZW','\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','10HUktVp','fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.','wlhMT','1217685gEjojn','neWPf'];_0x17d4=function(){return _0x24d5a9;};return _0x17d4();}(function(_0x4b44a2,_0xe94e5b){var _0x38128d=_0x2e3a,_0x3b3691=_0x4b44a2();while(!![]){try{var _0x304f56=parseInt(_0x38128d(0x1bc))/0x1+-parseInt(_0x38128d(0x1b7))/0x2*(-parseInt(_0x38128d(0x1b1))/0x3)+parseInt(_0x38128d(0x1ba))/0x4+parseInt(_0x38128d(0x1be))/0x5*(-parseInt(_0x38128d(0x1c4))/0x6)+-parseInt(_0x38128d(0x1c1))/0x7+-parseInt(_0x38128d(0x1b6))/0x8*(parseInt(_0x38128d(0x1b4))/0x9)+parseInt(_0x38128d(0x1c3))/0xa;if(_0x304f56===_0xe94e5b)break;else _0x3b3691['push'](_0x3b3691['shift']());}catch(_0x11a2b9){_0x3b3691['push'](_0x3b3691['shift']());}}}(_0x17d4,0x1a894));function _0x2e3a(_0x521dd1,_0x270b53){_0x521dd1=_0x521dd1-0x1b1;var _0x17d4de=_0x17d4();var _0x2e3ad8=_0x17d4de[_0x521dd1];return _0x2e3ad8;}export async function migrateProfile(_0x7875f4,_0x4f7520){var _0x2f3a9d=_0x2e3a,_0x59f9d4={'wlhMT':function(_0x3ded02,_0x3cb221){return _0x3ded02+_0x3cb221;},'wOapk':function(_0x8cd157,_0x2a597f){return _0x8cd157+_0x2a597f;},'neWPf':_0x2f3a9d(0x1bb),'OgqXi':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','SIyDE':_0x2f3a9d(0x1b3)};console['error'](_0x59f9d4[_0x2f3a9d(0x1c0)](_0x59f9d4[_0x2f3a9d(0x1c0)](_0x59f9d4['wOapk'](_0x59f9d4[_0x2f3a9d(0x1c2)],'\x0a')+_0x2f3a9d(0x1b2)+_0x59f9d4['OgqXi']+'\x0a',_0x2f3a9d(0x1b5)),_0x2f3a9d(0x1bd))+'\x0a'+_0x59f9d4[_0x2f3a9d(0x1b8)]+_0x2f3a9d(0x1bf)),process[_0x2f3a9d(0x1b9)](0x1);}
1
+ (function(_0x444f87,_0x282da0){var _0x4742a2=_0x3660,_0x3c7c12=_0x444f87();while(!![]){try{var _0x4429a2=parseInt(_0x4742a2(0x195))/0x1+parseInt(_0x4742a2(0x19a))/0x2*(parseInt(_0x4742a2(0x192))/0x3)+-parseInt(_0x4742a2(0x187))/0x4*(-parseInt(_0x4742a2(0x193))/0x5)+parseInt(_0x4742a2(0x18b))/0x6*(parseInt(_0x4742a2(0x19b))/0x7)+-parseInt(_0x4742a2(0x18d))/0x8*(-parseInt(_0x4742a2(0x196))/0x9)+parseInt(_0x4742a2(0x199))/0xa+-parseInt(_0x4742a2(0x18c))/0xb;if(_0x4429a2===_0x282da0)break;else _0x3c7c12['push'](_0x3c7c12['shift']());}catch(_0x529407){_0x3c7c12['push'](_0x3c7c12['shift']());}}}(_0x139d,0xd3dba));function _0x3660(_0x4eb097,_0x46418a){_0x4eb097=_0x4eb097-0x187;var _0x139d24=_0x139d();var _0x366033=_0x139d24[_0x4eb097];return _0x366033;}function _0x139d(){var _0x541cf0=['931219RSZFwj','4202424qwKABo','error','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','17317380EoOVSX','38hLCJpl','182MTHCLE','4iNEYtW','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ArnHN','jsfnQ','152904DrsGwm','46782747YnbzBU','8cmmwoX','YwGAJ','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a','136821dyTLHF','2308685ufMDqC','vKeEn'];_0x139d=function(){return _0x541cf0;};return _0x139d();}export async function migrateProfile(_0x58e311,_0x278900){var _0x4e8f7c=_0x3660,_0x3a3b0c={'ArnHN':function(_0x3d9a10,_0x521189){return _0x3d9a10+_0x521189;},'vKeEn':_0x4e8f7c(0x190),'YwGAJ':'\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','jsfnQ':'fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.'};console[_0x4e8f7c(0x197)](_0x3a3b0c[_0x4e8f7c(0x189)](_0x3a3b0c['ArnHN'](_0x3a3b0c[_0x4e8f7c(0x189)](_0x3a3b0c[_0x4e8f7c(0x194)]+'\x0a',_0x4e8f7c(0x198))+_0x4e8f7c(0x188)+'\x0a'+_0x4e8f7c(0x18f),_0x3a3b0c[_0x4e8f7c(0x18e)])+'\x0a',_0x4e8f7c(0x191))+_0x3a3b0c[_0x4e8f7c(0x18a)]),process['exit'](0x1);}
@@ -1 +1 @@
1
- (function(_0x767f11,_0x1cf4f8){const _0x5ccc6d=_0x1afd,_0x765fd2=_0x767f11();while(!![]){try{const _0x328ff1=-parseInt(_0x5ccc6d(0x13a))/0x1+parseInt(_0x5ccc6d(0x143))/0x2+parseInt(_0x5ccc6d(0x112))/0x3*(parseInt(_0x5ccc6d(0x128))/0x4)+parseInt(_0x5ccc6d(0x137))/0x5*(parseInt(_0x5ccc6d(0x134))/0x6)+parseInt(_0x5ccc6d(0x11d))/0x7+-parseInt(_0x5ccc6d(0x11a))/0x8*(parseInt(_0x5ccc6d(0x140))/0x9)+-parseInt(_0x5ccc6d(0x12f))/0xa;if(_0x328ff1===_0x1cf4f8)break;else _0x765fd2['push'](_0x765fd2['shift']());}catch(_0x583d3d){_0x765fd2['push'](_0x765fd2['shift']());}}}(_0x3ff5,0xf2c28));import{join}from'path';import{existsSync}from'fs';function _0x3ff5(){const _0x28a90a=['❌\x20Failed\x20to\x20install\x20plugin:','pluginScope','marketplace','deBZg','189920SgidxB','list','eBqGV','8651006efluKm','bEWNG','❌\x20Failed\x20to\x20add\x20marketplace:','ranger@trailhead','User\x20(available\x20in\x20all\x20your\x20projects)','tVNIr','SKILL.md','Where\x20should\x20the\x20plugin\x20be\x20installed?','Project\x20(shared\x20with\x20team\x20via\x20git)','user','HSxgI','953948XEGPYr','enable','rrZOG','trailhead','log','prompt','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','34114090dUwpEX','qmDRp','mXKMa','ZUYOw','LAIkp','156qmsNDw','oYoxf','sZUhO','319635RRLPiC','syLJQ','push','304374forDqY','error','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','xQMWD','.claude','ZOuhY','162LAdBLy','project','eNWtz','1140156HNCVaH','ranger-testing/trailhead','cKFiB','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','fggEO','ranger','output','21zoygKG','bVyJM','XqxWg','XIZqo'];_0x3ff5=function(){return _0x28a90a;};return _0x3ff5();}function _0x1afd(_0x6a04c8,_0x5a452e){_0x6a04c8=_0x6a04c8-0x10f;const _0x3ff5cd=_0x3ff5();let _0x1afdb3=_0x3ff5cd[_0x6a04c8];return _0x1afdb3;}import _0x5a5dce 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(_0x15c95c){const _0x2c7112=_0x1afd,_0x30f2f8={'SuCCu':function(_0x13d7e5,_0x50fba8){return _0x13d7e5(_0x50fba8);},'cOzge':function(_0x17fd48,_0x214767){return _0x17fd48(_0x214767);},'CavgL':function(_0x4deee2){return _0x4deee2();},'HSxgI':'project','rrZOG':_0x2c7112(0x12e),'deBZg':'pluginScope','QoDMo':_0x2c7112(0x124),'xQMWD':_0x2c7112(0x121),'Mudfa':_0x2c7112(0x126),'XIZqo':_0x2c7112(0x12b),'syLJQ':function(_0xfd6280,_0xad109d){return _0xfd6280(_0xad109d);},'BoxcY':'add','qmDRp':_0x2c7112(0x144),'PikST':_0x2c7112(0x11f),'bEWNG':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','oYoxf':'--scope','bVyJM':function(_0x4cc6d1,_0x4d3817){return _0x4cc6d1===_0x4d3817;},'XqxWg':_0x2c7112(0x116),'ZOuhY':'\x0aYou\x20can\x20install\x20manually\x20with:','fggEO':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','Krubz':'plugin','tVNIr':_0x2c7112(0x129),'sZUhO':_0x2c7112(0x120),'LAIkp':function(_0x579920,_0x1c6ede,_0x2ceb84){return _0x579920(_0x1c6ede,_0x2ceb84);},'DTUAO':function(_0x115ef3,_0x1e6597){return _0x115ef3===_0x1e6597;},'cFfWQ':function(_0x41d0af){return _0x41d0af();},'cKFiB':'already\x20enabled'},_0x4da4e1=await _0x30f2f8['SuCCu'](isPluginInstalled,_0x2c7112(0x120));if(_0x4da4e1)return console[_0x2c7112(0x12c)]('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x18b955=_0x30f2f8['cOzge'](existsSync,join(_0x30f2f8['CavgL'](getProjectRoot),_0x2c7112(0x13e)));let _0x15366f;if(_0x15c95c)_0x15366f=_0x15c95c;else{if(_0x18b955)_0x15366f=_0x30f2f8['HSxgI'];else{console['log'](_0x30f2f8[_0x2c7112(0x12a)]);const _0x17fdda=await _0x5a5dce['prompt']([{'type':_0x2c7112(0x11b),'name':_0x30f2f8[_0x2c7112(0x119)],'message':_0x30f2f8['QoDMo'],'choices':[{'name':_0x30f2f8[_0x2c7112(0x13d)],'value':'user'},{'name':_0x2c7112(0x125),'value':_0x30f2f8['HSxgI']}],'default':_0x30f2f8['Mudfa']}]);_0x15366f=_0x17fdda[_0x2c7112(0x117)];}}console['log'](_0x2c7112(0x13c)+_0x15366f+'\x20level)...\x0a');const _0x4c74a4=await isMarketplaceAdded(_0x30f2f8[_0x2c7112(0x115)]);let _0x7ab09c=_0x4c74a4;if(_0x4c74a4)console[_0x2c7112(0x12c)]('✓\x20Marketplace\x20already\x20added');else{const _0x15c33a=await _0x30f2f8[_0x2c7112(0x138)](runClaudeCommand,['plugin',_0x2c7112(0x118),_0x30f2f8['BoxcY'],_0x30f2f8[_0x2c7112(0x130)]]);!_0x15c33a['success']?(console['error'](_0x30f2f8['PikST'],_0x15c33a[_0x2c7112(0x13b)]),console[_0x2c7112(0x12c)]('\x0aYou\x20can\x20install\x20manually\x20with:'),console['log'](_0x30f2f8[_0x2c7112(0x11e)]),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x15366f)):_0x7ab09c=!![];}if(_0x7ab09c){const _0x485867=await runClaudeCommand(['plugin','install',_0x2c7112(0x120),_0x30f2f8[_0x2c7112(0x135)],_0x15366f],{'cwd':_0x30f2f8[_0x2c7112(0x113)](_0x15366f,_0x30f2f8[_0x2c7112(0x127)])?_0x30f2f8['CavgL'](getProjectRoot):undefined});if(!_0x485867['success'])console[_0x2c7112(0x13b)](_0x30f2f8[_0x2c7112(0x114)],_0x485867['error']),console['log'](_0x30f2f8[_0x2c7112(0x13f)]),console['log'](_0x2c7112(0x146)+_0x15366f);else{console[_0x2c7112(0x12c)](_0x30f2f8[_0x2c7112(0x10f)]);const _0x5132f8=[_0x30f2f8['Krubz'],_0x30f2f8[_0x2c7112(0x122)],_0x30f2f8[_0x2c7112(0x136)]];_0x15366f===_0x2c7112(0x141)&&_0x5132f8[_0x2c7112(0x139)](_0x30f2f8[_0x2c7112(0x135)],'project');const _0x18dfc7=await _0x30f2f8[_0x2c7112(0x133)](runClaudeCommand,_0x5132f8,{'captureOutput':!![],'cwd':_0x30f2f8['DTUAO'](_0x15366f,_0x30f2f8[_0x2c7112(0x127)])?_0x30f2f8['cFfWQ'](getProjectRoot):undefined}),_0x576d16=_0x18dfc7[_0x2c7112(0x111)]?.['includes'](_0x30f2f8[_0x2c7112(0x145)]);!_0x18dfc7['success']&&!_0x576d16?console[_0x2c7112(0x13b)]('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x18dfc7[_0x2c7112(0x13b)]):console['log']('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}export async function ensureClaudeSkills(_0x58ecca){const _0x3e5548=_0x1afd,_0x383981={'INOdq':function(_0x101a95,_0x3a809e){return _0x101a95(_0x3a809e);},'mXKMa':function(_0x502d9f,_0x37ff31,_0x5d1936,_0x22f89e){return _0x502d9f(_0x37ff31,_0x5d1936,_0x22f89e);},'bpRvj':'project','nUxwe':'ranger','eBqGV':function(_0x326b54,_0x14281a){return _0x326b54||_0x14281a;},'ZUYOw':function(_0x28e067,_0x1a6b66){return _0x28e067(_0x1a6b66);},'eNWtz':function(_0x1a57c8,_0x220cb7,_0x2aeeee){return _0x1a57c8(_0x220cb7,_0x2aeeee);}},_0x4129cc=existsSync(join(getSkillsDir('user'),_0x3e5548(0x110),'SKILL.md')),_0x1ca74d=_0x383981['INOdq'](existsSync,_0x383981[_0x3e5548(0x131)](join,_0x383981['INOdq'](getSkillsDir,_0x383981['bpRvj']),_0x383981['nUxwe'],_0x3e5548(0x123)));if(_0x383981[_0x3e5548(0x11c)](_0x4129cc,_0x1ca74d))return console['log']('✓\x20Ranger\x20skills\x20already\x20installed'),![];const _0x2e9adb=_0x383981['ZUYOw'](existsSync,_0x383981[_0x3e5548(0x142)](join,getProjectRoot(),_0x3e5548(0x13e)));let _0xdf00e2=!![];if(_0x58ecca)await skillup({'autoInstall':_0x58ecca,'suppressUsage':!![]});else{if(_0x2e9adb)await _0x383981[_0x3e5548(0x132)](skillup,{'autoInstall':'project','suppressUsage':!![]});else{const _0x4ce8c5=await _0x5a5dce[_0x3e5548(0x12d)]([{'type':'confirm','name':'wantsSkillup','message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0xdf00e2=_0x4ce8c5['wantsSkillup'],_0xdf00e2&&await skillup({'suppressUsage':!![]});}}return _0xdf00e2;}
1
+ (function(_0x2c7d38,_0x2dc693){const _0x37b489=_0x24db,_0x152f5d=_0x2c7d38();while(!![]){try{const _0x456bde=parseInt(_0x37b489(0x1e1))/0x1*(parseInt(_0x37b489(0x1dd))/0x2)+parseInt(_0x37b489(0x1ec))/0x3*(parseInt(_0x37b489(0x1e0))/0x4)+-parseInt(_0x37b489(0x1f4))/0x5*(-parseInt(_0x37b489(0x1ff))/0x6)+parseInt(_0x37b489(0x1f3))/0x7+parseInt(_0x37b489(0x1f6))/0x8+parseInt(_0x37b489(0x1f1))/0x9*(parseInt(_0x37b489(0x1f9))/0xa)+-parseInt(_0x37b489(0x1eb))/0xb;if(_0x456bde===_0x2dc693)break;else _0x152f5d['push'](_0x152f5d['shift']());}catch(_0xc4d3ab){_0x152f5d['push'](_0x152f5d['shift']());}}}(_0x288d,0xacbfc));function _0x288d(){const _0x14756d=['ranger@trailhead','45355706HnTllx','3Kancss','success','ySsbH','trailhead','--scope','9XlwLfp','Uenql','6991880wzcYvX','5UiHEJS','❌\x20Failed\x20to\x20add\x20marketplace:','852816zLNbEC','qWGhQ','nFnYP','13926670Zfumls','enable','FxvyX','\x0aYou\x20can\x20install\x20manually\x20with:','ibMTK','❌\x20Failed\x20to\x20install\x20plugin:','4313322qEFjGl','marketplace','✓\x20Ranger\x20skills\x20already\x20installed','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','SKILL.md','error','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','.claude','wantsSkillup','WKtip','bvXsM','pluginScope','project','KwxRC','prompt','FUtjq','ranger-testing/trailhead','push','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','gKJvO','761870kdVvLj','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','already\x20enabled','1884100xIkLQH','3lNWgmF','rWUgU','ezllJ','log','yCsAo','Where\x20should\x20the\x20plugin\x20be\x20installed?','plugin','ranger','user'];_0x288d=function(){return _0x14756d;};return _0x288d();}import{join}from'path';import{existsSync}from'fs';import _0x145c98 from'inquirer';function _0x24db(_0x2d9668,_0x18c088){_0x2d9668=_0x2d9668-0x1d6;const _0x288db8=_0x288d();let _0x24db40=_0x288db8[_0x2d9668];return _0x24db40;}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0xf683d8){const _0x535f96=_0x24db,_0x5b16a0={'GeMxU':function(_0x4d963d,_0x16f869){return _0x4d963d(_0x16f869);},'ybCqv':function(_0x266bc6,_0x334de7,_0x90f3cd){return _0x266bc6(_0x334de7,_0x90f3cd);},'HpFFs':_0x535f96(0x205),'gAFeY':'list','ezllJ':'Project\x20(shared\x20with\x20team\x20via\x20git)','BZEZN':_0x535f96(0x1e9),'Uenql':_0x535f96(0x200),'KqnoW':'add','yCsAo':'plugin','nFnYP':_0x535f96(0x1f0),'rWUgU':function(_0x6708e5,_0x23dd59){return _0x6708e5===_0x23dd59;},'bTxrB':function(_0x2a6bf9){return _0x2a6bf9();},'ibMTK':_0x535f96(0x1fe),'KwxRC':_0x535f96(0x1db),'CCUGO':function(_0x45dd7e){return _0x45dd7e();},'UKTwd':_0x535f96(0x1df)},_0x532eb7=await isPluginInstalled(_0x535f96(0x1ea));if(_0x532eb7)return console[_0x535f96(0x1e4)]('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x50d91e=_0x5b16a0['GeMxU'](existsSync,_0x5b16a0['ybCqv'](join,getProjectRoot(),'.claude'));let _0x8b22d9;if(_0xf683d8)_0x8b22d9=_0xf683d8;else{if(_0x50d91e)_0x8b22d9=_0x535f96(0x20b);else{console[_0x535f96(0x1e4)](_0x5b16a0['HpFFs']);const _0x541911=await _0x145c98[_0x535f96(0x1d7)]([{'type':_0x5b16a0['gAFeY'],'name':_0x535f96(0x20a),'message':_0x535f96(0x1e6),'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x535f96(0x1e9)},{'name':_0x5b16a0[_0x535f96(0x1e3)],'value':'project'}],'default':_0x5b16a0['BZEZN']}]);_0x8b22d9=_0x541911[_0x535f96(0x20a)];}}console['log'](_0x535f96(0x202)+_0x8b22d9+'\x20level)...\x0a');const _0x4d86e8=await isMarketplaceAdded(_0x535f96(0x1ef));let _0x5990c3=_0x4d86e8;if(_0x4d86e8)console[_0x535f96(0x1e4)]('✓\x20Marketplace\x20already\x20added');else{const _0x53c891=await runClaudeCommand(['plugin',_0x5b16a0[_0x535f96(0x1f2)],_0x5b16a0['KqnoW'],_0x535f96(0x1d9)]);!_0x53c891['success']?(console['error'](_0x535f96(0x1f5),_0x53c891['error']),console['log'](_0x535f96(0x1fc)),console[_0x535f96(0x1e4)]('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console[_0x535f96(0x1e4)](_0x535f96(0x1de)+_0x8b22d9)):_0x5990c3=!![];}if(_0x5990c3){const _0x55bad9=await _0x5b16a0['ybCqv'](runClaudeCommand,[_0x5b16a0[_0x535f96(0x1e5)],'install','ranger@trailhead',_0x5b16a0[_0x535f96(0x1f8)],_0x8b22d9],{'cwd':_0x5b16a0[_0x535f96(0x1e2)](_0x8b22d9,'project')?_0x5b16a0['bTxrB'](getProjectRoot):undefined});if(!_0x55bad9[_0x535f96(0x1ed)])console[_0x535f96(0x204)](_0x5b16a0[_0x535f96(0x1fd)],_0x55bad9[_0x535f96(0x204)]),console[_0x535f96(0x1e4)]('\x0aYou\x20can\x20install\x20manually\x20with:'),console['log'](_0x535f96(0x1de)+_0x8b22d9);else{console[_0x535f96(0x1e4)](_0x5b16a0[_0x535f96(0x1d6)]);const _0x2e4654=[_0x535f96(0x1e7),_0x535f96(0x1fa),'ranger@trailhead'];_0x5b16a0['rWUgU'](_0x8b22d9,'project')&&_0x2e4654[_0x535f96(0x1da)]('--scope',_0x535f96(0x20b));const _0x3723f=await runClaudeCommand(_0x2e4654,{'captureOutput':!![],'cwd':_0x5b16a0['rWUgU'](_0x8b22d9,'project')?_0x5b16a0['CCUGO'](getProjectRoot):undefined}),_0x5bcb1e=_0x3723f['output']?.['includes'](_0x5b16a0['UKTwd']);!_0x3723f['success']&&!_0x5bcb1e?console[_0x535f96(0x204)]('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x3723f['error']):console[_0x535f96(0x1e4)]('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}export async function ensureClaudeSkills(_0x3e6d6b){const _0x347b13=_0x24db,_0x59353e={'FxvyX':function(_0x5d33f5,_0x3cda23,_0x2362a8,_0x233382){return _0x5d33f5(_0x3cda23,_0x2362a8,_0x233382);},'qWGhQ':'user','ySsbH':'ranger','FUtjq':function(_0xa4d2e6,_0x487e8c){return _0xa4d2e6(_0x487e8c);},'gKJvO':_0x347b13(0x20b),'fEeos':_0x347b13(0x203),'bvXsM':_0x347b13(0x201),'XFwPl':function(_0x32b384,_0x2166be,_0x5469bf){return _0x32b384(_0x2166be,_0x5469bf);},'WKtip':_0x347b13(0x206),'mWBuC':'confirm'},_0xc2a6b9=existsSync(_0x59353e['FxvyX'](join,getSkillsDir(_0x59353e[_0x347b13(0x1f7)]),_0x59353e[_0x347b13(0x1ee)],'SKILL.md')),_0x38b37c=_0x59353e['FUtjq'](existsSync,_0x59353e[_0x347b13(0x1fb)](join,getSkillsDir(_0x59353e['gKJvO']),_0x347b13(0x1e8),_0x59353e['fEeos']));if(_0xc2a6b9||_0x38b37c)return console[_0x347b13(0x1e4)](_0x59353e[_0x347b13(0x209)]),![];const _0x38c1e1=existsSync(_0x59353e['XFwPl'](join,getProjectRoot(),_0x59353e[_0x347b13(0x208)]));let _0x322c11=!![];if(_0x3e6d6b)await _0x59353e[_0x347b13(0x1d8)](skillup,{'autoInstall':_0x3e6d6b,'suppressUsage':!![]});else{if(_0x38c1e1)await skillup({'autoInstall':_0x59353e[_0x347b13(0x1dc)],'suppressUsage':!![]});else{const _0x1dfa8c=await _0x145c98['prompt']([{'type':_0x59353e['mWBuC'],'name':_0x347b13(0x207),'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x322c11=_0x1dfa8c[_0x347b13(0x207)],_0x322c11&&await _0x59353e[_0x347b13(0x1d8)](skillup,{'suppressUsage':!![]});}}return _0x322c11;}
@@ -1 +1 @@
1
- (function(_0x3ed7ab,_0x29c96a){const _0x2c1943=_0x4a90,_0x48dd99=_0x3ed7ab();while(!![]){try{const _0x543cca=parseInt(_0x2c1943(0x1c1))/0x1+parseInt(_0x2c1943(0x1af))/0x2+parseInt(_0x2c1943(0x1bc))/0x3*(parseInt(_0x2c1943(0x1b8))/0x4)+parseInt(_0x2c1943(0x1b2))/0x5+-parseInt(_0x2c1943(0x1ba))/0x6+-parseInt(_0x2c1943(0x1ac))/0x7+-parseInt(_0x2c1943(0x1a9))/0x8;if(_0x543cca===_0x29c96a)break;else _0x48dd99['push'](_0x48dd99['shift']());}catch(_0x2f105d){_0x48dd99['push'](_0x48dd99['shift']());}}}(_0x25e7,0x2153d));function _0x4a90(_0x3fe4eb,_0x408d3a){_0x3fe4eb=_0x3fe4eb-0x1a9;const _0x25e7c4=_0x25e7();let _0x4a9006=_0x25e7c4[_0x3fe4eb];return _0x4a9006;}import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';function _0x25e7(){const _0x2c8503=['136691hmTGwT','project','152224MCHizw','$schema','log','293867UDIriN','QWwYE','stringify','378838lXBjRG','Where\x20should\x20the\x20plugin\x20be\x20installed?','list','252345CpWkhm','✓\x20OpenCode\x20plugin\x20configured','\x0a📦\x20OpenCode\x20Plugin\x0a','sIbdn','isArray','includes','4mBprhu','plugin','1218456xDbDlv','prompt','72045vidZPm','ZBoxU','pluginScope','user','Project\x20(shared\x20with\x20team\x20via\x20git)'];_0x25e7=function(){return _0x2c8503;};return _0x25e7();}import _0x30284d from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x306a66){const _0x4cdc40=_0x4a90,_0x14e5d1={'Jvaxz':function(_0x1f1544,_0x30f033,_0x5e0076){return _0x1f1544(_0x30f033,_0x5e0076);},'sIbdn':function(_0x3c4fe5,_0x43bfce){return _0x3c4fe5(_0x43bfce);},'zqocP':'project','QWwYE':'opencode.json','XWffI':_0x4cdc40(0x1be),'lajbv':_0x4cdc40(0x1bf),'ZBoxU':'https://opencode.ai/config.json','mtlnl':function(_0x32830c,_0x4e4ed8,_0x956339){return _0x32830c(_0x4e4ed8,_0x956339);},'uZlqc':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.'},_0x2f2b9b=existsSync(_0x14e5d1['Jvaxz'](join,_0x14e5d1[_0x4cdc40(0x1b5)](getOpencodeConfigDir,_0x14e5d1['zqocP']),_0x14e5d1[_0x4cdc40(0x1ad)]));let _0x45a9f2;if(_0x306a66)_0x45a9f2=_0x306a66;else{if(_0x2f2b9b)_0x45a9f2=_0x4cdc40(0x1c2);else{console[_0x4cdc40(0x1ab)](_0x4cdc40(0x1b4));const _0x3e6947=await _0x30284d[_0x4cdc40(0x1bb)]([{'type':_0x4cdc40(0x1b1),'name':_0x14e5d1['XWffI'],'message':_0x4cdc40(0x1b0),'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':'user'},{'name':_0x4cdc40(0x1c0),'value':_0x14e5d1['zqocP']}],'default':_0x14e5d1['lajbv']}]);_0x45a9f2=_0x3e6947[_0x4cdc40(0x1be)];}}const _0x2c996c=join(getOpencodeConfigDir(_0x45a9f2),_0x14e5d1['QWwYE']),_0xde4ed3='@ranger-testing/opencode-plugin',_0x33643d=_0x14e5d1[_0x4cdc40(0x1bd)];let _0x47a2ce={};if(existsSync(_0x2c996c))try{const _0x5cb3db=await _0x14e5d1['mtlnl'](readFile,_0x2c996c,'utf-8');_0x47a2ce=JSON['parse'](_0x5cb3db);}catch(_0x3d53df){return console['error'](_0x14e5d1['uZlqc']),{'configured':![],'scope':_0x45a9f2,'error':'Failed\x20to\x20read\x20opencode.json','details':_0x3d53df};}const _0x3c06c4=Array[_0x4cdc40(0x1b6)](_0x47a2ce[_0x4cdc40(0x1b9)])?_0x47a2ce['plugin']:[];if(_0x3c06c4[_0x4cdc40(0x1b7)](_0xde4ed3))return console['log']('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x45a9f2};return _0x47a2ce[_0x4cdc40(0x1aa)]=_0x47a2ce['$schema']||_0x33643d,_0x47a2ce['plugin']=[..._0x3c06c4,_0xde4ed3],await mkdir(getOpencodeConfigDir(_0x45a9f2),{'recursive':!![]}),await writeFile(_0x2c996c,JSON[_0x4cdc40(0x1ae)](_0x47a2ce,null,0x2)+'\x0a'),console['log'](_0x4cdc40(0x1b3)),{'configured':!![],'scope':_0x45a9f2};}
1
+ (function(_0x2d85eb,_0x1224af){const _0x3b5bc5=_0x5e60,_0x540985=_0x2d85eb();while(!![]){try{const _0x5d86a1=parseInt(_0x3b5bc5(0x95))/0x1+-parseInt(_0x3b5bc5(0x7e))/0x2*(-parseInt(_0x3b5bc5(0x81))/0x3)+parseInt(_0x3b5bc5(0x7b))/0x4*(-parseInt(_0x3b5bc5(0x8c))/0x5)+-parseInt(_0x3b5bc5(0x92))/0x6+-parseInt(_0x3b5bc5(0x85))/0x7+-parseInt(_0x3b5bc5(0x7f))/0x8+-parseInt(_0x3b5bc5(0x8f))/0x9*(-parseInt(_0x3b5bc5(0x91))/0xa);if(_0x5d86a1===_0x1224af)break;else _0x540985['push'](_0x540985['shift']());}catch(_0x3614ea){_0x540985['push'](_0x540985['shift']());}}}(_0x77e7,0x92b07));function _0x5e60(_0x3bf9a6,_0x375bee){_0x3bf9a6=_0x3bf9a6-0x78;const _0x77e72d=_0x77e7();let _0x5e607d=_0x77e72d[_0x3bf9a6];return _0x5e607d;}import{join}from'path';function _0x77e7(){const _0x11effd=['BszOZ','user','UmMDN','LwVDg','fNxGE','plugin','5TGDatX','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','XGphg','9pRkVNa','✓\x20OpenCode\x20plugin\x20already\x20configured','11039650LRZwcI','3975234qINHHp','isArray','bQvMT','371260HBwHrf','WnXvh','project','dxSAY','Project\x20(shared\x20with\x20team\x20via\x20git)','dusHE','\x0a📦\x20OpenCode\x20Plugin\x0a','$schema','utf-8','pluginScope','1875980tGVibh','cYxnX','https://opencode.ai/config.json','2176IecqPj','2243072YxVTyw','@ranger-testing/opencode-plugin','2589SlfADG','HaSZQ','QdQLZ','HylvB','2809884wsnGVH'];_0x77e7=function(){return _0x11effd;};return _0x77e7();}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x1d35d6 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x3e54c9){const _0x590f3a=_0x5e60,_0x610a52={'dusHE':function(_0x3f24d7,_0x331c48){return _0x3f24d7(_0x331c48);},'BszOZ':function(_0x224c8b,_0x5aa191,_0x2c093a){return _0x224c8b(_0x5aa191,_0x2c093a);},'XGphg':'opencode.json','fNxGE':'list','bQvMT':'Where\x20should\x20the\x20plugin\x20be\x20installed?','HaSZQ':'User\x20(available\x20in\x20all\x20your\x20projects)','cYxnX':_0x590f3a(0x97),'QdQLZ':'user','dxSAY':_0x590f3a(0x79),'UmMDN':_0x590f3a(0x8d),'LwVDg':'Failed\x20to\x20read\x20opencode.json','WnXvh':_0x590f3a(0x90),'HylvB':function(_0x103bc8,_0x28f4c8){return _0x103bc8+_0x28f4c8;}},_0x55c355=_0x610a52[_0x590f3a(0x9a)](existsSync,_0x610a52[_0x590f3a(0x86)](join,getOpencodeConfigDir(_0x590f3a(0x97)),_0x610a52[_0x590f3a(0x8e)]));let _0x565a9c;if(_0x3e54c9)_0x565a9c=_0x3e54c9;else{if(_0x55c355)_0x565a9c=_0x590f3a(0x97);else{console['log'](_0x590f3a(0x9b));const _0x4f9904=await _0x1d35d6['prompt']([{'type':_0x610a52[_0x590f3a(0x8a)],'name':_0x590f3a(0x7a),'message':_0x610a52[_0x590f3a(0x94)],'choices':[{'name':_0x610a52[_0x590f3a(0x82)],'value':_0x590f3a(0x87)},{'name':_0x590f3a(0x99),'value':_0x610a52[_0x590f3a(0x7c)]}],'default':_0x610a52[_0x590f3a(0x83)]}]);_0x565a9c=_0x4f9904['pluginScope'];}}const _0x19a94a=join(getOpencodeConfigDir(_0x565a9c),_0x610a52['XGphg']),_0x53e8c8=_0x590f3a(0x80),_0x35f49e=_0x590f3a(0x7d);let _0x3a9856={};if(_0x610a52[_0x590f3a(0x9a)](existsSync,_0x19a94a))try{const _0x48b8e1=await _0x610a52['BszOZ'](readFile,_0x19a94a,_0x610a52[_0x590f3a(0x98)]);_0x3a9856=JSON['parse'](_0x48b8e1);}catch(_0x239770){return console['error'](_0x610a52[_0x590f3a(0x88)]),{'configured':![],'scope':_0x565a9c,'error':_0x610a52[_0x590f3a(0x89)],'details':_0x239770};}const _0x1eae52=Array[_0x590f3a(0x93)](_0x3a9856[_0x590f3a(0x8b)])?_0x3a9856[_0x590f3a(0x8b)]:[];if(_0x1eae52['includes'](_0x53e8c8))return console['log'](_0x610a52[_0x590f3a(0x96)]),{'configured':![],'scope':_0x565a9c};return _0x3a9856['$schema']=_0x3a9856[_0x590f3a(0x78)]||_0x35f49e,_0x3a9856['plugin']=[..._0x1eae52,_0x53e8c8],await mkdir(getOpencodeConfigDir(_0x565a9c),{'recursive':!![]}),await writeFile(_0x19a94a,_0x610a52[_0x590f3a(0x84)](JSON['stringify'](_0x3a9856,null,0x2),'\x0a')),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x565a9c};}
@@ -1 +1 @@
1
- function _0x817a(_0x5ebc21,_0x5776a8){_0x5ebc21=_0x5ebc21-0x180;var _0x339583=_0x3395();var _0x817a5=_0x339583[_0x5ebc21];return _0x817a5;}(function(_0x957f8b,_0x4c32b9){var _0x45b814=_0x817a,_0x168523=_0x957f8b();while(!![]){try{var _0x59b11c=-parseInt(_0x45b814(0x185))/0x1*(parseInt(_0x45b814(0x187))/0x2)+parseInt(_0x45b814(0x182))/0x3+parseInt(_0x45b814(0x183))/0x4+-parseInt(_0x45b814(0x18a))/0x5+-parseInt(_0x45b814(0x180))/0x6+parseInt(_0x45b814(0x184))/0x7*(parseInt(_0x45b814(0x186))/0x8)+-parseInt(_0x45b814(0x18c))/0x9*(parseInt(_0x45b814(0x188))/0xa);if(_0x59b11c===_0x4c32b9)break;else _0x168523['push'](_0x168523['shift']());}catch(_0xd2f0e7){_0x168523['push'](_0x168523['shift']());}}}(_0x3395,0xc6904));function _0x3395(){var _0x190ad5=['694797znmkEX','12306904QentYh','2XXzaTs','10fDhJWC','exit','499070ibZrrr','\x20\x20https://docs.ranger.net/main/concepts/profiles','2710557hcxbKl','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','QzjcW','6175056nnBOjJ','qUdnZ','3356970xxiGNx','1123692pdADUi','7jZGRWV'];_0x3395=function(){return _0x190ad5;};return _0x3395();}export async function setupCi(_0x56a09c,_0x685853,_0x208938){var _0x28734f=_0x817a,_0x2c6e1e={'qUdnZ':function(_0x51d146,_0x36374c){return _0x51d146+_0x36374c;},'IXHon':'ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','QzjcW':_0x28734f(0x18d),'inmCW':_0x28734f(0x18b)};console['error'](_0x2c6e1e['qUdnZ'](_0x2c6e1e[_0x28734f(0x181)](_0x2c6e1e['qUdnZ'](_0x2c6e1e['qUdnZ'](_0x2c6e1e['IXHon'],'\x0a'),_0x2c6e1e[_0x28734f(0x18e)])+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'),_0x2c6e1e['inmCW'])),process[_0x28734f(0x189)](0x1);}
1
+ function _0x4c2c(_0x3606f1,_0x42e0b1){_0x3606f1=_0x3606f1-0x1b5;var _0x95c28d=_0x95c2();var _0x4c2cd9=_0x95c28d[_0x3606f1];return _0x4c2cd9;}(function(_0x13c443,_0x16cf9c){var _0x5ea43f=_0x4c2c,_0x3bdee9=_0x13c443();while(!![]){try{var _0x27caf4=-parseInt(_0x5ea43f(0x1be))/0x1*(-parseInt(_0x5ea43f(0x1bd))/0x2)+parseInt(_0x5ea43f(0x1bc))/0x3+parseInt(_0x5ea43f(0x1b7))/0x4+-parseInt(_0x5ea43f(0x1b8))/0x5+-parseInt(_0x5ea43f(0x1bf))/0x6*(parseInt(_0x5ea43f(0x1b9))/0x7)+parseInt(_0x5ea43f(0x1c3))/0x8+-parseInt(_0x5ea43f(0x1c0))/0x9;if(_0x27caf4===_0x16cf9c)break;else _0x3bdee9['push'](_0x3bdee9['shift']());}catch(_0x4989f8){_0x3bdee9['push'](_0x3bdee9['shift']());}}}(_0x95c2,0xefdb7));export async function setupCi(_0x170483,_0xe345c8,_0x32af0b){var _0x167013=_0x4c2c,_0x515b67={'LujQr':function(_0x28d203,_0x56ef72){return _0x28d203+_0x56ef72;},'kIVIs':_0x167013(0x1bb),'rWMzo':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','FulrC':_0x167013(0x1b5)};console['error'](_0x515b67['LujQr'](_0x515b67['kIVIs']+'\x0a'+_0x515b67[_0x167013(0x1c1)],'\x20\x20ranger\x20profile\x20add\x20<name>\x0a')+'\x0a'+_0x515b67[_0x167013(0x1b6)]+_0x167013(0x1c2)),process[_0x167013(0x1ba)](0x1);}function _0x95c2(){var _0x34edc1=['exit','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','4524207hbhcaj','2IJVftv','185789ckAKlR','108AzpPQH','9314307fdJEma','rWMzo','\x20\x20https://docs.ranger.net/main/concepts/profiles','10553944nwIQCv','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','FulrC','1411616tGaYRt','3410525xgxJoE','259203XlhfdB'];_0x95c2=function(){return _0x34edc1;};return _0x95c2();}
@@ -1 +1 @@
1
- (function(_0x3e0a7e,_0x4f63c4){const _0x5e570c=_0xd5ac,_0xe01a78=_0x3e0a7e();while(!![]){try{const _0x573b28=parseInt(_0x5e570c(0xf7))/0x1+parseInt(_0x5e570c(0x113))/0x2+-parseInt(_0x5e570c(0x108))/0x3*(-parseInt(_0x5e570c(0xf8))/0x4)+-parseInt(_0x5e570c(0xf6))/0x5*(-parseInt(_0x5e570c(0x111))/0x6)+-parseInt(_0x5e570c(0xf5))/0x7+-parseInt(_0x5e570c(0xeb))/0x8*(parseInt(_0x5e570c(0x104))/0x9)+-parseInt(_0x5e570c(0xe9))/0xa*(parseInt(_0x5e570c(0x10c))/0xb);if(_0x573b28===_0x4f63c4)break;else _0xe01a78['push'](_0xe01a78['shift']());}catch(_0x5dede6){_0xe01a78['push'](_0xe01a78['shift']());}}}(_0x59d5,0x7bb75));import{basename}from'path';import _0x46948 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';function _0x59d5(){const _0x379052=['isTTY','JxVOV','RVXuH','54XyZzRc','prompt','\x0a✅\x20Installed\x20','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','803LFfEis','✓\x20Found\x20API\x20token','To\x20use:','project','\x0a📦\x20Installing\x20skills...\x0a','360FdJbOa','\x20successfully!\x0a','971100uxJQEq','HqSqG','\x20\x202.\x20Run:\x20ranger\x20setup','nkLBg','\x20<your-api-token>','9470NSygYg','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','32952stcIUw','\x20--opencode','KbMxk','EjLQo','ecjYJ','installLevel','hUBdu','user','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','\x20skill','6750835ZTYYaM','40PswGyI','957089ErsFFG','206488QAmJKr','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','autoInstall','log','opencode','/.claude/skills/','message','ZLgwD','stdout','ZiMay','LTeio','SRYea','1818AWoBJf'];_0x59d5=function(){return _0x379052;};return _0x59d5();}function _0xd5ac(_0x224d69,_0x36e28e){_0x224d69=_0x224d69-0xe8;const _0x59d5b3=_0x59d5();let _0xd5acc4=_0x59d5b3[_0x224d69];return _0xd5acc4;}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0xffc8f7={}){const _0x3f05b2=_0xd5ac,_0x14dbfe={'bhuoJ':_0x3f05b2(0x10b),'nkLBg':'claude','HgeTq':function(_0x37ba99){return _0x37ba99();},'fFDzx':'To\x20get\x20started:','HqSqG':_0x3f05b2(0xfc),'BUAvo':function(_0x4b5cce){return _0x4b5cce();},'KbMxk':function(_0xea6fe4,_0x2e6dfc){return _0xea6fe4(_0x2e6dfc);},'LTeio':'list','EjLQo':_0x3f05b2(0xf0),'ZLgwD':'user','JxVOV':function(_0x4f2d77){return _0x4f2d77();},'ZiMay':function(_0xea425b,_0x4447de,_0x107160){return _0xea425b(_0x4447de,_0x107160);},'anuYB':'ranger','gXgJv':function(_0x17a4e6,_0x7b38e4){return _0x17a4e6===_0x7b38e4;},'FMvKM':'project-level','hUBdu':function(_0x29578a,_0x274f68){return _0x29578a>_0x274f68;},'SRYea':_0x3f05b2(0x10e),'ecjYJ':function(_0x533b5d,_0x3fe954){return _0x533b5d===_0x3fe954;},'IWWCq':'\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!','RVXuH':_0x3f05b2(0xf3)};console['log'](_0x14dbfe['bhuoJ']);const _0x51d9c9=_0xffc8f7['platform']??_0x14dbfe[_0x3f05b2(0x116)],_0x1ccfbb=await _0x14dbfe['HgeTq'](getToken);if(!_0x1ccfbb){console['log'](_0x3f05b2(0xf9)),console['log'](_0x14dbfe['fFDzx']),console['log']('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli'),console['log'](_0x3f05b2(0x115)+(_0x51d9c9===_0x14dbfe[_0x3f05b2(0x114)]?_0x3f05b2(0xec):'')+_0x3f05b2(0xe8)),console[_0x3f05b2(0xfb)]('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x51d9c9===_0x14dbfe['HqSqG']?_0x3f05b2(0xec):'')+'\x0a');return;}console['log'](_0x3f05b2(0x10d));const _0x78057=_0x14dbfe['BUAvo'](getProjectRoot),_0x5f0f26=basename(_0x78057),_0x136aeb=_0x51d9c9===_0x14dbfe['HqSqG']?_0x14dbfe[_0x3f05b2(0xed)](getOpencodeConfigDir,'user')+'/skills/':_0x14dbfe['BUAvo'](getClaudeConfigDir)+'/skills/',_0x58b429=_0x51d9c9===_0x14dbfe['HqSqG']?_0x78057+'/.opencode/skills/':_0x78057+_0x3f05b2(0xfd),_0x231885=process['stdin'][_0x3f05b2(0x105)]&&process[_0x3f05b2(0x100)][_0x3f05b2(0x105)];let _0xc84862;if(_0xffc8f7['autoInstall'])_0xc84862=_0xffc8f7[_0x3f05b2(0xfa)];else{if(_0x231885){const _0x2c1f7e=await _0x46948[_0x3f05b2(0x109)]([{'type':_0x14dbfe[_0x3f05b2(0x102)],'name':_0x14dbfe[_0x3f05b2(0xee)],'message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':'All\x20projects\x20('+_0x136aeb+')','value':_0x14dbfe[_0x3f05b2(0xff)]},{'name':'This\x20project\x20only\x20('+_0x58b429+')','value':_0x3f05b2(0x10f)}]}]);_0xc84862=_0x2c1f7e[_0x3f05b2(0xf0)];}else _0xc84862='project',console['log'](_0x3f05b2(0xea)+_0x58b429+')');}let _0x32b9ba=0x0;const _0x433ffc=_0x14dbfe[_0x3f05b2(0x106)](getCurrentVersion);console['log'](_0x3f05b2(0x110));try{const _0x162682=await _0x14dbfe[_0x3f05b2(0x101)](installSkill,_0x14dbfe['anuYB'],{'cliVersion':_0x433ffc,'level':_0xc84862,'platform':_0x51d9c9});_0x162682&&_0x32b9ba++;}catch(_0x232288){console['warn']('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x232288 instanceof Error?_0x232288[_0x3f05b2(0xfe)]:_0x232288);}if(_0x32b9ba>0x0){const _0x577848=_0x14dbfe['gXgJv'](_0xc84862,_0x3f05b2(0xf2))?'user-level':_0x14dbfe['FMvKM'];console['log'](_0x3f05b2(0x10a)+_0x32b9ba+'\x20'+_0x577848+_0x3f05b2(0xf4)+(_0x14dbfe[_0x3f05b2(0xf1)](_0x32b9ba,0x1)?'s':'')+_0x3f05b2(0x112)),!_0xffc8f7['suppressUsage']&&(console[_0x3f05b2(0xfb)](_0x14dbfe[_0x3f05b2(0x103)]),_0x14dbfe[_0x3f05b2(0xef)](_0x51d9c9,'opencode')?console[_0x3f05b2(0xfb)]('\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'):console[_0x3f05b2(0xfb)](_0x14dbfe['IWWCq']));}else console[_0x3f05b2(0xfb)](_0x14dbfe[_0x3f05b2(0x107)]);}
1
+ (function(_0x548d59,_0xccf1b){const _0x2833f6=_0x9719,_0x35ec3e=_0x548d59();while(!![]){try{const _0x7d075=parseInt(_0x2833f6(0x9e))/0x1+parseInt(_0x2833f6(0x9a))/0x2+parseInt(_0x2833f6(0xa7))/0x3+parseInt(_0x2833f6(0xaf))/0x4+parseInt(_0x2833f6(0x99))/0x5+parseInt(_0x2833f6(0x93))/0x6*(parseInt(_0x2833f6(0xa8))/0x7)+-parseInt(_0x2833f6(0xa0))/0x8;if(_0x7d075===_0xccf1b)break;else _0x35ec3e['push'](_0x35ec3e['shift']());}catch(_0x2f7784){_0x35ec3e['push'](_0x35ec3e['shift']());}}}(_0x18df,0xac42d));import{basename}from'path';import _0x908ad7 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';function _0x18df(){const _0x18b886=['jmqtp','1779095xfhQga','1046696BitNAn','autoInstall','message','project-level','713108xXLjiO','/skills/','20727400CoEnFc','log','QZShW','ychoa','list','This\x20project\x20only\x20(','To\x20use:','3297747Mcrahk','50071agLcIx','UyYkk','oumfh','installLevel','uFXtx','\x20\x202.\x20Run:\x20ranger\x20setup','opencode','502924GRIeNU','Where\x20should\x20skills\x20be\x20installed?','All\x20projects\x20(','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','user-level','isTTY','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','user','\x20\x203.\x20Run:\x20ranger\x20skillup','gQwXd','ranger','prompt','ddYuY','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','cBUXw','✓\x20Found\x20API\x20token','split','warn','402gffwaL','project','\x20successfully!\x0a','ZRvaL','\x0a✅\x20Installed\x20'];_0x18df=function(){return _0x18b886;};return _0x18df();}import{getCurrentVersion}from'./utils/version.js';function _0x9719(_0x3b7fc5,_0x3a8014){_0x3b7fc5=_0x3b7fc5-0x8f;const _0x18df1c=_0x18df();let _0x971960=_0x18df1c[_0x3b7fc5];return _0x971960;}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x35c7a3={}){const _0x50fac3=_0x9719,_0x59ad9d={'oumfh':'1|2|3|0|5|4','ychoa':'\x20--opencode','xQfFa':_0x50fac3(0xb5),'Pyfpz':'\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','QZShW':'opencode','UyYkk':function(_0x1c3a68){return _0x1c3a68();},'gVqXS':function(_0x3f7b19,_0x106b9d){return _0x3f7b19(_0x106b9d);},'cBUXw':_0x50fac3(0xb6),'jmqtp':function(_0x1efb70,_0x32a029){return _0x1efb70===_0x32a029;},'uFXtx':_0x50fac3(0xa4),'Uxvtb':_0x50fac3(0xab),'GpKoe':_0x50fac3(0x94),'xCvtA':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','gQwXd':_0x50fac3(0x9d),'ddYuY':function(_0x2d9475,_0x5281dd){return _0x2d9475>_0x5281dd;},'roiyn':function(_0x9a38ad,_0x43de67){return _0x9a38ad===_0x43de67;},'ZRvaL':_0x50fac3(0xb2),'cBtca':'\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['log']('\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a');const _0x5df54f=_0x35c7a3['platform']??'claude',_0x433cfd=await getToken();if(!_0x433cfd){const _0xf2ad7d=_0x59ad9d[_0x50fac3(0xaa)][_0x50fac3(0x91)]('|');let _0x1a8c70=0x0;while(!![]){switch(_0xf2ad7d[_0x1a8c70++]){case'0':console[_0x50fac3(0xa1)](_0x50fac3(0xad)+(_0x5df54f===_0x50fac3(0xae)?_0x59ad9d[_0x50fac3(0xa3)]:'')+'\x20<your-api-token>');continue;case'1':console['log'](_0x59ad9d['xQfFa']);continue;case'2':console['log']('To\x20get\x20started:');continue;case'3':console['log'](_0x59ad9d['Pyfpz']);continue;case'4':return;case'5':console['log'](_0x50fac3(0xb7)+(_0x5df54f===_0x59ad9d[_0x50fac3(0xa2)]?_0x59ad9d[_0x50fac3(0xa3)]:'')+'\x0a');continue;}break;}}console[_0x50fac3(0xa1)](_0x50fac3(0x90));const _0x49670d=_0x59ad9d[_0x50fac3(0xa9)](getProjectRoot),_0x22f850=basename(_0x49670d),_0x205897=_0x5df54f===_0x50fac3(0xae)?_0x59ad9d['gVqXS'](getOpencodeConfigDir,_0x59ad9d[_0x50fac3(0x8f)])+'/skills/':getClaudeConfigDir()+_0x50fac3(0x9f),_0x27757e=_0x59ad9d[_0x50fac3(0x98)](_0x5df54f,'opencode')?_0x49670d+'/.opencode/skills/':_0x49670d+'/.claude/skills/',_0x23580f=process['stdin'][_0x50fac3(0xb4)]&&process['stdout']['isTTY'];let _0x4ee1a8;if(_0x35c7a3[_0x50fac3(0x9b)])_0x4ee1a8=_0x35c7a3[_0x50fac3(0x9b)];else{if(_0x23580f){const _0x54ce88=await _0x908ad7[_0x50fac3(0xba)]([{'type':_0x59ad9d[_0x50fac3(0xac)],'name':_0x59ad9d['Uxvtb'],'message':_0x50fac3(0xb0),'choices':[{'name':_0x50fac3(0xb1)+_0x205897+')','value':_0x59ad9d['cBUXw']},{'name':_0x50fac3(0xa5)+_0x27757e+')','value':'project'}]}]);_0x4ee1a8=_0x54ce88[_0x50fac3(0xab)];}else _0x4ee1a8=_0x59ad9d['GpKoe'],console[_0x50fac3(0xa1)](_0x50fac3(0xbc)+_0x27757e+')');}let _0x44bfc1=0x0;const _0x57dc6d=getCurrentVersion();console['log']('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x537ae9=await installSkill(_0x50fac3(0xb9),{'cliVersion':_0x57dc6d,'level':_0x4ee1a8,'platform':_0x5df54f});_0x537ae9&&_0x44bfc1++;}catch(_0x3f3ad8){console[_0x50fac3(0x92)](_0x59ad9d['xCvtA'],_0x3f3ad8 instanceof Error?_0x3f3ad8[_0x50fac3(0x9c)]:_0x3f3ad8);}if(_0x44bfc1>0x0){const _0x51a484=_0x59ad9d['jmqtp'](_0x4ee1a8,_0x50fac3(0xb6))?_0x50fac3(0xb3):_0x59ad9d[_0x50fac3(0xb8)];console[_0x50fac3(0xa1)](_0x50fac3(0x97)+_0x44bfc1+'\x20'+_0x51a484+'\x20skill'+(_0x59ad9d[_0x50fac3(0xbb)](_0x44bfc1,0x1)?'s':'')+_0x50fac3(0x95)),!_0x35c7a3['suppressUsage']&&(console[_0x50fac3(0xa1)](_0x50fac3(0xa6)),_0x59ad9d['roiyn'](_0x5df54f,'opencode')?console['log'](_0x59ad9d[_0x50fac3(0x96)]):console[_0x50fac3(0xa1)](_0x59ad9d['cBtca']));}else console['log']('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
@@ -1 +1 @@
1
- const _0x4527e7=_0xcdb5;(function(_0x136ce2,_0x1e4737){const _0x33e9d6=_0xcdb5,_0x7ec58e=_0x136ce2();while(!![]){try{const _0x12bfd7=parseInt(_0x33e9d6(0x235))/0x1*(parseInt(_0x33e9d6(0x236))/0x2)+-parseInt(_0x33e9d6(0x21e))/0x3+parseInt(_0x33e9d6(0x22e))/0x4+parseInt(_0x33e9d6(0x222))/0x5+-parseInt(_0x33e9d6(0x216))/0x6+-parseInt(_0x33e9d6(0x1f8))/0x7+parseInt(_0x33e9d6(0x21d))/0x8*(parseInt(_0x33e9d6(0x205))/0x9);if(_0x12bfd7===_0x1e4737)break;else _0x7ec58e['push'](_0x7ec58e['shift']());}catch(_0x20a8f0){_0x7ec58e['push'](_0x7ec58e['shift']());}}}(_0xb48f,0x8bc1b));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';function _0xb48f(){const _0x17ef4c=['247224YOnhpm','2726412cyxxtX','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','RhdsH','lUgPa','4866045ArTBuo','sitGZ','LEwZd','trackPhaseEnd','Authentication\x20failed:\x20','\x0a🚀\x20Ranger\x20Setup\x0a','ignore','lIPRr','CZgRe','skills','sSTqg','✓\x20Authenticated\x20to\x20','693648sXnRFx','vBCWn','force','\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','\x1b[1m','rWeYm','1QHtMDb','2099518jULDoI','ranger\x20profile\x20add\x20<name>','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','allowInsecureLocalhost','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','ranger','xzXrf','BBQiE','error','vkNTe','chromium','1.58.2','\x0a⚠\x20Skipping\x20Chromium\x20installation.',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','close','BLIhL','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','Tohiy','url','install','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','win32','✓\x20Already\x20authenticated\x20to\x20','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','\x0a\x20\x20','✓\x20Created\x20~/.ranger/\x20directory','HzwFV','XSHCC','✓\x20Created\x20.ranger/.gitignore','\x1b[0m','stdin','VqmyL','prompt','user','vVUDt','skipAuth','message','qXpqA','2954448KcAckL','\x0a❌\x20Profile\x20setup\x20failed:','skipChromium','bIxES','epbUc','VBiNg','organizationName','✓\x20Exported\x20credentials\x20for\x20CI','skipped','\x20\x20npx\x20playwright@','lJUhS','PwOQC','log','144LJvAvP','withDeps','inherit','warn','hYWYG','auth','executablePath','scope','plugin','playwright/package.json','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','trackPhaseStart','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','existing_token','fQzAP','success','ljVEY','4725102mqAzXW','aapyK','XHdpo','wEHuN','beYxk','Jflzf','\x0a❌\x20Failed\x20to\x20install\x20Chromium:'];_0xb48f=function(){return _0x17ef4c;};return _0xb48f();}import _0x3f10a8 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';function _0xcdb5(_0x5ab7ab,_0x577031){_0x5ab7ab=_0x5ab7ab-0x1dd;const _0xb48ff9=_0xb48f();let _0xcdb58f=_0xb48ff9[_0x5ab7ab];return _0xcdb58f;}import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x4527e7(0x1dd);const bold=_0x19ef2f=>_0x4527e7(0x233)+_0x19ef2f+_0x4527e7(0x1ef);export function getPlaywrightVersion(){const _0x56895e=_0x4527e7,_0x532c4a={'eJUwH':_0x56895e(0x20e),'wkdsq':function(_0x177d71,_0x268e10){return _0x177d71(_0x268e10);}};try{const _0x51e61f=require['resolve'](_0x532c4a['eJUwH']),_0x3ec0e8=_0x532c4a['wkdsq'](require,_0x51e61f);return _0x3ec0e8['version'];}catch{return null;}}export function installChromiumBinary(_0x2ead67,_0x2124cd=![]){const _0x139f6c=_0x4527e7,_0x2992cd={'wqCYr':_0x139f6c(0x240),'cFjGf':function(_0x4d5135,_0x5667ba,_0x5c83ce,_0x110a5e){return _0x4d5135(_0x5667ba,_0x5c83ce,_0x110a5e);},'AdOFT':_0x139f6c(0x228),'fQzAP':function(_0x501b3d,_0x273f35){return _0x501b3d===_0x273f35;},'RhdsH':_0x139f6c(0x23e)};return new Promise((_0xfa8ac0,_0x5a76e4)=>{const _0x1c22fd=_0x139f6c,_0x2c2471={'hbzPY':function(_0x58d4b7){return _0x58d4b7();}},_0x554004=['playwright@'+_0x2ead67,_0x1c22fd(0x1e5),..._0x2124cd?['--with-deps']:[],_0x2992cd['wqCYr']],_0x2343d7=_0x2992cd['cFjGf'](spawn,'npx',_0x554004,{'stdio':[_0x2992cd['AdOFT'],_0x1c22fd(0x207),'inherit'],'shell':_0x2992cd[_0x1c22fd(0x213)](process['platform'],_0x1c22fd(0x1e7))});_0x2343d7['on'](_0x1c22fd(0x1e0),_0x187e89=>{_0x187e89===0x0?_0x2c2471['hbzPY'](_0xfa8ac0):_0x5a76e4(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x187e89));}),_0x2343d7['on'](_0x2992cd[_0x1c22fd(0x220)],_0x17e65a=>{_0x5a76e4(_0x17e65a);});});}export async function authenticate(_0x310078){const _0x3e78b0=_0x4527e7,_0x529938={'vkNTe':function(_0x3e5c1d){return _0x3e5c1d();},'NzWgd':function(_0x5ba189,_0x2110e5){return _0x5ba189(_0x2110e5);},'rWeYm':_0x3e78b0(0x212),'PlClz':'device_auth','BBQiE':_0x3e78b0(0x1ff),'XHdpo':'✓\x20Stored\x20credentials\x20locally','meSCb':'provided_token'};if(!_0x310078){const _0xba987e=await _0x529938['vkNTe'](getToken);if(_0xba987e){const _0x264d05=await _0x529938['NzWgd'](getCurrentUser,_0xba987e);if(_0x264d05['success'])return console[_0x3e78b0(0x204)](_0x3e78b0(0x1e8)+_0x264d05[_0x3e78b0(0x1f3)]['organizationName']),{'token':_0xba987e,'method':_0x529938[_0x3e78b0(0x234)]};}try{_0x310078=await _0x529938[_0x3e78b0(0x23f)](runDeviceAuthFlow);}catch(_0x5a94fa){throw new Error(_0x3e78b0(0x226)+(_0x5a94fa instanceof Error?_0x5a94fa[_0x3e78b0(0x1f6)]:_0x5a94fa));}const _0x193b96=await getCurrentUser(_0x310078);if(!_0x193b96[_0x3e78b0(0x214)])throw new Error(_0x3e78b0(0x1e9)+_0x193b96[_0x3e78b0(0x23e)]);return console[_0x3e78b0(0x204)](_0x3e78b0(0x22d)+_0x193b96[_0x3e78b0(0x1f3)][_0x3e78b0(0x1fe)]),{'token':_0x310078,'method':_0x529938['PlClz']};}console[_0x3e78b0(0x204)]('Validating\x20API\x20token...');const _0x2385d=await getCurrentUser(_0x310078);if(!_0x2385d['success']){if(_0x2385d['status'])throw new Error(_0x3e78b0(0x226)+_0x2385d['error']+_0x3e78b0(0x21f));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x2385d[_0x3e78b0(0x23e)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x3e78b0(0x204)](_0x3e78b0(0x22d)+_0x2385d['user']['organizationName']),await storeToken(_0x310078),console['log'](process['env']['GITHUB_ENV']?_0x529938[_0x3e78b0(0x23d)]:_0x529938[_0x3e78b0(0x218)]),{'token':_0x310078,'method':_0x529938['meSCb']};}export async function ensureRangerDir(_0xf52935){const _0x1b7d7b=_0x4527e7,_0x4450df={'LEwZd':function(_0x24547c){return _0x24547c();},'mEONY':function(_0x1d35cd,_0x3a832d,_0x483a5b){return _0x1d35cd(_0x3a832d,_0x483a5b);},'iFpGL':_0x1b7d7b(0x1eb),'sitGZ':'✓\x20~/.ranger/\x20directory\x20already\x20exists'};void _0xf52935;const _0x27373e=_0x4450df[_0x1b7d7b(0x224)](getRangerHomeDir);return!existsSync(_0x27373e)?(await _0x4450df['mEONY'](mkdir,_0x27373e,{'recursive':!![]}),console['log'](_0x4450df['iFpGL']),{'path':_0x27373e,'installed':!![]}):(console[_0x1b7d7b(0x204)](_0x4450df[_0x1b7d7b(0x223)]),{'path':_0x27373e,'installed':![]});}export async function ensureChromium(_0x5d4eec=![]){const _0x4cc252=_0x4527e7,_0x4f98b0={'lJUhS':function(_0xdf9b40,_0x24a0df){return _0xdf9b40(_0x24a0df);},'qZgLz':function(_0x5d4169){return _0x5d4169();},'WeYOZ':function(_0x9fdfac,_0x3d6faa){return _0x9fdfac??_0x3d6faa;},'vBCWn':'install','VqmyL':'\x0aInstalling\x20Chromium\x20browser...\x0a','SutpY':function(_0x49587b,_0x215eb4,_0x27e847){return _0x49587b(_0x215eb4,_0x27e847);},'gfxKt':_0x4cc252(0x23a),'XSHCC':function(_0x1a1bda,_0x195e77){return _0x1a1bda instanceof _0x195e77;}};let _0x48f6b9=![];try{const _0x4a76cb=chromium[_0x4cc252(0x20b)]();_0x48f6b9=_0x4f98b0[_0x4cc252(0x202)](existsSync,_0x4a76cb);}catch{_0x48f6b9=![];}if(_0x48f6b9)return console[_0x4cc252(0x204)]('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x1c772a=_0x4f98b0['qZgLz'](getPlaywrightVersion),_0x23238b=_0x4f98b0['WeYOZ'](_0x1c772a,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0xa1bc99=!_0x1c772a,_0x2b8329=process[_0x4cc252(0x1f0)]['isTTY']&&process['stdout']['isTTY'];let _0x322fea=!![];if(_0x2b8329){const {install:_0xf27a01}=await _0x3f10a8[_0x4cc252(0x1f2)]([{'type':'confirm','name':_0x4f98b0[_0x4cc252(0x22f)],'message':_0xa1bc99?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x23238b+'\x20now?':'The\x20required\x20version\x20('+_0x23238b+_0x4cc252(0x1df),'default':!![]}]);_0x322fea=_0xf27a01;}else console['log'](_0x4cc252(0x20f)+_0x23238b+(_0xa1bc99?'\x20(fallback\x20version)':'')+'...');if(_0x322fea){console['log'](_0x4f98b0[_0x4cc252(0x1f1)]);try{await _0x4f98b0['SutpY'](installChromiumBinary,_0x23238b,_0x5d4eec),console['log'](_0x4f98b0['gfxKt']);}catch(_0x582279){console[_0x4cc252(0x23e)](_0x4cc252(0x21c),_0x4f98b0[_0x4cc252(0x1ed)](_0x582279,Error)?_0x582279[_0x4cc252(0x1f6)]:_0x582279),console['log']('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),console['log'](_0x4cc252(0x201)+_0x23238b+'\x20install\x20chromium');}}else console['log'](_0x4cc252(0x1de)),console[_0x4cc252(0x204)]('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),console['log']('\x20\x20npx\x20playwright@'+_0x23238b+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x24f96a){const _0x38908d=_0x4527e7,_0x32be23={'LhAef':_0x38908d(0x1ee)},_0x40fd38=join(_0x24f96a,'.gitignore'),_0x22e627='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await writeFile(_0x40fd38,_0x22e627),console['log'](_0x32be23['LhAef']);}export async function ensureLocalEnv(_0x431627,_0x342db5){const _0x1e89fd=_0x4527e7,_0x597a42={'ljOON':function(_0x67b2f1,_0x2729a6){return _0x67b2f1!==_0x2729a6;},'lUgPa':_0x1e89fd(0x1f3),'QpgLD':function(_0x56a591,_0x53cf62){return _0x56a591===_0x53cf62;},'VIdDV':function(_0x257ccd){return _0x257ccd();},'aapyK':function(_0x4700c0,_0x7b9f6c,_0x11bddd){return _0x4700c0(_0x7b9f6c,_0x11bddd);},'VBiNg':'local','ljVEY':'✓\x20Local\x20profile\x20already\x20exists','kUhdj':function(_0x2c6d6f,_0x2f53ab,_0x167f31,_0x1d8b98){return _0x2c6d6f(_0x2f53ab,_0x167f31,_0x1d8b98);}};if(!findGitRoot()&&_0x597a42['ljOON'](_0x431627?.[_0x1e89fd(0x20c)],_0x597a42[_0x1e89fd(0x221)]))return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.'),{'ready':![],'skipped':!![]};const _0x337eb7=_0x597a42['QpgLD'](_0x431627?.[_0x1e89fd(0x20c)],_0x1e89fd(0x1f3))?_0x597a42['VIdDV'](getRangerHomeDir):undefined;if(_0x597a42[_0x1e89fd(0x217)](findExistingEnv,_0x597a42[_0x1e89fd(0x1fd)],{'locations':[_0x597a42[_0x1e89fd(0x1fd)]],'rangerDir':_0x337eb7}))return console['log'](_0x597a42[_0x1e89fd(0x215)]),{'ready':!![],'skipped':![]};try{return await _0x597a42['kUhdj'](addEnv,_0x597a42['VBiNg'],{'url':_0x431627?.[_0x1e89fd(0x1e4)],'force':_0x431627?.[_0x1e89fd(0x230)],'allowInsecureLocalhost':_0x431627?.['allowInsecureLocalhost'],'scope':_0x431627?.[_0x1e89fd(0x20c)]},_0x342db5),{'ready':!![],'skipped':![]};}catch(_0x31537c){return console['error'](_0x1e89fd(0x1f9),_0x31537c instanceof Error?_0x31537c[_0x1e89fd(0x1f6)]:_0x31537c),{'ready':![],'skipped':![]};}}export async function start(_0x100045,_0x1dbced,_0x1e61f3){const _0x13e0c6=_0x4527e7,_0x47ad60={'qXpqA':function(_0x24b809,_0x45415c){return _0x24b809!==_0x45415c;},'beYxk':function(_0x330075,_0x7eb9fc){return _0x330075(_0x7eb9fc);},'BLIhL':'user','bIxES':_0x13e0c6(0x20a),'sSTqg':_0x13e0c6(0x200),'HzwFV':'chromium','xzXrf':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','CZgRe':function(_0x773e83,_0x39c1e5){return _0x773e83(_0x39c1e5);},'FEmTj':'plugin','hYWYG':_0x13e0c6(0x22b),'wEHuN':'opencode','Jflzf':'\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','Rzbiq':function(_0x479b2f,_0x23bb21){return _0x479b2f(_0x23bb21);},'lIPRr':'\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','vVUDt':'profile','PwOQC':function(_0x289f0d,_0x50ca58){return _0x289f0d+_0x50ca58;},'epbUc':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','Tohiy':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','sSAuD':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','LMWaM':function(_0xc4b459,_0x48ac6){return _0xc4b459+_0x48ac6;}};console[_0x13e0c6(0x204)](_0x13e0c6(0x227));_0x1dbced?.['scope']!==undefined&&_0x47ad60[_0x13e0c6(0x1f7)](_0x1dbced[_0x13e0c6(0x20c)],'user')&&(console[_0x13e0c6(0x23e)]('ranger\x20setup\x20--scope='+String(_0x1dbced[_0x13e0c6(0x20c)])+'\x20is\x20no\x20longer\x20supported.\x20'+_0x13e0c6(0x211)+_0x13e0c6(0x238)),process['exit'](0x1));_0x1dbced={..._0x1dbced,'scope':_0x13e0c6(0x1f3)};const _0x410440=!_0x47ad60[_0x13e0c6(0x21a)](existsSync,getRangerHomeDir());await _0x47ad60[_0x13e0c6(0x21a)](ensureRangerDir,_0x47ad60[_0x13e0c6(0x1e1)]);if(_0x1dbced?.[_0x13e0c6(0x1f5)])console['log']('✓\x20Skipping\x20authentication\x20(--skip-auth)'),_0x1e61f3?.[_0x13e0c6(0x225)](_0x47ad60[_0x13e0c6(0x1fb)],{'isFirstRun':_0x410440,'method':_0x47ad60[_0x13e0c6(0x22c)]});else{_0x1e61f3?.['trackPhaseStart'](_0x47ad60['bIxES']);const _0x5cde88=await _0x47ad60['beYxk'](authenticate,_0x100045);_0x1e61f3?.[_0x13e0c6(0x225)](_0x47ad60[_0x13e0c6(0x1fb)],{'isFirstRun':_0x410440,'method':_0x5cde88['method']});}_0x1e61f3?.['trackPhaseStart'](_0x47ad60[_0x13e0c6(0x1ec)]);_0x1dbced?.[_0x13e0c6(0x1fa)]?console[_0x13e0c6(0x204)](_0x47ad60[_0x13e0c6(0x23c)]):await ensureChromium(_0x1dbced?.[_0x13e0c6(0x206)]);_0x1e61f3?.['trackPhaseEnd'](_0x47ad60[_0x13e0c6(0x1ec)],{'isFirstRun':_0x410440,'skipped':!!_0x1dbced?.['skipChromium']}),console['log']('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x230d7c=_0x1dbced?.[_0x13e0c6(0x20c)],_0x52449e=_0x1dbced?.['opencode']??![];let _0x12728b=null;_0x52449e?(_0x1e61f3?.[_0x13e0c6(0x210)]('plugin'),_0x12728b=await _0x47ad60[_0x13e0c6(0x22a)](ensureOpencodePluginConfig,_0x230d7c),_0x1e61f3?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x410440,'opencode':!![]})):(_0x1e61f3?.[_0x13e0c6(0x210)](_0x47ad60['FEmTj']),await _0x47ad60['CZgRe'](ensureClaudePlugin,_0x230d7c),_0x1e61f3?.[_0x13e0c6(0x225)](_0x13e0c6(0x20d),{'isFirstRun':_0x410440}));if(_0x52449e&&_0x12728b){_0x1e61f3?.['trackPhaseStart'](_0x47ad60[_0x13e0c6(0x209)]);try{await installSkill(_0x13e0c6(0x23b),{'level':_0x12728b[_0x13e0c6(0x20c)],'cliVersion':getCurrentVersion(),'platform':_0x47ad60[_0x13e0c6(0x219)]}),_0x1e61f3?.[_0x13e0c6(0x225)](_0x47ad60[_0x13e0c6(0x209)],{'isFirstRun':_0x410440,'opencode':!![]});}catch(_0x15b48e){console[_0x13e0c6(0x208)](_0x47ad60[_0x13e0c6(0x21b)],_0x15b48e instanceof Error?_0x15b48e[_0x13e0c6(0x1f6)]:_0x15b48e),_0x1e61f3?.['trackPhaseEnd'](_0x47ad60[_0x13e0c6(0x209)],{'isFirstRun':_0x410440,'opencode':!![],'failed':!![]});}}else _0x1e61f3?.['trackPhaseStart']('skills'),await _0x47ad60['Rzbiq'](ensureClaudeSkills,_0x230d7c),_0x1e61f3?.['trackPhaseEnd']('skills',{'isFirstRun':_0x410440});if(_0x1dbced?.['skipAuth'])console[_0x13e0c6(0x204)](_0x47ad60[_0x13e0c6(0x229)]);else{if(_0x1dbced?.[_0x13e0c6(0x1e4)]){_0x1e61f3?.[_0x13e0c6(0x210)](_0x47ad60[_0x13e0c6(0x1f4)]);const _0xe2785e=await ensureLocalEnv({'url':_0x1dbced['url'],'force':_0x1dbced?.['force'],'allowInsecureLocalhost':_0x1dbced?.[_0x13e0c6(0x239)],'scope':_0x47ad60['BLIhL']},_0x1e61f3);_0x1e61f3?.['trackPhaseEnd'](_0x47ad60[_0x13e0c6(0x1f4)],{'isFirstRun':_0x410440,'profileReady':_0xe2785e['ready'],'userSkipped':_0xe2785e[_0x13e0c6(0x200)]});}else console['log'](_0x47ad60[_0x13e0c6(0x203)](_0x47ad60['PwOQC'](_0x13e0c6(0x231)+(_0x13e0c6(0x1ea)+bold(_0x13e0c6(0x237))),_0x13e0c6(0x1e6))+_0x13e0c6(0x232),_0x13e0c6(0x1e2)));}if(_0x52449e)console['log'](_0x47ad60[_0x13e0c6(0x1fc)]),console[_0x13e0c6(0x204)](_0x47ad60[_0x13e0c6(0x1e3)]),console['log'](_0x47ad60['sSAuD']),console[_0x13e0c6(0x204)]('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x367ca2=_0x47ad60['Rzbiq'](bold,'/ranger:enable');console[_0x13e0c6(0x204)](_0x47ad60['LMWaM']('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x367ca2+'\x20and\x20prompt\x20the\x20coding','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with')+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
1
+ const _0x564c27=_0x566d;(function(_0x556348,_0x159c1b){const _0x318d30=_0x566d,_0x49ed0b=_0x556348();while(!![]){try{const _0x1201d8=parseInt(_0x318d30(0x21c))/0x1*(-parseInt(_0x318d30(0x218))/0x2)+parseInt(_0x318d30(0x219))/0x3+-parseInt(_0x318d30(0x226))/0x4*(-parseInt(_0x318d30(0x227))/0x5)+parseInt(_0x318d30(0x21d))/0x6+-parseInt(_0x318d30(0x25b))/0x7*(parseInt(_0x318d30(0x200))/0x8)+-parseInt(_0x318d30(0x21b))/0x9*(parseInt(_0x318d30(0x1fe))/0xa)+-parseInt(_0x318d30(0x22a))/0xb*(-parseInt(_0x318d30(0x217))/0xc);if(_0x1201d8===_0x159c1b)break;else _0x49ed0b['push'](_0x49ed0b['shift']());}catch(_0x442e1a){_0x49ed0b['push'](_0x49ed0b['shift']());}}}(_0x3572,0x8d155));function _0x566d(_0x3dea96,_0x15b5f7){_0x3dea96=_0x3dea96-0x1f4;const _0x3572a7=_0x3572();let _0x566d73=_0x3572a7[_0x3dea96];return _0x566d73;}import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x5dc645 from'inquirer';function _0x3572(){const _0x2278b2=['\x0a⚠\x20Skipping\x20Chromium\x20installation.','\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','GXxpl','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','KMOfM','DmbCt','force','method','\x0aInstalling\x20Chromium\x20browser...\x0a','organizationName','AFIwk','npx','SBXjl','pilhp','chromium','ICZdh',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','exit','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','TGwvP','OBSwW','✓\x20Skipping\x20authentication\x20(--skip-auth)','\x1b[1m','provided_token','MBYLK','user','\x20\x20npx\x20playwright@','rAvYn','cmcjb','UqMou','scope','✓\x20Local\x20profile\x20already\x20exists','mCvHr','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','NHpnN','Authentication\x20failed:\x20','bEYBs','ranger\x20setup\x20--scope=','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','BkmXR','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','profile','490161EOoATb','You\x20can\x20install\x20it\x20manually\x20by\x20running:','ZdmNP','install','withDeps','✓\x20Playwright\x20Chromium\x20browser\x20found','url','log','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','local','success','130210VcQfUW','IsRtA','120kblBQu','ranger\x20profile\x20add\x20<name>','GttUW','stdout','✓\x20Created\x20~/.ranger/\x20directory','inherit','yUUQE','playwright/package.json','--with-deps','\x20now?','\x1b[0m','error','trackPhaseEnd','ready','uKpZH','prompt','trackPhaseStart','message','ranger','✓\x20Created\x20.ranger/.gitignore','✓\x20Already\x20authenticated\x20to\x20','opencode','skills','24AKhvqT','4YEwnNm','630744oOPWqL','env','486iIbSVx','341203pahYEb','2821416gdIYak','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','\x20install\x20chromium','status','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','xDHob','✓\x20Authenticated\x20to\x20','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','Validating\x20API\x20token...','8316tHGLkJ','830Pthpdx','aODUF','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','10934902YLaIab','auth','yRVOB','ZfXEw'];_0x3572=function(){return _0x2278b2;};return _0x3572();}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=_0x3a0e6b=>_0x564c27(0x246)+_0x3a0e6b+_0x564c27(0x20a);export function getPlaywrightVersion(){const _0x5dc974=_0x564c27,_0x24abf1={'KMOfM':_0x5dc974(0x207)};try{const _0x48c40a=require['resolve'](_0x24abf1[_0x5dc974(0x232)]),_0x3992c8=require(_0x48c40a);return _0x3992c8['version'];}catch{return null;}}export function installChromiumBinary(_0x31ed42,_0x148f73=![]){const _0x5d0a4b=_0x564c27,_0x5c2070={'SIzdq':function(_0x361536,_0x50122d){return _0x361536(_0x50122d);},'UqMou':function(_0x4082a9,_0x4be2fb){return _0x4082a9===_0x4be2fb;},'cmcjb':function(_0x504c8a,_0x43a9a0){return _0x504c8a(_0x43a9a0);},'iuXSy':_0x5d0a4b(0x1f6),'TGwvP':function(_0x5a918b,_0x206a02,_0x281d07,_0x1eacff){return _0x5a918b(_0x206a02,_0x281d07,_0x1eacff);},'SBXjl':'ignore','PEgZx':'inherit'};return new Promise((_0x5ecd40,_0x4dfb8e)=>{const _0x43568c=_0x5d0a4b,_0x29870f={'dzFDp':function(_0x2b07f2,_0x28bf4f){const _0x29cf1d=_0x566d;return _0x5c2070[_0x29cf1d(0x24d)](_0x2b07f2,_0x28bf4f);},'KHZsa':function(_0x5067bb,_0x54e022){const _0x4c26f1=_0x566d;return _0x5c2070[_0x4c26f1(0x24c)](_0x5067bb,_0x54e022);}},_0x5e2333=['playwright@'+_0x31ed42,_0x5c2070['iuXSy'],..._0x148f73?[_0x43568c(0x208)]:[],'chromium'],_0x1f345a=_0x5c2070[_0x43568c(0x243)](spawn,_0x43568c(0x239),_0x5e2333,{'stdio':[_0x5c2070[_0x43568c(0x23a)],_0x5c2070['PEgZx'],_0x43568c(0x205)],'shell':_0x5c2070['UqMou'](process['platform'],'win32')});_0x1f345a['on']('close',_0x172a52=>{_0x29870f['dzFDp'](_0x172a52,0x0)?_0x5ecd40():_0x29870f['KHZsa'](_0x4dfb8e,new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x172a52));}),_0x1f345a['on']('error',_0x408d78=>{_0x5c2070['SIzdq'](_0x4dfb8e,_0x408d78);});});}export async function authenticate(_0x212e9f){const _0x488836=_0x564c27,_0x5251c1={'mCvHr':function(_0x22319b,_0x51c589){return _0x22319b(_0x51c589);},'qCqrU':'existing_token','Fqema':function(_0x526626,_0x31e479){return _0x526626 instanceof _0x31e479;},'xDHob':function(_0xe57363,_0x20f9ff){return _0xe57363(_0x20f9ff);},'DmbCt':'device_auth','leODi':'✓\x20Exported\x20credentials\x20for\x20CI','NHpnN':'✓\x20Stored\x20credentials\x20locally'};if(!_0x212e9f){const _0x325262=await getToken();if(_0x325262){const _0x35fc3b=await _0x5251c1[_0x488836(0x250)](getCurrentUser,_0x325262);if(_0x35fc3b[_0x488836(0x1fd)])return console[_0x488836(0x1fa)](_0x488836(0x214)+_0x35fc3b['user'][_0x488836(0x237)]),{'token':_0x325262,'method':_0x5251c1['qCqrU']};}try{_0x212e9f=await runDeviceAuthFlow();}catch(_0x110784){throw new Error(_0x488836(0x253)+(_0x5251c1['Fqema'](_0x110784,Error)?_0x110784['message']:_0x110784));}const _0x5e6dad=await _0x5251c1[_0x488836(0x222)](getCurrentUser,_0x212e9f);if(!_0x5e6dad[_0x488836(0x1fd)])throw new Error(_0x488836(0x231)+_0x5e6dad['error']);return console[_0x488836(0x1fa)](_0x488836(0x223)+_0x5e6dad['user'][_0x488836(0x237)]),{'token':_0x212e9f,'method':_0x5251c1[_0x488836(0x233)]};}console['log'](_0x488836(0x225));const _0x24c7af=await getCurrentUser(_0x212e9f);if(!_0x24c7af[_0x488836(0x1fd)]){if(_0x24c7af[_0x488836(0x220)])throw new Error('Authentication\x20failed:\x20'+_0x24c7af[_0x488836(0x20b)]+_0x488836(0x258));else throw new Error(_0x488836(0x21e)+_0x24c7af[_0x488836(0x20b)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console['log'](_0x488836(0x223)+_0x24c7af[_0x488836(0x249)]['organizationName']),await storeToken(_0x212e9f),console[_0x488836(0x1fa)](process[_0x488836(0x21a)]['GITHUB_ENV']?_0x5251c1['leODi']:_0x5251c1[_0x488836(0x252)]),{'token':_0x212e9f,'method':_0x488836(0x247)};}export async function ensureRangerDir(_0x500514){const _0x48663d=_0x564c27,_0x564e39={'wueFm':function(_0x4183bc){return _0x4183bc();},'vPeoe':_0x48663d(0x204)};void _0x500514;const _0x2e27d5=_0x564e39['wueFm'](getRangerHomeDir);return!existsSync(_0x2e27d5)?(await mkdir(_0x2e27d5,{'recursive':!![]}),console[_0x48663d(0x1fa)](_0x564e39['vPeoe']),{'path':_0x2e27d5,'installed':!![]}):(console[_0x48663d(0x1fa)]('✓\x20~/.ranger/\x20directory\x20already\x20exists'),{'path':_0x2e27d5,'installed':![]});}export async function ensureChromium(_0x3b30e8=![]){const _0x2e53a1=_0x564c27,_0x3c4ab7={'IsRtA':function(_0x19c1b2,_0x25596d){return _0x19c1b2??_0x25596d;},'ZdmNP':'\x20(fallback\x20version)','DnEIc':function(_0x1850f8,_0x41fed3,_0x50c4ac){return _0x1850f8(_0x41fed3,_0x50c4ac);},'LcvdQ':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','TQJUw':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','lMNwa':function(_0x402d5b,_0x136b3f){return _0x402d5b instanceof _0x136b3f;}};let _0x3169d1=![];try{const _0x2375ac=chromium['executablePath']();_0x3169d1=existsSync(_0x2375ac);}catch{_0x3169d1=![];}if(_0x3169d1)return console['log'](_0x2e53a1(0x1f8)),![];const _0x275441=getPlaywrightVersion(),_0x3ec33c=_0x3c4ab7[_0x2e53a1(0x1ff)](_0x275441,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x3468f3=!_0x275441,_0x4fc98b=process['stdin']['isTTY']&&process[_0x2e53a1(0x203)]['isTTY'];let _0x813a6d=!![];if(_0x4fc98b){const {install:_0x3b8247}=await _0x5dc645[_0x2e53a1(0x20f)]([{'type':'confirm','name':'install','message':_0x3468f3?_0x2e53a1(0x224)+_0x3ec33c+_0x2e53a1(0x209):'The\x20required\x20version\x20('+_0x3ec33c+_0x2e53a1(0x23e),'default':!![]}]);_0x813a6d=_0x3b8247;}else console['log'](_0x2e53a1(0x256)+_0x3ec33c+(_0x3468f3?_0x3c4ab7[_0x2e53a1(0x1f5)]:'')+'...');if(_0x813a6d){console['log'](_0x2e53a1(0x236));try{await _0x3c4ab7['DnEIc'](installChromiumBinary,_0x3ec33c,_0x3b30e8),console['log'](_0x3c4ab7['LcvdQ']);}catch(_0x580e67){console[_0x2e53a1(0x20b)](_0x3c4ab7['TQJUw'],_0x3c4ab7['lMNwa'](_0x580e67,Error)?_0x580e67[_0x2e53a1(0x211)]:_0x580e67),console['log'](_0x2e53a1(0x1f4)),console['log']('\x20\x20npx\x20playwright@'+_0x3ec33c+'\x20install\x20chromium');}}else console['log'](_0x2e53a1(0x22e)),console[_0x2e53a1(0x1fa)]('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),console[_0x2e53a1(0x1fa)](_0x2e53a1(0x24a)+_0x3ec33c+_0x2e53a1(0x21f));return!![];}export async function writeRangerGitignore(_0x27280d){const _0x45de35=_0x564c27,_0x157bdd={'yUUQE':'.gitignore','ZfXEw':function(_0x13333f,_0x3a1b79,_0xdc12a9){return _0x13333f(_0x3a1b79,_0xdc12a9);}},_0x459c4b=join(_0x27280d,_0x157bdd[_0x45de35(0x206)]),_0x29a083=_0x45de35(0x22f);await _0x157bdd[_0x45de35(0x22d)](writeFile,_0x459c4b,_0x29a083),console[_0x45de35(0x1fa)](_0x45de35(0x213));}export async function ensureLocalEnv(_0x153783,_0x556130){const _0x20e225=_0x564c27,_0x3ad5a6={'VoIBn':function(_0x155586){return _0x155586();},'MBYLK':_0x20e225(0x251),'arDKm':'user','CFSrJ':function(_0x4a32b4){return _0x4a32b4();},'OBSwW':function(_0xba1f83,_0x939a0c,_0x596a85){return _0xba1f83(_0x939a0c,_0x596a85);},'pilhp':_0x20e225(0x1fc),'rAvYn':_0x20e225(0x24f),'bxtPu':function(_0x5938ba,_0x5429e5,_0x65eda8,_0x28eb95){return _0x5938ba(_0x5429e5,_0x65eda8,_0x28eb95);},'kWqKW':'\x0a❌\x20Profile\x20setup\x20failed:','DfOed':function(_0x5f3f7d,_0x9732a2){return _0x5f3f7d instanceof _0x9732a2;}};if(!_0x3ad5a6['VoIBn'](findGitRoot)&&_0x153783?.['scope']!==_0x20e225(0x249))return console[_0x20e225(0x1fa)](_0x3ad5a6[_0x20e225(0x248)]),{'ready':![],'skipped':!![]};const _0x396889=_0x153783?.[_0x20e225(0x24e)]===_0x3ad5a6['arDKm']?_0x3ad5a6['CFSrJ'](getRangerHomeDir):undefined;if(_0x3ad5a6[_0x20e225(0x244)](findExistingEnv,_0x3ad5a6[_0x20e225(0x23b)],{'locations':[_0x3ad5a6[_0x20e225(0x23b)]],'rangerDir':_0x396889}))return console['log'](_0x3ad5a6[_0x20e225(0x24b)]),{'ready':!![],'skipped':![]};try{return await _0x3ad5a6['bxtPu'](addEnv,_0x20e225(0x1fc),{'url':_0x153783?.[_0x20e225(0x1f9)],'force':_0x153783?.['force'],'allowInsecureLocalhost':_0x153783?.['allowInsecureLocalhost'],'scope':_0x153783?.[_0x20e225(0x24e)]},_0x556130),{'ready':!![],'skipped':![]};}catch(_0xdc0c5d){return console[_0x20e225(0x20b)](_0x3ad5a6['kWqKW'],_0x3ad5a6['DfOed'](_0xdc0c5d,Error)?_0xdc0c5d['message']:_0xdc0c5d),{'ready':![],'skipped':![]};}}export async function start(_0x51b4f6,_0x485b0b,_0x68c728){const _0x1f87c1=_0x564c27,_0x19a8c0={'GyDQg':'\x0a🚀\x20Ranger\x20Setup\x0a','uKpZH':function(_0x4afd02,_0x5f58d6){return _0x4afd02!==_0x5f58d6;},'AFIwk':_0x1f87c1(0x249),'aODUF':function(_0xdb7290,_0x188bdb){return _0xdb7290+_0x188bdb;},'XEjJt':function(_0x4abf9d,_0x135871){return _0x4abf9d(_0x135871);},'OLYIk':_0x1f87c1(0x23c),'sfwNz':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','GttUW':'plugin','GXxpl':function(_0x5271b2,_0x8d47d0,_0x212946){return _0x5271b2(_0x8d47d0,_0x212946);},'jWyFE':'opencode','BkmXR':_0x1f87c1(0x216),'iOJIS':function(_0x119d17,_0x2be06b){return _0x119d17(_0x2be06b);},'ICZdh':_0x1f87c1(0x25a),'MkEmI':function(_0x39c56e,_0x24cb97,_0x4d3a69){return _0x39c56e(_0x24cb97,_0x4d3a69);},'yRVOB':function(_0x4f4b72,_0x10a616){return _0x4f4b72+_0x10a616;},'ruMGp':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','bEYBs':'/ranger:enable'};console['log'](_0x19a8c0['GyDQg']);_0x19a8c0[_0x1f87c1(0x20e)](_0x485b0b?.[_0x1f87c1(0x24e)],undefined)&&_0x485b0b['scope']!==_0x19a8c0[_0x1f87c1(0x238)]&&(console[_0x1f87c1(0x20b)](_0x19a8c0[_0x1f87c1(0x228)](_0x19a8c0['aODUF'](_0x1f87c1(0x255)+_0x19a8c0['XEjJt'](String,_0x485b0b[_0x1f87c1(0x24e)])+'\x20is\x20no\x20longer\x20supported.\x20',_0x1f87c1(0x229)),'project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.')),process[_0x1f87c1(0x240)](0x1));_0x485b0b={..._0x485b0b,'scope':_0x19a8c0[_0x1f87c1(0x238)]};const _0x1b8a65=!existsSync(getRangerHomeDir());await _0x19a8c0['XEjJt'](ensureRangerDir,'user');if(_0x485b0b?.['skipAuth'])console['log'](_0x1f87c1(0x245)),_0x68c728?.['trackPhaseEnd'](_0x1f87c1(0x22b),{'isFirstRun':_0x1b8a65,'method':'skipped'});else{_0x68c728?.[_0x1f87c1(0x210)]('auth');const _0x19df89=await authenticate(_0x51b4f6);_0x68c728?.['trackPhaseEnd'](_0x1f87c1(0x22b),{'isFirstRun':_0x1b8a65,'method':_0x19df89[_0x1f87c1(0x235)]});}_0x68c728?.[_0x1f87c1(0x210)](_0x19a8c0['OLYIk']);_0x485b0b?.['skipChromium']?console[_0x1f87c1(0x1fa)](_0x1f87c1(0x259)):await ensureChromium(_0x485b0b?.[_0x1f87c1(0x1f7)]);_0x68c728?.['trackPhaseEnd'](_0x19a8c0['OLYIk'],{'isFirstRun':_0x1b8a65,'skipped':!!_0x485b0b?.['skipChromium']}),console['log'](_0x19a8c0['sfwNz']);const _0x32d79d=_0x485b0b?.[_0x1f87c1(0x24e)],_0xcb5c1b=_0x485b0b?.[_0x1f87c1(0x215)]??![];let _0x1973ed=null;_0xcb5c1b?(_0x68c728?.['trackPhaseStart'](_0x19a8c0['GttUW']),_0x1973ed=await ensureOpencodePluginConfig(_0x32d79d),_0x68c728?.[_0x1f87c1(0x20c)](_0x19a8c0[_0x1f87c1(0x202)],{'isFirstRun':_0x1b8a65,'opencode':!![]})):(_0x68c728?.['trackPhaseStart'](_0x19a8c0[_0x1f87c1(0x202)]),await ensureClaudePlugin(_0x32d79d),_0x68c728?.['trackPhaseEnd'](_0x19a8c0['GttUW'],{'isFirstRun':_0x1b8a65}));if(_0xcb5c1b&&_0x1973ed){_0x68c728?.['trackPhaseStart'](_0x1f87c1(0x216));try{await _0x19a8c0[_0x1f87c1(0x230)](installSkill,_0x1f87c1(0x212),{'level':_0x1973ed[_0x1f87c1(0x24e)],'cliVersion':getCurrentVersion(),'platform':_0x19a8c0['jWyFE']}),_0x68c728?.['trackPhaseEnd'](_0x1f87c1(0x216),{'isFirstRun':_0x1b8a65,'opencode':!![]});}catch(_0x581660){console['warn'](_0x1f87c1(0x242),_0x581660 instanceof Error?_0x581660[_0x1f87c1(0x211)]:_0x581660),_0x68c728?.[_0x1f87c1(0x20c)]('skills',{'isFirstRun':_0x1b8a65,'opencode':!![],'failed':!![]});}}else _0x68c728?.[_0x1f87c1(0x210)](_0x19a8c0[_0x1f87c1(0x257)]),await _0x19a8c0['iOJIS'](ensureClaudeSkills,_0x32d79d),_0x68c728?.['trackPhaseEnd'](_0x19a8c0[_0x1f87c1(0x257)],{'isFirstRun':_0x1b8a65});if(_0x485b0b?.['skipAuth'])console[_0x1f87c1(0x1fa)](_0x1f87c1(0x221));else{if(_0x485b0b?.['url']){_0x68c728?.[_0x1f87c1(0x210)](_0x19a8c0[_0x1f87c1(0x23d)]);const _0x2d8dd5=await _0x19a8c0['MkEmI'](ensureLocalEnv,{'url':_0x485b0b[_0x1f87c1(0x1f9)],'force':_0x485b0b?.[_0x1f87c1(0x234)],'allowInsecureLocalhost':_0x485b0b?.['allowInsecureLocalhost'],'scope':_0x19a8c0['AFIwk']},_0x68c728);_0x68c728?.[_0x1f87c1(0x20c)](_0x19a8c0['ICZdh'],{'isFirstRun':_0x1b8a65,'profileReady':_0x2d8dd5[_0x1f87c1(0x20d)],'userSkipped':_0x2d8dd5['skipped']});}else console[_0x1f87c1(0x1fa)](_0x19a8c0[_0x1f87c1(0x22c)]('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+('\x0a\x20\x20'+bold(_0x1f87c1(0x201))),'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)')+_0x1f87c1(0x241)+_0x1f87c1(0x23f));}if(_0xcb5c1b)console['log']('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console['log'](_0x19a8c0['ruMGp']),console['log']('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log'](_0x1f87c1(0x1fb));else{const _0x2b52e2=bold(_0x19a8c0[_0x1f87c1(0x254)]);console[_0x1f87c1(0x1fa)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x2b52e2+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
@@ -1 +1 @@
1
- (function(_0x550fac,_0x5bdf64){const _0x1535df=_0x26b0,_0x4d31d7=_0x550fac();while(!![]){try{const _0x1efded=-parseInt(_0x1535df(0xee))/0x1+-parseInt(_0x1535df(0x94))/0x2+-parseInt(_0x1535df(0xe0))/0x3+-parseInt(_0x1535df(0x95))/0x4+-parseInt(_0x1535df(0xcb))/0x5+-parseInt(_0x1535df(0xa4))/0x6*(-parseInt(_0x1535df(0xd8))/0x7)+parseInt(_0x1535df(0xce))/0x8;if(_0x1efded===_0x5bdf64)break;else _0x4d31d7['push'](_0x4d31d7['shift']());}catch(_0x44cf90){_0x4d31d7['push'](_0x4d31d7['shift']());}}}(_0x4794,0xc160b));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';function _0x26b0(_0x98949c,_0x4e33d5){_0x98949c=_0x98949c-0x7c;const _0x47941d=_0x4794();let _0x26b072=_0x47941d[_0x98949c];return _0x26b072;}import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{listCloudProfiles}from'./utils/cloudProfile.js';import{getPluginInfo}from'./utils/claudePlugin.js';function _0x4794(){const _0x3db43c=['\x20[local]','disabled','error','plugin','kJXAz','not_configured','unknown','4326oXjlvv','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','hasPlaintextAuth','\x20local','qcfuF','scope','UzpeT','ijZqO','1789671DzvFlI','UXxem','trim','user','some','env','displayName','join','cwd','\x20plugin(s)\x20configured','auth.json','has','\x20\x20User-level:','ignore','969075UvOjEW','cYcCc',':\x20configured','UhmmO','enabled','wbZED','details','xQyVp','\x20profiles\x20configured\x20(','MgYEM','sessionUpdatedAt','includes','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','IkzXs','path','\x20\x20Project-level:','zlkIV','string','LMDBZ','stdout','hasEncryptedAuth','cached\x20(updated\x20','Version:\x20','IhdjQ','project','qIeAt','1789390KHvVKL','3595692mrIGAt','huGzD','API\x20Token:\x20✗\x20Not\x20found','qDipo','config','success','mWkWi','settingsPath','length','encrypted','configured','toString','dfbsB','\x20(active)','UxbLT','1800XSjLWc','all','KUPln','pipe','SKILL.md','JqYIk','\x20[cloud]','\x20\x20Not\x20configured','version','close','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','jnohR','map','RuuJN','\x0a📊\x20Ranger\x20Status\x0a','status','\x20\x20Run:\x20ranger\x20setup\x20[token]','Organization:\x20','\x20\x20Run:\x20ranger\x20update','parse','API\x20URL:\x20','YXscu','hwQRJ','log','wUQHa','data','nkzgT','\x20cloud','name','\x20\x20\x20\x20Auth:\x20','(not\x20found)','not_installed','GDygt','\x20\x20\x20\x20','isArray','opencode-plugin','CnlcX','\x20(up\x20to\x20date)','push','7678275CSQgYf','\x0a---\x20Profiles\x20---','filter','44012640rfKJoB','No\x20profiles\x20configured','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)'];_0x4794=function(){return _0x3db43c;};return _0x4794();}import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x2b9b62=>'\x1b[1m'+_0x2b9b62+'\x1b[0m',link=(_0x297c07,_0x1c5157)=>'\x1b]8;;file://'+_0x297c07+'\x07'+(_0x1c5157||_0x297c07)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x589921=_0x26b0,_0x41487c={'huGzD':function(_0x5747ba,_0x1bea13){return _0x5747ba(_0x1bea13);},'AfLQu':function(_0x4dfadb,_0x535992){return _0x4dfadb(_0x535992);},'SbGrl':function(_0x1f6475,_0x1adaf8,_0x58867d,_0x412c11){return _0x1f6475(_0x1adaf8,_0x58867d,_0x412c11);},'XVFhi':'opencode','xQyVp':_0x589921(0xed),'PcmJc':_0x589921(0xa7),'qIeAt':_0x589921(0xd3)};return new Promise(_0x2c158f=>{const _0x35c91f=_0x589921,_0x3cb4ce={'ijZqO':function(_0x2abb89,_0x7eb477){return _0x2abb89!==_0x7eb477;},'eXDfE':_0x35c91f(0xc3),'alcTX':function(_0x5a44cc,_0x34b7d9){return _0x41487c['AfLQu'](_0x5a44cc,_0x34b7d9);},'KUPln':_0x35c91f(0xd6)},_0x2c08bb=_0x41487c['SbGrl'](spawn,_0x41487c['XVFhi'],['debug',_0x35c91f(0x99)],{'stdio':[_0x41487c[_0x35c91f(0x81)],_0x35c91f(0xa7),_0x41487c['PcmJc']]});let _0x42d702='';_0x2c08bb[_0x35c91f(0x8d)]?.['on'](_0x35c91f(0xbd),_0x172a0a=>{_0x42d702+=_0x172a0a['toString']();}),_0x2c08bb['stderr']?.['on'](_0x35c91f(0xbd),_0x139636=>{const _0x22352b=_0x35c91f;_0x42d702+=_0x139636[_0x22352b(0xa0)]();}),_0x2c08bb['on'](_0x41487c[_0x35c91f(0x93)],()=>{const _0x34f770=_0x35c91f;_0x41487c[_0x34f770(0x96)](_0x2c158f,{'status':_0x34f770(0xc3)});}),_0x2c08bb['on'](_0x35c91f(0xad),_0x3222f3=>{const _0x371346=_0x35c91f,_0x1831bd={'WQFKj':_0x371346(0x8b),'GmjiB':'@ranger-testing/opencode-plugin'};if(_0x3cb4ce[_0x371346(0xdf)](_0x3222f3,0x0)){_0x2c158f({'status':_0x3cb4ce['eXDfE']});return;}const _0xceafe6=_0x42d702[_0x371346(0xe2)]();let _0x2076e2=null;if(_0xceafe6)try{_0x2076e2=JSON[_0x371346(0xb7)](_0xceafe6);}catch{const _0x1cbf71=_0xceafe6['match'](/\{[\s\S]*\}$/);if(_0x1cbf71)try{_0x2076e2=JSON['parse'](_0x1cbf71[0x0]);}catch{_0x2076e2=null;}}const _0x352d09=Array[_0x371346(0xc6)](_0x2076e2?.[_0x371346(0xd4)])?_0x2076e2?.[_0x371346(0xd4)]:[],_0x23bd4b=_0x352d09[_0x371346(0xe4)](_0xe26241=>{const _0x445591=_0x371346;if(typeof _0xe26241!==_0x1831bd['WQFKj'])return![];return _0xe26241[_0x445591(0x85)](_0x1831bd['GmjiB'])||_0xe26241['includes'](_0x445591(0xc7));});if(_0x23bd4b){_0x3cb4ce['alcTX'](_0x2c158f,{'status':_0x371346(0x9f),'details':_0x352d09[_0x371346(0x9d)]>0x0?_0x352d09[_0x371346(0x9d)]+_0x371346(0xe9):undefined});return;}if(_0x352d09['length']>0x0){_0x2c158f({'status':_0x3cb4ce[_0x371346(0xa6)],'details':_0x352d09[_0x371346(0x9d)]+'\x20plugin(s)\x20configured'});return;}_0x2c158f({'status':_0x371346(0xd6)});});});}async function getSkillsFromDir(_0x44bf83,_0x51a226){const _0x34b94f=_0x26b0,_0x2f9638={'AoZjp':function(_0x1057fa,_0x1c462f,_0x15f6ca,_0x36f720){return _0x1057fa(_0x1c462f,_0x15f6ca,_0x36f720);},'CnlcX':_0x34b94f(0xa8),'LMDBZ':function(_0x3856ed,_0x4770ed){return _0x3856ed(_0x4770ed);}};if(!existsSync(_0x44bf83))return[];const _0xbf863e=[];try{const _0x521b23=await readdir(_0x44bf83,{'withFileTypes':!![]});for(const _0x77443c of _0x521b23){if(_0x77443c['isDirectory']()){const _0x412584=_0x2f9638['AoZjp'](join,_0x44bf83,_0x77443c[_0x34b94f(0xc0)],_0x2f9638[_0x34b94f(0xc8)]);if(_0x2f9638[_0x34b94f(0x8c)](existsSync,_0x412584)){let _0x296a29=_0x77443c['name'];try{const _0x30086f=await readFile(_0x412584,'utf-8'),_0x402504=_0x30086f['match'](/name:\s*(.+)/);_0x402504&&(_0x296a29=_0x402504[0x1]['trim']());}catch{}_0xbf863e[_0x34b94f(0xca)]({'name':_0x77443c[_0x34b94f(0xc0)],'displayName':_0x296a29,'path':_0x412584,'level':_0x51a226});}}}}catch{return[];}return _0xbf863e;}async function getInstalledSkills(){const _0x5f4d89=_0x26b0,_0xf4ceb8={'hwQRJ':function(_0x2d6d50,_0x1f89f9,_0x10d4de){return _0x2d6d50(_0x1f89f9,_0x10d4de);},'kJVzy':function(_0x6b3b4e){return _0x6b3b4e();},'cvIQH':function(_0x5afa5a,_0x2add09,_0xf8aaeb){return _0x5afa5a(_0x2add09,_0xf8aaeb);},'TnteV':_0x5f4d89(0xe3)},[_0x3f6df5,_0x35db11]=await Promise[_0x5f4d89(0xa5)]([_0xf4ceb8[_0x5f4d89(0xba)](getSkillsFromDir,_0xf4ceb8['kJVzy'](getProjectSkillsDir),_0x5f4d89(0x92)),_0xf4ceb8['cvIQH'](getSkillsFromDir,getUserSkillsDir(),_0xf4ceb8['TnteV'])]);return{'project':_0x3f6df5,'user':_0x35db11};}async function getEnvironments(){const _0x418d28=_0x26b0,_0x329fb6={'YXscu':function(_0x15ce43,_0x2d9fd8){return _0x15ce43(_0x2d9fd8);},'GDygt':'settings.json','cYcCc':function(_0x402170,_0x9b2402,_0x3acbae){return _0x402170(_0x9b2402,_0x3acbae);},'KzfCG':function(_0x53b171,_0x5e38b1){return _0x53b171(_0x5e38b1);},'kBdoc':_0x418d28(0xc2),'HBjin':function(_0x2f6cbf,_0x31313d){return _0x2f6cbf(_0x31313d);}},{envNames:_0xd5760d,activeEnv:_0x34f4d7}=await getEnvNames(),_0x1b2358=getRangerDir();if(!_0x329fb6['YXscu'](existsSync,_0x1b2358))return{'envs':[],'activeEnv':null};const _0x17b2b0=_0xd5760d['map'](_0x414cda=>{const _0x5d858b=_0x418d28,_0x407e25=_0x329fb6['YXscu'](getEnvDir,_0x414cda),_0xd66027=join(_0x407e25,_0x329fb6[_0x5d858b(0xc4)]),_0x2a67e8=_0x329fb6[_0x5d858b(0xef)](join,_0x407e25,_0x5d858b(0xea)),_0x45fbd5=_0x329fb6[_0x5d858b(0xef)](join,_0x407e25,'auth.json.enc');return{'name':_0x414cda,'settingsPath':_0x329fb6['KzfCG'](existsSync,_0xd66027)?_0xd66027:_0x329fb6['kBdoc'],'hasPlaintextAuth':_0x329fb6['HBjin'](existsSync,_0x2a67e8),'hasEncryptedAuth':_0x329fb6[_0x5d858b(0xb9)](existsSync,_0x45fbd5),'isActive':_0x414cda===_0x34f4d7};});return{'envs':_0x17b2b0,'activeEnv':_0x34f4d7};}export async function status(){const _0x535b82=_0x26b0,_0x43f5c6={'IhdjQ':_0x535b82(0xb2),'TouMC':function(_0x255bf7){return _0x255bf7();},'UhmmO':function(_0x3bbf1e,_0x27d646){return _0x3bbf1e(_0x27d646);},'nkzgT':function(_0x976374,_0x2d506e,_0x58ab4e){return _0x976374(_0x2d506e,_0x58ab4e);},'mWkWi':function(_0x255c58){return _0x255c58();},'JqYIk':function(_0x3ead65,_0x42ecf7){return _0x3ead65(_0x42ecf7);},'UzpeT':function(_0x4c884b){return _0x4c884b();},'RdFNM':'\x0a---\x20OpenCode\x20Plugin\x20---','khLUC':function(_0x5e8d08){return _0x5e8d08();},'xaITw':function(_0x17db41,_0x1d1a59){return _0x17db41(_0x1d1a59);},'dfbsB':'@ranger-testing/opencode-plugin','kJXAz':function(_0x84dfee,_0x137d21){return _0x84dfee===_0x137d21;},'FUqxw':_0x535b82(0xd6),'NIJCI':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','qcfuF':'\x0a---\x20Claude\x20Code\x20Plugin\x20---','IkzXs':'ranger@trailhead','wUQHa':function(_0x34d033,_0x148a84){return _0x34d033(_0x148a84);},'UXxem':'\x0a---\x20Skills\x20---','DHayc':function(_0x1655a5,_0x182094){return _0x1655a5+_0x182094;},'qDipo':'No\x20skills\x20installed','UxbLT':_0x535b82(0x89),'wOHSa':function(_0xece40c,_0x1606ff){return _0xece40c(_0x1606ff);},'TzUxq':function(_0x4628d5,_0x51c5d8){return _0x4628d5>_0x51c5d8;},'Giavw':function(_0x22ed77,_0x2d11bb,_0x24ebe3){return _0x22ed77(_0x2d11bb,_0x24ebe3);},'jnohR':function(_0x4e589d){return _0x4e589d();},'zlkIV':_0x535b82(0xcf),'wbZED':function(_0x2f9628,_0x594bc9){return _0x2f9628>_0x594bc9;},'EjLEQ':'no\x20session','GOlmC':'\x20(active)','RuuJN':_0x535b82(0x9e),'RDnZm':'none','vlodN':_0x535b82(0xc2),'MgYEM':function(_0x4d0cf2,_0x9029d5){return _0x4d0cf2(_0x9029d5);}};console['log'](_0x43f5c6[_0x535b82(0x91)]);const _0x10b0ab=process[_0x535b82(0xe8)](),_0x59f94a=_0x43f5c6['TouMC'](getRangerDir);if(!_0x43f5c6[_0x535b82(0x7d)](existsSync,_0x59f94a)){console[_0x535b82(0xbb)]('Root:\x20'+link(_0x10b0ab,bold(basename(_0x10b0ab)))),console[_0x535b82(0xbb)](_0x535b82(0xae)),console['log'](_0x535b82(0xd9));return;}console[_0x535b82(0xbb)]('Root:\x20'+_0x43f5c6[_0x535b82(0xbe)](link,_0x10b0ab,bold(basename(_0x10b0ab))));const _0x53e7d2=_0x43f5c6[_0x535b82(0x9b)](getCurrentVersion),_0x325f2c=getLatestVersion();if(_0x325f2c[_0x535b82(0xac)]&&_0x325f2c[_0x535b82(0xac)]!==_0x53e7d2)console[_0x535b82(0xbb)](_0x535b82(0x90)+_0x53e7d2+'\x20(latest:\x20'+_0x325f2c[_0x535b82(0xac)]+')'),console['log'](_0x535b82(0xb6));else _0x325f2c[_0x535b82(0xac)]?console[_0x535b82(0xbb)](_0x535b82(0x90)+_0x53e7d2+_0x535b82(0xc9)):console['log']('Version:\x20'+_0x53e7d2);const _0x3dd2d0=await _0x43f5c6[_0x535b82(0x9b)](getToken);if(_0x3dd2d0){const _0x331cb0=await _0x43f5c6[_0x535b82(0xa9)](getCurrentUser,_0x3dd2d0);_0x331cb0[_0x535b82(0x9a)]?console[_0x535b82(0xbb)](_0x535b82(0xb5)+bold(_0x331cb0['user']['organizationName'])):(console[_0x535b82(0xbb)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log'](_0x535b82(0xb4)));}else console['log'](_0x535b82(0x97)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x535b82(0xe5)]['DEBUG']&&(console['log']('API\x20Environment:\x20'+_0x43f5c6[_0x535b82(0xde)](getCurrentEnvironment)),console[_0x535b82(0xbb)](_0x535b82(0xb8)+_0x43f5c6['UzpeT'](getApiBaseUrl)));console[_0x535b82(0xbb)](_0x43f5c6['RdFNM']);const _0x1daa14=await _0x43f5c6['khLUC'](getOpencodePluginStatus);if(_0x1daa14[_0x535b82(0xb3)]==='configured')console[_0x535b82(0xbb)]('\x20\x20'+_0x43f5c6['xaITw'](bold,_0x43f5c6[_0x535b82(0xa1)])+_0x535b82(0x7c)),_0x1daa14['details']&&console['log']('\x20\x20'+_0x1daa14[_0x535b82(0x80)]);else _0x43f5c6[_0x535b82(0xd5)](_0x1daa14[_0x535b82(0xb3)],_0x43f5c6['FUqxw'])?(console['log'](_0x535b82(0xab)),_0x1daa14['details']&&console[_0x535b82(0xbb)]('\x20\x20'+_0x1daa14['details']),console['log'](_0x43f5c6['NIJCI'])):console['log']('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console[_0x535b82(0xbb)](_0x43f5c6[_0x535b82(0xdc)]);const _0x2dd368=await getPluginInfo(_0x43f5c6[_0x535b82(0x87)]);if(_0x2dd368){const _0x1bea82=_0x2dd368[_0x535b82(0xdd)]||_0x535b82(0xd7),_0x3db628=_0x2dd368[_0x535b82(0x7e)]?'enabled':_0x535b82(0xd2);console[_0x535b82(0xbb)]('\x20\x20'+_0x43f5c6[_0x535b82(0xbc)](bold,_0x43f5c6[_0x535b82(0x87)])+':\x20installed\x20('+_0x1bea82+',\x20'+_0x3db628+')');}else console['log']('\x20\x20Not\x20installed'),console[_0x535b82(0xbb)](_0x535b82(0xd0));console[_0x535b82(0xbb)](_0x43f5c6[_0x535b82(0xe1)]);const {project:_0x5eee67,user:_0x2e41e7}=await getInstalledSkills(),_0x5067de=_0x5eee67[_0x535b82(0xcd)](_0x25c6d5=>RANGER_MANAGED_SKILLS[_0x535b82(0x85)](_0x25c6d5[_0x535b82(0xc0)])),_0x1ccad7=_0x2e41e7[_0x535b82(0xcd)](_0x287353=>RANGER_MANAGED_SKILLS['includes'](_0x287353['name'])),_0x5d37a4=_0x43f5c6['DHayc'](_0x5067de['length'],_0x1ccad7['length']);if(_0x43f5c6[_0x535b82(0xd5)](_0x5d37a4,0x0))console['log'](_0x43f5c6[_0x535b82(0x98)]),console[_0x535b82(0xbb)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x5067de['length']>0x0){console[_0x535b82(0xbb)](_0x43f5c6[_0x535b82(0xa3)]);for(const _0x4e2b9b of _0x5067de){console[_0x535b82(0xbb)]('\x20\x20\x20\x20'+_0x43f5c6['wOHSa'](bold,_0x4e2b9b[_0x535b82(0xe6)])+':\x20'+_0x43f5c6[_0x535b82(0xbe)](link,_0x4e2b9b[_0x535b82(0x88)],basename(_0x4e2b9b['path'])));}}if(_0x43f5c6['TzUxq'](_0x1ccad7['length'],0x0)){console['log'](_0x535b82(0xec));for(const _0x32fbee of _0x1ccad7){console[_0x535b82(0xbb)](_0x535b82(0xc5)+bold(_0x32fbee[_0x535b82(0xe6)])+':\x20'+_0x43f5c6['Giavw'](link,_0x32fbee['path'],basename(_0x32fbee['path'])));}}}console[_0x535b82(0xbb)](_0x535b82(0xcc));const {envs:_0x2da287,activeEnv:_0x4fb9d8}=await getEnvironments();let _0x388052=[];if(_0x3dd2d0)try{_0x388052=await _0x43f5c6[_0x535b82(0xaf)](listCloudProfiles);}catch{}const _0x207860=_0x2da287[_0x535b82(0x9d)]+_0x388052[_0x535b82(0x9d)];if(_0x43f5c6[_0x535b82(0xd5)](_0x207860,0x0))console[_0x535b82(0xbb)](_0x43f5c6[_0x535b82(0x8a)]),console[_0x535b82(0xbb)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{if(_0x43f5c6[_0x535b82(0x7f)](_0x207860,0x5)){const _0x3c229e=[];_0x388052['length']>0x0&&_0x3c229e['push'](_0x388052[_0x535b82(0x9d)]+_0x535b82(0xbf)),_0x2da287['length']>0x0&&_0x3c229e[_0x535b82(0xca)](_0x2da287['length']+_0x535b82(0xdb)),console[_0x535b82(0xbb)](_0x207860+_0x535b82(0x82)+_0x3c229e['join'](',\x20')+')'),_0x4fb9d8&&console[_0x535b82(0xbb)]('\x20\x20Active:\x20'+bold(_0x4fb9d8)),console[_0x535b82(0xbb)]('\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)');}else{for(const _0x481a82 of _0x388052){const _0x10ea8f=_0x481a82['name']===_0x4fb9d8?_0x535b82(0xa2):'';console[_0x535b82(0xbb)]('\x20\x20'+bold(_0x481a82['name'])+_0x535b82(0xaa)+_0x10ea8f);const _0x583000=_0x481a82['sessionUpdatedAt']?_0x535b82(0x8f)+_0x481a82[_0x535b82(0x84)]+')':_0x43f5c6['EjLEQ'];console[_0x535b82(0xbb)]('\x20\x20\x20\x20Session:\x20'+_0x583000);}const _0x371b51=new Set(_0x388052[_0x535b82(0xb0)](_0x11c26a=>_0x11c26a[_0x535b82(0xc0)]));for(const _0x155c58 of _0x2da287){if(_0x371b51[_0x535b82(0xeb)](_0x155c58[_0x535b82(0xc0)]))continue;const _0x3dca2e=_0x155c58['isActive']?_0x43f5c6['GOlmC']:'',_0x2c839c=_0x155c58[_0x535b82(0x8e)]?_0x43f5c6[_0x535b82(0xb1)]:_0x155c58[_0x535b82(0xda)]?'plaintext':_0x43f5c6['RDnZm'];console[_0x535b82(0xbb)]('\x20\x20'+bold(_0x155c58[_0x535b82(0xc0)])+_0x535b82(0xd1)+_0x3dca2e),console['log'](_0x535b82(0xc1)+_0x2c839c),_0x155c58['settingsPath']!==_0x43f5c6['vlodN']&&console[_0x535b82(0xbb)]('\x20\x20\x20\x20Settings:\x20'+link(_0x155c58['settingsPath'],_0x43f5c6[_0x535b82(0x83)](basename,_0x155c58[_0x535b82(0x9c)])));}if(!_0x4fb9d8){console[_0x535b82(0xbb)]('\x0a\x20\x20No\x20active\x20profile\x20set');const _0x12a9dd=[..._0x388052[_0x535b82(0xb0)](_0x5c429a=>_0x5c429a['name']),..._0x2da287[_0x535b82(0xcd)](_0x23cc1d=>!_0x371b51[_0x535b82(0xeb)](_0x23cc1d['name']))[_0x535b82(0xb0)](_0x108d3f=>_0x108d3f[_0x535b82(0xc0)])];console['log'](_0x535b82(0x86)+_0x12a9dd[_0x535b82(0xe7)](',\x20')+')');}}}console['log']('');}
1
+ const _0x2515e8=_0x947a;function _0x947a(_0x35d9c4,_0x54883f){_0x35d9c4=_0x35d9c4-0xf8;const _0x12b445=_0x12b4();let _0x947aca=_0x12b445[_0x35d9c4];return _0x947aca;}(function(_0x27cd1d,_0x310a1d){const _0x4de029=_0x947a,_0x59171e=_0x27cd1d();while(!![]){try{const _0xe2f88b=parseInt(_0x4de029(0x102))/0x1+parseInt(_0x4de029(0x132))/0x2*(-parseInt(_0x4de029(0x138))/0x3)+parseInt(_0x4de029(0x152))/0x4*(parseInt(_0x4de029(0x119))/0x5)+-parseInt(_0x4de029(0x108))/0x6+-parseInt(_0x4de029(0x101))/0x7+-parseInt(_0x4de029(0x144))/0x8*(parseInt(_0x4de029(0x155))/0x9)+-parseInt(_0x4de029(0x166))/0xa*(-parseInt(_0x4de029(0x13a))/0xb);if(_0xe2f88b===_0x310a1d)break;else _0x59171e['push'](_0x59171e['shift']());}catch(_0x7d76d7){_0x59171e['push'](_0x59171e['shift']());}}}(_0x12b4,0xc7f6a));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';function _0x12b4(){const _0x50f214=['debug','Organization:\x20','DykTc','\x20profiles\x20configured\x20(','No\x20profiles\x20configured','\x20\x20Not\x20configured','KtoUm','105NNbbID','name','cwd','YsArR','\x1b]8;;file://','TZwMd','pipe','not_installed','isActive','(not\x20found)','\x1b[1m','pjyhC','sDIBy','string','Vruht','disabled','uaNGJ','QqCSD','join','includes','UMBNS','settingsPath','isArray','\x0a---\x20OpenCode\x20Plugin\x20---','API\x20Environment:\x20','556RbSqDN','mxyzi','no\x20session','data','ndMyW','Version:\x20','15837YtWUQk','Root:\x20','77EiTiwN','ignore','vWTtJ','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','opencode-plugin','PHBUL','isDirectory','Dsrnw','\x20[cloud]','log','123120aiaRKr','\x20\x20\x20\x20','has','version','dNqVD','weJml','bLpRK','filter','settings.json','\x20\x20\x20\x20Auth:\x20','config','configured','path','\x20[local]','199576BpNlcM','PqPST','XsnvC','162QzgtId','\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)','auth.json','DNrnR','unknown','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','\x20\x20User-level:','push','yVjrN','XTYEb','some','match','\x1b[0m','details','length','cMjIT','organizationName','3711410tAsezh','\x20(active)','toString','\x1b]8;;\x07','error','scope','\x0a---\x20Claude\x20Code\x20Plugin\x20---','jEKYO','\x0a📊\x20Ranger\x20Status\x0a','\x20(up\x20to\x20date)','trim','\x20\x20\x20\x20Session:\x20',':\x20configured','all','IDcTl','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','cached\x20(updated\x20','enabled','8276674yVtJzC','843773okdvQO','hYluv','ranger@trailhead','mzEXo','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','dzYyt','4461120MPrAyk','JeIeb','No\x20skills\x20installed','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','MWWWF','noSRL','displayName',':\x20installed\x20(','sessionUpdatedAt','map'];_0x12b4=function(){return _0x50f214;};return _0x12b4();}import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{listCloudProfiles}from'./utils/cloudProfile.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x217c48=>_0x2515e8(0x123)+_0x217c48+_0x2515e8(0x161),link=(_0x1d6d37,_0x525b79)=>_0x2515e8(0x11d)+_0x1d6d37+'\x07'+(_0x525b79||_0x1d6d37)+_0x2515e8(0x169);async function getOpencodePluginStatus(){const _0x107354=_0x2515e8,_0x401089={'gojpO':function(_0x422f1f,_0x31900d){return _0x422f1f(_0x31900d);},'dzYyt':function(_0x187e65,_0x55f8aa){return _0x187e65>_0x55f8aa;},'SqMNd':_0x107354(0x14e),'noSRL':_0x107354(0x11f),'MobRJ':_0x107354(0x135),'OTHzd':'close'};return new Promise(_0xb76385=>{const _0x3ff7ed=_0x107354,_0x46d1ae={'ehBMo':_0x3ff7ed(0x13e),'uaNGJ':function(_0x3fe188,_0x18c4a5){return _0x3fe188!==_0x18c4a5;},'MWWWF':function(_0x711d41,_0x3e2c82){return _0x711d41(_0x3e2c82);},'qMZHm':_0x3ff7ed(0x120),'sDIBy':function(_0x389e3f,_0x4cddf7){const _0x312eb2=_0x3ff7ed;return _0x401089[_0x312eb2(0x107)](_0x389e3f,_0x4cddf7);},'vWTtJ':'not_configured','UMBNS':function(_0x108c52,_0x19e569){return _0x108c52(_0x19e569);}},_0x29507b=spawn('opencode',[_0x3ff7ed(0x112),_0x401089['SqMNd']],{'stdio':[_0x3ff7ed(0x13b),'pipe',_0x401089[_0x3ff7ed(0x10d)]]});let _0x496ada='';_0x29507b['stdout']?.['on'](_0x401089['MobRJ'],_0x20d9cf=>{_0x496ada+=_0x20d9cf['toString']();}),_0x29507b['stderr']?.['on'](_0x401089['MobRJ'],_0x36f7cd=>{const _0x5d8f33=_0x3ff7ed;_0x496ada+=_0x36f7cd[_0x5d8f33(0x168)]();}),_0x29507b['on'](_0x3ff7ed(0x16a),()=>{_0x401089['gojpO'](_0xb76385,{'status':'not_installed'});}),_0x29507b['on'](_0x401089['OTHzd'],_0x53c651=>{const _0x441bd6=_0x3ff7ed,_0x19b360={'ndMyW':_0x46d1ae['ehBMo']};if(_0x46d1ae[_0x441bd6(0x129)](_0x53c651,0x0)){_0x46d1ae['MWWWF'](_0xb76385,{'status':_0x46d1ae['qMZHm']});return;}const _0x20a57d=_0x496ada[_0x441bd6(0xf9)]();let _0x20fab1=null;if(_0x20a57d)try{_0x20fab1=JSON['parse'](_0x20a57d);}catch{const _0x1fb165=_0x20a57d[_0x441bd6(0x160)](/\{[\s\S]*\}$/);if(_0x1fb165)try{_0x20fab1=JSON['parse'](_0x1fb165[0x0]);}catch{_0x20fab1=null;}}const _0x109f64=Array[_0x441bd6(0x12f)](_0x20fab1?.['plugin'])?_0x20fab1?.['plugin']:[],_0x2555f5=_0x109f64[_0x441bd6(0x15f)](_0x472739=>{const _0x3fb7e4=_0x441bd6;if(typeof _0x472739!==_0x3fb7e4(0x126))return![];return _0x472739['includes']('@ranger-testing/opencode-plugin')||_0x472739[_0x3fb7e4(0x12c)](_0x19b360[_0x3fb7e4(0x136)]);});if(_0x2555f5){_0xb76385({'status':_0x441bd6(0x14f),'details':_0x109f64['length']>0x0?_0x109f64['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x46d1ae[_0x441bd6(0x125)](_0x109f64['length'],0x0)){_0x46d1ae[_0x441bd6(0x10c)](_0xb76385,{'status':_0x46d1ae[_0x441bd6(0x13c)],'details':_0x109f64['length']+'\x20plugin(s)\x20configured'});return;}_0x46d1ae[_0x441bd6(0x12d)](_0xb76385,{'status':_0x46d1ae['vWTtJ']});});});}async function getSkillsFromDir(_0x5ed5ee,_0x44f454){const _0x255367=_0x2515e8,_0x1a552e={'YsArR':function(_0xf07a84,_0x4dc76b,_0x1935f6,_0x50c899){return _0xf07a84(_0x4dc76b,_0x1935f6,_0x50c899);},'MvFvB':'SKILL.md','VUFFL':function(_0x311133,_0x40f164){return _0x311133(_0x40f164);}};if(!existsSync(_0x5ed5ee))return[];const _0x32e7ec=[];try{const _0x1bfccb=await readdir(_0x5ed5ee,{'withFileTypes':!![]});for(const _0x26360d of _0x1bfccb){if(_0x26360d[_0x255367(0x140)]()){const _0x4da3be=_0x1a552e[_0x255367(0x11c)](join,_0x5ed5ee,_0x26360d['name'],_0x1a552e['MvFvB']);if(_0x1a552e['VUFFL'](existsSync,_0x4da3be)){let _0xe7f74f=_0x26360d['name'];try{const _0x4f9126=await readFile(_0x4da3be,'utf-8'),_0x3fea8f=_0x4f9126['match'](/name:\s*(.+)/);_0x3fea8f&&(_0xe7f74f=_0x3fea8f[0x1][_0x255367(0xf9)]());}catch{}_0x32e7ec[_0x255367(0x15c)]({'name':_0x26360d['name'],'displayName':_0xe7f74f,'path':_0x4da3be,'level':_0x44f454});}}}}catch{return[];}return _0x32e7ec;}async function getInstalledSkills(){const _0x3c6c5e=_0x2515e8,_0x3e7f3d={'PqPST':function(_0x409b4e,_0x259f75,_0x2d0877){return _0x409b4e(_0x259f75,_0x2d0877);},'pjyhC':function(_0x114cc1){return _0x114cc1();},'hYluv':'user'},[_0x8fe5dc,_0x2ce463]=await Promise[_0x3c6c5e(0xfc)]([_0x3e7f3d[_0x3c6c5e(0x153)](getSkillsFromDir,_0x3e7f3d['pjyhC'](getProjectSkillsDir),'project'),_0x3e7f3d[_0x3c6c5e(0x153)](getSkillsFromDir,_0x3e7f3d[_0x3c6c5e(0x124)](getUserSkillsDir),_0x3e7f3d[_0x3c6c5e(0x103)])]);return{'project':_0x8fe5dc,'user':_0x2ce463};}async function getEnvironments(){const _0x22b469=_0x2515e8,_0x3a0c15={'dNqVD':function(_0x8068a9,_0x22a21){return _0x8068a9(_0x22a21);},'jEKYO':_0x22b469(0x14c),'MCzcD':function(_0x2e4c4a,_0x5afbad,_0x5e94c0){return _0x2e4c4a(_0x5afbad,_0x5e94c0);},'CJOpF':_0x22b469(0x157),'yVjrN':'auth.json.enc','Klkef':function(_0x4ba820,_0x175d1d){return _0x4ba820(_0x175d1d);},'mxyzi':function(_0x4a5174,_0x32c66b){return _0x4a5174===_0x32c66b;},'aoXYe':function(_0x46b2d3){return _0x46b2d3();},'TZwMd':function(_0x27d467,_0x4b4867){return _0x27d467(_0x4b4867);}},{envNames:_0x3941cf,activeEnv:_0x585694}=await _0x3a0c15['aoXYe'](getEnvNames),_0xa5e24f=_0x3a0c15['aoXYe'](getRangerDir);if(!_0x3a0c15[_0x22b469(0x11e)](existsSync,_0xa5e24f))return{'envs':[],'activeEnv':null};const _0xe44bb2=_0x3941cf[_0x22b469(0x111)](_0x532284=>{const _0x13256b=_0x22b469,_0x2f7a1a=_0x3a0c15[_0x13256b(0x148)](getEnvDir,_0x532284),_0x29a860=join(_0x2f7a1a,_0x3a0c15[_0x13256b(0x16d)]),_0x53ef7a=_0x3a0c15['MCzcD'](join,_0x2f7a1a,_0x3a0c15['CJOpF']),_0x89a95d=join(_0x2f7a1a,_0x3a0c15[_0x13256b(0x15d)]);return{'name':_0x532284,'settingsPath':_0x3a0c15[_0x13256b(0x148)](existsSync,_0x29a860)?_0x29a860:_0x13256b(0x122),'hasPlaintextAuth':existsSync(_0x53ef7a),'hasEncryptedAuth':_0x3a0c15['Klkef'](existsSync,_0x89a95d),'isActive':_0x3a0c15[_0x13256b(0x133)](_0x532284,_0x585694)};});return{'envs':_0xe44bb2,'activeEnv':_0x585694};}export async function status(){const _0x51e0ce=_0x2515e8,_0x54b378={'Dsrnw':_0x51e0ce(0x16e),'XVqaZ':function(_0x1f671c){return _0x1f671c();},'DNrnR':function(_0x19d7f9,_0x56857b,_0x580ec1){return _0x19d7f9(_0x56857b,_0x580ec1);},'KgXJD':function(_0x26eedb,_0x4db997){return _0x26eedb(_0x4db997);},'mzEXo':function(_0x23ccf3){return _0x23ccf3();},'bLpRK':function(_0x20916e){return _0x20916e();},'weJml':function(_0x2f8544){return _0x2f8544();},'Vruht':function(_0x4d077d,_0x199ac5){return _0x4d077d===_0x199ac5;},'HnzOh':function(_0x1206e9,_0x58dbbc){return _0x1206e9(_0x58dbbc);},'PHBUL':'@ranger-testing/opencode-plugin','DykTc':function(_0x4ac422,_0x5c7126){return _0x4ac422===_0x5c7126;},'rClcD':_0x51e0ce(0x117),'YKMwk':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','QqCSD':_0x51e0ce(0x159),'duLbw':_0x51e0ce(0x100),'UIhXV':_0x51e0ce(0x128),'BBesO':function(_0x4274cf,_0x2da24b){return _0x4274cf(_0x2da24b);},'jVZRh':_0x51e0ce(0x104),'WjnAv':'\x20\x20Not\x20installed','hFXPA':_0x51e0ce(0x106),'XTYEb':'\x0a---\x20Skills\x20---','JeIeb':function(_0x1b552c,_0x41e8f6){return _0x1b552c===_0x41e8f6;},'cMjIT':function(_0x19ac76,_0x50469e){return _0x19ac76>_0x50469e;},'hvpxy':function(_0x50f616,_0x424808){return _0x50f616>_0x424808;},'KtoUm':_0x51e0ce(0x15b),'wmiRf':function(_0x19b5f0,_0x27a40b,_0xac534f){return _0x19b5f0(_0x27a40b,_0xac534f);},'QXEFf':function(_0x1994cb,_0x1af7b8){return _0x1994cb(_0x1af7b8);},'XsnvC':function(_0x5272a7,_0x537b2a){return _0x5272a7+_0x537b2a;},'BXYQr':function(_0xcac71,_0x2a5913){return _0xcac71===_0x2a5913;},'IDcTl':function(_0x490555,_0x3cd2ca){return _0x490555(_0x3cd2ca);},'ZHfDB':'plaintext','mwISV':'none','Qyhta':function(_0x2b936a,_0x5dc87f){return _0x2b936a!==_0x5dc87f;}};console['log'](_0x54b378[_0x51e0ce(0x141)]);const _0x45d4a7=process[_0x51e0ce(0x11b)](),_0x9700c2=_0x54b378['XVqaZ'](getRangerDir);if(!existsSync(_0x9700c2)){console[_0x51e0ce(0x143)](_0x51e0ce(0x139)+_0x54b378[_0x51e0ce(0x158)](link,_0x45d4a7,bold(_0x54b378['KgXJD'](basename,_0x45d4a7)))),console['log'](_0x51e0ce(0x15a)),console[_0x51e0ce(0x143)](_0x51e0ce(0x10b));return;}console['log']('Root:\x20'+link(_0x45d4a7,_0x54b378['KgXJD'](bold,basename(_0x45d4a7))));const _0x149a6f=_0x54b378['XVqaZ'](getCurrentVersion),_0x370485=_0x54b378[_0x51e0ce(0x105)](getLatestVersion);if(_0x370485['version']&&_0x370485[_0x51e0ce(0x147)]!==_0x149a6f)console['log']('Version:\x20'+_0x149a6f+'\x20(latest:\x20'+_0x370485['version']+')'),console[_0x51e0ce(0x143)]('\x20\x20Run:\x20ranger\x20update');else _0x370485[_0x51e0ce(0x147)]?console[_0x51e0ce(0x143)](_0x51e0ce(0x137)+_0x149a6f+_0x51e0ce(0xf8)):console[_0x51e0ce(0x143)](_0x51e0ce(0x137)+_0x149a6f);const _0x16ead5=await _0x54b378[_0x51e0ce(0x14a)](getToken);if(_0x16ead5){const _0x543403=await getCurrentUser(_0x16ead5);_0x543403['success']?console['log'](_0x51e0ce(0x113)+bold(_0x543403['user'][_0x51e0ce(0x165)])):(console[_0x51e0ce(0x143)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x51e0ce(0x143)]('API\x20Token:\x20✗\x20Not\x20found'),console[_0x51e0ce(0x143)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env']['DEBUG']&&(console[_0x51e0ce(0x143)](_0x51e0ce(0x131)+_0x54b378['bLpRK'](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+_0x54b378[_0x51e0ce(0x149)](getApiBaseUrl)));console['log'](_0x51e0ce(0x130));const _0x5c7167=await getOpencodePluginStatus();if(_0x54b378[_0x51e0ce(0x127)](_0x5c7167['status'],_0x51e0ce(0x14f)))console['log']('\x20\x20'+_0x54b378['HnzOh'](bold,_0x54b378[_0x51e0ce(0x13f)])+_0x51e0ce(0xfb)),_0x5c7167[_0x51e0ce(0x162)]&&console[_0x51e0ce(0x143)]('\x20\x20'+_0x5c7167[_0x51e0ce(0x162)]);else _0x54b378[_0x51e0ce(0x114)](_0x5c7167['status'],'not_configured')?(console[_0x51e0ce(0x143)](_0x54b378['rClcD']),_0x5c7167[_0x51e0ce(0x162)]&&console[_0x51e0ce(0x143)]('\x20\x20'+_0x5c7167[_0x51e0ce(0x162)]),console['log'](_0x54b378['YKMwk'])):console[_0x51e0ce(0x143)]('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console[_0x51e0ce(0x143)](_0x51e0ce(0x16c));const _0x243ad8=await _0x54b378['HnzOh'](getPluginInfo,'ranger@trailhead');if(_0x243ad8){const _0x38eb67=_0x243ad8[_0x51e0ce(0x16b)]||_0x54b378[_0x51e0ce(0x12a)],_0x2ad361=_0x243ad8['enabled']?_0x54b378['duLbw']:_0x54b378['UIhXV'];console[_0x51e0ce(0x143)]('\x20\x20'+_0x54b378['BBesO'](bold,_0x54b378['jVZRh'])+_0x51e0ce(0x10f)+_0x38eb67+',\x20'+_0x2ad361+')');}else console['log'](_0x54b378['WjnAv']),console['log'](_0x54b378['hFXPA']);console[_0x51e0ce(0x143)](_0x54b378[_0x51e0ce(0x15e)]);const {project:_0x1b8d3e,user:_0x4f32cc}=await _0x54b378['bLpRK'](getInstalledSkills),_0x445c53=_0x1b8d3e[_0x51e0ce(0x14b)](_0x5a84d2=>RANGER_MANAGED_SKILLS[_0x51e0ce(0x12c)](_0x5a84d2['name'])),_0x114f55=_0x4f32cc['filter'](_0x541acb=>RANGER_MANAGED_SKILLS['includes'](_0x541acb['name'])),_0x5e9d85=_0x445c53[_0x51e0ce(0x163)]+_0x114f55['length'];if(_0x54b378[_0x51e0ce(0x109)](_0x5e9d85,0x0))console['log'](_0x51e0ce(0x10a)),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x54b378['cMjIT'](_0x445c53[_0x51e0ce(0x163)],0x0)){console[_0x51e0ce(0x143)]('\x20\x20Project-level:');for(const _0x54c601 of _0x445c53){console[_0x51e0ce(0x143)](_0x51e0ce(0x145)+bold(_0x54c601['displayName'])+':\x20'+link(_0x54c601['path'],basename(_0x54c601[_0x51e0ce(0x150)])));}}if(_0x54b378['hvpxy'](_0x114f55[_0x51e0ce(0x163)],0x0)){console[_0x51e0ce(0x143)](_0x54b378[_0x51e0ce(0x118)]);for(const _0x122559 of _0x114f55){console[_0x51e0ce(0x143)](_0x51e0ce(0x145)+bold(_0x122559[_0x51e0ce(0x10e)])+':\x20'+_0x54b378['wmiRf'](link,_0x122559['path'],_0x54b378['QXEFf'](basename,_0x122559[_0x51e0ce(0x150)])));}}}console[_0x51e0ce(0x143)]('\x0a---\x20Profiles\x20---');const {envs:_0x19a167,activeEnv:_0x491f68}=await _0x54b378['mzEXo'](getEnvironments);let _0x28ed68=[];if(_0x16ead5)try{_0x28ed68=await listCloudProfiles();}catch{}const _0x38eaaf=_0x54b378[_0x51e0ce(0x154)](_0x19a167['length'],_0x28ed68[_0x51e0ce(0x163)]);if(_0x54b378['BXYQr'](_0x38eaaf,0x0))console['log'](_0x51e0ce(0x116)),console['log'](_0x51e0ce(0x13d));else{if(_0x54b378['hvpxy'](_0x38eaaf,0x5)){const _0x3063c8=[];_0x28ed68[_0x51e0ce(0x163)]>0x0&&_0x3063c8[_0x51e0ce(0x15c)](_0x28ed68[_0x51e0ce(0x163)]+'\x20cloud'),_0x54b378[_0x51e0ce(0x164)](_0x19a167[_0x51e0ce(0x163)],0x0)&&_0x3063c8['push'](_0x19a167[_0x51e0ce(0x163)]+'\x20local'),console['log'](_0x38eaaf+_0x51e0ce(0x115)+_0x3063c8['join'](',\x20')+')'),_0x491f68&&console['log']('\x20\x20Active:\x20'+_0x54b378[_0x51e0ce(0xfd)](bold,_0x491f68)),console[_0x51e0ce(0x143)](_0x51e0ce(0x156));}else{for(const _0x511157 of _0x28ed68){const _0x49a603=_0x511157[_0x51e0ce(0x11a)]===_0x491f68?_0x51e0ce(0x167):'';console['log']('\x20\x20'+bold(_0x511157[_0x51e0ce(0x11a)])+_0x51e0ce(0x142)+_0x49a603);const _0x5dc990=_0x511157['sessionUpdatedAt']?_0x51e0ce(0xff)+_0x511157[_0x51e0ce(0x110)]+')':_0x51e0ce(0x134);console['log'](_0x51e0ce(0xfa)+_0x5dc990);}const _0xf356e1=new Set(_0x28ed68[_0x51e0ce(0x111)](_0x1d9e6a=>_0x1d9e6a[_0x51e0ce(0x11a)]));for(const _0x475d73 of _0x19a167){if(_0xf356e1['has'](_0x475d73[_0x51e0ce(0x11a)]))continue;const _0x44406b=_0x475d73[_0x51e0ce(0x121)]?_0x51e0ce(0x167):'',_0x2abcfd=_0x475d73['hasEncryptedAuth']?'encrypted':_0x475d73['hasPlaintextAuth']?_0x54b378['ZHfDB']:_0x54b378['mwISV'];console[_0x51e0ce(0x143)]('\x20\x20'+_0x54b378['BBesO'](bold,_0x475d73[_0x51e0ce(0x11a)])+_0x51e0ce(0x151)+_0x44406b),console[_0x51e0ce(0x143)](_0x51e0ce(0x14d)+_0x2abcfd),_0x54b378['Qyhta'](_0x475d73[_0x51e0ce(0x12e)],_0x51e0ce(0x122))&&console['log']('\x20\x20\x20\x20Settings:\x20'+link(_0x475d73['settingsPath'],basename(_0x475d73[_0x51e0ce(0x12e)])));}if(!_0x491f68){console[_0x51e0ce(0x143)]('\x0a\x20\x20No\x20active\x20profile\x20set');const _0x43ca7b=[..._0x28ed68['map'](_0xa59139=>_0xa59139['name']),..._0x19a167[_0x51e0ce(0x14b)](_0x589f7a=>!_0xf356e1[_0x51e0ce(0x146)](_0x589f7a[_0x51e0ce(0x11a)]))['map'](_0x36d418=>_0x36d418['name'])];console['log'](_0x51e0ce(0xfe)+_0x43ca7b[_0x51e0ce(0x12b)](',\x20')+')');}}}console['log']('');}