@ranger-testing/ranger-cli 2.1.4 → 2.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/env.js +1 -1
  7. package/build/commands/feature.js +1 -1
  8. package/build/commands/hook.js +1 -1
  9. package/build/commands/hooks/autoPrompt.js +1 -1
  10. package/build/commands/hooks/disable.js +1 -1
  11. package/build/commands/hooks/enable.js +1 -1
  12. package/build/commands/hooks/exitPlanMode.js +1 -1
  13. package/build/commands/hooks/index.js +1 -1
  14. package/build/commands/hooks/output.js +1 -1
  15. package/build/commands/hooks/planReminder.js +1 -1
  16. package/build/commands/hooks/planStart.js +1 -1
  17. package/build/commands/hooks/postEdit.js +1 -1
  18. package/build/commands/hooks/preCompact.js +1 -1
  19. package/build/commands/hooks/sessionEnd.js +1 -1
  20. package/build/commands/hooks/sessionStart.js +1 -1
  21. package/build/commands/hooks/stopHook.js +1 -1
  22. package/build/commands/index.js +1 -1
  23. package/build/commands/login.js +1 -1
  24. package/build/commands/setup/claude.js +1 -1
  25. package/build/commands/setup/opencode.js +1 -1
  26. package/build/commands/setupCi.js +1 -1
  27. package/build/commands/skillup.js +1 -1
  28. package/build/commands/start.js +1 -1
  29. package/build/commands/status.js +1 -1
  30. package/build/commands/update.js +1 -1
  31. package/build/commands/updateEnv.js +1 -1
  32. package/build/commands/useEnv.js +1 -1
  33. package/build/commands/utils/activeProfile.js +1 -1
  34. package/build/commands/utils/browserSessionsApi.js +1 -1
  35. package/build/commands/utils/claudeConfig.js +1 -1
  36. package/build/commands/utils/claudePlugin.js +1 -1
  37. package/build/commands/utils/crypto.js +1 -1
  38. package/build/commands/utils/desirePathLog.js +1 -1
  39. package/build/commands/utils/deviceAuth.js +1 -1
  40. package/build/commands/utils/environment.js +1 -1
  41. package/build/commands/utils/featureApi.js +1 -1
  42. package/build/commands/utils/featureReportGenerator.js +1 -1
  43. package/build/commands/utils/fixWebmDuration.js +1 -1
  44. package/build/commands/utils/git.js +1 -1
  45. package/build/commands/utils/keychain.js +1 -1
  46. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  47. package/build/commands/utils/mcpImageBase64.js +1 -1
  48. package/build/commands/utils/model.js +1 -1
  49. package/build/commands/utils/opencodeConfig.js +1 -1
  50. package/build/commands/utils/profileMessages.js +1 -1
  51. package/build/commands/utils/profileSetupBanner.js +1 -1
  52. package/build/commands/utils/rangerConfig.js +1 -1
  53. package/build/commands/utils/rangerRoot.js +1 -1
  54. package/build/commands/utils/reportGenerator.js +1 -1
  55. package/build/commands/utils/retry.js +1 -1
  56. package/build/commands/utils/sessionCache.js +1 -1
  57. package/build/commands/utils/settings.js +1 -1
  58. package/build/commands/utils/skillContent.js +1 -1
  59. package/build/commands/utils/skills.js +1 -1
  60. package/build/commands/utils/telemetry.js +1 -1
  61. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  62. package/build/commands/utils/userApi.js +1 -1
  63. package/build/commands/utils/version.js +1 -1
  64. package/build/commands/verifyFeature.js +1 -1
  65. package/build/commands/verifyInBrowser.js +1 -1
  66. package/package.json +1 -1
@@ -1 +1 @@
1
- function _0x4dd7(){const _0x1d0067=['stat','266frkYDi','NvPZq','featureId','AHJvH','oQDhV','size','297846ixYKkJ','89rqPoig','\x20for\x20\x22','JrZZL','RANGER_SKIP_VERIFICATION','12vabXES','1337192TzlugD','ztBkJ','AFJKk','6614XdPvPx','utf8','alloc','message','input','trackCommandStart','27FYrEdv','stringify','157758bUCQwP',':\x0a\x0a','28732860BMcYaW','stop_hook_active','log','130cprcQM','283715rIgVOG','468325RZfuVo','\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(','DkTJT','https://dashboard.ranger.net/features/','QrfIb','includes','toString'];_0x4dd7=function(){return _0x1d0067;};return _0x4dd7();}(function(_0x232080,_0x9bee4d){const _0x5a709f=_0x2b08,_0x47e1bf=_0x232080();while(!![]){try{const _0x297c97=-parseInt(_0x5a709f(0xb0))/0x1*(-parseInt(_0x5a709f(0x92))/0x2)+parseInt(_0x5a709f(0xaf))/0x3+-parseInt(_0x5a709f(0xb4))/0x4*(parseInt(_0x5a709f(0xa0))/0x5)+parseInt(_0x5a709f(0x9a))/0x6*(-parseInt(_0x5a709f(0xa9))/0x7)+-parseInt(_0x5a709f(0xb5))/0x8*(parseInt(_0x5a709f(0x98))/0x9)+-parseInt(_0x5a709f(0x9f))/0xa*(parseInt(_0x5a709f(0xa1))/0xb)+parseInt(_0x5a709f(0x9c))/0xc;if(_0x297c97===_0x9bee4d)break;else _0x47e1bf['push'](_0x47e1bf['shift']());}catch(_0xf35ea7){_0x47e1bf['push'](_0x47e1bf['shift']());}}}(_0x4dd7,0x89a0d));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 _0x2b08(_0x30b5b6,_0x25e251){_0x30b5b6=_0x30b5b6-0x91;const _0x4dd7ae=_0x4dd7();let _0x2b0816=_0x4dd7ae[_0x30b5b6];return _0x2b0816;}export async function stopHook(_0x3c5f57){const _0x2d9624=_0x2b08,_0x4f3ab5={'AHJvH':function(_0x9b7955){return _0x9b7955();},'oQDhV':function(_0x159434,_0x1a14c1,_0x184dcd){return _0x159434(_0x1a14c1,_0x184dcd);},'AFJKk':function(_0x38ca77,_0x14f602){return _0x38ca77(_0x14f602);},'ycwem':function(_0x4a1c8c,_0x2a7b50){return _0x4a1c8c&&_0x2a7b50;},'JrZZL':function(_0x4893fb,_0x111fa9,_0x360ac2,_0x4cf917){return _0x4893fb(_0x111fa9,_0x360ac2,_0x4cf917);},'DkTJT':function(_0x5533b7,_0x1d40e2){return _0x5533b7(_0x1d40e2);}},_0x3e7f1d=await getEnabledHookContext(_0x3c5f57),_0x42b0f1=_0x3e7f1d?.['sessionId']??null,_0x4f0d0f=Boolean(_0x3e7f1d?.[_0x2d9624(0x96)]?.[_0x2d9624(0x9d)]),_0x31174d=typeof _0x3e7f1d?.['input']?.['transcript_path']==='string'?_0x3e7f1d[_0x2d9624(0x96)]['transcript_path']:null;let _0x82e04=!![];if(!_0x42b0f1){await trackStop(_0x42b0f1,![],_0x82e04);return;}try{const _0x53249e=getSessionEntry(_0x42b0f1);if(!_0x53249e){await trackStop(_0x42b0f1,!![],_0x82e04);return;}const _0x3e3738=_0x2d9624(0xa4)+_0x53249e[_0x2d9624(0xab)],_0x2d6749=_0x2d9624(0xb3),_0x527f52=await _0x4f3ab5[_0x2d9624(0xac)](getToken),_0x2750da=!_0x4f0d0f;let _0x57d2c6=null,_0x364026=null;const _0x4d569a=_0x4f0d0f&&await _0x4f3ab5[_0x2d9624(0xad)](transcriptHasToken,_0x31174d,_0x2d6749),_0x3e9287=await transcriptHasToken(_0x31174d,_0x3e3738);if(_0x527f52)try{const _0x5c1e11=await _0x4f3ab5[_0x2d9624(0x91)](getFeature,_0x53249e['featureId']);_0x57d2c6=_0x5c1e11['name']??null,_0x364026=_0x5c1e11['currentSessionId']??null;}catch{}if(_0x4f3ab5['ycwem'](_0x527f52,_0x364026))try{await concludeSession(_0x53249e['featureId'],_0x364026);}catch(_0x567f40){if(_0x4d569a){await _0x4f3ab5[_0x2d9624(0xb2)](trackStop,_0x42b0f1,!![],_0x82e04);return;}_0x82e04=![];const _0x524c5c=_0x567f40 instanceof Error?_0x567f40[_0x2d9624(0x95)]:_0x4f3ab5[_0x2d9624(0xa3)](String,_0x567f40),_0x248581={'decision':'block','reason':'Failed\x20to\x20conclude\x20Ranger\x20feature\x20review\x20session'+(_0x57d2c6?_0x2d9624(0xb1)+_0x57d2c6+'\x22':'')+_0x2d9624(0x9b)+_0x524c5c+_0x2d9624(0xa2)+_0x3e3738+')\x20and\x20the\x20token\x20`'+_0x2d6749+'`,\x20then\x20run\x20/exit\x20again.'};console[_0x2d9624(0x9e)](JSON[_0x2d9624(0x99)](_0x248581)),await trackStop(_0x42b0f1,!![],_0x82e04);return;}await trackStop(_0x42b0f1,!![],_0x82e04);return;}catch{await trackStop(_0x42b0f1,!![],_0x82e04);return;}}async function trackStop(_0x41c2f2,_0x596324,_0x9d9eb2){const _0x6b7901=_0x2b08,_0x201835={'MOXzx':function(_0x44ad5d,_0x5b17f3){return _0x44ad5d(_0x5b17f3);},'uuNjP':function(_0x547579,_0x696720){return _0x547579??_0x696720;},'wkPWs':'success'};try{const _0x26843b=_0x201835['MOXzx'](createTelemetryCollector,'hook:stop');await _0x26843b[_0x6b7901(0x97)]({'sessionId':_0x201835['uuNjP'](_0x41c2f2,undefined),'hooksEnabled':_0x596324,'stopAllowed':_0x9d9eb2}),await _0x26843b['trackCommandEnd'](_0x201835['wkPWs']);}catch{}}async function transcriptHasToken(_0x1895df,_0x16fb12){const _0x4cdc36=_0x2b08,_0x3eb7ec={'ceOEp':function(_0xc5c9e8,_0x4d0dd6,_0x336835){return _0xc5c9e8(_0x4d0dd6,_0x336835);}};if(!_0x1895df)return![];const _0x5d08bc=await _0x3eb7ec['ceOEp'](readTranscriptTail,_0x1895df,0x30d40);return _0x5d08bc?_0x5d08bc[_0x4cdc36(0xa6)](_0x16fb12):![];}async function readTranscriptTail(_0x4a1fcd,_0x2156f2){const _0x3f214e=_0x2b08,_0x2a6f09={'NvPZq':function(_0x4f5271,_0x30db6a){return _0x4f5271<=_0x30db6a;},'ztBkJ':function(_0x3e7d04,_0x175f59){return _0x3e7d04-_0x175f59;},'QrfIb':_0x3f214e(0x93)};let _0x232479=null;try{_0x232479=await open(_0x4a1fcd,'r');const _0x58b143=await _0x232479[_0x3f214e(0xa8)](),_0x3d08a7=Math['min'](_0x58b143[_0x3f214e(0xae)],_0x2156f2);if(_0x2a6f09[_0x3f214e(0xaa)](_0x3d08a7,0x0))return'';const _0x1733bf=Buffer[_0x3f214e(0x94)](_0x3d08a7);return await _0x232479['read'](_0x1733bf,0x0,_0x3d08a7,_0x2a6f09[_0x3f214e(0xb6)](_0x58b143[_0x3f214e(0xae)],_0x3d08a7)),_0x1733bf[_0x3f214e(0xa7)](_0x2a6f09[_0x3f214e(0xa5)]);}catch{return null;}finally{try{await _0x232479?.['close']();}catch{}}}
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 +1 @@
1
- (function(_0x43518b,_0x558fb6){var _0x55ea57=_0x5130,_0x37e21f=_0x43518b();while(!![]){try{var _0x116008=parseInt(_0x55ea57(0xd4))/0x1*(-parseInt(_0x55ea57(0xcd))/0x2)+parseInt(_0x55ea57(0xd5))/0x3+-parseInt(_0x55ea57(0xd3))/0x4+parseInt(_0x55ea57(0xd2))/0x5*(parseInt(_0x55ea57(0xce))/0x6)+-parseInt(_0x55ea57(0xd1))/0x7+parseInt(_0x55ea57(0xd0))/0x8+parseInt(_0x55ea57(0xcf))/0x9;if(_0x116008===_0x558fb6)break;else _0x37e21f['push'](_0x37e21f['shift']());}catch(_0x2d34bd){_0x37e21f['push'](_0x37e21f['shift']());}}}(_0x525c,0x8acc5));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';function _0x525c(){var _0x44408e=['994448LfKwhg','33739tFjTUa','1312272aTXrho','50ylrMZQ','162BgOrMV','5006997PlvlQG','6348200RGqJst','6933045imHfiL','159955QwkEsJ'];_0x525c=function(){return _0x44408e;};return _0x525c();}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';function _0x5130(_0x21e7c3,_0x3907fd){_0x21e7c3=_0x21e7c3-0xcd;var _0x525c01=_0x525c();var _0x5130cc=_0x525c01[_0x21e7c3];return _0x5130cc;}export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
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 +1 @@
1
- function _0xd0f7(){const _0x5a421b=['success','stdout','18gjhbKD','333774IoaXiQ','4OLWnaZ','mPgiG','isTTY','8764mPImcg','Login\x20failed:\x20','88170UYWZcM','23089IvEAgL','log','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','6410JnJiEd','65562ALQIIG','17522ZucmEI','780UVemnp','19VRRiTR','8983fFiYgZ','\x0a✅\x20Logged\x20in\x20to\x20','pNvCC','1236mSSExj','message','96hfeiyP'];_0xd0f7=function(){return _0x5a421b;};return _0xd0f7();}(function(_0x123929,_0x53ba52){const _0x4c07cc=_0x5c54,_0x5d794e=_0x123929();while(!![]){try{const _0x42ea0a=parseInt(_0x4c07cc(0x1d1))/0x1*(-parseInt(_0x4c07cc(0x1cf))/0x2)+parseInt(_0x4c07cc(0x1db))/0x3*(-parseInt(_0x4c07cc(0x1dc))/0x4)+parseInt(_0x4c07cc(0x1cd))/0x5*(-parseInt(_0x4c07cc(0x1d0))/0x6)+-parseInt(_0x4c07cc(0x1ce))/0x7*(parseInt(_0x4c07cc(0x1d7))/0x8)+parseInt(_0x4c07cc(0x1da))/0x9*(parseInt(_0x4c07cc(0x1c9))/0xa)+-parseInt(_0x4c07cc(0x1ca))/0xb*(-parseInt(_0x4c07cc(0x1d5))/0xc)+parseInt(_0x4c07cc(0x1d2))/0xd*(parseInt(_0x4c07cc(0x1c7))/0xe);if(_0x42ea0a===_0x53ba52)break;else _0x5d794e['push'](_0x5d794e['shift']());}catch(_0x20cb0a){_0x5d794e['push'](_0x5d794e['shift']());}}}(_0xd0f7,0x1ac3c));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x5c54(_0x470ae9,_0x12ed5d){_0x470ae9=_0x470ae9-0x1c7;const _0xd0f7af=_0xd0f7();let _0x5c5473=_0xd0f7af[_0x470ae9];return _0x5c5473;}export async function login(){const _0x2e814d=_0x5c54,_0x183e8e={'EeZMb':function(_0x21afc0){return _0x21afc0();},'pNvCC':function(_0x4e1b19,_0x3da708){return _0x4e1b19(_0x3da708);},'mPgiG':'\x0a✅\x20API\x20key\x20stored\x20successfully'},_0x18f275=process['stdin']['isTTY']&&process[_0x2e814d(0x1d9)][_0x2e814d(0x1de)];if(!_0x18f275)throw new Error(_0x2e814d(0x1cc));try{const _0x5b18fc=await _0x183e8e['EeZMb'](runDeviceAuthFlow),_0x49a0f9=await _0x183e8e[_0x2e814d(0x1d4)](getCurrentUser,_0x5b18fc);_0x49a0f9[_0x2e814d(0x1d8)]?console[_0x2e814d(0x1cb)](_0x2e814d(0x1d3)+_0x49a0f9['user']['organizationName']):console['log'](_0x183e8e[_0x2e814d(0x1dd)]);}catch(_0x5ce1dc){throw new Error(_0x2e814d(0x1c8)+(_0x5ce1dc instanceof Error?_0x5ce1dc[_0x2e814d(0x1d6)]:_0x5ce1dc));}}
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 +1 @@
1
- (function(_0x2bbd98,_0x474f2d){const _0xb2c018=_0x34d7,_0x259130=_0x2bbd98();while(!![]){try{const _0x374a7b=-parseInt(_0xb2c018(0x158))/0x1+parseInt(_0xb2c018(0x152))/0x2+parseInt(_0xb2c018(0x15b))/0x3+parseInt(_0xb2c018(0x13b))/0x4*(-parseInt(_0xb2c018(0x135))/0x5)+-parseInt(_0xb2c018(0x140))/0x6*(-parseInt(_0xb2c018(0x156))/0x7)+parseInt(_0xb2c018(0x143))/0x8*(parseInt(_0xb2c018(0x160))/0x9)+-parseInt(_0xb2c018(0x13d))/0xa*(parseInt(_0xb2c018(0x145))/0xb);if(_0x374a7b===_0x474f2d)break;else _0x259130['push'](_0x259130['shift']());}catch(_0x55a388){_0x259130['push'](_0x259130['shift']());}}}(_0xf4f6,0x53210));import{join}from'path';import{existsSync}from'fs';import _0x5e60dc from'inquirer';function _0x34d7(_0x2698ee,_0x40a8bd){_0x2698ee=_0x2698ee-0x133;const _0xf4f6a7=_0xf4f6();let _0x34d7b7=_0xf4f6a7[_0x2698ee];return _0x34d7b7;}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x1ed000){const _0x37436d=_0x34d7,_0x1977a8={'PEZHx':_0x37436d(0x157),'rxfjI':function(_0x560e35,_0x12b719,_0x2855cd){return _0x560e35(_0x12b719,_0x2855cd);},'HSwWo':_0x37436d(0x13c),'GgAgx':_0x37436d(0x134),'bJLja':_0x37436d(0x150),'ZXHvF':'plugin','sYdAa':_0x37436d(0x15c),'cmyPG':_0x37436d(0x146),'nwVdH':_0x37436d(0x15f),'ybjaV':function(_0x55ba84,_0x6eca66){return _0x55ba84(_0x6eca66);},'KUwBm':'❌\x20Failed\x20to\x20install\x20plugin:','PbkPI':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','AbTYI':'--scope','vySbI':_0x37436d(0x147)},_0x249eb4=await isPluginInstalled(_0x1977a8['PEZHx']);if(_0x249eb4)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0xf8d52c=existsSync(_0x1977a8[_0x37436d(0x137)](join,getProjectRoot(),'.claude'));let _0x31e862;if(_0x1ed000)_0x31e862=_0x1ed000;else{if(_0xf8d52c)_0x31e862=_0x1977a8[_0x37436d(0x142)];else{console['log'](_0x37436d(0x15d));const _0x21e929=await _0x5e60dc['prompt']([{'type':'list','name':'pluginScope','message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x1977a8['GgAgx'],'value':_0x1977a8[_0x37436d(0x14b)]},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x37436d(0x13c)}],'default':_0x1977a8['bJLja']}]);_0x31e862=_0x21e929[_0x37436d(0x14c)];}}console[_0x37436d(0x153)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x31e862+_0x37436d(0x136));const _0x46f450=await isMarketplaceAdded('trailhead');let _0x5a56c8=_0x46f450;if(_0x46f450)console[_0x37436d(0x153)](_0x37436d(0x162));else{const _0x4a314c=await runClaudeCommand([_0x1977a8['ZXHvF'],'marketplace',_0x37436d(0x138),'ranger-testing/trailhead']);!_0x4a314c[_0x37436d(0x133)]?(console['error'](_0x1977a8['sYdAa'],_0x4a314c[_0x37436d(0x14f)]),console['log'](_0x1977a8['cmyPG']),console['log'](_0x1977a8['nwVdH']),console['log'](_0x37436d(0x141)+_0x31e862)):_0x5a56c8=!![];}if(_0x5a56c8){const _0x10b4d0=await _0x1977a8[_0x37436d(0x139)](runClaudeCommand,['plugin',_0x37436d(0x161),_0x1977a8[_0x37436d(0x14d)],'--scope',_0x31e862]);if(!_0x10b4d0[_0x37436d(0x133)])console[_0x37436d(0x14f)](_0x1977a8['KUwBm'],_0x10b4d0[_0x37436d(0x14f)]),console['log'](_0x37436d(0x146)),console['log'](_0x37436d(0x141)+_0x31e862);else{console[_0x37436d(0x153)](_0x1977a8[_0x37436d(0x13f)]);const _0x57243c=['plugin',_0x37436d(0x148),_0x1977a8[_0x37436d(0x14d)]];_0x31e862===_0x1977a8[_0x37436d(0x142)]&&_0x57243c[_0x37436d(0x13e)](_0x1977a8['AbTYI'],_0x1977a8[_0x37436d(0x142)]);const _0x5c559b=await _0x1977a8[_0x37436d(0x137)](runClaudeCommand,_0x57243c,{'captureOutput':!![]}),_0xc64fe2=_0x5c559b['output']?.[_0x37436d(0x15e)]('already\x20enabled');!_0x5c559b[_0x37436d(0x133)]&&!_0xc64fe2?console['error'](_0x37436d(0x15a),_0x5c559b['error']):console['log'](_0x1977a8['vySbI']);}}return!![];}export async function ensureClaudeSkills(_0x3739ae){const _0x54f1c4=_0x34d7,_0x58363e={'tkxge':function(_0x4593ef,_0x3d2e8b){return _0x4593ef(_0x3d2e8b);},'TRwnA':function(_0x1b50be,_0x391d57){return _0x1b50be(_0x391d57);},'ANblu':function(_0x595a5c,_0x57b20f){return _0x595a5c(_0x57b20f);},'UurIt':_0x54f1c4(0x14a),'WNiIO':function(_0xe2e8b4,_0x48ef69){return _0xe2e8b4||_0x48ef69;},'pWmai':function(_0x20d5fe,_0x451f93,_0x19ac73){return _0x20d5fe(_0x451f93,_0x19ac73);},'EIAtd':'.claude','LtZRf':function(_0x5d69a4,_0x348fb6){return _0x5d69a4(_0x348fb6);},'KaPrz':'project','vRWEH':'wantsSkillup','lJVMi':'Would\x20you\x20like\x20to\x20install\x20skills?'},_0x22b25e=_0x58363e['tkxge'](existsSync,join(_0x58363e['TRwnA'](getSkillsDir,_0x54f1c4(0x150)),'ranger','SKILL.md')),_0x413d99=_0x58363e['ANblu'](existsSync,join(_0x58363e['tkxge'](getSkillsDir,'project'),_0x58363e['UurIt'],'SKILL.md'));if(_0x58363e['WNiIO'](_0x22b25e,_0x413d99))return console[_0x54f1c4(0x153)](_0x54f1c4(0x13a)),![];const _0x5013f6=_0x58363e[_0x54f1c4(0x154)](existsSync,_0x58363e[_0x54f1c4(0x159)](join,getProjectRoot(),_0x58363e[_0x54f1c4(0x155)]));let _0x2daed5=!![];if(_0x3739ae)await _0x58363e[_0x54f1c4(0x144)](skillup,{'autoInstall':_0x3739ae,'suppressUsage':!![]});else{if(_0x5013f6)await _0x58363e['LtZRf'](skillup,{'autoInstall':_0x58363e['KaPrz'],'suppressUsage':!![]});else{const _0x336740=await _0x5e60dc['prompt']([{'type':_0x54f1c4(0x151),'name':_0x58363e[_0x54f1c4(0x149)],'message':_0x58363e[_0x54f1c4(0x14e)],'default':!![]}]);_0x2daed5=_0x336740['wantsSkillup'],_0x2daed5&&await _0x58363e[_0x54f1c4(0x144)](skillup,{'suppressUsage':!![]});}}return _0x2daed5;}function _0xf4f6(){const _0x35a4b1=['2768megExK','project','400EkyrDz','push','PbkPI','30woIOXe','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','HSwWo','32ApHDRp','ANblu','206272gJOcbg','\x0aYou\x20can\x20install\x20manually\x20with:','✓\x20Claude\x20Code\x20plugin\x20enabled','enable','vRWEH','ranger','bJLja','pluginScope','PEZHx','lJVMi','error','user','confirm','1337506aaJqyE','log','TRwnA','EIAtd','654353wKysht','ranger@trailhead','17914SVKgPm','pWmai','⚠\x20Failed\x20to\x20enable\x20plugin:','942930zMAuXP','❌\x20Failed\x20to\x20add\x20marketplace:','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','includes','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','174114EVblZm','install','✓\x20Marketplace\x20already\x20added','success','User\x20(available\x20in\x20all\x20your\x20projects)','3030XtFLfg','\x20level)...\x0a','rxfjI','add','ybjaV','✓\x20Ranger\x20skills\x20already\x20installed'];_0xf4f6=function(){return _0x35a4b1;};return _0xf4f6();}
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 +1 @@
1
- (function(_0x49993c,_0x327f75){const _0x352e95=_0x3335,_0x296985=_0x49993c();while(!![]){try{const _0x35120f=parseInt(_0x352e95(0x127))/0x1*(parseInt(_0x352e95(0x122))/0x2)+-parseInt(_0x352e95(0x129))/0x3*(-parseInt(_0x352e95(0x12e))/0x4)+parseInt(_0x352e95(0x12b))/0x5+-parseInt(_0x352e95(0x138))/0x6+parseInt(_0x352e95(0x134))/0x7*(parseInt(_0x352e95(0x12c))/0x8)+-parseInt(_0x352e95(0x13b))/0x9+-parseInt(_0x352e95(0x128))/0xa*(parseInt(_0x352e95(0x12d))/0xb);if(_0x35120f===_0x327f75)break;else _0x296985['push'](_0x296985['shift']());}catch(_0x3685bb){_0x296985['push'](_0x296985['shift']());}}}(_0x42f9,0x98d50));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x3c41c1 from'inquirer';function _0x3335(_0xedda4f,_0x4c7e15){_0xedda4f=_0xedda4f-0x121;const _0x42f98c=_0x42f9();let _0x33355f=_0x42f98c[_0xedda4f];return _0x33355f;}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';function _0x42f9(){const _0x13db4f=['833760LLCNuw','opencode.json','ghOPF','76DbGuXv','✓\x20OpenCode\x20plugin\x20configured','VKhHs','GWAkQ','error','6092JkPRAr','5910HdEoGf','39rasrfW','isArray','958215mXVxNd','24368WxeQqd','13706YMHbFe','143408HfbEVI','✓\x20OpenCode\x20plugin\x20already\x20configured','project','pluginScope','prompt','log','1547OLsxuD','\x0a📦\x20OpenCode\x20Plugin\x0a','$schema','Project\x20(shared\x20with\x20team\x20via\x20git)','644130fArecU','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','jEAYT'];_0x42f9=function(){return _0x13db4f;};return _0x42f9();}export async function ensureOpencodePluginConfig(_0x2f2661){const _0x220320=_0x3335,_0x56fc4f={'GWAkQ':function(_0x52fe66,_0x23d7d8){return _0x52fe66(_0x23d7d8);},'ghOPF':function(_0x53c477,_0x4b9f39,_0x42f4c3){return _0x53c477(_0x4b9f39,_0x42f4c3);},'UPOXq':_0x220320(0x13c),'CvExH':_0x220320(0x135),'VKhHs':'list','RBusM':_0x220320(0x131),'jEAYT':'Where\x20should\x20the\x20plugin\x20be\x20installed?','EOamk':'User\x20(available\x20in\x20all\x20your\x20projects)','OWQbG':'https://opencode.ai/config.json','vHjcg':function(_0x393ee6,_0x51ef8e){return _0x393ee6(_0x51ef8e);},'qjxXa':'utf-8','QTKxV':_0x220320(0x139),'NwwXi':'Failed\x20to\x20read\x20opencode.json'},_0x524d07=_0x56fc4f[_0x220320(0x125)](existsSync,_0x56fc4f[_0x220320(0x121)](join,getOpencodeConfigDir(_0x220320(0x130)),_0x56fc4f['UPOXq']));let _0x37a64b;if(_0x2f2661)_0x37a64b=_0x2f2661;else{if(_0x524d07)_0x37a64b=_0x220320(0x130);else{console[_0x220320(0x133)](_0x56fc4f['CvExH']);const _0x48ef33=await _0x3c41c1[_0x220320(0x132)]([{'type':_0x56fc4f[_0x220320(0x124)],'name':_0x56fc4f['RBusM'],'message':_0x56fc4f[_0x220320(0x13a)],'choices':[{'name':_0x56fc4f['EOamk'],'value':'user'},{'name':_0x220320(0x137),'value':_0x220320(0x130)}],'default':'user'}]);_0x37a64b=_0x48ef33[_0x220320(0x131)];}}const _0x350f34=join(_0x56fc4f[_0x220320(0x125)](getOpencodeConfigDir,_0x37a64b),'opencode.json'),_0x275d79='@ranger-testing/opencode-plugin',_0x28a17c=_0x56fc4f['OWQbG'];let _0x537afc={};if(_0x56fc4f['vHjcg'](existsSync,_0x350f34))try{const _0x67170b=await readFile(_0x350f34,_0x56fc4f['qjxXa']);_0x537afc=JSON['parse'](_0x67170b);}catch(_0x5e22ff){return console[_0x220320(0x126)](_0x56fc4f['QTKxV']),{'configured':![],'scope':_0x37a64b,'error':_0x56fc4f['NwwXi'],'details':_0x5e22ff};}const _0x31e080=Array[_0x220320(0x12a)](_0x537afc['plugin'])?_0x537afc['plugin']:[];if(_0x31e080['includes'](_0x275d79))return console[_0x220320(0x133)](_0x220320(0x12f)),{'configured':![],'scope':_0x37a64b};return _0x537afc[_0x220320(0x136)]=_0x537afc[_0x220320(0x136)]||_0x28a17c,_0x537afc['plugin']=[..._0x31e080,_0x275d79],await mkdir(getOpencodeConfigDir(_0x37a64b),{'recursive':!![]}),await writeFile(_0x350f34,JSON['stringify'](_0x537afc,null,0x2)+'\x0a'),console['log'](_0x220320(0x123)),{'configured':!![],'scope':_0x37a64b};}
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 +1 @@
1
- (function(_0x2510c4,_0x1558a6){const _0x4ec83a=_0x6c73,_0x135f5c=_0x2510c4();while(!![]){try{const _0x3c0641=-parseInt(_0x4ec83a(0x226))/0x1*(parseInt(_0x4ec83a(0x20e))/0x2)+parseInt(_0x4ec83a(0x1ff))/0x3+parseInt(_0x4ec83a(0x203))/0x4+parseInt(_0x4ec83a(0x223))/0x5*(-parseInt(_0x4ec83a(0x215))/0x6)+parseInt(_0x4ec83a(0x200))/0x7+-parseInt(_0x4ec83a(0x1fe))/0x8*(parseInt(_0x4ec83a(0x20a))/0x9)+-parseInt(_0x4ec83a(0x1fd))/0xa*(-parseInt(_0x4ec83a(0x212))/0xb);if(_0x3c0641===_0x1558a6)break;else _0x135f5c['push'](_0x135f5c['shift']());}catch(_0x3b9d88){_0x135f5c['push'](_0x135f5c['shift']());}}}(_0x1125,0x84bec));function _0x1125(){const _0x229d68=['oGCxl','name','ranger@trailhead','profile','mqIVC','XGIgE','baseUrl','KxJHN','512530RQkVCp','3438984SSRZSN','2377350mIcDWT','2970835oqsMYR','zMdzS','path','4029824MGMZYZ','Failed\x20to\x20add\x20marketplace:','gFNuv','ewGfm','plugin','profile_activate','fGFyj','9RwOkUc','CI\x20profile\x20\x22','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','skipChromium','229234wlbDVg','error','auth.json','map','11KFrzsy','SCxyc','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','187368obqqvj','sessions','✓\x20Claude\x20Code\x20plugin\x20installed','✓\x20Marketplace\x20already\x20added','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','kHMTw','message','TJoEZ','bINNL','XZdEy','trackPhaseStart','✓\x20Created\x20profile\x20settings:\x20baseUrl=','marketplace','80UJACRb','trackPhaseEnd','chromium','7wFwuRU','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','auth','trailhead','success','log','project','ZxYnl','baBpi','tiENk','ranger-testing/trailhead','dir_setup','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','QZtLq'];_0x1125=function(){return _0x229d68;};return _0x1125();}import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';function _0x6c73(_0x20ce59,_0x1e342e){_0x20ce59=_0x20ce59-0x1e8;const _0x1125e7=_0x1125();let _0x6c730e=_0x1125e7[_0x20ce59];return _0x6c730e;}async function findCiProfile(_0xb63dc){const _0x10854e=_0x6c73,_0x539a98={'baBpi':function(_0x210cfd,_0x2e1ab9,_0x36a017){return _0x210cfd(_0x2e1ab9,_0x36a017);},'tiENk':function(_0xd71417,_0x24dbc6){return _0xd71417+_0x24dbc6;},'zMdzS':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','fGFyj':function(_0x656a7,_0xa25d19,_0x15740b){return _0x656a7(_0xa25d19,_0x15740b);},'kHMTw':function(_0x2db747,_0xe200a0){return _0x2db747===_0xe200a0;},'UFwYZ':_0x10854e(0x21a)},_0x3f2e74=getRangerDir(),_0x23658e=join(_0x3f2e74,'ci');if(_0xb63dc){const _0x484b98=_0x539a98[_0x10854e(0x1ef)](join,_0x23658e,_0xb63dc);return{'name':_0xb63dc,'path':_0x484b98};}if(!existsSync(_0x23658e))throw new Error(_0x539a98[_0x10854e(0x1f0)](_0x10854e(0x219),_0x539a98['zMdzS']));const _0x41b6ea=await _0x539a98[_0x10854e(0x209)](readdir,_0x23658e,{'withFileTypes':!![]}),_0x427416=_0x41b6ea['filter'](_0x7e7047=>_0x7e7047['isDirectory']())[_0x10854e(0x211)](_0x4cd72d=>_0x4cd72d[_0x10854e(0x1f6)]);if(_0x539a98[_0x10854e(0x21b)](_0x427416['length'],0x0))throw new Error(_0x539a98['tiENk'](_0x539a98['UFwYZ'],_0x539a98[_0x10854e(0x201)]));if(_0x427416['length']===0x1){const _0x159dd7=_0x427416[0x0];return console['log']('Auto-detected\x20CI\x20profile:\x20'+_0x159dd7),{'name':_0x159dd7,'path':join(_0x23658e,_0x159dd7)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x427416['join'](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x4c9f09=_0x6c73,_0xc6487e={'xudlF':function(_0x533412,_0x3105b3){return _0x533412(_0x3105b3);},'QZtLq':'ranger@trailhead','BsJcS':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','noCOZ':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','LDLGj':_0x4c9f09(0x1ea),'oGCxl':_0x4c9f09(0x204),'STueJ':_0x4c9f09(0x207),'PWVkj':'install','bINNL':'Failed\x20to\x20install\x20plugin:','GxRzY':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project'},_0x5ebcc0=await _0xc6487e['xudlF'](isPluginInstalled,_0xc6487e[_0x4c9f09(0x1f4)]);if(_0x5ebcc0)return console[_0x4c9f09(0x1ec)](_0xc6487e['BsJcS']),![];console['log'](_0xc6487e['noCOZ']);const _0x40dd29=await isMarketplaceAdded(_0xc6487e['LDLGj']);let _0x1d41de=_0x40dd29;if(_0x40dd29)console[_0x4c9f09(0x1ec)](_0x4c9f09(0x218));else{const _0x23b7fc=await runClaudeCommand(['plugin',_0x4c9f09(0x222),'add',_0x4c9f09(0x1f1)]);!_0x23b7fc[_0x4c9f09(0x1eb)]?(console['error'](_0xc6487e[_0x4c9f09(0x1f5)],_0x23b7fc[_0x4c9f09(0x20f)]),console['log']('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead')):_0x1d41de=!![];}if(_0x1d41de){const _0x558693=await runClaudeCommand([_0xc6487e['STueJ'],_0xc6487e['PWVkj'],_0x4c9f09(0x1f7),'--scope',_0x4c9f09(0x1ed)]);!_0x558693['success']?(console['error'](_0xc6487e[_0x4c9f09(0x21e)],_0x558693['error']),console[_0x4c9f09(0x1ec)](_0xc6487e['GxRzY'])):console[_0x4c9f09(0x1ec)](_0x4c9f09(0x217));}return!![];}export async function setupCi(_0xdf4273,_0x4e56ac,_0x46bb63){const _0x2d780b=_0x6c73,_0x53fd18={'lIQMS':function(_0x1d97f2,_0x268e8b){return _0x1d97f2(_0x268e8b);},'rQAqC':_0x2d780b(0x1e9),'ZxYnl':_0x2d780b(0x1f2),'TJoEZ':function(_0x45969a){return _0x45969a();},'KxJHN':function(_0x37ba14,_0x3bb161){return _0x37ba14(_0x3bb161);},'lrxll':function(_0x194f87,_0x1cfe36,_0x199f21){return _0x194f87(_0x1cfe36,_0x199f21);},'FZmBW':function(_0x316ccf,_0x545e94,_0x5699ec){return _0x316ccf(_0x545e94,_0x5699ec);},'ewGfm':'settings.json','EWOwB':function(_0x4ada10,_0x108ec1,_0x10ee63){return _0x4ada10(_0x108ec1,_0x10ee63);},'XGIgE':function(_0x472f43,_0x175151,_0xe4ef13){return _0x472f43(_0x175151,_0xe4ef13);},'mqIVC':'auth.json.enc','ouUjx':'✓\x20Auth\x20state\x20found','EOtMZ':'\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','gFNuv':'profile_activate','SCxyc':'skills','XZdEy':_0x2d780b(0x20c)};console[_0x2d780b(0x1ec)](_0x2d780b(0x1f3)),_0x46bb63?.[_0x2d780b(0x220)]('auth'),await _0x53fd18['lIQMS'](authenticate,_0xdf4273),_0x46bb63?.['trackPhaseEnd'](_0x53fd18['rQAqC']),_0x46bb63?.['trackPhaseStart'](_0x53fd18[_0x2d780b(0x1ee)]);const {path:_0x2e582f,installed:_0x24fec2}=await ensureRangerDir();await writeRangerGitignore(_0x2e582f);const _0x181f34=join(_0x2e582f,_0x2d780b(0x216));!existsSync(_0x181f34)&&await mkdir(_0x181f34,{'recursive':!![]});_0x46bb63?.['trackPhaseEnd'](_0x53fd18['ZxYnl'],{'installed':_0x24fec2}),_0x46bb63?.['trackPhaseStart'](_0x2d780b(0x225));let _0x3d06f1=![];_0x4e56ac?.[_0x2d780b(0x20d)]?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x3d06f1=await _0x53fd18[_0x2d780b(0x21d)](ensureChromium);_0x46bb63?.[_0x2d780b(0x224)]('chromium',{'installed':_0x3d06f1,'skipped':!!_0x4e56ac?.[_0x2d780b(0x20d)]}),_0x46bb63?.['trackPhaseStart'](_0x2d780b(0x208));const _0x2cfbfa=await _0x53fd18[_0x2d780b(0x1fc)](findCiProfile,_0x4e56ac?.[_0x2d780b(0x1f8)]);let _0x2de216=![];_0x4e56ac?.[_0x2d780b(0x1fb)]&&(await _0x53fd18['lrxll'](mkdir,_0x2cfbfa['path'],{'recursive':!![]}),await _0x53fd18['lrxll'](saveSettings,_0x2cfbfa[_0x2d780b(0x1f6)],{'baseUrl':_0x4e56ac['baseUrl'],'headless':!![]}),console['log'](_0x2d780b(0x221)+_0x4e56ac['baseUrl']),_0x2de216=!![]);const _0x547fac=_0x53fd18['FZmBW'](join,_0x2cfbfa['path'],_0x53fd18[_0x2d780b(0x206)]);if(!existsSync(_0x547fac)&&!_0x2de216)throw new Error(_0x2d780b(0x20b)+_0x2cfbfa[_0x2d780b(0x1f6)]+_0x2d780b(0x214));const _0x2afdf4=_0x53fd18['EWOwB'](join,_0x2cfbfa[_0x2d780b(0x202)],_0x2d780b(0x210)),_0x4a547f=_0x53fd18[_0x2d780b(0x1fa)](join,_0x2cfbfa[_0x2d780b(0x202)],_0x53fd18[_0x2d780b(0x1f9)]),_0x28bde9=existsSync(_0x2afdf4),_0x44518d=existsSync(_0x4a547f);if(_0x44518d)try{const _0x53b967=await getToken();if(!_0x53b967)throw new Error('No\x20API\x20token\x20available\x20for\x20decryption');const _0x2d6a8c=await readFile(_0x4a547f);decrypt(_0x2d6a8c,_0x53b967),console[_0x2d780b(0x1ec)]('✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)');}catch(_0x52de15){const _0x4c719f=_0x52de15 instanceof Error?_0x52de15[_0x2d780b(0x21c)]:_0x53fd18['lIQMS'](String,_0x52de15);throw new Error(_0x2d780b(0x1e8)+_0x2cfbfa['name']+'\x22:\x20'+_0x4c719f);}else _0x28bde9?console[_0x2d780b(0x1ec)](_0x53fd18['ouUjx']):console['log'](_0x53fd18['EOtMZ']);await writeActiveProfileName(_0x2cfbfa[_0x2d780b(0x1f6)]),console[_0x2d780b(0x1ec)]('✓\x20Active\x20profile:\x20'+_0x2cfbfa['name']),_0x46bb63?.['trackPhaseEnd'](_0x53fd18[_0x2d780b(0x205)],{'profileName':_0x2cfbfa['name'],'hasAuth':_0x28bde9,'hasEncryptedAuth':_0x44518d,'createdSettings':_0x2de216}),_0x46bb63?.[_0x2d780b(0x220)](_0x2d780b(0x207));const _0x2d3aa9=await installPluginNonInteractive();_0x46bb63?.[_0x2d780b(0x224)](_0x2d780b(0x207),{'installed':_0x2d3aa9}),_0x46bb63?.['trackPhaseStart'](_0x53fd18[_0x2d780b(0x213)]),await skillup({'autoInstall':'project'}),_0x46bb63?.['trackPhaseEnd'](_0x53fd18[_0x2d780b(0x213)]),console[_0x2d780b(0x1ec)](_0x53fd18[_0x2d780b(0x21f)]);}
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 +1 @@
1
- (function(_0x5e538c,_0x5823b8){const _0x2c7606=_0x19cc,_0x244b65=_0x5e538c();while(!![]){try{const _0x2b1ccf=-parseInt(_0x2c7606(0xe9))/0x1+-parseInt(_0x2c7606(0xfe))/0x2*(-parseInt(_0x2c7606(0x100))/0x3)+-parseInt(_0x2c7606(0x103))/0x4*(-parseInt(_0x2c7606(0xe0))/0x5)+-parseInt(_0x2c7606(0xfd))/0x6*(parseInt(_0x2c7606(0xe2))/0x7)+parseInt(_0x2c7606(0xe7))/0x8*(-parseInt(_0x2c7606(0xe6))/0x9)+-parseInt(_0x2c7606(0xe5))/0xa+parseInt(_0x2c7606(0xff))/0xb*(parseInt(_0x2c7606(0x108))/0xc);if(_0x2b1ccf===_0x5823b8)break;else _0x244b65['push'](_0x244b65['shift']());}catch(_0x713931){_0x244b65['push'](_0x244b65['shift']());}}}(_0x3299,0x96c63));function _0x19cc(_0x3b034d,_0x1c9573){_0x3b034d=_0x3b034d-0xde;const _0x329976=_0x3299();let _0x19cc38=_0x329976[_0x3b034d];return _0x19cc38;}import{basename}from'path';import _0x4bf787 from'inquirer';import{getToken}from'./utils/keychain.js';function _0x3299(){const _0x153aea=['opencode','967995SnsKlF','EHBdF','suppressUsage','FHHxm','\x20<your-api-token>','claude','YXqWl','ZGXVR','KBTqC','\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!','autoInstall','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','\x0a📦\x20Installing\x20skills...\x0a','To\x20get\x20started:','user','All\x20projects\x20(','stdout','This\x20project\x20only\x20(','rGEHR','list','168LtvMfR','1000yHsSjn','2024tDTnVU','486SwlqkE','TsVOF','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','10484oLhjWf','\x20successfully!\x0a','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','prompt','stdin','227496ekCcct','log','message','125iBOlxB','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','236614uCMWxl','To\x20use:','RYXnn','6579740ZpiaTq','3231PUwmTP','9912cMVHKw'];_0x3299=function(){return _0x153aea;};return _0x3299();}import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x1d5145={}){const _0x234a7c=_0x19cc,_0x4c635a={'VRLmD':_0x234a7c(0x105),'HmGYF':_0x234a7c(0xf6),'TJvRM':_0x234a7c(0xf4),'dlobL':_0x234a7c(0xe1),'vycZl':'\x20--opencode','ZGXVR':function(_0x21a5fc,_0x2867a7){return _0x21a5fc===_0x2867a7;},'rGEHR':'opencode','TsVOF':function(_0x2049b4,_0x3e4da5){return _0x2049b4(_0x3e4da5);},'mwPyJ':function(_0x177c20,_0x221336){return _0x177c20===_0x221336;},'RYXnn':_0x234a7c(0xfc),'TTgUt':'installLevel','AhONg':'Where\x20should\x20skills\x20be\x20installed?','fZJgp':_0x234a7c(0xf7),'KuloP':'project','KBTqC':function(_0x51409a){return _0x51409a();},'vvdAC':_0x234a7c(0xf5),'SdEJo':function(_0x3fb7c6,_0x5830dd){return _0x3fb7c6 instanceof _0x5830dd;},'YXqWl':function(_0x45107f,_0x499956){return _0x45107f>_0x499956;},'EHBdF':_0x234a7c(0xe3),'FHHxm':_0x234a7c(0xf2)};console['log'](_0x4c635a['VRLmD']);const _0x27d635=_0x1d5145['platform']??_0x234a7c(0xee),_0x3693b2=await getToken();if(!_0x3693b2){const _0x5b8df8='2|0|1|4|5|3'['split']('|');let _0x1511f5=0x0;while(!![]){switch(_0x5b8df8[_0x1511f5++]){case'0':console[_0x234a7c(0xde)](_0x4c635a['HmGYF']);continue;case'1':console['log'](_0x4c635a['TJvRM']);continue;case'2':console['log'](_0x4c635a['dlobL']);continue;case'3':return;case'4':console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x27d635===_0x234a7c(0xe8)?_0x4c635a['vycZl']:'')+_0x234a7c(0xed));continue;case'5':console[_0x234a7c(0xde)]('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x4c635a[_0x234a7c(0xf0)](_0x27d635,_0x4c635a['rGEHR'])?_0x4c635a['vycZl']:'')+'\x0a');continue;}break;}}console['log']('✓\x20Found\x20API\x20token');const _0x55d6ac=getProjectRoot(),_0x40bfa0=basename(_0x55d6ac),_0x45e0be=_0x27d635===_0x4c635a[_0x234a7c(0xfb)]?_0x4c635a[_0x234a7c(0x101)](getOpencodeConfigDir,'user')+'/skills/':getClaudeConfigDir()+'/skills/',_0x4de8b1=_0x4c635a['mwPyJ'](_0x27d635,'opencode')?_0x55d6ac+'/.opencode/skills/':_0x55d6ac+'/.claude/skills/',_0x4912f3=process[_0x234a7c(0x107)]['isTTY']&&process[_0x234a7c(0xf9)]['isTTY'];let _0x2e9642;if(_0x1d5145[_0x234a7c(0xf3)])_0x2e9642=_0x1d5145['autoInstall'];else{if(_0x4912f3){const _0x3cdc61=await _0x4bf787[_0x234a7c(0x106)]([{'type':_0x4c635a[_0x234a7c(0xe4)],'name':_0x4c635a['TTgUt'],'message':_0x4c635a['AhONg'],'choices':[{'name':_0x234a7c(0xf8)+_0x45e0be+')','value':_0x4c635a['fZJgp']},{'name':_0x234a7c(0xfa)+_0x4de8b1+')','value':_0x4c635a['KuloP']}]}]);_0x2e9642=_0x3cdc61['installLevel'];}else _0x2e9642='project',console[_0x234a7c(0xde)](_0x234a7c(0x102)+_0x4de8b1+')');}let _0x453521=0x0;const _0x38a4f8=_0x4c635a[_0x234a7c(0xf1)](getCurrentVersion);console[_0x234a7c(0xde)](_0x4c635a['vvdAC']);try{const _0x35d76c=await installSkill('ranger',{'cliVersion':_0x38a4f8,'level':_0x2e9642,'platform':_0x27d635});_0x35d76c&&_0x453521++;}catch(_0x57d987){console['warn']('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x4c635a['SdEJo'](_0x57d987,Error)?_0x57d987[_0x234a7c(0xdf)]:_0x57d987);}if(_0x4c635a['YXqWl'](_0x453521,0x0)){const _0x3d1ce3=_0x2e9642===_0x234a7c(0xf7)?'user-level':'project-level';console[_0x234a7c(0xde)]('\x0a✅\x20Installed\x20'+_0x453521+'\x20'+_0x3d1ce3+'\x20skill'+(_0x4c635a[_0x234a7c(0xef)](_0x453521,0x1)?'s':'')+_0x234a7c(0x104)),!_0x1d5145[_0x234a7c(0xeb)]&&(console['log'](_0x4c635a[_0x234a7c(0xea)]),_0x27d635===_0x4c635a['rGEHR']?console['log']('\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'):console[_0x234a7c(0xde)](_0x4c635a[_0x234a7c(0xec)]));}else console[_0x234a7c(0xde)]('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
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 +1 @@
1
- const _0xe9c477=_0x5c08;(function(_0x3ce1e0,_0x294b37){const _0x36fe47=_0x5c08,_0x38127c=_0x3ce1e0();while(!![]){try{const _0xf8d7a=-parseInt(_0x36fe47(0x18c))/0x1*(parseInt(_0x36fe47(0x1a8))/0x2)+-parseInt(_0x36fe47(0x163))/0x3*(parseInt(_0x36fe47(0x1a3))/0x4)+parseInt(_0x36fe47(0x18a))/0x5+-parseInt(_0x36fe47(0x157))/0x6+parseInt(_0x36fe47(0x19d))/0x7+-parseInt(_0x36fe47(0x161))/0x8+parseInt(_0x36fe47(0x15c))/0x9;if(_0xf8d7a===_0x294b37)break;else _0x38127c['push'](_0x38127c['shift']());}catch(_0x4b0e52){_0x38127c['push'](_0x38127c['shift']());}}}(_0x4c90,0xb3543));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x259226 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';function _0x4c90(){const _0x465dca=['nNftN','\x0a🚀\x20Ranger\x20Setup\x0a','Validating\x20API\x20token...','4610025WhbpqD','isTTY','yZRvF','\x20\x20npx\x20playwright@','opencode','2964528VnbBIi','✓\x20Exported\x20credentials\x20for\x20CI','1890243CSyuTR','xMoqh','MZcUi','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','stdin','log','GITHUB_ENV','Installation\x20failed\x20with\x20exit\x20code\x20','BdpJO','skipChromium','RkfcS','Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','✓\x20Already\x20authenticated\x20to\x20','✓\x20Playwright\x20Chromium\x20browser\x20found','stdout','oHSpb','mgZTA','fsOJR','npx','✓\x20Authenticated\x20to\x20','gyExr','\x20\x20npx\x20playwright\x20install\x20chromium','auth','qESYU','chromium','mgbbW','YYocM','ranger','error','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','install','FKukx','JrVey','success','organizationName','mzbvx','skills','✓\x20Local\x20profile\x20already\x20exists','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','5721295GEVKyf','trackPhaseStart','22853YlUQRw','SkGso','prompt','executablePath','plugin','kPGtj','warn','fMqGf','\x1b[0m','XOZNe','ExbkB','force','message','wantsProfile','QLfXY','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','UiRID','8554217mUDlzD','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','uamqW','/ranger:enable','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','playwright','8EMzzua','EGFrw','fZxQe','LqHCx','close','34iucEbc','method','skipped','bMnso','ggEVr','AJOpk','url','env','to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','user','gAvIw','AUXmT','fPWmJ','The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','ranger\x20profile\x20add\x20local','sKEKy','No\x20git\x20repository\x20found','AHAqb','Authentication\x20failed:\x20','use\x20until\x20the\x20session\x20expires.\x0a','trackPhaseEnd','kNcpA','Hlafr','QvJbG','qbNkG','eVOCF','qMeQC','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','platform','git_check','lZySo','qcpvy','LqEWV','748530NBgIIo','CpTUy'];_0x4c90=function(){return _0x465dca;};return _0x4c90();}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';function _0x5c08(_0x47fcac,_0x1b16fc){_0x47fcac=_0x47fcac-0x155;const _0x4c900c=_0x4c90();let _0x5c08ec=_0x4c900c[_0x47fcac];return _0x5c08ec;}const require=createRequire(import.meta.url),bold=_0x1e67f1=>'\x1b[1m'+_0x1e67f1+_0xe9c477(0x194);function getPlaywrightVersion(){const _0x199a5f=_0xe9c477,_0x390908={'qcpvy':'playwright/package.json','lZySo':function(_0x2e7ecd,_0x44b36f){return _0x2e7ecd(_0x44b36f);}};try{const _0x18a6b4=require['resolve'](_0x390908[_0x199a5f(0x155)]),_0x275031=_0x390908[_0x199a5f(0x1c7)](require,_0x18a6b4);return _0x275031['version'];}catch{return null;}}function installChromiumBinary(_0x14d6e4){const _0x464989=_0xe9c477,_0x4855fa={'HNZbJ':_0x464989(0x181),'LqHCx':_0x464989(0x17b),'oNgNW':_0x464989(0x175),'kNcpA':'inherit','RkfcS':function(_0x1da76c,_0x12512c){return _0x1da76c===_0x12512c;},'oHSpb':'win32','nNRVu':_0x464989(0x17f)};return new Promise((_0x302191,_0x48e959)=>{const _0x1c450e=_0x464989,_0x4b0d24=_0x14d6e4?['playwright@'+_0x14d6e4,_0x4855fa['HNZbJ'],_0x4855fa[_0x1c450e(0x1a6)]]:[_0x1c450e(0x1a2),'install','chromium'],_0x7ef821=spawn(_0x4855fa['oNgNW'],_0x4b0d24,{'stdio':_0x4855fa[_0x1c450e(0x1be)],'shell':_0x4855fa[_0x1c450e(0x16d)](process[_0x1c450e(0x1c5)],_0x4855fa[_0x1c450e(0x172)])});_0x7ef821['on'](_0x1c450e(0x1a7),_0x6e0c83=>{const _0x371598=_0x1c450e;_0x6e0c83===0x0?_0x302191():_0x48e959(new Error(_0x371598(0x16a)+_0x6e0c83));}),_0x7ef821['on'](_0x4855fa['nNRVu'],_0x46eb6a=>{_0x48e959(_0x46eb6a);});});}export async function authenticate(_0x225b5b){const _0x5e04e3=_0xe9c477,_0x5aa5ba={'fsOJR':function(_0x4d2bc0,_0x1ab7c9){return _0x4d2bc0(_0x1ab7c9);},'ajbSv':'existing_token','QLfXY':function(_0x7ccad8,_0x503cbd){return _0x7ccad8(_0x503cbd);},'AHAqb':'device_auth'};if(!_0x225b5b){const _0x546127=await getToken();if(_0x546127){const _0xaa1b0b=await _0x5aa5ba[_0x5e04e3(0x174)](getCurrentUser,_0x546127);if(_0xaa1b0b['success'])return console[_0x5e04e3(0x168)](_0x5e04e3(0x16f)+_0xaa1b0b[_0x5e04e3(0x1b2)]['organizationName']),{'token':_0x546127,'method':_0x5aa5ba['ajbSv']};}try{_0x225b5b=await runDeviceAuthFlow();}catch(_0x42dead){throw new Error(_0x5e04e3(0x1bb)+(_0x42dead instanceof Error?_0x42dead[_0x5e04e3(0x198)]:_0x42dead));}const _0x339535=await _0x5aa5ba['QLfXY'](getCurrentUser,_0x225b5b);if(!_0x339535[_0x5e04e3(0x184)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x339535[_0x5e04e3(0x17f)]);return console['log'](_0x5e04e3(0x176)+_0x339535['user']['organizationName']),{'token':_0x225b5b,'method':_0x5aa5ba[_0x5e04e3(0x1ba)]};}console[_0x5e04e3(0x168)](_0x5e04e3(0x15b));const _0x44da74=await getCurrentUser(_0x225b5b);if(!_0x44da74[_0x5e04e3(0x184)]){if(_0x44da74['status'])throw new Error(_0x5e04e3(0x1bb)+_0x44da74[_0x5e04e3(0x17f)]+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0x5e04e3(0x1a1)+_0x44da74[_0x5e04e3(0x17f)]+_0x5e04e3(0x1b1));}return console['log'](_0x5e04e3(0x176)+_0x44da74[_0x5e04e3(0x1b2)][_0x5e04e3(0x185)]),await _0x5aa5ba[_0x5e04e3(0x19a)](storeToken,_0x225b5b),console['log'](process[_0x5e04e3(0x1af)][_0x5e04e3(0x169)]?_0x5e04e3(0x162):'✓\x20Stored\x20credentials\x20locally'),{'token':_0x225b5b,'method':'provided_token'};}export async function ensureRangerDir(){const _0x26fa27=_0xe9c477,_0x3bc079={'nlsDz':function(_0xf187e3){return _0xf187e3();},'gAvIw':function(_0x5968ec,_0x211b97){return _0x5968ec(_0x211b97);},'mgZTA':function(_0x3eab1a,_0x5c9dfb,_0x65c19){return _0x3eab1a(_0x5c9dfb,_0x65c19);},'MYBjG':'✓\x20Created\x20.ranger/\x20directory'},_0x1180e7=findGitRoot(),_0x154504=_0x1180e7?join(_0x1180e7,'.ranger'):_0x3bc079['nlsDz'](getRangerDir);return!_0x3bc079[_0x26fa27(0x1b3)](existsSync,_0x154504)?(await _0x3bc079[_0x26fa27(0x173)](mkdir,_0x154504,{'recursive':!![]}),console['log'](_0x3bc079['MYBjG']),{'path':_0x154504,'installed':!![]}):(console['log']('✓\x20.ranger/\x20directory\x20already\x20exists'),{'path':_0x154504,'installed':![]});}export async function ensureChromium(){const _0x1c03a1=_0xe9c477,_0x34fcc0={'MdtEJ':function(_0x67baf7,_0x250b8b){return _0x67baf7(_0x250b8b);},'FKukx':_0x1c03a1(0x170),'JRJMs':function(_0x4561de){return _0x4561de();},'gyExr':'confirm','kPGtj':_0x1c03a1(0x181),'XOZNe':_0x1c03a1(0x1b6),'XIHVu':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','mzbvx':_0x1c03a1(0x1c4),'bMnso':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','uamqW':_0x1c03a1(0x178)};let _0x5f8ae9=![];try{const _0x402991=chromium[_0x1c03a1(0x18f)]();_0x5f8ae9=_0x34fcc0['MdtEJ'](existsSync,_0x402991);}catch{_0x5f8ae9=![];}if(_0x5f8ae9)return console[_0x1c03a1(0x168)](_0x34fcc0[_0x1c03a1(0x182)]),![];const _0x27d4fc=_0x34fcc0['JRJMs'](getPlaywrightVersion),_0x54b572=process[_0x1c03a1(0x167)]['isTTY']&&process[_0x1c03a1(0x171)]['isTTY'];let _0x451493=!![];if(_0x54b572){const {install:_0x56dea7}=await _0x259226[_0x1c03a1(0x18e)]([{'type':_0x34fcc0[_0x1c03a1(0x177)],'name':_0x34fcc0[_0x1c03a1(0x191)],'message':_0x27d4fc?'The\x20required\x20version\x20('+_0x27d4fc+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?':_0x34fcc0[_0x1c03a1(0x195)],'default':!![]}]);_0x451493=_0x56dea7;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium'+(_0x27d4fc?'\x20'+_0x27d4fc:'')+'...');if(_0x451493){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x27d4fc),console[_0x1c03a1(0x168)](_0x34fcc0['XIHVu']);}catch(_0x1f73f9){console['error'](_0x34fcc0[_0x1c03a1(0x186)],_0x1f73f9 instanceof Error?_0x1f73f9[_0x1c03a1(0x198)]:_0x1f73f9),console[_0x1c03a1(0x168)]('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),_0x27d4fc?console[_0x1c03a1(0x168)](_0x1c03a1(0x15f)+_0x27d4fc+'\x20install\x20chromium'):console['log'](_0x1c03a1(0x178));}}else console[_0x1c03a1(0x168)]('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console['log'](_0x34fcc0[_0x1c03a1(0x1ab)]),_0x27d4fc?console['log'](_0x1c03a1(0x15f)+_0x27d4fc+'\x20install\x20chromium'):console['log'](_0x34fcc0[_0x1c03a1(0x19f)]);return!![];}export async function writeRangerGitignore(_0x5839d1){const _0x5b0de0=_0xe9c477,_0x52c5dd={'ggEVr':function(_0x32b36e,_0x34c7a8,_0xad0eb5){return _0x32b36e(_0x34c7a8,_0xad0eb5);},'yZRvF':function(_0x3436bb,_0x17ee80,_0x5455d6){return _0x3436bb(_0x17ee80,_0x5455d6);}},_0x4e866d=_0x52c5dd[_0x5b0de0(0x1ac)](join,_0x5839d1,'.gitignore'),_0x482078='\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 _0x52c5dd[_0x5b0de0(0x15e)](writeFile,_0x4e866d,_0x482078),console['log']('✓\x20Created\x20.ranger/.gitignore');}function printProfileSetupLaterInstructions(){const _0x3fe4e7=_0xe9c477,_0x208914={'qMeQC':function(_0xc4178e,_0x37cfa8){return _0xc4178e(_0x37cfa8);},'qESYU':_0x3fe4e7(0x1b7),'LnPLO':_0x3fe4e7(0x180)};console[_0x3fe4e7(0x168)]('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console['log']('\x20\x20'+_0x208914[_0x3fe4e7(0x1c3)](bold,_0x208914[_0x3fe4e7(0x17a)])),console[_0x3fe4e7(0x168)](_0x208914['LnPLO']);}async function ensureLocalEnv(_0x176e49,_0x10bc6b){const _0x581715=_0xe9c477,_0x1b90d3={'eVOCF':function(_0x53a969){return _0x53a969();},'JrVey':function(_0x101259,_0x5797a9,_0x3e6e61){return _0x101259(_0x5797a9,_0x3e6e61);},'nNftN':'local','DQTvb':'\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','qbNkG':_0x581715(0x1bc),'MkDqz':'You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','GXWXy':'confirm','YYocM':_0x581715(0x199),'LqEWV':function(_0x24a5f){return _0x24a5f();},'bqpNH':function(_0x55ce3d,_0x42c143,_0x31c065,_0x636eec){return _0x55ce3d(_0x42c143,_0x31c065,_0x636eec);},'SkGso':'\x0a❌\x20Profile\x20setup\x20failed:','QvJbG':function(_0x3929a5,_0x4b47ae){return _0x3929a5 instanceof _0x4b47ae;}};if(!_0x1b90d3[_0x581715(0x1c2)](findGitRoot))return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.'),{'ready':![],'skipped':!![]};if(_0x1b90d3[_0x581715(0x183)](findExistingEnv,_0x1b90d3['nNftN'],{'locations':[_0x1b90d3[_0x581715(0x159)]]}))return console['log'](_0x581715(0x188)),{'ready':!![],'skipped':![]};const _0x401bca=process['stdin']['isTTY']&&process[_0x581715(0x171)][_0x581715(0x15d)];if(_0x401bca&&!_0x176e49?.[_0x581715(0x1ae)]){console[_0x581715(0x168)](_0x1b90d3['DQTvb']),console['log'](_0x581715(0x1b0)),console[_0x581715(0x168)](_0x581715(0x189)),console['log'](_0x1b90d3[_0x581715(0x1c1)]),console['log'](_0x1b90d3['MkDqz']);const {wantsProfile:_0xf1520a}=await _0x259226['prompt']([{'type':_0x1b90d3['GXWXy'],'name':_0x1b90d3[_0x581715(0x17d)],'message':_0x581715(0x16e),'default':!![]}]);if(!_0xf1520a)return _0x1b90d3[_0x581715(0x156)](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await _0x1b90d3['bqpNH'](addEnv,_0x1b90d3['nNftN'],{'url':_0x176e49?.['url'],'force':_0x176e49?.[_0x581715(0x197)]},_0x10bc6b),{'ready':!![],'skipped':![]};}catch(_0x19a8fc){return console['error'](_0x1b90d3[_0x581715(0x18d)],_0x1b90d3[_0x581715(0x1c0)](_0x19a8fc,Error)?_0x19a8fc['message']:_0x19a8fc),_0x1b90d3['eVOCF'](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x452ad2,_0x3fdb2e,_0x6d7619){const _0x31d34f=_0xe9c477,_0x3b4524={'CpTUy':_0x31d34f(0x15a),'MZcUi':'Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','kNXCX':'git_check','fMqGf':_0x31d34f(0x1b9),'vwQdn':_0x31d34f(0x19e),'mgbbW':function(_0x43ba55,_0x1627fd){return _0x43ba55(_0x1627fd);},'fZxQe':function(_0x322861){return _0x322861();},'Hlafr':_0x31d34f(0x179),'ExbkB':_0x31d34f(0x17b),'sKEKy':function(_0x49b5fc){return _0x49b5fc();},'AJOpk':_0x31d34f(0x190),'xMoqh':function(_0x1b03c7,_0x54e50d){return _0x1b03c7&&_0x54e50d;},'UiRID':_0x31d34f(0x187),'BdpJO':function(_0x39eee2,_0x37f28a,_0x58e17e){return _0x39eee2(_0x37f28a,_0x58e17e);},'rFQah':_0x31d34f(0x1b7),'AUXmT':function(_0x1d523a,_0x103296,_0x241294){return _0x1d523a(_0x103296,_0x241294);},'dXtzX':'profile','IIQUy':_0x31d34f(0x166),'EGFrw':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','fPWmJ':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'};console['log'](_0x3b4524[_0x31d34f(0x158)]);const _0xf85a9e=process['stdin'][_0x31d34f(0x15d)]&&process['stdout']['isTTY'];!_0xf85a9e&&!_0x3fdb2e?.['scope']&&(console['log'](_0x3b4524[_0x31d34f(0x165)]),_0x3fdb2e={..._0x3fdb2e,'scope':'user'});_0x6d7619?.['trackPhaseStart'](_0x31d34f(0x1c6));if(!findGitRoot()){await _0x6d7619?.['trackPhaseError'](_0x3b4524['kNXCX'],new Error(_0x3b4524[_0x31d34f(0x193)]));throw new Error(_0x3b4524['vwQdn']);}_0x6d7619?.[_0x31d34f(0x1bd)](_0x3b4524['kNXCX']);const _0x3075ba=!_0x3b4524['mgbbW'](existsSync,_0x3b4524[_0x31d34f(0x1a5)](getRangerDir)),{path:_0x2dbe7c}=await _0x3b4524['fZxQe'](ensureRangerDir);_0x6d7619?.['trackPhaseStart'](_0x31d34f(0x179));const _0x10434f=await _0x3b4524[_0x31d34f(0x17c)](authenticate,_0x452ad2);_0x6d7619?.['trackPhaseEnd'](_0x3b4524[_0x31d34f(0x1bf)],{'isFirstRun':_0x3075ba,'method':_0x10434f[_0x31d34f(0x1a9)]}),_0x6d7619?.[_0x31d34f(0x18b)](_0x3b4524[_0x31d34f(0x196)]);_0x3fdb2e?.['skipChromium']?console[_0x31d34f(0x168)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await _0x3b4524[_0x31d34f(0x1b8)](ensureChromium);_0x6d7619?.['trackPhaseEnd']('chromium',{'isFirstRun':_0x3075ba,'skipped':!!_0x3fdb2e?.[_0x31d34f(0x16c)]}),await writeRangerGitignore(_0x2dbe7c),console['log']('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x86191f=_0x3fdb2e?.['scope'],_0x5337af=_0x3fdb2e?.[_0x31d34f(0x160)]??![];let _0x2974ce=null;_0x5337af?(_0x6d7619?.[_0x31d34f(0x18b)](_0x3b4524[_0x31d34f(0x1ad)]),_0x2974ce=await ensureOpencodePluginConfig(_0x86191f),_0x6d7619?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x3075ba,'opencode':!![]})):(_0x6d7619?.[_0x31d34f(0x18b)](_0x3b4524['AJOpk']),await ensureClaudePlugin(_0x86191f),_0x6d7619?.[_0x31d34f(0x1bd)]('plugin',{'isFirstRun':_0x3075ba}));if(_0x3b4524[_0x31d34f(0x164)](_0x5337af,_0x2974ce)){_0x6d7619?.['trackPhaseStart'](_0x3b4524[_0x31d34f(0x19c)]);try{await _0x3b4524[_0x31d34f(0x16b)](installSkill,_0x31d34f(0x17e),{'level':_0x2974ce['scope'],'cliVersion':getCurrentVersion(),'platform':_0x31d34f(0x160)}),_0x6d7619?.['trackPhaseEnd']('skills',{'isFirstRun':_0x3075ba,'opencode':!![]});}catch(_0x47619f){console[_0x31d34f(0x192)]('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x47619f instanceof Error?_0x47619f[_0x31d34f(0x198)]:_0x47619f),_0x6d7619?.[_0x31d34f(0x1bd)]('skills',{'isFirstRun':_0x3075ba,'opencode':!![],'failed':!![]});}}else _0x6d7619?.[_0x31d34f(0x18b)](_0x3b4524['UiRID']),await _0x3b4524[_0x31d34f(0x17c)](ensureClaudeSkills,_0x86191f),_0x6d7619?.[_0x31d34f(0x1bd)]('skills',{'isFirstRun':_0x3075ba});if(!_0xf85a9e&&!_0x3fdb2e?.[_0x31d34f(0x1ae)])console['log'](_0x31d34f(0x19b)),console['log']('\x20\x20'+bold(_0x3b4524['rFQah'])+'\x0a');else{_0x6d7619?.['trackPhaseStart']('profile');const _0xfce09e=await _0x3b4524[_0x31d34f(0x1b4)](ensureLocalEnv,{'url':_0x3fdb2e?.[_0x31d34f(0x1ae)],'force':_0x3fdb2e?.[_0x31d34f(0x197)]},_0x6d7619);_0x6d7619?.['trackPhaseEnd'](_0x3b4524['dXtzX'],{'isFirstRun':_0x3075ba,'profileReady':_0xfce09e['ready'],'userSkipped':_0xfce09e[_0x31d34f(0x1aa)]}),_0xfce09e['ready']&&console[_0x31d34f(0x168)]('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x5337af)console[_0x31d34f(0x168)](_0x3b4524['IIQUy']),console[_0x31d34f(0x168)](_0x3b4524[_0x31d34f(0x1a4)]),console[_0x31d34f(0x168)](_0x3b4524[_0x31d34f(0x1b5)]),console['log']('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0xb01b62=bold(_0x31d34f(0x1a0));console['log']('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0xb01b62+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
1
+ 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 +1 @@
1
- const _0x195f95=_0xb971;(function(_0x323aa8,_0x465c04){const _0x2aa33f=_0xb971,_0x4972b4=_0x323aa8();while(!![]){try{const _0x551c34=parseInt(_0x2aa33f(0x7c))/0x1+parseInt(_0x2aa33f(0xc1))/0x2*(parseInt(_0x2aa33f(0xb3))/0x3)+-parseInt(_0x2aa33f(0x7d))/0x4+parseInt(_0x2aa33f(0x7e))/0x5+parseInt(_0x2aa33f(0xb7))/0x6*(parseInt(_0x2aa33f(0x89))/0x7)+-parseInt(_0x2aa33f(0x9a))/0x8+-parseInt(_0x2aa33f(0x9e))/0x9;if(_0x551c34===_0x465c04)break;else _0x4972b4['push'](_0x4972b4['shift']());}catch(_0x2771ec){_0x4972b4['push'](_0x4972b4['shift']());}}}(_0x7597,0x8577b));import{readFile,readdir}from'fs/promises';function _0xb971(_0x5570ec,_0x319baa){_0x5570ec=_0x5570ec-0x6b;const _0x759789=_0x7597();let _0xb97147=_0x759789[_0x5570ec];return _0xb97147;}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=_0x171ede=>_0x195f95(0x92)+_0x171ede+_0x195f95(0xa0),link=(_0x316eb4,_0x3dfb54)=>'\x1b]8;;file://'+_0x316eb4+'\x07'+(_0x3dfb54||_0x316eb4)+_0x195f95(0xa4);async function getOpencodePluginStatus(){const _0x2f915c=_0x195f95,_0x2caa6f={'gzTJo':function(_0xc28fa2,_0x4f94c3){return _0xc28fa2(_0x4f94c3);},'vCtHA':function(_0x39b698,_0x46253e){return _0x39b698!==_0x46253e;},'rKeUu':'opencode-plugin','JYQhm':function(_0x481ee5,_0x1732e9){return _0x481ee5>_0x1732e9;},'aPGcv':function(_0x4eb5e6,_0x2a362e){return _0x4eb5e6(_0x2a362e);},'vIezM':function(_0x4e829d,_0x2065bd){return _0x4e829d(_0x2065bd);},'bgcHi':_0x2f915c(0x84),'CQfxP':'debug','bnrZs':'pipe','dcQyf':_0x2f915c(0x80),'EBOSz':_0x2f915c(0x8b)};return new Promise(_0x5444b5=>{const _0x5450b0=_0x2f915c,_0x425655={'HlHSt':function(_0x99bed2,_0x5ce2d9){return _0x2caa6f['vCtHA'](_0x99bed2,_0x5ce2d9);},'oIiAo':_0x2caa6f[_0x5450b0(0xce)],'Jpkdf':function(_0x14aead,_0x130546){const _0x3e1687=_0x5450b0;return _0x2caa6f[_0x3e1687(0xc6)](_0x14aead,_0x130546);},'qQAcZ':function(_0x53bdbb,_0x462aaf){return _0x2caa6f['aPGcv'](_0x53bdbb,_0x462aaf);},'EaArY':function(_0x47ef7f,_0x1d8604){const _0x3368c8=_0x5450b0;return _0x2caa6f[_0x3368c8(0x7a)](_0x47ef7f,_0x1d8604);}},_0x380bc6=spawn(_0x2caa6f[_0x5450b0(0x8e)],[_0x2caa6f[_0x5450b0(0xa1)],_0x5450b0(0xcb)],{'stdio':[_0x5450b0(0x97),'pipe',_0x2caa6f['bnrZs']]});let _0x53132b='';_0x380bc6[_0x5450b0(0x9f)]?.['on'](_0x2caa6f['dcQyf'],_0x2f5f68=>{const _0x3997ec=_0x5450b0;_0x53132b+=_0x2f5f68[_0x3997ec(0xa2)]();}),_0x380bc6[_0x5450b0(0x9c)]?.['on'](_0x2caa6f['dcQyf'],_0x31eaf8=>{_0x53132b+=_0x31eaf8['toString']();}),_0x380bc6['on']('error',()=>{const _0x257465=_0x5450b0;_0x2caa6f[_0x257465(0xc2)](_0x5444b5,{'status':'not_installed'});}),_0x380bc6['on'](_0x2caa6f['EBOSz'],_0x390b17=>{const _0x1ec7f4=_0x5450b0;if(_0x390b17!==0x0){_0x5444b5({'status':_0x1ec7f4(0x93)});return;}const _0xa4b55=_0x53132b['trim']();let _0x1e8289=null;if(_0xa4b55)try{_0x1e8289=JSON['parse'](_0xa4b55);}catch{const _0x3febe6=_0xa4b55['match'](/\{[\s\S]*\}$/);if(_0x3febe6)try{_0x1e8289=JSON['parse'](_0x3febe6[0x0]);}catch{_0x1e8289=null;}}const _0x5866ce=Array['isArray'](_0x1e8289?.['plugin'])?_0x1e8289?.[_0x1ec7f4(0x83)]:[],_0x2255da=_0x5866ce['some'](_0x1899ed=>{const _0x2ba1a8=_0x1ec7f4;if(_0x425655['HlHSt'](typeof _0x1899ed,_0x2ba1a8(0x96)))return![];return _0x1899ed[_0x2ba1a8(0x78)](_0x2ba1a8(0xb4))||_0x1899ed[_0x2ba1a8(0x78)](_0x425655['oIiAo']);});if(_0x2255da){_0x5444b5({'status':_0x1ec7f4(0xb2),'details':_0x425655[_0x1ec7f4(0xd1)](_0x5866ce['length'],0x0)?_0x5866ce[_0x1ec7f4(0x88)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0x425655[_0x1ec7f4(0xd1)](_0x5866ce[_0x1ec7f4(0x88)],0x0)){_0x425655[_0x1ec7f4(0xc5)](_0x5444b5,{'status':'not_configured','details':_0x5866ce[_0x1ec7f4(0x88)]+_0x1ec7f4(0xc3)});return;}_0x425655['EaArY'](_0x5444b5,{'status':'not_configured'});});});}async function getSkillsFromDir(_0x1f273e,_0x1f150d){const _0x5a9337=_0x195f95,_0x302a6f={'eGrUw':function(_0x48f573,_0x4a4420,_0x39ea43,_0x4c4dc6){return _0x48f573(_0x4a4420,_0x39ea43,_0x4c4dc6);},'KLFXN':function(_0x2cc034,_0xd9ac4f,_0x25ef8d){return _0x2cc034(_0xd9ac4f,_0x25ef8d);}};if(!existsSync(_0x1f273e))return[];const _0x14d9f7=[];try{const _0x4f2f84=await readdir(_0x1f273e,{'withFileTypes':!![]});for(const _0x399f5f of _0x4f2f84){if(_0x399f5f['isDirectory']()){const _0x51418a=_0x302a6f[_0x5a9337(0x94)](join,_0x1f273e,_0x399f5f['name'],_0x5a9337(0xb8));if(existsSync(_0x51418a)){let _0x441fcd=_0x399f5f[_0x5a9337(0xb0)];try{const _0x3112bd=await _0x302a6f[_0x5a9337(0xb6)](readFile,_0x51418a,'utf-8'),_0x3fc2e5=_0x3112bd[_0x5a9337(0xae)](/name:\s*(.+)/);_0x3fc2e5&&(_0x441fcd=_0x3fc2e5[0x1][_0x5a9337(0xa7)]());}catch{}_0x14d9f7['push']({'name':_0x399f5f['name'],'displayName':_0x441fcd,'path':_0x51418a,'level':_0x1f150d});}}}}catch{return[];}return _0x14d9f7;}async function getInstalledSkills(){const _0x35a37c=_0x195f95,_0x2c645e={'cDfiO':function(_0xf7a059,_0xba0fd1,_0xb61c63){return _0xf7a059(_0xba0fd1,_0xb61c63);},'zDpOU':_0x35a37c(0xc9),'ckNed':function(_0x24dc14){return _0x24dc14();}},[_0x2b1d3f,_0x49d639]=await Promise['all']([_0x2c645e[_0x35a37c(0xb5)](getSkillsFromDir,getProjectSkillsDir(),_0x2c645e['zDpOU']),_0x2c645e['cDfiO'](getSkillsFromDir,_0x2c645e['ckNed'](getUserSkillsDir),'user')]);return{'project':_0x2b1d3f,'user':_0x49d639};}async function getEnvironments(){const _0x40246c=_0x195f95,_0x50edf0={'spDBd':function(_0x435d80,_0x80676c){return _0x435d80(_0x80676c);},'pqIby':'settings.json','knONd':function(_0x414f90,_0x51ea6c,_0x4c1d49){return _0x414f90(_0x51ea6c,_0x4c1d49);},'NwTiI':'auth.json','rwVlC':'(not\x20found)','iClKB':function(_0x5ef48b){return _0x5ef48b();}},{envNames:_0x1b840b,activeEnv:_0x54d284}=await _0x50edf0['iClKB'](getEnvNames),_0x411832=getRangerDir();if(!existsSync(_0x411832))return{'envs':[],'activeEnv':null};const _0x56436e=_0x1b840b[_0x40246c(0xba)](_0x33bedf=>{const _0x2cf34f=_0x40246c,_0x215376=_0x50edf0[_0x2cf34f(0x9d)](getEnvDir,_0x33bedf),_0xb62b01=join(_0x215376,_0x50edf0[_0x2cf34f(0x87)]),_0x259da1=_0x50edf0[_0x2cf34f(0x72)](join,_0x215376,_0x50edf0['NwTiI']),_0x10934d=join(_0x215376,'auth.json.enc');return{'name':_0x33bedf,'settingsPath':_0x50edf0['spDBd'](existsSync,_0xb62b01)?_0xb62b01:_0x50edf0['rwVlC'],'hasPlaintextAuth':existsSync(_0x259da1),'hasEncryptedAuth':existsSync(_0x10934d),'isActive':_0x33bedf===_0x54d284};});return{'envs':_0x56436e,'activeEnv':_0x54d284};}function _0x7597(){const _0x570976=['WunsP','No\x20skills\x20installed','Jpkdf','plaintext','\x0a\x20\x20No\x20active\x20profile\x20set','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','enabled','displayName','status','cDJnH','knONd','sbnPM','Version:\x20','\x20\x20Run:\x20ranger\x20setup\x20[token]','log','RGdbO','includes','\x0a📊\x20Ranger\x20Status\x0a','vIezM','Organization:\x20','473327eMEzCS','2071412EtfLUu','1357150tMSjIl','\x20\x20Run:\x20ranger\x20skillup','data','hpupf','RdzFe','plugin','opencode','(not\x20found)','path','pqIby','length','469AqHqYO','FOmhv','close','\x20\x20Run:\x20ranger\x20setup\x20--opencode','\x0a---\x20Skills\x20---','bgcHi','user','\x20\x20User-level:','KLFgs','\x1b[1m','not_installed','eGrUw','No\x20profiles\x20configured','string','ignore','DEBUG','LYsym','4329448QoIDOf','\x20\x20\x20\x20Settings:\x20','stderr','spDBd','3709305LwXkcD','stdout','\x1b[0m','CQfxP','toString','success','\x1b]8;;\x07','scope','filter','trim','details','HLZiT','hasPlaintextAuth','\x20\x20Project-level:','RtLzv','\x0a---\x20Profiles\x20---','match','\x20\x20Not\x20installed','name','\x20\x20Run:\x20ranger\x20update','configured','1934337EtAElS','@ranger-testing/opencode-plugin','cDfiO','KLFXN','56268MOTkvi','SKILL.md','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','map','tKsNK','bjnRD','\x20(active)','\x20\x20Not\x20configured','GwbzL','Root:\x20','2eEvSmN','gzTJo','\x20plugin(s)\x20configured','isActive','qQAcZ','JYQhm',':\x20configured','settingsPath','project','API\x20Environment:\x20','config','hasEncryptedAuth','\x0a---\x20OpenCode\x20Plugin\x20---','rKeUu'];_0x7597=function(){return _0x570976;};return _0x7597();}export async function status(){const _0x318c14=_0x195f95,_0x30e77e={'bjnRD':function(_0x23ad29,_0x104a65){return _0x23ad29(_0x104a65);},'wjgMv':function(_0x4f08e6,_0x4bd9ad,_0x4d5b00){return _0x4f08e6(_0x4bd9ad,_0x4d5b00);},'RGdbO':function(_0x84b3ef,_0x3d7fb9){return _0x84b3ef(_0x3d7fb9);},'ukxEN':function(_0x1aed0f,_0x49ced5){return _0x1aed0f!==_0x49ced5;},'RtLzv':function(_0x18e0e4){return _0x18e0e4();},'WunsP':function(_0x1a0a92,_0x3e9282){return _0x1a0a92===_0x3e9282;},'sbnPM':'configured','iZPBS':'@ranger-testing/opencode-plugin','FOmhv':function(_0x47750a,_0x4fa48d){return _0x47750a===_0x4fa48d;},'RdzFe':'not_configured','LYsym':_0x318c14(0x8c),'HLZiT':'ranger@trailhead','VZIqX':_0x318c14(0x6e),'KLFgs':_0x318c14(0xaf),'tKsNK':_0x318c14(0x8d),'CdFfP':function(_0x5d24c3){return _0x5d24c3();},'RoxkH':function(_0x5bf060,_0x36d53b){return _0x5bf060+_0x36d53b;},'cDJnH':_0x318c14(0xd0),'EqtwZ':function(_0x10ad1d,_0x50adae){return _0x10ad1d>_0x50adae;},'GwbzL':function(_0x38bfa5,_0x398a87,_0x3a75d4){return _0x38bfa5(_0x398a87,_0x3a75d4);},'brglD':function(_0x5cff75,_0x4b0fc5){return _0x5cff75(_0x4b0fc5);},'hpupf':function(_0x3a11e5,_0x191c1a,_0x2f93d5){return _0x3a11e5(_0x191c1a,_0x2f93d5);},'jmTzP':function(_0x5518d7){return _0x5518d7();},'iiFUD':_0x318c14(0x95),'ghQUY':_0x318c14(0x6b),'Tczpi':_0x318c14(0x85)};console['log'](_0x318c14(0x79));const _0x4c8b49=process['cwd'](),_0x7a32a8=getRangerDir();if(!_0x30e77e[_0x318c14(0xbc)](existsSync,_0x7a32a8)){console[_0x318c14(0x76)](_0x318c14(0xc0)+_0x30e77e['wjgMv'](link,_0x4c8b49,bold(basename(_0x4c8b49)))),console[_0x318c14(0x76)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log'](_0x318c14(0xc0)+link(_0x4c8b49,_0x30e77e[_0x318c14(0xbc)](bold,_0x30e77e[_0x318c14(0x77)](basename,_0x4c8b49))));const _0xa050e4=getCurrentVersion(),_0xde048d=getLatestVersion();if(_0xde048d&&_0x30e77e['ukxEN'](_0xde048d,_0xa050e4))console[_0x318c14(0x76)](_0x318c14(0x74)+_0xa050e4+'\x20(latest:\x20'+_0xde048d+')'),console['log'](_0x318c14(0xb1));else _0xde048d?console['log']('Version:\x20'+_0xa050e4+'\x20(up\x20to\x20date)'):console[_0x318c14(0x76)](_0x318c14(0x74)+_0xa050e4);const _0x3ed4f1=await _0x30e77e[_0x318c14(0xac)](getToken);if(_0x3ed4f1){const _0x49f9d1=await getCurrentUser(_0x3ed4f1);_0x49f9d1[_0x318c14(0xa3)]?console['log'](_0x318c14(0x7b)+bold(_0x49f9d1[_0x318c14(0x8f)]['organizationName'])):(console['log'](_0x318c14(0x6d)),console[_0x318c14(0x76)](_0x318c14(0x75)));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x318c14(0x75));process['env'][_0x318c14(0x98)]&&(console[_0x318c14(0x76)](_0x318c14(0xca)+getCurrentEnvironment()),console[_0x318c14(0x76)]('API\x20URL:\x20'+_0x30e77e['RtLzv'](getApiBaseUrl)));console[_0x318c14(0x76)](_0x318c14(0xcd));const _0x23cb27=await getOpencodePluginStatus();if(_0x30e77e[_0x318c14(0xcf)](_0x23cb27[_0x318c14(0x70)],_0x30e77e[_0x318c14(0x73)]))console['log']('\x20\x20'+_0x30e77e['RGdbO'](bold,_0x30e77e['iZPBS'])+_0x318c14(0xc7)),_0x23cb27['details']&&console['log']('\x20\x20'+_0x23cb27[_0x318c14(0xa8)]);else _0x30e77e[_0x318c14(0x8a)](_0x23cb27[_0x318c14(0x70)],_0x30e77e[_0x318c14(0x82)])?(console['log'](_0x318c14(0xbe)),_0x23cb27['details']&&console['log']('\x20\x20'+_0x23cb27[_0x318c14(0xa8)]),console[_0x318c14(0x76)](_0x30e77e[_0x318c14(0x99)])):console[_0x318c14(0x76)]('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x344f43=await getPluginInfo(_0x30e77e[_0x318c14(0xa9)]);if(_0x344f43){const _0x5342c9=_0x344f43[_0x318c14(0xa5)]||'unknown',_0x264579=_0x344f43['enabled']?_0x30e77e['VZIqX']:'disabled';console[_0x318c14(0x76)]('\x20\x20'+bold('ranger@trailhead')+':\x20installed\x20('+_0x5342c9+',\x20'+_0x264579+')');}else console['log'](_0x30e77e[_0x318c14(0x91)]),console[_0x318c14(0x76)](_0x318c14(0xb9));console['log'](_0x30e77e[_0x318c14(0xbb)]);const {project:_0x5ae53f,user:_0x548968}=await _0x30e77e['CdFfP'](getInstalledSkills),_0x92028e=_0x5ae53f['filter'](_0x1eada6=>RANGER_MANAGED_SKILLS[_0x318c14(0x78)](_0x1eada6['name'])),_0x3bb24=_0x548968[_0x318c14(0xa6)](_0x1c2641=>RANGER_MANAGED_SKILLS['includes'](_0x1c2641['name'])),_0xb94201=_0x30e77e['RoxkH'](_0x92028e[_0x318c14(0x88)],_0x3bb24[_0x318c14(0x88)]);if(_0xb94201===0x0)console['log'](_0x30e77e[_0x318c14(0x71)]),console['log'](_0x318c14(0x7f));else{if(_0x30e77e['EqtwZ'](_0x92028e[_0x318c14(0x88)],0x0)){console['log'](_0x318c14(0xab));for(const _0x5ddbb3 of _0x92028e){console['log']('\x20\x20\x20\x20'+bold(_0x5ddbb3['displayName'])+':\x20'+_0x30e77e[_0x318c14(0xbf)](link,_0x5ddbb3[_0x318c14(0x86)],_0x30e77e['brglD'](basename,_0x5ddbb3[_0x318c14(0x86)])));}}if(_0x3bb24['length']>0x0){console[_0x318c14(0x76)](_0x318c14(0x90));for(const _0x2da03c of _0x3bb24){console['log']('\x20\x20\x20\x20'+bold(_0x2da03c[_0x318c14(0x6f)])+':\x20'+_0x30e77e[_0x318c14(0x81)](link,_0x2da03c[_0x318c14(0x86)],_0x30e77e[_0x318c14(0xbc)](basename,_0x2da03c['path'])));}}}console['log'](_0x318c14(0xad));const {envs:_0x4b049f,activeEnv:_0x358a7a}=await _0x30e77e['jmTzP'](getEnvironments);if(_0x30e77e['FOmhv'](_0x4b049f[_0x318c14(0x88)],0x0))console[_0x318c14(0x76)](_0x30e77e['iiFUD']),console['log']('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x4ed885 of _0x4b049f){const _0x2e959a=_0x4ed885[_0x318c14(0xc4)]?_0x318c14(0xbd):'',_0x256d30=_0x4ed885[_0x318c14(0xcc)]?'encrypted':_0x4ed885[_0x318c14(0xaa)]?_0x30e77e['ghQUY']:'none';console[_0x318c14(0x76)]('\x20\x20'+bold(_0x4ed885['name'])+_0x2e959a),console[_0x318c14(0x76)]('\x20\x20\x20\x20Auth:\x20'+_0x256d30),_0x4ed885[_0x318c14(0xc8)]!==_0x30e77e['Tczpi']&&console['log'](_0x318c14(0x9b)+_0x30e77e['wjgMv'](link,_0x4ed885[_0x318c14(0xc8)],_0x30e77e[_0x318c14(0x77)](basename,_0x4ed885[_0x318c14(0xc8)])));}!_0x358a7a&&(console['log'](_0x318c14(0x6c)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x4b049f['map'](_0xe9afc0=>_0xe9afc0[_0x318c14(0xb0)])['join'](',\x20')+')'));}console[_0x318c14(0x76)]('');}
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 +1 @@
1
- (function(_0x438247,_0x3fed15){const _0x515abc=_0x225c,_0x2c76e6=_0x438247();while(!![]){try{const _0x480a1a=-parseInt(_0x515abc(0x16a))/0x1*(parseInt(_0x515abc(0x15a))/0x2)+-parseInt(_0x515abc(0x152))/0x3*(parseInt(_0x515abc(0x159))/0x4)+parseInt(_0x515abc(0x165))/0x5+-parseInt(_0x515abc(0x14a))/0x6*(parseInt(_0x515abc(0x14b))/0x7)+parseInt(_0x515abc(0x157))/0x8+-parseInt(_0x515abc(0x154))/0x9*(parseInt(_0x515abc(0x14d))/0xa)+-parseInt(_0x515abc(0x16d))/0xb*(-parseInt(_0x515abc(0x162))/0xc);if(_0x480a1a===_0x3fed15)break;else _0x2c76e6['push'](_0x2c76e6['shift']());}catch(_0x5799ac){_0x2c76e6['push'](_0x2c76e6['shift']());}}}(_0xeafd,0xe487f));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 _0xeafd(){const _0x153c58=['ranger@trailhead',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','159066lXbdpn','7TAylFt','Latest\x20version:\x20\x20','74090jyjsdD','push','log','close','trim','926910qzmPms','error','1881VrmYxY','\x20\x20Failed\x20to\x20reinstall\x20','Failed\x20to\x20check\x20for\x20updates.\x20Please\x20check\x20your\x20network\x20connection.','5285704xEPkWa','\x0a✅\x20Update\x20complete!','20ogUrVR','178gGkURR','win32','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','pNvlf','NdlTi','fPcTJ','update','--scope','516peHyTo','QDyZK','endsWith','2295535pCQkBq','opencode','.gitignore','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','inherit','14734JnMjwA','ATzJn','npm','1086547WAXAHQ','claude','NVMPh','active-feature.txt','platform','bKeyM','install','hEFcB','Claude\x20plugin\x20updated\x20(project\x20scope).','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','CsSBj','length','plugin','IEbaD','project','split','NAKPk','GQpAz','LoUMr','trailhead','warn','EEBWt','LkKxH','\x0aInstalling\x20','✓\x20Migrated\x20active\x20profile\x20file'];_0xeafd=function(){return _0x153c58;};return _0xeafd();}import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';function _0x225c(_0x28c1da,_0x10f703){_0x28c1da=_0x28c1da-0x139;const _0xeafd2d=_0xeafd();let _0x225ccc=_0xeafd2d[_0x28c1da];return _0x225ccc;}import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x4fa571=_0x225c,_0x108b8f={'gvtTx':function(_0x5aa96b,_0x3dbc92){return _0x5aa96b(_0x3dbc92);},'YIqHK':_0x4fa571(0x16c),'rmhWV':_0x4fa571(0x169),'NdlTi':'error'};return new Promise(_0x38ea48=>{const _0x30fe97=_0x4fa571,_0x478238={'bKzuW':function(_0x2b597e,_0x1ab84c){return _0x108b8f['gvtTx'](_0x2b597e,_0x1ab84c);}};console['log'](_0x30fe97(0x146)+PACKAGE_NAME+'@latest...\x0a');const _0x147395=spawn(_0x108b8f['YIqHK'],[_0x30fe97(0x173),'-g',PACKAGE_NAME+'@latest'],{'stdio':_0x108b8f['rmhWV'],'shell':process['platform']===_0x30fe97(0x15b)});_0x147395['on'](_0x30fe97(0x150),_0x34604d=>{_0x38ea48(_0x34604d===0x0);}),_0x147395['on'](_0x108b8f[_0x30fe97(0x15e)],()=>{_0x478238['bKzuW'](_0x38ea48,![]);});});}async function updateClaudeMarketplace(){const _0x1b507f=_0x225c,_0x5cdb2d={'EEBWt':function(_0x3e1d1e,_0x4e042d){return _0x3e1d1e(_0x4e042d);},'NVMPh':'claude','rclJl':_0x1b507f(0x142),'jzSQa':function(_0x4278fe,_0x520834){return _0x4278fe===_0x520834;},'JtVJk':'win32','LUvDb':'error'};return new Promise(_0xcf8fd6=>{const _0x476d29=_0x1b507f,_0x1ab02d={'QDyZK':function(_0xf9d413,_0x40d829){const _0x25b7fd=_0x225c;return _0x5cdb2d[_0x25b7fd(0x144)](_0xf9d413,_0x40d829);}},_0x27f30f=spawn(_0x5cdb2d[_0x476d29(0x16f)],[_0x476d29(0x13b),'marketplace',_0x476d29(0x160),_0x5cdb2d['rclJl']],{'stdio':'pipe','shell':_0x5cdb2d['jzSQa'](process['platform'],_0x5cdb2d['JtVJk'])});_0x27f30f['on']('close',_0x17f0fc=>{const _0x1c29e4=_0x476d29;_0x1ab02d[_0x1c29e4(0x163)](_0xcf8fd6,_0x17f0fc===0x0);}),_0x27f30f['on'](_0x5cdb2d['LUvDb'],()=>{_0xcf8fd6(![]);});});}async function updateClaudePlugin(_0x2ce002){const _0x57801a=_0x225c,_0x368c95={'REevZ':'pipe','TrLKI':function(_0x3370fb,_0x2f985b){return _0x3370fb===_0x2f985b;},'MiBkb':_0x57801a(0x153)};return new Promise(_0x40a3f3=>{const _0x3a7c5e=_0x57801a,_0x1790e0=['plugin',_0x3a7c5e(0x160),_0x3a7c5e(0x148)];_0x2ce002&&_0x1790e0[_0x3a7c5e(0x14e)](_0x3a7c5e(0x161),_0x2ce002);const _0x49779b=spawn(_0x3a7c5e(0x16e),_0x1790e0,{'stdio':_0x368c95['REevZ'],'shell':_0x368c95['TrLKI'](process[_0x3a7c5e(0x171)],_0x3a7c5e(0x15b))});_0x49779b['on'](_0x3a7c5e(0x150),_0x1d1eff=>{_0x40a3f3(_0x1d1eff===0x0);}),_0x49779b['on'](_0x368c95['MiBkb'],()=>{_0x40a3f3(![]);});});}function isSkillInstalled(_0x2c2338,_0xd9db97,_0x448763){const _0x5246bc=_0x225c,_0x10c442={'fPcTJ':function(_0x3869bb,_0x429707){return _0x3869bb===_0x429707;},'CeKZy':_0x5246bc(0x166),'NAKPk':function(_0xefb4a4,_0x337199){return _0xefb4a4(_0x337199);},'fGBfB':function(_0xc27475,_0x549534){return _0xc27475(_0x549534);}},_0x207cc1=_0x10c442[_0x5246bc(0x15f)](_0x448763,_0x10c442['CeKZy'])?getOpencodeSkillsDir(_0xd9db97):_0x10c442[_0x5246bc(0x13f)](getSkillsDir,_0xd9db97),_0x20c6c3=join(_0x207cc1,_0x2c2338);return _0x10c442['fGBfB'](existsSync,_0x20c6c3);}async function reinstallSkills(_0x4eb536){const _0x20cf66=_0x225c,_0x1e4fa1={'IEbaD':_0x20cf66(0x16e),'mwbSG':'opencode','hlTcp':function(_0x30443a,_0x294610,_0x1a4838){return _0x30443a(_0x294610,_0x1a4838);},'GQpAz':_0x20cf66(0x176),'CsSBj':function(_0x5b6bb0,_0x40fe1a,_0x2a3918){return _0x5b6bb0(_0x40fe1a,_0x2a3918);}},_0x4fa88c=[_0x20cf66(0x13d),'user'],_0x39abd1=[];for(const _0x550bd8 of _0x4fa88c){for(const _0x37466b of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x37466b,_0x550bd8,_0x1e4fa1[_0x20cf66(0x13c)])&&_0x39abd1['push']({'skillName':_0x37466b,'level':_0x550bd8,'platform':_0x1e4fa1[_0x20cf66(0x13c)]}),isSkillInstalled(_0x37466b,_0x550bd8,_0x1e4fa1['mwbSG'])&&_0x39abd1['push']({'skillName':_0x37466b,'level':_0x550bd8,'platform':_0x1e4fa1['mwbSG']});}}for(const _0x5ad43e of _0x4fa88c){for(const _0x22ba99 of DEPRECATED_SKILLS){await _0x1e4fa1['hlTcp'](removeSkill,_0x22ba99,_0x5ad43e);}}if(_0x39abd1[_0x20cf66(0x13a)]===0x0){console[_0x20cf66(0x14f)](_0x1e4fa1[_0x20cf66(0x140)]);return;}console['log']('\x0aReinstalling\x20'+_0x39abd1[_0x20cf66(0x13a)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x307ed5,level:_0x5b99c5,platform:_0x42c251}of _0x39abd1){try{await _0x1e4fa1[_0x20cf66(0x139)](installSkill,_0x307ed5,{'level':_0x5b99c5,'cliVersion':_0x4eb536,'platform':_0x42c251});}catch(_0x3f65d1){console[_0x20cf66(0x143)](_0x20cf66(0x155)+_0x42c251+'\x20'+_0x5b99c5+'\x20skill\x20'+_0x307ed5+':',_0x3f65d1);}}}async function ensureActiveProfileGitignored(){const _0x2d09ec=_0x225c,_0x1cb4f9={'LoUMr':function(_0x4366ea,_0x51be38){return _0x4366ea(_0x51be38);},'mdSwQ':function(_0x5bdc6c,_0x49a87f,_0xea4bbd){return _0x5bdc6c(_0x49a87f,_0xea4bbd);},'bKeyM':'utf-8','NrfGJ':function(_0x53fefb,_0x318f36){return _0x53fefb===_0x318f36;},'ayspM':'active-profile.txt'},_0x24131c=join(getRangerDir(),_0x2d09ec(0x167));if(!_0x1cb4f9[_0x2d09ec(0x141)](existsSync,_0x24131c))return![];let _0x5b21ed='';try{_0x5b21ed=await _0x1cb4f9['mdSwQ'](readFile,_0x24131c,_0x1cb4f9[_0x2d09ec(0x172)]);}catch{return![];}const _0x3a4e27=_0x5b21ed[_0x2d09ec(0x13e)](/\r?\n/);if(_0x3a4e27['some'](_0xafc259=>_0xafc259[_0x2d09ec(0x151)]()==='active-profile.txt'))return![];let _0x256808=_0x3a4e27['findIndex'](_0x3fb59b=>_0x3fb59b[_0x2d09ec(0x151)]()===_0x2d09ec(0x170));_0x1cb4f9['NrfGJ'](_0x256808,-0x1)&&(_0x256808=_0x3a4e27['length']);_0x3a4e27['splice'](_0x256808,0x0,_0x1cb4f9['ayspM']);let _0x24a129=_0x3a4e27['join']('\x0a');!_0x24a129[_0x2d09ec(0x164)]('\x0a')&&(_0x24a129+='\x0a');try{await writeFile(_0x24131c,_0x24a129,_0x1cb4f9[_0x2d09ec(0x172)]);}catch{return![];}return!![];}export async function update(){const _0x494c39=_0x225c,_0x536db6={'ATzJn':'Checking\x20for\x20updates...','pNvlf':function(_0x508ab4){return _0x508ab4();},'vtwuq':function(_0x3fb7c2,_0x4b7ca0,_0x5839a2){return _0x3fb7c2(_0x4b7ca0,_0x5839a2);},'SAYfu':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','JuIIQ':function(_0x2728c7,_0x14b36b){return _0x2728c7<_0x14b36b;},'LkKxH':function(_0x4f8799){return _0x4f8799();},'hEFcB':function(_0x14f960,_0xe6a52a){return _0x14f960(_0xe6a52a);},'RIuVn':_0x494c39(0x13d)},_0x46f69c=getCurrentVersion();console[_0x494c39(0x14f)]('\x0aCurrent\x20version:\x20'+_0x46f69c),console['log'](_0x536db6[_0x494c39(0x16b)]);const _0x11806d=_0x536db6['pNvlf'](getLatestVersion);if(!_0x11806d)throw new Error(_0x494c39(0x156));console['log'](_0x494c39(0x14c)+_0x11806d);const _0x5713f4=_0x536db6['vtwuq'](compareVersions,_0x46f69c,_0x11806d);let _0x18ed6f=_0x46f69c;if(_0x5713f4===0x0)console[_0x494c39(0x14f)](_0x536db6['SAYfu']);else{if(_0x536db6['JuIIQ'](_0x5713f4,0x0))console['log']('\x0aYour\x20version\x20('+_0x46f69c+_0x494c39(0x149)+_0x11806d+').');else{const _0x2c3ba9=await _0x536db6[_0x494c39(0x145)](runInstall);if(_0x2c3ba9)console[_0x494c39(0x14f)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x11806d),_0x18ed6f=_0x11806d;else throw new Error('Update\x20failed.\x20You\x20may\x20need\x20to\x20run\x20with\x20sudo:\x20sudo\x20npm\x20install\x20-g\x20'+PACKAGE_NAME+'@latest');}}await _0x536db6['hEFcB'](reinstallSkills,_0x18ed6f);const _0x8f184c=await isMarketplaceAdded('trailhead'),_0x43e760=await isPluginInstalled(_0x494c39(0x148));if(_0x8f184c){const _0x30b6a7=await updateClaudeMarketplace();_0x30b6a7&&console[_0x494c39(0x14f)](_0x494c39(0x15c));}if(_0x43e760){const _0x2d1e8c=await _0x536db6[_0x494c39(0x15d)](updateClaudePlugin);_0x2d1e8c&&console[_0x494c39(0x14f)](_0x494c39(0x168));const _0x559c43=await _0x536db6[_0x494c39(0x174)](updateClaudePlugin,_0x536db6['RIuVn']);_0x559c43&&console[_0x494c39(0x14f)]((_0x2d1e8c?'':'\x0a')+_0x494c39(0x175));}const _0x8c312=await _0x536db6['pNvlf'](migrateActiveProfileFile);_0x8c312&&console['log'](_0x494c39(0x147));const _0x19d278=await ensureActiveProfileGitignored();console[_0x494c39(0x14f)](_0x494c39(0x158));}
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']);}