@ranger-testing/ranger-cli 2.2.3 → 2.2.5

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 (67) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/env.js +1 -1
  7. package/build/commands/feature.js +1 -1
  8. package/build/commands/hook.js +1 -1
  9. package/build/commands/hooks/autoPrompt.js +1 -1
  10. package/build/commands/hooks/disable.js +1 -1
  11. package/build/commands/hooks/enable.js +1 -1
  12. package/build/commands/hooks/exitPlanMode.js +1 -1
  13. package/build/commands/hooks/index.js +1 -1
  14. package/build/commands/hooks/output.js +1 -1
  15. package/build/commands/hooks/planReminder.js +1 -1
  16. package/build/commands/hooks/planStart.js +1 -1
  17. package/build/commands/hooks/postEdit.js +1 -1
  18. package/build/commands/hooks/preCompact.js +1 -1
  19. package/build/commands/hooks/sessionEnd.js +1 -1
  20. package/build/commands/hooks/sessionStart.js +1 -1
  21. package/build/commands/hooks/stopHook.js +1 -1
  22. package/build/commands/index.js +1 -1
  23. package/build/commands/login.js +1 -1
  24. package/build/commands/setup/claude.js +1 -1
  25. package/build/commands/setup/opencode.js +1 -1
  26. package/build/commands/setupCi.js +1 -1
  27. package/build/commands/skillup.js +1 -1
  28. package/build/commands/start.js +1 -1
  29. package/build/commands/status.js +1 -1
  30. package/build/commands/update.js +1 -1
  31. package/build/commands/updateEnv.js +1 -1
  32. package/build/commands/useEnv.js +1 -1
  33. package/build/commands/utils/activeProfile.js +1 -1
  34. package/build/commands/utils/browserSessionsApi.js +1 -1
  35. package/build/commands/utils/claudeConfig.js +1 -1
  36. package/build/commands/utils/claudePlugin.js +1 -1
  37. package/build/commands/utils/crypto.js +1 -1
  38. package/build/commands/utils/desirePathLog.js +1 -1
  39. package/build/commands/utils/deviceAuth.js +1 -1
  40. package/build/commands/utils/environment.js +1 -1
  41. package/build/commands/utils/featureApi.js +1 -1
  42. package/build/commands/utils/featureReportGenerator.js +1 -1
  43. package/build/commands/utils/fixWebmDuration.js +1 -1
  44. package/build/commands/utils/git.js +1 -1
  45. package/build/commands/utils/keychain.js +1 -1
  46. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  47. package/build/commands/utils/mcpImageBase64.js +1 -1
  48. package/build/commands/utils/model.js +1 -1
  49. package/build/commands/utils/opencodeConfig.js +1 -1
  50. package/build/commands/utils/profileMessages.js +1 -1
  51. package/build/commands/utils/profileSetupBanner.js +1 -1
  52. package/build/commands/utils/rangerConfig.js +1 -1
  53. package/build/commands/utils/rangerRoot.js +1 -1
  54. package/build/commands/utils/reportGenerator.js +1 -1
  55. package/build/commands/utils/retry.js +1 -1
  56. package/build/commands/utils/sessionCache.js +1 -1
  57. package/build/commands/utils/settings.js +1 -1
  58. package/build/commands/utils/skillContent.js +1 -1
  59. package/build/commands/utils/skills.js +1 -1
  60. package/build/commands/utils/stitchWebmFiles.js +1 -1
  61. package/build/commands/utils/telemetry.js +1 -1
  62. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  63. package/build/commands/utils/userApi.js +1 -1
  64. package/build/commands/utils/version.js +1 -1
  65. package/build/commands/verifyFeature.js +1 -1
  66. package/build/commands/verifyInBrowser.js +1 -1
  67. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x5bb07c,_0x32595f){const _0x3fb6ee=_0x4f6d,_0xede8dc=_0x5bb07c();while(!![]){try{const _0x475544=parseInt(_0x3fb6ee(0xab))/0x1+-parseInt(_0x3fb6ee(0xaf))/0x2*(parseInt(_0x3fb6ee(0xbe))/0x3)+parseInt(_0x3fb6ee(0xb5))/0x4+-parseInt(_0x3fb6ee(0xc3))/0x5*(parseInt(_0x3fb6ee(0xb0))/0x6)+-parseInt(_0x3fb6ee(0xba))/0x7+parseInt(_0x3fb6ee(0xb9))/0x8*(parseInt(_0x3fb6ee(0xb6))/0x9)+parseInt(_0x3fb6ee(0xb8))/0xa;if(_0x475544===_0x32595f)break;else _0xede8dc['push'](_0xede8dc['shift']());}catch(_0x373ff7){_0xede8dc['push'](_0xede8dc['shift']());}}}(_0x3bcc,0x437d9));import{open}from'fs/promises';import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';import{getSessionEntry}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';function _0x3bcc(){const _0x18bcba=['3004624rEUSTr',')\x20and\x20the\x20token\x20`','\x0a\x0aThis\x20is\x20most\x20likely\x20due\x20to\x20pending\x20scenarios\x20that\x20need\x20to\x20be\x20verified.\x20Please\x20resolve\x20the\x20issue\x20or\x20resume\x20later\x20with:\x0a\x20\x20ranger\x20resume\x0a\x0aIf\x20you\x20are\x20extremely\x20sure\x20this\x20is\x20the\x20user\x27s\x20requirement\x20and\x20want\x20to\x20skip\x20verification\x20for\x20now,\x20send\x20a\x20final\x20message\x20that\x20includes\x20the\x20feature\x20review\x20link\x20(','success','15QZCvha','eXYki','dbOLH',':\x0a\x0a','alloc','475tHmDiV','currentSessionId','size','ktDXF','input','utf8','featureId','read','XVZPd','274533YDFZxc','vPHqz','FGfLx','string','15454kppgon','28146eCJjQK','sessionId','XvXeA','toString','trackCommandStart','311060iRapBL','18DnTjBq','ZqffS','5144730qxWUSM','1292728nNbHXp'];_0x3bcc=function(){return _0x18bcba;};return _0x3bcc();}import{createTelemetryCollector}from'../utils/telemetry.js';function _0x4f6d(_0x43cfe8,_0x3a85be){_0x43cfe8=_0x43cfe8-0xa3;const _0x3bcc7a=_0x3bcc();let _0x4f6d44=_0x3bcc7a[_0x43cfe8];return _0x4f6d44;}export async function stopHook(_0x318bd7){const _0x18585a=_0x4f6d,_0x1ed945={'ktDXF':function(_0x4454a8,_0x49f9cd){return _0x4454a8===_0x49f9cd;},'dbOLH':_0x18585a(0xae),'vPHqz':function(_0x24f912,_0x6ea750,_0x4cae6f,_0x5b1342){return _0x24f912(_0x6ea750,_0x4cae6f,_0x5b1342);},'ERvHg':function(_0x5caf13,_0x51d840,_0x28282f,_0x2539a6){return _0x5caf13(_0x51d840,_0x28282f,_0x2539a6);},'VOkBN':function(_0x45f1fa){return _0x45f1fa();},'ZqffS':function(_0x2e822f,_0x3591d4,_0x26877c){return _0x2e822f(_0x3591d4,_0x26877c);},'IAmOB':function(_0x593b64,_0xdcdb82){return _0x593b64(_0xdcdb82);},'jKuUJ':function(_0x18a42d,_0x3f29fe){return _0x18a42d instanceof _0x3f29fe;},'XmXxV':'block','UtVKA':function(_0x2d1dd5,_0x2d7c2b,_0x4ee945,_0x51cd94){return _0x2d1dd5(_0x2d7c2b,_0x4ee945,_0x51cd94);},'XvXeA':function(_0x187f21,_0x4934e0,_0x273259,_0x18a140){return _0x187f21(_0x4934e0,_0x273259,_0x18a140);}},_0x264b59=await getEnabledHookContext(_0x318bd7),_0x212c84=_0x264b59?.[_0x18585a(0xb1)]??null,_0x122ff5=Boolean(_0x264b59?.['input']?.['stop_hook_active']),_0x128d44=_0x1ed945[_0x18585a(0xa5)](typeof _0x264b59?.[_0x18585a(0xa6)]?.['transcript_path'],_0x1ed945[_0x18585a(0xc0)])?_0x264b59[_0x18585a(0xa6)]['transcript_path']:null;let _0x3151da=!![];if(!_0x212c84){await _0x1ed945[_0x18585a(0xac)](trackStop,_0x212c84,![],_0x3151da);return;}try{const _0x4f0cc2=getSessionEntry(_0x212c84);if(!_0x4f0cc2){await _0x1ed945['ERvHg'](trackStop,_0x212c84,!![],_0x3151da);return;}const _0x36327b='https://dashboard.ranger.net/features/'+_0x4f0cc2['featureId'],_0x13c03a='RANGER_SKIP_VERIFICATION',_0x47f4ef=await _0x1ed945['VOkBN'](getToken),_0x4ed149=!_0x122ff5;let _0x38d794=null,_0x4fc878=null;const _0x595ab7=_0x122ff5&&await _0x1ed945[_0x18585a(0xb7)](transcriptHasToken,_0x128d44,_0x13c03a),_0x1d3b16=await transcriptHasToken(_0x128d44,_0x36327b);if(_0x47f4ef)try{const _0x5185cf=await _0x1ed945['IAmOB'](getFeature,_0x4f0cc2[_0x18585a(0xa8)]);_0x38d794=_0x5185cf['name']??null,_0x4fc878=_0x5185cf[_0x18585a(0xa3)]??null;}catch{}if(_0x47f4ef&&_0x4fc878)try{await _0x1ed945[_0x18585a(0xb7)](concludeSession,_0x4f0cc2['featureId'],_0x4fc878);}catch(_0x5c6eb2){if(_0x595ab7){await _0x1ed945['vPHqz'](trackStop,_0x212c84,!![],_0x3151da);return;}_0x3151da=![];const _0x3721d9=_0x1ed945['jKuUJ'](_0x5c6eb2,Error)?_0x5c6eb2['message']:String(_0x5c6eb2),_0x2ed3c5={'decision':_0x1ed945['XmXxV'],'reason':'Failed\x20to\x20conclude\x20Ranger\x20feature\x20review\x20session'+(_0x38d794?'\x20for\x20\x22'+_0x38d794+'\x22':'')+_0x18585a(0xc1)+_0x3721d9+_0x18585a(0xbc)+_0x36327b+_0x18585a(0xbb)+_0x13c03a+'`,\x20then\x20run\x20/exit\x20again.'};console['log'](JSON['stringify'](_0x2ed3c5)),await trackStop(_0x212c84,!![],_0x3151da);return;}await _0x1ed945['UtVKA'](trackStop,_0x212c84,!![],_0x3151da);return;}catch{await _0x1ed945[_0x18585a(0xb2)](trackStop,_0x212c84,!![],_0x3151da);return;}}async function trackStop(_0xc40277,_0x48792b,_0x563b16){const _0x4b407e=_0x4f6d,_0x55e6b2={'eXYki':_0x4b407e(0xbd)};try{const _0x527a55=createTelemetryCollector('hook:stop');await _0x527a55[_0x4b407e(0xb4)]({'sessionId':_0xc40277??undefined,'hooksEnabled':_0x48792b,'stopAllowed':_0x563b16}),await _0x527a55['trackCommandEnd'](_0x55e6b2[_0x4b407e(0xbf)]);}catch{}}async function transcriptHasToken(_0x5203ea,_0x2212b1){const _0x260023={'ntGzt':function(_0x15a437,_0x11f731,_0x4bdd0e){return _0x15a437(_0x11f731,_0x4bdd0e);}};if(!_0x5203ea)return![];const _0x83aca4=await _0x260023['ntGzt'](readTranscriptTail,_0x5203ea,0x30d40);return _0x83aca4?_0x83aca4['includes'](_0x2212b1):![];}async function readTranscriptTail(_0x51182d,_0x61e88a){const _0x2f416c=_0x4f6d,_0xecacb2={'FGfLx':function(_0x390347,_0x5943fa){return _0x390347-_0x5943fa;},'XVZPd':_0x2f416c(0xa7)};let _0x5d15a2=null;try{_0x5d15a2=await open(_0x51182d,'r');const _0x3e6559=await _0x5d15a2['stat'](),_0x3afdec=Math['min'](_0x3e6559['size'],_0x61e88a);if(_0x3afdec<=0x0)return'';const _0x23d415=Buffer[_0x2f416c(0xc2)](_0x3afdec);return await _0x5d15a2[_0x2f416c(0xa9)](_0x23d415,0x0,_0x3afdec,_0xecacb2[_0x2f416c(0xad)](_0x3e6559[_0x2f416c(0xa4)],_0x3afdec)),_0x23d415[_0x2f416c(0xb3)](_0xecacb2[_0x2f416c(0xaa)]);}catch{return null;}finally{try{await _0x5d15a2?.['close']();}catch{}}}
1
+ (function(_0xeb539e,_0xd5a2ae){const _0x35f79a=_0x3259,_0x3d4d49=_0xeb539e();while(!![]){try{const _0x5b84e1=-parseInt(_0x35f79a(0x1f7))/0x1*(parseInt(_0x35f79a(0x1eb))/0x2)+parseInt(_0x35f79a(0x205))/0x3*(parseInt(_0x35f79a(0x1f2))/0x4)+-parseInt(_0x35f79a(0x1ed))/0x5*(parseInt(_0x35f79a(0x1f3))/0x6)+-parseInt(_0x35f79a(0x209))/0x7+-parseInt(_0x35f79a(0x1f9))/0x8*(-parseInt(_0x35f79a(0x1f8))/0x9)+parseInt(_0x35f79a(0x1fe))/0xa*(parseInt(_0x35f79a(0x1e9))/0xb)+parseInt(_0x35f79a(0x1ea))/0xc;if(_0x5b84e1===_0xd5a2ae)break;else _0x3d4d49['push'](_0x3d4d49['shift']());}catch(_0x279c2f){_0x3d4d49['push'](_0x3d4d49['shift']());}}}(_0x3db9,0x7f764));function _0x3db9(){const _0x5906e1=['close','4238829renWXv','iqLNh','includes','DSjql','`,\x20then\x20run\x20/exit\x20again.','WMUTy','104368OwcIIn','4676688HmLggd','2iBvfRs','success','5TvGucC','DQKKM','KzNZc','name','bdFMF','8hLOUlp','3054678rBlDPp','read',':\x0a\x0a','stop_hook_active','207619KJIvij','99RonqMC','294456SKzhby','transcript_path','featureId','input','stringify','300xKqeAu','BiAEL','message','hook:stop','\x20for\x20\x22','ViUqt','toString','1147683MivzpZ','vfPYh','trackCommandStart'];_0x3db9=function(){return _0x5906e1;};return _0x3db9();}import{open}from'fs/promises';import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';import{getSessionEntry}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';function _0x3259(_0x31f975,_0x583ba8){_0x31f975=_0x31f975-0x1e7;const _0x3db956=_0x3db9();let _0x325975=_0x3db956[_0x31f975];return _0x325975;}import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0x37d2ad){const _0x3ac3fe=_0x3259,_0x40dd6a={'BiAEL':function(_0x5ebeb3,_0x2aa9a2){return _0x5ebeb3(_0x2aa9a2);},'GeshI':function(_0x445ecc,_0x4e54cd){return _0x445ecc===_0x4e54cd;},'cDyUz':'string','vfPYh':function(_0x5c0098,_0x15ea94,_0x19d65c,_0x188b49){return _0x5c0098(_0x15ea94,_0x19d65c,_0x188b49);},'djmdh':function(_0x293f86,_0x108614,_0x50c3d3,_0x3237ff){return _0x293f86(_0x108614,_0x50c3d3,_0x3237ff);},'KzNZc':'RANGER_SKIP_VERIFICATION','WMUTy':function(_0x27eece,_0x17fd88,_0x3762e1){return _0x27eece(_0x17fd88,_0x3762e1);},'iqLNh':function(_0x22439d,_0x5e17d2){return _0x22439d&&_0x5e17d2;},'nwGOP':function(_0x354095,_0x2fbd8a){return _0x354095 instanceof _0x2fbd8a;}},_0x494a6e=await getEnabledHookContext(_0x37d2ad),_0x425b8d=_0x494a6e?.['sessionId']??null,_0x1d8a77=_0x40dd6a[_0x3ac3fe(0x1ff)](Boolean,_0x494a6e?.['input']?.[_0x3ac3fe(0x1f6)]),_0x2bbe0c=_0x40dd6a['GeshI'](typeof _0x494a6e?.[_0x3ac3fe(0x1fc)]?.[_0x3ac3fe(0x1fa)],_0x40dd6a['cDyUz'])?_0x494a6e['input']['transcript_path']:null;let _0x5c799a=!![];if(!_0x425b8d){await _0x40dd6a['vfPYh'](trackStop,_0x425b8d,![],_0x5c799a);return;}try{const _0x39b115=_0x40dd6a[_0x3ac3fe(0x1ff)](getSessionEntry,_0x425b8d);if(!_0x39b115){await _0x40dd6a['djmdh'](trackStop,_0x425b8d,!![],_0x5c799a);return;}const _0x18f6f1='https://dashboard.ranger.net/features/'+_0x39b115[_0x3ac3fe(0x1fb)],_0x2b038f=_0x40dd6a[_0x3ac3fe(0x1ef)],_0x3b6cb5=await getToken(),_0x32cc68=!_0x1d8a77;let _0x37f497=null,_0x29b4ac=null;const _0xcb11eb=_0x1d8a77&&await _0x40dd6a[_0x3ac3fe(0x1e8)](transcriptHasToken,_0x2bbe0c,_0x2b038f),_0x43b49e=await transcriptHasToken(_0x2bbe0c,_0x18f6f1);if(_0x3b6cb5)try{const _0x5b8580=await _0x40dd6a[_0x3ac3fe(0x1ff)](getFeature,_0x39b115['featureId']);_0x37f497=_0x5b8580[_0x3ac3fe(0x1f0)]??null,_0x29b4ac=_0x5b8580['currentSessionId']??null;}catch{}if(_0x40dd6a[_0x3ac3fe(0x20a)](_0x3b6cb5,_0x29b4ac))try{await concludeSession(_0x39b115[_0x3ac3fe(0x1fb)],_0x29b4ac);}catch(_0x23052b){if(_0xcb11eb){await _0x40dd6a[_0x3ac3fe(0x206)](trackStop,_0x425b8d,!![],_0x5c799a);return;}_0x5c799a=![];const _0xea39c4=_0x40dd6a['nwGOP'](_0x23052b,Error)?_0x23052b[_0x3ac3fe(0x200)]:String(_0x23052b),_0x535fd8={'decision':'block','reason':'Failed\x20to\x20conclude\x20Ranger\x20feature\x20review\x20session'+(_0x37f497?_0x3ac3fe(0x202)+_0x37f497+'\x22':'')+_0x3ac3fe(0x1f5)+_0xea39c4+'\x0a\x0aThis\x20is\x20most\x20likely\x20due\x20to\x20pending\x20scenarios\x20that\x20need\x20to\x20be\x20verified.\x20Please\x20resolve\x20the\x20issue\x20or\x20resume\x20later\x20with:\x0a\x20\x20ranger\x20resume\x0a\x0aIf\x20you\x20are\x20extremely\x20sure\x20this\x20is\x20the\x20user\x27s\x20requirement\x20and\x20want\x20to\x20skip\x20verification\x20for\x20now,\x20send\x20a\x20final\x20message\x20that\x20includes\x20the\x20feature\x20review\x20link\x20('+_0x18f6f1+')\x20and\x20the\x20token\x20`'+_0x2b038f+_0x3ac3fe(0x1e7)};console['log'](JSON[_0x3ac3fe(0x1fd)](_0x535fd8)),await trackStop(_0x425b8d,!![],_0x5c799a);return;}await trackStop(_0x425b8d,!![],_0x5c799a);return;}catch{await trackStop(_0x425b8d,!![],_0x5c799a);return;}}async function trackStop(_0x39b328,_0xbbe1b7,_0xf3c338){const _0x351fbd=_0x3259,_0x435a49={'ViUqt':function(_0x166dbe,_0x355df3){return _0x166dbe(_0x355df3);},'DSjql':_0x351fbd(0x201),'DQKKM':function(_0x2d608a,_0x21dfcf){return _0x2d608a??_0x21dfcf;}};try{const _0x3f0828=_0x435a49[_0x351fbd(0x203)](createTelemetryCollector,_0x435a49[_0x351fbd(0x20c)]);await _0x3f0828[_0x351fbd(0x207)]({'sessionId':_0x435a49[_0x351fbd(0x1ee)](_0x39b328,undefined),'hooksEnabled':_0xbbe1b7,'stopAllowed':_0xf3c338}),await _0x3f0828['trackCommandEnd'](_0x351fbd(0x1ec));}catch{}}async function transcriptHasToken(_0x1b6ced,_0x4f790e){const _0x337392=_0x3259;if(!_0x1b6ced)return![];const _0x32d5d9=await readTranscriptTail(_0x1b6ced,0x30d40);return _0x32d5d9?_0x32d5d9[_0x337392(0x20b)](_0x4f790e):![];}async function readTranscriptTail(_0x379e86,_0x1bcec7){const _0x41f37d=_0x3259,_0x345a39={'bdFMF':function(_0x4dc711,_0x17bd3e){return _0x4dc711<=_0x17bd3e;}};let _0x47b10e=null;try{_0x47b10e=await open(_0x379e86,'r');const _0x2473d3=await _0x47b10e['stat'](),_0xe0754f=Math['min'](_0x2473d3['size'],_0x1bcec7);if(_0x345a39[_0x41f37d(0x1f1)](_0xe0754f,0x0))return'';const _0x2ee9bd=Buffer['alloc'](_0xe0754f);return await _0x47b10e[_0x41f37d(0x1f4)](_0x2ee9bd,0x0,_0xe0754f,_0x2473d3['size']-_0xe0754f),_0x2ee9bd[_0x41f37d(0x204)]('utf8');}catch{return null;}finally{try{await _0x47b10e?.[_0x41f37d(0x208)]();}catch{}}}
@@ -1 +1 @@
1
- (function(_0x85b475,_0x7bb1e){var _0x18b465=_0x5932,_0x56ff9b=_0x85b475();while(!![]){try{var _0x14572d=parseInt(_0x18b465(0xad))/0x1+-parseInt(_0x18b465(0xb2))/0x2+-parseInt(_0x18b465(0xae))/0x3+parseInt(_0x18b465(0xaf))/0x4+-parseInt(_0x18b465(0xab))/0x5*(-parseInt(_0x18b465(0xac))/0x6)+-parseInt(_0x18b465(0xb0))/0x7+parseInt(_0x18b465(0xb1))/0x8;if(_0x14572d===_0x7bb1e)break;else _0x56ff9b['push'](_0x56ff9b['shift']());}catch(_0x1bed90){_0x56ff9b['push'](_0x56ff9b['shift']());}}}(_0x4000,0x1f092));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';function _0x4000(){var _0x3f7285=['161702tTSBVz','412390dLvoIe','6LthnFO','133397bjeode','292851zLkSuA','973332lgqGdN','1246014inuTTx','195072qFpMKZ'];_0x4000=function(){return _0x3f7285;};return _0x4000();}export{start}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';export{skillup}from'./skillup.js';function _0x5932(_0x17c7c8,_0x1e56de){_0x17c7c8=_0x17c7c8-0xab;var _0x4000c2=_0x4000();var _0x5932bc=_0x4000c2[_0x17c7c8];return _0x5932bc;}export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
1
+ (function(_0x2d7847,_0x1c1da3){var _0x391e55=_0x57fc,_0x3bdc70=_0x2d7847();while(!![]){try{var _0x1a7ab0=parseInt(_0x391e55(0xdb))/0x1*(-parseInt(_0x391e55(0xdf))/0x2)+-parseInt(_0x391e55(0xe0))/0x3+-parseInt(_0x391e55(0xe2))/0x4*(parseInt(_0x391e55(0xdc))/0x5)+parseInt(_0x391e55(0xe1))/0x6*(-parseInt(_0x391e55(0xde))/0x7)+parseInt(_0x391e55(0xd7))/0x8+parseInt(_0x391e55(0xd9))/0x9*(-parseInt(_0x391e55(0xd8))/0xa)+-parseInt(_0x391e55(0xda))/0xb*(-parseInt(_0x391e55(0xdd))/0xc);if(_0x1a7ab0===_0x1c1da3)break;else _0x3bdc70['push'](_0x3bdc70['shift']());}catch(_0x1696e0){_0x3bdc70['push'](_0x3bdc70['shift']());}}}(_0x500f,0x69d74));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';export{start}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';function _0x57fc(_0x413ac8,_0x1d800d){_0x413ac8=_0x413ac8-0xd7;var _0x500f62=_0x500f();var _0x57fc6a=_0x500f62[_0x413ac8];return _0x57fc6a;}function _0x500f(){var _0xa2e023=['10KmtCdK','2012778AzwpUk','28584105dJjkPV','53902LHmanG','431605ynZuCW','12irjUJf','2219ySdZUJ','14FtEBfl','1252593BLXqkK','13866mWZTOf','36UhfApH','2903456moiBKF'];_0x500f=function(){return _0xa2e023;};return _0x500f();}export{setupCi}from'./setupCi.js';
@@ -1 +1 @@
1
- (function(_0x48d47c,_0x1f48dc){const _0x64ea44=_0x1b24,_0x517cb7=_0x48d47c();while(!![]){try{const _0x7a0584=-parseInt(_0x64ea44(0xbd))/0x1*(-parseInt(_0x64ea44(0xb4))/0x2)+-parseInt(_0x64ea44(0xc4))/0x3*(-parseInt(_0x64ea44(0xb3))/0x4)+parseInt(_0x64ea44(0xbf))/0x5*(parseInt(_0x64ea44(0xc3))/0x6)+-parseInt(_0x64ea44(0xc1))/0x7+-parseInt(_0x64ea44(0xc0))/0x8*(parseInt(_0x64ea44(0xbc))/0x9)+parseInt(_0x64ea44(0xbb))/0xa*(-parseInt(_0x64ea44(0xbe))/0xb)+parseInt(_0x64ea44(0xb2))/0xc;if(_0x7a0584===_0x1f48dc)break;else _0x517cb7['push'](_0x517cb7['shift']());}catch(_0x4b66ed){_0x517cb7['push'](_0x517cb7['shift']());}}}(_0x13c3,0xa8bb5));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x1b24(_0xb1cdf5,_0x3d6d82){_0xb1cdf5=_0xb1cdf5-0xb1;const _0x13c31f=_0x13c3();let _0x1b245e=_0x13c31f[_0xb1cdf5];return _0x1b245e;}import{getCurrentUser}from'./utils/userApi.js';export async function login(){const _0x513041=_0x1b24,_0x4befc6={'toreG':_0x513041(0xb9),'PYvhS':_0x513041(0xb7),'Kapws':function(_0x206389,_0x51cc8d){return _0x206389 instanceof _0x51cc8d;}},_0x56b2e5=process['stdin']['isTTY']&&process[_0x513041(0xb6)][_0x513041(0xc2)];if(!_0x56b2e5)throw new Error(_0x4befc6['toreG']);try{const _0x2e5c0c=await runDeviceAuthFlow(),_0x39907e=await getCurrentUser(_0x2e5c0c);_0x39907e[_0x513041(0xb8)]?console['log'](_0x513041(0xb1)+_0x39907e[_0x513041(0xba)]['organizationName']):console['log'](_0x4befc6[_0x513041(0xc5)]);}catch(_0xf76744){throw new Error('Login\x20failed:\x20'+(_0x4befc6[_0x513041(0xb5)](_0xf76744,Error)?_0xf76744['message']:_0xf76744));}}function _0x13c3(){const _0x3d9864=['82531FMMsVO','22Qsrhko','25hSfxfI','140824JIzMOZ','2839361JJmrMp','isTTY','39210zMRiTP','39KpnvRp','PYvhS','\x0a✅\x20Logged\x20in\x20to\x20','13147248kqyeHO','27224thVrBn','24ONiwSQ','Kapws','stdout','\x0a✅\x20API\x20key\x20stored\x20successfully','success','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','user','5287860rsjtdl','27EQUAkp'];_0x13c3=function(){return _0x3d9864;};return _0x13c3();}
1
+ (function(_0x138d20,_0x93e35f){const _0x4537c0=_0x1137,_0x48c055=_0x138d20();while(!![]){try{const _0x5e12af=parseInt(_0x4537c0(0x75))/0x1+-parseInt(_0x4537c0(0x78))/0x2+-parseInt(_0x4537c0(0x79))/0x3+-parseInt(_0x4537c0(0x7d))/0x4*(parseInt(_0x4537c0(0x76))/0x5)+parseInt(_0x4537c0(0x77))/0x6+-parseInt(_0x4537c0(0x7a))/0x7*(parseInt(_0x4537c0(0x7c))/0x8)+-parseInt(_0x4537c0(0x74))/0x9*(-parseInt(_0x4537c0(0x70))/0xa);if(_0x5e12af===_0x93e35f)break;else _0x48c055['push'](_0x48c055['shift']());}catch(_0x2eafbf){_0x48c055['push'](_0x48c055['shift']());}}}(_0x4a7e,0x230e4));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x1137(_0x21868a,_0x22549){_0x21868a=_0x21868a-0x6f;const _0x4a7e00=_0x4a7e();let _0x113716=_0x4a7e00[_0x21868a];return _0x113716;}function _0x4a7e(){const _0x5b8103=['Login\x20failed:\x20','25370lMKCIU','isTTY','stdin','log','1692Mkgckb','166564SsiTDl','5tnCiRI','239754uLBaJh','527390sWTlcB','260862dAtAIj','63QsuzrI','message','58984oAqbWj','491540oGsVZF','\x0a✅\x20Logged\x20in\x20to\x20'];_0x4a7e=function(){return _0x5b8103;};return _0x4a7e();}import{getCurrentUser}from'./utils/userApi.js';export async function login(){const _0x54209d=_0x1137,_0x1cdc8c={'KbVPb':function(_0x902558){return _0x902558();},'OqHGb':'\x0a✅\x20API\x20key\x20stored\x20successfully'},_0x205f05=process[_0x54209d(0x72)][_0x54209d(0x71)]&&process['stdout']['isTTY'];if(!_0x205f05)throw new Error('Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.');try{const _0x2a76ec=await _0x1cdc8c['KbVPb'](runDeviceAuthFlow),_0x3d0f9c=await getCurrentUser(_0x2a76ec);_0x3d0f9c['success']?console['log'](_0x54209d(0x7e)+_0x3d0f9c['user']['organizationName']):console[_0x54209d(0x73)](_0x1cdc8c['OqHGb']);}catch(_0x1de36f){throw new Error(_0x54209d(0x6f)+(_0x1de36f instanceof Error?_0x1de36f[_0x54209d(0x7b)]:_0x1de36f));}}
@@ -1 +1 @@
1
- (function(_0x1def4c,_0x65cd54){const _0x92a88e=_0x52b2,_0x3f564b=_0x1def4c();while(!![]){try{const _0x3b2885=-parseInt(_0x92a88e(0xd6))/0x1*(-parseInt(_0x92a88e(0xec))/0x2)+-parseInt(_0x92a88e(0xc9))/0x3+-parseInt(_0x92a88e(0xe7))/0x4+parseInt(_0x92a88e(0xc2))/0x5+-parseInt(_0x92a88e(0xda))/0x6+-parseInt(_0x92a88e(0xdb))/0x7+parseInt(_0x92a88e(0xe1))/0x8;if(_0x3b2885===_0x65cd54)break;else _0x3f564b['push'](_0x3f564b['shift']());}catch(_0x12be41){_0x3f564b['push'](_0x3f564b['shift']());}}}(_0x5124,0x9fcff));import{join}from'path';import{existsSync}from'fs';function _0x52b2(_0x44ca9c,_0x4748f1){_0x44ca9c=_0x44ca9c-0xc2;const _0x51247a=_0x5124();let _0x52b248=_0x51247a[_0x44ca9c];return _0x52b248;}import _0x3aa7d9 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';function _0x5124(){const _0x4a631b=['ranger@trailhead','tVSFG','error','oPhrG','30pDzrtd','pluginScope','User\x20(available\x20in\x20all\x20your\x20projects)','marketplace','wantsSkillup','1032510gusLbt','ranger','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','CfSIP','log','prompt','TeQBU','68388bLsgWK','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','PooPQ','\x0aYou\x20can\x20install\x20manually\x20with:','SKILL.md','UAitV','\x20level)...\x0a','user','UVvVf','confirm','output','✓\x20Marketplace\x20already\x20added','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','52432tXERHO','add','QARFk','success','2240766pkukpA','5121655XbEmJC','project','OvNyt','LzHJe','OODZP','uQoXg','13273408fEuMKX','plugin','ttBMc','✓\x20Ranger\x20skills\x20already\x20installed','⚠\x20Failed\x20to\x20enable\x20plugin:','❌\x20Failed\x20to\x20add\x20marketplace:','3478580qgRzCU'];_0x5124=function(){return _0x4a631b;};return _0x5124();}import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x354079){const _0x3e7f1a=_0x52b2,_0x351bef={'LzHJe':function(_0x1a78c3,_0x5a3c40){return _0x1a78c3(_0x5a3c40);},'fvFdm':function(_0x3b1b96,_0x1f0885,_0x597692){return _0x3b1b96(_0x1f0885,_0x597692);},'OODZP':function(_0x3a2a91){return _0x3a2a91();},'tkYSO':'.claude','UVvVf':_0x3e7f1a(0xdc),'ttBMc':'list','CfSIP':'Where\x20should\x20the\x20plugin\x20be\x20installed?','LQQJq':_0x3e7f1a(0xee),'RpfVR':'Project\x20(shared\x20with\x20team\x20via\x20git)','QARFk':'trailhead','OvNyt':_0x3e7f1a(0xd4),'qSNRH':_0x3e7f1a(0xd7),'OkRYf':'ranger-testing/trailhead','oPhrG':_0x3e7f1a(0xcc),'KLJhR':_0x3e7f1a(0xca),'uQoXg':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','kEfze':'enable','SLhfS':'ranger@trailhead','PooPQ':_0x3e7f1a(0xe5)},_0x471ab4=await isPluginInstalled('ranger@trailhead');if(_0x471ab4)return console['log'](_0x3e7f1a(0xc4)),![];const _0x488cd8=_0x351bef[_0x3e7f1a(0xde)](existsSync,_0x351bef['fvFdm'](join,_0x351bef[_0x3e7f1a(0xdf)](getProjectRoot),_0x351bef['tkYSO']));let _0x55f28b;if(_0x354079)_0x55f28b=_0x354079;else{if(_0x488cd8)_0x55f28b=_0x351bef[_0x3e7f1a(0xd1)];else{console['log']('\x0a📦\x20Claude\x20Code\x20Plugin\x0a');const _0x301fa6=await _0x3aa7d9[_0x3e7f1a(0xc7)]([{'type':_0x351bef[_0x3e7f1a(0xe3)],'name':_0x3e7f1a(0xed),'message':_0x351bef[_0x3e7f1a(0xc5)],'choices':[{'name':_0x351bef['LQQJq'],'value':_0x3e7f1a(0xd0)},{'name':_0x351bef['RpfVR'],'value':_0x351bef['UVvVf']}],'default':'user'}]);_0x55f28b=_0x301fa6['pluginScope'];}}console[_0x3e7f1a(0xc6)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x55f28b+_0x3e7f1a(0xcf));const _0x5bc07a=await isMarketplaceAdded(_0x351bef[_0x3e7f1a(0xd8)]);let _0x329201=_0x5bc07a;if(_0x5bc07a)console['log'](_0x351bef[_0x3e7f1a(0xdd)]);else{const _0x4d8d27=await runClaudeCommand(['plugin',_0x3e7f1a(0xef),_0x351bef['qSNRH'],_0x351bef['OkRYf']]);!_0x4d8d27[_0x3e7f1a(0xd9)]?(console['error'](_0x3e7f1a(0xe6),_0x4d8d27['error']),console[_0x3e7f1a(0xc6)](_0x351bef[_0x3e7f1a(0xeb)]),console['log'](_0x351bef['KLJhR']),console['log'](_0x3e7f1a(0xd5)+_0x55f28b)):_0x329201=!![];}if(_0x329201){const _0x2564d6=await runClaudeCommand([_0x3e7f1a(0xe2),'install',_0x3e7f1a(0xe8),'--scope',_0x55f28b]);if(!_0x2564d6['success'])console[_0x3e7f1a(0xea)]('❌\x20Failed\x20to\x20install\x20plugin:',_0x2564d6['error']),console[_0x3e7f1a(0xc6)](_0x351bef[_0x3e7f1a(0xeb)]),console[_0x3e7f1a(0xc6)](_0x3e7f1a(0xd5)+_0x55f28b);else{console[_0x3e7f1a(0xc6)](_0x351bef[_0x3e7f1a(0xe0)]);const _0x5f502f=[_0x3e7f1a(0xe2),_0x351bef['kEfze'],_0x351bef['SLhfS']];_0x55f28b===_0x351bef[_0x3e7f1a(0xd1)]&&_0x5f502f['push']('--scope','project');const _0x5744b4=await runClaudeCommand(_0x5f502f,{'captureOutput':!![]}),_0x292d53=_0x5744b4[_0x3e7f1a(0xd3)]?.['includes']('already\x20enabled');!_0x5744b4['success']&&!_0x292d53?console['error'](_0x351bef[_0x3e7f1a(0xcb)],_0x5744b4[_0x3e7f1a(0xea)]):console[_0x3e7f1a(0xc6)]('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}export async function ensureClaudeSkills(_0xe5a3e6){const _0xfe4b54=_0x52b2,_0x19ac35={'aHiqt':function(_0x437cf4,_0x389e0d,_0x1d20b9,_0x1137aa){return _0x437cf4(_0x389e0d,_0x1d20b9,_0x1137aa);},'tVSFG':function(_0x432ec3,_0x82cffe){return _0x432ec3(_0x82cffe);},'meYCh':'project','sfIgi':_0xfe4b54(0xc3),'TeQBU':function(_0x3e4566,_0x4adac5,_0x3f8e82){return _0x3e4566(_0x4adac5,_0x3f8e82);},'GHIPF':function(_0x206b01){return _0x206b01();},'nsebs':_0xfe4b54(0xd2),'UAitV':_0xfe4b54(0xf0)},_0x24a38a=existsSync(join(getSkillsDir('user'),_0xfe4b54(0xc3),_0xfe4b54(0xcd))),_0x4b6367=existsSync(_0x19ac35['aHiqt'](join,_0x19ac35[_0xfe4b54(0xe9)](getSkillsDir,_0x19ac35['meYCh']),_0x19ac35['sfIgi'],_0xfe4b54(0xcd)));if(_0x24a38a||_0x4b6367)return console['log'](_0xfe4b54(0xe4)),![];const _0x525d56=_0x19ac35['tVSFG'](existsSync,_0x19ac35[_0xfe4b54(0xc8)](join,_0x19ac35['GHIPF'](getProjectRoot),'.claude'));let _0x1425cd=!![];if(_0xe5a3e6)await skillup({'autoInstall':_0xe5a3e6,'suppressUsage':!![]});else{if(_0x525d56)await skillup({'autoInstall':_0x19ac35['meYCh'],'suppressUsage':!![]});else{const _0x5d072b=await _0x3aa7d9[_0xfe4b54(0xc7)]([{'type':_0x19ac35['nsebs'],'name':_0x19ac35[_0xfe4b54(0xce)],'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x1425cd=_0x5d072b[_0xfe4b54(0xf0)],_0x1425cd&&await _0x19ac35[_0xfe4b54(0xe9)](skillup,{'suppressUsage':!![]});}}return _0x1425cd;}
1
+ (function(_0x45851d,_0x30a6e1){const _0x58dfdb=_0x1964,_0x58365e=_0x45851d();while(!![]){try{const _0x367f00=parseInt(_0x58dfdb(0x209))/0x1+parseInt(_0x58dfdb(0x1f7))/0x2+parseInt(_0x58dfdb(0x1e8))/0x3*(-parseInt(_0x58dfdb(0x1f0))/0x4)+-parseInt(_0x58dfdb(0x216))/0x5+-parseInt(_0x58dfdb(0x218))/0x6+parseInt(_0x58dfdb(0x207))/0x7+-parseInt(_0x58dfdb(0x1fe))/0x8*(-parseInt(_0x58dfdb(0x1f3))/0x9);if(_0x367f00===_0x30a6e1)break;else _0x58365e['push'](_0x58365e['shift']());}catch(_0x35a537){_0x58365e['push'](_0x58365e['shift']());}}}(_0x4d77,0x8d2be));function _0x4d77(){const _0x7e80d0=['NJNrf','3272334jUnHIL','wHCva','marketplace','ranger@trailhead','project','jyODZ','success','mFMgx','user','NxacX','prompt','627qmccSg','bhpIQ','⚠\x20Failed\x20to\x20enable\x20plugin:','JhCUc','ofDXt','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','pwhZA','qtEFy','20596DqIYWf','install','LqyBj','18dfzfzF','yYaSq','push','✓\x20Marketplace\x20already\x20added','1446340QkQnXj','CwmbD','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','bhMDk','jJtjr','error','Where\x20should\x20the\x20plugin\x20be\x20installed?','5371352XfnhRU','Knmai','SGRaQ','dAQRG','pluginScope','DGnxB','TPSMf','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','XxKXX','4482275slePej','add','600982RZCPsv','❌\x20Failed\x20to\x20add\x20marketplace:','✓\x20Ranger\x20skills\x20already\x20installed','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','rfVAB','log','qZnry','ANSuk','PcbrT','SKILL.md','\x0aYou\x20can\x20install\x20manually\x20with:','--scope','enable','5537735ztxuZQ'];_0x4d77=function(){return _0x7e80d0;};return _0x4d77();}function _0x1964(_0x5ea2ac,_0x292488){_0x5ea2ac=_0x5ea2ac-0x1e1;const _0x4d7765=_0x4d77();let _0x196490=_0x4d7765[_0x5ea2ac];return _0x196490;}import{join}from'path';import{existsSync}from'fs';import _0x17840c from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x2cedc9){const _0x3a9392=_0x1964,_0x4cd3b8={'NxacX':function(_0x18eb5d,_0x5db0fc){return _0x18eb5d(_0x5db0fc);},'dAQRG':_0x3a9392(0x21b),'jgMFp':function(_0x184ea1){return _0x184ea1();},'TPSMf':'.claude','jyODZ':_0x3a9392(0x1ed),'bhpIQ':_0x3a9392(0x1fd),'ITbWI':'User\x20(available\x20in\x20all\x20your\x20projects)','mFMgx':_0x3a9392(0x1e5),'pwhZA':'Project\x20(shared\x20with\x20team\x20via\x20git)','qtEFy':function(_0x3a4e82,_0x47d947){return _0x3a4e82(_0x47d947);},'VoKXw':'trailhead','dajra':_0x3a9392(0x1f6),'dkNIa':'plugin','cmtYC':_0x3a9392(0x21a),'tzyGz':_0x3a9392(0x208),'ANSuk':_0x3a9392(0x20a),'wHCva':_0x3a9392(0x213),'Knmai':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','XxKXX':_0x3a9392(0x1f1),'NJNrf':_0x3a9392(0x214),'AxCQB':'❌\x20Failed\x20to\x20install\x20plugin:','yYaSq':_0x3a9392(0x215),'rfVAB':_0x3a9392(0x1ea),'jJtjr':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x59f242=await _0x4cd3b8[_0x3a9392(0x1e6)](isPluginInstalled,_0x4cd3b8['dAQRG']);if(_0x59f242)return console[_0x3a9392(0x20e)](_0x3a9392(0x1f9)),![];const _0x2ee8d4=existsSync(join(_0x4cd3b8['jgMFp'](getProjectRoot),_0x4cd3b8[_0x3a9392(0x204)]));let _0x34d111;if(_0x2cedc9)_0x34d111=_0x2cedc9;else{if(_0x2ee8d4)_0x34d111=_0x3a9392(0x1e1);else{console[_0x3a9392(0x20e)](_0x4cd3b8[_0x3a9392(0x1e2)]);const _0x2bc83f=await _0x17840c[_0x3a9392(0x1e7)]([{'type':'list','name':_0x3a9392(0x202),'message':_0x4cd3b8[_0x3a9392(0x1e9)],'choices':[{'name':_0x4cd3b8['ITbWI'],'value':_0x4cd3b8[_0x3a9392(0x1e4)]},{'name':_0x4cd3b8[_0x3a9392(0x1ee)],'value':_0x3a9392(0x1e1)}],'default':_0x4cd3b8['mFMgx']}]);_0x34d111=_0x2bc83f[_0x3a9392(0x202)];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x34d111+'\x20level)...\x0a');const _0x3d67e5=await _0x4cd3b8[_0x3a9392(0x1ef)](isMarketplaceAdded,_0x4cd3b8['VoKXw']);let _0x247b14=_0x3d67e5;if(_0x3d67e5)console[_0x3a9392(0x20e)](_0x4cd3b8['dajra']);else{const _0x82740=await runClaudeCommand([_0x4cd3b8['dkNIa'],_0x4cd3b8['cmtYC'],_0x4cd3b8['tzyGz'],'ranger-testing/trailhead']);!_0x82740[_0x3a9392(0x1e3)]?(console[_0x3a9392(0x1fc)](_0x4cd3b8[_0x3a9392(0x210)],_0x82740[_0x3a9392(0x1fc)]),console['log'](_0x4cd3b8[_0x3a9392(0x219)]),console['log'](_0x4cd3b8[_0x3a9392(0x1ff)]),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x34d111)):_0x247b14=!![];}if(_0x247b14){const _0x1343dd=await _0x4cd3b8['qtEFy'](runClaudeCommand,[_0x4cd3b8['dkNIa'],_0x4cd3b8[_0x3a9392(0x206)],_0x3a9392(0x21b),_0x4cd3b8[_0x3a9392(0x217)],_0x34d111]);if(!_0x1343dd[_0x3a9392(0x1e3)])console['error'](_0x4cd3b8['AxCQB'],_0x1343dd['error']),console['log'](_0x4cd3b8['wHCva']),console['log'](_0x3a9392(0x20c)+_0x34d111);else{console['log'](_0x3a9392(0x205));const _0x1de7f5=[_0x4cd3b8['dkNIa'],_0x4cd3b8[_0x3a9392(0x1f4)],_0x4cd3b8[_0x3a9392(0x201)]];_0x34d111===_0x3a9392(0x1e1)&&_0x1de7f5[_0x3a9392(0x1f5)](_0x4cd3b8[_0x3a9392(0x217)],'project');const _0xa1744=await runClaudeCommand(_0x1de7f5,{'captureOutput':!![]}),_0x1513d2=_0xa1744['output']?.['includes']('already\x20enabled');!_0xa1744[_0x3a9392(0x1e3)]&&!_0x1513d2?console[_0x3a9392(0x1fc)](_0x4cd3b8[_0x3a9392(0x20d)],_0xa1744[_0x3a9392(0x1fc)]):console[_0x3a9392(0x20e)](_0x4cd3b8[_0x3a9392(0x1fb)]);}}return!![];}export async function ensureClaudeSkills(_0x2784d1){const _0x11eab9=_0x1964,_0x1a02c2={'bhMDk':function(_0x4fecc9,_0x37df19,_0x11c2a1,_0x1059c1){return _0x4fecc9(_0x37df19,_0x11c2a1,_0x1059c1);},'XNXjE':_0x11eab9(0x1e5),'PcbrT':_0x11eab9(0x212),'CwmbD':'ranger','LqyBj':_0x11eab9(0x20b),'DGnxB':'.claude','qZnry':function(_0x21ce8a,_0x546390){return _0x21ce8a(_0x546390);},'ofDXt':'confirm','JhCUc':'wantsSkillup','SGRaQ':function(_0x4079f9,_0x2d2aac){return _0x4079f9(_0x2d2aac);}},_0x54e3c7=existsSync(_0x1a02c2[_0x11eab9(0x1fa)](join,getSkillsDir(_0x1a02c2['XNXjE']),'ranger',_0x1a02c2[_0x11eab9(0x211)])),_0x26388b=existsSync(join(getSkillsDir(_0x11eab9(0x1e1)),_0x1a02c2[_0x11eab9(0x1f8)],'SKILL.md'));if(_0x54e3c7||_0x26388b)return console['log'](_0x1a02c2[_0x11eab9(0x1f2)]),![];const _0x459650=existsSync(join(getProjectRoot(),_0x1a02c2[_0x11eab9(0x203)]));let _0x591ef6=!![];if(_0x2784d1)await skillup({'autoInstall':_0x2784d1,'suppressUsage':!![]});else{if(_0x459650)await _0x1a02c2[_0x11eab9(0x20f)](skillup,{'autoInstall':_0x11eab9(0x1e1),'suppressUsage':!![]});else{const _0x3d0f0a=await _0x17840c[_0x11eab9(0x1e7)]([{'type':_0x1a02c2[_0x11eab9(0x1ec)],'name':_0x1a02c2[_0x11eab9(0x1eb)],'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x591ef6=_0x3d0f0a['wantsSkillup'],_0x591ef6&&await _0x1a02c2[_0x11eab9(0x200)](skillup,{'suppressUsage':!![]});}}return _0x591ef6;}
@@ -1 +1 @@
1
- (function(_0x2bc578,_0x4039c8){const _0x56f38f=_0x25d4,_0x1dc000=_0x2bc578();while(!![]){try{const _0x5b90f5=-parseInt(_0x56f38f(0xbd))/0x1*(parseInt(_0x56f38f(0xb3))/0x2)+parseInt(_0x56f38f(0xab))/0x3+parseInt(_0x56f38f(0xb6))/0x4+-parseInt(_0x56f38f(0xca))/0x5+-parseInt(_0x56f38f(0xbc))/0x6+-parseInt(_0x56f38f(0xc8))/0x7+parseInt(_0x56f38f(0xc2))/0x8*(parseInt(_0x56f38f(0xcc))/0x9);if(_0x5b90f5===_0x4039c8)break;else _0x1dc000['push'](_0x1dc000['shift']());}catch(_0x5357a9){_0x1dc000['push'](_0x1dc000['shift']());}}}(_0x2cc4,0xeac34));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x1b8780 from'inquirer';function _0x25d4(_0x499c3c,_0x116fc9){_0x499c3c=_0x499c3c-0xab;const _0x2cc49=_0x2cc4();let _0x25d448=_0x2cc49[_0x499c3c];return _0x25d448;}function _0x2cc4(){const _0x526608=['eJXDA','prompt','3297539vsEQqQ','https://opencode.ai/config.json','5149360RiMncS','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','738QiCNhq','5076210emwNPD','pWbog','includes','user','utf-8','pluginScope','nOnAL','Project\x20(shared\x20with\x20team\x20via\x20git)','695614SXcTrF','Ouvxi','\x0a📦\x20OpenCode\x20Plugin\x0a','529168QNplFc','plugin','sZxWy','kAzjK','MYBDg','log','4165902fUmMqm','2yzWwPg','qSTZJ','error','User\x20(available\x20in\x20all\x20your\x20projects)','opencode.json','197864PIZTHD','list','@ranger-testing/opencode-plugin','ckDfk'];_0x2cc4=function(){return _0x526608;};return _0x2cc4();}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x15aedd){const _0x181851=_0x25d4,_0x5a7f40={'pWbog':'project','eJXDA':_0x181851(0xc1),'ckDfk':_0x181851(0xc3),'zECEl':'Where\x20should\x20the\x20plugin\x20be\x20installed?','PBAzH':_0x181851(0xc0),'NjLyQ':_0x181851(0xae),'MYBDg':_0x181851(0xb2),'sZxWy':function(_0x21c074,_0x31fd9b,_0x1018d8){return _0x21c074(_0x31fd9b,_0x1018d8);},'Ouvxi':function(_0x561f3e,_0x538a2e){return _0x561f3e(_0x538a2e);},'qSTZJ':_0x181851(0xc9),'kAzjK':function(_0x5b7c97,_0x2477ce){return _0x5b7c97(_0x2477ce);},'HdwZD':_0x181851(0xcb),'fMvZO':'Failed\x20to\x20read\x20opencode.json','nOnAL':function(_0x1c3c1e,_0x4b5959,_0x709801){return _0x1c3c1e(_0x4b5959,_0x709801);},'gXdhL':'✓\x20OpenCode\x20plugin\x20configured'},_0x2fce90=existsSync(join(getOpencodeConfigDir(_0x5a7f40['pWbog']),_0x5a7f40[_0x181851(0xc6)]));let _0x26b998;if(_0x15aedd)_0x26b998=_0x15aedd;else{if(_0x2fce90)_0x26b998=_0x5a7f40[_0x181851(0xac)];else{console['log'](_0x181851(0xb5));const _0x2c7e2a=await _0x1b8780[_0x181851(0xc7)]([{'type':_0x5a7f40[_0x181851(0xc5)],'name':_0x181851(0xb0),'message':_0x5a7f40['zECEl'],'choices':[{'name':_0x5a7f40['PBAzH'],'value':_0x5a7f40['NjLyQ']},{'name':_0x5a7f40[_0x181851(0xba)],'value':'project'}],'default':_0x5a7f40['NjLyQ']}]);_0x26b998=_0x2c7e2a['pluginScope'];}}const _0x2fdce6=_0x5a7f40[_0x181851(0xb8)](join,_0x5a7f40[_0x181851(0xb4)](getOpencodeConfigDir,_0x26b998),_0x181851(0xc1)),_0xfa3291=_0x181851(0xc4),_0x5b9fb7=_0x5a7f40[_0x181851(0xbe)];let _0x163cd7={};if(_0x5a7f40['kAzjK'](existsSync,_0x2fdce6))try{const _0x42ec79=await _0x5a7f40[_0x181851(0xb8)](readFile,_0x2fdce6,_0x181851(0xaf));_0x163cd7=JSON['parse'](_0x42ec79);}catch(_0x28d057){return console[_0x181851(0xbf)](_0x5a7f40['HdwZD']),{'configured':![],'scope':_0x26b998,'error':_0x5a7f40['fMvZO'],'details':_0x28d057};}const _0x3e3bfd=Array['isArray'](_0x163cd7[_0x181851(0xb7)])?_0x163cd7['plugin']:[];if(_0x3e3bfd[_0x181851(0xad)](_0xfa3291))return console['log']('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x26b998};return _0x163cd7['$schema']=_0x163cd7['$schema']||_0x5b9fb7,_0x163cd7[_0x181851(0xb7)]=[..._0x3e3bfd,_0xfa3291],await mkdir(_0x5a7f40[_0x181851(0xb9)](getOpencodeConfigDir,_0x26b998),{'recursive':!![]}),await _0x5a7f40[_0x181851(0xb1)](writeFile,_0x2fdce6,JSON['stringify'](_0x163cd7,null,0x2)+'\x0a'),console[_0x181851(0xbb)](_0x5a7f40['gXdhL']),{'configured':!![],'scope':_0x26b998};}
1
+ function _0x17d6(){const _0x44d54d=['user','$schema','project','25990JvVCuZ','1274000WiWwAV','tqrKW','gPznm','lBzPJ','opencode.json','1639162DacEZC','isArray','ZUDFD','5xFYQnk','6620750FDgzPB','✓\x20OpenCode\x20plugin\x20already\x20configured','error','Failed\x20to\x20read\x20opencode.json','plugin','@ranger-testing/opencode-plugin','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','72MEjscE','28bHYfmk','log','1884870OiCGJZ','9528yCXdgh','list','1114326bQaEAQ'];_0x17d6=function(){return _0x44d54d;};return _0x17d6();}(function(_0x82f3ed,_0x19a5ec){const _0x483f9c=_0x3baf,_0x529100=_0x82f3ed();while(!![]){try{const _0x510cf3=parseInt(_0x483f9c(0x17d))/0x1*(-parseInt(_0x483f9c(0x174))/0x2)+-parseInt(_0x483f9c(0x173))/0x3*(parseInt(_0x483f9c(0x177))/0x4)+parseInt(_0x483f9c(0x16b))/0x5*(-parseInt(_0x483f9c(0x179))/0x6)+-parseInt(_0x483f9c(0x168))/0x7+parseInt(_0x483f9c(0x17e))/0x8+parseInt(_0x483f9c(0x176))/0x9+parseInt(_0x483f9c(0x16c))/0xa;if(_0x510cf3===_0x19a5ec)break;else _0x529100['push'](_0x529100['shift']());}catch(_0x1d8ecc){_0x529100['push'](_0x529100['shift']());}}}(_0x17d6,0x2e590));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';function _0x3baf(_0x12b68b,_0xa6615b){_0x12b68b=_0x12b68b-0x166;const _0x17d6ea=_0x17d6();let _0x3baf60=_0x17d6ea[_0x12b68b];return _0x3baf60;}import _0x1501c9 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x5064e4){const _0x147d91=_0x3baf,_0x5a39cc={'tqrKW':function(_0x358770,_0xeb679b,_0x20bf38){return _0x358770(_0xeb679b,_0x20bf38);},'lBzPJ':function(_0x8f3ec0,_0x5431be){return _0x8f3ec0(_0x5431be);},'gPznm':'project','ojrVH':_0x147d91(0x167),'ZUDFD':'\x0a📦\x20OpenCode\x20Plugin\x0a','mhYBj':_0x147d91(0x16f),'IPTOM':function(_0x24f81c,_0x375b8c,_0x2ce078){return _0x24f81c(_0x375b8c,_0x2ce078);},'IQUDP':function(_0x2e65a9,_0x3fac5c,_0x511c5b){return _0x2e65a9(_0x3fac5c,_0x511c5b);}},_0x3097ee=existsSync(_0x5a39cc[_0x147d91(0x17f)](join,_0x5a39cc[_0x147d91(0x166)](getOpencodeConfigDir,_0x5a39cc[_0x147d91(0x180)]),_0x5a39cc['ojrVH']));let _0xb0d40b;if(_0x5064e4)_0xb0d40b=_0x5064e4;else{if(_0x3097ee)_0xb0d40b=_0x147d91(0x17c);else{console[_0x147d91(0x175)](_0x5a39cc[_0x147d91(0x16a)]);const _0x3ceff5=await _0x1501c9['prompt']([{'type':_0x147d91(0x178),'name':'pluginScope','message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x147d91(0x17a)},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x5a39cc['gPznm']}],'default':_0x147d91(0x17a)}]);_0xb0d40b=_0x3ceff5['pluginScope'];}}const _0x2b194f=_0x5a39cc[_0x147d91(0x17f)](join,_0x5a39cc[_0x147d91(0x166)](getOpencodeConfigDir,_0xb0d40b),'opencode.json'),_0xb3fddf=_0x147d91(0x171),_0x2a7537='https://opencode.ai/config.json';let _0x3bc3fa={};if(_0x5a39cc[_0x147d91(0x166)](existsSync,_0x2b194f))try{const _0x2bae30=await readFile(_0x2b194f,'utf-8');_0x3bc3fa=JSON['parse'](_0x2bae30);}catch(_0x550bb5){return console[_0x147d91(0x16e)](_0x147d91(0x172)),{'configured':![],'scope':_0xb0d40b,'error':_0x5a39cc['mhYBj'],'details':_0x550bb5};}const _0x2fdd28=Array[_0x147d91(0x169)](_0x3bc3fa[_0x147d91(0x170)])?_0x3bc3fa[_0x147d91(0x170)]:[];if(_0x2fdd28['includes'](_0xb3fddf))return console[_0x147d91(0x175)](_0x147d91(0x16d)),{'configured':![],'scope':_0xb0d40b};return _0x3bc3fa[_0x147d91(0x17b)]=_0x3bc3fa[_0x147d91(0x17b)]||_0x2a7537,_0x3bc3fa['plugin']=[..._0x2fdd28,_0xb3fddf],await _0x5a39cc['IPTOM'](mkdir,_0x5a39cc[_0x147d91(0x166)](getOpencodeConfigDir,_0xb0d40b),{'recursive':!![]}),await _0x5a39cc['IQUDP'](writeFile,_0x2b194f,JSON['stringify'](_0x3bc3fa,null,0x2)+'\x0a'),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0xb0d40b};}
@@ -1 +1 @@
1
- (function(_0x2ef66d,_0x1157da){const _0x2cb558=_0x3756,_0x5f0aae=_0x2ef66d();while(!![]){try{const _0x35a575=-parseInt(_0x2cb558(0x17c))/0x1+parseInt(_0x2cb558(0x1ae))/0x2+parseInt(_0x2cb558(0x19b))/0x3+parseInt(_0x2cb558(0x1a6))/0x4*(parseInt(_0x2cb558(0x182))/0x5)+-parseInt(_0x2cb558(0x1b6))/0x6*(parseInt(_0x2cb558(0x1a7))/0x7)+parseInt(_0x2cb558(0x180))/0x8+-parseInt(_0x2cb558(0x1b1))/0x9;if(_0x35a575===_0x1157da)break;else _0x5f0aae['push'](_0x5f0aae['shift']());}catch(_0x3bb0d7){_0x5f0aae['push'](_0x5f0aae['shift']());}}}(_0x3e59,0x5edad));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';function _0x3756(_0x307ce0,_0x5be03d){_0x307ce0=_0x307ce0-0x179;const _0x3e5916=_0x3e59();let _0x375690=_0x3e5916[_0x307ce0];return _0x375690;}import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x3e59(){const _0x70b697=['132YRJSvY','1456CRvpAD','--scope','SmedM','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','trackPhaseStart','Failed\x20to\x20install\x20plugin:','ANQQL','970654cATuhR','Failed\x20to\x20add\x20marketplace:','uWryR','3862557YKiePD','LPzRF','message','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','success','396rbQHpe','dir_setup','nLfRp','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','CI\x20profile\x20\x22','266656VqGxfs','map','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','LGXsU','189936swzvkG','No\x20API\x20token\x20available\x20for\x20decryption','11485kNNnLs','ranger@trailhead','error','trailhead','Multiple\x20CI\x20profiles\x20found:\x20','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','✓\x20Claude\x20Code\x20plugin\x20installed','length','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','plugin','install','kccti','profile','wkosc','skills','trackPhaseEnd','Auto-detected\x20CI\x20profile:\x20','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','skipChromium','huQhm','sessions','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','LAnlz','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','1539636Wrmfhj','evOHt','name','HtGUq','path','settings.json','log','LJjlQ','mOxrN','✓\x20Created\x20profile\x20settings:\x20baseUrl=','jIqlG'];_0x3e59=function(){return _0x70b697;};return _0x3e59();}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(_0x4a624c){const _0x1b7af1=_0x3756,_0x494293={'nGKDA':function(_0x14b264,_0x2cd360,_0x29a154){return _0x14b264(_0x2cd360,_0x29a154);},'ANQQL':function(_0x39b705,_0x2e37fb){return _0x39b705+_0x2e37fb;},'kccti':function(_0x208e65,_0xb5de7c,_0x35256f){return _0x208e65(_0xb5de7c,_0x35256f);}},_0x454eda=getRangerDir(),_0x350e87=join(_0x454eda,'ci');if(_0x4a624c){const _0x339803=_0x494293['nGKDA'](join,_0x350e87,_0x4a624c);return{'name':_0x4a624c,'path':_0x339803};}if(!existsSync(_0x350e87))throw new Error(_0x494293[_0x1b7af1(0x1ad)](_0x1b7af1(0x17e),'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'));const _0x108db0=await readdir(_0x350e87,{'withFileTypes':!![]}),_0x50f1c9=_0x108db0['filter'](_0x5077d8=>_0x5077d8['isDirectory']())[_0x1b7af1(0x17d)](_0x1fcb15=>_0x1fcb15[_0x1b7af1(0x19d)]);if(_0x50f1c9[_0x1b7af1(0x189)]===0x0)throw new Error(_0x1b7af1(0x18a)+'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.');if(_0x50f1c9['length']===0x1){const _0x11eb94=_0x50f1c9[0x0];return console['log'](_0x1b7af1(0x193)+_0x11eb94),{'name':_0x11eb94,'path':_0x494293[_0x1b7af1(0x18e)](join,_0x350e87,_0x11eb94)};}throw new Error(_0x1b7af1(0x186)+_0x50f1c9['join'](',\x20')+_0x1b7af1(0x198));}async function installPluginNonInteractive(){const _0x1165de=_0x3756,_0x209e69={'SmedM':function(_0x57a856,_0x27f252){return _0x57a856(_0x27f252);},'mEaZv':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','LPzRF':_0x1165de(0x17a),'efUJe':'✓\x20Marketplace\x20already\x20added','nLfRp':_0x1165de(0x18c),'cFEYc':'marketplace','wkosc':_0x1165de(0x1af),'BUHJF':'ranger@trailhead','uWryR':_0x1165de(0x19a),'HlMZV':_0x1165de(0x188)},_0x335172=await _0x209e69[_0x1165de(0x1a9)](isPluginInstalled,_0x1165de(0x183));if(_0x335172)return console[_0x1165de(0x1a1)](_0x209e69['mEaZv']),![];console['log'](_0x209e69[_0x1165de(0x1b2)]);const _0x2c0181=await isMarketplaceAdded(_0x1165de(0x185));let _0x28778e=_0x2c0181;if(_0x2c0181)console['log'](_0x209e69['efUJe']);else{const _0x473ac0=await _0x209e69['SmedM'](runClaudeCommand,[_0x209e69[_0x1165de(0x179)],_0x209e69['cFEYc'],'add','ranger-testing/trailhead']);!_0x473ac0[_0x1165de(0x1b5)]?(console['error'](_0x209e69[_0x1165de(0x190)],_0x473ac0[_0x1165de(0x184)]),console[_0x1165de(0x1a1)](_0x1165de(0x1aa))):_0x28778e=!![];}if(_0x28778e){const _0x1d4155=await _0x209e69[_0x1165de(0x1a9)](runClaudeCommand,['plugin',_0x1165de(0x18d),_0x209e69['BUHJF'],_0x1165de(0x1a8),'project']);!_0x1d4155[_0x1165de(0x1b5)]?(console['error'](_0x1165de(0x1ac),_0x1d4155['error']),console['log'](_0x209e69[_0x1165de(0x1b0)])):console[_0x1165de(0x1a1)](_0x209e69['HlMZV']);}return!![];}export async function setupCi(_0x2ece35,_0xe5d09e,_0x4b44c6){const _0x2850bd=_0x3756,_0x52211e={'FLiBT':'\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','LJjlQ':'auth','JLorN':function(_0x2ae9dd,_0x3977c1){return _0x2ae9dd(_0x3977c1);},'niOIJ':'chromium','CVWZk':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','mOxrN':function(_0x26dce3){return _0x26dce3();},'jIqlG':function(_0x1ad19d,_0x250054,_0xca2dd){return _0x1ad19d(_0x250054,_0xca2dd);},'LGXsU':'auth.json','HtGUq':function(_0x363f9a,_0xa8cbe9){return _0x363f9a(_0xa8cbe9);},'evOHt':function(_0x1086e,_0x1dd645){return _0x1086e(_0x1dd645);},'Hvdph':'profile_activate','LAnlz':'plugin','dOEOS':'project','huQhm':_0x2850bd(0x191)};console['log'](_0x52211e['FLiBT']),_0x4b44c6?.['trackPhaseStart'](_0x52211e['LJjlQ']),await _0x52211e['JLorN'](authenticate,_0x2ece35),_0x4b44c6?.['trackPhaseEnd'](_0x52211e[_0x2850bd(0x1a2)]),_0x4b44c6?.['trackPhaseStart'](_0x2850bd(0x1b7));const {path:_0x3eaf02,installed:_0x459a14}=await ensureRangerDir();await writeRangerGitignore(_0x3eaf02);const _0x2c9762=join(_0x3eaf02,_0x2850bd(0x197));!existsSync(_0x2c9762)&&await mkdir(_0x2c9762,{'recursive':!![]});_0x4b44c6?.[_0x2850bd(0x192)]('dir_setup',{'installed':_0x459a14}),_0x4b44c6?.[_0x2850bd(0x1ab)](_0x52211e['niOIJ']);let _0x2b92ba=![];_0xe5d09e?.['skipChromium']?console['log'](_0x52211e['CVWZk']):_0x2b92ba=await _0x52211e['mOxrN'](ensureChromium);_0x4b44c6?.['trackPhaseEnd']('chromium',{'installed':_0x2b92ba,'skipped':!!_0xe5d09e?.[_0x2850bd(0x195)]}),_0x4b44c6?.['trackPhaseStart']('profile_activate');const _0xdf5c0d=await findCiProfile(_0xe5d09e?.[_0x2850bd(0x18f)]);let _0x8514a9=![];_0xe5d09e?.['baseUrl']&&(await mkdir(_0xdf5c0d[_0x2850bd(0x19f)],{'recursive':!![]}),await _0x52211e[_0x2850bd(0x1a5)](saveSettings,_0xdf5c0d['name'],{'baseUrl':_0xe5d09e['baseUrl'],'headless':!![]}),console[_0x2850bd(0x1a1)](_0x2850bd(0x1a4)+_0xe5d09e['baseUrl']),_0x8514a9=!![]);const _0x1726a7=_0x52211e['jIqlG'](join,_0xdf5c0d['path'],_0x2850bd(0x1a0));if(!existsSync(_0x1726a7)&&!_0x8514a9)throw new Error(_0x2850bd(0x17b)+_0xdf5c0d['name']+_0x2850bd(0x1b4));const _0x3beea2=_0x52211e[_0x2850bd(0x1a5)](join,_0xdf5c0d[_0x2850bd(0x19f)],_0x52211e[_0x2850bd(0x17f)]),_0x291cdc=join(_0xdf5c0d[_0x2850bd(0x19f)],'auth.json.enc'),_0x495ec7=_0x52211e['HtGUq'](existsSync,_0x3beea2),_0x1d1e31=_0x52211e['HtGUq'](existsSync,_0x291cdc);if(_0x1d1e31)try{const _0x48bb26=await getToken();if(!_0x48bb26)throw new Error(_0x2850bd(0x181));const _0x2b2dc6=await _0x52211e[_0x2850bd(0x19e)](readFile,_0x291cdc);_0x52211e['jIqlG'](decrypt,_0x2b2dc6,_0x48bb26),console['log'](_0x2850bd(0x18b));}catch(_0x4382f3){const _0x5e7aad=_0x4382f3 instanceof Error?_0x4382f3[_0x2850bd(0x1b3)]:String(_0x4382f3);throw new Error(_0x2850bd(0x187)+_0xdf5c0d[_0x2850bd(0x19d)]+'\x22:\x20'+_0x5e7aad);}else _0x495ec7?console['log']('✓\x20Auth\x20state\x20found'):console['log'](_0x2850bd(0x194));await _0x52211e[_0x2850bd(0x19c)](writeActiveProfileName,_0xdf5c0d[_0x2850bd(0x19d)]),console[_0x2850bd(0x1a1)]('✓\x20Active\x20profile:\x20'+_0xdf5c0d[_0x2850bd(0x19d)]),_0x4b44c6?.['trackPhaseEnd'](_0x52211e['Hvdph'],{'profileName':_0xdf5c0d['name'],'hasAuth':_0x495ec7,'hasEncryptedAuth':_0x1d1e31,'createdSettings':_0x8514a9}),_0x4b44c6?.[_0x2850bd(0x1ab)](_0x52211e[_0x2850bd(0x199)]);const _0x35b415=await _0x52211e[_0x2850bd(0x1a3)](installPluginNonInteractive);_0x4b44c6?.['trackPhaseEnd']('plugin',{'installed':_0x35b415}),_0x4b44c6?.['trackPhaseStart'](_0x2850bd(0x191)),await _0x52211e[_0x2850bd(0x19c)](skillup,{'autoInstall':_0x52211e['dOEOS']}),_0x4b44c6?.['trackPhaseEnd'](_0x52211e[_0x2850bd(0x196)]),console[_0x2850bd(0x1a1)]('\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a');}
1
+ (function(_0xe5d66d,_0x1838f1){const _0x121cac=_0x4834,_0x7f65c3=_0xe5d66d();while(!![]){try{const _0x44a41e=parseInt(_0x121cac(0x106))/0x1*(-parseInt(_0x121cac(0x12b))/0x2)+-parseInt(_0x121cac(0xed))/0x3*(parseInt(_0x121cac(0x10c))/0x4)+parseInt(_0x121cac(0x119))/0x5*(parseInt(_0x121cac(0x126))/0x6)+-parseInt(_0x121cac(0x10f))/0x7*(-parseInt(_0x121cac(0x124))/0x8)+parseInt(_0x121cac(0x109))/0x9+-parseInt(_0x121cac(0xff))/0xa*(parseInt(_0x121cac(0xf6))/0xb)+parseInt(_0x121cac(0x111))/0xc*(parseInt(_0x121cac(0x10b))/0xd);if(_0x44a41e===_0x1838f1)break;else _0x7f65c3['push'](_0x7f65c3['shift']());}catch(_0x45f05a){_0x7f65c3['push'](_0x7f65c3['shift']());}}}(_0x2a09,0xc3eae));function _0x2a09(){const _0x2473ed=['join','success','chromium','36856IjGRIo','name','2219028OFjQdH','byXSk','BuQTG','auth.json','trackPhaseStart','2mCXVdA','iJjMj','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','3gmopIS','project','wKKDi','oJYjw','auth','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','log','sessions','add','12050984wltqlK','baseUrl','WKIJb','Multiple\x20CI\x20profiles\x20found:\x20','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','trailhead','settings.json','message','Auto-detected\x20CI\x20profile:\x20','10tVOOgU','IRotv','plugin','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','profile_activate','Grwml','89402ZEEGKt','skills','dir_setup','10402767PCsAWE','OKwSv','22416446TLQvlR','6174584bVMJMC','HZFUd','trackPhaseEnd','427lDNGJC','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','12rvQrML','cOSDm','PGqHE','skipChromium','✓\x20Active\x20profile:\x20','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','✓\x20Marketplace\x20already\x20added','isDirectory','5GtXkdl','length','path','TQQvm','error','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','YMUhQ','uwirc'];_0x2a09=function(){return _0x2473ed;};return _0x2a09();}import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x4fe280){const _0x219613=_0x4834,_0x3b539f={'rdqou':function(_0x41e7b9){return _0x41e7b9();},'uwirc':function(_0x3cedd4,_0x1181ca,_0x5b1cd0){return _0x3cedd4(_0x1181ca,_0x5b1cd0);},'iJjMj':function(_0x9d4b3d,_0x12f5d9){return _0x9d4b3d(_0x12f5d9);},'sUuea':_0x219613(0x116),'TozBt':function(_0x1cb543,_0x2eb37e){return _0x1cb543+_0x2eb37e;},'JwOrI':_0x219613(0xf2)},_0x441ddb=_0x3b539f['rdqou'](getRangerDir),_0x2807ef=join(_0x441ddb,'ci');if(_0x4fe280){const _0x121516=_0x3b539f[_0x219613(0x120)](join,_0x2807ef,_0x4fe280);return{'name':_0x4fe280,'path':_0x121516};}if(!_0x3b539f[_0x219613(0xeb)](existsSync,_0x2807ef))throw new Error('No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a'+_0x3b539f['sUuea']);const _0x3118a2=await readdir(_0x2807ef,{'withFileTypes':!![]}),_0x1c73a0=_0x3118a2['filter'](_0x1edecc=>_0x1edecc[_0x219613(0x118)]())['map'](_0x11a535=>_0x11a535[_0x219613(0x125)]);if(_0x1c73a0[_0x219613(0x11a)]===0x0)throw new Error(_0x3b539f['TozBt'](_0x3b539f['JwOrI'],'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'));if(_0x1c73a0['length']===0x1){const _0x4947d9=_0x1c73a0[0x0];return console[_0x219613(0xf3)](_0x219613(0xfe)+_0x4947d9),{'name':_0x4947d9,'path':join(_0x2807ef,_0x4947d9)};}throw new Error(_0x219613(0xf9)+_0x1c73a0[_0x219613(0x121)](',\x20')+_0x219613(0x103));}async function installPluginNonInteractive(){const _0x228e94=_0x4834,_0x29a2c8={'oRYjf':function(_0x8e2da2,_0x29daec){return _0x8e2da2(_0x29daec);},'YVbfq':'ranger@trailhead','BuQTG':function(_0x4feb70,_0x330b60){return _0x4feb70(_0x330b60);},'gFFrB':'marketplace','WKIJb':_0x228e94(0xf5),'cOSDm':'Failed\x20to\x20add\x20marketplace:','byXSk':_0x228e94(0x11e),'wKKDi':_0x228e94(0x101)},_0x585bfd=await _0x29a2c8['oRYjf'](isPluginInstalled,_0x29a2c8['YVbfq']);if(_0x585bfd)return console[_0x228e94(0xf3)](_0x228e94(0x102)),![];console['log'](_0x228e94(0x110));const _0x19f5f6=await _0x29a2c8[_0x228e94(0x128)](isMarketplaceAdded,_0x228e94(0xfb));let _0x49e5e9=_0x19f5f6;if(_0x19f5f6)console[_0x228e94(0xf3)](_0x228e94(0x117));else{const _0x64208d=await runClaudeCommand([_0x228e94(0x101),_0x29a2c8['gFFrB'],_0x29a2c8[_0x228e94(0xf8)],'ranger-testing/trailhead']);!_0x64208d[_0x228e94(0x122)]?(console['error'](_0x29a2c8[_0x228e94(0x112)],_0x64208d['error']),console[_0x228e94(0xf3)](_0x29a2c8[_0x228e94(0x127)])):_0x49e5e9=!![];}if(_0x49e5e9){const _0x3ac7fc=await _0x29a2c8['BuQTG'](runClaudeCommand,[_0x29a2c8[_0x228e94(0xef)],'install',_0x29a2c8['YVbfq'],'--scope',_0x228e94(0xee)]);!_0x3ac7fc['success']?(console[_0x228e94(0x11d)]('Failed\x20to\x20install\x20plugin:',_0x3ac7fc['error']),console['log']('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console['log']('✓\x20Claude\x20Code\x20plugin\x20installed');}return!![];}function _0x4834(_0x3499d9,_0x13d30d){_0x3499d9=_0x3499d9-0xeb;const _0x2a0902=_0x2a09();let _0x4834c9=_0x2a0902[_0x3499d9];return _0x4834c9;}export async function setupCi(_0x4345bc,_0x26dbc2,_0x570bf4){const _0x406c91=_0x4834,_0x20deea={'HZFUd':_0x406c91(0xf1),'eJJDC':function(_0x7a6a6d){return _0x7a6a6d();},'oJYjw':function(_0x1c5058,_0x2e5486,_0x4c304c){return _0x1c5058(_0x2e5486,_0x4c304c);},'Grwml':_0x406c91(0xf4),'lDsAl':_0x406c91(0x108),'OKwSv':_0x406c91(0x104),'cqhRE':function(_0x192414,_0x393923){return _0x192414(_0x393923);},'TQQvm':function(_0x175579,_0x59d2d5,_0x17d08e){return _0x175579(_0x59d2d5,_0x17d08e);},'YMUhQ':function(_0x57c3ad,_0x39b292,_0x45dcea){return _0x57c3ad(_0x39b292,_0x45dcea);},'UNGAQ':_0x406c91(0xfc),'PGqHE':function(_0x479546,_0x45f2ad){return _0x479546(_0x45f2ad);},'HLVXL':_0x406c91(0xec),'IRotv':'\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','kfesn':'skills'};console['log']('\x0a🔧\x20Ranger\x20CI\x20Setup\x0a'),_0x570bf4?.['trackPhaseStart']('auth'),await authenticate(_0x4345bc),_0x570bf4?.['trackPhaseEnd'](_0x20deea[_0x406c91(0x10d)]),_0x570bf4?.['trackPhaseStart']('dir_setup');const {path:_0x55e4f3,installed:_0x28496d}=await _0x20deea['eJJDC'](ensureRangerDir);await writeRangerGitignore(_0x55e4f3);const _0x1cf640=_0x20deea[_0x406c91(0xf0)](join,_0x55e4f3,_0x20deea[_0x406c91(0x105)]);!existsSync(_0x1cf640)&&await mkdir(_0x1cf640,{'recursive':!![]});_0x570bf4?.['trackPhaseEnd'](_0x20deea['lDsAl'],{'installed':_0x28496d}),_0x570bf4?.['trackPhaseStart'](_0x406c91(0x123));let _0x5064be=![];_0x26dbc2?.[_0x406c91(0x114)]?console[_0x406c91(0xf3)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x5064be=await ensureChromium();_0x570bf4?.['trackPhaseEnd']('chromium',{'installed':_0x5064be,'skipped':!!_0x26dbc2?.[_0x406c91(0x114)]}),_0x570bf4?.[_0x406c91(0x12a)](_0x20deea['OKwSv']);const _0x58bcc3=await _0x20deea['cqhRE'](findCiProfile,_0x26dbc2?.['profile']);let _0x1a6dfd=![];_0x26dbc2?.[_0x406c91(0xf7)]&&(await _0x20deea[_0x406c91(0x11c)](mkdir,_0x58bcc3['path'],{'recursive':!![]}),await _0x20deea[_0x406c91(0x11f)](saveSettings,_0x58bcc3['name'],{'baseUrl':_0x26dbc2[_0x406c91(0xf7)],'headless':!![]}),console['log']('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x26dbc2['baseUrl']),_0x1a6dfd=!![]);const _0x557ae8=join(_0x58bcc3[_0x406c91(0x11b)],_0x20deea['UNGAQ']);if(!existsSync(_0x557ae8)&&!_0x1a6dfd)throw new Error('CI\x20profile\x20\x22'+_0x58bcc3[_0x406c91(0x125)]+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x6440cb=_0x20deea['TQQvm'](join,_0x58bcc3['path'],_0x406c91(0x129)),_0x19d469=_0x20deea[_0x406c91(0x11f)](join,_0x58bcc3['path'],'auth.json.enc'),_0x189214=existsSync(_0x6440cb),_0x4d957f=_0x20deea[_0x406c91(0x113)](existsSync,_0x19d469);if(_0x4d957f)try{const _0x3ec87e=await getToken();if(!_0x3ec87e)throw new Error('No\x20API\x20token\x20available\x20for\x20decryption');const _0x411c7a=await readFile(_0x19d469);decrypt(_0x411c7a,_0x3ec87e),console['log'](_0x20deea['HLVXL']);}catch(_0x17e107){const _0x4de6f1=_0x17e107 instanceof Error?_0x17e107[_0x406c91(0xfd)]:String(_0x17e107);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x58bcc3[_0x406c91(0x125)]+'\x22:\x20'+_0x4de6f1);}else _0x189214?console['log']('✓\x20Auth\x20state\x20found'):console[_0x406c91(0xf3)](_0x20deea[_0x406c91(0x100)]);await writeActiveProfileName(_0x58bcc3['name']),console['log'](_0x406c91(0x115)+_0x58bcc3[_0x406c91(0x125)]),_0x570bf4?.['trackPhaseEnd'](_0x20deea[_0x406c91(0x10a)],{'profileName':_0x58bcc3['name'],'hasAuth':_0x189214,'hasEncryptedAuth':_0x4d957f,'createdSettings':_0x1a6dfd}),_0x570bf4?.['trackPhaseStart'](_0x406c91(0x101));const _0x2ccbfc=await installPluginNonInteractive();_0x570bf4?.[_0x406c91(0x10e)](_0x406c91(0x101),{'installed':_0x2ccbfc}),_0x570bf4?.['trackPhaseStart'](_0x20deea['kfesn']),await skillup({'autoInstall':'project'}),_0x570bf4?.[_0x406c91(0x10e)](_0x406c91(0x107)),console[_0x406c91(0xf3)](_0x406c91(0xfa));}
@@ -1 +1 @@
1
- (function(_0x90050f,_0x54e35f){const _0x22b214=_0x5774,_0xf3eaa=_0x90050f();while(!![]){try{const _0x4f4f29=parseInt(_0x22b214(0xf8))/0x1*(-parseInt(_0x22b214(0xff))/0x2)+parseInt(_0x22b214(0x10b))/0x3+parseInt(_0x22b214(0x111))/0x4+parseInt(_0x22b214(0x102))/0x5*(parseInt(_0x22b214(0x117))/0x6)+parseInt(_0x22b214(0x119))/0x7+-parseInt(_0x22b214(0x11f))/0x8*(-parseInt(_0x22b214(0x112))/0x9)+-parseInt(_0x22b214(0x116))/0xa;if(_0x4f4f29===_0x54e35f)break;else _0xf3eaa['push'](_0xf3eaa['shift']());}catch(_0x4a03ed){_0xf3eaa['push'](_0xf3eaa['shift']());}}}(_0xf57b,0x8affb));import{basename}from'path';import _0x255bea from'inquirer';import{getToken}from'./utils/keychain.js';function _0x5774(_0x3c7fc0,_0x3010c4){_0x3c7fc0=_0x3c7fc0-0xf8;const _0xf57bf3=_0xf57b();let _0x5774ef=_0xf57bf3[_0x3c7fc0];return _0x5774ef;}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 _0xf57b(){const _0x13b555=['stdout','UedYS','/.opencode/skills/','stdin','sCAqF','suppressUsage','wGJjJ','mzLmh','2334606oRWkPN','IDGJj','To\x20get\x20started:','log','\x20\x203.\x20Run:\x20ranger\x20skillup','/skills/','995740obBDvn','45sbZUDt','claude','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','isTTY','29965180hzVCrp','12HSVkdo','UBkUt','7908383nboPCY','\x20--opencode','opencode','\x20skill','This\x20project\x20only\x20(','\x0a✅\x20Installed\x20','1710664jraYJS','8JgBfRD','ranger','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','godSU','autoInstall','All\x20projects\x20(','installLevel','68358iyotLa','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','message','1533045UZGMHr'];_0xf57b=function(){return _0x13b555;};return _0xf57b();}export async function skillup(_0x1a97ee={}){const _0x3a2d91=_0x5774,_0x42e38c={'dlPdv':function(_0x1aa513){return _0x1aa513();},'mqfws':'❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','IDGJj':function(_0x3e2ced,_0x585a3f){return _0x3e2ced===_0x585a3f;},'wGJjJ':'opencode','JZZqU':function(_0xece3db){return _0xece3db();},'igauI':'user','sCAqF':function(_0x1052d0){return _0x1052d0();},'harjZ':'list','UedYS':'Where\x20should\x20skills\x20be\x20installed?','UBkUt':'project','BaItr':'\x0a📦\x20Installing\x20skills...\x0a','GPAWN':function(_0x4ff6df,_0x519c4c){return _0x4ff6df instanceof _0x519c4c;},'mzLmh':'user-level','godSU':'project-level','jraSB':function(_0x2d7817,_0x5dd571){return _0x2d7817>_0x5dd571;},'NNtQq':'To\x20use:','EtRgi':_0x3a2d91(0xfa)};console['log']('\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a');const _0x2ffc87=_0x1a97ee['platform']??_0x3a2d91(0x113),_0x163273=await _0x42e38c['dlPdv'](getToken);if(!_0x163273){console[_0x3a2d91(0x10e)](_0x42e38c['mqfws']),console['log'](_0x3a2d91(0x10d)),console['log'](_0x3a2d91(0x114)),console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x2ffc87===_0x3a2d91(0x11b)?_0x3a2d91(0x11a):'')+'\x20<your-api-token>'),console['log'](_0x3a2d91(0x10f)+(_0x42e38c['IDGJj'](_0x2ffc87,_0x42e38c['wGJjJ'])?_0x3a2d91(0x11a):'')+'\x0a');return;}console[_0x3a2d91(0x10e)]('✓\x20Found\x20API\x20token');const _0xd78b4a=_0x42e38c['JZZqU'](getProjectRoot),_0x405642=basename(_0xd78b4a),_0x385395=_0x42e38c[_0x3a2d91(0x10c)](_0x2ffc87,_0x42e38c[_0x3a2d91(0x109)])?getOpencodeConfigDir(_0x42e38c['igauI'])+'/skills/':_0x42e38c[_0x3a2d91(0x107)](getClaudeConfigDir)+_0x3a2d91(0x110),_0x421b14=_0x2ffc87==='opencode'?_0xd78b4a+_0x3a2d91(0x105):_0xd78b4a+'/.claude/skills/',_0x2642de=process[_0x3a2d91(0x106)][_0x3a2d91(0x115)]&&process[_0x3a2d91(0x103)]['isTTY'];let _0x59792b;if(_0x1a97ee['autoInstall'])_0x59792b=_0x1a97ee[_0x3a2d91(0xfc)];else{if(_0x2642de){const _0x33713e=await _0x255bea['prompt']([{'type':_0x42e38c['harjZ'],'name':_0x3a2d91(0xfe),'message':_0x42e38c[_0x3a2d91(0x104)],'choices':[{'name':_0x3a2d91(0xfd)+_0x385395+')','value':'user'},{'name':_0x3a2d91(0x11d)+_0x421b14+')','value':_0x42e38c[_0x3a2d91(0x118)]}]}]);_0x59792b=_0x33713e[_0x3a2d91(0xfe)];}else _0x59792b='project',console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x421b14+')');}let _0x230595=0x0;const _0x305ac0=getCurrentVersion();console[_0x3a2d91(0x10e)](_0x42e38c['BaItr']);try{const _0x36e5ab=await installSkill(_0x3a2d91(0xf9),{'cliVersion':_0x305ac0,'level':_0x59792b,'platform':_0x2ffc87});_0x36e5ab&&_0x230595++;}catch(_0x3cccaf){console['warn'](_0x3a2d91(0x100),_0x42e38c['GPAWN'](_0x3cccaf,Error)?_0x3cccaf[_0x3a2d91(0x101)]:_0x3cccaf);}if(_0x230595>0x0){const _0x4afb2c=_0x42e38c['IDGJj'](_0x59792b,_0x42e38c['igauI'])?_0x42e38c[_0x3a2d91(0x10a)]:_0x42e38c[_0x3a2d91(0xfb)];console[_0x3a2d91(0x10e)](_0x3a2d91(0x11e)+_0x230595+'\x20'+_0x4afb2c+_0x3a2d91(0x11c)+(_0x42e38c['jraSB'](_0x230595,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x1a97ee[_0x3a2d91(0x108)]&&(console[_0x3a2d91(0x10e)](_0x42e38c['NNtQq']),_0x2ffc87===_0x42e38c[_0x3a2d91(0x109)]?console['log'](_0x42e38c['EtRgi']):console[_0x3a2d91(0x10e)]('\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!'));}else console['log']('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
1
+ (function(_0x13039d,_0x41ca16){const _0x31102e=_0x22dd,_0x31ce93=_0x13039d();while(!![]){try{const _0x3a07ab=parseInt(_0x31102e(0x98))/0x1*(-parseInt(_0x31102e(0xaf))/0x2)+-parseInt(_0x31102e(0xba))/0x3*(parseInt(_0x31102e(0x96))/0x4)+-parseInt(_0x31102e(0xa2))/0x5+-parseInt(_0x31102e(0x9e))/0x6+-parseInt(_0x31102e(0xa4))/0x7*(parseInt(_0x31102e(0x90))/0x8)+-parseInt(_0x31102e(0xb2))/0x9*(-parseInt(_0x31102e(0x99))/0xa)+parseInt(_0x31102e(0x9d))/0xb;if(_0x3a07ab===_0x41ca16)break;else _0x31ce93['push'](_0x31ce93['shift']());}catch(_0x42e93e){_0x31ce93['push'](_0x31ce93['shift']());}}}(_0x435b,0x2fd70));import{basename}from'path';import _0x298ec3 from'inquirer';function _0x22dd(_0x59b6f4,_0x3ffd59){_0x59b6f4=_0x59b6f4-0x8f;const _0x435bcf=_0x435b();let _0x22dd89=_0x435bcf[_0x59b6f4];return _0x22dd89;}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 _0x435b(){const _0xfca628=['/skills/','30HKBRRE','To\x20get\x20started:','ranger','\x0a📦\x20Installing\x20skills...\x0a','YUiWw','15448GZBcsR','autoInstall','user','message','log','prompt','64228mMecEA','atfTz','11655hkWoHI','1565110zgLSXL','\x20successfully!\x0a','FHMuy','/.claude/skills/','6199908pSPJAo','310398PszpDy','This\x20project\x20only\x20(','\x20--opencode','nbTAm','67185yuDlPU','RPwCO','931sIQiBe','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','list','\x0a✅\x20Installed\x20','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','isTTY','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','opencode','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','\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!','stdout','34uwWNhN','vlITa','suppressUsage','18NQvNCU','fJqDS','AGpgu','uGpWt','\x20\x203.\x20Run:\x20ranger\x20skillup','installLevel','XSCfF'];_0x435b=function(){return _0xfca628;};return _0x435b();}export async function skillup(_0x2b5ce6={}){const _0x434504=_0x22dd,_0x331216={'FHMuy':_0x434504(0xaa),'nbTAm':'claude','YUiWw':function(_0x432598){return _0x432598();},'thkaI':'❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','RUzCF':_0x434504(0xbb),'fJqDS':function(_0x45913a,_0x207ef4){return _0x45913a===_0x207ef4;},'uGpWt':_0x434504(0xab),'qEzbK':_0x434504(0xa0),'vlITa':function(_0x4a82b3,_0x488fb3){return _0x4a82b3(_0x488fb3);},'XSCfF':function(_0x13d0d2,_0x2a0523){return _0x13d0d2===_0x2a0523;},'RjyXr':_0x434504(0xa6),'uWTpW':'Where\x20should\x20skills\x20be\x20installed?','RPwCO':'project','FifFF':function(_0x577853,_0x5f4f09,_0x140d92){return _0x577853(_0x5f4f09,_0x140d92);},'svsAK':_0x434504(0xbc),'arTsG':_0x434504(0xa5),'mARVH':function(_0xdfb4b1,_0x2296e9){return _0xdfb4b1>_0x2296e9;},'ooUKz':'project-level','AGpgu':function(_0x38efb8,_0x390fbf){return _0x38efb8>_0x390fbf;},'oQTcy':'To\x20use:','tidir':_0x434504(0xa8),'itchb':_0x434504(0xad),'atfTz':'\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a'};console[_0x434504(0x94)](_0x331216[_0x434504(0x9b)]);const _0x30ea44=_0x2b5ce6['platform']??_0x331216[_0x434504(0xa1)],_0x5557b1=await _0x331216[_0x434504(0x8f)](getToken);if(!_0x5557b1){console['log'](_0x331216['thkaI']),console[_0x434504(0x94)](_0x331216['RUzCF']),console['log'](_0x434504(0xac)),console[_0x434504(0x94)]('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x331216[_0x434504(0xb3)](_0x30ea44,_0x331216['uGpWt'])?_0x331216['qEzbK']:'')+'\x20<your-api-token>'),console[_0x434504(0x94)](_0x434504(0xb6)+(_0x30ea44==='opencode'?'\x20--opencode':'')+'\x0a');return;}console[_0x434504(0x94)]('✓\x20Found\x20API\x20token');const _0x3e3132=getProjectRoot(),_0x212774=_0x331216[_0x434504(0xb0)](basename,_0x3e3132),_0x2a69e8=_0x30ea44===_0x331216[_0x434504(0xb5)]?getOpencodeConfigDir('user')+_0x434504(0xb9):getClaudeConfigDir()+_0x434504(0xb9),_0xda07e4=_0x331216[_0x434504(0xb8)](_0x30ea44,'opencode')?_0x3e3132+'/.opencode/skills/':_0x3e3132+_0x434504(0x9c),_0x1eb9f4=process['stdin']['isTTY']&&process[_0x434504(0xae)][_0x434504(0xa9)];let _0x19e349;if(_0x2b5ce6[_0x434504(0x91)])_0x19e349=_0x2b5ce6['autoInstall'];else{if(_0x1eb9f4){const _0x5c39e1=await _0x298ec3[_0x434504(0x95)]([{'type':_0x331216['RjyXr'],'name':'installLevel','message':_0x331216['uWTpW'],'choices':[{'name':'All\x20projects\x20('+_0x2a69e8+')','value':_0x434504(0x92)},{'name':_0x434504(0x9f)+_0xda07e4+')','value':_0x331216['RPwCO']}]}]);_0x19e349=_0x5c39e1[_0x434504(0xb7)];}else _0x19e349=_0x331216[_0x434504(0xa3)],console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0xda07e4+')');}let _0x22908a=0x0;const _0x561d06=_0x331216['YUiWw'](getCurrentVersion);console['log'](_0x434504(0xbd));try{const _0x46a74b=await _0x331216['FifFF'](installSkill,_0x331216['svsAK'],{'cliVersion':_0x561d06,'level':_0x19e349,'platform':_0x30ea44});_0x46a74b&&_0x22908a++;}catch(_0xcf4b0b){console['warn'](_0x331216['arTsG'],_0xcf4b0b instanceof Error?_0xcf4b0b[_0x434504(0x93)]:_0xcf4b0b);}if(_0x331216['mARVH'](_0x22908a,0x0)){const _0x48fcf5=_0x19e349==='user'?'user-level':_0x331216['ooUKz'];console[_0x434504(0x94)](_0x434504(0xa7)+_0x22908a+'\x20'+_0x48fcf5+'\x20skill'+(_0x331216[_0x434504(0xb4)](_0x22908a,0x1)?'s':'')+_0x434504(0x9a)),!_0x2b5ce6[_0x434504(0xb1)]&&(console['log'](_0x331216['oQTcy']),_0x30ea44==='opencode'?console[_0x434504(0x94)](_0x331216['tidir']):console['log'](_0x331216['itchb']));}else console['log'](_0x331216[_0x434504(0x97)]);}
@@ -1 +1 @@
1
- (function(_0x23facb,_0x214378){const _0x270521=_0x4a83,_0xe518bc=_0x23facb();while(!![]){try{const _0x46e86b=-parseInt(_0x270521(0x161))/0x1*(-parseInt(_0x270521(0x148))/0x2)+parseInt(_0x270521(0x186))/0x3*(-parseInt(_0x270521(0x185))/0x4)+parseInt(_0x270521(0x149))/0x5+-parseInt(_0x270521(0x137))/0x6+parseInt(_0x270521(0x162))/0x7+-parseInt(_0x270521(0x176))/0x8*(parseInt(_0x270521(0x187))/0x9)+parseInt(_0x270521(0x155))/0xa*(parseInt(_0x270521(0x156))/0xb);if(_0x46e86b===_0x214378)break;else _0xe518bc['push'](_0xe518bc['shift']());}catch(_0x3cb42c){_0xe518bc['push'](_0xe518bc['shift']());}}}(_0x2e14,0xa7b96));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x2e14(){const _0x445781=['zBDIj','message','url','5556942oJZqLz','\x20install\x20chromium','MBEsK','scope','git_check','/ranger:enable','\x20\x20npx\x20playwright\x20install\x20chromium','HmVUJ','EFLxQ','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','Installation\x20failed\x20with\x20exit\x20code\x20','UdbEb','user','trackPhaseStart','✓\x20Authenticated\x20to\x20','rgJED','plugin','207222lYeAhx','3028800StQPHL','npx','ULYfa','opencode','fWRgW','pqTRa','inherit','isTTY','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','InMFu','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','✓\x20Playwright\x20Chromium\x20browser\x20found','178270qhxczz','66eckAHA','GITHUB_ENV','confirm','log','win32','PMuLa','Bexiq','device_auth','BRFGU','HILgr','\x0a⚠\x20Skipping\x20Chromium\x20installation.','7EgEQiz','5854870Qbptkq','IzQjy','vtnfR','stdout','yRimP','✓\x20Stored\x20credentials\x20locally','LhNBH','.gitignore','skipChromium','local','JRFkl','DBVLb','XnnAC','dZqkW','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','skills','install','tWWhK','bRgev','\x0a🚀\x20Ranger\x20Setup\x0a','1616HnyiaU','prompt','YphFp','SDsvz','No\x20git\x20repository\x20found','\x20\x20npx\x20playwright@','EsztW','ranger\x20profile\x20add\x20local','Authentication\x20failed:\x20','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','chromium','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','✓\x20Created\x20.ranger/\x20directory','wantsProfile','existing_token','112972sqRSXK','24xnXmJp','19395cKaxwk','.ranger','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','error','...','The\x20required\x20version\x20(','XNJQh','profile','thcgE','auth','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','ready','success','VzRyu','organizationName','warn','\x0aIn\x20Claude\x20Code,\x20run\x20','tDyXD','llLPU','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','trackPhaseEnd','✓\x20Already\x20authenticated\x20to\x20'];_0x2e14=function(){return _0x445781;};return _0x2e14();}import{createRequire}from'module';import{spawn}from'child_process';import _0x487077 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,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),bold=_0x52f9db=>'\x1b[1m'+_0x52f9db+'\x1b[0m';function getPlaywrightVersion(){const _0x36cd73={'OcrDd':'playwright/package.json'};try{const _0x2bab2d=require['resolve'](_0x36cd73['OcrDd']),_0x2c8e74=require(_0x2bab2d);return _0x2c8e74['version'];}catch{return null;}}function installChromiumBinary(_0x2bcaea){const _0x3ce55f=_0x4a83,_0x19a90b={'EsztW':function(_0x56f5eb,_0x2f6eb8){return _0x56f5eb(_0x2f6eb8);},'MvbZh':_0x3ce55f(0x172),'niJOm':'playwright','zBDIj':'chromium','ACASe':function(_0x4bd724,_0x48b0a0,_0x4f73a2,_0x42e752){return _0x4bd724(_0x48b0a0,_0x4f73a2,_0x42e752);},'MBEsK':_0x3ce55f(0x14a),'bIhwK':_0x3ce55f(0x15a),'JRFkl':'close','HmVUJ':'error'};return new Promise((_0x166053,_0x245bc0)=>{const _0x1ce8ad=_0x3ce55f,_0x52f44d=_0x2bcaea?['playwright@'+_0x2bcaea,_0x19a90b['MvbZh'],_0x1ce8ad(0x180)]:[_0x19a90b['niJOm'],_0x1ce8ad(0x172),_0x19a90b[_0x1ce8ad(0x19d)]],_0x4af290=_0x19a90b['ACASe'](spawn,_0x19a90b[_0x1ce8ad(0x139)],_0x52f44d,{'stdio':_0x1ce8ad(0x14f),'shell':process['platform']===_0x19a90b['bIhwK']});_0x4af290['on'](_0x19a90b[_0x1ce8ad(0x16c)],_0x4f0e5f=>{const _0x126128=_0x1ce8ad;_0x4f0e5f===0x0?_0x166053():_0x19a90b[_0x126128(0x17c)](_0x245bc0,new Error(_0x126128(0x141)+_0x4f0e5f));}),_0x4af290['on'](_0x19a90b[_0x1ce8ad(0x13e)],_0x17f71a=>{_0x245bc0(_0x17f71a);});});}export async function authenticate(_0xa3e8c6){const _0x5d72b2=_0x4a83,_0x5bb33c={'yRimP':function(_0x333774){return _0x333774();},'dZqkW':function(_0x75a633,_0x5bc536){return _0x75a633 instanceof _0x5bc536;},'VzRyu':function(_0x16cca9,_0x532334){return _0x16cca9(_0x532334);},'DBVLb':'✓\x20Exported\x20credentials\x20for\x20CI','SDsvz':_0x5d72b2(0x167)};if(!_0xa3e8c6){const _0x300025=await _0x5bb33c[_0x5d72b2(0x166)](getToken);if(_0x300025){const _0x459fdb=await getCurrentUser(_0x300025);if(_0x459fdb['success'])return console['log'](_0x5d72b2(0x19c)+_0x459fdb['user'][_0x5d72b2(0x195)]),{'token':_0x300025,'method':_0x5d72b2(0x184)};}try{_0xa3e8c6=await runDeviceAuthFlow();}catch(_0x5254f0){throw new Error('Authentication\x20failed:\x20'+(_0x5bb33c[_0x5d72b2(0x16f)](_0x5254f0,Error)?_0x5254f0[_0x5d72b2(0x135)]:_0x5254f0));}const _0x2415b3=await getCurrentUser(_0xa3e8c6);if(!_0x2415b3[_0x5d72b2(0x193)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x2415b3[_0x5d72b2(0x18a)]);return console['log'](_0x5d72b2(0x145)+_0x2415b3['user']['organizationName']),{'token':_0xa3e8c6,'method':_0x5d72b2(0x15d)};}console['log']('Validating\x20API\x20token...');const _0x3f40b8=await getCurrentUser(_0xa3e8c6);if(!_0x3f40b8['success']){if(_0x3f40b8['status'])throw new Error(_0x5d72b2(0x17e)+_0x3f40b8['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0x5d72b2(0x191)+_0x3f40b8[_0x5d72b2(0x18a)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x5d72b2(0x159)](_0x5d72b2(0x145)+_0x3f40b8[_0x5d72b2(0x143)][_0x5d72b2(0x195)]),await _0x5bb33c[_0x5d72b2(0x194)](storeToken,_0xa3e8c6),console['log'](process['env'][_0x5d72b2(0x157)]?_0x5bb33c[_0x5d72b2(0x16d)]:_0x5bb33c[_0x5d72b2(0x179)]),{'token':_0xa3e8c6,'method':'provided_token'};}export async function ensureRangerDir(){const _0x5c899e=_0x4a83,_0xe5ae2e={'YphFp':function(_0x216baa){return _0x216baa();},'tWWhK':function(_0xaaa207,_0x183b65,_0xb9b789){return _0xaaa207(_0x183b65,_0xb9b789);},'gZPnY':_0x5c899e(0x188),'oeCYx':_0x5c899e(0x182)},_0x2e0346=_0xe5ae2e['YphFp'](findGitRoot),_0x1c7d97=_0x2e0346?_0xe5ae2e[_0x5c899e(0x173)](join,_0x2e0346,_0xe5ae2e['gZPnY']):_0xe5ae2e[_0x5c899e(0x178)](getRangerDir);return!existsSync(_0x1c7d97)?(await mkdir(_0x1c7d97,{'recursive':!![]}),console[_0x5c899e(0x159)](_0xe5ae2e['oeCYx']),{'path':_0x1c7d97,'installed':!![]}):(console[_0x5c899e(0x159)]('✓\x20.ranger/\x20directory\x20already\x20exists'),{'path':_0x1c7d97,'installed':![]});}export async function ensureChromium(){const _0x3cbee4=_0x4a83,_0x453384={'zliNC':_0x3cbee4(0x154),'UdbEb':function(_0x319fa9){return _0x319fa9();},'HILgr':_0x3cbee4(0x158),'IzQjy':_0x3cbee4(0x172),'nZwks':'The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','SGRCy':function(_0x5e56c6,_0x493d92){return _0x5e56c6 instanceof _0x493d92;},'hzHHy':_0x3cbee4(0x160),'aUOzr':'\x20\x20npx\x20playwright\x20install\x20chromium'};let _0xd52b65=![];try{const _0x206ca6=chromium['executablePath']();_0xd52b65=existsSync(_0x206ca6);}catch{_0xd52b65=![];}if(_0xd52b65)return console[_0x3cbee4(0x159)](_0x453384['zliNC']),![];const _0x48aab5=_0x453384[_0x3cbee4(0x142)](getPlaywrightVersion),_0x498f56=process['stdin']['isTTY']&&process[_0x3cbee4(0x165)]['isTTY'];let _0x1236ee=!![];if(_0x498f56){const {install:_0xf3dcd0}=await _0x487077[_0x3cbee4(0x177)]([{'type':_0x453384[_0x3cbee4(0x15f)],'name':_0x453384[_0x3cbee4(0x163)],'message':_0x48aab5?_0x3cbee4(0x18c)+_0x48aab5+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?':_0x453384['nZwks'],'default':!![]}]);_0x1236ee=_0xf3dcd0;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium'+(_0x48aab5?'\x20'+_0x48aab5:'')+_0x3cbee4(0x18b));if(_0x1236ee){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x48aab5),console['log']('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x6ad0af){console[_0x3cbee4(0x18a)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x453384['SGRCy'](_0x6ad0af,Error)?_0x6ad0af[_0x3cbee4(0x135)]:_0x6ad0af),console['log']('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),_0x48aab5?console[_0x3cbee4(0x159)]('\x20\x20npx\x20playwright@'+_0x48aab5+_0x3cbee4(0x138)):console[_0x3cbee4(0x159)](_0x3cbee4(0x13d));}}else console[_0x3cbee4(0x159)](_0x453384['hzHHy']),console[_0x3cbee4(0x159)]('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),_0x48aab5?console[_0x3cbee4(0x159)](_0x3cbee4(0x17b)+_0x48aab5+'\x20install\x20chromium'):console['log'](_0x453384['aUOzr']);return!![];}function _0x4a83(_0x2b7fbd,_0x849587){_0x2b7fbd=_0x2b7fbd-0x135;const _0x2e14b8=_0x2e14();let _0x4a8395=_0x2e14b8[_0x2b7fbd];return _0x4a8395;}export async function writeRangerGitignore(_0x353b7e){const _0x2030e7=_0x4a83,_0x315ab5={'BRFGU':'✓\x20Created\x20.ranger/.gitignore'},_0x308d84=join(_0x353b7e,_0x2030e7(0x169)),_0x369598='\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(_0x308d84,_0x369598),console['log'](_0x315ab5[_0x2030e7(0x15e)]);}function printProfileSetupLaterInstructions(){const _0x1789b4=_0x4a83,_0x4ac4a1={'PMuLa':'ranger\x20profile\x20add\x20local','NRdJd':_0x1789b4(0x140)};console['log']('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console[_0x1789b4(0x159)]('\x20\x20'+bold(_0x4ac4a1[_0x1789b4(0x15b)])),console[_0x1789b4(0x159)](_0x4ac4a1['NRdJd']);}async function ensureLocalEnv(_0x1b8b20,_0x3938d1){const _0x250f83=_0x4a83,_0x37281d={'qPAkH':function(_0x16d8ff){return _0x16d8ff();},'NrmJe':function(_0x932d02,_0x1aeaa7,_0x2b084a){return _0x932d02(_0x1aeaa7,_0x2b084a);},'bRgev':_0x250f83(0x181),'FYwmG':_0x250f83(0x158),'vtnfR':_0x250f83(0x183),'tDyXD':function(_0x48519c,_0x350499,_0xcb55b2,_0x255505){return _0x48519c(_0x350499,_0xcb55b2,_0x255505);},'pnALX':function(_0x2e88da,_0xf3a0b0){return _0x2e88da instanceof _0xf3a0b0;},'XnnAC':function(_0x42cde1){return _0x42cde1();}};if(!_0x37281d['qPAkH'](findGitRoot))return console[_0x250f83(0x159)]('⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.'),{'ready':![],'skipped':!![]};if(_0x37281d['NrmJe'](findExistingEnv,'local',{'locations':[_0x250f83(0x16b)]}))return console[_0x250f83(0x159)]('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};const _0x19894d=process['stdin']['isTTY']&&process['stdout'][_0x250f83(0x150)];if(_0x19894d&&!_0x1b8b20?.['url']){console['log'](_0x37281d[_0x250f83(0x174)]),console['log']('to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind'),console[_0x250f83(0x159)]('auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to'),console[_0x250f83(0x159)]('use\x20until\x20the\x20session\x20expires.\x0a'),console[_0x250f83(0x159)](_0x250f83(0x19a));const {wantsProfile:_0x3ec2da}=await _0x487077[_0x250f83(0x177)]([{'type':_0x37281d['FYwmG'],'name':_0x37281d[_0x250f83(0x164)],'message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0x3ec2da)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await _0x37281d[_0x250f83(0x198)](addEnv,_0x250f83(0x16b),{'url':_0x1b8b20?.[_0x250f83(0x136)],'force':_0x1b8b20?.['force'],'allowInsecureLocalhost':_0x1b8b20?.['allowInsecureLocalhost']},_0x3938d1),{'ready':!![],'skipped':![]};}catch(_0xac54d7){return console[_0x250f83(0x18a)]('\x0a❌\x20Profile\x20setup\x20failed:',_0x37281d['pnALX'](_0xac54d7,Error)?_0xac54d7['message']:_0xac54d7),_0x37281d[_0x250f83(0x16e)](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x4a8f8b,_0x38ae00,_0x1f7ce8){const _0x2828de=_0x4a83,_0x24d0e8={'EFLxQ':function(_0x31fc88){return _0x31fc88();},'XNJQh':function(_0x313e84){return _0x313e84();},'llLPU':_0x2828de(0x190),'fHDtj':'chromium','LhNBH':'plugin','thcgE':function(_0x57ea1e,_0x4f2d3b){return _0x57ea1e(_0x4f2d3b);},'CWlTN':function(_0x528bc9,_0x1f9a21){return _0x528bc9&&_0x1f9a21;},'AJIyT':_0x2828de(0x14c),'sjAVt':_0x2828de(0x171),'rgJED':'profile','XZVQW':_0x2828de(0x170),'fWRgW':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','Bexiq':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','ULYfa':_0x2828de(0x17f),'InMFu':function(_0x568449,_0x3d2d79){return _0x568449(_0x3d2d79);},'pqTRa':function(_0x3c67b0,_0x55909e){return _0x3c67b0+_0x55909e;},'VpQbd':function(_0x55c90b,_0x20eb77){return _0x55c90b+_0x20eb77;}};console['log'](_0x2828de(0x175));const _0x48f95f=process['stdin']['isTTY']&&process[_0x2828de(0x165)][_0x2828de(0x150)];!_0x48f95f&&!_0x38ae00?.[_0x2828de(0x13a)]&&(console['log'](_0x2828de(0x153)),_0x38ae00={..._0x38ae00,'scope':_0x2828de(0x143)});_0x1f7ce8?.[_0x2828de(0x144)]('git_check');if(!_0x24d0e8[_0x2828de(0x13f)](findGitRoot)){await _0x1f7ce8?.['trackPhaseError'](_0x2828de(0x13b),new Error(_0x2828de(0x17a)));throw new Error('No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.');}_0x1f7ce8?.[_0x2828de(0x19b)]('git_check');const _0x3cf883=!existsSync(_0x24d0e8[_0x2828de(0x18d)](getRangerDir)),{path:_0xa67a9}=await ensureRangerDir();_0x1f7ce8?.[_0x2828de(0x144)](_0x24d0e8[_0x2828de(0x199)]);const _0x578351=await authenticate(_0x4a8f8b);_0x1f7ce8?.[_0x2828de(0x19b)](_0x24d0e8[_0x2828de(0x199)],{'isFirstRun':_0x3cf883,'method':_0x578351['method']}),_0x1f7ce8?.[_0x2828de(0x144)](_0x2828de(0x180));_0x38ae00?.['skipChromium']?console['log'](_0x2828de(0x189)):await ensureChromium();_0x1f7ce8?.[_0x2828de(0x19b)](_0x24d0e8['fHDtj'],{'isFirstRun':_0x3cf883,'skipped':!!_0x38ae00?.[_0x2828de(0x16a)]}),await writeRangerGitignore(_0xa67a9),console[_0x2828de(0x159)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x44ce8a=_0x38ae00?.['scope'],_0x3d9da6=_0x38ae00?.['opencode']??![];let _0x5760c1=null;_0x3d9da6?(_0x1f7ce8?.[_0x2828de(0x144)](_0x24d0e8[_0x2828de(0x168)]),_0x5760c1=await ensureOpencodePluginConfig(_0x44ce8a),_0x1f7ce8?.['trackPhaseEnd'](_0x24d0e8[_0x2828de(0x168)],{'isFirstRun':_0x3cf883,'opencode':!![]})):(_0x1f7ce8?.['trackPhaseStart'](_0x2828de(0x147)),await _0x24d0e8[_0x2828de(0x18f)](ensureClaudePlugin,_0x44ce8a),_0x1f7ce8?.[_0x2828de(0x19b)](_0x24d0e8['LhNBH'],{'isFirstRun':_0x3cf883}));if(_0x24d0e8['CWlTN'](_0x3d9da6,_0x5760c1)){_0x1f7ce8?.[_0x2828de(0x144)](_0x2828de(0x171));try{await installSkill('ranger',{'level':_0x5760c1['scope'],'cliVersion':getCurrentVersion(),'platform':_0x24d0e8['AJIyT']}),_0x1f7ce8?.[_0x2828de(0x19b)](_0x2828de(0x171),{'isFirstRun':_0x3cf883,'opencode':!![]});}catch(_0x1f5025){console[_0x2828de(0x196)]('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x1f5025 instanceof Error?_0x1f5025['message']:_0x1f5025),_0x1f7ce8?.['trackPhaseEnd'](_0x24d0e8['sjAVt'],{'isFirstRun':_0x3cf883,'opencode':!![],'failed':!![]});}}else _0x1f7ce8?.[_0x2828de(0x144)]('skills'),await ensureClaudeSkills(_0x44ce8a),_0x1f7ce8?.['trackPhaseEnd'](_0x24d0e8['sjAVt'],{'isFirstRun':_0x3cf883});if(!_0x48f95f&&!_0x38ae00?.[_0x2828de(0x136)])console['log']('Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:'),console['log']('\x20\x20'+bold(_0x2828de(0x17d))+'\x0a');else{_0x1f7ce8?.[_0x2828de(0x144)](_0x2828de(0x18e));const _0x453cb7=await ensureLocalEnv({'url':_0x38ae00?.['url'],'force':_0x38ae00?.['force'],'allowInsecureLocalhost':_0x38ae00?.['allowInsecureLocalhost']},_0x1f7ce8);_0x1f7ce8?.['trackPhaseEnd'](_0x24d0e8[_0x2828de(0x146)],{'isFirstRun':_0x3cf883,'profileReady':_0x453cb7[_0x2828de(0x192)],'userSkipped':_0x453cb7['skipped']}),_0x453cb7['ready']&&console['log'](_0x2828de(0x151));}if(_0x3d9da6)console['log'](_0x24d0e8['XZVQW']),console[_0x2828de(0x159)](_0x24d0e8[_0x2828de(0x14d)]),console[_0x2828de(0x159)](_0x24d0e8[_0x2828de(0x15c)]),console['log'](_0x24d0e8[_0x2828de(0x14b)]);else{const _0xcbad3=_0x24d0e8[_0x2828de(0x152)](bold,_0x2828de(0x13c));console[_0x2828de(0x159)](_0x24d0e8[_0x2828de(0x14e)](_0x24d0e8['VpQbd'](_0x2828de(0x197)+_0xcbad3+'\x20and\x20prompt\x20the\x20coding','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with')+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'));}}
1
+ (function(_0x46a26f,_0xa22e1){const _0x3d42b6=_0x4d63,_0x165284=_0x46a26f();while(!![]){try{const _0x16f69b=-parseInt(_0x3d42b6(0x16c))/0x1+parseInt(_0x3d42b6(0x189))/0x2+parseInt(_0x3d42b6(0x15f))/0x3*(parseInt(_0x3d42b6(0x162))/0x4)+-parseInt(_0x3d42b6(0x179))/0x5+-parseInt(_0x3d42b6(0x1a6))/0x6*(-parseInt(_0x3d42b6(0x170))/0x7)+-parseInt(_0x3d42b6(0x166))/0x8*(-parseInt(_0x3d42b6(0x1a5))/0x9)+parseInt(_0x3d42b6(0x150))/0xa;if(_0x16f69b===_0xa22e1)break;else _0x165284['push'](_0x165284['shift']());}catch(_0x3539e9){_0x165284['push'](_0x165284['shift']());}}}(_0x34cf,0x8bdb8));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x2ff730 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,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';function _0x4d63(_0x3b2c23,_0x255782){_0x3b2c23=_0x3b2c23-0x13d;const _0x34cf12=_0x34cf();let _0x4d6304=_0x34cf12[_0x3b2c23];return _0x4d6304;}import{installSkill}from'./utils/skills.js';function _0x34cf(){const _0x2bf8b5=['nMyQk','env','trackPhaseStart','✓\x20.ranger/\x20directory\x20already\x20exists','ranger\x20profile\x20add\x20local','skills','You\x20can\x20install\x20it\x20manually\x20by\x20running:','1600110RPRArj','10884mivHWm','\x0a⚠\x20Skipping\x20Chromium\x20installation.','MJcyg','ranger','npx','LcLLl','papcv','method','allowInsecureLocalhost','skipped','Umkio','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','ZuXhV','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','opencode','skipChromium','\x20install\x20chromium','scope','success','AWxZL','url','622180BZYSsS','git_check','ready','prompt','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','zQhtP','✓\x20Playwright\x20Chromium\x20browser\x20found','nJbLk','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','PPfKx','laLcY','install','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','hWFmE','organizationName','645618xVqAuO','uuLTn','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','8xdGIkW','inherit','YaiWF','kpMcy','16FEXmgW','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','uHhLi','yNdto','JiJWa','23277hBaHYA','Authentication\x20failed:\x20','\x20now?','confirm','812rmFsmg','kSMxD','stdout','ZWoEH','yVBGg','close','Cccvw','WMEhz','aAVDl','3651180umULEE','yOtII','✓\x20Exported\x20credentials\x20for\x20CI','Installation\x20failed\x20with\x20exit\x20code\x20','log','ImhHm','win32','epEBF','vCVTl','local','trackPhaseEnd','isTTY','chromium','error','erBax','version','535470nNqOlL','Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','Ziksu','hJrRS','ipPzm','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','Mtugv','/ranger:enable','\x20(fallback\x20version)','FqTwr','plugin','DCdVo','The\x20required\x20version\x20(','VhSnA','profile','stdin','device_auth','auth','message','ZrhGx','✓\x20Local\x20profile\x20already\x20exists'];_0x34cf=function(){return _0x2bf8b5;};return _0x34cf();}const require=createRequire(import.meta.url),PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2',bold=_0x6db77=>'\x1b[1m'+_0x6db77+'\x1b[0m';function getPlaywrightVersion(){const _0x3e4e0a=_0x4d63,_0x3df0eb={'Ziksu':function(_0x5b0bd2,_0x5471f6){return _0x5b0bd2(_0x5471f6);}};try{const _0x84a50=require['resolve']('playwright/package.json'),_0x1988c2=_0x3df0eb[_0x3e4e0a(0x18b)](require,_0x84a50);return _0x1988c2[_0x3e4e0a(0x188)];}catch{return null;}}function installChromiumBinary(_0x2196e2){const _0x4d0f56=_0x4d63,_0x5793dc={'VhSnA':function(_0x56ef55,_0x6e3ea7){return _0x56ef55===_0x6e3ea7;},'kpMcy':function(_0x59aff1){return _0x59aff1();},'MIoDM':_0x4d0f56(0x15b),'WjZvs':_0x4d0f56(0x163),'uHhLi':_0x4d0f56(0x17f)};return new Promise((_0x1e3e23,_0x2eaf9b)=>{const _0x300896=_0x4d0f56,_0x3483c5=['playwright@'+_0x2196e2,_0x5793dc['MIoDM'],_0x300896(0x185)],_0x159f70=spawn(_0x300896(0x13f),_0x3483c5,{'stdio':_0x5793dc['WjZvs'],'shell':process['platform']===_0x5793dc[_0x300896(0x169)]});_0x159f70['on'](_0x300896(0x175),_0x294d36=>{const _0x107eaa=_0x300896;_0x5793dc[_0x107eaa(0x196)](_0x294d36,0x0)?_0x5793dc[_0x107eaa(0x165)](_0x1e3e23):_0x2eaf9b(new Error(_0x107eaa(0x17c)+_0x294d36));}),_0x159f70['on']('error',_0x3602cf=>{_0x2eaf9b(_0x3602cf);});});}export async function authenticate(_0x3a45b3){const _0x691194=_0x4d63,_0x38b1bd={'MJcyg':function(_0x3ff457){return _0x3ff457();},'CnaJi':function(_0x5b240e,_0x412aa9){return _0x5b240e(_0x412aa9);},'FOWFN':function(_0x4797b8,_0x3a0a20){return _0x4797b8 instanceof _0x3a0a20;},'vCVTl':function(_0x470ea7,_0x452bf4){return _0x470ea7(_0x452bf4);},'uuLTn':'Validating\x20API\x20token...','HgiEG':function(_0x10f9e4,_0x3f6432){return _0x10f9e4(_0x3f6432);},'yOtII':function(_0x157c77,_0x171eca){return _0x157c77(_0x171eca);},'yVBGg':'✓\x20Stored\x20credentials\x20locally','DCdVo':'provided_token'};if(!_0x3a45b3){const _0x3016df=await _0x38b1bd['MJcyg'](getToken);if(_0x3016df){const _0x197693=await _0x38b1bd['CnaJi'](getCurrentUser,_0x3016df);if(_0x197693[_0x691194(0x14d)])return console[_0x691194(0x17d)]('✓\x20Already\x20authenticated\x20to\x20'+_0x197693['user'][_0x691194(0x15e)]),{'token':_0x3016df,'method':'existing_token'};}try{_0x3a45b3=await _0x38b1bd[_0x691194(0x13d)](runDeviceAuthFlow);}catch(_0x5d513b){throw new Error(_0x691194(0x16d)+(_0x38b1bd['FOWFN'](_0x5d513b,Error)?_0x5d513b[_0x691194(0x19b)]:_0x5d513b));}const _0x317314=await _0x38b1bd[_0x691194(0x181)](getCurrentUser,_0x3a45b3);if(!_0x317314[_0x691194(0x14d)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x317314['error']);return console['log']('✓\x20Authenticated\x20to\x20'+_0x317314['user'][_0x691194(0x15e)]),{'token':_0x3a45b3,'method':_0x691194(0x199)};}console[_0x691194(0x17d)](_0x38b1bd[_0x691194(0x160)]);const _0x3f6655=await _0x38b1bd['HgiEG'](getCurrentUser,_0x3a45b3);if(!_0x3f6655['success']){if(_0x3f6655['status'])throw new Error(_0x691194(0x16d)+_0x3f6655[_0x691194(0x186)]+_0x691194(0x168));else throw new Error(_0x691194(0x15c)+_0x3f6655['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console['log']('✓\x20Authenticated\x20to\x20'+_0x3f6655['user']['organizationName']),await _0x38b1bd[_0x691194(0x17a)](storeToken,_0x3a45b3),console['log'](process[_0x691194(0x19f)]['GITHUB_ENV']?_0x691194(0x17b):_0x38b1bd[_0x691194(0x174)]),{'token':_0x3a45b3,'method':_0x38b1bd[_0x691194(0x194)]};}export async function ensureRangerDir(){const _0x155cbd=_0x4d63,_0x8bcbd8={'MIlhP':function(_0xbe8c61){return _0xbe8c61();},'ZWoEH':function(_0x53a07d,_0x5957f3,_0x5c7a2d){return _0x53a07d(_0x5957f3,_0x5c7a2d);},'JiJWa':_0x155cbd(0x1a1)},_0x28df1b=_0x8bcbd8['MIlhP'](findGitRoot),_0x3729d9=_0x28df1b?_0x8bcbd8[_0x155cbd(0x173)](join,_0x28df1b,'.ranger'):_0x8bcbd8['MIlhP'](getRangerDir);return!existsSync(_0x3729d9)?(await mkdir(_0x3729d9,{'recursive':!![]}),console[_0x155cbd(0x17d)]('✓\x20Created\x20.ranger/\x20directory'),{'path':_0x3729d9,'installed':!![]}):(console['log'](_0x8bcbd8[_0x155cbd(0x16b)]),{'path':_0x3729d9,'installed':![]});}export async function ensureChromium(){const _0x15a589=_0x4d63,_0x10322b={'huNpH':_0x15a589(0x156),'erBax':_0x15a589(0x15b),'nqNXN':_0x15a589(0x191),'LcLLl':'\x0aInstalling\x20Chromium\x20browser...\x0a','NzCPM':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','laLcY':_0x15a589(0x146),'EfWgw':_0x15a589(0x1a7),'LRxiB':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0xc0f17c=![];try{const _0x2fcfc=chromium['executablePath']();_0xc0f17c=existsSync(_0x2fcfc);}catch{_0xc0f17c=![];}if(_0xc0f17c)return console[_0x15a589(0x17d)](_0x10322b['huNpH']),![];const _0x4d397e=getPlaywrightVersion(),_0x30b71c=_0x4d397e??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0xecbdd8=!_0x4d397e,_0x268661=process['stdin'][_0x15a589(0x184)]&&process['stdout']['isTTY'];let _0x103e20=!![];if(_0x268661){const {install:_0x53b230}=await _0x2ff730['prompt']([{'type':_0x15a589(0x16f),'name':_0x10322b[_0x15a589(0x187)],'message':_0xecbdd8?_0x15a589(0x154)+_0x30b71c+_0x15a589(0x16e):_0x15a589(0x195)+_0x30b71c+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x103e20=_0x53b230;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x30b71c+(_0xecbdd8?_0x10322b['nqNXN']:'')+'...');if(_0x103e20){console['log'](_0x10322b[_0x15a589(0x140)]);try{await installChromiumBinary(_0x30b71c),console[_0x15a589(0x17d)](_0x10322b['NzCPM']);}catch(_0x3fe2d6){console['error'](_0x10322b[_0x15a589(0x15a)],_0x3fe2d6 instanceof Error?_0x3fe2d6[_0x15a589(0x19b)]:_0x3fe2d6),console['log'](_0x15a589(0x1a4)),console['log']('\x20\x20npx\x20playwright@'+_0x30b71c+'\x20install\x20chromium');}}else console[_0x15a589(0x17d)](_0x10322b['EfWgw']),console['log'](_0x10322b['LRxiB']),console[_0x15a589(0x17d)]('\x20\x20npx\x20playwright@'+_0x30b71c+_0x15a589(0x14b));return!![];}export async function writeRangerGitignore(_0x5143fa){const _0x33837a={'fMYRY':function(_0x1b4605,_0x25ebf2,_0x34d2ca){return _0x1b4605(_0x25ebf2,_0x34d2ca);}},_0x5346f9=_0x33837a['fMYRY'](join,_0x5143fa,'.gitignore'),_0x42ab7f='\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(_0x5346f9,_0x42ab7f),console['log']('✓\x20Created\x20.ranger/.gitignore');}function printProfileSetupLaterInstructions(){const _0x570606=_0x4d63,_0xb5a0d4={'haoMX':_0x570606(0x167),'Umkio':_0x570606(0x1a2),'AWxZL':'Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a'};console['log'](_0xb5a0d4['haoMX']),console['log']('\x20\x20'+bold(_0xb5a0d4[_0x570606(0x145)])),console['log'](_0xb5a0d4[_0x570606(0x14e)]);}async function ensureLocalEnv(_0x4b763f,_0xabe2c8){const _0xc42cc4=_0x4d63,_0x5a0656={'papcv':function(_0x382327){return _0x382327();},'YaiWF':_0xc42cc4(0x182),'ATYGz':_0xc42cc4(0x19d),'esGRv':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','ipPzm':'auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','FqTwr':'use\x20until\x20the\x20session\x20expires.\x0a','yNdto':'confirm','WMEhz':function(_0x137693,_0xd10930){return _0x137693 instanceof _0xd10930;}};if(!_0x5a0656[_0xc42cc4(0x141)](findGitRoot))return console[_0xc42cc4(0x17d)](_0xc42cc4(0x161)),{'ready':![],'skipped':!![]};if(findExistingEnv(_0x5a0656[_0xc42cc4(0x164)],{'locations':[_0xc42cc4(0x182)]}))return console['log'](_0x5a0656['ATYGz']),{'ready':!![],'skipped':![]};const _0x2acb69=process['stdin']['isTTY']&&process['stdout'][_0xc42cc4(0x184)];if(_0x2acb69&&!_0x4b763f?.['url']){console[_0xc42cc4(0x17d)]('\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how'),console[_0xc42cc4(0x17d)](_0x5a0656['esGRv']),console[_0xc42cc4(0x17d)](_0x5a0656[_0xc42cc4(0x18d)]),console['log'](_0x5a0656[_0xc42cc4(0x192)]),console[_0xc42cc4(0x17d)]('You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.');const {wantsProfile:_0x3f36da}=await _0x2ff730[_0xc42cc4(0x153)]([{'type':_0x5a0656[_0xc42cc4(0x16a)],'name':'wantsProfile','message':_0xc42cc4(0x18a),'default':!![]}]);if(!_0x3f36da)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await addEnv(_0x5a0656['YaiWF'],{'url':_0x4b763f?.[_0xc42cc4(0x14f)],'force':_0x4b763f?.['force'],'allowInsecureLocalhost':_0x4b763f?.['allowInsecureLocalhost']},_0xabe2c8),{'ready':!![],'skipped':![]};}catch(_0x3d377b){return console[_0xc42cc4(0x186)]('\x0a❌\x20Profile\x20setup\x20failed:',_0x5a0656[_0xc42cc4(0x177)](_0x3d377b,Error)?_0x3d377b['message']:_0x3d377b),_0x5a0656[_0xc42cc4(0x141)](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x301f05,_0x4a4371,_0xa1e9e8){const _0x995a3e=_0x4d63,_0xfa67a9={'kitJo':'\x0a🚀\x20Ranger\x20Setup\x0a','rgHRr':'Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','nMyQk':'user','hWFmE':_0x995a3e(0x151),'mmPjk':function(_0x22adbb){return _0x22adbb();},'Cccvw':_0x995a3e(0x19a),'ZrhGx':function(_0x48376b,_0x2e2b9c){return _0x48376b(_0x2e2b9c);},'wvsgO':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','ZuXhV':function(_0x3e3768){return _0x3e3768();},'SmPpP':'chromium','epEBF':_0x995a3e(0x193),'hJrRS':function(_0x448ff9,_0x1c4516){return _0x448ff9(_0x1c4516);},'kSMxD':function(_0x99b90d,_0x40fa85,_0x256008){return _0x99b90d(_0x40fa85,_0x256008);},'nJbLk':_0x995a3e(0x13e),'zQhtP':'\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','ImhHm':'skills','Mtugv':'Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','aAVDl':'profile','HDpdg':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','PPfKx':function(_0x28e462,_0x51c1e8){return _0x28e462+_0x51c1e8;}};console['log'](_0xfa67a9['kitJo']);const _0x4895c1=process[_0x995a3e(0x198)]['isTTY']&&process[_0x995a3e(0x172)][_0x995a3e(0x184)];!_0x4895c1&&!_0x4a4371?.['scope']&&(console['log'](_0xfa67a9['rgHRr']),_0x4a4371={..._0x4a4371,'scope':_0xfa67a9[_0x995a3e(0x19e)]});_0xa1e9e8?.['trackPhaseStart'](_0x995a3e(0x151));if(!findGitRoot()){await _0xa1e9e8?.['trackPhaseError'](_0xfa67a9[_0x995a3e(0x15d)],new Error('No\x20git\x20repository\x20found'));throw new Error('No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.');}_0xa1e9e8?.['trackPhaseEnd']('git_check');const _0x317287=!existsSync(getRangerDir()),{path:_0x21a931}=await _0xfa67a9['mmPjk'](ensureRangerDir);_0xa1e9e8?.[_0x995a3e(0x1a0)](_0xfa67a9[_0x995a3e(0x176)]);const _0x2486a3=await _0xfa67a9[_0x995a3e(0x19c)](authenticate,_0x301f05);_0xa1e9e8?.['trackPhaseEnd']('auth',{'isFirstRun':_0x317287,'method':_0x2486a3[_0x995a3e(0x142)]}),_0xa1e9e8?.['trackPhaseStart']('chromium');_0x4a4371?.['skipChromium']?console[_0x995a3e(0x17d)](_0xfa67a9['wvsgO']):await _0xfa67a9[_0x995a3e(0x147)](ensureChromium);_0xa1e9e8?.[_0x995a3e(0x183)](_0xfa67a9['SmPpP'],{'isFirstRun':_0x317287,'skipped':!!_0x4a4371?.[_0x995a3e(0x14a)]}),await writeRangerGitignore(_0x21a931),console['log'](_0x995a3e(0x18e));const _0x57fb0e=_0x4a4371?.[_0x995a3e(0x14c)],_0x38202b=_0x4a4371?.[_0x995a3e(0x149)]??![];let _0x59bdbb=null;_0x38202b?(_0xa1e9e8?.['trackPhaseStart'](_0xfa67a9[_0x995a3e(0x180)]),_0x59bdbb=await _0xfa67a9['ZrhGx'](ensureOpencodePluginConfig,_0x57fb0e),_0xa1e9e8?.[_0x995a3e(0x183)](_0x995a3e(0x193),{'isFirstRun':_0x317287,'opencode':!![]})):(_0xa1e9e8?.[_0x995a3e(0x1a0)]('plugin'),await _0xfa67a9[_0x995a3e(0x18c)](ensureClaudePlugin,_0x57fb0e),_0xa1e9e8?.[_0x995a3e(0x183)]('plugin',{'isFirstRun':_0x317287}));if(_0x38202b&&_0x59bdbb){_0xa1e9e8?.[_0x995a3e(0x1a0)]('skills');try{await _0xfa67a9[_0x995a3e(0x171)](installSkill,_0xfa67a9[_0x995a3e(0x157)],{'level':_0x59bdbb[_0x995a3e(0x14c)],'cliVersion':getCurrentVersion(),'platform':_0x995a3e(0x149)}),_0xa1e9e8?.[_0x995a3e(0x183)](_0x995a3e(0x1a3),{'isFirstRun':_0x317287,'opencode':!![]});}catch(_0x4761f6){console['warn'](_0xfa67a9[_0x995a3e(0x155)],_0x4761f6 instanceof Error?_0x4761f6[_0x995a3e(0x19b)]:_0x4761f6),_0xa1e9e8?.[_0x995a3e(0x183)](_0x995a3e(0x1a3),{'isFirstRun':_0x317287,'opencode':!![],'failed':!![]});}}else _0xa1e9e8?.[_0x995a3e(0x1a0)]('skills'),await ensureClaudeSkills(_0x57fb0e),_0xa1e9e8?.['trackPhaseEnd'](_0xfa67a9[_0x995a3e(0x17e)],{'isFirstRun':_0x317287});if(!_0x4895c1&&!_0x4a4371?.[_0x995a3e(0x14f)])console[_0x995a3e(0x17d)](_0xfa67a9[_0x995a3e(0x18f)]),console['log']('\x20\x20'+bold(_0x995a3e(0x1a2))+'\x0a');else{_0xa1e9e8?.['trackPhaseStart'](_0xfa67a9[_0x995a3e(0x178)]);const _0xf42662=await _0xfa67a9['kSMxD'](ensureLocalEnv,{'url':_0x4a4371?.['url'],'force':_0x4a4371?.['force'],'allowInsecureLocalhost':_0x4a4371?.[_0x995a3e(0x143)]},_0xa1e9e8);_0xa1e9e8?.['trackPhaseEnd'](_0x995a3e(0x197),{'isFirstRun':_0x317287,'profileReady':_0xf42662[_0x995a3e(0x152)],'userSkipped':_0xf42662[_0x995a3e(0x144)]}),_0xf42662[_0x995a3e(0x152)]&&console['log']('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x38202b)console[_0x995a3e(0x17d)]('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console[_0x995a3e(0x17d)](_0x995a3e(0x148)),console['log'](_0xfa67a9['HDpdg']),console[_0x995a3e(0x17d)]('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x4c9b00=bold(_0x995a3e(0x190));console['log'](_0xfa67a9[_0x995a3e(0x159)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x4c9b00+'\x20and\x20prompt\x20the\x20coding',_0x995a3e(0x158))+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
@@ -1 +1 @@
1
- const _0x5f05c2=_0x525d;(function(_0x184d69,_0x31e93f){const _0x4f2521=_0x525d,_0x299ee7=_0x184d69();while(!![]){try{const _0x3f091b=-parseInt(_0x4f2521(0xb2))/0x1*(parseInt(_0x4f2521(0xc9))/0x2)+-parseInt(_0x4f2521(0xb6))/0x3*(parseInt(_0x4f2521(0xc8))/0x4)+-parseInt(_0x4f2521(0xea))/0x5*(parseInt(_0x4f2521(0xd9))/0x6)+parseInt(_0x4f2521(0xb4))/0x7+-parseInt(_0x4f2521(0xbf))/0x8+-parseInt(_0x4f2521(0xf6))/0x9*(parseInt(_0x4f2521(0xe0))/0xa)+-parseInt(_0x4f2521(0xed))/0xb*(-parseInt(_0x4f2521(0xe7))/0xc);if(_0x3f091b===_0x31e93f)break;else _0x299ee7['push'](_0x299ee7['shift']());}catch(_0x27aa87){_0x299ee7['push'](_0x299ee7['shift']());}}}(_0x45a7,0x9ddcb));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';function _0x45a7(){const _0xa03319=['success','not_installed','16467CrvDdb','yoDjX','configured','hasEncryptedAuth','plugin','WdzPc','user','oyboU','isArray','3510UduSxW','settingsPath','utf-8','project','toString','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','yLTfV','qgLdC','includes','path','OPMuq','cmsSP','version','qWwNV','ITVGG','opencode','match','\x0a\x20\x20No\x20active\x20profile\x20set','\x0a---\x20Skills\x20---','xofFV','foiIf','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','Version:\x20','LsSmR','map','status','akLOb','1155223maQEYV','Ycodx','3371823TUPXVx','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','84fkDmeo','rqkiw','\x20\x20Run:\x20ranger\x20setup\x20--opencode','organizationName','data','enabled','rlytr','cwd','Organization:\x20','9635288nKtXcb','zEhGa','join','API\x20Environment:\x20','\x1b[1m','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','\x20\x20Run:\x20ranger\x20skillup','\x20(latest:\x20','JTBhm','77084ptEgiH','2UDwuaR','hBRWG','NPgCf','DEBUG','isDirectory','\x20plugin(s)\x20configured','stdout','settings.json','log','close','truzZ','\x20(up\x20to\x20date)','ranger@trailhead','LYuYT','details','No\x20skills\x20installed','3294174mupuMn','name','SKILL.md','config','\x1b]8;;\x07','ZAYth','length','22710RagACD','pipe','auth.json','\x20\x20\x20\x20','unknown','\x20\x20Not\x20configured','\x20\x20\x20\x20Auth:\x20','40464hZEDwN','bYqZt','filter','10qIqjom'];_0x45a7=function(){return _0xa03319;};return _0x45a7();}import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0xadd756=>_0x5f05c2(0xc3)+_0xadd756+'\x1b[0m',link=(_0x452256,_0x4ad44a)=>'\x1b]8;;file://'+_0x452256+'\x07'+(_0x4ad44a||_0x452256)+_0x5f05c2(0xdd);function _0x525d(_0x49e10d,_0x5495af){_0x49e10d=_0x49e10d-0xad;const _0x45a79b=_0x45a7();let _0x525d7f=_0x45a79b[_0x49e10d];return _0x525d7f;}async function getOpencodePluginStatus(){const _0xfd93a6=_0x5f05c2,_0xee045e={'rqkiw':_0xfd93a6(0xec),'Ycodx':function(_0x4b1356,_0x455641){return _0x4b1356(_0x455641);},'GeCQf':_0xfd93a6(0xef),'cmsSP':function(_0x1787f2,_0x466dd0){return _0x1787f2>_0x466dd0;},'RbGhJ':function(_0x1f4e17,_0x555c39){return _0x1f4e17(_0x555c39);},'EjFIp':function(_0x50df1f,_0x2e2156){return _0x50df1f(_0x2e2156);},'foiIf':'string','OPMuq':_0xfd93a6(0x105),'jFZdA':'pipe','ziEaa':'error','WdzPc':_0xfd93a6(0xd2)};return new Promise(_0x52e2d8=>{const _0x4742bc=_0xfd93a6,_0x2f3d92={'ZYiyI':function(_0x153935,_0x26447e){return _0x153935!==_0x26447e;},'yoDjX':_0xee045e[_0x4742bc(0x10a)],'yLTfV':'opencode-plugin'},_0x8f4292=spawn(_0xee045e[_0x4742bc(0x100)],['debug',_0x4742bc(0xdc)],{'stdio':['ignore',_0xee045e['jFZdA'],_0x4742bc(0xe1)]});let _0x2f90b9='';_0x8f4292[_0x4742bc(0xcf)]?.['on'](_0x4742bc(0xba),_0x24d3ea=>{_0x2f90b9+=_0x24d3ea['toString']();}),_0x8f4292['stderr']?.['on'](_0x4742bc(0xba),_0x39fa1d=>{const _0x50d6fe=_0x4742bc;_0x2f90b9+=_0x39fa1d[_0x50d6fe(0xfa)]();}),_0x8f4292['on'](_0xee045e['ziEaa'],()=>{const _0x5ad38c=_0x4742bc;_0x52e2d8({'status':_0xee045e[_0x5ad38c(0xb7)]});}),_0x8f4292['on'](_0xee045e[_0x4742bc(0xf2)],_0x22fc18=>{const _0xa03ebf=_0x4742bc;if(_0x22fc18!==0x0){_0xee045e[_0xa03ebf(0xb3)](_0x52e2d8,{'status':_0xee045e[_0xa03ebf(0xb7)]});return;}const _0x3f5336=_0x2f90b9['trim']();let _0x460f26=null;if(_0x3f5336)try{_0x460f26=JSON['parse'](_0x3f5336);}catch{const _0x4653d7=_0x3f5336['match'](/\{[\s\S]*\}$/);if(_0x4653d7)try{_0x460f26=JSON['parse'](_0x4653d7[0x0]);}catch{_0x460f26=null;}}const _0x44fec4=Array[_0xa03ebf(0xf5)](_0x460f26?.['plugin'])?_0x460f26?.[_0xa03ebf(0xf1)]:[],_0x4f9546=_0x44fec4['some'](_0x41ff9a=>{const _0x4427cf=_0xa03ebf;if(_0x2f3d92['ZYiyI'](typeof _0x41ff9a,_0x2f3d92[_0x4427cf(0xee)]))return![];return _0x41ff9a[_0x4427cf(0xfe)]('@ranger-testing/opencode-plugin')||_0x41ff9a['includes'](_0x2f3d92[_0x4427cf(0xfc)]);});if(_0x4f9546){_0x52e2d8({'status':_0xee045e['GeCQf'],'details':_0x44fec4['length']>0x0?_0x44fec4['length']+_0xa03ebf(0xce):undefined});return;}if(_0xee045e[_0xa03ebf(0x101)](_0x44fec4[_0xa03ebf(0xdf)],0x0)){_0xee045e['RbGhJ'](_0x52e2d8,{'status':'not_configured','details':_0x44fec4['length']+_0xa03ebf(0xce)});return;}_0xee045e['EjFIp'](_0x52e2d8,{'status':'not_configured'});});});}async function getSkillsFromDir(_0x208586,_0x3d6c96){const _0x20718c=_0x5f05c2,_0x279570={'qWwNV':function(_0xc97f33,_0x128a59,_0x1b2d5f){return _0xc97f33(_0x128a59,_0x1b2d5f);},'ZAYth':_0x20718c(0xdb),'ITVGG':function(_0x73dee0,_0x7fd1bd){return _0x73dee0(_0x7fd1bd);},'sdJBg':function(_0x1e8a6f,_0x140f2b,_0x515713){return _0x1e8a6f(_0x140f2b,_0x515713);}};if(!existsSync(_0x208586))return[];const _0x4751f3=[];try{const _0x43c8bb=await _0x279570[_0x20718c(0x103)](readdir,_0x208586,{'withFileTypes':!![]});for(const _0x41eb5f of _0x43c8bb){if(_0x41eb5f[_0x20718c(0xcd)]()){const _0x5afb2d=join(_0x208586,_0x41eb5f['name'],_0x279570[_0x20718c(0xde)]);if(_0x279570[_0x20718c(0x104)](existsSync,_0x5afb2d)){let _0x4a76a4=_0x41eb5f[_0x20718c(0xda)];try{const _0x27f24b=await _0x279570['sdJBg'](readFile,_0x5afb2d,_0x20718c(0xf8)),_0x5348fd=_0x27f24b[_0x20718c(0x106)](/name:\s*(.+)/);_0x5348fd&&(_0x4a76a4=_0x5348fd[0x1]['trim']());}catch{}_0x4751f3['push']({'name':_0x41eb5f[_0x20718c(0xda)],'displayName':_0x4a76a4,'path':_0x5afb2d,'level':_0x3d6c96});}}}}catch{return[];}return _0x4751f3;}async function getInstalledSkills(){const _0x2f240b=_0x5f05c2,_0x5b89c4={'hJaJs':function(_0x2e058c,_0x2c142b,_0x5beda1){return _0x2e058c(_0x2c142b,_0x5beda1);},'LYuYT':function(_0x196be1){return _0x196be1();},'JyrDp':function(_0x42c4ee,_0x2a33fe,_0x10c1f0){return _0x42c4ee(_0x2a33fe,_0x10c1f0);},'oyboU':'user'},[_0x80f439,_0x2b4aee]=await Promise['all']([_0x5b89c4['hJaJs'](getSkillsFromDir,_0x5b89c4[_0x2f240b(0xd6)](getProjectSkillsDir),_0x2f240b(0xf9)),_0x5b89c4['JyrDp'](getSkillsFromDir,getUserSkillsDir(),_0x5b89c4[_0x2f240b(0xf4)])]);return{'project':_0x80f439,'user':_0x2b4aee};}async function getEnvironments(){const _0x4a66e1=_0x5f05c2,_0x4affa1={'qgLdC':function(_0x20ddf0,_0x37a7fb){return _0x20ddf0(_0x37a7fb);},'NPgCf':_0x4a66e1(0xd0),'MemJP':function(_0x1dde42,_0x456327,_0x24d96a){return _0x1dde42(_0x456327,_0x24d96a);},'cptpx':'auth.json.enc','rlytr':function(_0x5e71fb,_0x4a40ee){return _0x5e71fb(_0x4a40ee);},'zRWNo':function(_0x153e44,_0x39933a){return _0x153e44===_0x39933a;}},{envNames:_0x43a498,activeEnv:_0xcc0b46}=await getEnvNames(),_0x352911=getRangerDir();if(!_0x4affa1['rlytr'](existsSync,_0x352911))return{'envs':[],'activeEnv':null};const _0x2d9320=_0x43a498['map'](_0x305e19=>{const _0x472552=_0x4a66e1,_0x3dfbb7=_0x4affa1[_0x472552(0xfd)](getEnvDir,_0x305e19),_0x5b06f1=join(_0x3dfbb7,_0x4affa1[_0x472552(0xcb)]),_0x57d2c8=join(_0x3dfbb7,_0x472552(0xe2)),_0x4a1289=_0x4affa1['MemJP'](join,_0x3dfbb7,_0x4affa1['cptpx']);return{'name':_0x305e19,'settingsPath':existsSync(_0x5b06f1)?_0x5b06f1:'(not\x20found)','hasPlaintextAuth':_0x4affa1[_0x472552(0xbc)](existsSync,_0x57d2c8),'hasEncryptedAuth':existsSync(_0x4a1289),'isActive':_0x4affa1['zRWNo'](_0x305e19,_0xcc0b46)};});return{'envs':_0x2d9320,'activeEnv':_0xcc0b46};}export async function status(){const _0x24a5f8=_0x5f05c2,_0x2fb1ab={'GQjGd':'\x0a📊\x20Ranger\x20Status\x0a','zEhGa':function(_0x5b5d7e){return _0x5b5d7e();},'bYqZt':function(_0x3a6f15,_0x31a412,_0x116f94){return _0x3a6f15(_0x31a412,_0x116f94);},'YoXpH':function(_0x3f2910,_0x267ddc){return _0x3f2910(_0x267ddc);},'giUSK':function(_0x175e0e,_0x5d5c53){return _0x175e0e(_0x5d5c53);},'LsSmR':function(_0x40b51d){return _0x40b51d();},'xofFV':function(_0x3dbcf8){return _0x3dbcf8();},'USyPn':function(_0x36843c,_0x2a690a){return _0x36843c(_0x2a690a);},'UcTlc':'not_configured','tXmzK':_0x24a5f8(0xe5),'DAUhv':_0x24a5f8(0x10b),'SvaAD':'\x0a---\x20Claude\x20Code\x20Plugin\x20---','akLOb':'enabled','djVyM':function(_0x11e220,_0x4b09af){return _0x11e220(_0x4b09af);},'hBRWG':_0x24a5f8(0xfb),'YHOKc':_0x24a5f8(0x108),'VJiuA':_0x24a5f8(0xd8),'HvFOt':function(_0x22a543,_0x1890b2){return _0x22a543>_0x1890b2;},'iavjA':'\x20\x20Project-level:','vDXwv':function(_0x521c07,_0x2940f9){return _0x521c07(_0x2940f9);},'JTBhm':'\x0a---\x20Profiles\x20---','EMEmL':function(_0x37ce60){return _0x37ce60();},'ayaEK':function(_0x495766,_0x1f87c6){return _0x495766===_0x1f87c6;},'truzZ':'No\x20profiles\x20configured','dYshm':'plaintext','uRbrB':'none'};console['log'](_0x2fb1ab['GQjGd']);const _0x2f8897=process[_0x24a5f8(0xbd)](),_0x1c2a72=_0x2fb1ab[_0x24a5f8(0xc0)](getRangerDir);if(!existsSync(_0x1c2a72)){console['log']('Root:\x20'+link(_0x2f8897,bold(basename(_0x2f8897)))),console['log']('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x24a5f8(0xd1)](_0x24a5f8(0xb5));return;}console[_0x24a5f8(0xd1)]('Root:\x20'+_0x2fb1ab[_0x24a5f8(0xe8)](link,_0x2f8897,_0x2fb1ab['YoXpH'](bold,_0x2fb1ab['giUSK'](basename,_0x2f8897))));const _0x1f9588=getCurrentVersion(),_0x46090c=_0x2fb1ab[_0x24a5f8(0xae)](getLatestVersion);if(_0x46090c['version']&&_0x46090c['version']!==_0x1f9588)console[_0x24a5f8(0xd1)]('Version:\x20'+_0x1f9588+_0x24a5f8(0xc6)+_0x46090c[_0x24a5f8(0x102)]+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x46090c['version']?console[_0x24a5f8(0xd1)](_0x24a5f8(0xad)+_0x1f9588+_0x24a5f8(0xd4)):console['log'](_0x24a5f8(0xad)+_0x1f9588);const _0x221f90=await getToken();if(_0x221f90){const _0x43b31f=await getCurrentUser(_0x221f90);_0x43b31f[_0x24a5f8(0xeb)]?console[_0x24a5f8(0xd1)](_0x24a5f8(0xbe)+bold(_0x43b31f[_0x24a5f8(0xf3)][_0x24a5f8(0xb9)])):(console[_0x24a5f8(0xd1)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x24a5f8(0xd1)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x24a5f8(0xd1)]('API\x20Token:\x20✗\x20Not\x20found'),console[_0x24a5f8(0xd1)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env'][_0x24a5f8(0xcc)]&&(console[_0x24a5f8(0xd1)](_0x24a5f8(0xc2)+_0x2fb1ab[_0x24a5f8(0x109)](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+getApiBaseUrl()));console[_0x24a5f8(0xd1)]('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x1c2ea7=await getOpencodePluginStatus();if(_0x1c2ea7['status']==='configured')console['log']('\x20\x20'+_0x2fb1ab['USyPn'](bold,'@ranger-testing/opencode-plugin')+':\x20configured'),_0x1c2ea7['details']&&console[_0x24a5f8(0xd1)]('\x20\x20'+_0x1c2ea7['details']);else _0x1c2ea7[_0x24a5f8(0xb0)]===_0x2fb1ab['UcTlc']?(console[_0x24a5f8(0xd1)](_0x2fb1ab['tXmzK']),_0x1c2ea7[_0x24a5f8(0xd7)]&&console[_0x24a5f8(0xd1)]('\x20\x20'+_0x1c2ea7[_0x24a5f8(0xd7)]),console[_0x24a5f8(0xd1)](_0x24a5f8(0xb8))):console['log'](_0x2fb1ab['DAUhv']);console[_0x24a5f8(0xd1)](_0x2fb1ab['SvaAD']);const _0x207aaa=await getPluginInfo(_0x24a5f8(0xd5));if(_0x207aaa){const _0x3e3eb8=_0x207aaa['scope']||_0x24a5f8(0xe4),_0x1303cd=_0x207aaa[_0x24a5f8(0xbb)]?_0x2fb1ab[_0x24a5f8(0xb1)]:'disabled';console['log']('\x20\x20'+_0x2fb1ab['djVyM'](bold,_0x24a5f8(0xd5))+':\x20installed\x20('+_0x3e3eb8+',\x20'+_0x1303cd+')');}else console[_0x24a5f8(0xd1)]('\x20\x20Not\x20installed'),console['log'](_0x2fb1ab[_0x24a5f8(0xca)]);console[_0x24a5f8(0xd1)](_0x2fb1ab['YHOKc']);const {project:_0x112e17,user:_0x448ce6}=await _0x2fb1ab[_0x24a5f8(0xae)](getInstalledSkills),_0x37569f=_0x112e17['filter'](_0x10643c=>RANGER_MANAGED_SKILLS['includes'](_0x10643c['name'])),_0x1b2b31=_0x448ce6[_0x24a5f8(0xe9)](_0x21bd97=>RANGER_MANAGED_SKILLS['includes'](_0x21bd97['name'])),_0x4611e3=_0x37569f[_0x24a5f8(0xdf)]+_0x1b2b31['length'];if(_0x4611e3===0x0)console[_0x24a5f8(0xd1)](_0x2fb1ab['VJiuA']),console[_0x24a5f8(0xd1)](_0x24a5f8(0xc5));else{if(_0x2fb1ab['HvFOt'](_0x37569f[_0x24a5f8(0xdf)],0x0)){console['log'](_0x2fb1ab['iavjA']);for(const _0x14b935 of _0x37569f){console[_0x24a5f8(0xd1)](_0x24a5f8(0xe3)+_0x2fb1ab['giUSK'](bold,_0x14b935['displayName'])+':\x20'+link(_0x14b935[_0x24a5f8(0xff)],basename(_0x14b935[_0x24a5f8(0xff)])));}}if(_0x1b2b31[_0x24a5f8(0xdf)]>0x0){console['log']('\x20\x20User-level:');for(const _0x209a7d of _0x1b2b31){console['log'](_0x24a5f8(0xe3)+_0x2fb1ab['vDXwv'](bold,_0x209a7d['displayName'])+':\x20'+_0x2fb1ab['bYqZt'](link,_0x209a7d[_0x24a5f8(0xff)],basename(_0x209a7d['path'])));}}}console[_0x24a5f8(0xd1)](_0x2fb1ab[_0x24a5f8(0xc7)]);const {envs:_0x3a0bc4,activeEnv:_0xb6eed}=await _0x2fb1ab['EMEmL'](getEnvironments);if(_0x2fb1ab['ayaEK'](_0x3a0bc4['length'],0x0))console['log'](_0x2fb1ab[_0x24a5f8(0xd3)]),console[_0x24a5f8(0xd1)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x3df08f of _0x3a0bc4){const _0x1fb9f6=_0x3df08f['isActive']?'\x20(active)':'',_0x3158f5=_0x3df08f[_0x24a5f8(0xf0)]?'encrypted':_0x3df08f['hasPlaintextAuth']?_0x2fb1ab['dYshm']:_0x2fb1ab['uRbrB'];console['log']('\x20\x20'+bold(_0x3df08f['name'])+_0x1fb9f6),console[_0x24a5f8(0xd1)](_0x24a5f8(0xe6)+_0x3158f5),_0x3df08f['settingsPath']!=='(not\x20found)'&&console[_0x24a5f8(0xd1)]('\x20\x20\x20\x20Settings:\x20'+link(_0x3df08f['settingsPath'],basename(_0x3df08f[_0x24a5f8(0xf7)])));}!_0xb6eed&&(console['log'](_0x24a5f8(0x107)),console['log'](_0x24a5f8(0xc4)+_0x3a0bc4[_0x24a5f8(0xaf)](_0x1cd941=>_0x1cd941[_0x24a5f8(0xda)])[_0x24a5f8(0xc1)](',\x20')+')'));}console['log']('');}
1
+ const _0x4ca45e=_0x5b70;(function(_0x4d909b,_0xa51330){const _0x36aaea=_0x5b70,_0x491b4e=_0x4d909b();while(!![]){try{const _0x480f4f=parseInt(_0x36aaea(0x168))/0x1*(-parseInt(_0x36aaea(0x113))/0x2)+parseInt(_0x36aaea(0x11f))/0x3*(parseInt(_0x36aaea(0x140))/0x4)+parseInt(_0x36aaea(0x15e))/0x5+parseInt(_0x36aaea(0x137))/0x6+-parseInt(_0x36aaea(0x117))/0x7+parseInt(_0x36aaea(0x12a))/0x8*(parseInt(_0x36aaea(0x122))/0x9)+-parseInt(_0x36aaea(0x156))/0xa*(-parseInt(_0x36aaea(0x11e))/0xb);if(_0x480f4f===_0xa51330)break;else _0x491b4e['push'](_0x491b4e['shift']());}catch(_0x4424c4){_0x491b4e['push'](_0x491b4e['shift']());}}}(_0x9a0c,0x22549));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';function _0x9a0c(){const _0x247004=['gHIab','\x0a---\x20Profiles\x20---','SKILL.md','opencode','tiryr','not_installed','toString','settings.json','11291VWbhur','TPFZI','\x1b[1m','version','DEBUG','disabled','6hNMueR','\x20\x20Run:\x20ranger\x20skillup','encrypted','HSQpi','1684732MiDkOX','includes','QNygx','ignore','Root:\x20','ZlkEP','gExcf','649GRMxwz','51TYFNBQ','SMTgN','trim','9fyqorD','path','pzeDV','Version:\x20','log','(not\x20found)','mlQZU','env','840272BoySvt','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','No\x20skills\x20installed','utf-8','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','status','settingsPath','API\x20Environment:\x20','mJaxD','success','none','ggzZK','SjRtc','568614zVXhAP','close','join','\x0a---\x20Skills\x20---','parse','UwyQh','all','No\x20profiles\x20configured','project','25184Lonkwq','unknown','\x20(active)','details','plugin','\x20(latest:\x20','data','TRbEz','length','ranger@trailhead','map','scope','EFcCS','enabled','API\x20URL:\x20','Zmrxr','push','name','not_configured','\x20\x20Run:\x20ranger\x20setup\x20--opencode','tnUTx','configured','17330wDFJir','\x20\x20Project-level:','ARYji','\x0a📊\x20Ranger\x20Status\x0a','bIEhW','\x20plugin(s)\x20configured','debug','nPCKZ','30420zAMuYe','\x20\x20Run:\x20ranger\x20setup\x20[token]'];_0x9a0c=function(){return _0x247004;};return _0x9a0c();}import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';function _0x5b70(_0x2b537c,_0xec76fa){_0x2b537c=_0x2b537c-0x113;const _0x9a0c5=_0x9a0c();let _0x5b7048=_0x9a0c5[_0x2b537c];return _0x5b7048;}import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x3459b1=>_0x4ca45e(0x16a)+_0x3459b1+'\x1b[0m',link=(_0x4590cc,_0x5670f3)=>'\x1b]8;;file://'+_0x4590cc+'\x07'+(_0x5670f3||_0x4590cc)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0xc2d051=_0x4ca45e,_0x131949={'mJaxD':_0xc2d051(0x165),'nPCKZ':function(_0x2c0f26,_0x2f807a){return _0x2c0f26!==_0x2f807a;},'IxHqq':function(_0x3df372,_0x243d1f){return _0x3df372(_0x243d1f);},'vRnRw':_0xc2d051(0x152),'oUPTK':function(_0x4c63b0,_0x157047,_0x45ccd2,_0x27c825){return _0x4c63b0(_0x157047,_0x45ccd2,_0x27c825);},'ggzZK':_0xc2d051(0x163),'Zmrxr':'pipe','mlQZU':_0xc2d051(0x146)};return new Promise(_0x2b7d4e=>{const _0x56e4f0=_0xc2d051,_0x143def={'TPFZI':function(_0x55011f,_0x4087c2){const _0x48a198=_0x5b70;return _0x131949[_0x48a198(0x15d)](_0x55011f,_0x4087c2);},'npMzZ':function(_0x54a834,_0x3dddff){return _0x131949['IxHqq'](_0x54a834,_0x3dddff);},'uAXDJ':_0x131949['vRnRw']},_0x59d2eb=_0x131949['oUPTK'](spawn,_0x131949[_0x56e4f0(0x135)],[_0x56e4f0(0x15c),'config'],{'stdio':[_0x56e4f0(0x11a),_0x131949[_0x56e4f0(0x14f)],_0x131949['Zmrxr']]});let _0x3733f8='';_0x59d2eb['stdout']?.['on']('data',_0x4ecb0e=>{_0x3733f8+=_0x4ecb0e['toString']();}),_0x59d2eb['stderr']?.['on'](_0x131949[_0x56e4f0(0x128)],_0x37f9a2=>{const _0x5af0f7=_0x56e4f0;_0x3733f8+=_0x37f9a2[_0x5af0f7(0x166)]();}),_0x59d2eb['on']('error',()=>{const _0x432d17=_0x56e4f0;_0x2b7d4e({'status':_0x131949[_0x432d17(0x132)]});}),_0x59d2eb['on'](_0x56e4f0(0x138),_0x3789eb=>{const _0x490ec0=_0x56e4f0,_0x47d6ea={'yHrYf':function(_0x4485c3,_0x16b2b4){const _0x5e74c1=_0x5b70;return _0x143def[_0x5e74c1(0x169)](_0x4485c3,_0x16b2b4);}};if(_0x3789eb!==0x0){_0x143def['npMzZ'](_0x2b7d4e,{'status':_0x490ec0(0x165)});return;}const _0xaef88c=_0x3733f8[_0x490ec0(0x121)]();let _0x4d2efd=null;if(_0xaef88c)try{_0x4d2efd=JSON[_0x490ec0(0x13b)](_0xaef88c);}catch{const _0x45d71e=_0xaef88c['match'](/\{[\s\S]*\}$/);if(_0x45d71e)try{_0x4d2efd=JSON[_0x490ec0(0x13b)](_0x45d71e[0x0]);}catch{_0x4d2efd=null;}}const _0x50c4d8=Array['isArray'](_0x4d2efd?.[_0x490ec0(0x144)])?_0x4d2efd?.['plugin']:[],_0x4814ee=_0x50c4d8['some'](_0xb36894=>{const _0x29ab61=_0x490ec0;if(_0x47d6ea['yHrYf'](typeof _0xb36894,'string'))return![];return _0xb36894['includes']('@ranger-testing/opencode-plugin')||_0xb36894[_0x29ab61(0x118)]('opencode-plugin');});if(_0x4814ee){_0x2b7d4e({'status':'configured','details':_0x50c4d8[_0x490ec0(0x148)]>0x0?_0x50c4d8['length']+_0x490ec0(0x15b):undefined});return;}if(_0x50c4d8[_0x490ec0(0x148)]>0x0){_0x2b7d4e({'status':_0x143def['uAXDJ'],'details':_0x50c4d8[_0x490ec0(0x148)]+_0x490ec0(0x15b)});return;}_0x2b7d4e({'status':_0x490ec0(0x152)});});});}async function getSkillsFromDir(_0x48dd1a,_0x2e0cf4){const _0x51a7c0=_0x4ca45e,_0x15bc2a={'ARYji':function(_0x3f3c32,_0x449342){return _0x3f3c32(_0x449342);},'SjRtc':function(_0x69cbad,_0x31da50){return _0x69cbad(_0x31da50);}};if(!_0x15bc2a[_0x51a7c0(0x158)](existsSync,_0x48dd1a))return[];const _0x9b5d20=[];try{const _0x2e736f=await readdir(_0x48dd1a,{'withFileTypes':!![]});for(const _0x345aa1 of _0x2e736f){if(_0x345aa1['isDirectory']()){const _0x2f6ca5=join(_0x48dd1a,_0x345aa1[_0x51a7c0(0x151)],_0x51a7c0(0x162));if(_0x15bc2a[_0x51a7c0(0x136)](existsSync,_0x2f6ca5)){let _0x482bf5=_0x345aa1[_0x51a7c0(0x151)];try{const _0x181e54=await readFile(_0x2f6ca5,_0x51a7c0(0x12d)),_0x3de0d5=_0x181e54['match'](/name:\s*(.+)/);_0x3de0d5&&(_0x482bf5=_0x3de0d5[0x1]['trim']());}catch{}_0x9b5d20[_0x51a7c0(0x150)]({'name':_0x345aa1[_0x51a7c0(0x151)],'displayName':_0x482bf5,'path':_0x2f6ca5,'level':_0x2e0cf4});}}}}catch{return[];}return _0x9b5d20;}async function getInstalledSkills(){const _0x3e3466=_0x4ca45e,_0x585e2c={'azQDD':function(_0x32d9ba,_0x2488ca,_0x3d6b14){return _0x32d9ba(_0x2488ca,_0x3d6b14);},'dIEwe':function(_0x109252,_0x6efcff,_0xae89ac){return _0x109252(_0x6efcff,_0xae89ac);},'LJolc':function(_0x26a1b3){return _0x26a1b3();},'UwyQh':'user'},[_0xb6dcb0,_0x1fe3d7]=await Promise[_0x3e3466(0x13d)]([_0x585e2c['azQDD'](getSkillsFromDir,getProjectSkillsDir(),_0x3e3466(0x13f)),_0x585e2c['dIEwe'](getSkillsFromDir,_0x585e2c['LJolc'](getUserSkillsDir),_0x585e2c[_0x3e3466(0x13c)])]);return{'project':_0xb6dcb0,'user':_0x1fe3d7};}async function getEnvironments(){const _0x18a162=_0x4ca45e,_0x32e509={'tnUTx':function(_0xd53502,_0x5d4e0d){return _0xd53502(_0x5d4e0d);},'EqdRT':'auth.json','nBZql':function(_0x3ea29f){return _0x3ea29f();}},{envNames:_0x1bfb9b,activeEnv:_0x3d8dd5}=await _0x32e509['nBZql'](getEnvNames),_0x292ee7=_0x32e509['nBZql'](getRangerDir);if(!existsSync(_0x292ee7))return{'envs':[],'activeEnv':null};const _0x1cbc43=_0x1bfb9b[_0x18a162(0x14a)](_0x52333f=>{const _0x3b77b2=_0x18a162,_0x3cbab4=_0x32e509[_0x3b77b2(0x154)](getEnvDir,_0x52333f),_0x5cfd7f=join(_0x3cbab4,_0x3b77b2(0x167)),_0x11e1e2=join(_0x3cbab4,_0x32e509['EqdRT']),_0x5f094c=join(_0x3cbab4,'auth.json.enc');return{'name':_0x52333f,'settingsPath':_0x32e509['tnUTx'](existsSync,_0x5cfd7f)?_0x5cfd7f:_0x3b77b2(0x127),'hasPlaintextAuth':existsSync(_0x11e1e2),'hasEncryptedAuth':existsSync(_0x5f094c),'isActive':_0x52333f===_0x3d8dd5};});return{'envs':_0x1cbc43,'activeEnv':_0x3d8dd5};}export async function status(){const _0x4c553d=_0x4ca45e,_0x499277={'ZYzWc':_0x4c553d(0x159),'HSQpi':function(_0x317fe7,_0x14634f){return _0x317fe7(_0x14634f);},'SMTgN':function(_0x1cf2b7,_0x3e2b3d,_0x6b9532){return _0x1cf2b7(_0x3e2b3d,_0x6b9532);},'ZlkEP':function(_0x3314d4,_0xcd97b6){return _0x3314d4(_0xcd97b6);},'Eevuy':function(_0x1801e2){return _0x1801e2();},'QNygx':function(_0xb2d64e,_0x3ff7d1){return _0xb2d64e!==_0x3ff7d1;},'WALCf':_0x4c553d(0x155),'gExcf':function(_0x2e82b4,_0x14813f){return _0x2e82b4(_0x14813f);},'ATnvq':'@ranger-testing/opencode-plugin','WtDee':function(_0x3f2671,_0xabf560){return _0x3f2671===_0xabf560;},'aKyam':'\x20\x20Not\x20configured','tiryr':_0x4c553d(0x153),'QSDZF':_0x4c553d(0x12e),'EFcCS':function(_0x11db0f,_0x22ea11){return _0x11db0f(_0x22ea11);},'GEila':_0x4c553d(0x141),'TRbEz':_0x4c553d(0x14d),'gHIab':'\x20\x20Not\x20installed','pzeDV':function(_0x3f1dce,_0x3b7e3b){return _0x3f1dce===_0x3b7e3b;},'rLHQJ':function(_0x43039e,_0x555377,_0x1d6624){return _0x43039e(_0x555377,_0x1d6624);},'ySJEl':function(_0x268163,_0x634b91){return _0x268163>_0x634b91;},'wgAaj':function(_0xe7da00,_0x64401a){return _0xe7da00(_0x64401a);},'amfyK':_0x4c553d(0x142),'zrLBv':_0x4c553d(0x115),'bIEhW':_0x4c553d(0x134),'EyrWG':'(not\x20found)'};console[_0x4c553d(0x126)](_0x499277['ZYzWc']);const _0x3a6aff=process['cwd'](),_0x53c942=getRangerDir();if(!_0x499277[_0x4c553d(0x116)](existsSync,_0x53c942)){console['log']('Root:\x20'+_0x499277['SMTgN'](link,_0x3a6aff,bold(_0x499277['HSQpi'](basename,_0x3a6aff)))),console['log'](_0x4c553d(0x12b)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x4c553d(0x126)](_0x4c553d(0x11b)+_0x499277[_0x4c553d(0x120)](link,_0x3a6aff,_0x499277[_0x4c553d(0x11c)](bold,basename(_0x3a6aff))));const _0x465ba6=getCurrentVersion(),_0x43edf4=_0x499277['Eevuy'](getLatestVersion);if(_0x43edf4['version']&&_0x499277[_0x4c553d(0x119)](_0x43edf4[_0x4c553d(0x16b)],_0x465ba6))console[_0x4c553d(0x126)](_0x4c553d(0x125)+_0x465ba6+_0x4c553d(0x145)+_0x43edf4['version']+')'),console[_0x4c553d(0x126)]('\x20\x20Run:\x20ranger\x20update');else _0x43edf4['version']?console[_0x4c553d(0x126)](_0x4c553d(0x125)+_0x465ba6+'\x20(up\x20to\x20date)'):console['log']('Version:\x20'+_0x465ba6);const _0x57ec12=await getToken();if(_0x57ec12){const _0x2823a0=await getCurrentUser(_0x57ec12);_0x2823a0[_0x4c553d(0x133)]?console[_0x4c553d(0x126)]('Organization:\x20'+_0x499277[_0x4c553d(0x116)](bold,_0x2823a0['user']['organizationName'])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x4c553d(0x126)](_0x4c553d(0x15f)));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x4c553d(0x15f));process[_0x4c553d(0x129)][_0x4c553d(0x16c)]&&(console['log'](_0x4c553d(0x131)+getCurrentEnvironment()),console[_0x4c553d(0x126)](_0x4c553d(0x14e)+_0x499277['Eevuy'](getApiBaseUrl)));console[_0x4c553d(0x126)]('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x181274=await getOpencodePluginStatus();if(_0x181274[_0x4c553d(0x12f)]===_0x499277['WALCf'])console['log']('\x20\x20'+_0x499277[_0x4c553d(0x11d)](bold,_0x499277['ATnvq'])+':\x20configured'),_0x181274[_0x4c553d(0x143)]&&console[_0x4c553d(0x126)]('\x20\x20'+_0x181274[_0x4c553d(0x143)]);else _0x499277['WtDee'](_0x181274[_0x4c553d(0x12f)],'not_configured')?(console['log'](_0x499277['aKyam']),_0x181274['details']&&console['log']('\x20\x20'+_0x181274['details']),console[_0x4c553d(0x126)](_0x499277[_0x4c553d(0x164)])):console['log'](_0x499277['QSDZF']);console[_0x4c553d(0x126)]('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x5a75fa=await _0x499277[_0x4c553d(0x14c)](getPluginInfo,_0x4c553d(0x149));if(_0x5a75fa){const _0x3300ff=_0x5a75fa[_0x4c553d(0x14b)]||_0x499277['GEila'],_0x2594c5=_0x5a75fa['enabled']?_0x499277[_0x4c553d(0x147)]:_0x4c553d(0x16d);console[_0x4c553d(0x126)]('\x20\x20'+bold(_0x4c553d(0x149))+':\x20installed\x20('+_0x3300ff+',\x20'+_0x2594c5+')');}else console[_0x4c553d(0x126)](_0x499277[_0x4c553d(0x160)]),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console['log'](_0x4c553d(0x13a));const {project:_0x200d2b,user:_0x235683}=await getInstalledSkills(),_0x463c05=_0x200d2b['filter'](_0x31ace3=>RANGER_MANAGED_SKILLS[_0x4c553d(0x118)](_0x31ace3['name'])),_0x4fda73=_0x235683['filter'](_0x3275f8=>RANGER_MANAGED_SKILLS['includes'](_0x3275f8[_0x4c553d(0x151)])),_0x36e887=_0x463c05['length']+_0x4fda73['length'];if(_0x499277[_0x4c553d(0x124)](_0x36e887,0x0))console[_0x4c553d(0x126)](_0x4c553d(0x12c)),console['log'](_0x4c553d(0x114));else{if(_0x463c05['length']>0x0){console['log'](_0x4c553d(0x157));for(const _0x3ee970 of _0x463c05){console[_0x4c553d(0x126)]('\x20\x20\x20\x20'+bold(_0x3ee970['displayName'])+':\x20'+_0x499277['rLHQJ'](link,_0x3ee970['path'],basename(_0x3ee970[_0x4c553d(0x123)])));}}if(_0x499277['ySJEl'](_0x4fda73['length'],0x0)){console['log']('\x20\x20User-level:');for(const _0x1295be of _0x4fda73){console[_0x4c553d(0x126)]('\x20\x20\x20\x20'+_0x499277['wgAaj'](bold,_0x1295be['displayName'])+':\x20'+_0x499277['SMTgN'](link,_0x1295be['path'],basename(_0x1295be['path'])));}}}console[_0x4c553d(0x126)](_0x4c553d(0x161));const {envs:_0xdb9fd1,activeEnv:_0x38ff0f}=await getEnvironments();if(_0xdb9fd1[_0x4c553d(0x148)]===0x0)console['log'](_0x4c553d(0x13e)),console[_0x4c553d(0x126)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x382e66 of _0xdb9fd1){const _0x2cf14f=_0x382e66['isActive']?_0x499277['amfyK']:'',_0x9972b3=_0x382e66['hasEncryptedAuth']?_0x499277['zrLBv']:_0x382e66['hasPlaintextAuth']?'plaintext':_0x499277[_0x4c553d(0x15a)];console[_0x4c553d(0x126)]('\x20\x20'+bold(_0x382e66['name'])+_0x2cf14f),console[_0x4c553d(0x126)]('\x20\x20\x20\x20Auth:\x20'+_0x9972b3),_0x382e66['settingsPath']!==_0x499277['EyrWG']&&console['log']('\x20\x20\x20\x20Settings:\x20'+link(_0x382e66[_0x4c553d(0x130)],basename(_0x382e66['settingsPath'])));}!_0x38ff0f&&(console['log']('\x0a\x20\x20No\x20active\x20profile\x20set'),console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0xdb9fd1[_0x4c553d(0x14a)](_0x1d169c=>_0x1d169c[_0x4c553d(0x151)])[_0x4c553d(0x139)](',\x20')+')'));}console[_0x4c553d(0x126)]('');}
@@ -1 +1 @@
1
- (function(_0x2f1267,_0xe670ab){const _0xc3f6e5=_0x37a6,_0x5b2f1d=_0x2f1267();while(!![]){try{const _0x5bd3c4=-parseInt(_0xc3f6e5(0x1d0))/0x1+parseInt(_0xc3f6e5(0x1d8))/0x2*(-parseInt(_0xc3f6e5(0x1fb))/0x3)+-parseInt(_0xc3f6e5(0x1ea))/0x4*(-parseInt(_0xc3f6e5(0x1fa))/0x5)+-parseInt(_0xc3f6e5(0x1f5))/0x6*(-parseInt(_0xc3f6e5(0x1f8))/0x7)+parseInt(_0xc3f6e5(0x1e4))/0x8+parseInt(_0xc3f6e5(0x1e2))/0x9+parseInt(_0xc3f6e5(0x1f2))/0xa;if(_0x5bd3c4===_0xe670ab)break;else _0x5b2f1d['push'](_0x5b2f1d['shift']());}catch(_0x65cd5){_0x5b2f1d['push'](_0x5b2f1d['shift']());}}}(_0x7dcc,0x63c28));import{spawn}from'child_process';function _0x7dcc(){const _0x30204b=['wNdKI','utf-8','opencode','UsIJO','inherit','TKrHc','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','active-profile.txt','length','findIndex','push','error','TdZuI','trailhead','\x0aYour\x20version\x20(','sJBag','trim','splice','afWdE','360147OKfvbb','\x20\x20Failed\x20to\x20reinstall\x20','\x0aSuccessfully\x20installed\x20latest\x20version.','\x0aInstalling\x20','CPYNh','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','ranger@trailhead','6BgkqIh','update','pipe','install','GBrPl','yadhG','plcrO','@latest...\x0a','hYqwl','--scope','3406320SVGJjp','SjdvC','3453920ZzKVPH','.gitignore','lnKCx','Uqvkc','OvUCF','win32','1820CrsUIe','endsWith','SVlkE','Update\x20failed.','Attempting\x20install\x20anyway...','claude','PLhRC','project','1515620FBTrQR','YDbhH','close','267882uBuATN','join','warn','35UFNLgO','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','4145DwybSf','793449obiEjO','PnPlN','log','hLCVe','Update\x20failed:\x20','DAcoe'];_0x7dcc=function(){return _0x30204b;};return _0x7dcc();}import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';function _0x37a6(_0x5a492c,_0x363d00){_0x5a492c=_0x5a492c-0x1c6;const _0x7dcce3=_0x7dcc();let _0x37a64c=_0x7dcce3[_0x5a492c];return _0x37a64c;}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{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x4a8373=_0x37a6,_0x5cc5e1={'wNdKI':function(_0xd3f483,_0xe723f6){return _0xd3f483(_0xe723f6);},'SVlkE':'npm','Uqvkc':_0x4a8373(0x1f4)};return new Promise(_0x11bbff=>{const _0x217e62=_0x4a8373;console['log'](_0x217e62(0x1d3)+PACKAGE_NAME+_0x217e62(0x1df));const _0x416b05=spawn(_0x5cc5e1[_0x217e62(0x1ec)],[_0x217e62(0x1db),'-g',PACKAGE_NAME+'@latest'],{'stdio':_0x217e62(0x205),'shell':process['platform']===_0x217e62(0x1e9)});_0x416b05['on'](_0x5cc5e1[_0x217e62(0x1e7)],_0x2af172=>{_0x11bbff(_0x2af172===0x0);}),_0x416b05['on'](_0x217e62(0x1c8),()=>{const _0x1c42cc=_0x217e62;_0x5cc5e1[_0x1c42cc(0x201)](_0x11bbff,![]);});});}async function updateClaudeMarketplace(){const _0x1f0880=_0x37a6,_0x55336d={'YjnGR':function(_0x2c5ccb,_0x49d47a,_0x54d214,_0x538f70){return _0x2c5ccb(_0x49d47a,_0x54d214,_0x538f70);},'uXhFY':_0x1f0880(0x1d9),'NBUvg':function(_0x132e60,_0x1a669d){return _0x132e60===_0x1a669d;},'TKrHc':'close'};return new Promise(_0x37b685=>{const _0x55a557=_0x1f0880,_0x381351=_0x55336d['YjnGR'](spawn,_0x55a557(0x1ef),['plugin','marketplace',_0x55336d['uXhFY'],_0x55a557(0x1ca)],{'stdio':'pipe','shell':_0x55336d['NBUvg'](process['platform'],_0x55a557(0x1e9))});_0x381351['on'](_0x55336d[_0x55a557(0x206)],_0x470da8=>{_0x37b685(_0x470da8===0x0);}),_0x381351['on']('error',()=>{_0x37b685(![]);});});}async function updateClaudePlugin(_0xfc1f15){const _0x4de75e={'mxwyH':'plugin','TdZuI':'update'};return new Promise(_0x357ae7=>{const _0x1121ed=_0x37a6,_0x2c73d9={'beDrH':function(_0x5ddbb5,_0x285393){return _0x5ddbb5(_0x285393);},'plcrO':function(_0x49c4aa,_0x4c3d4c){return _0x49c4aa===_0x4c3d4c;}},_0x294f2a=[_0x4de75e['mxwyH'],_0x4de75e[_0x1121ed(0x1c9)],_0x1121ed(0x1d7)];_0xfc1f15&&_0x294f2a[_0x1121ed(0x1c7)](_0x1121ed(0x1e1),_0xfc1f15);const _0x273be7=spawn(_0x1121ed(0x1ef),_0x294f2a,{'stdio':_0x1121ed(0x1da),'shell':process['platform']===_0x1121ed(0x1e9)});_0x273be7['on'](_0x1121ed(0x1f4),_0x32c159=>{const _0x3994cd=_0x1121ed;_0x2c73d9['beDrH'](_0x357ae7,_0x2c73d9[_0x3994cd(0x1de)](_0x32c159,0x0));}),_0x273be7['on'](_0x1121ed(0x1c8),()=>{_0x357ae7(![]);});});}function isSkillInstalled(_0x33801b,_0x52df1b,_0x5247f1){const _0x139e94=_0x37a6,_0x3e9b41={'cqspO':function(_0x30bd96,_0xb080df){return _0x30bd96===_0xb080df;},'bkXXL':_0x139e94(0x203),'OvUCF':function(_0x40ef18,_0x3406c2){return _0x40ef18(_0x3406c2);},'KKxRE':function(_0x2942ba,_0x44ac6f){return _0x2942ba(_0x44ac6f);},'qFODT':function(_0xf0b61d,_0x2612db,_0x3afb10){return _0xf0b61d(_0x2612db,_0x3afb10);},'YDbhH':function(_0x3e2ecc,_0x3e4629){return _0x3e2ecc(_0x3e4629);}},_0x17978c=_0x3e9b41['cqspO'](_0x5247f1,_0x3e9b41['bkXXL'])?_0x3e9b41[_0x139e94(0x1e8)](getOpencodeSkillsDir,_0x52df1b):_0x3e9b41['KKxRE'](getSkillsDir,_0x52df1b),_0x7bee16=_0x3e9b41['qFODT'](join,_0x17978c,_0x33801b);return _0x3e9b41[_0x139e94(0x1f3)](existsSync,_0x7bee16);}async function reinstallSkills(_0x49e47e){const _0x481379=_0x37a6,_0x83384c={'sdWFb':'project','TajbV':'user','GBrPl':_0x481379(0x1ef),'sJBag':function(_0x20fc59,_0x16c4f2,_0x2204c6){return _0x20fc59(_0x16c4f2,_0x2204c6);}},_0x1270b6=[_0x83384c['sdWFb'],_0x83384c['TajbV']],_0x4292e5=[];for(const _0xba38ea of _0x1270b6){for(const _0x3469ce of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x3469ce,_0xba38ea,_0x83384c[_0x481379(0x1dc)])&&_0x4292e5['push']({'skillName':_0x3469ce,'level':_0xba38ea,'platform':_0x481379(0x1ef)}),isSkillInstalled(_0x3469ce,_0xba38ea,'opencode')&&_0x4292e5['push']({'skillName':_0x3469ce,'level':_0xba38ea,'platform':'opencode'});}}for(const _0xa2c86c of _0x1270b6){for(const _0x133416 of DEPRECATED_SKILLS){await _0x83384c[_0x481379(0x1cc)](removeSkill,_0x133416,_0xa2c86c);}}if(_0x4292e5[_0x481379(0x209)]===0x0){console['log'](_0x481379(0x207));return;}console['log']('\x0aReinstalling\x20'+_0x4292e5[_0x481379(0x209)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x595481,level:_0x7c218a,platform:_0x262651}of _0x4292e5){try{await installSkill(_0x595481,{'level':_0x7c218a,'cliVersion':_0x49e47e,'platform':_0x262651});}catch(_0x47b464){console[_0x481379(0x1f7)](_0x481379(0x1d1)+_0x262651+'\x20'+_0x7c218a+'\x20skill\x20'+_0x595481+':',_0x47b464);}}}async function ensureActiveProfileGitignored(){const _0x183c8a=_0x37a6,_0x25ccfb={'SjdvC':function(_0x7183ef,_0xbfb83c,_0x329c93){return _0x7183ef(_0xbfb83c,_0x329c93);},'qKQgv':function(_0x1257a0){return _0x1257a0();},'HIIXi':_0x183c8a(0x1e5),'UWUYu':function(_0x77852d,_0x58533c,_0x16cf25){return _0x77852d(_0x58533c,_0x16cf25);},'PLhRC':_0x183c8a(0x202),'FlQXO':function(_0xa76d88,_0x3c3fa7,_0xd01ce0,_0xc13dec){return _0xa76d88(_0x3c3fa7,_0xd01ce0,_0xc13dec);}},_0x5924a8=_0x25ccfb[_0x183c8a(0x1e3)](join,_0x25ccfb['qKQgv'](getRangerDir),_0x25ccfb['HIIXi']);if(!existsSync(_0x5924a8))return![];let _0x474173='';try{_0x474173=await _0x25ccfb['UWUYu'](readFile,_0x5924a8,_0x25ccfb[_0x183c8a(0x1f0)]);}catch{return![];}const _0x2da503=_0x474173['split'](/\r?\n/);if(_0x2da503['some'](_0x4b8383=>_0x4b8383[_0x183c8a(0x1cd)]()===_0x183c8a(0x208)))return![];let _0xd37106=_0x2da503[_0x183c8a(0x1c6)](_0x1d5a66=>_0x1d5a66[_0x183c8a(0x1cd)]()==='active-feature.txt');_0xd37106===-0x1&&(_0xd37106=_0x2da503['length']);_0x2da503[_0x183c8a(0x1ce)](_0xd37106,0x0,'active-profile.txt');let _0x14e77c=_0x2da503[_0x183c8a(0x1f6)]('\x0a');!_0x14e77c[_0x183c8a(0x1eb)]('\x0a')&&(_0x14e77c+='\x0a');try{await _0x25ccfb['FlQXO'](writeFile,_0x5924a8,_0x14e77c,_0x25ccfb['PLhRC']);}catch{return![];}return!![];}export async function update(){const _0x59b2b3=_0x37a6,_0x336f69={'PnPlN':_0x59b2b3(0x1ee),'hYqwl':_0x59b2b3(0x1d2),'JXEJL':function(_0x3c332d){return _0x3c332d();},'CGgHe':function(_0x2194fa,_0x1e03a1){return _0x2194fa===_0x1e03a1;},'yadhG':_0x59b2b3(0x1f9),'UsIJO':function(_0x41bd9a){return _0x41bd9a();},'lnKCx':_0x59b2b3(0x1ed),'hLCVe':function(_0x5b6341,_0x64e0f1){return _0x5b6341(_0x64e0f1);},'rwlfS':'trailhead','CPYNh':_0x59b2b3(0x1d5),'Gcxbw':_0x59b2b3(0x1d6),'afWdE':_0x59b2b3(0x1f1),'DAcoe':'✓\x20Migrated\x20active\x20profile\x20file'},_0x48014e=getCurrentVersion();console['log']('\x0aCurrent\x20version:\x20'+_0x48014e),console['log']('Checking\x20for\x20updates...');const _0x3de318=getLatestVersion();let _0x4c1e1d=_0x48014e;if(!_0x3de318['version']){console['warn']('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x3de318[_0x59b2b3(0x1c8)]),console['log'](_0x336f69[_0x59b2b3(0x1fc)]);const _0x490f32=await runInstall();if(_0x490f32)console[_0x59b2b3(0x1fd)](_0x336f69[_0x59b2b3(0x1e0)]),_0x4c1e1d=_0x336f69['JXEJL'](getCurrentVersion);else throw new Error(_0x59b2b3(0x1ff)+_0x3de318['error']);}else{const _0x5742b1=_0x3de318['version'];console[_0x59b2b3(0x1fd)]('Latest\x20version:\x20\x20'+_0x5742b1);const _0x47e68d=compareVersions(_0x48014e,_0x5742b1);if(_0x336f69['CGgHe'](_0x47e68d,0x0))console[_0x59b2b3(0x1fd)](_0x336f69[_0x59b2b3(0x1dd)]);else{if(_0x47e68d<0x0)console['log'](_0x59b2b3(0x1cb)+_0x48014e+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x5742b1+').');else{const _0x5e3d42=await _0x336f69['UsIJO'](runInstall);if(_0x5e3d42)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x5742b1),_0x4c1e1d=_0x5742b1;else throw new Error(_0x336f69[_0x59b2b3(0x1e6)]);}}}await _0x336f69['hLCVe'](reinstallSkills,_0x4c1e1d);const _0x374f36=await _0x336f69[_0x59b2b3(0x1fe)](isMarketplaceAdded,_0x336f69['rwlfS']),_0x267fbd=await isPluginInstalled('ranger@trailhead');if(_0x374f36){const _0x1035fc=await _0x336f69[_0x59b2b3(0x204)](updateClaudeMarketplace);_0x1035fc&&console[_0x59b2b3(0x1fd)](_0x336f69[_0x59b2b3(0x1d4)]);}if(_0x267fbd){const _0x383393=await updateClaudePlugin();_0x383393&&console['log'](_0x336f69['Gcxbw']);const _0x1faa33=await updateClaudePlugin(_0x336f69[_0x59b2b3(0x1cf)]);_0x1faa33&&console[_0x59b2b3(0x1fd)]((_0x383393?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x84f70d=await migrateActiveProfileFile();_0x84f70d&&console['log'](_0x336f69[_0x59b2b3(0x200)]);const _0x55a471=await ensureActiveProfileGitignored();console['log']('\x0a✅\x20Update\x20complete!');}
1
+ function _0x8a5e(_0x5aa3f9,_0x2e7c9b){_0x5aa3f9=_0x5aa3f9-0x1b5;const _0x3a7696=_0x3a76();let _0x8a5e6a=_0x3a7696[_0x5aa3f9];return _0x8a5e6a;}(function(_0x5a28f5,_0x5ba861){const _0x493866=_0x8a5e,_0x38208c=_0x5a28f5();while(!![]){try{const _0x266042=-parseInt(_0x493866(0x1ed))/0x1*(-parseInt(_0x493866(0x1d6))/0x2)+-parseInt(_0x493866(0x1ec))/0x3+parseInt(_0x493866(0x1d5))/0x4+parseInt(_0x493866(0x1d0))/0x5*(-parseInt(_0x493866(0x1e4))/0x6)+parseInt(_0x493866(0x1b5))/0x7*(parseInt(_0x493866(0x1dc))/0x8)+-parseInt(_0x493866(0x1bc))/0x9*(-parseInt(_0x493866(0x1f2))/0xa)+-parseInt(_0x493866(0x1c5))/0xb;if(_0x266042===_0x5ba861)break;else _0x38208c['push'](_0x38208c['shift']());}catch(_0x2c379d){_0x38208c['push'](_0x38208c['shift']());}}}(_0x3a76,0x50df2));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x3bff26=_0x8a5e,_0x1da36d={'SAwtU':_0x3bff26(0x1c9),'nEkMR':function(_0x513937,_0x11c776){return _0x513937===_0x11c776;}};return new Promise(_0x5ccf1a=>{const _0x46b7b9=_0x3bff26;console['log']('\x0aInstalling\x20'+PACKAGE_NAME+_0x46b7b9(0x1f4));const _0xffd174=spawn(_0x1da36d['SAwtU'],[_0x46b7b9(0x1ba),'-g',PACKAGE_NAME+'@latest'],{'stdio':_0x46b7b9(0x1cf),'shell':_0x1da36d[_0x46b7b9(0x1c3)](process['platform'],'win32')});_0xffd174['on'](_0x46b7b9(0x1e1),_0x4778b4=>{_0x5ccf1a(_0x4778b4===0x0);}),_0xffd174['on'](_0x46b7b9(0x1d2),()=>{_0x5ccf1a(![]);});});}async function updateClaudeMarketplace(){const _0x10168d=_0x8a5e,_0x368de6={'TbcIo':function(_0x4d1e54,_0x468b7b){return _0x4d1e54===_0x468b7b;},'IdIUE':function(_0x38834e,_0x2b4b77){return _0x38834e(_0x2b4b77);},'gMknx':function(_0x4dbeb1,_0x57adef,_0x43dd26,_0x874d99){return _0x4dbeb1(_0x57adef,_0x43dd26,_0x874d99);},'mAraD':_0x10168d(0x1ca),'YoBlO':_0x10168d(0x1e3),'wkbbv':_0x10168d(0x1de),'lbUVV':'update','FBjpM':'pipe','whLod':_0x10168d(0x1e1),'GOfPc':'error'};return new Promise(_0x25e373=>{const _0x3312a3=_0x10168d,_0x1cf38a=_0x368de6['gMknx'](spawn,_0x368de6['mAraD'],[_0x368de6['YoBlO'],_0x368de6['wkbbv'],_0x368de6['lbUVV'],'trailhead'],{'stdio':_0x368de6[_0x3312a3(0x1e8)],'shell':process[_0x3312a3(0x1f1)]===_0x3312a3(0x1c2)});_0x1cf38a['on'](_0x368de6['whLod'],_0x95d886=>{_0x25e373(_0x368de6['TbcIo'](_0x95d886,0x0));}),_0x1cf38a['on'](_0x368de6[_0x3312a3(0x1d3)],()=>{_0x368de6['IdIUE'](_0x25e373,![]);});});}async function updateClaudePlugin(_0x20bedc){const _0x2d2ff5=_0x8a5e,_0x4e9da3={'WHDbC':function(_0x5885ec,_0x5d68bf,_0xbbcd83,_0xadf613){return _0x5885ec(_0x5d68bf,_0xbbcd83,_0xadf613);},'hWrhG':_0x2d2ff5(0x1ca),'KnoVw':'pipe','kvubV':function(_0x290285,_0x4eaeca){return _0x290285===_0x4eaeca;},'dsbXI':'win32','BiZLv':_0x2d2ff5(0x1d2)};return new Promise(_0x5e9a11=>{const _0x31c5f0=_0x2d2ff5,_0x5f309f={'UhMNZ':function(_0x17cbb2,_0x57fc50){return _0x17cbb2(_0x57fc50);}},_0xce2d9d=[_0x31c5f0(0x1e3),'update',_0x31c5f0(0x1bb)];_0x20bedc&&_0xce2d9d[_0x31c5f0(0x1c1)](_0x31c5f0(0x1d7),_0x20bedc);const _0x2e8ee6=_0x4e9da3[_0x31c5f0(0x1df)](spawn,_0x4e9da3[_0x31c5f0(0x1ea)],_0xce2d9d,{'stdio':_0x4e9da3[_0x31c5f0(0x1bd)],'shell':_0x4e9da3['kvubV'](process['platform'],_0x4e9da3['dsbXI'])});_0x2e8ee6['on']('close',_0x33b4bb=>{_0x5e9a11(_0x33b4bb===0x0);}),_0x2e8ee6['on'](_0x4e9da3[_0x31c5f0(0x1b6)],()=>{_0x5f309f['UhMNZ'](_0x5e9a11,![]);});});}function isSkillInstalled(_0x3c8d91,_0x40f97b,_0x427fd3){const _0x3d7e25=_0x8a5e,_0x355cff={'GGUqc':_0x3d7e25(0x1e2),'PsBIC':function(_0xad25d6,_0x46cb86){return _0xad25d6(_0x46cb86);}},_0x40286d=_0x427fd3===_0x355cff[_0x3d7e25(0x1d8)]?_0x355cff[_0x3d7e25(0x1c7)](getOpencodeSkillsDir,_0x40f97b):getSkillsDir(_0x40f97b),_0x12be95=join(_0x40286d,_0x3c8d91);return existsSync(_0x12be95);}async function reinstallSkills(_0x19a916){const _0x4b5140=_0x8a5e,_0xb6d2f7={'ZzJWh':'user','XPSlS':function(_0x2af4f4,_0x39c45b,_0x10acfb,_0x49a66c){return _0x2af4f4(_0x39c45b,_0x10acfb,_0x49a66c);},'fWprP':'claude','xCclr':function(_0x342ce6,_0x582299,_0x262b89,_0x1cbe9d){return _0x342ce6(_0x582299,_0x262b89,_0x1cbe9d);},'Zxxzt':function(_0x1ffae8,_0x25bb69){return _0x1ffae8===_0x25bb69;},'LeDWC':_0x4b5140(0x1c4)},_0x345fbe=[_0x4b5140(0x1e9),_0xb6d2f7[_0x4b5140(0x1f0)]],_0x36957f=[];for(const _0x5e67d3 of _0x345fbe){for(const _0x1d53a8 of RANGER_MANAGED_SKILLS){_0xb6d2f7[_0x4b5140(0x1c8)](isSkillInstalled,_0x1d53a8,_0x5e67d3,_0x4b5140(0x1ca))&&_0x36957f['push']({'skillName':_0x1d53a8,'level':_0x5e67d3,'platform':_0xb6d2f7['fWprP']}),_0xb6d2f7['xCclr'](isSkillInstalled,_0x1d53a8,_0x5e67d3,'opencode')&&_0x36957f[_0x4b5140(0x1c1)]({'skillName':_0x1d53a8,'level':_0x5e67d3,'platform':'opencode'});}}for(const _0x51d3c9 of _0x345fbe){for(const _0x2db516 of DEPRECATED_SKILLS){await removeSkill(_0x2db516,_0x51d3c9);}}if(_0xb6d2f7['Zxxzt'](_0x36957f[_0x4b5140(0x1db)],0x0)){console['log'](_0xb6d2f7[_0x4b5140(0x1f7)]);return;}console[_0x4b5140(0x1d9)](_0x4b5140(0x1e7)+_0x36957f[_0x4b5140(0x1db)]+_0x4b5140(0x1cc));for(const {skillName:_0x30970c,level:_0x34af10,platform:_0x51d2f3}of _0x36957f){try{await installSkill(_0x30970c,{'level':_0x34af10,'cliVersion':_0x19a916,'platform':_0x51d2f3});}catch(_0x38eb44){console[_0x4b5140(0x1b8)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x51d2f3+'\x20'+_0x34af10+'\x20skill\x20'+_0x30970c+':',_0x38eb44);}}}async function ensureActiveProfileGitignored(){const _0x205ff7=_0x8a5e,_0x3048fb={'VSikw':function(_0x2fc766){return _0x2fc766();},'rJxYy':function(_0x1037f8,_0x10a813){return _0x1037f8(_0x10a813);},'USUeM':'active-profile.txt','njxoq':function(_0x3c51e1,_0xb3ffb5,_0x3bfa3f,_0x357b52){return _0x3c51e1(_0xb3ffb5,_0x3bfa3f,_0x357b52);},'WdOSd':'utf-8'},_0x50deb2=join(_0x3048fb[_0x205ff7(0x1d1)](getRangerDir),_0x205ff7(0x1eb));if(!_0x3048fb['rJxYy'](existsSync,_0x50deb2))return![];let _0x56e293='';try{_0x56e293=await readFile(_0x50deb2,_0x205ff7(0x1ce));}catch{return![];}const _0x267aa1=_0x56e293['split'](/\r?\n/);if(_0x267aa1['some'](_0x3ccf96=>_0x3ccf96[_0x205ff7(0x1e6)]()===_0x205ff7(0x1e5)))return![];let _0x2a60ec=_0x267aa1[_0x205ff7(0x1d4)](_0x50947b=>_0x50947b[_0x205ff7(0x1e6)]()===_0x205ff7(0x1dd));_0x2a60ec===-0x1&&(_0x2a60ec=_0x267aa1['length']);_0x267aa1['splice'](_0x2a60ec,0x0,_0x3048fb[_0x205ff7(0x1be)]);let _0x139c9b=_0x267aa1['join']('\x0a');!_0x139c9b['endsWith']('\x0a')&&(_0x139c9b+='\x0a');try{await _0x3048fb['njxoq'](writeFile,_0x50deb2,_0x139c9b,_0x3048fb['WdOSd']);}catch{return![];}return!![];}function _0x3a76(){const _0x325cea=['KnoVw','USUeM','cRZZo','Update\x20failed.','push','win32','nEkMR','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','882739NiOGQy','KfFoY','PsBIC','XPSlS','npm','claude','\x0aCould\x20not\x20check\x20latest\x20version:\x20','\x20ranger-managed\x20skill(s)...','LHNnw','utf-8','inherit','15USpoFC','VSikw','error','GOfPc','findIndex','334996kMSYZm','9228vbRSSS','--scope','GGUqc','log','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','length','16OEaIri','active-feature.txt','marketplace','WHDbC','fGyrZ','close','opencode','plugin','266232xoZzLT','active-profile.txt','trim','\x0aReinstalling\x20','FBjpM','project','hWrhG','.gitignore','483609VcGBuY','96aqtTKN','\x0aYour\x20version\x20(','version','ZzJWh','platform','110mgqpPw','Attempting\x20install\x20anyway...','@latest...\x0a','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','qXXZB','LeDWC','Checking\x20for\x20updates...','167748qOomla','BiZLv','Ghnbc','warn','\x0aSuccessfully\x20updated\x20to\x20version\x20','install','ranger@trailhead','107343XMAJgb'];_0x3a76=function(){return _0x325cea;};return _0x3a76();}export async function update(){const _0x173903=_0x8a5e,_0x30ce67={'oLnzY':_0x173903(0x1f8),'Ghnbc':function(_0xdee661){return _0xdee661();},'cRZZo':_0x173903(0x1f3),'LHNnw':'\x0aSuccessfully\x20installed\x20latest\x20version.','fGyrZ':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','KfFoY':function(_0x162b15,_0x1647f7){return _0x162b15(_0x1647f7);},'qXXZB':'ranger@trailhead'},_0x2b45fd=getCurrentVersion();console[_0x173903(0x1d9)]('\x0aCurrent\x20version:\x20'+_0x2b45fd),console[_0x173903(0x1d9)](_0x30ce67['oLnzY']);const _0x7cafca=_0x30ce67[_0x173903(0x1b7)](getLatestVersion);let _0x5ed8b9=_0x2b45fd;if(!_0x7cafca[_0x173903(0x1ef)]){console['warn'](_0x173903(0x1cb)+_0x7cafca[_0x173903(0x1d2)]),console[_0x173903(0x1d9)](_0x30ce67[_0x173903(0x1bf)]);const _0x56df00=await runInstall();if(_0x56df00)console[_0x173903(0x1d9)](_0x30ce67[_0x173903(0x1cd)]),_0x5ed8b9=getCurrentVersion();else throw new Error('Update\x20failed:\x20'+_0x7cafca['error']);}else{const _0x5018a5=_0x7cafca['version'];console[_0x173903(0x1d9)]('Latest\x20version:\x20\x20'+_0x5018a5);const _0x3f5ce3=compareVersions(_0x2b45fd,_0x5018a5);if(_0x3f5ce3===0x0)console[_0x173903(0x1d9)](_0x30ce67[_0x173903(0x1e0)]);else{if(_0x3f5ce3<0x0)console[_0x173903(0x1d9)](_0x173903(0x1ee)+_0x2b45fd+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x5018a5+').');else{const _0x5314df=await runInstall();if(_0x5314df)console['log'](_0x173903(0x1b9)+_0x5018a5),_0x5ed8b9=_0x5018a5;else throw new Error(_0x173903(0x1c0));}}}await reinstallSkills(_0x5ed8b9);const _0x35c73b=await _0x30ce67['KfFoY'](isMarketplaceAdded,'trailhead'),_0x5b599d=await isPluginInstalled(_0x30ce67[_0x173903(0x1f6)]);if(_0x35c73b){const _0x5b177f=await _0x30ce67['Ghnbc'](updateClaudeMarketplace);_0x5b177f&&console[_0x173903(0x1d9)](_0x173903(0x1f5));}if(_0x5b599d){const _0x3fbc03=await updateClaudePlugin();_0x3fbc03&&console['log'](_0x173903(0x1da));const _0x1406e1=await _0x30ce67[_0x173903(0x1c6)](updateClaudePlugin,'project');_0x1406e1&&console['log']((_0x3fbc03?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0xabe333=await migrateActiveProfileFile();_0xabe333&&console['log']('✓\x20Migrated\x20active\x20profile\x20file');const _0x35c1de=await _0x30ce67[_0x173903(0x1b7)](ensureActiveProfileGitignored);console[_0x173903(0x1d9)]('\x0a✅\x20Update\x20complete!');}