@ranger-testing/ranger-cli 2.5.4-alpha.071b7bd-1 → 2.5.4-alpha.1d983c3-19

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 (82) hide show
  1. package/README.md +36 -14
  2. package/build/cli.js +1 -1
  3. package/build/commands/addEnv.js +1 -1
  4. package/build/commands/authEncrypt.js +1 -1
  5. package/build/commands/clean.js +1 -1
  6. package/build/commands/config.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 -0
  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 -0
  43. package/build/commands/utils/cloudProfileSession.js +1 -0
  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 -0
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -0
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -0
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/opencodeConfig.js +1 -1
  58. package/build/commands/utils/playwrightCli.js +1 -1
  59. package/build/commands/utils/profileMessages.js +1 -1
  60. package/build/commands/utils/profileSetupBanner.js +1 -1
  61. package/build/commands/utils/projectsConfig.js +1 -0
  62. package/build/commands/utils/rangerConfig.js +1 -1
  63. package/build/commands/utils/rangerRoot.js +1 -1
  64. package/build/commands/utils/resolveProfileContext.js +1 -0
  65. package/build/commands/utils/resolveProfileUrl.js +1 -0
  66. package/build/commands/utils/retry.js +1 -1
  67. package/build/commands/utils/sessionCache.js +1 -1
  68. package/build/commands/utils/settings.js +1 -1
  69. package/build/commands/utils/skillContent.js +1 -1
  70. package/build/commands/utils/skills.js +1 -1
  71. package/build/commands/utils/stitchWebmFiles.js +1 -1
  72. package/build/commands/utils/telemetry.js +1 -1
  73. package/build/commands/utils/tokenRefresh.js +1 -1
  74. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  75. package/build/commands/utils/userApi.js +1 -1
  76. package/build/commands/utils/version.js +1 -1
  77. package/build/commands/verifyFeature.js +1 -1
  78. package/build/commands/verifyFeatureCli.js +1 -1
  79. package/build/skills/ranger/SKILL.md +36 -6
  80. package/build/skills/ranger/create.md +19 -0
  81. package/build/skills/ranger/verify.md +46 -7
  82. package/package.json +8 -3
@@ -1 +1 @@
1
- (function(_0x4df791,_0x25803f){const _0x29c778=_0x1bf9,_0x5999c3=_0x4df791();while(!![]){try{const _0x35af39=parseInt(_0x29c778(0xfc))/0x1+-parseInt(_0x29c778(0x10b))/0x2*(-parseInt(_0x29c778(0x120))/0x3)+-parseInt(_0x29c778(0xf8))/0x4*(-parseInt(_0x29c778(0x134))/0x5)+-parseInt(_0x29c778(0x113))/0x6*(-parseInt(_0x29c778(0xf9))/0x7)+parseInt(_0x29c778(0x110))/0x8+-parseInt(_0x29c778(0xff))/0x9*(parseInt(_0x29c778(0x10d))/0xa)+-parseInt(_0x29c778(0x119))/0xb*(parseInt(_0x29c778(0x127))/0xc);if(_0x35af39===_0x25803f)break;else _0x5999c3['push'](_0x5999c3['shift']());}catch(_0x188f29){_0x5999c3['push'](_0x5999c3['shift']());}}}(_0x22a4,0x57aff));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';function _0x22a4(){const _0x33c480=['693621jTGEIe','length','FPhUa','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','isDirectory','ranger@trailhead','pkZsP','success','profile_activate','Failed\x20to\x20install\x20plugin:','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','sessions','32bBeAPI','map','30bDhXbn','BKezg','settings.json','4360528ldGjyC','QIufU','trackPhaseEnd','1761810MQYVeJ','oueph','AZjEz','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','EHagP','rWmbz','55JQdOiX','plugin','ranger-testing/trailhead','name','trackPhaseStart','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','87507zggpQY','filter','Fnoya','zXcJK','message','path','HtdbT','4045740JRgwUK','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','MwXsm','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','--scope','hIles','skills','EhjiT','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','baseUrl','chromium','project','10585gfloMb','ldrxX','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','MExJo','marketplace','log','dir_setup','profile','1172ccsxiV','7WocLvx','fLiYl','error','350413OlxPvH','wMZvL','OvfgI'];_0x22a4=function(){return _0x33c480;};return _0x22a4();}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x56a9ab){const _0x24e463=_0x1bf9,_0x47e09d={'QLeVr':function(_0x26b9df){return _0x26b9df();},'HtdbT':function(_0x49e4d3,_0x280642,_0x540f3e){return _0x49e4d3(_0x280642,_0x540f3e);},'MExJo':function(_0x27a294,_0x43dc9b){return _0x27a294+_0x43dc9b;},'ldrxX':_0x24e463(0x130),'IimeM':function(_0x1edc04,_0x2695ee,_0x5f564a){return _0x1edc04(_0x2695ee,_0x5f564a);},'mPLLQ':function(_0x1f2e33,_0x262045){return _0x1f2e33===_0x262045;},'BKezg':'No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','xuAXm':function(_0x43a323,_0x4f381a){return _0x43a323===_0x4f381a;}},_0x46990c=_0x47e09d['QLeVr'](getRangerDir),_0x5e6e82=join(_0x46990c,'ci');if(_0x56a9ab){const _0x1ac09d=_0x47e09d[_0x24e463(0x126)](join,_0x5e6e82,_0x56a9ab);return{'name':_0x56a9ab,'path':_0x1ac09d};}if(!existsSync(_0x5e6e82))throw new Error(_0x47e09d[_0x24e463(0x137)](_0x24e463(0x11f),_0x47e09d['ldrxX']));const _0xa845a0=await _0x47e09d['IimeM'](readdir,_0x5e6e82,{'withFileTypes':!![]}),_0x2d42f3=_0xa845a0[_0x24e463(0x121)](_0x20df26=>_0x20df26[_0x24e463(0x103)]())[_0x24e463(0x10c)](_0x577753=>_0x577753['name']);if(_0x47e09d['mPLLQ'](_0x2d42f3[_0x24e463(0x100)],0x0))throw new Error(_0x47e09d[_0x24e463(0x10e)]+_0x47e09d[_0x24e463(0x135)]);if(_0x47e09d['xuAXm'](_0x2d42f3['length'],0x1)){const _0x2e394c=_0x2d42f3[0x0];return console['log']('Auto-detected\x20CI\x20profile:\x20'+_0x2e394c),{'name':_0x2e394c,'path':join(_0x5e6e82,_0x2e394c)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x2d42f3['join'](',\x20')+_0x24e463(0x128));}function _0x1bf9(_0x4a4c57,_0x6f1644){_0x4a4c57=_0x4a4c57-0xf4;const _0x22a4e1=_0x22a4();let _0x1bf96c=_0x22a4e1[_0x4a4c57];return _0x1bf96c;}async function installPluginNonInteractive(){const _0x2e0ed5=_0x1bf9,_0x3e5716={'xGcHA':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','OvfgI':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','pkZsP':function(_0x5638e4,_0x5b51b1){return _0x5638e4(_0x5b51b1);},'fLiYl':'trailhead','NSsOm':'add','EhjiT':'Failed\x20to\x20add\x20marketplace:','RQJHe':_0x2e0ed5(0x136),'eLsWT':_0x2e0ed5(0x104),'lFcEo':_0x2e0ed5(0x12c),'MwXsm':_0x2e0ed5(0x133),'bhYmn':_0x2e0ed5(0x12b),'zXcJK':'✓\x20Claude\x20Code\x20plugin\x20installed'},_0x38025a=await isPluginInstalled('ranger@trailhead');if(_0x38025a)return console[_0x2e0ed5(0xf5)](_0x3e5716['xGcHA']),![];console['log'](_0x3e5716[_0x2e0ed5(0xfe)]);const _0x2cf9f3=await _0x3e5716[_0x2e0ed5(0x105)](isMarketplaceAdded,_0x3e5716[_0x2e0ed5(0xfa)]);let _0x3e7a46=_0x2cf9f3;if(_0x2cf9f3)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0x41234e=await runClaudeCommand(['plugin',_0x2e0ed5(0xf4),_0x3e5716['NSsOm'],_0x2e0ed5(0x11b)]);!_0x41234e[_0x2e0ed5(0x106)]?(console['error'](_0x3e5716[_0x2e0ed5(0x12f)],_0x41234e['error']),console['log'](_0x3e5716['RQJHe'])):_0x3e7a46=!![];}if(_0x3e7a46){const _0x58f918=await runClaudeCommand(['plugin','install',_0x3e5716['eLsWT'],_0x3e5716['lFcEo'],_0x3e5716[_0x2e0ed5(0x12a)]]);!_0x58f918[_0x2e0ed5(0x106)]?(console[_0x2e0ed5(0xfb)](_0x2e0ed5(0x108),_0x58f918['error']),console['log'](_0x3e5716['bhYmn'])):console['log'](_0x3e5716[_0x2e0ed5(0x123)]);}return!![];}export async function setupCi(_0x52cdd4,_0x2fe642,_0x25d122){const _0xd6331b=_0x1bf9,_0x327424={'QIufU':'auth','hIles':function(_0xab8c2c,_0xb30abd){return _0xab8c2c(_0xb30abd);},'Fnoya':function(_0x1a8eac,_0x1ef330,_0x243ae6){return _0x1a8eac(_0x1ef330,_0x243ae6);},'Sbtjn':_0xd6331b(0x10a),'YqjXD':_0xd6331b(0xf6),'ybTgB':function(_0x53545e){return _0x53545e();},'EHagP':function(_0x433481,_0x2c5c3b,_0xd9b37f){return _0x433481(_0x2c5c3b,_0xd9b37f);},'darUW':_0xd6331b(0x10f),'kFkJK':function(_0x24f2ca,_0x220f7d){return _0x24f2ca(_0x220f7d);},'FPhUa':'No\x20API\x20token\x20available\x20for\x20decryption','rWmbz':_0xd6331b(0x109),'SPLqz':_0xd6331b(0x11e),'wMZvL':_0xd6331b(0x11a),'AZjEz':_0xd6331b(0x133),'rtrAm':_0xd6331b(0x12e),'oueph':_0xd6331b(0x102)};console['log'](_0xd6331b(0x129)),_0x25d122?.[_0xd6331b(0x11d)](_0x327424[_0xd6331b(0x111)]),await _0x327424['hIles'](authenticate,_0x52cdd4),_0x25d122?.['trackPhaseEnd'](_0x327424[_0xd6331b(0x111)]),_0x25d122?.[_0xd6331b(0x11d)](_0xd6331b(0xf6));const {path:_0x4c5b77,installed:_0x470fa7}=await ensureRangerDir();await writeRangerGitignore(_0x4c5b77);const _0x39579f=_0x327424[_0xd6331b(0x122)](join,_0x4c5b77,_0x327424['Sbtjn']);!_0x327424[_0xd6331b(0x12d)](existsSync,_0x39579f)&&await mkdir(_0x39579f,{'recursive':!![]});_0x25d122?.['trackPhaseEnd'](_0x327424['YqjXD'],{'installed':_0x470fa7}),_0x25d122?.['trackPhaseStart']('chromium');let _0x49bf00=![];_0x2fe642?.['skipChromium']?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x49bf00=await _0x327424['ybTgB'](ensureChromium);_0x25d122?.[_0xd6331b(0x112)](_0xd6331b(0x132),{'installed':_0x49bf00,'skipped':!!_0x2fe642?.['skipChromium']}),_0x25d122?.['trackPhaseStart'](_0xd6331b(0x107));const _0x5cac05=await findCiProfile(_0x2fe642?.[_0xd6331b(0xf7)]);let _0x3485e9=![];_0x2fe642?.['baseUrl']&&(await _0x327424[_0xd6331b(0x117)](mkdir,_0x5cac05['path'],{'recursive':!![]}),await _0x327424[_0xd6331b(0x117)](saveSettings,_0x5cac05['name'],{'baseUrl':_0x2fe642[_0xd6331b(0x131)],'headless':!![]}),console[_0xd6331b(0xf5)]('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x2fe642[_0xd6331b(0x131)]),_0x3485e9=!![]);const _0x1e82de=_0x327424['Fnoya'](join,_0x5cac05[_0xd6331b(0x125)],_0x327424['darUW']);if(!_0x327424['kFkJK'](existsSync,_0x1e82de)&&!_0x3485e9)throw new Error('CI\x20profile\x20\x22'+_0x5cac05['name']+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x515a85=join(_0x5cac05[_0xd6331b(0x125)],'auth.json'),_0x54efb4=join(_0x5cac05[_0xd6331b(0x125)],'auth.json.enc'),_0x551757=existsSync(_0x515a85),_0x31cb3e=existsSync(_0x54efb4);if(_0x31cb3e)try{const _0x36ed20=await getToken();if(!_0x36ed20)throw new Error(_0x327424[_0xd6331b(0x101)]);const _0x3f1801=await readFile(_0x54efb4);decrypt(_0x3f1801,_0x36ed20),console['log'](_0x327424[_0xd6331b(0x118)]);}catch(_0x435de3){const _0x2e09c7=_0x435de3 instanceof Error?_0x435de3[_0xd6331b(0x124)]:_0x327424['kFkJK'](String,_0x435de3);throw new Error(_0xd6331b(0x116)+_0x5cac05['name']+'\x22:\x20'+_0x2e09c7);}else _0x551757?console['log']('✓\x20Auth\x20state\x20found'):console[_0xd6331b(0xf5)](_0x327424['SPLqz']);await writeActiveProfileName(_0x5cac05[_0xd6331b(0x11c)]),console[_0xd6331b(0xf5)]('✓\x20Active\x20profile:\x20'+_0x5cac05[_0xd6331b(0x11c)]),_0x25d122?.['trackPhaseEnd']('profile_activate',{'profileName':_0x5cac05[_0xd6331b(0x11c)],'hasAuth':_0x551757,'hasEncryptedAuth':_0x31cb3e,'createdSettings':_0x3485e9}),_0x25d122?.['trackPhaseStart'](_0x327424[_0xd6331b(0xfd)]);const _0x22c2bb=await installPluginNonInteractive();_0x25d122?.['trackPhaseEnd'](_0xd6331b(0x11a),{'installed':_0x22c2bb}),_0x25d122?.[_0xd6331b(0x11d)](_0xd6331b(0x12e)),await skillup({'autoInstall':_0x327424[_0xd6331b(0x115)]}),_0x25d122?.['trackPhaseEnd'](_0x327424['rtrAm']),console[_0xd6331b(0xf5)](_0x327424[_0xd6331b(0x114)]);}
1
+ function _0x3db3(){var _0x4c02fd=['111kywcTW','4435408WDEtDh','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','onfFN','8835750icKZIa','680KygXFw','4696MrlAZU','64550YfFTxa','811996YTOACS','3798195tnMnxA','121545Kpanvy','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','error','14903WlKoxz','LbdDQ','\x20\x20https://docs.ranger.net/main/concepts/profiles'];_0x3db3=function(){return _0x4c02fd;};return _0x3db3();}function _0x41fa(_0x2fa12a,_0x47320f){_0x2fa12a=_0x2fa12a-0x16e;var _0x3db314=_0x3db3();var _0x41fa34=_0x3db314[_0x2fa12a];return _0x41fa34;}(function(_0x62ebf9,_0x2bcbb8){var _0x4912ff=_0x41fa,_0xf36398=_0x62ebf9();while(!![]){try{var _0x195701=parseInt(_0x4912ff(0x172))/0x1+parseInt(_0x4912ff(0x171))/0x2*(-parseInt(_0x4912ff(0x17b))/0x3)+parseInt(_0x4912ff(0x17c))/0x4+parseInt(_0x4912ff(0x173))/0x5+parseInt(_0x4912ff(0x16e))/0x6+parseInt(_0x4912ff(0x178))/0x7*(-parseInt(_0x4912ff(0x170))/0x8)+-parseInt(_0x4912ff(0x174))/0x9*(parseInt(_0x4912ff(0x16f))/0xa);if(_0x195701===_0x2bcbb8)break;else _0xf36398['push'](_0xf36398['shift']());}catch(_0x963c28){_0xf36398['push'](_0xf36398['shift']());}}}(_0x3db3,0xc115a));export async function setupCi(_0x3f5e4f,_0x393669,_0x2b2736){var _0x9723f9=_0x41fa,_0x230908={'onfFN':function(_0x5936f7,_0x288df7){return _0x5936f7+_0x288df7;},'LbdDQ':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console[_0x9723f9(0x177)](_0x230908[_0x9723f9(0x17e)](_0x230908[_0x9723f9(0x17e)](_0x9723f9(0x17d)+'\x0a'+_0x9723f9(0x176),_0x9723f9(0x175))+'\x0a',_0x230908[_0x9723f9(0x179)])+_0x9723f9(0x17a)),process['exit'](0x1);}
@@ -1 +1 @@
1
- function _0x357d(){const _0x3f0fb4=['\x20--opencode','YzuOX','\x20skill','109574XQbJGa','installLevel','\x20<your-api-token>','This\x20project\x20only\x20(','\x20successfully!\x0a','warn','\x20\x203.\x20Run:\x20ranger\x20skillup','3rPvwbz','90NPdWHD','1003036dFssTK','14880bJtwYU','8fxcUWf','project-level','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','2gMxZNi','ranger','CJCvd','log','user-level','1887636lpXBMj','YIVZT','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','user','All\x20projects\x20(','\x20\x202.\x20Run:\x20ranger\x20setup','PbNFu','autoInstall','XiedE','Where\x20should\x20skills\x20be\x20installed?','ZJdeh','message','VcePr','1859KyybiP','stdin','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','prompt','\x0a✅\x20Installed\x20','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','74097WWnuQJ','ooUYd','opencode','HBzFU','vTONS','869743LkDuXr','split','tfkzF','402310ZappGS','list','✓\x20Found\x20API\x20token','xVQiY'];_0x357d=function(){return _0x3f0fb4;};return _0x357d();}(function(_0x2f4ebb,_0x5ec1bc){const _0x5ab2f2=_0x40bb,_0x55e439=_0x2f4ebb();while(!![]){try{const _0xbc468f=-parseInt(_0x5ab2f2(0x17f))/0x1*(-parseInt(_0x5ab2f2(0x18d))/0x2)+-parseInt(_0x5ab2f2(0x186))/0x3*(parseInt(_0x5ab2f2(0x188))/0x4)+parseInt(_0x5ab2f2(0x178))/0x5+parseInt(_0x5ab2f2(0x192))/0x6+-parseInt(_0x5ab2f2(0x175))/0x7*(-parseInt(_0x5ab2f2(0x18a))/0x8)+-parseInt(_0x5ab2f2(0x170))/0x9*(-parseInt(_0x5ab2f2(0x187))/0xa)+parseInt(_0x5ab2f2(0x19f))/0xb*(-parseInt(_0x5ab2f2(0x189))/0xc);if(_0xbc468f===_0x5ec1bc)break;else _0x55e439['push'](_0x55e439['shift']());}catch(_0x56de54){_0x55e439['push'](_0x55e439['shift']());}}}(_0x357d,0x3b3ed));import{basename}from'path';import _0x1b1bcd from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';function _0x40bb(_0x36fb7a,_0x5d3d7b){_0x36fb7a=_0x36fb7a-0x170;const _0x357d91=_0x357d();let _0x40bb9b=_0x357d91[_0x36fb7a];return _0x40bb9b;}import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x1af866={}){const _0x49b0b5=_0x40bb,_0x526db3={'coqyO':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','ZJdeh':'claude','OTgjS':function(_0x179362){return _0x179362();},'tfkzF':function(_0x17c196,_0x43bfe0){return _0x17c196===_0x43bfe0;},'ooUYd':_0x49b0b5(0x17c),'XiedE':function(_0x2be8c2,_0x20c70b){return _0x2be8c2===_0x20c70b;},'PbNFu':_0x49b0b5(0x172),'PRjXN':'To\x20get\x20started:','YIVZT':_0x49b0b5(0x17a),'sqvQb':function(_0x44b2a7){return _0x44b2a7();},'xVQiY':function(_0xace1a,_0x1d9c95){return _0xace1a(_0x1d9c95);},'YzuOX':function(_0x5b8d39,_0x5da432){return _0x5b8d39===_0x5da432;},'JvxNB':'project','CJCvd':function(_0x2715da,_0xe979ef,_0x586cb8){return _0x2715da(_0xe979ef,_0x586cb8);},'HBzFU':_0x49b0b5(0x1a1),'VcePr':function(_0xfe2fa8,_0x303649){return _0xfe2fa8>_0x303649;},'fdWef':_0x49b0b5(0x195),'vTONS':_0x49b0b5(0x18b),'ZtsUH':_0x49b0b5(0x1a4)};console[_0x49b0b5(0x190)](_0x526db3['coqyO']);const _0x23a342=_0x1af866['platform']??_0x526db3[_0x49b0b5(0x19c)],_0x31a0a3=await _0x526db3['OTgjS'](getToken);if(!_0x31a0a3){const _0x449382='1|4|0|3|2|5'[_0x49b0b5(0x176)]('|');let _0x114ac4=0x0;while(!![]){switch(_0x449382[_0x114ac4++]){case'0':console['log']('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli');continue;case'1':console[_0x49b0b5(0x190)](_0x49b0b5(0x194));continue;case'2':console['log'](_0x49b0b5(0x185)+(_0x526db3[_0x49b0b5(0x177)](_0x23a342,_0x49b0b5(0x172))?_0x526db3[_0x49b0b5(0x171)]:'')+'\x0a');continue;case'3':console['log'](_0x49b0b5(0x197)+(_0x526db3[_0x49b0b5(0x19a)](_0x23a342,_0x526db3[_0x49b0b5(0x198)])?_0x526db3[_0x49b0b5(0x171)]:'')+_0x49b0b5(0x181));continue;case'4':console[_0x49b0b5(0x190)](_0x526db3['PRjXN']);continue;case'5':return;}break;}}console['log'](_0x526db3[_0x49b0b5(0x193)]);const _0x2f0cc6=_0x526db3['sqvQb'](getProjectRoot),_0x5a4a19=_0x526db3[_0x49b0b5(0x17b)](basename,_0x2f0cc6),_0x2a4255=_0x526db3[_0x49b0b5(0x17d)](_0x23a342,'opencode')?getOpencodeConfigDir('user')+'/skills/':getClaudeConfigDir()+'/skills/',_0x4f8616=_0x23a342==='opencode'?_0x2f0cc6+'/.opencode/skills/':_0x2f0cc6+'/.claude/skills/',_0x1558cd=process[_0x49b0b5(0x1a0)]['isTTY']&&process['stdout']['isTTY'];let _0x174d7a;if(_0x1af866['autoInstall'])_0x174d7a=_0x1af866[_0x49b0b5(0x199)];else{if(_0x1558cd){const _0x402bab=await _0x1b1bcd[_0x49b0b5(0x1a2)]([{'type':_0x49b0b5(0x179),'name':_0x49b0b5(0x180),'message':_0x49b0b5(0x19b),'choices':[{'name':_0x49b0b5(0x196)+_0x2a4255+')','value':_0x49b0b5(0x195)},{'name':_0x49b0b5(0x182)+_0x4f8616+')','value':'project'}]}]);_0x174d7a=_0x402bab['installLevel'];}else _0x174d7a=_0x526db3['JvxNB'],console[_0x49b0b5(0x190)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x4f8616+')');}let _0x125fb2=0x0;const _0x4e2e70=getCurrentVersion();console[_0x49b0b5(0x190)]('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x3e7707=await _0x526db3[_0x49b0b5(0x18f)](installSkill,_0x49b0b5(0x18e),{'cliVersion':_0x4e2e70,'level':_0x174d7a,'platform':_0x23a342});_0x3e7707&&_0x125fb2++;}catch(_0x449a73){console[_0x49b0b5(0x184)](_0x526db3[_0x49b0b5(0x173)],_0x449a73 instanceof Error?_0x449a73[_0x49b0b5(0x19d)]:_0x449a73);}if(_0x526db3[_0x49b0b5(0x19e)](_0x125fb2,0x0)){const _0x4814c6=_0x174d7a===_0x526db3['fdWef']?_0x49b0b5(0x191):_0x526db3[_0x49b0b5(0x174)];console['log'](_0x49b0b5(0x1a3)+_0x125fb2+'\x20'+_0x4814c6+_0x49b0b5(0x17e)+(_0x125fb2>0x1?'s':'')+_0x49b0b5(0x183)),!_0x1af866['suppressUsage']&&(console['log']('To\x20use:'),_0x23a342===_0x526db3['PbNFu']?console[_0x49b0b5(0x190)](_0x49b0b5(0x18c)):console[_0x49b0b5(0x190)]('\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!'));}else console['log'](_0x526db3['ZtsUH']);}
1
+ (function(_0x19afd1,_0x24a29e){const _0x1a4ddd=_0x4c3d,_0x218ef2=_0x19afd1();while(!![]){try{const _0x29a26b=-parseInt(_0x1a4ddd(0xcd))/0x1+parseInt(_0x1a4ddd(0xc6))/0x2+parseInt(_0x1a4ddd(0xcc))/0x3*(parseInt(_0x1a4ddd(0xca))/0x4)+parseInt(_0x1a4ddd(0xb3))/0x5*(-parseInt(_0x1a4ddd(0xcf))/0x6)+parseInt(_0x1a4ddd(0xaf))/0x7+-parseInt(_0x1a4ddd(0xcb))/0x8+parseInt(_0x1a4ddd(0xc7))/0x9;if(_0x29a26b===_0x24a29e)break;else _0x218ef2['push'](_0x218ef2['shift']());}catch(_0x236127){_0x218ef2['push'](_0x218ef2['shift']());}}}(_0x54e6,0x2d159));import{basename}from'path';import _0x5bee72 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';function _0x4c3d(_0x4c9c8b,_0x1156bc){_0x4c9c8b=_0x4c9c8b-0xaa;const _0x54e658=_0x54e6();let _0x4c3d53=_0x54e658[_0x4c9c8b];return _0x4c3d53;}export async function skillup(_0x293953={}){const _0x1bf5c4=_0x4c3d,_0xe40e70={'yWPPW':'\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','XUWmQ':'\x20--opencode','sIbll':function(_0x5e4838,_0x484546){return _0x5e4838===_0x484546;},'YiDdS':'opencode','qqZVf':function(_0x305e7c){return _0x305e7c();},'PBBHY':function(_0x55733b,_0x41dcb3){return _0x55733b===_0x41dcb3;},'uGxJx':_0x1bf5c4(0xbb),'kngmP':function(_0x26c9d6,_0xdd4209){return _0x26c9d6===_0xdd4209;},'DHdtA':_0x1bf5c4(0xaa),'SBJFH':'project','cWlce':function(_0x58ff1e){return _0x58ff1e();},'ZlqZB':'\x0a📦\x20Installing\x20skills...\x0a','aEQcW':'ranger','jYeDS':function(_0x19744b,_0x18717f){return _0x19744b>_0x18717f;},'AzJLi':function(_0x361130,_0x58dd48){return _0x361130===_0x58dd48;},'ZGXbo':'user-level'};console[_0x1bf5c4(0xb0)](_0x1bf5c4(0xc3));const _0x35140e=_0x293953[_0x1bf5c4(0xc8)]??_0x1bf5c4(0xbe),_0x4083fa=await getToken();if(!_0x4083fa){console[_0x1bf5c4(0xb0)]('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a'),console['log']('To\x20get\x20started:'),console['log'](_0xe40e70[_0x1bf5c4(0xb6)]),console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x35140e===_0x1bf5c4(0xac)?_0xe40e70['XUWmQ']:'')+'\x20<your-api-token>'),console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0xe40e70[_0x1bf5c4(0xce)](_0x35140e,_0xe40e70[_0x1bf5c4(0xae)])?_0xe40e70['XUWmQ']:'')+'\x0a');return;}console[_0x1bf5c4(0xb0)]('✓\x20Found\x20API\x20token');const _0x17e135=_0xe40e70['qqZVf'](getProjectRoot),_0x4b8977=basename(_0x17e135),_0xc87183=_0xe40e70['PBBHY'](_0x35140e,_0xe40e70[_0x1bf5c4(0xae)])?getOpencodeConfigDir(_0xe40e70['uGxJx'])+_0x1bf5c4(0xc0):getClaudeConfigDir()+_0x1bf5c4(0xc0),_0x419eb1=_0xe40e70['kngmP'](_0x35140e,_0xe40e70['YiDdS'])?_0x17e135+_0x1bf5c4(0xbd):_0x17e135+_0x1bf5c4(0xb5),_0x37b91f=process['stdin']['isTTY']&&process['stdout']['isTTY'];let _0x48eb0c;if(_0x293953[_0x1bf5c4(0xb7)])_0x48eb0c=_0x293953['autoInstall'];else{if(_0x37b91f){const _0x210dfd=await _0x5bee72['prompt']([{'type':_0xe40e70['DHdtA'],'name':_0x1bf5c4(0xb2),'message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':'All\x20projects\x20('+_0xc87183+')','value':_0xe40e70['uGxJx']},{'name':_0x1bf5c4(0xab)+_0x419eb1+')','value':_0xe40e70['SBJFH']}]}]);_0x48eb0c=_0x210dfd[_0x1bf5c4(0xb2)];}else _0x48eb0c=_0x1bf5c4(0xc9),console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x419eb1+')');}let _0x20eefe=0x0;const _0x32699d=_0xe40e70[_0x1bf5c4(0xc2)](getCurrentVersion);console[_0x1bf5c4(0xb0)](_0xe40e70['ZlqZB']);try{const _0x5938d5=await installSkill(_0xe40e70[_0x1bf5c4(0xad)],{'cliVersion':_0x32699d,'level':_0x48eb0c,'platform':_0x35140e});_0x5938d5&&_0x20eefe++;}catch(_0x838b86){console[_0x1bf5c4(0xb8)](_0x1bf5c4(0xc4),_0x838b86 instanceof Error?_0x838b86['message']:_0x838b86);}if(_0xe40e70[_0x1bf5c4(0xb4)](_0x20eefe,0x0)){const _0x3e12db=_0xe40e70[_0x1bf5c4(0xc5)](_0x48eb0c,_0x1bf5c4(0xbb))?_0xe40e70['ZGXbo']:_0x1bf5c4(0xba);console[_0x1bf5c4(0xb0)](_0x1bf5c4(0xb1)+_0x20eefe+'\x20'+_0x3e12db+'\x20skill'+(_0x20eefe>0x1?'s':'')+'\x20successfully!\x0a'),!_0x293953[_0x1bf5c4(0xbf)]&&(console['log'](_0x1bf5c4(0xc1)),_0x35140e===_0xe40e70[_0x1bf5c4(0xae)]?console['log'](_0x1bf5c4(0xb9)):console['log']('\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!'));}else console[_0x1bf5c4(0xb0)](_0x1bf5c4(0xbc));}function _0x54e6(){const _0x203f0d=['YiDdS','1182272Zrfnjl','log','\x0a✅\x20Installed\x20','installLevel','10xeAJPO','jYeDS','/.claude/skills/','yWPPW','autoInstall','warn','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','project-level','user','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','/.opencode/skills/','claude','suppressUsage','/skills/','To\x20use:','cWlce','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','AzJLi','353262WisdEP','3601593LaQPue','platform','project','28716YmmURR','2373224Zodddc','27LUIVeT','106657MitytL','sIbll','667020eVLudx','list','This\x20project\x20only\x20(','opencode','aEQcW'];_0x54e6=function(){return _0x203f0d;};return _0x54e6();}
@@ -1 +1 @@
1
- const _0x54248a=_0x4f81;(function(_0x396ff4,_0x30357e){const _0x31f408=_0x4f81,_0x1b44ad=_0x396ff4();while(!![]){try{const _0x3f5a31=parseInt(_0x31f408(0x13b))/0x1*(-parseInt(_0x31f408(0x142))/0x2)+parseInt(_0x31f408(0x16a))/0x3*(-parseInt(_0x31f408(0x166))/0x4)+-parseInt(_0x31f408(0x14d))/0x5+parseInt(_0x31f408(0x13d))/0x6*(parseInt(_0x31f408(0x15c))/0x7)+parseInt(_0x31f408(0x174))/0x8*(-parseInt(_0x31f408(0x134))/0x9)+parseInt(_0x31f408(0x13c))/0xa+parseInt(_0x31f408(0x15b))/0xb*(parseInt(_0x31f408(0x198))/0xc);if(_0x3f5a31===_0x30357e)break;else _0x1b44ad['push'](_0x1b44ad['shift']());}catch(_0x352a0d){_0x1b44ad['push'](_0x1b44ad['shift']());}}}(_0x3e76,0x3330b));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x1a36b0 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{getRangerDir,getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x3e76(){const _0x1faca2=['\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','prompt','✓\x20Authenticated\x20to\x20','vPNdn','YlPXC','99FuvnmQ','nXIPz','InDIc','success','JVanY','allowInsecureLocalhost','error','5466WzsSwt','3779880dFtwxT','240zsmkJT','WofKH','provided_token','XCwgs','LEvvf','114IgYquP','\x20(fallback\x20version)','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','OvqOy','plugin','existing_token','1.58.2','fsqNN','VKOrS','dSXDH','121105sPpOuQ','tHPwm','Installation\x20failed\x20with\x20exit\x20code\x20','trackPhaseEnd','trackPhaseError','CsXnp',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','message','opencode','local','trackPhaseStart','WoYuz','use\x20until\x20the\x20session\x20expires.\x0a','...','2383876DOxQtl','66962PuKRSS','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','\x20and\x20prompt\x20the\x20coding','JzVAL','.gitignore','user','withDeps','skipChromium','8TFiqnh','LftLO','log','skipped','268791OqHCUp','auth','isTTY','PxSLH','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','organizationName','version','JweSX','warn','\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','183776bDyGfs','GITHUB_ENV','ranger','\x20\x20npx\x20playwright@','vcjEX','stdout','RaeRf','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory,\x0a','\x20install\x20chromium','✓\x20Playwright\x20Chromium\x20browser\x20found','VDHNy','stdin','rHZYW','chromium','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','gpaZP','\x20now?','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','Authentication\x20failed:\x20','ypFSq','url','close','ready','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','FlcQQ','zYvoG','xlASN','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','uHNIe','scope','✓\x20.ranger/\x20directory\x20already\x20exists','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','NtMoT','playwright@','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','/ranger:enable','12EOJgFf','status','git_check','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','\x0a⚠\x20Skipping\x20Chromium\x20installation.','skills','ignore','cLPZW','.ranger','mjUai','No\x20git\x20repository\x20found','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','ziXnj','raVbc','confirm','dGADw','fZnBi'];_0x3e76=function(){return _0x1faca2;};return _0x3e76();}import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';function _0x4f81(_0x27b130,_0x392144){_0x27b130=_0x27b130-0x132;const _0x3e7699=_0x3e76();let _0x4f8196=_0x3e7699[_0x27b130];return _0x4f8196;}import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x54248a(0x149);const bold=_0x233855=>'\x1b[1m'+_0x233855+'\x1b[0m';export function getPlaywrightVersion(){const _0x3ca0d1=_0x54248a,_0x61eeee={'QqeaT':function(_0xf7305,_0x528cba){return _0xf7305(_0x528cba);}};try{const _0x189fab=require['resolve']('playwright/package.json'),_0x5a4a63=_0x61eeee['QqeaT'](require,_0x189fab);return _0x5a4a63[_0x3ca0d1(0x170)];}catch{return null;}}export function installChromiumBinary(_0x229d6b,_0x21c09b=![]){const _0x398b01=_0x54248a,_0x19e640={'PxSLH':function(_0x5ed03d,_0x26767c){return _0x5ed03d(_0x26767c);},'dGADw':'install','mPbik':'--with-deps','nXIPz':'chromium','FlcQQ':function(_0x3f881d,_0x3c8d51,_0x16ea84,_0x53fc11){return _0x3f881d(_0x3c8d51,_0x16ea84,_0x53fc11);},'bNrfD':_0x398b01(0x19e),'DQGog':_0x398b01(0x189)};return new Promise((_0x131297,_0x29cddf)=>{const _0x313118=_0x398b01,_0x406bad={'KKCBO':function(_0xb740f3,_0x4b4075){return _0xb740f3===_0x4b4075;},'JVanY':function(_0x2169ae,_0x16122f){const _0x58c35e=_0x4f81;return _0x19e640[_0x58c35e(0x16d)](_0x2169ae,_0x16122f);}},_0x58aa7e=[_0x313118(0x195)+_0x229d6b,_0x19e640[_0x313118(0x1a7)],..._0x21c09b?[_0x19e640['mPbik']]:[],_0x19e640[_0x313118(0x135)]],_0x4874db=_0x19e640[_0x313118(0x18c)](spawn,'npx',_0x58aa7e,{'stdio':[_0x19e640['bNrfD'],'inherit','inherit'],'shell':process['platform']==='win32'});_0x4874db['on'](_0x19e640['DQGog'],_0x3aaa1e=>{const _0x240c19=_0x313118;_0x406bad['KKCBO'](_0x3aaa1e,0x0)?_0x131297():_0x406bad[_0x240c19(0x138)](_0x29cddf,new Error(_0x240c19(0x14f)+_0x3aaa1e));}),_0x4874db['on'](_0x313118(0x13a),_0x14f2b5=>{_0x19e640['PxSLH'](_0x29cddf,_0x14f2b5);});});}export async function authenticate(_0x3913b7){const _0x1266d2=_0x54248a,_0x6e8251={'jpiYt':_0x1266d2(0x148),'fZnBi':function(_0x667aa9,_0x37773d){return _0x667aa9 instanceof _0x37773d;},'VKOrS':function(_0x58f955,_0x14a6dd){return _0x58f955(_0x14a6dd);},'sbrcv':'device_auth','cLPZW':'Validating\x20API\x20token...','harIH':'✓\x20Exported\x20credentials\x20for\x20CI'};if(!_0x3913b7){const _0x15487c=await getToken();if(_0x15487c){const _0x5ba74c=await getCurrentUser(_0x15487c);if(_0x5ba74c[_0x1266d2(0x137)])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x5ba74c['user'][_0x1266d2(0x16f)]),{'token':_0x15487c,'method':_0x6e8251['jpiYt']};}try{_0x3913b7=await runDeviceAuthFlow();}catch(_0x1f0a2c){throw new Error('Authentication\x20failed:\x20'+(_0x6e8251[_0x1266d2(0x1a8)](_0x1f0a2c,Error)?_0x1f0a2c['message']:_0x1f0a2c));}const _0x3f08cf=await _0x6e8251['VKOrS'](getCurrentUser,_0x3913b7);if(!_0x3f08cf['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x3f08cf[_0x1266d2(0x13a)]);return console[_0x1266d2(0x168)]('✓\x20Authenticated\x20to\x20'+_0x3f08cf[_0x1266d2(0x163)][_0x1266d2(0x16f)]),{'token':_0x3913b7,'method':_0x6e8251['sbrcv']};}console['log'](_0x6e8251[_0x1266d2(0x19f)]);const _0x2b4f7e=await _0x6e8251['VKOrS'](getCurrentUser,_0x3913b7);if(!_0x2b4f7e[_0x1266d2(0x137)]){if(_0x2b4f7e[_0x1266d2(0x199)])throw new Error(_0x1266d2(0x186)+_0x2b4f7e[_0x1266d2(0x13a)]+_0x1266d2(0x1a3));else throw new Error(_0x1266d2(0x185)+_0x2b4f7e['error']+_0x1266d2(0x15e));}return console[_0x1266d2(0x168)](_0x1266d2(0x1ab)+_0x2b4f7e['user'][_0x1266d2(0x16f)]),await _0x6e8251[_0x1266d2(0x14b)](storeToken,_0x3913b7),console['log'](process['env'][_0x1266d2(0x175)]?_0x6e8251['harIH']:'✓\x20Stored\x20credentials\x20locally'),{'token':_0x3913b7,'method':_0x1266d2(0x13f)};}export async function ensureRangerDir(_0x312c39){const _0x1c0ef8=_0x54248a,_0x14fec9={'HAuhf':function(_0x15b7bc,_0x312a65){return _0x15b7bc===_0x312a65;},'OHtVR':_0x1c0ef8(0x163),'sVEeS':function(_0x46d17c){return _0x46d17c();},'oGOpK':function(_0x2d9708,_0x224c5a,_0xa1eba4){return _0x2d9708(_0x224c5a,_0xa1eba4);},'CiEIA':function(_0x33a8ec){return _0x33a8ec();},'icutW':function(_0x8873d,_0x3c24ac){return _0x8873d(_0x3c24ac);},'OvqOy':_0x1c0ef8(0x192)};let _0x26329b;if(_0x14fec9['HAuhf'](_0x312c39,_0x14fec9['OHtVR']))_0x26329b=_0x14fec9['sVEeS'](getRangerHomeDir);else{const _0x1547eb=findGitRoot();_0x26329b=_0x1547eb?_0x14fec9['oGOpK'](join,_0x1547eb,_0x1c0ef8(0x1a0)):_0x14fec9['CiEIA'](getRangerDir);}return!_0x14fec9['icutW'](existsSync,_0x26329b)?(await mkdir(_0x26329b,{'recursive':!![]}),console['log']('✓\x20Created\x20.ranger/\x20directory'),{'path':_0x26329b,'installed':!![]}):(console['log'](_0x14fec9[_0x1c0ef8(0x146)]),{'path':_0x26329b,'installed':![]});}export async function ensureChromium(_0x5b42f3=![]){const _0x207d15=_0x54248a,_0x5303c8={'JzVAL':function(_0x2e119f){return _0x2e119f();},'vPNdn':function(_0x275786,_0x1ed394){return _0x275786??_0x1ed394;},'FSzHZ':_0x207d15(0x1a6),'tHPwm':_0x207d15(0x144),'ypFSq':_0x207d15(0x16e),'kgrAm':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','dSXDH':_0x207d15(0x19c)};let _0x47ec96=![];try{const _0x5e0320=chromium['executablePath']();_0x47ec96=existsSync(_0x5e0320);}catch{_0x47ec96=![];}if(_0x47ec96)return console[_0x207d15(0x168)](_0x207d15(0x17d)),![];const _0x2f6f3b=_0x5303c8[_0x207d15(0x161)](getPlaywrightVersion),_0xeaacb=_0x5303c8[_0x207d15(0x132)](_0x2f6f3b,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x152d45=!_0x2f6f3b,_0x3715d5=process[_0x207d15(0x17f)]['isTTY']&&process['stdout']['isTTY'];let _0xc8b18a=!![];if(_0x3715d5){const {install:_0x18f036}=await _0x1a36b0[_0x207d15(0x1aa)]([{'type':_0x5303c8['FSzHZ'],'name':'install','message':_0x152d45?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0xeaacb+_0x207d15(0x184):'The\x20required\x20version\x20('+_0xeaacb+_0x207d15(0x153),'default':!![]}]);_0xc8b18a=_0x18f036;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0xeaacb+(_0x152d45?_0x207d15(0x143):'')+_0x207d15(0x15a));if(_0xc8b18a){console[_0x207d15(0x168)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0xeaacb,_0x5b42f3),console['log'](_0x5303c8[_0x207d15(0x14e)]);}catch(_0x4e2eb9){console['error'](_0x5303c8[_0x207d15(0x187)],_0x4e2eb9 instanceof Error?_0x4e2eb9['message']:_0x4e2eb9),console['log'](_0x5303c8['kgrAm']),console[_0x207d15(0x168)](_0x207d15(0x177)+_0xeaacb+_0x207d15(0x17c));}}else console['log'](_0x5303c8[_0x207d15(0x14c)]),console[_0x207d15(0x168)](_0x207d15(0x18b)),console[_0x207d15(0x168)]('\x20\x20npx\x20playwright@'+_0xeaacb+_0x207d15(0x17c));return!![];}export async function writeRangerGitignore(_0x44221e){const _0x3bf606=_0x54248a,_0x1483a1={'ICGqS':_0x3bf606(0x162),'xhplj':function(_0x40f224,_0x113338,_0x2eb1ae){return _0x40f224(_0x113338,_0x2eb1ae);}},_0x3eb0f4=join(_0x44221e,_0x1483a1['ICGqS']),_0x4f7244=_0x3bf606(0x173);await _0x1483a1['xhplj'](writeFile,_0x3eb0f4,_0x4f7244),console['log']('✓\x20Created\x20.ranger/.gitignore');}function printProfileSetupLaterInstructions(){const _0x3a54bc=_0x54248a,_0x42dc55={'tdXMl':'\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','fcIlq':function(_0x187675,_0x4b5a01){return _0x187675(_0x4b5a01);},'gpaZP':_0x3a54bc(0x19b)};console['log'](_0x42dc55['tdXMl']),console[_0x3a54bc(0x168)]('\x20\x20'+_0x42dc55['fcIlq'](bold,'ranger\x20profile\x20add\x20local')),console['log'](_0x42dc55[_0x3a54bc(0x183)]);}export async function ensureLocalEnv(_0x4d1fea,_0x24f287){const _0x2a4e00=_0x54248a,_0x57ecd8={'BYMNa':_0x2a4e00(0x182),'XCwgs':function(_0x47a34e,_0x5e5298){return _0x47a34e===_0x5e5298;},'GtWOx':'user','raVbc':function(_0x27ca10,_0x1c123c,_0x56ef89){return _0x27ca10(_0x1c123c,_0x56ef89);},'rHZYW':_0x2a4e00(0x156),'QfXcu':'✓\x20Local\x20profile\x20already\x20exists','ZowaU':_0x2a4e00(0x1a9),'AXbch':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','EtnEF':_0x2a4e00(0x18f),'WofKH':_0x2a4e00(0x159),'zYvoG':'You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','InDIc':'wantsProfile','LftLO':function(_0x4e1468){return _0x4e1468();},'YBOwd':function(_0x201d9c,_0x2c7145,_0xa75435,_0x58f930){return _0x201d9c(_0x2c7145,_0xa75435,_0x58f930);},'LEvvf':function(_0x78370,_0xc3b25f){return _0x78370 instanceof _0xc3b25f;},'WoYuz':function(_0x11d60d){return _0x11d60d();}};if(!findGitRoot())return console[_0x2a4e00(0x168)](_0x57ecd8['BYMNa']),{'ready':![],'skipped':!![]};const _0x32ff00=_0x57ecd8[_0x2a4e00(0x140)](_0x4d1fea?.[_0x2a4e00(0x191)],_0x57ecd8['GtWOx'])?getRangerHomeDir():undefined;if(_0x57ecd8[_0x2a4e00(0x1a5)](findExistingEnv,_0x57ecd8[_0x2a4e00(0x180)],{'locations':[_0x57ecd8['rHZYW']],'rangerDir':_0x32ff00}))return console[_0x2a4e00(0x168)](_0x57ecd8['QfXcu']),{'ready':!![],'skipped':![]};const _0x858bf1=process[_0x2a4e00(0x17f)]['isTTY']&&process[_0x2a4e00(0x179)][_0x2a4e00(0x16c)];if(_0x858bf1&&!_0x4d1fea?.['url']){console['log'](_0x57ecd8['ZowaU']),console['log'](_0x57ecd8['AXbch']),console[_0x2a4e00(0x168)](_0x57ecd8['EtnEF']),console[_0x2a4e00(0x168)](_0x57ecd8[_0x2a4e00(0x13e)]),console['log'](_0x57ecd8[_0x2a4e00(0x18d)]);const {wantsProfile:_0x3774a6}=await _0x1a36b0[_0x2a4e00(0x1aa)]([{'type':'confirm','name':_0x57ecd8[_0x2a4e00(0x136)],'message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0x3774a6)return _0x57ecd8[_0x2a4e00(0x167)](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await _0x57ecd8['YBOwd'](addEnv,_0x2a4e00(0x156),{'url':_0x4d1fea?.[_0x2a4e00(0x188)],'force':_0x4d1fea?.['force'],'allowInsecureLocalhost':_0x4d1fea?.[_0x2a4e00(0x139)],'scope':_0x4d1fea?.[_0x2a4e00(0x191)]},_0x24f287),{'ready':!![],'skipped':![]};}catch(_0x4563de){return console['error']('\x0a❌\x20Profile\x20setup\x20failed:',_0x57ecd8[_0x2a4e00(0x141)](_0x4563de,Error)?_0x4563de[_0x2a4e00(0x154)]:_0x4563de),_0x57ecd8[_0x2a4e00(0x158)](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x49054a,_0x5d7463,_0x1aa46c){const _0x4fe1ef=_0x54248a,_0x1748e1={'xgEWw':function(_0x175fd4,_0x18eb29){return _0x175fd4===_0x18eb29;},'fsqNN':_0x4fe1ef(0x19a),'fdNSK':function(_0x198390){return _0x198390();},'JweSX':function(_0x2c9cd7,_0x1a7f5f){return _0x2c9cd7+_0x1a7f5f;},'NtMoT':_0x4fe1ef(0x17b),'mjUai':function(_0x5797d4,_0x4bb028){return _0x5797d4(_0x4bb028);},'VDHNy':function(_0x428a19){return _0x428a19();},'ziXnj':'auth','KWOaN':_0x4fe1ef(0x181),'edkBf':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','CsXnp':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','RaeRf':'plugin','nqVyR':function(_0x59d8f0,_0x5a0bd5){return _0x59d8f0&&_0x5a0bd5;},'YlPXC':_0x4fe1ef(0x176),'jARZu':'skills','uHNIe':function(_0x2f4acd,_0x14744e){return _0x2f4acd instanceof _0x14744e;},'qyVRB':function(_0x4d640a,_0x8cf69f){return _0x4d640a===_0x8cf69f;},'vcjEX':'profile','xlASN':function(_0x51a25a,_0x21d917){return _0x51a25a+_0x21d917;}};console[_0x4fe1ef(0x168)]('\x0a🚀\x20Ranger\x20Setup\x0a');const _0x52d301=process['stdin']['isTTY']&&process['stdout'][_0x4fe1ef(0x16c)];!_0x52d301&&!_0x5d7463?.['scope']&&(console[_0x4fe1ef(0x168)](_0x4fe1ef(0x196)),_0x5d7463={..._0x5d7463,'scope':'user'});const _0x30e2f9=_0x1748e1['xgEWw'](_0x5d7463?.['scope'],_0x4fe1ef(0x163));_0x1aa46c?.['trackPhaseStart'](_0x1748e1[_0x4fe1ef(0x14a)]);const _0xb75cfc=_0x1748e1['fdNSK'](findGitRoot);if(!_0xb75cfc&&!_0x30e2f9){await _0x1aa46c?.[_0x4fe1ef(0x151)](_0x4fe1ef(0x19a),new Error(_0x4fe1ef(0x1a2)));throw new Error(_0x1748e1[_0x4fe1ef(0x171)](_0x1748e1[_0x4fe1ef(0x194)],'or\x20use\x20--scope\x20user\x20to\x20install\x20at\x20the\x20user\x20level\x20without\x20a\x20project.'));}_0x1aa46c?.[_0x4fe1ef(0x150)](_0x1748e1[_0x4fe1ef(0x14a)]);const _0x3a1dba=!_0x1748e1['mjUai'](existsSync,_0x1748e1[_0x4fe1ef(0x17e)](getRangerDir)),{path:_0x3bce74}=await ensureRangerDir(_0x30e2f9?_0x4fe1ef(0x163):undefined);if(_0x5d7463?.['skipAuth'])console['log']('✓\x20Skipping\x20authentication\x20(--skip-auth)'),_0x1aa46c?.['trackPhaseEnd'](_0x1748e1[_0x4fe1ef(0x1a4)],{'isFirstRun':_0x3a1dba,'method':_0x4fe1ef(0x169)});else{_0x1aa46c?.['trackPhaseStart'](_0x4fe1ef(0x16b));const _0x1739d2=await authenticate(_0x49054a);_0x1aa46c?.[_0x4fe1ef(0x150)](_0x4fe1ef(0x16b),{'isFirstRun':_0x3a1dba,'method':_0x1739d2['method']});}_0x1aa46c?.[_0x4fe1ef(0x157)](_0x1748e1['KWOaN']);_0x5d7463?.[_0x4fe1ef(0x165)]?console[_0x4fe1ef(0x168)](_0x1748e1['edkBf']):await ensureChromium(_0x5d7463?.[_0x4fe1ef(0x164)]);_0x1aa46c?.[_0x4fe1ef(0x150)](_0x1748e1['KWOaN'],{'isFirstRun':_0x3a1dba,'skipped':!!_0x5d7463?.['skipChromium']});!_0x30e2f9&&await _0x1748e1[_0x4fe1ef(0x1a1)](writeRangerGitignore,_0x3bce74);console['log'](_0x1748e1[_0x4fe1ef(0x152)]);const _0x517ee3=_0x5d7463?.[_0x4fe1ef(0x191)],_0x5c6eaa=_0x5d7463?.[_0x4fe1ef(0x155)]??![];let _0x143463=null;_0x5c6eaa?(_0x1aa46c?.['trackPhaseStart']('plugin'),_0x143463=await _0x1748e1[_0x4fe1ef(0x1a1)](ensureOpencodePluginConfig,_0x517ee3),_0x1aa46c?.[_0x4fe1ef(0x150)]('plugin',{'isFirstRun':_0x3a1dba,'opencode':!![]})):(_0x1aa46c?.['trackPhaseStart'](_0x4fe1ef(0x147)),await ensureClaudePlugin(_0x517ee3),_0x1aa46c?.['trackPhaseEnd'](_0x1748e1[_0x4fe1ef(0x17a)],{'isFirstRun':_0x3a1dba}));if(_0x1748e1['nqVyR'](_0x5c6eaa,_0x143463)){_0x1aa46c?.['trackPhaseStart'](_0x4fe1ef(0x19d));try{await installSkill(_0x1748e1[_0x4fe1ef(0x133)],{'level':_0x143463['scope'],'cliVersion':_0x1748e1[_0x4fe1ef(0x17e)](getCurrentVersion),'platform':_0x4fe1ef(0x155)}),_0x1aa46c?.[_0x4fe1ef(0x150)](_0x1748e1['jARZu'],{'isFirstRun':_0x3a1dba,'opencode':!![]});}catch(_0x3fc13e){console[_0x4fe1ef(0x172)](_0x4fe1ef(0x15f),_0x1748e1[_0x4fe1ef(0x190)](_0x3fc13e,Error)?_0x3fc13e[_0x4fe1ef(0x154)]:_0x3fc13e),_0x1aa46c?.[_0x4fe1ef(0x150)](_0x1748e1['jARZu'],{'isFirstRun':_0x3a1dba,'opencode':!![],'failed':!![]});}}else _0x1aa46c?.[_0x4fe1ef(0x157)](_0x4fe1ef(0x19d)),await ensureClaudeSkills(_0x517ee3),_0x1aa46c?.[_0x4fe1ef(0x150)](_0x4fe1ef(0x19d),{'isFirstRun':_0x3a1dba});if(_0x5d7463?.['skipAuth'])console['log'](_0x4fe1ef(0x145));else{if(!_0x52d301&&!_0x5d7463?.[_0x4fe1ef(0x188)])console['log']('Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:'),console['log']('\x20\x20'+_0x1748e1[_0x4fe1ef(0x1a1)](bold,'ranger\x20profile\x20add\x20local')+'\x0a');else{_0x1aa46c?.[_0x4fe1ef(0x157)]('profile');const _0x56b08e=await ensureLocalEnv({'url':_0x5d7463?.[_0x4fe1ef(0x188)],'force':_0x5d7463?.['force'],'allowInsecureLocalhost':_0x5d7463?.[_0x4fe1ef(0x139)],'scope':_0x1748e1['qyVRB'](_0x5d7463?.['scope'],_0x4fe1ef(0x163))?_0x4fe1ef(0x163):undefined},_0x1aa46c);_0x1aa46c?.[_0x4fe1ef(0x150)](_0x1748e1[_0x4fe1ef(0x178)],{'isFirstRun':_0x3a1dba,'profileReady':_0x56b08e[_0x4fe1ef(0x18a)],'userSkipped':_0x56b08e[_0x4fe1ef(0x169)]}),_0x56b08e[_0x4fe1ef(0x18a)]&&console[_0x4fe1ef(0x168)]('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}}if(_0x5c6eaa)console[_0x4fe1ef(0x168)](_0x4fe1ef(0x193)),console['log']('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console[_0x4fe1ef(0x168)]('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console[_0x4fe1ef(0x168)]('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x3149c6=_0x1748e1['mjUai'](bold,_0x4fe1ef(0x197));console['log'](_0x1748e1[_0x4fe1ef(0x18e)](_0x1748e1[_0x4fe1ef(0x171)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x3149c6+_0x4fe1ef(0x160),'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'),_0x4fe1ef(0x15d))+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
1
+ const _0x362f4a=_0x255a;(function(_0x187122,_0x4a7f8a){const _0x221343=_0x255a,_0x4b5a9a=_0x187122();while(!![]){try{const _0x11cafc=parseInt(_0x221343(0x18f))/0x1*(-parseInt(_0x221343(0x157))/0x2)+-parseInt(_0x221343(0x19c))/0x3+parseInt(_0x221343(0x1a3))/0x4+parseInt(_0x221343(0x15b))/0x5*(-parseInt(_0x221343(0x13a))/0x6)+parseInt(_0x221343(0x196))/0x7*(parseInt(_0x221343(0x138))/0x8)+parseInt(_0x221343(0x160))/0x9+parseInt(_0x221343(0x19a))/0xa;if(_0x11cafc===_0x4a7f8a)break;else _0x4b5a9a['push'](_0x4b5a9a['shift']());}catch(_0x22471e){_0x4b5a9a['push'](_0x4b5a9a['shift']());}}}(_0x30fd,0x706e1));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';function _0x255a(_0x30b8fd,_0x284415){_0x30b8fd=_0x30b8fd-0x137;const _0x30fdd5=_0x30fd();let _0x255a09=_0x30fdd5[_0x30b8fd];return _0x255a09;}import _0x8ebeba from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x2bdc7e=>_0x362f4a(0x139)+_0x2bdc7e+'\x1b[0m';export function getPlaywrightVersion(){const _0x47fd2f=_0x362f4a,_0x35c064={'TZtVc':_0x47fd2f(0x17a)};try{const _0x454ee5=require[_0x47fd2f(0x1a7)](_0x35c064['TZtVc']),_0x38a1e1=require(_0x454ee5);return _0x38a1e1['version'];}catch{return null;}}function _0x30fd(){const _0x16b842=['isTTY','executablePath','34peGpXK','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','UFRIS','23675ZqqHQF','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','JJZVc','trackPhaseEnd','✓\x20Created\x20.ranger/.gitignore','2849175IVcwTf','SEgcT','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','NgsOo','ncOVr','allowInsecureLocalhost','trackPhaseStart','install','\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a','YaMxq','playwright@','\x20install\x20chromium','.gitignore','sZdBr','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','url','local','organizationName','confirm','✓\x20Local\x20profile\x20already\x20exists','HKWvR','log','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','success','wYQrO','KsNzK','playwright/package.json','skills','skipChromium','...','ranger\x20profile\x20add\x20<name>','HeEwu','MOkno','RMKvz','TxsHg','✓\x20Stored\x20credentials\x20locally','\x20(fallback\x20version)','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','close','✓\x20Exported\x20credentials\x20for\x20CI','mMJFF','✓\x20~/.ranger/\x20directory\x20already\x20exists','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','\x20\x20npx\x20playwright@','opencode','wmPPt','user','21687HxuuSi','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','env','✓\x20Playwright\x20Chromium\x20browser\x20found','existing_token','\x0a⚠\x20Skipping\x20Chromium\x20installation.','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','10878lTkHSo','✓\x20Authenticated\x20to\x20','platform','error','660430JfXSfB','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','458253TMZqvy','XhDgZ','\x0aInstalling\x20Chromium\x20browser...\x0a','\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:','message','\x0a🚀\x20Ranger\x20Setup\x0a','rMcKS','3366368daGPJx','ePepz','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','resolve',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','inherit','profile','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','NiJmk','776ZSyFTp','\x1b[1m','498vudHVx','ouqMk','skipped','GYTxM','aOLPe','cNKoY','hCVSB','force','win32','\x0a\x20\x20','tWfOV','plugin','method','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','ToEmU','ozkms','xZxop','tqQbG','pFeIl','ready','SaTIz','The\x20required\x20version\x20(','ncxUr','chromium','nBMLb','irXlO','scope'];_0x30fd=function(){return _0x16b842;};return _0x30fd();}export function installChromiumBinary(_0x3e65a8,_0xdf90e0=![]){const _0x967e79=_0x362f4a,_0x59b52a={'XOxLs':_0x967e79(0x167),'RMKvz':function(_0x297c2c,_0x2597d4,_0x4c5c8a,_0x55e97c){return _0x297c2c(_0x2597d4,_0x4c5c8a,_0x55e97c);},'XhDgZ':'npx','ZSPkS':_0x967e79(0x1a9),'lfRzT':function(_0x369e30,_0x27dbf2){return _0x369e30===_0x27dbf2;},'IayCZ':_0x967e79(0x199)};return new Promise((_0x5c0f80,_0x161556)=>{const _0x56777e=_0x967e79,_0x1b09fc=[_0x56777e(0x16a)+_0x3e65a8,_0x59b52a['XOxLs'],..._0xdf90e0?['--with-deps']:[],'chromium'],_0x181635=_0x59b52a[_0x56777e(0x181)](spawn,_0x59b52a[_0x56777e(0x19d)],_0x1b09fc,{'stdio':['ignore',_0x56777e(0x1a9),_0x59b52a['ZSPkS']],'shell':_0x59b52a['lfRzT'](process[_0x56777e(0x198)],_0x56777e(0x142))});_0x181635['on'](_0x56777e(0x186),_0x2fe11a=>{_0x2fe11a===0x0?_0x5c0f80():_0x161556(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x2fe11a));}),_0x181635['on'](_0x59b52a['IayCZ'],_0x364a75=>{_0x161556(_0x364a75);});});}export async function authenticate(_0x1b7f96){const _0x4070f5=_0x362f4a,_0xb5ea5e={'ePepz':function(_0x206088,_0x40bdce){return _0x206088(_0x40bdce);},'rARMH':function(_0x56f360){return _0x56f360();},'tqQbG':function(_0x1eb254,_0x5ba6c6){return _0x1eb254(_0x5ba6c6);},'GYTxM':_0x4070f5(0x187),'UFRIS':_0x4070f5(0x183)};if(!_0x1b7f96){const _0xfc228d=await getToken();if(_0xfc228d){const _0x57595d=await _0xb5ea5e[_0x4070f5(0x1a4)](getCurrentUser,_0xfc228d);if(_0x57595d[_0x4070f5(0x177)])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x57595d['user'][_0x4070f5(0x171)]),{'token':_0xfc228d,'method':_0x4070f5(0x193)};}try{_0x1b7f96=await _0xb5ea5e['rARMH'](runDeviceAuthFlow);}catch(_0x2ff002){throw new Error('Authentication\x20failed:\x20'+(_0x2ff002 instanceof Error?_0x2ff002['message']:_0x2ff002));}const _0x551870=await _0xb5ea5e[_0x4070f5(0x1a4)](getCurrentUser,_0x1b7f96);if(!_0x551870[_0x4070f5(0x177)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x551870['error']);return console['log'](_0x4070f5(0x197)+_0x551870[_0x4070f5(0x18e)][_0x4070f5(0x171)]),{'token':_0x1b7f96,'method':'device_auth'};}console['log']('Validating\x20API\x20token...');const _0xf740d5=await getCurrentUser(_0x1b7f96);if(!_0xf740d5[_0x4070f5(0x177)]){if(_0xf740d5['status'])throw new Error('Authentication\x20failed:\x20'+_0xf740d5[_0x4070f5(0x199)]+_0x4070f5(0x176));else throw new Error(_0x4070f5(0x162)+_0xf740d5[_0x4070f5(0x199)]+_0x4070f5(0x159));}return console[_0x4070f5(0x175)](_0x4070f5(0x197)+_0xf740d5['user']['organizationName']),await _0xb5ea5e[_0x4070f5(0x14b)](storeToken,_0x1b7f96),console[_0x4070f5(0x175)](process[_0x4070f5(0x191)]['GITHUB_ENV']?_0xb5ea5e[_0x4070f5(0x13d)]:_0xb5ea5e[_0x4070f5(0x15a)]),{'token':_0x1b7f96,'method':'provided_token'};}export async function ensureRangerDir(_0x26da54){const _0x543f59=_0x362f4a,_0x55a9f4={'SEgcT':function(_0x2b49a0,_0x313221){return _0x2b49a0(_0x313221);},'xZxop':function(_0x1728eb,_0x1b104e,_0x5b8b81){return _0x1728eb(_0x1b104e,_0x5b8b81);},'mMJFF':'✓\x20Created\x20~/.ranger/\x20directory','ncxUr':_0x543f59(0x189)};void _0x26da54;const _0x1ff589=getRangerHomeDir();return!_0x55a9f4[_0x543f59(0x161)](existsSync,_0x1ff589)?(await _0x55a9f4[_0x543f59(0x14a)](mkdir,_0x1ff589,{'recursive':!![]}),console['log'](_0x55a9f4[_0x543f59(0x188)]),{'path':_0x1ff589,'installed':!![]}):(console[_0x543f59(0x175)](_0x55a9f4[_0x543f59(0x150)]),{'path':_0x1ff589,'installed':![]});}export async function ensureChromium(_0x3e7b08=![]){const _0xbd6958=_0x362f4a,_0x583d1e={'HeEwu':function(_0x278dda,_0x11d6f0){return _0x278dda(_0x11d6f0);},'ufiZn':function(_0x12d129){return _0x12d129();},'cNKoY':function(_0x590425,_0x3bfac5){return _0x590425??_0x3bfac5;},'nbtzY':_0xbd6958(0x172),'nOoAL':_0xbd6958(0x167),'YvTeT':_0xbd6958(0x184),'UrnvL':_0xbd6958(0x19e),'QUPPW':function(_0x134bb5,_0x2f4031,_0x43c719){return _0x134bb5(_0x2f4031,_0x43c719);},'DyetX':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','TxsHg':_0xbd6958(0x194)};let _0x3ab0f7=![];try{const _0x122475=chromium[_0xbd6958(0x156)]();_0x3ab0f7=_0x583d1e[_0xbd6958(0x17f)](existsSync,_0x122475);}catch{_0x3ab0f7=![];}if(_0x3ab0f7)return console[_0xbd6958(0x175)](_0xbd6958(0x192)),![];const _0x125b00=_0x583d1e['ufiZn'](getPlaywrightVersion),_0x216322=_0x583d1e[_0xbd6958(0x13f)](_0x125b00,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x4ead79=!_0x125b00,_0x2f1ceb=process['stdin'][_0xbd6958(0x155)]&&process['stdout'][_0xbd6958(0x155)];let _0x5d2a17=!![];if(_0x2f1ceb){const {install:_0x4dd187}=await _0x8ebeba['prompt']([{'type':_0x583d1e['nbtzY'],'name':_0x583d1e['nOoAL'],'message':_0x4ead79?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x216322+'\x20now?':_0xbd6958(0x14f)+_0x216322+_0xbd6958(0x1a8),'default':!![]}]);_0x5d2a17=_0x4dd187;}else console[_0xbd6958(0x175)](_0xbd6958(0x195)+_0x216322+(_0x4ead79?_0x583d1e['YvTeT']:'')+_0xbd6958(0x17d));if(_0x5d2a17){console[_0xbd6958(0x175)](_0x583d1e['UrnvL']);try{await _0x583d1e['QUPPW'](installChromiumBinary,_0x216322,_0x3e7b08),console['log'](_0x583d1e['DyetX']);}catch(_0x8f9d3a){console[_0xbd6958(0x199)](_0xbd6958(0x18a),_0x8f9d3a instanceof Error?_0x8f9d3a['message']:_0x8f9d3a),console[_0xbd6958(0x175)]('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),console[_0xbd6958(0x175)](_0xbd6958(0x18b)+_0x216322+'\x20install\x20chromium');}}else console[_0xbd6958(0x175)](_0x583d1e[_0xbd6958(0x182)]),console['log']('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),console['log'](_0xbd6958(0x18b)+_0x216322+_0xbd6958(0x16b));return!![];}export async function writeRangerGitignore(_0x24835a){const _0x5a61eb=_0x362f4a,_0x452c9f={'bawkX':_0x5a61eb(0x16c),'NgsOo':function(_0x5b7b9c,_0x1063f9,_0x21c509){return _0x5b7b9c(_0x1063f9,_0x21c509);},'XJKYj':_0x5a61eb(0x15f)},_0x2d2476=join(_0x24835a,_0x452c9f['bawkX']),_0x39a6d5=_0x5a61eb(0x168);await _0x452c9f[_0x5a61eb(0x163)](writeFile,_0x2d2476,_0x39a6d5),console[_0x5a61eb(0x175)](_0x452c9f['XJKYj']);}export async function ensureLocalEnv(_0xa0ac5f,_0xffe200){const _0x5459ea=_0x362f4a,_0x8305ae={'SWlrA':function(_0x2cad9b){return _0x2cad9b();},'urNoe':function(_0x7a0f58,_0x4f0d46){return _0x7a0f58!==_0x4f0d46;},'gbqFp':function(_0x109210,_0x56ad23){return _0x109210===_0x56ad23;},'ozkms':function(_0x20bd1a,_0x473b7b,_0x1e12e7){return _0x20bd1a(_0x473b7b,_0x1e12e7);},'oFoNz':_0x5459ea(0x170),'YaMxq':_0x5459ea(0x173)};if(!_0x8305ae['SWlrA'](findGitRoot)&&_0x8305ae['urNoe'](_0xa0ac5f?.[_0x5459ea(0x154)],_0x5459ea(0x18e)))return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.'),{'ready':![],'skipped':!![]};const _0x11d244=_0x8305ae['gbqFp'](_0xa0ac5f?.[_0x5459ea(0x154)],'user')?getRangerHomeDir():undefined;if(_0x8305ae[_0x5459ea(0x149)](findExistingEnv,'local',{'locations':[_0x8305ae['oFoNz']],'rangerDir':_0x11d244}))return console['log'](_0x8305ae[_0x5459ea(0x169)]),{'ready':!![],'skipped':![]};try{return await addEnv(_0x5459ea(0x170),{'url':_0xa0ac5f?.['url'],'force':_0xa0ac5f?.[_0x5459ea(0x141)],'allowInsecureLocalhost':_0xa0ac5f?.['allowInsecureLocalhost'],'scope':_0xa0ac5f?.['scope']},_0xffe200),{'ready':!![],'skipped':![]};}catch(_0x12bed2){return console['error']('\x0a❌\x20Profile\x20setup\x20failed:',_0x12bed2 instanceof Error?_0x12bed2['message']:_0x12bed2),{'ready':![],'skipped':![]};}}export async function start(_0x3b7634,_0x796122,_0x2a35aa){const _0x3da4e3=_0x362f4a,_0x4af574={'ouqMk':function(_0x3fe0c4,_0x459a03){return _0x3fe0c4!==_0x459a03;},'ncOVr':function(_0x48e824,_0x20b1b0){return _0x48e824+_0x20b1b0;},'rMcKS':function(_0x4e994c,_0x4ee65f){return _0x4e994c(_0x4ee65f);},'wmPPt':'user','tWfOV':function(_0x19ca2c,_0xac3775){return _0x19ca2c(_0xac3775);},'odhNs':function(_0x35d948){return _0x35d948();},'KsNzK':'✓\x20Skipping\x20authentication\x20(--skip-auth)','YjbVy':'auth','HKWvR':_0x3da4e3(0x13c),'sZdBr':function(_0xdaa07c,_0xd722a7){return _0xdaa07c(_0xd722a7);},'pFeIl':_0x3da4e3(0x151),'uuwGB':_0x3da4e3(0x1a6),'JJZVc':'plugin','MOkno':_0x3da4e3(0x17b),'NiJmk':function(_0x2455a1,_0x4e91f7,_0x2d8ac2){return _0x2455a1(_0x4e91f7,_0x2d8ac2);},'Nctyx':'ranger','SaTIz':function(_0x2a6415,_0xd7ef36){return _0x2a6415 instanceof _0xd7ef36;},'ZIoqG':_0x3da4e3(0x1a5),'ToEmU':function(_0x1c5ad8,_0x5a5d70,_0x2cb9be){return _0x1c5ad8(_0x5a5d70,_0x2cb9be);},'BLxyy':'profile','aOLPe':function(_0x464774,_0x1da712){return _0x464774+_0x1da712;},'wYQrO':function(_0x35315a,_0x39d7f7){return _0x35315a(_0x39d7f7);},'yCcvB':_0x3da4e3(0x147),'irXlO':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','hCVSB':'verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','nBMLb':'/ranger:enable'};console['log'](_0x3da4e3(0x1a1));_0x4af574[_0x3da4e3(0x13b)](_0x796122?.['scope'],undefined)&&_0x796122[_0x3da4e3(0x154)]!=='user'&&(console['error'](_0x4af574[_0x3da4e3(0x164)]('ranger\x20setup\x20--scope='+_0x4af574['rMcKS'](String,_0x796122[_0x3da4e3(0x154)])+'\x20is\x20no\x20longer\x20supported.\x20'+_0x3da4e3(0x158),'project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.')),process['exit'](0x1));_0x796122={..._0x796122,'scope':_0x4af574[_0x3da4e3(0x18d)]};const _0x4550d0=!_0x4af574['tWfOV'](existsSync,_0x4af574['odhNs'](getRangerHomeDir));await ensureRangerDir(_0x4af574[_0x3da4e3(0x18d)]);if(_0x796122?.['skipAuth'])console[_0x3da4e3(0x175)](_0x4af574[_0x3da4e3(0x179)]),_0x2a35aa?.[_0x3da4e3(0x15e)](_0x4af574['YjbVy'],{'isFirstRun':_0x4550d0,'method':_0x4af574[_0x3da4e3(0x174)]});else{_0x2a35aa?.[_0x3da4e3(0x166)]('auth');const _0x5922a9=await _0x4af574[_0x3da4e3(0x16d)](authenticate,_0x3b7634);_0x2a35aa?.[_0x3da4e3(0x15e)]('auth',{'isFirstRun':_0x4550d0,'method':_0x5922a9[_0x3da4e3(0x146)]});}_0x2a35aa?.[_0x3da4e3(0x166)]('chromium');_0x796122?.[_0x3da4e3(0x17c)]?console[_0x3da4e3(0x175)](_0x3da4e3(0x16e)):await ensureChromium(_0x796122?.['withDeps']);_0x2a35aa?.[_0x3da4e3(0x15e)](_0x4af574[_0x3da4e3(0x14c)],{'isFirstRun':_0x4550d0,'skipped':!!_0x796122?.[_0x3da4e3(0x17c)]}),console['log'](_0x4af574['uuwGB']);const _0x4a190d=_0x796122?.['scope'],_0xe1dfc2=_0x796122?.['opencode']??![];let _0x3522ed=null;_0xe1dfc2?(_0x2a35aa?.['trackPhaseStart'](_0x4af574[_0x3da4e3(0x15d)]),_0x3522ed=await _0x4af574[_0x3da4e3(0x1a2)](ensureOpencodePluginConfig,_0x4a190d),_0x2a35aa?.[_0x3da4e3(0x15e)](_0x3da4e3(0x145),{'isFirstRun':_0x4550d0,'opencode':!![]})):(_0x2a35aa?.['trackPhaseStart']('plugin'),await ensureClaudePlugin(_0x4a190d),_0x2a35aa?.[_0x3da4e3(0x15e)](_0x4af574['JJZVc'],{'isFirstRun':_0x4550d0}));if(_0xe1dfc2&&_0x3522ed){_0x2a35aa?.[_0x3da4e3(0x166)](_0x4af574[_0x3da4e3(0x180)]);try{await _0x4af574[_0x3da4e3(0x137)](installSkill,_0x4af574['Nctyx'],{'level':_0x3522ed['scope'],'cliVersion':getCurrentVersion(),'platform':_0x3da4e3(0x18c)}),_0x2a35aa?.[_0x3da4e3(0x15e)](_0x3da4e3(0x17b),{'isFirstRun':_0x4550d0,'opencode':!![]});}catch(_0x51b245){console['warn'](_0x3da4e3(0x1ab),_0x4af574[_0x3da4e3(0x14e)](_0x51b245,Error)?_0x51b245[_0x3da4e3(0x1a0)]:_0x51b245),_0x2a35aa?.[_0x3da4e3(0x15e)]('skills',{'isFirstRun':_0x4550d0,'opencode':!![],'failed':!![]});}}else _0x2a35aa?.[_0x3da4e3(0x166)](_0x4af574['MOkno']),await _0x4af574[_0x3da4e3(0x144)](ensureClaudeSkills,_0x4a190d),_0x2a35aa?.['trackPhaseEnd'](_0x4af574[_0x3da4e3(0x180)],{'isFirstRun':_0x4550d0});if(_0x796122?.['skipAuth'])console['log'](_0x4af574['ZIoqG']);else{if(_0x796122?.['url']){_0x2a35aa?.[_0x3da4e3(0x166)](_0x3da4e3(0x1aa));const _0xceec18=await _0x4af574[_0x3da4e3(0x148)](ensureLocalEnv,{'url':_0x796122[_0x3da4e3(0x16f)],'force':_0x796122?.['force'],'allowInsecureLocalhost':_0x796122?.[_0x3da4e3(0x165)],'scope':'user'},_0x2a35aa);_0x2a35aa?.['trackPhaseEnd'](_0x4af574['BLxyy'],{'isFirstRun':_0x4550d0,'profileReady':_0xceec18[_0x3da4e3(0x14d)],'userSkipped':_0xceec18[_0x3da4e3(0x13c)]});}else console[_0x3da4e3(0x175)](_0x4af574[_0x3da4e3(0x164)](_0x4af574['aOLPe'](_0x3da4e3(0x19f)+(_0x3da4e3(0x143)+_0x4af574[_0x3da4e3(0x178)](bold,_0x3da4e3(0x17e))),'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)')+_0x3da4e3(0x190),_0x3da4e3(0x15c)));}if(_0xe1dfc2)console[_0x3da4e3(0x175)](_0x4af574['yCcvB']),console['log'](_0x3da4e3(0x185)),console['log'](_0x4af574[_0x3da4e3(0x153)]),console[_0x3da4e3(0x175)](_0x4af574[_0x3da4e3(0x140)]);else{const _0x1323c7=_0x4af574[_0x3da4e3(0x16d)](bold,_0x4af574[_0x3da4e3(0x152)]);console[_0x3da4e3(0x175)](_0x4af574[_0x3da4e3(0x13e)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x1323c7+'\x20and\x20prompt\x20the\x20coding','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with')+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'+_0x3da4e3(0x19b));}}
@@ -1 +1 @@
1
- const _0x562cb6=_0x1ce5;(function(_0x3eac58,_0x2dea1c){const _0xe33065=_0x1ce5,_0x25b555=_0x3eac58();while(!![]){try{const _0x4361ea=-parseInt(_0xe33065(0x20d))/0x1+parseInt(_0xe33065(0x217))/0x2+parseInt(_0xe33065(0x1ce))/0x3*(-parseInt(_0xe33065(0x1cd))/0x4)+-parseInt(_0xe33065(0x1fc))/0x5+-parseInt(_0xe33065(0x1c7))/0x6+-parseInt(_0xe33065(0x1eb))/0x7+parseInt(_0xe33065(0x213))/0x8*(parseInt(_0xe33065(0x1e5))/0x9);if(_0x4361ea===_0x2dea1c)break;else _0x25b555['push'](_0x25b555['shift']());}catch(_0x354173){_0x25b555['push'](_0x25b555['shift']());}}}(_0x984d,0xa421f));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';function _0x1ce5(_0x24d27d,_0x58d5dc){_0x24d27d=_0x24d27d-0x1b8;const _0x984d39=_0x984d();let _0x1ce5c8=_0x984d39[_0x24d27d];return _0x1ce5c8;}import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';function _0x984d(){const _0x5f3a2b=['rFZwI','\x1b[1m','\x0a---\x20OpenCode\x20Plugin\x20---','GDFyq','Organization:\x20','PCTTY','IXIVA','6204240hFlrsZ','\x20\x20Run:\x20ranger\x20update','clQJh','rbEcy','debug','CBCwd','23212hmwvkQ','123CfhkSW','Root:\x20','version','toString','unknown','data','not_configured','path','GRuda','some','YzsDX','length','xToXK','displayName','JiOFE','configured','Version:\x20','not_installed','\x20\x20\x20\x20Settings:\x20','isDirectory','disabled','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','(not\x20found)','1773iSsslY','\x0a---\x20Profiles\x20---','opencode','details','scope','MQbNf','5349162BYqvXl','status','RDjKT','yfRcB','user','\x20\x20Not\x20installed','WPsQK','IHohX','No\x20skills\x20installed','cyWnm','parse','plaintext','none','\x0a📊\x20Ranger\x20Status\x0a','EJgME','stderr','enabled','4422160aelpvj','YRtrW','API\x20Environment:\x20','UXCyh','RpQfR','tiLAd','TPWbl','YPocP','DEBUG','\x1b]8;;file://','@ranger-testing/opencode-plugin','DsOKE','ignore','YgqwA','laYzW','config','\x20\x20Not\x20configured','628990pKhFCz','push','ranger@trailhead','name','nJxGx','OHnBL','166528gPcVKo','match','\x20\x20\x20\x20','\x1b]8;;\x07','242172cCIgzc','jQKlt','aKmny','isArray','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','log','\x20\x20User-level:','YpArt','API\x20URL:\x20','\x1b[0m','bpkaE'];_0x984d=function(){return _0x5f3a2b;};return _0x984d();}import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x293f69=>_0x562cb6(0x1c1)+_0x293f69+_0x562cb6(0x1be),link=(_0x51ba32,_0x474d0e)=>_0x562cb6(0x205)+_0x51ba32+'\x07'+(_0x474d0e||_0x51ba32)+_0x562cb6(0x216);async function getOpencodePluginStatus(){const _0x5187d2=_0x562cb6,_0x5d3989={'WPsQK':function(_0x2b4e23,_0x4320c9){return _0x2b4e23!==_0x4320c9;},'YzsDX':'string','YkQAQ':'opencode-plugin','aKmny':function(_0x2f4206,_0xd04341){return _0x2f4206(_0xd04341);},'kQzZW':'not_configured','YgqwA':_0x5187d2(0x1e7),'xToXK':'pipe','BYyrI':_0x5187d2(0x1d3),'MQbNf':'close'};return new Promise(_0xe5aa13=>{const _0x8bcf61=_0x5187d2,_0x3e315f={'gQfZn':function(_0xbef3c9,_0x33ee9d){const _0xd98c16=_0x1ce5;return _0x5d3989[_0xd98c16(0x1f1)](_0xbef3c9,_0x33ee9d);},'hopXx':_0x5d3989[_0x8bcf61(0x1d8)],'VVshs':_0x5d3989['YkQAQ'],'OHnBL':function(_0x5c4cf8,_0x39a696){return _0x5c4cf8(_0x39a696);},'nJxGx':function(_0x5e46e1,_0xa22e65){const _0x5f445c=_0x8bcf61;return _0x5d3989[_0x5f445c(0x219)](_0x5e46e1,_0xa22e65);},'laYzW':function(_0x1da3dd,_0x41e56d){return _0x1da3dd>_0x41e56d;},'QYAFt':function(_0x15a88c,_0x28253a){return _0x15a88c(_0x28253a);},'YPocP':_0x5d3989['kQzZW']},_0x26257a=spawn(_0x5d3989[_0x8bcf61(0x209)],[_0x8bcf61(0x1cb),_0x8bcf61(0x20b)],{'stdio':[_0x8bcf61(0x208),_0x5d3989[_0x8bcf61(0x1da)],_0x5d3989['xToXK']]});let _0x35f299='';_0x26257a['stdout']?.['on'](_0x5d3989['BYyrI'],_0x59adbb=>{_0x35f299+=_0x59adbb['toString']();}),_0x26257a[_0x8bcf61(0x1fa)]?.['on']('data',_0x5c0e9b=>{const _0x3aea7c=_0x8bcf61;_0x35f299+=_0x5c0e9b[_0x3aea7c(0x1d1)]();}),_0x26257a['on']('error',()=>{const _0x333d85=_0x8bcf61;_0xe5aa13({'status':_0x333d85(0x1df)});}),_0x26257a['on'](_0x5d3989[_0x8bcf61(0x1ea)],_0x85741e=>{const _0x4a2c44=_0x8bcf61;if(_0x85741e!==0x0){_0x3e315f['OHnBL'](_0xe5aa13,{'status':'not_installed'});return;}const _0x1379d1=_0x35f299['trim']();let _0x9f5ef2=null;if(_0x1379d1)try{_0x9f5ef2=JSON['parse'](_0x1379d1);}catch{const _0x57429d=_0x1379d1['match'](/\{[\s\S]*\}$/);if(_0x57429d)try{_0x9f5ef2=JSON[_0x4a2c44(0x1f5)](_0x57429d[0x0]);}catch{_0x9f5ef2=null;}}const _0x34af8a=Array[_0x4a2c44(0x21a)](_0x9f5ef2?.['plugin'])?_0x9f5ef2?.['plugin']:[],_0x4c4146=_0x34af8a[_0x4a2c44(0x1d7)](_0xb3f061=>{const _0x15e758=_0x4a2c44;if(_0x3e315f['gQfZn'](typeof _0xb3f061,_0x3e315f['hopXx']))return![];return _0xb3f061['includes'](_0x15e758(0x206))||_0xb3f061['includes'](_0x3e315f['VVshs']);});if(_0x4c4146){_0x3e315f[_0x4a2c44(0x211)](_0xe5aa13,{'status':_0x4a2c44(0x1dd),'details':_0x3e315f[_0x4a2c44(0x20a)](_0x34af8a[_0x4a2c44(0x1d9)],0x0)?_0x34af8a[_0x4a2c44(0x1d9)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0x34af8a[_0x4a2c44(0x1d9)]>0x0){_0x3e315f['QYAFt'](_0xe5aa13,{'status':_0x3e315f[_0x4a2c44(0x203)],'details':_0x34af8a[_0x4a2c44(0x1d9)]+'\x20plugin(s)\x20configured'});return;}_0x3e315f[_0x4a2c44(0x212)](_0xe5aa13,{'status':'not_configured'});});});}async function getSkillsFromDir(_0x280204,_0x238f3c){const _0x44fd5a=_0x562cb6,_0x33e89c={'majsn':function(_0x2e293f,_0x6c7657){return _0x2e293f(_0x6c7657);},'JiOFE':function(_0x28559c,_0x181ce1,_0x3c594e,_0x45f3a6){return _0x28559c(_0x181ce1,_0x3c594e,_0x45f3a6);},'vrmwF':function(_0x332da3,_0x4e85bf,_0x14b1a4){return _0x332da3(_0x4e85bf,_0x14b1a4);}};if(!_0x33e89c['majsn'](existsSync,_0x280204))return[];const _0x3c6bee=[];try{const _0xb92371=await readdir(_0x280204,{'withFileTypes':!![]});for(const _0x503570 of _0xb92371){if(_0x503570[_0x44fd5a(0x1e1)]()){const _0x4bbc18=_0x33e89c[_0x44fd5a(0x1dc)](join,_0x280204,_0x503570['name'],'SKILL.md');if(_0x33e89c['majsn'](existsSync,_0x4bbc18)){let _0x55ebce=_0x503570['name'];try{const _0x329e31=await _0x33e89c['vrmwF'](readFile,_0x4bbc18,'utf-8'),_0x11c457=_0x329e31[_0x44fd5a(0x214)](/name:\s*(.+)/);_0x11c457&&(_0x55ebce=_0x11c457[0x1]['trim']());}catch{}_0x3c6bee[_0x44fd5a(0x20e)]({'name':_0x503570['name'],'displayName':_0x55ebce,'path':_0x4bbc18,'level':_0x238f3c});}}}}catch{return[];}return _0x3c6bee;}async function getInstalledSkills(){const _0x50a47a=_0x562cb6,_0x2d85da={'UXCyh':function(_0x95699e,_0x3e5232,_0x21ad45){return _0x95699e(_0x3e5232,_0x21ad45);},'YRtrW':function(_0x1cd49f){return _0x1cd49f();},'CXVBO':function(_0x105be0,_0x42b682,_0x440316){return _0x105be0(_0x42b682,_0x440316);}},[_0x5ad94a,_0x97263f]=await Promise['all']([_0x2d85da[_0x50a47a(0x1ff)](getSkillsFromDir,_0x2d85da[_0x50a47a(0x1fd)](getProjectSkillsDir),'project'),_0x2d85da['CXVBO'](getSkillsFromDir,getUserSkillsDir(),_0x50a47a(0x1ef))]);return{'project':_0x5ad94a,'user':_0x97263f};}async function getEnvironments(){const _0x1aee0e=_0x562cb6,_0x4d009f={'MihdI':function(_0x5ecb13,_0x323bdf){return _0x5ecb13(_0x323bdf);},'rbEcy':function(_0x35fec2,_0x513338,_0x3e8fc2){return _0x35fec2(_0x513338,_0x3e8fc2);},'DsOKE':'settings.json','RDjKT':function(_0x3de7c6,_0x5272b8,_0x34641d){return _0x3de7c6(_0x5272b8,_0x34641d);},'xhoyt':'auth.json.enc','IXIVA':_0x1aee0e(0x1e4),'QSHHP':function(_0x124060,_0x578dd0){return _0x124060===_0x578dd0;},'HxDZk':function(_0x1241f8,_0x2a41b3){return _0x1241f8(_0x2a41b3);}},{envNames:_0x259003,activeEnv:_0x31064c}=await getEnvNames(),_0x4df9fa=getRangerDir();if(!_0x4d009f['HxDZk'](existsSync,_0x4df9fa))return{'envs':[],'activeEnv':null};const _0x38af41=_0x259003['map'](_0x4dce2a=>{const _0x130c36=_0x1aee0e,_0x543324=_0x4d009f['MihdI'](getEnvDir,_0x4dce2a),_0x1b9546=_0x4d009f[_0x130c36(0x1ca)](join,_0x543324,_0x4d009f[_0x130c36(0x207)]),_0x17eeba=_0x4d009f[_0x130c36(0x1ed)](join,_0x543324,'auth.json'),_0xeef90b=join(_0x543324,_0x4d009f['xhoyt']);return{'name':_0x4dce2a,'settingsPath':existsSync(_0x1b9546)?_0x1b9546:_0x4d009f[_0x130c36(0x1c6)],'hasPlaintextAuth':existsSync(_0x17eeba),'hasEncryptedAuth':existsSync(_0xeef90b),'isActive':_0x4d009f['QSHHP'](_0x4dce2a,_0x31064c)};});return{'envs':_0x38af41,'activeEnv':_0x31064c};}export async function status(){const _0x39d51d=_0x562cb6,_0x1a1cf7={'saacv':_0x39d51d(0x1f8),'GDFyq':function(_0x2142b5){return _0x2142b5();},'uXVKO':function(_0x50c37c,_0xb35244){return _0x50c37c(_0xb35244);},'rFZwI':function(_0x589942,_0x321dd8,_0x410513){return _0x589942(_0x321dd8,_0x410513);},'RpQfR':function(_0x2ec88f,_0x26ccfd){return _0x2ec88f(_0x26ccfd);},'etXYr':function(_0x3c6317,_0x52ca37){return _0x3c6317!==_0x52ca37;},'BVazS':function(_0x429478){return _0x429478();},'TPWbl':function(_0x2476dd,_0x1525e3){return _0x2476dd(_0x1525e3);},'IfcoK':_0x39d51d(0x206),'tiLAd':function(_0x427f3a,_0x586e16){return _0x427f3a===_0x586e16;},'PCTTY':_0x39d51d(0x20c),'CBCwd':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','EJgME':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','fgUjM':_0x39d51d(0x20f),'wypzm':_0x39d51d(0x1d2),'GRuda':_0x39d51d(0x1fb),'rxwUS':_0x39d51d(0x1e2),'bpkaE':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','jQKlt':function(_0x3efa0a,_0x201ed5){return _0x3efa0a+_0x201ed5;},'cyWnm':_0x39d51d(0x1f3),'YpArt':'\x20\x20Project-level:','IHohX':_0x39d51d(0x1bb),'axtlP':function(_0x5a9c23,_0x7c8142){return _0x5a9c23(_0x7c8142);},'yfRcB':'\x20(active)','clQJh':'encrypted','edVzn':_0x39d51d(0x1f6),'DCuzg':_0x39d51d(0x1f7),'rwdvP':function(_0x254125,_0x4b64d0,_0x45b4e4){return _0x254125(_0x4b64d0,_0x45b4e4);}};console['log'](_0x1a1cf7['saacv']);const _0x52365a=process['cwd'](),_0x50a2ff=_0x1a1cf7['GDFyq'](getRangerDir);if(!_0x1a1cf7['uXVKO'](existsSync,_0x50a2ff)){console[_0x39d51d(0x1ba)]('Root:\x20'+link(_0x52365a,bold(basename(_0x52365a)))),console[_0x39d51d(0x1ba)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log'](_0x39d51d(0x1cf)+_0x1a1cf7[_0x39d51d(0x1c0)](link,_0x52365a,_0x1a1cf7[_0x39d51d(0x200)](bold,basename(_0x52365a))));const _0x4ad8ea=getCurrentVersion(),_0x9fa63a=_0x1a1cf7[_0x39d51d(0x1c3)](getLatestVersion);if(_0x9fa63a['version']&&_0x1a1cf7['etXYr'](_0x9fa63a['version'],_0x4ad8ea))console[_0x39d51d(0x1ba)]('Version:\x20'+_0x4ad8ea+'\x20(latest:\x20'+_0x9fa63a['version']+')'),console['log'](_0x39d51d(0x1c8));else _0x9fa63a[_0x39d51d(0x1d0)]?console['log']('Version:\x20'+_0x4ad8ea+'\x20(up\x20to\x20date)'):console['log'](_0x39d51d(0x1de)+_0x4ad8ea);const _0x49f44b=await _0x1a1cf7['BVazS'](getToken);if(_0x49f44b){const _0x240072=await getCurrentUser(_0x49f44b);_0x240072['success']?console['log'](_0x39d51d(0x1c4)+bold(_0x240072['user']['organizationName'])):(console[_0x39d51d(0x1ba)](_0x39d51d(0x1b8)),console[_0x39d51d(0x1ba)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env'][_0x39d51d(0x204)]&&(console['log'](_0x39d51d(0x1fe)+getCurrentEnvironment()),console['log'](_0x39d51d(0x1bd)+getApiBaseUrl()));console['log'](_0x39d51d(0x1c2));const _0x26a1e4=await getOpencodePluginStatus();if(_0x26a1e4['status']==='configured')console[_0x39d51d(0x1ba)]('\x20\x20'+_0x1a1cf7[_0x39d51d(0x202)](bold,_0x1a1cf7['IfcoK'])+':\x20configured'),_0x26a1e4[_0x39d51d(0x1e8)]&&console['log']('\x20\x20'+_0x26a1e4['details']);else _0x1a1cf7[_0x39d51d(0x201)](_0x26a1e4[_0x39d51d(0x1ec)],_0x39d51d(0x1d4))?(console[_0x39d51d(0x1ba)](_0x1a1cf7[_0x39d51d(0x1c5)]),_0x26a1e4[_0x39d51d(0x1e8)]&&console[_0x39d51d(0x1ba)]('\x20\x20'+_0x26a1e4[_0x39d51d(0x1e8)]),console[_0x39d51d(0x1ba)](_0x1a1cf7[_0x39d51d(0x1cc)])):console[_0x39d51d(0x1ba)](_0x1a1cf7[_0x39d51d(0x1f9)]);console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x38e8ca=await getPluginInfo(_0x1a1cf7['fgUjM']);if(_0x38e8ca){const _0x2fbce8=_0x38e8ca[_0x39d51d(0x1e9)]||_0x1a1cf7['wypzm'],_0x443c69=_0x38e8ca['enabled']?_0x1a1cf7[_0x39d51d(0x1d6)]:_0x1a1cf7['rxwUS'];console['log']('\x20\x20'+_0x1a1cf7['RpQfR'](bold,_0x1a1cf7['fgUjM'])+':\x20installed\x20('+_0x2fbce8+',\x20'+_0x443c69+')');}else console[_0x39d51d(0x1ba)](_0x39d51d(0x1f0)),console[_0x39d51d(0x1ba)](_0x1a1cf7[_0x39d51d(0x1bf)]);console[_0x39d51d(0x1ba)]('\x0a---\x20Skills\x20---');const {project:_0x531037,user:_0x490b54}=await getInstalledSkills(),_0x2851a8=_0x531037['filter'](_0x477b80=>RANGER_MANAGED_SKILLS['includes'](_0x477b80[_0x39d51d(0x210)])),_0x49341e=_0x490b54['filter'](_0xd720ab=>RANGER_MANAGED_SKILLS['includes'](_0xd720ab['name'])),_0x354e16=_0x1a1cf7[_0x39d51d(0x218)](_0x2851a8['length'],_0x49341e[_0x39d51d(0x1d9)]);if(_0x1a1cf7['tiLAd'](_0x354e16,0x0))console[_0x39d51d(0x1ba)](_0x1a1cf7[_0x39d51d(0x1f4)]),console[_0x39d51d(0x1ba)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x2851a8['length']>0x0){console['log'](_0x1a1cf7[_0x39d51d(0x1bc)]);for(const _0x5038c7 of _0x2851a8){console[_0x39d51d(0x1ba)](_0x39d51d(0x215)+bold(_0x5038c7[_0x39d51d(0x1db)])+':\x20'+link(_0x5038c7['path'],basename(_0x5038c7[_0x39d51d(0x1d5)])));}}if(_0x49341e[_0x39d51d(0x1d9)]>0x0){console['log'](_0x1a1cf7[_0x39d51d(0x1f2)]);for(const _0x1f6cfb of _0x49341e){console['log'](_0x39d51d(0x215)+bold(_0x1f6cfb[_0x39d51d(0x1db)])+':\x20'+link(_0x1f6cfb['path'],_0x1a1cf7['axtlP'](basename,_0x1f6cfb[_0x39d51d(0x1d5)])));}}}console['log'](_0x39d51d(0x1e6));const {envs:_0x2ab9a1,activeEnv:_0x2a2d7f}=await getEnvironments();if(_0x1a1cf7[_0x39d51d(0x201)](_0x2ab9a1[_0x39d51d(0x1d9)],0x0))console[_0x39d51d(0x1ba)]('No\x20profiles\x20configured'),console['log'](_0x39d51d(0x1b9));else{for(const _0xca7358 of _0x2ab9a1){const _0x14383f=_0xca7358['isActive']?_0x1a1cf7[_0x39d51d(0x1ee)]:'',_0x4afc05=_0xca7358['hasEncryptedAuth']?_0x1a1cf7[_0x39d51d(0x1c9)]:_0xca7358['hasPlaintextAuth']?_0x1a1cf7['edVzn']:_0x1a1cf7['DCuzg'];console[_0x39d51d(0x1ba)]('\x20\x20'+_0x1a1cf7[_0x39d51d(0x202)](bold,_0xca7358[_0x39d51d(0x210)])+_0x14383f),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x4afc05),_0x1a1cf7['etXYr'](_0xca7358['settingsPath'],'(not\x20found)')&&console[_0x39d51d(0x1ba)](_0x39d51d(0x1e0)+_0x1a1cf7['rwdvP'](link,_0xca7358['settingsPath'],basename(_0xca7358['settingsPath'])));}!_0x2a2d7f&&(console['log']('\x0a\x20\x20No\x20active\x20profile\x20set'),console['log'](_0x39d51d(0x1e3)+_0x2ab9a1['map'](_0x401cad=>_0x401cad['name'])['join'](',\x20')+')'));}console[_0x39d51d(0x1ba)]('');}
1
+ const _0x20f506=_0x243f;(function(_0x3de954,_0x2d4333){const _0xae7b41=_0x243f,_0x53b498=_0x3de954();while(!![]){try{const _0x3791fb=-parseInt(_0xae7b41(0x1db))/0x1+parseInt(_0xae7b41(0x1e5))/0x2*(-parseInt(_0xae7b41(0x222))/0x3)+parseInt(_0xae7b41(0x200))/0x4+-parseInt(_0xae7b41(0x215))/0x5+-parseInt(_0xae7b41(0x1ed))/0x6*(parseInt(_0xae7b41(0x1ee))/0x7)+-parseInt(_0xae7b41(0x1cd))/0x8+-parseInt(_0xae7b41(0x220))/0x9*(-parseInt(_0xae7b41(0x22b))/0xa);if(_0x3791fb===_0x2d4333)break;else _0x53b498['push'](_0x53b498['shift']());}catch(_0x576fd8){_0x53b498['push'](_0x53b498['shift']());}}}(_0x92c9,0xd680e));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x92c9(){const _0x523b1f=['lrdEK','name','\x0a---\x20Profiles\x20---','details','FJTUQ','log','OoHUE','path','disabled','qTpVJ','putkK','\x20\x20Run:\x20ranger\x20setup\x20[token]','\x20\x20\x20\x20','No\x20skills\x20installed','string','length','plugin','DpEON','match','data','4499075ycbbkV','env','(not\x20found)','BKqqI','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','hasEncryptedAuth','oeuuq','Xhzft','SJgrr','\x0a\x20\x20No\x20active\x20profile\x20set','\x20plugin(s)\x20configured','38817FITFCO','\x20(up\x20to\x20date)','132tQknvU','version','scope','\x0a📊\x20Ranger\x20Status\x0a','opencode-plugin','\x20\x20\x20\x20Settings:\x20','JpnYj','Organization:\x20','DEBUG','13730JJduUW','configured','some','8592192EQadAG','displayName','config','API\x20Token:\x20✗\x20Not\x20found','includes','trim','LiBND','IfEgm','\x20(active)','AlUoU','@ranger-testing/opencode-plugin','\x20\x20Not\x20installed','parse','\x20\x20Not\x20configured','602960gvXvht','user','Root:\x20','nTtdb','\x0a---\x20OpenCode\x20Plugin\x20---','gBXHb','stderr','settingsPath',':\x20configured','opencode','53282lZqzky','Version:\x20','FCmyP','none','not_configured','status','isDirectory','API\x20URL:\x20','12WCOwPF','4867163KgkjFG','\x1b]8;;file://','ZwUhu','jKKue','toString','pipe','PIcsr','encrypted','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','ranger@trailhead','oVFzE','push','SvWTE','enabled','plaintext','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','\x1b]8;;\x07','cwd','385912AeZzQz'];_0x92c9=function(){return _0x523b1f;};return _0x92c9();}import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';function _0x243f(_0x559f26,_0x219bd1){_0x559f26=_0x559f26-0x1cc;const _0x92c9a3=_0x92c9();let _0x243f84=_0x92c9a3[_0x559f26];return _0x243f84;}const bold=_0x543e6c=>'\x1b[1m'+_0x543e6c+'\x1b[0m',link=(_0x451ddf,_0x183f08)=>_0x20f506(0x1ef)+_0x451ddf+'\x07'+(_0x183f08||_0x451ddf)+_0x20f506(0x1fe);async function getOpencodePluginStatus(){const _0xbce8e8=_0x20f506,_0x471dc6={'CqyTZ':_0xbce8e8(0x226),'QsAxR':function(_0x7f04d7,_0x2b9afa){return _0x7f04d7>_0x2b9afa;},'sdXOc':'debug','PIcsr':_0xbce8e8(0x214)};return new Promise(_0x2151c9=>{const _0x2dd75a=_0xbce8e8,_0x4971f7={'ZwUhu':_0x2dd75a(0x20f),'LiBND':_0x471dc6['CqyTZ'],'sNibO':function(_0x163402,_0x41d8d7){return _0x471dc6['QsAxR'](_0x163402,_0x41d8d7);}},_0x92e6e0=spawn(_0x2dd75a(0x1e4),[_0x471dc6['sdXOc'],_0x2dd75a(0x1cf)],{'stdio':['ignore',_0x2dd75a(0x1f3),'pipe']});let _0x3c5e63='';_0x92e6e0['stdout']?.['on'](_0x471dc6[_0x2dd75a(0x1f4)],_0x4506fb=>{_0x3c5e63+=_0x4506fb['toString']();}),_0x92e6e0[_0x2dd75a(0x1e1)]?.['on'](_0x471dc6['PIcsr'],_0x116057=>{const _0x40e2ad=_0x2dd75a;_0x3c5e63+=_0x116057[_0x40e2ad(0x1f2)]();}),_0x92e6e0['on']('error',()=>{_0x2151c9({'status':'not_installed'});}),_0x92e6e0['on']('close',_0x35192f=>{const _0x2b933f=_0x2dd75a;if(_0x35192f!==0x0){_0x2151c9({'status':'not_installed'});return;}const _0x985bc3=_0x3c5e63['trim']();let _0x200df5=null;if(_0x985bc3)try{_0x200df5=JSON[_0x2b933f(0x1d9)](_0x985bc3);}catch{const _0x2a2f3b=_0x985bc3[_0x2b933f(0x213)](/\{[\s\S]*\}$/);if(_0x2a2f3b)try{_0x200df5=JSON['parse'](_0x2a2f3b[0x0]);}catch{_0x200df5=null;}}const _0x4650a0=Array['isArray'](_0x200df5?.['plugin'])?_0x200df5?.[_0x2b933f(0x211)]:[],_0x564252=_0x4650a0[_0x2b933f(0x1cc)](_0x1217fe=>{const _0x1de103=_0x2b933f;if(typeof _0x1217fe!==_0x4971f7[_0x1de103(0x1f0)])return![];return _0x1217fe[_0x1de103(0x1d1)](_0x1de103(0x1d7))||_0x1217fe[_0x1de103(0x1d1)](_0x4971f7[_0x1de103(0x1d3)]);});if(_0x564252){_0x2151c9({'status':'configured','details':_0x4650a0['length']>0x0?_0x4650a0[_0x2b933f(0x210)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0x4971f7['sNibO'](_0x4650a0['length'],0x0)){_0x2151c9({'status':_0x2b933f(0x1e9),'details':_0x4650a0[_0x2b933f(0x210)]+_0x2b933f(0x21f)});return;}_0x2151c9({'status':'not_configured'});});});}async function getSkillsFromDir(_0x391727,_0x523dd4){const _0x142d63=_0x20f506,_0x562dfe={'nTtdb':function(_0x3d0753,_0x96a4c0){return _0x3d0753(_0x96a4c0);},'ACmOa':'SKILL.md','AlUoU':function(_0x14826c,_0x436be8,_0x518031){return _0x14826c(_0x436be8,_0x518031);},'IfEgm':'utf-8'};if(!_0x562dfe[_0x142d63(0x1de)](existsSync,_0x391727))return[];const _0x132f37=[];try{const _0x188b5d=await readdir(_0x391727,{'withFileTypes':!![]});for(const _0x134d67 of _0x188b5d){if(_0x134d67[_0x142d63(0x1eb)]()){const _0x485090=join(_0x391727,_0x134d67['name'],_0x562dfe['ACmOa']);if(existsSync(_0x485090)){let _0x64c8c7=_0x134d67['name'];try{const _0x31c7bd=await _0x562dfe[_0x142d63(0x1d6)](readFile,_0x485090,_0x562dfe[_0x142d63(0x1d4)]),_0x49d80b=_0x31c7bd[_0x142d63(0x213)](/name:\s*(.+)/);_0x49d80b&&(_0x64c8c7=_0x49d80b[0x1][_0x142d63(0x1d2)]());}catch{}_0x132f37[_0x142d63(0x1f9)]({'name':_0x134d67['name'],'displayName':_0x64c8c7,'path':_0x485090,'level':_0x523dd4});}}}}catch{return[];}return _0x132f37;}async function getInstalledSkills(){const [_0x5a17ed,_0x45a629]=await Promise['all']([getSkillsFromDir(getProjectSkillsDir(),'project'),getSkillsFromDir(getUserSkillsDir(),'user')]);return{'project':_0x5a17ed,'user':_0x45a629};}async function getEnvironments(){const _0x221ac1=_0x20f506,_0x418eb4={'BKqqI':function(_0x248bde,_0x4a6749){return _0x248bde(_0x4a6749);},'DnSdB':function(_0x46f68e,_0x221e89,_0x29d749){return _0x46f68e(_0x221e89,_0x29d749);},'oeuuq':'auth.json','JpnYj':function(_0x310e68,_0x263aef,_0x287046){return _0x310e68(_0x263aef,_0x287046);},'SJgrr':'(not\x20found)','gBXHb':function(_0x51c603,_0x2d2317){return _0x51c603(_0x2d2317);},'Xhzft':function(_0x4e032b,_0x4ced0f){return _0x4e032b===_0x4ced0f;}},{envNames:_0x3413fa,activeEnv:_0x53bd72}=await getEnvNames(),_0x1f8be9=getRangerDir();if(!_0x418eb4[_0x221ac1(0x218)](existsSync,_0x1f8be9))return{'envs':[],'activeEnv':null};const _0xc00d16=_0x3413fa['map'](_0xf3cb53=>{const _0x24e547=_0x221ac1,_0x4825ba=_0x418eb4[_0x24e547(0x218)](getEnvDir,_0xf3cb53),_0x56f0e0=_0x418eb4['DnSdB'](join,_0x4825ba,'settings.json'),_0x23194f=join(_0x4825ba,_0x418eb4[_0x24e547(0x21b)]),_0x3682fa=_0x418eb4[_0x24e547(0x228)](join,_0x4825ba,'auth.json.enc');return{'name':_0xf3cb53,'settingsPath':existsSync(_0x56f0e0)?_0x56f0e0:_0x418eb4[_0x24e547(0x21d)],'hasPlaintextAuth':_0x418eb4[_0x24e547(0x1e0)](existsSync,_0x23194f),'hasEncryptedAuth':_0x418eb4['BKqqI'](existsSync,_0x3682fa),'isActive':_0x418eb4[_0x24e547(0x21c)](_0xf3cb53,_0x53bd72)};});return{'envs':_0xc00d16,'activeEnv':_0x53bd72};}export async function status(){const _0xc6c7f9=_0x20f506,_0x3ef07f={'MgMBF':function(_0x56143c){return _0x56143c();},'FCmyP':function(_0x2aee5e,_0x2d5c67){return _0x2aee5e(_0x2d5c67);},'jKKue':function(_0x175dfe,_0x12e0fb){return _0x175dfe(_0x12e0fb);},'fesZd':function(_0x101139){return _0x101139();},'dYDpw':function(_0x5452fd,_0x53a633){return _0x5452fd!==_0x53a633;},'TEykG':function(_0x16550d){return _0x16550d();},'feglv':_0xc6c7f9(0x22c),'OoHUE':_0xc6c7f9(0x1da),'oVFzE':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','lrdEK':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','bwENK':function(_0xaba7d,_0x5dbeda){return _0xaba7d(_0x5dbeda);},'SvWTE':'unknown','qTpVJ':'enabled','FJTUQ':'\x0a---\x20Skills\x20---','Pwxou':'\x20\x20Project-level:','Plxso':function(_0x430bb6,_0x187d44){return _0x430bb6>_0x187d44;},'dIBtY':'\x20\x20User-level:','PNJdf':function(_0x3186d2){return _0x3186d2();},'fNhHW':function(_0x5eb3a6,_0x367978){return _0x5eb3a6===_0x367978;},'putkK':'No\x20profiles\x20configured','DpEON':_0xc6c7f9(0x1d5),'HgSmp':function(_0x5e7cb4,_0x391bc8,_0x502afa){return _0x5e7cb4(_0x391bc8,_0x502afa);}};console['log'](_0xc6c7f9(0x225));const _0x23caa8=process[_0xc6c7f9(0x1ff)](),_0x269c04=_0x3ef07f['MgMBF'](getRangerDir);if(!existsSync(_0x269c04)){console['log'](_0xc6c7f9(0x1dd)+link(_0x23caa8,_0x3ef07f[_0xc6c7f9(0x1e7)](bold,_0x3ef07f['FCmyP'](basename,_0x23caa8)))),console[_0xc6c7f9(0x206)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log']('Root:\x20'+link(_0x23caa8,bold(_0x3ef07f[_0xc6c7f9(0x1f1)](basename,_0x23caa8))));const _0x4ab9d7=_0x3ef07f['fesZd'](getCurrentVersion),_0x517c74=_0x3ef07f['fesZd'](getLatestVersion);if(_0x517c74['version']&&_0x3ef07f['dYDpw'](_0x517c74[_0xc6c7f9(0x223)],_0x4ab9d7))console[_0xc6c7f9(0x206)](_0xc6c7f9(0x1e6)+_0x4ab9d7+'\x20(latest:\x20'+_0x517c74['version']+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x517c74[_0xc6c7f9(0x223)]?console['log']('Version:\x20'+_0x4ab9d7+_0xc6c7f9(0x221)):console[_0xc6c7f9(0x206)]('Version:\x20'+_0x4ab9d7);const _0xe9d349=await getToken();if(_0xe9d349){const _0x4e724c=await getCurrentUser(_0xe9d349);_0x4e724c['success']?console['log'](_0xc6c7f9(0x229)+bold(_0x4e724c[_0xc6c7f9(0x1dc)]['organizationName'])):(console['log'](_0xc6c7f9(0x1fd)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0xc6c7f9(0x206)](_0xc6c7f9(0x1d0)),console['log'](_0xc6c7f9(0x20c));process[_0xc6c7f9(0x216)][_0xc6c7f9(0x22a)]&&(console[_0xc6c7f9(0x206)]('API\x20Environment:\x20'+_0x3ef07f['TEykG'](getCurrentEnvironment)),console['log'](_0xc6c7f9(0x1ec)+getApiBaseUrl()));console['log'](_0xc6c7f9(0x1df));const _0x9d722c=await getOpencodePluginStatus();if(_0x9d722c[_0xc6c7f9(0x1ea)]===_0x3ef07f['feglv'])console['log']('\x20\x20'+_0x3ef07f['jKKue'](bold,_0xc6c7f9(0x1d7))+_0xc6c7f9(0x1e3)),_0x9d722c['details']&&console['log']('\x20\x20'+_0x9d722c[_0xc6c7f9(0x204)]);else _0x9d722c['status']==='not_configured'?(console['log'](_0x3ef07f[_0xc6c7f9(0x207)]),_0x9d722c[_0xc6c7f9(0x204)]&&console[_0xc6c7f9(0x206)]('\x20\x20'+_0x9d722c[_0xc6c7f9(0x204)]),console['log'](_0x3ef07f[_0xc6c7f9(0x1f8)])):console['log'](_0x3ef07f[_0xc6c7f9(0x201)]);console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0xebbdaf=await _0x3ef07f['bwENK'](getPluginInfo,_0xc6c7f9(0x1f7));if(_0xebbdaf){const _0x49f7e2=_0xebbdaf[_0xc6c7f9(0x224)]||_0x3ef07f[_0xc6c7f9(0x1fa)],_0x1eaccf=_0xebbdaf[_0xc6c7f9(0x1fb)]?_0x3ef07f[_0xc6c7f9(0x20a)]:_0xc6c7f9(0x209);console[_0xc6c7f9(0x206)]('\x20\x20'+bold(_0xc6c7f9(0x1f7))+':\x20installed\x20('+_0x49f7e2+',\x20'+_0x1eaccf+')');}else console[_0xc6c7f9(0x206)](_0xc6c7f9(0x1d8)),console[_0xc6c7f9(0x206)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console['log'](_0x3ef07f[_0xc6c7f9(0x205)]);const {project:_0x2ca7ad,user:_0x1cb9f8}=await getInstalledSkills(),_0x1abecc=_0x2ca7ad['filter'](_0x5aa7c9=>RANGER_MANAGED_SKILLS['includes'](_0x5aa7c9['name'])),_0x2c0ae1=_0x1cb9f8['filter'](_0x994357=>RANGER_MANAGED_SKILLS[_0xc6c7f9(0x1d1)](_0x994357['name'])),_0x3a8729=_0x1abecc[_0xc6c7f9(0x210)]+_0x2c0ae1[_0xc6c7f9(0x210)];if(_0x3a8729===0x0)console[_0xc6c7f9(0x206)](_0xc6c7f9(0x20e)),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x1abecc['length']>0x0){console[_0xc6c7f9(0x206)](_0x3ef07f['Pwxou']);for(const _0x2dd6f0 of _0x1abecc){console['log'](_0xc6c7f9(0x20d)+bold(_0x2dd6f0[_0xc6c7f9(0x1ce)])+':\x20'+link(_0x2dd6f0['path'],basename(_0x2dd6f0[_0xc6c7f9(0x208)])));}}if(_0x3ef07f['Plxso'](_0x2c0ae1[_0xc6c7f9(0x210)],0x0)){console[_0xc6c7f9(0x206)](_0x3ef07f['dIBtY']);for(const _0x216f49 of _0x2c0ae1){console[_0xc6c7f9(0x206)]('\x20\x20\x20\x20'+bold(_0x216f49['displayName'])+':\x20'+link(_0x216f49['path'],_0x3ef07f['FCmyP'](basename,_0x216f49[_0xc6c7f9(0x208)])));}}}console['log'](_0xc6c7f9(0x203));const {envs:_0x49e765,activeEnv:_0x58697a}=await _0x3ef07f['PNJdf'](getEnvironments);if(_0x3ef07f['fNhHW'](_0x49e765[_0xc6c7f9(0x210)],0x0))console[_0xc6c7f9(0x206)](_0x3ef07f[_0xc6c7f9(0x20b)]),console['log'](_0xc6c7f9(0x1f6));else{for(const _0x5b9ffc of _0x49e765){const _0x376ce7=_0x5b9ffc['isActive']?_0x3ef07f[_0xc6c7f9(0x212)]:'',_0x12e619=_0x5b9ffc[_0xc6c7f9(0x21a)]?_0xc6c7f9(0x1f5):_0x5b9ffc['hasPlaintextAuth']?_0xc6c7f9(0x1fc):_0xc6c7f9(0x1e8);console['log']('\x20\x20'+bold(_0x5b9ffc['name'])+_0x376ce7),console[_0xc6c7f9(0x206)]('\x20\x20\x20\x20Auth:\x20'+_0x12e619),_0x5b9ffc['settingsPath']!==_0xc6c7f9(0x217)&&console[_0xc6c7f9(0x206)](_0xc6c7f9(0x227)+_0x3ef07f['HgSmp'](link,_0x5b9ffc[_0xc6c7f9(0x1e2)],_0x3ef07f['bwENK'](basename,_0x5b9ffc['settingsPath'])));}!_0x58697a&&(console[_0xc6c7f9(0x206)](_0xc6c7f9(0x21e)),console[_0xc6c7f9(0x206)](_0xc6c7f9(0x219)+_0x49e765['map'](_0x3c7d10=>_0x3c7d10[_0xc6c7f9(0x202)])['join'](',\x20')+')'));}console['log']('');}
@@ -1 +1 @@
1
- function _0x12a7(_0x3171a0,_0x357f14){_0x3171a0=_0x3171a0-0x186;const _0x40d276=_0x40d2();let _0x12a7c2=_0x40d276[_0x3171a0];return _0x12a7c2;}(function(_0x1afa26,_0x58d2db){const _0x3c3c6=_0x12a7,_0x44c78c=_0x1afa26();while(!![]){try{const _0x22a4bb=parseInt(_0x3c3c6(0x1a0))/0x1+-parseInt(_0x3c3c6(0x1b3))/0x2*(-parseInt(_0x3c3c6(0x188))/0x3)+-parseInt(_0x3c3c6(0x1bf))/0x4+-parseInt(_0x3c3c6(0x1ae))/0x5*(parseInt(_0x3c3c6(0x18d))/0x6)+parseInt(_0x3c3c6(0x1a9))/0x7+-parseInt(_0x3c3c6(0x1a5))/0x8*(parseInt(_0x3c3c6(0x1ce))/0x9)+-parseInt(_0x3c3c6(0x196))/0xa*(-parseInt(_0x3c3c6(0x18f))/0xb);if(_0x22a4bb===_0x58d2db)break;else _0x44c78c['push'](_0x44c78c['shift']());}catch(_0x527dd2){_0x44c78c['push'](_0x44c78c['shift']());}}}(_0x40d2,0x48576));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x32eeb1,_0x502fa0,_0x449907){const _0x12d9d4=_0x12a7,_0x1e7549={'UrBEJ':function(_0x479bf7,_0x32632a){return _0x479bf7(_0x32632a);},'SfdbV':function(_0x1173c8,_0x51e01a){return _0x1173c8(_0x51e01a);},'QCjSz':function(_0x2f974e,_0x20ef1c,_0x46f77a,_0x535c1b){return _0x2f974e(_0x20ef1c,_0x46f77a,_0x535c1b);},'BHQxZ':_0x12d9d4(0x19a),'ujeNZ':'close'};return new Promise(_0x889138=>{const _0x17fc36=_0x12d9d4,_0x163160={'ohNNB':function(_0x1a674f,_0x1a4ec8){return _0x1e7549['SfdbV'](_0x1a674f,_0x1a4ec8);}};let _0x4d1bb2=![],_0x2e90da;const _0x1ab7ed=_0x324634=>{const _0x6aa1d3=_0x12a7;if(_0x4d1bb2)return;_0x4d1bb2=!![],_0x2e90da&&clearTimeout(_0x2e90da),_0x1e7549[_0x6aa1d3(0x1c5)](_0x889138,_0x324634);},_0xeaf166=_0x1e7549[_0x17fc36(0x1c8)](spawn,_0x32eeb1,_0x502fa0,{'stdio':[_0x17fc36(0x1d4),_0x449907?.[_0x17fc36(0x1cf)]??_0x17fc36(0x19a),_0x449907?.[_0x17fc36(0x1cf)]??_0x1e7549['BHQxZ']],'shell':process[_0x17fc36(0x190)]===_0x17fc36(0x1be)});_0x2e90da=_0x449907?.[_0x17fc36(0x1c9)]?setTimeout(()=>{_0xeaf166['kill'](),_0xeaf166['unref'](),_0x163160['ohNNB'](_0x1ab7ed,![]);},_0x449907['timeoutMs']):undefined,_0xeaf166['on'](_0x1e7549['ujeNZ'],_0x549fcb=>{_0x1ab7ed(_0x549fcb===0x0);}),_0xeaf166['on'](_0x17fc36(0x1b0),()=>{_0x1e7549['SfdbV'](_0x1ab7ed,![]);});});}async function runInstall(){const _0x192b6f=_0x12a7,_0x31db67={'Pbsyc':function(_0xd27e02,_0x5c28e9){return _0xd27e02(_0x5c28e9);},'TOMjF':function(_0x1b159a,_0xec7fd9){return _0x1b159a(_0xec7fd9);},'OkpYM':'npm','lkaxe':function(_0x4de595,_0x166c4e){return _0x4de595===_0x166c4e;},'Evtpo':_0x192b6f(0x18e)};return new Promise(_0x5116b5=>{const _0x3f2c82=_0x192b6f,_0x4042a1={'QiHrh':function(_0x148774,_0x1505cc){return _0x31db67['TOMjF'](_0x148774,_0x1505cc);}};console['log'](_0x3f2c82(0x1a7)+PACKAGE_NAME+'@latest...\x0a');const _0x33fb53=spawn(_0x31db67['OkpYM'],['install','-g',PACKAGE_NAME+_0x3f2c82(0x189)],{'stdio':['ignore',_0x3f2c82(0x19a),'inherit'],'shell':_0x31db67[_0x3f2c82(0x1bb)](process['platform'],_0x3f2c82(0x1be))});_0x33fb53['on'](_0x31db67[_0x3f2c82(0x1c0)],_0x4ef601=>{const _0x500dc6=_0x3f2c82;_0x31db67[_0x500dc6(0x1a1)](_0x5116b5,_0x4ef601===0x0);}),_0x33fb53['on'](_0x3f2c82(0x1b0),()=>{_0x4042a1['QiHrh'](_0x5116b5,![]);});});}async function updateClaudeMarketplace(){const _0x3b2bdc=_0x12a7,_0x55c323={'tspUN':function(_0x3cdcbd,_0x350c68,_0x194214,_0x5dde57){return _0x3cdcbd(_0x350c68,_0x194214,_0x5dde57);},'FmncZ':_0x3b2bdc(0x1b8),'pltLg':_0x3b2bdc(0x1d1),'uLLqU':'update','pnTRg':_0x3b2bdc(0x1d6),'EGsMy':_0x3b2bdc(0x1c4)},_0x43dc04=await _0x55c323[_0x3b2bdc(0x1cc)](runCommand,_0x55c323['FmncZ'],[_0x55c323[_0x3b2bdc(0x1d2)],_0x3b2bdc(0x1a4),_0x55c323[_0x3b2bdc(0x1b2)],_0x55c323['pnTRg']],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x43dc04)throw new Error(_0x55c323['EGsMy']);}async function updateClaudePlugin(_0x15bff4){const _0x3c7570=_0x12a7,_0x7abb99={'QrUuW':'plugin','ohlQN':'update','Eebwy':_0x3c7570(0x1b8),'AIVRs':function(_0x5a6320,_0x473f1e){return _0x5a6320??_0x473f1e;},'ohPOg':_0x3c7570(0x1ca)},_0x5999f5=[_0x7abb99[_0x3c7570(0x1d5)],_0x7abb99[_0x3c7570(0x1aa)],'ranger@trailhead'];_0x15bff4&&_0x5999f5['push']('--scope',_0x15bff4);const _0x201242=await runCommand(_0x7abb99['Eebwy'],_0x5999f5,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x201242){const _0x1e6282=_0x7abb99['AIVRs'](_0x15bff4,_0x7abb99['ohPOg']);throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x1e6282+'\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}}function isSkillInstalled(_0x44e7d0,_0xcc147d,_0x39aff2){const _0x254543=_0x12a7,_0x2d0331={'SeJFg':function(_0x3d8435,_0x534886){return _0x3d8435===_0x534886;},'zkwYt':function(_0x478b24,_0x5edd83){return _0x478b24(_0x5edd83);}},_0x3910f2=_0x2d0331[_0x254543(0x192)](_0x39aff2,_0x254543(0x197))?_0x2d0331[_0x254543(0x1ba)](getOpencodeSkillsDir,_0xcc147d):getSkillsDir(_0xcc147d),_0x406676=join(_0x3910f2,_0x44e7d0);return existsSync(_0x406676);}async function reinstallSkills(_0x4e4065){const _0x466b42=_0x12a7,_0x537065={'wweoM':_0x466b42(0x1cb),'SjMnu':'user','HFpCl':function(_0xcb9ea8,_0x21e120,_0x2d45c6,_0x601e80){return _0xcb9ea8(_0x21e120,_0x2d45c6,_0x601e80);},'ffAWB':'opencode','Ubqmy':_0x466b42(0x1b7)},_0x2843fd=[_0x537065[_0x466b42(0x1af)],_0x537065[_0x466b42(0x19d)]],_0x31d3cd=[];for(const _0xc32ef4 of _0x2843fd){for(const _0x507a7c of RANGER_MANAGED_SKILLS){_0x537065['HFpCl'](isSkillInstalled,_0x507a7c,_0xc32ef4,_0x466b42(0x1b8))&&_0x31d3cd['push']({'skillName':_0x507a7c,'level':_0xc32ef4,'platform':'claude'}),_0x537065['HFpCl'](isSkillInstalled,_0x507a7c,_0xc32ef4,_0x537065[_0x466b42(0x1c7)])&&_0x31d3cd['push']({'skillName':_0x507a7c,'level':_0xc32ef4,'platform':'opencode'});}}for(const _0x6c8386 of _0x2843fd){for(const _0x48e13c of DEPRECATED_SKILLS){await removeSkill(_0x48e13c,_0x6c8386);}}if(_0x31d3cd['length']===0x0){console['log'](_0x537065[_0x466b42(0x1d0)]);return;}console['log']('\x0aReinstalling\x20'+_0x31d3cd[_0x466b42(0x19e)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0xdeb2b5,level:_0x45c4d0,platform:_0x59b13c}of _0x31d3cd){try{await installSkill(_0xdeb2b5,{'level':_0x45c4d0,'cliVersion':_0x4e4065,'platform':_0x59b13c});}catch(_0xeed849){console['warn'](_0x466b42(0x199)+_0x59b13c+'\x20'+_0x45c4d0+_0x466b42(0x18c)+_0xdeb2b5+':',_0xeed849);}}}function _0x40d2(){const _0x22197f=['Evtpo','bZWss','KjzWP','Attempting\x20install\x20anyway...','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','UrBEJ','WEGIM','ffAWB','QCjSz','timeoutMs','user','project','tspUN','utf-8','17919OEAdxo','stdio','Ubqmy','plugin','pltLg','ranger@trailhead','ignore','QrUuW','trailhead','WrLpo','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','14361InHGru','@latest','JPekQ','YDPAu','\x20skill\x20','268266RgsKUg','close','85624lOvJOH','platform','\x0aCould\x20not\x20check\x20latest\x20version:\x20','SeJFg','split','log','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','450EidSky','opencode','✓\x20Migrated\x20active\x20profile\x20file','\x20\x20Failed\x20to\x20reinstall\x20','inherit','KoRbj','join','SjMnu','length','Update\x20failed.','414305rbJOPx','Pbsyc','.gitignore','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','marketplace','1184YhlxKy','\x0a✅\x20Update\x20complete!','\x0aInstalling\x20','active-feature.txt','1039395fTfLzl','ohlQN','yWhyf','Update\x20failed:\x20','findIndex','60rTqbpZ','wweoM','error','splice','uLLqU','240VrrQYG','\x0aSuccessfully\x20installed\x20latest\x20version.','CMlUr','yBffA','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','claude','fVIKB','zkwYt','lkaxe','trim',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','win32','1440000DURoXe'];_0x40d2=function(){return _0x22197f;};return _0x40d2();}async function ensureActiveProfileGitignored(){const _0xc3b5f=_0x12a7,_0x2ac0fe={'sdJNF':function(_0x418eed,_0x1c0ff2,_0x3ff7c7){return _0x418eed(_0x1c0ff2,_0x3ff7c7);},'yWhyf':function(_0x4ffac4){return _0x4ffac4();},'yBffA':_0xc3b5f(0x1a2),'bZWss':'utf-8'},_0x3b119b=_0x2ac0fe['sdJNF'](join,_0x2ac0fe[_0xc3b5f(0x1ab)](getRangerDir),_0x2ac0fe[_0xc3b5f(0x1b6)]);if(!existsSync(_0x3b119b))return![];let _0x5033c0='';try{_0x5033c0=await readFile(_0x3b119b,_0xc3b5f(0x1cd));}catch{return![];}const _0x52134b=_0x5033c0[_0xc3b5f(0x193)](/\r?\n/);if(_0x52134b['some'](_0xffca6e=>_0xffca6e[_0xc3b5f(0x1bc)]()==='active-profile.txt'))return![];let _0x4d152e=_0x52134b[_0xc3b5f(0x1ad)](_0x1e12dc=>_0x1e12dc[_0xc3b5f(0x1bc)]()===_0xc3b5f(0x1a8));_0x4d152e===-0x1&&(_0x4d152e=_0x52134b['length']);_0x52134b[_0xc3b5f(0x1b1)](_0x4d152e,0x0,'active-profile.txt');let _0x4e48b6=_0x52134b[_0xc3b5f(0x19c)]('\x0a');!_0x4e48b6['endsWith']('\x0a')&&(_0x4e48b6+='\x0a');try{await writeFile(_0x3b119b,_0x4e48b6,_0x2ac0fe[_0xc3b5f(0x1c1)]);}catch{return![];}return!![];}export async function update(){const _0x27e54d=_0x12a7,_0x39d585={'WEGIM':'Checking\x20for\x20updates...','JPekQ':_0x27e54d(0x1b4),'WrLpo':function(_0x5910d6,_0x2b2ca2,_0x2a9fd3){return _0x5910d6(_0x2b2ca2,_0x2a9fd3);},'KjzWP':function(_0xfdc79e,_0x35f8dc){return _0xfdc79e(_0x35f8dc);},'KoRbj':function(_0x48339c,_0x5daa33){return _0x48339c(_0x5daa33);},'ylbhj':function(_0x5de976){return _0x5de976();},'fVIKB':_0x27e54d(0x1a3),'hXwVb':'project','YDPAu':function(_0x49ca11){return _0x49ca11();},'SeMkv':_0x27e54d(0x195),'CMlUr':_0x27e54d(0x198)},_0x277c98=getCurrentVersion();console[_0x27e54d(0x194)]('\x0aCurrent\x20version:\x20'+_0x277c98),console['log'](_0x39d585[_0x27e54d(0x1c6)]);const _0x20605f=getLatestVersion();let _0x26d7cf=_0x277c98;if(!_0x20605f['version']){console['warn'](_0x27e54d(0x191)+_0x20605f['error']),console['log'](_0x27e54d(0x1c3));const _0x1b29eb=await runInstall();if(_0x1b29eb)console['log'](_0x39d585[_0x27e54d(0x18a)]),_0x26d7cf=getCurrentVersion();else throw new Error(_0x27e54d(0x1ac)+_0x20605f['error']);}else{const _0x32f6f8=_0x20605f['version'];console['log']('Latest\x20version:\x20\x20'+_0x32f6f8);const _0x2132cb=_0x39d585[_0x27e54d(0x1d7)](compareVersions,_0x277c98,_0x32f6f8);if(_0x2132cb===0x0)console[_0x27e54d(0x194)](_0x27e54d(0x187));else{if(_0x2132cb<0x0)console[_0x27e54d(0x194)]('\x0aYour\x20version\x20('+_0x277c98+_0x27e54d(0x1bd)+_0x32f6f8+').');else{const _0x2fddec=await runInstall();if(_0x2fddec)console[_0x27e54d(0x194)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x32f6f8),_0x26d7cf=_0x32f6f8;else throw new Error(_0x27e54d(0x19f));}}}await _0x39d585[_0x27e54d(0x1c2)](reinstallSkills,_0x26d7cf);const _0x4d4b33=await _0x39d585[_0x27e54d(0x1c2)](isMarketplaceAdded,'trailhead'),_0x5cb884=await _0x39d585[_0x27e54d(0x19b)](isPluginInstalled,_0x27e54d(0x1d3));_0x4d4b33&&(await _0x39d585['ylbhj'](updateClaudeMarketplace),console[_0x27e54d(0x194)](_0x39d585[_0x27e54d(0x1b9)]));if(_0x5cb884){const _0x102abd=await getPluginInfo(_0x27e54d(0x1d3));_0x102abd?.['scope']===_0x39d585['hXwVb']?(await updateClaudePlugin(_0x27e54d(0x1cb)),console[_0x27e54d(0x194)](_0x27e54d(0x186))):(await _0x39d585[_0x27e54d(0x18b)](updateClaudePlugin),console['log'](_0x39d585['SeMkv']));}const _0x10afbf=await migrateActiveProfileFile();_0x10afbf&&console['log'](_0x39d585[_0x27e54d(0x1b5)]);const _0x240e91=await ensureActiveProfileGitignored();console[_0x27e54d(0x194)](_0x27e54d(0x1a6));}
1
+ const _0x107145=_0x38bf;(function(_0x4eae07,_0x4daddb){const _0x336ba3=_0x38bf,_0x2f7cf3=_0x4eae07();while(!![]){try{const _0x1db0af=parseInt(_0x336ba3(0x203))/0x1*(parseInt(_0x336ba3(0x226))/0x2)+parseInt(_0x336ba3(0x20f))/0x3+-parseInt(_0x336ba3(0x20b))/0x4+-parseInt(_0x336ba3(0x1f3))/0x5*(-parseInt(_0x336ba3(0x23b))/0x6)+-parseInt(_0x336ba3(0x204))/0x7+parseInt(_0x336ba3(0x22a))/0x8*(parseInt(_0x336ba3(0x1fb))/0x9)+-parseInt(_0x336ba3(0x205))/0xa;if(_0x1db0af===_0x4daddb)break;else _0x2f7cf3['push'](_0x2f7cf3['shift']());}catch(_0x2033b3){_0x2f7cf3['push'](_0x2f7cf3['shift']());}}}(_0x3a04,0x9fd42));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';function _0x38bf(_0x3a1b92,_0x3ed212){_0x3a1b92=_0x3a1b92-0x1ea;const _0x3a047=_0x3a04();let _0x38bfcb=_0x3a047[_0x3a1b92];return _0x38bfcb;}import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getProjectRoot,getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x1b5775,_0x57be2b,_0x3ddfbb){const _0x361a8d=_0x38bf,_0x2cdf42={'PolRg':function(_0x46bd3c,_0x2a555c){return _0x46bd3c(_0x2a555c);},'UqxsT':function(_0x105900,_0x226898){return _0x105900===_0x226898;},'kmyBD':function(_0xd20601,_0xdffbd8,_0x119bbb,_0x5b7da2){return _0xd20601(_0xdffbd8,_0x119bbb,_0x5b7da2);},'hArSO':_0x361a8d(0x228),'hZGnR':function(_0x1dfdf3,_0x3d2d1d){return _0x1dfdf3===_0x3d2d1d;},'Esghv':function(_0x395ee5,_0x4cf7ee,_0x53f574){return _0x395ee5(_0x4cf7ee,_0x53f574);}};return new Promise(_0x2baa05=>{const _0x46c955=_0x361a8d,_0x538799={'whiND':function(_0x31da29,_0x4b9465){return _0x31da29(_0x4b9465);},'DZElg':function(_0x2b7104,_0x41f62f){return _0x2cdf42['UqxsT'](_0x2b7104,_0x41f62f);}};let _0x43cc9d=![],_0x1981d4;const _0x266c2c=_0x59298a=>{if(_0x43cc9d)return;_0x43cc9d=!![],_0x1981d4&&clearTimeout(_0x1981d4),_0x538799['whiND'](_0x2baa05,_0x59298a);},_0x516a9f=_0x2cdf42[_0x46c955(0x1ee)](spawn,_0x1b5775,_0x57be2b,{'stdio':['ignore',_0x3ddfbb?.['stdio']??_0x2cdf42[_0x46c955(0x215)],_0x3ddfbb?.[_0x46c955(0x232)]??_0x2cdf42[_0x46c955(0x215)]],'cwd':_0x3ddfbb?.['cwd'],'shell':_0x2cdf42['hZGnR'](process[_0x46c955(0x221)],'win32')});_0x1981d4=_0x3ddfbb?.['timeoutMs']?_0x2cdf42[_0x46c955(0x21e)](setTimeout,()=>{const _0x385153=_0x46c955;_0x516a9f['kill'](),_0x516a9f[_0x385153(0x239)](),_0x2cdf42[_0x385153(0x231)](_0x266c2c,![]);},_0x3ddfbb[_0x46c955(0x210)]):undefined,_0x516a9f['on']('close',_0x4b8de6=>{const _0x42586b=_0x46c955;_0x266c2c(_0x538799[_0x42586b(0x219)](_0x4b8de6,0x0));}),_0x516a9f['on'](_0x46c955(0x1f5),()=>{_0x266c2c(![]);});});}export function resolveDistTag(_0x43fff0){const _0x568923=_0x38bf,_0x31ccde={'LtKTU':_0x568923(0x1f9),'wyQbU':'beta','uhyDA':'latest'};if(/-alpha\./i['test'](_0x43fff0))return _0x31ccde['LtKTU'];if(/-beta\./i[_0x568923(0x208)](_0x43fff0))return _0x31ccde[_0x568923(0x1ea)];if(/-rc\./i[_0x568923(0x208)](_0x43fff0))return'rc';return _0x31ccde['uhyDA'];}function _0x3a04(){const _0x569aa6=['DZElg','Claude\x20plugin\x20update\x20failed\x20for\x20','bMYDl','some','MsKWN','Esghv','active-feature.txt','claude','platform','\x0a✅\x20Update\x20complete!','\x0aCould\x20not\x20check\x20latest\x20version:\x20','trim','...\x0a','37894CszwsL',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','inherit','TaUeU','8lCwhyX','\x20channel.','HACWM','geRzO','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','nAkNN','endsWith','PolRg','stdio','Attempting\x20install\x20anyway...','ranger@trailhead','Update\x20failed\x20for\x20@','Prerelease\x20channel\x20detected\x20(@','splice','KuPYR','unref','UsmWQ','960ioRizv','nKUDd','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','mgDYm','\x20ranger-managed\x20skill(s)...','opencode','slyei','RIbwK','\x20—\x20reinstalling\x20@','findIndex','local','xAWbJ','wyQbU','close','latest','user','kmyBD','\x0aInstalling\x20','install','Checking\x20for\x20updates...','utf-8','10750ElSPOR','PNcRD','error','\x0aReinstalling\x20','...','bCQBU','alpha','QrLeD','6402033qaghhL','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','trailhead','push','odpFe','length','Update\x20failed:\x20','22MuIRlW','3602277sUFjCO','13173710aVhQWU','project','rbDlG','test','hjRQv','\x0aSuccessfully\x20updated\x20to\x20version\x20','991192QrhoKI','wqFuM','log','ArSwE','3786801VCHEjD','timeoutMs','TBeop','tvyXZ','npm','plugin','hArSO','version','win32','yqGoH'];_0x3a04=function(){return _0x569aa6;};return _0x3a04();}async function runInstall(_0x8a4487=_0x107145(0x1ec)){const _0x1e2689=_0x107145,_0x4ddfa9={'rbDlG':function(_0x27d1c1,_0x14a878){return _0x27d1c1===_0x14a878;},'mgDYm':'inherit','JdVAV':_0x1e2689(0x1f5)};return new Promise(_0x434072=>{const _0x13b4f6=_0x1e2689,_0x14fdbf={'tvyXZ':function(_0x3279b1,_0x50e59b){const _0x35fd60=_0x38bf;return _0x4ddfa9[_0x35fd60(0x207)](_0x3279b1,_0x50e59b);}};console['log'](_0x13b4f6(0x1ef)+PACKAGE_NAME+'@'+_0x8a4487+_0x13b4f6(0x225));const _0x8fd60b=spawn(_0x13b4f6(0x213),[_0x13b4f6(0x1f0),'-g',PACKAGE_NAME+'@'+_0x8a4487],{'stdio':['ignore',_0x4ddfa9[_0x13b4f6(0x23e)],_0x4ddfa9['mgDYm']],'shell':process['platform']===_0x13b4f6(0x217)});_0x8fd60b['on'](_0x13b4f6(0x1eb),_0x49f801=>{const _0x1c689d=_0x13b4f6;_0x434072(_0x14fdbf[_0x1c689d(0x212)](_0x49f801,0x0));}),_0x8fd60b['on'](_0x4ddfa9['JdVAV'],()=>{_0x434072(![]);});});}async function updateClaudeMarketplace(){const _0x3e4cd0=_0x107145,_0x2ee5e7={'TBeop':function(_0x5e8f07,_0x129f5a,_0x149915,_0x56a539){return _0x5e8f07(_0x129f5a,_0x149915,_0x56a539);},'MsKWN':'update','PNcRD':_0x3e4cd0(0x1fe)},_0xf71ea7=await _0x2ee5e7[_0x3e4cd0(0x211)](runCommand,'claude',['plugin','marketplace',_0x2ee5e7[_0x3e4cd0(0x21d)],_0x2ee5e7[_0x3e4cd0(0x1f4)]],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0xf71ea7)throw new Error('Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}async function updateClaudePlugin(_0x428dd6='user'){const _0x1bead2=_0x107145,_0x543da4={'JUIVh':_0x1bead2(0x214),'xTGPH':function(_0x155bc2,_0x20a91c){return _0x155bc2!==_0x20a91c;},'ToKjy':_0x1bead2(0x1ed),'nAkNN':'--scope','HHXgq':function(_0x40b757,_0x27438e){return _0x40b757===_0x27438e;},'bFQkc':function(_0x2bae42){return _0x2bae42();}},_0x258a96=[_0x543da4['JUIVh'],'update',_0x1bead2(0x234)];_0x543da4['xTGPH'](_0x428dd6,_0x543da4['ToKjy'])&&_0x258a96['push'](_0x543da4[_0x1bead2(0x22f)],_0x428dd6);const _0x510e25=await runCommand(_0x1bead2(0x220),_0x258a96,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x428dd6===_0x1bead2(0x206)||_0x543da4['HHXgq'](_0x428dd6,'local')?_0x543da4['bFQkc'](getProjectRoot):undefined});if(!_0x510e25)throw new Error(_0x1bead2(0x21a)+_0x428dd6+_0x1bead2(0x23d));}function isSkillInstalled(_0x2d2fc8,_0x3b7146,_0x465619){const _0x11aadb=_0x107145,_0x436850={'uixkV':function(_0x32e734,_0x2bb665){return _0x32e734===_0x2bb665;},'TaUeU':_0x11aadb(0x240),'odpFe':function(_0x3fdeba,_0x397919){return _0x3fdeba(_0x397919);},'bCQBU':function(_0x4f4a1c,_0x59575d){return _0x4f4a1c(_0x59575d);},'ZGpGq':function(_0x593598,_0x44d9e4,_0x5888fb){return _0x593598(_0x44d9e4,_0x5888fb);}},_0x2ea8fd=_0x436850['uixkV'](_0x465619,_0x436850[_0x11aadb(0x229)])?_0x436850['odpFe'](getOpencodeSkillsDir,_0x3b7146):_0x436850[_0x11aadb(0x1f8)](getSkillsDir,_0x3b7146),_0x16c299=_0x436850['ZGpGq'](join,_0x2ea8fd,_0x2d2fc8);return _0x436850[_0x11aadb(0x200)](existsSync,_0x16c299);}async function reinstallSkills(_0x3cc1e0){const _0x31dcdc=_0x107145,_0x2865e5={'QrLeD':_0x31dcdc(0x1ed),'slyei':_0x31dcdc(0x220),'AEjka':function(_0x1417f4,_0x1b17a7,_0x2ddc9e,_0x56af69){return _0x1417f4(_0x1b17a7,_0x2ddc9e,_0x56af69);},'UsmWQ':_0x31dcdc(0x240),'KJFFN':function(_0x4e190a,_0x4464cd){return _0x4e190a===_0x4464cd;},'EtMAJ':_0x31dcdc(0x1fd)},_0x5f0c8e=[_0x31dcdc(0x206),_0x2865e5[_0x31dcdc(0x1fa)]],_0x267355=[];for(const _0x3148a8 of _0x5f0c8e){for(const _0x3bbdf2 of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x3bbdf2,_0x3148a8,_0x2865e5[_0x31dcdc(0x241)])&&_0x267355[_0x31dcdc(0x1ff)]({'skillName':_0x3bbdf2,'level':_0x3148a8,'platform':_0x2865e5[_0x31dcdc(0x241)]}),_0x2865e5['AEjka'](isSkillInstalled,_0x3bbdf2,_0x3148a8,_0x2865e5[_0x31dcdc(0x23a)])&&_0x267355['push']({'skillName':_0x3bbdf2,'level':_0x3148a8,'platform':_0x31dcdc(0x240)});}}for(const _0x4c3dca of _0x5f0c8e){for(const _0x1493ff of DEPRECATED_SKILLS){await removeSkill(_0x1493ff,_0x4c3dca);}}if(_0x2865e5['KJFFN'](_0x267355['length'],0x0)){console['log'](_0x2865e5['EtMAJ']);return;}console['log'](_0x31dcdc(0x1f6)+_0x267355[_0x31dcdc(0x201)]+_0x31dcdc(0x23f));for(const {skillName:_0x400451,level:_0x3bc37a,platform:_0x1809dd}of _0x267355){try{await installSkill(_0x400451,{'level':_0x3bc37a,'cliVersion':_0x3cc1e0,'platform':_0x1809dd});}catch(_0x39078b){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x1809dd+'\x20'+_0x3bc37a+'\x20skill\x20'+_0x400451+':',_0x39078b);}}}async function ensureActiveProfileGitignored(){const _0x285a8d=_0x107145,_0x4363e0={'vaUMy':function(_0x543ede,_0x108115,_0x44407b){return _0x543ede(_0x108115,_0x44407b);},'jpjSu':function(_0x2cfd5c,_0x41f3c2){return _0x2cfd5c(_0x41f3c2);},'CUPaH':function(_0xc42c70,_0x50b3bf){return _0xc42c70===_0x50b3bf;},'HACWM':'active-profile.txt','WCzNM':_0x285a8d(0x1f2)},_0x35d4e1=_0x4363e0['vaUMy'](join,getRangerDir(),'.gitignore');if(!_0x4363e0['jpjSu'](existsSync,_0x35d4e1))return![];let _0x26babc='';try{_0x26babc=await readFile(_0x35d4e1,'utf-8');}catch{return![];}const _0x17406b=_0x26babc['split'](/\r?\n/);if(_0x17406b[_0x285a8d(0x21c)](_0x11a4b1=>_0x11a4b1[_0x285a8d(0x224)]()==='active-profile.txt'))return![];let _0x158ac2=_0x17406b[_0x285a8d(0x244)](_0x3f525e=>_0x3f525e['trim']()===_0x285a8d(0x21f));_0x4363e0['CUPaH'](_0x158ac2,-0x1)&&(_0x158ac2=_0x17406b[_0x285a8d(0x201)]);_0x17406b[_0x285a8d(0x237)](_0x158ac2,0x0,_0x4363e0[_0x285a8d(0x22c)]);let _0x2e62c6=_0x17406b['join']('\x0a');!_0x2e62c6[_0x285a8d(0x230)]('\x0a')&&(_0x2e62c6+='\x0a');try{await writeFile(_0x35d4e1,_0x2e62c6,_0x4363e0['WCzNM']);}catch{return![];}return!![];}export async function update(){const _0x5012b5=_0x107145,_0x5d0719={'geRzO':function(_0x101805){return _0x101805();},'xAWbJ':function(_0x5ef760,_0x277ab3){return _0x5ef760(_0x277ab3);},'KdvwX':function(_0x145373,_0x2e9a79){return _0x145373!==_0x2e9a79;},'nKUDd':'latest','phRKG':function(_0x322c56){return _0x322c56();},'YnSRK':function(_0x38d855){return _0x38d855();},'yqGoH':_0x5012b5(0x233),'qQINa':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','fnDzx':function(_0x3d8c46,_0x1047ee){return _0x3d8c46<_0x1047ee;},'wqFuM':function(_0x514b12){return _0x514b12();},'hjRQv':function(_0x5e2084,_0x17bfcd){return _0x5e2084(_0x17bfcd);},'oWVdw':function(_0x9c2a3f,_0x26858a){return _0x9c2a3f(_0x26858a);},'RIbwK':_0x5012b5(0x234),'ArSwE':_0x5012b5(0x1fc),'BSYFt':'user','lvBnh':function(_0x102d9b,_0x55743b){return _0x102d9b===_0x55743b;},'KuPYR':_0x5012b5(0x206),'bMYDl':'\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','avVEH':_0x5012b5(0x222)},_0x149c50=_0x5d0719[_0x5012b5(0x22d)](getCurrentVersion);console['log']('\x0aCurrent\x20version:\x20'+_0x149c50);const _0x3917c9=_0x5d0719[_0x5012b5(0x246)](resolveDistTag,_0x149c50);if(_0x5d0719['KdvwX'](_0x3917c9,_0x5d0719[_0x5012b5(0x23c)])){console['log'](_0x5012b5(0x236)+_0x3917c9+').\x20Staying\x20on\x20'+_0x3917c9+_0x5012b5(0x243)+_0x3917c9+_0x5012b5(0x1f7));const _0x27e986=await runInstall(_0x3917c9);if(!_0x27e986)throw new Error(_0x5012b5(0x235)+_0x3917c9+_0x5012b5(0x22b));const _0x538b0e=_0x5d0719['phRKG'](getCurrentVersion);console[_0x5012b5(0x20d)]('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x3917c9+'.'),await reinstallSkills(_0x538b0e),await _0x5d0719['phRKG'](ensureActiveProfileGitignored),console['log'](_0x5012b5(0x222));return;}console[_0x5012b5(0x20d)](_0x5012b5(0x1f1));const _0x564ea3=_0x5d0719['YnSRK'](getLatestVersion);let _0x59c7c8=_0x149c50;if(!_0x564ea3['version']){console['warn'](_0x5012b5(0x223)+_0x564ea3[_0x5012b5(0x1f5)]),console[_0x5012b5(0x20d)](_0x5d0719[_0x5012b5(0x218)]);const _0x1d6436=await _0x5d0719['phRKG'](runInstall);if(_0x1d6436)console[_0x5012b5(0x20d)]('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x59c7c8=_0x5d0719[_0x5012b5(0x22d)](getCurrentVersion);else throw new Error(_0x5012b5(0x202)+_0x564ea3['error']);}else{const _0x215b01=_0x564ea3[_0x5012b5(0x216)];console['log']('Latest\x20version:\x20\x20'+_0x215b01);const _0x1fafeb=compareVersions(_0x149c50,_0x215b01);if(_0x1fafeb===0x0)console[_0x5012b5(0x20d)](_0x5d0719['qQINa']);else{if(_0x5d0719['fnDzx'](_0x1fafeb,0x0))console['log']('\x0aYour\x20version\x20('+_0x149c50+_0x5012b5(0x227)+_0x215b01+').');else{const _0xc65cdd=await _0x5d0719[_0x5012b5(0x20c)](runInstall);if(_0xc65cdd)console['log'](_0x5012b5(0x20a)+_0x215b01),_0x59c7c8=_0x215b01;else throw new Error('Update\x20failed.');}}}await _0x5d0719['xAWbJ'](reinstallSkills,_0x59c7c8);const _0x965188=await _0x5d0719['hjRQv'](isMarketplaceAdded,'trailhead'),_0x1a7993=await _0x5d0719['oWVdw'](isPluginInstalled,_0x5d0719[_0x5012b5(0x242)]);_0x965188&&(await updateClaudeMarketplace(),console[_0x5012b5(0x20d)](_0x5d0719[_0x5012b5(0x20e)]));if(_0x1a7993){const _0x185864=await _0x5d0719[_0x5012b5(0x209)](getPluginInfo,_0x5d0719['RIbwK']),_0x35e3ed=_0x185864?.['scope']??_0x5d0719['BSYFt'];await _0x5d0719['xAWbJ'](updateClaudePlugin,_0x35e3ed);if(_0x5d0719['lvBnh'](_0x35e3ed,_0x5d0719[_0x5012b5(0x238)]))console['log'](_0x5d0719[_0x5012b5(0x21b)]);else _0x35e3ed===_0x5012b5(0x245)?console['log']('\x0aClaude\x20plugin\x20updated\x20(local\x20scope).'):console[_0x5012b5(0x20d)](_0x5012b5(0x22e));}const _0x32e2ad=await _0x5d0719['phRKG'](ensureActiveProfileGitignored);console[_0x5012b5(0x20d)](_0x5d0719['avVEH']);}
@@ -1 +1 @@
1
- (function(_0x1b135a,_0x1988a6){const _0x3af473=_0x2846,_0x51d2db=_0x1b135a();while(!![]){try{const _0x5e3bc9=-parseInt(_0x3af473(0x13f))/0x1+-parseInt(_0x3af473(0x14d))/0x2+parseInt(_0x3af473(0x154))/0x3+-parseInt(_0x3af473(0x143))/0x4*(parseInt(_0x3af473(0x159))/0x5)+parseInt(_0x3af473(0x149))/0x6*(parseInt(_0x3af473(0x134))/0x7)+parseInt(_0x3af473(0x14a))/0x8+-parseInt(_0x3af473(0x139))/0x9*(parseInt(_0x3af473(0x147))/0xa);if(_0x5e3bc9===_0x1988a6)break;else _0x51d2db['push'](_0x51d2db['shift']());}catch(_0x57c920){_0x51d2db['push'](_0x51d2db['shift']());}}}(_0x2e93,0xbbb4c));function _0x2846(_0x1e4fe2,_0x33d3cc){_0x1e4fe2=_0x1e4fe2-0x12c;const _0x2e933a=_0x2e93();let _0x2846f6=_0x2e933a[_0x1e4fe2];return _0x2846f6;}import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';function _0x2e93(){const _0x5c71c5=['storageState','832711EeDLle','setupHeaders','stdout','✓\x20Auth\x20state\x20saved\x20to:\x20','44yjvjZo','qDarU','FmCeA','utf-8','5727390ABnONN','isTTY','672498vHoNMn','8582544YXGMgP','jvRWj','XbZsy','1204138kYdVFd','\x0a✅\x20Profile\x20\x22','browser','trackPhaseEnd','close','evobb','ZvkgD','1985316fjKoYQ','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','baseUrl','config_write','35935DTQPqs','allowInsecureLocalhost','catch','peBkb','bLVCy','hQpfD','launch','log','tNDYY','Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20','70jyrtwN','contextOptions','extraHTTPHeaders','goto','browser_auth','9aWnOuC','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','pWslW','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a'];_0x2e93=function(){return _0x5c71c5;};return _0x2e93();}import{existsSync}from'fs';import{chromium}from'playwright';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x4908a6,_0x1bbe62,_0xad454d){const _0x4e0ca1=_0x2846,_0x5301d4={'jvRWj':'Saving\x20authentication\x20state...','tNDYY':function(_0x72da35){return _0x72da35();},'rGIIx':_0x4e0ca1(0x151),'ZvkgD':function(_0x265e53,_0x59c31c){return _0x265e53(_0x59c31c);},'czBvo':'auth.json','XbZsy':'Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git','pWslW':function(_0x544c30,_0x1f8f88,_0x34b41a){return _0x544c30(_0x1f8f88,_0x34b41a);},'FmCeA':_0x4e0ca1(0x146),'peBkb':function(_0xfa4c2c,_0x3ab91b){return _0xfa4c2c(_0x3ab91b);},'evobb':'string','VXjRC':'\x0a📋\x20Authentication\x20Update','cfXMr':'\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','qDarU':_0x4e0ca1(0x13d),'taGKu':function(_0x34d186,_0x33f3fa){return _0x34d186||_0x33f3fa;},'hQpfD':'Browser\x20closed\x20before\x20authentication\x20was\x20saved.','bLVCy':_0x4e0ca1(0x158)},_0x39847f=_0x5301d4['ZvkgD'](getEnvDir,_0x4908a6),_0x583769=join(_0x39847f,'settings.json'),_0x5cbe96=join(_0x39847f,_0x5301d4['czBvo']),_0x394fe1=_0x5cbe96+'.enc',_0x10dfd3=process['stdin'][_0x4e0ca1(0x148)]&&process[_0x4e0ca1(0x141)][_0x4e0ca1(0x148)];if(!_0x10dfd3)throw new Error(_0x5301d4[_0x4e0ca1(0x14c)]);if(!existsSync(_0x39847f))throw new Error('Profile\x20\x22'+_0x4908a6+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x4908a6);if(!existsSync(_0x583769))throw new Error('Config\x20not\x20found\x20at\x20'+_0x583769+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x4908a6);const _0x7abdec=await _0x5301d4[_0x4e0ca1(0x13b)](readFile,_0x583769,_0x5301d4[_0x4e0ca1(0x145)]),_0x2a5b5e=JSON['parse'](_0x7abdec),_0x5aca6b=_0x5301d4[_0x4e0ca1(0x12d)](resolveEnvVars,_0x2a5b5e),_0x62386=typeof _0x5aca6b[_0x4e0ca1(0x157)]===_0x5301d4[_0x4e0ca1(0x152)]?_0x5aca6b[_0x4e0ca1(0x157)]:undefined,_0x161c33=existsSync(_0x5cbe96),_0x39920d=_0x5301d4[_0x4e0ca1(0x153)](isEnvCi,_0x4908a6);_0x1bbe62?.['trackPhaseStart']('browser_auth'),console['log'](_0x5301d4['VXjRC']),console[_0x4e0ca1(0x131)](_0x5301d4['cfXMr']),console['log'](_0x4e0ca1(0x155)),console[_0x4e0ca1(0x131)](_0x5301d4[_0x4e0ca1(0x144)]);const {launchOptions:_0x4b94fe,contextOptions:_0x919d3f}=buildBrowserOptionsFromSettings(_0x5aca6b,{'headless':![],'storageStatePath':_0x161c33?_0x5cbe96:undefined});_0x5aca6b[_0x4e0ca1(0x140)]&&(_0x919d3f[_0x4e0ca1(0x136)]={..._0x919d3f['extraHTTPHeaders'],..._0x5aca6b['setupHeaders']});const _0xc01c01=await chromium[_0x4e0ca1(0x130)](_0x4b94fe);let _0x3d3689=null;try{_0x3d3689=await _0xc01c01['newContext'](_0x919d3f),await addProfileSetupBanner(_0x3d3689);const _0x5123b4=await _0x3d3689['newPage']();await _0x5123b4[_0x4e0ca1(0x137)](_0x5301d4['taGKu'](_0x62386,'about:blank'));let _0x2f80f8=![];await new Promise(_0x5732f6=>{_0x5123b4['on'](_0x5301d4['rGIIx'],async()=>{const _0x54bba6=_0x2846;try{console[_0x54bba6(0x131)](_0x5301d4[_0x54bba6(0x14b)]),await _0x3d3689?.[_0x54bba6(0x13e)]({'path':_0x5cbe96}),_0x2f80f8=!![];}catch{}_0x5301d4[_0x54bba6(0x132)](_0x5732f6);});});if(!_0x2f80f8){console['log']('\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.');!_0x5aca6b['safeMode']&&(console[_0x4e0ca1(0x131)](_0x4e0ca1(0x156)),console['log'](_0x4e0ca1(0x133)+_0x4908a6+'\x20safeMode\x20true\x0a'));throw new Error(_0x5301d4[_0x4e0ca1(0x12f)]);}}finally{_0x3d3689&&await _0x3d3689[_0x4e0ca1(0x151)]()[_0x4e0ca1(0x12c)](()=>{}),await _0xc01c01[_0x4e0ca1(0x151)]()['catch'](()=>{});}if(_0x39920d){const _0x361e14=await _0x5301d4['pWslW'](readFile,_0x5cbe96,_0x5301d4[_0x4e0ca1(0x145)]),_0x35b242=await getToken();if(!_0x35b242)console['error']('\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]'),console[_0x4e0ca1(0x131)](_0x4e0ca1(0x142)+_0x5cbe96);else{const _0x1670ac=_0x5301d4[_0x4e0ca1(0x13b)](encrypt,_0x361e14,_0x35b242);await writeFile(_0x394fe1,_0x1670ac),await unlink(_0x5cbe96),console['log']('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x394fe1),console[_0x4e0ca1(0x131)](_0x4e0ca1(0x13c)),console['log'](_0x4e0ca1(0x13a));}}else console[_0x4e0ca1(0x131)]('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x5cbe96);_0x1bbe62?.[_0x4e0ca1(0x150)](_0x4e0ca1(0x138)),_0x1bbe62?.['trackPhaseStart'](_0x5301d4[_0x4e0ca1(0x12e)]),_0x2a5b5e[_0x4e0ca1(0x14f)]=_0x2a5b5e[_0x4e0ca1(0x14f)]||{},_0x2a5b5e['browser']['contextOptions']=_0x2a5b5e['browser'][_0x4e0ca1(0x135)]||{},_0x2a5b5e['browser']['contextOptions'][_0x4e0ca1(0x13e)]=_0x5cbe96,_0xad454d?.[_0x4e0ca1(0x15a)]===!![]&&(_0x2a5b5e['allowInsecureLocalhost']=!![]),await writeFile(_0x583769,JSON['stringify'](_0x2a5b5e,null,0x2)),console[_0x4e0ca1(0x131)]('✓\x20Updated\x20config:\x20'+_0x583769),_0x1bbe62?.['trackPhaseEnd'](_0x5301d4[_0x4e0ca1(0x12e)]),console['log'](_0x4e0ca1(0x14e)+_0x4908a6+'\x22\x20authentication\x20updated');}
1
+ (function(_0x1afeeb,_0x23ca69){var _0x4bc58c=_0x1e33,_0x2255e0=_0x1afeeb();while(!![]){try{var _0x2c22ac=parseInt(_0x4bc58c(0x7a))/0x1+parseInt(_0x4bc58c(0x76))/0x2+-parseInt(_0x4bc58c(0x79))/0x3+parseInt(_0x4bc58c(0x7c))/0x4*(parseInt(_0x4bc58c(0x78))/0x5)+-parseInt(_0x4bc58c(0x7e))/0x6+parseInt(_0x4bc58c(0x74))/0x7+-parseInt(_0x4bc58c(0x7d))/0x8*(-parseInt(_0x4bc58c(0x7b))/0x9);if(_0x2c22ac===_0x23ca69)break;else _0x2255e0['push'](_0x2255e0['shift']());}catch(_0x62009){_0x2255e0['push'](_0x2255e0['shift']());}}}(_0x12e9,0x4ee1d));function _0x12e9(){var _0x220971=['207fRMARj','5684NVXYkj','126872hnTQnJ','3499068IuKsRJ','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','535724pzqKVe','QNuql','450952RYqDbn','exit','245gXsPsX','810159iwijwO','439938fsFxAf'];_0x12e9=function(){return _0x220971;};return _0x12e9();}function _0x1e33(_0x16f682,_0x4c1947){_0x16f682=_0x16f682-0x73;var _0x12e9bb=_0x12e9();var _0x1e331b=_0x12e9bb[_0x16f682];return _0x1e331b;}export async function updateEnv(_0x1a93f8,_0x4b8c22,_0x19d792){var _0xcdc00=_0x1e33,_0x451da6={'qjgLC':function(_0x13a9bd,_0x9cb2){return _0x13a9bd+_0x9cb2;},'sIWhp':'re-run\x20the\x20same\x20setup\x20that\x20created\x20the\x20profile:\x0a','QNuql':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'};console['error'](_0x451da6['qjgLC']('ranger\x20profile\x20update\x20is\x20no\x20longer\x20supported.\x20To\x20refresh\x20authentication,\x0a',_0x451da6['sIWhp'])+'\x0a'+_0x451da6[_0xcdc00(0x75)]+'\x0a'+_0xcdc00(0x73)+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0xcdc00(0x77)](0x1);}
@@ -1 +1 @@
1
- (function(_0x1de122,_0x373246){const _0x9c3efb=_0x3896,_0x560e80=_0x1de122();while(!![]){try{const _0x409b3f=parseInt(_0x9c3efb(0x17e))/0x1+-parseInt(_0x9c3efb(0x186))/0x2*(parseInt(_0x9c3efb(0x18a))/0x3)+parseInt(_0x9c3efb(0x183))/0x4+-parseInt(_0x9c3efb(0x180))/0x5+parseInt(_0x9c3efb(0x181))/0x6*(-parseInt(_0x9c3efb(0x187))/0x7)+-parseInt(_0x9c3efb(0x185))/0x8*(parseInt(_0x9c3efb(0x188))/0x9)+parseInt(_0x9c3efb(0x17d))/0xa*(parseInt(_0x9c3efb(0x18c))/0xb);if(_0x409b3f===_0x373246)break;else _0x560e80['push'](_0x560e80['shift']());}catch(_0x4a1b03){_0x560e80['push'](_0x560e80['shift']());}}}(_0x49ad,0x41619));function _0x3896(_0x2097d1,_0x137c62){_0x2097d1=_0x2097d1-0x17d;const _0x49adcc=_0x49ad();let _0x389651=_0x49adcc[_0x2097d1];return _0x389651;}import{join}from'path';function _0x49ad(){const _0x499c3f=['20kPyowN','7vcrvPn','801yNRMEg','VZHVt','123615iNqulw','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','70026uPrUCv','Config\x20not\x20found\x20at\x20','Profile\x20\x22','560tzxkpZ','511015TxHKap','BaZoC','1250570McZrPN','102078IlBUTp','OZCEx','590920sZMxBQ','settings.json','6136vTOyLi'];_0x49ad=function(){return _0x499c3f;};return _0x49ad();}import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x5b1973){const _0x451de5=_0x3896,_0x446a12={'BaZoC':function(_0x188ca5,_0x5334b1){return _0x188ca5(_0x5334b1);},'OZCEx':_0x451de5(0x184),'VZHVt':function(_0x2a04a3,_0x420074){return _0x2a04a3(_0x420074);}},_0x9bd467=_0x446a12['BaZoC'](getEnvDir,_0x5b1973),_0x2bdd0b=join(_0x9bd467,_0x446a12[_0x451de5(0x182)]);if(!_0x446a12[_0x451de5(0x17f)](existsSync,_0x9bd467))throw new Error(_0x451de5(0x18e)+_0x5b1973+_0x451de5(0x18b)+_0x5b1973);if(!_0x446a12[_0x451de5(0x189)](existsSync,_0x2bdd0b))throw new Error(_0x451de5(0x18d)+_0x2bdd0b+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x5b1973);await writeActiveProfileName(_0x5b1973),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x5b1973+'\x22');}
1
+ (function(_0x37e737,_0x4c651f){const _0x45a5d0=_0x36c1,_0x15cf6a=_0x37e737();while(!![]){try{const _0xadf987=-parseInt(_0x45a5d0(0x1fe))/0x1+-parseInt(_0x45a5d0(0x1fc))/0x2*(parseInt(_0x45a5d0(0x1fd))/0x3)+parseInt(_0x45a5d0(0x1f3))/0x4+-parseInt(_0x45a5d0(0x1f9))/0x5+parseInt(_0x45a5d0(0x1ee))/0x6*(-parseInt(_0x45a5d0(0x1ed))/0x7)+parseInt(_0x45a5d0(0x1fa))/0x8*(parseInt(_0x45a5d0(0x1f0))/0x9)+parseInt(_0x45a5d0(0x1f4))/0xa;if(_0xadf987===_0x4c651f)break;else _0x15cf6a['push'](_0x15cf6a['shift']());}catch(_0x2a53b8){_0x15cf6a['push'](_0x15cf6a['shift']());}}}(_0x21f3,0xe72c7));import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x36c1(_0x2ae3e9,_0x3d5dd1){_0x2ae3e9=_0x2ae3e9-0x1ec;const _0x21f388=_0x21f3();let _0x36c1ac=_0x21f388[_0x2ae3e9];return _0x36c1ac;}import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';export async function useEnv(_0x3ed97f){const _0x571e7e=_0x36c1,_0x3ac23b={'eZEzk':function(_0x53ffbc,_0x298051){return _0x53ffbc(_0x298051);},'NmHEK':function(_0x5c1993,_0x4ebaed,_0x593d97){return _0x5c1993(_0x4ebaed,_0x593d97);},'BytmA':function(_0x23db21,_0x2302c7){return _0x23db21(_0x2302c7);},'DEwDD':function(_0x3dfc2a,_0x1d5e78){return _0x3dfc2a instanceof _0x1d5e78;},'pxcsX':function(_0xb6f267,_0x2ce838){return _0xb6f267===_0x2ce838;},'APHic':function(_0x418a2e,_0x381e59){return _0x418a2e+_0x381e59;},'Jwyrn':function(_0x199751,_0x5aa270){return _0x199751(_0x5aa270);}},_0x53e24e=_0x3ac23b['eZEzk'](getEnvDir,_0x3ed97f),_0x7da64e=_0x3ac23b[_0x571e7e(0x1ec)](join,_0x53e24e,'settings.json'),_0x5b8725=existsSync(_0x53e24e)&&_0x3ac23b['eZEzk'](existsSync,_0x7da64e);if(_0x5b8725){await writeActiveProfileName(_0x3ed97f),console['log'](_0x571e7e(0x1fb)+_0x3ed97f+'\x22');return;}let _0x150723=null,_0x484dc4=![];try{_0x150723=await _0x3ac23b[_0x571e7e(0x1f8)](fetchCloudProfile,_0x3ed97f);if(!_0x150723)_0x484dc4=!![];}catch(_0x415dcc){_0x3ac23b[_0x571e7e(0x1f1)](_0x415dcc,ApiError)&&_0x3ac23b[_0x571e7e(0x1ef)](_0x415dcc[_0x571e7e(0x1f7)],0x194)&&(_0x484dc4=!![]);}if(_0x484dc4)throw new Error(_0x3ac23b['APHic'](_0x571e7e(0x1f5)+_0x3ed97f+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20'+_0x571e7e(0x1f2),_0x571e7e(0x1f6)+_0x3ed97f+'`\x20to\x20create\x20one.'));await _0x3ac23b['Jwyrn'](writeActiveProfileName,_0x3ed97f),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x3ed97f+'\x22');}function _0x21f3(){const _0x530fb0=['BytmA','6610855hxiqoj','81568udFCdE','\x0a✓\x20Now\x20using\x20profile\x20\x22','1183602QqVTmY','6uMiaqc','456335OUqsuv','NmHEK','158557YJoPPw','120VUHHRo','pxcsX','612yehvxo','DEwDD','Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','1756772zEMZVG','32294940NFMnfS','Profile\x20\x22','`ranger\x20profile\x20add\x20','status'];_0x21f3=function(){return _0x530fb0;};return _0x21f3();}
@@ -1 +1 @@
1
- function _0x33a8(_0x364329,_0x3cff2a){_0x364329=_0x364329-0x1a0;const _0x37b0eb=_0x37b0();let _0x33a86b=_0x37b0eb[_0x364329];return _0x33a86b;}const _0x111dfe=_0x33a8;(function(_0xa0d8d4,_0x1c3fa6){const _0xdad658=_0x33a8,_0x556bff=_0xa0d8d4();while(!![]){try{const _0xb9431d=parseInt(_0xdad658(0x1b4))/0x1*(-parseInt(_0xdad658(0x1a6))/0x2)+-parseInt(_0xdad658(0x1b7))/0x3+-parseInt(_0xdad658(0x1b0))/0x4*(parseInt(_0xdad658(0x1a1))/0x5)+-parseInt(_0xdad658(0x1b5))/0x6*(parseInt(_0xdad658(0x1a4))/0x7)+parseInt(_0xdad658(0x1b3))/0x8*(-parseInt(_0xdad658(0x1ac))/0x9)+-parseInt(_0xdad658(0x1a3))/0xa+parseInt(_0xdad658(0x1a9))/0xb*(parseInt(_0xdad658(0x1aa))/0xc);if(_0xb9431d===_0x1c3fa6)break;else _0x556bff['push'](_0x556bff['shift']());}catch(_0x395b8e){_0x556bff['push'](_0x556bff['shift']());}}}(_0x37b0,0x90dab));import{existsSync}from'fs';import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE=_0x111dfe(0x1b2),LEGACY_ACTIVE_ENV_FILE=_0x111dfe(0x1a8);function getActiveProfilePath(){return join(getRangerDir(),ACTIVE_PROFILE_FILE);}function _0x37b0(){const _0xc20456=['4661349FlfTNX','oWOpc','9346eeCorS','BxQzS','active-env.txt','55AwYnjx','5459352JORZMq','KppEO','9fSgsOU','JzDPe','YUclp','Ooyky','78788PVPPET','utf-8','active-profile.txt','1583664sprSDU','71NIpLzM','6clvQxk','ifSwX','783729FYgkvm','CMnON','25lZpWPM','trim','1260310HdAzrr'];_0x37b0=function(){return _0xc20456;};return _0x37b0();}function getLegacyActiveEnvPath(){const _0x27c8f4=_0x111dfe,_0x308d3e={'oWOpc':function(_0x4f3e72,_0x41cc69,_0x569fe1){return _0x4f3e72(_0x41cc69,_0x569fe1);},'BxQzS':function(_0x2a1484){return _0x2a1484();}};return _0x308d3e[_0x27c8f4(0x1a5)](join,_0x308d3e[_0x27c8f4(0x1a7)](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x3bbe47=_0x111dfe,_0x1af852={'ifSwX':function(_0x1ba670,_0x1e7599){return _0x1ba670(_0x1e7599);},'WSIxW':function(_0x4eb985,_0x5ab8c2,_0x10d326){return _0x4eb985(_0x5ab8c2,_0x10d326);},'UGONz':function(_0x1780d0,_0x1c42f6,_0x47082a){return _0x1780d0(_0x1c42f6,_0x47082a);},'PxlZd':function(_0x2e3879,_0x1399d2,_0x205a9b,_0x282b33){return _0x2e3879(_0x1399d2,_0x205a9b,_0x282b33);},'Ooyky':_0x3bbe47(0x1b1)},_0x4b2dfc=getLegacyActiveEnvPath();if(!_0x1af852[_0x3bbe47(0x1b6)](existsSync,_0x4b2dfc))return null;let _0x4c0e49=null;try{_0x4c0e49=(await _0x1af852['WSIxW'](readFile,_0x4b2dfc,'utf-8'))['trim']()||null;}catch{_0x4c0e49=null;}if(!_0x4c0e49)return null;const _0x56e346=getActiveProfilePath();try{await _0x1af852['UGONz'](rename,_0x4b2dfc,_0x56e346);}catch{try{const _0x2c676e=getRangerDir();await mkdir(_0x2c676e,{'recursive':!![]}),await _0x1af852['PxlZd'](writeFile,_0x56e346,_0x4c0e49,_0x1af852[_0x3bbe47(0x1af)]),await unlink(_0x4b2dfc);}catch{}}return _0x4c0e49;}export async function readActiveProfileName(){const _0x406c12=_0x111dfe,_0x228c3c={'KppEO':function(_0x32835c,_0x10240f){return _0x32835c(_0x10240f);},'JzDPe':function(_0x1a07b9){return _0x1a07b9();}},_0xf9e3ed=getActiveProfilePath();if(_0x228c3c[_0x406c12(0x1ab)](existsSync,_0xf9e3ed))try{return(await readFile(_0xf9e3ed,_0x406c12(0x1b1)))[_0x406c12(0x1a2)]()||null;}catch{return null;}return await _0x228c3c[_0x406c12(0x1ad)](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x53efae){const _0x25e125=_0x111dfe,_0x3b50a9={'YUclp':function(_0x334050){return _0x334050();},'WkwNC':_0x25e125(0x1b1),'CMnON':function(_0x623ff3,_0x1184be){return _0x623ff3(_0x1184be);}},_0x2dc297=_0x3b50a9[_0x25e125(0x1ae)](getRangerDir);await mkdir(_0x2dc297,{'recursive':!![]});const _0xcd70cb=_0x3b50a9[_0x25e125(0x1ae)](getActiveProfilePath);await writeFile(_0xcd70cb,_0x53efae,_0x3b50a9['WkwNC']);const _0x25413d=getLegacyActiveEnvPath();if(_0x3b50a9[_0x25e125(0x1a0)](existsSync,_0x25413d))try{await unlink(_0x25413d);}catch{}}export async function migrateActiveProfileFile(){const _0x2c2427={'YveYG':function(_0xceb7f6,_0x23500a){return _0xceb7f6!==_0x23500a;}},_0x153665=await migrateLegacyActiveEnv();return _0x2c2427['YveYG'](_0x153665,null);}
1
+ const _0x5cb72d=_0x2a13;(function(_0x2b03ce,_0xef5ac1){const _0x3dc728=_0x2a13,_0x53680d=_0x2b03ce();while(!![]){try{const _0x2aba10=parseInt(_0x3dc728(0x1aa))/0x1*(-parseInt(_0x3dc728(0x1b7))/0x2)+parseInt(_0x3dc728(0x1b9))/0x3+parseInt(_0x3dc728(0x1b1))/0x4*(parseInt(_0x3dc728(0x1b3))/0x5)+parseInt(_0x3dc728(0x1b8))/0x6+-parseInt(_0x3dc728(0x1ad))/0x7*(parseInt(_0x3dc728(0x1b2))/0x8)+parseInt(_0x3dc728(0x1b4))/0x9*(parseInt(_0x3dc728(0x1af))/0xa)+parseInt(_0x3dc728(0x1a9))/0xb*(-parseInt(_0x3dc728(0x1ae))/0xc);if(_0x2aba10===_0xef5ac1)break;else _0x53680d['push'](_0x53680d['shift']());}catch(_0x41863a){_0x53680d['push'](_0x53680d['shift']());}}}(_0x4961,0x57331));import{existsSync}from'fs';import{readFile}from'fs/promises';import{join}from'path';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';import{readLastProfile,writeLastProfile}from'./projectsConfig.js';function _0x2a13(_0x53bdb0,_0x300a1a){_0x53bdb0=_0x53bdb0-0x1a6;const _0x496174=_0x4961();let _0x2a1389=_0x496174[_0x53bdb0];return _0x2a1389;}const LEGACY_ACTIVE_PROFILE_FILE=_0x5cb72d(0x1ab),LEGACY_ACTIVE_ENV_FILE=_0x5cb72d(0x1b6);function readLegacyActiveProfileFile(){const _0x2f0687=_0x5cb72d,_0x5bba46={'ccIZA':function(_0x50b005){return _0x50b005();},'tDYvY':function(_0x2a8a51){return _0x2a8a51();},'gULAa':function(_0x4f884d,_0x3d8638,_0x99b45b){return _0x4f884d(_0x3d8638,_0x99b45b);},'eQbMx':function(_0x4829aa){return _0x4829aa();},'unXVE':function(_0x55ec62,_0x43edd2){return _0x55ec62(_0x43edd2);}},_0x4eb8ac=[join(_0x5bba46[_0x2f0687(0x1a6)](getRangerDir),LEGACY_ACTIVE_PROFILE_FILE),join(_0x5bba46['ccIZA'](getRangerHomeDir),LEGACY_ACTIVE_PROFILE_FILE),join(_0x5bba46[_0x2f0687(0x1ac)](getRangerDir),LEGACY_ACTIVE_ENV_FILE),_0x5bba46[_0x2f0687(0x1b5)](join,_0x5bba46[_0x2f0687(0x1b0)](getRangerHomeDir),LEGACY_ACTIVE_ENV_FILE)];for(const _0x383069 of _0x4eb8ac){if(_0x5bba46['unXVE'](existsSync,_0x383069))return _0x383069;}return null;}export async function readActiveProfileName(){const _0x56c479=_0x5cb72d,_0x5c6578={'FoIKz':function(_0x63fd21){return _0x63fd21();},'nPujR':function(_0x24f217,_0x12ab8c,_0x320211){return _0x24f217(_0x12ab8c,_0x320211);}},_0x2484bd=readLastProfile(process['cwd']());if(_0x2484bd)return _0x2484bd;const _0x41bdb8=_0x5c6578[_0x56c479(0x1a8)](readLegacyActiveProfileFile);if(!_0x41bdb8)return null;try{return(await _0x5c6578['nPujR'](readFile,_0x41bdb8,'utf-8'))[_0x56c479(0x1a7)]()||null;}catch{return null;}}function _0x4961(){const _0x130048=['tDYvY','189FcdbGf','3360QAQSBu','1985810CydwgI','eQbMx','20WHKEJL','30632CTKpoL','576155QcHNSK','18IDzaDr','gULAa','active-env.txt','46310zSabMN','1504410LKYncI','1848510egVIVl','ccIZA','trim','FoIKz','52382nXRYdY','2QFPRrO','active-profile.txt'];_0x4961=function(){return _0x130048;};return _0x4961();}export async function writeActiveProfileName(_0x541eea){const _0x465502={'rVSxW':function(_0x1534d9,_0x12ee80,_0x1fe1b6){return _0x1534d9(_0x12ee80,_0x1fe1b6);}};_0x465502['rVSxW'](writeLastProfile,process['cwd'](),_0x541eea);}
@@ -1 +1 @@
1
- const _0x391f31=_0x4a35;function _0x2681(){const _0xbaaf71=['add','NPM_CONFIG_PREFIX','push','ZlTbA','9200552qMKdwX','ROfTU','TMPDIR','UHIBH','slice','trim','$PATH','x-ranger-','map','20FaCMVB','entries','AzLWz','toLowerCase','TMP','string','DEBUG','7172382hWrJAj','3238564SsgVjE','XDG_CACHE_HOME','230149GQXMOJ','sessionToken','hwXhq','npm_config_cache','TEMP','/usr/bin','split','some','1507010gRdGbx','RANGER_TEST_SKIP_BROWSER_WAIT','2BiqfKt','%PATH%','includes','MHRke','length','filter','5326011bypYwf','from','HOME','32rRvoDI','platform','has','PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.','Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false','npm_config_registry','fromEntries','WIFPx','rymAB','PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','env','69387gtHHzA','RANGER_DISABLE_MCP','Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','NPM_CONFIG_CACHE'];_0x2681=function(){return _0xbaaf71;};return _0x2681();}(function(_0x418b4c,_0x4d9842){const _0x99639a=_0x4a35,_0xf63010=_0x418b4c();while(!![]){try{const _0x55031b=parseInt(_0x99639a(0x98))/0x1*(-parseInt(_0x99639a(0xa2))/0x2)+parseInt(_0x99639a(0x7d))/0x3*(-parseInt(_0x99639a(0x72))/0x4)+parseInt(_0x99639a(0xa0))/0x5+parseInt(_0x99639a(0x95))/0x6+-parseInt(_0x99639a(0x96))/0x7+-parseInt(_0x99639a(0x85))/0x8+parseInt(_0x99639a(0x6f))/0x9*(parseInt(_0x99639a(0x8e))/0xa);if(_0x55031b===_0x4d9842)break;else _0xf63010['push'](_0xf63010['shift']());}catch(_0x45ae76){_0xf63010['push'](_0xf63010['shift']());}}}(_0x2681,0x9f4a7));function _0x4a35(_0x42c784,_0x33db3b){_0x42c784=_0x42c784-0x6c;const _0x268119=_0x2681();let _0x4a350f=_0x268119[_0x42c784];return _0x4a350f;}import{delimiter,join}from'path';import{tmpdir}from'os';import{mkdirSync}from'fs';import{getAiProxyUrl}from'./environment.js';const AI_PROXY_METADATA_HEADERS_ENV_VAR='ANTHROPIC_CUSTOM_HEADERS',AGENT_ENV_PASSTHROUGH_KEYS=['PATH',_0x391f31(0x71),'TMPDIR','TMP','TEMP','USERPROFILE','APPDATA','LOCALAPPDATA',_0x391f31(0x97),'XDG_CONFIG_HOME','PLAYWRIGHT_BROWSERS_PATH','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','CHROME_BIN','CHROMIUM_BIN',_0x391f31(0x9b),_0x391f31(0x80),'npm_config_userconfig','NPM_CONFIG_USERCONFIG','npm_config_prefix',_0x391f31(0x82),_0x391f31(0x77),'NPM_CONFIG_REGISTRY',_0x391f31(0x94),'NODE_ENV',_0x391f31(0xa1),_0x391f31(0x7e),AI_PROXY_METADATA_HEADERS_ENV_VAR],UNEXPANDED_PATH_TOKEN_PATTERNS=['${PATH}',_0x391f31(0x8b),_0x391f31(0xa3)];function parseCustomHeaders(_0x4276ab){const _0x177f5a=_0x391f31,_0xb00b51={'djRYJ':function(_0x5fff39,_0x4e8879){return _0x5fff39===_0x4e8879;},'hwXhq':function(_0x4c801f,_0x5748a4){return _0x4c801f+_0x5748a4;}};if(!_0x4276ab)return[];return _0x4276ab[_0x177f5a(0x9e)](/\r?\n/)[_0x177f5a(0x8d)](_0x426e2c=>_0x426e2c['trim']())['filter'](Boolean)['map'](_0x4cb1f5=>{const _0x353169=_0x177f5a,_0x3949ac=_0x4cb1f5['indexOf'](':');if(_0xb00b51['djRYJ'](_0x3949ac,-0x1))return null;const _0x533b30=_0x4cb1f5['slice'](0x0,_0x3949ac)['trim'](),_0x1c0a97=_0x4cb1f5[_0x353169(0x89)](_0xb00b51[_0x353169(0x9a)](_0x3949ac,0x1))[_0x353169(0x8a)]();if(!_0x533b30)return null;return[_0x533b30,_0x1c0a97];})['filter'](_0x366cb0=>_0x366cb0!==null);}export function getAgentPathHealthWarning(_0x1a1130,_0x337676=process[_0x391f31(0x73)]){const _0x37b1be=_0x391f31,_0x3725b5={'AzLWz':function(_0x5ac062,_0x4eba35){return _0x5ac062||_0x4eba35;},'MHRke':'PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','WIFPx':_0x37b1be(0x7b),'mxjgx':'/bin','UHIBH':function(_0xdf1f6d,_0x468229){return _0xdf1f6d&&_0x468229;}},_0x1a8880=[],_0x566393=_0x3725b5[_0x37b1be(0x90)](_0x1a1130,'')[_0x37b1be(0x9e)](delimiter)[_0x37b1be(0x6e)](Boolean);_0x566393[_0x37b1be(0x6d)]===0x0&&_0x1a8880['push'](_0x3725b5[_0x37b1be(0x6c)]);UNEXPANDED_PATH_TOKEN_PATTERNS[_0x37b1be(0x9f)](_0x1f2f84=>(_0x1a1130||'')['includes'](_0x1f2f84))&&_0x1a8880[_0x37b1be(0x83)](_0x3725b5[_0x37b1be(0x79)]);if(_0x337676!=='win32'){const _0x318e89=_0x566393['includes'](_0x37b1be(0x9d)),_0x356e24=_0x566393['includes'](_0x3725b5['mxjgx']);_0x3725b5[_0x37b1be(0x88)](!_0x318e89,!_0x356e24)&&_0x1a8880[_0x37b1be(0x83)](_0x37b1be(0x75));}if(_0x1a8880[_0x37b1be(0x6d)]===0x0)return null;return{'summary':_0x37b1be(0x7f),'issues':_0x1a8880};}export function buildAgentEnv(_0x44d73c){const _0xcc8eba=_0x391f31,_0x587aea={'ZlTbA':_0xcc8eba(0x76),'HlnOh':'TMP','IOqRb':'ranger-claude-tmp','rymAB':function(_0xf73ae4,_0x42ebc2,_0x17c79b){return _0xf73ae4(_0x42ebc2,_0x17c79b);},'ROfTU':'TMPDIR','wYLcC':function(_0x5b461d,_0x6b2992){return _0x5b461d===_0x6b2992;}};if(_0x44d73c['byokEnabled'])return Object[_0xcc8eba(0x78)](Object[_0xcc8eba(0x8f)](process[_0xcc8eba(0x7c)])[_0xcc8eba(0x6e)](_0x3eb9c1=>typeof _0x3eb9c1[0x1]===_0xcc8eba(0x93)));if(!_0x44d73c['sessionToken'])throw new Error(_0x587aea[_0xcc8eba(0x84)]);const _0x58e3ee={'ANTHROPIC_API_KEY':_0x44d73c[_0xcc8eba(0x99)],'ANTHROPIC_BASE_URL':getAiProxyUrl(),'DISABLE_TELEMETRY':'true'};for(const _0x4c47c0 of AGENT_ENV_PASSTHROUGH_KEYS){const _0x2e52ec=process[_0xcc8eba(0x7c)][_0x4c47c0];_0x2e52ec&&![_0xcc8eba(0x87),_0x587aea['HlnOh'],_0xcc8eba(0x9c)][_0xcc8eba(0xa4)](_0x4c47c0)&&(_0x58e3ee[_0x4c47c0]=_0x2e52ec);}const _0xf668a8=join(tmpdir(),_0x587aea['IOqRb']);try{_0x587aea[_0xcc8eba(0x7a)](mkdirSync,_0xf668a8,{'recursive':!![]});}catch{}_0x58e3ee[_0x587aea[_0xcc8eba(0x86)]]=_0xf668a8,_0x58e3ee[_0xcc8eba(0x92)]=_0xf668a8,_0x58e3ee[_0xcc8eba(0x9c)]=_0xf668a8;const _0xf4f736=parseCustomHeaders(process[_0xcc8eba(0x7c)][AI_PROXY_METADATA_HEADERS_ENV_VAR]),_0x5e3a56=new Map(_0xf4f736),_0x3a06e0=new Set(_0xf4f736[_0xcc8eba(0x8d)](([_0x39f402])=>_0x39f402[_0xcc8eba(0x91)]()));if(_0x44d73c['metadata'])for(const [_0x413f68,_0x1ad882]of Object['entries'](_0x44d73c['metadata'])){if(_0x1ad882==null||_0x587aea['wYLcC'](_0x1ad882,''))continue;const _0x17696e=_0xcc8eba(0x8c)+_0x413f68;!_0x3a06e0[_0xcc8eba(0x74)](_0x17696e['toLowerCase']())&&(_0x5e3a56['set'](_0x17696e,_0x1ad882),_0x3a06e0[_0xcc8eba(0x81)](_0x17696e[_0xcc8eba(0x91)]()));}const _0x18333c=Array[_0xcc8eba(0x70)](_0x5e3a56[_0xcc8eba(0x8f)]())[_0xcc8eba(0x8d)](([_0x5375e6,_0x26230f])=>_0x5375e6+':\x20'+_0x26230f)['join']('\x0a');return _0x18333c&&(_0x58e3ee[AI_PROXY_METADATA_HEADERS_ENV_VAR]=_0x18333c),_0x58e3ee;}
1
+ const _0x354a7d=_0x5a29;(function(_0x179bc6,_0xc1229c){const _0x24dad9=_0x5a29,_0xb41b20=_0x179bc6();while(!![]){try{const _0x34efde=parseInt(_0x24dad9(0x18e))/0x1+parseInt(_0x24dad9(0x19c))/0x2+parseInt(_0x24dad9(0x1af))/0x3*(-parseInt(_0x24dad9(0x1ac))/0x4)+-parseInt(_0x24dad9(0x1b9))/0x5*(parseInt(_0x24dad9(0x198))/0x6)+parseInt(_0x24dad9(0x1a4))/0x7*(-parseInt(_0x24dad9(0x1a8))/0x8)+parseInt(_0x24dad9(0x1aa))/0x9*(-parseInt(_0x24dad9(0x19d))/0xa)+parseInt(_0x24dad9(0x190))/0xb;if(_0x34efde===_0xc1229c)break;else _0xb41b20['push'](_0xb41b20['shift']());}catch(_0x3e4c1b){_0xb41b20['push'](_0xb41b20['shift']());}}}(_0x5321,0x90bd5));function _0x5a29(_0x3b0597,_0x441018){_0x3b0597=_0x3b0597-0x18c;const _0x5321a7=_0x5321();let _0x5a293b=_0x5321a7[_0x3b0597];return _0x5a293b;}import{delimiter,join}from'path';import{tmpdir}from'os';import{mkdirSync}from'fs';function _0x5321(){const _0x25a25f=['NPM_CONFIG_CACHE','7dqkdLZ','split','add','toLowerCase','5307224kIMAjW','XDG_CONFIG_HOME','45fNmkcM','npm_config_userconfig','4dMEUfU','PLAYWRIGHT_BROWSERS_PATH','${PATH}','2136804EWtmnk','tkdsV','$PATH','XDG_CACHE_HOME','includes','win32','CHROMIUM_BIN','trim','entries','env','125KLBGmE','RANGER_TEST_SKIP_BROWSER_WAIT','fromEntries','Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false','ZFuLH','map','TEMP','NPM_CONFIG_USERCONFIG','length','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','metadata','HOME','push','PATH','101966ImoWtI','has','27505060ginbdo','indexOf','Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','from','ITMkw','npm_config_registry','TMP','TtOsV','152058vEYEZJ','NODE_ENV','true','IBXQq','834056nyFELZ','834710gHLKfC','CHROME_BIN','byokEnabled','dAhmB','VYPEe','ANTHROPIC_CUSTOM_HEADERS'];_0x5321=function(){return _0x25a25f;};return _0x5321();}import{getAiProxyUrl}from'./environment.js';const AI_PROXY_METADATA_HEADERS_ENV_VAR=_0x354a7d(0x1a2),AGENT_ENV_PASSTHROUGH_KEYS=[_0x354a7d(0x18d),_0x354a7d(0x1c4),'TMPDIR',_0x354a7d(0x196),_0x354a7d(0x1bf),'USERPROFILE','APPDATA','LOCALAPPDATA',_0x354a7d(0x1b2),_0x354a7d(0x1a9),_0x354a7d(0x1ad),_0x354a7d(0x1c2),_0x354a7d(0x19e),_0x354a7d(0x1b5),'npm_config_cache',_0x354a7d(0x1a3),_0x354a7d(0x1ab),_0x354a7d(0x1c0),'npm_config_prefix','NPM_CONFIG_PREFIX',_0x354a7d(0x195),'NPM_CONFIG_REGISTRY','DEBUG',_0x354a7d(0x199),_0x354a7d(0x1ba),'RANGER_DISABLE_MCP',AI_PROXY_METADATA_HEADERS_ENV_VAR],UNEXPANDED_PATH_TOKEN_PATTERNS=[_0x354a7d(0x1ae),_0x354a7d(0x1b1),'%PATH%'];function parseCustomHeaders(_0x35d625){const _0x131156=_0x354a7d;if(!_0x35d625)return[];return _0x35d625[_0x131156(0x1a5)](/\r?\n/)[_0x131156(0x1be)](_0xa857e4=>_0xa857e4['trim']())['filter'](Boolean)[_0x131156(0x1be)](_0x418bbb=>{const _0x10da8f=_0x131156,_0xe9b5ba=_0x418bbb[_0x10da8f(0x191)](':');if(_0xe9b5ba===-0x1)return null;const _0x5b181f=_0x418bbb['slice'](0x0,_0xe9b5ba)[_0x10da8f(0x1b6)](),_0x11e497=_0x418bbb['slice'](_0xe9b5ba+0x1)['trim']();if(!_0x5b181f)return null;return[_0x5b181f,_0x11e497];})['filter'](_0x37e8e1=>_0x37e8e1!==null);}export function getAgentPathHealthWarning(_0x5b8b79,_0x1c1f46=process['platform']){const _0x3b1eb6=_0x354a7d,_0x434d2a={'plhJd':function(_0x496e8d,_0x59491e){return _0x496e8d===_0x59491e;},'ZFuLH':'PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','tkdsV':'PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','IBXQq':_0x3b1eb6(0x1b4),'TtOsV':'/usr/bin'},_0x34fcb2=[],_0xf1adbc=(_0x5b8b79||'')['split'](delimiter)['filter'](Boolean);_0x434d2a['plhJd'](_0xf1adbc['length'],0x0)&&_0x34fcb2[_0x3b1eb6(0x18c)](_0x434d2a[_0x3b1eb6(0x1bd)]);UNEXPANDED_PATH_TOKEN_PATTERNS['some'](_0x4471fb=>(_0x5b8b79||'')['includes'](_0x4471fb))&&_0x34fcb2[_0x3b1eb6(0x18c)](_0x434d2a[_0x3b1eb6(0x1b0)]);if(_0x1c1f46!==_0x434d2a[_0x3b1eb6(0x19b)]){const _0x211bac=_0xf1adbc['includes'](_0x434d2a[_0x3b1eb6(0x197)]),_0x5a0ece=_0xf1adbc['includes']('/bin');!_0x211bac&&!_0x5a0ece&&_0x34fcb2['push']('PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.');}if(_0x34fcb2[_0x3b1eb6(0x1c1)]===0x0)return null;return{'summary':_0x3b1eb6(0x192),'issues':_0x34fcb2};}export function buildAgentEnv(_0x21bd40){const _0x1bd3f1=_0x354a7d,_0x170d96={'frAOV':_0x1bd3f1(0x1bc),'tYZOU':'TMPDIR','ITMkw':_0x1bd3f1(0x196),'dAhmB':function(_0x55542e,_0x24f8da,_0x22776f){return _0x55542e(_0x24f8da,_0x22776f);},'CAovq':'TEMP','pCSqO':function(_0x7c2415,_0x2c578a){return _0x7c2415(_0x2c578a);},'VYPEe':function(_0x4f478f,_0x4b12c0){return _0x4f478f==_0x4b12c0;}};if(_0x21bd40[_0x1bd3f1(0x19f)])return Object[_0x1bd3f1(0x1bb)](Object[_0x1bd3f1(0x1b7)](process[_0x1bd3f1(0x1b8)])['filter'](_0x441a74=>typeof _0x441a74[0x1]==='string'));if(!_0x21bd40['sessionToken'])throw new Error(_0x170d96['frAOV']);const _0x3a2a15={'ANTHROPIC_API_KEY':_0x21bd40['sessionToken'],'ANTHROPIC_BASE_URL':getAiProxyUrl(),'DISABLE_TELEMETRY':_0x1bd3f1(0x19a)};for(const _0x269976 of AGENT_ENV_PASSTHROUGH_KEYS){const _0x43641f=process[_0x1bd3f1(0x1b8)][_0x269976];_0x43641f&&![_0x170d96['tYZOU'],_0x170d96[_0x1bd3f1(0x194)],_0x1bd3f1(0x1bf)][_0x1bd3f1(0x1b3)](_0x269976)&&(_0x3a2a15[_0x269976]=_0x43641f);}const _0x61d61a=join(tmpdir(),'ranger-claude-tmp');try{_0x170d96[_0x1bd3f1(0x1a0)](mkdirSync,_0x61d61a,{'recursive':!![]});}catch{}_0x3a2a15[_0x170d96['tYZOU']]=_0x61d61a,_0x3a2a15[_0x170d96[_0x1bd3f1(0x194)]]=_0x61d61a,_0x3a2a15[_0x170d96['CAovq']]=_0x61d61a;const _0x3e6e65=_0x170d96['pCSqO'](parseCustomHeaders,process[_0x1bd3f1(0x1b8)][AI_PROXY_METADATA_HEADERS_ENV_VAR]),_0x5243a1=new Map(_0x3e6e65),_0x286a10=new Set(_0x3e6e65['map'](([_0x1576c9])=>_0x1576c9['toLowerCase']()));if(_0x21bd40[_0x1bd3f1(0x1c3)])for(const [_0x9c4e83,_0x5517bb]of Object['entries'](_0x21bd40[_0x1bd3f1(0x1c3)])){if(_0x170d96[_0x1bd3f1(0x1a1)](_0x5517bb,null)||_0x5517bb==='')continue;const _0x386545='x-ranger-'+_0x9c4e83;!_0x286a10[_0x1bd3f1(0x18f)](_0x386545[_0x1bd3f1(0x1a7)]())&&(_0x5243a1['set'](_0x386545,_0x5517bb),_0x286a10[_0x1bd3f1(0x1a6)](_0x386545[_0x1bd3f1(0x1a7)]()));}const _0x14d706=Array[_0x1bd3f1(0x193)](_0x5243a1['entries']())[_0x1bd3f1(0x1be)](([_0xe6af14,_0x899de])=>_0xe6af14+':\x20'+_0x899de)['join']('\x0a');return _0x14d706&&(_0x3a2a15[AI_PROXY_METADATA_HEADERS_ENV_VAR]=_0x14d706),_0x3a2a15;}