@ranger-testing/ranger-cli 2.1.5 → 2.1.7

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 (71) hide show
  1. package/README.md +1 -1
  2. package/build/cli.js +1 -1
  3. package/build/commands/addEnv.js +1 -1
  4. package/build/commands/authEncrypt.js +1 -1
  5. package/build/commands/clean.js +1 -1
  6. package/build/commands/config.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/setup/claude.js +1 -1
  26. package/build/commands/setup/opencode.js +1 -1
  27. package/build/commands/setupCi.js +1 -1
  28. package/build/commands/skillup.js +1 -1
  29. package/build/commands/start.js +1 -1
  30. package/build/commands/status.js +1 -1
  31. package/build/commands/update.js +1 -1
  32. package/build/commands/updateEnv.js +1 -1
  33. package/build/commands/useEnv.js +1 -1
  34. package/build/commands/utils/activeProfile.js +1 -1
  35. package/build/commands/utils/browserSessionsApi.js +1 -1
  36. package/build/commands/utils/claudeConfig.js +1 -1
  37. package/build/commands/utils/claudePlugin.js +1 -1
  38. package/build/commands/utils/crypto.js +1 -1
  39. package/build/commands/utils/desirePathLog.js +1 -1
  40. package/build/commands/utils/deviceAuth.js +1 -1
  41. package/build/commands/utils/environment.js +1 -1
  42. package/build/commands/utils/featureApi.js +1 -1
  43. package/build/commands/utils/featureReportGenerator.js +1 -1
  44. package/build/commands/utils/fixWebmDuration.js +1 -1
  45. package/build/commands/utils/git.js +1 -1
  46. package/build/commands/utils/keychain.js +1 -1
  47. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  48. package/build/commands/utils/mcpImageBase64.js +1 -1
  49. package/build/commands/utils/model.js +1 -1
  50. package/build/commands/utils/opencodeConfig.js +1 -1
  51. package/build/commands/utils/profileMessages.js +1 -1
  52. package/build/commands/utils/profileSetupBanner.js +1 -1
  53. package/build/commands/utils/rangerConfig.js +1 -1
  54. package/build/commands/utils/rangerRoot.js +1 -1
  55. package/build/commands/utils/reportGenerator.js +1 -1
  56. package/build/commands/utils/retry.js +1 -1
  57. package/build/commands/utils/sessionCache.js +1 -1
  58. package/build/commands/utils/settings.js +1 -1
  59. package/build/commands/utils/skillContent.js +1 -1
  60. package/build/commands/utils/skills.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/build/skills/ranger/SKILL.md +25 -7
  68. package/build/skills/ranger/claude.md +7 -0
  69. package/build/skills/ranger/start.md +2 -2
  70. package/build/skills/ranger/verify.md +2 -1
  71. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0xf1c151,_0x1f9053){const _0x2a29f5=_0x1e27,_0x503f24=_0xf1c151();while(!![]){try{const _0x4456fb=parseInt(_0x2a29f5(0x1ba))/0x1*(-parseInt(_0x2a29f5(0x1a9))/0x2)+parseInt(_0x2a29f5(0x1b8))/0x3+parseInt(_0x2a29f5(0x19f))/0x4*(parseInt(_0x2a29f5(0x1a7))/0x5)+parseInt(_0x2a29f5(0x1a1))/0x6+parseInt(_0x2a29f5(0x1a3))/0x7*(parseInt(_0x2a29f5(0x1b7))/0x8)+-parseInt(_0x2a29f5(0x19e))/0x9*(parseInt(_0x2a29f5(0x1b3))/0xa)+-parseInt(_0x2a29f5(0x1ae))/0xb*(parseInt(_0x2a29f5(0x1a5))/0xc);if(_0x4456fb===_0x1f9053)break;else _0x503f24['push'](_0x503f24['shift']());}catch(_0x33042a){_0x503f24['push'](_0x503f24['shift']());}}}(_0x155f,0x53c2a));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';import{createTelemetryCollector}from'../utils/telemetry.js';function _0x1e27(_0x17b03a,_0x1fda1c){_0x17b03a=_0x17b03a-0x198;const _0x155f67=_0x155f();let _0x1e271a=_0x155f67[_0x17b03a];return _0x1e271a;}export async function stopHook(_0x1d9e73){const _0x33d0e8=_0x1e27,_0x33940f={'jnLVZ':function(_0x27b1a7,_0x2e1506){return _0x27b1a7(_0x2e1506);},'WoEGb':function(_0x12b23d,_0x264706){return _0x12b23d===_0x264706;},'tEMbv':'string','TcFgc':function(_0x33e8f8,_0x90ecf1,_0x24c73c,_0x3c1324){return _0x33e8f8(_0x90ecf1,_0x24c73c,_0x3c1324);},'HvfWg':function(_0x1ff1c8,_0x56f670,_0x30fd79){return _0x1ff1c8(_0x56f670,_0x30fd79);},'FVwim':function(_0x4f77f2,_0x19f7a1,_0x91df7e){return _0x4f77f2(_0x19f7a1,_0x91df7e);},'LaqTV':function(_0x2a90dc,_0x38d1bb){return _0x2a90dc&&_0x38d1bb;},'bkqIr':_0x33d0e8(0x199),'oTDcN':function(_0x4ecb73,_0x3e65dc,_0x244554,_0x907581){return _0x4ecb73(_0x3e65dc,_0x244554,_0x907581);}},_0x138d60=await _0x33940f['jnLVZ'](getEnabledHookContext,_0x1d9e73),_0x15ef18=_0x138d60?.['sessionId']??null,_0x7c3f98=Boolean(_0x138d60?.['input']?.['stop_hook_active']),_0x4eaf56=_0x33940f[_0x33d0e8(0x1b2)](typeof _0x138d60?.[_0x33d0e8(0x1ad)]?.['transcript_path'],_0x33940f['tEMbv'])?_0x138d60['input']['transcript_path']:null;let _0x5b8bff=!![];if(!_0x15ef18){await trackStop(_0x15ef18,![],_0x5b8bff);return;}try{const _0x3a5490=getSessionEntry(_0x15ef18);if(!_0x3a5490){await _0x33940f[_0x33d0e8(0x1aa)](trackStop,_0x15ef18,!![],_0x5b8bff);return;}const _0x194625='https://dashboard.ranger.net/features/'+_0x3a5490['featureId'],_0x2dac25='RANGER_SKIP_VERIFICATION',_0xabf687=await getToken(),_0x57a58f=!_0x7c3f98;let _0x33184a=null,_0x215b69=null;const _0x5aa975=_0x7c3f98&&await _0x33940f[_0x33d0e8(0x1b6)](transcriptHasToken,_0x4eaf56,_0x2dac25),_0x349e2e=await _0x33940f[_0x33d0e8(0x1a0)](transcriptHasToken,_0x4eaf56,_0x194625);if(_0xabf687)try{const _0x277492=await getFeature(_0x3a5490[_0x33d0e8(0x1b9)]);_0x33184a=_0x277492['name']??null,_0x215b69=_0x277492['currentSessionId']??null;}catch{}if(_0x33940f['LaqTV'](_0xabf687,_0x215b69))try{await concludeSession(_0x3a5490[_0x33d0e8(0x1b9)],_0x215b69);}catch(_0x257c97){if(_0x5aa975){await _0x33940f[_0x33d0e8(0x1aa)](trackStop,_0x15ef18,!![],_0x5b8bff);return;}_0x5b8bff=![];const _0x3a6269=_0x257c97 instanceof Error?_0x257c97['message']:String(_0x257c97),_0x5abe42={'decision':_0x33940f[_0x33d0e8(0x19d)],'reason':_0x33d0e8(0x1b1)+(_0x33184a?'\x20for\x20\x22'+_0x33184a+'\x22':'')+_0x33d0e8(0x1af)+_0x3a6269+_0x33d0e8(0x1a2)+_0x194625+')\x20and\x20the\x20token\x20`'+_0x2dac25+_0x33d0e8(0x1b0)};console['log'](JSON['stringify'](_0x5abe42)),await _0x33940f['TcFgc'](trackStop,_0x15ef18,!![],_0x5b8bff);return;}await _0x33940f[_0x33d0e8(0x1ab)](trackStop,_0x15ef18,!![],_0x5b8bff);return;}catch{await trackStop(_0x15ef18,!![],_0x5b8bff);return;}}async function trackStop(_0x409a34,_0x1e55c8,_0x17c1b9){const _0x153df1=_0x1e27,_0x9703fb={'RBYPd':function(_0x275ee5,_0x1f45f6){return _0x275ee5??_0x1f45f6;}};try{const _0x698c2c=createTelemetryCollector(_0x153df1(0x1a6));await _0x698c2c[_0x153df1(0x19b)]({'sessionId':_0x9703fb['RBYPd'](_0x409a34,undefined),'hooksEnabled':_0x1e55c8,'stopAllowed':_0x17c1b9}),await _0x698c2c[_0x153df1(0x1b4)](_0x153df1(0x19a));}catch{}}function _0x155f(){const _0x400f9e=[':\x0a\x0a','`,\x20then\x20run\x20/exit\x20again.','Failed\x20to\x20conclude\x20Ranger\x20feature\x20review\x20session','WoEGb','70mDePxW','trackCommandEnd','toString','HvfWg','213544FrPdDN','1875999AmwICz','featureId','317494mKmEOD','stat','block','success','trackCommandStart','utf8','bkqIr','211419etLLUU','87508Costvf','FVwim','3539898PhzqLZ','\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(','70PnwoTq','close','192lRoZLs','hook:stop','15fSJrYQ','size','2RihgHh','TcFgc','oTDcN','alloc','input','496969EYyuQr'];_0x155f=function(){return _0x400f9e;};return _0x155f();}async function transcriptHasToken(_0x40f5fb,_0x1bd628){if(!_0x40f5fb)return![];const _0x3b2004=await readTranscriptTail(_0x40f5fb,0x30d40);return _0x3b2004?_0x3b2004['includes'](_0x1bd628):![];}async function readTranscriptTail(_0x2161ac,_0x49236b){const _0x162947=_0x1e27,_0x205a89={'BzQzO':function(_0x50492a,_0x497b33){return _0x50492a<=_0x497b33;},'neSbD':function(_0x310683,_0x58eacf){return _0x310683-_0x58eacf;},'fwZRo':_0x162947(0x19c)};let _0x47f8b0=null;try{_0x47f8b0=await open(_0x2161ac,'r');const _0x4fea06=await _0x47f8b0[_0x162947(0x198)](),_0x407108=Math['min'](_0x4fea06[_0x162947(0x1a8)],_0x49236b);if(_0x205a89['BzQzO'](_0x407108,0x0))return'';const _0x209e19=Buffer[_0x162947(0x1ac)](_0x407108);return await _0x47f8b0['read'](_0x209e19,0x0,_0x407108,_0x205a89['neSbD'](_0x4fea06['size'],_0x407108)),_0x209e19[_0x162947(0x1b5)](_0x205a89['fwZRo']);}catch{return null;}finally{try{await _0x47f8b0?.[_0x162947(0x1a4)]();}catch{}}}
1
+ (function(_0x269fce,_0x1cc946){const _0x6b0555=_0x5351,_0x87c10c=_0x269fce();while(!![]){try{const _0x618907=parseInt(_0x6b0555(0x1bc))/0x1*(parseInt(_0x6b0555(0x1a3))/0x2)+parseInt(_0x6b0555(0x1ba))/0x3+-parseInt(_0x6b0555(0x1b3))/0x4*(-parseInt(_0x6b0555(0x1b8))/0x5)+parseInt(_0x6b0555(0x1b6))/0x6+-parseInt(_0x6b0555(0x1b5))/0x7*(-parseInt(_0x6b0555(0x1af))/0x8)+parseInt(_0x6b0555(0x1b0))/0x9+-parseInt(_0x6b0555(0x1a6))/0xa;if(_0x618907===_0x1cc946)break;else _0x87c10c['push'](_0x87c10c['shift']());}catch(_0x1c11be){_0x87c10c['push'](_0x87c10c['shift']());}}}(_0x3180,0x99f17));import{open}from'fs/promises';function _0x5351(_0xc77e91,_0x558619){_0xc77e91=_0xc77e91-0x1a3;const _0x318088=_0x3180();let _0x5351fc=_0x318088[_0xc77e91];return _0x5351fc;}import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';import{getSessionEntry}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';function _0x3180(){const _0x4df1d4=['RDskp','name','32817280WcmrAT','qycWB','stringify','block',':\x0a\x0a',')\x20and\x20the\x20token\x20`','currentSessionId','log','size','1912tRcvuz','10041057QbMxDy','`,\x20then\x20run\x20/exit\x20again.','message','91704gPdgsh','input','21938UXIyhm','7183170HrOaAL','YlJMv','5KWyODS','utf8','387579YGRxXA','Akbqp','2ziAIKj','min','IxGwa','featureId','698266icUzDD'];_0x3180=function(){return _0x4df1d4;};return _0x3180();}export async function stopHook(_0x72417e){const _0x4f6a53=_0x5351,_0x4c3c73={'IxGwa':function(_0xda4f6f,_0x45f5db){return _0xda4f6f(_0x45f5db);},'YlJMv':function(_0x40edf7,_0x45b9dd,_0x3a2d6d,_0x2df440){return _0x40edf7(_0x45b9dd,_0x3a2d6d,_0x2df440);},'RDskp':function(_0x15bf0c,_0x1f4713){return _0x15bf0c&&_0x1f4713;},'btvcl':function(_0x5ca2d1,_0x507935){return _0x5ca2d1 instanceof _0x507935;},'ZRpTT':_0x4f6a53(0x1a9),'hXWRZ':function(_0x112400,_0x4ca40b,_0x5644d3,_0x310b7d){return _0x112400(_0x4ca40b,_0x5644d3,_0x310b7d);},'pjArx':function(_0x1d65c8,_0x3515fc,_0x2a39e5,_0x1da2d8){return _0x1d65c8(_0x3515fc,_0x2a39e5,_0x1da2d8);}},_0x49bf44=await getEnabledHookContext(_0x72417e),_0x3e8209=_0x49bf44?.['sessionId']??null,_0x4096e4=_0x4c3c73[_0x4f6a53(0x1be)](Boolean,_0x49bf44?.[_0x4f6a53(0x1b4)]?.['stop_hook_active']),_0x4ee349=typeof _0x49bf44?.['input']?.['transcript_path']==='string'?_0x49bf44['input']['transcript_path']:null;let _0x2fe7a6=!![];if(!_0x3e8209){await _0x4c3c73[_0x4f6a53(0x1b7)](trackStop,_0x3e8209,![],_0x2fe7a6);return;}try{const _0x35e411=_0x4c3c73[_0x4f6a53(0x1be)](getSessionEntry,_0x3e8209);if(!_0x35e411){await trackStop(_0x3e8209,!![],_0x2fe7a6);return;}const _0x3d2927='https://dashboard.ranger.net/features/'+_0x35e411[_0x4f6a53(0x1bf)],_0x17cf4a='RANGER_SKIP_VERIFICATION',_0x5a895d=await getToken(),_0x3bf510=!_0x4096e4;let _0x465696=null,_0x4b82d2=null;const _0x2b92d0=_0x4096e4&&await transcriptHasToken(_0x4ee349,_0x17cf4a),_0x2589d8=await transcriptHasToken(_0x4ee349,_0x3d2927);if(_0x5a895d)try{const _0x590b05=await _0x4c3c73['IxGwa'](getFeature,_0x35e411['featureId']);_0x465696=_0x590b05[_0x4f6a53(0x1a5)]??null,_0x4b82d2=_0x590b05[_0x4f6a53(0x1ac)]??null;}catch{}if(_0x4c3c73[_0x4f6a53(0x1a4)](_0x5a895d,_0x4b82d2))try{await concludeSession(_0x35e411['featureId'],_0x4b82d2);}catch(_0x455e71){if(_0x2b92d0){await _0x4c3c73['YlJMv'](trackStop,_0x3e8209,!![],_0x2fe7a6);return;}_0x2fe7a6=![];const _0x17db8f=_0x4c3c73['btvcl'](_0x455e71,Error)?_0x455e71[_0x4f6a53(0x1b2)]:String(_0x455e71),_0x2eba76={'decision':_0x4c3c73['ZRpTT'],'reason':'Failed\x20to\x20conclude\x20Ranger\x20feature\x20review\x20session'+(_0x465696?'\x20for\x20\x22'+_0x465696+'\x22':'')+_0x4f6a53(0x1aa)+_0x17db8f+'\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('+_0x3d2927+_0x4f6a53(0x1ab)+_0x17cf4a+_0x4f6a53(0x1b1)};console[_0x4f6a53(0x1ad)](JSON[_0x4f6a53(0x1a8)](_0x2eba76)),await _0x4c3c73['hXWRZ'](trackStop,_0x3e8209,!![],_0x2fe7a6);return;}await _0x4c3c73['pjArx'](trackStop,_0x3e8209,!![],_0x2fe7a6);return;}catch{await _0x4c3c73[_0x4f6a53(0x1b7)](trackStop,_0x3e8209,!![],_0x2fe7a6);return;}}async function trackStop(_0x40fb25,_0x469a97,_0x2607f1){const _0x1cccc4=_0x5351,_0x3e74bf={'Akbqp':function(_0xd7080b,_0x5db85b){return _0xd7080b(_0x5db85b);},'qycWB':function(_0x25279a,_0x117566){return _0x25279a??_0x117566;}};try{const _0x605aa8=_0x3e74bf[_0x1cccc4(0x1bb)](createTelemetryCollector,'hook:stop');await _0x605aa8['trackCommandStart']({'sessionId':_0x3e74bf[_0x1cccc4(0x1a7)](_0x40fb25,undefined),'hooksEnabled':_0x469a97,'stopAllowed':_0x2607f1}),await _0x605aa8['trackCommandEnd']('success');}catch{}}async function transcriptHasToken(_0x24dc58,_0x8398fa){const _0x554392={'QOXiX':function(_0x9cbc56,_0x1d3230,_0x6b27a2){return _0x9cbc56(_0x1d3230,_0x6b27a2);}};if(!_0x24dc58)return![];const _0x284cf1=await _0x554392['QOXiX'](readTranscriptTail,_0x24dc58,0x30d40);return _0x284cf1?_0x284cf1['includes'](_0x8398fa):![];}async function readTranscriptTail(_0x5b610b,_0x5caf51){const _0x25b82a=_0x5351,_0x3a29b2={'LYwmN':_0x25b82a(0x1b9)};let _0x51accf=null;try{_0x51accf=await open(_0x5b610b,'r');const _0x560f99=await _0x51accf['stat'](),_0x2327d3=Math[_0x25b82a(0x1bd)](_0x560f99[_0x25b82a(0x1ae)],_0x5caf51);if(_0x2327d3<=0x0)return'';const _0x2b6b0b=Buffer['alloc'](_0x2327d3);return await _0x51accf['read'](_0x2b6b0b,0x0,_0x2327d3,_0x560f99['size']-_0x2327d3),_0x2b6b0b['toString'](_0x3a29b2['LYwmN']);}catch{return null;}finally{try{await _0x51accf?.['close']();}catch{}}}
@@ -1 +1 @@
1
- (function(_0x45a93e,_0x3df5f8){var _0x54bfdc=_0x2688,_0x4e56b9=_0x45a93e();while(!![]){try{var _0x2b321d=parseInt(_0x54bfdc(0x106))/0x1*(-parseInt(_0x54bfdc(0x105))/0x2)+-parseInt(_0x54bfdc(0x102))/0x3+-parseInt(_0x54bfdc(0x104))/0x4*(-parseInt(_0x54bfdc(0x107))/0x5)+-parseInt(_0x54bfdc(0x109))/0x6+parseInt(_0x54bfdc(0x10a))/0x7+-parseInt(_0x54bfdc(0x103))/0x8*(parseInt(_0x54bfdc(0x101))/0x9)+parseInt(_0x54bfdc(0x108))/0xa;if(_0x2b321d===_0x3df5f8)break;else _0x4e56b9['push'](_0x4e56b9['shift']());}catch(_0x157c72){_0x4e56b9['push'](_0x4e56b9['shift']());}}}(_0x7a30,0x34c7a));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';function _0x2688(_0x47af05,_0x310be3){_0x47af05=_0x47af05-0x101;var _0x7a3076=_0x7a30();var _0x2688ad=_0x7a3076[_0x47af05];return _0x2688ad;}export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';function _0x7a30(){var _0x4f9f9a=['445686TlophT','8tOaXCL','546328qjHMqx','40XEiCTI','1417nHSavy','5jvGEkX','9337610cBSgeq','2463486YnQfUu','1080128MWhPTp','3788802UxhPrK'];_0x7a30=function(){return _0x4f9f9a;};return _0x7a30();}
1
+ function _0x7b34(_0x5d3d3a,_0x43ce5b){_0x5d3d3a=_0x5d3d3a-0x10d;var _0x1ff8bc=_0x1ff8();var _0x7b3466=_0x1ff8bc[_0x5d3d3a];return _0x7b3466;}(function(_0x1ca11e,_0x3c3cb5){var _0x350932=_0x7b34,_0x45397b=_0x1ca11e();while(!![]){try{var _0x370e5f=-parseInt(_0x350932(0x116))/0x1*(parseInt(_0x350932(0x10e))/0x2)+-parseInt(_0x350932(0x10f))/0x3+-parseInt(_0x350932(0x115))/0x4*(parseInt(_0x350932(0x118))/0x5)+-parseInt(_0x350932(0x113))/0x6*(-parseInt(_0x350932(0x111))/0x7)+parseInt(_0x350932(0x114))/0x8*(-parseInt(_0x350932(0x117))/0x9)+parseInt(_0x350932(0x112))/0xa*(-parseInt(_0x350932(0x119))/0xb)+-parseInt(_0x350932(0x110))/0xc*(-parseInt(_0x350932(0x10d))/0xd);if(_0x370e5f===_0x3c3cb5)break;else _0x45397b['push'](_0x45397b['shift']());}catch(_0x1a46a4){_0x45397b['push'](_0x45397b['shift']());}}}(_0x1ff8,0x6e18a));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';function _0x1ff8(){var _0xe90898=['176qyHfFY','792763gDEhid','5796lPZZJO','18810Faiubw','2651572oZRuiM','3757tigQOn','2nXUGRG','2195775NphJGs','123684wWDyaV','7fPBuWW','30PoavWR','2389362fgBTrh','6368rdicXm'];_0x1ff8=function(){return _0xe90898;};return _0x1ff8();}export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
@@ -1 +1 @@
1
- (function(_0x5ee335,_0x9e2409){const _0x3e4406=_0x5609,_0x3b91ca=_0x5ee335();while(!![]){try{const _0x983b08=-parseInt(_0x3e4406(0x190))/0x1*(-parseInt(_0x3e4406(0x197))/0x2)+parseInt(_0x3e4406(0x193))/0x3*(-parseInt(_0x3e4406(0x18f))/0x4)+-parseInt(_0x3e4406(0x18c))/0x5*(-parseInt(_0x3e4406(0x19a))/0x6)+-parseInt(_0x3e4406(0x18d))/0x7*(parseInt(_0x3e4406(0x188))/0x8)+parseInt(_0x3e4406(0x198))/0x9+-parseInt(_0x3e4406(0x192))/0xa*(parseInt(_0x3e4406(0x187))/0xb)+parseInt(_0x3e4406(0x196))/0xc;if(_0x983b08===_0x9e2409)break;else _0x3b91ca['push'](_0x3b91ca['shift']());}catch(_0x328c1e){_0x3b91ca['push'](_0x3b91ca['shift']());}}}(_0x1e1b,0x7b9a7));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x5609(_0x4540dc,_0x4956b6){_0x4540dc=_0x4540dc-0x187;const _0x1e1bfa=_0x1e1b();let _0x56092b=_0x1e1bfa[_0x4540dc];return _0x56092b;}import{getCurrentUser}from'./utils/userApi.js';export async function login(){const _0x222303=_0x5609,_0x121c6e={'jVLBg':function(_0x44f22b){return _0x44f22b();},'egvOu':_0x222303(0x189),'cnhFT':function(_0x48afe,_0xd72e9c){return _0x48afe instanceof _0xd72e9c;}},_0x467f6e=process['stdin']['isTTY']&&process[_0x222303(0x195)][_0x222303(0x18a)];if(!_0x467f6e)throw new Error('Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.');try{const _0x555391=await _0x121c6e['jVLBg'](runDeviceAuthFlow),_0x4e61d7=await getCurrentUser(_0x555391);_0x4e61d7[_0x222303(0x18b)]?console[_0x222303(0x18e)]('\x0a✅\x20Logged\x20in\x20to\x20'+_0x4e61d7[_0x222303(0x191)]['organizationName']):console['log'](_0x121c6e['egvOu']);}catch(_0x2da61e){throw new Error(_0x222303(0x199)+(_0x121c6e[_0x222303(0x19b)](_0x2da61e,Error)?_0x2da61e[_0x222303(0x194)]:_0x2da61e));}}function _0x1e1b(){const _0x3d7a81=['67085pGngJj','752948wzndtw','log','1048976jQFzsj','1138NAtSrX','user','40COscMg','6oQsNUx','message','stdout','13102056nhnMps','358DnTODQ','1631700YmcwAa','Login\x20failed:\x20','234cinQLT','cnhFT','3465RjMVcj','72qHBosj','\x0a✅\x20API\x20key\x20stored\x20successfully','isTTY','success'];_0x1e1b=function(){return _0x3d7a81;};return _0x1e1b();}
1
+ function _0x3761(_0x1db637,_0x1ce844){_0x1db637=_0x1db637-0xbe;const _0x3b2459=_0x3b24();let _0x37612a=_0x3b2459[_0x1db637];return _0x37612a;}(function(_0x4d94a9,_0x4ca841){const _0x1b12d5=_0x3761,_0xe8fbd3=_0x4d94a9();while(!![]){try{const _0xbf6e36=parseInt(_0x1b12d5(0xca))/0x1+-parseInt(_0x1b12d5(0xc9))/0x2+-parseInt(_0x1b12d5(0xcf))/0x3*(-parseInt(_0x1b12d5(0xc6))/0x4)+parseInt(_0x1b12d5(0xc4))/0x5+parseInt(_0x1b12d5(0xc0))/0x6+-parseInt(_0x1b12d5(0xcd))/0x7*(-parseInt(_0x1b12d5(0xbe))/0x8)+-parseInt(_0x1b12d5(0xc2))/0x9;if(_0xbf6e36===_0x4ca841)break;else _0xe8fbd3['push'](_0xe8fbd3['shift']());}catch(_0x1c8ec1){_0xe8fbd3['push'](_0xe8fbd3['shift']());}}}(_0x3b24,0x9a205));function _0x3b24(){const _0x1d84fc=['Login\x20failed:\x20','15YiqOMh','4024jalaol','glfuB','6031860DvUjhy','ZJCLJ','20562039khyjmy','isTTY','1813365hYYdSj','stdin','838276OaRsKz','message','stdout','1770740hxoamm','392089Lbpgtz','log','success','13825jorLaj'];_0x3b24=function(){return _0x1d84fc;};return _0x3b24();}import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';export async function login(){const _0x2e2653=_0x3761,_0xe30123={'ZJCLJ':function(_0x393582){return _0x393582();},'RPPOO':function(_0x550d2d,_0x4a72ab){return _0x550d2d(_0x4a72ab);},'glfuB':function(_0xfba491,_0x2c59fb){return _0xfba491 instanceof _0x2c59fb;}},_0x5eaa3d=process[_0x2e2653(0xc5)][_0x2e2653(0xc3)]&&process[_0x2e2653(0xc8)][_0x2e2653(0xc3)];if(!_0x5eaa3d)throw new Error('Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.');try{const _0x1ac85a=await _0xe30123[_0x2e2653(0xc1)](runDeviceAuthFlow),_0x72e74a=await _0xe30123['RPPOO'](getCurrentUser,_0x1ac85a);_0x72e74a[_0x2e2653(0xcc)]?console[_0x2e2653(0xcb)]('\x0a✅\x20Logged\x20in\x20to\x20'+_0x72e74a['user']['organizationName']):console['log']('\x0a✅\x20API\x20key\x20stored\x20successfully');}catch(_0x1ab4f4){throw new Error(_0x2e2653(0xce)+(_0xe30123[_0x2e2653(0xbf)](_0x1ab4f4,Error)?_0x1ab4f4[_0x2e2653(0xc7)]:_0x1ab4f4));}}
@@ -1 +1 @@
1
- function _0x1d59(){const _0x2e6662=['prompt','5761854uYdghW','Project\x20(shared\x20with\x20team\x20via\x20git)','User\x20(available\x20in\x20all\x20your\x20projects)','add','trailhead','181132ERbGMd','success','EyIFj','3QWYiNa','error','output','--scope','Would\x20you\x20like\x20to\x20install\x20skills?','38025740szdWJg','\x0aYou\x20can\x20install\x20manually\x20with:','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','3972794YzkLOo','✓\x20Marketplace\x20already\x20added','1084IDctYb','install','user','eqtOk','8EUMiIJ','rZovv','log','aAlVh','⚠\x20Failed\x20to\x20enable\x20plugin:','wYbuk','project','plugin','1242210MrJaBe','McPTN','DlWPZ','Where\x20should\x20the\x20plugin\x20be\x20installed?','tBFBM','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','18325uvsOFC','push','marketplace','✓\x20Ranger\x20skills\x20already\x20installed','15170805tJlqlx','already\x20enabled','XfAyn','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'];_0x1d59=function(){return _0x2e6662;};return _0x1d59();}(function(_0x2c2edf,_0x156b66){const _0x40c511=_0x5616,_0xe5a6c2=_0x2c2edf();while(!![]){try{const _0x2e8972=parseInt(_0x40c511(0x129))/0x1+parseInt(_0x40c511(0x13d))/0x2*(parseInt(_0x40c511(0x140))/0x3)+-parseInt(_0x40c511(0x11d))/0x4*(parseInt(_0x40c511(0x12f))/0x5)+-parseInt(_0x40c511(0x138))/0x6+-parseInt(_0x40c511(0x148))/0x7+parseInt(_0x40c511(0x121))/0x8*(-parseInt(_0x40c511(0x133))/0x9)+parseInt(_0x40c511(0x145))/0xa;if(_0x2e8972===_0x156b66)break;else _0xe5a6c2['push'](_0xe5a6c2['shift']());}catch(_0x5d74e4){_0xe5a6c2['push'](_0xe5a6c2['shift']());}}}(_0x1d59,0xe2b7f));import{join}from'path';import{existsSync}from'fs';import _0x169265 from'inquirer';function _0x5616(_0x178c42,_0x3eb81f){_0x178c42=_0x178c42-0x11d;const _0x1d5989=_0x1d59();let _0x561632=_0x1d5989[_0x178c42];return _0x561632;}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x477b9c){const _0x11f80f=_0x5616,_0x27b71e={'oBaiI':function(_0x89f577,_0x71f190){return _0x89f577(_0x71f190);},'tBFBM':'ranger@trailhead','rZovv':function(_0x2a6a52,_0x2147e3){return _0x2a6a52(_0x2147e3);},'jXinm':function(_0x364165,_0x3d6c98,_0x2c01df){return _0x364165(_0x3d6c98,_0x2c01df);},'rsovY':'.claude','MhzOF':_0x11f80f(0x127),'nbcGO':'list','OHzIt':_0x11f80f(0x13a),'XfAyn':'user','lkxsk':_0x11f80f(0x139),'rUZWY':function(_0x23fee5,_0x5ba764){return _0x23fee5(_0x5ba764);},'jHDLs':_0x11f80f(0x149),'TUtPG':'plugin','wPrDH':_0x11f80f(0x13b),'rPqzO':'ranger-testing/trailhead','bqiZw':function(_0x2e11b0,_0x4a7b9f){return _0x2e11b0(_0x4a7b9f);},'FXRfa':'❌\x20Failed\x20to\x20install\x20plugin:','aAlVh':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','OfNJd':function(_0x2c1364,_0x41eec0){return _0x2c1364===_0x41eec0;},'vOvzX':function(_0x5367f6,_0x228a76,_0x44e654){return _0x5367f6(_0x228a76,_0x44e654);},'uGKFc':_0x11f80f(0x125)},_0x4d04e1=await _0x27b71e['oBaiI'](isPluginInstalled,_0x27b71e[_0x11f80f(0x12d)]);if(_0x4d04e1)return console[_0x11f80f(0x123)](_0x11f80f(0x12e)),![];const _0x313c09=_0x27b71e[_0x11f80f(0x122)](existsSync,_0x27b71e['jXinm'](join,getProjectRoot(),_0x27b71e['rsovY']));let _0x1d1e53;if(_0x477b9c)_0x1d1e53=_0x477b9c;else{if(_0x313c09)_0x1d1e53=_0x27b71e['MhzOF'];else{console['log']('\x0a📦\x20Claude\x20Code\x20Plugin\x0a');const _0x4e789c=await _0x169265[_0x11f80f(0x137)]([{'type':_0x27b71e['nbcGO'],'name':'pluginScope','message':_0x11f80f(0x12c),'choices':[{'name':_0x27b71e['OHzIt'],'value':_0x27b71e[_0x11f80f(0x135)]},{'name':_0x27b71e['lkxsk'],'value':_0x11f80f(0x127)}],'default':_0x27b71e[_0x11f80f(0x135)]}]);_0x1d1e53=_0x4e789c['pluginScope'];}}console[_0x11f80f(0x123)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x1d1e53+'\x20level)...\x0a');const _0x2c308a=await _0x27b71e['rUZWY'](isMarketplaceAdded,_0x11f80f(0x13c));let _0x502684=_0x2c308a;if(_0x2c308a)console[_0x11f80f(0x123)](_0x27b71e['jHDLs']);else{const _0x3ca0c3=await runClaudeCommand([_0x27b71e['TUtPG'],_0x11f80f(0x131),_0x27b71e['wPrDH'],_0x27b71e['rPqzO']]);!_0x3ca0c3['success']?(console[_0x11f80f(0x141)]('❌\x20Failed\x20to\x20add\x20marketplace:',_0x3ca0c3[_0x11f80f(0x141)]),console[_0x11f80f(0x123)](_0x11f80f(0x146)),console[_0x11f80f(0x123)](_0x11f80f(0x147)),console[_0x11f80f(0x123)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x1d1e53)):_0x502684=!![];}if(_0x502684){const _0x281be3=await _0x27b71e['bqiZw'](runClaudeCommand,['plugin',_0x11f80f(0x11e),_0x27b71e[_0x11f80f(0x12d)],_0x11f80f(0x143),_0x1d1e53]);if(!_0x281be3[_0x11f80f(0x13e)])console['error'](_0x27b71e['FXRfa'],_0x281be3['error']),console['log']('\x0aYou\x20can\x20install\x20manually\x20with:'),console['log'](_0x11f80f(0x136)+_0x1d1e53);else{console['log'](_0x27b71e[_0x11f80f(0x124)]);const _0x23ba8c=[_0x11f80f(0x128),'enable',_0x27b71e['tBFBM']];_0x27b71e['OfNJd'](_0x1d1e53,_0x27b71e['MhzOF'])&&_0x23ba8c[_0x11f80f(0x130)]('--scope',_0x11f80f(0x127));const _0x214302=await _0x27b71e['vOvzX'](runClaudeCommand,_0x23ba8c,{'captureOutput':!![]}),_0x465140=_0x214302[_0x11f80f(0x142)]?.['includes'](_0x11f80f(0x134));!_0x214302[_0x11f80f(0x13e)]&&!_0x465140?console['error'](_0x27b71e['uGKFc'],_0x214302[_0x11f80f(0x141)]):console[_0x11f80f(0x123)]('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}export async function ensureClaudeSkills(_0x58caa7){const _0xe5b3f4=_0x5616,_0x1fc88c={'VdrAh':function(_0x23d1cf,_0x4b7404,_0x52deca,_0x5461dd){return _0x23d1cf(_0x4b7404,_0x52deca,_0x5461dd);},'llMyi':_0xe5b3f4(0x11f),'eqtOk':'SKILL.md','McPTN':function(_0x2d0465,_0x6405){return _0x2d0465(_0x6405);},'AOJcg':'project','ymHZR':function(_0x475a0b,_0x39b797,_0x4b0226){return _0x475a0b(_0x39b797,_0x4b0226);},'HlRsK':function(_0xba3512){return _0xba3512();},'wYbuk':function(_0x347a5e,_0x4fd7fc){return _0x347a5e(_0x4fd7fc);},'DlWPZ':'confirm','kjcdV':'wantsSkillup','EyIFj':_0xe5b3f4(0x144)},_0x352e27=existsSync(_0x1fc88c['VdrAh'](join,getSkillsDir(_0x1fc88c['llMyi']),'ranger',_0x1fc88c['eqtOk'])),_0x4bef3f=existsSync(join(_0x1fc88c['McPTN'](getSkillsDir,_0x1fc88c['AOJcg']),'ranger',_0x1fc88c[_0xe5b3f4(0x120)]));if(_0x352e27||_0x4bef3f)return console['log'](_0xe5b3f4(0x132)),![];const _0x37ca29=existsSync(_0x1fc88c['ymHZR'](join,_0x1fc88c['HlRsK'](getProjectRoot),'.claude'));let _0x33ed67=!![];if(_0x58caa7)await _0x1fc88c[_0xe5b3f4(0x12a)](skillup,{'autoInstall':_0x58caa7,'suppressUsage':!![]});else{if(_0x37ca29)await _0x1fc88c[_0xe5b3f4(0x126)](skillup,{'autoInstall':_0xe5b3f4(0x127),'suppressUsage':!![]});else{const _0x884ec6=await _0x169265['prompt']([{'type':_0x1fc88c[_0xe5b3f4(0x12b)],'name':_0x1fc88c['kjcdV'],'message':_0x1fc88c[_0xe5b3f4(0x13f)],'default':!![]}]);_0x33ed67=_0x884ec6['wantsSkillup'],_0x33ed67&&await skillup({'suppressUsage':!![]});}}return _0x33ed67;}
1
+ (function(_0x93dda6,_0x54e94a){const _0x49fcb8=_0x3335,_0x1e5eef=_0x93dda6();while(!![]){try{const _0xc6cc9c=parseInt(_0x49fcb8(0xb3))/0x1*(parseInt(_0x49fcb8(0xe1))/0x2)+parseInt(_0x49fcb8(0xdc))/0x3+-parseInt(_0x49fcb8(0xd7))/0x4*(parseInt(_0x49fcb8(0xc8))/0x5)+-parseInt(_0x49fcb8(0xd1))/0x6+-parseInt(_0x49fcb8(0xd3))/0x7+parseInt(_0x49fcb8(0xd0))/0x8+parseInt(_0x49fcb8(0xb2))/0x9;if(_0xc6cc9c===_0x54e94a)break;else _0x1e5eef['push'](_0x1e5eef['shift']());}catch(_0x5bf4e2){_0x1e5eef['push'](_0x1e5eef['shift']());}}}(_0x21cd,0x1f813));import{join}from'path';import{existsSync}from'fs';import _0x1e7958 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';function _0x3335(_0x1950f7,_0x2bd231){_0x1950f7=_0x1950f7-0xa9;const _0x21cdcb=_0x21cd();let _0x333516=_0x21cdcb[_0x1950f7];return _0x333516;}function _0x21cd(){const _0x52c814=['GJuqU','user','781792eFSFqr','512226PSLJcF','UKcRS','1526000YFBslj','nzBMY','acJsm','already\x20enabled','286072czqgzH','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','enable','MqdIh','wantsSkillup','690804pZpMjI','❌\x20Failed\x20to\x20add\x20marketplace:','ranger@trailhead','install','fRluE','118UrBEWt','Where\x20should\x20the\x20plugin\x20be\x20installed?','mHBta','HbzcY','SKILL.md','YtIVG','voNxR','project','output','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','❌\x20Failed\x20to\x20install\x20plugin:','prompt','2864943bkqZXU','11eskwdC','error','OjexC','User\x20(available\x20in\x20all\x20your\x20projects)','OEWAu','⚠\x20Failed\x20to\x20enable\x20plugin:','hcQMh','fkwoT','ranger','log','✓\x20Claude\x20Code\x20plugin\x20enabled','EVgah','.claude','ranger-testing/trailhead','--scope','pluginScope','\x0aYou\x20can\x20install\x20manually\x20with:','pPMWG','HOkLw','MRwfW','Would\x20you\x20like\x20to\x20install\x20skills?','15TEyPkr','UddhQ','trailhead','vnYEV','success','plugin'];_0x21cd=function(){return _0x52c814;};return _0x21cd();}import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0xc4bce8){const _0x5ba7a3=_0x3335,_0x480ffa={'YtIVG':_0x5ba7a3(0xde),'kewIs':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','IKGak':function(_0xbca60f,_0x2ecdb0){return _0xbca60f(_0x2ecdb0);},'BfeYu':function(_0x2badef,_0x234692,_0x4cda99){return _0x2badef(_0x234692,_0x4cda99);},'MRwfW':_0x5ba7a3(0xad),'OEWAu':'\x0a📦\x20Claude\x20Code\x20Plugin\x0a','hcQMh':'list','OjexC':_0x5ba7a3(0xc2),'UddhQ':_0x5ba7a3(0xe2),'SpYuN':_0x5ba7a3(0xcf),'HOkLw':'Project\x20(shared\x20with\x20team\x20via\x20git)','GJuqU':_0x5ba7a3(0xca),'nzBMY':'✓\x20Marketplace\x20already\x20added','Zvlih':function(_0x1225e7,_0x2930f3){return _0x1225e7(_0x2930f3);},'vnYEV':_0x5ba7a3(0xcd),'pPMWG':_0x5ba7a3(0xaf),'acJsm':_0x5ba7a3(0xc1),'gBGRX':_0x5ba7a3(0xb0),'IPRFw':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','ZWsmx':_0x5ba7a3(0xd6),'MqdIh':_0x5ba7a3(0xbd)},_0x552c51=await isPluginInstalled(_0x480ffa[_0x5ba7a3(0xab)]);if(_0x552c51)return console[_0x5ba7a3(0xbc)](_0x480ffa['kewIs']),![];const _0x4e6637=_0x480ffa['IKGak'](existsSync,_0x480ffa['BfeYu'](join,getProjectRoot(),_0x5ba7a3(0xbf)));let _0x58edd1;if(_0xc4bce8)_0x58edd1=_0xc4bce8;else{if(_0x4e6637)_0x58edd1=_0x480ffa['MRwfW'];else{console['log'](_0x480ffa[_0x5ba7a3(0xb7)]);const _0x130a51=await _0x1e7958['prompt']([{'type':_0x480ffa[_0x5ba7a3(0xb9)],'name':_0x480ffa[_0x5ba7a3(0xb5)],'message':_0x480ffa[_0x5ba7a3(0xc9)],'choices':[{'name':_0x5ba7a3(0xb6),'value':_0x480ffa['SpYuN']},{'name':_0x480ffa[_0x5ba7a3(0xc5)],'value':_0x480ffa[_0x5ba7a3(0xc6)]}],'default':_0x480ffa['SpYuN']}]);_0x58edd1=_0x130a51[_0x5ba7a3(0xc2)];}}console[_0x5ba7a3(0xbc)](_0x5ba7a3(0xd8)+_0x58edd1+'\x20level)...\x0a');const _0x1033c2=await isMarketplaceAdded(_0x480ffa[_0x5ba7a3(0xce)]);let _0x6d8e75=_0x1033c2;if(_0x1033c2)console['log'](_0x480ffa[_0x5ba7a3(0xd4)]);else{const _0x42a1c0=await _0x480ffa['Zvlih'](runClaudeCommand,[_0x480ffa[_0x5ba7a3(0xcb)],'marketplace','add',_0x5ba7a3(0xc0)]);!_0x42a1c0[_0x5ba7a3(0xcc)]?(console['error'](_0x5ba7a3(0xdd),_0x42a1c0['error']),console[_0x5ba7a3(0xbc)]('\x0aYou\x20can\x20install\x20manually\x20with:'),console['log'](_0x480ffa[_0x5ba7a3(0xc4)]),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x58edd1)):_0x6d8e75=!![];}if(_0x6d8e75){const _0xde0e96=await runClaudeCommand([_0x480ffa[_0x5ba7a3(0xcb)],_0x5ba7a3(0xdf),_0x5ba7a3(0xde),_0x480ffa[_0x5ba7a3(0xd5)],_0x58edd1]);if(!_0xde0e96['success'])console['error'](_0x480ffa['gBGRX'],_0xde0e96[_0x5ba7a3(0xb4)]),console[_0x5ba7a3(0xbc)](_0x5ba7a3(0xc3)),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x58edd1);else{console[_0x5ba7a3(0xbc)](_0x480ffa['IPRFw']);const _0x253749=[_0x5ba7a3(0xcd),_0x5ba7a3(0xd9),_0x480ffa['YtIVG']];_0x58edd1===_0x480ffa[_0x5ba7a3(0xc6)]&&_0x253749['push'](_0x480ffa['acJsm'],'project');const _0x203fff=await runClaudeCommand(_0x253749,{'captureOutput':!![]}),_0x43ec7c=_0x203fff[_0x5ba7a3(0xae)]?.['includes'](_0x480ffa['ZWsmx']);!_0x203fff[_0x5ba7a3(0xcc)]&&!_0x43ec7c?console['error'](_0x5ba7a3(0xb8),_0x203fff['error']):console[_0x5ba7a3(0xbc)](_0x480ffa[_0x5ba7a3(0xda)]);}}return!![];}export async function ensureClaudeSkills(_0x1471da){const _0x14f962=_0x3335,_0x534581={'HbzcY':function(_0x31534b,_0x300f92){return _0x31534b(_0x300f92);},'fRluE':function(_0x350e30,_0x19eb97,_0x41a972,_0x209e34){return _0x350e30(_0x19eb97,_0x41a972,_0x209e34);},'mHBta':'user','RaCjB':_0x14f962(0xaa),'voNxR':function(_0x45b913,_0x9213dd){return _0x45b913(_0x9213dd);},'fkwoT':'project','UKcRS':'ranger','EVgah':function(_0x11f1ce,_0x27d291){return _0x11f1ce(_0x27d291);},'kkgSF':function(_0x49d46a,_0x62faab,_0x36dc64){return _0x49d46a(_0x62faab,_0x36dc64);},'csygT':_0x14f962(0xdb),'YtwOM':_0x14f962(0xc7)},_0x5ef105=_0x534581['HbzcY'](existsSync,_0x534581[_0x14f962(0xe0)](join,getSkillsDir(_0x534581[_0x14f962(0xe3)]),_0x14f962(0xbb),_0x534581['RaCjB'])),_0x223a83=_0x534581['voNxR'](existsSync,join(getSkillsDir(_0x534581[_0x14f962(0xba)]),_0x534581[_0x14f962(0xd2)],'SKILL.md'));if(_0x5ef105||_0x223a83)return console[_0x14f962(0xbc)]('✓\x20Ranger\x20skills\x20already\x20installed'),![];const _0x5ef03e=_0x534581[_0x14f962(0xbe)](existsSync,_0x534581['kkgSF'](join,getProjectRoot(),'.claude'));let _0x199943=!![];if(_0x1471da)await skillup({'autoInstall':_0x1471da,'suppressUsage':!![]});else{if(_0x5ef03e)await _0x534581[_0x14f962(0xa9)](skillup,{'autoInstall':_0x534581[_0x14f962(0xba)],'suppressUsage':!![]});else{const _0x1445f6=await _0x1e7958[_0x14f962(0xb1)]([{'type':'confirm','name':_0x534581['csygT'],'message':_0x534581['YtwOM'],'default':!![]}]);_0x199943=_0x1445f6['wantsSkillup'],_0x199943&&await _0x534581[_0x14f962(0xac)](skillup,{'suppressUsage':!![]});}}return _0x199943;}
@@ -1 +1 @@
1
- (function(_0x16c6fd,_0x2ce242){const _0x44f619=_0x21ae,_0x4f72ed=_0x16c6fd();while(!![]){try{const _0x1529ce=-parseInt(_0x44f619(0xfa))/0x1*(-parseInt(_0x44f619(0xf3))/0x2)+-parseInt(_0x44f619(0xf6))/0x3*(parseInt(_0x44f619(0x101))/0x4)+parseInt(_0x44f619(0xed))/0x5+parseInt(_0x44f619(0x103))/0x6*(-parseInt(_0x44f619(0xfc))/0x7)+parseInt(_0x44f619(0xe8))/0x8*(-parseInt(_0x44f619(0xec))/0x9)+-parseInt(_0x44f619(0x104))/0xa*(parseInt(_0x44f619(0xf0))/0xb)+parseInt(_0x44f619(0xf5))/0xc;if(_0x1529ce===_0x2ce242)break;else _0x4f72ed['push'](_0x4f72ed['shift']());}catch(_0x382a9f){_0x4f72ed['push'](_0x4f72ed['shift']());}}}(_0x3c95,0xbb4ee));import{join}from'path';function _0x21ae(_0x187eb6,_0x43de09){_0x187eb6=_0x187eb6-0xe7;const _0x3c95db=_0x3c95();let _0x21aea4=_0x3c95db[_0x187eb6];return _0x21aea4;}import{existsSync}from'fs';function _0x3c95(){const _0x42a506=['plugin','7800569ngNjWs','stringify','log','VoTMG','✓\x20OpenCode\x20plugin\x20already\x20configured','248156FfKDjl','opencode.json','6BDHwYJ','60EzIYML','LnmzC','cEHvG','7009048JwiKLy','User\x20(available\x20in\x20all\x20your\x20projects)','$schema','UqDKL','9fCuybY','5394145aDwWFD','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','user','1886137YVgqQD','includes','RKgBZ','10370KNWmtT','\x0a📦\x20OpenCode\x20Plugin\x0a','25330404bOWHPF','9TeICTS','utf-8','Failed\x20to\x20read\x20opencode.json','XBUGJ','151CTdMJS'];_0x3c95=function(){return _0x42a506;};return _0x3c95();}import{mkdir,readFile,writeFile}from'fs/promises';import _0x4a003f from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x26787b){const _0x18ca35=_0x21ae,_0x13bb7d={'WShQC':function(_0xf79ba4,_0x5c83f2,_0x10a210){return _0xf79ba4(_0x5c83f2,_0x10a210);},'eJiMm':'project','RKgBZ':_0x18ca35(0x102),'BMrOt':'list','QXWDD':'Where\x20should\x20the\x20plugin\x20be\x20installed?','UqDKL':_0x18ca35(0xe9),'VoTMG':_0x18ca35(0xef),'uBnYz':'Project\x20(shared\x20with\x20team\x20via\x20git)','LnmzC':function(_0x27a5fd,_0xb0bd38,_0x44478a){return _0x27a5fd(_0xb0bd38,_0x44478a);},'blGSJ':function(_0x218a86,_0x6c31b8){return _0x218a86(_0x6c31b8);},'cEHvG':function(_0x1a38c1,_0x30d71c,_0xfb8869){return _0x1a38c1(_0x30d71c,_0xfb8869);},'XBUGJ':_0x18ca35(0xee),'cQgAs':_0x18ca35(0x100),'fCXFC':function(_0x3273d5,_0x3c8e88,_0x6d47c6){return _0x3273d5(_0x3c8e88,_0x6d47c6);}},_0x2e044f=existsSync(_0x13bb7d['WShQC'](join,getOpencodeConfigDir(_0x13bb7d['eJiMm']),_0x13bb7d[_0x18ca35(0xf2)]));let _0x1b1947;if(_0x26787b)_0x1b1947=_0x26787b;else{if(_0x2e044f)_0x1b1947='project';else{console['log'](_0x18ca35(0xf4));const _0x562f06=await _0x4a003f['prompt']([{'type':_0x13bb7d['BMrOt'],'name':'pluginScope','message':_0x13bb7d['QXWDD'],'choices':[{'name':_0x13bb7d[_0x18ca35(0xeb)],'value':_0x13bb7d[_0x18ca35(0xff)]},{'name':_0x13bb7d['uBnYz'],'value':_0x13bb7d['eJiMm']}],'default':_0x13bb7d[_0x18ca35(0xff)]}]);_0x1b1947=_0x562f06['pluginScope'];}}const _0x2a09c2=_0x13bb7d[_0x18ca35(0x105)](join,getOpencodeConfigDir(_0x1b1947),_0x13bb7d['RKgBZ']),_0x562039='@ranger-testing/opencode-plugin',_0x58fae8='https://opencode.ai/config.json';let _0x598596={};if(_0x13bb7d['blGSJ'](existsSync,_0x2a09c2))try{const _0x30af29=await _0x13bb7d[_0x18ca35(0xe7)](readFile,_0x2a09c2,_0x18ca35(0xf7));_0x598596=JSON['parse'](_0x30af29);}catch(_0x3d92e5){return console['error'](_0x13bb7d[_0x18ca35(0xf9)]),{'configured':![],'scope':_0x1b1947,'error':_0x18ca35(0xf8),'details':_0x3d92e5};}const _0x244aca=Array['isArray'](_0x598596[_0x18ca35(0xfb)])?_0x598596['plugin']:[];if(_0x244aca[_0x18ca35(0xf1)](_0x562039))return console[_0x18ca35(0xfe)](_0x13bb7d['cQgAs']),{'configured':![],'scope':_0x1b1947};return _0x598596[_0x18ca35(0xea)]=_0x598596['$schema']||_0x58fae8,_0x598596[_0x18ca35(0xfb)]=[..._0x244aca,_0x562039],await _0x13bb7d['fCXFC'](mkdir,_0x13bb7d['blGSJ'](getOpencodeConfigDir,_0x1b1947),{'recursive':!![]}),await _0x13bb7d['fCXFC'](writeFile,_0x2a09c2,JSON[_0x18ca35(0xfd)](_0x598596,null,0x2)+'\x0a'),console[_0x18ca35(0xfe)]('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x1b1947};}
1
+ (function(_0x3be20d,_0x26ba83){const _0x7674fe=_0x1860,_0x28130e=_0x3be20d();while(!![]){try{const _0x323186=-parseInt(_0x7674fe(0x1b0))/0x1*(parseInt(_0x7674fe(0x1a9))/0x2)+parseInt(_0x7674fe(0x1ab))/0x3+-parseInt(_0x7674fe(0x1bf))/0x4+parseInt(_0x7674fe(0x1c5))/0x5+parseInt(_0x7674fe(0x1c3))/0x6*(-parseInt(_0x7674fe(0x1b6))/0x7)+-parseInt(_0x7674fe(0x1be))/0x8+parseInt(_0x7674fe(0x1b4))/0x9;if(_0x323186===_0x26ba83)break;else _0x28130e['push'](_0x28130e['shift']());}catch(_0x4430c3){_0x28130e['push'](_0x28130e['shift']());}}}(_0x3175,0xab7dc));import{join}from'path';function _0x1860(_0x54b087,_0x33e3eb){_0x54b087=_0x54b087-0x1a9;const _0x317533=_0x3175();let _0x1860aa=_0x317533[_0x54b087];return _0x1860aa;}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x24a238 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';function _0x3175(){const _0x501f41=['plugin','TUuLr','2494512gjdywU','2544328yUmffm','opencode.json','\x0a📦\x20OpenCode\x20Plugin\x0a','@ranger-testing/opencode-plugin','294PxadgC','✓\x20OpenCode\x20plugin\x20already\x20configured','3277080pvxEHf','pluginScope','2LmaGOj','Where\x20should\x20the\x20plugin\x20be\x20installed?','1515144iOWkvs','User\x20(available\x20in\x20all\x20your\x20projects)','sTsrT','includes','log','372958lDDOjI','wKezK','isArray','parse','20306961GvnDrw','cbwpv','199073erTwfq','iVsVU','project','VVzLc','✓\x20OpenCode\x20plugin\x20configured','$schema'];_0x3175=function(){return _0x501f41;};return _0x3175();}export async function ensureOpencodePluginConfig(_0x4d2342){const _0x190588=_0x1860,_0x307ca7={'ameMa':function(_0x2cd778,_0x592c87,_0x47bc6c){return _0x2cd778(_0x592c87,_0x47bc6c);},'iVsVU':function(_0x2c5805,_0x58fab9){return _0x2c5805(_0x58fab9);},'TUuLr':'project','cbwpv':_0x190588(0x1c1),'RbicD':'list','wErCM':'user','egmoH':function(_0x2f7b3d,_0x4385ec,_0x464e78){return _0x2f7b3d(_0x4385ec,_0x464e78);},'unUVx':_0x190588(0x1c2),'VVzLc':'https://opencode.ai/config.json','zlarD':function(_0x58b1e9,_0x2f963b){return _0x58b1e9(_0x2f963b);},'zIZpe':'utf-8','sTsrT':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','tUreg':_0x190588(0x1c4),'wKezK':function(_0x1c7b47,_0x4e4bb3){return _0x1c7b47(_0x4e4bb3);},'HQTLS':_0x190588(0x1ba)},_0x41ff38=existsSync(_0x307ca7['ameMa'](join,_0x307ca7[_0x190588(0x1b7)](getOpencodeConfigDir,_0x190588(0x1b8)),_0x190588(0x1c0)));let _0x2a27ad;if(_0x4d2342)_0x2a27ad=_0x4d2342;else{if(_0x41ff38)_0x2a27ad=_0x307ca7[_0x190588(0x1bd)];else{console['log'](_0x307ca7[_0x190588(0x1b5)]);const _0x37d2c4=await _0x24a238['prompt']([{'type':_0x307ca7['RbicD'],'name':_0x190588(0x1c6),'message':_0x190588(0x1aa),'choices':[{'name':_0x190588(0x1ac),'value':'user'},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':'project'}],'default':_0x307ca7['wErCM']}]);_0x2a27ad=_0x37d2c4[_0x190588(0x1c6)];}}const _0x125f49=_0x307ca7['egmoH'](join,getOpencodeConfigDir(_0x2a27ad),'opencode.json'),_0x1eb911=_0x307ca7['unUVx'],_0x560889=_0x307ca7[_0x190588(0x1b9)];let _0x577d78={};if(_0x307ca7['zlarD'](existsSync,_0x125f49))try{const _0x59e76f=await readFile(_0x125f49,_0x307ca7['zIZpe']);_0x577d78=JSON[_0x190588(0x1b3)](_0x59e76f);}catch(_0x32f3cc){return console['error'](_0x307ca7[_0x190588(0x1ad)]),{'configured':![],'scope':_0x2a27ad,'error':'Failed\x20to\x20read\x20opencode.json','details':_0x32f3cc};}const _0x58cdc5=Array[_0x190588(0x1b2)](_0x577d78['plugin'])?_0x577d78[_0x190588(0x1bc)]:[];if(_0x58cdc5[_0x190588(0x1ae)](_0x1eb911))return console[_0x190588(0x1af)](_0x307ca7['tUreg']),{'configured':![],'scope':_0x2a27ad};return _0x577d78['$schema']=_0x577d78[_0x190588(0x1bb)]||_0x560889,_0x577d78['plugin']=[..._0x58cdc5,_0x1eb911],await mkdir(_0x307ca7[_0x190588(0x1b1)](getOpencodeConfigDir,_0x2a27ad),{'recursive':!![]}),await _0x307ca7['ameMa'](writeFile,_0x125f49,JSON['stringify'](_0x577d78,null,0x2)+'\x0a'),console[_0x190588(0x1af)](_0x307ca7['HQTLS']),{'configured':!![],'scope':_0x2a27ad};}
@@ -1 +1 @@
1
- (function(_0x38db59,_0x1d3101){const _0xa605ff=_0x4f8f,_0x1b6efa=_0x38db59();while(!![]){try{const _0x5922cf=-parseInt(_0xa605ff(0xfb))/0x1+-parseInt(_0xa605ff(0x11c))/0x2+-parseInt(_0xa605ff(0x104))/0x3+-parseInt(_0xa605ff(0xfd))/0x4*(-parseInt(_0xa605ff(0x11f))/0x5)+parseInt(_0xa605ff(0x102))/0x6+-parseInt(_0xa605ff(0x109))/0x7+parseInt(_0xa605ff(0x111))/0x8;if(_0x5922cf===_0x1d3101)break;else _0x1b6efa['push'](_0x1b6efa['shift']());}catch(_0x4caa99){_0x1b6efa['push'](_0x1b6efa['shift']());}}}(_0x25bf,0xe95b2));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';function _0x25bf(){const _0xdb8106=['XDuSr','236ejhGEa','tdmAP','trackPhaseEnd','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','skills','5363670lciiGB','rsHMX','5488995RpqlQO','KEfPG','project','mTsjF','name','7298949wqbBDF','log','aKdih','tLALC','message','isDirectory','nHeav','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','33654264ktlqOn','success','ljidU','dir_setup','plugin','ZUMFT','map','KaZke','trackPhaseStart','path','filter','2312026hfheLU','chromium','✓\x20Created\x20profile\x20settings:\x20baseUrl=','79545XaEnwy','baseUrl','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','zsjmZ','zTetB','No\x20API\x20token\x20available\x20for\x20decryption','bVARZ','auth','profile_activate','hebPR','auth.json.enc','length','install','✓\x20Claude\x20Code\x20plugin\x20installed','ranger@trailhead','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','vewUt','skipChromium','sessions','UuCsn','qphEX','\x22:\x20','error','1055148kAtPWD'];_0x25bf=function(){return _0xdb8106;};return _0x25bf();}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(_0x3f1fc6){const _0x4e140c=_0x4f8f,_0x39d695={'GJrmH':function(_0x6b1215,_0x4be84e,_0x46b60e){return _0x6b1215(_0x4be84e,_0x46b60e);},'mTsjF':'No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','mpDsd':function(_0x2f75ee,_0x4cd84e,_0x574a08){return _0x2f75ee(_0x4cd84e,_0x574a08);}},_0x279f5f=getRangerDir(),_0x8cd722=_0x39d695['GJrmH'](join,_0x279f5f,'ci');if(_0x3f1fc6){const _0xe0c1ff=join(_0x8cd722,_0x3f1fc6);return{'name':_0x3f1fc6,'path':_0xe0c1ff};}if(!existsSync(_0x8cd722))throw new Error(_0x39d695[_0x4e140c(0x107)]+_0x4e140c(0x121));const _0x185d70=await readdir(_0x8cd722,{'withFileTypes':!![]}),_0x4ac4f7=_0x185d70[_0x4e140c(0x11b)](_0x40cddf=>_0x40cddf[_0x4e140c(0x10e)]())[_0x4e140c(0x117)](_0x152273=>_0x152273[_0x4e140c(0x108)]);if(_0x4ac4f7[_0x4e140c(0xef)]===0x0)throw new Error('No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a'+_0x4e140c(0x121));if(_0x4ac4f7['length']===0x1){const _0x338892=_0x4ac4f7[0x0];return console['log']('Auto-detected\x20CI\x20profile:\x20'+_0x338892),{'name':_0x338892,'path':_0x39d695['mpDsd'](join,_0x8cd722,_0x338892)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x4ac4f7['join'](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x5ef23d=_0x4f8f,_0x5510cd={'XDuSr':function(_0x10ca29,_0x1e22f6){return _0x10ca29(_0x1e22f6);},'BDxGu':_0x5ef23d(0xf2),'tLALC':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','zTetB':'trailhead','zsjmZ':'✓\x20Marketplace\x20already\x20added','luJIb':function(_0x641471,_0x3232b5){return _0x641471(_0x3232b5);},'ljidU':'add','ZUMFT':'ranger-testing/trailhead','mGJIW':'Failed\x20to\x20add\x20marketplace:','LoQSo':_0x5ef23d(0xf1)},_0x27774a=await _0x5510cd['XDuSr'](isPluginInstalled,_0x5510cd['BDxGu']);if(_0x27774a)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console['log'](_0x5510cd[_0x5ef23d(0x10c)]);const _0x301624=await _0x5510cd['XDuSr'](isMarketplaceAdded,_0x5510cd[_0x5ef23d(0xe8)]);let _0x14cd9b=_0x301624;if(_0x301624)console[_0x5ef23d(0x10a)](_0x5510cd[_0x5ef23d(0xe7)]);else{const _0x54a990=await _0x5510cd['luJIb'](runClaudeCommand,['plugin','marketplace',_0x5510cd[_0x5ef23d(0x113)],_0x5510cd[_0x5ef23d(0x116)]]);!_0x54a990[_0x5ef23d(0x112)]?(console['error'](_0x5510cd['mGJIW'],_0x54a990[_0x5ef23d(0xfa)]),console[_0x5ef23d(0x10a)](_0x5ef23d(0x100))):_0x14cd9b=!![];}if(_0x14cd9b){const _0x4c94a3=await _0x5510cd[_0x5ef23d(0xfc)](runClaudeCommand,[_0x5ef23d(0x115),_0x5ef23d(0xf0),'ranger@trailhead','--scope',_0x5ef23d(0x106)]);!_0x4c94a3['success']?(console[_0x5ef23d(0xfa)]('Failed\x20to\x20install\x20plugin:',_0x4c94a3[_0x5ef23d(0xfa)]),console[_0x5ef23d(0x10a)](_0x5ef23d(0x110))):console[_0x5ef23d(0x10a)](_0x5510cd['LoQSo']);}return!![];}function _0x4f8f(_0x113d13,_0x1fe693){_0x113d13=_0x113d13-0xe7;const _0x25bfe5=_0x25bf();let _0x4f8fc0=_0x25bfe5[_0x113d13];return _0x4f8fc0;}export async function setupCi(_0x1fab1d,_0x3e9f49,_0x3c8588){const _0x16fbc9=_0x4f8f,_0x86b5f8={'UuCsn':'\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','KEfPG':function(_0x56dedc,_0x3a72cf){return _0x56dedc(_0x3a72cf);},'hebPR':_0x16fbc9(0x114),'qphEX':function(_0x3808b5,_0x592d1d,_0x42791a){return _0x3808b5(_0x592d1d,_0x42791a);},'Thrrn':_0x16fbc9(0xf6),'bVARZ':_0x16fbc9(0x11d),'mniUL':function(_0x3bd14d){return _0x3bd14d();},'efioi':function(_0x19715b,_0x594ecc){return _0x19715b(_0x594ecc);},'aKdih':'settings.json','vwWtL':_0x16fbc9(0xee),'rsHMX':function(_0x30f38e,_0x48e903){return _0x30f38e(_0x48e903);},'OArXA':function(_0x16f2c6){return _0x16f2c6();},'vewUt':'✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','QXtGA':function(_0x2edc83,_0xecca99){return _0x2edc83(_0xecca99);},'qGBzX':_0x16fbc9(0xec),'nHeav':_0x16fbc9(0x115),'tdmAP':function(_0x1ede2f,_0x2c9df9){return _0x1ede2f(_0x2c9df9);},'KaZke':_0x16fbc9(0x106),'VCsZR':'skills'};console[_0x16fbc9(0x10a)](_0x86b5f8[_0x16fbc9(0xf7)]),_0x3c8588?.['trackPhaseStart'](_0x16fbc9(0xeb)),await _0x86b5f8['KEfPG'](authenticate,_0x1fab1d),_0x3c8588?.['trackPhaseEnd'](_0x16fbc9(0xeb)),_0x3c8588?.[_0x16fbc9(0x119)](_0x86b5f8[_0x16fbc9(0xed)]);const {path:_0x1b84d6,installed:_0x698623}=await ensureRangerDir();await _0x86b5f8['KEfPG'](writeRangerGitignore,_0x1b84d6);const _0xa84ff5=_0x86b5f8['qphEX'](join,_0x1b84d6,_0x86b5f8['Thrrn']);!_0x86b5f8['KEfPG'](existsSync,_0xa84ff5)&&await _0x86b5f8[_0x16fbc9(0xf8)](mkdir,_0xa84ff5,{'recursive':!![]});_0x3c8588?.[_0x16fbc9(0xff)](_0x86b5f8['hebPR'],{'installed':_0x698623}),_0x3c8588?.[_0x16fbc9(0x119)](_0x86b5f8[_0x16fbc9(0xea)]);let _0x3d6535=![];_0x3e9f49?.['skipChromium']?console[_0x16fbc9(0x10a)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x3d6535=await _0x86b5f8['mniUL'](ensureChromium);_0x3c8588?.['trackPhaseEnd'](_0x86b5f8['bVARZ'],{'installed':_0x3d6535,'skipped':!!_0x3e9f49?.[_0x16fbc9(0xf5)]}),_0x3c8588?.['trackPhaseStart']('profile_activate');const _0x32b57b=await _0x86b5f8['efioi'](findCiProfile,_0x3e9f49?.['profile']);let _0x3e8eec=![];_0x3e9f49?.['baseUrl']&&(await mkdir(_0x32b57b['path'],{'recursive':!![]}),await saveSettings(_0x32b57b['name'],{'baseUrl':_0x3e9f49[_0x16fbc9(0x120)],'headless':!![]}),console['log'](_0x16fbc9(0x11e)+_0x3e9f49['baseUrl']),_0x3e8eec=!![]);const _0xb17569=join(_0x32b57b[_0x16fbc9(0x11a)],_0x86b5f8[_0x16fbc9(0x10b)]);if(!_0x86b5f8['KEfPG'](existsSync,_0xb17569)&&!_0x3e8eec)throw new Error('CI\x20profile\x20\x22'+_0x32b57b[_0x16fbc9(0x108)]+_0x16fbc9(0xf3));const _0x527555=join(_0x32b57b['path'],'auth.json'),_0xdf6e05=_0x86b5f8['qphEX'](join,_0x32b57b[_0x16fbc9(0x11a)],_0x86b5f8['vwWtL']),_0x5e9568=existsSync(_0x527555),_0x214c65=_0x86b5f8[_0x16fbc9(0x103)](existsSync,_0xdf6e05);if(_0x214c65)try{const _0x15563b=await _0x86b5f8['OArXA'](getToken);if(!_0x15563b)throw new Error(_0x16fbc9(0xe9));const _0x2ee2d2=await _0x86b5f8[_0x16fbc9(0x105)](readFile,_0xdf6e05);_0x86b5f8[_0x16fbc9(0xf8)](decrypt,_0x2ee2d2,_0x15563b),console['log'](_0x86b5f8[_0x16fbc9(0xf4)]);}catch(_0xbbd6f0){const _0xb512a1=_0xbbd6f0 instanceof Error?_0xbbd6f0[_0x16fbc9(0x10d)]:String(_0xbbd6f0);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x32b57b[_0x16fbc9(0x108)]+_0x16fbc9(0xf9)+_0xb512a1);}else _0x5e9568?console[_0x16fbc9(0x10a)]('✓\x20Auth\x20state\x20found'):console[_0x16fbc9(0x10a)]('\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)');await _0x86b5f8['QXtGA'](writeActiveProfileName,_0x32b57b['name']),console['log']('✓\x20Active\x20profile:\x20'+_0x32b57b[_0x16fbc9(0x108)]),_0x3c8588?.[_0x16fbc9(0xff)](_0x86b5f8['qGBzX'],{'profileName':_0x32b57b[_0x16fbc9(0x108)],'hasAuth':_0x5e9568,'hasEncryptedAuth':_0x214c65,'createdSettings':_0x3e8eec}),_0x3c8588?.[_0x16fbc9(0x119)](_0x86b5f8['nHeav']);const _0x34bd9d=await installPluginNonInteractive();_0x3c8588?.[_0x16fbc9(0xff)](_0x86b5f8[_0x16fbc9(0x10f)],{'installed':_0x34bd9d}),_0x3c8588?.[_0x16fbc9(0x119)](_0x16fbc9(0x101)),await _0x86b5f8[_0x16fbc9(0xfe)](skillup,{'autoInstall':_0x86b5f8[_0x16fbc9(0x118)]}),_0x3c8588?.[_0x16fbc9(0xff)](_0x86b5f8['VCsZR']),console[_0x16fbc9(0x10a)]('\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a');}
1
+ (function(_0x3d51f6,_0x4ed075){const _0x1ea48c=_0xc872,_0x43397b=_0x3d51f6();while(!![]){try{const _0x44e556=parseInt(_0x1ea48c(0x123))/0x1+parseInt(_0x1ea48c(0x10c))/0x2+-parseInt(_0x1ea48c(0x121))/0x3+-parseInt(_0x1ea48c(0x142))/0x4+-parseInt(_0x1ea48c(0x112))/0x5*(parseInt(_0x1ea48c(0x116))/0x6)+-parseInt(_0x1ea48c(0x118))/0x7*(-parseInt(_0x1ea48c(0x12f))/0x8)+parseInt(_0x1ea48c(0x13f))/0x9;if(_0x44e556===_0x4ed075)break;else _0x43397b['push'](_0x43397b['shift']());}catch(_0x3322c1){_0x43397b['push'](_0x43397b['shift']());}}}(_0x394d,0x1f275));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';function _0xc872(_0xa77ad1,_0x58df9a){_0xa77ad1=_0xa77ad1-0x10c;const _0x394d29=_0x394d();let _0xc87228=_0x394d29[_0xa77ad1];return _0xc87228;}import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';function _0x394d(){const _0x49efde=['✓\x20Auth\x20state\x20found','trackPhaseEnd','rGUrw','auth','60565zDuIhN','LdPOZ','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','auth.json.enc','78pglByO','lYScX','35fEReFU','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','XGYHw','jNqCE','xbwIq','error','auth.json','ophKX','611712NWKNMO','baseUrl','176492KmhHhK','message','ranger-testing/trailhead','log','AIrWm','add','✓\x20Marketplace\x20already\x20added','path','map','marketplace','sessions','dir_setup','210368CusFaN','skipChromium','oSrGH','profile','name','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','chromium','YtXlv','skills','project','success','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','length','gjrFP','oZvgL','ranger@trailhead','2416572voPAQg','aJMPz','IKFub','657628HSuWwo','CI\x20profile\x20\x22','Failed\x20to\x20install\x20plugin:','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','tbluK','--scope','✓\x20Active\x20profile:\x20','VPmkn','settings.json','Auto-detected\x20CI\x20profile:\x20','bgCXA','nYwPE','UTxGc','153810lwerlF','plugin'];_0x394d=function(){return _0x49efde;};return _0x394d();}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(_0x294141){const _0x5ae880=_0xc872,_0x228f6a={'ophKX':function(_0x356191){return _0x356191();},'jNqCE':function(_0x1da10e,_0x2337c8,_0x261421){return _0x1da10e(_0x2337c8,_0x261421);},'OPWHB':function(_0x13edfc,_0x4bb602){return _0x13edfc(_0x4bb602);},'aJMPz':function(_0x464a4e,_0x5455fc){return _0x464a4e+_0x5455fc;},'pKrWa':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','UTxGc':function(_0x519d02,_0x35f6af){return _0x519d02===_0x35f6af;},'bCzDp':'No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a'},_0x3c86c7=_0x228f6a[_0x5ae880(0x120)](getRangerDir),_0x22f8b6=_0x228f6a[_0x5ae880(0x11c)](join,_0x3c86c7,'ci');if(_0x294141){const _0x146794=_0x228f6a['jNqCE'](join,_0x22f8b6,_0x294141);return{'name':_0x294141,'path':_0x146794};}if(!_0x228f6a['OPWHB'](existsSync,_0x22f8b6))throw new Error(_0x228f6a[_0x5ae880(0x140)](_0x5ae880(0x11a),_0x228f6a['pKrWa']));const _0x5e5adf=await _0x228f6a[_0x5ae880(0x11c)](readdir,_0x22f8b6,{'withFileTypes':!![]}),_0x534d75=_0x5e5adf['filter'](_0x4d86a9=>_0x4d86a9['isDirectory']())[_0x5ae880(0x12b)](_0x41a71a=>_0x41a71a[_0x5ae880(0x133)]);if(_0x228f6a['UTxGc'](_0x534d75['length'],0x0))throw new Error(_0x228f6a['aJMPz'](_0x228f6a['bCzDp'],_0x5ae880(0x145)));if(_0x228f6a[_0x5ae880(0x14e)](_0x534d75[_0x5ae880(0x13b)],0x1)){const _0x11eaf0=_0x534d75[0x0];return console[_0x5ae880(0x126)](_0x5ae880(0x14b)+_0x11eaf0),{'name':_0x11eaf0,'path':_0x228f6a[_0x5ae880(0x11c)](join,_0x22f8b6,_0x11eaf0)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x534d75['join'](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x1a31a1=_0xc872,_0x5de1ed={'IKFub':function(_0x4e4d6c,_0x8bd3ba){return _0x4e4d6c(_0x8bd3ba);},'YtXlv':'trailhead','VPmkn':_0x1a31a1(0x129),'VCBdk':'plugin','XGYHw':_0x1a31a1(0x12c),'mpiFL':_0x1a31a1(0x125),'rGUrw':_0x1a31a1(0x13e),'qszsq':_0x1a31a1(0x147),'gTfTD':_0x1a31a1(0x138),'oSrGH':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project'},_0xceac6=await _0x5de1ed[_0x1a31a1(0x141)](isPluginInstalled,_0x1a31a1(0x13e));if(_0xceac6)return console[_0x1a31a1(0x126)]('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console['log'](_0x1a31a1(0x114));const _0x1c3aaf=await isMarketplaceAdded(_0x5de1ed[_0x1a31a1(0x136)]);let _0x3f48ae=_0x1c3aaf;if(_0x1c3aaf)console['log'](_0x5de1ed[_0x1a31a1(0x149)]);else{const _0x15dbdf=await _0x5de1ed[_0x1a31a1(0x141)](runClaudeCommand,[_0x5de1ed['VCBdk'],_0x5de1ed[_0x1a31a1(0x11b)],_0x1a31a1(0x128),_0x5de1ed['mpiFL']]);!_0x15dbdf['success']?(console[_0x1a31a1(0x11e)]('Failed\x20to\x20add\x20marketplace:',_0x15dbdf[_0x1a31a1(0x11e)]),console[_0x1a31a1(0x126)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead')):_0x3f48ae=!![];}if(_0x3f48ae){const _0x15bec4=await _0x5de1ed['IKFub'](runClaudeCommand,['plugin','install',_0x5de1ed[_0x1a31a1(0x110)],_0x5de1ed['qszsq'],_0x5de1ed['gTfTD']]);!_0x15bec4[_0x1a31a1(0x139)]?(console['error'](_0x1a31a1(0x144),_0x15bec4[_0x1a31a1(0x11e)]),console[_0x1a31a1(0x126)](_0x5de1ed[_0x1a31a1(0x131)])):console['log']('✓\x20Claude\x20Code\x20plugin\x20installed');}return!![];}export async function setupCi(_0xa2b9cd,_0x3304ba,_0x31bcdd){const _0x1c0374=_0xc872,_0x8cdf5d={'siLfd':'auth','LdPOZ':'dir_setup','lYScX':function(_0x23b4c4,_0x5a8c90,_0x3837dc){return _0x23b4c4(_0x5a8c90,_0x3837dc);},'nYwPE':function(_0x534c34,_0xcb2966){return _0x534c34(_0xcb2966);},'AIrWm':_0x1c0374(0x135),'geBJD':function(_0x119f7d){return _0x119f7d();},'mmZKH':function(_0x226c83,_0x2c3ae1,_0x5b8d4f){return _0x226c83(_0x2c3ae1,_0x5b8d4f);},'XaKcZ':function(_0xd56340,_0x2ec8b1,_0x4a258f){return _0xd56340(_0x2ec8b1,_0x4a258f);},'pszro':_0x1c0374(0x14a),'bgCXA':function(_0x1cc249,_0x43f985){return _0x1cc249(_0x43f985);},'DtOjn':function(_0x3a9da1,_0x514bf1){return _0x3a9da1(_0x514bf1);},'oZvgL':'No\x20API\x20token\x20available\x20for\x20decryption','xbwIq':function(_0x35d4f0,_0x561a6c){return _0x35d4f0(_0x561a6c);},'MFyuu':'✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','OxBQT':_0x1c0374(0x10e),'gjrFP':_0x1c0374(0x119),'gNDkZ':'profile_activate','vxnkk':function(_0xe43609){return _0xe43609();},'YjZMX':'skills','tbluK':'\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a'};console[_0x1c0374(0x126)]('\x0a🔧\x20Ranger\x20CI\x20Setup\x0a'),_0x31bcdd?.['trackPhaseStart'](_0x8cdf5d['siLfd']),await authenticate(_0xa2b9cd),_0x31bcdd?.['trackPhaseEnd'](_0x1c0374(0x111)),_0x31bcdd?.['trackPhaseStart'](_0x8cdf5d[_0x1c0374(0x113)]);const {path:_0x3182f4,installed:_0x55a57f}=await ensureRangerDir();await writeRangerGitignore(_0x3182f4);const _0x1e37bb=_0x8cdf5d[_0x1c0374(0x117)](join,_0x3182f4,_0x1c0374(0x12d));!_0x8cdf5d[_0x1c0374(0x14d)](existsSync,_0x1e37bb)&&await mkdir(_0x1e37bb,{'recursive':!![]});_0x31bcdd?.[_0x1c0374(0x10f)](_0x1c0374(0x12e),{'installed':_0x55a57f}),_0x31bcdd?.['trackPhaseStart'](_0x8cdf5d[_0x1c0374(0x127)]);let _0x185e06=![];_0x3304ba?.[_0x1c0374(0x130)]?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x185e06=await _0x8cdf5d['geBJD'](ensureChromium);_0x31bcdd?.['trackPhaseEnd'](_0x8cdf5d['AIrWm'],{'installed':_0x185e06,'skipped':!!_0x3304ba?.[_0x1c0374(0x130)]}),_0x31bcdd?.['trackPhaseStart']('profile_activate');const _0x1ebf0e=await findCiProfile(_0x3304ba?.[_0x1c0374(0x132)]);let _0x2f826f=![];_0x3304ba?.[_0x1c0374(0x122)]&&(await _0x8cdf5d['mmZKH'](mkdir,_0x1ebf0e[_0x1c0374(0x12a)],{'recursive':!![]}),await _0x8cdf5d['XaKcZ'](saveSettings,_0x1ebf0e['name'],{'baseUrl':_0x3304ba['baseUrl'],'headless':!![]}),console[_0x1c0374(0x126)]('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x3304ba['baseUrl']),_0x2f826f=!![]);const _0x1a89e9=join(_0x1ebf0e[_0x1c0374(0x12a)],_0x8cdf5d['pszro']);if(!_0x8cdf5d[_0x1c0374(0x14c)](existsSync,_0x1a89e9)&&!_0x2f826f)throw new Error(_0x1c0374(0x143)+_0x1ebf0e['name']+_0x1c0374(0x13a));const _0x2539c5=join(_0x1ebf0e['path'],_0x1c0374(0x11f)),_0x4c1934=join(_0x1ebf0e[_0x1c0374(0x12a)],_0x1c0374(0x115)),_0x4eec26=_0x8cdf5d['DtOjn'](existsSync,_0x2539c5),_0x4789f8=existsSync(_0x4c1934);if(_0x4789f8)try{const _0x3015dc=await getToken();if(!_0x3015dc)throw new Error(_0x8cdf5d[_0x1c0374(0x13d)]);const _0x5d625b=await _0x8cdf5d[_0x1c0374(0x11d)](readFile,_0x4c1934);decrypt(_0x5d625b,_0x3015dc),console['log'](_0x8cdf5d['MFyuu']);}catch(_0x1565ba){const _0x3f3752=_0x1565ba instanceof Error?_0x1565ba[_0x1c0374(0x124)]:_0x8cdf5d['bgCXA'](String,_0x1565ba);throw new Error(_0x1c0374(0x134)+_0x1ebf0e['name']+'\x22:\x20'+_0x3f3752);}else _0x4eec26?console[_0x1c0374(0x126)](_0x8cdf5d['OxBQT']):console['log'](_0x8cdf5d[_0x1c0374(0x13c)]);await writeActiveProfileName(_0x1ebf0e[_0x1c0374(0x133)]),console['log'](_0x1c0374(0x148)+_0x1ebf0e['name']),_0x31bcdd?.[_0x1c0374(0x10f)](_0x8cdf5d['gNDkZ'],{'profileName':_0x1ebf0e['name'],'hasAuth':_0x4eec26,'hasEncryptedAuth':_0x4789f8,'createdSettings':_0x2f826f}),_0x31bcdd?.['trackPhaseStart']('plugin');const _0x57b7cb=await _0x8cdf5d['vxnkk'](installPluginNonInteractive);_0x31bcdd?.[_0x1c0374(0x10f)](_0x1c0374(0x10d),{'installed':_0x57b7cb}),_0x31bcdd?.['trackPhaseStart'](_0x8cdf5d['YjZMX']),await skillup({'autoInstall':'project'}),_0x31bcdd?.[_0x1c0374(0x10f)](_0x1c0374(0x137)),console[_0x1c0374(0x126)](_0x8cdf5d[_0x1c0374(0x146)]);}
@@ -1 +1 @@
1
- (function(_0xe6a7f2,_0x2cbf5c){const _0x85b9da=_0x5015,_0x276de3=_0xe6a7f2();while(!![]){try{const _0x348089=-parseInt(_0x85b9da(0x132))/0x1*(-parseInt(_0x85b9da(0x137))/0x2)+parseInt(_0x85b9da(0x12e))/0x3+-parseInt(_0x85b9da(0x12b))/0x4+-parseInt(_0x85b9da(0x12a))/0x5*(-parseInt(_0x85b9da(0x12f))/0x6)+-parseInt(_0x85b9da(0x14e))/0x7+-parseInt(_0x85b9da(0x158))/0x8*(parseInt(_0x85b9da(0x129))/0x9)+parseInt(_0x85b9da(0x133))/0xa;if(_0x348089===_0x2cbf5c)break;else _0x276de3['push'](_0x276de3['shift']());}catch(_0x1784f8){_0x276de3['push'](_0x276de3['shift']());}}}(_0x1b2a,0xc4ab6));function _0x1b2a(){const _0x49da5a=['328743OXHyOK','2175fRwhVu','4836120binjeO','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','✓\x20Found\x20API\x20token','1632318wkzewp','13434coTiqj','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','\x20\x202.\x20Run:\x20ranger\x20setup','1CTNxwz','20017420ayXsTZ','To\x20get\x20started:','HhEHA','/.claude/skills/','1281746USFHtw','LmwXg','fWCTK','suppressUsage','All\x20projects\x20(','\x20successfully!\x0a','whSDT','autoInstall','YWuZv','prompt','\x20<your-api-token>','opencode','/skills/','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','waQEy','\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!','\x20\x203.\x20Run:\x20ranger\x20skillup','\x0a✅\x20Installed\x20','WMRrB','oOHUK','DEmhx','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','log','5050815VXKvpU','message','user-level','platform','user','stdin','installLevel','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','project','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','312pFroaD'];_0x1b2a=function(){return _0x49da5a;};return _0x1b2a();}import{basename}from'path';import _0x5eb7b5 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';function _0x5015(_0x243825,_0x30b4d8){_0x243825=_0x243825-0x129;const _0x1b2ae2=_0x1b2a();let _0x5015af=_0x1b2ae2[_0x243825];return _0x5015af;}import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x3247cc={}){const _0x5d6c74=_0x5015,_0x32e985={'fwlTZ':_0x5d6c74(0x14c),'YWuZv':function(_0x1a2dfc){return _0x1a2dfc();},'nTMJj':_0x5d6c74(0x157),'YEtqQ':function(_0x14a55d,_0x4b4d8c){return _0x14a55d===_0x4b4d8c;},'whSDT':'opencode','fWCTK':'\x20--opencode','DEmhx':_0x5d6c74(0x152),'HhEHA':'Where\x20should\x20skills\x20be\x20installed?','vyABs':_0x5d6c74(0x156),'oOHUK':function(_0xe72be6){return _0xe72be6();},'WMRrB':_0x5d6c74(0x144),'LmwXg':function(_0x4c8cf5,_0x6e5f7c){return _0x4c8cf5 instanceof _0x6e5f7c;},'dhtDb':function(_0x2c4e41,_0x2e2d49){return _0x2c4e41>_0x2e2d49;},'TzPmV':'project-level','waQEy':'To\x20use:','CZkQT':_0x5d6c74(0x12c)};console[_0x5d6c74(0x14d)](_0x32e985['fwlTZ']);const _0x290902=_0x3247cc[_0x5d6c74(0x151)]??'claude',_0x194014=await _0x32e985[_0x5d6c74(0x13f)](getToken);if(!_0x194014){console['log']('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a'),console[_0x5d6c74(0x14d)](_0x5d6c74(0x134)),console['log'](_0x32e985['nTMJj']),console[_0x5d6c74(0x14d)](_0x5d6c74(0x131)+(_0x32e985['YEtqQ'](_0x290902,_0x32e985[_0x5d6c74(0x13d)])?'\x20--opencode':'')+_0x5d6c74(0x141)),console[_0x5d6c74(0x14d)](_0x5d6c74(0x147)+(_0x290902==='opencode'?_0x32e985[_0x5d6c74(0x139)]:'')+'\x0a');return;}console[_0x5d6c74(0x14d)](_0x5d6c74(0x12d));const _0x46100f=getProjectRoot(),_0x2284de=basename(_0x46100f),_0x527d82=_0x290902===_0x5d6c74(0x142)?getOpencodeConfigDir(_0x32e985[_0x5d6c74(0x14b)])+_0x5d6c74(0x143):getClaudeConfigDir()+_0x5d6c74(0x143),_0x2b8535=_0x290902==='opencode'?_0x46100f+'/.opencode/skills/':_0x46100f+_0x5d6c74(0x136),_0x5dbc62=process[_0x5d6c74(0x153)]['isTTY']&&process['stdout']['isTTY'];let _0x9bfb22;if(_0x3247cc[_0x5d6c74(0x13e)])_0x9bfb22=_0x3247cc[_0x5d6c74(0x13e)];else{if(_0x5dbc62){const _0x494c90=await _0x5eb7b5[_0x5d6c74(0x140)]([{'type':'list','name':_0x5d6c74(0x154),'message':_0x32e985[_0x5d6c74(0x135)],'choices':[{'name':_0x5d6c74(0x13b)+_0x527d82+')','value':_0x32e985[_0x5d6c74(0x14b)]},{'name':'This\x20project\x20only\x20('+_0x2b8535+')','value':_0x5d6c74(0x156)}]}]);_0x9bfb22=_0x494c90['installLevel'];}else _0x9bfb22=_0x32e985['vyABs'],console['log'](_0x5d6c74(0x130)+_0x2b8535+')');}let _0x11a77c=0x0;const _0xf38a16=_0x32e985[_0x5d6c74(0x14a)](getCurrentVersion);console[_0x5d6c74(0x14d)]('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x19bdc1=await installSkill('ranger',{'cliVersion':_0xf38a16,'level':_0x9bfb22,'platform':_0x290902});_0x19bdc1&&_0x11a77c++;}catch(_0x5533dc){console['warn'](_0x32e985[_0x5d6c74(0x149)],_0x32e985[_0x5d6c74(0x138)](_0x5533dc,Error)?_0x5533dc[_0x5d6c74(0x14f)]:_0x5533dc);}if(_0x32e985['dhtDb'](_0x11a77c,0x0)){const _0x2ac4a8=_0x9bfb22==='user'?_0x5d6c74(0x150):_0x32e985['TzPmV'];console['log'](_0x5d6c74(0x148)+_0x11a77c+'\x20'+_0x2ac4a8+'\x20skill'+(_0x11a77c>0x1?'s':'')+_0x5d6c74(0x13c)),!_0x3247cc[_0x5d6c74(0x13a)]&&(console[_0x5d6c74(0x14d)](_0x32e985[_0x5d6c74(0x145)]),_0x290902===_0x32e985[_0x5d6c74(0x13d)]?console['log'](_0x5d6c74(0x155)):console['log'](_0x5d6c74(0x146)));}else console['log'](_0x32e985['CZkQT']);}
1
+ (function(_0x1d0320,_0x30a30a){const _0x8378d3=_0x27fd,_0x1c01c6=_0x1d0320();while(!![]){try{const _0x594c1f=parseInt(_0x8378d3(0x111))/0x1*(parseInt(_0x8378d3(0x11d))/0x2)+-parseInt(_0x8378d3(0xfb))/0x3*(parseInt(_0x8378d3(0x120))/0x4)+-parseInt(_0x8378d3(0xf8))/0x5*(-parseInt(_0x8378d3(0x128))/0x6)+-parseInt(_0x8378d3(0x107))/0x7*(-parseInt(_0x8378d3(0x109))/0x8)+parseInt(_0x8378d3(0x10b))/0x9*(-parseInt(_0x8378d3(0x10e))/0xa)+-parseInt(_0x8378d3(0x11e))/0xb*(-parseInt(_0x8378d3(0x10a))/0xc)+parseInt(_0x8378d3(0xf9))/0xd*(-parseInt(_0x8378d3(0x108))/0xe);if(_0x594c1f===_0x30a30a)break;else _0x1c01c6['push'](_0x1c01c6['shift']());}catch(_0x5b588a){_0x1c01c6['push'](_0x1c01c6['shift']());}}}(_0x592e,0xc529d));import{basename}from'path';import _0x46cb8f from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';function _0x592e(){const _0xf0bfd2=['\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','\x20\x203.\x20Run:\x20ranger\x20skillup','\x20--opencode','BZhzF','\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!','zsSZh','RpTPY','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','list','This\x20project\x20only\x20(','CdfAB','2ngCduM','3120931mgmfSw','DwUBd','2948ClaKGZ','project-level','\x20skill','jMPIF','user-level','log','All\x20projects\x20(','lecYj','22374KqKDpc','project','2155JeoYEe','2653703GhgzuZ','pHNyA','5067cSphtP','installLevel','\x20successfully!\x0a','BANih','Where\x20should\x20skills\x20be\x20installed?','isTTY','ZcGGw','yxwsm','autoInstall','\x0a✅\x20Installed\x20','warn','user','7MzUmtj','182yIMXDR','9755104kYVsyK','60EVifbZ','4263300HtPtYO','MSpLw','opencode','10mfllGU','libNT','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','934585iENLbN'];_0x592e=function(){return _0xf0bfd2;};return _0x592e();}function _0x27fd(_0x4ccec3,_0x2fe647){_0x4ccec3=_0x4ccec3-0xf7;const _0x592e93=_0x592e();let _0x27fd75=_0x592e93[_0x4ccec3];return _0x27fd75;}import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x394d4e={}){const _0x4d9c3e=_0x27fd,_0x4c4693={'aXvKj':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','DhgFK':'claude','MSpLw':'To\x20get\x20started:','RpTPY':'\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','CdfAB':function(_0x5ccb83,_0x24308e){return _0x5ccb83===_0x24308e;},'lecYj':'opencode','EBDZD':_0x4d9c3e(0x114),'BZhzF':function(_0x5e393f){return _0x5e393f();},'WjOEN':function(_0x1498ed,_0x58be97){return _0x1498ed(_0x58be97);},'eSyzZ':'user','zsSZh':function(_0x3b1642,_0x300dbc){return _0x3b1642===_0x300dbc;},'DwUBd':_0x4d9c3e(0xfc),'BANih':_0x4d9c3e(0xff),'jMPIF':_0x4d9c3e(0xf7),'pHNyA':function(_0x585f79){return _0x585f79();},'pgPrZ':'ranger','TyIoR':function(_0x262d45,_0xe641e1){return _0x262d45>_0xe641e1;},'yxwsm':function(_0x3f488b,_0x1dff84){return _0x3f488b===_0x1dff84;},'ZcGGw':_0x4d9c3e(0x121),'libNT':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'};console[_0x4d9c3e(0x125)](_0x4c4693['aXvKj']);const _0x47da2b=_0x394d4e['platform']??_0x4c4693['DhgFK'],_0x387923=await getToken();if(!_0x387923){console[_0x4d9c3e(0x125)]('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a'),console[_0x4d9c3e(0x125)](_0x4c4693[_0x4d9c3e(0x10c)]),console[_0x4d9c3e(0x125)](_0x4c4693[_0x4d9c3e(0x118)]),console[_0x4d9c3e(0x125)]('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x4c4693[_0x4d9c3e(0x11c)](_0x47da2b,'opencode')?_0x4d9c3e(0x114):'')+'\x20<your-api-token>'),console['log'](_0x4d9c3e(0x113)+(_0x47da2b===_0x4c4693[_0x4d9c3e(0x127)]?_0x4c4693['EBDZD']:'')+'\x0a');return;}console['log']('✓\x20Found\x20API\x20token');const _0x48ea9a=_0x4c4693[_0x4d9c3e(0x115)](getProjectRoot),_0x2d74e0=basename(_0x48ea9a),_0x534a44=_0x47da2b===_0x4d9c3e(0x10d)?_0x4c4693['WjOEN'](getOpencodeConfigDir,_0x4c4693['eSyzZ'])+'/skills/':_0x4c4693['BZhzF'](getClaudeConfigDir)+'/skills/',_0x531d8d=_0x4c4693[_0x4d9c3e(0x117)](_0x47da2b,_0x4c4693[_0x4d9c3e(0x127)])?_0x48ea9a+'/.opencode/skills/':_0x48ea9a+'/.claude/skills/',_0x25c1cc=process['stdin'][_0x4d9c3e(0x100)]&&process['stdout']['isTTY'];let _0x320745;if(_0x394d4e[_0x4d9c3e(0x103)])_0x320745=_0x394d4e[_0x4d9c3e(0x103)];else{if(_0x25c1cc){const _0x983312=await _0x46cb8f['prompt']([{'type':_0x4d9c3e(0x11a),'name':_0x4c4693[_0x4d9c3e(0x11f)],'message':_0x4c4693[_0x4d9c3e(0xfe)],'choices':[{'name':_0x4d9c3e(0x126)+_0x534a44+')','value':_0x4d9c3e(0x106)},{'name':_0x4d9c3e(0x11b)+_0x531d8d+')','value':_0x4d9c3e(0xf7)}]}]);_0x320745=_0x983312['installLevel'];}else _0x320745=_0x4c4693[_0x4d9c3e(0x123)],console['log'](_0x4d9c3e(0x119)+_0x531d8d+')');}let _0xb9f007=0x0;const _0x5b52ca=_0x4c4693[_0x4d9c3e(0xfa)](getCurrentVersion);console[_0x4d9c3e(0x125)]('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x4aeb87=await installSkill(_0x4c4693['pgPrZ'],{'cliVersion':_0x5b52ca,'level':_0x320745,'platform':_0x47da2b});_0x4aeb87&&_0xb9f007++;}catch(_0x227e40){console[_0x4d9c3e(0x105)](_0x4d9c3e(0x112),_0x227e40 instanceof Error?_0x227e40['message']:_0x227e40);}if(_0x4c4693['TyIoR'](_0xb9f007,0x0)){const _0x188216=_0x4c4693[_0x4d9c3e(0x102)](_0x320745,'user')?_0x4d9c3e(0x124):_0x4c4693[_0x4d9c3e(0x101)];console['log'](_0x4d9c3e(0x104)+_0xb9f007+'\x20'+_0x188216+_0x4d9c3e(0x122)+(_0xb9f007>0x1?'s':'')+_0x4d9c3e(0xfd)),!_0x394d4e['suppressUsage']&&(console['log']('To\x20use:'),_0x4c4693['yxwsm'](_0x47da2b,_0x4d9c3e(0x10d))?console[_0x4d9c3e(0x125)](_0x4c4693[_0x4d9c3e(0x10f)]):console['log'](_0x4d9c3e(0x116)));}else console['log'](_0x4d9c3e(0x110));}
@@ -1 +1 @@
1
- const _0x933dd=_0x416b;(function(_0x1e0e24,_0x30b43b){const _0x25b535=_0x416b,_0x4451c6=_0x1e0e24();while(!![]){try{const _0x33f5cc=parseInt(_0x25b535(0x102))/0x1*(-parseInt(_0x25b535(0xc9))/0x2)+-parseInt(_0x25b535(0xc4))/0x3*(-parseInt(_0x25b535(0xf3))/0x4)+-parseInt(_0x25b535(0xc7))/0x5*(parseInt(_0x25b535(0x110))/0x6)+-parseInt(_0x25b535(0xbc))/0x7+parseInt(_0x25b535(0xcf))/0x8+parseInt(_0x25b535(0x118))/0x9+parseInt(_0x25b535(0xc0))/0xa*(parseInt(_0x25b535(0xcc))/0xb);if(_0x33f5cc===_0x30b43b)break;else _0x4451c6['push'](_0x4451c6['shift']());}catch(_0x5da4d4){_0x4451c6['push'](_0x4451c6['shift']());}}}(_0x121c,0x9664c));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x1f261d 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=_0x2fd3e2=>'\x1b[1m'+_0x2fd3e2+_0x933dd(0xcb);function _0x416b(_0x1d92e3,_0x3c7d97){_0x1d92e3=_0x1d92e3-0xbc;const _0x121ca5=_0x121c();let _0x416b39=_0x121ca5[_0x1d92e3];return _0x416b39;}function getPlaywrightVersion(){const _0x2fe9d2=_0x933dd,_0x2a8914={'sQFmU':function(_0x58df48,_0x2666ac){return _0x58df48(_0x2666ac);}};try{const _0x56d2ff=require[_0x2fe9d2(0x131)](_0x2fe9d2(0xf7)),_0xc445e2=_0x2a8914[_0x2fe9d2(0x11d)](require,_0x56d2ff);return _0xc445e2['version'];}catch{return null;}}function installChromiumBinary(_0x572643){const _0x1f0b96=_0x933dd,_0x2d8147={'Voptm':function(_0x536d80,_0x7f6010){return _0x536d80===_0x7f6010;},'cKkSe':function(_0x1ac169,_0x1f3d2d){return _0x1ac169(_0x1f3d2d);},'uQEDV':'chromium','lskRJ':'install','uxXDn':function(_0x50a2c9,_0x54bb35,_0x3dcdbe,_0x2b08e6){return _0x50a2c9(_0x54bb35,_0x3dcdbe,_0x2b08e6);},'jRIiO':_0x1f0b96(0x121),'gDwSE':_0x1f0b96(0x129),'ipHoc':'close','wkCdo':'error'};return new Promise((_0x1bf2d8,_0x505776)=>{const _0x2c4509=_0x1f0b96,_0x3a5b53={'ErNkx':function(_0x2e28a5,_0x58d72b){const _0x4cb999=_0x416b;return _0x2d8147[_0x4cb999(0xf6)](_0x2e28a5,_0x58d72b);},'eIpvW':function(_0xad8d67,_0x59e178){const _0x18834e=_0x416b;return _0x2d8147[_0x18834e(0xc8)](_0xad8d67,_0x59e178);}},_0x231f65=_0x572643?['playwright@'+_0x572643,_0x2c4509(0x10c),_0x2d8147[_0x2c4509(0x133)]]:['playwright',_0x2d8147[_0x2c4509(0x123)],_0x2d8147[_0x2c4509(0x133)]],_0x3a36b8=_0x2d8147[_0x2c4509(0xe7)](spawn,'npx',_0x231f65,{'stdio':_0x2d8147[_0x2c4509(0x10b)],'shell':process[_0x2c4509(0xe3)]===_0x2d8147[_0x2c4509(0xee)]});_0x3a36b8['on'](_0x2d8147[_0x2c4509(0x119)],_0x85ef93=>{const _0x1a22a9=_0x2c4509;_0x3a5b53[_0x1a22a9(0x12c)](_0x85ef93,0x0)?_0x1bf2d8():_0x505776(new Error(_0x1a22a9(0xce)+_0x85ef93));}),_0x3a36b8['on'](_0x2d8147['wkCdo'],_0x53b0b1=>{const _0x27d32f=_0x2c4509;_0x3a5b53[_0x27d32f(0xe0)](_0x505776,_0x53b0b1);});});}export async function authenticate(_0x5cc769){const _0x300406=_0x933dd,_0x12a019={'JORjk':function(_0xf02add,_0x3eabe7){return _0xf02add(_0x3eabe7);},'QfZwn':'existing_token','CtQii':function(_0x11ed16){return _0x11ed16();},'yXbLm':function(_0x558f1a,_0x5ca1f6){return _0x558f1a(_0x5ca1f6);},'IWiMb':_0x300406(0xbe),'WXsRQ':'provided_token'};if(!_0x5cc769){const _0x172bbd=await getToken();if(_0x172bbd){const _0x484d5c=await _0x12a019['JORjk'](getCurrentUser,_0x172bbd);if(_0x484d5c['success'])return console['log'](_0x300406(0x11f)+_0x484d5c[_0x300406(0x109)][_0x300406(0xbf)]),{'token':_0x172bbd,'method':_0x12a019['QfZwn']};}try{_0x5cc769=await _0x12a019['CtQii'](runDeviceAuthFlow);}catch(_0x18cd9c){throw new Error(_0x300406(0x124)+(_0x18cd9c instanceof Error?_0x18cd9c[_0x300406(0xcd)]:_0x18cd9c));}const _0x130cec=await _0x12a019[_0x300406(0x11e)](getCurrentUser,_0x5cc769);if(!_0x130cec['success'])throw new Error(_0x300406(0x12b)+_0x130cec['error']);return console[_0x300406(0x103)](_0x300406(0x108)+_0x130cec[_0x300406(0x109)][_0x300406(0xbf)]),{'token':_0x5cc769,'method':'device_auth'};}console[_0x300406(0x103)](_0x300406(0xdd));const _0x2ce1f4=await _0x12a019[_0x300406(0xd7)](getCurrentUser,_0x5cc769);if(!_0x2ce1f4[_0x300406(0xfe)]){if(_0x2ce1f4['status'])throw new Error(_0x300406(0x124)+_0x2ce1f4[_0x300406(0x11b)]+_0x300406(0x101));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x2ce1f4['error']+_0x300406(0xd8));}return console[_0x300406(0x103)]('✓\x20Authenticated\x20to\x20'+_0x2ce1f4['user']['organizationName']),await storeToken(_0x5cc769),console[_0x300406(0x103)](process['env']['GITHUB_ENV']?_0x300406(0xc3):_0x12a019[_0x300406(0x127)]),{'token':_0x5cc769,'method':_0x12a019[_0x300406(0x106)]};}export async function ensureRangerDir(){const _0x528535=_0x933dd,_0x427a90={'crGPe':function(_0x5d9830){return _0x5d9830();},'KVOqV':'.ranger','Jrgsw':function(_0x5d6506){return _0x5d6506();},'DyPAA':function(_0x219d43,_0x5e23e7,_0x4b16e6){return _0x219d43(_0x5e23e7,_0x4b16e6);}},_0x14251a=_0x427a90['crGPe'](findGitRoot),_0x1d9bbc=_0x14251a?join(_0x14251a,_0x427a90[_0x528535(0xe5)]):_0x427a90[_0x528535(0x112)](getRangerDir);return!existsSync(_0x1d9bbc)?(await _0x427a90[_0x528535(0xc1)](mkdir,_0x1d9bbc,{'recursive':!![]}),console[_0x528535(0x103)](_0x528535(0xc2)),{'path':_0x1d9bbc,'installed':!![]}):(console['log']('✓\x20.ranger/\x20directory\x20already\x20exists'),{'path':_0x1d9bbc,'installed':![]});}export async function ensureChromium(){const _0xe41a5c=_0x933dd,_0x53bdc5={'zVZvJ':_0xe41a5c(0x12f),'tTehA':'install','JahIX':_0xe41a5c(0x11a),'fCJEW':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','OJISF':_0xe41a5c(0x113),'ukmeu':'\x0a⚠\x20Skipping\x20Chromium\x20installation.','ujeSf':_0xe41a5c(0xf5)};let _0xe81186=![];try{const _0xe6389b=chromium[_0xe41a5c(0x105)]();_0xe81186=existsSync(_0xe6389b);}catch{_0xe81186=![];}if(_0xe81186)return console['log'](_0x53bdc5[_0xe41a5c(0x132)]),![];const _0xe82fc5=getPlaywrightVersion(),_0x239a9c=process[_0xe41a5c(0x126)][_0xe41a5c(0xdb)]&&process['stdout']['isTTY'];let _0x2b39bf=!![];if(_0x239a9c){const {install:_0x508279}=await _0x1f261d[_0xe41a5c(0x107)]([{'type':'confirm','name':_0x53bdc5['tTehA'],'message':_0xe82fc5?_0xe41a5c(0xeb)+_0xe82fc5+_0xe41a5c(0x111):_0x53bdc5['JahIX'],'default':!![]}]);_0x2b39bf=_0x508279;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium'+(_0xe82fc5?'\x20'+_0xe82fc5:'')+'...');if(_0x2b39bf){console[_0xe41a5c(0x103)](_0xe41a5c(0xe8));try{await installChromiumBinary(_0xe82fc5),console[_0xe41a5c(0x103)]('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x440320){console[_0xe41a5c(0x11b)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x440320 instanceof Error?_0x440320['message']:_0x440320),console[_0xe41a5c(0x103)](_0x53bdc5['fCJEW']),_0xe82fc5?console['log']('\x20\x20npx\x20playwright@'+_0xe82fc5+'\x20install\x20chromium'):console[_0xe41a5c(0x103)](_0x53bdc5[_0xe41a5c(0xfa)]);}}else console['log'](_0x53bdc5['ukmeu']),console['log'](_0x53bdc5['ujeSf']),_0xe82fc5?console[_0xe41a5c(0x103)]('\x20\x20npx\x20playwright@'+_0xe82fc5+'\x20install\x20chromium'):console[_0xe41a5c(0x103)](_0xe41a5c(0x113));return!![];}export async function writeRangerGitignore(_0x66f2da){const _0x5e0c91=_0x933dd,_0x5588b8={'YGXOu':_0x5e0c91(0xd6),'buRdp':function(_0x430b53,_0x23cd79,_0x286388){return _0x430b53(_0x23cd79,_0x286388);}},_0x488a39=join(_0x66f2da,_0x5588b8['YGXOu']),_0xd31860='\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 _0x5588b8['buRdp'](writeFile,_0x488a39,_0xd31860),console['log'](_0x5e0c91(0x115));}function _0x121c(){const _0x581b32=['lskRJ','Authentication\x20failed:\x20','stdout','stdin','IWiMb','use\x20until\x20the\x20session\x20expires.\x0a','win32','✓\x20Local\x20profile\x20already\x20exists','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','ErNkx','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','No\x20git\x20repository\x20found','✓\x20Playwright\x20Chromium\x20browser\x20found','qOoUk','resolve','zVZvJ','uQEDV','6056491MPvluG','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','✓\x20Stored\x20credentials\x20locally','organizationName','2650120Zlxdek','DyPAA','✓\x20Created\x20.ranger/\x20directory','✓\x20Exported\x20credentials\x20for\x20CI','3CcgzmV','local','skipped','5XEjDkx','cKkSe','2WStYIg','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','\x1b[0m','55uwNxnk','message','Installation\x20failed\x20with\x20exit\x20code\x20','6097824smNJFL','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','LMjUk','\x0a🚀\x20Ranger\x20Setup\x0a','alGmi','trackPhaseError','.gitignore','yXbLm','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','qsbdU','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','isTTY','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','Validating\x20API\x20token...','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','eIpvW','trackPhaseStart','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','platform','profile','KVOqV','ranger\x20profile\x20add\x20local','uxXDn','\x0aInstalling\x20Chromium\x20browser...\x0a','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','skills','The\x20required\x20version\x20(','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','icGWC','gDwSE','ranger','/ranger:enable','force','zMusc','1202956eGtRPC','\x0aIn\x20Claude\x20Code,\x20run\x20','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','Voptm','playwright/package.json','skipChromium','iCKIs','OJISF','vFdij','plugin','VYSey','success','trackPhaseEnd','method','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','992183dLKyOY','log','scope','executablePath','WXsRQ','prompt','✓\x20Authenticated\x20to\x20','user','rKBdy','jRIiO','install','wantsProfile','OrgKE','rHXyS','4294518Ozaztq',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','Jrgsw','\x20\x20npx\x20playwright\x20install\x20chromium','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','✓\x20Created\x20.ranger/.gitignore','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','url','7210206TpoGjd','ipHoc','The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','error','chromium','sQFmU','JORjk','✓\x20Already\x20authenticated\x20to\x20','sGLJU','inherit','warn'];_0x121c=function(){return _0x581b32;};return _0x121c();}function printProfileSetupLaterInstructions(){const _0x274ba6=_0x933dd,_0x4fd1b7={'kwRgA':function(_0x326f49,_0x2f9c66){return _0x326f49(_0x2f9c66);},'vFdij':_0x274ba6(0xe6)};console['log']('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console['log']('\x20\x20'+_0x4fd1b7['kwRgA'](bold,_0x4fd1b7[_0x274ba6(0xfb)])),console[_0x274ba6(0x103)](_0x274ba6(0xd1));}async function ensureLocalEnv(_0x4dfdd0,_0x40e9cd){const _0x3b56f8=_0x933dd,_0x2f02b6={'XAHiG':function(_0x2ffda6,_0x5324b0,_0x189073){return _0x2ffda6(_0x5324b0,_0x189073);},'rKBdy':_0x3b56f8(0xc5),'zMusc':_0x3b56f8(0x12a),'elfjy':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','TQZcn':'auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','icGWC':_0x3b56f8(0x128),'Eksnp':_0x3b56f8(0x114),'sGLJU':function(_0x3185d2){return _0x3185d2();},'nYCBK':'\x0a❌\x20Profile\x20setup\x20failed:','VYSey':function(_0x5e2aad){return _0x5e2aad();}};if(!findGitRoot())return console['log'](_0x3b56f8(0xda)),{'ready':![],'skipped':!![]};if(_0x2f02b6['XAHiG'](findExistingEnv,_0x2f02b6[_0x3b56f8(0x10a)],{'locations':[_0x2f02b6['rKBdy']]}))return console['log'](_0x2f02b6[_0x3b56f8(0xf2)]),{'ready':!![],'skipped':![]};const _0x4734fe=process[_0x3b56f8(0x126)][_0x3b56f8(0xdb)]&&process['stdout']['isTTY'];if(_0x4734fe&&!_0x4dfdd0?.[_0x3b56f8(0x117)]){console['log'](_0x3b56f8(0xd0)),console['log'](_0x2f02b6['elfjy']),console['log'](_0x2f02b6['TQZcn']),console['log'](_0x2f02b6[_0x3b56f8(0xed)]),console[_0x3b56f8(0x103)](_0x2f02b6['Eksnp']);const {wantsProfile:_0x5e01fa}=await _0x1f261d['prompt']([{'type':'confirm','name':_0x3b56f8(0x10d),'message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0x5e01fa)return _0x2f02b6[_0x3b56f8(0x120)](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await addEnv('local',{'url':_0x4dfdd0?.['url'],'force':_0x4dfdd0?.['force']},_0x40e9cd),{'ready':!![],'skipped':![]};}catch(_0xe60c72){return console[_0x3b56f8(0x11b)](_0x2f02b6['nYCBK'],_0xe60c72 instanceof Error?_0xe60c72[_0x3b56f8(0xcd)]:_0xe60c72),_0x2f02b6[_0x3b56f8(0xfd)](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x3716d9,_0x24b9da,_0x3887ae){const _0x27ff84=_0x933dd,_0x16e583={'TDMoO':_0x27ff84(0xd3),'cpQPF':_0x27ff84(0x12d),'PzasF':'git_check','qsbdU':function(_0x5b6fcd){return _0x5b6fcd();},'nbcrd':_0x27ff84(0x12e),'MFPMC':_0x27ff84(0xca),'rHXyS':'auth','dHDUY':function(_0x4fbb93,_0x5c24bb){return _0x4fbb93(_0x5c24bb);},'sPRTA':_0x27ff84(0x11c),'eBkKk':_0x27ff84(0xe2),'OrgKE':'plugin','qOoUk':function(_0x3d96c9,_0xcfd9ff,_0xc8ff9f){return _0x3d96c9(_0xcfd9ff,_0xc8ff9f);},'XFPve':function(_0x232536,_0x57fbef){return _0x232536 instanceof _0x57fbef;},'iCKIs':'skills','LMjUk':_0x27ff84(0xe4),'alGmi':_0x27ff84(0x116),'skmes':_0x27ff84(0xf0)};console['log'](_0x16e583['TDMoO']);const _0x44a21e=process['stdin'][_0x27ff84(0xdb)]&&process[_0x27ff84(0x125)][_0x27ff84(0xdb)];!_0x44a21e&&!_0x24b9da?.[_0x27ff84(0x104)]&&(console[_0x27ff84(0x103)](_0x16e583['cpQPF']),_0x24b9da={..._0x24b9da,'scope':'user'});_0x3887ae?.[_0x27ff84(0xe1)](_0x16e583['PzasF']);if(!_0x16e583[_0x27ff84(0xd9)](findGitRoot)){await _0x3887ae?.[_0x27ff84(0xd5)]('git_check',new Error(_0x16e583['nbcrd']));throw new Error(_0x16e583['MFPMC']);}_0x3887ae?.[_0x27ff84(0xff)](_0x16e583['PzasF']);const _0x8dd532=!existsSync(getRangerDir()),{path:_0x4cdbf4}=await _0x16e583['qsbdU'](ensureRangerDir);_0x3887ae?.['trackPhaseStart'](_0x16e583[_0x27ff84(0x10f)]);const _0x3a64b3=await _0x16e583['dHDUY'](authenticate,_0x3716d9);_0x3887ae?.['trackPhaseEnd'](_0x16e583[_0x27ff84(0x10f)],{'isFirstRun':_0x8dd532,'method':_0x3a64b3[_0x27ff84(0x100)]}),_0x3887ae?.['trackPhaseStart'](_0x16e583['sPRTA']);_0x24b9da?.[_0x27ff84(0xf8)]?console['log'](_0x16e583['eBkKk']):await ensureChromium();_0x3887ae?.[_0x27ff84(0xff)](_0x27ff84(0x11c),{'isFirstRun':_0x8dd532,'skipped':!!_0x24b9da?.[_0x27ff84(0xf8)]}),await writeRangerGitignore(_0x4cdbf4),console[_0x27ff84(0x103)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x1c0b46=_0x24b9da?.[_0x27ff84(0x104)],_0x5bf95f=_0x24b9da?.['opencode']??![];let _0xb09d23=null;_0x5bf95f?(_0x3887ae?.[_0x27ff84(0xe1)](_0x27ff84(0xfc)),_0xb09d23=await _0x16e583['dHDUY'](ensureOpencodePluginConfig,_0x1c0b46),_0x3887ae?.['trackPhaseEnd'](_0x16e583[_0x27ff84(0x10e)],{'isFirstRun':_0x8dd532,'opencode':!![]})):(_0x3887ae?.[_0x27ff84(0xe1)](_0x27ff84(0xfc)),await ensureClaudePlugin(_0x1c0b46),_0x3887ae?.['trackPhaseEnd'](_0x27ff84(0xfc),{'isFirstRun':_0x8dd532}));if(_0x5bf95f&&_0xb09d23){_0x3887ae?.['trackPhaseStart'](_0x27ff84(0xea));try{await _0x16e583['qOoUk'](installSkill,_0x27ff84(0xef),{'level':_0xb09d23[_0x27ff84(0x104)],'cliVersion':getCurrentVersion(),'platform':'opencode'}),_0x3887ae?.['trackPhaseEnd']('skills',{'isFirstRun':_0x8dd532,'opencode':!![]});}catch(_0x55ef95){console[_0x27ff84(0x122)](_0x27ff84(0xe9),_0x16e583['XFPve'](_0x55ef95,Error)?_0x55ef95['message']:_0x55ef95),_0x3887ae?.[_0x27ff84(0xff)](_0x27ff84(0xea),{'isFirstRun':_0x8dd532,'opencode':!![],'failed':!![]});}}else _0x3887ae?.['trackPhaseStart'](_0x16e583[_0x27ff84(0xf9)]),await _0x16e583['dHDUY'](ensureClaudeSkills,_0x1c0b46),_0x3887ae?.[_0x27ff84(0xff)](_0x27ff84(0xea),{'isFirstRun':_0x8dd532});if(!_0x44a21e&&!_0x24b9da?.[_0x27ff84(0x117)])console[_0x27ff84(0x103)](_0x27ff84(0xbd)),console[_0x27ff84(0x103)]('\x20\x20'+_0x16e583['dHDUY'](bold,_0x27ff84(0xe6))+'\x0a');else{_0x3887ae?.['trackPhaseStart'](_0x16e583['LMjUk']);const _0x1b6c64=await _0x16e583[_0x27ff84(0x130)](ensureLocalEnv,{'url':_0x24b9da?.[_0x27ff84(0x117)],'force':_0x24b9da?.[_0x27ff84(0xf1)]},_0x3887ae);_0x3887ae?.[_0x27ff84(0xff)](_0x16e583[_0x27ff84(0xd2)],{'isFirstRun':_0x8dd532,'profileReady':_0x1b6c64['ready'],'userSkipped':_0x1b6c64[_0x27ff84(0xc6)]}),_0x1b6c64['ready']&&console[_0x27ff84(0x103)]('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x5bf95f)console[_0x27ff84(0x103)](_0x27ff84(0xde)),console['log']('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console['log'](_0x27ff84(0xdc)),console[_0x27ff84(0x103)](_0x16e583[_0x27ff84(0xd4)]);else{const _0x3b4661=_0x16e583['dHDUY'](bold,_0x16e583['skmes']);console['log'](_0x27ff84(0xf4)+_0x3b4661+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'+_0x27ff84(0xec)+_0x27ff84(0xdf));}}
1
+ const _0x21b21b=_0x2622;(function(_0x3ffc8e,_0x45fcdb){const _0x4978b=_0x2622,_0x16be4e=_0x3ffc8e();while(!![]){try{const _0x1c8c9a=parseInt(_0x4978b(0x12c))/0x1+-parseInt(_0x4978b(0xc7))/0x2+-parseInt(_0x4978b(0x11d))/0x3*(parseInt(_0x4978b(0xd2))/0x4)+-parseInt(_0x4978b(0xe9))/0x5+parseInt(_0x4978b(0xf6))/0x6*(-parseInt(_0x4978b(0xfa))/0x7)+parseInt(_0x4978b(0x129))/0x8*(parseInt(_0x4978b(0xd1))/0x9)+-parseInt(_0x4978b(0xf2))/0xa*(-parseInt(_0x4978b(0xc9))/0xb);if(_0x1c8c9a===_0x45fcdb)break;else _0x16be4e['push'](_0x16be4e['shift']());}catch(_0x1f92a1){_0x16be4e['push'](_0x16be4e['shift']());}}}(_0x16ca,0xb3b6f));import{mkdir,writeFile}from'fs/promises';function _0x2622(_0x1f7a4c,_0x2171d8){_0x1f7a4c=_0x1f7a4c-0xc5;const _0x16ca77=_0x16ca();let _0x2622cd=_0x16ca77[_0x1f7a4c];return _0x2622cd;}import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x3e49c3 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 _0x16ca(){const _0x2d322e=['Validating\x20API\x20token...','isTTY','skipChromium','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','\x0a❌\x20Profile\x20setup\x20failed:','VWJgd',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','1909048cJlZVd','tWGbc','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','247190dsuExa','✓\x20Stored\x20credentials\x20locally','OHdWB','\x20\x20npx\x20playwright@','JlakD','YGooh','✓\x20.ranger/\x20directory\x20already\x20exists','sAMkI','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium','.gitignore','1060510BYLpGb','playwright','28367053ZxImVj','LeAbL','trackPhaseEnd','stdout','\x1b[0m','xnzen','url','stdin','36aseMBq','20ncCdSN','Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','WfKdN','qOIam','tAjos','use\x20until\x20the\x20session\x20expires.\x0a','tSbiG','✓\x20Playwright\x20Chromium\x20browser\x20found','IRHsi','✓\x20Authenticated\x20to\x20','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','✓\x20Created\x20.ranger/.gitignore','wCZyT','skills','method','Erifr','.ranger','error','wXSPK','success','plugin','playwright@','6027330KCAAKm','user','ITYCT','BDDHA','opencode','NtZJn','log','EjGnl','QenHJ','10jUedVt','\x0aIn\x20Claude\x20Code,\x20run\x20','auth','prompt','30YBDIey','\x0a⚠\x20Skipping\x20Chromium\x20installation.','GITHUB_ENV','platform','1077944hfDRsV','tDHNA','nPHqI','ZVkRs','OPoaM','message','CmEIw','playwright/package.json','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','organizationName','RLozi','scope','profile','\x20\x20npx\x20playwright\x20install\x20chromium','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','wantsProfile','The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','LfoDE','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','WPsTK','\x0a🚀\x20Ranger\x20Setup\x0a','TGNML','bzWlS','trackPhaseStart','...','Installation\x20failed\x20with\x20exit\x20code\x20','MNpgO','resolve','install','chromium','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','✓\x20Local\x20profile\x20already\x20exists','WcKpd','ready','323247oxpWXY','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','local','close','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.'];_0x16ca=function(){return _0x2d322e;};return _0x16ca();}import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url),bold=_0x22d317=>'\x1b[1m'+_0x22d317+_0x21b21b(0xcd);function getPlaywrightVersion(){const _0x280e00=_0x21b21b,_0x532dfb={'MNpgO':function(_0xf3fa4c,_0x5b2e16){return _0xf3fa4c(_0x5b2e16);}};try{const _0x33b624=require[_0x280e00(0x116)](_0x280e00(0x101)),_0x2a9604=_0x532dfb[_0x280e00(0x115)](require,_0x33b624);return _0x2a9604['version'];}catch{return null;}}function installChromiumBinary(_0xe8a055){const _0x28c9cf=_0x21b21b,_0x3b64d7={'eFCBh':function(_0x16e401,_0x597612){return _0x16e401===_0x597612;},'Erifr':function(_0x503c32){return _0x503c32();},'WPsTK':function(_0x8223ba,_0x264aab){return _0x8223ba(_0x264aab);},'oMJcf':_0x28c9cf(0x117),'sAMkI':_0x28c9cf(0x118),'ByWaj':'inherit','IbmVn':function(_0x3036a4,_0x2ed550){return _0x3036a4===_0x2ed550;},'IRHsi':_0x28c9cf(0x120)};return new Promise((_0x1401e6,_0x4c7b46)=>{const _0x50a891=_0x28c9cf,_0x5e2547={'dBFhT':function(_0x4a21be,_0x4583b5){const _0x122dad=_0x2622;return _0x3b64d7[_0x122dad(0x10e)](_0x4a21be,_0x4583b5);}},_0x297f42=_0xe8a055?[_0x50a891(0xe8)+_0xe8a055,_0x3b64d7['oMJcf'],_0x3b64d7[_0x50a891(0x133)]]:[_0x50a891(0xc8),_0x50a891(0x117),_0x3b64d7['sAMkI']],_0x1d2a43=spawn('npx',_0x297f42,{'stdio':_0x3b64d7['ByWaj'],'shell':_0x3b64d7['IbmVn'](process[_0x50a891(0xf9)],'win32')});_0x1d2a43['on'](_0x3b64d7[_0x50a891(0xdb)],_0xb63024=>{const _0x3a093c=_0x50a891;_0x3b64d7['eFCBh'](_0xb63024,0x0)?_0x3b64d7[_0x3a093c(0xe2)](_0x1401e6):_0x3b64d7[_0x3a093c(0x10e)](_0x4c7b46,new Error(_0x3a093c(0x114)+_0xb63024));}),_0x1d2a43['on']('error',_0x3eb834=>{_0x5e2547['dBFhT'](_0x4c7b46,_0x3eb834);});});}export async function authenticate(_0x3c861e){const _0x2259ef=_0x21b21b,_0x114e94={'qZjsy':function(_0x491b5d){return _0x491b5d();},'BDDHA':function(_0xe96813,_0x9e631a){return _0xe96813(_0x9e631a);},'QWFHb':function(_0x4140f3,_0x231560){return _0x4140f3(_0x231560);},'gNTxL':'✓\x20Exported\x20credentials\x20for\x20CI','ITYCT':_0x2259ef(0x12d),'wCZyT':'provided_token'};if(!_0x3c861e){const _0x5a114a=await _0x114e94['qZjsy'](getToken);if(_0x5a114a){const _0x243fb8=await _0x114e94[_0x2259ef(0xec)](getCurrentUser,_0x5a114a);if(_0x243fb8[_0x2259ef(0xe6)])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x243fb8[_0x2259ef(0xea)]['organizationName']),{'token':_0x5a114a,'method':'existing_token'};}try{_0x3c861e=await _0x114e94['qZjsy'](runDeviceAuthFlow);}catch(_0x5d7762){throw new Error('Authentication\x20failed:\x20'+(_0x5d7762 instanceof Error?_0x5d7762['message']:_0x5d7762));}const _0x38a507=await _0x114e94[_0x2259ef(0xec)](getCurrentUser,_0x3c861e);if(!_0x38a507[_0x2259ef(0xe6)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x38a507['error']);return console[_0x2259ef(0xef)]('✓\x20Authenticated\x20to\x20'+_0x38a507['user'][_0x2259ef(0x103)]),{'token':_0x3c861e,'method':'device_auth'};}console[_0x2259ef(0xef)](_0x2259ef(0x122));const _0x3e38ea=await getCurrentUser(_0x3c861e);if(!_0x3e38ea['success']){if(_0x3e38ea['status'])throw new Error('Authentication\x20failed:\x20'+_0x3e38ea['error']+_0x2259ef(0x10d));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x3e38ea[_0x2259ef(0xe4)]+_0x2259ef(0x108));}return console[_0x2259ef(0xef)](_0x2259ef(0xdc)+_0x3e38ea['user']['organizationName']),await _0x114e94['QWFHb'](storeToken,_0x3c861e),console['log'](process['env'][_0x2259ef(0xf8)]?_0x114e94['gNTxL']:_0x114e94[_0x2259ef(0xeb)]),{'token':_0x3c861e,'method':_0x114e94[_0x2259ef(0xdf)]};}export async function ensureRangerDir(){const _0x4d49fa=_0x21b21b,_0x3d1306={'nPHqI':function(_0x53b1b0,_0x54508e,_0x18e9b3){return _0x53b1b0(_0x54508e,_0x18e9b3);},'tSbiG':function(_0x131458){return _0x131458();}},_0x267c8a=findGitRoot(),_0x126fec=_0x267c8a?_0x3d1306[_0x4d49fa(0xfc)](join,_0x267c8a,_0x4d49fa(0xe3)):_0x3d1306[_0x4d49fa(0xd9)](getRangerDir);return!existsSync(_0x126fec)?(await _0x3d1306[_0x4d49fa(0xfc)](mkdir,_0x126fec,{'recursive':!![]}),console['log']('✓\x20Created\x20.ranger/\x20directory'),{'path':_0x126fec,'installed':!![]}):(console['log'](_0x4d49fa(0x132)),{'path':_0x126fec,'installed':![]});}export async function ensureChromium(){const _0x31146a=_0x21b21b,_0xee76e4={'TGNML':function(_0x1bf57f){return _0x1bf57f();},'diAdo':'confirm','LvujI':_0x31146a(0x10b),'RLozi':function(_0xbb43a1,_0x11ef34){return _0xbb43a1(_0x11ef34);},'IskMS':function(_0x31803c,_0x385eb8){return _0x31803c instanceof _0x385eb8;},'qOIam':_0x31146a(0xf7),'LeAbL':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','uOlCA':'\x20\x20npx\x20playwright\x20install\x20chromium'};let _0x1bdddc=![];try{const _0x3908f3=chromium['executablePath']();_0x1bdddc=existsSync(_0x3908f3);}catch{_0x1bdddc=![];}if(_0x1bdddc)return console[_0x31146a(0xef)](_0x31146a(0xda)),![];const _0x2f3198=_0xee76e4[_0x31146a(0x110)](getPlaywrightVersion),_0x43ed34=process[_0x31146a(0xd0)]['isTTY']&&process['stdout']['isTTY'];let _0x318836=!![];if(_0x43ed34){const {install:_0x11bb21}=await _0x3e49c3[_0x31146a(0xf5)]([{'type':_0xee76e4['diAdo'],'name':_0x31146a(0x117),'message':_0x2f3198?'The\x20required\x20version\x20('+_0x2f3198+_0x31146a(0x128):_0xee76e4['LvujI'],'default':!![]}]);_0x318836=_0x11bb21;}else console[_0x31146a(0xef)](_0x31146a(0xc5)+(_0x2f3198?'\x20'+_0x2f3198:'')+_0x31146a(0x113));if(_0x318836){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0xee76e4[_0x31146a(0x104)](installChromiumBinary,_0x2f3198),console[_0x31146a(0xef)]('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x2cc063){console[_0x31146a(0xe4)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0xee76e4['IskMS'](_0x2cc063,Error)?_0x2cc063[_0x31146a(0xff)]:_0x2cc063),console['log']('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),_0x2f3198?console[_0x31146a(0xef)]('\x20\x20npx\x20playwright@'+_0x2f3198+'\x20install\x20chromium'):console[_0x31146a(0xef)](_0x31146a(0x107));}}else console[_0x31146a(0xef)](_0xee76e4[_0x31146a(0xd6)]),console[_0x31146a(0xef)](_0xee76e4[_0x31146a(0xca)]),_0x2f3198?console[_0x31146a(0xef)](_0x31146a(0x12f)+_0x2f3198+'\x20install\x20chromium'):console[_0x31146a(0xef)](_0xee76e4['uOlCA']);return!![];}export async function writeRangerGitignore(_0x341369){const _0x51d18a=_0x21b21b,_0x56fa31={'LfoDE':_0x51d18a(0xc6)},_0x114fcf=join(_0x341369,_0x56fa31[_0x51d18a(0x10c)]),_0x83740e='\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(_0x114fcf,_0x83740e),console[_0x51d18a(0xef)](_0x51d18a(0xde));}function printProfileSetupLaterInstructions(){const _0x594175=_0x21b21b,_0x5d0994={'wXSPK':'ranger\x20profile\x20add\x20local'};console[_0x594175(0xef)](_0x594175(0xd4)),console[_0x594175(0xef)]('\x20\x20'+bold(_0x5d0994[_0x594175(0xe5)])),console[_0x594175(0xef)](_0x594175(0x12b));}async function ensureLocalEnv(_0x4a1d4f,_0x261e66){const _0x546a8e=_0x21b21b,_0x404e43={'wMlDI':function(_0x3cb2ca){return _0x3cb2ca();},'ZVkRs':'⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','VWJgd':'local','bzWlS':_0x546a8e(0xdd),'tAjos':'You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','JlakD':'confirm','WfKdN':_0x546a8e(0x10a),'QenHJ':_0x546a8e(0x126),'tDHNA':function(_0x2bf160){return _0x2bf160();}};if(!_0x404e43['wMlDI'](findGitRoot))return console[_0x546a8e(0xef)](_0x404e43[_0x546a8e(0xfd)]),{'ready':![],'skipped':!![]};if(findExistingEnv(_0x404e43[_0x546a8e(0x127)],{'locations':[_0x546a8e(0x11f)]}))return console['log'](_0x546a8e(0x11a)),{'ready':!![],'skipped':![]};const _0x28fe58=process['stdin'][_0x546a8e(0x123)]&&process['stdout']['isTTY'];if(_0x28fe58&&!_0x4a1d4f?.['url']){console[_0x546a8e(0xef)](_0x404e43[_0x546a8e(0x111)]),console[_0x546a8e(0xef)]('to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind'),console['log']('auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to'),console[_0x546a8e(0xef)](_0x546a8e(0xd8)),console[_0x546a8e(0xef)](_0x404e43[_0x546a8e(0xd7)]);const {wantsProfile:_0x107d45}=await _0x3e49c3['prompt']([{'type':_0x404e43[_0x546a8e(0x130)],'name':_0x404e43[_0x546a8e(0xd5)],'message':_0x546a8e(0xd3),'default':!![]}]);if(!_0x107d45)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await addEnv(_0x546a8e(0x11f),{'url':_0x4a1d4f?.[_0x546a8e(0xcf)],'force':_0x4a1d4f?.['force']},_0x261e66),{'ready':!![],'skipped':![]};}catch(_0x15461e){return console[_0x546a8e(0xe4)](_0x404e43[_0x546a8e(0xf1)],_0x15461e instanceof Error?_0x15461e[_0x546a8e(0xff)]:_0x15461e),_0x404e43[_0x546a8e(0xfb)](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x19d586,_0x30e6a2,_0x466205){const _0x506b8a=_0x21b21b,_0x516710={'YhNeM':'git_check','OPoaM':'No\x20git\x20repository\x20found','xnzen':'No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','EoXIe':function(_0xa770d2){return _0xa770d2();},'YGooh':_0x506b8a(0xf4),'sLZRx':function(_0x4945a4,_0x4ed379){return _0x4945a4(_0x4ed379);},'ijwFa':_0x506b8a(0x118),'EjGnl':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','tWGbc':function(_0x363ff7,_0x27feb5){return _0x363ff7(_0x27feb5);},'CmEIw':'plugin','WcKpd':_0x506b8a(0xe0),'hLpvz':function(_0x1b23da,_0x3d2a18,_0x1c300c){return _0x1b23da(_0x3d2a18,_0x1c300c);},'yrNnv':_0x506b8a(0x119),'sqROH':function(_0x2a4eaa,_0x181783){return _0x2a4eaa instanceof _0x181783;},'zIzzr':function(_0x2e06a4,_0x308b52){return _0x2e06a4(_0x308b52);},'NtZJn':_0x506b8a(0x106),'zwczy':'verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','OHdWB':function(_0x52c2c1,_0x561052){return _0x52c2c1(_0x561052);},'PKdsv':'/ranger:enable'};console[_0x506b8a(0xef)](_0x506b8a(0x10f));const _0x2afcdf=process['stdin']['isTTY']&&process[_0x506b8a(0xcc)][_0x506b8a(0x123)];!_0x2afcdf&&!_0x30e6a2?.['scope']&&(console[_0x506b8a(0xef)](_0x506b8a(0x121)),_0x30e6a2={..._0x30e6a2,'scope':_0x506b8a(0xea)});_0x466205?.['trackPhaseStart']('git_check');if(!findGitRoot()){await _0x466205?.['trackPhaseError'](_0x516710['YhNeM'],new Error(_0x516710[_0x506b8a(0xfe)]));throw new Error(_0x516710[_0x506b8a(0xce)]);}_0x466205?.['trackPhaseEnd']('git_check');const _0x2f4fec=!existsSync(_0x516710['EoXIe'](getRangerDir)),{path:_0x18ee83}=await _0x516710['EoXIe'](ensureRangerDir);_0x466205?.[_0x506b8a(0x112)](_0x516710[_0x506b8a(0x131)]);const _0x51c0a2=await _0x516710['sLZRx'](authenticate,_0x19d586);_0x466205?.['trackPhaseEnd'](_0x516710[_0x506b8a(0x131)],{'isFirstRun':_0x2f4fec,'method':_0x51c0a2[_0x506b8a(0xe1)]}),_0x466205?.[_0x506b8a(0x112)](_0x516710['ijwFa']);_0x30e6a2?.['skipChromium']?console[_0x506b8a(0xef)](_0x516710[_0x506b8a(0xf0)]):await ensureChromium();_0x466205?.[_0x506b8a(0xcb)](_0x516710['ijwFa'],{'isFirstRun':_0x2f4fec,'skipped':!!_0x30e6a2?.[_0x506b8a(0x124)]}),await _0x516710[_0x506b8a(0x12a)](writeRangerGitignore,_0x18ee83),console[_0x506b8a(0xef)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x30c008=_0x30e6a2?.[_0x506b8a(0x105)],_0x1c4b3f=_0x30e6a2?.[_0x506b8a(0xed)]??![];let _0x1adeaa=null;_0x1c4b3f?(_0x466205?.['trackPhaseStart']('plugin'),_0x1adeaa=await ensureOpencodePluginConfig(_0x30c008),_0x466205?.['trackPhaseEnd'](_0x516710['CmEIw'],{'isFirstRun':_0x2f4fec,'opencode':!![]})):(_0x466205?.[_0x506b8a(0x112)](_0x516710[_0x506b8a(0x100)]),await ensureClaudePlugin(_0x30c008),_0x466205?.[_0x506b8a(0xcb)](_0x506b8a(0xe7),{'isFirstRun':_0x2f4fec}));if(_0x1c4b3f&&_0x1adeaa){_0x466205?.['trackPhaseStart'](_0x516710['WcKpd']);try{await _0x516710['hLpvz'](installSkill,'ranger',{'level':_0x1adeaa[_0x506b8a(0x105)],'cliVersion':getCurrentVersion(),'platform':'opencode'}),_0x466205?.[_0x506b8a(0xcb)](_0x506b8a(0xe0),{'isFirstRun':_0x2f4fec,'opencode':!![]});}catch(_0x426984){console['warn'](_0x516710['yrNnv'],_0x516710['sqROH'](_0x426984,Error)?_0x426984[_0x506b8a(0xff)]:_0x426984),_0x466205?.['trackPhaseEnd'](_0x516710[_0x506b8a(0x11b)],{'isFirstRun':_0x2f4fec,'opencode':!![],'failed':!![]});}}else _0x466205?.['trackPhaseStart'](_0x516710['WcKpd']),await ensureClaudeSkills(_0x30c008),_0x466205?.[_0x506b8a(0xcb)]('skills',{'isFirstRun':_0x2f4fec});if(!_0x2afcdf&&!_0x30e6a2?.[_0x506b8a(0xcf)])console['log'](_0x506b8a(0x125)),console[_0x506b8a(0xef)]('\x20\x20'+_0x516710['zIzzr'](bold,'ranger\x20profile\x20add\x20local')+'\x0a');else{_0x466205?.[_0x506b8a(0x112)](_0x516710[_0x506b8a(0xee)]);const _0x5cfb27=await ensureLocalEnv({'url':_0x30e6a2?.['url'],'force':_0x30e6a2?.['force']},_0x466205);_0x466205?.['trackPhaseEnd']('profile',{'isFirstRun':_0x2f4fec,'profileReady':_0x5cfb27[_0x506b8a(0x11c)],'userSkipped':_0x5cfb27['skipped']}),_0x5cfb27['ready']&&console['log']('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x1c4b3f)console[_0x506b8a(0xef)]('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console[_0x506b8a(0xef)](_0x506b8a(0x11e)),console[_0x506b8a(0xef)](_0x506b8a(0x102)),console['log'](_0x516710['zwczy']);else{const _0x27e960=_0x516710[_0x506b8a(0x12e)](bold,_0x516710['PKdsv']);console['log'](_0x506b8a(0xf3)+_0x27e960+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'+_0x506b8a(0x109));}}
@@ -1 +1 @@
1
- const _0x4e2ecf=_0x1aa3;(function(_0x3a5014,_0x3ce99e){const _0x350576=_0x1aa3,_0x2d0194=_0x3a5014();while(!![]){try{const _0x2e2322=parseInt(_0x350576(0xd2))/0x1+-parseInt(_0x350576(0x10e))/0x2*(-parseInt(_0x350576(0xfa))/0x3)+parseInt(_0x350576(0x117))/0x4+-parseInt(_0x350576(0xfb))/0x5*(-parseInt(_0x350576(0xcc))/0x6)+-parseInt(_0x350576(0x101))/0x7*(-parseInt(_0x350576(0xe3))/0x8)+-parseInt(_0x350576(0x109))/0x9+-parseInt(_0x350576(0xb9))/0xa*(parseInt(_0x350576(0xbe))/0xb);if(_0x2e2322===_0x3ce99e)break;else _0x2d0194['push'](_0x2d0194['shift']());}catch(_0x21a339){_0x2d0194['push'](_0x2d0194['shift']());}}}(_0x45ad,0x72fd5));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';function _0x1aa3(_0x2bba6c,_0x6cb708){_0x2bba6c=_0x2bba6c-0xaf;const _0x45ada0=_0x45ad();let _0x1aa30d=_0x45ada0[_0x2bba6c];return _0x1aa30d;}import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x4b26f3=>'\x1b[1m'+_0x4b26f3+_0x4e2ecf(0xf5),link=(_0xfea85d,_0x3b2887)=>'\x1b]8;;file://'+_0xfea85d+'\x07'+(_0x3b2887||_0xfea85d)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x4776bd=_0x4e2ecf,_0x40bf3b={'NbqAw':function(_0x1b6a81,_0xcbc62e){return _0x1b6a81(_0xcbc62e);},'JNYza':'not_configured','mRmFl':_0x4776bd(0xdc),'Opnyv':function(_0x57b74b,_0x1d8e32,_0x16e863,_0x3f7c9b){return _0x57b74b(_0x1d8e32,_0x16e863,_0x3f7c9b);},'vAtCO':'opencode','OLamI':'config','kzyta':_0x4776bd(0x10a),'YQFoH':_0x4776bd(0xc9)};return new Promise(_0x5e16d3=>{const _0x480ca3=_0x4776bd,_0x511604={'FMrhy':_0x40bf3b[_0x480ca3(0xd6)]},_0x328e0a=_0x40bf3b[_0x480ca3(0x115)](spawn,_0x40bf3b['vAtCO'],['debug',_0x40bf3b['OLamI']],{'stdio':[_0x480ca3(0xf7),'pipe','pipe']});let _0x5b5e1a='';_0x328e0a[_0x480ca3(0xd0)]?.['on']('data',_0x2a28b9=>{const _0x380640=_0x480ca3;_0x5b5e1a+=_0x2a28b9[_0x380640(0x10f)]();}),_0x328e0a[_0x480ca3(0x118)]?.['on'](_0x480ca3(0xcd),_0x328b35=>{const _0x3a76dd=_0x480ca3;_0x5b5e1a+=_0x328b35[_0x3a76dd(0x10f)]();}),_0x328e0a['on'](_0x40bf3b['kzyta'],()=>{_0x5e16d3({'status':_0x511604['FMrhy']});}),_0x328e0a['on'](_0x40bf3b['YQFoH'],_0x14220a=>{const _0x543dce=_0x480ca3,_0x1b4c88={'coMdu':_0x543dce(0x111)};if(_0x14220a!==0x0){_0x5e16d3({'status':_0x543dce(0xdc)});return;}const _0x52cb77=_0x5b5e1a['trim']();let _0x49e9d5=null;if(_0x52cb77)try{_0x49e9d5=JSON['parse'](_0x52cb77);}catch{const _0x4daf1e=_0x52cb77[_0x543dce(0xb4)](/\{[\s\S]*\}$/);if(_0x4daf1e)try{_0x49e9d5=JSON[_0x543dce(0xb0)](_0x4daf1e[0x0]);}catch{_0x49e9d5=null;}}const _0x179344=Array[_0x543dce(0xbc)](_0x49e9d5?.[_0x543dce(0xf3)])?_0x49e9d5?.['plugin']:[],_0x4f56fa=_0x179344['some'](_0x577ff8=>{const _0x3aaf64=_0x543dce;if(typeof _0x577ff8!=='string')return![];return _0x577ff8['includes']('@ranger-testing/opencode-plugin')||_0x577ff8['includes'](_0x1b4c88[_0x3aaf64(0x114)]);});if(_0x4f56fa){_0x40bf3b['NbqAw'](_0x5e16d3,{'status':_0x543dce(0xf2),'details':_0x179344['length']>0x0?_0x179344[_0x543dce(0x107)]+_0x543dce(0xfd):undefined});return;}if(_0x179344['length']>0x0){_0x40bf3b[_0x543dce(0xf0)](_0x5e16d3,{'status':_0x40bf3b[_0x543dce(0xeb)],'details':_0x179344['length']+_0x543dce(0xfd)});return;}_0x40bf3b[_0x543dce(0xf0)](_0x5e16d3,{'status':'not_configured'});});});}async function getSkillsFromDir(_0x24342d,_0x5483c6){const _0x188a55=_0x4e2ecf,_0x4c03d5={'uYeQO':function(_0x54ead9,_0x5cc9fb){return _0x54ead9(_0x5cc9fb);},'oKVsp':function(_0x283999,_0x359b75,_0x4c619f,_0x304580){return _0x283999(_0x359b75,_0x4c619f,_0x304580);},'CCnet':'SKILL.md','kveXJ':function(_0x26b14f,_0x455c2d,_0x276c9a){return _0x26b14f(_0x455c2d,_0x276c9a);}};if(!_0x4c03d5['uYeQO'](existsSync,_0x24342d))return[];const _0x4d0e14=[];try{const _0x1cd9ef=await readdir(_0x24342d,{'withFileTypes':!![]});for(const _0x371c7e of _0x1cd9ef){if(_0x371c7e[_0x188a55(0xb8)]()){const _0x21760b=_0x4c03d5[_0x188a55(0xb7)](join,_0x24342d,_0x371c7e[_0x188a55(0xdb)],_0x4c03d5[_0x188a55(0x102)]);if(existsSync(_0x21760b)){let _0x3d0196=_0x371c7e[_0x188a55(0xdb)];try{const _0x207ee4=await _0x4c03d5[_0x188a55(0xd3)](readFile,_0x21760b,'utf-8'),_0x5c93b5=_0x207ee4[_0x188a55(0xb4)](/name:\s*(.+)/);_0x5c93b5&&(_0x3d0196=_0x5c93b5[0x1]['trim']());}catch{}_0x4d0e14['push']({'name':_0x371c7e[_0x188a55(0xdb)],'displayName':_0x3d0196,'path':_0x21760b,'level':_0x5483c6});}}}}catch{return[];}return _0x4d0e14;}function _0x45ad(){const _0x392141=['uJtBH','project','encrypted','disabled','length','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','1121427WcuFFA','error','zoUoi','thEPF','details','1237526vVVapk','toString','\x20\x20Run:\x20ranger\x20update','opencode-plugin','rLEUe','No\x20profiles\x20configured','coMdu','Opnyv','\x20\x20\x20\x20Settings:\x20','432528fdBaUv','stderr','ocjTj','includes','parse','mNblU','ZAeuv','himZd','match','\x20(latest:\x20','CvqeE','oKVsp','isDirectory','16322270uSJsWx','cwd','user','isArray','path','11YcspBi','Version:\x20','ewlwA','ranger@trailhead','kWvbl','No\x20skills\x20installed','filter','OOCtg','Organization:\x20','\x0a\x20\x20No\x20active\x20profile\x20set','lyowf','close','log',':\x20configured','636SzjaHc','data','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','map','stdout','eaHjg','543350UvyCpC','kveXJ','isActive','status','mRmFl','\x0a---\x20Skills\x20---','\x20\x20\x20\x20Auth:\x20','kWELz','API\x20Environment:\x20','name','not_installed','CQBYl','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','settingsPath','\x20\x20Run:\x20ranger\x20skillup','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','vfExH','32YoTnYw','displayName','JnORv','\x20\x20Not\x20installed','hasPlaintextAuth','\x20\x20Run:\x20ranger\x20setup\x20--opencode','\x20\x20Not\x20configured','join','JNYza','\x20(up\x20to\x20date)','\x20\x20Run:\x20ranger\x20setup\x20[token]','(not\x20found)','DEBUG','NbqAw','lAGdE','configured','plugin','none','\x1b[0m','WmFTj','ignore','\x0a---\x20Profiles\x20---','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','3VYDieN','22585HvdwKe','gCTWb','\x20plugin(s)\x20configured','API\x20URL:\x20','not_configured','ogBdp','837865FXHszV','CCnet'];_0x45ad=function(){return _0x392141;};return _0x45ad();}async function getInstalledSkills(){const _0x49361e=_0x4e2ecf,_0x3148f2={'rLEUe':function(_0x438686,_0x2047ad,_0x2cee83){return _0x438686(_0x2047ad,_0x2cee83);},'CvqeE':_0x49361e(0x104),'rsXSN':function(_0x4a1706){return _0x4a1706();}},[_0x5288f6,_0x5117f3]=await Promise['all']([_0x3148f2[_0x49361e(0x112)](getSkillsFromDir,getProjectSkillsDir(),_0x3148f2[_0x49361e(0xb6)]),getSkillsFromDir(_0x3148f2['rsXSN'](getUserSkillsDir),_0x49361e(0xbb))]);return{'project':_0x5288f6,'user':_0x5117f3};}async function getEnvironments(){const _0x2e4b55=_0x4e2ecf,_0x2c305d={'wubSk':'settings.json','OTjya':function(_0x38e721,_0x5980ba){return _0x38e721(_0x5980ba);},'iJaiV':function(_0x267bb6,_0x4b751d){return _0x267bb6===_0x4b751d;}},{envNames:_0xc638ea,activeEnv:_0x3420db}=await getEnvNames(),_0x14ba61=getRangerDir();if(!existsSync(_0x14ba61))return{'envs':[],'activeEnv':null};const _0x59674e=_0xc638ea[_0x2e4b55(0xcf)](_0x50b9a9=>{const _0x4a53eb=_0x2e4b55,_0x39fce3=getEnvDir(_0x50b9a9),_0x43f517=join(_0x39fce3,_0x2c305d['wubSk']),_0x22a82f=join(_0x39fce3,'auth.json'),_0x1c6507=join(_0x39fce3,'auth.json.enc');return{'name':_0x50b9a9,'settingsPath':_0x2c305d['OTjya'](existsSync,_0x43f517)?_0x43f517:_0x4a53eb(0xee),'hasPlaintextAuth':existsSync(_0x22a82f),'hasEncryptedAuth':_0x2c305d['OTjya'](existsSync,_0x1c6507),'isActive':_0x2c305d['iJaiV'](_0x50b9a9,_0x3420db)};});return{'envs':_0x59674e,'activeEnv':_0x3420db};}export async function status(){const _0x51b418=_0x4e2ecf,_0x5bf406={'OOCtg':function(_0x1cae35,_0x468ddb){return _0x1cae35(_0x468ddb);},'JnORv':function(_0x14bb7b,_0x44b485,_0x2548ed){return _0x14bb7b(_0x44b485,_0x2548ed);},'ewlwA':function(_0x545b32,_0x46c53f){return _0x545b32(_0x46c53f);},'gCTWb':function(_0x160124){return _0x160124();},'thEPF':function(_0x1cab4a){return _0x1cab4a();},'KyJyd':function(_0xefe8fd){return _0xefe8fd();},'uBvDY':'\x0a---\x20OpenCode\x20Plugin\x20---','ZAeuv':_0x51b418(0xf2),'XoFpX':function(_0x1385fc,_0x4a1c33){return _0x1385fc===_0x4a1c33;},'zoUoi':_0x51b418(0xff),'lyowf':_0x51b418(0xe9),'jpwCZ':_0x51b418(0xde),'CQBYl':function(_0x5e01f4,_0x14302d){return _0x5e01f4(_0x14302d);},'eVWEu':'unknown','himZd':'enabled','Jgwul':_0x51b418(0xc1),'ZDpyA':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','ocjTj':_0x51b418(0xd7),'NqVPP':function(_0x107495,_0x2ce572){return _0x107495===_0x2ce572;},'kWELz':_0x51b418(0xc3),'lAGdE':function(_0xfaeee,_0x23866b){return _0xfaeee>_0x23866b;},'ogBdp':'\x20\x20User-level:','eaHjg':function(_0x3423f1,_0x1b2a95){return _0x3423f1(_0x1b2a95);},'mNblU':_0x51b418(0xf8),'kWvbl':function(_0xf3609c,_0x47d570){return _0xf3609c===_0x47d570;},'eFKfb':_0x51b418(0x113),'vfExH':'plaintext','NTOwd':function(_0x78b97d,_0xbbdd8c){return _0x78b97d!==_0xbbdd8c;},'WmFTj':'(not\x20found)','uJtBH':function(_0x3236fa,_0xa26c1b,_0x3c6bdf){return _0x3236fa(_0xa26c1b,_0x3c6bdf);},'nGoxV':function(_0x400d97,_0x18853a){return _0x400d97(_0x18853a);}};console['log']('\x0a📊\x20Ranger\x20Status\x0a');const _0x4de0f6=process[_0x51b418(0xba)](),_0x555174=getRangerDir();if(!_0x5bf406[_0x51b418(0xc5)](existsSync,_0x555174)){console[_0x51b418(0xca)]('Root:\x20'+_0x5bf406[_0x51b418(0xe5)](link,_0x4de0f6,_0x5bf406['ewlwA'](bold,_0x5bf406[_0x51b418(0xc0)](basename,_0x4de0f6)))),console[_0x51b418(0xca)](_0x51b418(0xf9)),console[_0x51b418(0xca)](_0x51b418(0xe1));return;}console[_0x51b418(0xca)]('Root:\x20'+link(_0x4de0f6,bold(_0x5bf406[_0x51b418(0xc5)](basename,_0x4de0f6))));const _0x53ba01=getCurrentVersion(),_0x8570b=_0x5bf406[_0x51b418(0xfc)](getLatestVersion);if(_0x8570b&&_0x8570b!==_0x53ba01)console['log'](_0x51b418(0xbf)+_0x53ba01+_0x51b418(0xb5)+_0x8570b+')'),console['log'](_0x51b418(0x110));else _0x8570b?console[_0x51b418(0xca)]('Version:\x20'+_0x53ba01+_0x51b418(0xec)):console['log'](_0x51b418(0xbf)+_0x53ba01);const _0x1f54df=await _0x5bf406['gCTWb'](getToken);if(_0x1f54df){const _0x172fce=await getCurrentUser(_0x1f54df);_0x172fce['success']?console[_0x51b418(0xca)](_0x51b418(0xc6)+bold(_0x172fce['user']['organizationName'])):(console[_0x51b418(0xca)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x51b418(0xca)](_0x51b418(0xed)));}else console[_0x51b418(0xca)]('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x51b418(0xed));process['env'][_0x51b418(0xef)]&&(console['log'](_0x51b418(0xda)+_0x5bf406[_0x51b418(0x10c)](getCurrentEnvironment)),console[_0x51b418(0xca)](_0x51b418(0xfe)+_0x5bf406['KyJyd'](getApiBaseUrl)));console[_0x51b418(0xca)](_0x5bf406['uBvDY']);const _0x45b565=await _0x5bf406['gCTWb'](getOpencodePluginStatus);if(_0x45b565[_0x51b418(0xd5)]===_0x5bf406[_0x51b418(0xb2)])console['log']('\x20\x20'+_0x5bf406[_0x51b418(0xc0)](bold,'@ranger-testing/opencode-plugin')+_0x51b418(0xcb)),_0x45b565[_0x51b418(0x10d)]&&console[_0x51b418(0xca)]('\x20\x20'+_0x45b565['details']);else _0x5bf406['XoFpX'](_0x45b565[_0x51b418(0xd5)],_0x5bf406[_0x51b418(0x10b)])?(console['log'](_0x5bf406[_0x51b418(0xc8)]),_0x45b565[_0x51b418(0x10d)]&&console[_0x51b418(0xca)]('\x20\x20'+_0x45b565['details']),console[_0x51b418(0xca)](_0x51b418(0xe8))):console[_0x51b418(0xca)](_0x5bf406['jpwCZ']);console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x2b4eb4=await _0x5bf406[_0x51b418(0xdd)](getPluginInfo,_0x51b418(0xc1));if(_0x2b4eb4){const _0x3fb43e=_0x2b4eb4['scope']||_0x5bf406['eVWEu'],_0x20de91=_0x2b4eb4['enabled']?_0x5bf406[_0x51b418(0xb3)]:_0x51b418(0x106);console['log']('\x20\x20'+_0x5bf406[_0x51b418(0xc5)](bold,_0x5bf406['Jgwul'])+':\x20installed\x20('+_0x3fb43e+',\x20'+_0x20de91+')');}else console['log'](_0x51b418(0xe6)),console['log'](_0x5bf406['ZDpyA']);console[_0x51b418(0xca)](_0x5bf406[_0x51b418(0x119)]);const {project:_0x6fa40f,user:_0x1f3287}=await getInstalledSkills(),_0xc3fd6b=_0x6fa40f['filter'](_0xab2062=>RANGER_MANAGED_SKILLS[_0x51b418(0xaf)](_0xab2062[_0x51b418(0xdb)])),_0x3ef988=_0x1f3287[_0x51b418(0xc4)](_0x4126c5=>RANGER_MANAGED_SKILLS['includes'](_0x4126c5['name'])),_0x2c3629=_0xc3fd6b[_0x51b418(0x107)]+_0x3ef988[_0x51b418(0x107)];if(_0x5bf406['NqVPP'](_0x2c3629,0x0))console['log'](_0x5bf406[_0x51b418(0xd9)]),console['log'](_0x51b418(0xe0));else{if(_0xc3fd6b['length']>0x0){console[_0x51b418(0xca)]('\x20\x20Project-level:');for(const _0x1d1d18 of _0xc3fd6b){console[_0x51b418(0xca)]('\x20\x20\x20\x20'+bold(_0x1d1d18[_0x51b418(0xe4)])+':\x20'+_0x5bf406[_0x51b418(0xe5)](link,_0x1d1d18[_0x51b418(0xbd)],basename(_0x1d1d18[_0x51b418(0xbd)])));}}if(_0x5bf406[_0x51b418(0xf1)](_0x3ef988[_0x51b418(0x107)],0x0)){console['log'](_0x5bf406[_0x51b418(0x100)]);for(const _0x3c9c6c of _0x3ef988){console['log']('\x20\x20\x20\x20'+bold(_0x3c9c6c[_0x51b418(0xe4)])+':\x20'+link(_0x3c9c6c[_0x51b418(0xbd)],_0x5bf406[_0x51b418(0xd1)](basename,_0x3c9c6c['path'])));}}}console['log'](_0x5bf406[_0x51b418(0xb1)]);const {envs:_0x324388,activeEnv:_0x42628c}=await _0x5bf406[_0x51b418(0x10c)](getEnvironments);if(_0x5bf406[_0x51b418(0xc2)](_0x324388['length'],0x0))console['log'](_0x5bf406['eFKfb']),console[_0x51b418(0xca)](_0x51b418(0xce));else{for(const _0x174721 of _0x324388){const _0x5861df=_0x174721[_0x51b418(0xd4)]?'\x20(active)':'',_0x299bda=_0x174721['hasEncryptedAuth']?_0x51b418(0x105):_0x174721[_0x51b418(0xe7)]?_0x5bf406[_0x51b418(0xe2)]:_0x51b418(0xf4);console['log']('\x20\x20'+bold(_0x174721['name'])+_0x5861df),console['log'](_0x51b418(0xd8)+_0x299bda),_0x5bf406['NTOwd'](_0x174721[_0x51b418(0xdf)],_0x5bf406[_0x51b418(0xf6)])&&console['log'](_0x51b418(0x116)+_0x5bf406[_0x51b418(0x103)](link,_0x174721[_0x51b418(0xdf)],_0x5bf406['nGoxV'](basename,_0x174721['settingsPath'])));}!_0x42628c&&(console[_0x51b418(0xca)](_0x51b418(0xc7)),console['log'](_0x51b418(0x108)+_0x324388['map'](_0x1b99c8=>_0x1b99c8[_0x51b418(0xdb)])[_0x51b418(0xea)](',\x20')+')'));}console['log']('');}
1
+ function _0x1636(){const _0x5516dc=['GaYyP','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','85704DxjKCf','disabled','trim','OQCze','push','\x20\x20Run:\x20ranger\x20setup\x20--opencode','\x0a\x20\x20No\x20active\x20profile\x20set','encrypted','\x1b[1m','Root:\x20','31704gNwlQI','log','OByXZ','all','ranger@trailhead','pCzZZ','none','20VJwDbH','75jzNffJ','FZEmb','ziqll','API\x20URL:\x20','2515fkUaYn','iBoxC','pTPVP','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','Jfahl','3678OLFeDe','API\x20Environment:\x20','cQNtK','YCoMl','UbKTP','configured','settings.json','XKfzY','opencode','wIrLY','cwd','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','some','auth.json.enc','includes','join','pMrSr','No\x20profiles\x20configured','scope','GkCbX','2qurfet','\x0a---\x20Skills\x20---','version','success','details','map','pipe','path','name','parse','LeABX','data','@ranger-testing/opencode-plugin','kWvEo','not_installed','21230gjFCsq','vUGgh','hasPlaintextAuth','plugin','jMNnh','filter','rUGXY','98011vtsbnq','\x20\x20\x20\x20','987786tKoapR','ignore','\x20(up\x20to\x20date)','ryEzR','11258429KVlpMi','stderr','isArray','10749648sqgsez','utf-8','No\x20skills\x20installed','auth.json','pBCKF','pfuYQ','GUgTf','unknown','Organization:\x20','Version:\x20','hUicP',':\x20installed\x20(','settingsPath','error','\x20\x20Not\x20installed','BvZsB','toString','config','WjXdO','DQsNu','(not\x20found)','\x20\x20Run:\x20ranger\x20setup\x20[token]','match','uPIkz','displayName','length','not_configured'];_0x1636=function(){return _0x5516dc;};return _0x1636();}function _0x3c2b(_0x196bec,_0x540522){_0x196bec=_0x196bec-0x1ac;const _0x16364f=_0x1636();let _0x3c2b9c=_0x16364f[_0x196bec];return _0x3c2b9c;}const _0x2c2cf3=_0x3c2b;(function(_0x1aadde,_0x41804b){const _0x27874b=_0x3c2b,_0x396ba1=_0x1aadde();while(!![]){try{const _0xaf2e95=-parseInt(_0x27874b(0x203))/0x1*(parseInt(_0x27874b(0x1ed))/0x2)+-parseInt(_0x27874b(0x1d0))/0x3*(parseInt(_0x27874b(0x1be))/0x4)+parseInt(_0x27874b(0x1d4))/0x5*(-parseInt(_0x27874b(0x1d9))/0x6)+-parseInt(_0x27874b(0x209))/0x7+-parseInt(_0x27874b(0x20c))/0x8+-parseInt(_0x27874b(0x205))/0x9*(parseInt(_0x27874b(0x1cf))/0xa)+parseInt(_0x27874b(0x1fc))/0xb*(parseInt(_0x27874b(0x1c8))/0xc);if(_0xaf2e95===_0x41804b)break;else _0x396ba1['push'](_0x396ba1['shift']());}catch(_0x37a7f2){_0x396ba1['push'](_0x396ba1['shift']());}}}(_0x1636,0xf099b));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x268fd1=>_0x2c2cf3(0x1c6)+_0x268fd1+'\x1b[0m',link=(_0x43bb2b,_0x10c6b7)=>'\x1b]8;;file://'+_0x43bb2b+'\x07'+(_0x10c6b7||_0x43bb2b)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x3b3e63=_0x2c2cf3,_0x392d15={'pCzZZ':function(_0x2cbc5a,_0x48eb3b){return _0x2cbc5a(_0x48eb3b);},'pfcyO':_0x3b3e63(0x1fb),'EJrJq':'configured','ahDvC':function(_0x9acc0f,_0x383e90){return _0x9acc0f>_0x383e90;},'liMto':function(_0x36e719,_0x18149c){return _0x36e719(_0x18149c);},'pfuYQ':'debug','OQCze':_0x3b3e63(0x206),'rUGXY':_0x3b3e63(0x1f3),'GUgTf':'data','xdmRP':_0x3b3e63(0x1ae),'nybic':'close'};return new Promise(_0x1b34da=>{const _0x5a75e4=_0x3b3e63,_0x29c413={'GIGYd':function(_0x27fd96,_0x3d37cd){const _0x515fbf=_0x3c2b;return _0x392d15[_0x515fbf(0x1cd)](_0x27fd96,_0x3d37cd);},'afPMd':'not_installed','cQNtK':_0x392d15['EJrJq'],'avnps':function(_0x563f80,_0x5f2bcb){return _0x392d15['ahDvC'](_0x563f80,_0x5f2bcb);},'UbKTP':function(_0x177784,_0x19e766){const _0x3ebf4c=_0x3c2b;return _0x392d15[_0x3ebf4c(0x1cd)](_0x177784,_0x19e766);},'Jfahl':'not_configured','HwKqT':function(_0x3d6b79,_0x394dff){return _0x392d15['liMto'](_0x3d6b79,_0x394dff);}},_0x13019b=spawn(_0x5a75e4(0x1e1),[_0x392d15[_0x5a75e4(0x211)],_0x5a75e4(0x1b2)],{'stdio':[_0x392d15[_0x5a75e4(0x1c1)],'pipe',_0x392d15[_0x5a75e4(0x202)]]});let _0x5118af='';_0x13019b['stdout']?.['on'](_0x5a75e4(0x1f8),_0x5d2c20=>{const _0x1f0347=_0x5a75e4;_0x5118af+=_0x5d2c20[_0x1f0347(0x1b1)]();}),_0x13019b[_0x5a75e4(0x20a)]?.['on'](_0x392d15[_0x5a75e4(0x212)],_0x3d5eb7=>{_0x5118af+=_0x3d5eb7['toString']();}),_0x13019b['on'](_0x392d15['xdmRP'],()=>{const _0x5376d2=_0x5a75e4;_0x392d15[_0x5376d2(0x1cd)](_0x1b34da,{'status':_0x392d15['pfcyO']});}),_0x13019b['on'](_0x392d15['nybic'],_0x57a0f5=>{const _0x485a34=_0x5a75e4;if(_0x57a0f5!==0x0){_0x29c413['GIGYd'](_0x1b34da,{'status':_0x29c413['afPMd']});return;}const _0x163b68=_0x5118af[_0x485a34(0x1c0)]();let _0x4de0ae=null;if(_0x163b68)try{_0x4de0ae=JSON[_0x485a34(0x1f6)](_0x163b68);}catch{const _0x4a2bc4=_0x163b68[_0x485a34(0x1b7)](/\{[\s\S]*\}$/);if(_0x4a2bc4)try{_0x4de0ae=JSON['parse'](_0x4a2bc4[0x0]);}catch{_0x4de0ae=null;}}const _0x105f3f=Array[_0x485a34(0x20b)](_0x4de0ae?.['plugin'])?_0x4de0ae?.[_0x485a34(0x1ff)]:[],_0x568665=_0x105f3f[_0x485a34(0x1e5)](_0x17b624=>{const _0x419f7d=_0x485a34;if(typeof _0x17b624!=='string')return![];return _0x17b624['includes'](_0x419f7d(0x1f9))||_0x17b624['includes']('opencode-plugin');});if(_0x568665){_0x29c413['GIGYd'](_0x1b34da,{'status':_0x29c413[_0x485a34(0x1db)],'details':_0x29c413['avnps'](_0x105f3f[_0x485a34(0x1ba)],0x0)?_0x105f3f['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x105f3f['length']>0x0){_0x29c413[_0x485a34(0x1dd)](_0x1b34da,{'status':_0x29c413[_0x485a34(0x1d8)],'details':_0x105f3f[_0x485a34(0x1ba)]+'\x20plugin(s)\x20configured'});return;}_0x29c413['HwKqT'](_0x1b34da,{'status':'not_configured'});});});}async function getSkillsFromDir(_0x5e1a08,_0x2d4045){const _0x8517a6=_0x2c2cf3,_0xcf3ab9={'GaYyP':function(_0x307a53,_0x46ba65){return _0x307a53(_0x46ba65);}};if(!_0xcf3ab9[_0x8517a6(0x1bc)](existsSync,_0x5e1a08))return[];const _0x231bbc=[];try{const _0xcf7cc6=await readdir(_0x5e1a08,{'withFileTypes':!![]});for(const _0x555256 of _0xcf7cc6){if(_0x555256['isDirectory']()){const _0x38da3c=join(_0x5e1a08,_0x555256[_0x8517a6(0x1f5)],'SKILL.md');if(_0xcf3ab9[_0x8517a6(0x1bc)](existsSync,_0x38da3c)){let _0x24797d=_0x555256[_0x8517a6(0x1f5)];try{const _0x735fa1=await readFile(_0x38da3c,_0x8517a6(0x20d)),_0x54265b=_0x735fa1[_0x8517a6(0x1b7)](/name:\s*(.+)/);_0x54265b&&(_0x24797d=_0x54265b[0x1]['trim']());}catch{}_0x231bbc[_0x8517a6(0x1c2)]({'name':_0x555256[_0x8517a6(0x1f5)],'displayName':_0x24797d,'path':_0x38da3c,'level':_0x2d4045});}}}}catch{return[];}return _0x231bbc;}async function getInstalledSkills(){const _0x5301f0=_0x2c2cf3,[_0x54b8d8,_0x5f2564]=await Promise[_0x5301f0(0x1cb)]([getSkillsFromDir(getProjectSkillsDir(),'project'),getSkillsFromDir(getUserSkillsDir(),'user')]);return{'project':_0x54b8d8,'user':_0x5f2564};}async function getEnvironments(){const _0x270d78=_0x2c2cf3,_0x535e18={'lusHe':function(_0x1fcf99,_0x162f01){return _0x1fcf99(_0x162f01);},'kWvEo':function(_0x110602,_0x1c9a68,_0x195692){return _0x110602(_0x1c9a68,_0x195692);},'ezriA':_0x270d78(0x20f),'pBCKF':_0x270d78(0x1e6),'FZEmb':_0x270d78(0x1b5),'AcBvs':function(_0x4c3aa1,_0x3c6e85){return _0x4c3aa1(_0x3c6e85);},'hUicP':function(_0x204a8b,_0x4f7e4a){return _0x204a8b(_0x4f7e4a);},'wIrLY':function(_0x5b862d,_0x2b8139){return _0x5b862d===_0x2b8139;},'WjXdO':function(_0x1b75ed){return _0x1b75ed();}},{envNames:_0x4343b9,activeEnv:_0x2b31e2}=await _0x535e18[_0x270d78(0x1b3)](getEnvNames),_0x57e5e1=_0x535e18['WjXdO'](getRangerDir);if(!existsSync(_0x57e5e1))return{'envs':[],'activeEnv':null};const _0x236016=_0x4343b9['map'](_0x2450b8=>{const _0x42508d=_0x270d78,_0x435d8a=_0x535e18['lusHe'](getEnvDir,_0x2450b8),_0x35b70d=_0x535e18[_0x42508d(0x1fa)](join,_0x435d8a,_0x42508d(0x1df)),_0x1ac07d=join(_0x435d8a,_0x535e18['ezriA']),_0x3c961e=_0x535e18[_0x42508d(0x1fa)](join,_0x435d8a,_0x535e18[_0x42508d(0x210)]);return{'name':_0x2450b8,'settingsPath':existsSync(_0x35b70d)?_0x35b70d:_0x535e18[_0x42508d(0x1d1)],'hasPlaintextAuth':_0x535e18['AcBvs'](existsSync,_0x1ac07d),'hasEncryptedAuth':_0x535e18[_0x42508d(0x216)](existsSync,_0x3c961e),'isActive':_0x535e18[_0x42508d(0x1e2)](_0x2450b8,_0x2b31e2)};});return{'envs':_0x236016,'activeEnv':_0x2b31e2};}export async function status(){const _0x14c0f0=_0x2c2cf3,_0x5bd85e={'uPIkz':'\x0a📊\x20Ranger\x20Status\x0a','AQDbn':function(_0xab9192){return _0xab9192();},'DQsNu':function(_0x56c3e1,_0xb47e1f){return _0x56c3e1(_0xb47e1f);},'iBoxC':function(_0x15271b,_0x459873){return _0x15271b(_0x459873);},'BvZsB':function(_0x30707e,_0x6e38c4){return _0x30707e!==_0x6e38c4;},'LeABX':'\x0a---\x20OpenCode\x20Plugin\x20---','GkCbX':_0x14c0f0(0x1de),'ncncT':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','ZGzin':_0x14c0f0(0x1cc),'YCoMl':'enabled','RqZoF':_0x14c0f0(0x1bf),'OByXZ':function(_0x27b7c8,_0x1f5d35){return _0x27b7c8(_0x1f5d35);},'ziqll':_0x14c0f0(0x1af),'ZIQek':_0x14c0f0(0x1ee),'ryEzR':function(_0x303e3b,_0x2e3df4){return _0x303e3b===_0x2e3df4;},'KLqoe':_0x14c0f0(0x20e),'pTPVP':function(_0x5b861d,_0x593d43){return _0x5b861d>_0x593d43;},'pMrSr':function(_0x2df88e,_0x9531a8,_0x202790){return _0x2df88e(_0x9531a8,_0x202790);},'XKfzY':function(_0x395545,_0x1fe5f7){return _0x395545(_0x1fe5f7);},'ASCUV':function(_0x2927c8,_0x482843,_0x1a34a8){return _0x2927c8(_0x482843,_0x1a34a8);},'jMNnh':function(_0xc61192){return _0xc61192();},'LBenO':_0x14c0f0(0x1ea),'uiEJI':'\x20(active)','vUGgh':'plaintext','SmJxM':_0x14c0f0(0x1b5)};console['log'](_0x5bd85e[_0x14c0f0(0x1b8)]);const _0x2811f7=process[_0x14c0f0(0x1e3)](),_0x39fd66=_0x5bd85e['AQDbn'](getRangerDir);if(!_0x5bd85e[_0x14c0f0(0x1b4)](existsSync,_0x39fd66)){console['log'](_0x14c0f0(0x1c7)+link(_0x2811f7,bold(_0x5bd85e[_0x14c0f0(0x1d5)](basename,_0x2811f7)))),console[_0x14c0f0(0x1c9)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x14c0f0(0x1c9)]('Root:\x20'+link(_0x2811f7,_0x5bd85e['iBoxC'](bold,basename(_0x2811f7))));const _0x3984e4=getCurrentVersion(),_0x1de7cf=getLatestVersion();if(_0x1de7cf[_0x14c0f0(0x1ef)]&&_0x5bd85e[_0x14c0f0(0x1b0)](_0x1de7cf[_0x14c0f0(0x1ef)],_0x3984e4))console[_0x14c0f0(0x1c9)](_0x14c0f0(0x215)+_0x3984e4+'\x20(latest:\x20'+_0x1de7cf['version']+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x1de7cf['version']?console['log']('Version:\x20'+_0x3984e4+_0x14c0f0(0x207)):console[_0x14c0f0(0x1c9)](_0x14c0f0(0x215)+_0x3984e4);const _0x4d9180=await getToken();if(_0x4d9180){const _0x20e1f0=await getCurrentUser(_0x4d9180);_0x20e1f0[_0x14c0f0(0x1f0)]?console[_0x14c0f0(0x1c9)](_0x14c0f0(0x214)+_0x5bd85e['DQsNu'](bold,_0x20e1f0['user']['organizationName'])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log'](_0x14c0f0(0x1b6)));}else console[_0x14c0f0(0x1c9)]('API\x20Token:\x20✗\x20Not\x20found'),console[_0x14c0f0(0x1c9)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env']['DEBUG']&&(console[_0x14c0f0(0x1c9)](_0x14c0f0(0x1da)+getCurrentEnvironment()),console[_0x14c0f0(0x1c9)](_0x14c0f0(0x1d3)+_0x5bd85e['AQDbn'](getApiBaseUrl)));console[_0x14c0f0(0x1c9)](_0x5bd85e[_0x14c0f0(0x1f7)]);const _0x5120a8=await getOpencodePluginStatus();if(_0x5120a8['status']===_0x5bd85e[_0x14c0f0(0x1ec)])console[_0x14c0f0(0x1c9)]('\x20\x20'+bold('@ranger-testing/opencode-plugin')+':\x20configured'),_0x5120a8[_0x14c0f0(0x1f1)]&&console[_0x14c0f0(0x1c9)]('\x20\x20'+_0x5120a8[_0x14c0f0(0x1f1)]);else _0x5120a8['status']===_0x14c0f0(0x1bb)?(console['log']('\x20\x20Not\x20configured'),_0x5120a8[_0x14c0f0(0x1f1)]&&console[_0x14c0f0(0x1c9)]('\x20\x20'+_0x5120a8['details']),console['log'](_0x14c0f0(0x1c3))):console['log'](_0x5bd85e['ncncT']);console[_0x14c0f0(0x1c9)]('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x580dd4=await _0x5bd85e['iBoxC'](getPluginInfo,_0x5bd85e['ZGzin']);if(_0x580dd4){const _0x48f730=_0x580dd4[_0x14c0f0(0x1eb)]||_0x14c0f0(0x213),_0x56a56c=_0x580dd4['enabled']?_0x5bd85e[_0x14c0f0(0x1dc)]:_0x5bd85e['RqZoF'];console['log']('\x20\x20'+_0x5bd85e[_0x14c0f0(0x1ca)](bold,_0x5bd85e['ZGzin'])+_0x14c0f0(0x1ac)+_0x48f730+',\x20'+_0x56a56c+')');}else console['log'](_0x5bd85e[_0x14c0f0(0x1d2)]),console['log'](_0x14c0f0(0x1d7));console['log'](_0x5bd85e['ZIQek']);const {project:_0x41e6b3,user:_0x5083a4}=await getInstalledSkills(),_0x3c7c12=_0x41e6b3[_0x14c0f0(0x201)](_0x2f2b58=>RANGER_MANAGED_SKILLS[_0x14c0f0(0x1e7)](_0x2f2b58[_0x14c0f0(0x1f5)])),_0xe416dd=_0x5083a4[_0x14c0f0(0x201)](_0x19f707=>RANGER_MANAGED_SKILLS[_0x14c0f0(0x1e7)](_0x19f707['name'])),_0x31b15c=_0x3c7c12['length']+_0xe416dd[_0x14c0f0(0x1ba)];if(_0x5bd85e[_0x14c0f0(0x208)](_0x31b15c,0x0))console[_0x14c0f0(0x1c9)](_0x5bd85e['KLqoe']),console[_0x14c0f0(0x1c9)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x5bd85e[_0x14c0f0(0x1d6)](_0x3c7c12[_0x14c0f0(0x1ba)],0x0)){console['log']('\x20\x20Project-level:');for(const _0x490ec9 of _0x3c7c12){console['log']('\x20\x20\x20\x20'+bold(_0x490ec9[_0x14c0f0(0x1b9)])+':\x20'+_0x5bd85e[_0x14c0f0(0x1e9)](link,_0x490ec9[_0x14c0f0(0x1f4)],_0x5bd85e['DQsNu'](basename,_0x490ec9['path'])));}}if(_0x5bd85e[_0x14c0f0(0x1d6)](_0xe416dd['length'],0x0)){console['log']('\x20\x20User-level:');for(const _0x182c9c of _0xe416dd){console[_0x14c0f0(0x1c9)](_0x14c0f0(0x204)+_0x5bd85e['XKfzY'](bold,_0x182c9c['displayName'])+':\x20'+_0x5bd85e['ASCUV'](link,_0x182c9c['path'],_0x5bd85e[_0x14c0f0(0x1e0)](basename,_0x182c9c[_0x14c0f0(0x1f4)])));}}}console[_0x14c0f0(0x1c9)]('\x0a---\x20Profiles\x20---');const {envs:_0x37a885,activeEnv:_0x4f88bf}=await _0x5bd85e[_0x14c0f0(0x200)](getEnvironments);if(_0x37a885[_0x14c0f0(0x1ba)]===0x0)console[_0x14c0f0(0x1c9)](_0x5bd85e['LBenO']),console[_0x14c0f0(0x1c9)](_0x14c0f0(0x1bd));else{for(const _0x177fb0 of _0x37a885){const _0x5bba33=_0x177fb0['isActive']?_0x5bd85e['uiEJI']:'',_0x15d1ac=_0x177fb0['hasEncryptedAuth']?_0x14c0f0(0x1c5):_0x177fb0[_0x14c0f0(0x1fe)]?_0x5bd85e[_0x14c0f0(0x1fd)]:_0x14c0f0(0x1ce);console['log']('\x20\x20'+_0x5bd85e['DQsNu'](bold,_0x177fb0[_0x14c0f0(0x1f5)])+_0x5bba33),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x15d1ac),_0x5bd85e['BvZsB'](_0x177fb0['settingsPath'],_0x5bd85e['SmJxM'])&&console['log']('\x20\x20\x20\x20Settings:\x20'+link(_0x177fb0[_0x14c0f0(0x1ad)],basename(_0x177fb0['settingsPath'])));}!_0x4f88bf&&(console[_0x14c0f0(0x1c9)](_0x14c0f0(0x1c4)),console['log'](_0x14c0f0(0x1e4)+_0x37a885[_0x14c0f0(0x1f2)](_0x3e7a66=>_0x3e7a66[_0x14c0f0(0x1f5)])[_0x14c0f0(0x1e8)](',\x20')+')'));}console['log']('');}
@@ -1 +1 @@
1
- (function(_0x5c441b,_0x3f8354){const _0x1885c8=_0xa647,_0xa3c949=_0x5c441b();while(!![]){try{const _0x4119c5=parseInt(_0x1885c8(0x16e))/0x1+parseInt(_0x1885c8(0x14e))/0x2+-parseInt(_0x1885c8(0x13d))/0x3*(parseInt(_0x1885c8(0x13c))/0x4)+-parseInt(_0x1885c8(0x161))/0x5+parseInt(_0x1885c8(0x155))/0x6*(-parseInt(_0x1885c8(0x151))/0x7)+parseInt(_0x1885c8(0x140))/0x8+-parseInt(_0x1885c8(0x165))/0x9;if(_0x4119c5===_0x3f8354)break;else _0xa3c949['push'](_0xa3c949['shift']());}catch(_0x4db9ff){_0xa3c949['push'](_0xa3c949['shift']());}}}(_0x2c12,0x3caa7));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';function _0xa647(_0x8da85,_0xbe5b8b){_0x8da85=_0x8da85-0x134;const _0x2c12b9=_0x2c12();let _0xa64760=_0x2c12b9[_0x8da85];return _0xa64760;}import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x8aa724=_0xa647,_0x10c683={'cDJRJ':_0x8aa724(0x13a),'vWPtd':'close'};return new Promise(_0x5ec068=>{const _0xbe8dd8=_0x8aa724;console['log'](_0xbe8dd8(0x15d)+PACKAGE_NAME+'@latest...\x0a');const _0x4526e0=spawn(_0xbe8dd8(0x166),[_0xbe8dd8(0x141),'-g',PACKAGE_NAME+'@latest'],{'stdio':_0x10c683['cDJRJ'],'shell':process['platform']===_0xbe8dd8(0x142)});_0x4526e0['on'](_0x10c683['vWPtd'],_0x43b49e=>{_0x5ec068(_0x43b49e===0x0);}),_0x4526e0['on'](_0xbe8dd8(0x136),()=>{_0x5ec068(![]);});});}async function updateClaudeMarketplace(){const _0x36fe38=_0xa647,_0x58d28d={'roXZe':function(_0x46e490,_0x1ad70c){return _0x46e490(_0x1ad70c);},'EEsdY':function(_0x341c94,_0x2bbddf){return _0x341c94(_0x2bbddf);},'qVtAF':function(_0x44a9da,_0x24e56b){return _0x44a9da===_0x24e56b;},'UdDlc':'claude','hZmxn':_0x36fe38(0x139),'UaqLv':function(_0x221e76,_0x3a9864){return _0x221e76===_0x3a9864;},'dLuSJ':_0x36fe38(0x142),'zNcNd':'close','KOLTl':_0x36fe38(0x136)};return new Promise(_0x34de7a=>{const _0x20acbe=_0x36fe38,_0x614c04={'HDvuO':function(_0x1ab50e,_0x32f642){return _0x58d28d['EEsdY'](_0x1ab50e,_0x32f642);},'OHdcI':function(_0xc11e75,_0x47a390){const _0x49ba3d=_0xa647;return _0x58d28d[_0x49ba3d(0x16a)](_0xc11e75,_0x47a390);}},_0x35e33a=spawn(_0x58d28d[_0x20acbe(0x15c)],['plugin',_0x58d28d['hZmxn'],_0x20acbe(0x16d),_0x20acbe(0x154)],{'stdio':_0x20acbe(0x148),'shell':_0x58d28d['UaqLv'](process['platform'],_0x58d28d[_0x20acbe(0x15a)])});_0x35e33a['on'](_0x58d28d[_0x20acbe(0x159)],_0x3d219c=>{const _0x435a7c=_0x20acbe;_0x614c04[_0x435a7c(0x14a)](_0x34de7a,_0x614c04['OHdcI'](_0x3d219c,0x0));}),_0x35e33a['on'](_0x58d28d[_0x20acbe(0x14c)],()=>{const _0x3cf8e8=_0x20acbe;_0x58d28d[_0x3cf8e8(0x14b)](_0x34de7a,![]);});});}async function updateClaudePlugin(_0x59fc70){const _0x48becc={'vxraQ':function(_0x4a8cc2,_0xfeacfb){return _0x4a8cc2(_0xfeacfb);},'hZcEN':'--scope','GSbpp':function(_0x19e5e9,_0x47ccd5){return _0x19e5e9===_0x47ccd5;},'WINEQ':'win32'};return new Promise(_0xcdafcd=>{const _0x397bc8=_0xa647,_0x19d1cd={'JFyXH':function(_0x290318,_0x33b523){return _0x290318(_0x33b523);}},_0x238f7a=[_0x397bc8(0x158),'update','ranger@trailhead'];_0x59fc70&&_0x238f7a['push'](_0x48becc['hZcEN'],_0x59fc70);const _0x5bddf7=spawn('claude',_0x238f7a,{'stdio':'pipe','shell':_0x48becc[_0x397bc8(0x153)](process['platform'],_0x48becc[_0x397bc8(0x14d)])});_0x5bddf7['on']('close',_0x4da166=>{_0x19d1cd['JFyXH'](_0xcdafcd,_0x4da166===0x0);}),_0x5bddf7['on'](_0x397bc8(0x136),()=>{_0x48becc['vxraQ'](_0xcdafcd,![]);});});}function isSkillInstalled(_0x1a242e,_0x5f575f,_0x536273){const _0x3fe700=_0xa647,_0x276a97={'alNeB':function(_0x46f6ab,_0x105cf1){return _0x46f6ab===_0x105cf1;},'STohy':function(_0x30a23,_0x1a03ff){return _0x30a23(_0x1a03ff);}},_0x1c75d5=_0x276a97[_0x3fe700(0x156)](_0x536273,_0x3fe700(0x13e))?_0x276a97[_0x3fe700(0x137)](getOpencodeSkillsDir,_0x5f575f):_0x276a97['STohy'](getSkillsDir,_0x5f575f),_0x222f71=join(_0x1c75d5,_0x1a242e);return existsSync(_0x222f71);}async function reinstallSkills(_0xdd9e06){const _0x3f42a8=_0xa647,_0x544906={'uFYeL':'user','aqizE':function(_0x236fbe,_0x5ccd6e,_0x325ad7,_0x4e6e0b){return _0x236fbe(_0x5ccd6e,_0x325ad7,_0x4e6e0b);},'asqls':'claude','eqMeF':_0x3f42a8(0x16b),'qhRrF':function(_0x5795eb,_0x367298,_0x475365){return _0x5795eb(_0x367298,_0x475365);}},_0x17c0ae=['project',_0x544906[_0x3f42a8(0x145)]],_0x23a932=[];for(const _0x1dbddf of _0x17c0ae){for(const _0x19e4ed of RANGER_MANAGED_SKILLS){_0x544906['aqizE'](isSkillInstalled,_0x19e4ed,_0x1dbddf,_0x3f42a8(0x13b))&&_0x23a932['push']({'skillName':_0x19e4ed,'level':_0x1dbddf,'platform':_0x544906[_0x3f42a8(0x150)]}),isSkillInstalled(_0x19e4ed,_0x1dbddf,_0x3f42a8(0x13e))&&_0x23a932['push']({'skillName':_0x19e4ed,'level':_0x1dbddf,'platform':'opencode'});}}for(const _0x1559d4 of _0x17c0ae){for(const _0x18d17c of DEPRECATED_SKILLS){await removeSkill(_0x18d17c,_0x1559d4);}}if(_0x23a932[_0x3f42a8(0x15e)]===0x0){console[_0x3f42a8(0x149)](_0x544906[_0x3f42a8(0x13f)]);return;}console['log'](_0x3f42a8(0x152)+_0x23a932['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x45b047,level:_0x13f07d,platform:_0x5206ce}of _0x23a932){try{await _0x544906[_0x3f42a8(0x143)](installSkill,_0x45b047,{'level':_0x13f07d,'cliVersion':_0xdd9e06,'platform':_0x5206ce});}catch(_0x32bcae){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x5206ce+'\x20'+_0x13f07d+_0x3f42a8(0x16c)+_0x45b047+':',_0x32bcae);}}}function _0x2c12(){const _0x6e6efb=['roXZe','KOLTl','WINEQ','789954XvwHyO','Claude\x20plugin\x20updated\x20(project\x20scope).','asqls','604723QaoLjw','\x0aReinstalling\x20','GSbpp','trailhead','6Tzxfiv','alNeB','mHJTL','plugin','zNcNd','dLuSJ','IijtX','UdDlc','\x0aInstalling\x20','length','RJSnh','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','737380tZHuzd','active-profile.txt','endsWith','jPMaG','2373030QtBBGm','npm','uLKoS','TSfEY','Checking\x20for\x20updates...','qVtAF','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','\x20skill\x20','update','271916QJbEtT','trim','\x0a✅\x20Update\x20complete!','EuGRh','error','STohy','\x0aYour\x20version\x20(','marketplace','inherit','claude','4CkdLxj','884883YpkKSQ','opencode','eqMeF','2992720SoOucT','install','win32','qhRrF','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','uFYeL','splice','@latest','pipe','log','HDvuO'];_0x2c12=function(){return _0x6e6efb;};return _0x2c12();}async function ensureActiveProfileGitignored(){const _0x336193=_0xa647,_0x40a6d4={'TSfEY':function(_0x28efff,_0x274bed,_0x783232){return _0x28efff(_0x274bed,_0x783232);},'ktJfs':function(_0x1c6454){return _0x1c6454();},'jPMaG':'.gitignore','EuGRh':function(_0x1731b5,_0x224946){return _0x1731b5(_0x224946);},'kRxxo':function(_0x3973da,_0x13a236,_0x142a52){return _0x3973da(_0x13a236,_0x142a52);},'RJSnh':'utf-8'},_0x3037a3=_0x40a6d4[_0x336193(0x168)](join,_0x40a6d4['ktJfs'](getRangerDir),_0x40a6d4[_0x336193(0x164)]);if(!_0x40a6d4[_0x336193(0x135)](existsSync,_0x3037a3))return![];let _0x1a591a='';try{_0x1a591a=await _0x40a6d4['kRxxo'](readFile,_0x3037a3,_0x40a6d4['RJSnh']);}catch{return![];}const _0x594760=_0x1a591a['split'](/\r?\n/);if(_0x594760['some'](_0x14698c=>_0x14698c[_0x336193(0x16f)]()==='active-profile.txt'))return![];let _0x531b6d=_0x594760['findIndex'](_0x1e5959=>_0x1e5959['trim']()==='active-feature.txt');_0x531b6d===-0x1&&(_0x531b6d=_0x594760[_0x336193(0x15e)]);_0x594760[_0x336193(0x146)](_0x531b6d,0x0,_0x336193(0x162));let _0x266cbb=_0x594760['join']('\x0a');!_0x266cbb[_0x336193(0x163)]('\x0a')&&(_0x266cbb+='\x0a');try{await writeFile(_0x3037a3,_0x266cbb,_0x40a6d4[_0x336193(0x15f)]);}catch{return![];}return!![];}export async function update(){const _0x39640b=_0xa647,_0x4f0f07={'mHJTL':function(_0x2f6d3e){return _0x2f6d3e();},'IijtX':'Failed\x20to\x20check\x20for\x20updates.\x20Please\x20check\x20your\x20network\x20connection.','OiAbo':function(_0x2fdaad,_0x298aa6){return _0x2fdaad===_0x298aa6;},'TpdMg':function(_0x227284){return _0x227284();},'jDwBe':_0x39640b(0x154),'uLKoS':'\x0aClaude\x20marketplace\x20updated\x20(trailhead).','sNkkc':_0x39640b(0x144),'NvtmG':function(_0x403ec7,_0x562b7d){return _0x403ec7(_0x562b7d);},'zMqKG':_0x39640b(0x134)},_0x59aed8=_0x4f0f07[_0x39640b(0x157)](getCurrentVersion);console['log']('\x0aCurrent\x20version:\x20'+_0x59aed8),console[_0x39640b(0x149)](_0x39640b(0x169));const _0x3fb159=getLatestVersion();if(!_0x3fb159)throw new Error(_0x4f0f07[_0x39640b(0x15b)]);console['log']('Latest\x20version:\x20\x20'+_0x3fb159);const _0xfaf41=compareVersions(_0x59aed8,_0x3fb159);let _0x5e81cb=_0x59aed8;if(_0x4f0f07['OiAbo'](_0xfaf41,0x0))console['log'](_0x39640b(0x160));else{if(_0xfaf41<0x0)console[_0x39640b(0x149)](_0x39640b(0x138)+_0x59aed8+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x3fb159+').');else{const _0x47852e=await _0x4f0f07['TpdMg'](runInstall);if(_0x47852e)console[_0x39640b(0x149)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x3fb159),_0x5e81cb=_0x3fb159;else throw new Error('Update\x20failed.\x20You\x20may\x20need\x20to\x20run\x20with\x20sudo:\x20sudo\x20npm\x20install\x20-g\x20'+PACKAGE_NAME+_0x39640b(0x147));}}await reinstallSkills(_0x5e81cb);const _0x1e7ea9=await isMarketplaceAdded(_0x4f0f07['jDwBe']),_0x41537e=await isPluginInstalled('ranger@trailhead');if(_0x1e7ea9){const _0x2d9788=await updateClaudeMarketplace();_0x2d9788&&console[_0x39640b(0x149)](_0x4f0f07[_0x39640b(0x167)]);}if(_0x41537e){const _0x3ec996=await updateClaudePlugin();_0x3ec996&&console[_0x39640b(0x149)](_0x4f0f07['sNkkc']);const _0x23b064=await _0x4f0f07['NvtmG'](updateClaudePlugin,'project');_0x23b064&&console['log']((_0x3ec996?'':'\x0a')+_0x39640b(0x14f));}const _0x2cbea2=await migrateActiveProfileFile();_0x2cbea2&&console[_0x39640b(0x149)]('✓\x20Migrated\x20active\x20profile\x20file');const _0x36b583=await ensureActiveProfileGitignored();console['log'](_0x4f0f07['zMqKG']);}
1
+ (function(_0x419fb4,_0x86fce1){const _0x1592e9=_0x57a4,_0x614ab2=_0x419fb4();while(!![]){try{const _0x5e8e6c=parseInt(_0x1592e9(0x1f7))/0x1*(parseInt(_0x1592e9(0x218))/0x2)+-parseInt(_0x1592e9(0x21e))/0x3*(parseInt(_0x1592e9(0x1fa))/0x4)+-parseInt(_0x1592e9(0x1ea))/0x5+-parseInt(_0x1592e9(0x1fd))/0x6*(parseInt(_0x1592e9(0x1f0))/0x7)+-parseInt(_0x1592e9(0x20e))/0x8*(-parseInt(_0x1592e9(0x228))/0x9)+-parseInt(_0x1592e9(0x205))/0xa+-parseInt(_0x1592e9(0x20a))/0xb*(-parseInt(_0x1592e9(0x207))/0xc);if(_0x5e8e6c===_0x86fce1)break;else _0x614ab2['push'](_0x614ab2['shift']());}catch(_0x328b5a){_0x614ab2['push'](_0x614ab2['shift']());}}}(_0x50e4,0x4f4c0));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';function _0x57a4(_0xcb979b,_0x2ba2dd){_0xcb979b=_0xcb979b-0x1e7;const _0x50e445=_0x50e4();let _0x57a487=_0x50e445[_0xcb979b];return _0x57a487;}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';function _0x50e4(){const _0x3b6c74=['ranger@trailhead','wBDJA','70693tnRPUv','active-feature.txt','log','platform','\x0aSuccessfully\x20updated\x20to\x20version\x20','plugin','close','973VlovJO','bBeFH','\x20\x20Failed\x20to\x20reinstall\x20','1000ASfEex','trim','inherit','36XHbrqD','\x0aReinstalling\x20','\x20skill\x20','IRhZR','EvDXi','WwYZV','length','pEwOm','3948630MIHAgZ','claude','285732nuodhK','Latest\x20version:\x20\x20','push','220DXtYly','LPIBs','version','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','342488kRZFdY','JkYEn','pipe','project','HHmTs','Update\x20failed.','warn','hUPYn','.gitignore','opencode','1130TSTFLr','weuYU','baCVT','active-profile.txt',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','update','6378istzqR','nBHMd','NzWdj','@latest','join','trailhead','aXZnJ','\x0a✅\x20Update\x20complete!','IdktI','HLIPS','99BoFPJN','\x20ranger-managed\x20skill(s)...','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','utf-8','jILLN','vIhCK','DgMcT','SJQoJ','925645wFeVtn','Checking\x20for\x20updates...','Update\x20failed:\x20','npm'];_0x50e4=function(){return _0x3b6c74;};return _0x50e4();}import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x3b608b=_0x57a4,_0x46846e={'mjpce':_0x3b608b(0x1fc),'moNVt':'win32','unMJC':'error'};return new Promise(_0x341a6c=>{const _0x268273=_0x3b608b,_0x37b35c={'NzWdj':function(_0x2a30cb,_0xcfa476){return _0x2a30cb(_0xcfa476);}};console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x454e5a=spawn(_0x268273(0x1ed),['install','-g',PACKAGE_NAME+_0x268273(0x221)],{'stdio':_0x46846e['mjpce'],'shell':process['platform']===_0x46846e['moNVt']});_0x454e5a['on'](_0x268273(0x1f6),_0x99adc0=>{const _0x122cd1=_0x268273;_0x37b35c[_0x122cd1(0x220)](_0x341a6c,_0x99adc0===0x0);}),_0x454e5a['on'](_0x46846e['unMJC'],()=>{const _0x4f4c50=_0x268273;_0x37b35c[_0x4f4c50(0x220)](_0x341a6c,![]);});});}async function updateClaudeMarketplace(){const _0x5debe7=_0x57a4,_0x3958d4={'HBiCe':function(_0x31d306,_0x29b40a){return _0x31d306(_0x29b40a);},'bBeFH':function(_0x1fa563,_0x33c5f8,_0x2e4315,_0xf17725){return _0x1fa563(_0x33c5f8,_0x2e4315,_0xf17725);},'WwYZV':_0x5debe7(0x206),'CSoGA':'plugin','wBDJA':_0x5debe7(0x21d),'AOnrR':'pipe','tayLR':function(_0x5c7567,_0x5d021c){return _0x5c7567===_0x5d021c;},'jILLN':'win32','LPIBs':_0x5debe7(0x1f6)};return new Promise(_0x113057=>{const _0x3a6a47=_0x5debe7,_0x2a1e58=_0x3958d4[_0x3a6a47(0x1f8)](spawn,_0x3958d4[_0x3a6a47(0x202)],[_0x3958d4['CSoGA'],'marketplace',_0x3958d4[_0x3a6a47(0x1ef)],'trailhead'],{'stdio':_0x3958d4['AOnrR'],'shell':_0x3958d4['tayLR'](process['platform'],_0x3958d4[_0x3a6a47(0x22c)])});_0x2a1e58['on'](_0x3958d4[_0x3a6a47(0x20b)],_0x5558a4=>{_0x113057(_0x5558a4===0x0);}),_0x2a1e58['on']('error',()=>{_0x3958d4['HBiCe'](_0x113057,![]);});});}async function updateClaudePlugin(_0x285729){const _0x53c426=_0x57a4,_0x5a5314={'weuYU':function(_0x35d359,_0x37c209){return _0x35d359(_0x37c209);},'NuroR':function(_0x287a26,_0x469b19){return _0x287a26===_0x469b19;},'vIhCK':_0x53c426(0x1ee),'JypAq':'close'};return new Promise(_0x348068=>{const _0x2bfb37=_0x53c426,_0x49976f=[_0x2bfb37(0x1f5),_0x2bfb37(0x21d),_0x5a5314[_0x2bfb37(0x1e7)]];_0x285729&&_0x49976f['push']('--scope',_0x285729);const _0x493191=spawn(_0x2bfb37(0x206),_0x49976f,{'stdio':_0x2bfb37(0x210),'shell':process[_0x2bfb37(0x1f3)]==='win32'});_0x493191['on'](_0x5a5314['JypAq'],_0xf357d7=>{const _0x24eca3=_0x2bfb37;_0x5a5314[_0x24eca3(0x219)](_0x348068,_0x5a5314['NuroR'](_0xf357d7,0x0));}),_0x493191['on']('error',()=>{_0x348068(![]);});});}function isSkillInstalled(_0xd1f93a,_0x334bc2,_0x479ca8){const _0x2fe11d=_0x57a4,_0x223e0a={'RaYLD':function(_0x543ff4,_0x5238dd){return _0x543ff4===_0x5238dd;},'baCVT':_0x2fe11d(0x217),'IdktI':function(_0x267e03,_0x567890){return _0x267e03(_0x567890);},'hUPYn':function(_0x152199,_0x266ad4,_0x366554){return _0x152199(_0x266ad4,_0x366554);}},_0x9113b8=_0x223e0a['RaYLD'](_0x479ca8,_0x223e0a[_0x2fe11d(0x21a)])?_0x223e0a['IdktI'](getOpencodeSkillsDir,_0x334bc2):_0x223e0a[_0x2fe11d(0x226)](getSkillsDir,_0x334bc2),_0x5ef5b4=_0x223e0a[_0x2fe11d(0x215)](join,_0x9113b8,_0xd1f93a);return existsSync(_0x5ef5b4);}async function reinstallSkills(_0xb7b5b8){const _0x1c747b=_0x57a4,_0x13110b={'HVitm':_0x1c747b(0x211),'IRhZR':'user','EvDXi':_0x1c747b(0x206),'HHmTs':'opencode','bzDNs':_0x1c747b(0x20d),'SJQoJ':function(_0x40cda2,_0x837c7a,_0xb3cf6){return _0x40cda2(_0x837c7a,_0xb3cf6);}},_0x35394b=[_0x13110b['HVitm'],_0x13110b[_0x1c747b(0x200)]],_0x116669=[];for(const _0x389d29 of _0x35394b){for(const _0x58f55e of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x58f55e,_0x389d29,_0x13110b[_0x1c747b(0x201)])&&_0x116669[_0x1c747b(0x209)]({'skillName':_0x58f55e,'level':_0x389d29,'platform':_0x13110b['EvDXi']}),isSkillInstalled(_0x58f55e,_0x389d29,_0x13110b[_0x1c747b(0x212)])&&_0x116669[_0x1c747b(0x209)]({'skillName':_0x58f55e,'level':_0x389d29,'platform':_0x13110b['HHmTs']});}}for(const _0x487080 of _0x35394b){for(const _0x26a19a of DEPRECATED_SKILLS){await removeSkill(_0x26a19a,_0x487080);}}if(_0x116669[_0x1c747b(0x203)]===0x0){console[_0x1c747b(0x1f2)](_0x13110b['bzDNs']);return;}console[_0x1c747b(0x1f2)](_0x1c747b(0x1fe)+_0x116669[_0x1c747b(0x203)]+_0x1c747b(0x229));for(const {skillName:_0x17192c,level:_0x488fc4,platform:_0x4836fb}of _0x116669){try{await _0x13110b[_0x1c747b(0x1e9)](installSkill,_0x17192c,{'level':_0x488fc4,'cliVersion':_0xb7b5b8,'platform':_0x4836fb});}catch(_0x350b8f){console[_0x1c747b(0x214)](_0x1c747b(0x1f9)+_0x4836fb+'\x20'+_0x488fc4+_0x1c747b(0x1ff)+_0x17192c+':',_0x350b8f);}}}async function ensureActiveProfileGitignored(){const _0x27cd91=_0x57a4,_0x2e09e3={'pEwOm':function(_0x4309c4,_0x546129,_0x4c5e70){return _0x4309c4(_0x546129,_0x4c5e70);},'JkZLC':function(_0x1c7ab2,_0x311412){return _0x1c7ab2===_0x311412;}},_0x2a6676=_0x2e09e3[_0x27cd91(0x204)](join,getRangerDir(),_0x27cd91(0x216));if(!existsSync(_0x2a6676))return![];let _0x158910='';try{_0x158910=await readFile(_0x2a6676,_0x27cd91(0x22b));}catch{return![];}const _0x247c2c=_0x158910['split'](/\r?\n/);if(_0x247c2c['some'](_0x90a86b=>_0x90a86b[_0x27cd91(0x1fb)]()==='active-profile.txt'))return![];let _0x1529da=_0x247c2c['findIndex'](_0x2ac213=>_0x2ac213['trim']()===_0x27cd91(0x1f1));_0x2e09e3['JkZLC'](_0x1529da,-0x1)&&(_0x1529da=_0x247c2c['length']);_0x247c2c['splice'](_0x1529da,0x0,_0x27cd91(0x21b));let _0x288b3c=_0x247c2c[_0x27cd91(0x222)]('\x0a');!_0x288b3c['endsWith']('\x0a')&&(_0x288b3c+='\x0a');try{await writeFile(_0x2a6676,_0x288b3c,'utf-8');}catch{return![];}return!![];}export async function update(){const _0x2e1d9f=_0x57a4,_0x5c8b2b={'NoFOh':_0x2e1d9f(0x1eb),'UKUMk':'Attempting\x20install\x20anyway...','DgMcT':function(_0x4dbc35){return _0x4dbc35();},'HLIPS':function(_0x43908c,_0x509efa){return _0x43908c<_0x509efa;},'pVQKx':_0x2e1d9f(0x213),'HmpSC':function(_0x4848b2,_0x546635){return _0x4848b2(_0x546635);},'YFBDf':_0x2e1d9f(0x22a),'nBHMd':function(_0x1c45da){return _0x1c45da();},'SVhPD':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','JkYEn':function(_0x14737e,_0xa39f05){return _0x14737e(_0xa39f05);},'aXZnJ':'✓\x20Migrated\x20active\x20profile\x20file'},_0x8f0ba0=getCurrentVersion();console['log']('\x0aCurrent\x20version:\x20'+_0x8f0ba0),console[_0x2e1d9f(0x1f2)](_0x5c8b2b['NoFOh']);const _0x551a7e=getLatestVersion();let _0x4bc7b0=_0x8f0ba0;if(!_0x551a7e[_0x2e1d9f(0x20c)]){console[_0x2e1d9f(0x214)]('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x551a7e['error']),console['log'](_0x5c8b2b['UKUMk']);const _0x16d0ce=await runInstall();if(_0x16d0ce)console[_0x2e1d9f(0x1f2)]('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x4bc7b0=_0x5c8b2b[_0x2e1d9f(0x1e8)](getCurrentVersion);else throw new Error(_0x2e1d9f(0x1ec)+_0x551a7e['error']);}else{const _0x181b44=_0x551a7e['version'];console[_0x2e1d9f(0x1f2)](_0x2e1d9f(0x208)+_0x181b44);const _0x5b68b9=compareVersions(_0x8f0ba0,_0x181b44);if(_0x5b68b9===0x0)console['log']('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x5c8b2b[_0x2e1d9f(0x227)](_0x5b68b9,0x0))console[_0x2e1d9f(0x1f2)]('\x0aYour\x20version\x20('+_0x8f0ba0+_0x2e1d9f(0x21c)+_0x181b44+').');else{const _0x308c11=await runInstall();if(_0x308c11)console['log'](_0x2e1d9f(0x1f4)+_0x181b44),_0x4bc7b0=_0x181b44;else throw new Error(_0x5c8b2b['pVQKx']);}}}await _0x5c8b2b['HmpSC'](reinstallSkills,_0x4bc7b0);const _0x5873cc=await isMarketplaceAdded(_0x2e1d9f(0x223)),_0x39b73a=await isPluginInstalled('ranger@trailhead');if(_0x5873cc){const _0x2559d5=await updateClaudeMarketplace();_0x2559d5&&console[_0x2e1d9f(0x1f2)](_0x5c8b2b['YFBDf']);}if(_0x39b73a){const _0x8e5646=await _0x5c8b2b[_0x2e1d9f(0x21f)](updateClaudePlugin);_0x8e5646&&console[_0x2e1d9f(0x1f2)](_0x5c8b2b['SVhPD']);const _0x28b826=await _0x5c8b2b[_0x2e1d9f(0x20f)](updateClaudePlugin,'project');_0x28b826&&console[_0x2e1d9f(0x1f2)]((_0x8e5646?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x31f82e=await migrateActiveProfileFile();_0x31f82e&&console[_0x2e1d9f(0x1f2)](_0x5c8b2b[_0x2e1d9f(0x224)]);const _0x241bb8=await ensureActiveProfileGitignored();console[_0x2e1d9f(0x1f2)](_0x2e1d9f(0x225));}