@ranger-testing/ranger-cli 2.5.4 → 3.0.1-alpha.55b593b-29

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 (85) hide show
  1. package/README.md +36 -14
  2. package/build/cli.js +1 -1
  3. package/build/commands/addEnv.js +1 -1
  4. package/build/commands/authEncrypt.js +1 -1
  5. package/build/commands/clean.js +1 -1
  6. package/build/commands/config.js +1 -1
  7. package/build/commands/deleteProfile.js +1 -0
  8. package/build/commands/env.js +1 -1
  9. package/build/commands/feature.js +1 -1
  10. package/build/commands/hook.js +1 -1
  11. package/build/commands/hooks/autoPrompt.js +1 -1
  12. package/build/commands/hooks/disable.js +1 -1
  13. package/build/commands/hooks/enable.js +1 -1
  14. package/build/commands/hooks/exitPlanMode.js +1 -1
  15. package/build/commands/hooks/index.js +1 -1
  16. package/build/commands/hooks/output.js +1 -1
  17. package/build/commands/hooks/planReminder.js +1 -1
  18. package/build/commands/hooks/planStart.js +1 -1
  19. package/build/commands/hooks/postEdit.js +1 -1
  20. package/build/commands/hooks/preCompact.js +1 -1
  21. package/build/commands/hooks/sessionEnd.js +1 -1
  22. package/build/commands/hooks/sessionStart.js +1 -1
  23. package/build/commands/hooks/stopHook.js +1 -1
  24. package/build/commands/index.js +1 -1
  25. package/build/commands/login.js +1 -1
  26. package/build/commands/mcpBootstrap.js +1 -1
  27. package/build/commands/migrateProfile.js +1 -0
  28. package/build/commands/setup/claude.js +1 -1
  29. package/build/commands/setup/opencode.js +1 -1
  30. package/build/commands/setupCi.js +1 -1
  31. package/build/commands/skillup.js +1 -1
  32. package/build/commands/start.js +1 -1
  33. package/build/commands/status.js +1 -1
  34. package/build/commands/update.js +1 -1
  35. package/build/commands/updateEnv.js +1 -1
  36. package/build/commands/useEnv.js +1 -1
  37. package/build/commands/utils/activeProfile.js +1 -1
  38. package/build/commands/utils/agentEnv.js +1 -1
  39. package/build/commands/utils/browserSessionsApi.js +1 -1
  40. package/build/commands/utils/claudeConfig.js +1 -1
  41. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  42. package/build/commands/utils/claudePlugin.js +1 -1
  43. package/build/commands/utils/cloudProfile.js +1 -0
  44. package/build/commands/utils/cloudProfileSession.js +1 -0
  45. package/build/commands/utils/crypto.js +1 -1
  46. package/build/commands/utils/desirePathLog.js +1 -1
  47. package/build/commands/utils/deviceAuth.js +1 -1
  48. package/build/commands/utils/environment.js +1 -1
  49. package/build/commands/utils/featureApi.js +1 -1
  50. package/build/commands/utils/fixWebmDuration.js +1 -1
  51. package/build/commands/utils/gitTracked.js +1 -0
  52. package/build/commands/utils/keychain.js +1 -1
  53. package/build/commands/utils/legacyWarning.js +1 -0
  54. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  55. package/build/commands/utils/matchAuthEnvironment.js +1 -0
  56. package/build/commands/utils/mcpImageBase64.js +1 -1
  57. package/build/commands/utils/model.js +1 -1
  58. package/build/commands/utils/novaActCli.js +1 -0
  59. package/build/commands/utils/opencodeConfig.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -0
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/resolveProfileContext.js +1 -0
  67. package/build/commands/utils/resolveProfileUrl.js +1 -0
  68. package/build/commands/utils/retry.js +1 -1
  69. package/build/commands/utils/sessionCache.js +1 -1
  70. package/build/commands/utils/settings.js +1 -1
  71. package/build/commands/utils/skillContent.js +1 -1
  72. package/build/commands/utils/skills.js +1 -1
  73. package/build/commands/utils/stitchWebmFiles.js +1 -1
  74. package/build/commands/utils/telemetry.js +1 -1
  75. package/build/commands/utils/tokenRefresh.js +1 -1
  76. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  77. package/build/commands/utils/userApi.js +1 -1
  78. package/build/commands/utils/version.js +1 -1
  79. package/build/commands/verifyFeature.js +1 -1
  80. package/build/commands/verifyFeatureCli.js +1 -1
  81. package/build/commands/verifyFeatureNovaCli.js +1 -0
  82. package/build/skills/ranger/SKILL.md +36 -6
  83. package/build/skills/ranger/create.md +19 -0
  84. package/build/skills/ranger/verify.md +46 -7
  85. package/package.json +8 -3
@@ -1 +1 @@
1
- function _0x5e75(){const _0x490dcd=['DilUd','user','690512CKDFzH','AYIZl','list','1602244EjqJjM','bnWth','1215405HvULeV','943716avMFOS','4gPAFaX','project','117PYuoZN','jHnlD','includes','eEfwV','isArray','✓\x20OpenCode\x20plugin\x20already\x20configured','924140aEHxCw','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','byrkp','166898PDcoOC','igLZr','$schema','jcHPT','UpiOX','207180eQAQjX','error','plugin','Failed\x20to\x20read\x20opencode.json','log','EFYmF'];_0x5e75=function(){return _0x490dcd;};return _0x5e75();}(function(_0x3c22e3,_0x5be2b3){const _0x443035=_0x4c94,_0x4b0113=_0x3c22e3();while(!![]){try{const _0x1a93d8=parseInt(_0x443035(0xa4))/0x1*(-parseInt(_0x443035(0x99))/0x2)+-parseInt(_0x443035(0x97))/0x3+-parseInt(_0x443035(0x8a))/0x4+-parseInt(_0x443035(0xa1))/0x5+-parseInt(_0x443035(0x98))/0x6+parseInt(_0x443035(0x95))/0x7+-parseInt(_0x443035(0x92))/0x8*(-parseInt(_0x443035(0x9b))/0x9);if(_0x1a93d8===_0x5be2b3)break;else _0x4b0113['push'](_0x4b0113['shift']());}catch(_0x78a026){_0x4b0113['push'](_0x4b0113['shift']());}}}(_0x5e75,0x35416));import{join}from'path';function _0x4c94(_0x439ed5,_0x225940){_0x439ed5=_0x439ed5-0x87;const _0x5e753f=_0x5e75();let _0x4c941c=_0x5e753f[_0x439ed5];return _0x4c941c;}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x41fee9 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x16c539){const _0x5cd26e=_0x4c94,_0x2575aa={'QdFLK':function(_0x5299a3,_0x2d7041){return _0x5299a3(_0x2d7041);},'AYIZl':'opencode.json','jcHPT':'\x0a📦\x20OpenCode\x20Plugin\x0a','igLZr':'pluginScope','bnWth':'Where\x20should\x20the\x20plugin\x20be\x20installed?','SiQUD':_0x5cd26e(0x91),'EFYmF':'Project\x20(shared\x20with\x20team\x20via\x20git)','DilUd':function(_0x3fbce1,_0x26ca1b){return _0x3fbce1(_0x26ca1b);},'byrkp':'@ranger-testing/opencode-plugin','jHnlD':'https://opencode.ai/config.json','DlnWI':function(_0x54e3f6,_0x31b74e){return _0x54e3f6(_0x31b74e);},'avHoS':_0x5cd26e(0xa2),'eEfwV':function(_0x435537,_0x414b3a,_0x189d18){return _0x435537(_0x414b3a,_0x189d18);},'JzfbL':function(_0x343a62,_0x42611b){return _0x343a62(_0x42611b);},'UpiOX':function(_0x1036ec,_0x4fe55b){return _0x1036ec+_0x4fe55b;}},_0x154179=_0x2575aa['QdFLK'](existsSync,join(getOpencodeConfigDir(_0x5cd26e(0x9a)),_0x2575aa[_0x5cd26e(0x93)]));let _0xe44af8;if(_0x16c539)_0xe44af8=_0x16c539;else{if(_0x154179)_0xe44af8=_0x5cd26e(0x9a);else{console['log'](_0x2575aa[_0x5cd26e(0x88)]);const _0x117fc5=await _0x41fee9['prompt']([{'type':_0x5cd26e(0x94),'name':_0x2575aa[_0x5cd26e(0xa5)],'message':_0x2575aa[_0x5cd26e(0x96)],'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x2575aa['SiQUD']},{'name':_0x2575aa[_0x5cd26e(0x8f)],'value':'project'}],'default':'user'}]);_0xe44af8=_0x117fc5['pluginScope'];}}const _0x1cdcc3=join(_0x2575aa[_0x5cd26e(0x90)](getOpencodeConfigDir,_0xe44af8),_0x2575aa[_0x5cd26e(0x93)]),_0x1702d1=_0x2575aa[_0x5cd26e(0xa3)],_0xa90dc0=_0x2575aa[_0x5cd26e(0x9c)];let _0x2eeb70={};if(_0x2575aa['DlnWI'](existsSync,_0x1cdcc3))try{const _0x1a05eb=await readFile(_0x1cdcc3,'utf-8');_0x2eeb70=JSON['parse'](_0x1a05eb);}catch(_0x366e39){return console[_0x5cd26e(0x8b)](_0x2575aa['avHoS']),{'configured':![],'scope':_0xe44af8,'error':_0x5cd26e(0x8d),'details':_0x366e39};}const _0x17605d=Array[_0x5cd26e(0x9f)](_0x2eeb70[_0x5cd26e(0x8c)])?_0x2eeb70[_0x5cd26e(0x8c)]:[];if(_0x17605d[_0x5cd26e(0x9d)](_0x1702d1))return console[_0x5cd26e(0x8e)](_0x5cd26e(0xa0)),{'configured':![],'scope':_0xe44af8};return _0x2eeb70[_0x5cd26e(0x87)]=_0x2eeb70['$schema']||_0xa90dc0,_0x2eeb70['plugin']=[..._0x17605d,_0x1702d1],await _0x2575aa[_0x5cd26e(0x9e)](mkdir,_0x2575aa['JzfbL'](getOpencodeConfigDir,_0xe44af8),{'recursive':!![]}),await _0x2575aa['eEfwV'](writeFile,_0x1cdcc3,_0x2575aa[_0x5cd26e(0x89)](JSON['stringify'](_0x2eeb70,null,0x2),'\x0a')),console[_0x5cd26e(0x8e)]('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0xe44af8};}
1
+ (function(_0x3118c1,_0x427be7){const _0x51c6d9=_0x3f87,_0x3959b2=_0x3118c1();while(!![]){try{const _0xf336f7=-parseInt(_0x51c6d9(0x195))/0x1*(parseInt(_0x51c6d9(0x193))/0x2)+parseInt(_0x51c6d9(0x196))/0x3+-parseInt(_0x51c6d9(0x192))/0x4*(parseInt(_0x51c6d9(0x1a7))/0x5)+parseInt(_0x51c6d9(0x1aa))/0x6*(parseInt(_0x51c6d9(0x191))/0x7)+parseInt(_0x51c6d9(0x19a))/0x8*(parseInt(_0x51c6d9(0x1b1))/0x9)+-parseInt(_0x51c6d9(0x19f))/0xa+parseInt(_0x51c6d9(0x1a8))/0xb;if(_0xf336f7===_0x427be7)break;else _0x3959b2['push'](_0x3959b2['shift']());}catch(_0x25067b){_0x3959b2['push'](_0x3959b2['shift']());}}}(_0x4a1a,0x57950));function _0x4a1a(){const _0xa66c6e=['Project\x20(shared\x20with\x20team\x20via\x20git)','150410WkYjKy','8869883rvFQMv','plugin','516vqtJzW','maKpk','User\x20(available\x20in\x20all\x20your\x20projects)','OfAAG','Where\x20should\x20the\x20plugin\x20be\x20installed?','YZSBa','error','243zkKSWR','18368SCwjBD','84sUGAtr','1906RlFVgt','log','695gpwafe','763326oAwagM','✓\x20OpenCode\x20plugin\x20configured','@ranger-testing/opencode-plugin','$schema','200432MTreFi','cZXhF','pluginScope','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','PmzyL','3101240JLHWrn','nifui','https://opencode.ai/config.json','NzrHD','✓\x20OpenCode\x20plugin\x20already\x20configured','tGMSF','\x0a📦\x20OpenCode\x20Plugin\x0a'];_0x4a1a=function(){return _0xa66c6e;};return _0x4a1a();}import{join}from'path';import{existsSync}from'fs';function _0x3f87(_0x534249,_0x65aa62){_0x534249=_0x534249-0x191;const _0x4a1ab6=_0x4a1a();let _0x3f8727=_0x4a1ab6[_0x534249];return _0x3f8727;}import{mkdir,readFile,writeFile}from'fs/promises';import _0x16938f from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x4092e8){const _0x4ec179=_0x3f87,_0x15e6c2={'maKpk':function(_0x38da40,_0x92cc1,_0x1bae04){return _0x38da40(_0x92cc1,_0x1bae04);},'ZCRdi':'project','OfAAG':_0x4ec179(0x1a5),'PmzyL':'list','tGMSF':'user','cEAAE':_0x4ec179(0x1a6),'NzrHD':function(_0x198e7d,_0xc3b610){return _0x198e7d(_0xc3b610);},'YZSBa':'opencode.json','cZXhF':_0x4ec179(0x198),'nifui':'Failed\x20to\x20read\x20opencode.json','tBFtA':function(_0x48d6ab,_0x4fdd9c,_0x1e43c8){return _0x48d6ab(_0x4fdd9c,_0x1e43c8);}},_0x3e647e=existsSync(_0x15e6c2[_0x4ec179(0x1ab)](join,getOpencodeConfigDir(_0x15e6c2['ZCRdi']),'opencode.json'));let _0x56bd63;if(_0x4092e8)_0x56bd63=_0x4092e8;else{if(_0x3e647e)_0x56bd63=_0x15e6c2['ZCRdi'];else{console[_0x4ec179(0x194)](_0x15e6c2[_0x4ec179(0x1ad)]);const _0xe40903=await _0x16938f['prompt']([{'type':_0x15e6c2[_0x4ec179(0x19e)],'name':'pluginScope','message':_0x4ec179(0x1ae),'choices':[{'name':_0x4ec179(0x1ac),'value':_0x15e6c2[_0x4ec179(0x1a4)]},{'name':_0x15e6c2['cEAAE'],'value':_0x15e6c2['ZCRdi']}],'default':'user'}]);_0x56bd63=_0xe40903[_0x4ec179(0x19c)];}}const _0x1dbdff=join(_0x15e6c2[_0x4ec179(0x1a2)](getOpencodeConfigDir,_0x56bd63),_0x15e6c2[_0x4ec179(0x1af)]),_0x229277=_0x15e6c2[_0x4ec179(0x19b)],_0x3dc4de=_0x4ec179(0x1a1);let _0x3f16d3={};if(_0x15e6c2['NzrHD'](existsSync,_0x1dbdff))try{const _0x48dfa9=await readFile(_0x1dbdff,'utf-8');_0x3f16d3=JSON['parse'](_0x48dfa9);}catch(_0x115a00){return console[_0x4ec179(0x1b0)](_0x4ec179(0x19d)),{'configured':![],'scope':_0x56bd63,'error':_0x15e6c2[_0x4ec179(0x1a0)],'details':_0x115a00};}const _0x2ba6b8=Array['isArray'](_0x3f16d3[_0x4ec179(0x1a9)])?_0x3f16d3['plugin']:[];if(_0x2ba6b8['includes'](_0x229277))return console[_0x4ec179(0x194)](_0x4ec179(0x1a3)),{'configured':![],'scope':_0x56bd63};return _0x3f16d3[_0x4ec179(0x199)]=_0x3f16d3[_0x4ec179(0x199)]||_0x3dc4de,_0x3f16d3[_0x4ec179(0x1a9)]=[..._0x2ba6b8,_0x229277],await _0x15e6c2[_0x4ec179(0x1ab)](mkdir,getOpencodeConfigDir(_0x56bd63),{'recursive':!![]}),await _0x15e6c2['tBFtA'](writeFile,_0x1dbdff,JSON['stringify'](_0x3f16d3,null,0x2)+'\x0a'),console['log'](_0x4ec179(0x197)),{'configured':!![],'scope':_0x56bd63};}
@@ -1 +1 @@
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
+ function _0xa151(){var _0x172adb=['HLDBI','error','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','36JaAYTv','1137bEXWcP','hQBJv','5490121SVIJQl','\x20\x20https://docs.ranger.net/main/concepts/profiles','556208tqfTUz','4248IZwDoa','9866380KhGAGw','1691361PIvmzv','773394aKjLDv','XLIox','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','633785WpqSDD','vwyVx','8wlMjEP'];_0xa151=function(){return _0x172adb;};return _0xa151();}function _0x4b7f(_0x1fa70c,_0x94e4cc){_0x1fa70c=_0x1fa70c-0x16c;var _0xa151f4=_0xa151();var _0x4b7fc4=_0xa151f4[_0x1fa70c];return _0x4b7fc4;}(function(_0x4ed0a4,_0x20dde7){var _0x170233=_0x4b7f,_0x5d3b62=_0x4ed0a4();while(!![]){try{var _0x4fc4d5=parseInt(_0x170233(0x17c))/0x1+-parseInt(_0x170233(0x178))/0x2+parseInt(_0x170233(0x174))/0x3*(parseInt(_0x170233(0x179))/0x4)+-parseInt(_0x170233(0x16d))/0x5*(parseInt(_0x170233(0x173))/0x6)+parseInt(_0x170233(0x176))/0x7*(-parseInt(_0x170233(0x16f))/0x8)+parseInt(_0x170233(0x17b))/0x9+parseInt(_0x170233(0x17a))/0xa;if(_0x4fc4d5===_0x20dde7)break;else _0x5d3b62['push'](_0x5d3b62['shift']());}catch(_0x49bb72){_0x5d3b62['push'](_0x5d3b62['shift']());}}}(_0xa151,0x80c96));export async function setupCi(_0x5063b7,_0x32a963,_0x2d780e){var _0x5f0292=_0x4b7f,_0xe7e311={'HLDBI':function(_0x2f5f5d,_0x3875a8){return _0x2f5f5d+_0x3875a8;},'hQBJv':function(_0x28591a,_0x421f24){return _0x28591a+_0x421f24;},'vwyVx':'ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','ZtzhY':_0x5f0292(0x172),'XLIox':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'};console[_0x5f0292(0x171)](_0xe7e311[_0x5f0292(0x170)](_0xe7e311[_0x5f0292(0x175)](_0xe7e311[_0x5f0292(0x170)](_0xe7e311[_0x5f0292(0x16e)],'\x0a'),_0xe7e311['ZtzhY'])+_0xe7e311[_0x5f0292(0x17d)],'\x0a')+_0x5f0292(0x16c)+_0x5f0292(0x177)),process['exit'](0x1);}
@@ -1 +1 @@
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
+ (function(_0x419ce9,_0x3819ca){const _0x2dafe7=_0x45d6,_0x63af03=_0x419ce9();while(!![]){try{const _0x38267d=parseInt(_0x2dafe7(0xb6))/0x1*(-parseInt(_0x2dafe7(0x98))/0x2)+-parseInt(_0x2dafe7(0xab))/0x3+parseInt(_0x2dafe7(0xb7))/0x4*(parseInt(_0x2dafe7(0xaa))/0x5)+-parseInt(_0x2dafe7(0xad))/0x6+-parseInt(_0x2dafe7(0xa5))/0x7*(parseInt(_0x2dafe7(0xa2))/0x8)+parseInt(_0x2dafe7(0xbb))/0x9+-parseInt(_0x2dafe7(0xb0))/0xa*(-parseInt(_0x2dafe7(0xb4))/0xb);if(_0x38267d===_0x3819ca)break;else _0x63af03['push'](_0x63af03['shift']());}catch(_0x1a1e74){_0x63af03['push'](_0x63af03['shift']());}}}(_0x1cff,0xbf7e1));function _0x45d6(_0x3e6c9b,_0xab0f68){_0x3e6c9b=_0x3e6c9b-0x97;const _0x1cffb5=_0x1cff();let _0x45d6e0=_0x1cffb5[_0x3e6c9b];return _0x45d6e0;}function _0x1cff(){const _0x38a1ad=['user-level','All\x20projects\x20(','warn','user','1376COVGlF','isTTY','/skills/','58373tOHLMP','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','autoInstall','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','KAZvX','10nKaGRk','352782bsRbgr','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','9175314RfJmhU','split','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','80vfofcY','NrtVL','list','\x20\x203.\x20Run:\x20ranger\x20skillup','2437589NPssBF','/.claude/skills/','3Dtzlcp','1683104fQyNIU','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','fVxRR','GpkUJ','13591593hXEXoN','log','stdout','172698sloQWg','project','\x20<your-api-token>','Where\x20should\x20skills\x20be\x20installed?','IWfCd','KDMlX'];_0x1cff=function(){return _0x38a1ad;};return _0x1cff();}import{basename}from'path';import _0x48f795 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0xf83cfc={}){const _0x32f1cf=_0x45d6,_0x587a85={'KDMlX':_0x32f1cf(0xa8),'ZCjsl':function(_0x449f1c){return _0x449f1c();},'KAZvX':'opencode','rXGyY':'\x20--opencode','KNpNF':'❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','PQRoc':function(_0x5d35a0,_0x50b480){return _0x5d35a0===_0x50b480;},'fVxRR':'user','GpkUJ':function(_0x29c6f3,_0x1a86fa){return _0x29c6f3===_0x1a86fa;},'JCzwI':'installLevel','XnSmC':_0x32f1cf(0x9b),'NrtVL':'\x0a📦\x20Installing\x20skills...\x0a','HVpUT':'ranger','IWfCd':function(_0x2baad6,_0x52c9ec){return _0x2baad6 instanceof _0x52c9ec;},'gJAzA':function(_0x35f4de,_0x2944d8){return _0x35f4de>_0x2944d8;},'fiuCO':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','YsuCd':'\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!','fvhZp':_0x32f1cf(0xac)};console[_0x32f1cf(0xbc)](_0x587a85[_0x32f1cf(0x9d)]);const _0x28ce8f=_0xf83cfc['platform']??'claude',_0x21fa80=await _0x587a85['ZCjsl'](getToken);if(!_0x21fa80){const _0x2d8999='5|3|2|0|1|4'[_0x32f1cf(0xae)]('|');let _0x5041e1=0x0;while(!![]){switch(_0x2d8999[_0x5041e1++]){case'0':console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x28ce8f==='opencode'?'\x20--opencode':'')+_0x32f1cf(0x9a));continue;case'1':console[_0x32f1cf(0xbc)](_0x32f1cf(0xb3)+(_0x28ce8f===_0x587a85['KAZvX']?_0x587a85['rXGyY']:'')+'\x0a');continue;case'2':console['log'](_0x32f1cf(0xaf));continue;case'3':console['log']('To\x20get\x20started:');continue;case'4':return;case'5':console['log'](_0x587a85['KNpNF']);continue;}break;}}console['log']('✓\x20Found\x20API\x20token');const _0x5cf409=getProjectRoot(),_0x1bb42b=basename(_0x5cf409),_0x15705e=_0x587a85['PQRoc'](_0x28ce8f,_0x587a85['KAZvX'])?getOpencodeConfigDir(_0x587a85[_0x32f1cf(0xb9)])+'/skills/':getClaudeConfigDir()+_0x32f1cf(0xa4),_0x2a0ba6=_0x587a85[_0x32f1cf(0xba)](_0x28ce8f,_0x587a85[_0x32f1cf(0xa9)])?_0x5cf409+'/.opencode/skills/':_0x5cf409+_0x32f1cf(0xb5),_0x436743=process['stdin'][_0x32f1cf(0xa3)]&&process[_0x32f1cf(0x97)][_0x32f1cf(0xa3)];let _0x1c3600;if(_0xf83cfc[_0x32f1cf(0xa7)])_0x1c3600=_0xf83cfc['autoInstall'];else{if(_0x436743){const _0x49c81b=await _0x48f795['prompt']([{'type':_0x32f1cf(0xb2),'name':_0x587a85['JCzwI'],'message':_0x587a85['XnSmC'],'choices':[{'name':_0x32f1cf(0x9f)+_0x15705e+')','value':'user'},{'name':'This\x20project\x20only\x20('+_0x2a0ba6+')','value':'project'}]}]);_0x1c3600=_0x49c81b['installLevel'];}else _0x1c3600=_0x32f1cf(0x99),console['log'](_0x32f1cf(0xb8)+_0x2a0ba6+')');}let _0x178913=0x0;const _0x3ebb40=getCurrentVersion();console[_0x32f1cf(0xbc)](_0x587a85[_0x32f1cf(0xb1)]);try{const _0x1857e6=await installSkill(_0x587a85['HVpUT'],{'cliVersion':_0x3ebb40,'level':_0x1c3600,'platform':_0x28ce8f});_0x1857e6&&_0x178913++;}catch(_0xb61cfe){console[_0x32f1cf(0xa0)](_0x32f1cf(0xa6),_0x587a85[_0x32f1cf(0x9c)](_0xb61cfe,Error)?_0xb61cfe['message']:_0xb61cfe);}if(_0x178913>0x0){const _0x59d8a8=_0x1c3600===_0x32f1cf(0xa1)?_0x32f1cf(0x9e):'project-level';console[_0x32f1cf(0xbc)]('\x0a✅\x20Installed\x20'+_0x178913+'\x20'+_0x59d8a8+'\x20skill'+(_0x587a85['gJAzA'](_0x178913,0x1)?'s':'')+'\x20successfully!\x0a'),!_0xf83cfc['suppressUsage']&&(console['log']('To\x20use:'),_0x28ce8f==='opencode'?console[_0x32f1cf(0xbc)](_0x587a85['fiuCO']):console['log'](_0x587a85['YsuCd']));}else console[_0x32f1cf(0xbc)](_0x587a85['fvhZp']);}
@@ -1 +1 @@
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
+ const _0x495eaa=_0x4e58;(function(_0x1096c5,_0x254947){const _0x428cd1=_0x4e58,_0xdc40b7=_0x1096c5();while(!![]){try{const _0x4044c0=-parseInt(_0x428cd1(0x120))/0x1*(parseInt(_0x428cd1(0x184))/0x2)+parseInt(_0x428cd1(0x13f))/0x3+parseInt(_0x428cd1(0x172))/0x4*(-parseInt(_0x428cd1(0x13d))/0x5)+-parseInt(_0x428cd1(0x166))/0x6+parseInt(_0x428cd1(0x11e))/0x7*(parseInt(_0x428cd1(0x117))/0x8)+parseInt(_0x428cd1(0x127))/0x9*(-parseInt(_0x428cd1(0x181))/0xa)+parseInt(_0x428cd1(0x15e))/0xb;if(_0x4044c0===_0x254947)break;else _0xdc40b7['push'](_0xdc40b7['shift']());}catch(_0x2351aa){_0xdc40b7['push'](_0xdc40b7['shift']());}}}(_0x49f7,0xd9f53));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x58c750 from'inquirer';function _0x49f7(){const _0xe61e49=['\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','10366txzqdC','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','\x0a\x20\x20','chromium','\x20\x20npx\x20playwright@','/ranger:enable','\x1b[1m','11299112oAvQYL','spjPB','plugin','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','tdIrX','MvWmb','skipAuth','7tlfaTr','UveQC','177HlcCEz','skills','ready','lXAcY','isTTY','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','playwright/package.json','795537kBnsYT','\x0aInstalling\x20Chromium\x20browser...\x0a','close','MPFiX','wGDAe','iQKcC','url','install','✓\x20Created\x20.ranger/.gitignore','lTxBQ','env','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','trackPhaseStart','success','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','local','rkDdc','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','\x20is\x20no\x20longer\x20supported.\x20','\x20now?','530955hfgZNm','prompt','4593852tCtTHC','\x20install\x20chromium','ItBrZ','STrTv','\x0a❌\x20Profile\x20setup\x20failed:','status','1.58.2','ukqbJ','✓\x20Already\x20authenticated\x20to\x20','tXlFl','Authentication\x20failed:\x20','AlmNH','pBctr','NvcKo','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','opencode','qKHmW','JPEJu','profile','aBwSM','BdRCU','yviHQ','Installation\x20failed\x20with\x20exit\x20code\x20','organizationName','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','VjSyx','force','error','playwright@','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','version','14692524YUCawM','cObjD','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','ranger','\x0a🚀\x20Ranger\x20Setup\x0a','\x20(fallback\x20version)','✓\x20Playwright\x20Chromium\x20browser\x20found','✓\x20Stored\x20credentials\x20locally','1655940mixkLY','device_auth','log','message','ZjrSd','inherit','scope','stdout','\x20and\x20prompt\x20the\x20coding','YKgvW','ranger\x20profile\x20add\x20<name>','egGQi','36dLEenG','✓\x20~/.ranger/\x20directory\x20already\x20exists','✓\x20Exported\x20credentials\x20for\x20CI','iyyjX','vZXqd','...','skipChromium','PkysS','bcuOD','withDeps','user','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','kdFiC','auth','trackPhaseEnd','140sBMKgm','exit'];_0x49f7=function(){return _0xe61e49;};return _0x49f7();}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=_0x495eaa(0x145);const bold=_0x145c9e=>_0x495eaa(0x18a)+_0x145c9e+'\x1b[0m';export function getPlaywrightVersion(){const _0x145eee=_0x495eaa;try{const _0x447c35=require['resolve'](_0x145eee(0x126)),_0x578053=require(_0x447c35);return _0x578053[_0x145eee(0x15d)];}catch{return null;}}export function installChromiumBinary(_0x50c628,_0x4c77d6=![]){const _0x49cc10=_0x495eaa,_0x4ca092={'STrTv':function(_0x3c3b27,_0x424561){return _0x3c3b27===_0x424561;},'MPFiX':function(_0x55a884){return _0x55a884();},'iQKcC':function(_0x56cca0,_0x51d98e){return _0x56cca0(_0x51d98e);},'ZjrSd':'--with-deps','UveQC':'npx','PFJwk':_0x49cc10(0x16b),'JCQSw':'win32','tSWbG':_0x49cc10(0x129),'yviHQ':'error'};return new Promise((_0x9a8c3d,_0x39d745)=>{const _0x3a490f=_0x49cc10,_0x4fc4fc=[_0x3a490f(0x15b)+_0x50c628,_0x3a490f(0x12e),..._0x4c77d6?[_0x4ca092[_0x3a490f(0x16a)]]:[],'chromium'],_0x410297=spawn(_0x4ca092[_0x3a490f(0x11f)],_0x4fc4fc,{'stdio':['ignore',_0x4ca092['PFJwk'],_0x3a490f(0x16b)],'shell':_0x4ca092[_0x3a490f(0x142)](process['platform'],_0x4ca092['JCQSw'])});_0x410297['on'](_0x4ca092['tSWbG'],_0x5d61f5=>{const _0x2e8cc6=_0x3a490f;_0x4ca092['STrTv'](_0x5d61f5,0x0)?_0x4ca092[_0x2e8cc6(0x12a)](_0x9a8c3d):_0x39d745(new Error(_0x2e8cc6(0x155)+_0x5d61f5));}),_0x410297['on'](_0x4ca092[_0x3a490f(0x154)],_0x505ef3=>{const _0x2c7fe0=_0x3a490f;_0x4ca092[_0x2c7fe0(0x12c)](_0x39d745,_0x505ef3);});});}export async function authenticate(_0x4138b0){const _0x514dc6=_0x495eaa,_0x198811={'vZXqd':function(_0x57f23c){return _0x57f23c();},'VjSyx':function(_0x1deefd,_0x24acc9){return _0x1deefd(_0x24acc9);},'NvcKo':function(_0x57ffde,_0x4e8e03){return _0x57ffde(_0x4e8e03);},'JPEJu':'Validating\x20API\x20token...','lXAcY':function(_0x2f9476,_0x46884f){return _0x2f9476(_0x46884f);},'AlmNH':_0x514dc6(0x174),'ClEvG':'provided_token'};if(!_0x4138b0){const _0x2f5610=await _0x198811[_0x514dc6(0x176)](getToken);if(_0x2f5610){const _0x2af553=await _0x198811[_0x514dc6(0x158)](getCurrentUser,_0x2f5610);if(_0x2af553['success'])return console['log'](_0x514dc6(0x147)+_0x2af553[_0x514dc6(0x17c)][_0x514dc6(0x156)]),{'token':_0x2f5610,'method':'existing_token'};}try{_0x4138b0=await _0x198811['vZXqd'](runDeviceAuthFlow);}catch(_0x44fb52){throw new Error(_0x514dc6(0x149)+(_0x44fb52 instanceof Error?_0x44fb52[_0x514dc6(0x169)]:_0x44fb52));}const _0x3c4f78=await _0x198811[_0x514dc6(0x14c)](getCurrentUser,_0x4138b0);if(!_0x3c4f78['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x3c4f78['error']);return console[_0x514dc6(0x168)]('✓\x20Authenticated\x20to\x20'+_0x3c4f78['user'][_0x514dc6(0x156)]),{'token':_0x4138b0,'method':_0x514dc6(0x167)};}console['log'](_0x198811[_0x514dc6(0x150)]);const _0x322a9f=await getCurrentUser(_0x4138b0);if(!_0x322a9f[_0x514dc6(0x135)]){if(_0x322a9f[_0x514dc6(0x144)])throw new Error(_0x514dc6(0x149)+_0x322a9f['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0x514dc6(0x14d)+_0x322a9f[_0x514dc6(0x15a)]+_0x514dc6(0x11a));}return console['log']('✓\x20Authenticated\x20to\x20'+_0x322a9f['user']['organizationName']),await _0x198811[_0x514dc6(0x123)](storeToken,_0x4138b0),console[_0x514dc6(0x168)](process[_0x514dc6(0x131)]['GITHUB_ENV']?_0x198811[_0x514dc6(0x14a)]:_0x514dc6(0x165)),{'token':_0x4138b0,'method':_0x198811['ClEvG']};}export async function ensureRangerDir(_0xcbe9b0){const _0x306028=_0x495eaa;void _0xcbe9b0;const _0xe89651=getRangerHomeDir();return!existsSync(_0xe89651)?(await mkdir(_0xe89651,{'recursive':!![]}),console[_0x306028(0x168)]('✓\x20Created\x20~/.ranger/\x20directory'),{'path':_0xe89651,'installed':!![]}):(console['log'](_0x306028(0x173)),{'path':_0xe89651,'installed':![]});}export async function ensureChromium(_0x10adce=![]){const _0x1cbd04=_0x495eaa,_0x3a2dcd={'EpoUC':function(_0xae7251,_0x24faf4){return _0xae7251(_0x24faf4);},'tokyU':function(_0x65d82f,_0x5d71c0){return _0x65d82f instanceof _0x5d71c0;},'qKHmW':_0x1cbd04(0x17d)};let _0x176167=![];try{const _0x4b3b35=chromium['executablePath']();_0x176167=_0x3a2dcd['EpoUC'](existsSync,_0x4b3b35);}catch{_0x176167=![];}if(_0x176167)return console[_0x1cbd04(0x168)](_0x1cbd04(0x164)),![];const _0x133ad=getPlaywrightVersion(),_0x13137c=_0x133ad??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x53f617=!_0x133ad,_0x3b8d3d=process['stdin']['isTTY']&&process[_0x1cbd04(0x16d)][_0x1cbd04(0x124)];let _0x21f872=!![];if(_0x3b8d3d){const {install:_0x11d642}=await _0x58c750[_0x1cbd04(0x13e)]([{'type':'confirm','name':_0x1cbd04(0x12e),'message':_0x53f617?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x13137c+_0x1cbd04(0x13c):'The\x20required\x20version\x20('+_0x13137c+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x21f872=_0x11d642;}else console['log'](_0x1cbd04(0x160)+_0x13137c+(_0x53f617?_0x1cbd04(0x163):'')+_0x1cbd04(0x177));if(_0x21f872){console['log'](_0x1cbd04(0x128));try{await installChromiumBinary(_0x13137c,_0x10adce),console[_0x1cbd04(0x168)]('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0xda6b4b){console[_0x1cbd04(0x15a)](_0x1cbd04(0x185),_0x3a2dcd['tokyU'](_0xda6b4b,Error)?_0xda6b4b['message']:_0xda6b4b),console[_0x1cbd04(0x168)]('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),console[_0x1cbd04(0x168)](_0x1cbd04(0x188)+_0x13137c+'\x20install\x20chromium');}}else console['log']('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console[_0x1cbd04(0x168)](_0x3a2dcd[_0x1cbd04(0x14f)]),console['log'](_0x1cbd04(0x188)+_0x13137c+_0x1cbd04(0x140));return!![];}export async function writeRangerGitignore(_0x53a727){const _0x15e6d5=_0x495eaa,_0x3fc7bd={'MAphD':'.gitignore','TLwZv':function(_0x5cf94e,_0x2476a4,_0x2d0927){return _0x5cf94e(_0x2476a4,_0x2d0927);}},_0x5b56e8=join(_0x53a727,_0x3fc7bd['MAphD']),_0x100e88='\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 _0x3fc7bd['TLwZv'](writeFile,_0x5b56e8,_0x100e88),console['log'](_0x15e6d5(0x12f));}export async function ensureLocalEnv(_0xb38072,_0x46c52b){const _0x356dc9=_0x495eaa,_0x2771e9={'lTxBQ':function(_0x440352,_0xd6e43a){return _0x440352!==_0xd6e43a;},'ItBrZ':_0x356dc9(0x136),'iSgiz':function(_0x45ff8d,_0xc39e29){return _0x45ff8d===_0xc39e29;},'pBctr':_0x356dc9(0x137),'PkysS':function(_0x2b2a9e,_0x22afe6,_0x31dba6,_0x45fece){return _0x2b2a9e(_0x22afe6,_0x31dba6,_0x45fece);},'wGDAe':function(_0x349fce,_0x5487ac){return _0x349fce instanceof _0x5487ac;}};if(!findGitRoot()&&_0x2771e9[_0x356dc9(0x130)](_0xb38072?.['scope'],'user'))return console[_0x356dc9(0x168)](_0x2771e9[_0x356dc9(0x141)]),{'ready':![],'skipped':!![]};const _0x1442b8=_0x2771e9['iSgiz'](_0xb38072?.[_0x356dc9(0x16c)],'user')?getRangerHomeDir():undefined;if(findExistingEnv(_0x2771e9[_0x356dc9(0x14b)],{'locations':['local'],'rangerDir':_0x1442b8}))return console['log']('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};try{return await _0x2771e9[_0x356dc9(0x179)](addEnv,_0x356dc9(0x137),{'url':_0xb38072?.[_0x356dc9(0x12d)],'force':_0xb38072?.['force'],'allowInsecureLocalhost':_0xb38072?.['allowInsecureLocalhost'],'scope':_0xb38072?.[_0x356dc9(0x16c)]},_0x46c52b),{'ready':!![],'skipped':![]};}catch(_0x5aca1a){return console['error'](_0x356dc9(0x143),_0x2771e9[_0x356dc9(0x12b)](_0x5aca1a,Error)?_0x5aca1a['message']:_0x5aca1a),{'ready':![],'skipped':![]};}}function _0x4e58(_0x1d2573,_0xdb4642){_0x1d2573=_0x1d2573-0x117;const _0x49f79f=_0x49f7();let _0x4e5834=_0x49f79f[_0x1d2573];return _0x4e5834;}export async function start(_0x355b5f,_0x529c46,_0x2aec48){const _0x5df5eb=_0x495eaa,_0x366b53={'ukqbJ':function(_0x1cf83d,_0x3bbadb){return _0x1cf83d!==_0x3bbadb;},'koxfu':function(_0x3c46ac,_0x30d469){return _0x3c46ac!==_0x30d469;},'MvWmb':function(_0x46566d,_0x56a964){return _0x46566d+_0x56a964;},'cObjD':function(_0x538b2a,_0x52be04){return _0x538b2a(_0x52be04);},'bcuOD':'user','DiHsB':function(_0x3ef72c){return _0x3ef72c();},'iyyjX':'✓\x20Skipping\x20authentication\x20(--skip-auth)','TSrxV':'skipped','YKgvW':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','tdIrX':function(_0x197824,_0xa48d59){return _0x197824(_0xa48d59);},'egGQi':_0x5df5eb(0x119),'rdOAc':function(_0x372fe0,_0x4c789f,_0x3e274e){return _0x372fe0(_0x4c789f,_0x3e274e);},'aBwSM':_0x5df5eb(0x161),'kdFiC':_0x5df5eb(0x121),'tXlFl':function(_0x3a261b,_0xfb45ad){return _0x3a261b(_0xfb45ad);},'uymSh':'\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','rkDdc':'profile','BdRCU':function(_0x3ceb84,_0x4839f3){return _0x3ceb84+_0x4839f3;},'PMflN':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','spjPB':_0x5df5eb(0x125),'zRnxa':_0x5df5eb(0x157)};console[_0x5df5eb(0x168)](_0x5df5eb(0x162));_0x366b53[_0x5df5eb(0x146)](_0x529c46?.['scope'],undefined)&&_0x366b53['koxfu'](_0x529c46['scope'],'user')&&(console['error'](_0x366b53['MvWmb']('ranger\x20setup\x20--scope='+_0x366b53['cObjD'](String,_0x529c46['scope'])+_0x5df5eb(0x13b)+'Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20',_0x5df5eb(0x132))),process[_0x5df5eb(0x182)](0x1));_0x529c46={..._0x529c46,'scope':_0x366b53[_0x5df5eb(0x17a)]};const _0x5d7d44=!existsSync(_0x366b53['DiHsB'](getRangerHomeDir));await ensureRangerDir(_0x5df5eb(0x17c));if(_0x529c46?.[_0x5df5eb(0x11d)])console['log'](_0x366b53[_0x5df5eb(0x175)]),_0x2aec48?.[_0x5df5eb(0x180)](_0x5df5eb(0x17f),{'isFirstRun':_0x5d7d44,'method':_0x366b53['TSrxV']});else{_0x2aec48?.['trackPhaseStart']('auth');const _0x1b59ef=await authenticate(_0x355b5f);_0x2aec48?.['trackPhaseEnd'](_0x5df5eb(0x17f),{'isFirstRun':_0x5d7d44,'method':_0x1b59ef['method']});}_0x2aec48?.[_0x5df5eb(0x134)](_0x5df5eb(0x187));_0x529c46?.[_0x5df5eb(0x178)]?console['log'](_0x366b53[_0x5df5eb(0x16f)]):await ensureChromium(_0x529c46?.[_0x5df5eb(0x17b)]);_0x2aec48?.[_0x5df5eb(0x180)](_0x5df5eb(0x187),{'isFirstRun':_0x5d7d44,'skipped':!!_0x529c46?.['skipChromium']}),console['log']('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x113203=_0x529c46?.['scope'],_0x825adb=_0x529c46?.[_0x5df5eb(0x14e)]??![];let _0x46da60=null;_0x825adb?(_0x2aec48?.['trackPhaseStart']('plugin'),_0x46da60=await _0x366b53[_0x5df5eb(0x11b)](ensureOpencodePluginConfig,_0x113203),_0x2aec48?.['trackPhaseEnd'](_0x366b53[_0x5df5eb(0x171)],{'isFirstRun':_0x5d7d44,'opencode':!![]})):(_0x2aec48?.['trackPhaseStart'](_0x366b53[_0x5df5eb(0x171)]),await _0x366b53[_0x5df5eb(0x11b)](ensureClaudePlugin,_0x113203),_0x2aec48?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x5d7d44}));if(_0x825adb&&_0x46da60){_0x2aec48?.['trackPhaseStart']('skills');try{await _0x366b53['rdOAc'](installSkill,_0x366b53[_0x5df5eb(0x152)],{'level':_0x46da60['scope'],'cliVersion':getCurrentVersion(),'platform':'opencode'}),_0x2aec48?.['trackPhaseEnd'](_0x366b53[_0x5df5eb(0x17e)],{'isFirstRun':_0x5d7d44,'opencode':!![]});}catch(_0x43637c){console['warn'](_0x5df5eb(0x183),_0x43637c instanceof Error?_0x43637c[_0x5df5eb(0x169)]:_0x43637c),_0x2aec48?.['trackPhaseEnd'](_0x366b53['kdFiC'],{'isFirstRun':_0x5d7d44,'opencode':!![],'failed':!![]});}}else _0x2aec48?.[_0x5df5eb(0x134)](_0x366b53['kdFiC']),await _0x366b53[_0x5df5eb(0x148)](ensureClaudeSkills,_0x113203),_0x2aec48?.['trackPhaseEnd'](_0x5df5eb(0x121),{'isFirstRun':_0x5d7d44});if(_0x529c46?.[_0x5df5eb(0x11d)])console['log'](_0x366b53['uymSh']);else{if(_0x529c46?.[_0x5df5eb(0x12d)]){_0x2aec48?.[_0x5df5eb(0x134)](_0x5df5eb(0x151));const _0x486369=await ensureLocalEnv({'url':_0x529c46['url'],'force':_0x529c46?.[_0x5df5eb(0x159)],'allowInsecureLocalhost':_0x529c46?.['allowInsecureLocalhost'],'scope':_0x366b53[_0x5df5eb(0x17a)]},_0x2aec48);_0x2aec48?.[_0x5df5eb(0x180)](_0x366b53[_0x5df5eb(0x138)],{'isFirstRun':_0x5d7d44,'profileReady':_0x486369[_0x5df5eb(0x122)],'userSkipped':_0x486369['skipped']});}else console[_0x5df5eb(0x168)](_0x366b53['MvWmb'](_0x366b53['BdRCU'](_0x366b53[_0x5df5eb(0x11c)]('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+(_0x5df5eb(0x186)+_0x366b53[_0x5df5eb(0x15f)](bold,_0x5df5eb(0x170))),'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)'),'\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:'),_0x5df5eb(0x13a)));}if(_0x825adb)console['log'](_0x366b53['PMflN']),console[_0x5df5eb(0x168)](_0x366b53[_0x5df5eb(0x118)]),console['log']('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console[_0x5df5eb(0x168)](_0x366b53['zRnxa']);else{const _0x1ff80b=bold(_0x5df5eb(0x189));console['log'](_0x366b53[_0x5df5eb(0x153)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x1ff80b+_0x5df5eb(0x16e)+_0x5df5eb(0x133),_0x5df5eb(0x15c))+_0x5df5eb(0x139));}}
@@ -1 +1 @@
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
+ const _0x57321c=_0x319f;(function(_0xeda212,_0x468527){const _0x2b54ac=_0x319f,_0x4a9b5c=_0xeda212();while(!![]){try{const _0x5bcfca=parseInt(_0x2b54ac(0x1a9))/0x1+-parseInt(_0x2b54ac(0x17a))/0x2*(parseInt(_0x2b54ac(0x15a))/0x3)+parseInt(_0x2b54ac(0x1a4))/0x4+-parseInt(_0x2b54ac(0x182))/0x5*(parseInt(_0x2b54ac(0x1a5))/0x6)+-parseInt(_0x2b54ac(0x1b6))/0x7*(parseInt(_0x2b54ac(0x19d))/0x8)+-parseInt(_0x2b54ac(0x14e))/0x9+parseInt(_0x2b54ac(0x167))/0xa;if(_0x5bcfca===_0x468527)break;else _0x4a9b5c['push'](_0x4a9b5c['shift']());}catch(_0x3bb038){_0x4a9b5c['push'](_0x4a9b5c['shift']());}}}(_0x2016,0x54bfb));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{listCloudProfiles}from'./utils/cloudProfile.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x4c93fc=>_0x57321c(0x160)+_0x4c93fc+_0x57321c(0x1b0),link=(_0x51c408,_0x275487)=>'\x1b]8;;file://'+_0x51c408+'\x07'+(_0x275487||_0x51c408)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x247710=_0x57321c,_0x40d3fe={'DbOrv':'not_installed','UEYOc':_0x247710(0x18c),'dUYhV':'config','CyNVC':'ignore','TCWTk':_0x247710(0x173),'VVMws':_0x247710(0x1ba)};return new Promise(_0x474d63=>{const _0x79eedd=_0x247710,_0x245357={'ApfVB':_0x40d3fe['UEYOc'],'Iqycw':'opencode-plugin','JsQcx':function(_0x91d496,_0x9d0f09){return _0x91d496!==_0x9d0f09;},'YqaPd':function(_0x2e4ff9,_0x5205c7){return _0x2e4ff9(_0x5205c7);},'NeZqP':_0x40d3fe[_0x79eedd(0x161)],'QFSbr':function(_0x44d673,_0x9e6429){return _0x44d673(_0x9e6429);},'zSbOn':_0x79eedd(0x15e),'vQltA':'not_configured'},_0x1a49ec=spawn('opencode',[_0x79eedd(0x187),_0x40d3fe[_0x79eedd(0x14b)]],{'stdio':[_0x40d3fe[_0x79eedd(0x172)],_0x79eedd(0x14f),_0x79eedd(0x14f)]});let _0x1154c7='';_0x1a49ec[_0x79eedd(0x16a)]?.['on'](_0x40d3fe[_0x79eedd(0x152)],_0x5c7771=>{const _0xfed7d7=_0x79eedd;_0x1154c7+=_0x5c7771[_0xfed7d7(0x175)]();}),_0x1a49ec[_0x79eedd(0x193)]?.['on'](_0x79eedd(0x173),_0x38e3ef=>{_0x1154c7+=_0x38e3ef['toString']();}),_0x1a49ec['on']('error',()=>{_0x474d63({'status':_0x40d3fe['DbOrv']});}),_0x1a49ec['on'](_0x40d3fe[_0x79eedd(0x1ac)],_0x13c0d7=>{const _0x4ef0ec=_0x79eedd,_0xce9f3e={'hCyIc':_0x245357['ApfVB'],'Iganr':'@ranger-testing/opencode-plugin','ciXTv':_0x245357[_0x4ef0ec(0x192)]};if(_0x245357[_0x4ef0ec(0x19b)](_0x13c0d7,0x0)){_0x245357[_0x4ef0ec(0x151)](_0x474d63,{'status':_0x245357['NeZqP']});return;}const _0x104a33=_0x1154c7['trim']();let _0x55220c=null;if(_0x104a33)try{_0x55220c=JSON[_0x4ef0ec(0x196)](_0x104a33);}catch{const _0x4eabfb=_0x104a33['match'](/\{[\s\S]*\}$/);if(_0x4eabfb)try{_0x55220c=JSON['parse'](_0x4eabfb[0x0]);}catch{_0x55220c=null;}}const _0x5b8358=Array[_0x4ef0ec(0x166)](_0x55220c?.[_0x4ef0ec(0x188)])?_0x55220c?.[_0x4ef0ec(0x188)]:[],_0x42288f=_0x5b8358[_0x4ef0ec(0x17b)](_0x540203=>{const _0x532516=_0x4ef0ec;if(typeof _0x540203!==_0xce9f3e['hCyIc'])return![];return _0x540203[_0x532516(0x1b1)](_0xce9f3e['Iganr'])||_0x540203[_0x532516(0x1b1)](_0xce9f3e['ciXTv']);});if(_0x42288f){_0x245357['QFSbr'](_0x474d63,{'status':_0x245357[_0x4ef0ec(0x149)],'details':_0x5b8358['length']>0x0?_0x5b8358[_0x4ef0ec(0x14c)]+_0x4ef0ec(0x156):undefined});return;}if(_0x5b8358[_0x4ef0ec(0x14c)]>0x0){_0x245357[_0x4ef0ec(0x151)](_0x474d63,{'status':'not_configured','details':_0x5b8358['length']+'\x20plugin(s)\x20configured'});return;}_0x245357['YqaPd'](_0x474d63,{'status':_0x245357['vQltA']});});});}async function getSkillsFromDir(_0x589289,_0x3cb39c){const _0x26612d=_0x57321c,_0x5d77d9={'riIEP':function(_0x28b6ee,_0x287864){return _0x28b6ee(_0x287864);},'mIDlu':'SKILL.md','qrksZ':function(_0x2affab,_0x2c3889,_0x35e065){return _0x2affab(_0x2c3889,_0x35e065);},'dhCfb':_0x26612d(0x1b8)};if(!_0x5d77d9['riIEP'](existsSync,_0x589289))return[];const _0x191d45=[];try{const _0x337d48=await readdir(_0x589289,{'withFileTypes':!![]});for(const _0x3f43b5 of _0x337d48){if(_0x3f43b5[_0x26612d(0x1b9)]()){const _0x5c8ccc=join(_0x589289,_0x3f43b5[_0x26612d(0x19a)],_0x5d77d9[_0x26612d(0x169)]);if(existsSync(_0x5c8ccc)){let _0x51964d=_0x3f43b5[_0x26612d(0x19a)];try{const _0x57fa70=await _0x5d77d9['qrksZ'](readFile,_0x5c8ccc,_0x5d77d9['dhCfb']),_0x50fb13=_0x57fa70['match'](/name:\s*(.+)/);_0x50fb13&&(_0x51964d=_0x50fb13[0x1]['trim']());}catch{}_0x191d45[_0x26612d(0x158)]({'name':_0x3f43b5[_0x26612d(0x19a)],'displayName':_0x51964d,'path':_0x5c8ccc,'level':_0x3cb39c});}}}}catch{return[];}return _0x191d45;}function _0x2016(){const _0x4161ff=['\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','\x1b[0m','includes','sxRGC','\x20\x20Active:\x20','has','join','2174445BTnyOx','@ranger-testing/opencode-plugin','utf-8','isDirectory','close','zSbOn','settingsPath','dUYhV','length','vwCcL','152676vcIuuX','pipe','\x0a📊\x20Ranger\x20Status\x0a','YqaPd','TCWTk','scope','EoVoE','\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)','\x20plugin(s)\x20configured','\x20\x20Run:\x20ranger\x20skillup','push','tzZVy','15tmyYDG','WYgnz','auth.json.enc','FdOib','configured','QLAnF','\x1b[1m','DbOrv','\x20\x20Project-level:','unknown','none','log','isArray','3703070htkctJ','\x0a---\x20Claude\x20Code\x20Plugin\x20---','mIDlu','stdout','success','No\x20skills\x20installed','env','Organization:\x20','settings.json','displayName','disabled','CyNVC','data','IuCjl','toString','twfeA','\x20\x20Run:\x20ranger\x20setup\x20[token]','enabled','LJIBa','166438XbpbrK','some','ynCph','plaintext','details','\x20\x20\x20\x20Session:\x20','project','fdaDS','11345VAKErB','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','glFOx','lrMZV','RDAlh','debug','plugin','hasPlaintextAuth','cached\x20(updated\x20','rMqJs','string','rEvgj','rXbTt','Version:\x20','map','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','Iqycw','stderr','\x20\x20\x20\x20','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','parse','\x20(active)','\x20\x20Run:\x20ranger\x20update','\x20[cloud]','name','JsQcx','\x0a---\x20Profiles\x20---','8SuXEPk',':\x20installed\x20(','path','version','(not\x20found)','VfNsm','DEBUG','1835388NmcTdI','498EzFraT',':\x20configured','no\x20session','QsOnU','449998nEqDiZ','MUkOT','sessionUpdatedAt','VVMws','\x20\x20Not\x20configured','jpduX'];_0x2016=function(){return _0x4161ff;};return _0x2016();}function _0x319f(_0x1ffeb2,_0x6f4d50){_0x1ffeb2=_0x1ffeb2-0x149;const _0x20162f=_0x2016();let _0x319fd7=_0x20162f[_0x1ffeb2];return _0x319fd7;}async function getInstalledSkills(){const _0x356b08=_0x57321c,_0x530495={'rXbTt':function(_0x23e9db,_0x1a081f,_0x276f1c){return _0x23e9db(_0x1a081f,_0x276f1c);},'cUKMr':function(_0x386ebc){return _0x386ebc();},'RDAlh':_0x356b08(0x180)},[_0x42cd4c,_0x152064]=await Promise['all']([_0x530495[_0x356b08(0x18e)](getSkillsFromDir,_0x530495['cUKMr'](getProjectSkillsDir),_0x530495[_0x356b08(0x186)]),_0x530495[_0x356b08(0x18e)](getSkillsFromDir,getUserSkillsDir(),'user')]);return{'project':_0x42cd4c,'user':_0x152064};}async function getEnvironments(){const _0x1e1ee7=_0x57321c,_0x5c9145={'YjJvg':function(_0x5e0fb0,_0x30700c){return _0x5e0fb0(_0x30700c);},'XsRZM':function(_0x502f83,_0x114cc8,_0x14a798){return _0x502f83(_0x114cc8,_0x14a798);},'SHXdU':_0x1e1ee7(0x16f),'twfeA':'auth.json','rMqJs':function(_0x373bea,_0x222f5d){return _0x373bea(_0x222f5d);},'sxRGC':_0x1e1ee7(0x1a1),'RAUyx':function(_0x543050){return _0x543050();},'YDVvx':function(_0x26ccbd){return _0x26ccbd();}},{envNames:_0x3fae65,activeEnv:_0x45e024}=await _0x5c9145['RAUyx'](getEnvNames),_0x472b8b=_0x5c9145['YDVvx'](getRangerDir);if(!existsSync(_0x472b8b))return{'envs':[],'activeEnv':null};const _0x26436c=_0x3fae65[_0x1e1ee7(0x190)](_0x1fc3ec=>{const _0x1f1fd4=_0x1e1ee7,_0x3e15d8=_0x5c9145['YjJvg'](getEnvDir,_0x1fc3ec),_0x609caf=_0x5c9145['XsRZM'](join,_0x3e15d8,_0x5c9145['SHXdU']),_0x481e4e=join(_0x3e15d8,_0x5c9145[_0x1f1fd4(0x176)]),_0x313895=join(_0x3e15d8,_0x1f1fd4(0x15c));return{'name':_0x1fc3ec,'settingsPath':_0x5c9145['rMqJs'](existsSync,_0x609caf)?_0x609caf:_0x5c9145[_0x1f1fd4(0x1b2)],'hasPlaintextAuth':existsSync(_0x481e4e),'hasEncryptedAuth':_0x5c9145[_0x1f1fd4(0x18b)](existsSync,_0x313895),'isActive':_0x1fc3ec===_0x45e024};});return{'envs':_0x26436c,'activeEnv':_0x45e024};}export async function status(){const _0x55fda6=_0x57321c,_0x591b54={'tzZVy':_0x55fda6(0x150),'QLAnF':function(_0x55f0ce,_0x4e08f1){return _0x55f0ce(_0x4e08f1);},'aYkfz':function(_0x174fac,_0x4e1a10,_0x1bbd5a){return _0x174fac(_0x4e1a10,_0x1bbd5a);},'IuCjl':function(_0x752c5b,_0x550de5){return _0x752c5b(_0x550de5);},'rEvgj':function(_0x3019c4){return _0x3019c4();},'YnmPY':function(_0x3dea20){return _0x3dea20();},'vwCcL':function(_0x2c7816,_0x42a11d){return _0x2c7816(_0x42a11d);},'AXtop':_0x55fda6(0x15e),'lrMZV':function(_0x8aa4aa,_0x2e322d){return _0x8aa4aa===_0x2e322d;},'MUkOT':'not_configured','KdEzL':_0x55fda6(0x1ad),'VfNsm':function(_0x13daad,_0x3d8ebe){return _0x13daad(_0x3d8ebe);},'UcEvu':_0x55fda6(0x163),'glFOx':_0x55fda6(0x178),'kTkQL':_0x55fda6(0x171),'cPqBS':function(_0x3cc8e8,_0x3c7cf8){return _0x3cc8e8(_0x3c7cf8);},'Abrwp':'ranger@trailhead','WYgnz':'\x0a---\x20Skills\x20---','fdaDS':function(_0x336cbb){return _0x336cbb();},'QsOnU':function(_0x10c704,_0x23dd34){return _0x10c704+_0x23dd34;},'UCnbF':'\x20\x20User-level:','EoVoE':function(_0x4bfabd,_0x4c6305){return _0x4bfabd(_0x4c6305);},'TRaBI':_0x55fda6(0x19c),'FAlnt':function(_0x1727ad,_0x40206d){return _0x1727ad>_0x40206d;},'jpduX':function(_0x1eebee,_0x44da6a){return _0x1eebee>_0x44da6a;},'EBvJx':function(_0x150214,_0x47c57a){return _0x150214===_0x47c57a;},'FdOib':_0x55fda6(0x197),'ynCph':function(_0x1a4cb8,_0x1807d0){return _0x1a4cb8(_0x1807d0);},'LJIBa':_0x55fda6(0x1a7),'KdCyy':'encrypted','QJDXL':function(_0x2101fe,_0x21e074){return _0x2101fe!==_0x21e074;},'AIAeu':function(_0xe7c1f1,_0x14da02,_0x537d69){return _0xe7c1f1(_0x14da02,_0x537d69);}};console['log'](_0x591b54[_0x55fda6(0x159)]);const _0x2e9407=process['cwd'](),_0x10c73a=getRangerDir();if(!_0x591b54[_0x55fda6(0x15f)](existsSync,_0x10c73a)){console[_0x55fda6(0x165)]('Root:\x20'+_0x591b54['aYkfz'](link,_0x2e9407,_0x591b54['QLAnF'](bold,_0x591b54[_0x55fda6(0x174)](basename,_0x2e9407)))),console[_0x55fda6(0x165)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x55fda6(0x165)]('Root:\x20'+link(_0x2e9407,bold(_0x591b54['IuCjl'](basename,_0x2e9407))));const _0x99d13a=_0x591b54[_0x55fda6(0x18d)](getCurrentVersion),_0x41ea09=_0x591b54['YnmPY'](getLatestVersion);if(_0x41ea09[_0x55fda6(0x1a0)]&&_0x41ea09[_0x55fda6(0x1a0)]!==_0x99d13a)console['log'](_0x55fda6(0x18f)+_0x99d13a+'\x20(latest:\x20'+_0x41ea09['version']+')'),console[_0x55fda6(0x165)](_0x55fda6(0x198));else _0x41ea09['version']?console[_0x55fda6(0x165)]('Version:\x20'+_0x99d13a+'\x20(up\x20to\x20date)'):console['log'](_0x55fda6(0x18f)+_0x99d13a);const _0x53b499=await getToken();if(_0x53b499){const _0x26f69d=await _0x591b54[_0x55fda6(0x14d)](getCurrentUser,_0x53b499);_0x26f69d[_0x55fda6(0x16b)]?console[_0x55fda6(0x165)](_0x55fda6(0x16e)+bold(_0x26f69d['user']['organizationName'])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x55fda6(0x165)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x55fda6(0x165)]('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x55fda6(0x177));process[_0x55fda6(0x16d)][_0x55fda6(0x1a3)]&&(console[_0x55fda6(0x165)]('API\x20Environment:\x20'+_0x591b54['YnmPY'](getCurrentEnvironment)),console[_0x55fda6(0x165)]('API\x20URL:\x20'+getApiBaseUrl()));console[_0x55fda6(0x165)]('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x21a4a4=await _0x591b54[_0x55fda6(0x18d)](getOpencodePluginStatus);if(_0x21a4a4['status']===_0x591b54['AXtop'])console['log']('\x20\x20'+_0x591b54[_0x55fda6(0x15f)](bold,_0x55fda6(0x1b7))+_0x55fda6(0x1a6)),_0x21a4a4['details']&&console[_0x55fda6(0x165)]('\x20\x20'+_0x21a4a4[_0x55fda6(0x17e)]);else _0x591b54['lrMZV'](_0x21a4a4['status'],_0x591b54[_0x55fda6(0x1aa)])?(console[_0x55fda6(0x165)](_0x591b54['KdEzL']),_0x21a4a4['details']&&console['log']('\x20\x20'+_0x21a4a4[_0x55fda6(0x17e)]),console['log']('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console[_0x55fda6(0x165)](_0x55fda6(0x1af));console['log'](_0x55fda6(0x168));const _0x277245=await _0x591b54[_0x55fda6(0x1a2)](getPluginInfo,'ranger@trailhead');if(_0x277245){const _0x7067b8=_0x277245[_0x55fda6(0x153)]||_0x591b54['UcEvu'],_0x338efd=_0x277245[_0x55fda6(0x178)]?_0x591b54[_0x55fda6(0x184)]:_0x591b54['kTkQL'];console['log']('\x20\x20'+_0x591b54['cPqBS'](bold,_0x591b54['Abrwp'])+_0x55fda6(0x19e)+_0x7067b8+',\x20'+_0x338efd+')');}else console[_0x55fda6(0x165)]('\x20\x20Not\x20installed'),console[_0x55fda6(0x165)](_0x55fda6(0x183));console[_0x55fda6(0x165)](_0x591b54[_0x55fda6(0x15b)]);const {project:_0x529193,user:_0x570af5}=await _0x591b54[_0x55fda6(0x181)](getInstalledSkills),_0x712a0=_0x529193['filter'](_0x17d3f0=>RANGER_MANAGED_SKILLS['includes'](_0x17d3f0['name'])),_0x16d125=_0x570af5['filter'](_0x7cd5cf=>RANGER_MANAGED_SKILLS['includes'](_0x7cd5cf['name'])),_0x4811a6=_0x591b54[_0x55fda6(0x1a8)](_0x712a0['length'],_0x16d125['length']);if(_0x591b54['lrMZV'](_0x4811a6,0x0))console[_0x55fda6(0x165)](_0x55fda6(0x16c)),console[_0x55fda6(0x165)](_0x55fda6(0x157));else{if(_0x712a0[_0x55fda6(0x14c)]>0x0){console['log'](_0x55fda6(0x162));for(const _0x262572 of _0x712a0){console[_0x55fda6(0x165)](_0x55fda6(0x194)+_0x591b54[_0x55fda6(0x14d)](bold,_0x262572[_0x55fda6(0x170)])+':\x20'+link(_0x262572[_0x55fda6(0x19f)],basename(_0x262572[_0x55fda6(0x19f)])));}}if(_0x16d125['length']>0x0){console['log'](_0x591b54['UCnbF']);for(const _0x86ffbd of _0x16d125){console[_0x55fda6(0x165)](_0x55fda6(0x194)+bold(_0x86ffbd['displayName'])+':\x20'+link(_0x86ffbd['path'],_0x591b54[_0x55fda6(0x154)](basename,_0x86ffbd['path'])));}}}console['log'](_0x591b54['TRaBI']);const {envs:_0x571703,activeEnv:_0x1c785e}=await getEnvironments();let _0x5d4d68=[];if(_0x53b499)try{_0x5d4d68=await listCloudProfiles();}catch{}const _0x21490a=_0x591b54['QsOnU'](_0x571703[_0x55fda6(0x14c)],_0x5d4d68['length']);if(_0x591b54[_0x55fda6(0x185)](_0x21490a,0x0))console[_0x55fda6(0x165)]('No\x20profiles\x20configured'),console['log'](_0x55fda6(0x191));else{if(_0x591b54['FAlnt'](_0x21490a,0x5)){const _0x5fb437=[];_0x5d4d68[_0x55fda6(0x14c)]>0x0&&_0x5fb437['push'](_0x5d4d68[_0x55fda6(0x14c)]+'\x20cloud'),_0x591b54[_0x55fda6(0x1ae)](_0x571703[_0x55fda6(0x14c)],0x0)&&_0x5fb437['push'](_0x571703['length']+'\x20local'),console['log'](_0x21490a+'\x20profiles\x20configured\x20('+_0x5fb437[_0x55fda6(0x1b5)](',\x20')+')'),_0x1c785e&&console['log'](_0x55fda6(0x1b3)+bold(_0x1c785e)),console['log'](_0x55fda6(0x155));}else{for(const _0x441176 of _0x5d4d68){const _0x1eafb8=_0x591b54['EBvJx'](_0x441176[_0x55fda6(0x19a)],_0x1c785e)?_0x591b54[_0x55fda6(0x15d)]:'';console['log']('\x20\x20'+_0x591b54[_0x55fda6(0x17c)](bold,_0x441176['name'])+_0x55fda6(0x199)+_0x1eafb8);const _0x1290d0=_0x441176[_0x55fda6(0x1ab)]?_0x55fda6(0x18a)+_0x441176['sessionUpdatedAt']+')':_0x591b54[_0x55fda6(0x179)];console['log'](_0x55fda6(0x17f)+_0x1290d0);}const _0x41c059=new Set(_0x5d4d68['map'](_0x4b46d8=>_0x4b46d8[_0x55fda6(0x19a)]));for(const _0x3362fa of _0x571703){if(_0x41c059[_0x55fda6(0x1b4)](_0x3362fa[_0x55fda6(0x19a)]))continue;const _0x1cd9f5=_0x3362fa['isActive']?'\x20(active)':'',_0x251da9=_0x3362fa['hasEncryptedAuth']?_0x591b54['KdCyy']:_0x3362fa[_0x55fda6(0x189)]?_0x55fda6(0x17d):_0x55fda6(0x164);console['log']('\x20\x20'+bold(_0x3362fa[_0x55fda6(0x19a)])+'\x20[local]'+_0x1cd9f5),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x251da9),_0x591b54['QJDXL'](_0x3362fa[_0x55fda6(0x14a)],_0x55fda6(0x1a1))&&console['log']('\x20\x20\x20\x20Settings:\x20'+_0x591b54['AIAeu'](link,_0x3362fa['settingsPath'],basename(_0x3362fa[_0x55fda6(0x14a)])));}if(!_0x1c785e){console[_0x55fda6(0x165)]('\x0a\x20\x20No\x20active\x20profile\x20set');const _0x9769d7=[..._0x5d4d68[_0x55fda6(0x190)](_0x58a840=>_0x58a840[_0x55fda6(0x19a)]),..._0x571703['filter'](_0x122bd5=>!_0x41c059[_0x55fda6(0x1b4)](_0x122bd5['name']))['map'](_0x7652be=>_0x7652be[_0x55fda6(0x19a)])];console[_0x55fda6(0x165)](_0x55fda6(0x195)+_0x9769d7[_0x55fda6(0x1b5)](',\x20')+')');}}}console['log']('');}
@@ -1 +1 @@
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
+ function _0x3b7b(_0x28f598,_0x447491){_0x28f598=_0x28f598-0x98;const _0x13a787=_0x13a7();let _0x3b7b5c=_0x13a787[_0x28f598];return _0x3b7b5c;}const _0x51e7db=_0x3b7b;(function(_0x29ff7a,_0x34ea2d){const _0x5c0f9b=_0x3b7b,_0x3891c6=_0x29ff7a();while(!![]){try{const _0x23a415=parseInt(_0x5c0f9b(0xa5))/0x1*(-parseInt(_0x5c0f9b(0xa8))/0x2)+parseInt(_0x5c0f9b(0xe2))/0x3*(-parseInt(_0x5c0f9b(0xa0))/0x4)+parseInt(_0x5c0f9b(0xca))/0x5*(-parseInt(_0x5c0f9b(0xbf))/0x6)+parseInt(_0x5c0f9b(0x9f))/0x7+-parseInt(_0x5c0f9b(0xd4))/0x8*(parseInt(_0x5c0f9b(0xbc))/0x9)+parseInt(_0x5c0f9b(0xe9))/0xa+parseInt(_0x5c0f9b(0xb4))/0xb;if(_0x23a415===_0x34ea2d)break;else _0x3891c6['push'](_0x3891c6['shift']());}catch(_0x3dda0a){_0x3891c6['push'](_0x3891c6['shift']());}}}(_0x13a7,0x2b2bc));function _0x13a7(){const _0x43f6a5=['trailhead',').\x20Staying\x20on\x20','Prerelease\x20channel\x20detected\x20(@','version','\x0a✅\x20Update\x20complete!','error','some','lBeWy','length','eItxq','active-profile.txt','\x0aCurrent\x20version:\x20','1152879uoCgTd','4OAhbfx','...\x0a','EFbiU','ignore','endsWith','1scntvR','hixAx','utf-8','353074vopvNh','kSqyw','project','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','smwmd','\x0aYour\x20version\x20(','test','xTeER','\x0aInstalling\x20','YNAnF','BqBmK','install','6775142dvvzWl','alpha','SYrja','\x0aSuccessfully\x20installed\x20','ROQDJ','log','scope','\x0aSuccessfully\x20updated\x20to\x20version\x20','747EHrJst','--scope','findIndex','6HOZivm','platform','win32','plugin','\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','xxijS','RnXWi','\x20—\x20reinstalling\x20@','stdio','unref','marketplace','1053455XHIDLA','local','yGGyz','Attempting\x20install\x20anyway...','push','active-feature.txt','IHulc','rdscN','warn','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','26008niKyhu','Latest\x20version:\x20\x20','claude','npm','ppkUn','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','DEnCW','Update\x20failed\x20for\x20@','close','\x20\x20Failed\x20to\x20reinstall\x20','pQFKP','bHOoi','inherit','330294DbagSY','qjWXM','\x20channel.','Grwzy','trim','latest','\x20skill\x20','1633680wIZJWy','KUGXg','user'];_0x13a7=function(){return _0x43f6a5;};return _0x13a7();}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';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x105014,_0x3eaacf,_0x3e8711){const _0x40fdea=_0x3b7b,_0x13cdd0={'OplMt':function(_0x4294a0,_0x3408a7){return _0x4294a0(_0x3408a7);},'ppkUn':function(_0x4bec97,_0x30d76b){return _0x4bec97===_0x30d76b;},'DqgJy':function(_0x468daf,_0x6e4c7d,_0x3baafb,_0xa20395){return _0x468daf(_0x6e4c7d,_0x3baafb,_0xa20395);},'wANnN':_0x40fdea(0xa3),'IHulc':_0x40fdea(0xe1),'ROQDJ':function(_0x5df3b9,_0xb182b1,_0x512414){return _0x5df3b9(_0xb182b1,_0x512414);}};return new Promise(_0x1bf0e6=>{const _0x249a5f=_0x40fdea,_0x33bad4={'xTeER':function(_0x2ccc6a,_0x1e52c4){return _0x2ccc6a(_0x1e52c4);},'xYYop':function(_0x17a289,_0x7c0ba8){return _0x13cdd0['OplMt'](_0x17a289,_0x7c0ba8);},'VKJcK':function(_0x5e61fe,_0x3080f8){const _0x23570b=_0x3b7b;return _0x13cdd0[_0x23570b(0xd8)](_0x5e61fe,_0x3080f8);}};let _0xa7711c=![],_0x181ccf;const _0x9a4e06=_0x49cf9a=>{const _0x4bd126=_0x3b7b;if(_0xa7711c)return;_0xa7711c=!![],_0x181ccf&&_0x33bad4[_0x4bd126(0xaf)](clearTimeout,_0x181ccf),_0x33bad4['xYYop'](_0x1bf0e6,_0x49cf9a);},_0x45e6cd=_0x13cdd0['DqgJy'](spawn,_0x105014,_0x3eaacf,{'stdio':[_0x13cdd0['wANnN'],_0x3e8711?.[_0x249a5f(0xc7)]??'inherit',_0x3e8711?.['stdio']??_0x13cdd0[_0x249a5f(0xd0)]],'cwd':_0x3e8711?.['cwd'],'shell':process[_0x249a5f(0xc0)]==='win32'});_0x181ccf=_0x3e8711?.['timeoutMs']?_0x13cdd0[_0x249a5f(0xb8)](setTimeout,()=>{const _0xe12c54=_0x249a5f;_0x45e6cd['kill'](),_0x45e6cd[_0xe12c54(0xc8)](),_0x13cdd0['OplMt'](_0x9a4e06,![]);},_0x3e8711['timeoutMs']):undefined,_0x45e6cd['on'](_0x249a5f(0xdd),_0x189ed5=>{_0x9a4e06(_0x33bad4['VKJcK'](_0x189ed5,0x0));}),_0x45e6cd['on']('error',()=>{_0x13cdd0['OplMt'](_0x9a4e06,![]);});});}export function resolveDistTag(_0x519a79){const _0xab5b5f=_0x3b7b,_0x3134e1={'eeEZP':'beta'};if(/-alpha\./i[_0xab5b5f(0xae)](_0x519a79))return _0xab5b5f(0xb5);if(/-beta\./i['test'](_0x519a79))return _0x3134e1['eeEZP'];if(/-rc\./i['test'](_0x519a79))return'rc';return _0xab5b5f(0xe7);}async function runInstall(_0x23600e=_0x51e7db(0xe7)){const _0x59ff15=_0x51e7db,_0x28286b={'bHOoi':_0x59ff15(0xd7),'qjWXM':_0x59ff15(0xe1),'ZltnD':_0x59ff15(0x98)};return new Promise(_0x5019ce=>{const _0x1afbd5=_0x59ff15;console['log'](_0x1afbd5(0xb0)+PACKAGE_NAME+'@'+_0x23600e+_0x1afbd5(0xa1));const _0x467659=spawn(_0x28286b[_0x1afbd5(0xe0)],[_0x1afbd5(0xb3),'-g',PACKAGE_NAME+'@'+_0x23600e],{'stdio':['ignore',_0x28286b['qjWXM'],_0x28286b[_0x1afbd5(0xe3)]],'shell':process['platform']===_0x1afbd5(0xc1)});_0x467659['on'](_0x1afbd5(0xdd),_0x26e627=>{_0x5019ce(_0x26e627===0x0);}),_0x467659['on'](_0x28286b['ZltnD'],()=>{_0x5019ce(![]);});});}async function updateClaudeMarketplace(){const _0x47bc72=_0x51e7db,_0x317daf={'yGGyz':function(_0x192fca,_0x430b9c,_0x59c7ff,_0x5a7e39){return _0x192fca(_0x430b9c,_0x59c7ff,_0x5a7e39);},'wyAdP':'claude','wzGYF':'plugin','bGJmR':_0x47bc72(0xc9),'TYrbU':'update'},_0x3bd61d=await _0x317daf[_0x47bc72(0xcc)](runCommand,_0x317daf['wyAdP'],[_0x317daf['wzGYF'],_0x317daf['bGJmR'],_0x317daf['TYrbU'],'trailhead'],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x3bd61d)throw new Error('Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}async function updateClaudePlugin(_0x3300a2=_0x51e7db(0xeb)){const _0x20cf15=_0x51e7db,_0x49c268={'pQFKP':'ranger@trailhead','PiEXW':_0x20cf15(0xeb),'KUGXg':_0x20cf15(0xbd),'smwmd':function(_0x148bc6,_0x5d3eab,_0x1ebf81,_0x3f0edb){return _0x148bc6(_0x5d3eab,_0x1ebf81,_0x3f0edb);},'EFbiU':'project'},_0x827df5=[_0x20cf15(0xc2),'update',_0x49c268[_0x20cf15(0xdf)]];_0x3300a2!==_0x49c268['PiEXW']&&_0x827df5['push'](_0x49c268[_0x20cf15(0xea)],_0x3300a2);const _0x4df3ce=await _0x49c268[_0x20cf15(0xac)](runCommand,_0x20cf15(0xd6),_0x827df5,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x3300a2===_0x49c268[_0x20cf15(0xa2)]||_0x3300a2===_0x20cf15(0xcb)?getProjectRoot():undefined});if(!_0x4df3ce)throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x3300a2+_0x20cf15(0xda));}function isSkillInstalled(_0x2a0d88,_0x336a3d,_0x580b4f){const _0x32af98={'cYdmv':function(_0x4a0824,_0x1695ee){return _0x4a0824(_0x1695ee);}},_0x5927f4=_0x580b4f==='opencode'?_0x32af98['cYdmv'](getOpencodeSkillsDir,_0x336a3d):getSkillsDir(_0x336a3d),_0x55788f=join(_0x5927f4,_0x2a0d88);return existsSync(_0x55788f);}async function reinstallSkills(_0x523eb1){const _0xefa98f=_0x51e7db,_0x2d1338={'WpKZx':function(_0x38e273,_0x7da76b,_0x56006d,_0x5a9dee){return _0x38e273(_0x7da76b,_0x56006d,_0x5a9dee);},'rdscN':_0xefa98f(0xd6),'BqBmK':function(_0x586e23,_0x372593,_0x37b569,_0x10ee1d){return _0x586e23(_0x372593,_0x37b569,_0x10ee1d);},'qKEJN':'opencode','IopBX':function(_0x584d0c,_0x130968,_0x5b59af){return _0x584d0c(_0x130968,_0x5b59af);},'hoOqz':function(_0xacd083,_0x539482){return _0xacd083===_0x539482;},'DAoEW':function(_0x23bc4c,_0x4cc151,_0x13a6da){return _0x23bc4c(_0x4cc151,_0x13a6da);}},_0x5002b5=['project',_0xefa98f(0xeb)],_0x13cee2=[];for(const _0x4cf1d7 of _0x5002b5){for(const _0x2347aa of RANGER_MANAGED_SKILLS){_0x2d1338['WpKZx'](isSkillInstalled,_0x2347aa,_0x4cf1d7,_0x2d1338[_0xefa98f(0xd1)])&&_0x13cee2[_0xefa98f(0xce)]({'skillName':_0x2347aa,'level':_0x4cf1d7,'platform':_0x2d1338[_0xefa98f(0xd1)]}),_0x2d1338[_0xefa98f(0xb2)](isSkillInstalled,_0x2347aa,_0x4cf1d7,_0x2d1338['qKEJN'])&&_0x13cee2['push']({'skillName':_0x2347aa,'level':_0x4cf1d7,'platform':_0x2d1338['qKEJN']});}}for(const _0x43aa36 of _0x5002b5){for(const _0x3d6457 of DEPRECATED_SKILLS){await _0x2d1338['IopBX'](removeSkill,_0x3d6457,_0x43aa36);}}if(_0x2d1338['hoOqz'](_0x13cee2['length'],0x0)){console[_0xefa98f(0xb9)](_0xefa98f(0xd9));return;}console[_0xefa98f(0xb9)]('\x0aReinstalling\x20'+_0x13cee2[_0xefa98f(0x9b)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x1c3ceb,level:_0x2c5096,platform:_0x38f9f6}of _0x13cee2){try{await _0x2d1338['DAoEW'](installSkill,_0x1c3ceb,{'level':_0x2c5096,'cliVersion':_0x523eb1,'platform':_0x38f9f6});}catch(_0x1744d0){console['warn'](_0xefa98f(0xde)+_0x38f9f6+'\x20'+_0x2c5096+_0xefa98f(0xe8)+_0x1c3ceb+':',_0x1744d0);}}}async function ensureActiveProfileGitignored(){const _0x198084=_0x51e7db,_0x2ffb11={'kSqyw':'.gitignore','kShmh':function(_0x34e984,_0x44af3b){return _0x34e984(_0x44af3b);},'SYrja':_0x198084(0xa7),'EizOd':function(_0x4c7588,_0x913624){return _0x4c7588===_0x913624;}},_0x4a1e90=join(getRangerDir(),_0x2ffb11[_0x198084(0xa9)]);if(!_0x2ffb11['kShmh'](existsSync,_0x4a1e90))return![];let _0x1542ce='';try{_0x1542ce=await readFile(_0x4a1e90,_0x2ffb11[_0x198084(0xb6)]);}catch{return![];}const _0x1e89a3=_0x1542ce['split'](/\r?\n/);if(_0x1e89a3[_0x198084(0x99)](_0x3f31a0=>_0x3f31a0[_0x198084(0xe6)]()==='active-profile.txt'))return![];let _0x245be1=_0x1e89a3[_0x198084(0xbe)](_0x21a5fb=>_0x21a5fb[_0x198084(0xe6)]()===_0x198084(0xcf));_0x2ffb11['EizOd'](_0x245be1,-0x1)&&(_0x245be1=_0x1e89a3['length']);_0x1e89a3['splice'](_0x245be1,0x0,_0x198084(0x9d));let _0x5dfecd=_0x1e89a3['join']('\x0a');!_0x5dfecd[_0x198084(0xa4)]('\x0a')&&(_0x5dfecd+='\x0a');try{await writeFile(_0x4a1e90,_0x5dfecd,_0x2ffb11['SYrja']);}catch{return![];}return!![];}export async function update(){const _0x491bba=_0x51e7db,_0x3d8364={'qWyxh':function(_0x167cce){return _0x167cce();},'FSEdl':function(_0x2699c5,_0x482ee4){return _0x2699c5!==_0x482ee4;},'hPkXG':_0x491bba(0xe7),'Grwzy':function(_0x5ebf16,_0x536947){return _0x5ebf16(_0x536947);},'xxijS':function(_0x32dc1c){return _0x32dc1c();},'VRlZY':'Checking\x20for\x20updates...','lBeWy':function(_0x40b036){return _0x40b036();},'yDOCz':'\x0aSuccessfully\x20installed\x20latest\x20version.','YNAnF':function(_0x1df6f9){return _0x1df6f9();},'PSwEd':function(_0x5b74c8,_0x542f50){return _0x5b74c8<_0x542f50;},'FQIaw':'Update\x20failed.','DEnCW':function(_0x28a5f5,_0x30afc1){return _0x28a5f5(_0x30afc1);},'RnXWi':'ranger@trailhead','eItxq':'\x0aClaude\x20marketplace\x20updated\x20(trailhead).','kCgEb':function(_0xf522cb,_0x265493){return _0xf522cb(_0x265493);},'zlahN':'local','GYSJz':_0x491bba(0xc3),'hixAx':function(_0x15a282){return _0x15a282();}},_0x2f643f=_0x3d8364['qWyxh'](getCurrentVersion);console['log'](_0x491bba(0x9e)+_0x2f643f);const _0x561845=resolveDistTag(_0x2f643f);if(_0x3d8364['FSEdl'](_0x561845,_0x3d8364['hPkXG'])){console['log'](_0x491bba(0xee)+_0x561845+_0x491bba(0xed)+_0x561845+_0x491bba(0xc6)+_0x561845+'...');const _0x456826=await _0x3d8364['Grwzy'](runInstall,_0x561845);if(!_0x456826)throw new Error(_0x491bba(0xdc)+_0x561845+_0x491bba(0xe4));const _0xca43bd=_0x3d8364[_0x491bba(0xc4)](getCurrentVersion);console['log'](_0x491bba(0xb7)+PACKAGE_NAME+'@'+_0x561845+'.'),await _0x3d8364[_0x491bba(0xe5)](reinstallSkills,_0xca43bd),await ensureActiveProfileGitignored(),console[_0x491bba(0xb9)](_0x491bba(0xf0));return;}console[_0x491bba(0xb9)](_0x3d8364['VRlZY']);const _0x3c7e41=getLatestVersion();let _0xc85111=_0x2f643f;if(!_0x3c7e41['version']){console[_0x491bba(0xd2)]('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x3c7e41['error']),console['log'](_0x491bba(0xcd));const _0x5da2d8=await _0x3d8364['lBeWy'](runInstall);if(_0x5da2d8)console[_0x491bba(0xb9)](_0x3d8364['yDOCz']),_0xc85111=_0x3d8364[_0x491bba(0xb1)](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x3c7e41[_0x491bba(0x98)]);}else{const _0x4e02d1=_0x3c7e41[_0x491bba(0xef)];console['log'](_0x491bba(0xd5)+_0x4e02d1);const _0x4c5889=compareVersions(_0x2f643f,_0x4e02d1);if(_0x4c5889===0x0)console[_0x491bba(0xb9)]('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x3d8364['PSwEd'](_0x4c5889,0x0))console['log'](_0x491bba(0xad)+_0x2f643f+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x4e02d1+').');else{const _0x3979b2=await _0x3d8364[_0x491bba(0x9a)](runInstall);if(_0x3979b2)console[_0x491bba(0xb9)](_0x491bba(0xbb)+_0x4e02d1),_0xc85111=_0x4e02d1;else throw new Error(_0x3d8364['FQIaw']);}}}await reinstallSkills(_0xc85111);const _0x4a82ea=await _0x3d8364[_0x491bba(0xdb)](isMarketplaceAdded,_0x491bba(0xec)),_0x301810=await isPluginInstalled(_0x3d8364['RnXWi']);_0x4a82ea&&(await updateClaudeMarketplace(),console['log'](_0x3d8364[_0x491bba(0x9c)]));if(_0x301810){const _0x5d65ea=await getPluginInfo(_0x3d8364[_0x491bba(0xc5)]),_0x3755fe=_0x5d65ea?.[_0x491bba(0xba)]??_0x491bba(0xeb);await _0x3d8364['kCgEb'](updateClaudePlugin,_0x3755fe);if(_0x3755fe===_0x491bba(0xaa))console[_0x491bba(0xb9)](_0x491bba(0xd3));else _0x3755fe===_0x3d8364['zlahN']?console[_0x491bba(0xb9)](_0x3d8364['GYSJz']):console['log'](_0x491bba(0xab));}const _0x4c17e4=await _0x3d8364[_0x491bba(0xa6)](ensureActiveProfileGitignored);console[_0x491bba(0xb9)]('\x0a✅\x20Update\x20complete!');}
@@ -1 +1 @@
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
+ (function(_0x313351,_0xaee060){const _0x20e114=_0x286f,_0x1fb65e=_0x313351();while(!![]){try{const _0x1091e1=parseInt(_0x20e114(0x15d))/0x1*(-parseInt(_0x20e114(0x153))/0x2)+-parseInt(_0x20e114(0x14c))/0x3+-parseInt(_0x20e114(0x162))/0x4*(parseInt(_0x20e114(0x155))/0x5)+-parseInt(_0x20e114(0x161))/0x6*(parseInt(_0x20e114(0x145))/0x7)+parseInt(_0x20e114(0x152))/0x8+parseInt(_0x20e114(0x147))/0x9+parseInt(_0x20e114(0x148))/0xa*(parseInt(_0x20e114(0x14d))/0xb);if(_0x1091e1===_0xaee060)break;else _0x1fb65e['push'](_0x1fb65e['shift']());}catch(_0x26a2c4){_0x1fb65e['push'](_0x1fb65e['shift']());}}}(_0x852d,0x8fa2d));import{fetchAuthConfig,fetchCloudProfile,manualBrowserLogin,serverSideLogin}from'./utils/cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{getEnvNames}from'./env.js';export async function updateEnv(_0x1f5bd7,_0x165f6e,_0x368bf4){const _0x1c887e=_0x286f,_0xc35932={'IvcSj':function(_0xede9){return _0xede9();},'zGHTm':'legacy','qdquk':function(_0x22e8f7,_0x5b2533){return _0x22e8f7===_0x5b2533;},'BDxhw':function(_0x439a65){return _0x439a65();},'QfYoE':function(_0x62730a,_0x3662d0,_0x11188a){return _0x62730a(_0x3662d0,_0x11188a);},'JBgIO':function(_0x43f4b8,_0x4a6acf,_0x12df08){return _0x43f4b8(_0x4a6acf,_0x12df08);},'OnYPH':_0x1c887e(0x15e),'jhAJg':function(_0x15a1f6,_0x45e46c){return _0x15a1f6 instanceof _0x45e46c;},'WGFKW':function(_0x328b6a,_0x30c4da){return _0x328b6a+_0x30c4da;}},_0x195f32=await fetchCloudProfile(_0x1f5bd7);if(!_0x195f32){const {envTypes:_0x443a66}=await _0xc35932['IvcSj'](getEnvNames),_0x51abeb=_0x443a66[_0x1f5bd7];(_0x51abeb===_0xc35932['zGHTm']||_0x51abeb===_0x1c887e(0x159)||_0xc35932['qdquk'](_0x51abeb,'ci'))&&(console['error'](_0x1c887e(0x15c)+_0x1f5bd7+'\x22\x20is\x20a\x20legacy\x20on-disk\x20profile\x20and\x20can\x20no\x20longer\x20be\x20refreshed\x20in\x20place.\x0a'+_0x1c887e(0x144)+'\x0a'+('\x20\x20ranger\x20profile\x20add\x20'+_0x1f5bd7+'\x0a')),process[_0x1c887e(0x156)](0x1));}!_0x195f32&&(console[_0x1c887e(0x165)]('No\x20profile\x20named\x20\x22'+_0x1f5bd7+_0x1c887e(0x141)+'Create\x20it\x20with:\x0a'+'\x0a'+('\x20\x20ranger\x20profile\x20add\x20'+_0x1f5bd7+'\x0a')),process[_0x1c887e(0x156)](0x1));const _0x4c9903=await _0xc35932[_0x1c887e(0x14b)](fetchAuthConfig)['catch'](()=>null),_0x4ca3f0=_0x195f32['environmentKey']&&_0x4c9903?_0xc35932[_0x1c887e(0x143)](resolveAuthEnvironmentLocally,_0x4c9903,_0x195f32[_0x1c887e(0x15b)]):null;if(_0x195f32['environmentKey']&&_0x4ca3f0){console[_0x1c887e(0x160)]('Refreshing\x20session\x20for\x20\x22'+_0x1f5bd7+_0x1c887e(0x157));try{const _0x36bb79=await _0xc35932[_0x1c887e(0x142)](serverSideLogin,_0x1f5bd7,{'force':!![]});if(_0x36bb79['status']===_0xc35932[_0x1c887e(0x154)]){console[_0x1c887e(0x160)]('✓\x20Session\x20refreshed\x20for\x20\x22'+_0x1f5bd7+'\x22.');return;}_0x36bb79['status']==='not_configured'?console[_0x1c887e(0x160)](_0x1c887e(0x164)):(_0x36bb79['test_output']&&(console['log']('\x0a\x20\x20Server-side\x20login\x20failed.\x20Test\x20output:'),console['log'](_0x36bb79['test_output'])),console['log']('\x20\x20Falling\x20back\x20to\x20headed\x20browser...'));}catch(_0x4c9876){console['log'](_0x1c887e(0x14f)+(_0xc35932[_0x1c887e(0x166)](_0x4c9876,Error)?_0x4c9876['message']:String(_0x4c9876))),console[_0x1c887e(0x160)](_0x1c887e(0x146));}}const _0x16d148=_0x195f32[_0x1c887e(0x163)]??{},_0x58531c=_0x16d148['setupHeaders'],_0x38ea21=_0x16d148['baseUrl'],_0x115b8a=_0x4ca3f0?{..._0x4ca3f0,'setupHeaders':_0x58531c??_0x4ca3f0[_0x1c887e(0x14e)]}:_0x38ea21?{'key':_0x195f32[_0x1c887e(0x15b)]??'','domains':[_0x38ea21],'setupHeaders':_0x58531c}:null;!_0x115b8a&&(console['error'](_0xc35932['WGFKW'](_0xc35932[_0x1c887e(0x151)](_0x1c887e(0x15c)+_0x1f5bd7+'\x22\x20has\x20no\x20URL\x20on\x20file\x20to\x20refresh\x20against.\x0a','Re-create\x20it\x20with:\x0a'),'\x0a')+(_0x1c887e(0x150)+_0x1f5bd7+_0x1c887e(0x14a))),process['exit'](0x1)),!_0xc35932['BDxhw'](isInteractive)&&(console[_0x1c887e(0x165)]('Can\x27t\x20refresh\x20\x22'+_0x1f5bd7+_0x1c887e(0x15a)+(_0x1c887e(0x15f)+_0x1f5bd7+_0x1c887e(0x149))),process['exit'](0x1)),console['log']('Capturing\x20a\x20fresh\x20session\x20for\x20\x22'+_0x1f5bd7+'\x22\x20via\x20headed\x20browser...'),await manualBrowserLogin(_0x195f32,_0x115b8a),console['log'](_0x1c887e(0x158)+_0x1f5bd7+'\x22.');}function _0x286f(_0x597b08,_0x2cf0d9){_0x597b08=_0x597b08-0x141;const _0x852d1c=_0x852d();let _0x286fbc=_0x852d1c[_0x597b08];return _0x286fbc;}function _0x852d(){const _0x3adb77=['OnYPH','155ZjwkYD','exit','\x22\x20via\x20server-side\x20login...','✓\x20Session\x20refreshed\x20for\x20\x22','local','\x22\x20non-interactively\x20—\x20this\x20profile\x20needs\x20a\x20headed\x20browser\x20to\x20capture\x20a\x20session.\x0a','environmentKey','Profile\x20\x22','6011KneffI','success','Run\x20`ranger\x20profile\x20update\x20','log','958470FHdLAD','55928xsyghr','settings','\x20\x20Server-side\x20login\x20not\x20configured\x20for\x20this\x20org.\x20Falling\x20back\x20to\x20headed\x20browser...','error','jhAJg','\x22\x20found.\x0a','JBgIO','QfYoE','Migrate\x20it\x20to\x20a\x20cloud\x20profile\x20by\x20running:\x0a','35EOrLOs','\x20\x20Falling\x20back\x20to\x20headed\x20browser...','7486335fZVlTP','17783260PfPRPW','`\x20from\x20a\x20local\x20terminal,\x20or\x20set\x20up\x20automated\x20login\x20for\x20your\x20team\x20(contact\x20eng@ranger.net).','\x20--url\x20<your-app-url>\x0a','BDxhw','2963574LXRcOb','11XhbZBV','setupHeaders','\x20\x20Server-side\x20login\x20error:\x20','\x20\x20ranger\x20profile\x20add\x20','WGFKW','1730000WWJBJU','6stLNGJ'];_0x852d=function(){return _0x3adb77;};return _0x852d();}
@@ -1 +1 @@
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
+ (function(_0x11fc6a,_0x381380){const _0xc34429=_0x48f3,_0x5496ed=_0x11fc6a();while(!![]){try{const _0x40dcc9=parseInt(_0xc34429(0x87))/0x1*(-parseInt(_0xc34429(0x8b))/0x2)+-parseInt(_0xc34429(0x85))/0x3+parseInt(_0xc34429(0x89))/0x4+-parseInt(_0xc34429(0x84))/0x5*(-parseInt(_0xc34429(0x81))/0x6)+parseInt(_0xc34429(0x8d))/0x7+parseInt(_0xc34429(0x8c))/0x8+-parseInt(_0xc34429(0x86))/0x9;if(_0x40dcc9===_0x381380)break;else _0x5496ed['push'](_0x5496ed['shift']());}catch(_0x5090cb){_0x5496ed['push'](_0x5496ed['shift']());}}}(_0x4b5e,0xe62e6));function _0x48f3(_0x5087c8,_0x3b15d9){_0x5087c8=_0x5087c8-0x80;const _0x4b5e16=_0x4b5e();let _0x48f35d=_0x4b5e16[_0x5087c8];return _0x48f35d;}import{join}from'path';function _0x4b5e(){const _0x633909=['2vNNrJw','15068472vvfJbT','12841423TrOPeB','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20','5982kcXeWL','status','`ranger\x20profile\x20add\x20','6690wfnrzm','3571407owGgHl','13036905wPcuun','1533283nZrtxr','settings.json','252340qKwFIR','`\x20to\x20create\x20one.'];_0x4b5e=function(){return _0x633909;};return _0x4b5e();}import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';export async function useEnv(_0x441ff3){const _0x4fe7a3=_0x48f3,_0x302657={'jwiUM':function(_0x38efb0,_0x5afad4){return _0x38efb0(_0x5afad4);},'BpixH':function(_0x4934d2,_0x609368){return _0x4934d2 instanceof _0x609368;},'pVCzc':function(_0x27e842,_0x1bb4dd){return _0x27e842(_0x1bb4dd);}},_0x3c7ad8=getEnvDir(_0x441ff3),_0x373208=join(_0x3c7ad8,_0x4fe7a3(0x88)),_0x55d3c7=_0x302657['jwiUM'](existsSync,_0x3c7ad8)&&existsSync(_0x373208);if(_0x55d3c7){await _0x302657['jwiUM'](writeActiveProfileName,_0x441ff3),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x441ff3+'\x22');return;}let _0x33848e=null,_0x8a8e6b=![];try{_0x33848e=await fetchCloudProfile(_0x441ff3);if(!_0x33848e)_0x8a8e6b=!![];}catch(_0x55e72f){_0x302657['BpixH'](_0x55e72f,ApiError)&&_0x55e72f[_0x4fe7a3(0x82)]===0x194&&(_0x8a8e6b=!![]);}if(_0x8a8e6b)throw new Error('Profile\x20\x22'+_0x441ff3+_0x4fe7a3(0x80)+'Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'+(_0x4fe7a3(0x83)+_0x441ff3+_0x4fe7a3(0x8a)));await _0x302657['pVCzc'](writeActiveProfileName,_0x441ff3),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x441ff3+'\x22');}
@@ -1 +1 @@
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
+ const _0x252527=_0x28db;(function(_0x3e16f9,_0x1eea18){const _0x7fb8a0=_0x28db,_0x2feab4=_0x3e16f9();while(!![]){try{const _0x2c8439=-parseInt(_0x7fb8a0(0x16a))/0x1+-parseInt(_0x7fb8a0(0x165))/0x2+parseInt(_0x7fb8a0(0x16c))/0x3*(parseInt(_0x7fb8a0(0x169))/0x4)+-parseInt(_0x7fb8a0(0x163))/0x5*(-parseInt(_0x7fb8a0(0x171))/0x6)+-parseInt(_0x7fb8a0(0x162))/0x7+-parseInt(_0x7fb8a0(0x168))/0x8+parseInt(_0x7fb8a0(0x164))/0x9;if(_0x2c8439===_0x1eea18)break;else _0x2feab4['push'](_0x2feab4['shift']());}catch(_0x457bcb){_0x2feab4['push'](_0x2feab4['shift']());}}}(_0x1f78,0x95a1d));function _0x1f78(){const _0x627dad=['ghszC','4883800LYRsYd','100rbcxnR','1158125xmdeKH','dkmzL','97095vUcQMj','cwd','active-env.txt','active-profile.txt','LOYhW','12ziDAvB','5362056yGHEwn','506735ipLTRq','28187865bEDhLl','1992606ErPFVN','cfFxO'];_0x1f78=function(){return _0x627dad;};return _0x1f78();}import{existsSync}from'fs';function _0x28db(_0x5b8b88,_0x20e043){_0x5b8b88=_0x5b8b88-0x162;const _0x1f781f=_0x1f78();let _0x28dbd5=_0x1f781f[_0x5b8b88];return _0x28dbd5;}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=_0x252527(0x16f),LEGACY_ACTIVE_ENV_FILE=_0x252527(0x16e);function readLegacyActiveProfileFile(){const _0x33c58e=_0x252527,_0x2801a8={'cfFxO':function(_0x152ed1,_0x393142,_0x525bb0){return _0x152ed1(_0x393142,_0x525bb0);},'ghszC':function(_0x44b633){return _0x44b633();},'dkmzL':function(_0x332efb){return _0x332efb();},'LOYhW':function(_0x52d6e2){return _0x52d6e2();}},_0x1df8dd=[_0x2801a8[_0x33c58e(0x166)](join,_0x2801a8['ghszC'](getRangerDir),LEGACY_ACTIVE_PROFILE_FILE),_0x2801a8[_0x33c58e(0x166)](join,_0x2801a8[_0x33c58e(0x167)](getRangerHomeDir),LEGACY_ACTIVE_PROFILE_FILE),join(_0x2801a8[_0x33c58e(0x16b)](getRangerDir),LEGACY_ACTIVE_ENV_FILE),join(_0x2801a8[_0x33c58e(0x170)](getRangerHomeDir),LEGACY_ACTIVE_ENV_FILE)];for(const _0x31eaa9 of _0x1df8dd){if(existsSync(_0x31eaa9))return _0x31eaa9;}return null;}export async function readActiveProfileName(){const _0x4ac869={'WYWFD':function(_0x2a3d47){return _0x2a3d47();},'DyOtY':function(_0x502990,_0x4a4282,_0x19afc7){return _0x502990(_0x4a4282,_0x19afc7);}},_0x4843a9=readLastProfile(process['cwd']());if(_0x4843a9)return _0x4843a9;const _0x356357=_0x4ac869['WYWFD'](readLegacyActiveProfileFile);if(!_0x356357)return null;try{return(await _0x4ac869['DyOtY'](readFile,_0x356357,'utf-8'))['trim']()||null;}catch{return null;}}export async function writeActiveProfileName(_0x2d8bfc){const _0x550f13=_0x252527;writeLastProfile(process[_0x550f13(0x16d)](),_0x2d8bfc);}
@@ -1 +1 @@
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;}
1
+ const _0x4b13f0=_0x5328;(function(_0x22cbe8,_0x2babfd){const _0x19348c=_0x5328,_0x2070fd=_0x22cbe8();while(!![]){try{const _0x786d8=-parseInt(_0x19348c(0x160))/0x1+parseInt(_0x19348c(0x15a))/0x2*(-parseInt(_0x19348c(0x14f))/0x3)+parseInt(_0x19348c(0x159))/0x4*(parseInt(_0x19348c(0x147))/0x5)+parseInt(_0x19348c(0x161))/0x6*(-parseInt(_0x19348c(0x131))/0x7)+-parseInt(_0x19348c(0x162))/0x8*(parseInt(_0x19348c(0x15e))/0x9)+-parseInt(_0x19348c(0x137))/0xa+-parseInt(_0x19348c(0x13b))/0xb*(-parseInt(_0x19348c(0x14a))/0xc);if(_0x786d8===_0x2babfd)break;else _0x2070fd['push'](_0x2070fd['shift']());}catch(_0x3e08a0){_0x2070fd['push'](_0x2070fd['shift']());}}}(_0x1c63,0x39673));import{delimiter,join}from'path';import{tmpdir}from'os';import{mkdirSync}from'fs';function _0x5328(_0x3227b5,_0x488248){_0x3227b5=_0x3227b5-0x125;const _0x1c6375=_0x1c63();let _0x532819=_0x1c6375[_0x3227b5];return _0x532819;}import{getAiProxyUrl}from'./environment.js';const AI_PROXY_METADATA_HEADERS_ENV_VAR='ANTHROPIC_CUSTOM_HEADERS',AGENT_ENV_PASSTHROUGH_KEYS=[_0x4b13f0(0x144),'HOME',_0x4b13f0(0x135),'TMP',_0x4b13f0(0x12b),_0x4b13f0(0x14b),_0x4b13f0(0x128),'LOCALAPPDATA',_0x4b13f0(0x130),_0x4b13f0(0x13e),_0x4b13f0(0x154),'PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD',_0x4b13f0(0x164),'CHROMIUM_BIN','npm_config_cache','NPM_CONFIG_CACHE',_0x4b13f0(0x14e),'NPM_CONFIG_USERCONFIG',_0x4b13f0(0x165),_0x4b13f0(0x148),_0x4b13f0(0x142),_0x4b13f0(0x12c),_0x4b13f0(0x132),'NODE_ENV',_0x4b13f0(0x143),'RANGER_TRANSPORT',_0x4b13f0(0x12d),_0x4b13f0(0x149),'AWS_REGION',_0x4b13f0(0x129),'AWS_CONFIG_FILE','AWS_SHARED_CREDENTIALS_FILE',_0x4b13f0(0x125),'AWS_SECRET_ACCESS_KEY',_0x4b13f0(0x13d),'AWS_SDK_LOAD_CONFIG',_0x4b13f0(0x163),'AWS_ROLE_ARN','AWS_ROLE_SESSION_NAME',AI_PROXY_METADATA_HEADERS_ENV_VAR],UNEXPANDED_PATH_TOKEN_PATTERNS=[_0x4b13f0(0x138),'$PATH',_0x4b13f0(0x167)];function _0x1c63(){const _0x7f6e7=['16AYdFFw','AWS_WEB_IDENTITY_TOKEN_FILE','CHROME_BIN','npm_config_prefix','sessionToken','%PATH%','toLowerCase','AWS_ACCESS_KEY_ID','ORspm','TMP','APPDATA','AWS_DEFAULT_REGION','fromEntries','TEMP','NPM_CONFIG_REGISTRY','NOVA_ACT_API_KEY','zhmZA','add','XDG_CACHE_HOME','2128301aBRVhC','DEBUG','slice','string','TMPDIR','tFoOZ','3153390BIBIYQ','${PATH}','xwqli','platform','186307CBsERA','QWcny','AWS_SESSION_TOKEN','XDG_CONFIG_HOME','split','win32','taXnx','npm_config_registry','RANGER_TEST_SKIP_BROWSER_WAIT','PATH','bfHVK','length','115ZyvPXr','NPM_CONFIG_PREFIX','AWS_PROFILE','936GdZDwy','USERPROFILE','PJHJh','map','npm_config_userconfig','3mxbHac','PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','trim','PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.','PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','PLAYWRIGHT_BROWSERS_PATH','entries','metadata','push','byokEnabled','23292RbXBIU','655166IsLIzC','includes','has','/usr/bin','740322jscpDf','env','108411KMxqMY','6zHxVqu'];_0x1c63=function(){return _0x7f6e7;};return _0x1c63();}function parseCustomHeaders(_0xd5ec36){const _0x1e9276=_0x4b13f0,_0xb3a3ad={'QWcny':function(_0x5c87fc,_0x392071){return _0x5c87fc+_0x392071;}};if(!_0xd5ec36)return[];return _0xd5ec36[_0x1e9276(0x13f)](/\r?\n/)['map'](_0x57cafc=>_0x57cafc['trim']())['filter'](Boolean)[_0x1e9276(0x14d)](_0x3b25b6=>{const _0x3f377c=_0x1e9276,_0x4da42f=_0x3b25b6['indexOf'](':');if(_0x4da42f===-0x1)return null;const _0x20e2f7=_0x3b25b6['slice'](0x0,_0x4da42f)['trim'](),_0x532823=_0x3b25b6[_0x3f377c(0x133)](_0xb3a3ad[_0x3f377c(0x13c)](_0x4da42f,0x1))[_0x3f377c(0x151)]();if(!_0x20e2f7)return null;return[_0x20e2f7,_0x532823];})['filter'](_0x1216b8=>_0x1216b8!==null);}export function getAgentPathHealthWarning(_0x48a002,_0x302b13=process[_0x4b13f0(0x13a)]){const _0x350bbd=_0x4b13f0,_0x54ac5d={'pGIiT':function(_0x29aa35,_0x200b54){return _0x29aa35===_0x200b54;},'XPpiM':_0x350bbd(0x153),'taXnx':_0x350bbd(0x140),'ORspm':_0x350bbd(0x15d),'mqHbR':_0x350bbd(0x152),'zhmZA':'Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.'},_0x38f0be=[],_0x2e8dff=(_0x48a002||'')['split'](delimiter)['filter'](Boolean);_0x54ac5d['pGIiT'](_0x2e8dff['length'],0x0)&&_0x38f0be[_0x350bbd(0x157)](_0x350bbd(0x150));UNEXPANDED_PATH_TOKEN_PATTERNS['some'](_0x213fb3=>(_0x48a002||'')[_0x350bbd(0x15b)](_0x213fb3))&&_0x38f0be[_0x350bbd(0x157)](_0x54ac5d['XPpiM']);if(_0x302b13!==_0x54ac5d[_0x350bbd(0x141)]){const _0x434642=_0x2e8dff[_0x350bbd(0x15b)](_0x54ac5d[_0x350bbd(0x126)]),_0x2f8f60=_0x2e8dff['includes']('/bin');!_0x434642&&!_0x2f8f60&&_0x38f0be['push'](_0x54ac5d['mqHbR']);}if(_0x38f0be[_0x350bbd(0x146)]===0x0)return null;return{'summary':_0x54ac5d[_0x350bbd(0x12e)],'issues':_0x38f0be};}export function buildAgentEnv(_0x1aa419){const _0x325799=_0x4b13f0,_0x2846b9={'tFoOZ':function(_0x2cb53d){return _0x2cb53d();},'axXRN':'true','PJHJh':_0x325799(0x12b),'YIeZi':function(_0x1564e8,_0x3b5f97,_0x120930){return _0x1564e8(_0x3b5f97,_0x120930);},'xwqli':'ranger-claude-tmp','DIdtN':'TMPDIR','bfHVK':_0x325799(0x127),'ZWCXx':function(_0x3d3faa,_0x48e750){return _0x3d3faa(_0x48e750);}};if(_0x1aa419[_0x325799(0x158)])return Object[_0x325799(0x12a)](Object['entries'](process[_0x325799(0x15f)])['filter'](_0x1c27df=>typeof _0x1c27df[0x1]===_0x325799(0x134)));if(!_0x1aa419[_0x325799(0x166)])throw new Error('Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false');const _0x52328b={'ANTHROPIC_API_KEY':_0x1aa419['sessionToken'],'ANTHROPIC_BASE_URL':_0x2846b9[_0x325799(0x136)](getAiProxyUrl),'DISABLE_TELEMETRY':_0x2846b9['axXRN']};for(const _0x33b2ca of AGENT_ENV_PASSTHROUGH_KEYS){const _0x3ff814=process[_0x325799(0x15f)][_0x33b2ca];_0x3ff814&&!['TMPDIR','TMP',_0x2846b9[_0x325799(0x14c)]][_0x325799(0x15b)](_0x33b2ca)&&(_0x52328b[_0x33b2ca]=_0x3ff814);}const _0x1d484e=_0x2846b9['YIeZi'](join,_0x2846b9[_0x325799(0x136)](tmpdir),_0x2846b9[_0x325799(0x139)]);try{_0x2846b9['YIeZi'](mkdirSync,_0x1d484e,{'recursive':!![]});}catch{}_0x52328b[_0x2846b9['DIdtN']]=_0x1d484e,_0x52328b[_0x2846b9[_0x325799(0x145)]]=_0x1d484e,_0x52328b[_0x325799(0x12b)]=_0x1d484e;const _0xe45221=_0x2846b9['ZWCXx'](parseCustomHeaders,process['env'][AI_PROXY_METADATA_HEADERS_ENV_VAR]),_0x1e123d=new Map(_0xe45221),_0x49917a=new Set(_0xe45221['map'](([_0x5907e8])=>_0x5907e8[_0x325799(0x168)]()));if(_0x1aa419['metadata'])for(const [_0x4220eb,_0x934f57]of Object[_0x325799(0x155)](_0x1aa419[_0x325799(0x156)])){if(_0x934f57==null||_0x934f57==='')continue;const _0x4f5764='x-ranger-'+_0x4220eb;!_0x49917a[_0x325799(0x15c)](_0x4f5764['toLowerCase']())&&(_0x1e123d['set'](_0x4f5764,_0x934f57),_0x49917a[_0x325799(0x12f)](_0x4f5764['toLowerCase']()));}const _0x412750=Array['from'](_0x1e123d['entries']())[_0x325799(0x14d)](([_0x49af0c,_0x20ee9d])=>_0x49af0c+':\x20'+_0x20ee9d)['join']('\x0a');return _0x412750&&(_0x52328b[AI_PROXY_METADATA_HEADERS_ENV_VAR]=_0x412750),_0x52328b;}