@ranger-testing/ranger-cli 2.5.4-alpha.feb9faf-20 → 2.5.4

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 +14 -36
  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/setup/claude.js +1 -1
  27. package/build/commands/setup/opencode.js +1 -1
  28. package/build/commands/setupCi.js +1 -1
  29. package/build/commands/skillup.js +1 -1
  30. package/build/commands/start.js +1 -1
  31. package/build/commands/status.js +1 -1
  32. package/build/commands/update.js +1 -1
  33. package/build/commands/updateEnv.js +1 -1
  34. package/build/commands/useEnv.js +1 -1
  35. package/build/commands/utils/activeProfile.js +1 -1
  36. package/build/commands/utils/agentEnv.js +1 -1
  37. package/build/commands/utils/browserSessionsApi.js +1 -1
  38. package/build/commands/utils/claudeConfig.js +1 -1
  39. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  40. package/build/commands/utils/claudePlugin.js +1 -1
  41. package/build/commands/utils/crypto.js +1 -1
  42. package/build/commands/utils/desirePathLog.js +1 -1
  43. package/build/commands/utils/deviceAuth.js +1 -1
  44. package/build/commands/utils/environment.js +1 -1
  45. package/build/commands/utils/featureApi.js +1 -1
  46. package/build/commands/utils/fixWebmDuration.js +1 -1
  47. package/build/commands/utils/keychain.js +1 -1
  48. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  49. package/build/commands/utils/mcpImageBase64.js +1 -1
  50. package/build/commands/utils/model.js +1 -1
  51. package/build/commands/utils/opencodeConfig.js +1 -1
  52. package/build/commands/utils/playwrightCli.js +1 -1
  53. package/build/commands/utils/profileMessages.js +1 -1
  54. package/build/commands/utils/profileSetupBanner.js +1 -1
  55. package/build/commands/utils/rangerConfig.js +1 -1
  56. package/build/commands/utils/rangerRoot.js +1 -1
  57. package/build/commands/utils/retry.js +1 -1
  58. package/build/commands/utils/sessionCache.js +1 -1
  59. package/build/commands/utils/settings.js +1 -1
  60. package/build/commands/utils/skillContent.js +1 -1
  61. package/build/commands/utils/skills.js +1 -1
  62. package/build/commands/utils/stitchWebmFiles.js +1 -1
  63. package/build/commands/utils/telemetry.js +1 -1
  64. package/build/commands/utils/tokenRefresh.js +1 -1
  65. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  66. package/build/commands/utils/userApi.js +1 -1
  67. package/build/commands/utils/version.js +1 -1
  68. package/build/commands/verifyFeature.js +1 -1
  69. package/build/commands/verifyFeatureCli.js +1 -1
  70. package/build/skills/ranger/SKILL.md +6 -36
  71. package/build/skills/ranger/create.md +0 -19
  72. package/build/skills/ranger/verify.md +7 -46
  73. package/package.json +3 -8
  74. package/build/commands/migrateProfile.js +0 -1
  75. package/build/commands/utils/cloudProfile.js +0 -1
  76. package/build/commands/utils/cloudProfileSession.js +0 -1
  77. package/build/commands/utils/gitTracked.js +0 -1
  78. package/build/commands/utils/legacyWarning.js +0 -1
  79. package/build/commands/utils/matchAuthEnvironment.js +0 -1
  80. package/build/commands/utils/projectsConfig.js +0 -1
  81. package/build/commands/utils/resolveProfileContext.js +0 -1
  82. package/build/commands/utils/resolveProfileUrl.js +0 -1
@@ -1 +1 @@
1
- (function(_0x4c97c0,_0x4a6a84){var _0x3e0853=_0x1507,_0x2a3234=_0x4c97c0();while(!![]){try{var _0x53a720=parseInt(_0x3e0853(0x1b9))/0x1*(-parseInt(_0x3e0853(0x1bb))/0x2)+-parseInt(_0x3e0853(0x1b5))/0x3+-parseInt(_0x3e0853(0x1b4))/0x4+-parseInt(_0x3e0853(0x1af))/0x5*(-parseInt(_0x3e0853(0x1b0))/0x6)+parseInt(_0x3e0853(0x1b1))/0x7+parseInt(_0x3e0853(0x1ba))/0x8+-parseInt(_0x3e0853(0x1b2))/0x9*(-parseInt(_0x3e0853(0x1b6))/0xa);if(_0x53a720===_0x4a6a84)break;else _0x2a3234['push'](_0x2a3234['shift']());}catch(_0x1862d0){_0x2a3234['push'](_0x2a3234['shift']());}}}(_0x32c9,0x2e986));function _0x32c9(){var _0x3d97e9=['2888464cZkdqk','646550wABuvX','15THzxRz','108510QfWPcX','1578367xDSdlu','105858ycyStf','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','1085968ZBaGVb','1118103hrSfQC','440YGzopQ','\x20\x20https://docs.ranger.net/main/concepts/profiles','zXzDA','1SCHPnD'];_0x32c9=function(){return _0x3d97e9;};return _0x32c9();}function _0x1507(_0x20b238,_0x4b9da8){_0x20b238=_0x20b238-0x1af;var _0x32c919=_0x32c9();var _0x15074c=_0x32c919[_0x20b238];return _0x15074c;}export async function setupCi(_0x2a80bb,_0x4cd5be,_0x4f987e){var _0x59edeb=_0x1507,_0x45a3e5={'zXzDA':function(_0x3954b0,_0x260840){return _0x3954b0+_0x260840;},'JLYQr':'ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','TPaMT':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','Zdkjq':_0x59edeb(0x1b3),'qEIkC':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console['error'](_0x45a3e5[_0x59edeb(0x1b8)](_0x45a3e5[_0x59edeb(0x1b8)](_0x45a3e5['JLYQr']+'\x0a',_0x45a3e5['TPaMT']),_0x45a3e5['Zdkjq'])+'\x0a'+_0x45a3e5['qEIkC']+_0x59edeb(0x1b7)),process['exit'](0x1);}
1
+ (function(_0x4622a1,_0x325909){const _0x43b3d5=_0x2ec7,_0x361540=_0x4622a1();while(!![]){try{const _0x558aae=-parseInt(_0x43b3d5(0x1f1))/0x1+-parseInt(_0x43b3d5(0x1be))/0x2*(-parseInt(_0x43b3d5(0x1cd))/0x3)+parseInt(_0x43b3d5(0x1c9))/0x4+-parseInt(_0x43b3d5(0x1ee))/0x5+parseInt(_0x43b3d5(0x1f0))/0x6*(parseInt(_0x43b3d5(0x1c0))/0x7)+parseInt(_0x43b3d5(0x1e5))/0x8+parseInt(_0x43b3d5(0x1da))/0x9*(-parseInt(_0x43b3d5(0x1e4))/0xa);if(_0x558aae===_0x325909)break;else _0x361540['push'](_0x361540['shift']());}catch(_0x22db74){_0x361540['push'](_0x361540['shift']());}}}(_0x54b6,0x346f5));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';function _0x2ec7(_0x129b6c,_0x2f2106){_0x129b6c=_0x129b6c-0x1be;const _0x54b695=_0x54b6();let _0x2ec747=_0x54b695[_0x129b6c];return _0x2ec747;}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';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x50ecdd){const _0x555859=_0x2ec7,_0x5b5488={'vaPlN':function(_0xf1caa7){return _0xf1caa7();},'LDQUt':function(_0x9be130,_0x32b3e5){return _0x9be130(_0x32b3e5);},'Lqqeo':function(_0x2437a8,_0x17c7a0){return _0x2437a8+_0x17c7a0;},'vSiFp':'No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','otbBD':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','ArvoX':function(_0x442c94,_0x8f7176){return _0x442c94===_0x8f7176;}},_0xe79da4=_0x5b5488['vaPlN'](getRangerDir),_0xf6e013=join(_0xe79da4,'ci');if(_0x50ecdd){const _0x2d2939=join(_0xf6e013,_0x50ecdd);return{'name':_0x50ecdd,'path':_0x2d2939};}if(!_0x5b5488['LDQUt'](existsSync,_0xf6e013))throw new Error(_0x5b5488['Lqqeo'](_0x5b5488[_0x555859(0x1e9)],_0x5b5488[_0x555859(0x1e1)]));const _0x2f87f9=await readdir(_0xf6e013,{'withFileTypes':!![]}),_0x4e8181=_0x2f87f9['filter'](_0x2522b7=>_0x2522b7['isDirectory']())['map'](_0x2c43be=>_0x2c43be[_0x555859(0x1de)]);if(_0x4e8181['length']===0x0)throw new Error(_0x555859(0x1e3)+_0x555859(0x1e0));if(_0x5b5488['ArvoX'](_0x4e8181[_0x555859(0x1d3)],0x1)){const _0x16644e=_0x4e8181[0x0];return console['log'](_0x555859(0x1df)+_0x16644e),{'name':_0x16644e,'path':join(_0xf6e013,_0x16644e)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x4e8181[_0x555859(0x1d6)](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x2374e1=_0x2ec7,_0x2a68ce={'ukAkB':_0x2374e1(0x1f2),'MFLGK':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','oWopU':function(_0x118c73,_0xdc6099){return _0x118c73(_0xdc6099);},'wWZWZ':_0x2374e1(0x1cc),'WpcLb':'✓\x20Marketplace\x20already\x20added','NbcBX':_0x2374e1(0x1ea),'uPIen':_0x2374e1(0x1e6),'JWOgs':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','vzbOj':function(_0x502bf2,_0x2448ff){return _0x502bf2(_0x2448ff);},'GDxRF':'plugin','vZlQw':_0x2374e1(0x1c2),'vPMEB':'project','RdsRO':_0x2374e1(0x1c5),'EhvzM':_0x2374e1(0x1d2)},_0x329576=await isPluginInstalled('ranger@trailhead');if(_0x329576)return console['log'](_0x2a68ce['ukAkB']),![];console['log'](_0x2a68ce['MFLGK']);const _0x38c02c=await _0x2a68ce['oWopU'](isMarketplaceAdded,_0x2a68ce[_0x2374e1(0x1dc)]);let _0x38260c=_0x38c02c;if(_0x38c02c)console[_0x2374e1(0x1cf)](_0x2a68ce['WpcLb']);else{const _0x1eeeef=await _0x2a68ce['oWopU'](runClaudeCommand,['plugin',_0x2a68ce[_0x2374e1(0x1ce)],'add',_0x2374e1(0x1ca)]);!_0x1eeeef['success']?(console[_0x2374e1(0x1d9)](_0x2a68ce['uPIen'],_0x1eeeef['error']),console[_0x2374e1(0x1cf)](_0x2a68ce['JWOgs'])):_0x38260c=!![];}if(_0x38260c){const _0x5c4eb1=await _0x2a68ce[_0x2374e1(0x1c3)](runClaudeCommand,[_0x2a68ce['GDxRF'],_0x2a68ce['vZlQw'],'ranger@trailhead','--scope',_0x2a68ce['vPMEB']]);!_0x5c4eb1['success']?(console[_0x2374e1(0x1d9)](_0x2a68ce['RdsRO'],_0x5c4eb1['error']),console[_0x2374e1(0x1cf)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console[_0x2374e1(0x1cf)](_0x2a68ce['EhvzM']);}return!![];}export async function setupCi(_0x4ae007,_0xc8cf2c,_0x2647d7){const _0xb45853=_0x2ec7,_0x4510ab={'beJAc':'auth','ELBHK':_0xb45853(0x1e8),'oCGCg':function(_0x4fde48){return _0x4fde48();},'myJlf':function(_0x256344,_0x2fa7fa,_0x4ba565){return _0x256344(_0x2fa7fa,_0x4ba565);},'nRUiz':function(_0x34b5f1,_0x8feb84,_0x45e951){return _0x34b5f1(_0x8feb84,_0x45e951);},'ISnFW':_0xb45853(0x1d7),'kUKEo':function(_0x2efc2f,_0x2968b2,_0x5b9f4e){return _0x2efc2f(_0x2968b2,_0x5b9f4e);},'ktWuP':function(_0xf3c1f1,_0x5829ab){return _0xf3c1f1(_0x5829ab);},'crPAr':_0xb45853(0x1db),'veyiv':'✓\x20Auth\x20state\x20found','iOMOB':_0xb45853(0x1d4),'WQABl':'skills','NBrXQ':function(_0x3729cf,_0x98f913){return _0x3729cf(_0x98f913);}};console[_0xb45853(0x1cf)](_0xb45853(0x1f3)),_0x2647d7?.['trackPhaseStart']('auth'),await authenticate(_0x4ae007),_0x2647d7?.[_0xb45853(0x1e7)](_0x4510ab[_0xb45853(0x1c4)]),_0x2647d7?.['trackPhaseStart'](_0x4510ab[_0xb45853(0x1d8)]);const {path:_0x197c7d,installed:_0x3031e9}=await _0x4510ab[_0xb45853(0x1cb)](ensureRangerDir);await writeRangerGitignore(_0x197c7d);const _0x4f1c57=_0x4510ab['myJlf'](join,_0x197c7d,_0xb45853(0x1dd));!existsSync(_0x4f1c57)&&await _0x4510ab['nRUiz'](mkdir,_0x4f1c57,{'recursive':!![]});_0x2647d7?.['trackPhaseEnd'](_0x4510ab['ELBHK'],{'installed':_0x3031e9}),_0x2647d7?.['trackPhaseStart']('chromium');let _0x16622e=![];_0xc8cf2c?.['skipChromium']?console[_0xb45853(0x1cf)](_0x4510ab['ISnFW']):_0x16622e=await ensureChromium();_0x2647d7?.['trackPhaseEnd']('chromium',{'installed':_0x16622e,'skipped':!!_0xc8cf2c?.['skipChromium']}),_0x2647d7?.['trackPhaseStart']('profile_activate');const _0x2eeb1a=await findCiProfile(_0xc8cf2c?.[_0xb45853(0x1c1)]);let _0xc3e8ec=![];_0xc8cf2c?.['baseUrl']&&(await _0x4510ab['nRUiz'](mkdir,_0x2eeb1a['path'],{'recursive':!![]}),await _0x4510ab[_0xb45853(0x1eb)](saveSettings,_0x2eeb1a['name'],{'baseUrl':_0xc8cf2c[_0xb45853(0x1c8)],'headless':!![]}),console[_0xb45853(0x1cf)]('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0xc8cf2c['baseUrl']),_0xc3e8ec=!![]);const _0x37ce32=join(_0x2eeb1a[_0xb45853(0x1ec)],'settings.json');if(!_0x4510ab[_0xb45853(0x1f5)](existsSync,_0x37ce32)&&!_0xc3e8ec)throw new Error(_0xb45853(0x1d5)+_0x2eeb1a[_0xb45853(0x1de)]+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x3f811f=_0x4510ab[_0xb45853(0x1ed)](join,_0x2eeb1a[_0xb45853(0x1ec)],'auth.json'),_0x47b326=join(_0x2eeb1a['path'],_0x4510ab[_0xb45853(0x1f4)]),_0x562935=_0x4510ab['ktWuP'](existsSync,_0x3f811f),_0x2d5c04=existsSync(_0x47b326);if(_0x2d5c04)try{const _0x4f09e2=await getToken();if(!_0x4f09e2)throw new Error(_0xb45853(0x1ef));const _0x403cf1=await readFile(_0x47b326);_0x4510ab[_0xb45853(0x1eb)](decrypt,_0x403cf1,_0x4f09e2),console[_0xb45853(0x1cf)]('✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)');}catch(_0x583154){const _0x10b731=_0x583154 instanceof Error?_0x583154['message']:String(_0x583154);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x2eeb1a['name']+'\x22:\x20'+_0x10b731);}else _0x562935?console['log'](_0x4510ab['veyiv']):console[_0xb45853(0x1cf)]('\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)');await writeActiveProfileName(_0x2eeb1a['name']),console[_0xb45853(0x1cf)](_0xb45853(0x1bf)+_0x2eeb1a['name']),_0x2647d7?.['trackPhaseEnd'](_0xb45853(0x1c7),{'profileName':_0x2eeb1a[_0xb45853(0x1de)],'hasAuth':_0x562935,'hasEncryptedAuth':_0x2d5c04,'createdSettings':_0xc3e8ec}),_0x2647d7?.[_0xb45853(0x1c6)](_0x4510ab['iOMOB']);const _0x5cacde=await installPluginNonInteractive();_0x2647d7?.[_0xb45853(0x1e7)](_0xb45853(0x1d4),{'installed':_0x5cacde}),_0x2647d7?.['trackPhaseStart'](_0x4510ab[_0xb45853(0x1e2)]),await _0x4510ab[_0xb45853(0x1d0)](skillup,{'autoInstall':_0xb45853(0x1d1)}),_0x2647d7?.[_0xb45853(0x1e7)](_0x4510ab['WQABl']),console[_0xb45853(0x1cf)]('\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a');}function _0x54b6(){const _0x4946b5=['project','✓\x20Claude\x20Code\x20plugin\x20installed','length','plugin','CI\x20profile\x20\x22','join','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','ELBHK','error','44622ShrkzB','auth.json.enc','wWZWZ','sessions','name','Auto-detected\x20CI\x20profile:\x20','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','otbBD','WQABl','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','1040WtjpQD','332520LuDmcx','Failed\x20to\x20add\x20marketplace:','trackPhaseEnd','dir_setup','vSiFp','marketplace','kUKEo','path','nRUiz','386570nfLfzC','No\x20API\x20token\x20available\x20for\x20decryption','4362ANXcil','31973ifIltO','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','crPAr','ktWuP','4286agIPJj','✓\x20Active\x20profile:\x20','504tlZTCj','profile','install','vzbOj','beJAc','Failed\x20to\x20install\x20plugin:','trackPhaseStart','profile_activate','baseUrl','1671616YtlTzj','ranger-testing/trailhead','oCGCg','trailhead','459IejZta','NbcBX','log','NBrXQ'];_0x54b6=function(){return _0x4946b5;};return _0x54b6();}
@@ -1 +1 @@
1
- (function(_0x266b3c,_0x5e5c5c){const _0x13063e=_0x25e6,_0x47e2db=_0x266b3c();while(!![]){try{const _0x351d8d=parseInt(_0x13063e(0xc1))/0x1*(parseInt(_0x13063e(0xc5))/0x2)+-parseInt(_0x13063e(0xc4))/0x3*(-parseInt(_0x13063e(0xc8))/0x4)+-parseInt(_0x13063e(0xd4))/0x5*(-parseInt(_0x13063e(0xc9))/0x6)+-parseInt(_0x13063e(0xe6))/0x7+parseInt(_0x13063e(0xdd))/0x8*(-parseInt(_0x13063e(0xca))/0x9)+-parseInt(_0x13063e(0xcc))/0xa+-parseInt(_0x13063e(0xc7))/0xb*(parseInt(_0x13063e(0xbd))/0xc);if(_0x351d8d===_0x5e5c5c)break;else _0x47e2db['push'](_0x47e2db['shift']());}catch(_0x39a6d2){_0x47e2db['push'](_0x47e2db['shift']());}}}(_0x2e47,0x8bd75));import{basename}from'path';import _0x1a7bf4 from'inquirer';function _0x25e6(_0x2b07bd,_0x55cee5){_0x2b07bd=_0x2b07bd-0xbc;const _0x2e470d=_0x2e47();let _0x25e616=_0x2e470d[_0x2b07bd];return _0x25e616;}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';function _0x2e47(){const _0x1c8bf6=['148NCdUqB','GMGBn','33LQHEtp','114344GgArLM','199974huRNzk','209646Jrqpnx','log','4200840xpkXGC','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','gHbMc','\x20\x202.\x20Run:\x20ranger\x20setup','jOCAF','All\x20projects\x20(','eBhqE','hyezY','170BFeYfo','\x0a📦\x20Installing\x20skills...\x0a','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','YmlCn','To\x20use:','rmOPk','project','isTTY','HyFIV','8SuwTpJ','iuEzs','project-level','\x20\x203.\x20Run:\x20ranger\x20skillup','user-level','iFpWa','\x20<your-api-token>','user','message','3656254qRbhDl','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','\x20--opencode','warn','opencode','Sqyqg','1984428vrVzMn','stdin','FQDfI','autoInstall','206EXyXMJ','/skills/','3|4|1|0|2|5','93RyjAwo'];_0x2e47=function(){return _0x1c8bf6;};return _0x2e47();}import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x9ce04a={}){const _0x43cddf=_0x25e6,_0x1b8809={'eBhqE':_0x43cddf(0xe7),'jOCAF':'claude','YhtPZ':'\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','HyFIV':function(_0x58df3c,_0xe5e2cb){return _0x58df3c===_0xe5e2cb;},'YmlCn':_0x43cddf(0xea),'iFpWa':_0x43cddf(0xe8),'INzFn':'To\x20get\x20started:','PYDlr':'✓\x20Found\x20API\x20token','FQDfI':function(_0x3ebc13,_0x7b5239){return _0x3ebc13(_0x7b5239);},'Sqyqg':_0x43cddf(0xe4),'iGQUL':function(_0x334925,_0x22c4f8){return _0x334925===_0x22c4f8;},'rmOPk':_0x43cddf(0xda),'ernhE':function(_0x127531){return _0x127531();},'dKUWY':_0x43cddf(0xd5),'THzmi':function(_0x26f5ea,_0x4e6b9e,_0x1d5fb2){return _0x26f5ea(_0x4e6b9e,_0x1d5fb2);},'mZUjq':'ranger','hyezY':function(_0x3d8e06,_0x961c20){return _0x3d8e06 instanceof _0x961c20;},'kyUEw':function(_0x39a951,_0x366f8a){return _0x39a951>_0x366f8a;},'gHbMc':_0x43cddf(0xe1),'iuEzs':_0x43cddf(0xdf),'WbSil':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','GMGBn':'\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!'};console[_0x43cddf(0xcb)](_0x1b8809[_0x43cddf(0xd2)]);const _0xf00eed=_0x9ce04a['platform']??_0x1b8809[_0x43cddf(0xd0)],_0x15873c=await getToken();if(!_0x15873c){const _0x29f975=_0x43cddf(0xc3)['split']('|');let _0x158d3a=0x0;while(!![]){switch(_0x29f975[_0x158d3a++]){case'0':console['log'](_0x43cddf(0xcf)+(_0xf00eed===_0x43cddf(0xea)?'\x20--opencode':'')+_0x43cddf(0xe3));continue;case'1':console['log'](_0x1b8809['YhtPZ']);continue;case'2':console[_0x43cddf(0xcb)](_0x43cddf(0xe0)+(_0x1b8809[_0x43cddf(0xdc)](_0xf00eed,_0x1b8809[_0x43cddf(0xd7)])?_0x1b8809[_0x43cddf(0xe2)]:'')+'\x0a');continue;case'3':console[_0x43cddf(0xcb)]('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a');continue;case'4':console['log'](_0x1b8809['INzFn']);continue;case'5':return;}break;}}console['log'](_0x1b8809['PYDlr']);const _0x9a131e=getProjectRoot(),_0x3eb20a=_0x1b8809['FQDfI'](basename,_0x9a131e),_0x115bb6=_0xf00eed===_0x1b8809[_0x43cddf(0xd7)]?_0x1b8809[_0x43cddf(0xbf)](getOpencodeConfigDir,_0x1b8809[_0x43cddf(0xbc)])+_0x43cddf(0xc2):getClaudeConfigDir()+'/skills/',_0x180866=_0x1b8809['iGQUL'](_0xf00eed,_0x1b8809[_0x43cddf(0xd7)])?_0x9a131e+'/.opencode/skills/':_0x9a131e+'/.claude/skills/',_0x1541a5=process[_0x43cddf(0xbe)]['isTTY']&&process['stdout'][_0x43cddf(0xdb)];let _0xd81b2d;if(_0x9ce04a[_0x43cddf(0xc0)])_0xd81b2d=_0x9ce04a[_0x43cddf(0xc0)];else{if(_0x1541a5){const _0x3afc91=await _0x1a7bf4['prompt']([{'type':'list','name':'installLevel','message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':_0x43cddf(0xd1)+_0x115bb6+')','value':'user'},{'name':'This\x20project\x20only\x20('+_0x180866+')','value':_0x1b8809[_0x43cddf(0xd9)]}]}]);_0xd81b2d=_0x3afc91['installLevel'];}else _0xd81b2d=_0x1b8809[_0x43cddf(0xd9)],console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x180866+')');}let _0x40aeb6=0x0;const _0x14bba4=_0x1b8809['ernhE'](getCurrentVersion);console['log'](_0x1b8809['dKUWY']);try{const _0x21cbcc=await _0x1b8809['THzmi'](installSkill,_0x1b8809['mZUjq'],{'cliVersion':_0x14bba4,'level':_0xd81b2d,'platform':_0xf00eed});_0x21cbcc&&_0x40aeb6++;}catch(_0x657222){console[_0x43cddf(0xe9)](_0x43cddf(0xd6),_0x1b8809[_0x43cddf(0xd3)](_0x657222,Error)?_0x657222[_0x43cddf(0xe5)]:_0x657222);}if(_0x1b8809['kyUEw'](_0x40aeb6,0x0)){const _0x4a9065=_0xd81b2d===_0x1b8809['Sqyqg']?_0x1b8809[_0x43cddf(0xce)]:_0x1b8809[_0x43cddf(0xde)];console[_0x43cddf(0xcb)]('\x0a✅\x20Installed\x20'+_0x40aeb6+'\x20'+_0x4a9065+'\x20skill'+(_0x1b8809['kyUEw'](_0x40aeb6,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x9ce04a['suppressUsage']&&(console[_0x43cddf(0xcb)](_0x43cddf(0xd8)),_0xf00eed==='opencode'?console['log'](_0x1b8809['WbSil']):console[_0x43cddf(0xcb)](_0x1b8809[_0x43cddf(0xc6)]));}else console['log'](_0x43cddf(0xcd));}
1
+ (function(_0x73add0,_0x503431){const _0x2fe8c0=_0x4777,_0x181d22=_0x73add0();while(!![]){try{const _0x4f4c99=-parseInt(_0x2fe8c0(0x11c))/0x1*(-parseInt(_0x2fe8c0(0x117))/0x2)+parseInt(_0x2fe8c0(0x113))/0x3+parseInt(_0x2fe8c0(0x114))/0x4+parseInt(_0x2fe8c0(0x10f))/0x5*(parseInt(_0x2fe8c0(0x10a))/0x6)+parseInt(_0x2fe8c0(0x118))/0x7*(parseInt(_0x2fe8c0(0x109))/0x8)+-parseInt(_0x2fe8c0(0xff))/0x9*(parseInt(_0x2fe8c0(0x107))/0xa)+-parseInt(_0x2fe8c0(0x119))/0xb*(parseInt(_0x2fe8c0(0x111))/0xc);if(_0x4f4c99===_0x503431)break;else _0x181d22['push'](_0x181d22['shift']());}catch(_0x275c4c){_0x181d22['push'](_0x181d22['shift']());}}}(_0x4a82,0xcbc1a));import{basename}from'path';import _0x5bd0ca from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';function _0x4777(_0x173e32,_0x2b3747){_0x173e32=_0x173e32-0xf5;const _0x4a8265=_0x4a82();let _0x4777bb=_0x4a8265[_0x173e32];return _0x4777bb;}function _0x4a82(){const _0x42d7c3=['platform','suppressUsage','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','zfWDw','144TVUoRO','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','AmIqi','\x0a📦\x20Installing\x20skills...\x0a','project','To\x20get\x20started:','\x20--opencode','\x20successfully!\x0a','293470iduxuv','stdout','67720hYtGUz','37584WMywMj','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','All\x20projects\x20(','tOqgC','stdin','70Ynhllh','\x20\x202.\x20Run:\x20ranger\x20setup','8220876cfQDcn','rKAmf','698433FyjoUI','2913132vLGQER','xKHPt','/skills/','7472ZyyWZR','651MZTniu','11HCigrU','opencode','lBTce','41QYtKtc','OJRoD','gszCX','autoInstall','log','claude','isTTY','This\x20project\x20only\x20('];_0x4a82=function(){return _0x42d7c3;};return _0x4a82();}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x474051={}){const _0x202116=_0x4777,_0x26e48d={'Jnjfl':_0x202116(0xf8),'ZvfzK':function(_0x4ebe7d){return _0x4ebe7d();},'OJRoD':_0x202116(0x100),'gszCX':_0x202116(0xfd),'fZNfJ':function(_0x518cf2,_0x5d73d9){return _0x518cf2===_0x5d73d9;},'AmIqi':function(_0x3b0b0e,_0x152dfa){return _0x3b0b0e===_0x152dfa;},'xKHPt':'✓\x20Found\x20API\x20token','tOqgC':_0x202116(0x11a),'iKGxb':'user','rKAmf':function(_0x54a1c2){return _0x54a1c2();},'BQDpF':'installLevel','FdlOD':'Where\x20should\x20skills\x20be\x20installed?','cTXeM':'project','jeqiY':function(_0x535e91,_0x131506,_0x5b0be1){return _0x535e91(_0x131506,_0x5b0be1);},'XkQkn':'ranger','FDYcD':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','yVxNk':function(_0x927fa7,_0x989594){return _0x927fa7 instanceof _0x989594;},'RHJCP':'user-level','lBTce':'project-level','Mojgu':function(_0x5ce39a,_0x2da1b5){return _0x5ce39a>_0x2da1b5;},'zfWDw':'To\x20use:'};console['log']('\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a');const _0x3cef9e=_0x474051[_0x202116(0xfb)]??_0x26e48d['Jnjfl'],_0x11d3fa=await _0x26e48d['ZvfzK'](getToken);if(!_0x11d3fa){console[_0x202116(0xf7)](_0x26e48d[_0x202116(0x11d)]),console[_0x202116(0xf7)](_0x202116(0x104)),console[_0x202116(0xf7)](_0x26e48d[_0x202116(0xf5)]),console['log'](_0x202116(0x110)+(_0x26e48d['fZNfJ'](_0x3cef9e,_0x202116(0x11a))?_0x202116(0x105):'')+'\x20<your-api-token>'),console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x26e48d[_0x202116(0x101)](_0x3cef9e,'opencode')?'\x20--opencode':'')+'\x0a');return;}console['log'](_0x26e48d[_0x202116(0x115)]);const _0x1eb634=getProjectRoot(),_0x33b74e=basename(_0x1eb634),_0x65fcdb=_0x3cef9e===_0x26e48d['tOqgC']?getOpencodeConfigDir(_0x26e48d['iKGxb'])+_0x202116(0x116):_0x26e48d[_0x202116(0x112)](getClaudeConfigDir)+_0x202116(0x116),_0x4b26d5=_0x3cef9e==='opencode'?_0x1eb634+'/.opencode/skills/':_0x1eb634+'/.claude/skills/',_0x5943d9=process[_0x202116(0x10e)][_0x202116(0xf9)]&&process[_0x202116(0x108)][_0x202116(0xf9)];let _0x4cdedf;if(_0x474051[_0x202116(0xf6)])_0x4cdedf=_0x474051[_0x202116(0xf6)];else{if(_0x5943d9){const _0x28839e=await _0x5bd0ca['prompt']([{'type':'list','name':_0x26e48d['BQDpF'],'message':_0x26e48d['FdlOD'],'choices':[{'name':_0x202116(0x10c)+_0x65fcdb+')','value':'user'},{'name':_0x202116(0xfa)+_0x4b26d5+')','value':_0x202116(0x103)}]}]);_0x4cdedf=_0x28839e['installLevel'];}else _0x4cdedf=_0x26e48d['cTXeM'],console[_0x202116(0xf7)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x4b26d5+')');}let _0xc2336b=0x0;const _0x593d83=getCurrentVersion();console['log'](_0x202116(0x102));try{const _0xe37a02=await _0x26e48d['jeqiY'](installSkill,_0x26e48d['XkQkn'],{'cliVersion':_0x593d83,'level':_0x4cdedf,'platform':_0x3cef9e});_0xe37a02&&_0xc2336b++;}catch(_0x40230d){console['warn'](_0x26e48d['FDYcD'],_0x26e48d['yVxNk'](_0x40230d,Error)?_0x40230d['message']:_0x40230d);}if(_0xc2336b>0x0){const _0x14b262=_0x4cdedf==='user'?_0x26e48d['RHJCP']:_0x26e48d[_0x202116(0x11b)];console[_0x202116(0xf7)]('\x0a✅\x20Installed\x20'+_0xc2336b+'\x20'+_0x14b262+'\x20skill'+(_0x26e48d['Mojgu'](_0xc2336b,0x1)?'s':'')+_0x202116(0x106)),!_0x474051[_0x202116(0xfc)]&&(console['log'](_0x26e48d[_0x202116(0xfe)]),_0x26e48d['fZNfJ'](_0x3cef9e,_0x26e48d[_0x202116(0x10d)])?console[_0x202116(0xf7)]('\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'):console[_0x202116(0xf7)]('\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[_0x202116(0xf7)](_0x202116(0x10b));}
@@ -1 +1 @@
1
- const _0x5c815d=_0x120c;function _0x4a17(){const _0x4ce0eb=['skipped','error','ranger\x20setup\x20--scope=','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','qfehf','jjqHl','194078JBsHWe','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','xBtmt','EiSep','SGfeY','ntBQA','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','local','\x1b[0m','provided_token','✓\x20Created\x20.ranger/.gitignore','success','method','playwright@','smLCn','fMsgz','status','confirm','14113880fWAtVb','✓\x20Created\x20~/.ranger/\x20directory','close','allowInsecureLocalhost','stdout','user','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','1965esbnAY','354408lMhhpt','nRkcD','You\x20can\x20install\x20it\x20manually\x20by\x20running:','chromium','skipAuth','gtfve','win32','opencode','✓\x20Authenticated\x20to\x20','MOtVQ','platform','prompt','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','TRbBM','existing_token','2568843XxXHnz','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','log','37540pscOXq','organizationName','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','trackPhaseEnd','warn','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','✓\x20Already\x20authenticated\x20to\x20','url','Authentication\x20failed:\x20','SotDK','7EdzaIF','withDeps','VgWfs','\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','pZnIV','LPtVe','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','Installation\x20failed\x20with\x20exit\x20code\x20','BpTPH','\x20install\x20chromium','XLSQg','profile','neFQR','The\x20required\x20version\x20(','skipChromium','stdin','skills','SsNVQ','bxKox',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','RYdTi','ranger','env','cQkLD','trackPhaseStart','message','9704kaKgLh','scope','\x20\x20npx\x20playwright@','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','SKKgQ','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','SZHaF','inherit','1304166fePndI','✓\x20Playwright\x20Chromium\x20browser\x20found','ZVunV','vqJRi','wqLbE','432sLWlPo','28zCQJVl','...','ranger\x20profile\x20add\x20<name>','1.58.2','XsWIj'];_0x4a17=function(){return _0x4ce0eb;};return _0x4a17();}(function(_0x37191e,_0x344ffc){const _0x1dc339=_0x120c,_0x127292=_0x37191e();while(!![]){try{const _0x20f4b0=-parseInt(_0x1dc339(0x167))/0x1*(parseInt(_0x1dc339(0x130))/0x2)+parseInt(_0x1dc339(0x159))/0x3+-parseInt(_0x1dc339(0x183))/0x4*(-parseInt(_0x1dc339(0x149))/0x5)+parseInt(_0x1dc339(0x11f))/0x6*(parseInt(_0x1dc339(0x125))/0x7)+parseInt(_0x1dc339(0x14a))/0x8+-parseInt(_0x1dc339(0x124))/0x9*(parseInt(_0x1dc339(0x15c))/0xa)+-parseInt(_0x1dc339(0x142))/0xb;if(_0x20f4b0===_0x344ffc)break;else _0x127292['push'](_0x127292['shift']());}catch(_0x5bcf0f){_0x127292['push'](_0x127292['shift']());}}}(_0x4a17,0x8dd23));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';function _0x120c(_0x11b88c,_0x2fcf38){_0x11b88c=_0x11b88c-0x11e;const _0x4a177b=_0x4a17();let _0x120c0b=_0x4a177b[_0x11b88c];return _0x120c0b;}import _0x507a7e 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=_0x5c815d(0x128);const bold=_0x457cad=>'\x1b[1m'+_0x457cad+_0x5c815d(0x138);export function getPlaywrightVersion(){const _0x12e951={'xGhSj':'playwright/package.json'};try{const _0x4bebe5=require['resolve'](_0x12e951['xGhSj']),_0x35d95e=require(_0x4bebe5);return _0x35d95e['version'];}catch{return null;}}export function installChromiumBinary(_0xe29345,_0x23ea1f=![]){const _0x211d77=_0x5c815d,_0x50178e={'qJGLp':function(_0x2bf60a,_0x76436f){return _0x2bf60a(_0x76436f);},'fzmKy':function(_0x466a9f,_0x3f5541,_0x3a9a01,_0xe95fd8){return _0x466a9f(_0x3f5541,_0x3a9a01,_0xe95fd8);},'xQUXU':'ignore','jjqHl':_0x211d77(0x11e),'lMHOo':function(_0x975044,_0x13021e){return _0x975044===_0x13021e;},'SGfeY':'error'};return new Promise((_0x4f0e25,_0x53ce9e)=>{const _0x9fa192=_0x211d77,_0x533b65={'SotDK':function(_0x5bec48,_0x471d38){return _0x50178e['qJGLp'](_0x5bec48,_0x471d38);}},_0x1ef349=[_0x9fa192(0x13d)+_0xe29345,'install',..._0x23ea1f?['--with-deps']:[],_0x9fa192(0x14d)],_0x110df7=_0x50178e['fzmKy'](spawn,'npx',_0x1ef349,{'stdio':[_0x50178e['xQUXU'],'inherit',_0x50178e[_0x9fa192(0x12f)]],'shell':_0x50178e['lMHOo'](process[_0x9fa192(0x154)],_0x9fa192(0x150))});_0x110df7['on'](_0x9fa192(0x144),_0x9ac133=>{const _0x4055c7=_0x9fa192;_0x9ac133===0x0?_0x4f0e25():_0x533b65[_0x4055c7(0x166)](_0x53ce9e,new Error(_0x4055c7(0x170)+_0x9ac133));}),_0x110df7['on'](_0x50178e[_0x9fa192(0x134)],_0x207039=>{_0x53ce9e(_0x207039);});});}export async function authenticate(_0x3253be){const _0x5c2a50=_0x5c815d,_0x1fce00={'yHKSU':function(_0x466dd1){return _0x466dd1();},'XLSQg':function(_0xaabf0b,_0x52347d){return _0xaabf0b(_0x52347d);},'XPRrN':function(_0x1aa8a6){return _0x1aa8a6();},'EBRfb':'✓\x20Exported\x20credentials\x20for\x20CI','BpTPH':'✓\x20Stored\x20credentials\x20locally','MOtVQ':_0x5c2a50(0x139)};if(!_0x3253be){const _0x18297a=await _0x1fce00['yHKSU'](getToken);if(_0x18297a){const _0x1bd2bf=await _0x1fce00[_0x5c2a50(0x173)](getCurrentUser,_0x18297a);if(_0x1bd2bf[_0x5c2a50(0x13b)])return console[_0x5c2a50(0x15b)](_0x5c2a50(0x163)+_0x1bd2bf[_0x5c2a50(0x147)][_0x5c2a50(0x15d)]),{'token':_0x18297a,'method':_0x5c2a50(0x158)};}try{_0x3253be=await _0x1fce00['XPRrN'](runDeviceAuthFlow);}catch(_0x3790bb){throw new Error('Authentication\x20failed:\x20'+(_0x3790bb instanceof Error?_0x3790bb['message']:_0x3790bb));}const _0x41c356=await getCurrentUser(_0x3253be);if(!_0x41c356[_0x5c2a50(0x13b)])throw new Error(_0x5c2a50(0x16d)+_0x41c356['error']);return console['log'](_0x5c2a50(0x152)+_0x41c356['user'][_0x5c2a50(0x15d)]),{'token':_0x3253be,'method':'device_auth'};}console[_0x5c2a50(0x15b)]('Validating\x20API\x20token...');const _0x117158=await getCurrentUser(_0x3253be);if(!_0x117158[_0x5c2a50(0x13b)]){if(_0x117158[_0x5c2a50(0x140)])throw new Error(_0x5c2a50(0x165)+_0x117158['error']+_0x5c2a50(0x12d));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x117158[_0x5c2a50(0x12b)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console['log'](_0x5c2a50(0x152)+_0x117158['user']['organizationName']),await storeToken(_0x3253be),console['log'](process[_0x5c2a50(0x17f)]['GITHUB_ENV']?_0x1fce00['EBRfb']:_0x1fce00[_0x5c2a50(0x171)]),{'token':_0x3253be,'method':_0x1fce00[_0x5c2a50(0x153)]};}export async function ensureRangerDir(_0x5c66f8){const _0x3c8a48=_0x5c815d,_0x144504={'xqGde':function(_0x232493,_0x572fc1){return _0x232493(_0x572fc1);},'SsNVQ':_0x3c8a48(0x143),'pZnIV':'✓\x20~/.ranger/\x20directory\x20already\x20exists'};void _0x5c66f8;const _0x55b8c9=getRangerHomeDir();return!_0x144504['xqGde'](existsSync,_0x55b8c9)?(await mkdir(_0x55b8c9,{'recursive':!![]}),console['log'](_0x144504[_0x3c8a48(0x17a)]),{'path':_0x55b8c9,'installed':!![]}):(console[_0x3c8a48(0x15b)](_0x144504[_0x3c8a48(0x16b)]),{'path':_0x55b8c9,'installed':![]});}export async function ensureChromium(_0x2464d2=![]){const _0xe17d50=_0x5c815d,_0x2f78ab={'EEvtp':function(_0x4c35cf,_0x5e0001){return _0x4c35cf(_0x5e0001);},'XsWIj':'install','bxKox':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','nRkcD':function(_0x1449cd,_0x539b0e){return _0x1449cd instanceof _0x539b0e;}};let _0x20d281=![];try{const _0xa01c04=chromium['executablePath']();_0x20d281=_0x2f78ab['EEvtp'](existsSync,_0xa01c04);}catch{_0x20d281=![];}if(_0x20d281)return console[_0xe17d50(0x15b)](_0xe17d50(0x120)),![];const _0x1644b6=getPlaywrightVersion(),_0x30a2a7=_0x1644b6??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x26d4de=!_0x1644b6,_0x102623=process[_0xe17d50(0x178)]['isTTY']&&process[_0xe17d50(0x146)]['isTTY'];let _0x4539f3=!![];if(_0x102623){const {install:_0x1e1cc8}=await _0x507a7e[_0xe17d50(0x155)]([{'type':_0xe17d50(0x141),'name':_0x2f78ab[_0xe17d50(0x129)],'message':_0x26d4de?_0xe17d50(0x188)+_0x30a2a7+'\x20now?':_0xe17d50(0x176)+_0x30a2a7+_0xe17d50(0x17c),'default':!![]}]);_0x4539f3=_0x1e1cc8;}else console['log'](_0xe17d50(0x186)+_0x30a2a7+(_0x26d4de?'\x20(fallback\x20version)':'')+_0xe17d50(0x126));if(_0x4539f3){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x30a2a7,_0x2464d2),console['log'](_0xe17d50(0x162));}catch(_0x293193){console['error'](_0x2f78ab[_0xe17d50(0x17b)],_0x2f78ab[_0xe17d50(0x14b)](_0x293193,Error)?_0x293193[_0xe17d50(0x182)]:_0x293193),console[_0xe17d50(0x15b)](_0xe17d50(0x14c)),console[_0xe17d50(0x15b)](_0xe17d50(0x185)+_0x30a2a7+_0xe17d50(0x172));}}else console[_0xe17d50(0x15b)]('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console[_0xe17d50(0x15b)](_0xe17d50(0x156)),console[_0xe17d50(0x15b)](_0xe17d50(0x185)+_0x30a2a7+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x3e9cb9){const _0x18a362=_0x5c815d,_0x5ac570={'sURgV':_0x18a362(0x13a)},_0x778407=join(_0x3e9cb9,'.gitignore'),_0x2565a8=_0x18a362(0x16a);await writeFile(_0x778407,_0x2565a8),console['log'](_0x5ac570['sURgV']);}export async function ensureLocalEnv(_0x107166,_0x14b47d){const _0x153d5d=_0x5c815d,_0x32eacf={'ntBQA':function(_0x699f51){return _0x699f51();},'cQkLD':_0x153d5d(0x147),'RYdTi':_0x153d5d(0x137),'ADfjE':'✓\x20Local\x20profile\x20already\x20exists','LPtVe':function(_0x14a3f3,_0x1ef60c,_0x582335,_0x7486f1){return _0x14a3f3(_0x1ef60c,_0x582335,_0x7486f1);},'hqgrR':'\x0a❌\x20Profile\x20setup\x20failed:','vstxf':function(_0x25e2fd,_0x53dbd9){return _0x25e2fd instanceof _0x53dbd9;}};if(!_0x32eacf[_0x153d5d(0x135)](findGitRoot)&&_0x107166?.['scope']!==_0x32eacf[_0x153d5d(0x180)])return console[_0x153d5d(0x15b)](_0x153d5d(0x15e)),{'ready':![],'skipped':!![]};const _0x5c30dc=_0x107166?.[_0x153d5d(0x184)]===_0x32eacf['cQkLD']?getRangerHomeDir():undefined;if(findExistingEnv('local',{'locations':[_0x32eacf[_0x153d5d(0x17d)]],'rangerDir':_0x5c30dc}))return console[_0x153d5d(0x15b)](_0x32eacf['ADfjE']),{'ready':!![],'skipped':![]};try{return await _0x32eacf[_0x153d5d(0x16c)](addEnv,_0x153d5d(0x137),{'url':_0x107166?.[_0x153d5d(0x164)],'force':_0x107166?.['force'],'allowInsecureLocalhost':_0x107166?.['allowInsecureLocalhost'],'scope':_0x107166?.['scope']},_0x14b47d),{'ready':!![],'skipped':![]};}catch(_0xfd2a17){return console['error'](_0x32eacf['hqgrR'],_0x32eacf['vstxf'](_0xfd2a17,Error)?_0xfd2a17['message']:_0xfd2a17),{'ready':![],'skipped':![]};}}export async function start(_0x4a550d,_0x2d000b,_0x490d17){const _0x85c81f=_0x5c815d,_0x56f4eb={'ZEWVt':function(_0x50729e,_0x1d0b53){return _0x50729e!==_0x1d0b53;},'vqJRi':function(_0x590eee,_0x1e7e63){return _0x590eee+_0x1e7e63;},'smLCn':function(_0x2b4421,_0x23af12){return _0x2b4421(_0x23af12);},'fMsgz':function(_0x42df65){return _0x42df65();},'gtfve':'auth','WdVRs':_0x85c81f(0x12a),'qfehf':_0x85c81f(0x14d),'kxJsr':_0x85c81f(0x136),'neFQR':'plugin','SKKgQ':function(_0x2803b5,_0x593785){return _0x2803b5&&_0x593785;},'mikla':_0x85c81f(0x179),'SZHaF':function(_0x458613){return _0x458613();},'ICsct':_0x85c81f(0x151),'JifGp':function(_0x3b7b12,_0x122cb2){return _0x3b7b12(_0x122cb2);},'fjhli':_0x85c81f(0x174),'VgWfs':function(_0x3d2e07,_0x5b84d2,_0x518c46){return _0x3d2e07(_0x5b84d2,_0x518c46);},'wqLbE':_0x85c81f(0x147),'EiSep':function(_0x32c69a,_0x40f9f0){return _0x32c69a+_0x40f9f0;},'ZVunV':function(_0x8f26be,_0x2b508f){return _0x8f26be(_0x2b508f);},'YnTqM':_0x85c81f(0x127),'TRbBM':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','gOiBS':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','xBtmt':function(_0x42873f,_0x517c4a){return _0x42873f+_0x517c4a;}};console[_0x85c81f(0x15b)]('\x0a🚀\x20Ranger\x20Setup\x0a');_0x2d000b?.['scope']!==undefined&&_0x56f4eb['ZEWVt'](_0x2d000b['scope'],'user')&&(console[_0x85c81f(0x12b)](_0x56f4eb['vqJRi'](_0x85c81f(0x12c)+_0x56f4eb[_0x85c81f(0x13e)](String,_0x2d000b['scope'])+'\x20is\x20no\x20longer\x20supported.\x20','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20')+_0x85c81f(0x16f)),process['exit'](0x1));_0x2d000b={..._0x2d000b,'scope':'user'};const _0x4379b5=!_0x56f4eb[_0x85c81f(0x13e)](existsSync,_0x56f4eb[_0x85c81f(0x13f)](getRangerHomeDir));await ensureRangerDir(_0x85c81f(0x147));if(_0x2d000b?.[_0x85c81f(0x14e)])console[_0x85c81f(0x15b)]('✓\x20Skipping\x20authentication\x20(--skip-auth)'),_0x490d17?.[_0x85c81f(0x160)](_0x56f4eb['gtfve'],{'isFirstRun':_0x4379b5,'method':_0x56f4eb['WdVRs']});else{_0x490d17?.[_0x85c81f(0x181)](_0x56f4eb[_0x85c81f(0x14f)]);const _0x51ca30=await authenticate(_0x4a550d);_0x490d17?.['trackPhaseEnd']('auth',{'isFirstRun':_0x4379b5,'method':_0x51ca30[_0x85c81f(0x13c)]});}_0x490d17?.[_0x85c81f(0x181)](_0x56f4eb[_0x85c81f(0x12e)]);_0x2d000b?.[_0x85c81f(0x177)]?console['log'](_0x56f4eb['kxJsr']):await ensureChromium(_0x2d000b?.[_0x85c81f(0x168)]);_0x490d17?.['trackPhaseEnd'](_0x56f4eb['qfehf'],{'isFirstRun':_0x4379b5,'skipped':!!_0x2d000b?.['skipChromium']}),console[_0x85c81f(0x15b)](_0x85c81f(0x16e));const _0x5e0bf0=_0x2d000b?.[_0x85c81f(0x184)],_0x2119d1=_0x2d000b?.[_0x85c81f(0x151)]??![];let _0x26df8b=null;_0x2119d1?(_0x490d17?.['trackPhaseStart'](_0x56f4eb[_0x85c81f(0x175)]),_0x26df8b=await _0x56f4eb[_0x85c81f(0x13e)](ensureOpencodePluginConfig,_0x5e0bf0),_0x490d17?.['trackPhaseEnd'](_0x56f4eb['neFQR'],{'isFirstRun':_0x4379b5,'opencode':!![]})):(_0x490d17?.[_0x85c81f(0x181)]('plugin'),await ensureClaudePlugin(_0x5e0bf0),_0x490d17?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x4379b5}));if(_0x56f4eb[_0x85c81f(0x187)](_0x2119d1,_0x26df8b)){_0x490d17?.['trackPhaseStart'](_0x56f4eb['mikla']);try{await installSkill(_0x85c81f(0x17e),{'level':_0x26df8b[_0x85c81f(0x184)],'cliVersion':_0x56f4eb[_0x85c81f(0x189)](getCurrentVersion),'platform':_0x56f4eb['ICsct']}),_0x490d17?.['trackPhaseEnd'](_0x56f4eb['mikla'],{'isFirstRun':_0x4379b5,'opencode':!![]});}catch(_0x69e5e2){console[_0x85c81f(0x161)](_0x85c81f(0x148),_0x69e5e2 instanceof Error?_0x69e5e2[_0x85c81f(0x182)]:_0x69e5e2),_0x490d17?.['trackPhaseEnd'](_0x85c81f(0x179),{'isFirstRun':_0x4379b5,'opencode':!![],'failed':!![]});}}else _0x490d17?.[_0x85c81f(0x181)]('skills'),await _0x56f4eb['JifGp'](ensureClaudeSkills,_0x5e0bf0),_0x490d17?.['trackPhaseEnd']('skills',{'isFirstRun':_0x4379b5});if(_0x2d000b?.['skipAuth'])console[_0x85c81f(0x15b)](_0x85c81f(0x15a));else{if(_0x2d000b?.[_0x85c81f(0x164)]){_0x490d17?.[_0x85c81f(0x181)](_0x56f4eb['fjhli']);const _0x179dbc=await _0x56f4eb[_0x85c81f(0x169)](ensureLocalEnv,{'url':_0x2d000b['url'],'force':_0x2d000b?.['force'],'allowInsecureLocalhost':_0x2d000b?.[_0x85c81f(0x145)],'scope':_0x56f4eb[_0x85c81f(0x123)]},_0x490d17);_0x490d17?.[_0x85c81f(0x160)](_0x85c81f(0x174),{'isFirstRun':_0x4379b5,'profileReady':_0x179dbc['ready'],'userSkipped':_0x179dbc[_0x85c81f(0x12a)]});}else console['log'](_0x56f4eb['vqJRi'](_0x56f4eb[_0x85c81f(0x133)]('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+('\x0a\x20\x20'+_0x56f4eb[_0x85c81f(0x121)](bold,_0x56f4eb['YnTqM'])),_0x85c81f(0x131))+'\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles'));}if(_0x2119d1)console[_0x85c81f(0x15b)](_0x56f4eb[_0x85c81f(0x157)]),console['log']('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console['log'](_0x56f4eb['gOiBS']),console[_0x85c81f(0x15b)]('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x25f150=_0x56f4eb['ZVunV'](bold,'/ranger:enable');console[_0x85c81f(0x15b)](_0x56f4eb[_0x85c81f(0x122)](_0x56f4eb[_0x85c81f(0x132)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x25f150+'\x20and\x20prompt\x20the\x20coding','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'),_0x85c81f(0x15f))+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
1
+ function _0x1032(_0x17c1b1,_0x53d606){_0x17c1b1=_0x17c1b1-0xf5;const _0x40aef1=_0x40ae();let _0x10320b=_0x40aef1[_0x17c1b1];return _0x10320b;}(function(_0x3eddac,_0x2b54cc){const _0x26b404=_0x1032,_0x26ff0c=_0x3eddac();while(!![]){try{const _0x118abc=parseInt(_0x26b404(0x162))/0x1+parseInt(_0x26b404(0x11e))/0x2*(-parseInt(_0x26b404(0x115))/0x3)+parseInt(_0x26b404(0x12e))/0x4*(-parseInt(_0x26b404(0xfa))/0x5)+parseInt(_0x26b404(0xf7))/0x6+-parseInt(_0x26b404(0x146))/0x7+-parseInt(_0x26b404(0x142))/0x8*(parseInt(_0x26b404(0xf9))/0x9)+parseInt(_0x26b404(0x165))/0xa*(parseInt(_0x26b404(0xfb))/0xb);if(_0x118abc===_0x2b54cc)break;else _0x26ff0c['push'](_0x26ff0c['shift']());}catch(_0x335f7e){_0x26ff0c['push'](_0x26ff0c['shift']());}}}(_0x40ae,0xa4328));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x4bf64e 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';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=_0x7e5154=>'\x1b[1m'+_0x7e5154+'\x1b[0m';export function getPlaywrightVersion(){const _0x584b00=_0x1032,_0x33800b={'OBnfO':function(_0xd4fad6,_0x14de89){return _0xd4fad6(_0x14de89);}};try{const _0x12cc1b=require[_0x584b00(0x13c)]('playwright/package.json'),_0x52c768=_0x33800b[_0x584b00(0x121)](require,_0x12cc1b);return _0x52c768[_0x584b00(0x119)];}catch{return null;}}export function installChromiumBinary(_0x590ba2,_0x4623c4=![]){const _0x39271c=_0x1032,_0x1290ee={'BdmHq':'install','AzwDC':function(_0x1fa879,_0x2a6a5f,_0x20e459,_0x40cce3){return _0x1fa879(_0x2a6a5f,_0x20e459,_0x40cce3);},'FSKAp':_0x39271c(0x15a),'tImvK':function(_0x743394,_0x24d25c){return _0x743394===_0x24d25c;},'iyvpR':'win32','MjMGx':_0x39271c(0x12c)};return new Promise((_0x1432a9,_0x379100)=>{const _0x4d7186=_0x39271c,_0x11718d=['playwright@'+_0x590ba2,_0x1290ee['BdmHq'],..._0x4623c4?['--with-deps']:[],'chromium'],_0x113d01=_0x1290ee[_0x4d7186(0x157)](spawn,_0x4d7186(0x15d),_0x11718d,{'stdio':[_0x1290ee[_0x4d7186(0x100)],_0x4d7186(0xfe),_0x4d7186(0xfe)],'shell':_0x1290ee['tImvK'](process['platform'],_0x1290ee[_0x4d7186(0xfd)])});_0x113d01['on'](_0x4d7186(0x12b),_0x3f9fd7=>{const _0x4e0e54=_0x4d7186;_0x3f9fd7===0x0?_0x1432a9():_0x379100(new Error(_0x4e0e54(0x10e)+_0x3f9fd7));}),_0x113d01['on'](_0x1290ee[_0x4d7186(0x145)],_0x28cd09=>{_0x379100(_0x28cd09);});});}export async function authenticate(_0x50acfb){const _0x257da4=_0x1032,_0x1b2acd={'RIKNl':function(_0x173109,_0x17b08e){return _0x173109 instanceof _0x17b08e;},'itZhH':function(_0x76e7a2,_0x4cf863){return _0x76e7a2(_0x4cf863);},'CjuOk':'Validating\x20API\x20token...','OWWWH':_0x257da4(0x139)};if(!_0x50acfb){const _0xcd58bc=await getToken();if(_0xcd58bc){const _0x2c774f=await getCurrentUser(_0xcd58bc);if(_0x2c774f[_0x257da4(0x102)])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x2c774f['user']['organizationName']),{'token':_0xcd58bc,'method':'existing_token'};}try{_0x50acfb=await runDeviceAuthFlow();}catch(_0x3d0121){throw new Error(_0x257da4(0x134)+(_0x1b2acd[_0x257da4(0x10d)](_0x3d0121,Error)?_0x3d0121['message']:_0x3d0121));}const _0x23666f=await _0x1b2acd['itZhH'](getCurrentUser,_0x50acfb);if(!_0x23666f['success'])throw new Error(_0x257da4(0x109)+_0x23666f['error']);return console['log'](_0x257da4(0x14e)+_0x23666f[_0x257da4(0x149)]['organizationName']),{'token':_0x50acfb,'method':'device_auth'};}console[_0x257da4(0x108)](_0x1b2acd[_0x257da4(0x14b)]);const _0x2d3d82=await getCurrentUser(_0x50acfb);if(!_0x2d3d82[_0x257da4(0x102)]){if(_0x2d3d82[_0x257da4(0x10b)])throw new Error(_0x257da4(0x134)+_0x2d3d82[_0x257da4(0x12c)]+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0x257da4(0x138)+_0x2d3d82['error']+_0x257da4(0x111));}return console['log']('✓\x20Authenticated\x20to\x20'+_0x2d3d82['user']['organizationName']),await storeToken(_0x50acfb),console[_0x257da4(0x108)](process[_0x257da4(0x12a)]['GITHUB_ENV']?_0x1b2acd['OWWWH']:'✓\x20Stored\x20credentials\x20locally'),{'token':_0x50acfb,'method':'provided_token'};}export async function ensureRangerDir(_0x57fc73){const _0x1c67fa=_0x1032,_0x2b9d1d={'XJvRY':function(_0x42ef4f){return _0x42ef4f();},'jrDTf':function(_0x306c20,_0xdf61d5){return _0x306c20(_0xdf61d5);},'Saser':'✓\x20Created\x20.ranger/\x20directory'};let _0x1e8bfe;if(_0x57fc73==='user')_0x1e8bfe=getRangerHomeDir();else{const _0x257cf6=findGitRoot();_0x1e8bfe=_0x257cf6?join(_0x257cf6,_0x1c67fa(0x10c)):_0x2b9d1d[_0x1c67fa(0x137)](getRangerDir);}return!_0x2b9d1d[_0x1c67fa(0x14a)](existsSync,_0x1e8bfe)?(await mkdir(_0x1e8bfe,{'recursive':!![]}),console[_0x1c67fa(0x108)](_0x2b9d1d['Saser']),{'path':_0x1e8bfe,'installed':!![]}):(console['log']('✓\x20.ranger/\x20directory\x20already\x20exists'),{'path':_0x1e8bfe,'installed':![]});}function _0x40ae(){const _0x20ac62=['KgHwp','xcoCI','env','close','error','QQcqx','4EjvFuD','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','\x20(fallback\x20version)','tXLfS','skipped','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','Authentication\x20failed:\x20','...','method','XJvRY','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','✓\x20Exported\x20credentials\x20for\x20CI','scope','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','resolve','use\x20until\x20the\x20session\x20expires.\x0a','stdout','sLySX','confirm','prompt','104MxIMnH','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','chromium','MjMGx','7391818BMzUQv','/ranger:enable','LjQuc','user','jrDTf','CjuOk','ready','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','✓\x20Authenticated\x20to\x20','url','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','oNCVK','warn','install','trackPhaseStart','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','AzwDC','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x0aIn\x20Claude\x20Code,\x20run\x20','ignore','aMNFq','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','npx','wCuOx','pCkvu','No\x20git\x20repository\x20found','skills','844303VTJdHZ','\x0a⚠\x20Skipping\x20Chromium\x20installation.','allowInsecureLocalhost','1835270YzxhGJ','mUOsW','\x20\x20npx\x20playwright@','\x20now?','local','TWcXj','3522972mzNmiM','tRdki','161613KOKryJ','4982395ddXxoq','110PMqKrb','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','iyvpR','inherit','sKXQA','FSKAp','stdin','success','ranger\x20profile\x20add\x20local','gGZSJ','qTsvr','hnrbU','force','log','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','xAiag','status','.ranger','RIKNl','Installation\x20failed\x20with\x20exit\x20code\x20','trackPhaseEnd','opencode','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','HWBCh','mBkNU','profile','308289wQFnlz','QuNRD','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory,\x0a','version','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','message','isTTY','6IgEeoz','uVKUC','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','OBnfO','git_check','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','\x0aInstalling\x20Chromium\x20browser...\x0a','auth','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','skipChromium'];_0x40ae=function(){return _0x20ac62;};return _0x40ae();}export async function ensureChromium(_0x396aa3=![]){const _0xcb5e26=_0x1032,_0x44d9f0={'mIRNv':function(_0x4a3843){return _0x4a3843();},'mUOsW':function(_0x188333,_0x4982f0,_0xb82f01){return _0x188333(_0x4982f0,_0xb82f01);},'EadWu':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','bTUKe':_0xcb5e26(0x163),'xGYff':_0xcb5e26(0x12f)};let _0x28e664=![];try{const _0x655094=chromium['executablePath']();_0x28e664=existsSync(_0x655094);}catch{_0x28e664=![];}if(_0x28e664)return console['log']('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x2d4c5d=_0x44d9f0['mIRNv'](getPlaywrightVersion),_0x243cf7=_0x2d4c5d??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x485906=!_0x2d4c5d,_0x4a7997=process['stdin'][_0xcb5e26(0x11d)]&&process['stdout'][_0xcb5e26(0x11d)];let _0x2be9f6=!![];if(_0x4a7997){const {install:_0x562b48}=await _0x4bf64e[_0xcb5e26(0x141)]([{'type':'confirm','name':_0xcb5e26(0x153),'message':_0x485906?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x243cf7+_0xcb5e26(0x168):'The\x20required\x20version\x20('+_0x243cf7+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x2be9f6=_0x562b48;}else console['log'](_0xcb5e26(0x133)+_0x243cf7+(_0x485906?_0xcb5e26(0x130):'')+_0xcb5e26(0x135));if(_0x2be9f6){console[_0xcb5e26(0x108)](_0xcb5e26(0x124));try{await _0x44d9f0[_0xcb5e26(0x166)](installChromiumBinary,_0x243cf7,_0x396aa3),console[_0xcb5e26(0x108)](_0x44d9f0['EadWu']);}catch(_0x3afcb8){console[_0xcb5e26(0x12c)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x3afcb8 instanceof Error?_0x3afcb8[_0xcb5e26(0x11c)]:_0x3afcb8),console['log']('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),console['log']('\x20\x20npx\x20playwright@'+_0x243cf7+'\x20install\x20chromium');}}else console[_0xcb5e26(0x108)](_0x44d9f0['bTUKe']),console[_0xcb5e26(0x108)](_0x44d9f0['xGYff']),console[_0xcb5e26(0x108)](_0xcb5e26(0x167)+_0x243cf7+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x37fcaa){const _0x4c7ecf=_0x1032,_0x2ed73b={'FOfjB':function(_0x3b1e6d,_0x53e536,_0x4db160){return _0x3b1e6d(_0x53e536,_0x4db160);},'JLZuq':'.gitignore','LkYsY':'✓\x20Created\x20.ranger/.gitignore'},_0x8c17ee=_0x2ed73b['FOfjB'](join,_0x37fcaa,_0x2ed73b['JLZuq']),_0x513e55='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await writeFile(_0x8c17ee,_0x513e55),console[_0x4c7ecf(0x108)](_0x2ed73b['LkYsY']);}function printProfileSetupLaterInstructions(){const _0x32b9ee=_0x1032,_0x11d5e4={'gTiid':_0x32b9ee(0x126),'RIJic':function(_0x8d6248,_0x5317a2){return _0x8d6248(_0x5317a2);},'hrKPa':_0x32b9ee(0x103),'tRdki':_0x32b9ee(0x14d)};console[_0x32b9ee(0x108)](_0x11d5e4['gTiid']),console[_0x32b9ee(0x108)]('\x20\x20'+_0x11d5e4['RIJic'](bold,_0x11d5e4['hrKPa'])),console['log'](_0x11d5e4[_0x32b9ee(0xf8)]);}export async function ensureLocalEnv(_0x13177c,_0x45e9d3){const _0x2f94ed=_0x1032,_0x35ac12={'sKXQA':function(_0x4fe582){return _0x4fe582();},'QuNRD':_0x2f94ed(0x120),'CAIDH':function(_0x408790,_0x3a6e35){return _0x408790===_0x3a6e35;},'xAiag':function(_0x5ef3cc,_0x3a6788,_0x376735){return _0x5ef3cc(_0x3a6788,_0x376735);},'qyHzq':'local','PcesZ':'✓\x20Local\x20profile\x20already\x20exists','hAuRh':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','cycEn':_0x2f94ed(0x13d),'cFDWf':_0x2f94ed(0x140),'gpsXP':'wantsProfile','PLtHD':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','qTsvr':function(_0x43125b,_0x3041e9,_0xa371a5,_0x371e64){return _0x43125b(_0x3041e9,_0xa371a5,_0x371e64);}};if(!_0x35ac12[_0x2f94ed(0xff)](findGitRoot))return console['log'](_0x35ac12[_0x2f94ed(0x116)]),{'ready':![],'skipped':!![]};const _0x9688e=_0x35ac12['CAIDH'](_0x13177c?.['scope'],'user')?getRangerHomeDir():undefined;if(_0x35ac12[_0x2f94ed(0x10a)](findExistingEnv,_0x2f94ed(0xf5),{'locations':[_0x35ac12['qyHzq']],'rangerDir':_0x9688e}))return console[_0x2f94ed(0x108)](_0x35ac12['PcesZ']),{'ready':!![],'skipped':![]};const _0x23964c=process[_0x2f94ed(0x101)][_0x2f94ed(0x11d)]&&process['stdout']['isTTY'];if(_0x23964c&&!_0x13177c?.[_0x2f94ed(0x14f)]){console[_0x2f94ed(0x108)]('\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how'),console['log'](_0x35ac12['hAuRh']),console[_0x2f94ed(0x108)]('auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to'),console[_0x2f94ed(0x108)](_0x35ac12['cycEn']),console['log']('You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.');const {wantsProfile:_0xa00b6}=await _0x4bf64e[_0x2f94ed(0x141)]([{'type':_0x35ac12['cFDWf'],'name':_0x35ac12['gpsXP'],'message':_0x35ac12['PLtHD'],'default':!![]}]);if(!_0xa00b6)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await _0x35ac12[_0x2f94ed(0x105)](addEnv,_0x35ac12['qyHzq'],{'url':_0x13177c?.[_0x2f94ed(0x14f)],'force':_0x13177c?.[_0x2f94ed(0x107)],'allowInsecureLocalhost':_0x13177c?.['allowInsecureLocalhost'],'scope':_0x13177c?.['scope']},_0x45e9d3),{'ready':!![],'skipped':![]};}catch(_0x15e3b3){return console[_0x2f94ed(0x12c)]('\x0a❌\x20Profile\x20setup\x20failed:',_0x15e3b3 instanceof Error?_0x15e3b3['message']:_0x15e3b3),_0x35ac12['sKXQA'](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x11e61f,_0x5d4b41,_0x4ebbbb){const _0x105073=_0x1032,_0x3a5137={'XYftx':'\x0a🚀\x20Ranger\x20Setup\x0a','xcoCI':'Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','aMNFq':_0x105073(0x149),'eOPdh':function(_0x578cea,_0x55ed31){return _0x578cea===_0x55ed31;},'oNCVK':_0x105073(0x122),'HWBCh':function(_0x1017c6,_0x55a252){return _0x1017c6&&_0x55a252;},'mBkNU':_0x105073(0x160),'tXLfS':function(_0x145b37){return _0x145b37();},'YLZSN':'✓\x20Skipping\x20authentication\x20(--skip-auth)','LjQuc':_0x105073(0x125),'hnrbU':_0x105073(0x144),'VXtYq':_0x105073(0x156),'pCkvu':'plugin','gGZSJ':function(_0xe0a5c5,_0x45c951){return _0xe0a5c5(_0x45c951);},'uVKUC':_0x105073(0x161),'wCuOx':function(_0x1337bd){return _0x1337bd();},'pQCWo':function(_0x549dac,_0x55d5e8){return _0x549dac instanceof _0x55d5e8;},'DREuR':function(_0x245904,_0x393236){return _0x245904(_0x393236);},'QQcqx':_0x105073(0x13b),'sLySX':_0x105073(0xfc),'invQz':function(_0x3962bc,_0x4bc82e){return _0x3962bc(_0x4bc82e);},'eLtdg':function(_0x38a18f,_0x41c60c){return _0x38a18f===_0x41c60c;},'QAdDd':_0x105073(0x117),'TWcXj':_0x105073(0x123),'KgHwp':_0x105073(0x147),'IBmvW':function(_0x2fe9a2,_0x5d5508){return _0x2fe9a2+_0x5d5508;},'xzvBb':function(_0x51cd46,_0x165141){return _0x51cd46+_0x165141;}};console[_0x105073(0x108)](_0x3a5137['XYftx']);const _0x50f1e2=process['stdin']['isTTY']&&process[_0x105073(0x13e)][_0x105073(0x11d)];!_0x50f1e2&&!_0x5d4b41?.['scope']&&(console[_0x105073(0x108)](_0x3a5137[_0x105073(0x129)]),_0x5d4b41={..._0x5d4b41,'scope':_0x3a5137[_0x105073(0x15b)]});const _0x80a70a=_0x3a5137['eOPdh'](_0x5d4b41?.[_0x105073(0x13a)],_0x3a5137[_0x105073(0x15b)]);_0x4ebbbb?.['trackPhaseStart'](_0x3a5137[_0x105073(0x151)]);const _0x49a3df=findGitRoot();if(_0x3a5137[_0x105073(0x112)](!_0x49a3df,!_0x80a70a)){await _0x4ebbbb?.['trackPhaseError'](_0x105073(0x122),new Error(_0x3a5137[_0x105073(0x113)]));throw new Error(_0x105073(0x118)+'or\x20use\x20--scope\x20user\x20to\x20install\x20at\x20the\x20user\x20level\x20without\x20a\x20project.');}_0x4ebbbb?.['trackPhaseEnd'](_0x3a5137['oNCVK']);const _0x226a9d=!existsSync(_0x3a5137[_0x105073(0x131)](getRangerDir)),{path:_0x29e6e0}=await ensureRangerDir(_0x80a70a?_0x105073(0x149):undefined);if(_0x5d4b41?.['skipAuth'])console['log'](_0x3a5137['YLZSN']),_0x4ebbbb?.[_0x105073(0x10f)](_0x3a5137[_0x105073(0x148)],{'isFirstRun':_0x226a9d,'method':_0x105073(0x132)});else{_0x4ebbbb?.['trackPhaseStart'](_0x105073(0x125));const _0xb560bd=await authenticate(_0x11e61f);_0x4ebbbb?.['trackPhaseEnd'](_0x105073(0x125),{'isFirstRun':_0x226a9d,'method':_0xb560bd[_0x105073(0x136)]});}_0x4ebbbb?.[_0x105073(0x154)](_0x105073(0x144));_0x5d4b41?.[_0x105073(0x127)]?console['log'](_0x105073(0x15c)):await ensureChromium(_0x5d4b41?.['withDeps']);_0x4ebbbb?.['trackPhaseEnd'](_0x3a5137[_0x105073(0x106)],{'isFirstRun':_0x226a9d,'skipped':!!_0x5d4b41?.['skipChromium']});!_0x80a70a&&await writeRangerGitignore(_0x29e6e0);console[_0x105073(0x108)](_0x3a5137['VXtYq']);const _0x21267c=_0x5d4b41?.[_0x105073(0x13a)],_0x524528=_0x5d4b41?.[_0x105073(0x110)]??![];let _0x3da566=null;_0x524528?(_0x4ebbbb?.['trackPhaseStart'](_0x3a5137[_0x105073(0x15f)]),_0x3da566=await ensureOpencodePluginConfig(_0x21267c),_0x4ebbbb?.['trackPhaseEnd'](_0x3a5137[_0x105073(0x15f)],{'isFirstRun':_0x226a9d,'opencode':!![]})):(_0x4ebbbb?.['trackPhaseStart'](_0x3a5137['pCkvu']),await _0x3a5137[_0x105073(0x104)](ensureClaudePlugin,_0x21267c),_0x4ebbbb?.['trackPhaseEnd'](_0x3a5137['pCkvu'],{'isFirstRun':_0x226a9d}));if(_0x524528&&_0x3da566){_0x4ebbbb?.[_0x105073(0x154)](_0x3a5137['uVKUC']);try{await installSkill('ranger',{'level':_0x3da566['scope'],'cliVersion':_0x3a5137[_0x105073(0x15e)](getCurrentVersion),'platform':_0x105073(0x110)}),_0x4ebbbb?.['trackPhaseEnd'](_0x105073(0x161),{'isFirstRun':_0x226a9d,'opencode':!![]});}catch(_0x133e1e){console[_0x105073(0x152)](_0x105073(0x155),_0x3a5137['pQCWo'](_0x133e1e,Error)?_0x133e1e['message']:_0x133e1e),_0x4ebbbb?.['trackPhaseEnd'](_0x105073(0x161),{'isFirstRun':_0x226a9d,'opencode':!![],'failed':!![]});}}else _0x4ebbbb?.[_0x105073(0x154)](_0x3a5137[_0x105073(0x11f)]),await _0x3a5137['DREuR'](ensureClaudeSkills,_0x21267c),_0x4ebbbb?.[_0x105073(0x10f)](_0x3a5137[_0x105073(0x11f)],{'isFirstRun':_0x226a9d});if(_0x5d4b41?.['skipAuth'])console['log'](_0x3a5137[_0x105073(0x12d)]);else{if(!_0x50f1e2&&!_0x5d4b41?.['url'])console['log'](_0x3a5137[_0x105073(0x13f)]),console['log']('\x20\x20'+_0x3a5137['invQz'](bold,_0x105073(0x103))+'\x0a');else{_0x4ebbbb?.[_0x105073(0x154)]('profile');const _0x193a51=await ensureLocalEnv({'url':_0x5d4b41?.[_0x105073(0x14f)],'force':_0x5d4b41?.[_0x105073(0x107)],'allowInsecureLocalhost':_0x5d4b41?.[_0x105073(0x164)],'scope':_0x3a5137['eLtdg'](_0x5d4b41?.['scope'],_0x3a5137[_0x105073(0x15b)])?_0x3a5137[_0x105073(0x15b)]:undefined},_0x4ebbbb);_0x4ebbbb?.[_0x105073(0x10f)](_0x105073(0x114),{'isFirstRun':_0x226a9d,'profileReady':_0x193a51['ready'],'userSkipped':_0x193a51['skipped']}),_0x193a51[_0x105073(0x14c)]&&console['log'](_0x105073(0x150));}}if(_0x524528)console[_0x105073(0x108)]('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console[_0x105073(0x108)](_0x3a5137['QAdDd']),console['log'](_0x3a5137[_0x105073(0xf6)]),console['log'](_0x105073(0x11b));else{const _0x12d538=_0x3a5137['gGZSJ'](bold,_0x3a5137[_0x105073(0x128)]);console['log'](_0x3a5137['IBmvW'](_0x3a5137['xzvBb'](_0x105073(0x159)+_0x12d538+'\x20and\x20prompt\x20the\x20coding',_0x105073(0x143))+_0x105073(0x11a),_0x105073(0x158)));}}
@@ -1 +1 @@
1
- const _0x387bd9=_0x4f62;(function(_0x249072,_0x5fb1a8){const _0x3558c0=_0x4f62,_0x248b7f=_0x249072();while(!![]){try{const _0x457d10=parseInt(_0x3558c0(0x12b))/0x1*(parseInt(_0x3558c0(0x15d))/0x2)+-parseInt(_0x3558c0(0x127))/0x3+parseInt(_0x3558c0(0xfd))/0x4*(-parseInt(_0x3558c0(0x13c))/0x5)+-parseInt(_0x3558c0(0x112))/0x6*(parseInt(_0x3558c0(0x10d))/0x7)+parseInt(_0x3558c0(0x102))/0x8*(parseInt(_0x3558c0(0x105))/0x9)+-parseInt(_0x3558c0(0x12a))/0xa+parseInt(_0x3558c0(0x14f))/0xb;if(_0x457d10===_0x5fb1a8)break;else _0x248b7f['push'](_0x248b7f['shift']());}catch(_0x3f7f49){_0x248b7f['push'](_0x248b7f['shift']());}}}(_0x89cc,0x34b5a));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';function _0x4f62(_0xf34354,_0x268e47){_0xf34354=_0xf34354-0xf7;const _0x89cc0=_0x89cc();let _0x4f622f=_0x89cc0[_0xf34354];return _0x4f622f;}import{spawn}from'child_process';function _0x89cc(){const _0x3624cc=['1087242uRGPhb','mpMYx','scope','2447540SEUnWP','1184KyecjG','\x20plugin(s)\x20configured','cwd','BTXCT','none','sznOS','fDiph','\x1b[0m','Version:\x20','SmYDX','isArray','hasEncryptedAuth','auth.json','length','all','not_configured','tXCXl','5myYeRp','ignore','details','\x1b[1m','push','xICDg','log','ranger@trailhead','displayName','ANweg','iaqTz','jOuoE','opencode-plugin','isActive','aHYlQ','KGrCO','disabled','stdout','version','6359859eJlJAQ','NMmgZ','opencode','env','includes','JjnCt','hasPlaintextAuth','@ranger-testing/opencode-plugin','(not\x20found)','\x1b]8;;\x07','encrypted','zoroi','enabled','eVYsM','292RVqJXw','string','coJVW','isDirectory','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','\x20\x20Run:\x20ranger\x20update','AJxAT','KyGza','plugin','filter','119772vdvZeV','Organization:\x20','LcCSn','stderr','TeVkX','312160tvYhZp','pipe','join','45BOlkhX','settings.json','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','lFYeD','\x0a---\x20Skills\x20---','name','eWQfJ','trim','14qDzRPW','IcSwa','parse','\x20(latest:\x20','TjaGo','279372plfUqM','settingsPath','VBqJU','gMcai','some','configured','\x20\x20Run:\x20ranger\x20setup\x20[token]','toString','map','KYrGq','Root:\x20','\x0a\x20\x20No\x20active\x20profile\x20set','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','\x20\x20User-level:','MHMOu','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','MblLT','\x20\x20Run:\x20ranger\x20setup\x20--opencode','rhjsJ','status','path'];_0x89cc=function(){return _0x3624cc;};return _0x89cc();}const bold=_0x395132=>_0x387bd9(0x13f)+_0x395132+_0x387bd9(0x132),link=(_0x5671e0,_0x21f53b)=>'\x1b]8;;file://'+_0x5671e0+'\x07'+(_0x21f53b||_0x5671e0)+_0x387bd9(0x158);async function getOpencodePluginStatus(){const _0x2770cf=_0x387bd9,_0x2a8287={'SmYDX':_0x2770cf(0x148),'VmidK':'not_installed','XUTZv':function(_0x4e581b,_0x2a063f){return _0x4e581b(_0x2a063f);},'EZfBY':_0x2770cf(0x151),'eVYsM':'debug','evZXF':'config','IzmSL':_0x2770cf(0x13d),'iaqTz':'close'};return new Promise(_0x28e666=>{const _0x52e150=_0x2770cf,_0x474d0b={'IcSwa':function(_0x5ce7f4,_0x47505b){return _0x5ce7f4!==_0x47505b;},'rhjsJ':_0x2a8287[_0x52e150(0x134)],'Tlheo':_0x2a8287['VmidK'],'KYrGq':function(_0x24b6df,_0x501005){return _0x2a8287['XUTZv'](_0x24b6df,_0x501005);},'aPhcf':'configured','eWQfJ':function(_0x27eab7,_0x2de142){return _0x27eab7>_0x2de142;},'ofAfw':_0x52e150(0x13a)},_0x1c9cda=spawn(_0x2a8287['EZfBY'],[_0x2a8287[_0x52e150(0x15c)],_0x2a8287['evZXF']],{'stdio':[_0x2a8287['IzmSL'],'pipe',_0x52e150(0x103)]});let _0xd1a7cb='';_0x1c9cda[_0x52e150(0x14d)]?.['on']('data',_0x309ca9=>{const _0x344d74=_0x52e150;_0xd1a7cb+=_0x309ca9[_0x344d74(0x119)]();}),_0x1c9cda[_0x52e150(0x100)]?.['on']('data',_0x480d06=>{const _0x2746e4=_0x52e150;_0xd1a7cb+=_0x480d06[_0x2746e4(0x119)]();}),_0x1c9cda['on']('error',()=>{_0x28e666({'status':'not_installed'});}),_0x1c9cda['on'](_0x2a8287[_0x52e150(0x146)],_0x431311=>{const _0x558a83=_0x52e150,_0x8de87b={'aHYlQ':function(_0x1636d7,_0x5e2e2d){return _0x474d0b['IcSwa'](_0x1636d7,_0x5e2e2d);},'zoroi':_0x558a83(0x15e),'fDiph':_0x474d0b[_0x558a83(0x124)]};if(_0x474d0b[_0x558a83(0x10e)](_0x431311,0x0)){_0x28e666({'status':_0x474d0b['Tlheo']});return;}const _0x2c1974=_0xd1a7cb[_0x558a83(0x10c)]();let _0x575312=null;if(_0x2c1974)try{_0x575312=JSON[_0x558a83(0x10f)](_0x2c1974);}catch{const _0x3f66d7=_0x2c1974['match'](/\{[\s\S]*\}$/);if(_0x3f66d7)try{_0x575312=JSON[_0x558a83(0x10f)](_0x3f66d7[0x0]);}catch{_0x575312=null;}}const _0x33a77d=Array[_0x558a83(0x135)](_0x575312?.[_0x558a83(0xfb)])?_0x575312?.[_0x558a83(0xfb)]:[],_0x1db986=_0x33a77d[_0x558a83(0x116)](_0x4c9fec=>{const _0x69b02c=_0x558a83;if(_0x8de87b[_0x69b02c(0x14a)](typeof _0x4c9fec,_0x8de87b[_0x69b02c(0x15a)]))return![];return _0x4c9fec['includes'](_0x69b02c(0x156))||_0x4c9fec['includes'](_0x8de87b[_0x69b02c(0x131)]);});if(_0x1db986){_0x474d0b[_0x558a83(0x11b)](_0x28e666,{'status':_0x474d0b['aPhcf'],'details':_0x33a77d['length']>0x0?_0x33a77d['length']+_0x558a83(0x12c):undefined});return;}if(_0x474d0b[_0x558a83(0x10b)](_0x33a77d['length'],0x0)){_0x474d0b['KYrGq'](_0x28e666,{'status':_0x474d0b['ofAfw'],'details':_0x33a77d['length']+_0x558a83(0x12c)});return;}_0x28e666({'status':'not_configured'});});});}async function getSkillsFromDir(_0x432ca4,_0x10f48b){const _0x39a2d2=_0x387bd9,_0xfba391={'JldsP':function(_0x3d1ebe,_0x50ec5f,_0x43d2ae,_0x532c90){return _0x3d1ebe(_0x50ec5f,_0x43d2ae,_0x532c90);},'JpHen':'SKILL.md','FgRsx':function(_0x4ead1e,_0x10984e){return _0x4ead1e(_0x10984e);},'jOuoE':function(_0x2e558e,_0x3fffb0,_0x1822b8){return _0x2e558e(_0x3fffb0,_0x1822b8);},'veolc':'utf-8'};if(!existsSync(_0x432ca4))return[];const _0x307080=[];try{const _0x2af523=await readdir(_0x432ca4,{'withFileTypes':!![]});for(const _0x381108 of _0x2af523){if(_0x381108[_0x39a2d2(0x160)]()){const _0x5c3f79=_0xfba391['JldsP'](join,_0x432ca4,_0x381108[_0x39a2d2(0x10a)],_0xfba391['JpHen']);if(_0xfba391['FgRsx'](existsSync,_0x5c3f79)){let _0x2a01db=_0x381108[_0x39a2d2(0x10a)];try{const _0x45d065=await _0xfba391[_0x39a2d2(0x147)](readFile,_0x5c3f79,_0xfba391['veolc']),_0x94f6a4=_0x45d065['match'](/name:\s*(.+)/);_0x94f6a4&&(_0x2a01db=_0x94f6a4[0x1]['trim']());}catch{}_0x307080[_0x39a2d2(0x140)]({'name':_0x381108[_0x39a2d2(0x10a)],'displayName':_0x2a01db,'path':_0x5c3f79,'level':_0x10f48b});}}}}catch{return[];}return _0x307080;}async function getInstalledSkills(){const _0xb035bb=_0x387bd9,_0x123427={'mpMYx':function(_0x4c3341){return _0x4c3341();},'KYHcX':function(_0x18f9c7,_0x5e82d3,_0x4e3ccb){return _0x18f9c7(_0x5e82d3,_0x4e3ccb);}},[_0x1ed950,_0x195e84]=await Promise[_0xb035bb(0x139)]([getSkillsFromDir(_0x123427[_0xb035bb(0x128)](getProjectSkillsDir),'project'),_0x123427['KYHcX'](getSkillsFromDir,_0x123427[_0xb035bb(0x128)](getUserSkillsDir),'user')]);return{'project':_0x1ed950,'user':_0x195e84};}async function getEnvironments(){const _0x2f613d=_0x387bd9,_0x5cf32f={'HDKkD':function(_0x491ba8,_0x59323e,_0x147605){return _0x491ba8(_0x59323e,_0x147605);},'KGrCO':_0x2f613d(0x106),'xICDg':function(_0x2dc347,_0x18726f,_0x57583f){return _0x2dc347(_0x18726f,_0x57583f);},'brogS':_0x2f613d(0x137),'AJxAT':function(_0x5bed85,_0x10b0fd){return _0x5bed85(_0x10b0fd);},'UKIYO':_0x2f613d(0x157),'VDnWW':function(_0x3dea56,_0xece807){return _0x3dea56(_0xece807);}},{envNames:_0x2cd8c9,activeEnv:_0xc0428d}=await getEnvNames(),_0x40a700=getRangerDir();if(!_0x5cf32f[_0x2f613d(0xf9)](existsSync,_0x40a700))return{'envs':[],'activeEnv':null};const _0x24942c=_0x2cd8c9[_0x2f613d(0x11a)](_0x4be668=>{const _0x4c12d0=_0x2f613d,_0x53347a=getEnvDir(_0x4be668),_0x54e211=_0x5cf32f['HDKkD'](join,_0x53347a,_0x5cf32f[_0x4c12d0(0x14b)]),_0x551d06=_0x5cf32f[_0x4c12d0(0x141)](join,_0x53347a,_0x5cf32f['brogS']),_0x123dff=_0x5cf32f[_0x4c12d0(0x141)](join,_0x53347a,'auth.json.enc');return{'name':_0x4be668,'settingsPath':_0x5cf32f['AJxAT'](existsSync,_0x54e211)?_0x54e211:_0x5cf32f['UKIYO'],'hasPlaintextAuth':_0x5cf32f['VDnWW'](existsSync,_0x551d06),'hasEncryptedAuth':_0x5cf32f[_0x4c12d0(0xf9)](existsSync,_0x123dff),'isActive':_0x4be668===_0xc0428d};});return{'envs':_0x24942c,'activeEnv':_0xc0428d};}export async function status(){const _0x3c05b5=_0x387bd9,_0x49125a={'DkfSw':'\x0a📊\x20Ranger\x20Status\x0a','BTXCT':function(_0x5cfd6f,_0x1337ea){return _0x5cfd6f(_0x1337ea);},'coJVW':function(_0x4ebc5f,_0x4d121d,_0x92d2d5){return _0x4ebc5f(_0x4d121d,_0x92d2d5);},'lFYeD':function(_0x1aee5e){return _0x1aee5e();},'MHMOu':function(_0x24e0cc,_0x2fb9a5){return _0x24e0cc(_0x2fb9a5);},'wItzK':function(_0x2502f8){return _0x2502f8();},'WuGnb':_0x3c05b5(0x13a),'WFGiZ':'\x20\x20Not\x20configured','haiPW':_0x3c05b5(0x121),'zVIYi':'\x0a---\x20Claude\x20Code\x20Plugin\x20---','TeVkX':_0x3c05b5(0x143),'KyGza':'unknown','LcCSn':function(_0x5250cd,_0x8cf14d){return _0x5250cd(_0x8cf14d);},'ANweg':'\x20\x20Not\x20installed','TjaGo':_0x3c05b5(0x11e),'NMmgZ':function(_0x3d4a92){return _0x3d4a92();},'tXCXl':function(_0x39d902,_0x24325b){return _0x39d902===_0x24325b;},'VBqJU':'No\x20skills\x20installed','oJLPu':function(_0x575b60,_0x445a52){return _0x575b60>_0x445a52;},'iEXZm':'\x20\x20Project-level:','Npsaa':function(_0x330baa,_0x3390be){return _0x330baa>_0x3390be;},'gMcai':_0x3c05b5(0x11f),'JjnCt':'\x20(active)','sznOS':'plaintext','EBgTA':_0x3c05b5(0x12f),'MblLT':function(_0x53983c,_0x3c7645){return _0x53983c(_0x3c7645);},'SYCEK':function(_0x48f7da,_0x3ee392,_0x344526){return _0x48f7da(_0x3ee392,_0x344526);}};console[_0x3c05b5(0x142)](_0x49125a['DkfSw']);const _0x39a2f4=process[_0x3c05b5(0x12d)](),_0x24e62f=getRangerDir();if(!_0x49125a[_0x3c05b5(0x12e)](existsSync,_0x24e62f)){console['log'](_0x3c05b5(0x11c)+_0x49125a[_0x3c05b5(0x15f)](link,_0x39a2f4,bold(basename(_0x39a2f4)))),console[_0x3c05b5(0x142)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x3c05b5(0x142)](_0x3c05b5(0xf7));return;}console['log'](_0x3c05b5(0x11c)+link(_0x39a2f4,bold(basename(_0x39a2f4))));const _0x206c2c=getCurrentVersion(),_0x442bb7=getLatestVersion();if(_0x442bb7[_0x3c05b5(0x14e)]&&_0x442bb7[_0x3c05b5(0x14e)]!==_0x206c2c)console[_0x3c05b5(0x142)](_0x3c05b5(0x133)+_0x206c2c+_0x3c05b5(0x110)+_0x442bb7['version']+')'),console['log'](_0x3c05b5(0xf8));else _0x442bb7[_0x3c05b5(0x14e)]?console['log']('Version:\x20'+_0x206c2c+'\x20(up\x20to\x20date)'):console[_0x3c05b5(0x142)](_0x3c05b5(0x133)+_0x206c2c);const _0x4157e7=await _0x49125a[_0x3c05b5(0x108)](getToken);if(_0x4157e7){const _0x57fa3f=await _0x49125a[_0x3c05b5(0x120)](getCurrentUser,_0x4157e7);_0x57fa3f['success']?console['log'](_0x3c05b5(0xfe)+bold(_0x57fa3f['user']['organizationName'])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log'](_0x3c05b5(0x118)));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console[_0x3c05b5(0x142)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x3c05b5(0x152)]['DEBUG']&&(console[_0x3c05b5(0x142)]('API\x20Environment:\x20'+_0x49125a[_0x3c05b5(0x108)](getCurrentEnvironment)),console[_0x3c05b5(0x142)]('API\x20URL:\x20'+getApiBaseUrl()));console['log']('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x5dd494=await _0x49125a['wItzK'](getOpencodePluginStatus);if(_0x5dd494['status']===_0x3c05b5(0x117))console['log']('\x20\x20'+bold('@ranger-testing/opencode-plugin')+':\x20configured'),_0x5dd494[_0x3c05b5(0x13e)]&&console[_0x3c05b5(0x142)]('\x20\x20'+_0x5dd494[_0x3c05b5(0x13e)]);else _0x5dd494[_0x3c05b5(0x125)]===_0x49125a['WuGnb']?(console[_0x3c05b5(0x142)](_0x49125a['WFGiZ']),_0x5dd494['details']&&console['log']('\x20\x20'+_0x5dd494['details']),console[_0x3c05b5(0x142)](_0x3c05b5(0x123))):console['log'](_0x49125a['haiPW']);console[_0x3c05b5(0x142)](_0x49125a['zVIYi']);const _0x326dbf=await _0x49125a['MHMOu'](getPluginInfo,_0x49125a['TeVkX']);if(_0x326dbf){const _0x31af04=_0x326dbf[_0x3c05b5(0x129)]||_0x49125a[_0x3c05b5(0xfa)],_0x2d2fb1=_0x326dbf['enabled']?_0x3c05b5(0x15b):_0x3c05b5(0x14c);console[_0x3c05b5(0x142)]('\x20\x20'+_0x49125a[_0x3c05b5(0xff)](bold,_0x49125a[_0x3c05b5(0x101)])+':\x20installed\x20('+_0x31af04+',\x20'+_0x2d2fb1+')');}else console['log'](_0x49125a[_0x3c05b5(0x145)]),console['log'](_0x49125a[_0x3c05b5(0x111)]);console['log'](_0x3c05b5(0x109));const {project:_0x421e04,user:_0x1e5415}=await _0x49125a['NMmgZ'](getInstalledSkills),_0x50db30=_0x421e04['filter'](_0x1273c4=>RANGER_MANAGED_SKILLS[_0x3c05b5(0x153)](_0x1273c4['name'])),_0x123df8=_0x1e5415[_0x3c05b5(0xfc)](_0x52563e=>RANGER_MANAGED_SKILLS['includes'](_0x52563e[_0x3c05b5(0x10a)])),_0x1f0a33=_0x50db30[_0x3c05b5(0x138)]+_0x123df8['length'];if(_0x49125a[_0x3c05b5(0x13b)](_0x1f0a33,0x0))console['log'](_0x49125a[_0x3c05b5(0x114)]),console[_0x3c05b5(0x142)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x49125a['oJLPu'](_0x50db30[_0x3c05b5(0x138)],0x0)){console['log'](_0x49125a['iEXZm']);for(const _0x477289 of _0x50db30){console[_0x3c05b5(0x142)]('\x20\x20\x20\x20'+_0x49125a['BTXCT'](bold,_0x477289[_0x3c05b5(0x144)])+':\x20'+link(_0x477289[_0x3c05b5(0x126)],basename(_0x477289['path'])));}}if(_0x49125a['Npsaa'](_0x123df8[_0x3c05b5(0x138)],0x0)){console['log'](_0x49125a[_0x3c05b5(0x115)]);for(const _0x41f112 of _0x123df8){console['log']('\x20\x20\x20\x20'+bold(_0x41f112['displayName'])+':\x20'+link(_0x41f112[_0x3c05b5(0x126)],basename(_0x41f112['path'])));}}}console['log']('\x0a---\x20Profiles\x20---');const {envs:_0x423be6,activeEnv:_0x376478}=await _0x49125a[_0x3c05b5(0x150)](getEnvironments);if(_0x49125a[_0x3c05b5(0x13b)](_0x423be6['length'],0x0))console['log']('No\x20profiles\x20configured'),console[_0x3c05b5(0x142)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x31ae9c of _0x423be6){const _0x354ce1=_0x31ae9c[_0x3c05b5(0x149)]?_0x49125a[_0x3c05b5(0x154)]:'',_0x42dd09=_0x31ae9c[_0x3c05b5(0x136)]?_0x3c05b5(0x159):_0x31ae9c[_0x3c05b5(0x155)]?_0x49125a[_0x3c05b5(0x130)]:_0x49125a['EBgTA'];console['log']('\x20\x20'+_0x49125a[_0x3c05b5(0x122)](bold,_0x31ae9c[_0x3c05b5(0x10a)])+_0x354ce1),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x42dd09),_0x31ae9c['settingsPath']!=='(not\x20found)'&&console['log']('\x20\x20\x20\x20Settings:\x20'+_0x49125a['SYCEK'](link,_0x31ae9c['settingsPath'],basename(_0x31ae9c[_0x3c05b5(0x113)])));}!_0x376478&&(console['log'](_0x3c05b5(0x11d)),console[_0x3c05b5(0x142)](_0x3c05b5(0x107)+_0x423be6[_0x3c05b5(0x11a)](_0x29c561=>_0x29c561[_0x3c05b5(0x10a)])[_0x3c05b5(0x104)](',\x20')+')'));}console[_0x3c05b5(0x142)]('');}
1
+ const _0x55a25a=_0x585c;(function(_0xaa72a9,_0x2de347){const _0x484b1e=_0x585c,_0x2dd1f4=_0xaa72a9();while(!![]){try{const _0x239321=parseInt(_0x484b1e(0x233))/0x1*(-parseInt(_0x484b1e(0x1ee))/0x2)+-parseInt(_0x484b1e(0x1fa))/0x3*(parseInt(_0x484b1e(0x238))/0x4)+-parseInt(_0x484b1e(0x223))/0x5*(-parseInt(_0x484b1e(0x1e2))/0x6)+-parseInt(_0x484b1e(0x206))/0x7*(parseInt(_0x484b1e(0x20d))/0x8)+parseInt(_0x484b1e(0x22a))/0x9+-parseInt(_0x484b1e(0x21d))/0xa*(-parseInt(_0x484b1e(0x1ed))/0xb)+parseInt(_0x484b1e(0x1f8))/0xc*(parseInt(_0x484b1e(0x227))/0xd);if(_0x239321===_0x2de347)break;else _0x2dd1f4['push'](_0x2dd1f4['shift']());}catch(_0x12a2fd){_0x2dd1f4['push'](_0x2dd1f4['shift']());}}}(_0x50f0,0xbfeda));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';function _0x50f0(){const _0x26f109=['cwd','Root:\x20',':\x20configured','jmfxU','\x0a---\x20Profiles\x20---','includes','project','toString','YIhEc','match','oNcoU','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','9152634sooVZX','name','opencode-plugin','\x20\x20Run:\x20ranger\x20setup\x20[token]','iGksb','length','HrnUx','\x20\x20User-level:','\x20(latest:\x20','zolzE','pLFRf','56419fpsnHQ','1677964jShEOR','@ranger-testing/opencode-plugin','vaXFi','parse','oDDdf','path','details','debug','isActive','stdout','36jFixjG','version','5001OCicQc','hasEncryptedAuth','plugin','config','DEBUG','\x1b]8;;file://','Jcilq','DQhDc','dpvYT','\x20(up\x20to\x20date)','axGfv','stderr','329KlLyEW','jnrtz','hasPlaintextAuth','\x20\x20Project-level:','opencode','all','not_installed','227912uwsTDD','\x20\x20\x20\x20','\x20plugin(s)\x20configured','jQjli','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','ranger@trailhead','PzAWL','status','iNtQl','pJKUt','settings.json','imsKW','PBPjd','auth.json.enc','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','ignore','1880wPKxVt','configured','string','(not\x20found)','error','hehUG','5RuheOY','\x20\x20\x20\x20Auth:\x20','log','\x20\x20Not\x20installed','4986293ZTJiEe','not_configured','Version:\x20','7971372JqTTyZ','pjxVk','\x0a📊\x20Ranger\x20Status\x0a','displayName','YXPmi','\x0a---\x20OpenCode\x20Plugin\x20---','zJzMJ','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','filter','1DGsZMX','DNGCu','ykqzk','\x1b]8;;\x07','oqGRQ','3748EIQiqw','Organization:\x20','trim','settingsPath','enabled'];_0x50f0=function(){return _0x26f109;};return _0x50f0();}import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x2e0d81=>'\x1b[1m'+_0x2e0d81+'\x1b[0m',link=(_0x3c99a7,_0x4da21a)=>_0x55a25a(0x1ff)+_0x3c99a7+'\x07'+(_0x4da21a||_0x3c99a7)+_0x55a25a(0x236);async function getOpencodePluginStatus(){const _0x21a5cc=_0x55a25a,_0x3a4761={'HrnUx':function(_0x5a2da3,_0x1b6b81){return _0x5a2da3(_0x1b6b81);},'bMjpl':'configured','pJKUt':function(_0x1cfa81,_0xed1345){return _0x1cfa81>_0xed1345;},'iGksb':'not_configured','oqGRQ':function(_0x5e85d1,_0x4b9721){return _0x5e85d1(_0x4b9721);},'blWEK':function(_0x2acdd6,_0x1a9de8,_0x1af180,_0x53f10d){return _0x2acdd6(_0x1a9de8,_0x1af180,_0x53f10d);},'vuInM':_0x21a5cc(0x1f5),'uyezp':_0x21a5cc(0x21c),'iNtQl':'pipe','YXPmi':'close'};return new Promise(_0x27490a=>{const _0x5d1594=_0x21a5cc,_0x3ce030={'hMZye':function(_0x385c5c,_0x5bf0f7){return _0x3a4761['oqGRQ'](_0x385c5c,_0x5bf0f7);}},_0x10f12e=_0x3a4761['blWEK'](spawn,_0x5d1594(0x20a),[_0x3a4761['vuInM'],_0x5d1594(0x1fd)],{'stdio':[_0x3a4761['uyezp'],_0x3a4761['iNtQl'],_0x3a4761[_0x5d1594(0x215)]]});let _0xaf4e50='';_0x10f12e[_0x5d1594(0x1f7)]?.['on']('data',_0x29e9c0=>{const _0x4369ce=_0x5d1594;_0xaf4e50+=_0x29e9c0[_0x4369ce(0x1dd)]();}),_0x10f12e[_0x5d1594(0x205)]?.['on']('data',_0x3757c5=>{const _0x1e7bca=_0x5d1594;_0xaf4e50+=_0x3757c5[_0x1e7bca(0x1dd)]();}),_0x10f12e['on'](_0x5d1594(0x221),()=>{_0x3ce030['hMZye'](_0x27490a,{'status':'not_installed'});}),_0x10f12e['on'](_0x3a4761[_0x5d1594(0x22e)],_0x4d93e9=>{const _0x3f0ba8=_0x5d1594,_0x362c1f={'bZUfI':'@ranger-testing/opencode-plugin'};if(_0x4d93e9!==0x0){_0x3a4761[_0x3f0ba8(0x1e8)](_0x27490a,{'status':_0x3f0ba8(0x20c)});return;}const _0x181b4e=_0xaf4e50[_0x3f0ba8(0x1d3)]();let _0xf2a8ba=null;if(_0x181b4e)try{_0xf2a8ba=JSON['parse'](_0x181b4e);}catch{const _0x2077ec=_0x181b4e[_0x3f0ba8(0x1df)](/\{[\s\S]*\}$/);if(_0x2077ec)try{_0xf2a8ba=JSON[_0x3f0ba8(0x1f1)](_0x2077ec[0x0]);}catch{_0xf2a8ba=null;}}const _0x4d5897=Array['isArray'](_0xf2a8ba?.['plugin'])?_0xf2a8ba?.[_0x3f0ba8(0x1fc)]:[],_0x15a8cf=_0x4d5897['some'](_0x55e7b1=>{const _0x52dff4=_0x3f0ba8;if(typeof _0x55e7b1!==_0x52dff4(0x21f))return![];return _0x55e7b1[_0x52dff4(0x1db)](_0x362c1f['bZUfI'])||_0x55e7b1['includes'](_0x52dff4(0x1e4));});if(_0x15a8cf){_0x27490a({'status':_0x3a4761['bMjpl'],'details':_0x4d5897[_0x3f0ba8(0x1e7)]>0x0?_0x4d5897['length']+_0x3f0ba8(0x20f):undefined});return;}if(_0x3a4761[_0x3f0ba8(0x216)](_0x4d5897[_0x3f0ba8(0x1e7)],0x0)){_0x27490a({'status':_0x3a4761[_0x3f0ba8(0x1e6)],'details':_0x4d5897[_0x3f0ba8(0x1e7)]+_0x3f0ba8(0x20f)});return;}_0x3a4761[_0x3f0ba8(0x237)](_0x27490a,{'status':_0x3f0ba8(0x228)});});});}async function getSkillsFromDir(_0x8109f8,_0x5ce718){const _0xfa2695=_0x55a25a,_0xce2fd2={'TpsAP':function(_0x13db3e,_0x5da9eb,_0x4a4941){return _0x13db3e(_0x5da9eb,_0x4a4941);},'hehUG':'utf-8'};if(!existsSync(_0x8109f8))return[];const _0x1ab807=[];try{const _0x19c73f=await _0xce2fd2['TpsAP'](readdir,_0x8109f8,{'withFileTypes':!![]});for(const _0x23f4aa of _0x19c73f){if(_0x23f4aa['isDirectory']()){const _0x33623c=join(_0x8109f8,_0x23f4aa[_0xfa2695(0x1e3)],'SKILL.md');if(existsSync(_0x33623c)){let _0x33c28a=_0x23f4aa['name'];try{const _0x5e15b8=await readFile(_0x33623c,_0xce2fd2[_0xfa2695(0x222)]),_0x43826f=_0x5e15b8['match'](/name:\s*(.+)/);_0x43826f&&(_0x33c28a=_0x43826f[0x1][_0xfa2695(0x1d3)]());}catch{}_0x1ab807['push']({'name':_0x23f4aa['name'],'displayName':_0x33c28a,'path':_0x33623c,'level':_0x5ce718});}}}}catch{return[];}return _0x1ab807;}function _0x585c(_0x22c779,_0x524e19){_0x22c779=_0x22c779-0x1d3;const _0x50f0e4=_0x50f0();let _0x585c85=_0x50f0e4[_0x22c779];return _0x585c85;}async function getInstalledSkills(){const _0x3ea953=_0x55a25a,_0x29e0f8={'imsKW':function(_0x24a0a5,_0x3f8e49,_0x35623d){return _0x24a0a5(_0x3f8e49,_0x35623d);},'jnrtz':function(_0x541442){return _0x541442();},'kNXNY':'user'},[_0x245f8d,_0x2da8e9]=await Promise[_0x3ea953(0x20b)]([_0x29e0f8[_0x3ea953(0x218)](getSkillsFromDir,_0x29e0f8[_0x3ea953(0x207)](getProjectSkillsDir),_0x3ea953(0x1dc)),_0x29e0f8[_0x3ea953(0x218)](getSkillsFromDir,getUserSkillsDir(),_0x29e0f8['kNXNY'])]);return{'project':_0x245f8d,'user':_0x2da8e9};}async function getEnvironments(){const _0x274577=_0x55a25a,_0x2d7c1f={'jQjli':function(_0x3bf280,_0x336769,_0x352cf7){return _0x3bf280(_0x336769,_0x352cf7);},'PBPjd':function(_0xb7f207,_0x162373,_0xd136f4){return _0xb7f207(_0x162373,_0xd136f4);},'oNcoU':_0x274577(0x21a),'vaXFi':function(_0x3a34f8,_0x13c986){return _0x3a34f8(_0x13c986);},'zJzMJ':function(_0x51182a,_0x3005af){return _0x51182a(_0x3005af);},'dnTBV':function(_0x247d65,_0x3690e3){return _0x247d65(_0x3690e3);}},{envNames:_0x1b0463,activeEnv:_0x3f6bd4}=await getEnvNames(),_0x16b45f=getRangerDir();if(!_0x2d7c1f['dnTBV'](existsSync,_0x16b45f))return{'envs':[],'activeEnv':null};const _0x5e19de=_0x1b0463['map'](_0x24c37c=>{const _0x514140=_0x274577,_0x5ec11b=getEnvDir(_0x24c37c),_0x5557dd=join(_0x5ec11b,_0x514140(0x217)),_0x40e581=_0x2d7c1f[_0x514140(0x210)](join,_0x5ec11b,'auth.json'),_0x4e8996=_0x2d7c1f[_0x514140(0x219)](join,_0x5ec11b,_0x2d7c1f[_0x514140(0x1e0)]);return{'name':_0x24c37c,'settingsPath':_0x2d7c1f[_0x514140(0x1f0)](existsSync,_0x5557dd)?_0x5557dd:_0x514140(0x220),'hasPlaintextAuth':_0x2d7c1f[_0x514140(0x230)](existsSync,_0x40e581),'hasEncryptedAuth':existsSync(_0x4e8996),'isActive':_0x24c37c===_0x3f6bd4};});return{'envs':_0x5e19de,'activeEnv':_0x3f6bd4};}export async function status(){const _0x539c9b=_0x55a25a,_0x248fd6={'zuOxA':function(_0x4dd9aa,_0x2045ed,_0x419070){return _0x4dd9aa(_0x2045ed,_0x419070);},'pjxVk':function(_0x555ad2,_0x216088){return _0x555ad2(_0x216088);},'SYiYu':function(_0x596f85,_0x1b7e11){return _0x596f85(_0x1b7e11);},'FYKfB':function(_0x180eef,_0x404ffd,_0x1a07a6){return _0x180eef(_0x404ffd,_0x1a07a6);},'zolzE':function(_0x4f624f){return _0x4f624f();},'DNGCu':function(_0x34e5a4,_0x5fc56d){return _0x34e5a4(_0x5fc56d);},'jmfxU':function(_0xed3bc1,_0x2cf4c8){return _0xed3bc1===_0x2cf4c8;},'DQhDc':_0x539c9b(0x21e),'FHjFv':_0x539c9b(0x1ef),'fIIng':'not_configured','oDDdf':'\x20\x20Not\x20configured','pLFRf':_0x539c9b(0x21b),'dpvYT':function(_0x155848,_0x3bcf43){return _0x155848(_0x3bcf43);},'axGfv':_0x539c9b(0x212),'Jcilq':'unknown','YIhEc':_0x539c9b(0x1d5),'BZfBO':function(_0x17840f,_0x399a6b){return _0x17840f+_0x399a6b;},'FOVKz':'No\x20skills\x20installed','dFjZT':function(_0x5302e0,_0x3d0ca9){return _0x5302e0>_0x3d0ca9;},'wVDkn':function(_0x2b3aab,_0x2ce294){return _0x2b3aab(_0x2ce294);},'QMrGH':_0x539c9b(0x1da),'LzvAx':'No\x20profiles\x20configured','ZDsxB':'\x20(active)','ykqzk':'none','PzAWL':_0x539c9b(0x220)};console['log'](_0x539c9b(0x22c));const _0x15ac1b=process[_0x539c9b(0x1d6)](),_0x6d933b=getRangerDir();if(!existsSync(_0x6d933b)){console[_0x539c9b(0x225)]('Root:\x20'+_0x248fd6['zuOxA'](link,_0x15ac1b,_0x248fd6[_0x539c9b(0x22b)](bold,_0x248fd6['SYiYu'](basename,_0x15ac1b)))),console[_0x539c9b(0x225)](_0x539c9b(0x231)),console[_0x539c9b(0x225)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log'](_0x539c9b(0x1d7)+_0x248fd6['FYKfB'](link,_0x15ac1b,bold(_0x248fd6['SYiYu'](basename,_0x15ac1b))));const _0x2d2754=_0x248fd6[_0x539c9b(0x1eb)](getCurrentVersion),_0x5239be=_0x248fd6['zolzE'](getLatestVersion);if(_0x5239be[_0x539c9b(0x1f9)]&&_0x5239be[_0x539c9b(0x1f9)]!==_0x2d2754)console[_0x539c9b(0x225)](_0x539c9b(0x229)+_0x2d2754+_0x539c9b(0x1ea)+_0x5239be['version']+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x5239be[_0x539c9b(0x1f9)]?console[_0x539c9b(0x225)]('Version:\x20'+_0x2d2754+_0x539c9b(0x203)):console[_0x539c9b(0x225)]('Version:\x20'+_0x2d2754);const _0x326df4=await getToken();if(_0x326df4){const _0x576b78=await _0x248fd6[_0x539c9b(0x22b)](getCurrentUser,_0x326df4);_0x576b78['success']?console[_0x539c9b(0x225)](_0x539c9b(0x239)+_0x248fd6[_0x539c9b(0x234)](bold,_0x576b78['user']['organizationName'])):(console[_0x539c9b(0x225)](_0x539c9b(0x211)),console[_0x539c9b(0x225)](_0x539c9b(0x1e5)));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console[_0x539c9b(0x225)](_0x539c9b(0x1e5));process['env'][_0x539c9b(0x1fe)]&&(console[_0x539c9b(0x225)]('API\x20Environment:\x20'+_0x248fd6[_0x539c9b(0x1eb)](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+getApiBaseUrl()));console['log'](_0x539c9b(0x22f));const _0x4b0f1f=await _0x248fd6['zolzE'](getOpencodePluginStatus);if(_0x248fd6[_0x539c9b(0x1d9)](_0x4b0f1f[_0x539c9b(0x214)],_0x248fd6[_0x539c9b(0x201)]))console[_0x539c9b(0x225)]('\x20\x20'+bold(_0x248fd6['FHjFv'])+_0x539c9b(0x1d8)),_0x4b0f1f[_0x539c9b(0x1f4)]&&console['log']('\x20\x20'+_0x4b0f1f[_0x539c9b(0x1f4)]);else _0x4b0f1f[_0x539c9b(0x214)]===_0x248fd6['fIIng']?(console[_0x539c9b(0x225)](_0x248fd6[_0x539c9b(0x1f2)]),_0x4b0f1f[_0x539c9b(0x1f4)]&&console[_0x539c9b(0x225)]('\x20\x20'+_0x4b0f1f[_0x539c9b(0x1f4)]),console[_0x539c9b(0x225)]('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console['log'](_0x248fd6[_0x539c9b(0x1ec)]);console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x1dd254=await _0x248fd6[_0x539c9b(0x202)](getPluginInfo,_0x248fd6[_0x539c9b(0x204)]);if(_0x1dd254){const _0x83d47c=_0x1dd254['scope']||_0x248fd6[_0x539c9b(0x200)],_0x54dcb6=_0x1dd254[_0x539c9b(0x1d5)]?_0x248fd6[_0x539c9b(0x1de)]:'disabled';console['log']('\x20\x20'+bold(_0x248fd6[_0x539c9b(0x204)])+':\x20installed\x20('+_0x83d47c+',\x20'+_0x54dcb6+')');}else console[_0x539c9b(0x225)](_0x539c9b(0x226)),console[_0x539c9b(0x225)](_0x539c9b(0x1e1));console[_0x539c9b(0x225)]('\x0a---\x20Skills\x20---');const {project:_0x64f920,user:_0x458a5c}=await getInstalledSkills(),_0x5022d2=_0x64f920['filter'](_0x212334=>RANGER_MANAGED_SKILLS['includes'](_0x212334['name'])),_0x471ef4=_0x458a5c[_0x539c9b(0x232)](_0x5edc79=>RANGER_MANAGED_SKILLS['includes'](_0x5edc79['name'])),_0x4b116d=_0x248fd6['BZfBO'](_0x5022d2['length'],_0x471ef4['length']);if(_0x4b116d===0x0)console[_0x539c9b(0x225)](_0x248fd6['FOVKz']),console[_0x539c9b(0x225)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x248fd6['dFjZT'](_0x5022d2[_0x539c9b(0x1e7)],0x0)){console[_0x539c9b(0x225)](_0x539c9b(0x209));for(const _0x446f45 of _0x5022d2){console['log'](_0x539c9b(0x20e)+bold(_0x446f45['displayName'])+':\x20'+_0x248fd6['zuOxA'](link,_0x446f45[_0x539c9b(0x1f3)],_0x248fd6[_0x539c9b(0x202)](basename,_0x446f45['path'])));}}if(_0x471ef4[_0x539c9b(0x1e7)]>0x0){console['log'](_0x539c9b(0x1e9));for(const _0x1fceb8 of _0x471ef4){console[_0x539c9b(0x225)](_0x539c9b(0x20e)+bold(_0x1fceb8[_0x539c9b(0x22d)])+':\x20'+link(_0x1fceb8[_0x539c9b(0x1f3)],_0x248fd6['wVDkn'](basename,_0x1fceb8['path'])));}}}console[_0x539c9b(0x225)](_0x248fd6['QMrGH']);const {envs:_0x2a4321,activeEnv:_0x4af5ed}=await getEnvironments();if(_0x248fd6['jmfxU'](_0x2a4321[_0x539c9b(0x1e7)],0x0))console['log'](_0x248fd6['LzvAx']),console['log']('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x1a41bb of _0x2a4321){const _0x2b2c3a=_0x1a41bb[_0x539c9b(0x1f6)]?_0x248fd6['ZDsxB']:'',_0xab3a17=_0x1a41bb[_0x539c9b(0x1fb)]?'encrypted':_0x1a41bb[_0x539c9b(0x208)]?'plaintext':_0x248fd6[_0x539c9b(0x235)];console['log']('\x20\x20'+bold(_0x1a41bb['name'])+_0x2b2c3a),console[_0x539c9b(0x225)](_0x539c9b(0x224)+_0xab3a17),_0x1a41bb['settingsPath']!==_0x248fd6[_0x539c9b(0x213)]&&console[_0x539c9b(0x225)]('\x20\x20\x20\x20Settings:\x20'+link(_0x1a41bb[_0x539c9b(0x1d4)],basename(_0x1a41bb[_0x539c9b(0x1d4)])));}!_0x4af5ed&&(console[_0x539c9b(0x225)]('\x0a\x20\x20No\x20active\x20profile\x20set'),console[_0x539c9b(0x225)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x2a4321['map'](_0x19b65d=>_0x19b65d[_0x539c9b(0x1e3)])['join'](',\x20')+')'));}console['log']('');}
@@ -1 +1 @@
1
- const _0x4f7d97=_0x13e5;(function(_0xea5894,_0x441df5){const _0xb6537f=_0x13e5,_0x2c3089=_0xea5894();while(!![]){try{const _0x57388e=parseInt(_0xb6537f(0xa8))/0x1*(-parseInt(_0xb6537f(0xa2))/0x2)+parseInt(_0xb6537f(0xb1))/0x3+parseInt(_0xb6537f(0xa5))/0x4+parseInt(_0xb6537f(0xac))/0x5*(parseInt(_0xb6537f(0xb8))/0x6)+parseInt(_0xb6537f(0xa6))/0x7+-parseInt(_0xb6537f(0x97))/0x8*(-parseInt(_0xb6537f(0x9e))/0x9)+-parseInt(_0xb6537f(0x92))/0xa;if(_0x57388e===_0x441df5)break;else _0x2c3089['push'](_0x2c3089['shift']());}catch(_0x4f70e1){_0x2c3089['push'](_0x2c3089['shift']());}}}(_0x25e1,0x2076b));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{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';function _0x13e5(_0x3751f2,_0x1afb2e){_0x3751f2=_0x3751f2-0x70;const _0x25e19b=_0x25e1();let _0x13e514=_0x25e19b[_0x3751f2];return _0x13e514;}const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;function _0x25e1(){const _0xcc0ebc=['utf-8','.gitignore','some','rDpEJ','176jWZWxc','spNhT','\x20\x20Failed\x20to\x20reinstall\x20','unref','\x20skill\x20','Claude\x20plugin\x20update\x20failed\x20for\x20','QFJhg','61641OrqHdK','trailhead','npm','aEWkn','2jbOYkm','win32','platform','611372JbvfgH','1718570BEVRGM','test','68998QhbvSF','vjsPV','user','OomuI','19660AWRIgR','beta','Latest\x20version:\x20\x20','obTZk','trim','169329jcZvKR','ranger@trailhead','version','install',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','\x0aInstalling\x20','endsWith','258qvIcji','\x0aCurrent\x20version:\x20','warn','IMeji','TKtZY','UVuJB','opencode','log','ZLdOj','MeHIP','latest','lPUwt','length','plugin','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','stdio','MBkWe','haPEQ','join','piiXJ','inherit','\x20—\x20reinstalling\x20@','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','scope','\x0aSuccessfully\x20installed\x20latest\x20version.','oCbjl','--scope','claude','sDxda','oAzng','project','MaNMk','timeoutMs','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','MBCJg','fcwYO','error','push','local',').\x20Staying\x20on\x20','alpha','ZewcE','5725810oOSkPy'];_0x25e1=function(){return _0xcc0ebc;};return _0x25e1();}async function runCommand(_0x3736ae,_0x2c07ed,_0x5b9cac){const _0x29cddb=_0x13e5,_0x570779={'lPUwt':function(_0x2e5d11,_0x44cd82){return _0x2e5d11===_0x44cd82;},'DDgAO':function(_0x369d25,_0x384392){return _0x369d25(_0x384392);},'Hmqmp':_0x29cddb(0x7c),'sDxda':function(_0x55301f,_0x4fc6f8){return _0x55301f===_0x4fc6f8;},'UmYAJ':_0x29cddb(0xa3),'dNOfj':function(_0x2ae531,_0x12ceff,_0x4f13e4){return _0x2ae531(_0x12ceff,_0x4f13e4);}};return new Promise(_0x1f8562=>{const _0x458844=_0x29cddb,_0x2d14d7={'lhLnI':function(_0x47e033,_0x3b23b0){return _0x570779['DDgAO'](_0x47e033,_0x3b23b0);},'MBkWe':function(_0x139ff3,_0x39afa1){return _0x139ff3(_0x39afa1);}};let _0x5cbbd1=![],_0x494f84;const _0x370afb=_0x5f1bfe=>{if(_0x5cbbd1)return;_0x5cbbd1=!![],_0x494f84&&clearTimeout(_0x494f84),_0x2d14d7['lhLnI'](_0x1f8562,_0x5f1bfe);},_0x570a31=spawn(_0x3736ae,_0x2c07ed,{'stdio':['ignore',_0x5b9cac?.[_0x458844(0x77)]??_0x458844(0x7c),_0x5b9cac?.[_0x458844(0x77)]??_0x570779['Hmqmp']],'cwd':_0x5b9cac?.['cwd'],'shell':_0x570779[_0x458844(0x84)](process['platform'],_0x570779['UmYAJ'])});_0x494f84=_0x5b9cac?.[_0x458844(0x88)]?_0x570779['dNOfj'](setTimeout,()=>{const _0xcf3256=_0x458844;_0x570a31['kill'](),_0x570a31[_0xcf3256(0x9a)](),_0x2d14d7[_0xcf3256(0x78)](_0x370afb,![]);},_0x5b9cac[_0x458844(0x88)]):undefined,_0x570a31['on']('close',_0x89dafd=>{const _0x4ad282=_0x458844;_0x370afb(_0x570779[_0x4ad282(0x73)](_0x89dafd,0x0));}),_0x570a31['on']('error',()=>{_0x370afb(![]);});});}export function resolveDistTag(_0x19c643){const _0x48e131=_0x13e5,_0x5d1a03={'aEWkn':_0x48e131(0xad)};if(/-alpha\./i[_0x48e131(0xa7)](_0x19c643))return _0x48e131(0x90);if(/-beta\./i['test'](_0x19c643))return _0x5d1a03[_0x48e131(0xa1)];if(/-rc\./i[_0x48e131(0xa7)](_0x19c643))return'rc';return _0x48e131(0x72);}async function runInstall(_0x7da6d1=_0x4f7d97(0x72)){const _0x2ffcb6=_0x4f7d97,_0x133dfe={'UVxSo':function(_0x15d620,_0x5762fb){return _0x15d620(_0x5762fb);},'TzLil':function(_0xf2d721,_0x20e0db){return _0xf2d721===_0x20e0db;},'oCbjl':function(_0x19c0ec,_0x3fdd91,_0x5722af,_0x326c7b){return _0x19c0ec(_0x3fdd91,_0x5722af,_0x326c7b);},'GFoBO':_0x2ffcb6(0xb4),'piiXJ':'ignore','lpSxl':_0x2ffcb6(0x7c),'JYaYN':'win32','sLiSp':'close'};return new Promise(_0x2e74fb=>{const _0x2b32a8=_0x2ffcb6;console['log'](_0x2b32a8(0xb6)+PACKAGE_NAME+'@'+_0x7da6d1+'...\x0a');const _0x26bf79=_0x133dfe[_0x2b32a8(0x81)](spawn,_0x2b32a8(0xa0),[_0x133dfe['GFoBO'],'-g',PACKAGE_NAME+'@'+_0x7da6d1],{'stdio':[_0x133dfe[_0x2b32a8(0x7b)],_0x2b32a8(0x7c),_0x133dfe['lpSxl']],'shell':_0x133dfe['TzLil'](process[_0x2b32a8(0xa4)],_0x133dfe['JYaYN'])});_0x26bf79['on'](_0x133dfe['sLiSp'],_0x402120=>{_0x133dfe['UVxSo'](_0x2e74fb,_0x133dfe['TzLil'](_0x402120,0x0));}),_0x26bf79['on']('error',()=>{_0x2e74fb(![]);});});}async function updateClaudeMarketplace(){const _0x44801e=_0x4f7d97,_0x5732c5={'GIBlM':_0x44801e(0x83)},_0x1fcee9=await runCommand(_0x5732c5['GIBlM'],[_0x44801e(0x75),'marketplace','update',_0x44801e(0x9f)],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x1fcee9)throw new Error('Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}async function updateClaudePlugin(_0x225938='user'){const _0x4f597d=_0x4f7d97,_0x4be6a2={'obTZk':'update','wRTXJ':_0x4f597d(0xb2),'ImNde':function(_0x23f620,_0x33f9d4,_0x1196b4,_0x4a1e95){return _0x23f620(_0x33f9d4,_0x1196b4,_0x4a1e95);},'oAzng':function(_0x39c2e7,_0x219eb8){return _0x39c2e7===_0x219eb8;},'HPHLP':_0x4f597d(0x8e),'yyQVa':function(_0x412fe4){return _0x412fe4();}},_0x1fb951=[_0x4f597d(0x75),_0x4be6a2[_0x4f597d(0xaf)],_0x4be6a2['wRTXJ']];_0x225938!==_0x4f597d(0xaa)&&_0x1fb951['push'](_0x4f597d(0x82),_0x225938);const _0xf96dbb=await _0x4be6a2['ImNde'](runCommand,'claude',_0x1fb951,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x4be6a2[_0x4f597d(0x85)](_0x225938,_0x4f597d(0x86))||_0x225938===_0x4be6a2['HPHLP']?_0x4be6a2['yyQVa'](getProjectRoot):undefined});if(!_0xf96dbb)throw new Error(_0x4f597d(0x9c)+_0x225938+'\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}function isSkillInstalled(_0x503761,_0x418f81,_0x287f03){const _0x49fb3b=_0x4f7d97,_0x2ba96a={'kGHiU':function(_0x4a7205,_0x1f9d4b){return _0x4a7205===_0x1f9d4b;},'spNhT':function(_0x29bd8c,_0x26181d){return _0x29bd8c(_0x26181d);},'MBCJg':function(_0x4c1e16,_0x16ada9){return _0x4c1e16(_0x16ada9);}},_0x3c701e=_0x2ba96a['kGHiU'](_0x287f03,_0x49fb3b(0xbe))?_0x2ba96a[_0x49fb3b(0x98)](getOpencodeSkillsDir,_0x418f81):_0x2ba96a[_0x49fb3b(0x8a)](getSkillsDir,_0x418f81),_0x2cd4ff=join(_0x3c701e,_0x503761);return existsSync(_0x2cd4ff);}async function reinstallSkills(_0x323ba0){const _0x38aada=_0x4f7d97,_0x186e41={'MeHIP':function(_0x2009de,_0x33bf4f,_0x550334,_0x2aad5c){return _0x2009de(_0x33bf4f,_0x550334,_0x2aad5c);},'MaNMk':'opencode','IMeji':_0x38aada(0x7e),'yxPvy':function(_0x3d8f9d,_0x5d81c4,_0xf59942){return _0x3d8f9d(_0x5d81c4,_0xf59942);}},_0x750562=['project',_0x38aada(0xaa)],_0x2763ee=[];for(const _0x3ce3e9 of _0x750562){for(const _0x56a1f3 of RANGER_MANAGED_SKILLS){_0x186e41[_0x38aada(0x71)](isSkillInstalled,_0x56a1f3,_0x3ce3e9,_0x38aada(0x83))&&_0x2763ee[_0x38aada(0x8d)]({'skillName':_0x56a1f3,'level':_0x3ce3e9,'platform':_0x38aada(0x83)}),isSkillInstalled(_0x56a1f3,_0x3ce3e9,_0x186e41[_0x38aada(0x87)])&&_0x2763ee[_0x38aada(0x8d)]({'skillName':_0x56a1f3,'level':_0x3ce3e9,'platform':_0x38aada(0xbe)});}}for(const _0x1b9675 of _0x750562){for(const _0x2d552d of DEPRECATED_SKILLS){await removeSkill(_0x2d552d,_0x1b9675);}}if(_0x2763ee[_0x38aada(0x74)]===0x0){console[_0x38aada(0xbf)](_0x186e41[_0x38aada(0xbb)]);return;}console[_0x38aada(0xbf)]('\x0aReinstalling\x20'+_0x2763ee['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x4bc8ba,level:_0x560702,platform:_0x376ba6}of _0x2763ee){try{await _0x186e41['yxPvy'](installSkill,_0x4bc8ba,{'level':_0x560702,'cliVersion':_0x323ba0,'platform':_0x376ba6});}catch(_0x30c60c){console[_0x38aada(0xba)](_0x38aada(0x99)+_0x376ba6+'\x20'+_0x560702+_0x38aada(0x9b)+_0x4bc8ba+':',_0x30c60c);}}}async function ensureActiveProfileGitignored(){const _0x31332d=_0x4f7d97,_0x50e5c5={'QFJhg':function(_0x7d51f8){return _0x7d51f8();},'jkady':function(_0x44718f,_0x4ab3eb){return _0x44718f===_0x4ab3eb;},'UVuJB':function(_0x26ca82,_0x4f417d,_0x3545f7,_0x54cc48){return _0x26ca82(_0x4f417d,_0x3545f7,_0x54cc48);}},_0x3730a0=join(_0x50e5c5[_0x31332d(0x9d)](getRangerDir),_0x31332d(0x94));if(!existsSync(_0x3730a0))return![];let _0x569be9='';try{_0x569be9=await readFile(_0x3730a0,_0x31332d(0x93));}catch{return![];}const _0x45f021=_0x569be9['split'](/\r?\n/);if(_0x45f021[_0x31332d(0x95)](_0x445185=>_0x445185['trim']()==='active-profile.txt'))return![];let _0x10358a=_0x45f021['findIndex'](_0x493a36=>_0x493a36[_0x31332d(0xb0)]()==='active-feature.txt');_0x50e5c5['jkady'](_0x10358a,-0x1)&&(_0x10358a=_0x45f021['length']);_0x45f021['splice'](_0x10358a,0x0,'active-profile.txt');let _0x301d5e=_0x45f021[_0x31332d(0x7a)]('\x0a');!_0x301d5e[_0x31332d(0xb7)]('\x0a')&&(_0x301d5e+='\x0a');try{await _0x50e5c5[_0x31332d(0xbd)](writeFile,_0x3730a0,_0x301d5e,_0x31332d(0x93));}catch{return![];}return!![];}export async function update(){const _0x3270b7=_0x4f7d97,_0xe127a7={'tbPCV':function(_0x346298){return _0x346298();},'OomuI':function(_0x3a2584,_0x436b17){return _0x3a2584(_0x436b17);},'NAEKZ':_0x3270b7(0x72),'TKtZY':'\x0a✅\x20Update\x20complete!','XSvxZ':'Checking\x20for\x20updates...','ddccV':function(_0xa12745){return _0xa12745();},'SwWQY':_0x3270b7(0x80),'iXpKU':function(_0x52f900,_0x50b729,_0x2c5a67){return _0x52f900(_0x50b729,_0x2c5a67);},'hPSgC':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','rDpEJ':'Update\x20failed.','ZewcE':function(_0x68133){return _0x68133();},'AcZWG':_0x3270b7(0x89),'wJXBh':function(_0x75a6fe,_0x22d93a){return _0x75a6fe(_0x22d93a);},'AzmQc':'ranger@trailhead','vjsPV':function(_0x3568c3,_0x2eb8cd){return _0x3568c3===_0x2eb8cd;},'MgYYn':'\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','ZLdOj':'\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','fcwYO':_0x3270b7(0x76),'haPEQ':function(_0x5b8ff5){return _0x5b8ff5();}},_0x22a508=_0xe127a7['tbPCV'](getCurrentVersion);console[_0x3270b7(0xbf)](_0x3270b7(0xb9)+_0x22a508);const _0x960293=_0xe127a7[_0x3270b7(0xab)](resolveDistTag,_0x22a508);if(_0x960293!==_0xe127a7['NAEKZ']){console['log']('Prerelease\x20channel\x20detected\x20(@'+_0x960293+_0x3270b7(0x8f)+_0x960293+_0x3270b7(0x7d)+_0x960293+'...');const _0x364ba4=await runInstall(_0x960293);if(!_0x364ba4)throw new Error('Update\x20failed\x20for\x20@'+_0x960293+'\x20channel.');const _0x18396b=_0xe127a7['tbPCV'](getCurrentVersion);console['log']('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x960293+'.'),await reinstallSkills(_0x18396b),await ensureActiveProfileGitignored(),console['log'](_0xe127a7[_0x3270b7(0xbc)]);return;}console[_0x3270b7(0xbf)](_0xe127a7['XSvxZ']);const _0x1367be=getLatestVersion();let _0x4fdd56=_0x22a508;if(!_0x1367be['version']){console['warn']('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x1367be[_0x3270b7(0x8c)]),console['log']('Attempting\x20install\x20anyway...');const _0x1d85a8=await _0xe127a7['ddccV'](runInstall);if(_0x1d85a8)console[_0x3270b7(0xbf)](_0xe127a7['SwWQY']),_0x4fdd56=_0xe127a7['tbPCV'](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x1367be[_0x3270b7(0x8c)]);}else{const _0x4cb1bf=_0x1367be[_0x3270b7(0xb3)];console[_0x3270b7(0xbf)](_0x3270b7(0xae)+_0x4cb1bf);const _0x11bf15=_0xe127a7['iXpKU'](compareVersions,_0x22a508,_0x4cb1bf);if(_0x11bf15===0x0)console['log'](_0xe127a7['hPSgC']);else{if(_0x11bf15<0x0)console[_0x3270b7(0xbf)]('\x0aYour\x20version\x20('+_0x22a508+_0x3270b7(0xb5)+_0x4cb1bf+').');else{const _0x3115c7=await runInstall();if(_0x3115c7)console[_0x3270b7(0xbf)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x4cb1bf),_0x4fdd56=_0x4cb1bf;else throw new Error(_0xe127a7[_0x3270b7(0x96)]);}}}await _0xe127a7[_0x3270b7(0xab)](reinstallSkills,_0x4fdd56);const _0x441703=await isMarketplaceAdded(_0x3270b7(0x9f)),_0x53f8be=await _0xe127a7[_0x3270b7(0xab)](isPluginInstalled,_0x3270b7(0xb2));_0x441703&&(await _0xe127a7[_0x3270b7(0x91)](updateClaudeMarketplace),console['log'](_0xe127a7['AcZWG']));if(_0x53f8be){const _0x12b38a=await _0xe127a7['wJXBh'](getPluginInfo,_0xe127a7['AzmQc']),_0x18f61e=_0x12b38a?.[_0x3270b7(0x7f)]??_0x3270b7(0xaa);await updateClaudePlugin(_0x18f61e);if(_0xe127a7['vjsPV'](_0x18f61e,'project'))console['log'](_0xe127a7['MgYYn']);else _0xe127a7[_0x3270b7(0xa9)](_0x18f61e,_0x3270b7(0x8e))?console['log'](_0xe127a7[_0x3270b7(0x70)]):console[_0x3270b7(0xbf)](_0xe127a7[_0x3270b7(0x8b)]);}const _0xb37265=await _0xe127a7[_0x3270b7(0x79)](ensureActiveProfileGitignored);console['log'](_0xe127a7['TKtZY']);}
1
+ (function(_0xcc81a8,_0x1b87fb){const _0xb40764=_0x4359,_0x35fc7f=_0xcc81a8();while(!![]){try{const _0x3cb0d5=-parseInt(_0xb40764(0x1fa))/0x1*(parseInt(_0xb40764(0x208))/0x2)+-parseInt(_0xb40764(0x1e9))/0x3+parseInt(_0xb40764(0x1e1))/0x4+parseInt(_0xb40764(0x1f9))/0x5+-parseInt(_0xb40764(0x21a))/0x6+-parseInt(_0xb40764(0x212))/0x7*(-parseInt(_0xb40764(0x204))/0x8)+-parseInt(_0xb40764(0x221))/0x9;if(_0x3cb0d5===_0x1b87fb)break;else _0x35fc7f['push'](_0x35fc7f['shift']());}catch(_0x49e4b0){_0x35fc7f['push'](_0x35fc7f['shift']());}}}(_0x3f48,0xe673a));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';function _0x4359(_0xc0dc22,_0x12bf32){_0xc0dc22=_0xc0dc22-0x1e1;const _0x3f483d=_0x3f48();let _0x435969=_0x3f483d[_0xc0dc22];return _0x435969;}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(_0x251be2,_0x20b646,_0x27b26b){const _0x2621bb={'OvDBL':function(_0x460560,_0x2500ba){return _0x460560(_0x2500ba);},'hiYAf':'ignore','dDpsl':'inherit','btOKW':function(_0x80f6c8,_0x29811f,_0x272e95){return _0x80f6c8(_0x29811f,_0x272e95);},'yCcjL':'error'};return new Promise(_0x13703f=>{const _0x3163cc=_0x4359,_0x2b3008={'WlwEm':function(_0x22b249,_0x3d65e1){return _0x2621bb['OvDBL'](_0x22b249,_0x3d65e1);},'DPAKe':function(_0x40d24a,_0x1b936b){return _0x40d24a===_0x1b936b;}};let _0x263c67=![],_0x10fa3c;const _0x3f2192=_0x35ca88=>{if(_0x263c67)return;_0x263c67=!![],_0x10fa3c&&clearTimeout(_0x10fa3c),_0x13703f(_0x35ca88);},_0x124a15=spawn(_0x251be2,_0x20b646,{'stdio':[_0x2621bb['hiYAf'],_0x27b26b?.[_0x3163cc(0x1f5)]??_0x2621bb['dDpsl'],_0x27b26b?.['stdio']??'inherit'],'shell':process[_0x3163cc(0x207)]==='win32'});_0x10fa3c=_0x27b26b?.[_0x3163cc(0x1f1)]?_0x2621bb[_0x3163cc(0x21c)](setTimeout,()=>{const _0x564f8c=_0x3163cc;_0x124a15[_0x564f8c(0x1fe)](),_0x124a15[_0x564f8c(0x1e7)](),_0x2b3008['WlwEm'](_0x3f2192,![]);},_0x27b26b['timeoutMs']):undefined,_0x124a15['on'](_0x3163cc(0x1ea),_0x3016c9=>{const _0x54182c=_0x3163cc;_0x3f2192(_0x2b3008[_0x54182c(0x20d)](_0x3016c9,0x0));}),_0x124a15['on'](_0x2621bb[_0x3163cc(0x1ef)],()=>{_0x3f2192(![]);});});}export function resolveInstallTarget(_0x4f2e3a){const _0x5afc89=_0x4359,_0x44ff20=_0x4f2e3a[_0x5afc89(0x210)]('.')[0x0],_0x19b47b=parseInt(_0x44ff20,0xa);if(!Number['isFinite'](_0x19b47b))return'latest';return'^'+_0x19b47b+_0x5afc89(0x1e2);}async function runInstall(_0x56bb1e){const _0x18c8f9=_0x4359,_0x3d767d={'ivfEE':function(_0x5e410c,_0x44f4fb){return _0x5e410c(_0x44f4fb);},'DXwGa':function(_0x208d9d,_0x487656){return _0x208d9d===_0x487656;},'SpADa':function(_0x1aadae,_0x59d37f){return _0x1aadae(_0x59d37f);},'Fyppc':_0x18c8f9(0x201)},_0x1b04cb=resolveInstallTarget(_0x56bb1e);return new Promise(_0x8a4859=>{const _0x5c2822=_0x18c8f9;console[_0x5c2822(0x1f0)]('\x0aInstalling\x20'+PACKAGE_NAME+'@'+_0x1b04cb+'...\x0a');const _0x2477dc=spawn('npm',[_0x3d767d['Fyppc'],'-g',PACKAGE_NAME+'@'+_0x1b04cb],{'stdio':[_0x5c2822(0x1ee),_0x5c2822(0x1f4),'inherit'],'shell':process['platform']==='win32'});_0x2477dc['on'](_0x5c2822(0x1ea),_0x26f7db=>{const _0x3cb83a=_0x5c2822;_0x3d767d[_0x3cb83a(0x1f7)](_0x8a4859,_0x3d767d[_0x3cb83a(0x200)](_0x26f7db,0x0));}),_0x2477dc['on']('error',()=>{const _0xf475bb=_0x5c2822;_0x3d767d[_0xf475bb(0x206)](_0x8a4859,![]);});});}async function updateClaudeMarketplace(){const _0x4a2b2d=_0x4359,_0x377855={'fqwBp':_0x4a2b2d(0x1e4),'qEQGY':'update','HbRmN':'Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).'},_0x18c7fc=await runCommand(_0x4a2b2d(0x1fd),[_0x377855['fqwBp'],_0x4a2b2d(0x215),_0x377855[_0x4a2b2d(0x211)],_0x4a2b2d(0x1ed)],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x18c7fc)throw new Error(_0x377855['HbRmN']);}async function updateClaudePlugin(_0x1a2f15){const _0xea45bf=_0x4359,_0x4cd5a1={'uloud':_0xea45bf(0x1ff),'NQFiw':'--scope','lnvTi':function(_0x3afba0,_0x271e80,_0xabd74d,_0x359f40){return _0x3afba0(_0x271e80,_0xabd74d,_0x359f40);},'Guboy':'claude','vGGOz':'user'},_0x1b6bae=['plugin',_0x4cd5a1['uloud'],'ranger@trailhead'];_0x1a2f15&&_0x1b6bae[_0xea45bf(0x21e)](_0x4cd5a1[_0xea45bf(0x216)],_0x1a2f15);const _0x3e7999=await _0x4cd5a1['lnvTi'](runCommand,_0x4cd5a1[_0xea45bf(0x209)],_0x1b6bae,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x3e7999){const _0x1464d2=_0x1a2f15??_0x4cd5a1[_0xea45bf(0x227)];throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x1464d2+_0xea45bf(0x21b));}}function isSkillInstalled(_0x26cf11,_0x39efa5,_0x1d3727){const _0x510a22={'sQFyj':function(_0x3c236f,_0x2ff916){return _0x3c236f(_0x2ff916);}},_0x2f3a32=_0x1d3727==='opencode'?getOpencodeSkillsDir(_0x39efa5):getSkillsDir(_0x39efa5),_0x2ab453=join(_0x2f3a32,_0x26cf11);return _0x510a22['sQFyj'](existsSync,_0x2ab453);}function _0x3f48(){const _0xdcaa20=['Checking\x20for\x20updates...','trim','claude','kill','update','DXwGa','install','YthdW','\x0aSuccessfully\x20installed\x20latest\x20version.','56744VlcRFr','\x0aYour\x20version\x20(','SpADa','platform','24BXBwXv','Guboy','AIyOa','ranger@trailhead','tKlgq','DPAKe','zePoJ','opencode','split','qEQGY','1687qDHlRi','warn','kBRRP','marketplace','NQFiw','Latest\x20version:\x20\x20','VaJRz','wwiOZ','8323272GbxaiD','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','btOKW','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','push','\x0aCould\x20not\x20check\x20latest\x20version:\x20','CPdKR','224649jnXNls','error','\x0aSuccessfully\x20updated\x20to\x20version\x20','\x20skill\x20','length','DwAhI','vGGOz','SYrpA','Qtxyj','6525004opwWWo','.0.0','project','plugin','active-profile.txt','\x0a✅\x20Update\x20complete!','unref','Attempting\x20install\x20anyway...','1661217kSpxFX','close','BRUvL','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','trailhead','ignore','yCcjL','log','timeoutMs','\x0aReinstalling\x20','HhWKh','inherit','stdio','OHYQk','ivfEE',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','4019830wXUQKL','102899DkYssV'];_0x3f48=function(){return _0xdcaa20;};return _0x3f48();}async function reinstallSkills(_0x45937d){const _0x27aa7c=_0x4359,_0x3e2f3f={'YVsre':_0x27aa7c(0x1fd),'aeDsw':_0x27aa7c(0x20f),'xeyyf':function(_0x5d40c2,_0x5df9eb){return _0x5d40c2===_0x5df9eb;}},_0xe1d9ac=[_0x27aa7c(0x1e3),'user'],_0x5a3e65=[];for(const _0x33345b of _0xe1d9ac){for(const _0x442a0c of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x442a0c,_0x33345b,_0x3e2f3f['YVsre'])&&_0x5a3e65[_0x27aa7c(0x21e)]({'skillName':_0x442a0c,'level':_0x33345b,'platform':_0x3e2f3f['YVsre']}),isSkillInstalled(_0x442a0c,_0x33345b,'opencode')&&_0x5a3e65[_0x27aa7c(0x21e)]({'skillName':_0x442a0c,'level':_0x33345b,'platform':_0x3e2f3f['aeDsw']});}}for(const _0x5ddaed of _0xe1d9ac){for(const _0x5efc94 of DEPRECATED_SKILLS){await removeSkill(_0x5efc94,_0x5ddaed);}}if(_0x3e2f3f['xeyyf'](_0x5a3e65[_0x27aa7c(0x225)],0x0)){console['log'](_0x27aa7c(0x1ec));return;}console['log'](_0x27aa7c(0x1f2)+_0x5a3e65[_0x27aa7c(0x225)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x5ace24,level:_0x1b10e2,platform:_0x13001b}of _0x5a3e65){try{await installSkill(_0x5ace24,{'level':_0x1b10e2,'cliVersion':_0x45937d,'platform':_0x13001b});}catch(_0x18ecfa){console[_0x27aa7c(0x213)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x13001b+'\x20'+_0x1b10e2+_0x27aa7c(0x224)+_0x5ace24+':',_0x18ecfa);}}}async function ensureActiveProfileGitignored(){const _0x4dd5a4=_0x4359,_0x4638f={'OHYQk':function(_0x34ecd1,_0x1c100e,_0x145dec){return _0x34ecd1(_0x1c100e,_0x145dec);},'HhWKh':'utf-8','mIamh':function(_0x54a7e4,_0x1006cf){return _0x54a7e4===_0x1006cf;}},_0x17fb02=_0x4638f[_0x4dd5a4(0x1f6)](join,getRangerDir(),'.gitignore');if(!existsSync(_0x17fb02))return![];let _0xa26065='';try{_0xa26065=await readFile(_0x17fb02,_0x4638f['HhWKh']);}catch{return![];}const _0x238924=_0xa26065[_0x4dd5a4(0x210)](/\r?\n/);if(_0x238924['some'](_0xff0f29=>_0xff0f29[_0x4dd5a4(0x1fc)]()===_0x4dd5a4(0x1e5)))return![];let _0x43c3b1=_0x238924['findIndex'](_0x4ee66b=>_0x4ee66b['trim']()==='active-feature.txt');_0x4638f['mIamh'](_0x43c3b1,-0x1)&&(_0x43c3b1=_0x238924[_0x4dd5a4(0x225)]);_0x238924['splice'](_0x43c3b1,0x0,_0x4dd5a4(0x1e5));let _0x22763b=_0x238924['join']('\x0a');!_0x22763b['endsWith']('\x0a')&&(_0x22763b+='\x0a');try{await writeFile(_0x17fb02,_0x22763b,_0x4638f[_0x4dd5a4(0x1f3)]);}catch{return![];}return!![];}export async function update(){const _0x97377c=_0x4359,_0x49dc65={'YthdW':function(_0x1f395f){return _0x1f395f();},'iiokS':_0x97377c(0x1fb),'eiDGL':function(_0x115894,_0x5132b3){return _0x115894(_0x5132b3);},'zePoJ':function(_0x1d731e,_0x4b689b){return _0x1d731e<_0x4b689b;},'SYrpA':function(_0x3ecf89,_0x478b4f){return _0x3ecf89(_0x478b4f);},'dZDFr':function(_0x5beb5f,_0x27b757){return _0x5beb5f(_0x27b757);},'BRUvL':function(_0x24d2f5,_0x51eca9){return _0x24d2f5(_0x51eca9);},'kBRRP':function(_0x58c9ff,_0x3a9379){return _0x58c9ff(_0x3a9379);},'tKlgq':_0x97377c(0x20b),'Qtxyj':function(_0x156c02){return _0x156c02();},'AIyOa':function(_0x34587b,_0x3a8b73){return _0x34587b===_0x3a8b73;},'DwAhI':function(_0x90b343,_0x22a280){return _0x90b343(_0x22a280);},'CPdKR':function(_0x1bb525){return _0x1bb525();},'VaJRz':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','wwiOZ':'✓\x20Migrated\x20active\x20profile\x20file'},_0x4692e7=_0x49dc65[_0x97377c(0x202)](getCurrentVersion);console['log']('\x0aCurrent\x20version:\x20'+_0x4692e7),console[_0x97377c(0x1f0)](_0x49dc65['iiokS']);const _0x1c893e=_0x4692e7[_0x97377c(0x210)]('.')[0x0],_0x4a5764=parseInt(_0x1c893e,0xa),_0x17a268=Number['isFinite'](_0x4a5764)?_0x4a5764:undefined,_0x334ec4=getLatestVersion(_0x17a268);let _0x535e89=_0x4692e7;if(!_0x334ec4['version']){console['warn'](_0x97377c(0x21f)+_0x334ec4[_0x97377c(0x222)]),console[_0x97377c(0x1f0)](_0x97377c(0x1e8));const _0x409a20=await _0x49dc65['eiDGL'](runInstall,_0x4692e7);if(_0x409a20)console[_0x97377c(0x1f0)](_0x97377c(0x203)),_0x535e89=getCurrentVersion();else throw new Error('Update\x20failed:\x20'+_0x334ec4[_0x97377c(0x222)]);}else{const _0x491f6a=_0x334ec4['version'];console[_0x97377c(0x1f0)](_0x97377c(0x217)+_0x491f6a);const _0xda0116=compareVersions(_0x4692e7,_0x491f6a);if(_0xda0116===0x0)console['log']('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x49dc65[_0x97377c(0x20e)](_0xda0116,0x0))console[_0x97377c(0x1f0)](_0x97377c(0x205)+_0x4692e7+_0x97377c(0x1f8)+_0x491f6a+').');else{const _0x146a69=await _0x49dc65[_0x97377c(0x228)](runInstall,_0x4692e7);if(_0x146a69)console['log'](_0x97377c(0x223)+_0x491f6a),_0x535e89=_0x491f6a;else throw new Error('Update\x20failed.');}}}await _0x49dc65['dZDFr'](reinstallSkills,_0x535e89);const _0x381fad=await _0x49dc65[_0x97377c(0x1eb)](isMarketplaceAdded,'trailhead'),_0x473574=await _0x49dc65[_0x97377c(0x214)](isPluginInstalled,_0x49dc65[_0x97377c(0x20c)]);_0x381fad&&(await _0x49dc65[_0x97377c(0x229)](updateClaudeMarketplace),console['log']('\x0aClaude\x20marketplace\x20updated\x20(trailhead).'));if(_0x473574){const _0x1f0957=await getPluginInfo('ranger@trailhead');_0x49dc65[_0x97377c(0x20a)](_0x1f0957?.['scope'],_0x97377c(0x1e3))?(await _0x49dc65[_0x97377c(0x226)](updateClaudePlugin,_0x97377c(0x1e3)),console[_0x97377c(0x1f0)](_0x97377c(0x21d))):(await _0x49dc65[_0x97377c(0x220)](updateClaudePlugin),console[_0x97377c(0x1f0)](_0x49dc65[_0x97377c(0x218)]));}const _0x1edfe9=await _0x49dc65[_0x97377c(0x220)](migrateActiveProfileFile);_0x1edfe9&&console['log'](_0x49dc65[_0x97377c(0x219)]);const _0x3e68a2=await ensureActiveProfileGitignored();console[_0x97377c(0x1f0)](_0x97377c(0x1e6));}
@@ -1 +1 @@
1
- (function(_0x54c337,_0x19ade9){const _0x16fed1=_0x4b80,_0x4f8cda=_0x54c337();while(!![]){try{const _0x2484f4=-parseInt(_0x16fed1(0x102))/0x1+-parseInt(_0x16fed1(0xf2))/0x2*(-parseInt(_0x16fed1(0x105))/0x3)+-parseInt(_0x16fed1(0xf1))/0x4*(-parseInt(_0x16fed1(0x113))/0x5)+parseInt(_0x16fed1(0xf5))/0x6*(-parseInt(_0x16fed1(0x10b))/0x7)+-parseInt(_0x16fed1(0x108))/0x8*(parseInt(_0x16fed1(0x10d))/0x9)+-parseInt(_0x16fed1(0xfd))/0xa+parseInt(_0x16fed1(0x106))/0xb;if(_0x2484f4===_0x19ade9)break;else _0x4f8cda['push'](_0x4f8cda['shift']());}catch(_0x5a3103){_0x4f8cda['push'](_0x4f8cda['shift']());}}}(_0x5742,0x2597f));import{fetchAuthConfig,fetchCloudProfile,manualBrowserLogin,serverSideLogin}from'./utils/cloudProfile.js';function _0x5742(){const _0x324cbb=['No\x20profile\x20named\x20\x22','Profile\x20\x22','84ARgCDP','environmentKey','error','`\x20from\x20a\x20local\x20terminal,\x20or\x20set\x20up\x20automated\x20login\x20for\x20your\x20team\x20(contact\x20eng@ranger.net).','EpAdT','WJXQC','exit','\x20\x20Falling\x20back\x20to\x20headed\x20browser...','344340KJHbux','Create\x20it\x20with:\x0a','XeOPM','Re-create\x20it\x20with:\x0a','success','152613qlClDS','\x22\x20is\x20a\x20legacy\x20on-disk\x20profile\x20and\x20can\x20no\x20longer\x20be\x20refreshed\x20in\x20place.\x0a','\x22\x20has\x20no\x20environment_key\x20and\x20no\x20baseUrl\x20set\x20—\x20there\x27s\x20nothing\x20to\x20refresh\x20against.\x0a','25446ASZmij','5384335LfuyXX','local','3088nzpYBE','\x22\x20found.\x0a','Refreshing\x20session\x20for\x20\x22','49504vOgyWI','bDaiJ','7074wbwRED','not_configured','Can\x27t\x20refresh\x20\x22','status','isTTY','catch','126865QUiIRU','log','\x0a\x20\x20Server-side\x20login\x20failed.\x20Test\x20output:','\x22\x20non-interactively\x20—\x20this\x20profile\x20needs\x20a\x20headed\x20browser\x20to\x20capture\x20a\x20session.\x0a','test_output','Migrate\x20it\x20to\x20a\x20cloud\x20profile\x20by\x20running:\x0a','\x22\x20via\x20headed\x20browser...','legacy','fjiuM','28JgXxTy','18DEQEgd'];_0x5742=function(){return _0x324cbb;};return _0x5742();}import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{getEnvNames}from'./env.js';function _0x4b80(_0x8d048e,_0x1d2db3){_0x8d048e=_0x8d048e-0xeb;const _0x5742ff=_0x5742();let _0x4b800d=_0x5742ff[_0x8d048e];return _0x4b800d;}export async function updateEnv(_0x525677,_0x1fef0c,_0x2f9c31){const _0x3be96f=_0x4b80,_0xc41609={'yoMCZ':function(_0x38f63e,_0xf73628){return _0x38f63e(_0xf73628);},'fjiuM':function(_0x1c80b2){return _0x1c80b2();},'eJPIy':_0x3be96f(0xef),'EpAdT':function(_0x302d76,_0x2bc383){return _0x302d76===_0x2bc383;},'DKwlU':function(_0x569f85,_0x2bce83){return _0x569f85+_0x2bce83;},'bDaiJ':function(_0x450962,_0x47bf5f){return _0x450962+_0x47bf5f;},'DeiIr':function(_0x574897){return _0x574897();},'XeOPM':function(_0x3bcda8,_0x567a4a,_0x523a3d){return _0x3bcda8(_0x567a4a,_0x523a3d);},'hgclq':_0x3be96f(0x101),'erstm':'\x20\x20Server-side\x20login\x20not\x20configured\x20for\x20this\x20org.\x20Falling\x20back\x20to\x20headed\x20browser...','SzCSD':_0x3be96f(0x115),'WJXQC':function(_0x5ae3d7,_0x23df9e){return _0x5ae3d7+_0x23df9e;}},_0x59a3d8=await _0xc41609['yoMCZ'](fetchCloudProfile,_0x525677);if(!_0x59a3d8){const {envTypes:_0x294df0}=await _0xc41609[_0x3be96f(0xf0)](getEnvNames),_0x2fae0f=_0x294df0[_0x525677];(_0x2fae0f===_0xc41609['eJPIy']||_0x2fae0f===_0x3be96f(0x107)||_0xc41609[_0x3be96f(0xf9)](_0x2fae0f,'ci'))&&(console['error'](_0xc41609['DKwlU'](_0x3be96f(0xf4)+_0x525677+_0x3be96f(0x103),_0x3be96f(0xed))+'\x0a'+('\x20\x20ranger\x20profile\x20add\x20'+_0x525677+'\x0a')),process['exit'](0x1));}!_0x59a3d8&&(console[_0x3be96f(0xf7)](_0xc41609[_0x3be96f(0x10c)](_0xc41609['DKwlU'](_0x3be96f(0xf3)+_0x525677+_0x3be96f(0x109),_0x3be96f(0xfe))+'\x0a','\x20\x20ranger\x20profile\x20add\x20'+_0x525677+'\x0a')),process['exit'](0x1));const _0xc3b1c=await _0xc41609['DeiIr'](fetchAuthConfig)[_0x3be96f(0x112)](()=>null),_0x518b5c=_0x59a3d8['environmentKey']&&_0xc3b1c?_0xc41609[_0x3be96f(0xff)](resolveAuthEnvironmentLocally,_0xc3b1c,_0x59a3d8[_0x3be96f(0xf6)]):null;if(_0x59a3d8['environmentKey']&&_0x518b5c){console['log'](_0x3be96f(0x10a)+_0x525677+'\x22\x20via\x20server-side\x20login...');try{const _0x3d5c2e=await serverSideLogin(_0x525677,{'force':!![]});if(_0x3d5c2e['status']===_0xc41609['hgclq']){console[_0x3be96f(0x114)]('✓\x20Session\x20refreshed\x20for\x20\x22'+_0x525677+'\x22.');return;}_0xc41609[_0x3be96f(0xf9)](_0x3d5c2e[_0x3be96f(0x110)],_0x3be96f(0x10e))?console[_0x3be96f(0x114)](_0xc41609['erstm']):(_0x3d5c2e[_0x3be96f(0xec)]&&(console['log'](_0xc41609['SzCSD']),console[_0x3be96f(0x114)](_0x3d5c2e['test_output'])),console['log'](_0x3be96f(0xfc)));}catch(_0x35e0f5){console[_0x3be96f(0x114)]('\x20\x20Server-side\x20login\x20error:\x20'+(_0x35e0f5 instanceof Error?_0x35e0f5['message']:_0xc41609['yoMCZ'](String,_0x35e0f5))),console['log'](_0x3be96f(0xfc));}}const _0x2c6a07=_0x59a3d8['settings']??{},_0x1f17e4=_0x2c6a07['setupHeaders'],_0x238f51=_0x2c6a07['baseUrl'],_0x574c90=_0x518b5c?{..._0x518b5c,'setupHeaders':_0x1f17e4??_0x518b5c['setupHeaders']}:_0x238f51?{'key':_0x59a3d8[_0x3be96f(0xf6)]??'','domains':[_0x238f51],'setupHeaders':_0x1f17e4}:null;!_0x574c90&&(console['error'](_0xc41609['bDaiJ']('Profile\x20\x22'+_0x525677+_0x3be96f(0x104)+_0x3be96f(0x100)+'\x0a','\x20\x20ranger\x20profile\x20add\x20'+_0x525677+'\x0a')),process['exit'](0x1)),(!process['stdin']['isTTY']||!process['stdout'][_0x3be96f(0x111)])&&(console['error'](_0xc41609[_0x3be96f(0xfa)](_0x3be96f(0x10f)+_0x525677+_0x3be96f(0xeb),'Run\x20`ranger\x20profile\x20update\x20'+_0x525677+_0x3be96f(0xf8))),process[_0x3be96f(0xfb)](0x1)),console['log']('Capturing\x20a\x20fresh\x20session\x20for\x20\x22'+_0x525677+_0x3be96f(0xee)),await _0xc41609['XeOPM'](manualBrowserLogin,_0x59a3d8,_0x574c90),console['log']('✓\x20Session\x20refreshed\x20for\x20\x22'+_0x525677+'\x22.');}
1
+ (function(_0x45ee2b,_0x3cf399){const _0x945f9e=_0x1d24,_0x2f1c8e=_0x45ee2b();while(!![]){try{const _0x2b3619=-parseInt(_0x945f9e(0x189))/0x1+parseInt(_0x945f9e(0x171))/0x2+parseInt(_0x945f9e(0x185))/0x3+parseInt(_0x945f9e(0x16e))/0x4+-parseInt(_0x945f9e(0x183))/0x5*(parseInt(_0x945f9e(0x15e))/0x6)+-parseInt(_0x945f9e(0x17c))/0x7+-parseInt(_0x945f9e(0x16a))/0x8;if(_0x2b3619===_0x3cf399)break;else _0x2f1c8e['push'](_0x2f1c8e['shift']());}catch(_0x15afab){_0x2f1c8e['push'](_0x2f1c8e['shift']());}}}(_0x40cd,0x4b522));function _0x1d24(_0x541055,_0x266a77){_0x541055=_0x541055-0x158;const _0x40cda8=_0x40cd();let _0x1d245d=_0x40cda8[_0x541055];return _0x1d245d;}import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';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';function _0x40cd(){const _0xa53559=['auth.json','DUJNw','2082khSrdw','\x22\x20authentication\x20updated','baseUrl','pRdte','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','\x20safeMode\x20true\x0a','pvaqY','config_write','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','\x0a📋\x20Authentication\x20Update','Laqmc','✓\x20Auth\x20state\x20saved\x20to:\x20','4598280cTughq','BWVHm','YcxUl','allowInsecureLocalhost','1424868RrXDNr','.enc','Profile\x20\x22','1163626kuLWNE','close','log','cqZUt','sAiZs','\x0a✅\x20Profile\x20\x22','qTJzt','contextOptions','newContext','BRTDi','Saving\x20authentication\x20state...','1315538aDsokI','error','launch','trackPhaseEnd','safeMode','utf-8','browser','3115HswmkV','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','1605666plAXEG','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','EaDet','XdVoj','185838QlgkWw','stdout','trackPhaseStart','extraHTTPHeaders','✓\x20Updated\x20config:\x20','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a'];_0x40cd=function(){return _0xa53559;};return _0x40cd();}import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x3b6659,_0x3817e3,_0x5c4fa8){const _0x5eb912=_0x1d24,_0x1c6c78={'BxdEm':function(_0x19651b){return _0x19651b();},'Vfhea':_0x5eb912(0x172),'IoxFU':function(_0x224ed3,_0x58cfbd,_0x3a4ef8){return _0x224ed3(_0x58cfbd,_0x3a4ef8);},'BWVHm':'settings.json','pvaqY':function(_0x5a0b73,_0x463c38){return _0x5a0b73+_0x463c38;},'KNsPW':_0x5eb912(0x16f),'WEBvw':'browser_auth','DUJNw':_0x5eb912(0x167),'XdVoj':'\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','YcxUl':'\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','pRdte':function(_0x44faee,_0x1902cd,_0x72c179){return _0x44faee(_0x1902cd,_0x72c179);},'cqZUt':function(_0x36861f,_0x117941){return _0x36861f(_0x117941);},'wBdMO':function(_0x3f2a64,_0x36545e){return _0x3f2a64||_0x36545e;},'mJsxt':'about:blank','sAiZs':_0x5eb912(0x159),'brnen':_0x5eb912(0x15b),'xbEBX':_0x5eb912(0x186),'EaDet':_0x5eb912(0x181),'BRTDi':function(_0x4b2fe0){return _0x4b2fe0();},'qTJzt':function(_0x4792dd,_0x4ef0d7){return _0x4792dd(_0x4ef0d7);},'qxrwn':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','qNuLO':_0x5eb912(0x166),'Laqmc':_0x5eb912(0x165)},_0x350785=getEnvDir(_0x3b6659),_0x3dbbc3=_0x1c6c78['IoxFU'](join,_0x350785,_0x1c6c78[_0x5eb912(0x16b)]),_0x34f0e7=join(_0x350785,_0x5eb912(0x15c)),_0x52a849=_0x1c6c78[_0x5eb912(0x164)](_0x34f0e7,_0x1c6c78['KNsPW']),_0x1bdb45=process['stdin']['isTTY']&&process[_0x5eb912(0x18a)]['isTTY'];if(!_0x1bdb45)throw new Error(_0x5eb912(0x162));if(!existsSync(_0x350785))throw new Error(_0x5eb912(0x170)+_0x3b6659+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3b6659);if(!existsSync(_0x3dbbc3))throw new Error('Config\x20not\x20found\x20at\x20'+_0x3dbbc3+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3b6659);const _0x2665a9=await readFile(_0x3dbbc3,'utf-8'),_0x2725b9=JSON['parse'](_0x2665a9),_0x531d54=resolveEnvVars(_0x2725b9),_0x1c20c6=typeof _0x531d54['baseUrl']==='string'?_0x531d54[_0x5eb912(0x160)]:undefined,_0x239497=existsSync(_0x34f0e7),_0x2c5980=isEnvCi(_0x3b6659);_0x3817e3?.[_0x5eb912(0x18b)](_0x1c6c78['WEBvw']),console['log'](_0x1c6c78[_0x5eb912(0x15d)]),console[_0x5eb912(0x173)](_0x1c6c78[_0x5eb912(0x188)]),console[_0x5eb912(0x173)](_0x5eb912(0x15a)),console[_0x5eb912(0x173)](_0x1c6c78[_0x5eb912(0x16c)]);const {launchOptions:_0x1d4f63,contextOptions:_0x55c37f}=_0x1c6c78[_0x5eb912(0x161)](buildBrowserOptionsFromSettings,_0x531d54,{'headless':![],'storageStatePath':_0x239497?_0x34f0e7:undefined});_0x531d54['setupHeaders']&&(_0x55c37f['extraHTTPHeaders']={..._0x55c37f[_0x5eb912(0x18c)],..._0x531d54['setupHeaders']});const _0x1a70ab=await chromium[_0x5eb912(0x17e)](_0x1d4f63);let _0x4c80d4=null;try{_0x4c80d4=await _0x1a70ab[_0x5eb912(0x179)](_0x55c37f),await _0x1c6c78[_0x5eb912(0x174)](addProfileSetupBanner,_0x4c80d4);const _0x2d8a85=await _0x4c80d4['newPage']();await _0x2d8a85['goto'](_0x1c6c78['wBdMO'](_0x1c20c6,_0x1c6c78['mJsxt']));let _0x22f720=![];await new Promise(_0x38e667=>{const _0x3d510f={'JslrP':function(_0x4a5b71){return _0x1c6c78['BxdEm'](_0x4a5b71);}};_0x2d8a85['on'](_0x1c6c78['Vfhea'],async()=>{const _0x384cdc=_0x1d24;try{console['log'](_0x384cdc(0x17b)),await _0x4c80d4?.['storageState']({'path':_0x34f0e7}),_0x22f720=!![];}catch{}_0x3d510f['JslrP'](_0x38e667);});});if(!_0x22f720){console[_0x5eb912(0x173)](_0x1c6c78[_0x5eb912(0x175)]);!_0x531d54[_0x5eb912(0x180)]&&(console[_0x5eb912(0x173)](_0x1c6c78['brnen']),console['log']('Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20'+_0x3b6659+_0x5eb912(0x163)));throw new Error(_0x1c6c78['xbEBX']);}}finally{_0x4c80d4&&await _0x4c80d4['close']()['catch'](()=>{}),await _0x1a70ab[_0x5eb912(0x172)]()['catch'](()=>{});}if(_0x2c5980){const _0x33ac08=await readFile(_0x34f0e7,_0x1c6c78[_0x5eb912(0x187)]),_0x203029=await _0x1c6c78[_0x5eb912(0x17a)](getToken);if(!_0x203029)console[_0x5eb912(0x17d)](_0x5eb912(0x184)),console['log'](_0x5eb912(0x169)+_0x34f0e7);else{const _0x271fb5=encrypt(_0x33ac08,_0x203029);await writeFile(_0x52a849,_0x271fb5),await _0x1c6c78[_0x5eb912(0x177)](unlink,_0x34f0e7),console[_0x5eb912(0x173)]('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x52a849),console['log'](_0x1c6c78['qxrwn']),console[_0x5eb912(0x173)](_0x1c6c78['qNuLO']);}}else console[_0x5eb912(0x173)](_0x5eb912(0x169)+_0x34f0e7);_0x3817e3?.[_0x5eb912(0x17f)]('browser_auth'),_0x3817e3?.[_0x5eb912(0x18b)](_0x1c6c78[_0x5eb912(0x168)]),_0x2725b9[_0x5eb912(0x182)]=_0x2725b9['browser']||{},_0x2725b9[_0x5eb912(0x182)]['contextOptions']=_0x2725b9['browser']['contextOptions']||{},_0x2725b9['browser'][_0x5eb912(0x178)]['storageState']=_0x34f0e7,_0x5c4fa8?.['allowInsecureLocalhost']===!![]&&(_0x2725b9[_0x5eb912(0x16d)]=!![]),await _0x1c6c78['IoxFU'](writeFile,_0x3dbbc3,JSON['stringify'](_0x2725b9,null,0x2)),console[_0x5eb912(0x173)](_0x5eb912(0x158)+_0x3dbbc3),_0x3817e3?.['trackPhaseEnd'](_0x1c6c78['Laqmc']),console['log'](_0x5eb912(0x176)+_0x3b6659+_0x5eb912(0x15f));}
@@ -1 +1 @@
1
- (function(_0x1fb5e9,_0x4aa592){const _0x3b4a08=_0x39c5,_0x4e8ba1=_0x1fb5e9();while(!![]){try{const _0x4da004=parseInt(_0x3b4a08(0x1be))/0x1*(parseInt(_0x3b4a08(0x1c6))/0x2)+parseInt(_0x3b4a08(0x1c5))/0x3*(-parseInt(_0x3b4a08(0x1c4))/0x4)+-parseInt(_0x3b4a08(0x1ba))/0x5+parseInt(_0x3b4a08(0x1c3))/0x6*(parseInt(_0x3b4a08(0x1c2))/0x7)+-parseInt(_0x3b4a08(0x1c0))/0x8+parseInt(_0x3b4a08(0x1c8))/0x9+parseInt(_0x3b4a08(0x1b7))/0xa;if(_0x4da004===_0x4aa592)break;else _0x4e8ba1['push'](_0x4e8ba1['shift']());}catch(_0x31811e){_0x4e8ba1['push'](_0x4e8ba1['shift']());}}}(_0x5065,0x9c974));import{join}from'path';function _0x39c5(_0x16ddd7,_0x43f81b){_0x16ddd7=_0x16ddd7-0x1b7;const _0x5065a0=_0x5065();let _0x39c53b=_0x5065a0[_0x16ddd7];return _0x39c53b;}import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';function _0x5065(){const _0x2dee79=['22124WRuCTL','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20','11355966ebKPrB','3015810zZyDyA','log','settings.json','2272700ExMZol','\x0a✓\x20Now\x20using\x20profile\x20\x22','Profile\x20\x22','lPrGF','4toKTyR','XPuuq','8753880CrsaFE','`ranger\x20profile\x20add\x20','378287QUUnhG','102hZasWe','12NNhbwX','336129WJnDej'];_0x5065=function(){return _0x2dee79;};return _0x5065();}import{writeActiveProfileName}from'./utils/activeProfile.js';import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';export async function useEnv(_0x15706e){const _0x1893fd=_0x39c5,_0x497982={'KjXjk':_0x1893fd(0x1b9),'XPuuq':function(_0x11fc4a,_0x57254d){return _0x11fc4a(_0x57254d);},'mmCpd':function(_0xf7e14c,_0x1e0612){return _0xf7e14c instanceof _0x1e0612;},'KwCUL':function(_0x851659,_0x5f5a64){return _0x851659===_0x5f5a64;},'lPrGF':function(_0x33d5cc,_0x3cb4ce){return _0x33d5cc+_0x3cb4ce;},'HJKXD':function(_0x5cc06f,_0x1ddd3d){return _0x5cc06f+_0x1ddd3d;}},_0x3661d5=getEnvDir(_0x15706e),_0x24ce1c=join(_0x3661d5,_0x497982['KjXjk']),_0x4c5f97=_0x497982['XPuuq'](existsSync,_0x3661d5)&&_0x497982['XPuuq'](existsSync,_0x24ce1c);if(_0x4c5f97){await writeActiveProfileName(_0x15706e),console[_0x1893fd(0x1b8)](_0x1893fd(0x1bb)+_0x15706e+'\x22');return;}let _0x1f5e1d=null,_0x453e2f=![];try{_0x1f5e1d=await fetchCloudProfile(_0x15706e);if(!_0x1f5e1d)_0x453e2f=!![];}catch(_0x1a0476){_0x497982['mmCpd'](_0x1a0476,ApiError)&&_0x497982['KwCUL'](_0x1a0476['status'],0x194)&&(_0x453e2f=!![]);}if(_0x453e2f)throw new Error(_0x497982[_0x1893fd(0x1bd)](_0x497982['HJKXD'](_0x1893fd(0x1bc)+_0x15706e+_0x1893fd(0x1c7),'Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'),_0x1893fd(0x1c1)+_0x15706e+'`\x20to\x20create\x20one.'));await _0x497982[_0x1893fd(0x1bf)](writeActiveProfileName,_0x15706e),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x15706e+'\x22');}
1
+ (function(_0x47bae0,_0x5d53b7){const _0x19d0fb=_0x1967,_0x229e37=_0x47bae0();while(!![]){try{const _0x4d547c=parseInt(_0x19d0fb(0xa5))/0x1*(parseInt(_0x19d0fb(0xa1))/0x2)+-parseInt(_0x19d0fb(0xaa))/0x3*(-parseInt(_0x19d0fb(0xa9))/0x4)+-parseInt(_0x19d0fb(0xa0))/0x5+-parseInt(_0x19d0fb(0xa2))/0x6+-parseInt(_0x19d0fb(0xae))/0x7*(parseInt(_0x19d0fb(0xa4))/0x8)+-parseInt(_0x19d0fb(0xac))/0x9+-parseInt(_0x19d0fb(0xb2))/0xa*(-parseInt(_0x19d0fb(0xb1))/0xb);if(_0x4d547c===_0x5d53b7)break;else _0x229e37['push'](_0x229e37['shift']());}catch(_0x2dced9){_0x229e37['push'](_0x229e37['shift']());}}}(_0x8076,0x2babe));function _0x1967(_0x548da7,_0x354105){_0x548da7=_0x548da7-0xa0;const _0x80761c=_0x8076();let _0x19679b=_0x80761c[_0x548da7];return _0x19679b;}import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x8076(){const _0x2c1d0c=['settings.json','1924mGZSuv','141uTnIXB','log','2781441bKNiqh','Profile\x20\x22','7jzBuFJ','Config\x20not\x20found\x20at\x20','pxZNd','275110fDdIfM','170ZVwBpj','589875VjyamU','50byPwtv','11298IXaMDZ','\x0a✓\x20Now\x20using\x20profile\x20\x22','1015336QhRsZx','11477vsJqCa','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','XjDSk'];_0x8076=function(){return _0x2c1d0c;};return _0x8076();}export async function useEnv(_0x567f9c){const _0x4acea3=_0x1967,_0xb32b9a={'pxZNd':function(_0x521492,_0x4334a1){return _0x521492(_0x4334a1);},'KLcAm':function(_0x2eb7b9,_0x4bf4f1,_0x1a523f){return _0x2eb7b9(_0x4bf4f1,_0x1a523f);},'yTohI':_0x4acea3(0xa8),'XjDSk':function(_0x3f9932,_0xe18f3){return _0x3f9932(_0xe18f3);},'wSGdU':function(_0x4e3842,_0x307789){return _0x4e3842(_0x307789);}},_0x1ab67a=_0xb32b9a[_0x4acea3(0xb0)](getEnvDir,_0x567f9c),_0x555678=_0xb32b9a['KLcAm'](join,_0x1ab67a,_0xb32b9a['yTohI']);if(!_0xb32b9a[_0x4acea3(0xa7)](existsSync,_0x1ab67a))throw new Error(_0x4acea3(0xad)+_0x567f9c+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x567f9c);if(!existsSync(_0x555678))throw new Error(_0x4acea3(0xaf)+_0x555678+_0x4acea3(0xa6)+_0x567f9c);await _0xb32b9a['wSGdU'](writeActiveProfileName,_0x567f9c),console[_0x4acea3(0xab)](_0x4acea3(0xa3)+_0x567f9c+'\x22');}
@@ -1 +1 @@
1
- const _0x37a784=_0x268d;(function(_0x20a310,_0x3ff37c){const _0x28aaf6=_0x268d,_0x44fd76=_0x20a310();while(!![]){try{const _0x3b0685=-parseInt(_0x28aaf6(0x178))/0x1*(parseInt(_0x28aaf6(0x177))/0x2)+parseInt(_0x28aaf6(0x16b))/0x3*(-parseInt(_0x28aaf6(0x170))/0x4)+-parseInt(_0x28aaf6(0x16f))/0x5*(-parseInt(_0x28aaf6(0x171))/0x6)+parseInt(_0x28aaf6(0x179))/0x7*(parseInt(_0x28aaf6(0x175))/0x8)+-parseInt(_0x28aaf6(0x174))/0x9+-parseInt(_0x28aaf6(0x17a))/0xa*(-parseInt(_0x28aaf6(0x176))/0xb)+-parseInt(_0x28aaf6(0x16d))/0xc*(-parseInt(_0x28aaf6(0x16c))/0xd);if(_0x3b0685===_0x3ff37c)break;else _0x44fd76['push'](_0x44fd76['shift']());}catch(_0x3a35ff){_0x44fd76['push'](_0x44fd76['shift']());}}}(_0x143a,0x25bda));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';const LEGACY_ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE=_0x37a784(0x16e);function _0x268d(_0x233c89,_0x589c0d){_0x233c89=_0x233c89-0x16a;const _0x143ae0=_0x143a();let _0x268d41=_0x143ae0[_0x233c89];return _0x268d41;}function readLegacyActiveProfileFile(){const _0x14434d=_0x37a784,_0x17ac0b={'ptRFL':function(_0x2a3575,_0x5c18e0,_0x4300dd){return _0x2a3575(_0x5c18e0,_0x4300dd);},'EPZfR':function(_0x1f1c8b){return _0x1f1c8b();},'QUiVE':function(_0x5f006f,_0x3287db,_0x35da09){return _0x5f006f(_0x3287db,_0x35da09);},'hKOjQ':function(_0x576280){return _0x576280();},'vYQhM':function(_0x3edd89,_0x148024){return _0x3edd89(_0x148024);}},_0x411d8c=[_0x17ac0b['ptRFL'](join,_0x17ac0b['EPZfR'](getRangerDir),LEGACY_ACTIVE_PROFILE_FILE),_0x17ac0b[_0x14434d(0x173)](join,getRangerHomeDir(),LEGACY_ACTIVE_PROFILE_FILE),join(_0x17ac0b['hKOjQ'](getRangerDir),LEGACY_ACTIVE_ENV_FILE),_0x17ac0b[_0x14434d(0x173)](join,getRangerHomeDir(),LEGACY_ACTIVE_ENV_FILE)];for(const _0x3a1e73 of _0x411d8c){if(_0x17ac0b[_0x14434d(0x16a)](existsSync,_0x3a1e73))return _0x3a1e73;}return null;}export async function readActiveProfileName(){const _0xc84cf9=_0x37a784,_0x52a052={'LIQRs':function(_0x4ce719,_0x548ff3,_0x52f7fa){return _0x4ce719(_0x548ff3,_0x52f7fa);}},_0x1ff348=readLastProfile(process[_0xc84cf9(0x172)]());if(_0x1ff348)return _0x1ff348;const _0x2b4fcd=readLegacyActiveProfileFile();if(!_0x2b4fcd)return null;try{return(await _0x52a052['LIQRs'](readFile,_0x2b4fcd,'utf-8'))['trim']()||null;}catch{return null;}}export async function writeActiveProfileName(_0x4d238d){const _0x3853ee={'Etqdp':function(_0x83a464,_0x4708c9,_0x637da8){return _0x83a464(_0x4708c9,_0x637da8);}};_0x3853ee['Etqdp'](writeLastProfile,process['cwd'](),_0x4d238d);}function _0x143a(){const _0x1fdd3b=['788dJkwTj','2634pDQwad','cwd','QUiVE','878751XNtwps','8SvVfPQ','22McPlWt','454092FUCyoH','1WLkYJP','510433pRYGJS','626490eqeITp','vYQhM','3810CHnelz','299aOrkxV','225636ZUKcPv','active-env.txt','1125BXyHgM'];_0x143a=function(){return _0x1fdd3b;};return _0x143a();}
1
+ function _0x1a1c(_0x5e689f,_0x8aaeed){_0x5e689f=_0x5e689f-0x1eb;const _0x5d17e6=_0x5d17();let _0x1a1c79=_0x5d17e6[_0x5e689f];return _0x1a1c79;}const _0xf20d2c=_0x1a1c;(function(_0x19e79a,_0x475609){const _0x1a55cd=_0x1a1c,_0x2c6e79=_0x19e79a();while(!![]){try{const _0xcb6e9f=-parseInt(_0x1a55cd(0x1f5))/0x1+parseInt(_0x1a55cd(0x1ed))/0x2+parseInt(_0x1a55cd(0x1f1))/0x3+-parseInt(_0x1a55cd(0x1fb))/0x4+parseInt(_0x1a55cd(0x1f7))/0x5+parseInt(_0x1a55cd(0x1f8))/0x6*(parseInt(_0x1a55cd(0x1fa))/0x7)+-parseInt(_0x1a55cd(0x1fc))/0x8*(-parseInt(_0x1a55cd(0x1f6))/0x9);if(_0xcb6e9f===_0x475609)break;else _0x2c6e79['push'](_0x2c6e79['shift']());}catch(_0x2fea52){_0x2c6e79['push'](_0x2c6e79['shift']());}}}(_0x5d17,0xb1c4b));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=_0xf20d2c(0x1f3),LEGACY_ACTIVE_ENV_FILE=_0xf20d2c(0x1ee);function getActiveProfilePath(){const _0xb250dc={'QHCfx':function(_0x15da2c,_0x28b000,_0x5f3a55){return _0x15da2c(_0x28b000,_0x5f3a55);}};return _0xb250dc['QHCfx'](join,getRangerDir(),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x309b45={'MZpae':function(_0x3df6ac,_0x6c825,_0x4de208){return _0x3df6ac(_0x6c825,_0x4de208);},'bPdXm':function(_0xa3cb22){return _0xa3cb22();}};return _0x309b45['MZpae'](join,_0x309b45['bPdXm'](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x38530a=_0xf20d2c,_0x4a3849={'QBJIO':function(_0x28b041){return _0x28b041();},'EqnBD':'utf-8','rkBez':function(_0x3b3271){return _0x3b3271();},'PfURA':function(_0x5507c8,_0x263253,_0x203c6f){return _0x5507c8(_0x263253,_0x203c6f);},'bXsja':function(_0x54c0ba,_0x28828f,_0x1afa79){return _0x54c0ba(_0x28828f,_0x1afa79);},'zRsxC':function(_0x2698b2,_0x72f545,_0x341046,_0xeda15e){return _0x2698b2(_0x72f545,_0x341046,_0xeda15e);},'dPJiq':function(_0x3589d7,_0x44dd13){return _0x3589d7(_0x44dd13);}},_0x10c171=_0x4a3849['QBJIO'](getLegacyActiveEnvPath);if(!existsSync(_0x10c171))return null;let _0x39e60e=null;try{_0x39e60e=(await readFile(_0x10c171,_0x4a3849[_0x38530a(0x1ef)]))['trim']()||null;}catch{_0x39e60e=null;}if(!_0x39e60e)return null;const _0x1bc5f8=_0x4a3849[_0x38530a(0x1f0)](getActiveProfilePath);try{await _0x4a3849[_0x38530a(0x1eb)](rename,_0x10c171,_0x1bc5f8);}catch{try{const _0x5e94aa=getRangerDir();await _0x4a3849['bXsja'](mkdir,_0x5e94aa,{'recursive':!![]}),await _0x4a3849['zRsxC'](writeFile,_0x1bc5f8,_0x39e60e,_0x4a3849['EqnBD']),await _0x4a3849['dPJiq'](unlink,_0x10c171);}catch{}}return _0x39e60e;}export async function readActiveProfileName(){const _0x5eadba=_0xf20d2c,_0x10f48a={'zMFLE':function(_0x5ea941){return _0x5ea941();},'NRLfN':function(_0xac5703,_0x152e6b,_0x5777f2){return _0xac5703(_0x152e6b,_0x5777f2);},'GklJQ':_0x5eadba(0x1ec)},_0xdfcafc=_0x10f48a['zMFLE'](getActiveProfilePath);if(existsSync(_0xdfcafc))try{return(await _0x10f48a[_0x5eadba(0x1f2)](readFile,_0xdfcafc,_0x10f48a[_0x5eadba(0x1f4)]))['trim']()||null;}catch{return null;}return await migrateLegacyActiveEnv();}export async function writeActiveProfileName(_0x25e08e){const _0x2d7153=_0xf20d2c,_0x472c13={'hXKEL':function(_0x4eb6fc,_0x211cf8,_0x27941b){return _0x4eb6fc(_0x211cf8,_0x27941b);},'SyecN':function(_0x1bc46f,_0x218f6a,_0x1f8e4a,_0x25a6db){return _0x1bc46f(_0x218f6a,_0x1f8e4a,_0x25a6db);},'ylhJT':function(_0x31ee74,_0x102008){return _0x31ee74(_0x102008);}},_0x12855e=getRangerDir();await _0x472c13[_0x2d7153(0x1f9)](mkdir,_0x12855e,{'recursive':!![]});const _0x2014b1=getActiveProfilePath();await _0x472c13[_0x2d7153(0x1fd)](writeFile,_0x2014b1,_0x25e08e,_0x2d7153(0x1ec));const _0x312ba5=getLegacyActiveEnvPath();if(_0x472c13[_0x2d7153(0x1fe)](existsSync,_0x312ba5))try{await unlink(_0x312ba5);}catch{}}function _0x5d17(){const _0x4a9342=['active-profile.txt','GklJQ','1294889uccyEV','63351tlOUsB','2935755QPCWgR','450HzRnHh','hXKEL','9499IvknMU','4958996KHbejo','1544nZOhIP','SyecN','ylhJT','PfURA','utf-8','44954YWIukU','active-env.txt','EqnBD','rkBez','3578541IsuZuR','NRLfN'];_0x5d17=function(){return _0x4a9342;};return _0x5d17();}export async function migrateActiveProfileFile(){const _0x3ee1b0=await migrateLegacyActiveEnv();return _0x3ee1b0!==null;}
@@ -1 +1 @@
1
- function _0x1689(){const _0x1622cb=['NPM_CONFIG_USERCONFIG','PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','${PATH}','metadata','/bin','rVAEb','includes','ranger-claude-tmp','490LWKmvs','entries','platform','trim','toLowerCase','slice','%PATH%','set','241232LcSNrw','/usr/bin','push','6558kneaeG','sessionToken','qQTNa','split','string','TMP','199270UNONaA','RANGER_DISABLE_MCP','SLcci','18332spUCBc','NPM_CONFIG_REGISTRY','x-ranger-','USERPROFILE','fromEntries','63TypHqx','npm_config_prefix','1650CKOhTq','win32','indexOf','TEMP','map','66983dLEyDN','ANTHROPIC_CUSTOM_HEADERS','TMPDIR','length','17055KCiWiT','npm_config_registry','kSGhr','CHROME_BIN','641726motrjD','NPM_CONFIG_CACHE'];_0x1689=function(){return _0x1622cb;};return _0x1689();}const _0x38a6a3=_0x1c8b;(function(_0x3e2989,_0x1f50bb){const _0x25f5cb=_0x1c8b,_0x2505f6=_0x3e2989();while(!![]){try{const _0x630529=parseInt(_0x25f5cb(0xde))/0x1+parseInt(_0x25f5cb(0xe6))/0x2+-parseInt(_0x25f5cb(0x109))/0x3*(-parseInt(_0x25f5cb(0x104))/0x4)+-parseInt(_0x25f5cb(0x101))/0x5+parseInt(_0x25f5cb(0xfb))/0x6*(parseInt(_0x25f5cb(0xf0))/0x7)+-parseInt(_0x25f5cb(0xf8))/0x8+parseInt(_0x25f5cb(0xe2))/0x9*(-parseInt(_0x25f5cb(0x10b))/0xa);if(_0x630529===_0x1f50bb)break;else _0x2505f6['push'](_0x2505f6['shift']());}catch(_0xf08fe0){_0x2505f6['push'](_0x2505f6['shift']());}}}(_0x1689,0x2b6fc));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=_0x38a6a3(0xdf),AGENT_ENV_PASSTHROUGH_KEYS=['PATH','HOME','TMPDIR','TMP',_0x38a6a3(0x10e),_0x38a6a3(0x107),'APPDATA','LOCALAPPDATA','XDG_CACHE_HOME','XDG_CONFIG_HOME','PLAYWRIGHT_BROWSERS_PATH','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD',_0x38a6a3(0xe5),'CHROMIUM_BIN','npm_config_cache',_0x38a6a3(0xe7),'npm_config_userconfig',_0x38a6a3(0xe8),_0x38a6a3(0x10a),'NPM_CONFIG_PREFIX',_0x38a6a3(0xe3),_0x38a6a3(0x105),'DEBUG','NODE_ENV','RANGER_TEST_SKIP_BROWSER_WAIT',_0x38a6a3(0x102),AI_PROXY_METADATA_HEADERS_ENV_VAR],UNEXPANDED_PATH_TOKEN_PATTERNS=[_0x38a6a3(0xea),'$PATH',_0x38a6a3(0xf6)];function parseCustomHeaders(_0xb8a2a5){const _0x5085e1=_0x38a6a3;if(!_0xb8a2a5)return[];return _0xb8a2a5[_0x5085e1(0xfe)](/\r?\n/)['map'](_0x183d03=>_0x183d03[_0x5085e1(0xf3)]())['filter'](Boolean)['map'](_0x3c386b=>{const _0x2516ef=_0x5085e1,_0x503711=_0x3c386b[_0x2516ef(0x10d)](':');if(_0x503711===-0x1)return null;const _0x38c283=_0x3c386b[_0x2516ef(0xf5)](0x0,_0x503711)[_0x2516ef(0xf3)](),_0x28743c=_0x3c386b[_0x2516ef(0xf5)](_0x503711+0x1)['trim']();if(!_0x38c283)return null;return[_0x38c283,_0x28743c];})['filter'](_0x2c0d38=>_0x2c0d38!==null);}function _0x1c8b(_0x58cbf8,_0x2dea87){_0x58cbf8=_0x58cbf8-0xdd;const _0x168903=_0x1689();let _0x1c8bf2=_0x168903[_0x58cbf8];return _0x1c8bf2;}export function getAgentPathHealthWarning(_0x485545,_0x288aa1=process[_0x38a6a3(0xf2)]){const _0x230544=_0x38a6a3,_0x5bb2c2={'AkQgF':function(_0x59ab92,_0x175e77){return _0x59ab92===_0x175e77;},'VFEQe':'PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','cAbLz':function(_0x5b7da4,_0x241641){return _0x5b7da4!==_0x241641;},'pzbTH':_0x230544(0xf9),'KmVkd':_0x230544(0xec),'XTKjW':'PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.','rVAEb':function(_0x2fcd57,_0x25318f){return _0x2fcd57===_0x25318f;}},_0x54e6a7=[],_0x4adf6a=(_0x485545||'')[_0x230544(0xfe)](delimiter)['filter'](Boolean);_0x5bb2c2['AkQgF'](_0x4adf6a['length'],0x0)&&_0x54e6a7[_0x230544(0xfa)](_0x5bb2c2['VFEQe']);UNEXPANDED_PATH_TOKEN_PATTERNS['some'](_0x58941e=>(_0x485545||'')['includes'](_0x58941e))&&_0x54e6a7[_0x230544(0xfa)](_0x230544(0xe9));if(_0x5bb2c2['cAbLz'](_0x288aa1,_0x230544(0x10c))){const _0x210f71=_0x4adf6a['includes'](_0x5bb2c2['pzbTH']),_0x3e2ed8=_0x4adf6a[_0x230544(0xee)](_0x5bb2c2['KmVkd']);!_0x210f71&&!_0x3e2ed8&&_0x54e6a7[_0x230544(0xfa)](_0x5bb2c2['XTKjW']);}if(_0x5bb2c2[_0x230544(0xed)](_0x54e6a7[_0x230544(0xe1)],0x0))return null;return{'summary':'Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','issues':_0x54e6a7};}export function buildAgentEnv(_0x3275d0){const _0x5043d5=_0x38a6a3,_0x51d768={'VeYDC':function(_0x6c1ef8){return _0x6c1ef8();},'qQTNa':'TMP','SLcci':'TEMP','vDOEc':function(_0xf49861){return _0xf49861();},'biBtU':_0x5043d5(0xef),'kSGhr':_0x5043d5(0xe0),'rXjTF':function(_0x2d2cb7,_0x38ac55){return _0x2d2cb7===_0x38ac55;}};if(_0x3275d0['byokEnabled'])return Object[_0x5043d5(0x108)](Object['entries'](process['env'])['filter'](_0x83fdf=>typeof _0x83fdf[0x1]===_0x5043d5(0xff)));if(!_0x3275d0[_0x5043d5(0xfc)])throw new Error('Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false');const _0x266a48={'ANTHROPIC_API_KEY':_0x3275d0['sessionToken'],'ANTHROPIC_BASE_URL':_0x51d768['VeYDC'](getAiProxyUrl),'DISABLE_TELEMETRY':'true'};for(const _0x150b90 of AGENT_ENV_PASSTHROUGH_KEYS){const _0x252d9a=process['env'][_0x150b90];_0x252d9a&&![_0x5043d5(0xe0),_0x51d768[_0x5043d5(0xfd)],_0x51d768[_0x5043d5(0x103)]]['includes'](_0x150b90)&&(_0x266a48[_0x150b90]=_0x252d9a);}const _0x1eaaa7=join(_0x51d768['vDOEc'](tmpdir),_0x51d768['biBtU']);try{mkdirSync(_0x1eaaa7,{'recursive':!![]});}catch{}_0x266a48[_0x51d768[_0x5043d5(0xe4)]]=_0x1eaaa7,_0x266a48[_0x5043d5(0x100)]=_0x1eaaa7,_0x266a48[_0x51d768[_0x5043d5(0x103)]]=_0x1eaaa7;const _0xee0d36=parseCustomHeaders(process['env'][AI_PROXY_METADATA_HEADERS_ENV_VAR]),_0x4b8886=new Map(_0xee0d36),_0x13624f=new Set(_0xee0d36[_0x5043d5(0xdd)](([_0x15ab4c])=>_0x15ab4c[_0x5043d5(0xf4)]()));if(_0x3275d0[_0x5043d5(0xeb)])for(const [_0x1cbb42,_0x37a6ea]of Object[_0x5043d5(0xf1)](_0x3275d0[_0x5043d5(0xeb)])){if(_0x37a6ea==null||_0x51d768['rXjTF'](_0x37a6ea,''))continue;const _0x20a869=_0x5043d5(0x106)+_0x1cbb42;!_0x13624f['has'](_0x20a869[_0x5043d5(0xf4)]())&&(_0x4b8886[_0x5043d5(0xf7)](_0x20a869,_0x37a6ea),_0x13624f['add'](_0x20a869['toLowerCase']()));}const _0x2b7fc8=Array['from'](_0x4b8886['entries']())['map'](([_0x599514,_0x3d199a])=>_0x599514+':\x20'+_0x3d199a)['join']('\x0a');return _0x2b7fc8&&(_0x266a48[AI_PROXY_METADATA_HEADERS_ENV_VAR]=_0x2b7fc8),_0x266a48;}
1
+ const _0x218387=_0x532c;(function(_0x58e95d,_0x82d073){const _0x3d55d0=_0x532c,_0x52ef98=_0x58e95d();while(!![]){try{const _0x272caf=parseInt(_0x3d55d0(0x16d))/0x1+-parseInt(_0x3d55d0(0x15e))/0x2+-parseInt(_0x3d55d0(0x16e))/0x3*(parseInt(_0x3d55d0(0x178))/0x4)+-parseInt(_0x3d55d0(0x164))/0x5+parseInt(_0x3d55d0(0x163))/0x6*(-parseInt(_0x3d55d0(0x174))/0x7)+-parseInt(_0x3d55d0(0x159))/0x8*(-parseInt(_0x3d55d0(0x17a))/0x9)+-parseInt(_0x3d55d0(0x16a))/0xa*(-parseInt(_0x3d55d0(0x162))/0xb);if(_0x272caf===_0x82d073)break;else _0x52ef98['push'](_0x52ef98['shift']());}catch(_0x3dc186){_0x52ef98['push'](_0x52ef98['shift']());}}}(_0x3761,0x8b1dc));function _0x532c(_0x31a6d5,_0x152ade){_0x31a6d5=_0x31a6d5-0x159;const _0x3761f1=_0x3761();let _0x532c92=_0x3761f1[_0x31a6d5];return _0x532c92;}import{delimiter,join}from'path';function _0x3761(){const _0x3d28b0=['includes','PATH','ranger-claude-tmp','gUWFC','630tWcIRl','PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','npm_config_registry','2089212DGVSxk','NPM_CONFIG_REGISTRY','54kGsCUK','EAaWy','filter','DAnxo','CHROMIUM_BIN','${PATH}','platform','RANGER_DISABLE_MCP','Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false','NPM_CONFIG_CACHE','some','push','XDG_CONFIG_HOME','1119208mUYtaI','win32','NODE_ENV','DEBUG','APPDATA','1218794DtgLuf','fromEntries','HWpuw','TEMP','11MyWvbd','1836vOJGkN','2878990shGjWs','string','env','TMPDIR','TMP','HOME','15628690gTNQZv','npm_config_prefix','entries','424886zSTnef','6nPYdoT','length'];_0x3761=function(){return _0x3d28b0;};return _0x3761();}import{tmpdir}from'os';import{mkdirSync}from'fs';import{getAiProxyUrl}from'./environment.js';const AGENT_ENV_PASSTHROUGH_KEYS=[_0x218387(0x171),_0x218387(0x169),_0x218387(0x167),_0x218387(0x168),_0x218387(0x161),'USERPROFILE',_0x218387(0x15d),'LOCALAPPDATA','XDG_CACHE_HOME',_0x218387(0x186),'PLAYWRIGHT_BROWSERS_PATH','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','CHROME_BIN',_0x218387(0x17e),'npm_config_cache',_0x218387(0x183),'npm_config_userconfig','NPM_CONFIG_USERCONFIG',_0x218387(0x16b),'NPM_CONFIG_PREFIX',_0x218387(0x177),_0x218387(0x179),_0x218387(0x15c),_0x218387(0x15b),'RANGER_TEST_SKIP_BROWSER_WAIT',_0x218387(0x181)],UNEXPANDED_PATH_TOKEN_PATTERNS=[_0x218387(0x17f),'$PATH','%PATH%'];export function getAgentPathHealthWarning(_0x19977f,_0x228b7d=process[_0x218387(0x180)]){const _0x4600c4=_0x218387,_0x2d537f={'HJxRp':'PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.','gUWFC':_0x4600c4(0x176)},_0x3d97a1=[],_0x3c320b=(_0x19977f||'')['split'](delimiter)[_0x4600c4(0x17c)](Boolean);_0x3c320b[_0x4600c4(0x16f)]===0x0&&_0x3d97a1[_0x4600c4(0x185)](_0x4600c4(0x175));UNEXPANDED_PATH_TOKEN_PATTERNS[_0x4600c4(0x184)](_0x1f1115=>(_0x19977f||'')[_0x4600c4(0x170)](_0x1f1115))&&_0x3d97a1['push']('PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.');if(_0x228b7d!==_0x4600c4(0x15a)){const _0x5ea800=_0x3c320b[_0x4600c4(0x170)]('/usr/bin'),_0x11ca40=_0x3c320b['includes']('/bin');!_0x5ea800&&!_0x11ca40&&_0x3d97a1[_0x4600c4(0x185)](_0x2d537f['HJxRp']);}if(_0x3d97a1['length']===0x0)return null;return{'summary':_0x2d537f[_0x4600c4(0x173)],'issues':_0x3d97a1};}export function buildAgentEnv(_0x47590f){const _0x10ce49=_0x218387,_0x1d45c0={'DAnxo':'true','UTTzA':'TMPDIR','HWpuw':function(_0x25e149,_0x15bfdf,_0x584de5){return _0x25e149(_0x15bfdf,_0x584de5);},'AFPqF':_0x10ce49(0x172),'EAaWy':_0x10ce49(0x168)};if(_0x47590f['byokEnabled'])return Object[_0x10ce49(0x15f)](Object[_0x10ce49(0x16c)](process[_0x10ce49(0x166)])['filter'](_0x56a566=>typeof _0x56a566[0x1]===_0x10ce49(0x165)));if(!_0x47590f['sessionToken'])throw new Error(_0x10ce49(0x182));const _0x387210={'ANTHROPIC_API_KEY':_0x47590f['sessionToken'],'ANTHROPIC_BASE_URL':getAiProxyUrl(),'DISABLE_TELEMETRY':_0x1d45c0[_0x10ce49(0x17d)]};for(const _0x88fbcb of AGENT_ENV_PASSTHROUGH_KEYS){const _0x2906ee=process['env'][_0x88fbcb];_0x2906ee&&![_0x1d45c0['UTTzA'],'TMP','TEMP']['includes'](_0x88fbcb)&&(_0x387210[_0x88fbcb]=_0x2906ee);}const _0x206683=_0x1d45c0[_0x10ce49(0x160)](join,tmpdir(),_0x1d45c0['AFPqF']);try{_0x1d45c0['HWpuw'](mkdirSync,_0x206683,{'recursive':!![]});}catch{}return _0x387210['TMPDIR']=_0x206683,_0x387210[_0x1d45c0[_0x10ce49(0x17b)]]=_0x206683,_0x387210[_0x10ce49(0x161)]=_0x206683,_0x387210;}