@ranger-testing/ranger-cli 3.1.6 → 3.1.7-alpha.387730d-58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  71. package/build/commands/utils/sessionCache.js +1 -1
  72. package/build/commands/utils/settings.js +1 -1
  73. package/build/commands/utils/skillContent.js +1 -1
  74. package/build/commands/utils/skills.js +1 -1
  75. package/build/commands/utils/stitchWebmFiles.js +1 -1
  76. package/build/commands/utils/telemetry.js +1 -1
  77. package/build/commands/utils/tokenRefresh.js +1 -1
  78. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  79. package/build/commands/utils/tunnelClient.js +1 -1
  80. package/build/commands/utils/userApi.js +1 -1
  81. package/build/commands/utils/version.js +1 -1
  82. package/build/commands/verifyFeature.js +1 -1
  83. package/build/commands/verifyFeatureCli.js +1 -1
  84. package/build/commands/verifyFeatureNovaCli.js +1 -1
  85. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  86. package/package.json +2 -5
@@ -1 +1 @@
1
- (function(_0x433a46,_0x448c4c){const _0x37b005=_0x8e48,_0x2045b9=_0x433a46();while(!![]){try{const _0x5a89c1=-parseInt(_0x37b005(0x1b1))/0x1*(-parseInt(_0x37b005(0x1be))/0x2)+parseInt(_0x37b005(0x1b7))/0x3*(-parseInt(_0x37b005(0x1bb))/0x4)+-parseInt(_0x37b005(0x1ba))/0x5*(-parseInt(_0x37b005(0x1b2))/0x6)+-parseInt(_0x37b005(0x1af))/0x7+parseInt(_0x37b005(0x1b9))/0x8+-parseInt(_0x37b005(0x1bf))/0x9*(parseInt(_0x37b005(0x1bd))/0xa)+-parseInt(_0x37b005(0x1ae))/0xb*(-parseInt(_0x37b005(0x1b3))/0xc);if(_0x5a89c1===_0x448c4c)break;else _0x2045b9['push'](_0x2045b9['shift']());}catch(_0x1eaf4b){_0x2045b9['push'](_0x2045b9['shift']());}}}(_0x3398,0xc0280));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x3398(){const _0x2f4bfe=['126DtMNcH','11gSHydR','7500283VXeRWD','\x0a✅\x20API\x20key\x20stored\x20successfully','452947vdAAvE','306DydDzA','20809608qCXdvf','Re-authenticating\x20via\x20MCP\x20bootstrap...','message','wEXtw','3swuxuB','TBrbh','5079160qNhOck','8185AoHBNv','1457912iAFzRU','log','487460gZeaBr','2tyrJUe'];_0x3398=function(){return _0x2f4bfe;};return _0x3398();}import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x8e48(_0x1480eb,_0x14459e){_0x1480eb=_0x1480eb-0x1ae;const _0x3398ed=_0x3398();let _0x8e48bc=_0x3398ed[_0x1480eb];return _0x8e48bc;}export async function login(){const _0xc2236=_0x8e48,_0x5141ee={'TBrbh':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','wEXtw':function(_0x3fdc80){return _0x3fdc80();},'NhumB':function(_0x7515f8,_0x2df454){return _0x7515f8 instanceof _0x2df454;}},_0x400448=await getMcpAuthOrigin();if(_0x400448){console[_0xc2236(0x1bc)](_0xc2236(0x1b4)),await mcpBootstrap();return;}if(!isInteractive())throw new Error(_0x5141ee[_0xc2236(0x1b8)]);try{const _0x2657d2=await _0x5141ee[_0xc2236(0x1b6)](runDeviceAuthFlow),_0x492cdb=await getCurrentUser(_0x2657d2);_0x492cdb['success']?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x492cdb['user']['organizationName']):console[_0xc2236(0x1bc)](_0xc2236(0x1b0));}catch(_0x5352b2){throw new Error('Login\x20failed:\x20'+(_0x5141ee['NhumB'](_0x5352b2,Error)?_0x5352b2[_0xc2236(0x1b5)]:_0x5352b2));}}
1
+ (function(_0x5d3e80,_0x2df184){const _0x3e771a=_0x2900,_0x26ed67=_0x5d3e80();while(!![]){try{const _0xe72d82=parseInt(_0x3e771a(0x16d))/0x1+-parseInt(_0x3e771a(0x17b))/0x2*(-parseInt(_0x3e771a(0x171))/0x3)+-parseInt(_0x3e771a(0x170))/0x4*(parseInt(_0x3e771a(0x16f))/0x5)+parseInt(_0x3e771a(0x178))/0x6+parseInt(_0x3e771a(0x172))/0x7+parseInt(_0x3e771a(0x17a))/0x8+parseInt(_0x3e771a(0x16b))/0x9*(-parseInt(_0x3e771a(0x177))/0xa);if(_0xe72d82===_0x2df184)break;else _0x26ed67['push'](_0x26ed67['shift']());}catch(_0x51a1dc){_0x26ed67['push'](_0x26ed67['shift']());}}}(_0x2acb,0xd0ebf));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';function _0x2acb(){const _0x494096=['GwcOw','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','2054550GdjzQW','300294ephVQR','Re-authenticating\x20via\x20MCP\x20bootstrap...','7451456EqUlbP','11668JVbseT','81XPENII','\x0a✅\x20Logged\x20in\x20to\x20','971918SiuIRV','message','685340trujYR','20ntrIMG','69jkqkoU','9118179WJkUpx','log','\x0a✅\x20API\x20key\x20stored\x20successfully'];_0x2acb=function(){return _0x494096;};return _0x2acb();}function _0x2900(_0x4a664f,_0x38c24c){_0x4a664f=_0x4a664f-0x16b;const _0x2acb5e=_0x2acb();let _0x29004a=_0x2acb5e[_0x4a664f];return _0x29004a;}import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0x4c6eb0=_0x2900,_0x74adf9={'GwcOw':function(_0x164e01){return _0x164e01();},'QgODj':_0x4c6eb0(0x176),'BhoTo':function(_0xf5a7b5,_0x79c472){return _0xf5a7b5 instanceof _0x79c472;}},_0x422aa2=await _0x74adf9[_0x4c6eb0(0x175)](getMcpAuthOrigin);if(_0x422aa2){console[_0x4c6eb0(0x173)](_0x4c6eb0(0x179)),await _0x74adf9[_0x4c6eb0(0x175)](mcpBootstrap);return;}if(!_0x74adf9['GwcOw'](isInteractive))throw new Error(_0x74adf9['QgODj']);try{const _0x39d88d=await _0x74adf9[_0x4c6eb0(0x175)](runDeviceAuthFlow),_0x46e98b=await getCurrentUser(_0x39d88d);_0x46e98b['success']?console['log'](_0x4c6eb0(0x16c)+_0x46e98b['user']['organizationName']):console[_0x4c6eb0(0x173)](_0x4c6eb0(0x174));}catch(_0x159c17){throw new Error('Login\x20failed:\x20'+(_0x74adf9['BhoTo'](_0x159c17,Error)?_0x159c17[_0x4c6eb0(0x16e)]:_0x159c17));}}
@@ -1 +1 @@
1
- const _0x495f8d=_0x4ef2;(function(_0x10e316,_0xe7487e){const _0x739611=_0x4ef2,_0x495b63=_0x10e316();while(!![]){try{const _0x29e0f2=-parseInt(_0x739611(0x1df))/0x1+parseInt(_0x739611(0x21a))/0x2+-parseInt(_0x739611(0x1b5))/0x3+-parseInt(_0x739611(0x1d8))/0x4*(parseInt(_0x739611(0x1f5))/0x5)+-parseInt(_0x739611(0x23f))/0x6+-parseInt(_0x739611(0x1eb))/0x7*(parseInt(_0x739611(0x1d3))/0x8)+-parseInt(_0x739611(0x226))/0x9*(-parseInt(_0x739611(0x207))/0xa);if(_0x29e0f2===_0xe7487e)break;else _0x495b63['push'](_0x495b63['shift']());}catch(_0x3447aa){_0x495b63['push'](_0x495b63['shift']());}}}(_0x353f,0x96b73));import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createServer}from'http';import{randomBytes,createHash}from'crypto';import{exec}from'child_process';import{getMcpAuthUrl}from'./utils/environment.js';const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),_0x495f8d(0x1e0),'mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),'.ranger',_0x495f8d(0x1fa));export async function getMcpAuthOrigin(){const _0xcdfddc=_0x495f8d,_0x3dc4f0={'VbXtN':function(_0x291734,_0x4e40fa,_0x47c696){return _0x291734(_0x4e40fa,_0x47c696);},'xiNdf':_0xcdfddc(0x20a),'bBgnm':function(_0x2d6b0a,_0x576683){return _0x2d6b0a||_0x576683;}};try{const _0x10b900=(await _0x3dc4f0['VbXtN'](readFile,AUTH_ORIGIN_PATH,_0x3dc4f0['xiNdf']))['trim']();return _0x3dc4f0['bBgnm'](_0x10b900,null);}catch{return null;}}export async function mcpBootstrap(){const _0x14356b=_0x495f8d,_0x36342b={'MEBgv':function(_0x34765e){return _0x34765e();},'wOelU':function(_0x151dd1,_0x11db9a){return _0x151dd1(_0x11db9a);},'LfznC':function(_0x519ec5){return _0x519ec5();}},_0xe9ab62=_0x36342b[_0x14356b(0x23e)](getMcpAuthUrl);currentOrigin=_0xe9ab62;const _0x236aa6=process[_0x14356b(0x22c)][_0x14356b(0x1de)]??![];console[_0x14356b(0x1ab)]('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0xe9ab62+'\x0a');const _0x3cdc71=await _0x36342b[_0x14356b(0x216)](tryUnauthenticated,_0xe9ab62);let _0x3c6b23=null;if(_0x3cdc71===_0x14356b(0x1af))_0x3c6b23='';else{_0x3c6b23=await _0x36342b[_0x14356b(0x1b9)](loadCachedToken);if(!_0x3c6b23){if(!_0x236aa6)throw new Error(_0x14356b(0x1d6)+'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.');_0x3c6b23=await oauthFlow(_0xe9ab62);}}await callGetCliToken(_0xe9ab62,_0x3c6b23);}async function tryUnauthenticated(_0x4518d4){const _0x264b7f=_0x495f8d,_0x51ecab={'IWYJN':function(_0x10fc91,_0x5cec57,_0x55b91d){return _0x10fc91(_0x5cec57,_0x55b91d);},'UMyNW':_0x264b7f(0x24d),'LMYHU':_0x264b7f(0x1d9),'WuFGR':'initialize','BoOIk':_0x264b7f(0x245),'EfJWB':_0x264b7f(0x1c2),'WdvKB':'1.0.0','XsFjZ':function(_0x136b19,_0x5080ef){return _0x136b19===_0x5080ef;}},_0x361634=await _0x51ecab[_0x264b7f(0x1d1)](fetch,_0x4518d4,{'method':_0x51ecab[_0x264b7f(0x248)],'headers':{'Content-Type':_0x264b7f(0x204),'Accept':_0x264b7f(0x1b2)},'body':JSON[_0x264b7f(0x213)]({'jsonrpc':_0x51ecab[_0x264b7f(0x200)],'id':0x1,'method':_0x51ecab[_0x264b7f(0x23b)],'params':{'protocolVersion':_0x51ecab[_0x264b7f(0x1d7)],'capabilities':{},'clientInfo':{'name':_0x51ecab['EfJWB'],'version':_0x51ecab[_0x264b7f(0x217)]}}})});if(_0x361634['ok'])return await _0x361634[_0x264b7f(0x1cd)](),_0x264b7f(0x1af);if(_0x51ecab['XsFjZ'](_0x361634[_0x264b7f(0x249)],0x191))return await _0x361634['text'](),_0x264b7f(0x1b1);const _0x25505f=await _0x361634[_0x264b7f(0x1cd)]();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0x361634['status']+':\x20'+_0x25505f);}class OAuthTimeoutError extends Error{constructor(_0x812fd8){const _0x2409d4={'odqxI':'OAuthTimeoutError'};super(_0x812fd8),this['name']=_0x2409d4['odqxI'];}}function _0x353f(){const _0x2e246c=['LMYHU','vPVBe','text/html','DifpM','application/json','write','get','10HnQNQE','VPydb','length','utf-8','notifications/initialized','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','OAuth\x20error:\x20','authorization_code','code','ysuly','digest','origin','stringify','iscpn','Exchanging\x20authorization\x20code...','wOelU','WdvKB','VcaeA','error','291190JPQgqr','toString','Authorization','KRXZv','code_challenge','xdg-open','BMitF','twmyY','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','initialize','zbXBA','jIdfr','34759359yqatlJ','<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','CyiWz','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a','http://localhost:','No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','stdout','base64url','Ranger\x20CLI','expires_in','slice','RbJNn','set','jUhAu','NOaEo','code_challenge_method','Geeyo','close','win32','mMWts','/.well-known/oauth-authorization-server','WuFGR','token','type','MEBgv','911280auOAeQ','KDyWM','refresh.txt','/callback','content','client_secret','2025-03-26','XHcKc','Unknown\x20error','UMyNW','status','clientId','trim','structuredContent','POST','clientSecret','aomTe','log','eszfA','accessToken','isError','proxied','vgepr','needs-oauth','application/json,\x20text/event-stream','searchParams','ntuZK','2979132KbgVXU','cKfqN','hJUWP','okDNx','LfznC','vQmIo','MwqzS','\x20done','pathname','fOYDa','SCWtS','writeHead','then','ranger-cli','authorization_servers','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','hrGRJ','redirect_uri','json','startsWith','sha256','registration_endpoint','data:','Zbfso','text','update','ethdY','Discovering\x20authorization\x20server...','IWYJN','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','4624SmZECq','message','kFCMv','MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','BoOIk','8GVBDzp','2.0','S256','XgtgH','HqlFy','ALkoi','isTTY','42309jyeGlF','.ranger','nukXd','darwin','replace','OEDKK','nPsOS','refresh_token','state','UKAdU','resource','open','14798uqYkPI','mUSCc','expiresAt','\x0aOpening\x20browser\x20for\x20authentication...','parse','client_id','split','ediDr','zhAsu','access_token','2453225ojFPzf','SWMvl','authorization_endpoint','end','GZenu','auth-origin.txt','platform','cOviZ','string','text/event-stream','cieJJ'];_0x353f=function(){return _0x2e246c;};return _0x353f();}async function oauthFlow(_0x5e8b20){const _0x10d1a7=_0x495f8d,_0x3074c5={'cKfqN':function(_0x1ddf0f,_0x32360f){return _0x1ddf0f(_0x32360f);},'hJUWP':function(_0x3f70d8,_0x504af2){return _0x3f70d8 instanceof _0x504af2;},'okDNx':function(_0x3b5d3a){return _0x3b5d3a();},'zQkOO':'\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a'};try{return await _0x3074c5[_0x10d1a7(0x1b6)](oauthFlowAttempt,_0x5e8b20);}catch(_0x1af280){if(_0x3074c5[_0x10d1a7(0x1b7)](_0x1af280,OAuthTimeoutError)&&await _0x3074c5[_0x10d1a7(0x1b8)](loadCachedClient))return console[_0x10d1a7(0x1ab)](_0x3074c5['zQkOO']),await clearCachedClient(),await _0x3074c5[_0x10d1a7(0x1b6)](oauthFlowAttempt,_0x5e8b20);throw _0x1af280;}}async function oauthFlowAttempt(_0x52393d){const _0x384025=_0x495f8d,_0x177a1d={'tNXGY':function(_0x1a86c6,_0x25e9fd){return _0x1a86c6(_0x25e9fd);},'ysuly':'Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','CyiWz':function(_0x57268d,_0x5e9e67,_0x3b7763){return _0x57268d(_0x5e9e67,_0x3b7763);},'GAZmJ':_0x384025(0x22e),'Geeyo':_0x384025(0x20e),'nxxHP':_0x384025(0x1c4),'vQmIo':function(_0x1658ae,_0x102cf4){return _0x1658ae(_0x102cf4);},'UcxmF':_0x384025(0x1c9),'mMWts':'hex','NHurO':_0x384025(0x1c6),'DifpM':_0x384025(0x21e),'tHMXw':_0x384025(0x235),'jIdfr':_0x384025(0x1ee),'RswBA':_0x384025(0x215),'zhAsu':_0x384025(0x244),'VieOd':'resource','nPsOS':function(_0x298767,_0x1ac3c9,_0x27b550,_0x15534b){return _0x298767(_0x1ac3c9,_0x27b550,_0x15534b);}},_0xbf3963=_0x52393d[_0x384025(0x1e3)](/\/mcp$/,'');process[_0x384025(0x22c)][_0x384025(0x205)](_0x384025(0x1d0));const _0x30e21c=await _0x177a1d['tNXGY'](fetch,_0xbf3963+'/.well-known/oauth-protected-resource');if(!_0x30e21c['ok'])throw new Error(_0x177a1d[_0x384025(0x210)]);const _0x47eb23=await _0x30e21c[_0x384025(0x1c7)](),_0x467d27=_0x47eb23[_0x384025(0x1c3)]?.[0x0];if(!_0x467d27)throw new Error(_0x384025(0x22b));console[_0x384025(0x1ab)]('\x20'+_0x467d27);const _0x2b84ae=await fetchAuthServerMetadata(_0x467d27);let _0x44f1aa,_0x3ac87c;const _0x304249=await loadCachedClient();if(_0x304249)_0x44f1aa=_0x304249['clientId'],_0x3ac87c=_0x304249[_0x384025(0x24e)];else{if(_0x2b84ae[_0x384025(0x1ca)]){process['stdout'][_0x384025(0x205)]('Registering\x20OAuth\x20client...');const _0x50ca7d=await _0x177a1d['CyiWz'](fetch,_0x2b84ae['registration_endpoint'],{'method':_0x384025(0x24d),'headers':{'Content-Type':_0x384025(0x204)},'body':JSON['stringify']({'client_name':_0x177a1d['GAZmJ'],'redirect_uris':['http://localhost:'+CALLBACK_PORT+'/callback'],'grant_types':[_0x177a1d['Geeyo'],_0x384025(0x1e6)],'response_types':['code'],'token_endpoint_auth_method':'none'})});if(!_0x50ca7d['ok']){const _0x52d0f0=await _0x50ca7d[_0x384025(0x1cd)]();throw new Error('Client\x20registration\x20failed:\x20'+_0x52d0f0);}const _0x27d84a=await _0x50ca7d[_0x384025(0x1c7)]();_0x44f1aa=_0x27d84a[_0x384025(0x1f0)],_0x3ac87c=_0x27d84a['client_secret'],await saveCachedClient(_0x44f1aa,_0x3ac87c),console['log'](_0x384025(0x1bc));}else throw new Error(_0x177a1d['nxxHP']);}const _0x1fada9=randomBytes(0x20)['toString'](_0x384025(0x22d)),_0x5aaab5=_0x177a1d['vQmIo'](createHash,_0x177a1d['UcxmF'])[_0x384025(0x1ce)](_0x1fada9)[_0x384025(0x211)](_0x384025(0x22d)),_0x23511=_0x177a1d['vQmIo'](randomBytes,0x10)[_0x384025(0x21b)](_0x177a1d[_0x384025(0x239)]),_0xc83f2c=new URL(_0x2b84ae[_0x384025(0x1f7)]);_0xc83f2c['searchParams'][_0x384025(0x232)]('response_type',_0x384025(0x20f)),_0xc83f2c[_0x384025(0x1b3)]['set']('client_id',_0x44f1aa),_0xc83f2c['searchParams'][_0x384025(0x232)](_0x177a1d['NHurO'],_0x384025(0x22a)+CALLBACK_PORT+_0x384025(0x242)),_0xc83f2c[_0x384025(0x1b3)][_0x384025(0x232)](_0x177a1d[_0x384025(0x203)],_0x5aaab5),_0xc83f2c['searchParams']['set'](_0x177a1d['tHMXw'],_0x384025(0x1da)),_0xc83f2c['searchParams']['set']('state',_0x23511);_0x47eb23[_0x384025(0x1e9)]&&_0xc83f2c['searchParams'][_0x384025(0x232)]('resource',_0x47eb23[_0x384025(0x1e9)]);console['log'](_0x177a1d[_0x384025(0x225)]),console[_0x384025(0x1ab)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a'+_0xc83f2c[_0x384025(0x21b)]()+'\x0a'),await openBrowser(_0xc83f2c[_0x384025(0x21b)]());const _0x192cb2=await _0x177a1d[_0x384025(0x1ba)](waitForCallback,_0x23511);process[_0x384025(0x22c)][_0x384025(0x205)](_0x177a1d['RswBA']);const _0x4200a1=new URLSearchParams({'grant_type':_0x177a1d[_0x384025(0x236)],'code':_0x192cb2,'redirect_uri':'http://localhost:'+CALLBACK_PORT+_0x384025(0x242),'client_id':_0x44f1aa,'code_verifier':_0x1fada9});_0x3ac87c&&_0x4200a1['set'](_0x177a1d[_0x384025(0x1f3)],_0x3ac87c);_0x47eb23['resource']&&_0x4200a1['set'](_0x177a1d['VieOd'],_0x47eb23['resource']);const _0x508a2b=await _0x177a1d[_0x384025(0x228)](fetch,_0x2b84ae['token_endpoint'],{'method':'POST','headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':_0x4200a1});if(!_0x508a2b['ok']){const _0x1f00b7=await _0x508a2b[_0x384025(0x1cd)]();throw new Error('Token\x20exchange\x20failed:\x20'+_0x1f00b7);}const _0x316747=await _0x508a2b['json']();return console['log'](_0x384025(0x1bc)),await _0x177a1d[_0x384025(0x1e5)](saveCachedToken,_0x316747[_0x384025(0x1f4)],_0x316747['refresh_token'],_0x316747[_0x384025(0x22f)]),_0x316747['access_token'];}async function callGetCliToken(_0x26fd73,_0x4d774c){const _0xaf3bc=_0x495f8d,_0x50ff67={'UKAdU':_0xaf3bc(0x24d),'SWMvl':function(_0x46a6cc,_0x42ed1f){return _0x46a6cc(_0x42ed1f);},'ediDr':'application/json','xgEeC':_0xaf3bc(0x1b2),'rZoKT':function(_0x4ed959,_0x92fa58){return _0x4ed959(_0x92fa58);},'uVndd':_0xaf3bc(0x245),'ntuZK':'ranger-cli','UZBTt':function(_0x5dc148,_0x54995c,_0x2154b4){return _0x5dc148(_0x54995c,_0x2154b4);},'BMitF':'2.0','VPydb':_0xaf3bc(0x20b),'ethdY':'Requesting\x20CLI\x20token...','uJNWY':function(_0x5d87c4,_0x24e93d){return _0x5d87c4(_0x24e93d);},'KRXZv':'tools/call','RbJNn':'\x20done','nukXd':'\x0aUnexpected\x20response\x20structure:','mUSCc':function(_0x24ed18,_0x583ede,_0x1620f8){return _0x24ed18(_0x583ede,_0x1620f8);},'FKRgV':function(_0x53ace2){return _0x53ace2();},'ALkoi':'.ranger','VcaeA':function(_0x433811,_0x3e9f07,_0x34b0a7){return _0x433811(_0x3e9f07,_0x34b0a7);},'vSRxT':_0xaf3bc(0x241),'OEDKK':function(_0x13b11d,_0x47695d,_0x5e035e,_0x1ad044){return _0x13b11d(_0x47695d,_0x5e035e,_0x1ad044);}},_0x2ecf41={'Content-Type':_0x50ff67[_0xaf3bc(0x1f2)],'Accept':_0x50ff67['xgEeC']};_0x4d774c&&(_0x2ecf41[_0xaf3bc(0x21c)]='Bearer\x20'+_0x4d774c);const _0x321dfc=async _0x36e250=>{const _0x18857a=_0xaf3bc,_0x22fc91=await fetch(_0x26fd73,{'method':_0x50ff67['UKAdU'],'headers':_0x2ecf41,'body':JSON[_0x18857a(0x213)](_0x36e250)});if(!_0x22fc91['ok']){const _0x20b930=await _0x22fc91['text']();throw new Error('HTTP\x20'+_0x22fc91[_0x18857a(0x249)]+':\x20'+_0x20b930);}return _0x50ff67['SWMvl'](parseResponse,_0x22fc91);};process[_0xaf3bc(0x22c)][_0xaf3bc(0x205)]('Initializing\x20MCP\x20session...');const _0x1189f0=await _0x50ff67['rZoKT'](_0x321dfc,{'jsonrpc':_0xaf3bc(0x1d9),'id':0x1,'method':_0xaf3bc(0x223),'params':{'protocolVersion':_0x50ff67['uVndd'],'capabilities':{},'clientInfo':{'name':_0x50ff67[_0xaf3bc(0x1b4)],'version':'1.0.0'}}});if(_0x1189f0[_0xaf3bc(0x219)])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x1189f0[_0xaf3bc(0x219)]['message']??JSON['stringify'](_0x1189f0[_0xaf3bc(0x219)])));console[_0xaf3bc(0x1ab)](_0xaf3bc(0x1bc)),await _0x50ff67['UZBTt'](fetch,_0x26fd73,{'method':_0x50ff67[_0xaf3bc(0x1e8)],'headers':_0x2ecf41,'body':JSON[_0xaf3bc(0x213)]({'jsonrpc':_0x50ff67[_0xaf3bc(0x220)],'method':_0x50ff67[_0xaf3bc(0x208)]})})[_0xaf3bc(0x1c1)](_0x1671dc=>_0x1671dc['text']()),process[_0xaf3bc(0x22c)][_0xaf3bc(0x205)](_0x50ff67[_0xaf3bc(0x1cf)]);const _0xfcbc0c=await _0x50ff67['uJNWY'](_0x321dfc,{'jsonrpc':_0xaf3bc(0x1d9),'id':0x2,'method':_0x50ff67[_0xaf3bc(0x21d)],'params':{'name':'get_cli_token','arguments':{}}});if(_0xfcbc0c['error'])throw new Error('get_cli_token\x20failed:\x20'+(_0xfcbc0c[_0xaf3bc(0x219)][_0xaf3bc(0x1d4)]??JSON['stringify'](_0xfcbc0c['error'])));console['log'](_0x50ff67[_0xaf3bc(0x231)]);const _0x53eefa=_0x50ff67[_0xaf3bc(0x1f6)](extractToken,_0xfcbc0c['result']);if(!_0x53eefa){console['error'](_0x50ff67[_0xaf3bc(0x1e1)]),console[_0xaf3bc(0x219)](JSON['stringify'](_0xfcbc0c['result'],null,0x2));throw new Error('Could\x20not\x20extract\x20token\x20from\x20MCP\x20response');}const _0x30561a=_0x50ff67[_0xaf3bc(0x1ec)](join,_0x50ff67['FKRgV'](homedir),_0x50ff67[_0xaf3bc(0x1dd)]),_0x1f90b3=_0x50ff67[_0xaf3bc(0x218)](join,_0x30561a,_0x50ff67['vSRxT']);await mkdir(_0x30561a,{'recursive':!![]}),await _0x50ff67[_0xaf3bc(0x1e4)](writeFile,_0x1f90b3,_0x53eefa,{'mode':0x180}),await _0x50ff67[_0xaf3bc(0x1e4)](writeFile,_0x50ff67[_0xaf3bc(0x218)](join,_0x30561a,'auth-origin.txt'),_0x26fd73,{'mode':0x180}),console['log']('\x0aToken\x20written\x20to\x20'+_0x1f90b3),console[_0xaf3bc(0x1ab)](_0xaf3bc(0x229));}async function fetchAuthServerMetadata(_0x1ea59d){const _0x29e1cc=_0x495f8d,_0x30fb39=_0x1ea59d+_0x29e1cc(0x23a),_0x4dc8b5=await fetch(_0x30fb39);if(!_0x4dc8b5['ok'])throw new Error(_0x29e1cc(0x20c)+_0x30fb39+':\x20'+_0x4dc8b5[_0x29e1cc(0x249)]);return _0x4dc8b5[_0x29e1cc(0x1c7)]();}function waitForCallback(_0x9a8c6f){const _0x2da5d4=_0x495f8d,_0x287d3f={'OljZK':function(_0x4db4e8){return _0x4db4e8();},'cOviZ':_0x2da5d4(0x219),'twmyY':_0x2da5d4(0x202),'kzyrY':'127.0.0.1'};return new Promise((_0x5ce257,_0x14a696)=>{const _0xd891f5=_0x2da5d4,_0x599915={'HqlFy':function(_0x304a6b){return _0x287d3f['OljZK'](_0x304a6b);},'KDyWM':'Not\x20found','cCSRL':_0x287d3f[_0xd891f5(0x1fc)],'fOYDa':_0x287d3f[_0xd891f5(0x221)],'GZenu':function(_0x3073bd){return _0x3073bd();},'mzHPI':'<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','XgtgH':function(_0x44efa7,_0x3e8c74){return _0x44efa7(_0x3e8c74);},'NOaEo':function(_0x53f994,_0x3efe63){return _0x53f994(_0x3efe63);}},_0x520cca=()=>{const _0xd0e5ab=_0xd891f5;_0xd18439['closeAllConnections'](),_0xd18439[_0xd0e5ab(0x237)]();},_0x48cfb7=setTimeout(()=>{const _0x1b1a93=_0xd891f5;_0x599915[_0x1b1a93(0x1dc)](_0x520cca),_0x14a696(new OAuthTimeoutError(_0x1b1a93(0x1d2)));},0x1d4c0),_0xd18439=createServer((_0x89dc8b,_0x35c1e3)=>{const _0x5929a3=_0xd891f5,_0x252a2c=new URL(_0x89dc8b['url']??'/','http://localhost:'+CALLBACK_PORT);if(_0x252a2c[_0x5929a3(0x1bd)]!=='/callback'){_0x35c1e3['writeHead'](0x194),_0x35c1e3['end'](_0x599915[_0x5929a3(0x240)]);return;}const _0xb2cf8f=_0x252a2c[_0x5929a3(0x1b3)]['get'](_0x5929a3(0x20f)),_0x511b4c=_0x252a2c[_0x5929a3(0x1b3)]['get'](_0x5929a3(0x1e7)),_0x455cc5=_0x252a2c[_0x5929a3(0x1b3)]['get'](_0x599915['cCSRL']);if(_0x455cc5){const _0x39cd8b=_0x252a2c[_0x5929a3(0x1b3)][_0x5929a3(0x206)]('error_description')??_0x455cc5;_0x35c1e3[_0x5929a3(0x1c0)](0xc8,{'Content-Type':_0x599915['fOYDa']}),_0x35c1e3[_0x5929a3(0x1f8)]('<html><body><h2>Authentication\x20failed</h2><p>'+_0x39cd8b+_0x5929a3(0x222)),clearTimeout(_0x48cfb7),_0x599915[_0x5929a3(0x1f9)](_0x520cca),_0x14a696(new Error(_0x5929a3(0x20d)+_0x39cd8b));return;}if(!_0xb2cf8f||_0x511b4c!==_0x9a8c6f){_0x35c1e3[_0x5929a3(0x1c0)](0x190,{'Content-Type':_0x599915['fOYDa']}),_0x35c1e3[_0x5929a3(0x1f8)](_0x5929a3(0x227));return;}_0x35c1e3[_0x5929a3(0x1c0)](0xc8,{'Content-Type':_0x599915[_0x5929a3(0x1be)]}),_0x35c1e3['end'](_0x599915['mzHPI']),_0x599915[_0x5929a3(0x1db)](clearTimeout,_0x48cfb7),_0x520cca(),_0x599915[_0x5929a3(0x234)](_0x5ce257,_0xb2cf8f);});_0xd18439['listen'](CALLBACK_PORT,_0x287d3f['kzyrY']);});}async function openBrowser(_0x514ebc){const _0x207bb9=_0x495f8d,_0x1b98a4={'iscpn':_0x207bb9(0x1e2),'jUhAu':_0x207bb9(0x1ea),'jqPnO':_0x207bb9(0x238),'cFayV':'start','pXXqq':_0x207bb9(0x21f),'zbXBA':function(_0x5eb968,_0x5dac45){return _0x5eb968(_0x5dac45);}},_0x111788=process[_0x207bb9(0x1fb)]===_0x1b98a4[_0x207bb9(0x214)]?_0x1b98a4[_0x207bb9(0x233)]:process[_0x207bb9(0x1fb)]===_0x1b98a4['jqPnO']?_0x1b98a4['cFayV']:_0x1b98a4['pXXqq'];_0x1b98a4[_0x207bb9(0x224)](exec,_0x111788+'\x20\x22'+_0x514ebc+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x2fd163=_0x495f8d,_0x39a5fa={'vPVBe':function(_0x5aa45b,_0x4e6822){return _0x5aa45b!==_0x4e6822;},'Gxtlg':function(_0x106c49,_0x2edcdd){return _0x106c49>_0x2edcdd;}};try{const _0x54e4a5=JSON['parse'](await readFile(TOKEN_CACHE_PATH,'utf-8'));if(_0x54e4a5['origin']&&_0x39a5fa[_0x2fd163(0x201)](_0x54e4a5[_0x2fd163(0x212)],currentOrigin))return null;if(_0x54e4a5[_0x2fd163(0x1ed)]&&_0x39a5fa['Gxtlg'](Date['now'](),_0x54e4a5['expiresAt']))return null;return _0x54e4a5[_0x2fd163(0x1ad)]??null;}catch{return null;}}async function saveCachedToken(_0x25c1f,_0x3e3374,_0xabfeb9){const _0x12aa62=_0x495f8d,_0x6d0a02={'hrGRJ':function(_0x57d27a,_0x58da11,_0x2c66c9){return _0x57d27a(_0x58da11,_0x2c66c9);},'JLiBS':function(_0x52f633,_0x322c70,_0x20f98d,_0x26be50){return _0x52f633(_0x322c70,_0x20f98d,_0x26be50);}},_0x17b9e6=await loadCachedData(),_0x5e354c={..._0x17b9e6,'origin':currentOrigin,'accessToken':_0x25c1f,'refreshToken':_0x3e3374??_0x17b9e6?.['refreshToken'],'expiresAt':_0xabfeb9?Date['now']()+_0xabfeb9*0x3e8:undefined};await _0x6d0a02[_0x12aa62(0x1c5)](mkdir,join(homedir(),'.ranger'),{'recursive':!![]}),await _0x6d0a02['JLiBS'](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x5e354c),{'mode':0x180});}async function loadCachedClient(){const _0xf34d33=_0x495f8d,_0x234bdf={'kFCMv':function(_0x3db8fc,_0x29eca3){return _0x3db8fc!==_0x29eca3;}},_0x5b2043=await loadCachedData();if(_0x5b2043?.[_0xf34d33(0x212)]&&_0x234bdf[_0xf34d33(0x1d5)](_0x5b2043['origin'],currentOrigin))return null;return _0x5b2043?.['clientId']?{'clientId':_0x5b2043[_0xf34d33(0x24a)],'clientSecret':_0x5b2043['clientSecret']}:null;}async function clearCachedClient(){const _0x5267d4=_0x495f8d,_0x5e7d40={'eszfA':function(_0x14bb85,_0x155f1d,_0xc09650,_0x558977){return _0x14bb85(_0x155f1d,_0xc09650,_0x558977);}},_0x4aeb59=await loadCachedData();if(!_0x4aeb59)return;const {clientId:_0x5ccb9b,clientSecret:_0x1ddd62,..._0x162bab}=_0x4aeb59;await _0x5e7d40[_0x5267d4(0x1ac)](writeFile,TOKEN_CACHE_PATH,JSON[_0x5267d4(0x213)](_0x162bab),{'mode':0x180});}async function saveCachedClient(_0x1365b4,_0x42ad49){const _0x55d85e=_0x495f8d,_0x274215={'aomTe':function(_0x49367f){return _0x49367f();},'Zbfso':function(_0x42c91f,_0x28f61e,_0x1ae0e0){return _0x42c91f(_0x28f61e,_0x1ae0e0);},'naUzB':function(_0x229e90){return _0x229e90();},'cieJJ':'.ranger','XHcKc':function(_0x47c393,_0x3125ca,_0x34a57b,_0xd90f63){return _0x47c393(_0x3125ca,_0x34a57b,_0xd90f63);}},_0x37c54d=await _0x274215[_0x55d85e(0x24f)](loadCachedData),_0x5e51ba={..._0x37c54d,'origin':currentOrigin,'accessToken':_0x37c54d?.[_0x55d85e(0x1ad)]??'','clientId':_0x1365b4,'clientSecret':_0x42ad49};await _0x274215[_0x55d85e(0x1cc)](mkdir,join(_0x274215['naUzB'](homedir),_0x274215[_0x55d85e(0x1ff)]),{'recursive':!![]}),await _0x274215[_0x55d85e(0x246)](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x5e51ba),{'mode':0x180});}function _0x4ef2(_0x127b6f,_0x28af85){_0x127b6f=_0x127b6f-0x1ab;const _0x353fc9=_0x353f();let _0x4ef273=_0x353fc9[_0x127b6f];return _0x4ef273;}async function loadCachedData(){const _0x440905=_0x495f8d,_0x3422c3={'BWAtC':_0x440905(0x20a)};try{return JSON[_0x440905(0x1ef)](await readFile(TOKEN_CACHE_PATH,_0x3422c3['BWAtC']));}catch{return null;}}async function parseResponse(_0x210757){const _0x155efe=_0x495f8d,_0x8f9ef0={'nCsED':_0x155efe(0x1fe),'vgepr':function(_0xecbb6e,_0x3bc19c){return _0xecbb6e!==_0x3bc19c;},'MwqzS':'No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream'},_0xdbc8=_0x210757['headers']['get']('content-type')??'';if(_0xdbc8['includes'](_0x8f9ef0['nCsED'])){const _0x1477e7=await _0x210757['text']();for(const _0x489f43 of _0x1477e7[_0x155efe(0x1f1)]('\x0a')){const _0x5362de=_0x489f43[_0x155efe(0x24b)]();if(_0x5362de[_0x155efe(0x1c8)](_0x155efe(0x1cb))){const _0x3ac38f=_0x5362de[_0x155efe(0x230)]('data:'[_0x155efe(0x209)])[_0x155efe(0x24b)]();if(!_0x3ac38f)continue;try{const _0x176bc5=JSON['parse'](_0x3ac38f);if(_0x8f9ef0[_0x155efe(0x1b0)](_0x176bc5['id'],undefined)||_0x176bc5['error'])return _0x176bc5;}catch{}}}throw new Error(_0x8f9ef0[_0x155efe(0x1bb)]);}return _0x210757['json']();}function extractToken(_0x5d86f8){const _0x4e9fca=_0x495f8d,_0x4b45cc={'SCWtS':function(_0x2fd586,_0x4aa6ba){return _0x2fd586===_0x4aa6ba;},'FStGY':'string','OVEDR':_0x4e9fca(0x247)};if(!_0x5d86f8)return null;const _0x1579da=_0x5d86f8[_0x4e9fca(0x24c)];if(_0x1579da?.[_0x4e9fca(0x23c)]&&_0x4b45cc['SCWtS'](typeof _0x1579da['token'],_0x4b45cc['FStGY']))return _0x1579da['token'];if(_0x5d86f8[_0x4e9fca(0x1ae)]){const _0x2768b=_0x5d86f8[_0x4e9fca(0x243)];throw new Error('Server\x20returned\x20error:\x20'+(_0x2768b?.[0x0]?.['text']??_0x4b45cc['OVEDR']));}const _0x38cf70=_0x5d86f8['content'];if(_0x38cf70)for(const _0x1509b7 of _0x38cf70){if(_0x4b45cc[_0x4e9fca(0x1bf)](_0x1509b7[_0x4e9fca(0x23d)],_0x4e9fca(0x1cd))&&_0x1509b7[_0x4e9fca(0x1cd)]){try{const _0x382d54=JSON[_0x4e9fca(0x1ef)](_0x1509b7[_0x4e9fca(0x1cd)]);if(typeof _0x382d54?.['token']===_0x4e9fca(0x1fd))return _0x382d54[_0x4e9fca(0x23c)];}catch{}const _0x5f589f=_0x1509b7['text']['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x5f589f)return _0x5f589f[0x1];}}return null;}
1
+ const _0x5f5b8c=_0x4775;(function(_0x2971dc,_0x3725e6){const _0x12fd94=_0x4775,_0x338c97=_0x2971dc();while(!![]){try{const _0x449bd4=-parseInt(_0x12fd94(0x11d))/0x1+-parseInt(_0x12fd94(0xa5))/0x2+parseInt(_0x12fd94(0xb8))/0x3*(-parseInt(_0x12fd94(0xb4))/0x4)+parseInt(_0x12fd94(0xde))/0x5*(parseInt(_0x12fd94(0xd9))/0x6)+parseInt(_0x12fd94(0xd1))/0x7+-parseInt(_0x12fd94(0xaf))/0x8*(-parseInt(_0x12fd94(0xb7))/0x9)+parseInt(_0x12fd94(0xa3))/0xa;if(_0x449bd4===_0x3725e6)break;else _0x338c97['push'](_0x338c97['shift']());}catch(_0x7483e){_0x338c97['push'](_0x338c97['shift']());}}}(_0x3a9a,0x78f87));import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';import{homedir}from'os';function _0x3a9a(){const _0x1b962d=['hlQzD','result','message','gTknD','Qrjqv','<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','client_id','/callback','GOLra','882455nKNEjR','now','then','get','json','get_cli_token\x20failed:\x20','auth-origin.txt','string','OAuth\x20error:\x20','POST','ARpbq','ODyvF','lRFkG','S256','startsWith','includes','8437300ffynnn','write','150244GCpqCT','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','.ranger','JWQNe','application/json,\x20text/event-stream','cVGOf','status','stdout','aeWan','sha256','856CwKerx','qpOKU','FCMos','zicoI','initialize','4BfaIEO','application/x-www-form-urlencoded','stringify','19386mKdOlN','2713137NWUCBE','Ranger\x20CLI','\x20done','Bearer\x20','expiresAt','VQhUB','uyUGt','text/html','refresh_token','application/json','Requesting\x20CLI\x20token...','fVcTp','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','2025-03-26','SOFZJ','parse','length','authorization_endpoint','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a','text','nxnCg','none','set','Sdtcs','headers','4223380AcAFtp','jNgOg','accessToken','Exchanging\x20authorization\x20code...','EOaNJ','authorization_code','content','KZrLl','4326LTLDSL','oBGjP','response_type','start','CHaOk','4715vxtfVA','AWIcc','log','ranger-cli','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','QKrVx','access_token','WzRIR','NrzLs','isTTY','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','error','url','utf-8','searchParams','GYOPk','isError','oIxfZ','clientId','Discovering\x20authorization\x20server...','Registering\x20OAuth\x20client...','ZMWcK','vtOpx','token_endpoint','end','OAuthTimeoutError','state','replace','2.0','PdXLb','sHpWa','<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','http://localhost:','xdg-open','error_description','refreshToken','digest','\x0aOpening\x20browser\x20for\x20authentication...','toString','LhcIW','resource','bQnJT','writeHead','redirect_uri','FYkOc','NZjOk','data:','token','vTrnz','LjMHu','text/event-stream','origin','notifications/initialized','Server\x20returned\x20error:\x20'];_0x3a9a=function(){return _0x1b962d;};return _0x3a9a();}import{createServer}from'http';import{randomBytes,createHash}from'crypto';import{exec}from'child_process';import{getMcpAuthUrl}from'./utils/environment.js';const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),'.ranger','mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),_0x5f5b8c(0xa7),_0x5f5b8c(0x99));export async function getMcpAuthOrigin(){const _0x58ab9d={'cyTVY':function(_0x33db80,_0x117e1b){return _0x33db80||_0x117e1b;}};try{const _0x131988=(await readFile(AUTH_ORIGIN_PATH,'utf-8'))['trim']();return _0x58ab9d['cyTVY'](_0x131988,null);}catch{return null;}}export async function mcpBootstrap(){const _0x277ebf=_0x5f5b8c,_0x245e31={'EOaNJ':function(_0x234c6d){return _0x234c6d();},'LjMHu':function(_0x282b17,_0xb24d68){return _0x282b17(_0xb24d68);},'SAnck':'MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','oIxfZ':'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','wNCDE':function(_0x5db2e0,_0x168b6f,_0x1a446c){return _0x5db2e0(_0x168b6f,_0x1a446c);}},_0x18b400=_0x245e31[_0x277ebf(0xd5)](getMcpAuthUrl);currentOrigin=_0x18b400;const _0x3f65fb=process['stdout'][_0x277ebf(0xe7)]??![];console['log']('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x18b400+'\x0a');const _0x41374a=await _0x245e31[_0x277ebf(0x10f)](tryUnauthenticated,_0x18b400);let _0x6b299a=null;if(_0x41374a==='proxied')_0x6b299a='';else{_0x6b299a=await _0x245e31['EOaNJ'](loadCachedToken);if(!_0x6b299a){if(!_0x3f65fb)throw new Error(_0x245e31['SAnck']+_0x245e31[_0x277ebf(0xef)]);_0x6b299a=await _0x245e31[_0x277ebf(0x10f)](oauthFlow,_0x18b400);}}await _0x245e31['wNCDE'](callGetCliToken,_0x18b400,_0x6b299a);}async function tryUnauthenticated(_0x1da91a){const _0xca8378=_0x5f5b8c,_0x822648={'EPPLN':_0xca8378(0x9c),'cVGOf':_0xca8378(0xc1),'fVcTp':_0xca8378(0xfa),'CHaOk':'2025-03-26','qpOKU':_0xca8378(0xe1),'nGAMw':'1.0.0','pKloU':'needs-oauth'},_0x109bde=await fetch(_0x1da91a,{'method':_0x822648['EPPLN'],'headers':{'Content-Type':_0x822648[_0xca8378(0xaa)],'Accept':_0xca8378(0xa9)},'body':JSON[_0xca8378(0xb6)]({'jsonrpc':_0x822648[_0xca8378(0xc3)],'id':0x1,'method':_0xca8378(0xb3),'params':{'protocolVersion':_0x822648[_0xca8378(0xdd)],'capabilities':{},'clientInfo':{'name':_0x822648[_0xca8378(0xb0)],'version':_0x822648['nGAMw']}}})});if(_0x109bde['ok'])return await _0x109bde['text'](),'proxied';if(_0x109bde[_0xca8378(0xab)]===0x191)return await _0x109bde['text'](),_0x822648['pKloU'];const _0x44bd5c=await _0x109bde[_0xca8378(0xcb)]();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0x109bde['status']+':\x20'+_0x44bd5c);}class OAuthTimeoutError extends Error{constructor(_0x598906){const _0x57bdd0=_0x5f5b8c,_0x2d16fd={'txXXO':_0x57bdd0(0xf7)};super(_0x598906),this['name']=_0x2d16fd['txXXO'];}}async function oauthFlow(_0x3b7a9d){const _0x5e951a=_0x5f5b8c,_0x3a8969={'zZynX':function(_0x2031e8,_0xb7a755){return _0x2031e8(_0xb7a755);},'aeWan':function(_0x15c941){return _0x15c941();},'nilpO':_0x5e951a(0xe8)};try{return await _0x3a8969['zZynX'](oauthFlowAttempt,_0x3b7a9d);}catch(_0x37afa3){if(_0x37afa3 instanceof OAuthTimeoutError&&await _0x3a8969[_0x5e951a(0xad)](loadCachedClient))return console[_0x5e951a(0xe0)](_0x3a8969['nilpO']),await clearCachedClient(),await oauthFlowAttempt(_0x3b7a9d);throw _0x37afa3;}}async function oauthFlowAttempt(_0x5f590e){const _0x4407d9=_0x5f5b8c,_0x2628f4={'Qrjqv':function(_0x2eca44,_0x4102f8){return _0x2eca44(_0x4102f8);},'PdXLb':'No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','Uaomn':function(_0x48de06){return _0x48de06();},'ZjbDR':_0x4407d9(0xf2),'vTrnz':function(_0x5a1d71,_0x7c332b,_0x3a01c6){return _0x5a1d71(_0x7c332b,_0x3a01c6);},'gTknD':'POST','VQhUB':_0x4407d9(0xc1),'ARpbq':_0x4407d9(0xba),'uyUGt':'Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','sHpWa':'base64url','HoWMe':_0x4407d9(0xae),'HpqGi':'code','vcQCo':_0x4407d9(0x11a),'Sdtcs':'code_challenge','WkzRm':'code_challenge_method','QZofq':_0x4407d9(0xa0),'NrzLs':_0x4407d9(0xf8),'AWIcc':_0x4407d9(0xd4),'FHUeH':function(_0x490226,_0x467350,_0x421889,_0x2c6536){return _0x490226(_0x467350,_0x421889,_0x2c6536);}},_0x4c6ead=_0x5f590e[_0x4407d9(0xf9)](/\/mcp$/,'');process['stdout']['write'](_0x4407d9(0xf1));const _0x204ee8=await _0x2628f4[_0x4407d9(0x118)](fetch,_0x4c6ead+'/.well-known/oauth-protected-resource');if(!_0x204ee8['ok'])throw new Error('Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server');const _0x31cd08=await _0x204ee8['json'](),_0x3fe525=_0x31cd08['authorization_servers']?.[0x0];if(!_0x3fe525)throw new Error(_0x2628f4[_0x4407d9(0xfb)]);console['log']('\x20'+_0x3fe525);const _0x28eb9f=await fetchAuthServerMetadata(_0x3fe525);let _0x346d42,_0x155864;const _0x19f894=await _0x2628f4['Uaomn'](loadCachedClient);if(_0x19f894)_0x346d42=_0x19f894[_0x4407d9(0xf0)],_0x155864=_0x19f894['clientSecret'];else{if(_0x28eb9f['registration_endpoint']){process['stdout'][_0x4407d9(0xa4)](_0x2628f4['ZjbDR']);const _0x2f9902=await _0x2628f4[_0x4407d9(0x10e)](fetch,_0x28eb9f['registration_endpoint'],{'method':_0x2628f4[_0x4407d9(0x117)],'headers':{'Content-Type':_0x2628f4[_0x4407d9(0xbd)]},'body':JSON[_0x4407d9(0xb6)]({'client_name':_0x4407d9(0xb9),'redirect_uris':[_0x4407d9(0xfe)+CALLBACK_PORT+_0x4407d9(0x11b)],'grant_types':['authorization_code',_0x4407d9(0xc0)],'response_types':['code'],'token_endpoint_auth_method':_0x4407d9(0xcd)})});if(!_0x2f9902['ok']){const _0x589aa0=await _0x2f9902[_0x4407d9(0xcb)]();throw new Error('Client\x20registration\x20failed:\x20'+_0x589aa0);}const _0x39cbc0=await _0x2f9902['json']();_0x346d42=_0x39cbc0[_0x4407d9(0x11a)],_0x155864=_0x39cbc0['client_secret'],await _0x2628f4[_0x4407d9(0x10e)](saveCachedClient,_0x346d42,_0x155864),console['log'](_0x2628f4[_0x4407d9(0x9d)]);}else throw new Error(_0x2628f4[_0x4407d9(0xbe)]);}const _0x5e36c6=_0x2628f4['Qrjqv'](randomBytes,0x20)['toString'](_0x2628f4[_0x4407d9(0xfc)]),_0x23f11b=createHash(_0x2628f4['HoWMe'])['update'](_0x5e36c6)[_0x4407d9(0x102)](_0x2628f4['sHpWa']),_0x5cce4f=randomBytes(0x10)[_0x4407d9(0x104)]('hex'),_0x5ee982=new URL(_0x28eb9f[_0x4407d9(0xc9)]);_0x5ee982['searchParams'][_0x4407d9(0xce)](_0x4407d9(0xdb),_0x2628f4['HpqGi']),_0x5ee982['searchParams'][_0x4407d9(0xce)](_0x2628f4['vcQCo'],_0x346d42),_0x5ee982[_0x4407d9(0xec)]['set'](_0x4407d9(0x109),_0x4407d9(0xfe)+CALLBACK_PORT+_0x4407d9(0x11b)),_0x5ee982[_0x4407d9(0xec)]['set'](_0x2628f4[_0x4407d9(0xcf)],_0x23f11b),_0x5ee982[_0x4407d9(0xec)][_0x4407d9(0xce)](_0x2628f4['WkzRm'],_0x2628f4['QZofq']),_0x5ee982['searchParams'][_0x4407d9(0xce)](_0x2628f4[_0x4407d9(0xe6)],_0x5cce4f);_0x31cd08[_0x4407d9(0x106)]&&_0x5ee982['searchParams'][_0x4407d9(0xce)]('resource',_0x31cd08[_0x4407d9(0x106)]);console[_0x4407d9(0xe0)](_0x4407d9(0x103)),console[_0x4407d9(0xe0)](_0x4407d9(0xa6)+_0x5ee982['toString']()+'\x0a'),await openBrowser(_0x5ee982['toString']());const _0x40a7ae=await waitForCallback(_0x5cce4f);process[_0x4407d9(0xac)]['write'](_0x2628f4[_0x4407d9(0xdf)]);const _0x380da1=new URLSearchParams({'grant_type':_0x4407d9(0xd6),'code':_0x40a7ae,'redirect_uri':_0x4407d9(0xfe)+CALLBACK_PORT+'/callback','client_id':_0x346d42,'code_verifier':_0x5e36c6});_0x155864&&_0x380da1[_0x4407d9(0xce)]('client_secret',_0x155864);_0x31cd08[_0x4407d9(0x106)]&&_0x380da1[_0x4407d9(0xce)](_0x4407d9(0x106),_0x31cd08[_0x4407d9(0x106)]);const _0x272038=await fetch(_0x28eb9f[_0x4407d9(0xf5)],{'method':_0x2628f4[_0x4407d9(0x117)],'headers':{'Content-Type':_0x4407d9(0xb5)},'body':_0x380da1});if(!_0x272038['ok']){const _0x879529=await _0x272038['text']();throw new Error('Token\x20exchange\x20failed:\x20'+_0x879529);}const _0x53bb2c=await _0x272038['json']();return console[_0x4407d9(0xe0)](_0x2628f4['ARpbq']),await _0x2628f4['FHUeH'](saveCachedToken,_0x53bb2c[_0x4407d9(0xe4)],_0x53bb2c[_0x4407d9(0xc0)],_0x53bb2c['expires_in']),_0x53bb2c['access_token'];}async function callGetCliToken(_0x888433,_0x1a93cd){const _0x3904de=_0x5f5b8c,_0xd7d7de={'KZrLl':function(_0x5b2eed,_0x42d7bf){return _0x5b2eed(_0x42d7bf);},'qsXLV':_0x3904de(0xc1),'GOLra':'Authorization','lRFkG':'Initializing\x20MCP\x20session...','vwFBI':'1.0.0','ILHtp':'\x20done','XsxiN':'POST','KIKQa':_0x3904de(0xc2),'vtOpx':_0x3904de(0xfa),'zLgUv':'tools/call','napFq':_0x3904de(0xa7),'zicoI':function(_0x19413d,_0x1d2625,_0x288516){return _0x19413d(_0x1d2625,_0x288516);},'ODyvF':function(_0x132052,_0x202baf,_0x420731){return _0x132052(_0x202baf,_0x420731);},'uHpnj':function(_0x484846,_0x1918b9,_0x5a0279,_0x49a473){return _0x484846(_0x1918b9,_0x5a0279,_0x49a473);},'esCbr':'auth-origin.txt','WzRIR':_0x3904de(0xca)},_0x547216={'Content-Type':_0xd7d7de['qsXLV'],'Accept':_0x3904de(0xa9)};_0x1a93cd&&(_0x547216[_0xd7d7de[_0x3904de(0x11c)]]=_0x3904de(0xbb)+_0x1a93cd);const _0x575eac=async _0x3cd60d=>{const _0x437b75=_0x3904de,_0x3389f3=await fetch(_0x888433,{'method':'POST','headers':_0x547216,'body':JSON['stringify'](_0x3cd60d)});if(!_0x3389f3['ok']){const _0x29bc22=await _0x3389f3['text']();throw new Error('HTTP\x20'+_0x3389f3['status']+':\x20'+_0x29bc22);}return _0xd7d7de[_0x437b75(0xd8)](parseResponse,_0x3389f3);};process[_0x3904de(0xac)][_0x3904de(0xa4)](_0xd7d7de[_0x3904de(0x9f)]);const _0x54d3cf=await _0xd7d7de[_0x3904de(0xd8)](_0x575eac,{'jsonrpc':'2.0','id':0x1,'method':'initialize','params':{'protocolVersion':_0x3904de(0xc5),'capabilities':{},'clientInfo':{'name':'ranger-cli','version':_0xd7d7de['vwFBI']}}});if(_0x54d3cf[_0x3904de(0xe9)])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x54d3cf[_0x3904de(0xe9)][_0x3904de(0x116)]??JSON[_0x3904de(0xb6)](_0x54d3cf[_0x3904de(0xe9)])));console['log'](_0xd7d7de['ILHtp']),await fetch(_0x888433,{'method':_0xd7d7de['XsxiN'],'headers':_0x547216,'body':JSON[_0x3904de(0xb6)]({'jsonrpc':_0x3904de(0xfa),'method':_0x3904de(0x112)})})[_0x3904de(0x11f)](_0x354660=>_0x354660[_0x3904de(0xcb)]()),process['stdout'][_0x3904de(0xa4)](_0xd7d7de['KIKQa']);const _0x31cc22=await _0xd7d7de[_0x3904de(0xd8)](_0x575eac,{'jsonrpc':_0xd7d7de[_0x3904de(0xf4)],'id':0x2,'method':_0xd7d7de['zLgUv'],'params':{'name':'get_cli_token','arguments':{}}});if(_0x31cc22[_0x3904de(0xe9)])throw new Error(_0x3904de(0x98)+(_0x31cc22['error']['message']??JSON['stringify'](_0x31cc22[_0x3904de(0xe9)])));console['log'](_0x3904de(0xba));const _0x586911=_0xd7d7de[_0x3904de(0xd8)](extractToken,_0x31cc22['result']);if(!_0x586911){console[_0x3904de(0xe9)]('\x0aUnexpected\x20response\x20structure:'),console['error'](JSON[_0x3904de(0xb6)](_0x31cc22[_0x3904de(0x115)],null,0x2));throw new Error('Could\x20not\x20extract\x20token\x20from\x20MCP\x20response');}const _0x1cb186=join(homedir(),_0xd7d7de['napFq']),_0x1f7bf3=_0xd7d7de[_0x3904de(0xb2)](join,_0x1cb186,'refresh.txt');await _0xd7d7de[_0x3904de(0x9e)](mkdir,_0x1cb186,{'recursive':!![]}),await _0xd7d7de['uHpnj'](writeFile,_0x1f7bf3,_0x586911,{'mode':0x180}),await writeFile(join(_0x1cb186,_0xd7d7de['esCbr']),_0x888433,{'mode':0x180}),console[_0x3904de(0xe0)]('\x0aToken\x20written\x20to\x20'+_0x1f7bf3),console[_0x3904de(0xe0)](_0xd7d7de[_0x3904de(0xe5)]);}async function fetchAuthServerMetadata(_0x2c9b80){const _0x5b1495=_0x5f5b8c,_0x1ea4f8={'LhcIW':function(_0x4d75db,_0x5cae17){return _0x4d75db(_0x5cae17);}},_0x2071fb=_0x2c9b80+'/.well-known/oauth-authorization-server',_0x9aac55=await _0x1ea4f8[_0x5b1495(0x105)](fetch,_0x2071fb);if(!_0x9aac55['ok'])throw new Error(_0x5b1495(0xc4)+_0x2071fb+':\x20'+_0x9aac55[_0x5b1495(0xab)]);return _0x9aac55[_0x5b1495(0x97)]();}function waitForCallback(_0x1b9a58){const _0xe298bd=_0x5f5b8c,_0x5778ea={'NZjOk':_0xe298bd(0x11b),'SOFZJ':'Not\x20found','JWQNe':'code','jNgOg':_0xe298bd(0xf8),'BeOZh':_0xe298bd(0x100),'VUGZd':_0xe298bd(0xbf),'FCMos':function(_0x2a88e9,_0x40b0f5){return _0x2a88e9(_0x40b0f5);},'oBGjP':function(_0x4e0ab5){return _0x4e0ab5();},'nxnCg':'127.0.0.1'};return new Promise((_0x146f3a,_0x5a0f53)=>{const _0x50398b=_0xe298bd,_0x495166={'GYOPk':function(_0x1833bd,_0x4d1477){return _0x5778ea['FCMos'](_0x1833bd,_0x4d1477);}},_0x53321b=()=>{_0x58cfd9['closeAllConnections'](),_0x58cfd9['close']();},_0x1e6d83=setTimeout(()=>{const _0x168004=_0x4775;_0x53321b(),_0x495166[_0x168004(0xed)](_0x5a0f53,new OAuthTimeoutError('OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes'));},0x1d4c0),_0x58cfd9=_0x5778ea['FCMos'](createServer,(_0x2916df,_0x5e69af)=>{const _0x4c66a8=_0x4775,_0xd9d7cf=new URL(_0x2916df[_0x4c66a8(0xea)]??'/',_0x4c66a8(0xfe)+CALLBACK_PORT);if(_0xd9d7cf['pathname']!==_0x5778ea[_0x4c66a8(0x10b)]){_0x5e69af[_0x4c66a8(0x108)](0x194),_0x5e69af['end'](_0x5778ea[_0x4c66a8(0xc6)]);return;}const _0x58f136=_0xd9d7cf['searchParams']['get'](_0x5778ea[_0x4c66a8(0xa8)]),_0x233125=_0xd9d7cf['searchParams']['get'](_0x5778ea[_0x4c66a8(0xd2)]),_0x23e575=_0xd9d7cf[_0x4c66a8(0xec)]['get'](_0x4c66a8(0xe9));if(_0x23e575){const _0x26ca54=_0xd9d7cf[_0x4c66a8(0xec)][_0x4c66a8(0x120)](_0x5778ea['BeOZh'])??_0x23e575;_0x5e69af[_0x4c66a8(0x108)](0xc8,{'Content-Type':_0x5778ea['VUGZd']}),_0x5e69af['end']('<html><body><h2>Authentication\x20failed</h2><p>'+_0x26ca54+_0x4c66a8(0xe2)),_0x5778ea['FCMos'](clearTimeout,_0x1e6d83),_0x5778ea[_0x4c66a8(0xda)](_0x53321b),_0x5778ea[_0x4c66a8(0xb1)](_0x5a0f53,new Error(_0x4c66a8(0x9b)+_0x26ca54));return;}if(!_0x58f136||_0x233125!==_0x1b9a58){_0x5e69af['writeHead'](0x190,{'Content-Type':'text/html'}),_0x5e69af[_0x4c66a8(0xf6)](_0x4c66a8(0x119));return;}_0x5e69af[_0x4c66a8(0x108)](0xc8,{'Content-Type':_0x5778ea['VUGZd']}),_0x5e69af['end'](_0x4c66a8(0xfd)),_0x5778ea['FCMos'](clearTimeout,_0x1e6d83),_0x5778ea['oBGjP'](_0x53321b),_0x146f3a(_0x58f136);});_0x58cfd9['listen'](CALLBACK_PORT,_0x5778ea[_0x50398b(0xcc)]);});}async function openBrowser(_0x31e1ae){const _0x493009=_0x5f5b8c,_0x4f4e31={'IqXTn':function(_0x4081fd,_0x33b63b){return _0x4081fd===_0x33b63b;},'vDVZZ':'darwin','ewOkO':'win32'},_0x3a5df6=_0x4f4e31['IqXTn'](process['platform'],_0x4f4e31['vDVZZ'])?'open':_0x4f4e31['IqXTn'](process['platform'],_0x4f4e31['ewOkO'])?_0x493009(0xdc):_0x493009(0xff);exec(_0x3a5df6+'\x20\x22'+_0x31e1ae+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x2cb0b3=_0x5f5b8c,_0x2132d3={'fPuaF':function(_0x568a70,_0x1beac9,_0x5e7a0f){return _0x568a70(_0x1beac9,_0x5e7a0f);}};try{const _0x2c6253=JSON[_0x2cb0b3(0xc7)](await _0x2132d3['fPuaF'](readFile,TOKEN_CACHE_PATH,_0x2cb0b3(0xeb)));if(_0x2c6253['origin']&&_0x2c6253[_0x2cb0b3(0x111)]!==currentOrigin)return null;if(_0x2c6253[_0x2cb0b3(0xbc)]&&Date[_0x2cb0b3(0x11e)]()>_0x2c6253['expiresAt'])return null;return _0x2c6253[_0x2cb0b3(0xd3)]??null;}catch{return null;}}async function saveCachedToken(_0x20de9e,_0xf3ee4,_0x523ae4){const _0x278a8b=_0x5f5b8c,_0xd06e3b={'zhkmN':function(_0xcc5e09){return _0xcc5e09();},'TdJvb':_0x278a8b(0xa7)},_0x37d0ab=await _0xd06e3b['zhkmN'](loadCachedData),_0x11ca9b={..._0x37d0ab,'origin':currentOrigin,'accessToken':_0x20de9e,'refreshToken':_0xf3ee4??_0x37d0ab?.[_0x278a8b(0x101)],'expiresAt':_0x523ae4?Date['now']()+_0x523ae4*0x3e8:undefined};await mkdir(join(_0xd06e3b['zhkmN'](homedir),_0xd06e3b['TdJvb']),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON[_0x278a8b(0xb6)](_0x11ca9b),{'mode':0x180});}async function loadCachedClient(){const _0x14af02=_0x5f5b8c,_0xaf1801=await loadCachedData();if(_0xaf1801?.[_0x14af02(0x111)]&&_0xaf1801['origin']!==currentOrigin)return null;return _0xaf1801?.[_0x14af02(0xf0)]?{'clientId':_0xaf1801['clientId'],'clientSecret':_0xaf1801['clientSecret']}:null;}async function clearCachedClient(){const _0x14305d=_0x5f5b8c,_0x264e93={'QKrVx':function(_0xa9f249){return _0xa9f249();}},_0x1edea9=await _0x264e93[_0x14305d(0xe3)](loadCachedData);if(!_0x1edea9)return;const {clientId:_0xd3c59c,clientSecret:_0x1bf396,..._0x3349c6}=_0x1edea9;await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x3349c6),{'mode':0x180});}function _0x4775(_0xd258d1,_0x42de1c){_0xd258d1=_0xd258d1-0x97;const _0x3a9a57=_0x3a9a();let _0x4775ab=_0x3a9a57[_0xd258d1];return _0x4775ab;}async function saveCachedClient(_0x2fee0d,_0x2ab5c9){const _0x5548a8=_0x5f5b8c,_0xd3a141={'ZMWcK':function(_0x133077,_0x2c5ea3,_0xfc4af2){return _0x133077(_0x2c5ea3,_0xfc4af2);},'FYkOc':function(_0x3537d2){return _0x3537d2();},'qMWKO':'.ranger','npkyV':function(_0x52dd7d,_0x51f426,_0x2f5a7d,_0x5bf5bf){return _0x52dd7d(_0x51f426,_0x2f5a7d,_0x5bf5bf);}},_0x15479b=await loadCachedData(),_0x4ba1ed={..._0x15479b,'origin':currentOrigin,'accessToken':_0x15479b?.['accessToken']??'','clientId':_0x2fee0d,'clientSecret':_0x2ab5c9};await _0xd3a141[_0x5548a8(0xf3)](mkdir,join(_0xd3a141[_0x5548a8(0x10a)](homedir),_0xd3a141['qMWKO']),{'recursive':!![]}),await _0xd3a141['npkyV'](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x4ba1ed),{'mode':0x180});}async function loadCachedData(){const _0x117064=_0x5f5b8c,_0x19c3a9={'Dwzul':function(_0x301110,_0x4a9537,_0xf9d0e9){return _0x301110(_0x4a9537,_0xf9d0e9);}};try{return JSON[_0x117064(0xc7)](await _0x19c3a9['Dwzul'](readFile,TOKEN_CACHE_PATH,_0x117064(0xeb)));}catch{return null;}}async function parseResponse(_0x53cc15){const _0xb5ac6d=_0x5f5b8c,_0x3d14a8={'cKlWW':'No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream'},_0x3740dd=_0x53cc15[_0xb5ac6d(0xd0)][_0xb5ac6d(0x120)]('content-type')??'';if(_0x3740dd[_0xb5ac6d(0xa2)](_0xb5ac6d(0x110))){const _0x2a6bad=await _0x53cc15[_0xb5ac6d(0xcb)]();for(const _0x3ebb37 of _0x2a6bad['split']('\x0a')){const _0x2d9b56=_0x3ebb37['trim']();if(_0x2d9b56[_0xb5ac6d(0xa1)]('data:')){const _0xe4332c=_0x2d9b56['slice'](_0xb5ac6d(0x10c)[_0xb5ac6d(0xc8)])['trim']();if(!_0xe4332c)continue;try{const _0x3c9892=JSON['parse'](_0xe4332c);if(_0x3c9892['id']!==undefined||_0x3c9892['error'])return _0x3c9892;}catch{}}}throw new Error(_0x3d14a8['cKlWW']);}return _0x53cc15[_0xb5ac6d(0x97)]();}function extractToken(_0x13f88d){const _0x1f5771=_0x5f5b8c,_0x595ac5={'hlQzD':function(_0x3138cf,_0x49f89a){return _0x3138cf===_0x49f89a;},'bQnJT':'text'};if(!_0x13f88d)return null;const _0x341ff9=_0x13f88d['structuredContent'];if(_0x341ff9?.['token']&&typeof _0x341ff9[_0x1f5771(0x10d)]===_0x1f5771(0x9a))return _0x341ff9[_0x1f5771(0x10d)];if(_0x13f88d[_0x1f5771(0xee)]){const _0x3b84e2=_0x13f88d['content'];throw new Error(_0x1f5771(0x113)+(_0x3b84e2?.[0x0]?.['text']??'Unknown\x20error'));}const _0xddce60=_0x13f88d[_0x1f5771(0xd7)];if(_0xddce60)for(const _0x9a2eac of _0xddce60){if(_0x595ac5[_0x1f5771(0x114)](_0x9a2eac['type'],_0x595ac5[_0x1f5771(0x107)])&&_0x9a2eac['text']){try{const _0x4ba092=JSON['parse'](_0x9a2eac[_0x1f5771(0xcb)]);if(typeof _0x4ba092?.[_0x1f5771(0x10d)]==='string')return _0x4ba092['token'];}catch{}const _0x55650c=_0x9a2eac[_0x1f5771(0xcb)]['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x55650c)return _0x55650c[0x1];}}return null;}
@@ -1 +1 @@
1
- function _0x2db5(){var _0x52029a=['1282764SUrWQf','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','1680777Lsccdl','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','5180450xcFxRq','snjgJ','266024OcZyZU','2037MRILBd','ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','812995tgLjaF','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','exit','40hOliAc','79910GmiHNP','error','fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.','iyIFd','1828kYLTZq','1530JmrRlT'];_0x2db5=function(){return _0x52029a;};return _0x2db5();}(function(_0x567d2b,_0x4684db){var _0x3a6e87=_0x5b47,_0x1125c2=_0x567d2b();while(!![]){try{var _0x21607b=-parseInt(_0x3a6e87(0x15a))/0x1+-parseInt(_0x3a6e87(0x157))/0x2+parseInt(_0x3a6e87(0x158))/0x3*(parseInt(_0x3a6e87(0x162))/0x4)+-parseInt(_0x3a6e87(0x155))/0x5+-parseInt(_0x3a6e87(0x164))/0x6+-parseInt(_0x3a6e87(0x166))/0x7*(-parseInt(_0x3a6e87(0x15d))/0x8)+parseInt(_0x3a6e87(0x163))/0x9*(parseInt(_0x3a6e87(0x15e))/0xa);if(_0x21607b===_0x4684db)break;else _0x1125c2['push'](_0x1125c2['shift']());}catch(_0x2072ed){_0x1125c2['push'](_0x1125c2['shift']());}}}(_0x2db5,0xa469d));function _0x5b47(_0x1411d1,_0x4d6888){_0x1411d1=_0x1411d1-0x154;var _0x2db574=_0x2db5();var _0x5b4703=_0x2db574[_0x1411d1];return _0x5b4703;}export async function migrateProfile(_0x142c58,_0x2adb1a){var _0x45260d=_0x5b47,_0x4124b0={'iyIFd':function(_0x1fb3b6,_0x40e211){return _0x1fb3b6+_0x40e211;},'snjgJ':function(_0x367f09,_0x391808){return _0x367f09+_0x391808;},'nPEgo':function(_0x5e44d0,_0x4810e9){return _0x5e44d0+_0x4810e9;},'kodiW':_0x45260d(0x159),'bXVNZ':_0x45260d(0x154)};console[_0x45260d(0x15f)](_0x4124b0[_0x45260d(0x161)](_0x4124b0[_0x45260d(0x161)](_0x4124b0['snjgJ'](_0x4124b0['nPEgo'](_0x4124b0[_0x45260d(0x156)](_0x4124b0[_0x45260d(0x161)](_0x4124b0['kodiW']+'\x0a'+_0x45260d(0x165)+_0x45260d(0x15b),'\x0a'),_0x45260d(0x167)),_0x4124b0['bXVNZ']),'\x0a'),'Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a'),_0x45260d(0x160))),process[_0x45260d(0x15c)](0x1);}
1
+ (function(_0x4f67ec,_0x583d99){var _0x4fe790=_0x4e83,_0x54ae62=_0x4f67ec();while(!![]){try{var _0xfddf1d=parseInt(_0x4fe790(0x144))/0x1*(-parseInt(_0x4fe790(0x153))/0x2)+-parseInt(_0x4fe790(0x147))/0x3+-parseInt(_0x4fe790(0x14c))/0x4+-parseInt(_0x4fe790(0x14e))/0x5+parseInt(_0x4fe790(0x152))/0x6*(parseInt(_0x4fe790(0x14b))/0x7)+parseInt(_0x4fe790(0x150))/0x8+parseInt(_0x4fe790(0x14a))/0x9;if(_0xfddf1d===_0x583d99)break;else _0x54ae62['push'](_0x54ae62['shift']());}catch(_0x28e168){_0x54ae62['push'](_0x54ae62['shift']());}}}(_0x392e,0x3bba7));function _0x392e(){var _0x13fd4f=['1355128NosGLH','TTkvd','502625BhfbBw','ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','889416moLDCt','\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','2742acgnHs','2TWWggB','19113xaMBdf','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','1445196pTmyeR','Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a','mArBn','7433352TplLst','3794zeOXxL'];_0x392e=function(){return _0x13fd4f;};return _0x392e();}function _0x4e83(_0x3dc8de,_0x59e88b){_0x3dc8de=_0x3dc8de-0x144;var _0x392ee9=_0x392e();var _0x4e833d=_0x392ee9[_0x3dc8de];return _0x4e833d;}export async function migrateProfile(_0x30b350,_0x157be1){var _0x34a5e5=_0x4e83,_0x44fce1={'TTkvd':function(_0x2d0caf,_0x3d7d31){return _0x2d0caf+_0x3d7d31;},'QlkkJ':function(_0x41b25d,_0x18527d){return _0x41b25d+_0x18527d;},'dEluT':_0x34a5e5(0x145),'Ggklv':_0x34a5e5(0x151),'SzTUP':_0x34a5e5(0x148),'mArBn':'fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.'};console['error'](_0x44fce1[_0x34a5e5(0x14d)](_0x44fce1['QlkkJ'](_0x44fce1['TTkvd'](_0x44fce1[_0x34a5e5(0x14d)](_0x44fce1['QlkkJ'](_0x34a5e5(0x14f),'\x0a'),_0x44fce1['dEluT'])+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a')+_0x34a5e5(0x146)+_0x44fce1['Ggklv'],'\x0a'),_0x44fce1['SzTUP'])+_0x44fce1[_0x34a5e5(0x149)]),process['exit'](0x1);}
@@ -1 +1 @@
1
- (function(_0x574f29,_0x43f501){const _0xc8429f=_0x23e7,_0xbc61bf=_0x574f29();while(!![]){try{const _0x2bd60c=parseInt(_0xc8429f(0x15d))/0x1+-parseInt(_0xc8429f(0x181))/0x2+-parseInt(_0xc8429f(0x182))/0x3+parseInt(_0xc8429f(0x185))/0x4*(-parseInt(_0xc8429f(0x160))/0x5)+-parseInt(_0xc8429f(0x15b))/0x6*(-parseInt(_0xc8429f(0x178))/0x7)+-parseInt(_0xc8429f(0x17a))/0x8+parseInt(_0xc8429f(0x186))/0x9*(parseInt(_0xc8429f(0x168))/0xa);if(_0x2bd60c===_0x43f501)break;else _0xbc61bf['push'](_0xbc61bf['shift']());}catch(_0x4be85d){_0xbc61bf['push'](_0xbc61bf['shift']());}}}(_0x50c2,0xd9f7a));import{join}from'path';function _0x50c2(){const _0x413b10=['install','4678758aVjcAg','SKILL.md','8700840kejbRS','user','trailhead','plugin','qpmFy','ujIJP','yZpQf','2762282xWcZnF','1560180EvEKTx','error','add','4562940EeTPsq','2934arLUzR','project','6ktnJRT','\x0aYou\x20can\x20install\x20manually\x20with:','367287aoinBi','CzkFq','iIhQb','5kqipJo','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','ranger','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','HwhoH','enable','success','YmmOF','122290jTeXRT','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','prompt','log','Amfts','ranger@trailhead','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','cvoAy','--scope','Where\x20should\x20the\x20plugin\x20be\x20installed?','ZGPJw','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','VGQjA','confirm','KzwUx'];_0x50c2=function(){return _0x413b10;};return _0x50c2();}import{existsSync}from'fs';function _0x23e7(_0x6448c8,_0x57ef85){_0x6448c8=_0x6448c8-0x15b;const _0x50c221=_0x50c2();let _0x23e76c=_0x50c221[_0x6448c8];return _0x23e76c;}import _0x1406a3 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(_0x1f3db0){const _0x55ac91=_0x23e7,_0x55c572={'VGQjA':function(_0x48587f,_0x4f1b93){return _0x48587f(_0x4f1b93);},'TdJEL':'.claude','PSTdT':'pluginScope','qpmFy':_0x55ac91(0x171),'PcIAi':_0x55ac91(0x17b),'ujIJP':_0x55ac91(0x187),'Otbxr':_0x55ac91(0x17c),'wtDKy':'ranger-testing/trailhead','ZqQAG':'❌\x20Failed\x20to\x20add\x20marketplace:','wbQlo':_0x55ac91(0x15c),'wfqGP':_0x55ac91(0x163),'NMpDd':_0x55ac91(0x17d),'NkGwx':_0x55ac91(0x177),'JsWll':_0x55ac91(0x16d),'YmmOF':_0x55ac91(0x170),'KzwUx':_0x55ac91(0x161),'yZpQf':_0x55ac91(0x165),'cvoAy':function(_0x466415,_0x2cf0ae){return _0x466415===_0x2cf0ae;},'VGgbC':'already\x20enabled','FTYyV':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x186367=await _0x55c572[_0x55ac91(0x174)](isPluginInstalled,'ranger@trailhead');if(_0x186367)return console['log'](_0x55ac91(0x169)),![];const _0xaeceef=existsSync(join(getProjectRoot(),_0x55c572['TdJEL']));let _0x5b1682;if(_0x1f3db0)_0x5b1682=_0x1f3db0;else{if(_0xaeceef)_0x5b1682=_0x55ac91(0x187);else{console['log'](_0x55ac91(0x16e));const _0x8db4d0=await _0x1406a3[_0x55ac91(0x16a)]([{'type':'list','name':_0x55c572['PSTdT'],'message':_0x55c572[_0x55ac91(0x17e)],'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x55c572['PcIAi']},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x55c572[_0x55ac91(0x17f)]}],'default':_0x55ac91(0x17b)}]);_0x5b1682=_0x8db4d0['pluginScope'];}}console[_0x55ac91(0x16b)](_0x55ac91(0x173)+_0x5b1682+'\x20level)...\x0a');const _0x44e549=await isMarketplaceAdded(_0x55c572['Otbxr']);let _0x4341b6=_0x44e549;if(_0x44e549)console[_0x55ac91(0x16b)]('✓\x20Marketplace\x20already\x20added');else{const _0x2f135f=await _0x55c572['VGQjA'](runClaudeCommand,[_0x55ac91(0x17d),'marketplace',_0x55ac91(0x184),_0x55c572['wtDKy']]);!_0x2f135f['success']?(console['error'](_0x55c572['ZqQAG'],_0x2f135f[_0x55ac91(0x183)]),console[_0x55ac91(0x16b)](_0x55c572['wbQlo']),console[_0x55ac91(0x16b)](_0x55c572['wfqGP']),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x5b1682)):_0x4341b6=!![];}if(_0x4341b6){const _0x56c2ce=await runClaudeCommand([_0x55c572['NMpDd'],_0x55c572['NkGwx'],_0x55c572['JsWll'],_0x55c572[_0x55ac91(0x167)],_0x5b1682],{'cwd':_0x5b1682===_0x55c572[_0x55ac91(0x17f)]?getProjectRoot():undefined});if(!_0x56c2ce[_0x55ac91(0x166)])console['error']('❌\x20Failed\x20to\x20install\x20plugin:',_0x56c2ce['error']),console[_0x55ac91(0x16b)]('\x0aYou\x20can\x20install\x20manually\x20with:'),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x5b1682);else{console['log'](_0x55c572[_0x55ac91(0x176)]);const _0x2953ea=[_0x55c572['NMpDd'],_0x55c572[_0x55ac91(0x180)],_0x55c572['JsWll']];_0x55c572[_0x55ac91(0x16f)](_0x5b1682,_0x55ac91(0x187))&&_0x2953ea['push'](_0x55c572[_0x55ac91(0x167)],_0x55c572['ujIJP']);const _0x1f7a01=await runClaudeCommand(_0x2953ea,{'captureOutput':!![],'cwd':_0x5b1682===_0x55ac91(0x187)?getProjectRoot():undefined}),_0x2f1426=_0x1f7a01['output']?.['includes'](_0x55c572['VGgbC']);!_0x1f7a01[_0x55ac91(0x166)]&&!_0x2f1426?console['error']('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x1f7a01['error']):console['log'](_0x55c572['FTYyV']);}}return!![];}export async function ensureClaudeSkills(_0x52bc08){const _0x2ba472=_0x23e7,_0x1aa65e={'wywZz':function(_0x345a97,_0x2ed030){return _0x345a97(_0x2ed030);},'HwhoH':'ranger','CzkFq':_0x2ba472(0x179),'iIhQb':function(_0x9e7880,_0x1a891f){return _0x9e7880(_0x1a891f);},'Amfts':'✓\x20Ranger\x20skills\x20already\x20installed','ZGPJw':'.claude'},_0x36f5ea=_0x1aa65e['wywZz'](existsSync,join(getSkillsDir(_0x2ba472(0x17b)),_0x1aa65e[_0x2ba472(0x164)],_0x1aa65e[_0x2ba472(0x15e)])),_0x1c712b=_0x1aa65e[_0x2ba472(0x15f)](existsSync,join(getSkillsDir(_0x2ba472(0x187)),_0x2ba472(0x162),_0x2ba472(0x179)));if(_0x36f5ea||_0x1c712b)return console['log'](_0x1aa65e[_0x2ba472(0x16c)]),![];const _0x12024a=existsSync(join(getProjectRoot(),_0x1aa65e[_0x2ba472(0x172)]));let _0x20a720=!![];if(_0x52bc08)await skillup({'autoInstall':_0x52bc08,'suppressUsage':!![]});else{if(_0x12024a)await skillup({'autoInstall':'project','suppressUsage':!![]});else{const _0x2743db=await _0x1406a3['prompt']([{'type':_0x2ba472(0x175),'name':'wantsSkillup','message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x20a720=_0x2743db['wantsSkillup'],_0x20a720&&await skillup({'suppressUsage':!![]});}}return _0x20a720;}
1
+ (function(_0x33d59b,_0x31ecda){const _0x55d4e6=_0x3048,_0x4e0fc9=_0x33d59b();while(!![]){try{const _0x24cc36=parseInt(_0x55d4e6(0xed))/0x1+-parseInt(_0x55d4e6(0xc6))/0x2+-parseInt(_0x55d4e6(0xd9))/0x3*(parseInt(_0x55d4e6(0xbf))/0x4)+parseInt(_0x55d4e6(0xc9))/0x5*(parseInt(_0x55d4e6(0xdf))/0x6)+parseInt(_0x55d4e6(0xd2))/0x7+-parseInt(_0x55d4e6(0xbc))/0x8*(parseInt(_0x55d4e6(0xe5))/0x9)+-parseInt(_0x55d4e6(0xcd))/0xa;if(_0x24cc36===_0x31ecda)break;else _0x4e0fc9['push'](_0x4e0fc9['shift']());}catch(_0xa7a95b){_0x4e0fc9['push'](_0x4e0fc9['shift']());}}}(_0x1a34,0xb4045));import{join}from'path';import{existsSync}from'fs';import _0x3ce0f4 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';function _0x1a34(){const _0x5d1b0c=['✓\x20Claude\x20Code\x20plugin\x20already\x20installed','User\x20(available\x20in\x20all\x20your\x20projects)','CxQMi','SAeac','1281RbgWpm','WIhPm','ranger@trailhead','confirm','fNxbX','user','564hQNfyt','✓\x20Claude\x20Code\x20plugin\x20enabled','UXSIg','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','jLsMO','MVwJT','2979qRrcwe','FTVzJ','add','QQfBp','plugin','list','Where\x20should\x20the\x20plugin\x20be\x20installed?','qQWkx','408381vsQCeO','iKcDA','ONPXr','ZwpKB','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','saPxs','output','LTFOb','4560iwZPLp','error','\x0aYou\x20can\x20install\x20manually\x20with:','148XahNVY','WlooR','prompt','✓\x20Marketplace\x20already\x20added','log','ipctl','project','2737524rwawJY','ranger','SKILL.md','44355JkLBau','Would\x20you\x20like\x20to\x20install\x20skills?','INegS','marketplace','712430PZBegt','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','pluginScope','yQPjr','ranger-testing/trailhead','7976976TfWalL','QWPYv','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'];_0x1a34=function(){return _0x5d1b0c;};return _0x1a34();}function _0x3048(_0x53fb46,_0x2ee7da){_0x53fb46=_0x53fb46-0xb8;const _0x1a3478=_0x1a34();let _0x30481c=_0x1a3478[_0x53fb46];return _0x30481c;}import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x10b6d3){const _0x2b9447=_0x3048,_0x33a9c0={'ipctl':function(_0x1bd968,_0x162b5f){return _0x1bd968(_0x162b5f);},'reAdo':_0x2b9447(0xd5),'jLsMO':function(_0x7fa92f,_0x363a51,_0x57f7e4){return _0x7fa92f(_0x363a51,_0x57f7e4);},'JsUfZ':'.claude','YnZpB':'\x0a📦\x20Claude\x20Code\x20Plugin\x0a','lGfjQ':_0x2b9447(0xea),'IEeZA':_0x2b9447(0xeb),'aQNwB':_0x2b9447(0xd6),'vazgu':_0x2b9447(0xc2),'INegS':function(_0x590372,_0x1e0b61){return _0x590372(_0x1e0b61);},'ZwpKB':_0x2b9447(0xe9),'CxQMi':_0x2b9447(0xe7),'SAeac':function(_0x4ef8b0,_0x5724ee,_0xdd7271){return _0x4ef8b0(_0x5724ee,_0xdd7271);},'yQPjr':'install','ONPXr':function(_0x2666bb,_0x58c50a){return _0x2666bb===_0x58c50a;},'QWPYv':'project','MVwJT':function(_0x46a1c5){return _0x46a1c5();},'QQfBp':_0x2b9447(0xbe),'LqJah':function(_0x9f02d7,_0x2ef3af){return _0x9f02d7===_0x2ef3af;},'iKcDA':function(_0x5492ab,_0x387ac9,_0x4f2155){return _0x5492ab(_0x387ac9,_0x4f2155);}},_0x47597f=await _0x33a9c0['ipctl'](isPluginInstalled,'ranger@trailhead');if(_0x47597f)return console[_0x2b9447(0xc3)](_0x33a9c0['reAdo']),![];const _0x3bfd45=_0x33a9c0[_0x2b9447(0xc4)](existsSync,_0x33a9c0[_0x2b9447(0xe3)](join,getProjectRoot(),_0x33a9c0['JsUfZ']));let _0x2bbe69;if(_0x10b6d3)_0x2bbe69=_0x10b6d3;else{if(_0x3bfd45)_0x2bbe69='project';else{console[_0x2b9447(0xc3)](_0x33a9c0['YnZpB']);const _0x42d067=await _0x3ce0f4[_0x2b9447(0xc1)]([{'type':_0x33a9c0['lGfjQ'],'name':_0x2b9447(0xcf),'message':_0x33a9c0['IEeZA'],'choices':[{'name':_0x33a9c0['aQNwB'],'value':'user'},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':'project'}],'default':'user'}]);_0x2bbe69=_0x42d067['pluginScope'];}}console[_0x2b9447(0xc3)](_0x2b9447(0xe2)+_0x2bbe69+'\x20level)...\x0a');const _0x3927bc=await isMarketplaceAdded('trailhead');let _0x10b2be=_0x3927bc;if(_0x3927bc)console['log'](_0x33a9c0['vazgu']);else{const _0x1b2cea=await _0x33a9c0[_0x2b9447(0xcb)](runClaudeCommand,[_0x33a9c0[_0x2b9447(0xf0)],_0x2b9447(0xcc),_0x33a9c0[_0x2b9447(0xd7)],_0x2b9447(0xd1)]);!_0x1b2cea['success']?(console['error']('❌\x20Failed\x20to\x20add\x20marketplace:',_0x1b2cea[_0x2b9447(0xbd)]),console['log'](_0x2b9447(0xbe)),console['log'](_0x2b9447(0xce)),console[_0x2b9447(0xc3)](_0x2b9447(0xd4)+_0x2bbe69)):_0x10b2be=!![];}if(_0x10b2be){const _0x5e98de=await _0x33a9c0[_0x2b9447(0xd8)](runClaudeCommand,['plugin',_0x33a9c0[_0x2b9447(0xd0)],_0x2b9447(0xdb),'--scope',_0x2bbe69],{'cwd':_0x33a9c0[_0x2b9447(0xef)](_0x2bbe69,_0x33a9c0[_0x2b9447(0xd3)])?_0x33a9c0[_0x2b9447(0xe4)](getProjectRoot):undefined});if(!_0x5e98de['success'])console[_0x2b9447(0xbd)]('❌\x20Failed\x20to\x20install\x20plugin:',_0x5e98de['error']),console['log'](_0x33a9c0[_0x2b9447(0xe8)]),console[_0x2b9447(0xc3)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x2bbe69);else{console[_0x2b9447(0xc3)](_0x2b9447(0xb8));const _0x282f70=['plugin','enable',_0x2b9447(0xdb)];_0x33a9c0['LqJah'](_0x2bbe69,_0x33a9c0['QWPYv'])&&_0x282f70['push']('--scope',_0x2b9447(0xc5));const _0x1f7648=await _0x33a9c0[_0x2b9447(0xee)](runClaudeCommand,_0x282f70,{'captureOutput':!![],'cwd':_0x2bbe69===_0x33a9c0[_0x2b9447(0xd3)]?_0x33a9c0[_0x2b9447(0xe4)](getProjectRoot):undefined}),_0x2f3181=_0x1f7648[_0x2b9447(0xba)]?.['includes']('already\x20enabled');!_0x1f7648['success']&&!_0x2f3181?console[_0x2b9447(0xbd)]('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x1f7648['error']):console['log'](_0x2b9447(0xe0));}}return!![];}export async function ensureClaudeSkills(_0x13f0ea){const _0x55dac1=_0x3048,_0x3ef2a7={'WlooR':function(_0x4fe444,_0x44e2aa){return _0x4fe444(_0x44e2aa);},'CHoOO':function(_0x4e641f,_0x1d8624){return _0x4e641f(_0x1d8624);},'LTFOb':_0x55dac1(0xde),'FTVzJ':'SKILL.md','saPxs':function(_0x3c1d7d,_0x36be1c,_0x2f143f,_0x5248f3){return _0x3c1d7d(_0x36be1c,_0x2f143f,_0x5248f3);},'WIhPm':function(_0x1c8961,_0x34ec22){return _0x1c8961||_0x34ec22;},'fNxbX':function(_0x16c597){return _0x16c597();},'qQWkx':'.claude','bCNxS':function(_0x3e64ad,_0x173cc1){return _0x3e64ad(_0x173cc1);},'UXSIg':_0x55dac1(0xc5),'sxLUa':'wantsSkillup'},_0xc41706=_0x3ef2a7[_0x55dac1(0xc0)](existsSync,join(_0x3ef2a7['CHoOO'](getSkillsDir,_0x3ef2a7[_0x55dac1(0xbb)]),'ranger',_0x3ef2a7[_0x55dac1(0xe6)])),_0x4aaef9=existsSync(_0x3ef2a7[_0x55dac1(0xb9)](join,getSkillsDir(_0x55dac1(0xc5)),_0x55dac1(0xc7),_0x55dac1(0xc8)));if(_0x3ef2a7[_0x55dac1(0xda)](_0xc41706,_0x4aaef9))return console['log']('✓\x20Ranger\x20skills\x20already\x20installed'),![];const _0x568e67=existsSync(join(_0x3ef2a7[_0x55dac1(0xdd)](getProjectRoot),_0x3ef2a7[_0x55dac1(0xec)]));let _0x160c25=!![];if(_0x13f0ea)await skillup({'autoInstall':_0x13f0ea,'suppressUsage':!![]});else{if(_0x568e67)await _0x3ef2a7['bCNxS'](skillup,{'autoInstall':_0x3ef2a7[_0x55dac1(0xe1)],'suppressUsage':!![]});else{const _0x365efe=await _0x3ce0f4[_0x55dac1(0xc1)]([{'type':_0x55dac1(0xdc),'name':_0x3ef2a7['sxLUa'],'message':_0x55dac1(0xca),'default':!![]}]);_0x160c25=_0x365efe['wantsSkillup'],_0x160c25&&await _0x3ef2a7[_0x55dac1(0xc0)](skillup,{'suppressUsage':!![]});}}return _0x160c25;}
@@ -1 +1 @@
1
- (function(_0x23d015,_0xa3cf47){const _0x3c5c4d=_0x3658,_0xb1ba60=_0x23d015();while(!![]){try{const _0x262dde=parseInt(_0x3c5c4d(0x1ce))/0x1+parseInt(_0x3c5c4d(0x1cd))/0x2*(parseInt(_0x3c5c4d(0x1e4))/0x3)+-parseInt(_0x3c5c4d(0x1e1))/0x4*(parseInt(_0x3c5c4d(0x1dc))/0x5)+-parseInt(_0x3c5c4d(0x1de))/0x6+parseInt(_0x3c5c4d(0x1d1))/0x7*(-parseInt(_0x3c5c4d(0x1d4))/0x8)+-parseInt(_0x3c5c4d(0x1c7))/0x9*(-parseInt(_0x3c5c4d(0x1d5))/0xa)+parseInt(_0x3c5c4d(0x1dd))/0xb*(parseInt(_0x3c5c4d(0x1c8))/0xc);if(_0x262dde===_0xa3cf47)break;else _0xb1ba60['push'](_0xb1ba60['shift']());}catch(_0x975f11){_0xb1ba60['push'](_0xb1ba60['shift']());}}}(_0x2060,0x39dee));import{join}from'path';function _0x2060(){const _0x3caa8d=['120Vtrhsd','plugin','log','User\x20(available\x20in\x20all\x20your\x20projects)','WnMQQ','734544kqzeLl','427379GUBnbS','prompt','EEVPl','98qeSGRK','XEYBd','ANZuA','112440RGKfDL','7110gFZBks','zWSCz','@ranger-testing/opencode-plugin','zSspJ','user','https://opencode.ai/config.json','stringify','14715ijQMAL','37664rkRZYA','1654080xjJeHl','isArray','Failed\x20to\x20read\x20opencode.json','544hyBUnt','pluginScope','project','3yQmrfT','opencode.json','✓\x20OpenCode\x20plugin\x20configured','3555vRbEST'];_0x2060=function(){return _0x3caa8d;};return _0x2060();}import{existsSync}from'fs';function _0x3658(_0x1b8353,_0x3366c2){_0x1b8353=_0x1b8353-0x1c6;const _0x20605b=_0x2060();let _0x365851=_0x20605b[_0x1b8353];return _0x365851;}import{mkdir,readFile,writeFile}from'fs/promises';import _0x3ab118 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x59d794){const _0x3b6985=_0x3658,_0x10b33e={'zSspJ':function(_0x29efc1,_0x51fea4,_0x3d9699){return _0x29efc1(_0x51fea4,_0x3d9699);},'XEYBd':function(_0x36133b,_0x2a68f0){return _0x36133b(_0x2a68f0);},'yStPd':_0x3b6985(0x1e3),'EEVPl':_0x3b6985(0x1e5),'WnMQQ':'pluginScope','ANZuA':_0x3b6985(0x1cb),'tACjV':'user','HCwNo':function(_0xe14c99,_0x41529f){return _0xe14c99(_0x41529f);},'nvyBR':'utf-8','zWSCz':function(_0x52c3cb,_0xecfe31,_0x465b05){return _0x52c3cb(_0xecfe31,_0x465b05);}},_0x564cef=existsSync(_0x10b33e['zSspJ'](join,_0x10b33e[_0x3b6985(0x1d2)](getOpencodeConfigDir,_0x10b33e['yStPd']),_0x10b33e[_0x3b6985(0x1d0)]));let _0x19f616;if(_0x59d794)_0x19f616=_0x59d794;else{if(_0x564cef)_0x19f616=_0x3b6985(0x1e3);else{console[_0x3b6985(0x1ca)]('\x0a📦\x20OpenCode\x20Plugin\x0a');const _0x45f3a1=await _0x3ab118[_0x3b6985(0x1cf)]([{'type':'list','name':_0x10b33e[_0x3b6985(0x1cc)],'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x10b33e[_0x3b6985(0x1d3)],'value':_0x10b33e['tACjV']},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x3b6985(0x1e3)}],'default':_0x3b6985(0x1d9)}]);_0x19f616=_0x45f3a1[_0x3b6985(0x1e2)];}}const _0x14dff3=_0x10b33e[_0x3b6985(0x1d8)](join,_0x10b33e[_0x3b6985(0x1d2)](getOpencodeConfigDir,_0x19f616),_0x3b6985(0x1e5)),_0x420718=_0x3b6985(0x1d7),_0xab4edf=_0x3b6985(0x1da);let _0x38a417={};if(_0x10b33e['HCwNo'](existsSync,_0x14dff3))try{const _0x1241a2=await _0x10b33e['zSspJ'](readFile,_0x14dff3,_0x10b33e['nvyBR']);_0x38a417=JSON['parse'](_0x1241a2);}catch(_0x3f05d3){return console['error']('⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.'),{'configured':![],'scope':_0x19f616,'error':_0x3b6985(0x1e0),'details':_0x3f05d3};}const _0x2fdd7e=Array[_0x3b6985(0x1df)](_0x38a417['plugin'])?_0x38a417['plugin']:[];if(_0x2fdd7e['includes'](_0x420718))return console[_0x3b6985(0x1ca)]('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x19f616};return _0x38a417['$schema']=_0x38a417['$schema']||_0xab4edf,_0x38a417[_0x3b6985(0x1c9)]=[..._0x2fdd7e,_0x420718],await _0x10b33e['zSspJ'](mkdir,getOpencodeConfigDir(_0x19f616),{'recursive':!![]}),await _0x10b33e[_0x3b6985(0x1d6)](writeFile,_0x14dff3,JSON[_0x3b6985(0x1db)](_0x38a417,null,0x2)+'\x0a'),console['log'](_0x3b6985(0x1c6)),{'configured':!![],'scope':_0x19f616};}
1
+ (function(_0x13875d,_0x99e454){const _0x154ad8=_0x1bfd,_0x13df7a=_0x13875d();while(!![]){try{const _0x4a2918=parseInt(_0x154ad8(0x1c5))/0x1+-parseInt(_0x154ad8(0x1c3))/0x2+parseInt(_0x154ad8(0x1c4))/0x3+-parseInt(_0x154ad8(0x1ce))/0x4*(parseInt(_0x154ad8(0x1d2))/0x5)+parseInt(_0x154ad8(0x1bb))/0x6+parseInt(_0x154ad8(0x1d6))/0x7+-parseInt(_0x154ad8(0x1c0))/0x8*(parseInt(_0x154ad8(0x1cf))/0x9);if(_0x4a2918===_0x99e454)break;else _0x13df7a['push'](_0x13df7a['shift']());}catch(_0x4b240e){_0x13df7a['push'](_0x13df7a['shift']());}}}(_0x258e,0x4f09b));function _0x1bfd(_0xbb4fb2,_0x51f2ac){_0xbb4fb2=_0xbb4fb2-0x1ba;const _0x258e6a=_0x258e();let _0x1bfdae=_0x258e6a[_0xbb4fb2];return _0x1bfdae;}import{join}from'path';import{existsSync}from'fs';function _0x258e(){const _0x5adcfa=['parse','PjoQL','837590eNSavF','UrLxY','@ranger-testing/opencode-plugin','lMSgW','3222660DxlHru','project','2931756eBcgHZ','IwqsX','Project\x20(shared\x20with\x20team\x20via\x20git)','prompt','$schema','789328jYjZNY','utf-8','list','662286VGXaNP','504555Gvnszo','267391HtrmOE','user','plugin','✓\x20OpenCode\x20plugin\x20configured','log','https://opencode.ai/config.json','error','isArray','opencode.json','8pHqntP','36QuIvur'];_0x258e=function(){return _0x5adcfa;};return _0x258e();}import{mkdir,readFile,writeFile}from'fs/promises';import _0x1b02f7 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x549b66){const _0x56e538=_0x1bfd,_0x102f0e={'IwqsX':function(_0x13093c,_0x16772a){return _0x13093c(_0x16772a);},'nRGCH':_0x56e538(0x1cd),'PjoQL':'project','TIEDG':_0x56e538(0x1c2),'lMSgW':'User\x20(available\x20in\x20all\x20your\x20projects)','ggxyQ':_0x56e538(0x1c1),'UrLxY':'Failed\x20to\x20read\x20opencode.json','PDSka':'✓\x20OpenCode\x20plugin\x20already\x20configured'},_0x25f461=existsSync(join(_0x102f0e[_0x56e538(0x1bc)](getOpencodeConfigDir,_0x56e538(0x1ba)),_0x102f0e['nRGCH']));let _0x1faa0e;if(_0x549b66)_0x1faa0e=_0x549b66;else{if(_0x25f461)_0x1faa0e=_0x102f0e[_0x56e538(0x1d1)];else{console['log']('\x0a📦\x20OpenCode\x20Plugin\x0a');const _0x21e9ab=await _0x1b02f7[_0x56e538(0x1be)]([{'type':_0x102f0e['TIEDG'],'name':'pluginScope','message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x102f0e[_0x56e538(0x1d5)],'value':'user'},{'name':_0x56e538(0x1bd),'value':_0x56e538(0x1ba)}],'default':_0x56e538(0x1c6)}]);_0x1faa0e=_0x21e9ab['pluginScope'];}}const _0x44ec74=join(_0x102f0e[_0x56e538(0x1bc)](getOpencodeConfigDir,_0x1faa0e),'opencode.json'),_0x2ec300=_0x56e538(0x1d4),_0x19883c=_0x56e538(0x1ca);let _0x8b0eb1={};if(existsSync(_0x44ec74))try{const _0x1a7c0b=await readFile(_0x44ec74,_0x102f0e['ggxyQ']);_0x8b0eb1=JSON[_0x56e538(0x1d0)](_0x1a7c0b);}catch(_0x8f9c85){return console[_0x56e538(0x1cb)]('⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.'),{'configured':![],'scope':_0x1faa0e,'error':_0x102f0e[_0x56e538(0x1d3)],'details':_0x8f9c85};}const _0x4b8f85=Array[_0x56e538(0x1cc)](_0x8b0eb1[_0x56e538(0x1c7)])?_0x8b0eb1['plugin']:[];if(_0x4b8f85['includes'](_0x2ec300))return console[_0x56e538(0x1c9)](_0x102f0e['PDSka']),{'configured':![],'scope':_0x1faa0e};return _0x8b0eb1[_0x56e538(0x1bf)]=_0x8b0eb1['$schema']||_0x19883c,_0x8b0eb1[_0x56e538(0x1c7)]=[..._0x4b8f85,_0x2ec300],await mkdir(_0x102f0e['IwqsX'](getOpencodeConfigDir,_0x1faa0e),{'recursive':!![]}),await writeFile(_0x44ec74,JSON['stringify'](_0x8b0eb1,null,0x2)+'\x0a'),console[_0x56e538(0x1c9)](_0x56e538(0x1c8)),{'configured':!![],'scope':_0x1faa0e};}
@@ -1 +1 @@
1
- (function(_0x32b6b2,_0x12d774){var _0x23556e=_0x372d,_0x58462e=_0x32b6b2();while(!![]){try{var _0x342bae=-parseInt(_0x23556e(0x180))/0x1*(parseInt(_0x23556e(0x181))/0x2)+parseInt(_0x23556e(0x17d))/0x3+parseInt(_0x23556e(0x185))/0x4*(parseInt(_0x23556e(0x17c))/0x5)+-parseInt(_0x23556e(0x17a))/0x6+parseInt(_0x23556e(0x17e))/0x7*(parseInt(_0x23556e(0x17b))/0x8)+parseInt(_0x23556e(0x188))/0x9*(parseInt(_0x23556e(0x183))/0xa)+-parseInt(_0x23556e(0x186))/0xb;if(_0x342bae===_0x12d774)break;else _0x58462e['push'](_0x58462e['shift']());}catch(_0x3fcddc){_0x58462e['push'](_0x58462e['shift']());}}}(_0x31bf,0xdf712));function _0x31bf(){var _0x393c46=['40mAOfqx','5979885ViEaxy','4008216miJxba','1063391JMouSt','iFFWY','1qSdxxZ','3432322cPrJXe','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','10UYfGCK','\x20\x20https://docs.ranger.net/main/concepts/profiles','4dnbuho','6569849CvNZap','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','10611036ejLowE','7451880wChiFF'];_0x31bf=function(){return _0x393c46;};return _0x31bf();}function _0x372d(_0x14042e,_0x1f238e){_0x14042e=_0x14042e-0x17a;var _0x31bf05=_0x31bf();var _0x372d41=_0x31bf05[_0x14042e];return _0x372d41;}export async function setupCi(_0x519286,_0x2b1fd2,_0x1cc1a9){var _0x5864b9=_0x372d,_0x1a6910={'JahEu':function(_0xac7a51,_0x4df85d){return _0xac7a51+_0x4df85d;},'jHmxy':function(_0x3b4118,_0x25ee0c){return _0x3b4118+_0x25ee0c;},'bjuDN':function(_0x41df20,_0x31b3a4){return _0x41df20+_0x31b3a4;},'iFFWY':function(_0x2e85ca,_0x8c18fe){return _0x2e85ca+_0x8c18fe;},'YlkUv':'ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a'};console['error'](_0x1a6910['JahEu'](_0x1a6910['jHmxy'](_0x1a6910['bjuDN'](_0x1a6910[_0x5864b9(0x17f)](_0x1a6910['YlkUv'],'\x0a')+_0x5864b9(0x182)+_0x5864b9(0x187),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'),_0x5864b9(0x184))),process['exit'](0x1);}
1
+ function _0xf65b(_0x1913b8,_0x4e96d3){_0x1913b8=_0x1913b8-0x12d;var _0x4fb333=_0x4fb3();var _0xf65b5d=_0x4fb333[_0x1913b8];return _0xf65b5d;}(function(_0x1de2cd,_0x9c6734){var _0xaf143b=_0xf65b,_0x50d897=_0x1de2cd();while(!![]){try{var _0x57ea9e=-parseInt(_0xaf143b(0x132))/0x1+parseInt(_0xaf143b(0x133))/0x2+-parseInt(_0xaf143b(0x131))/0x3+parseInt(_0xaf143b(0x135))/0x4+-parseInt(_0xaf143b(0x130))/0x5+parseInt(_0xaf143b(0x134))/0x6*(parseInt(_0xaf143b(0x12d))/0x7)+parseInt(_0xaf143b(0x12e))/0x8;if(_0x57ea9e===_0x9c6734)break;else _0x50d897['push'](_0x50d897['shift']());}catch(_0x45592d){_0x50d897['push'](_0x50d897['shift']());}}}(_0x4fb3,0x38d60));function _0x4fb3(){var _0x4a5bb5=['4559560fPMLDh','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','2111510zpBVrJ','972159GzzbSz','212869jSAUpI','405932sjEghz','12eMCCqC','32276yJYssW','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','exit','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','1438654CObAFR'];_0x4fb3=function(){return _0x4a5bb5;};return _0x4fb3();}export async function setupCi(_0x483cff,_0x2c2e18,_0x1446e9){var _0x1f0204=_0xf65b,_0x5dc5db={'XqMzl':function(_0xd0f9ae,_0x8582ff){return _0xd0f9ae+_0x8582ff;},'PYvUo':_0x1f0204(0x136),'KLnuH':'\x20\x20https://docs.ranger.net/main/concepts/profiles'};console['error'](_0x5dc5db['XqMzl']('ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a'+'\x0a',_0x5dc5db['PYvUo'])+_0x1f0204(0x12f)+'\x0a'+_0x1f0204(0x138)+_0x5dc5db['KLnuH']),process[_0x1f0204(0x137)](0x1);}
@@ -1 +1 @@
1
- function _0x2c2c(_0x255d74,_0x4f78f9){_0x255d74=_0x255d74-0x1ed;const _0x1bcad3=_0x1bca();let _0x2c2c5d=_0x1bcad3[_0x255d74];return _0x2c2c5d;}(function(_0x31203c,_0x4fbd52){const _0x4f55d4=_0x2c2c,_0x1a6a61=_0x31203c();while(!![]){try{const _0x1d491e=parseInt(_0x4f55d4(0x216))/0x1+parseInt(_0x4f55d4(0x20a))/0x2*(parseInt(_0x4f55d4(0x200))/0x3)+-parseInt(_0x4f55d4(0x20f))/0x4+parseInt(_0x4f55d4(0x1f4))/0x5+parseInt(_0x4f55d4(0x208))/0x6*(-parseInt(_0x4f55d4(0x1ff))/0x7)+-parseInt(_0x4f55d4(0x217))/0x8*(-parseInt(_0x4f55d4(0x1fc))/0x9)+-parseInt(_0x4f55d4(0x204))/0xa;if(_0x1d491e===_0x4fbd52)break;else _0x1a6a61['push'](_0x1a6a61['shift']());}catch(_0x126176){_0x1a6a61['push'](_0x1a6a61['shift']());}}}(_0x1bca,0x71b25));function _0x1bca(){const _0x61d7da=['\x20\x203.\x20Run:\x20ranger\x20skillup','warn','list','To\x20get\x20started:','819295VkwXLT','5613528FMqcSk','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','\x20<your-api-token>','project-level','stdin','This\x20project\x20only\x20(','/skills/','Where\x20should\x20skills\x20be\x20installed?','\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!','EgJSy','qNfFb','installLevel','277980fWCPso','\x0a✅\x20Installed\x20','zcYib','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','opencode','log','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','9rbhPQZ','autoInstall','OOmkR','14SDkqHW','669996RfrBUv','suppressUsage','\x20--opencode','\x20successfully!\x0a','5340460zfCPBq','/.opencode/skills/','user-level','Xhuub','1280352jqdKji','/.claude/skills/','4lieQGD','✓\x20Found\x20API\x20token','ShxqH','stdout','WZTvW','2386860ZnrpxT','YhjJQ','VCTlN'];_0x1bca=function(){return _0x61d7da;};return _0x1bca();}import{basename}from'path';import _0x454d56 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x1470f2={}){const _0xd9f5d=_0x2c2c,_0x7e8d0f={'odBzb':'claude','OOmkR':function(_0x38b389){return _0x38b389();},'YhjJQ':function(_0x35ddb1,_0x2e3742){return _0x35ddb1===_0x2e3742;},'MZFsv':function(_0x50e26e,_0x48bf6c){return _0x50e26e===_0x48bf6c;},'xApas':function(_0x4e03c1){return _0x4e03c1();},'EgJSy':function(_0x36dcbd,_0x2bdb82){return _0x36dcbd(_0x2bdb82);},'jGDBZ':_0xd9f5d(0x1f8),'daAra':function(_0x58c6e3,_0x303104){return _0x58c6e3(_0x303104);},'xQDRd':'user','qNfFb':_0xd9f5d(0x1ef),'WZTvW':'\x0a📦\x20Installing\x20skills...\x0a','zcYib':function(_0x4b728d,_0x5b09d8){return _0x4b728d instanceof _0x5b09d8;},'ShxqH':function(_0x138dde,_0x41e04d){return _0x138dde>_0x41e04d;},'CRLvf':function(_0x46599a,_0x59ec02){return _0x46599a===_0x59ec02;},'VCTlN':_0xd9f5d(0x206),'Xhuub':_0xd9f5d(0x21a),'WrpHP':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','VkpjI':_0xd9f5d(0x1f0),'ZfVTE':_0xd9f5d(0x218)};console[_0xd9f5d(0x1f9)](_0xd9f5d(0x1fa));const _0x582ecf=_0x1470f2['platform']??_0x7e8d0f['odBzb'],_0xac0348=await _0x7e8d0f[_0xd9f5d(0x1fe)](getToken);if(!_0xac0348){console['log']('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a'),console[_0xd9f5d(0x1f9)](_0xd9f5d(0x215)),console[_0xd9f5d(0x1f9)](_0xd9f5d(0x1f7)),console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x7e8d0f['YhjJQ'](_0x582ecf,_0xd9f5d(0x1f8))?'\x20--opencode':'')+_0xd9f5d(0x219)),console[_0xd9f5d(0x1f9)](_0xd9f5d(0x212)+(_0x7e8d0f['MZFsv'](_0x582ecf,_0xd9f5d(0x1f8))?_0xd9f5d(0x202):'')+'\x0a');return;}console[_0xd9f5d(0x1f9)](_0xd9f5d(0x20b));const _0x245ca0=_0x7e8d0f['xApas'](getProjectRoot),_0x16fcc2=_0x7e8d0f[_0xd9f5d(0x1f1)](basename,_0x245ca0),_0x165a41=_0x7e8d0f[_0xd9f5d(0x210)](_0x582ecf,_0x7e8d0f['jGDBZ'])?_0x7e8d0f['daAra'](getOpencodeConfigDir,_0x7e8d0f['xQDRd'])+'/skills/':getClaudeConfigDir()+_0xd9f5d(0x1ee),_0x51b9b9=_0x582ecf===_0xd9f5d(0x1f8)?_0x245ca0+_0xd9f5d(0x205):_0x245ca0+_0xd9f5d(0x209),_0x483eda=process[_0xd9f5d(0x21b)]['isTTY']&&process[_0xd9f5d(0x20d)]['isTTY'];let _0x446080;if(_0x1470f2[_0xd9f5d(0x1fd)])_0x446080=_0x1470f2[_0xd9f5d(0x1fd)];else{if(_0x483eda){const _0x476d44=await _0x454d56['prompt']([{'type':_0xd9f5d(0x214),'name':_0xd9f5d(0x1f3),'message':_0x7e8d0f[_0xd9f5d(0x1f2)],'choices':[{'name':'All\x20projects\x20('+_0x165a41+')','value':'user'},{'name':_0xd9f5d(0x1ed)+_0x51b9b9+')','value':'project'}]}]);_0x446080=_0x476d44[_0xd9f5d(0x1f3)];}else _0x446080='project',console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x51b9b9+')');}let _0xd7913e=0x0;const _0x451892=_0x7e8d0f[_0xd9f5d(0x1fe)](getCurrentVersion);console[_0xd9f5d(0x1f9)](_0x7e8d0f[_0xd9f5d(0x20e)]);try{const _0x3daabb=await installSkill('ranger',{'cliVersion':_0x451892,'level':_0x446080,'platform':_0x582ecf});_0x3daabb&&_0xd7913e++;}catch(_0x837269){console[_0xd9f5d(0x213)](_0xd9f5d(0x1fb),_0x7e8d0f[_0xd9f5d(0x1f6)](_0x837269,Error)?_0x837269['message']:_0x837269);}if(_0x7e8d0f[_0xd9f5d(0x20c)](_0xd7913e,0x0)){const _0x5c6a63=_0x7e8d0f['CRLvf'](_0x446080,_0x7e8d0f['xQDRd'])?_0x7e8d0f[_0xd9f5d(0x211)]:_0x7e8d0f[_0xd9f5d(0x207)];console[_0xd9f5d(0x1f9)](_0xd9f5d(0x1f5)+_0xd7913e+'\x20'+_0x5c6a63+'\x20skill'+(_0xd7913e>0x1?'s':'')+_0xd9f5d(0x203)),!_0x1470f2[_0xd9f5d(0x201)]&&(console[_0xd9f5d(0x1f9)]('To\x20use:'),_0x582ecf===_0x7e8d0f['jGDBZ']?console['log'](_0x7e8d0f['WrpHP']):console[_0xd9f5d(0x1f9)](_0x7e8d0f['VkpjI']));}else console['log'](_0x7e8d0f['ZfVTE']);}
1
+ (function(_0x22cf23,_0x521de2){const _0x13b67a=_0x1bb8,_0x1153dc=_0x22cf23();while(!![]){try{const _0x5ed6d6=parseInt(_0x13b67a(0x169))/0x1+parseInt(_0x13b67a(0x163))/0x2*(parseInt(_0x13b67a(0x162))/0x3)+-parseInt(_0x13b67a(0x173))/0x4*(-parseInt(_0x13b67a(0x168))/0x5)+-parseInt(_0x13b67a(0x159))/0x6+parseInt(_0x13b67a(0x15e))/0x7*(parseInt(_0x13b67a(0x157))/0x8)+parseInt(_0x13b67a(0x179))/0x9+-parseInt(_0x13b67a(0x164))/0xa;if(_0x5ed6d6===_0x521de2)break;else _0x1153dc['push'](_0x1153dc['shift']());}catch(_0x5bb008){_0x1153dc['push'](_0x1153dc['shift']());}}}(_0x171a,0x9aba4));import{basename}from'path';import _0x1235c1 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';function _0x1bb8(_0x4b3484,_0x2290d1){_0x4b3484=_0x4b3484-0x156;const _0x171ab5=_0x171a();let _0x1bb884=_0x171ab5[_0x4b3484];return _0x1bb884;}function _0x171a(){const _0x35a924=['autoInstall','rqtBe','4628132JoChtA','KOxkG','\x20successfully!\x0a','opencode','claude','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','6200217CeCyXB','All\x20projects\x20(','wnfsq','\x0a✅\x20Installed\x20','message','Where\x20should\x20skills\x20be\x20installed?','SkZfW','user','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','511264yGZPQN','qfFya','4576122bKnVbp','\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!','log','/.opencode/skills/','user-level','63RojOxp','isTTY','\x20\x203.\x20Run:\x20ranger\x20skillup','To\x20use:','3027RfnFXi','2336sFdjtf','25834120LMMDgk','project','warn','installLevel','5QfoWBi','380233WCabSQ','/skills/','project-level','DHrmP','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','MKBSO','To\x20get\x20started:','\x20<your-api-token>'];_0x171a=function(){return _0x35a924;};return _0x171a();}export async function skillup(_0x24598c={}){const _0x2e99a8=_0x1bb8,_0xbbbc15={'zmhKD':function(_0x5b0930){return _0x5b0930();},'KeDVM':_0x2e99a8(0x16d),'rqtBe':_0x2e99a8(0x16f),'MKBSO':_0x2e99a8(0x176),'qfFya':'✓\x20Found\x20API\x20token','wnfsq':function(_0x2156bb,_0x4b1867){return _0x2156bb===_0x4b1867;},'XZxuD':function(_0x3a203b){return _0x3a203b();},'saIeL':_0x2e99a8(0x17e),'HwYJi':_0x2e99a8(0x180),'OjVrr':function(_0x15800c,_0x2aca67,_0x4ccc23){return _0x15800c(_0x2aca67,_0x4ccc23);},'ytxaC':'ranger','KOxkG':function(_0x56af8b,_0x4ed60f){return _0x56af8b instanceof _0x4ed60f;},'JtlHM':function(_0x33fb93,_0x2bb434){return _0x33fb93>_0x2bb434;},'HdvBo':function(_0x2d2ac6,_0x2647b6){return _0x2d2ac6===_0x2647b6;},'DHrmP':_0x2e99a8(0x16b),'aflPn':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','SkZfW':_0x2e99a8(0x156)};console['log'](_0x2e99a8(0x178));const _0x529ee2=_0x24598c['platform']??_0x2e99a8(0x177),_0xdd10d1=await _0xbbbc15['zmhKD'](getToken);if(!_0xdd10d1){console['log'](_0xbbbc15['KeDVM']),console['log'](_0xbbbc15[_0x2e99a8(0x172)]),console[_0x2e99a8(0x15b)]('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli'),console[_0x2e99a8(0x15b)]('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x529ee2===_0xbbbc15['MKBSO']?'\x20--opencode':'')+_0x2e99a8(0x170)),console[_0x2e99a8(0x15b)](_0x2e99a8(0x160)+(_0x529ee2===_0x2e99a8(0x176)?'\x20--opencode':'')+'\x0a');return;}console[_0x2e99a8(0x15b)](_0xbbbc15[_0x2e99a8(0x158)]);const _0x4246cf=getProjectRoot(),_0x184654=basename(_0x4246cf),_0x46c926=_0xbbbc15[_0x2e99a8(0x17b)](_0x529ee2,_0xbbbc15['MKBSO'])?getOpencodeConfigDir(_0x2e99a8(0x180))+_0x2e99a8(0x16a):_0xbbbc15['XZxuD'](getClaudeConfigDir)+'/skills/',_0x54970e=_0xbbbc15['wnfsq'](_0x529ee2,_0xbbbc15[_0x2e99a8(0x16e)])?_0x4246cf+_0x2e99a8(0x15c):_0x4246cf+'/.claude/skills/',_0x194a5d=process['stdin']['isTTY']&&process['stdout'][_0x2e99a8(0x15f)];let _0xc4b988;if(_0x24598c[_0x2e99a8(0x171)])_0xc4b988=_0x24598c[_0x2e99a8(0x171)];else{if(_0x194a5d){const _0x454b27=await _0x1235c1['prompt']([{'type':'list','name':_0x2e99a8(0x167),'message':_0xbbbc15['saIeL'],'choices':[{'name':_0x2e99a8(0x17a)+_0x46c926+')','value':_0xbbbc15['HwYJi']},{'name':'This\x20project\x20only\x20('+_0x54970e+')','value':_0x2e99a8(0x165)}]}]);_0xc4b988=_0x454b27['installLevel'];}else _0xc4b988=_0x2e99a8(0x165),console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x54970e+')');}let _0x3c9e86=0x0;const _0xedd6e=_0xbbbc15['zmhKD'](getCurrentVersion);console[_0x2e99a8(0x15b)]('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x53ecb0=await _0xbbbc15['OjVrr'](installSkill,_0xbbbc15['ytxaC'],{'cliVersion':_0xedd6e,'level':_0xc4b988,'platform':_0x529ee2});_0x53ecb0&&_0x3c9e86++;}catch(_0x1daa8d){console[_0x2e99a8(0x166)]('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0xbbbc15[_0x2e99a8(0x174)](_0x1daa8d,Error)?_0x1daa8d[_0x2e99a8(0x17d)]:_0x1daa8d);}if(_0xbbbc15['JtlHM'](_0x3c9e86,0x0)){const _0xc6e71f=_0xbbbc15['HdvBo'](_0xc4b988,'user')?_0x2e99a8(0x15d):_0xbbbc15[_0x2e99a8(0x16c)];console[_0x2e99a8(0x15b)](_0x2e99a8(0x17c)+_0x3c9e86+'\x20'+_0xc6e71f+'\x20skill'+(_0x3c9e86>0x1?'s':'')+_0x2e99a8(0x175)),!_0x24598c['suppressUsage']&&(console[_0x2e99a8(0x15b)](_0x2e99a8(0x161)),_0x529ee2===_0x2e99a8(0x176)?console['log'](_0xbbbc15['aflPn']):console[_0x2e99a8(0x15b)](_0x2e99a8(0x15a)));}else console[_0x2e99a8(0x15b)](_0xbbbc15[_0x2e99a8(0x17f)]);}
@@ -1 +1 @@
1
- const _0x5a6c3d=_0x361e;(function(_0x108191,_0x4fad2e){const _0xe6ff6f=_0x361e,_0x3bc352=_0x108191();while(!![]){try{const _0x2a693e=-parseInt(_0xe6ff6f(0xd5))/0x1+parseInt(_0xe6ff6f(0xca))/0x2+-parseInt(_0xe6ff6f(0xde))/0x3+-parseInt(_0xe6ff6f(0xc6))/0x4+-parseInt(_0xe6ff6f(0xcd))/0x5*(-parseInt(_0xe6ff6f(0x10c))/0x6)+-parseInt(_0xe6ff6f(0x105))/0x7+parseInt(_0xe6ff6f(0x10d))/0x8;if(_0x2a693e===_0x4fad2e)break;else _0x3bc352['push'](_0x3bc352['shift']());}catch(_0xb4c598){_0x3bc352['push'](_0x3bc352['shift']());}}}(_0x57a3,0xa22b1));import{mkdir,writeFile}from'fs/promises';import{join,dirname}from'path';function _0x57a3(){const _0x593d2b=['MutqO',');\x20retrying...','aeOWn','playwright/package.json','2857320yoqCiz','✓\x20Stored\x20credentials\x20locally','UWONJ','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','skills','skipAuth','rVxFa','DBQbJ','JErwW','ugWaz','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','✓\x20Exported\x20credentials\x20for\x20CI','✓\x20~/.ranger/\x20directory\x20already\x20exists','✓\x20Created\x20.ranger/.gitignore','oMMBI','✓\x20Local\x20profile\x20already\x20exists','\x20failed\x20(','DNvYM','ranger\x20profile\x20add\x20<name>','...','ZqJLX','Nhrou','executablePath','\x0aInstalling\x20Chromium\x20browser...\x0a','log','AUQiO','✓\x20Authenticated\x20to\x20','chromium','FRSxV','\x20\x20npx\x20playwright@','close','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','OuNbR','kHBLu','tgYEM','FjedQ','QHoDL','VGZag','env','1437604IPuuzQ','inherit','pWNSQ','opencode','\x0a\x20\x20','CEgwG','error','558ZWRusu','11772712EUdVTy','\x20\x20\x20\x20RANGER_CHROMIUM_INSTALL_TIMEOUT_MS=1800000\x20ranger\x20setup\x20deps','MaXZh','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','stdout','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','platform','hELbN','FiDGY','rgqjw','Validating\x20API\x20token...','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','confirm','skipChromium','profile','EtVvj','install','method','status','user','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','success','DXuGK','\x0a\x20\x20Chromium\x20install\x20timed\x20out\x20(limit\x20','force','skipped','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','\x20install\x20chromium','s).\x20On\x20a\x20slow\x20or\x20proxied\x20connection,\x20raise\x20the\x20limit\x20and\x20retry,\x20e.g.:\x0a','trackPhaseEnd','Kmrjh','2050008GQjAdV','\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:','RANGER_CHROMIUM_INSTALL_TIMEOUT_MS','scope','1781836DIUzVY','exit','auth','54195RQTFUn','device_auth','XmBlb','dNYrw','Yquyt','ZkGea','withDeps','GbDVR','1035979MFAlGL','trackPhaseStart','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','message','ApbCV'];_0x57a3=function(){return _0x593d2b;};return _0x57a3();}import{existsSync}from'fs';import{createRequire}from'module';import _0x5b86ff 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';function _0x361e(_0x48d94e,_0x9e7399){_0x48d94e=_0x48d94e-0xbd;const _0x57a356=_0x57a3();let _0x361e76=_0x57a356[_0x48d94e];return _0x361e76;}import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';import{spawn}from'child_process';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.56.1';const bold=_0x3e1005=>'\x1b[1m'+_0x3e1005+'\x1b[0m';export function getPlaywrightVersion(){const _0x3dcb7a=_0x361e,_0x32edfd={'MutqO':_0x3dcb7a(0xdd),'LHHGq':function(_0x4356e4,_0x5119c2){return _0x4356e4(_0x5119c2);}};try{const _0x245348=require['resolve'](_0x32edfd[_0x3dcb7a(0xda)]),_0x53ca66=_0x32edfd['LHHGq'](require,_0x245348);return _0x53ca66['version'];}catch{return null;}}function resolveBundledPlaywrightCli(){const _0x1f100c=_0x361e,_0x35a1f6={'EtVvj':function(_0x5a8257,_0x1d3677,_0x3ca348){return _0x5a8257(_0x1d3677,_0x3ca348);},'FRSxV':function(_0x32ada0,_0x551942){return _0x32ada0(_0x551942);},'jlXCS':_0x1f100c(0xdd)};try{const _0x29316f=_0x35a1f6[_0x1f100c(0x11d)](join,_0x35a1f6[_0x1f100c(0xfa)](dirname,require['resolve'](_0x35a1f6['jlXCS'])),'cli.js');return existsSync(_0x29316f)?_0x29316f:null;}catch{return null;}}const CHROMIUM_INSTALL_TIMEOUT_MS=Number(process[_0x5a6c3d(0x104)][_0x5a6c3d(0xc8)])||0x927c0;class ChromiumInstallTimeoutError extends Error{}export async function installChromiumBinary(_0x3b5321,_0x1e1e62=![]){const _0x43a44a=_0x5a6c3d,_0x553291={'yCCYI':function(_0x5e7181){return _0x5e7181();},'nkNDL':'npx','VGZag':_0x43a44a(0x11e),'rgqjw':function(_0x299958,_0x391769,_0x219626){return _0x299958(_0x391769,_0x219626);},'QBoff':function(_0x301798,_0x19069c){return _0x301798+_0x19069c;},'KdbEn':function(_0x82baa7,_0x5e2fd4){return _0x82baa7/_0x5e2fd4;}},_0x5434d1=_0x553291['yCCYI'](resolveBundledPlaywrightCli),_0x31166d=_0x5434d1?process['execPath']:_0x553291['nkNDL'],_0x173552=[_0x5434d1??'playwright@'+_0x3b5321,_0x553291[_0x43a44a(0x103)],..._0x1e1e62?['--with-deps']:[],_0x43a44a(0xf9)];let _0x30d6d3=![];for(let _0x207953=0x1;;_0x207953++){try{await _0x553291[_0x43a44a(0x117)](runChromiumInstall,_0x31166d,_0x173552);return;}catch(_0x1a8645){_0x1a8645 instanceof ChromiumInstallTimeoutError&&!_0x30d6d3&&(_0x30d6d3=!![],console['log'](_0x553291['QBoff'](_0x43a44a(0xbe)+Math['round'](_0x553291['KdbEn'](CHROMIUM_INSTALL_TIMEOUT_MS,0x3e8))+_0x43a44a(0xc3),_0x43a44a(0x10e))));if(_0x207953>=0x3)throw _0x1a8645;const _0x38180a=_0x1a8645 instanceof Error?_0x1a8645['message']:String(_0x1a8645);console[_0x43a44a(0xf6)]('\x20\x20Chromium\x20install\x20attempt\x20'+_0x207953+_0x43a44a(0xee)+_0x38180a+_0x43a44a(0xdb));}}}function runChromiumInstall(_0x4d7011,_0x4b6f03){const _0x1cab5f={'oMMBI':function(_0x4c68f0,_0x11a575){return _0x4c68f0(_0x11a575);},'MrbNl':'SIGKILL','YtEHT':function(_0x2a2591,_0x29064e){return _0x2a2591/_0x29064e;},'DXuGK':function(_0x32e31d,_0x18dca3,_0x31f355,_0xe1a1bb){return _0x32e31d(_0x18dca3,_0x31f355,_0xe1a1bb);},'DPJmu':function(_0x50da44,_0x181460){return _0x50da44===_0x181460;},'wEbFG':'win32','dBBGg':function(_0x11b9a6,_0x4a17af,_0xb87270){return _0x11b9a6(_0x4a17af,_0xb87270);},'ZzjCu':'error'};return new Promise((_0x34bc72,_0xcc950)=>{const _0x563223=_0x361e,_0x58c765={'AUQiO':_0x1cab5f['MrbNl'],'yVgwM':function(_0x234098,_0x528d39){const _0x48b4e7=_0x361e;return _0x1cab5f[_0x48b4e7(0xec)](_0x234098,_0x528d39);},'Yquyt':function(_0x264151,_0x923c62){return _0x1cab5f['YtEHT'](_0x264151,_0x923c62);},'tdvGo':function(_0x426bbb,_0x5b2cd7){const _0x55b5f4=_0x361e;return _0x1cab5f[_0x55b5f4(0xec)](_0x426bbb,_0x5b2cd7);},'QHoDL':function(_0xbfa559,_0x55ed4a){return _0xbfa559(_0x55ed4a);}},_0x259118=_0x1cab5f[_0x563223(0xbd)](spawn,_0x4d7011,_0x4b6f03,{'stdio':['ignore','inherit',_0x563223(0x106)],'shell':_0x1cab5f['DPJmu'](process[_0x563223(0x114)],_0x1cab5f['wEbFG'])}),_0x395bc5=_0x1cab5f['dBBGg'](setTimeout,()=>{const _0x412b0d=_0x563223;_0x259118['kill'](_0x58c765[_0x412b0d(0xf7)]),_0x58c765['yVgwM'](_0xcc950,new ChromiumInstallTimeoutError('Chromium\x20install\x20timed\x20out\x20after\x20'+Math['round'](_0x58c765[_0x412b0d(0xd1)](CHROMIUM_INSTALL_TIMEOUT_MS,0x3e8))+'s'));},CHROMIUM_INSTALL_TIMEOUT_MS);_0x259118['on'](_0x563223(0xfc),_0x3f5c19=>{const _0x58ccae=_0x563223;_0x1cab5f[_0x58ccae(0xec)](clearTimeout,_0x395bc5);if(_0x3f5c19===0x0)_0x34bc72();else _0xcc950(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x3f5c19));}),_0x259118['on'](_0x1cab5f['ZzjCu'],_0x106d3b=>{const _0x37ffb4=_0x563223;_0x58c765['tdvGo'](clearTimeout,_0x395bc5),_0x58c765[_0x37ffb4(0x102)](_0xcc950,_0x106d3b);});});}export async function authenticate(_0x17e012){const _0x5c4e05=_0x5a6c3d,_0x48608d={'jpREn':function(_0x3800ac,_0xdb6f9e){return _0x3800ac instanceof _0xdb6f9e;},'DBQbJ':function(_0x2d8224,_0x29ea5d){return _0x2d8224(_0x29ea5d);},'hELbN':_0x5c4e05(0xe9),'AYkTY':_0x5c4e05(0xdf)};if(!_0x17e012){const _0x54fe22=await getToken();if(_0x54fe22){const _0x451c3c=await getCurrentUser(_0x54fe22);if(_0x451c3c['success'])return console[_0x5c4e05(0xf6)]('✓\x20Already\x20authenticated\x20to\x20'+_0x451c3c['user']['organizationName']),{'token':_0x54fe22,'method':'existing_token'};}try{_0x17e012=await runDeviceAuthFlow();}catch(_0x750023){throw new Error('Authentication\x20failed:\x20'+(_0x48608d['jpREn'](_0x750023,Error)?_0x750023['message']:_0x750023));}const _0x4518fb=await _0x48608d[_0x5c4e05(0xe5)](getCurrentUser,_0x17e012);if(!_0x4518fb['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x4518fb['error']);return console['log'](_0x5c4e05(0xf8)+_0x4518fb[_0x5c4e05(0x121)]['organizationName']),{'token':_0x17e012,'method':_0x5c4e05(0xce)};}console['log'](_0x5c4e05(0x118));const _0x20a7ec=await _0x48608d[_0x5c4e05(0xe5)](getCurrentUser,_0x17e012);if(!_0x20a7ec[_0x5c4e05(0x123)]){if(_0x20a7ec[_0x5c4e05(0x120)])throw new Error('Authentication\x20failed:\x20'+_0x20a7ec['error']+_0x5c4e05(0x110));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x20a7ec[_0x5c4e05(0x10b)]+_0x5c4e05(0xfd));}return console[_0x5c4e05(0xf6)](_0x5c4e05(0xf8)+_0x20a7ec['user']['organizationName']),await storeToken(_0x17e012),console['log'](process[_0x5c4e05(0x104)]['GITHUB_ENV']?_0x48608d[_0x5c4e05(0x115)]:_0x48608d['AYkTY']),{'token':_0x17e012,'method':'provided_token'};}export async function ensureRangerDir(_0x4c943c){const _0x303715=_0x5a6c3d,_0x41f2a1={'qsNYW':function(_0x112b57,_0x275e50){return _0x112b57(_0x275e50);},'MaXZh':_0x303715(0xea)};void _0x4c943c;const _0x3a8499=getRangerHomeDir();return!_0x41f2a1['qsNYW'](existsSync,_0x3a8499)?(await mkdir(_0x3a8499,{'recursive':!![]}),console['log']('✓\x20Created\x20~/.ranger/\x20directory'),{'path':_0x3a8499,'installed':!![]}):(console[_0x303715(0xf6)](_0x41f2a1[_0x303715(0x10f)]),{'path':_0x3a8499,'installed':![]});}export async function ensureChromium(_0x16ab01=![]){const _0x2b13f7=_0x5a6c3d,_0x50260c={'JErwW':function(_0x3d8154){return _0x3d8154();},'CEgwG':function(_0x7546e7,_0x3d55b2){return _0x7546e7??_0x3d55b2;},'ZePjY':'\x20(fallback\x20version)','pOCRH':_0x2b13f7(0xf5),'jFhBg':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','Nhrou':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','LNywt':function(_0x22b226,_0x500ca5){return _0x22b226 instanceof _0x500ca5;},'XmBlb':'\x0a⚠\x20Skipping\x20Chromium\x20installation.'};let _0x2cb506=![];try{const _0x471413=chromium[_0x2b13f7(0xf4)]();_0x2cb506=existsSync(_0x471413);}catch{_0x2cb506=![];}if(_0x2cb506)return console[_0x2b13f7(0xf6)]('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x22d4c2=_0x50260c[_0x2b13f7(0xe6)](getPlaywrightVersion),_0x4c31db=_0x50260c[_0x2b13f7(0x10a)](_0x22d4c2,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x2e81a9=!_0x22d4c2,_0x3c7357=process['stdin']['isTTY']&&process[_0x2b13f7(0x111)]['isTTY'];let _0x253793=!![];if(_0x3c7357){const {install:_0x330e01}=await _0x5b86ff['prompt']([{'type':_0x2b13f7(0x11a),'name':_0x2b13f7(0x11e),'message':_0x2e81a9?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x4c31db+'\x20now?':'The\x20required\x20version\x20('+_0x4c31db+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x253793=_0x330e01;}else console[_0x2b13f7(0xf6)](_0x2b13f7(0xe8)+_0x4c31db+(_0x2e81a9?_0x50260c['ZePjY']:'')+_0x2b13f7(0xf1));if(_0x253793){console['log'](_0x50260c['pOCRH']);try{await installChromiumBinary(_0x4c31db,_0x16ab01),console['log'](_0x50260c['jFhBg']);}catch(_0x43caba){console['error'](_0x50260c[_0x2b13f7(0xf3)],_0x50260c['LNywt'](_0x43caba,Error)?_0x43caba[_0x2b13f7(0xd8)]:_0x43caba),console[_0x2b13f7(0xf6)]('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),console[_0x2b13f7(0xf6)]('\x20\x20npx\x20playwright@'+_0x4c31db+_0x2b13f7(0xc2));}}else console['log'](_0x50260c[_0x2b13f7(0xcf)]),console[_0x2b13f7(0xf6)](_0x2b13f7(0x122)),console['log'](_0x2b13f7(0xfb)+_0x4c31db+_0x2b13f7(0xc2));return!![];}export async function writeRangerGitignore(_0x49c14c){const _0x11228f=_0x5a6c3d,_0x331b99={'YNjcF':function(_0x13986c,_0x1a77d9,_0x345830){return _0x13986c(_0x1a77d9,_0x345830);},'FiDGY':_0x11228f(0xeb)},_0x7b977c=_0x331b99['YNjcF'](join,_0x49c14c,'.gitignore'),_0x23359b='\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 _0x331b99['YNjcF'](writeFile,_0x7b977c,_0x23359b),console['log'](_0x331b99[_0x11228f(0x116)]);}export async function ensureLocalEnv(_0x4419b6,_0x107f70){const _0xcb675b=_0x5a6c3d,_0x1c8a48={'Ocyyf':function(_0x5c6d2e){return _0x5c6d2e();},'raFgC':'user','aeOWn':'local','tgYEM':function(_0x288825,_0x7807a0){return _0x288825 instanceof _0x7807a0;}};if(!_0x1c8a48['Ocyyf'](findGitRoot)&&_0x4419b6?.[_0xcb675b(0xc9)]!==_0x1c8a48['raFgC'])return console[_0xcb675b(0xf6)](_0xcb675b(0x113)),{'ready':![],'skipped':!![]};const _0x5e68ed=_0x4419b6?.['scope']===_0x1c8a48['raFgC']?_0x1c8a48['Ocyyf'](getRangerHomeDir):undefined;if(findExistingEnv(_0x1c8a48[_0xcb675b(0xdc)],{'locations':[_0x1c8a48['aeOWn']],'rangerDir':_0x5e68ed}))return console[_0xcb675b(0xf6)](_0xcb675b(0xed)),{'ready':!![],'skipped':![]};try{return await addEnv('local',{'url':_0x4419b6?.['url'],'force':_0x4419b6?.[_0xcb675b(0xbf)],'allowInsecureLocalhost':_0x4419b6?.['allowInsecureLocalhost'],'scope':_0x4419b6?.['scope']},_0x107f70),{'ready':!![],'skipped':![]};}catch(_0x3314cc){return console[_0xcb675b(0x10b)]('\x0a❌\x20Profile\x20setup\x20failed:',_0x1c8a48[_0xcb675b(0x100)](_0x3314cc,Error)?_0x3314cc[_0xcb675b(0xd8)]:_0x3314cc),{'ready':![],'skipped':![]};}}export async function start(_0xdb8ce2,_0x55863c,_0x307674){const _0x1bfcce=_0x5a6c3d,_0x1fe5e8={'FjedQ':'\x0a🚀\x20Ranger\x20Setup\x0a','XKQle':function(_0x18cc3e,_0x1ca6d6){return _0x18cc3e+_0x1ca6d6;},'ZqJLX':function(_0x31ffdf){return _0x31ffdf();},'pWNSQ':'user','ugWaz':'✓\x20Skipping\x20authentication\x20(--skip-auth)','dNYrw':'chromium','DfShJ':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','ZkGea':function(_0x3af8f9,_0x346925){return _0x3af8f9(_0x346925);},'GbDVR':'plugin','UWONJ':'skills','OuNbR':'ranger','ApbCV':_0x1bfcce(0x108),'DNvYM':function(_0x38f994,_0x419ec1){return _0x38f994 instanceof _0x419ec1;},'ddPRQ':'\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','qexxr':_0x1bfcce(0x11c),'RpSvM':function(_0x29aefa,_0x1f17e9,_0x1cac7d){return _0x29aefa(_0x1f17e9,_0x1cac7d);},'nTQqu':function(_0x23bc33,_0x7ebcc7){return _0x23bc33+_0x7ebcc7;},'kHBLu':_0x1bfcce(0x112),'ELFau':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','rVxFa':'/ranger:enable','Kmrjh':function(_0x233894,_0x561095){return _0x233894+_0x561095;},'qQvfq':function(_0xc14d38,_0x3a85ea){return _0xc14d38+_0x3a85ea;}};console[_0x1bfcce(0xf6)](_0x1fe5e8[_0x1bfcce(0x101)]);_0x55863c?.[_0x1bfcce(0xc9)]!==undefined&&_0x55863c[_0x1bfcce(0xc9)]!==_0x1bfcce(0x121)&&(console['error'](_0x1fe5e8['XKQle'](_0x1fe5e8['XKQle']('ranger\x20setup\x20--scope='+String(_0x55863c[_0x1bfcce(0xc9)])+'\x20is\x20no\x20longer\x20supported.\x20','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20'),_0x1bfcce(0xd7))),process[_0x1bfcce(0xcb)](0x1));_0x55863c={..._0x55863c,'scope':'user'};const _0x16df40=!existsSync(_0x1fe5e8[_0x1bfcce(0xf2)](getRangerHomeDir));await ensureRangerDir(_0x1fe5e8[_0x1bfcce(0x107)]);if(_0x55863c?.['skipAuth'])console['log'](_0x1fe5e8[_0x1bfcce(0xe7)]),_0x307674?.['trackPhaseEnd']('auth',{'isFirstRun':_0x16df40,'method':_0x1bfcce(0xc0)});else{_0x307674?.[_0x1bfcce(0xd6)](_0x1bfcce(0xcc));const _0x3baff8=await authenticate(_0xdb8ce2);_0x307674?.['trackPhaseEnd']('auth',{'isFirstRun':_0x16df40,'method':_0x3baff8[_0x1bfcce(0x11f)]});}_0x307674?.['trackPhaseStart'](_0x1fe5e8[_0x1bfcce(0xd0)]);_0x55863c?.['skipChromium']?console['log'](_0x1fe5e8['DfShJ']):await _0x1fe5e8[_0x1bfcce(0xd2)](ensureChromium,_0x55863c?.[_0x1bfcce(0xd3)]);_0x307674?.[_0x1bfcce(0xc4)](_0x1bfcce(0xf9),{'isFirstRun':_0x16df40,'skipped':!!_0x55863c?.[_0x1bfcce(0x11b)]}),console[_0x1bfcce(0xf6)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x3fbcd0=_0x55863c?.['scope'],_0xd4232f=_0x55863c?.['opencode']??![];let _0x2e04a7=null;_0xd4232f?(_0x307674?.['trackPhaseStart'](_0x1fe5e8[_0x1bfcce(0xd4)]),_0x2e04a7=await ensureOpencodePluginConfig(_0x3fbcd0),_0x307674?.['trackPhaseEnd'](_0x1fe5e8[_0x1bfcce(0xd4)],{'isFirstRun':_0x16df40,'opencode':!![]})):(_0x307674?.[_0x1bfcce(0xd6)](_0x1fe5e8[_0x1bfcce(0xd4)]),await ensureClaudePlugin(_0x3fbcd0),_0x307674?.[_0x1bfcce(0xc4)](_0x1fe5e8[_0x1bfcce(0xd4)],{'isFirstRun':_0x16df40}));if(_0xd4232f&&_0x2e04a7){_0x307674?.[_0x1bfcce(0xd6)](_0x1fe5e8[_0x1bfcce(0xe0)]);try{await installSkill(_0x1fe5e8[_0x1bfcce(0xfe)],{'level':_0x2e04a7['scope'],'cliVersion':_0x1fe5e8[_0x1bfcce(0xf2)](getCurrentVersion),'platform':_0x1fe5e8[_0x1bfcce(0xd9)]}),_0x307674?.['trackPhaseEnd']('skills',{'isFirstRun':_0x16df40,'opencode':!![]});}catch(_0x4b9d8e){console['warn']('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x1fe5e8[_0x1bfcce(0xef)](_0x4b9d8e,Error)?_0x4b9d8e['message']:_0x4b9d8e),_0x307674?.[_0x1bfcce(0xc4)](_0x1fe5e8[_0x1bfcce(0xe0)],{'isFirstRun':_0x16df40,'opencode':!![],'failed':!![]});}}else _0x307674?.[_0x1bfcce(0xd6)](_0x1bfcce(0xe2)),await ensureClaudeSkills(_0x3fbcd0),_0x307674?.['trackPhaseEnd'](_0x1fe5e8['UWONJ'],{'isFirstRun':_0x16df40});if(_0x55863c?.[_0x1bfcce(0xe3)])console['log'](_0x1fe5e8['ddPRQ']);else{if(_0x55863c?.['url']){_0x307674?.['trackPhaseStart'](_0x1fe5e8['qexxr']);const _0x18eb6a=await _0x1fe5e8['RpSvM'](ensureLocalEnv,{'url':_0x55863c['url'],'force':_0x55863c?.[_0x1bfcce(0xbf)],'allowInsecureLocalhost':_0x55863c?.['allowInsecureLocalhost'],'scope':_0x1fe5e8[_0x1bfcce(0x107)]},_0x307674);_0x307674?.[_0x1bfcce(0xc4)](_0x1fe5e8['qexxr'],{'isFirstRun':_0x16df40,'profileReady':_0x18eb6a['ready'],'userSkipped':_0x18eb6a['skipped']});}else console['log'](_0x1fe5e8['nTQqu'](_0x1fe5e8['nTQqu'](_0x1bfcce(0xc7)+(_0x1bfcce(0x109)+bold(_0x1bfcce(0xf0))),'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)'),_0x1bfcce(0x119))+_0x1bfcce(0xe1));}if(_0xd4232f)console[_0x1bfcce(0xf6)](_0x1fe5e8[_0x1bfcce(0xff)]),console[_0x1bfcce(0xf6)](_0x1fe5e8['ELFau']),console[_0x1bfcce(0xf6)]('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log']('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x4f8cbd=_0x1fe5e8['ZkGea'](bold,_0x1fe5e8[_0x1bfcce(0xe4)]);console[_0x1bfcce(0xf6)](_0x1fe5e8[_0x1bfcce(0xc5)](_0x1fe5e8['qQvfq']('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x4f8cbd+'\x20and\x20prompt\x20the\x20coding',_0x1bfcce(0xc1)),'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser')+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
1
+ const _0x4f7b4=_0x410f;function _0x53da(){const _0x11e864=['LrMTx','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','yGNjD','XOhRT','cli.js','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','DWaIz','env','npx','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','✓\x20Authenticated\x20to\x20','plugin','Authentication\x20failed:\x20','\x1b[1m','jjkxg','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','grgAe','aaqhj','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x20and\x20prompt\x20the\x20coding','skills','rhqCi','playwright/package.json','force','\x20is\x20no\x20longer\x20supported.\x20','✓\x20Already\x20authenticated\x20to\x20','message','The\x20required\x20version\x20(','SOHKi','247129mnCGUg','\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','playwright@','error','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','\x20\x20npx\x20playwright@','20ZxmxLK','ready','fhFQg','LoutQ','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','✓\x20~/.ranger/\x20directory\x20already\x20exists','\x20\x20Chromium\x20install\x20attempt\x20','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','1079487AYvCTw','580952BjhaBi','user','sQqoz','pTjko','dTFRj','log','JbWxP','SIGKILL','url','chromium','10652257IMlUsQ','mdtAX','\x20install\x20chromium','skipAuth','win32','1.56.1','nyscC','YHbwZ','\x0aInstalling\x20Chromium\x20browser...\x0a','skipped','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','auth','warn','1364980dvIyOp','2WNGlhP','version','withDeps','60VpgLZI','close','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','resolve','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','trackPhaseEnd','oIiCC','54jBqUMm','success','GUOIq','YvGRv','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','scope','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','GITHUB_ENV','UORpI','isTTY','YCoYa','152173pCxPfU','FhcME','ranger','existing_token','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','QvhRe','inherit','vnHZo','\x20\x20\x20\x20RANGER_CHROMIUM_INSTALL_TIMEOUT_MS=1800000\x20ranger\x20setup\x20deps','opencode','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','qabxg','JmPCG','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','kill','trackPhaseStart','nrlaD','skipChromium','aHSPO','\x20(fallback\x20version)','rAXuI','cyloz','method','tPglW','lByln','profile','kFQiO','SeaGa','device_auth','40206sDQvaa','\x20now?','xeWLz'];_0x53da=function(){return _0x11e864;};return _0x53da();}(function(_0x4b2bbe,_0x16629a){const _0x25b23d=_0x410f,_0x64ed64=_0x4b2bbe();while(!![]){try{const _0x4dca27=-parseInt(_0x25b23d(0x145))/0x1*(parseInt(_0x25b23d(0x16c))/0x2)+parseInt(_0x25b23d(0x124))/0x3*(parseInt(_0x25b23d(0x16f))/0x4)+-parseInt(_0x25b23d(0x16b))/0x5+parseInt(_0x25b23d(0x176))/0x6*(-parseInt(_0x25b23d(0x181))/0x7)+-parseInt(_0x25b23d(0x154))/0x8+-parseInt(_0x25b23d(0x153))/0x9*(parseInt(_0x25b23d(0x14b))/0xa)+parseInt(_0x25b23d(0x15e))/0xb;if(_0x4dca27===_0x16629a)break;else _0x64ed64['push'](_0x64ed64['shift']());}catch(_0x570e9f){_0x64ed64['push'](_0x64ed64['shift']());}}}(_0x53da,0x22750));import{mkdir,writeFile}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{createRequire}from'module';import _0x3dfe89 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';function _0x410f(_0x321f70,_0x217a57){_0x321f70=_0x321f70-0x122;const _0x53da24=_0x53da();let _0x410f0a=_0x53da24[_0x321f70];return _0x410f0a;}import{spawn}from'child_process';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x4f7b4(0x163);const bold=_0x2941a7=>_0x4f7b4(0x135)+_0x2941a7+'\x1b[0m';export function getPlaywrightVersion(){const _0x5c3eba=_0x4f7b4,_0x4b89aa={'EJfDT':_0x5c3eba(0x13e),'TpAdB':function(_0x3b8766,_0x1be2aa){return _0x3b8766(_0x1be2aa);}};try{const _0x1c131e=require['resolve'](_0x4b89aa['EJfDT']),_0x27ac41=_0x4b89aa['TpAdB'](require,_0x1c131e);return _0x27ac41[_0x5c3eba(0x16d)];}catch{return null;}}function resolveBundledPlaywrightCli(){const _0x80065f=_0x4f7b4,_0x55e39d={'rAXuI':_0x80065f(0x12b),'rhqCi':function(_0x4e7ca6,_0x270d48){return _0x4e7ca6(_0x270d48);}};try{const _0x4e10bb=join(dirname(require[_0x80065f(0x172)]('playwright/package.json')),_0x55e39d[_0x80065f(0x195)]);return _0x55e39d[_0x80065f(0x13d)](existsSync,_0x4e10bb)?_0x4e10bb:null;}catch{return null;}}const CHROMIUM_INSTALL_TIMEOUT_MS=Number(process[_0x4f7b4(0x12f)]['RANGER_CHROMIUM_INSTALL_TIMEOUT_MS'])||0x927c0;class ChromiumInstallTimeoutError extends Error{}export async function installChromiumBinary(_0x4093c5,_0x17e4c1=![]){const _0x76c847=_0x4f7b4,_0x3ae105={'HeMvz':function(_0x58156a){return _0x58156a();},'dNXdK':'install','vbhSw':function(_0xfbae0b,_0xf3b749,_0x43d20a){return _0xfbae0b(_0xf3b749,_0x43d20a);},'nyscC':function(_0x45732e,_0x2a0788){return _0x45732e+_0x2a0788;},'TautD':function(_0x3fc041,_0x4fcc59){return _0x3fc041/_0x4fcc59;},'nrlaD':function(_0x21acd7,_0x56340b){return _0x21acd7 instanceof _0x56340b;}},_0x4ce04c=_0x3ae105['HeMvz'](resolveBundledPlaywrightCli),_0x5d8978=_0x4ce04c?process['execPath']:_0x76c847(0x130),_0xa40b43=[_0x4ce04c??_0x76c847(0x147)+_0x4093c5,_0x3ae105['dNXdK'],..._0x17e4c1?['--with-deps']:[],'chromium'];let _0x189ff1=![];for(let _0x4adcb4=0x1;;_0x4adcb4++){try{await _0x3ae105['vbhSw'](runChromiumInstall,_0x5d8978,_0xa40b43);return;}catch(_0x458b5f){_0x458b5f instanceof ChromiumInstallTimeoutError&&!_0x189ff1&&(_0x189ff1=!![],console[_0x76c847(0x159)](_0x3ae105[_0x76c847(0x164)]('\x0a\x20\x20Chromium\x20install\x20timed\x20out\x20(limit\x20'+Math['round'](_0x3ae105['TautD'](CHROMIUM_INSTALL_TIMEOUT_MS,0x3e8))+'s).\x20On\x20a\x20slow\x20or\x20proxied\x20connection,\x20raise\x20the\x20limit\x20and\x20retry,\x20e.g.:\x0a',_0x76c847(0x189))));if(_0x4adcb4>=0x3)throw _0x458b5f;const _0xc25d19=_0x3ae105[_0x76c847(0x191)](_0x458b5f,Error)?_0x458b5f[_0x76c847(0x142)]:String(_0x458b5f);console['log'](_0x76c847(0x151)+_0x4adcb4+'\x20failed\x20('+_0xc25d19+');\x20retrying...');}}}function runChromiumInstall(_0x447239,_0x4fbd2f){const _0x2794be={'VOjAE':function(_0x47a63a,_0x188c40){return _0x47a63a(_0x188c40);},'GUOIq':function(_0x3f6f83,_0x2619c6){return _0x3f6f83/_0x2619c6;},'LbZeJ':function(_0x3964cc,_0x828a74){return _0x3964cc===_0x828a74;},'xeWLz':function(_0x58a0a8){return _0x58a0a8();},'YCoYa':function(_0x572b78,_0x568da3){return _0x572b78(_0x568da3);},'qNhDu':'ignore','KFfFR':function(_0x1a2582,_0x1b6255){return _0x1a2582===_0x1b6255;},'JbWxP':'error'};return new Promise((_0x287191,_0x16eec6)=>{const _0x15afa5=_0x410f,_0x41a2fc=spawn(_0x447239,_0x4fbd2f,{'stdio':[_0x2794be['qNhDu'],_0x15afa5(0x187),'inherit'],'shell':_0x2794be['KFfFR'](process['platform'],_0x15afa5(0x162))}),_0x4ef4b5=setTimeout(()=>{const _0x4498d5=_0x15afa5;_0x41a2fc[_0x4498d5(0x18f)](_0x4498d5(0x15b)),_0x2794be['VOjAE'](_0x16eec6,new ChromiumInstallTimeoutError('Chromium\x20install\x20timed\x20out\x20after\x20'+Math['round'](_0x2794be[_0x4498d5(0x178)](CHROMIUM_INSTALL_TIMEOUT_MS,0x3e8))+'s'));},CHROMIUM_INSTALL_TIMEOUT_MS);_0x41a2fc['on'](_0x15afa5(0x170),_0x7c049a=>{const _0x226052=_0x15afa5;clearTimeout(_0x4ef4b5);if(_0x2794be['LbZeJ'](_0x7c049a,0x0))_0x2794be[_0x226052(0x126)](_0x287191);else _0x2794be[_0x226052(0x180)](_0x16eec6,new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x7c049a));}),_0x41a2fc['on'](_0x2794be[_0x15afa5(0x15a)],_0x2e41b0=>{clearTimeout(_0x4ef4b5),_0x16eec6(_0x2e41b0);});});}export async function authenticate(_0x24ddb9){const _0x2d13a1=_0x4f7b4,_0x54ba2a={'FnVoC':function(_0x39d9ee){return _0x39d9ee();},'zcGIC':function(_0x4524a1,_0xe1abba){return _0x4524a1(_0xe1abba);},'DWaIz':function(_0x23e13f){return _0x23e13f();},'oIiCC':function(_0xde2c44,_0x3efbdb){return _0xde2c44 instanceof _0x3efbdb;},'GSmpt':function(_0x3aecde,_0x49cb9f){return _0x3aecde(_0x49cb9f);},'XOhRT':function(_0x2032a2,_0x3ac251){return _0x2032a2(_0x3ac251);},'Wqthb':'✓\x20Exported\x20credentials\x20for\x20CI','dTFRj':'✓\x20Stored\x20credentials\x20locally'};if(!_0x24ddb9){const _0x4c79a3=await _0x54ba2a['FnVoC'](getToken);if(_0x4c79a3){const _0x228c75=await _0x54ba2a['zcGIC'](getCurrentUser,_0x4c79a3);if(_0x228c75['success'])return console[_0x2d13a1(0x159)](_0x2d13a1(0x141)+_0x228c75['user']['organizationName']),{'token':_0x4c79a3,'method':_0x2d13a1(0x184)};}try{_0x24ddb9=await _0x54ba2a[_0x2d13a1(0x12e)](runDeviceAuthFlow);}catch(_0x40727f){throw new Error(_0x2d13a1(0x134)+(_0x54ba2a[_0x2d13a1(0x175)](_0x40727f,Error)?_0x40727f['message']:_0x40727f));}const _0x2c9734=await _0x54ba2a['GSmpt'](getCurrentUser,_0x24ddb9);if(!_0x2c9734[_0x2d13a1(0x177)])throw new Error(_0x2d13a1(0x185)+_0x2c9734[_0x2d13a1(0x148)]);return console['log'](_0x2d13a1(0x132)+_0x2c9734['user']['organizationName']),{'token':_0x24ddb9,'method':_0x2d13a1(0x123)};}console['log']('Validating\x20API\x20token...');const _0x11798a=await getCurrentUser(_0x24ddb9);if(!_0x11798a[_0x2d13a1(0x177)]){if(_0x11798a['status'])throw new Error(_0x2d13a1(0x134)+_0x11798a[_0x2d13a1(0x148)]+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0x2d13a1(0x168)+_0x11798a['error']+_0x2d13a1(0x137));}return console['log']('✓\x20Authenticated\x20to\x20'+_0x11798a['user']['organizationName']),await _0x54ba2a[_0x2d13a1(0x12a)](storeToken,_0x24ddb9),console[_0x2d13a1(0x159)](process[_0x2d13a1(0x12f)][_0x2d13a1(0x17d)]?_0x54ba2a['Wqthb']:_0x54ba2a[_0x2d13a1(0x158)]),{'token':_0x24ddb9,'method':'provided_token'};}export async function ensureRangerDir(_0x469416){const _0x4c49fd=_0x4f7b4,_0x29f8b1={'GzmJa':function(_0x33ba23,_0x4b8950){return _0x33ba23(_0x4b8950);}};void _0x469416;const _0xd0552d=getRangerHomeDir();return!_0x29f8b1['GzmJa'](existsSync,_0xd0552d)?(await mkdir(_0xd0552d,{'recursive':!![]}),console[_0x4c49fd(0x159)]('✓\x20Created\x20~/.ranger/\x20directory'),{'path':_0xd0552d,'installed':!![]}):(console['log'](_0x4c49fd(0x150)),{'path':_0xd0552d,'installed':![]});}export async function ensureChromium(_0x13f303=![]){const _0x574b60=_0x4f7b4,_0x136c0f={'YHbwZ':'✓\x20Playwright\x20Chromium\x20browser\x20found','XvoIu':function(_0x33dceb,_0x5b73a1){return _0x33dceb??_0x5b73a1;},'LrMTx':'install','FhcME':_0x574b60(0x194),'nCNjx':_0x574b60(0x17a),'SOHKi':function(_0x107d4f,_0x509f37){return _0x107d4f instanceof _0x509f37;},'QvhRe':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0x2b064f=![];try{const _0x582957=chromium['executablePath']();_0x2b064f=existsSync(_0x582957);}catch{_0x2b064f=![];}if(_0x2b064f)return console[_0x574b60(0x159)](_0x136c0f[_0x574b60(0x165)]),![];const _0x10ffee=getPlaywrightVersion(),_0x577f34=_0x136c0f['XvoIu'](_0x10ffee,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x1edc44=!_0x10ffee,_0x56166c=process['stdin'][_0x574b60(0x17f)]&&process['stdout']['isTTY'];let _0x4e292a=!![];if(_0x56166c){const {install:_0x266c79}=await _0x3dfe89['prompt']([{'type':'confirm','name':_0x136c0f[_0x574b60(0x127)],'message':_0x1edc44?_0x574b60(0x18b)+_0x577f34+_0x574b60(0x125):_0x574b60(0x143)+_0x577f34+_0x574b60(0x12d),'default':!![]}]);_0x4e292a=_0x266c79;}else console[_0x574b60(0x159)](_0x574b60(0x14f)+_0x577f34+(_0x1edc44?_0x136c0f[_0x574b60(0x182)]:'')+'...');if(_0x4e292a){console['log'](_0x574b60(0x166));try{await installChromiumBinary(_0x577f34,_0x13f303),console['log']('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x2fb830){console[_0x574b60(0x148)](_0x136c0f['nCNjx'],_0x136c0f[_0x574b60(0x144)](_0x2fb830,Error)?_0x2fb830[_0x574b60(0x142)]:_0x2fb830),console['log']('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),console[_0x574b60(0x159)]('\x20\x20npx\x20playwright@'+_0x577f34+_0x574b60(0x160));}}else console['log']('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console[_0x574b60(0x159)](_0x136c0f[_0x574b60(0x186)]),console[_0x574b60(0x159)](_0x574b60(0x14a)+_0x577f34+_0x574b60(0x160));return!![];}export async function writeRangerGitignore(_0x17b01b){const _0x482c42=_0x4f7b4,_0x590341={'aaqhj':function(_0x770937,_0x84112d,_0x43262f){return _0x770937(_0x84112d,_0x43262f);},'JmPCG':'.gitignore','SeaGa':'✓\x20Created\x20.ranger/.gitignore'},_0x36c92c=_0x590341[_0x482c42(0x139)](join,_0x17b01b,_0x590341[_0x482c42(0x18d)]),_0x96ce0b=_0x482c42(0x146);await writeFile(_0x36c92c,_0x96ce0b),console['log'](_0x590341[_0x482c42(0x122)]);}export async function ensureLocalEnv(_0x415296,_0x1314a3){const _0xa10e46=_0x4f7b4,_0xde9b3e={'lByln':function(_0x316779,_0x2d3eb3){return _0x316779!==_0x2d3eb3;},'jjkxg':'user','pTjko':'⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','lGXFk':function(_0x1389a7,_0x2cbb20){return _0x1389a7===_0x2cbb20;},'qabxg':function(_0x13872f){return _0x13872f();},'mdtAX':'local','hUWDz':'✓\x20Local\x20profile\x20already\x20exists','WepVE':'\x0a❌\x20Profile\x20setup\x20failed:','tPglW':function(_0x47fe6f,_0x18a253){return _0x47fe6f instanceof _0x18a253;}};if(!findGitRoot()&&_0xde9b3e[_0xa10e46(0x199)](_0x415296?.[_0xa10e46(0x17b)],_0xde9b3e['jjkxg']))return console['log'](_0xde9b3e[_0xa10e46(0x157)]),{'ready':![],'skipped':!![]};const _0x327195=_0xde9b3e['lGXFk'](_0x415296?.[_0xa10e46(0x17b)],_0xde9b3e[_0xa10e46(0x136)])?_0xde9b3e[_0xa10e46(0x18c)](getRangerHomeDir):undefined;if(findExistingEnv(_0xde9b3e[_0xa10e46(0x15f)],{'locations':[_0xde9b3e[_0xa10e46(0x15f)]],'rangerDir':_0x327195}))return console[_0xa10e46(0x159)](_0xde9b3e['hUWDz']),{'ready':!![],'skipped':![]};try{return await addEnv(_0xde9b3e['mdtAX'],{'url':_0x415296?.['url'],'force':_0x415296?.[_0xa10e46(0x13f)],'allowInsecureLocalhost':_0x415296?.['allowInsecureLocalhost'],'scope':_0x415296?.['scope']},_0x1314a3),{'ready':!![],'skipped':![]};}catch(_0x3a7d5a){return console['error'](_0xde9b3e['WepVE'],_0xde9b3e[_0xa10e46(0x198)](_0x3a7d5a,Error)?_0x3a7d5a['message']:_0x3a7d5a),{'ready':![],'skipped':![]};}}export async function start(_0x46d10b,_0x134ee4,_0x32022e){const _0x183c78=_0x4f7b4,_0x9dc630={'tkgkK':'\x0a🚀\x20Ranger\x20Setup\x0a','PXPMc':function(_0x21638a,_0x4e1a2e){return _0x21638a!==_0x4e1a2e;},'fhFQg':function(_0x4b7182,_0x542aba){return _0x4b7182!==_0x542aba;},'UORpI':_0x183c78(0x155),'ByEvp':function(_0x513d42,_0x3d183a){return _0x513d42(_0x3d183a);},'aFeNv':function(_0x51c2c7,_0x481501){return _0x51c2c7(_0x481501);},'aHSPO':_0x183c78(0x169),'vnHZo':_0x183c78(0x173),'MGGHS':_0x183c78(0x149),'CWYcr':function(_0x383732,_0x694036){return _0x383732(_0x694036);},'uJQFs':_0x183c78(0x133),'YvGRv':function(_0x2093e2,_0x123c23){return _0x2093e2&&_0x123c23;},'LoutQ':_0x183c78(0x13c),'yGNjD':_0x183c78(0x183),'xKmFZ':function(_0x2ef58a){return _0x2ef58a();},'grgAe':'\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','FKxNn':_0x183c78(0x19a),'kFQiO':function(_0x19fcf6,_0x2a92d9){return _0x19fcf6+_0x2a92d9;},'cyloz':function(_0x180a92,_0x3d0270){return _0x180a92(_0x3d0270);},'sQqoz':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','DRGyq':_0x183c78(0x17c),'gtCFH':_0x183c78(0x171)};console['log'](_0x9dc630['tkgkK']);_0x9dc630['PXPMc'](_0x134ee4?.[_0x183c78(0x17b)],undefined)&&_0x9dc630[_0x183c78(0x14d)](_0x134ee4[_0x183c78(0x17b)],_0x9dc630[_0x183c78(0x17e)])&&(console['error']('ranger\x20setup\x20--scope='+_0x9dc630['ByEvp'](String,_0x134ee4['scope'])+_0x183c78(0x140)+'Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20'+_0x183c78(0x18e)),process['exit'](0x1));_0x134ee4={..._0x134ee4,'scope':_0x9dc630[_0x183c78(0x17e)]};const _0x2839d1=!_0x9dc630['aFeNv'](existsSync,getRangerHomeDir());await ensureRangerDir(_0x183c78(0x155));if(_0x134ee4?.[_0x183c78(0x161)])console['log']('✓\x20Skipping\x20authentication\x20(--skip-auth)'),_0x32022e?.[_0x183c78(0x174)]('auth',{'isFirstRun':_0x2839d1,'method':_0x183c78(0x167)});else{_0x32022e?.['trackPhaseStart'](_0x9dc630[_0x183c78(0x193)]);const _0x12a5b2=await authenticate(_0x46d10b);_0x32022e?.['trackPhaseEnd'](_0x9dc630['aHSPO'],{'isFirstRun':_0x2839d1,'method':_0x12a5b2[_0x183c78(0x197)]});}_0x32022e?.[_0x183c78(0x190)](_0x183c78(0x15d));_0x134ee4?.[_0x183c78(0x192)]?console['log'](_0x9dc630[_0x183c78(0x188)]):await _0x9dc630['ByEvp'](ensureChromium,_0x134ee4?.[_0x183c78(0x16e)]);_0x32022e?.['trackPhaseEnd'](_0x183c78(0x15d),{'isFirstRun':_0x2839d1,'skipped':!!_0x134ee4?.['skipChromium']}),console[_0x183c78(0x159)](_0x9dc630['MGGHS']);const _0x556182=_0x134ee4?.['scope'],_0x1d2012=_0x134ee4?.[_0x183c78(0x18a)]??![];let _0x217b2b=null;_0x1d2012?(_0x32022e?.[_0x183c78(0x190)]('plugin'),_0x217b2b=await _0x9dc630['CWYcr'](ensureOpencodePluginConfig,_0x556182),_0x32022e?.[_0x183c78(0x174)](_0x9dc630['uJQFs'],{'isFirstRun':_0x2839d1,'opencode':!![]})):(_0x32022e?.['trackPhaseStart'](_0x9dc630['uJQFs']),await ensureClaudePlugin(_0x556182),_0x32022e?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x2839d1}));if(_0x9dc630[_0x183c78(0x179)](_0x1d2012,_0x217b2b)){_0x32022e?.[_0x183c78(0x190)](_0x9dc630[_0x183c78(0x14e)]);try{await installSkill(_0x9dc630[_0x183c78(0x129)],{'level':_0x217b2b['scope'],'cliVersion':_0x9dc630['xKmFZ'](getCurrentVersion),'platform':'opencode'}),_0x32022e?.['trackPhaseEnd'](_0x9dc630['LoutQ'],{'isFirstRun':_0x2839d1,'opencode':!![]});}catch(_0x51b2ea){console[_0x183c78(0x16a)](_0x9dc630[_0x183c78(0x138)],_0x51b2ea instanceof Error?_0x51b2ea['message']:_0x51b2ea),_0x32022e?.['trackPhaseEnd'](_0x9dc630[_0x183c78(0x14e)],{'isFirstRun':_0x2839d1,'opencode':!![],'failed':!![]});}}else _0x32022e?.['trackPhaseStart'](_0x9dc630['LoutQ']),await _0x9dc630['ByEvp'](ensureClaudeSkills,_0x556182),_0x32022e?.[_0x183c78(0x174)](_0x9dc630[_0x183c78(0x14e)],{'isFirstRun':_0x2839d1});if(_0x134ee4?.['skipAuth'])console[_0x183c78(0x159)](_0x183c78(0x12c));else{if(_0x134ee4?.[_0x183c78(0x15c)]){_0x32022e?.[_0x183c78(0x190)](_0x183c78(0x19a));const _0x44e07b=await ensureLocalEnv({'url':_0x134ee4['url'],'force':_0x134ee4?.['force'],'allowInsecureLocalhost':_0x134ee4?.['allowInsecureLocalhost'],'scope':_0x183c78(0x155)},_0x32022e);_0x32022e?.['trackPhaseEnd'](_0x9dc630['FKxNn'],{'isFirstRun':_0x2839d1,'profileReady':_0x44e07b[_0x183c78(0x14c)],'userSkipped':_0x44e07b[_0x183c78(0x167)]});}else console[_0x183c78(0x159)](_0x9dc630['kFQiO'](_0x9dc630[_0x183c78(0x19b)]('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+('\x0a\x20\x20'+_0x9dc630[_0x183c78(0x196)](bold,'ranger\x20profile\x20add\x20<name>')),'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)'),'\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:')+_0x183c78(0x152));}if(_0x1d2012)console[_0x183c78(0x159)](_0x9dc630[_0x183c78(0x156)]),console['log'](_0x9dc630['DRGyq']),console[_0x183c78(0x159)]('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console[_0x183c78(0x159)](_0x9dc630['gtCFH']);else{const _0x3af7b5=bold('/ranger:enable');console[_0x183c78(0x159)](_0x9dc630[_0x183c78(0x19b)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x3af7b5+_0x183c78(0x13b)+_0x183c78(0x128),_0x183c78(0x131))+_0x183c78(0x13a));}}
@@ -1 +1 @@
1
- const _0x76efdf=_0x7174;(function(_0x953d5a,_0xddeb7c){const _0x37cf6f=_0x7174,_0x433bb9=_0x953d5a();while(!![]){try{const _0x148422=-parseInt(_0x37cf6f(0x100))/0x1+parseInt(_0x37cf6f(0xdb))/0x2+-parseInt(_0x37cf6f(0xf5))/0x3*(parseInt(_0x37cf6f(0xae))/0x4)+parseInt(_0x37cf6f(0x92))/0x5+-parseInt(_0x37cf6f(0x102))/0x6*(parseInt(_0x37cf6f(0xf8))/0x7)+parseInt(_0x37cf6f(0x106))/0x8+-parseInt(_0x37cf6f(0x98))/0x9;if(_0x148422===_0xddeb7c)break;else _0x433bb9['push'](_0x433bb9['shift']());}catch(_0x1cdb63){_0x433bb9['push'](_0x433bb9['shift']());}}}(_0x2e21,0x667f9));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';function _0x7174(_0x2b3f66,_0x41db2a){_0x2b3f66=_0x2b3f66-0x90;const _0x2e21a1=_0x2e21();let _0x71749e=_0x2e21a1[_0x2b3f66];return _0x71749e;}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';function _0x2e21(){const _0x2db2a2=['plaintext','145250RnXiAA','settingsPath','12MvVQze','ahySq','\x20cloud','version','4648048pcIgLk','MxzOn','LtAAz','details','utf-8','147320PStCXO','DEBUG','@ranger-testing/opencode-plugin','ejGMT','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','has','2807748CoZNcg','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','\x1b]8;;\x07','rlEEV','\x1b[1m','includes','xqznc','not_installed','\x0a---\x20Profiles\x20---','VwRIX','CUroS','toString','log','No\x20skills\x20installed','sessionUpdatedAt',':\x20installed\x20(','KXZZh','SKILL.md','none','\x20(up\x20to\x20date)','jzBkf','VjrmO','292zGzBkn','parse','\x20\x20Run:\x20ranger\x20update','WyCvy','join','\x20\x20User-level:','ignore',':\x20configured','RRBMu','\x20\x20\x20\x20Settings:\x20','\x20plugin(s)\x20configured','zxojj','unknown','match','\x0a\x20\x20No\x20active\x20profile\x20set','IjBAL','length','dBuAf','ranger@trailhead','stdout','\x20\x20\x20\x20','hasPlaintextAuth','data','Root:\x20','configured','opencode','\x0a---\x20Claude\x20Code\x20Plugin\x20---','ETLEU','isActive','Organization:\x20','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','isArray','\x0a---\x20OpenCode\x20Plugin\x20---','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','JnAZS','filter','not_configured','scope','vvJnd','\x1b]8;;file://','\x0a---\x20Skills\x20---','TAPCf','XqGGR','DcajM','PodDO','1323012rynncm','API\x20Environment:\x20','\x20(latest:\x20','rPgYS','udhJv','\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)','some','NptYm','name','CLAvj','status','\x20\x20Project-level:','AVRQH','config','push','map','\x20\x20Run:\x20ranger\x20setup\x20[token]','close','TRsoz','\x20[cloud]','disabled','UlDMb','pXhsx','path','wBzum','\x20profiles\x20configured\x20(','13557dnVNjQ','\x20\x20\x20\x20Session:\x20','Version:\x20','227619xuNleE','stderr','user','pnprT','pnhqO','\x20[local]','\x20local'];_0x2e21=function(){return _0x2db2a2;};return _0x2e21();}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=_0x3fa993=>_0x76efdf(0x9c)+_0x3fa993+'\x1b[0m',link=(_0x55a8a9,_0x2e1021)=>_0x76efdf(0xd5)+_0x55a8a9+'\x07'+(_0x2e1021||_0x55a8a9)+_0x76efdf(0x9a);async function getOpencodePluginStatus(){const _0x18246b=_0x76efdf,_0x9cb14f={'PzrjF':function(_0x3009fb,_0xa9ec7a){return _0x3009fb(_0xa9ec7a);},'WyCvy':'not_installed','ImjpO':_0x18246b(0xe8),'DjUUl':'pipe','PodDO':_0x18246b(0xc4),'CLAvj':'error'};return new Promise(_0x272711=>{const _0x2d812d=_0x18246b,_0xa45b31={'HpvyF':function(_0x23d159,_0x569efa){return _0x23d159!==_0x569efa;},'sFywU':function(_0x5f116b,_0x2d8fcb){return _0x5f116b(_0x2d8fcb);},'ejGMT':function(_0x1c008a,_0x1e9d38){return _0x1c008a>_0x1e9d38;},'jzBkf':'not_configured','IjBAL':function(_0x3f7a92,_0x42a8a6){return _0x3f7a92(_0x42a8a6);}},_0x17752b=spawn(_0x2d812d(0xc7),['debug',_0x9cb14f['ImjpO']],{'stdio':[_0x2d812d(0xb4),_0x9cb14f['DjUUl'],_0x9cb14f['DjUUl']]});let _0x5e52e5='';_0x17752b[_0x2d812d(0xc1)]?.['on'](_0x2d812d(0xc4),_0x4e7145=>{_0x5e52e5+=_0x4e7145['toString']();}),_0x17752b[_0x2d812d(0xf9)]?.['on'](_0x9cb14f[_0x2d812d(0xda)],_0x453ef9=>{const _0x187594=_0x2d812d;_0x5e52e5+=_0x453ef9[_0x187594(0xa3)]();}),_0x17752b['on'](_0x9cb14f[_0x2d812d(0xe4)],()=>{const _0x468368=_0x2d812d;_0x9cb14f['PzrjF'](_0x272711,{'status':_0x9cb14f[_0x468368(0xb1)]});}),_0x17752b['on'](_0x2d812d(0xec),_0x2fd30d=>{const _0x54dcb7=_0x2d812d;if(_0x2fd30d!==0x0){_0xa45b31['sFywU'](_0x272711,{'status':_0x54dcb7(0x9f)});return;}const _0x85c930=_0x5e52e5['trim']();let _0x25e36a=null;if(_0x85c930)try{_0x25e36a=JSON['parse'](_0x85c930);}catch{const _0x4d37b4=_0x85c930[_0x54dcb7(0xbb)](/\{[\s\S]*\}$/);if(_0x4d37b4)try{_0x25e36a=JSON[_0x54dcb7(0xaf)](_0x4d37b4[0x0]);}catch{_0x25e36a=null;}}const _0x1fd20e=Array[_0x54dcb7(0xcd)](_0x25e36a?.['plugin'])?_0x25e36a?.['plugin']:[],_0x295439=_0x1fd20e[_0x54dcb7(0xe1)](_0xa1aa52=>{const _0x5abfe2=_0x54dcb7;if(_0xa45b31['HpvyF'](typeof _0xa1aa52,'string'))return![];return _0xa1aa52['includes'](_0x5abfe2(0x94))||_0xa1aa52[_0x5abfe2(0x9d)]('opencode-plugin');});if(_0x295439){_0x272711({'status':'configured','details':_0x1fd20e['length']>0x0?_0x1fd20e[_0x54dcb7(0xbe)]+_0x54dcb7(0xb8):undefined});return;}if(_0xa45b31[_0x54dcb7(0x95)](_0x1fd20e[_0x54dcb7(0xbe)],0x0)){_0x272711({'status':_0xa45b31[_0x54dcb7(0xac)],'details':_0x1fd20e[_0x54dcb7(0xbe)]+'\x20plugin(s)\x20configured'});return;}_0xa45b31[_0x54dcb7(0xbd)](_0x272711,{'status':_0x54dcb7(0xd2)});});});}async function getSkillsFromDir(_0x28ce86,_0x1ba690){const _0x19c6ce=_0x76efdf,_0x3a1c18={'rlEEV':function(_0x5ab34a,_0x2e0ec6,_0x552a3f){return _0x5ab34a(_0x2e0ec6,_0x552a3f);},'GWARo':_0x19c6ce(0xa9),'BQcnL':function(_0x43e4b0,_0x46a37e){return _0x43e4b0(_0x46a37e);},'blbmz':_0x19c6ce(0x91)};if(!existsSync(_0x28ce86))return[];const _0x50420f=[];try{const _0x4e3f9e=await _0x3a1c18[_0x19c6ce(0x9b)](readdir,_0x28ce86,{'withFileTypes':!![]});for(const _0x527598 of _0x4e3f9e){if(_0x527598['isDirectory']()){const _0x4b5eaf=join(_0x28ce86,_0x527598['name'],_0x3a1c18['GWARo']);if(_0x3a1c18['BQcnL'](existsSync,_0x4b5eaf)){let _0x44da6f=_0x527598[_0x19c6ce(0xe3)];try{const _0xe4e69d=await _0x3a1c18[_0x19c6ce(0x9b)](readFile,_0x4b5eaf,_0x3a1c18['blbmz']),_0x13f5b9=_0xe4e69d[_0x19c6ce(0xbb)](/name:\s*(.+)/);_0x13f5b9&&(_0x44da6f=_0x13f5b9[0x1]['trim']());}catch{}_0x50420f[_0x19c6ce(0xe9)]({'name':_0x527598[_0x19c6ce(0xe3)],'displayName':_0x44da6f,'path':_0x4b5eaf,'level':_0x1ba690});}}}}catch{return[];}return _0x50420f;}async function getInstalledSkills(){const _0x53c46e=_0x76efdf,_0x52e195={'CUroS':function(_0x4ecc50,_0x3119ac,_0x533ad7){return _0x4ecc50(_0x3119ac,_0x533ad7);},'ahySq':function(_0x3a83b9){return _0x3a83b9();},'LtAAz':'project'},[_0xcae550,_0x3625e2]=await Promise['all']([_0x52e195[_0x53c46e(0xa2)](getSkillsFromDir,_0x52e195[_0x53c46e(0x103)](getProjectSkillsDir),_0x52e195[_0x53c46e(0x108)]),_0x52e195['CUroS'](getSkillsFromDir,getUserSkillsDir(),_0x53c46e(0xfa))]);return{'project':_0xcae550,'user':_0x3625e2};}async function getEnvironments(){const _0x5e5f07=_0x76efdf,_0x4d43d5={'pnprT':function(_0x154cbd,_0x599de4,_0x36eded){return _0x154cbd(_0x599de4,_0x36eded);},'KXZZh':'settings.json','dBuAf':'auth.json','RVFkB':'(not\x20found)','TRsoz':function(_0x439058,_0x237136){return _0x439058(_0x237136);},'DcajM':function(_0x4d88d0,_0xacf004){return _0x4d88d0===_0xacf004;},'TAPCf':function(_0x49f056){return _0x49f056();}},{envNames:_0x512a37,activeEnv:_0x2f8c39}=await getEnvNames(),_0x1a9c04=_0x4d43d5[_0x5e5f07(0xd7)](getRangerDir);if(!_0x4d43d5[_0x5e5f07(0xed)](existsSync,_0x1a9c04))return{'envs':[],'activeEnv':null};const _0x15f659=_0x512a37['map'](_0x320c82=>{const _0x3fbe18=_0x5e5f07,_0x1e53cb=getEnvDir(_0x320c82),_0x139712=_0x4d43d5[_0x3fbe18(0xfb)](join,_0x1e53cb,_0x4d43d5[_0x3fbe18(0xa8)]),_0x2b176b=_0x4d43d5['pnprT'](join,_0x1e53cb,_0x4d43d5[_0x3fbe18(0xbf)]),_0x372c9f=join(_0x1e53cb,'auth.json.enc');return{'name':_0x320c82,'settingsPath':existsSync(_0x139712)?_0x139712:_0x4d43d5['RVFkB'],'hasPlaintextAuth':existsSync(_0x2b176b),'hasEncryptedAuth':_0x4d43d5[_0x3fbe18(0xed)](existsSync,_0x372c9f),'isActive':_0x4d43d5[_0x3fbe18(0xd9)](_0x320c82,_0x2f8c39)};});return{'envs':_0x15f659,'activeEnv':_0x2f8c39};}export async function status(){const _0x2533db=_0x76efdf,_0x8720eb={'VwRIX':'\x0a📊\x20Ranger\x20Status\x0a','vZCTh':function(_0x2e24f8){return _0x2e24f8();},'JnAZS':function(_0x55c252,_0x44241d,_0x218817){return _0x55c252(_0x44241d,_0x218817);},'ETLEU':function(_0x1fb366,_0x1bfca7,_0x44f474){return _0x1fb366(_0x1bfca7,_0x44f474);},'zxojj':function(_0x14a967,_0xf42ac4){return _0x14a967(_0xf42ac4);},'IZhxO':function(_0x961d62,_0x5f033a){return _0x961d62(_0x5f033a);},'xqznc':function(_0x4a4654){return _0x4a4654();},'udhJv':_0x2533db(0xce),'XqGGR':_0x2533db(0xc6),'pXhsx':function(_0x4bb9c0,_0x2f08e4){return _0x4bb9c0(_0x2f08e4);},'MxzOn':'\x20\x20Not\x20configured','UlDMb':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','qZZSd':_0x2533db(0xba),'rPgYS':_0x2533db(0xef),'pnhqO':function(_0x39d36e,_0x4f39ca){return _0x39d36e(_0x4f39ca);},'rGHfR':_0x2533db(0xa0),'VjrmO':function(_0x5b6d8c){return _0x5b6d8c();},'AVRQH':function(_0x37390d,_0x32a081){return _0x37390d+_0x32a081;},'vvJnd':'No\x20profiles\x20configured','HEPFq':function(_0x351431,_0x11782d){return _0x351431===_0x11782d;},'wBzum':'\x20(active)','RRBMu':'no\x20session','YnzBA':'encrypted','NptYm':_0x2533db(0xaa)};console['log'](_0x8720eb[_0x2533db(0xa1)]);const _0x3f30fc=process['cwd'](),_0x545e69=_0x8720eb['vZCTh'](getRangerDir);if(!existsSync(_0x545e69)){console['log'](_0x2533db(0xc5)+_0x8720eb['JnAZS'](link,_0x3f30fc,bold(basename(_0x3f30fc)))),console['log']('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x2533db(0xa4)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x2533db(0xa4)]('Root:\x20'+_0x8720eb[_0x2533db(0xc9)](link,_0x3f30fc,bold(basename(_0x3f30fc))));const _0x2b6c15=getCurrentVersion(),_0x39c0d6=getLatestVersion();if(_0x39c0d6['version']&&_0x39c0d6[_0x2533db(0x105)]!==_0x2b6c15)console[_0x2533db(0xa4)]('Version:\x20'+_0x2b6c15+_0x2533db(0xdd)+_0x39c0d6['version']+')'),console['log'](_0x2533db(0xb0));else _0x39c0d6[_0x2533db(0x105)]?console['log']('Version:\x20'+_0x2b6c15+_0x2533db(0xab)):console['log'](_0x2533db(0xf7)+_0x2b6c15);const _0x17c330=await getToken();if(_0x17c330){const _0x4a6272=await _0x8720eb[_0x2533db(0xb9)](getCurrentUser,_0x17c330);_0x4a6272['success']?console[_0x2533db(0xa4)](_0x2533db(0xcb)+_0x8720eb['IZhxO'](bold,_0x4a6272['user']['organizationName'])):(console[_0x2533db(0xa4)](_0x2533db(0xcf)),console['log'](_0x2533db(0xeb)));}else console[_0x2533db(0xa4)]('API\x20Token:\x20✗\x20Not\x20found'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env'][_0x2533db(0x93)]&&(console[_0x2533db(0xa4)](_0x2533db(0xdc)+_0x8720eb['xqznc'](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+getApiBaseUrl()));console[_0x2533db(0xa4)](_0x8720eb[_0x2533db(0xdf)]);const _0x72aa85=await getOpencodePluginStatus();if(_0x72aa85[_0x2533db(0xe5)]===_0x8720eb[_0x2533db(0xd8)])console[_0x2533db(0xa4)]('\x20\x20'+_0x8720eb[_0x2533db(0xf1)](bold,'@ranger-testing/opencode-plugin')+_0x2533db(0xb5)),_0x72aa85['details']&&console[_0x2533db(0xa4)]('\x20\x20'+_0x72aa85[_0x2533db(0x90)]);else _0x72aa85[_0x2533db(0xe5)]==='not_configured'?(console[_0x2533db(0xa4)](_0x8720eb[_0x2533db(0x107)]),_0x72aa85['details']&&console['log']('\x20\x20'+_0x72aa85['details']),console['log']('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console[_0x2533db(0xa4)](_0x8720eb[_0x2533db(0xf0)]);console['log'](_0x2533db(0xc8));const _0x1115ce=await _0x8720eb[_0x2533db(0xb9)](getPluginInfo,'ranger@trailhead');if(_0x1115ce){const _0x103fc5=_0x1115ce[_0x2533db(0xd3)]||_0x8720eb['qZZSd'],_0x386afa=_0x1115ce['enabled']?'enabled':_0x8720eb[_0x2533db(0xde)];console[_0x2533db(0xa4)]('\x20\x20'+_0x8720eb['IZhxO'](bold,_0x2533db(0xc0))+_0x2533db(0xa7)+_0x103fc5+',\x20'+_0x386afa+')');}else console['log']('\x20\x20Not\x20installed'),console[_0x2533db(0xa4)](_0x2533db(0x96));console[_0x2533db(0xa4)](_0x2533db(0xd6));const {project:_0x139dcf,user:_0x5c56e3}=await getInstalledSkills(),_0x3187ff=_0x139dcf[_0x2533db(0xd1)](_0x492019=>RANGER_MANAGED_SKILLS['includes'](_0x492019['name'])),_0x5f396a=_0x5c56e3['filter'](_0x37b6b6=>RANGER_MANAGED_SKILLS[_0x2533db(0x9d)](_0x37b6b6['name'])),_0x2fc8a1=_0x3187ff['length']+_0x5f396a[_0x2533db(0xbe)];if(_0x2fc8a1===0x0)console['log'](_0x2533db(0xa5)),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x3187ff['length']>0x0){console[_0x2533db(0xa4)](_0x2533db(0xe6));for(const _0x2f28e1 of _0x3187ff){console[_0x2533db(0xa4)](_0x2533db(0xc2)+bold(_0x2f28e1['displayName'])+':\x20'+link(_0x2f28e1[_0x2533db(0xf2)],basename(_0x2f28e1['path'])));}}if(_0x5f396a['length']>0x0){console['log'](_0x2533db(0xb3));for(const _0x22b5f0 of _0x5f396a){console['log']('\x20\x20\x20\x20'+_0x8720eb['zxojj'](bold,_0x22b5f0['displayName'])+':\x20'+_0x8720eb[_0x2533db(0xd0)](link,_0x22b5f0['path'],_0x8720eb[_0x2533db(0xfc)](basename,_0x22b5f0['path'])));}}}console[_0x2533db(0xa4)](_0x8720eb['rGHfR']);const {envs:_0xa45747,activeEnv:_0xf53866}=await _0x8720eb[_0x2533db(0x9e)](getEnvironments);let _0x3700e8=[];if(_0x17c330)try{_0x3700e8=await _0x8720eb[_0x2533db(0xad)](listCloudProfiles);}catch{}const _0x3211a0=_0x8720eb[_0x2533db(0xe7)](_0xa45747['length'],_0x3700e8[_0x2533db(0xbe)]);if(_0x3211a0===0x0)console['log'](_0x8720eb[_0x2533db(0xd4)]),console['log'](_0x2533db(0xcc));else{if(_0x3211a0>0x5){const _0x25beb0=[];_0x3700e8['length']>0x0&&_0x25beb0[_0x2533db(0xe9)](_0x3700e8[_0x2533db(0xbe)]+_0x2533db(0x104)),_0xa45747[_0x2533db(0xbe)]>0x0&&_0x25beb0['push'](_0xa45747['length']+_0x2533db(0xfe)),console[_0x2533db(0xa4)](_0x3211a0+_0x2533db(0xf4)+_0x25beb0['join'](',\x20')+')'),_0xf53866&&console[_0x2533db(0xa4)]('\x20\x20Active:\x20'+_0x8720eb[_0x2533db(0xb9)](bold,_0xf53866)),console[_0x2533db(0xa4)](_0x2533db(0xe0));}else{for(const _0x25089e of _0x3700e8){const _0x2ce4b8=_0x8720eb['HEPFq'](_0x25089e['name'],_0xf53866)?_0x8720eb[_0x2533db(0xf3)]:'';console[_0x2533db(0xa4)]('\x20\x20'+bold(_0x25089e['name'])+_0x2533db(0xee)+_0x2ce4b8);const _0x5ac1ed=_0x25089e['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x25089e[_0x2533db(0xa6)]+')':_0x8720eb[_0x2533db(0xb6)];console[_0x2533db(0xa4)](_0x2533db(0xf6)+_0x5ac1ed);}const _0x37b588=new Set(_0x3700e8[_0x2533db(0xea)](_0x5c8911=>_0x5c8911[_0x2533db(0xe3)]));for(const _0x376b38 of _0xa45747){if(_0x37b588['has'](_0x376b38['name']))continue;const _0x4de4e1=_0x376b38[_0x2533db(0xca)]?_0x8720eb[_0x2533db(0xf3)]:'',_0x19280d=_0x376b38['hasEncryptedAuth']?_0x8720eb['YnzBA']:_0x376b38[_0x2533db(0xc3)]?_0x2533db(0xff):_0x8720eb[_0x2533db(0xe2)];console[_0x2533db(0xa4)]('\x20\x20'+bold(_0x376b38[_0x2533db(0xe3)])+_0x2533db(0xfd)+_0x4de4e1),console[_0x2533db(0xa4)]('\x20\x20\x20\x20Auth:\x20'+_0x19280d),_0x376b38['settingsPath']!=='(not\x20found)'&&console['log'](_0x2533db(0xb7)+link(_0x376b38['settingsPath'],basename(_0x376b38[_0x2533db(0x101)])));}if(!_0xf53866){console['log'](_0x2533db(0xbc));const _0x51bed8=[..._0x3700e8['map'](_0x888873=>_0x888873[_0x2533db(0xe3)]),..._0xa45747['filter'](_0x50c91e=>!_0x37b588[_0x2533db(0x97)](_0x50c91e[_0x2533db(0xe3)]))['map'](_0x57d54c=>_0x57d54c[_0x2533db(0xe3)])];console['log'](_0x2533db(0x99)+_0x51bed8[_0x2533db(0xb2)](',\x20')+')');}}}console['log']('');}
1
+ const _0x524bc4=_0xb715;(function(_0x17cb00,_0x282fb2){const _0x2213e4=_0xb715,_0x204856=_0x17cb00();while(!![]){try{const _0x27a216=-parseInt(_0x2213e4(0x1bd))/0x1+-parseInt(_0x2213e4(0x1ec))/0x2*(-parseInt(_0x2213e4(0x1af))/0x3)+-parseInt(_0x2213e4(0x1d1))/0x4+-parseInt(_0x2213e4(0x1f6))/0x5*(-parseInt(_0x2213e4(0x1ef))/0x6)+parseInt(_0x2213e4(0x1a5))/0x7+parseInt(_0x2213e4(0x1e3))/0x8+parseInt(_0x2213e4(0x1d0))/0x9*(parseInt(_0x2213e4(0x18f))/0xa);if(_0x27a216===_0x282fb2)break;else _0x204856['push'](_0x204856['shift']());}catch(_0x28961a){_0x204856['push'](_0x204856['shift']());}}}(_0x3340,0x8653f));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';function _0xb715(_0x395b77,_0x346c3d){_0x395b77=_0x395b77-0x18f;const _0x33400f=_0x3340();let _0xb71558=_0x33400f[_0x395b77];return _0xb71558;}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=_0x4a683d=>'\x1b[1m'+_0x4a683d+'\x1b[0m',link=(_0x3fc319,_0x59f0a2)=>_0x524bc4(0x195)+_0x3fc319+'\x07'+(_0x59f0a2||_0x3fc319)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x2bfd6d=_0x524bc4,_0x443de4={'ZDmwV':function(_0x2cb362,_0x3e9373){return _0x2cb362!==_0x3e9373;},'SQSjv':function(_0xf669de,_0x17a9a1){return _0xf669de(_0x17a9a1);},'NeKjU':_0x2bfd6d(0x1b1),'OwqmV':'configured','zopOf':function(_0x11523e,_0x30af91){return _0x11523e>_0x30af91;},'GQjIf':function(_0xbd12ad,_0x45a30b){return _0xbd12ad>_0x45a30b;},'LPhCa':_0x2bfd6d(0x191),'FVRcZ':function(_0x178225,_0x37df23){return _0x178225(_0x37df23);},'KKIaw':'string','wyNlN':function(_0x1f088a,_0x478c3f,_0x4df383,_0x3fa7aa){return _0x1f088a(_0x478c3f,_0x4df383,_0x3fa7aa);},'LqlIq':'debug','WfjVP':_0x2bfd6d(0x1b9),'Nywam':'close'};return new Promise(_0x450590=>{const _0x59cb43=_0x2bfd6d,_0x1274e9={'IfAPO':function(_0x4b497e,_0x527bd9){return _0x443de4['FVRcZ'](_0x4b497e,_0x527bd9);},'dCyYz':_0x443de4['NeKjU'],'YIvDO':function(_0x546036,_0x2c2ffa){return _0x546036!==_0x2c2ffa;},'brYDz':_0x443de4[_0x59cb43(0x1b7)],'BJsHS':'opencode-plugin'},_0x353826=_0x443de4[_0x59cb43(0x1a1)](spawn,'opencode',[_0x443de4['LqlIq'],_0x59cb43(0x198)],{'stdio':['ignore','pipe','pipe']});let _0x1d00c3='';_0x353826['stdout']?.['on'](_0x443de4[_0x59cb43(0x19f)],_0x54c05d=>{_0x1d00c3+=_0x54c05d['toString']();}),_0x353826[_0x59cb43(0x19d)]?.['on'](_0x443de4['WfjVP'],_0x13d8cc=>{const _0xa964b=_0x59cb43;_0x1d00c3+=_0x13d8cc[_0xa964b(0x193)]();}),_0x353826['on'](_0x59cb43(0x1a0),()=>{const _0x1a43df=_0x59cb43;_0x1274e9['IfAPO'](_0x450590,{'status':_0x1274e9[_0x1a43df(0x1d3)]});}),_0x353826['on'](_0x443de4['Nywam'],_0x417bea=>{const _0x8367d6=_0x59cb43;if(_0x443de4['ZDmwV'](_0x417bea,0x0)){_0x443de4['SQSjv'](_0x450590,{'status':_0x443de4['NeKjU']});return;}const _0x3776ea=_0x1d00c3[_0x8367d6(0x1db)]();let _0x452eaa=null;if(_0x3776ea)try{_0x452eaa=JSON['parse'](_0x3776ea);}catch{const _0x4e9eb3=_0x3776ea['match'](/\{[\s\S]*\}$/);if(_0x4e9eb3)try{_0x452eaa=JSON['parse'](_0x4e9eb3[0x0]);}catch{_0x452eaa=null;}}const _0x553c40=Array['isArray'](_0x452eaa?.[_0x8367d6(0x1da)])?_0x452eaa?.['plugin']:[],_0x49dd6f=_0x553c40[_0x8367d6(0x1e1)](_0x23f4de=>{const _0x53906e=_0x8367d6;if(_0x1274e9['YIvDO'](typeof _0x23f4de,_0x1274e9[_0x53906e(0x1e0)]))return![];return _0x23f4de['includes'](_0x53906e(0x1a4))||_0x23f4de['includes'](_0x1274e9[_0x53906e(0x1e4)]);});if(_0x49dd6f){_0x443de4['SQSjv'](_0x450590,{'status':_0x443de4['OwqmV'],'details':_0x443de4[_0x8367d6(0x1f0)](_0x553c40[_0x8367d6(0x1f5)],0x0)?_0x553c40[_0x8367d6(0x1f5)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0x443de4[_0x8367d6(0x1c8)](_0x553c40[_0x8367d6(0x1f5)],0x0)){_0x450590({'status':_0x443de4['LPhCa'],'details':_0x553c40[_0x8367d6(0x1f5)]+'\x20plugin(s)\x20configured'});return;}_0x450590({'status':_0x443de4['LPhCa']});});});}async function getSkillsFromDir(_0x5a0176,_0x1d217b){const _0x2676df=_0x524bc4,_0x114de1={'PlLjt':function(_0x54fb65,_0x4f760b){return _0x54fb65(_0x4f760b);},'GDAtu':_0x2676df(0x1a7)};if(!_0x114de1[_0x2676df(0x1ae)](existsSync,_0x5a0176))return[];const _0x3a927d=[];try{const _0x505c84=await readdir(_0x5a0176,{'withFileTypes':!![]});for(const _0x17359a of _0x505c84){if(_0x17359a['isDirectory']()){const _0x266ec5=join(_0x5a0176,_0x17359a['name'],'SKILL.md');if(existsSync(_0x266ec5)){let _0xdec34d=_0x17359a['name'];try{const _0x278041=await readFile(_0x266ec5,_0x114de1['GDAtu']),_0x4e4db9=_0x278041[_0x2676df(0x1d5)](/name:\s*(.+)/);_0x4e4db9&&(_0xdec34d=_0x4e4db9[0x1][_0x2676df(0x1db)]());}catch{}_0x3a927d['push']({'name':_0x17359a[_0x2676df(0x1e2)],'displayName':_0xdec34d,'path':_0x266ec5,'level':_0x1d217b});}}}}catch{return[];}return _0x3a927d;}async function getInstalledSkills(){const _0x45cc90=_0x524bc4,_0x53f54e={'afzXm':function(_0xe387a1,_0x533abc,_0x53fabb){return _0xe387a1(_0x533abc,_0x53fabb);},'nheuQ':function(_0x4f6092){return _0x4f6092();}},[_0x418cb1,_0x283949]=await Promise['all']([_0x53f54e[_0x45cc90(0x1de)](getSkillsFromDir,_0x53f54e[_0x45cc90(0x1dd)](getProjectSkillsDir),'project'),getSkillsFromDir(getUserSkillsDir(),_0x45cc90(0x1cc))]);return{'project':_0x418cb1,'user':_0x283949};}async function getEnvironments(){const _0x413436=_0x524bc4,_0x3dba93={'QiFTH':function(_0x53efdb,_0xec1d3b){return _0x53efdb(_0xec1d3b);},'Ogmjh':function(_0x2a9b7c,_0x3712cd,_0x10f325){return _0x2a9b7c(_0x3712cd,_0x10f325);},'lfbxa':function(_0x4c137e){return _0x4c137e();},'ZvrTK':function(_0x2b455e,_0x4c121b){return _0x2b455e(_0x4c121b);}},{envNames:_0x369797,activeEnv:_0x3a0b3f}=await _0x3dba93[_0x413436(0x1ce)](getEnvNames),_0x550c33=getRangerDir();if(!_0x3dba93['ZvrTK'](existsSync,_0x550c33))return{'envs':[],'activeEnv':null};const _0x1f8c68=_0x369797[_0x413436(0x1c4)](_0x16d5a7=>{const _0x277d45=_0x413436,_0x2932a6=_0x3dba93[_0x277d45(0x1ab)](getEnvDir,_0x16d5a7),_0x49a9a4=_0x3dba93['Ogmjh'](join,_0x2932a6,_0x277d45(0x1a3)),_0x13b9f3=join(_0x2932a6,'auth.json'),_0x265c4b=join(_0x2932a6,'auth.json.enc');return{'name':_0x16d5a7,'settingsPath':existsSync(_0x49a9a4)?_0x49a9a4:_0x277d45(0x1c9),'hasPlaintextAuth':existsSync(_0x13b9f3),'hasEncryptedAuth':existsSync(_0x265c4b),'isActive':_0x16d5a7===_0x3a0b3f};});return{'envs':_0x1f8c68,'activeEnv':_0x3a0b3f};}export async function status(){const _0x571f8a=_0x524bc4,_0x2f813b={'vrleW':function(_0xc1ac57){return _0xc1ac57();},'RtjnZ':function(_0x2314a7,_0x321c37){return _0x2314a7(_0x321c37);},'xAFFz':function(_0x275acf,_0x342f18){return _0x275acf(_0x342f18);},'IsOME':function(_0x56b9cf,_0x5ad4e7){return _0x56b9cf!==_0x5ad4e7;},'Pcqdx':'\x0a---\x20OpenCode\x20Plugin\x20---','UnbrS':function(_0x582104){return _0x582104();},'MavNu':function(_0x55429e,_0x2f4a16){return _0x55429e===_0x2f4a16;},'OTJcs':'not_configured','sPSGO':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','MyCgK':_0x571f8a(0x190),'FwiYT':'ranger@trailhead','KNyiu':'\x20\x20Not\x20installed','SQSky':'\x0a---\x20Skills\x20---','WOiof':_0x571f8a(0x1b6),'kkIzh':function(_0x33a118,_0x1cc6f7){return _0x33a118>_0x1cc6f7;},'UjGOs':'\x20\x20User-level:','PjxbM':function(_0x561581,_0x12aa02,_0x3f211f){return _0x561581(_0x12aa02,_0x3f211f);},'nLEIL':function(_0x45e214){return _0x45e214();},'rqquV':function(_0xc0f030,_0x2ac6b9){return _0xc0f030+_0x2ac6b9;},'iheIo':'No\x20profiles\x20configured','SEUYX':function(_0x160dd7,_0x47b8e3){return _0x160dd7(_0x47b8e3);},'AjWMg':_0x571f8a(0x1f2),'MQUIX':_0x571f8a(0x1d8),'JRPxU':_0x571f8a(0x1c6),'JEcHT':_0x571f8a(0x1a6),'UZSDa':_0x571f8a(0x1c9)};console[_0x571f8a(0x1ca)]('\x0a📊\x20Ranger\x20Status\x0a');const _0x1292c7=process[_0x571f8a(0x1eb)](),_0x5166f6=_0x2f813b['vrleW'](getRangerDir);if(!existsSync(_0x5166f6)){console['log']('Root:\x20'+link(_0x1292c7,_0x2f813b[_0x571f8a(0x1cb)](bold,_0x2f813b[_0x571f8a(0x1cb)](basename,_0x1292c7)))),console[_0x571f8a(0x1ca)](_0x571f8a(0x19b)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log']('Root:\x20'+link(_0x1292c7,bold(_0x2f813b['xAFFz'](basename,_0x1292c7))));const _0x416e4e=_0x2f813b[_0x571f8a(0x19e)](getCurrentVersion),_0x1250cc=getLatestVersion();if(_0x1250cc[_0x571f8a(0x199)]&&_0x2f813b[_0x571f8a(0x1ac)](_0x1250cc['version'],_0x416e4e))console['log'](_0x571f8a(0x1e6)+_0x416e4e+'\x20(latest:\x20'+_0x1250cc[_0x571f8a(0x199)]+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x1250cc['version']?console['log']('Version:\x20'+_0x416e4e+_0x571f8a(0x194)):console[_0x571f8a(0x1ca)](_0x571f8a(0x1e6)+_0x416e4e);const _0x49e364=await getToken();if(_0x49e364){const _0x4f9566=await getCurrentUser(_0x49e364);_0x4f9566[_0x571f8a(0x1aa)]?console['log'](_0x571f8a(0x1b2)+_0x2f813b['xAFFz'](bold,_0x4f9566[_0x571f8a(0x1cc)][_0x571f8a(0x1b5)])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console['log'](_0x571f8a(0x19c)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x571f8a(0x1f1)][_0x571f8a(0x1b0)]&&(console['log']('API\x20Environment:\x20'+_0x2f813b['vrleW'](getCurrentEnvironment)),console[_0x571f8a(0x1ca)]('API\x20URL:\x20'+getApiBaseUrl()));console['log'](_0x2f813b['Pcqdx']);const _0x1da32f=await _0x2f813b[_0x571f8a(0x1b4)](getOpencodePluginStatus);if(_0x2f813b[_0x571f8a(0x1d4)](_0x1da32f[_0x571f8a(0x197)],_0x571f8a(0x1e5)))console[_0x571f8a(0x1ca)]('\x20\x20'+bold(_0x571f8a(0x1a4))+_0x571f8a(0x1f4)),_0x1da32f[_0x571f8a(0x1d2)]&&console['log']('\x20\x20'+_0x1da32f['details']);else _0x1da32f['status']===_0x2f813b[_0x571f8a(0x1bc)]?(console['log'](_0x571f8a(0x1a2)),_0x1da32f[_0x571f8a(0x1d2)]&&console['log']('\x20\x20'+_0x1da32f['details']),console['log'](_0x571f8a(0x1d6))):console['log'](_0x2f813b[_0x571f8a(0x192)]);console['log'](_0x2f813b[_0x571f8a(0x1cd)]);const _0x326953=await _0x2f813b['xAFFz'](getPluginInfo,_0x2f813b[_0x571f8a(0x1c2)]);if(_0x326953){const _0x2d88c1=_0x326953[_0x571f8a(0x1df)]||_0x571f8a(0x1be),_0x3f6862=_0x326953['enabled']?_0x571f8a(0x1bf):_0x571f8a(0x1b8);console[_0x571f8a(0x1ca)]('\x20\x20'+bold(_0x2f813b['FwiYT'])+':\x20installed\x20('+_0x2d88c1+',\x20'+_0x3f6862+')');}else console['log'](_0x2f813b['KNyiu']),console[_0x571f8a(0x1ca)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console['log'](_0x2f813b['SQSky']);const {project:_0x2774bb,user:_0xa0f692}=await getInstalledSkills(),_0x11bda5=_0x2774bb['filter'](_0x310027=>RANGER_MANAGED_SKILLS['includes'](_0x310027[_0x571f8a(0x1e2)])),_0x5d0685=_0xa0f692['filter'](_0x207f7a=>RANGER_MANAGED_SKILLS['includes'](_0x207f7a['name'])),_0x28dee7=_0x11bda5[_0x571f8a(0x1f5)]+_0x5d0685['length'];if(_0x28dee7===0x0)console[_0x571f8a(0x1ca)](_0x571f8a(0x1ed)),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x11bda5[_0x571f8a(0x1f5)]>0x0){console['log'](_0x2f813b[_0x571f8a(0x19a)]);for(const _0x41ed96 of _0x11bda5){console[_0x571f8a(0x1ca)](_0x571f8a(0x1bb)+_0x2f813b[_0x571f8a(0x1cb)](bold,_0x41ed96['displayName'])+':\x20'+link(_0x41ed96[_0x571f8a(0x1e9)],basename(_0x41ed96[_0x571f8a(0x1e9)])));}}if(_0x2f813b['kkIzh'](_0x5d0685[_0x571f8a(0x1f5)],0x0)){console[_0x571f8a(0x1ca)](_0x2f813b[_0x571f8a(0x1ea)]);for(const _0x4b0a61 of _0x5d0685){console['log']('\x20\x20\x20\x20'+_0x2f813b['RtjnZ'](bold,_0x4b0a61['displayName'])+':\x20'+_0x2f813b[_0x571f8a(0x1c7)](link,_0x4b0a61['path'],basename(_0x4b0a61[_0x571f8a(0x1e9)])));}}}console['log']('\x0a---\x20Profiles\x20---');const {envs:_0x1eff58,activeEnv:_0x3ed58c}=await _0x2f813b['nLEIL'](getEnvironments);let _0x480630=[];if(_0x49e364)try{_0x480630=await listCloudProfiles();}catch{}const _0x23d809=_0x2f813b[_0x571f8a(0x1cf)](_0x1eff58['length'],_0x480630['length']);if(_0x23d809===0x0)console['log'](_0x2f813b[_0x571f8a(0x1ad)]),console['log']('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{if(_0x2f813b[_0x571f8a(0x1a8)](_0x23d809,0x5)){const _0x469893=[];_0x480630[_0x571f8a(0x1f5)]>0x0&&_0x469893[_0x571f8a(0x1c5)](_0x480630['length']+'\x20cloud'),_0x1eff58['length']>0x0&&_0x469893['push'](_0x1eff58['length']+'\x20local'),console[_0x571f8a(0x1ca)](_0x23d809+'\x20profiles\x20configured\x20('+_0x469893[_0x571f8a(0x1f3)](',\x20')+')'),_0x3ed58c&&console[_0x571f8a(0x1ca)]('\x20\x20Active:\x20'+bold(_0x3ed58c)),console[_0x571f8a(0x1ca)]('\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)');}else{for(const _0x329962 of _0x480630){const _0x1b7bc1=_0x329962['name']===_0x3ed58c?'\x20(active)':'';console[_0x571f8a(0x1ca)]('\x20\x20'+_0x2f813b['SEUYX'](bold,_0x329962['name'])+'\x20[cloud]'+_0x1b7bc1);const _0x4c4bfb=_0x329962[_0x571f8a(0x196)]?_0x571f8a(0x1c0)+_0x329962[_0x571f8a(0x196)]+')':_0x571f8a(0x1d9);console['log']('\x20\x20\x20\x20Session:\x20'+_0x4c4bfb);}const _0x579fe9=new Set(_0x480630['map'](_0x36295c=>_0x36295c['name']));for(const _0x40fd64 of _0x1eff58){if(_0x579fe9['has'](_0x40fd64[_0x571f8a(0x1e2)]))continue;const _0x4f7853=_0x40fd64['isActive']?_0x2f813b['AjWMg']:'',_0x9d72c6=_0x40fd64[_0x571f8a(0x1ee)]?_0x2f813b[_0x571f8a(0x1ba)]:_0x40fd64[_0x571f8a(0x1e7)]?_0x2f813b['JRPxU']:_0x2f813b[_0x571f8a(0x1d7)];console[_0x571f8a(0x1ca)]('\x20\x20'+bold(_0x40fd64[_0x571f8a(0x1e2)])+_0x571f8a(0x1c1)+_0x4f7853),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x9d72c6),_0x2f813b[_0x571f8a(0x1ac)](_0x40fd64[_0x571f8a(0x1e8)],_0x2f813b['UZSDa'])&&console[_0x571f8a(0x1ca)](_0x571f8a(0x1dc)+_0x2f813b[_0x571f8a(0x1c7)](link,_0x40fd64['settingsPath'],basename(_0x40fd64['settingsPath'])));}if(!_0x3ed58c){console[_0x571f8a(0x1ca)](_0x571f8a(0x1b3));const _0x94a619=[..._0x480630[_0x571f8a(0x1c4)](_0x4d20f6=>_0x4d20f6['name']),..._0x1eff58[_0x571f8a(0x1c3)](_0x32bb8c=>!_0x579fe9['has'](_0x32bb8c[_0x571f8a(0x1e2)]))['map'](_0x2ba15d=>_0x2ba15d['name'])];console[_0x571f8a(0x1ca)](_0x571f8a(0x1a9)+_0x94a619['join'](',\x20')+')');}}}console[_0x571f8a(0x1ca)]('');}function _0x3340(){const _0x42dc24=['\x20\x20\x20\x20Settings:\x20','nheuQ','afzXm','scope','brYDz','some','name','4921248JmoCqD','BJsHS','configured','Version:\x20','hasPlaintextAuth','settingsPath','path','UjGOs','cwd','2011314ovYUSv','No\x20skills\x20installed','hasEncryptedAuth','6rEFuCH','zopOf','env','\x20(active)','join',':\x20configured','length','17665TRgxbp','510EXfRaV','\x0a---\x20Claude\x20Code\x20Plugin\x20---','not_configured','sPSGO','toString','\x20(up\x20to\x20date)','\x1b]8;;file://','sessionUpdatedAt','status','config','version','WOiof','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','API\x20Token:\x20✗\x20Not\x20found','stderr','vrleW','WfjVP','error','wyNlN','\x20\x20Not\x20configured','settings.json','@ranger-testing/opencode-plugin','2598043KKopSI','none','utf-8','kkIzh','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','success','QiFTH','IsOME','iheIo','PlLjt','3KAIQuh','DEBUG','not_installed','Organization:\x20','\x0a\x20\x20No\x20active\x20profile\x20set','UnbrS','organizationName','\x20\x20Project-level:','KKIaw','disabled','data','MQUIX','\x20\x20\x20\x20','OTJcs','1080511ubozTL','unknown','enabled','cached\x20(updated\x20','\x20[local]','FwiYT','filter','map','push','plaintext','PjxbM','GQjIf','(not\x20found)','log','RtjnZ','user','MyCgK','lfbxa','rqquV','32328sgLQdz','2191876wfsZvt','details','dCyYz','MavNu','match','\x20\x20Run:\x20ranger\x20setup\x20--opencode','JEcHT','encrypted','no\x20session','plugin','trim'];_0x3340=function(){return _0x42dc24;};return _0x3340();}