@ranger-testing/ranger-cli 2.5.4 → 3.0.1-alpha.46ed70b-30

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 (87) 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/rangerwrightCli.js +1 -0
  67. package/build/commands/utils/resolveProfileContext.js +1 -0
  68. package/build/commands/utils/resolveProfileUrl.js +1 -0
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/sessionCache.js +1 -1
  71. package/build/commands/utils/settings.js +1 -1
  72. package/build/commands/utils/skillContent.js +1 -1
  73. package/build/commands/utils/skills.js +1 -1
  74. package/build/commands/utils/stitchWebmFiles.js +1 -1
  75. package/build/commands/utils/telemetry.js +1 -1
  76. package/build/commands/utils/tokenRefresh.js +1 -1
  77. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  78. package/build/commands/utils/userApi.js +1 -1
  79. package/build/commands/utils/version.js +1 -1
  80. package/build/commands/verifyFeature.js +1 -1
  81. package/build/commands/verifyFeatureCli.js +1 -1
  82. package/build/commands/verifyFeatureNovaCli.js +1 -0
  83. package/build/commands/verifyFeatureRangerwrightCli.js +1 -0
  84. package/build/skills/ranger/SKILL.md +36 -6
  85. package/build/skills/ranger/create.md +19 -0
  86. package/build/skills/ranger/verify.md +46 -7
  87. package/package.json +9 -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(_0x26c422,_0x4ce5ac){const _0x1ed318=_0x14f8,_0x4a8349=_0x26c422();while(!![]){try{const _0x363bd8=parseInt(_0x1ed318(0x1bb))/0x1*(parseInt(_0x1ed318(0x1c0))/0x2)+-parseInt(_0x1ed318(0x1b9))/0x3+-parseInt(_0x1ed318(0x1c8))/0x4+-parseInt(_0x1ed318(0x1ce))/0x5*(parseInt(_0x1ed318(0x1ca))/0x6)+-parseInt(_0x1ed318(0x1ba))/0x7*(-parseInt(_0x1ed318(0x1b5))/0x8)+-parseInt(_0x1ed318(0x1bc))/0x9*(parseInt(_0x1ed318(0x1c1))/0xa)+parseInt(_0x1ed318(0x1b2))/0xb;if(_0x363bd8===_0x4ce5ac)break;else _0x4a8349['push'](_0x4a8349['shift']());}catch(_0x5360d7){_0x4a8349['push'](_0x4a8349['shift']());}}}(_0x3d4c,0x2e37b));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x39a1b9 from'inquirer';function _0x3d4c(){const _0x212571=['Where\x20should\x20the\x20plugin\x20be\x20installed?','✓\x20OpenCode\x20plugin\x20already\x20configured','@ranger-testing/opencode-plugin','Failed\x20to\x20read\x20opencode.json','1345008PfFOBv','utf-8','75954pNEOkj','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','isArray','log','55PZUMBT','emLKI','\x0a📦\x20OpenCode\x20Plugin\x0a','opencode.json','project','4952035NFxHbp','error','Project\x20(shared\x20with\x20team\x20via\x20git)','1014776pTbAkg','smGKL','User\x20(available\x20in\x20all\x20your\x20projects)','plugin','350844OnbmZr','14LmaWLE','6MpWvNb','81eQBpmH','user','pluginScope','$schema','92772OoaIES','222710EWyBnA','iJwcV','GbNkc'];_0x3d4c=function(){return _0x212571;};return _0x3d4c();}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';function _0x14f8(_0xa9f61a,_0xfab8c2){_0xa9f61a=_0xa9f61a-0x1b2;const _0x3d4c37=_0x3d4c();let _0x14f87c=_0x3d4c37[_0xa9f61a];return _0x14f87c;}export async function ensureOpencodePluginConfig(_0xa6b576){const _0x22fdea=_0x14f8,_0x1c8d78={'iJwcV':function(_0x1a4675,_0x4aafbf){return _0x1a4675(_0x4aafbf);},'mXlxQ':function(_0x749518,_0x41df3b,_0x315f20){return _0x749518(_0x41df3b,_0x315f20);},'emLKI':_0x22fdea(0x1d2),'ZJghX':'pluginScope','SUmyg':_0x22fdea(0x1b7),'smGKL':_0x22fdea(0x1b4),'hTbpp':_0x22fdea(0x1bd),'zuHMY':function(_0x4f4987,_0x441ee7,_0x1694cf){return _0x4f4987(_0x441ee7,_0x1694cf);},'GbNkc':_0x22fdea(0x1c6),'ISavf':'https://opencode.ai/config.json','hIDiX':function(_0x1302f9,_0x1e0007){return _0x1302f9(_0x1e0007);},'SZhqK':_0x22fdea(0x1cb),'pIxiO':_0x22fdea(0x1c7),'ZHItg':function(_0x2ff45a,_0x356189){return _0x2ff45a(_0x356189);},'PWkdc':function(_0x3773a9,_0x27943c,_0x5261a0){return _0x3773a9(_0x27943c,_0x5261a0);},'JWBRg':function(_0x37b291,_0x4f3736){return _0x37b291+_0x4f3736;},'XQgvv':'✓\x20OpenCode\x20plugin\x20configured'},_0x40d443=_0x1c8d78['iJwcV'](existsSync,_0x1c8d78['mXlxQ'](join,_0x1c8d78[_0x22fdea(0x1c2)](getOpencodeConfigDir,_0x22fdea(0x1d2)),_0x22fdea(0x1d1)));let _0x535386;if(_0xa6b576)_0x535386=_0xa6b576;else{if(_0x40d443)_0x535386=_0x1c8d78['emLKI'];else{console[_0x22fdea(0x1cd)](_0x22fdea(0x1d0));const _0x153229=await _0x39a1b9['prompt']([{'type':'list','name':_0x1c8d78['ZJghX'],'message':_0x22fdea(0x1c4),'choices':[{'name':_0x1c8d78['SUmyg'],'value':_0x22fdea(0x1bd)},{'name':_0x1c8d78[_0x22fdea(0x1b6)],'value':_0x1c8d78[_0x22fdea(0x1cf)]}],'default':_0x1c8d78['hTbpp']}]);_0x535386=_0x153229[_0x22fdea(0x1be)];}}const _0x285352=_0x1c8d78['zuHMY'](join,getOpencodeConfigDir(_0x535386),'opencode.json'),_0x1b3a64=_0x1c8d78[_0x22fdea(0x1c3)],_0x43e49e=_0x1c8d78['ISavf'];let _0x1321ec={};if(_0x1c8d78['hIDiX'](existsSync,_0x285352))try{const _0x5af98d=await _0x1c8d78['zuHMY'](readFile,_0x285352,_0x22fdea(0x1c9));_0x1321ec=JSON['parse'](_0x5af98d);}catch(_0x251f1e){return console[_0x22fdea(0x1b3)](_0x1c8d78['SZhqK']),{'configured':![],'scope':_0x535386,'error':_0x1c8d78['pIxiO'],'details':_0x251f1e};}const _0x29cdae=Array[_0x22fdea(0x1cc)](_0x1321ec['plugin'])?_0x1321ec['plugin']:[];if(_0x29cdae['includes'](_0x1b3a64))return console[_0x22fdea(0x1cd)](_0x22fdea(0x1c5)),{'configured':![],'scope':_0x535386};return _0x1321ec['$schema']=_0x1321ec[_0x22fdea(0x1bf)]||_0x43e49e,_0x1321ec[_0x22fdea(0x1b8)]=[..._0x29cdae,_0x1b3a64],await _0x1c8d78['mXlxQ'](mkdir,_0x1c8d78['ZHItg'](getOpencodeConfigDir,_0x535386),{'recursive':!![]}),await _0x1c8d78['PWkdc'](writeFile,_0x285352,_0x1c8d78['JWBRg'](JSON['stringify'](_0x1321ec,null,0x2),'\x0a')),console[_0x22fdea(0x1cd)](_0x1c8d78['XQgvv']),{'configured':!![],'scope':_0x535386};}
@@ -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 _0x5f04(_0x16ea50,_0x1e0c9c){_0x16ea50=_0x16ea50-0xec;var _0x36281c=_0x3628();var _0x5f040a=_0x36281c[_0x16ea50];return _0x5f040a;}function _0x3628(){var _0x47ae9f=['10pjqGoU','30hsCftT','3677RKGZZg','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','233268fRwtsQ','\x20\x20https://docs.ranger.net/main/concepts/profiles','exit','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','315KdVWxC','56EmXjgx','21948zXYTpV','1548767SLkJDT','error','9yKIDSR','891272VjzBEl','387726gTgquh','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','drfgQ','11100888ErRAAG'];_0x3628=function(){return _0x47ae9f;};return _0x3628();}(function(_0x34f259,_0x30cda6){var _0x3f6fef=_0x5f04,_0x4c626c=_0x34f259();while(!![]){try{var _0x1ecd48=-parseInt(_0x3f6fef(0xf6))/0x1*(parseInt(_0x3f6fef(0xfd))/0x2)+parseInt(_0x3f6fef(0xf0))/0x3+parseInt(_0x3f6fef(0xfe))/0x4*(-parseInt(_0x3f6fef(0xfc))/0x5)+parseInt(_0x3f6fef(0xf5))/0x6*(-parseInt(_0x3f6fef(0xf8))/0x7)+-parseInt(_0x3f6fef(0xef))/0x8*(parseInt(_0x3f6fef(0xee))/0x9)+parseInt(_0x3f6fef(0xf4))/0xa*(-parseInt(_0x3f6fef(0xec))/0xb)+parseInt(_0x3f6fef(0xf3))/0xc;if(_0x1ecd48===_0x30cda6)break;else _0x4c626c['push'](_0x4c626c['shift']());}catch(_0x54d132){_0x4c626c['push'](_0x4c626c['shift']());}}}(_0x3628,0x2d9e5));export async function setupCi(_0x538b8c,_0x22c747,_0x4d19ef){var _0x588953=_0x5f04,_0x5b46fd={'RLpih':function(_0x435995,_0x2f185c){return _0x435995+_0x2f185c;},'iPzgQ':function(_0x501556,_0x2bc8c4){return _0x501556+_0x2bc8c4;},'HNqdM':_0x588953(0xfb),'obLqP':_0x588953(0xf7),'drfgQ':_0x588953(0xf1),'PLRaH':_0x588953(0xf9)};console[_0x588953(0xed)](_0x5b46fd['RLpih'](_0x5b46fd['RLpih'](_0x5b46fd['iPzgQ'](_0x5b46fd['HNqdM']+'\x0a'+_0x5b46fd['obLqP'],'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),'\x0a'),_0x5b46fd[_0x588953(0xf2)])+_0x5b46fd['PLRaH']),process[_0x588953(0xfa)](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 _0x5cbc(_0x4fcd4c,_0x2480dd){_0x4fcd4c=_0x4fcd4c-0x174;const _0x673c52=_0x673c();let _0x5cbcc8=_0x673c52[_0x4fcd4c];return _0x5cbcc8;}(function(_0x4d5687,_0x19cc4a){const _0xb1d5cf=_0x5cbc,_0x258640=_0x4d5687();while(!![]){try{const _0x199dcf=-parseInt(_0xb1d5cf(0x17d))/0x1+-parseInt(_0xb1d5cf(0x186))/0x2*(-parseInt(_0xb1d5cf(0x182))/0x3)+-parseInt(_0xb1d5cf(0x17c))/0x4+-parseInt(_0xb1d5cf(0x195))/0x5*(parseInt(_0xb1d5cf(0x185))/0x6)+-parseInt(_0xb1d5cf(0x192))/0x7*(-parseInt(_0xb1d5cf(0x17e))/0x8)+parseInt(_0xb1d5cf(0x194))/0x9*(parseInt(_0xb1d5cf(0x19f))/0xa)+-parseInt(_0xb1d5cf(0x183))/0xb;if(_0x199dcf===_0x19cc4a)break;else _0x258640['push'](_0x258640['shift']());}catch(_0x4a15ee){_0x258640['push'](_0x258640['shift']());}}}(_0x673c,0xe8a8e));import{basename}from'path';import _0x52e767 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';function _0x673c(){const _0x114e55=['HMQzt','2837552SogdFh','659349tbTYyU','8sYLeAh','project-level','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','opencode','6681WyoxLT','4017057qyadtG','DkbaL','6JRwZWr','1566ZpdXMR','KxkLr','All\x20projects\x20(','suppressUsage','claude','/.claude/skills/','log','stdout','prompt','rKAbC','Where\x20should\x20skills\x20be\x20installed?','isTTY','13186145SwSANL','Vbnbi','144CToaXr','5818650TWiGAV','installLevel','This\x20project\x20only\x20(','platform','autoInstall','tvzIM','\x20skill','DBBgP','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','wgiXk','139470nZQzua','DRzkc','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','GoFiQ','olmZd','project','\x0a📦\x20Installing\x20skills...\x0a','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','\x20--opencode','VsdPt','message'];_0x673c=function(){return _0x114e55;};return _0x673c();}export async function skillup(_0x156b77={}){const _0x13f105=_0x5cbc,_0x258f06={'DRzkc':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','szrza':_0x13f105(0x18a),'kznnY':function(_0x2775c7){return _0x2775c7();},'wgiXk':_0x13f105(0x180),'GoFiQ':'To\x20get\x20started:','prSRP':_0x13f105(0x19d),'KxkLr':_0x13f105(0x178),'tvzIM':function(_0x503a49,_0x21da8a){return _0x503a49===_0x21da8a;},'olmZd':'user','wqRVZ':function(_0x164ec7){return _0x164ec7();},'Vbnbi':function(_0x5cb71a,_0x8d7448){return _0x5cb71a===_0x8d7448;},'DkbaL':_0x13f105(0x181),'rKAbC':_0x13f105(0x175),'VsdPt':_0x13f105(0x176),'DBBgP':function(_0x2fc7a7,_0x11dd0d,_0x52efd8){return _0x2fc7a7(_0x11dd0d,_0x52efd8);},'qSZtu':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','TJKSU':'user-level','cMmyq':function(_0x2c1702,_0x42b717){return _0x2c1702>_0x42b717;},'HMQzt':'To\x20use:','iTzAh':_0x13f105(0x1a1)};console['log'](_0x258f06[_0x13f105(0x1a0)]);const _0x3e7229=_0x156b77[_0x13f105(0x198)]??_0x258f06['szrza'],_0x50d0ab=await _0x258f06['kznnY'](getToken);if(!_0x50d0ab){console[_0x13f105(0x18c)](_0x258f06[_0x13f105(0x19e)]),console['log'](_0x258f06[_0x13f105(0x1a2)]),console['log'](_0x258f06['prSRP']),console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x3e7229===_0x13f105(0x181)?_0x258f06[_0x13f105(0x187)]:'')+'\x20<your-api-token>'),console[_0x13f105(0x18c)]('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x258f06[_0x13f105(0x19a)](_0x3e7229,'opencode')?'\x20--opencode':'')+'\x0a');return;}console[_0x13f105(0x18c)]('✓\x20Found\x20API\x20token');const _0x41811e=getProjectRoot(),_0x29110b=basename(_0x41811e),_0x20be1f=_0x258f06['tvzIM'](_0x3e7229,_0x13f105(0x181))?getOpencodeConfigDir(_0x258f06[_0x13f105(0x174)])+'/skills/':_0x258f06['wqRVZ'](getClaudeConfigDir)+'/skills/',_0x5bd515=_0x258f06[_0x13f105(0x193)](_0x3e7229,_0x258f06[_0x13f105(0x184)])?_0x41811e+'/.opencode/skills/':_0x41811e+_0x13f105(0x18b),_0x3f3069=process['stdin']['isTTY']&&process[_0x13f105(0x18d)][_0x13f105(0x191)];let _0x10452e;if(_0x156b77[_0x13f105(0x199)])_0x10452e=_0x156b77['autoInstall'];else{if(_0x3f3069){const _0x4ffb2f=await _0x52e767[_0x13f105(0x18e)]([{'type':'list','name':_0x13f105(0x196),'message':_0x13f105(0x190),'choices':[{'name':_0x13f105(0x188)+_0x20be1f+')','value':'user'},{'name':_0x13f105(0x197)+_0x5bd515+')','value':'project'}]}]);_0x10452e=_0x4ffb2f[_0x13f105(0x196)];}else _0x10452e=_0x258f06[_0x13f105(0x18f)],console[_0x13f105(0x18c)](_0x13f105(0x177)+_0x5bd515+')');}let _0x847121=0x0;const _0x48b338=getCurrentVersion();console['log'](_0x258f06[_0x13f105(0x179)]);try{const _0x2a5b6e=await _0x258f06[_0x13f105(0x19c)](installSkill,'ranger',{'cliVersion':_0x48b338,'level':_0x10452e,'platform':_0x3e7229});_0x2a5b6e&&_0x847121++;}catch(_0x1e617f){console['warn'](_0x258f06['qSZtu'],_0x1e617f instanceof Error?_0x1e617f[_0x13f105(0x17a)]:_0x1e617f);}if(_0x847121>0x0){const _0x4e6beb=_0x10452e==='user'?_0x258f06['TJKSU']:_0x13f105(0x17f);console['log']('\x0a✅\x20Installed\x20'+_0x847121+'\x20'+_0x4e6beb+_0x13f105(0x19b)+(_0x258f06['cMmyq'](_0x847121,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x156b77[_0x13f105(0x189)]&&(console['log'](_0x258f06[_0x13f105(0x17b)]),_0x3e7229===_0x13f105(0x181)?console[_0x13f105(0x18c)]('\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'):console[_0x13f105(0x18c)]('\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[_0x13f105(0x18c)](_0x258f06['iTzAh']);}
@@ -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
+ function _0x54e6(_0x336c00,_0x14263d){_0x336c00=_0x336c00-0x98;const _0x49ce52=_0x49ce();let _0x54e618=_0x49ce52[_0x336c00];return _0x54e618;}const _0xa80dda=_0x54e6;(function(_0x376a71,_0x4d385a){const _0x235634=_0x54e6,_0xe0f615=_0x376a71();while(!![]){try{const _0x24bb0a=-parseInt(_0x235634(0x108))/0x1*(parseInt(_0x235634(0xd9))/0x2)+parseInt(_0x235634(0xc0))/0x3*(-parseInt(_0x235634(0xa4))/0x4)+parseInt(_0x235634(0x106))/0x5*(-parseInt(_0x235634(0xd7))/0x6)+-parseInt(_0x235634(0xce))/0x7*(-parseInt(_0x235634(0xba))/0x8)+parseInt(_0x235634(0xdc))/0x9*(-parseInt(_0x235634(0xa0))/0xa)+parseInt(_0x235634(0x102))/0xb+-parseInt(_0x235634(0xab))/0xc*(-parseInt(_0x235634(0xea))/0xd);if(_0x24bb0a===_0x4d385a)break;else _0xe0f615['push'](_0xe0f615['shift']());}catch(_0x169c8c){_0xe0f615['push'](_0xe0f615['shift']());}}}(_0x49ce,0xf40b8));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x496113 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x4e655c=>'\x1b[1m'+_0x4e655c+_0xa80dda(0x9e);export function getPlaywrightVersion(){const _0x687837=_0xa80dda,_0x28ae22={'IJmNU':function(_0x2e90a2,_0x600c0e){return _0x2e90a2(_0x600c0e);}};try{const _0x2387a5=require[_0x687837(0xc8)](_0x687837(0xc3)),_0x2a4683=_0x28ae22[_0x687837(0xb3)](require,_0x2387a5);return _0x2a4683['version'];}catch{return null;}}function _0x49ce(){const _0x2c4027=['skipAuth','\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:','ranger\x20setup\x20--scope=','You\x20can\x20install\x20it\x20manually\x20by\x20running:','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','jWzQU','IJmNU','EwFet','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','✓\x20Local\x20profile\x20already\x20exists','ready','\x0a🚀\x20Ranger\x20Setup\x0a','plugin','24ATeHTo','status','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','iYXpD','scope','\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','5568ImCKLv','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','install','playwright/package.json','success','url','force','The\x20required\x20version\x20(','resolve','DLKJz','ZFScO','win32','log','tWpSs','4073447aehAVV','HOxVv','dpyli','TpCCW','piDiJ','Validating\x20API\x20token...','message','NzVDN','RBlHl','586452PWpuQl','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','8JdLwQS','\x0a⚠\x20Skipping\x20Chromium\x20installation.','PRITU','207TMCmer','trackPhaseStart','method','fRajL','skills','local','existing_token','stdout','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','oUKjE','device_auth','trackPhaseEnd','RbuiN','inherit','13bnqxtU','WxeJx',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','eaQsa','oWtul','iCzxo','\x0a\x20\x20','skipChromium','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','✓\x20Stored\x20credentials\x20locally','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','error','HfcTr','hVHCY','user','ToOkW','oLBrM','Installation\x20failed\x20with\x20exit\x20code\x20','velCx','--with-deps','pisLN','✓\x20Playwright\x20Chromium\x20browser\x20found','yjgnT','stdin','12177099nXuFrQ','Authentication\x20failed:\x20','platform','KIikp','100hrRMZY','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','187123hbSWSt','rXMMZ','✓\x20Authenticated\x20to\x20','isTTY','profile','organizationName','npx','IJfcc','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','\x1b[0m','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','854190WcQsKE','amwNX','env','.gitignore','2448IVvfaV','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','chromium','✓\x20Created\x20.ranger/.gitignore','/ranger:enable','warn','47408124PAakvQ'];_0x49ce=function(){return _0x2c4027;};return _0x49ce();}export function installChromiumBinary(_0x53ed52,_0x22b137=![]){const _0x83858=_0xa80dda,_0x376a79={'aQYOr':function(_0x4d84b4){return _0x4d84b4();},'HPNmZ':_0x83858(0xfd),'zuBAe':_0x83858(0xa7),'VrWoe':function(_0x11c6a8,_0x1c638e,_0x20b0ae,_0x26cc0a){return _0x11c6a8(_0x1c638e,_0x20b0ae,_0x26cc0a);},'tqfNK':_0x83858(0x9b),'XGfoI':_0x83858(0xe9),'tWpSs':'close','RbuiN':_0x83858(0xf5)};return new Promise((_0x3b6850,_0x446ce1)=>{const _0x1472c8=_0x83858,_0x5f301c={'RBlHl':function(_0x21e250,_0xd230f3){return _0x21e250(_0xd230f3);}},_0x2757ba=['playwright@'+_0x53ed52,'install',..._0x22b137?[_0x376a79['HPNmZ']]:[],_0x376a79['zuBAe']],_0x4ddb38=_0x376a79['VrWoe'](spawn,_0x376a79['tqfNK'],_0x2757ba,{'stdio':['ignore',_0x1472c8(0xe9),_0x376a79['XGfoI']],'shell':process[_0x1472c8(0x104)]===_0x1472c8(0xcb)});_0x4ddb38['on'](_0x376a79[_0x1472c8(0xcd)],_0x1b7738=>{const _0xadf53a=_0x1472c8;_0x1b7738===0x0?_0x376a79['aQYOr'](_0x3b6850):_0x446ce1(new Error(_0xadf53a(0xfb)+_0x1b7738));}),_0x4ddb38['on'](_0x376a79[_0x1472c8(0xe8)],_0x1ff0ab=>{const _0x48d702=_0x1472c8;_0x5f301c[_0x48d702(0xd6)](_0x446ce1,_0x1ff0ab);});});}export async function authenticate(_0x2c85aa){const _0x21c272=_0xa80dda,_0xaccc36={'eaQsa':function(_0xa781e2){return _0xa781e2();},'UpMOQ':function(_0x529ad0,_0x315fd2){return _0x529ad0(_0x315fd2);},'egEMT':_0x21c272(0xe2),'oUKjE':function(_0x5c6d63){return _0x5c6d63();},'HfcTr':function(_0x2131a2,_0xdb9b33){return _0x2131a2(_0xdb9b33);},'pisLN':_0x21c272(0xe6),'yVdfB':_0x21c272(0xd3),'dpyli':_0x21c272(0xf3)};if(!_0x2c85aa){const _0x117133=await _0xaccc36[_0x21c272(0xed)](getToken);if(_0x117133){const _0xc5f119=await _0xaccc36['UpMOQ'](getCurrentUser,_0x117133);if(_0xc5f119[_0x21c272(0xc4)])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0xc5f119['user'][_0x21c272(0x9a)]),{'token':_0x117133,'method':_0xaccc36['egEMT']};}try{_0x2c85aa=await _0xaccc36[_0x21c272(0xe5)](runDeviceAuthFlow);}catch(_0x1503d8){throw new Error('Authentication\x20failed:\x20'+(_0x1503d8 instanceof Error?_0x1503d8[_0x21c272(0xd4)]:_0x1503d8));}const _0x2a8b37=await _0xaccc36[_0x21c272(0xf6)](getCurrentUser,_0x2c85aa);if(!_0x2a8b37[_0x21c272(0xc4)])throw new Error(_0x21c272(0xf4)+_0x2a8b37['error']);return console[_0x21c272(0xcc)](_0x21c272(0x10a)+_0x2a8b37[_0x21c272(0xf8)][_0x21c272(0x9a)]),{'token':_0x2c85aa,'method':_0xaccc36[_0x21c272(0xfe)]};}console['log'](_0xaccc36['yVdfB']);const _0x1dc335=await _0xaccc36[_0x21c272(0xf6)](getCurrentUser,_0x2c85aa);if(!_0x1dc335[_0x21c272(0xc4)]){if(_0x1dc335[_0x21c272(0xbb)])throw new Error(_0x21c272(0x103)+_0x1dc335['error']+_0x21c272(0x9f));else throw new Error(_0x21c272(0xb5)+_0x1dc335['error']+_0x21c272(0xbc));}return console['log']('✓\x20Authenticated\x20to\x20'+_0x1dc335['user']['organizationName']),await storeToken(_0x2c85aa),console['log'](process[_0x21c272(0xa2)]['GITHUB_ENV']?'✓\x20Exported\x20credentials\x20for\x20CI':_0xaccc36[_0x21c272(0xd0)]),{'token':_0x2c85aa,'method':'provided_token'};}export async function ensureRangerDir(_0x32473d){const _0x5528f8=_0xa80dda,_0x388422={'oLBrM':function(_0x1ea069){return _0x1ea069();},'KIikp':function(_0x4fa9a2,_0x57af08,_0xb99ebd){return _0x4fa9a2(_0x57af08,_0xb99ebd);},'AHKGU':'✓\x20Created\x20~/.ranger/\x20directory','obNFK':'✓\x20~/.ranger/\x20directory\x20already\x20exists'};void _0x32473d;const _0x3233e3=_0x388422[_0x5528f8(0xfa)](getRangerHomeDir);return!existsSync(_0x3233e3)?(await _0x388422[_0x5528f8(0x105)](mkdir,_0x3233e3,{'recursive':!![]}),console[_0x5528f8(0xcc)](_0x388422['AHKGU']),{'path':_0x3233e3,'installed':!![]}):(console['log'](_0x388422['obNFK']),{'path':_0x3233e3,'installed':![]});}export async function ensureChromium(_0x3f7b92=![]){const _0x51553f=_0xa80dda,_0x2b3fe1={'rXMMZ':_0x51553f(0xff),'fuJRT':function(_0x16bbb0){return _0x16bbb0();},'fRajL':function(_0x5cf5c2,_0x23f287){return _0x5cf5c2??_0x23f287;},'zuqjn':_0x51553f(0xc2),'ToOkW':'\x0aInstalling\x20Chromium\x20browser...\x0a','piDiJ':function(_0x44935f,_0x150610,_0x496346){return _0x44935f(_0x150610,_0x496346);},'EwFet':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','gvSyU':_0x51553f(0xf2),'KMXsc':function(_0x33d565,_0x15440d){return _0x33d565 instanceof _0x15440d;},'xpkfp':_0x51553f(0xaf),'LJuhd':_0x51553f(0xda),'ZgySX':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0x5b4806=![];try{const _0x4cce37=chromium['executablePath']();_0x5b4806=existsSync(_0x4cce37);}catch{_0x5b4806=![];}if(_0x5b4806)return console['log'](_0x2b3fe1[_0x51553f(0x109)]),![];const _0x1423c2=_0x2b3fe1['fuJRT'](getPlaywrightVersion),_0x507178=_0x2b3fe1[_0x51553f(0xdf)](_0x1423c2,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x47b61f=!_0x1423c2,_0x1644ea=process[_0x51553f(0x101)]['isTTY']&&process[_0x51553f(0xe3)][_0x51553f(0x98)];let _0x516357=!![];if(_0x1644ea){const {install:_0x4e9842}=await _0x496113['prompt']([{'type':'confirm','name':_0x2b3fe1['zuqjn'],'message':_0x47b61f?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x507178+'\x20now?':_0x51553f(0xc7)+_0x507178+_0x51553f(0xec),'default':!![]}]);_0x516357=_0x4e9842;}else console[_0x51553f(0xcc)](_0x51553f(0xe4)+_0x507178+(_0x47b61f?'\x20(fallback\x20version)':'')+'...');if(_0x516357){console['log'](_0x2b3fe1[_0x51553f(0xf9)]);try{await _0x2b3fe1[_0x51553f(0xd2)](installChromiumBinary,_0x507178,_0x3f7b92),console['log'](_0x2b3fe1[_0x51553f(0xb4)]);}catch(_0x5eb998){console[_0x51553f(0xf5)](_0x2b3fe1['gvSyU'],_0x2b3fe1['KMXsc'](_0x5eb998,Error)?_0x5eb998['message']:_0x5eb998),console['log'](_0x2b3fe1['xpkfp']),console[_0x51553f(0xcc)]('\x20\x20npx\x20playwright@'+_0x507178+'\x20install\x20chromium');}}else console[_0x51553f(0xcc)](_0x2b3fe1['LJuhd']),console['log'](_0x2b3fe1['ZgySX']),console[_0x51553f(0xcc)]('\x20\x20npx\x20playwright@'+_0x507178+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x198a80){const _0x11485c=_0xa80dda,_0x4a852b={'isVZj':function(_0x9b46c6,_0x2d1f8b,_0x2e9def){return _0x9b46c6(_0x2d1f8b,_0x2e9def);}},_0x1856fc=join(_0x198a80,_0x11485c(0xa3)),_0x4548b8=_0x11485c(0xbf);await _0x4a852b['isVZj'](writeFile,_0x1856fc,_0x4548b8),console[_0x11485c(0xcc)](_0x11485c(0xa8));}export async function ensureLocalEnv(_0x56b042,_0x3f01e4){const _0x464d50=_0xa80dda,_0x4bf00d={'WxeJx':function(_0x46c2f6){return _0x46c2f6();},'YPjpW':_0x464d50(0xb1),'zPnGq':function(_0x2af483,_0x3e73db){return _0x2af483===_0x3e73db;},'IJfcc':_0x464d50(0xf8),'ZFScO':_0x464d50(0xe1),'jWzQU':function(_0x1e3091,_0x13d994,_0x4f5e97,_0x441870){return _0x1e3091(_0x13d994,_0x4f5e97,_0x441870);},'xmxPj':function(_0xbeece9,_0x186308){return _0xbeece9 instanceof _0x186308;}};if(!_0x4bf00d[_0x464d50(0xeb)](findGitRoot)&&_0x56b042?.[_0x464d50(0xbe)]!=='user')return console['log'](_0x4bf00d['YPjpW']),{'ready':![],'skipped':!![]};const _0x43b19a=_0x4bf00d['zPnGq'](_0x56b042?.['scope'],_0x4bf00d[_0x464d50(0x9c)])?_0x4bf00d['WxeJx'](getRangerHomeDir):undefined;if(findExistingEnv(_0x4bf00d['ZFScO'],{'locations':[_0x4bf00d[_0x464d50(0xca)]],'rangerDir':_0x43b19a}))return console[_0x464d50(0xcc)](_0x464d50(0xb6)),{'ready':!![],'skipped':![]};try{return await _0x4bf00d[_0x464d50(0xb2)](addEnv,_0x4bf00d['ZFScO'],{'url':_0x56b042?.['url'],'force':_0x56b042?.[_0x464d50(0xc6)],'allowInsecureLocalhost':_0x56b042?.['allowInsecureLocalhost'],'scope':_0x56b042?.['scope']},_0x3f01e4),{'ready':!![],'skipped':![]};}catch(_0x4e4d3a){return console[_0x464d50(0xf5)]('\x0a❌\x20Profile\x20setup\x20failed:',_0x4bf00d['xmxPj'](_0x4e4d3a,Error)?_0x4e4d3a[_0x464d50(0xd4)]:_0x4e4d3a),{'ready':![],'skipped':![]};}}export async function start(_0x2756db,_0x48fcdd,_0xceb5a){const _0x871016=_0xa80dda,_0x4bfcec={'iCzxo':_0x871016(0xb8),'nBwht':function(_0xafe3fe,_0x45048d){return _0xafe3fe!==_0x45048d;},'hUXsy':function(_0x1b1085,_0x457a06){return _0x1b1085!==_0x457a06;},'yjgnT':function(_0x2637b1,_0x37c0b5){return _0x2637b1+_0x37c0b5;},'PRITU':'user','hVHCY':function(_0x5a020e,_0x3b5849){return _0x5a020e(_0x3b5849);},'XACyA':'skipped','urqwb':'auth','jLNJt':function(_0x1e7eb5,_0x379184){return _0x1e7eb5(_0x379184);},'TtVSy':_0x871016(0xc1),'iYXpD':'plugin','WgMqY':function(_0x26626e,_0x57e3cc){return _0x26626e(_0x57e3cc);},'TpCCW':function(_0x2d1be3,_0x5705d9){return _0x2d1be3(_0x5705d9);},'DLKJz':'ranger','HOxVv':'opencode','NzVDN':_0x871016(0xe0),'velCx':function(_0x26a731,_0x2e732b){return _0x26a731(_0x2e732b);},'oWtul':_0x871016(0x99),'ZUAkz':function(_0x5357ad,_0x3abfc9,_0x19b1ac){return _0x5357ad(_0x3abfc9,_0x19b1ac);},'amwNX':function(_0x28e962,_0x5bf505){return _0x28e962+_0x5bf505;},'TTmnE':function(_0x2553f5,_0x585ca9){return _0x2553f5(_0x585ca9);},'bnXdH':'ranger\x20profile\x20add\x20<name>','tQBAy':_0x871016(0xd8),'kYHbH':function(_0x20b341,_0x396c95){return _0x20b341(_0x396c95);},'hFKoT':_0x871016(0xa9)};console['log'](_0x4bfcec[_0x871016(0xef)]);_0x4bfcec['nBwht'](_0x48fcdd?.['scope'],undefined)&&_0x4bfcec['hUXsy'](_0x48fcdd['scope'],'user')&&(console['error'](_0x4bfcec[_0x871016(0x100)](_0x871016(0xae)+String(_0x48fcdd['scope'])+'\x20is\x20no\x20longer\x20supported.\x20'+'Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.')),process['exit'](0x1));_0x48fcdd={..._0x48fcdd,'scope':_0x4bfcec[_0x871016(0xdb)]};const _0x2d04b1=!existsSync(getRangerHomeDir());await _0x4bfcec[_0x871016(0xf7)](ensureRangerDir,_0x871016(0xf8));if(_0x48fcdd?.['skipAuth'])console['log']('✓\x20Skipping\x20authentication\x20(--skip-auth)'),_0xceb5a?.['trackPhaseEnd']('auth',{'isFirstRun':_0x2d04b1,'method':_0x4bfcec['XACyA']});else{_0xceb5a?.['trackPhaseStart']('auth');const _0x37a7eb=await _0x4bfcec['hVHCY'](authenticate,_0x2756db);_0xceb5a?.['trackPhaseEnd'](_0x4bfcec['urqwb'],{'isFirstRun':_0x2d04b1,'method':_0x37a7eb[_0x871016(0xde)]});}_0xceb5a?.['trackPhaseStart']('chromium');_0x48fcdd?.['skipChromium']?console['log'](_0x871016(0xa5)):await _0x4bfcec['jLNJt'](ensureChromium,_0x48fcdd?.['withDeps']);_0xceb5a?.[_0x871016(0xe7)]('chromium',{'isFirstRun':_0x2d04b1,'skipped':!!_0x48fcdd?.[_0x871016(0xf1)]}),console['log'](_0x4bfcec['TtVSy']);const _0x1d3a68=_0x48fcdd?.[_0x871016(0xbe)],_0x20b4cf=_0x48fcdd?.['opencode']??![];let _0xc5c36b=null;_0x20b4cf?(_0xceb5a?.['trackPhaseStart'](_0x4bfcec[_0x871016(0xbd)]),_0xc5c36b=await _0x4bfcec['WgMqY'](ensureOpencodePluginConfig,_0x1d3a68),_0xceb5a?.['trackPhaseEnd'](_0x4bfcec[_0x871016(0xbd)],{'isFirstRun':_0x2d04b1,'opencode':!![]})):(_0xceb5a?.['trackPhaseStart'](_0x4bfcec[_0x871016(0xbd)]),await _0x4bfcec[_0x871016(0xd1)](ensureClaudePlugin,_0x1d3a68),_0xceb5a?.['trackPhaseEnd'](_0x871016(0xb9),{'isFirstRun':_0x2d04b1}));if(_0x20b4cf&&_0xc5c36b){_0xceb5a?.['trackPhaseStart'](_0x871016(0xe0));try{await installSkill(_0x4bfcec[_0x871016(0xc9)],{'level':_0xc5c36b['scope'],'cliVersion':getCurrentVersion(),'platform':_0x4bfcec[_0x871016(0xcf)]}),_0xceb5a?.[_0x871016(0xe7)](_0x4bfcec['NzVDN'],{'isFirstRun':_0x2d04b1,'opencode':!![]});}catch(_0x4c3d29){console[_0x871016(0xaa)]('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x4c3d29 instanceof Error?_0x4c3d29['message']:_0x4c3d29),_0xceb5a?.[_0x871016(0xe7)](_0x4bfcec[_0x871016(0xd5)],{'isFirstRun':_0x2d04b1,'opencode':!![],'failed':!![]});}}else _0xceb5a?.['trackPhaseStart'](_0x4bfcec['NzVDN']),await _0x4bfcec[_0x871016(0xfc)](ensureClaudeSkills,_0x1d3a68),_0xceb5a?.['trackPhaseEnd'](_0x4bfcec['NzVDN'],{'isFirstRun':_0x2d04b1});if(_0x48fcdd?.[_0x871016(0xac)])console['log'](_0x871016(0x107));else{if(_0x48fcdd?.[_0x871016(0xc5)]){_0xceb5a?.[_0x871016(0xdd)](_0x4bfcec[_0x871016(0xee)]);const _0x13624b=await _0x4bfcec['ZUAkz'](ensureLocalEnv,{'url':_0x48fcdd['url'],'force':_0x48fcdd?.[_0x871016(0xc6)],'allowInsecureLocalhost':_0x48fcdd?.['allowInsecureLocalhost'],'scope':_0x871016(0xf8)},_0xceb5a);_0xceb5a?.['trackPhaseEnd']('profile',{'isFirstRun':_0x2d04b1,'profileReady':_0x13624b[_0x871016(0xb7)],'userSkipped':_0x13624b['skipped']});}else console[_0x871016(0xcc)](_0x4bfcec[_0x871016(0xa1)](_0x4bfcec['yjgnT'](_0x871016(0xad)+(_0x871016(0xf0)+_0x4bfcec['TTmnE'](bold,_0x4bfcec['bnXdH'])),'\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)'),_0x871016(0xa6))+'\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles');}if(_0x20b4cf)console['log'](_0x4bfcec['tQBAy']),console['log']('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console['log']('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log']('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x40eacb=_0x4bfcec['kYHbH'](bold,_0x4bfcec['hFKoT']);console['log']('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x40eacb+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'+_0x871016(0x9d)+_0x871016(0xb0));}}
@@ -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
+ function _0x366f(_0x3f9aa0,_0x1334f1){_0x3f9aa0=_0x3f9aa0-0x12d;const _0x4cd1bb=_0x4cd1();let _0x366f86=_0x4cd1bb[_0x3f9aa0];return _0x366f86;}const _0x5280e3=_0x366f;(function(_0x56821f,_0x2aab18){const _0x549ae4=_0x366f,_0x1e7224=_0x56821f();while(!![]){try{const _0x570884=parseInt(_0x549ae4(0x134))/0x1+-parseInt(_0x549ae4(0x16e))/0x2*(parseInt(_0x549ae4(0x156))/0x3)+-parseInt(_0x549ae4(0x168))/0x4+-parseInt(_0x549ae4(0x157))/0x5+-parseInt(_0x549ae4(0x170))/0x6*(parseInt(_0x549ae4(0x140))/0x7)+-parseInt(_0x549ae4(0x171))/0x8*(-parseInt(_0x549ae4(0x194))/0x9)+parseInt(_0x549ae4(0x144))/0xa;if(_0x570884===_0x2aab18)break;else _0x1e7224['push'](_0x1e7224['shift']());}catch(_0x616753){_0x1e7224['push'](_0x1e7224['shift']());}}}(_0x4cd1,0x82dc8));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';function _0x4cd1(){const _0x25ba0c=['TEmzb','zaPFm','NEfBb','oFfrr','txrPF','\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)','\x20plugin(s)\x20configured','auth.json.enc','\x20\x20Project-level:','Version:\x20','displayName','UpZKA','\x20\x20Run:\x20ranger\x20setup\x20--opencode','\x0a\x20\x20No\x20active\x20profile\x20set','filter','ranger@trailhead','1395vjCfCh','Dqvdi','\x0a---\x20Profiles\x20---','@ranger-testing/opencode-plugin','has','\x1b[0m','disabled','\x20\x20Not\x20configured','stderr','close','jnDBa','user','\x20\x20\x20\x20','hjpLM','hasPlaintextAuth','283341dQMAFb','log','SioYY','parse','bTOfA','length',':\x20installed\x20(','NQTag','map','cwd','pMuUf','sessionUpdatedAt','7294tBStQI','includes','NcQkr','encrypted','21188490PpLPNh','BDXga','string','GpxNB','path','not_configured','settings.json','AyJKE','\x0a---\x20OpenCode\x20Plugin\x20---','plaintext','none','utf-8','xnuUo','\x20[cloud]','\x1b[1m','settingsPath','\x20(active)','organizationName','177825hwefcR','4146385geZedc','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','isArray','CUFBb','status','GaCMf','CypLV','No\x20profiles\x20configured','name','(not\x20found)','pipe','version','project','SKILL.md','\x20\x20Active:\x20','not_installed','\x1b]8;;\x07','2659768XaAVbi','\x20\x20Run:\x20ranger\x20setup\x20[token]','toString','MHOpz','Root:\x20','join','24uoVhry','xCkmg','2904AelPxD','43544hrFOhB','VvXRQ','plugin','match','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','KvBwm','cached\x20(updated\x20','YYRKw','push','DEBUG','isDirectory','LqWgM','trim','details','\x20\x20User-level:','auth.json','LEmYP','configured','API\x20Token:\x20✗\x20Not\x20found'];_0x4cd1=function(){return _0x25ba0c;};return _0x4cd1();}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=_0x2a1e31=>_0x5280e3(0x152)+_0x2a1e31+_0x5280e3(0x199),link=(_0x57e44c,_0x5d687f)=>'\x1b]8;;file://'+_0x57e44c+'\x07'+(_0x5d687f||_0x57e44c)+_0x5280e3(0x167);async function getOpencodePluginStatus(){const _0x484497=_0x5280e3,_0x13c3a9={'UpZKA':function(_0x20dc86,_0x29e603){return _0x20dc86(_0x29e603);},'CypLV':_0x484497(0x166),'aqtiS':_0x484497(0x197),'txrPF':'opencode-plugin','SioYY':function(_0x436046,_0x505376){return _0x436046(_0x505376);},'jnDBa':function(_0x24486b,_0x1563b9){return _0x24486b(_0x1563b9);},'hjpLM':_0x484497(0x182),'NdtYd':function(_0x58b719,_0x48dcad){return _0x58b719>_0x48dcad;},'zaPFm':function(_0x11464a,_0x47127f){return _0x11464a(_0x47127f);},'ZnFNE':_0x484497(0x149),'LEmYP':'opencode','pMuUf':'debug','yBcxi':'ignore','xCkmg':_0x484497(0x161),'VvXRQ':'data','rMbqA':_0x484497(0x12e)};return new Promise(_0x2d47a2=>{const _0x444742=_0x484497,_0x447cc7=spawn(_0x13c3a9[_0x444742(0x181)],[_0x13c3a9[_0x444742(0x13e)],'config'],{'stdio':[_0x13c3a9['yBcxi'],'pipe',_0x13c3a9[_0x444742(0x16f)]]});let _0x165d85='';_0x447cc7['stdout']?.['on'](_0x13c3a9[_0x444742(0x172)],_0x47f6dc=>{const _0x3f90f4=_0x444742;_0x165d85+=_0x47f6dc[_0x3f90f4(0x16a)]();}),_0x447cc7[_0x444742(0x12d)]?.['on'](_0x13c3a9[_0x444742(0x172)],_0x28d1ce=>{_0x165d85+=_0x28d1ce['toString']();}),_0x447cc7['on']('error',()=>{const _0x472f95=_0x444742;_0x13c3a9[_0x472f95(0x18f)](_0x2d47a2,{'status':_0x13c3a9[_0x472f95(0x15d)]});}),_0x447cc7['on'](_0x13c3a9['rMbqA'],_0x326216=>{const _0xbad0cf=_0x444742,_0x2a31eb={'PbdiH':_0x13c3a9['aqtiS'],'WRtSt':_0x13c3a9[_0xbad0cf(0x188)]};if(_0x326216!==0x0){_0x13c3a9[_0xbad0cf(0x136)](_0x2d47a2,{'status':'not_installed'});return;}const _0x29cc7e=_0x165d85[_0xbad0cf(0x17d)]();let _0x324592=null;if(_0x29cc7e)try{_0x324592=JSON['parse'](_0x29cc7e);}catch{const _0x5a99df=_0x29cc7e[_0xbad0cf(0x174)](/\{[\s\S]*\}$/);if(_0x5a99df)try{_0x324592=JSON[_0xbad0cf(0x137)](_0x5a99df[0x0]);}catch{_0x324592=null;}}const _0x30b5e2=Array[_0xbad0cf(0x159)](_0x324592?.[_0xbad0cf(0x173)])?_0x324592?.[_0xbad0cf(0x173)]:[],_0x401133=_0x30b5e2['some'](_0x43ac85=>{const _0x57e96c=_0xbad0cf;if(typeof _0x43ac85!==_0x57e96c(0x146))return![];return _0x43ac85['includes'](_0x2a31eb['PbdiH'])||_0x43ac85['includes'](_0x2a31eb['WRtSt']);});if(_0x401133){_0x13c3a9[_0xbad0cf(0x12f)](_0x2d47a2,{'status':_0x13c3a9[_0xbad0cf(0x132)],'details':_0x13c3a9['NdtYd'](_0x30b5e2['length'],0x0)?_0x30b5e2['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x30b5e2['length']>0x0){_0x13c3a9[_0xbad0cf(0x185)](_0x2d47a2,{'status':_0xbad0cf(0x149),'details':_0x30b5e2['length']+_0xbad0cf(0x18a)});return;}_0x2d47a2({'status':_0x13c3a9['ZnFNE']});});});}async function getSkillsFromDir(_0xa22f86,_0x431f33){const _0xda5871=_0x5280e3,_0x58c2fe={'bTOfA':function(_0x22bb87,_0x3cb47d,_0x578872){return _0x22bb87(_0x3cb47d,_0x578872);},'bjveO':_0xda5871(0x164),'ayDcU':_0xda5871(0x14f)};if(!existsSync(_0xa22f86))return[];const _0x3c3bd8=[];try{const _0x41a73a=await _0x58c2fe[_0xda5871(0x138)](readdir,_0xa22f86,{'withFileTypes':!![]});for(const _0x3d8dc7 of _0x41a73a){if(_0x3d8dc7[_0xda5871(0x17b)]()){const _0x3fc281=join(_0xa22f86,_0x3d8dc7[_0xda5871(0x15f)],_0x58c2fe['bjveO']);if(existsSync(_0x3fc281)){let _0xb152ba=_0x3d8dc7[_0xda5871(0x15f)];try{const _0x26d493=await readFile(_0x3fc281,_0x58c2fe['ayDcU']),_0x494fed=_0x26d493['match'](/name:\s*(.+)/);_0x494fed&&(_0xb152ba=_0x494fed[0x1]['trim']());}catch{}_0x3c3bd8[_0xda5871(0x179)]({'name':_0x3d8dc7[_0xda5871(0x15f)],'displayName':_0xb152ba,'path':_0x3fc281,'level':_0x431f33});}}}}catch{return[];}return _0x3c3bd8;}async function getInstalledSkills(){const _0x4f79f5=_0x5280e3,_0x1c3cfe={'NEfBb':function(_0x55bd58,_0x4da384,_0x4a5825){return _0x55bd58(_0x4da384,_0x4a5825);},'DEshN':function(_0x24df36){return _0x24df36();}},[_0x5974c1,_0x2c7f8e]=await Promise['all']([_0x1c3cfe[_0x4f79f5(0x186)](getSkillsFromDir,_0x1c3cfe['DEshN'](getProjectSkillsDir),_0x4f79f5(0x163)),getSkillsFromDir(_0x1c3cfe['DEshN'](getUserSkillsDir),_0x4f79f5(0x130))]);return{'project':_0x5974c1,'user':_0x2c7f8e};}async function getEnvironments(){const _0x400763=_0x5280e3,_0x2729ae={'GaCMf':function(_0x58b32f,_0xea8b4b,_0x28258d){return _0x58b32f(_0xea8b4b,_0x28258d);},'NQTag':_0x400763(0x14a),'MHOpz':function(_0x5f13ed,_0x446243,_0x3261dc){return _0x5f13ed(_0x446243,_0x3261dc);},'YSkgJ':function(_0x511f83,_0x171f91,_0x16eab2){return _0x511f83(_0x171f91,_0x16eab2);},'ypOZz':_0x400763(0x18b),'UKmYs':function(_0x40066f,_0x2f0cc9){return _0x40066f(_0x2f0cc9);},'wPVGZ':function(_0x2f8d66,_0x2aff06){return _0x2f8d66(_0x2aff06);},'mIkYa':function(_0x577ab7){return _0x577ab7();}},{envNames:_0x31270f,activeEnv:_0x3cf833}=await _0x2729ae['mIkYa'](getEnvNames),_0x50e269=getRangerDir();if(!existsSync(_0x50e269))return{'envs':[],'activeEnv':null};const _0x59dcf5=_0x31270f['map'](_0x3804ec=>{const _0x21e565=_0x400763,_0x45bd82=getEnvDir(_0x3804ec),_0x77e445=_0x2729ae[_0x21e565(0x15c)](join,_0x45bd82,_0x2729ae[_0x21e565(0x13b)]),_0x59c300=_0x2729ae[_0x21e565(0x16b)](join,_0x45bd82,_0x21e565(0x180)),_0x362f6b=_0x2729ae['YSkgJ'](join,_0x45bd82,_0x2729ae['ypOZz']);return{'name':_0x3804ec,'settingsPath':_0x2729ae['UKmYs'](existsSync,_0x77e445)?_0x77e445:_0x21e565(0x160),'hasPlaintextAuth':_0x2729ae['wPVGZ'](existsSync,_0x59c300),'hasEncryptedAuth':existsSync(_0x362f6b),'isActive':_0x3804ec===_0x3cf833};});return{'envs':_0x59dcf5,'activeEnv':_0x3cf833};}export async function status(){const _0x1b6f4b=_0x5280e3,_0x3fdd1a={'Ccxvw':function(_0x3dcac1){return _0x3dcac1();},'CUFBb':function(_0x567c6a,_0x35b230){return _0x567c6a(_0x35b230);},'LhaBr':function(_0x43a27c,_0x15f8a2,_0x2c81d3){return _0x43a27c(_0x15f8a2,_0x2c81d3);},'LqWgM':function(_0xe2ccef){return _0xe2ccef();},'LFACE':function(_0x180c8a,_0x42c6f5){return _0x180c8a(_0x42c6f5);},'BQCDB':function(_0x2f8e6c,_0x54bfd1){return _0x2f8e6c(_0x54bfd1);},'YYRKw':'configured','heyEZ':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','PRLnF':'ranger@trailhead','AyJKE':'enabled','GpxNB':_0x1b6f4b(0x19a),'xnuUo':'\x20\x20Not\x20installed','Zjgcd':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','Dqvdi':'\x0a---\x20Skills\x20---','GXGIH':function(_0x345b0b,_0x5dc1aa){return _0x345b0b+_0x5dc1aa;},'bRUlp':function(_0x5142c4,_0x53be59){return _0x5142c4===_0x53be59;},'NcQkr':function(_0x4e42e0,_0x29a635){return _0x4e42e0>_0x29a635;},'BDXga':function(_0x25d6e3,_0x17c84e){return _0x25d6e3(_0x17c84e);},'emQCj':function(_0x2be748,_0x3beaea){return _0x2be748>_0x3beaea;},'JKjgV':_0x1b6f4b(0x17f),'oFfrr':function(_0x4722be,_0x470122){return _0x4722be(_0x470122);},'plfmL':'no\x20session','KvBwm':_0x1b6f4b(0x143),'JugxZ':_0x1b6f4b(0x14d),'YijjD':_0x1b6f4b(0x14e),'TEmzb':function(_0x51efd9,_0x554e5e){return _0x51efd9(_0x554e5e);},'tnFvb':function(_0x258ec3,_0x1f0355,_0x77723){return _0x258ec3(_0x1f0355,_0x77723);}};console[_0x1b6f4b(0x135)]('\x0a📊\x20Ranger\x20Status\x0a');const _0x191269=process[_0x1b6f4b(0x13d)](),_0x342e09=_0x3fdd1a['Ccxvw'](getRangerDir);if(!existsSync(_0x342e09)){console[_0x1b6f4b(0x135)](_0x1b6f4b(0x16c)+link(_0x191269,bold(_0x3fdd1a[_0x1b6f4b(0x15a)](basename,_0x191269)))),console[_0x1b6f4b(0x135)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log'](_0x1b6f4b(0x175));return;}console[_0x1b6f4b(0x135)]('Root:\x20'+_0x3fdd1a['LhaBr'](link,_0x191269,_0x3fdd1a[_0x1b6f4b(0x15a)](bold,basename(_0x191269))));const _0xddb19f=getCurrentVersion(),_0x5f028d=_0x3fdd1a['LqWgM'](getLatestVersion);if(_0x5f028d[_0x1b6f4b(0x162)]&&_0x5f028d['version']!==_0xddb19f)console['log'](_0x1b6f4b(0x18d)+_0xddb19f+'\x20(latest:\x20'+_0x5f028d[_0x1b6f4b(0x162)]+')'),console[_0x1b6f4b(0x135)]('\x20\x20Run:\x20ranger\x20update');else _0x5f028d[_0x1b6f4b(0x162)]?console[_0x1b6f4b(0x135)]('Version:\x20'+_0xddb19f+'\x20(up\x20to\x20date)'):console[_0x1b6f4b(0x135)]('Version:\x20'+_0xddb19f);const _0x32c4dd=await getToken();if(_0x32c4dd){const _0x5d7ec2=await _0x3fdd1a['LFACE'](getCurrentUser,_0x32c4dd);_0x5d7ec2['success']?console['log']('Organization:\x20'+_0x3fdd1a['BQCDB'](bold,_0x5d7ec2['user'][_0x1b6f4b(0x155)])):(console[_0x1b6f4b(0x135)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x1b6f4b(0x135)](_0x1b6f4b(0x183)),console[_0x1b6f4b(0x135)](_0x1b6f4b(0x169));process['env'][_0x1b6f4b(0x17a)]&&(console['log']('API\x20Environment:\x20'+_0x3fdd1a[_0x1b6f4b(0x17c)](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+_0x3fdd1a['Ccxvw'](getApiBaseUrl)));console[_0x1b6f4b(0x135)](_0x1b6f4b(0x14c));const _0x121771=await _0x3fdd1a['Ccxvw'](getOpencodePluginStatus);if(_0x121771[_0x1b6f4b(0x15b)]===_0x3fdd1a[_0x1b6f4b(0x178)])console[_0x1b6f4b(0x135)]('\x20\x20'+bold('@ranger-testing/opencode-plugin')+':\x20configured'),_0x121771['details']&&console[_0x1b6f4b(0x135)]('\x20\x20'+_0x121771[_0x1b6f4b(0x17e)]);else _0x121771['status']==='not_configured'?(console['log'](_0x1b6f4b(0x19b)),_0x121771[_0x1b6f4b(0x17e)]&&console[_0x1b6f4b(0x135)]('\x20\x20'+_0x121771[_0x1b6f4b(0x17e)]),console[_0x1b6f4b(0x135)](_0x1b6f4b(0x190))):console['log'](_0x3fdd1a['heyEZ']);console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x210fc4=await _0x3fdd1a['BQCDB'](getPluginInfo,_0x3fdd1a['PRLnF']);if(_0x210fc4){const _0x4b4523=_0x210fc4['scope']||'unknown',_0x23ca30=_0x210fc4['enabled']?_0x3fdd1a[_0x1b6f4b(0x14b)]:_0x3fdd1a[_0x1b6f4b(0x147)];console['log']('\x20\x20'+_0x3fdd1a['LFACE'](bold,_0x1b6f4b(0x193))+_0x1b6f4b(0x13a)+_0x4b4523+',\x20'+_0x23ca30+')');}else console[_0x1b6f4b(0x135)](_0x3fdd1a[_0x1b6f4b(0x150)]),console['log'](_0x3fdd1a['Zjgcd']);console['log'](_0x3fdd1a[_0x1b6f4b(0x195)]);const {project:_0xf95dc,user:_0x20dbff}=await getInstalledSkills(),_0x3a8796=_0xf95dc['filter'](_0x305c36=>RANGER_MANAGED_SKILLS[_0x1b6f4b(0x141)](_0x305c36[_0x1b6f4b(0x15f)])),_0x224439=_0x20dbff[_0x1b6f4b(0x192)](_0x2adf96=>RANGER_MANAGED_SKILLS['includes'](_0x2adf96['name'])),_0xeb82d=_0x3fdd1a['GXGIH'](_0x3a8796[_0x1b6f4b(0x139)],_0x224439['length']);if(_0x3fdd1a['bRUlp'](_0xeb82d,0x0))console[_0x1b6f4b(0x135)]('No\x20skills\x20installed'),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x3fdd1a['NcQkr'](_0x3a8796[_0x1b6f4b(0x139)],0x0)){console[_0x1b6f4b(0x135)](_0x1b6f4b(0x18c));for(const _0x594b98 of _0x3a8796){console[_0x1b6f4b(0x135)]('\x20\x20\x20\x20'+bold(_0x594b98[_0x1b6f4b(0x18e)])+':\x20'+link(_0x594b98['path'],_0x3fdd1a['BDXga'](basename,_0x594b98[_0x1b6f4b(0x148)])));}}if(_0x3fdd1a['emQCj'](_0x224439[_0x1b6f4b(0x139)],0x0)){console['log'](_0x3fdd1a['JKjgV']);for(const _0x493f33 of _0x224439){console['log'](_0x1b6f4b(0x131)+bold(_0x493f33['displayName'])+':\x20'+link(_0x493f33['path'],_0x3fdd1a[_0x1b6f4b(0x187)](basename,_0x493f33[_0x1b6f4b(0x148)])));}}}console[_0x1b6f4b(0x135)](_0x1b6f4b(0x196));const {envs:_0x3a8db3,activeEnv:_0x14b3e4}=await _0x3fdd1a[_0x1b6f4b(0x17c)](getEnvironments);let _0x5947a1=[];if(_0x32c4dd)try{_0x5947a1=await _0x3fdd1a['Ccxvw'](listCloudProfiles);}catch{}const _0x1dd2aa=_0x3a8db3[_0x1b6f4b(0x139)]+_0x5947a1['length'];if(_0x1dd2aa===0x0)console[_0x1b6f4b(0x135)](_0x1b6f4b(0x15e)),console[_0x1b6f4b(0x135)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{if(_0x3fdd1a[_0x1b6f4b(0x142)](_0x1dd2aa,0x5)){const _0x247054=[];_0x5947a1[_0x1b6f4b(0x139)]>0x0&&_0x247054[_0x1b6f4b(0x179)](_0x5947a1['length']+'\x20cloud'),_0x3fdd1a['emQCj'](_0x3a8db3[_0x1b6f4b(0x139)],0x0)&&_0x247054['push'](_0x3a8db3['length']+'\x20local'),console[_0x1b6f4b(0x135)](_0x1dd2aa+'\x20profiles\x20configured\x20('+_0x247054[_0x1b6f4b(0x16d)](',\x20')+')'),_0x14b3e4&&console['log'](_0x1b6f4b(0x165)+_0x3fdd1a['BDXga'](bold,_0x14b3e4)),console[_0x1b6f4b(0x135)](_0x1b6f4b(0x189));}else{for(const _0x381435 of _0x5947a1){const _0x3226df=_0x381435['name']===_0x14b3e4?_0x1b6f4b(0x154):'';console['log']('\x20\x20'+_0x3fdd1a[_0x1b6f4b(0x145)](bold,_0x381435[_0x1b6f4b(0x15f)])+_0x1b6f4b(0x151)+_0x3226df);const _0x1cb9a9=_0x381435['sessionUpdatedAt']?_0x1b6f4b(0x177)+_0x381435[_0x1b6f4b(0x13f)]+')':_0x3fdd1a['plfmL'];console['log']('\x20\x20\x20\x20Session:\x20'+_0x1cb9a9);}const _0x11986f=new Set(_0x5947a1['map'](_0x3d24b4=>_0x3d24b4[_0x1b6f4b(0x15f)]));for(const _0x22cdb8 of _0x3a8db3){if(_0x11986f[_0x1b6f4b(0x198)](_0x22cdb8[_0x1b6f4b(0x15f)]))continue;const _0x37d651=_0x22cdb8['isActive']?_0x1b6f4b(0x154):'',_0x2f32ff=_0x22cdb8['hasEncryptedAuth']?_0x3fdd1a[_0x1b6f4b(0x176)]:_0x22cdb8[_0x1b6f4b(0x133)]?_0x3fdd1a['JugxZ']:_0x3fdd1a['YijjD'];console[_0x1b6f4b(0x135)]('\x20\x20'+_0x3fdd1a[_0x1b6f4b(0x184)](bold,_0x22cdb8[_0x1b6f4b(0x15f)])+'\x20[local]'+_0x37d651),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x2f32ff),_0x22cdb8[_0x1b6f4b(0x153)]!=='(not\x20found)'&&console['log']('\x20\x20\x20\x20Settings:\x20'+_0x3fdd1a['tnFvb'](link,_0x22cdb8['settingsPath'],basename(_0x22cdb8['settingsPath'])));}if(!_0x14b3e4){console['log'](_0x1b6f4b(0x191));const _0x5d0e01=[..._0x5947a1[_0x1b6f4b(0x13c)](_0x947fb7=>_0x947fb7[_0x1b6f4b(0x15f)]),..._0x3a8db3[_0x1b6f4b(0x192)](_0x319368=>!_0x11986f['has'](_0x319368[_0x1b6f4b(0x15f)]))[_0x1b6f4b(0x13c)](_0x2783f4=>_0x2783f4['name'])];console[_0x1b6f4b(0x135)](_0x1b6f4b(0x158)+_0x5d0e01[_0x1b6f4b(0x16d)](',\x20')+')');}}}console[_0x1b6f4b(0x135)]('');}
@@ -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(_0x4a38a0,_0x39f78a){const _0x4fba9c=_0x24ac,_0x576465=_0x4a38a0();while(!![]){try{const _0x5e9fce=-parseInt(_0x4fba9c(0x1f2))/0x1+parseInt(_0x4fba9c(0x1c5))/0x2*(-parseInt(_0x4fba9c(0x200))/0x3)+parseInt(_0x4fba9c(0x1e1))/0x4*(parseInt(_0x4fba9c(0x1cb))/0x5)+parseInt(_0x4fba9c(0x1f5))/0x6*(parseInt(_0x4fba9c(0x1df))/0x7)+parseInt(_0x4fba9c(0x1e0))/0x8+parseInt(_0x4fba9c(0x1e5))/0x9*(parseInt(_0x4fba9c(0x1e2))/0xa)+-parseInt(_0x4fba9c(0x1ce))/0xb;if(_0x5e9fce===_0x39f78a)break;else _0x576465['push'](_0x576465['shift']());}catch(_0x2a3cfa){_0x576465['push'](_0x576465['shift']());}}}(_0x4eeb,0x93e6b));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';function _0x4eeb(){const _0x4cf6b6=['log','402sIQqQS','length','\x0aSuccessfully\x20installed\x20','ranger@trailhead','splice','marketplace','scope','PxlBJ','Update\x20failed\x20for\x20@','utf-8','latest','kFEds','beta','DPZKQ','bQAll','close','\x20ranger-managed\x20skill(s)...','UJERG','version','aIhkD','otrYy','JYqOS','ZuBQB','.gitignore','\x20channel.','trailhead','IOUgk','wroTl','uIdkr','join','VMyDK','test','tvaop','fgneh','xIbcO','13334XhRrwX','\x0aReinstalling\x20','\x0aYour\x20version\x20(','\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','ZOfOc','mDlNv','10DabSfY','Latest\x20version:\x20\x20','KHPKu','9429002afQFWd','NyJni','plugin','cwd','timeoutMs','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','\x20skill\x20','...','user','Rjrez','warn','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','active-profile.txt','WZwrK','error','ignore','aBhsg','1166963OYBmyC','9523952ohKwno','1887076wNQnIi','110gcquTt','win32','SLABz','108729cljjzJ',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','MOsKf','bEGaf','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','\x0aInstalling\x20','findIndex','opencode','yxlQH','XgNQj','dlxDR','inherit','910814jxunOn','\x20—\x20reinstalling\x20@','push','36WDouha','platform','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','qfFhM','rpPFk','\x0aSuccessfully\x20installed\x20latest\x20version.','stdio','cHrPO','Prerelease\x20channel\x20detected\x20(@','trim'];_0x4eeb=function(){return _0x4cf6b6;};return _0x4eeb();}function _0x24ac(_0x41e379,_0x262e51){_0x41e379=_0x41e379-0x1c1;const _0x4eebd8=_0x4eeb();let _0x24acec=_0x4eebd8[_0x41e379];return _0x24acec;}import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x51b22a,_0x278d27,_0x1556c2){const _0x393678=_0x24ac,_0x520907={'WZwrK':function(_0x31addf,_0x4b7a16){return _0x31addf===_0x4b7a16;},'HQIGs':function(_0x55a4cc,_0x22e6a0,_0x3cdeae,_0x4a9f14){return _0x55a4cc(_0x22e6a0,_0x3cdeae,_0x4a9f14);},'ZOfOc':'ignore','qzupx':_0x393678(0x1f1),'PxlBJ':function(_0x569e98,_0xbdc975,_0x280287){return _0x569e98(_0xbdc975,_0x280287);},'XgNQj':_0x393678(0x20f)};return new Promise(_0x417662=>{const _0x4025d3=_0x393678;let _0x2565d6=![],_0x2c032f;const _0x5c620a=_0x217b4c=>{if(_0x2565d6)return;_0x2565d6=!![],_0x2c032f&&clearTimeout(_0x2c032f),_0x417662(_0x217b4c);},_0x2342bb=_0x520907['HQIGs'](spawn,_0x51b22a,_0x278d27,{'stdio':[_0x520907[_0x4025d3(0x1c9)],_0x1556c2?.[_0x4025d3(0x1fb)]??_0x520907['qzupx'],_0x1556c2?.[_0x4025d3(0x1fb)]??'inherit'],'cwd':_0x1556c2?.[_0x4025d3(0x1d1)],'shell':_0x520907[_0x4025d3(0x1db)](process[_0x4025d3(0x1f6)],_0x4025d3(0x1e3))});_0x2c032f=_0x1556c2?.[_0x4025d3(0x1d2)]?_0x520907[_0x4025d3(0x207)](setTimeout,()=>{_0x2342bb['kill'](),_0x2342bb['unref'](),_0x5c620a(![]);},_0x1556c2['timeoutMs']):undefined,_0x2342bb['on'](_0x520907[_0x4025d3(0x1ef)],_0x6ab796=>{_0x5c620a(_0x520907['WZwrK'](_0x6ab796,0x0));}),_0x2342bb['on'](_0x4025d3(0x1dc),()=>{_0x5c620a(![]);});});}export function resolveDistTag(_0x1768b7){const _0x4cd9f6=_0x24ac,_0x99b8bd={'rpPFk':'alpha','nkOTW':_0x4cd9f6(0x20c)};if(/-alpha\./i['test'](_0x1768b7))return _0x99b8bd[_0x4cd9f6(0x1f9)];if(/-beta\./i['test'](_0x1768b7))return _0x99b8bd['nkOTW'];if(/-rc\./i[_0x4cd9f6(0x1c1)](_0x1768b7))return'rc';return'latest';}async function runInstall(_0x417993='latest'){const _0x3733d6=_0x24ac,_0x162c80={'GNUTu':function(_0x31d012,_0x2b7239){return _0x31d012(_0x2b7239);},'bQAll':function(_0x2ebf1e,_0x240b58){return _0x2ebf1e===_0x240b58;},'VZNux':function(_0x4a07cb,_0x52e3c3){return _0x4a07cb(_0x52e3c3);},'qlbZh':'npm','uIdkr':'install','gMfnD':_0x3733d6(0x1dd),'otrYy':'inherit'};return new Promise(_0x12721a=>{const _0x3f78cf=_0x3733d6;console['log'](_0x3f78cf(0x1eb)+PACKAGE_NAME+'@'+_0x417993+'...\x0a');const _0x339076=spawn(_0x162c80['qlbZh'],[_0x162c80[_0x3f78cf(0x21c)],'-g',PACKAGE_NAME+'@'+_0x417993],{'stdio':[_0x162c80['gMfnD'],_0x162c80[_0x3f78cf(0x214)],_0x3f78cf(0x1f1)],'shell':process['platform']==='win32'});_0x339076['on']('close',_0x5d2d48=>{const _0x22c4c3=_0x3f78cf;_0x162c80['GNUTu'](_0x12721a,_0x162c80[_0x22c4c3(0x20e)](_0x5d2d48,0x0));}),_0x339076['on']('error',()=>{_0x162c80['VZNux'](_0x12721a,![]);});});}async function updateClaudeMarketplace(){const _0x508995=_0x24ac,_0x4c763d={'knkFv':function(_0x46b13b,_0x96a57f,_0x103284,_0x4fa465){return _0x46b13b(_0x96a57f,_0x103284,_0x4fa465);},'wroTl':'plugin','Rjrez':'update','xIbcO':'trailhead','fgneh':_0x508995(0x1f7)},_0x564d32=await _0x4c763d['knkFv'](runCommand,'claude',[_0x4c763d[_0x508995(0x21b)],_0x508995(0x205),_0x4c763d[_0x508995(0x1d7)],_0x4c763d[_0x508995(0x1c4)]],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x564d32)throw new Error(_0x4c763d[_0x508995(0x1c3)]);}async function updateClaudePlugin(_0x50fe6e='user'){const _0x16214d=_0x24ac,_0x35d000={'JYqOS':_0x16214d(0x1d0),'ZuBQB':'update','SLABz':'user','dlxDR':'--scope','kSMqF':'project','Bomwv':function(_0x41d714,_0x108177){return _0x41d714===_0x108177;},'GWFUF':'local','DPZKQ':function(_0xb67df7){return _0xb67df7();}},_0x19cb83=[_0x35d000[_0x16214d(0x215)],_0x35d000[_0x16214d(0x216)],'ranger@trailhead'];_0x50fe6e!==_0x35d000[_0x16214d(0x1e4)]&&_0x19cb83[_0x16214d(0x1f4)](_0x35d000[_0x16214d(0x1f0)],_0x50fe6e);const _0x2ed5cf=await runCommand('claude',_0x19cb83,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x50fe6e===_0x35d000['kSMqF']||_0x35d000['Bomwv'](_0x50fe6e,_0x35d000['GWFUF'])?_0x35d000[_0x16214d(0x20d)](getProjectRoot):undefined});if(!_0x2ed5cf)throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x50fe6e+_0x16214d(0x1ea));}function isSkillInstalled(_0x4a7459,_0x4ef293,_0x2894f3){const _0x20c6fc=_0x24ac,_0x558d7f={'RyRtC':function(_0x4185b8,_0x2939fb){return _0x4185b8===_0x2939fb;},'tzQaO':function(_0x498b99,_0x47aca0){return _0x498b99(_0x47aca0);},'mUDNA':function(_0x2bd9b2,_0xa512d3){return _0x2bd9b2(_0xa512d3);}},_0x4797ee=_0x558d7f['RyRtC'](_0x2894f3,_0x20c6fc(0x1ed))?_0x558d7f['tzQaO'](getOpencodeSkillsDir,_0x4ef293):getSkillsDir(_0x4ef293),_0xf90228=join(_0x4797ee,_0x4a7459);return _0x558d7f['mUDNA'](existsSync,_0xf90228);}async function reinstallSkills(_0x4521ec){const _0x1e04af=_0x24ac,_0x1b6a10={'VMyDK':function(_0x232343,_0x36a666,_0x5abe55,_0x404849){return _0x232343(_0x36a666,_0x5abe55,_0x404849);},'afayL':'claude','aBhsg':'opencode','aIhkD':function(_0x53fb91,_0x58ec63,_0x28f108){return _0x53fb91(_0x58ec63,_0x28f108);},'MOsKf':function(_0x4e4366,_0x362db3){return _0x4e4366===_0x362db3;},'UJERG':function(_0x5d5600,_0x212a9b,_0x1d540b){return _0x5d5600(_0x212a9b,_0x1d540b);}},_0x2a566a=['project',_0x1e04af(0x1d6)],_0xe023ec=[];for(const _0x2a6abe of _0x2a566a){for(const _0x1b8ae4 of RANGER_MANAGED_SKILLS){_0x1b6a10[_0x1e04af(0x21e)](isSkillInstalled,_0x1b8ae4,_0x2a6abe,_0x1b6a10['afayL'])&&_0xe023ec[_0x1e04af(0x1f4)]({'skillName':_0x1b8ae4,'level':_0x2a6abe,'platform':'claude'}),isSkillInstalled(_0x1b8ae4,_0x2a6abe,_0x1b6a10['aBhsg'])&&_0xe023ec['push']({'skillName':_0x1b8ae4,'level':_0x2a6abe,'platform':_0x1b6a10[_0x1e04af(0x1de)]});}}for(const _0x439df0 of _0x2a566a){for(const _0x71c9f8 of DEPRECATED_SKILLS){await _0x1b6a10[_0x1e04af(0x213)](removeSkill,_0x71c9f8,_0x439df0);}}if(_0x1b6a10[_0x1e04af(0x1e8)](_0xe023ec[_0x1e04af(0x201)],0x0)){console['log'](_0x1e04af(0x1d3));return;}console['log'](_0x1e04af(0x1c6)+_0xe023ec['length']+_0x1e04af(0x210));for(const {skillName:_0x45d3b4,level:_0x21b190,platform:_0x5be97a}of _0xe023ec){try{await _0x1b6a10[_0x1e04af(0x211)](installSkill,_0x45d3b4,{'level':_0x21b190,'cliVersion':_0x4521ec,'platform':_0x5be97a});}catch(_0x2ac035){console[_0x1e04af(0x1d8)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x5be97a+'\x20'+_0x21b190+_0x1e04af(0x1d4)+_0x45d3b4+':',_0x2ac035);}}}async function ensureActiveProfileGitignored(){const _0x157ff1=_0x24ac,_0x1c9e2f={'DPGmk':_0x157ff1(0x217),'qfFhM':function(_0x53649b,_0x2ab4b8){return _0x53649b(_0x2ab4b8);},'cqOFN':function(_0xe4290b,_0x22a62b,_0x5428c2){return _0xe4290b(_0x22a62b,_0x5428c2);},'tvaop':_0x157ff1(0x209),'NyJni':'active-profile.txt','sFBaD':function(_0x321e2c,_0x33f36c,_0x214a76,_0x46c773){return _0x321e2c(_0x33f36c,_0x214a76,_0x46c773);}},_0x3f723e=join(getRangerDir(),_0x1c9e2f['DPGmk']);if(!_0x1c9e2f[_0x157ff1(0x1f8)](existsSync,_0x3f723e))return![];let _0x4fed5e='';try{_0x4fed5e=await _0x1c9e2f['cqOFN'](readFile,_0x3f723e,_0x1c9e2f[_0x157ff1(0x1c2)]);}catch{return![];}const _0x55d841=_0x4fed5e['split'](/\r?\n/);if(_0x55d841['some'](_0x1948cf=>_0x1948cf['trim']()===_0x157ff1(0x1da)))return![];let _0xd40972=_0x55d841[_0x157ff1(0x1ec)](_0x57ccf6=>_0x57ccf6[_0x157ff1(0x1fe)]()==='active-feature.txt');_0xd40972===-0x1&&(_0xd40972=_0x55d841['length']);_0x55d841[_0x157ff1(0x204)](_0xd40972,0x0,_0x1c9e2f[_0x157ff1(0x1cf)]);let _0x2cdb99=_0x55d841[_0x157ff1(0x21d)]('\x0a');!_0x2cdb99['endsWith']('\x0a')&&(_0x2cdb99+='\x0a');try{await _0x1c9e2f['sFBaD'](writeFile,_0x3f723e,_0x2cdb99,_0x157ff1(0x209));}catch{return![];}return!![];}export async function update(){const _0x2f2c50=_0x24ac,_0x31cf49={'wWeVF':'Checking\x20for\x20updates...','zEUFP':function(_0x39c962){return _0x39c962();},'IOUgk':'Attempting\x20install\x20anyway...','XZIAb':_0x2f2c50(0x1fa),'oWphn':function(_0x111100,_0x5f3db4,_0xc9b8ab){return _0x111100(_0x5f3db4,_0xc9b8ab);},'JIbQS':function(_0x5446bf){return _0x5446bf();},'bQKzf':'Update\x20failed.','bEGaf':function(_0x308a13,_0x3881d3){return _0x308a13(_0x3881d3);},'yLBSz':_0x2f2c50(0x219),'cHrPO':'ranger@trailhead','peKDK':function(_0x53ed14,_0x3c28c3){return _0x53ed14(_0x3c28c3);},'mDlNv':'user','KHPKu':function(_0x38809b,_0x1f7a0f){return _0x38809b===_0x1f7a0f;},'XnqPO':'project','NNiXn':'local','yxlQH':function(_0x306149){return _0x306149();},'kFEds':'\x0a✅\x20Update\x20complete!'},_0x5983d0=getCurrentVersion();console['log']('\x0aCurrent\x20version:\x20'+_0x5983d0);const _0x130965=resolveDistTag(_0x5983d0);if(_0x130965!==_0x2f2c50(0x20a)){console[_0x2f2c50(0x1ff)](_0x2f2c50(0x1fd)+_0x130965+').\x20Staying\x20on\x20'+_0x130965+_0x2f2c50(0x1f3)+_0x130965+_0x2f2c50(0x1d5));const _0x261fad=await runInstall(_0x130965);if(!_0x261fad)throw new Error(_0x2f2c50(0x208)+_0x130965+_0x2f2c50(0x218));const _0x42e14f=getCurrentVersion();console['log'](_0x2f2c50(0x202)+PACKAGE_NAME+'@'+_0x130965+'.'),await reinstallSkills(_0x42e14f),await ensureActiveProfileGitignored(),console[_0x2f2c50(0x1ff)]('\x0a✅\x20Update\x20complete!');return;}console['log'](_0x31cf49['wWeVF']);const _0x27758c=_0x31cf49['zEUFP'](getLatestVersion);let _0x9f97b8=_0x5983d0;if(!_0x27758c['version']){console['warn']('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x27758c['error']),console[_0x2f2c50(0x1ff)](_0x31cf49[_0x2f2c50(0x21a)]);const _0x34dd6e=await runInstall();if(_0x34dd6e)console['log'](_0x31cf49['XZIAb']),_0x9f97b8=getCurrentVersion();else throw new Error('Update\x20failed:\x20'+_0x27758c['error']);}else{const _0x2dfaae=_0x27758c[_0x2f2c50(0x212)];console['log'](_0x2f2c50(0x1cc)+_0x2dfaae);const _0x112399=_0x31cf49['oWphn'](compareVersions,_0x5983d0,_0x2dfaae);if(_0x112399===0x0)console[_0x2f2c50(0x1ff)]('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x112399<0x0)console['log'](_0x2f2c50(0x1c7)+_0x5983d0+_0x2f2c50(0x1e6)+_0x2dfaae+').');else{const _0x1d38bd=await _0x31cf49['JIbQS'](runInstall);if(_0x1d38bd)console[_0x2f2c50(0x1ff)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x2dfaae),_0x9f97b8=_0x2dfaae;else throw new Error(_0x31cf49['bQKzf']);}}}await _0x31cf49[_0x2f2c50(0x1e9)](reinstallSkills,_0x9f97b8);const _0x23401c=await _0x31cf49[_0x2f2c50(0x1e9)](isMarketplaceAdded,_0x31cf49['yLBSz']),_0x327149=await _0x31cf49['bEGaf'](isPluginInstalled,_0x31cf49[_0x2f2c50(0x1fc)]);_0x23401c&&(await updateClaudeMarketplace(),console[_0x2f2c50(0x1ff)]('\x0aClaude\x20marketplace\x20updated\x20(trailhead).'));if(_0x327149){const _0x559bad=await _0x31cf49['peKDK'](getPluginInfo,_0x2f2c50(0x203)),_0x4001f5=_0x559bad?.[_0x2f2c50(0x206)]??_0x31cf49[_0x2f2c50(0x1ca)];await updateClaudePlugin(_0x4001f5);if(_0x31cf49[_0x2f2c50(0x1cd)](_0x4001f5,_0x31cf49['XnqPO']))console['log'](_0x2f2c50(0x1e7));else _0x4001f5===_0x31cf49['NNiXn']?console[_0x2f2c50(0x1ff)](_0x2f2c50(0x1c8)):console['log'](_0x2f2c50(0x1d9));}const _0x32a8cf=await _0x31cf49[_0x2f2c50(0x1ee)](ensureActiveProfileGitignored);console['log'](_0x31cf49[_0x2f2c50(0x20b)]);}
@@ -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(_0x8a2867,_0x1cadad){const _0x152516=_0x4418,_0x4607a0=_0x8a2867();while(!![]){try{const _0x46bfc1=parseInt(_0x152516(0x149))/0x1+parseInt(_0x152516(0x146))/0x2+parseInt(_0x152516(0x13c))/0x3+-parseInt(_0x152516(0x135))/0x4*(-parseInt(_0x152516(0x144))/0x5)+parseInt(_0x152516(0x132))/0x6+-parseInt(_0x152516(0x14a))/0x7*(-parseInt(_0x152516(0x14e))/0x8)+-parseInt(_0x152516(0x13f))/0x9;if(_0x46bfc1===_0x1cadad)break;else _0x4607a0['push'](_0x4607a0['shift']());}catch(_0x4b5acc){_0x4607a0['push'](_0x4607a0['shift']());}}}(_0x2f45,0x6295b));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(_0xa3da0,_0x261370,_0x5708ff){const _0x47b02c=_0x4418,_0x1945e4={'lqnQz':function(_0x59b168){return _0x59b168();},'uwPzp':'legacy','rpubk':'local','Dthwp':function(_0x21953c,_0x5bb92a){return _0x21953c+_0x5bb92a;},'yFgXj':function(_0x318a07,_0x5c1b3a,_0x3df943){return _0x318a07(_0x5c1b3a,_0x3df943);},'eUjrm':_0x47b02c(0x14c),'lvutX':function(_0x74ad08,_0x3c31a0){return _0x74ad08 instanceof _0x3c31a0;},'pdRQQ':function(_0x1ffb17,_0x54891d){return _0x1ffb17(_0x54891d);},'xlEwr':function(_0x48a2b0,_0x3df7e1){return _0x48a2b0+_0x3df7e1;},'LDurB':function(_0x58aecf,_0x11b89e,_0x25e02b){return _0x58aecf(_0x11b89e,_0x25e02b);}},_0x4e32ac=await fetchCloudProfile(_0xa3da0);if(!_0x4e32ac){const {envTypes:_0x3254f1}=await _0x1945e4[_0x47b02c(0x13d)](getEnvNames),_0x1dbf16=_0x3254f1[_0xa3da0];(_0x1dbf16===_0x1945e4[_0x47b02c(0x137)]||_0x1dbf16===_0x1945e4['rpubk']||_0x1dbf16==='ci')&&(console['error'](_0x1945e4['Dthwp'](_0x1945e4[_0x47b02c(0x14b)](_0x47b02c(0x143)+_0xa3da0+_0x47b02c(0x136),'Migrate\x20it\x20to\x20a\x20cloud\x20profile\x20by\x20running:\x0a')+'\x0a',_0x47b02c(0x139)+_0xa3da0+'\x0a')),process['exit'](0x1));}!_0x4e32ac&&(console[_0x47b02c(0x152)]('No\x20profile\x20named\x20\x22'+_0xa3da0+'\x22\x20found.\x0a'+_0x47b02c(0x147)+'\x0a'+(_0x47b02c(0x139)+_0xa3da0+'\x0a')),process['exit'](0x1));const _0x52b639=await fetchAuthConfig()['catch'](()=>null),_0x1c5032=_0x4e32ac[_0x47b02c(0x134)]&&_0x52b639?_0x1945e4[_0x47b02c(0x133)](resolveAuthEnvironmentLocally,_0x52b639,_0x4e32ac[_0x47b02c(0x134)]):null;if(_0x4e32ac['environmentKey']&&_0x1c5032){console['log'](_0x47b02c(0x13e)+_0xa3da0+'\x22\x20via\x20server-side\x20login...');try{const _0x41c53e=await serverSideLogin(_0xa3da0,{'force':!![]});if(_0x41c53e[_0x47b02c(0x145)]===_0x1945e4[_0x47b02c(0x13b)]){console['log']('✓\x20Session\x20refreshed\x20for\x20\x22'+_0xa3da0+'\x22.');return;}_0x41c53e['status']==='not_configured'?console['log']('\x20\x20Server-side\x20login\x20not\x20configured\x20for\x20this\x20org.\x20Falling\x20back\x20to\x20headed\x20browser...'):(_0x41c53e[_0x47b02c(0x14d)]&&(console[_0x47b02c(0x141)](_0x47b02c(0x142)),console[_0x47b02c(0x141)](_0x41c53e['test_output'])),console['log'](_0x47b02c(0x138)));}catch(_0x1e2930){console['log']('\x20\x20Server-side\x20login\x20error:\x20'+(_0x1945e4[_0x47b02c(0x13a)](_0x1e2930,Error)?_0x1e2930[_0x47b02c(0x151)]:_0x1945e4['pdRQQ'](String,_0x1e2930))),console['log'](_0x47b02c(0x138));}}const _0x1cc086=_0x4e32ac[_0x47b02c(0x131)]??{},_0x3aca01=_0x1cc086['setupHeaders'],_0x530a07=_0x1cc086[_0x47b02c(0x148)],_0x18b326=_0x1c5032?{..._0x1c5032,'setupHeaders':_0x3aca01??_0x1c5032[_0x47b02c(0x14f)]}:_0x530a07?{'key':_0x4e32ac['environmentKey']??'','domains':[_0x530a07],'setupHeaders':_0x3aca01}:null;!_0x18b326&&(console[_0x47b02c(0x152)](_0x1945e4['xlEwr'](_0x47b02c(0x143)+_0xa3da0+'\x22\x20has\x20no\x20URL\x20on\x20file\x20to\x20refresh\x20against.\x0a'+'Re-create\x20it\x20with:\x0a','\x0a')+(_0x47b02c(0x139)+_0xa3da0+'\x20--url\x20<your-app-url>\x0a')),process['exit'](0x1)),!isInteractive()&&(console[_0x47b02c(0x152)]('Can\x27t\x20refresh\x20\x22'+_0xa3da0+'\x22\x20non-interactively\x20—\x20this\x20profile\x20needs\x20a\x20headed\x20browser\x20to\x20capture\x20a\x20session.\x0a'+('Run\x20`ranger\x20profile\x20update\x20'+_0xa3da0+'`\x20from\x20a\x20local\x20terminal,\x20or\x20set\x20up\x20automated\x20login\x20for\x20your\x20team\x20(contact\x20eng@ranger.net).')),process[_0x47b02c(0x140)](0x1)),console[_0x47b02c(0x141)](_0x47b02c(0x150)+_0xa3da0+'\x22\x20via\x20headed\x20browser...'),await _0x1945e4['LDurB'](manualBrowserLogin,_0x4e32ac,_0x18b326),console['log']('✓\x20Session\x20refreshed\x20for\x20\x22'+_0xa3da0+'\x22.');}function _0x4418(_0x32824b,_0x17c931){_0x32824b=_0x32824b-0x131;const _0x2f45c1=_0x2f45();let _0x44188e=_0x2f45c1[_0x32824b];return _0x44188e;}function _0x2f45(){const _0x177b89=['40ALWifE','status','1034340ewnXlM','Create\x20it\x20with:\x0a','baseUrl','672658zHPnuU','1393YipEWp','Dthwp','success','test_output','1808FYTatn','setupHeaders','Capturing\x20a\x20fresh\x20session\x20for\x20\x22','message','error','settings','1641480LUUrOT','yFgXj','environmentKey','353264alLLXZ','\x22\x20is\x20a\x20legacy\x20on-disk\x20profile\x20and\x20can\x20no\x20longer\x20be\x20refreshed\x20in\x20place.\x0a','uwPzp','\x20\x20Falling\x20back\x20to\x20headed\x20browser...','\x20\x20ranger\x20profile\x20add\x20','lvutX','eUjrm','538323RkzGZM','lqnQz','Refreshing\x20session\x20for\x20\x22','17914932ktIMXx','exit','log','\x0a\x20\x20Server-side\x20login\x20failed.\x20Test\x20output:','Profile\x20\x22'];_0x2f45=function(){return _0x177b89;};return _0x2f45();}
@@ -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 _0x22c4(_0x10f341,_0x23bd25){_0x10f341=_0x10f341-0xe3;const _0x6a127c=_0x6a12();let _0x22c48a=_0x6a127c[_0x10f341];return _0x22c48a;}(function(_0x40dd9e,_0xcefb90){const _0x2c10cc=_0x22c4,_0x4e43ad=_0x40dd9e();while(!![]){try{const _0x2a6e11=-parseInt(_0x2c10cc(0xe5))/0x1+-parseInt(_0x2c10cc(0xeb))/0x2+parseInt(_0x2c10cc(0xea))/0x3+-parseInt(_0x2c10cc(0xee))/0x4*(parseInt(_0x2c10cc(0xef))/0x5)+parseInt(_0x2c10cc(0xf1))/0x6*(-parseInt(_0x2c10cc(0xe9))/0x7)+-parseInt(_0x2c10cc(0xe4))/0x8*(parseInt(_0x2c10cc(0xe3))/0x9)+-parseInt(_0x2c10cc(0xec))/0xa*(-parseInt(_0x2c10cc(0xe7))/0xb);if(_0x2a6e11===_0xcefb90)break;else _0x4e43ad['push'](_0x4e43ad['shift']());}catch(_0x37bbe6){_0x4e43ad['push'](_0x4e43ad['shift']());}}}(_0x6a12,0xc4278));import{join}from'path';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(_0x2b71fa){const _0x4da20b=_0x22c4,_0x19028c={'axTCb':function(_0xf57a87,_0x3361bd){return _0xf57a87(_0x3361bd);},'Xdxyk':function(_0x538f86,_0x3defd5,_0x4b848e){return _0x538f86(_0x3defd5,_0x4b848e);},'MHFZe':function(_0x4e0323,_0x52b40a){return _0x4e0323===_0x52b40a;},'bKSzu':function(_0xf9301f,_0x18876a){return _0xf9301f+_0x18876a;}},_0x17dc5b=_0x19028c[_0x4da20b(0xf0)](getEnvDir,_0x2b71fa),_0x61417c=_0x19028c['Xdxyk'](join,_0x17dc5b,'settings.json'),_0x3ee454=existsSync(_0x17dc5b)&&existsSync(_0x61417c);if(_0x3ee454){await _0x19028c[_0x4da20b(0xf0)](writeActiveProfileName,_0x2b71fa),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x2b71fa+'\x22');return;}let _0x523f06=null,_0x15aeed=![];try{_0x523f06=await _0x19028c[_0x4da20b(0xf0)](fetchCloudProfile,_0x2b71fa);if(!_0x523f06)_0x15aeed=!![];}catch(_0x8960aa){_0x8960aa instanceof ApiError&&_0x19028c['MHFZe'](_0x8960aa[_0x4da20b(0xe6)],0x194)&&(_0x15aeed=!![]);}if(_0x15aeed)throw new Error(_0x19028c['bKSzu']('Profile\x20\x22'+_0x2b71fa+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20',_0x4da20b(0xed))+(_0x4da20b(0xe8)+_0x2b71fa+'`\x20to\x20create\x20one.'));await writeActiveProfileName(_0x2b71fa),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x2b71fa+'\x22');}function _0x6a12(){const _0x3db59b=['`ranger\x20profile\x20add\x20','8595853ycdrAP','4815885cTMxIb','381414fAARyd','1265170QGLwDP','Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','220oLQvhe','36475TRRQhU','axTCb','6duPHtk','126207gMpXhZ','848METkSJ','658423hFaqWx','status','275RxEiYN'];_0x6a12=function(){return _0x3db59b;};return _0x6a12();}
@@ -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 _0x4e6854=_0x4b7f;(function(_0x54e424,_0x32005b){const _0x7ce464=_0x4b7f,_0x29bb79=_0x54e424();while(!![]){try{const _0x576547=-parseInt(_0x7ce464(0x17b))/0x1+-parseInt(_0x7ce464(0x180))/0x2+-parseInt(_0x7ce464(0x17c))/0x3*(parseInt(_0x7ce464(0x174))/0x4)+parseInt(_0x7ce464(0x17a))/0x5*(parseInt(_0x7ce464(0x176))/0x6)+parseInt(_0x7ce464(0x175))/0x7+parseInt(_0x7ce464(0x178))/0x8+-parseInt(_0x7ce464(0x182))/0x9;if(_0x576547===_0x32005b)break;else _0x29bb79['push'](_0x29bb79['shift']());}catch(_0x2a8f2c){_0x29bb79['push'](_0x29bb79['shift']());}}}(_0x297a,0xde990));import{existsSync}from'fs';import{readFile}from'fs/promises';import{join}from'path';function _0x4b7f(_0x19fce0,_0x211fe5){_0x19fce0=_0x19fce0-0x173;const _0x297a26=_0x297a();let _0x4b7f8e=_0x297a26[_0x19fce0];return _0x4b7f8e;}import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';import{readLastProfile,writeLastProfile}from'./projectsConfig.js';function _0x297a(){const _0x18dc9f=['cwd','2789814efQBUi','Azpsq','11994579gHcPny','utf-8','4139380ozzuHP','8239168wGXSEU','876AWjizc','wKFcy','14385496hUrRIT','GJoyH','59335rpKZRJ','33550bZzfht','3Gunujz','trim','active-env.txt'];_0x297a=function(){return _0x18dc9f;};return _0x297a();}const LEGACY_ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE=_0x4e6854(0x17e);function readLegacyActiveProfileFile(){const _0x59d21c=_0x4e6854,_0x1a1c74={'hyvAl':function(_0x385256){return _0x385256();},'Azpsq':function(_0x290ad8,_0x21f427,_0x578b7e){return _0x290ad8(_0x21f427,_0x578b7e);},'PiAxv':function(_0xf68d95){return _0xf68d95();},'wKFcy':function(_0x31d809,_0x289d76){return _0x31d809(_0x289d76);}},_0xcd1842=[join(_0x1a1c74['hyvAl'](getRangerDir),LEGACY_ACTIVE_PROFILE_FILE),join(getRangerHomeDir(),LEGACY_ACTIVE_PROFILE_FILE),_0x1a1c74[_0x59d21c(0x181)](join,_0x1a1c74['PiAxv'](getRangerDir),LEGACY_ACTIVE_ENV_FILE),join(_0x1a1c74['PiAxv'](getRangerHomeDir),LEGACY_ACTIVE_ENV_FILE)];for(const _0x161920 of _0xcd1842){if(_0x1a1c74[_0x59d21c(0x177)](existsSync,_0x161920))return _0x161920;}return null;}export async function readActiveProfileName(){const _0x2a872d=_0x4e6854,_0x300e47={'GJoyH':function(_0x4f5e48){return _0x4f5e48();}},_0x54c3be=readLastProfile(process['cwd']());if(_0x54c3be)return _0x54c3be;const _0x55fb51=_0x300e47[_0x2a872d(0x179)](readLegacyActiveProfileFile);if(!_0x55fb51)return null;try{return(await readFile(_0x55fb51,_0x2a872d(0x173)))[_0x2a872d(0x17d)]()||null;}catch{return null;}}export async function writeActiveProfileName(_0x4ea1da){const _0x3255eb=_0x4e6854,_0x293427={'PCuHz':function(_0x2fd93a,_0x2ef187,_0x4a2b98){return _0x2fd93a(_0x2ef187,_0x4a2b98);}};_0x293427['PCuHz'](writeLastProfile,process[_0x3255eb(0x17f)](),_0x4ea1da);}
@@ -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 _0x478a01=_0x254e;(function(_0x37cb58,_0x3149f4){const _0x3ec3df=_0x254e,_0x3f26dd=_0x37cb58();while(!![]){try{const _0x4b85b0=-parseInt(_0x3ec3df(0x1ae))/0x1+-parseInt(_0x3ec3df(0x1c4))/0x2+parseInt(_0x3ec3df(0x1b4))/0x3*(parseInt(_0x3ec3df(0x1c0))/0x4)+-parseInt(_0x3ec3df(0x1a6))/0x5+parseInt(_0x3ec3df(0x1ca))/0x6*(-parseInt(_0x3ec3df(0x19f))/0x7)+parseInt(_0x3ec3df(0x1bc))/0x8+-parseInt(_0x3ec3df(0x1dc))/0x9*(-parseInt(_0x3ec3df(0x1af))/0xa);if(_0x4b85b0===_0x3149f4)break;else _0x3f26dd['push'](_0x3f26dd['shift']());}catch(_0x5c645e){_0x3f26dd['push'](_0x3f26dd['shift']());}}}(_0x3a94,0x88cd4));import{delimiter,join}from'path';import{tmpdir}from'os';function _0x3a94(){const _0x1d6e03=['DLuJn','trim','RANGERWRIGHT_DAEMON_START_TIMEOUT_MS','set','map','2660312MaTcmP','AWS_ACCESS_KEY_ID','has','push','88GRXdfp','auDky','npm_config_userconfig','filter','77786lPIqms','TMPDIR','%PATH%','slice','win32','AWS_WEB_IDENTITY_TOKEN_FILE','2658bKqMzB','XDG_CONFIG_HOME','/usr/bin','PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','platform','add','AWS_ROLE_ARN','${PATH}','NOVA_ACT_API_KEY','sJyCX','split','NPM_CONFIG_CACHE','Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false','true','AWS_DEFAULT_REGION','PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.','RANGERWRIGHT_FORCE_CLICK_TIMEOUT_MS','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','1818uxPBFI','NPM_CONFIG_REGISTRY','DEBUG','TMP','NPM_CONFIG_USERCONFIG','fromEntries','11011gkoSzq','USERPROFILE','pkvsn','AWS_SESSION_TOKEN','includes','WECNf','sessionToken','4619185KiiiRa','TEMP','length','NODE_ENV','CHROMIUM_BIN','x-ranger-','PLAYWRIGHT_BROWSERS_PATH','$PATH','1023338NiuoXH','97070mQqPek','LHyAU','npm_config_cache','Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','AWS_SDK_LOAD_CONFIG','129531vIOhbW','pccKu','toLowerCase'];_0x3a94=function(){return _0x1d6e03;};return _0x3a94();}import{mkdirSync}from'fs';import{getAiProxyUrl}from'./environment.js';function _0x254e(_0x31b40f,_0x1a0642){_0x31b40f=_0x31b40f-0x19b;const _0x3a94fc=_0x3a94();let _0x254e13=_0x3a94fc[_0x31b40f];return _0x254e13;}const AI_PROXY_METADATA_HEADERS_ENV_VAR='ANTHROPIC_CUSTOM_HEADERS',AGENT_ENV_PASSTHROUGH_KEYS=['PATH','HOME','TMPDIR',_0x478a01(0x19c),_0x478a01(0x1a7),_0x478a01(0x1a0),'APPDATA','LOCALAPPDATA','XDG_CACHE_HOME',_0x478a01(0x1cb),_0x478a01(0x1ac),_0x478a01(0x1db),'CHROME_BIN',_0x478a01(0x1aa),_0x478a01(0x1b1),_0x478a01(0x1d5),_0x478a01(0x1c2),_0x478a01(0x19d),'npm_config_prefix','NPM_CONFIG_PREFIX','npm_config_registry',_0x478a01(0x1dd),_0x478a01(0x19b),_0x478a01(0x1a9),'RANGER_TEST_SKIP_BROWSER_WAIT','RANGER_TRANSPORT',_0x478a01(0x1b9),'RANGERWRIGHT_CLICK_TIMEOUT_MS',_0x478a01(0x1da),_0x478a01(0x1d2),'AWS_PROFILE','AWS_REGION',_0x478a01(0x1d8),'AWS_CONFIG_FILE','AWS_SHARED_CREDENTIALS_FILE',_0x478a01(0x1bd),'AWS_SECRET_ACCESS_KEY',_0x478a01(0x1a2),_0x478a01(0x1b3),_0x478a01(0x1c9),_0x478a01(0x1d0),'AWS_ROLE_SESSION_NAME',AI_PROXY_METADATA_HEADERS_ENV_VAR],UNEXPANDED_PATH_TOKEN_PATTERNS=[_0x478a01(0x1d1),_0x478a01(0x1ad),_0x478a01(0x1c6)];function parseCustomHeaders(_0x432bb9){const _0x2143f6=_0x478a01,_0x474b72={'jvFYm':function(_0x4e0158,_0x637b22){return _0x4e0158===_0x637b22;},'sJyCX':function(_0x211e5f,_0x5cc82e){return _0x211e5f+_0x5cc82e;}};if(!_0x432bb9)return[];return _0x432bb9['split'](/\r?\n/)[_0x2143f6(0x1bb)](_0x3b9479=>_0x3b9479['trim']())[_0x2143f6(0x1c3)](Boolean)['map'](_0x49ea35=>{const _0x3470bb=_0x2143f6,_0x1cf436=_0x49ea35['indexOf'](':');if(_0x474b72['jvFYm'](_0x1cf436,-0x1))return null;const _0x4d920f=_0x49ea35[_0x3470bb(0x1c7)](0x0,_0x1cf436)[_0x3470bb(0x1b8)](),_0x40a7f2=_0x49ea35['slice'](_0x474b72[_0x3470bb(0x1d3)](_0x1cf436,0x1))[_0x3470bb(0x1b8)]();if(!_0x4d920f)return null;return[_0x4d920f,_0x40a7f2];})[_0x2143f6(0x1c3)](_0x22c672=>_0x22c672!==null);}export function getAgentPathHealthWarning(_0x51717a,_0x17a988=process[_0x478a01(0x1ce)]){const _0x5c2a6e=_0x478a01,_0x4afefb={'WECNf':function(_0x3c298c,_0x2e67f4){return _0x3c298c||_0x2e67f4;},'qAngt':function(_0x3a5a9e,_0x338bf0){return _0x3a5a9e===_0x338bf0;},'pkvsn':function(_0xfa65c0,_0x55f50f){return _0xfa65c0!==_0x55f50f;},'DpGTY':_0x5c2a6e(0x1b2)},_0x3648a2=[],_0x5a7e43=_0x4afefb[_0x5c2a6e(0x1a4)](_0x51717a,'')[_0x5c2a6e(0x1d4)](delimiter)['filter'](Boolean);_0x4afefb['qAngt'](_0x5a7e43['length'],0x0)&&_0x3648a2[_0x5c2a6e(0x1bf)]('PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.');UNEXPANDED_PATH_TOKEN_PATTERNS['some'](_0x8b247=>(_0x51717a||'')['includes'](_0x8b247))&&_0x3648a2[_0x5c2a6e(0x1bf)](_0x5c2a6e(0x1cd));if(_0x4afefb[_0x5c2a6e(0x1a1)](_0x17a988,_0x5c2a6e(0x1c8))){const _0x2960ac=_0x5a7e43[_0x5c2a6e(0x1a3)](_0x5c2a6e(0x1cc)),_0x5a6fe5=_0x5a7e43['includes']('/bin');!_0x2960ac&&!_0x5a6fe5&&_0x3648a2[_0x5c2a6e(0x1bf)](_0x5c2a6e(0x1d9));}if(_0x3648a2[_0x5c2a6e(0x1a8)]===0x0)return null;return{'summary':_0x4afefb['DpGTY'],'issues':_0x3648a2};}export function buildAgentEnv(_0x131e92){const _0x4eaf7f=_0x478a01,_0x5c11ce={'auDky':_0x4eaf7f(0x1d6),'ogulr':_0x4eaf7f(0x1d7),'DLuJn':function(_0x490eb8){return _0x490eb8();},'LHyAU':'ranger-claude-tmp','pccKu':'TMPDIR','PBWPQ':_0x4eaf7f(0x19c),'KUUIc':function(_0x1c1a8f,_0x5d6faf){return _0x1c1a8f==_0x5d6faf;},'CWBxM':function(_0x106263,_0x4b340e){return _0x106263===_0x4b340e;}};if(_0x131e92['byokEnabled'])return Object[_0x4eaf7f(0x19e)](Object['entries'](process['env'])[_0x4eaf7f(0x1c3)](_0x4e3302=>typeof _0x4e3302[0x1]==='string'));if(!_0x131e92[_0x4eaf7f(0x1a5)])throw new Error(_0x5c11ce[_0x4eaf7f(0x1c1)]);const _0x1a35dd={'ANTHROPIC_API_KEY':_0x131e92['sessionToken'],'ANTHROPIC_BASE_URL':getAiProxyUrl(),'DISABLE_TELEMETRY':_0x5c11ce['ogulr']};for(const _0xca89a of AGENT_ENV_PASSTHROUGH_KEYS){const _0x4dea3f=process['env'][_0xca89a];_0x4dea3f&&![_0x4eaf7f(0x1c5),_0x4eaf7f(0x19c),'TEMP']['includes'](_0xca89a)&&(_0x1a35dd[_0xca89a]=_0x4dea3f);}const _0x1fc976=join(_0x5c11ce[_0x4eaf7f(0x1b7)](tmpdir),_0x5c11ce[_0x4eaf7f(0x1b0)]);try{mkdirSync(_0x1fc976,{'recursive':!![]});}catch{}_0x1a35dd[_0x5c11ce[_0x4eaf7f(0x1b5)]]=_0x1fc976,_0x1a35dd[_0x5c11ce['PBWPQ']]=_0x1fc976,_0x1a35dd['TEMP']=_0x1fc976;const _0x1811a2=parseCustomHeaders(process['env'][AI_PROXY_METADATA_HEADERS_ENV_VAR]),_0x54a100=new Map(_0x1811a2),_0x3ea6ba=new Set(_0x1811a2[_0x4eaf7f(0x1bb)](([_0x2d9c93])=>_0x2d9c93['toLowerCase']()));if(_0x131e92['metadata'])for(const [_0x4d2637,_0x4d9c2e]of Object['entries'](_0x131e92['metadata'])){if(_0x5c11ce['KUUIc'](_0x4d9c2e,null)||_0x5c11ce['CWBxM'](_0x4d9c2e,''))continue;const _0xdb71ac=_0x4eaf7f(0x1ab)+_0x4d2637;!_0x3ea6ba[_0x4eaf7f(0x1be)](_0xdb71ac['toLowerCase']())&&(_0x54a100[_0x4eaf7f(0x1ba)](_0xdb71ac,_0x4d9c2e),_0x3ea6ba[_0x4eaf7f(0x1cf)](_0xdb71ac[_0x4eaf7f(0x1b6)]()));}const _0x56b141=Array['from'](_0x54a100['entries']())[_0x4eaf7f(0x1bb)](([_0x34cb02,_0x518998])=>_0x34cb02+':\x20'+_0x518998)['join']('\x0a');return _0x56b141&&(_0x1a35dd[AI_PROXY_METADATA_HEADERS_ENV_VAR]=_0x56b141),_0x1a35dd;}