@ranger-testing/ranger-cli 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +10 -1
  2. package/build/cli.js +1 -1
  3. package/build/commands/addEnv.js +1 -1
  4. package/build/commands/authEncrypt.js +1 -1
  5. package/build/commands/clean.js +1 -1
  6. package/build/commands/config.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/setup/claude.js +1 -1
  26. package/build/commands/setup/opencode.js +1 -1
  27. package/build/commands/setupCi.js +1 -1
  28. package/build/commands/skillup.js +1 -1
  29. package/build/commands/start.js +1 -1
  30. package/build/commands/status.js +1 -1
  31. package/build/commands/update.js +1 -1
  32. package/build/commands/updateEnv.js +1 -1
  33. package/build/commands/useEnv.js +1 -1
  34. package/build/commands/utils/activeProfile.js +1 -1
  35. package/build/commands/utils/browserSessionsApi.js +1 -1
  36. package/build/commands/utils/claudeConfig.js +1 -1
  37. package/build/commands/utils/claudePlugin.js +1 -1
  38. package/build/commands/utils/crypto.js +1 -1
  39. package/build/commands/utils/desirePathLog.js +1 -1
  40. package/build/commands/utils/deviceAuth.js +1 -1
  41. package/build/commands/utils/environment.js +1 -1
  42. package/build/commands/utils/featureApi.js +1 -1
  43. package/build/commands/utils/featureReportGenerator.js +1 -1
  44. package/build/commands/utils/fixWebmDuration.js +1 -1
  45. package/build/commands/utils/git.js +1 -1
  46. package/build/commands/utils/keychain.js +1 -1
  47. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  48. package/build/commands/utils/mcpImageBase64.js +1 -0
  49. package/build/commands/utils/model.js +1 -0
  50. package/build/commands/utils/opencodeConfig.js +1 -1
  51. package/build/commands/utils/profileMessages.js +1 -1
  52. package/build/commands/utils/profileSetupBanner.js +1 -1
  53. package/build/commands/utils/rangerConfig.js +1 -0
  54. package/build/commands/utils/rangerRoot.js +1 -1
  55. package/build/commands/utils/reportGenerator.js +1 -1
  56. package/build/commands/utils/retry.js +1 -1
  57. package/build/commands/utils/sessionCache.js +1 -1
  58. package/build/commands/utils/settings.js +1 -1
  59. package/build/commands/utils/skillContent.js +1 -1
  60. package/build/commands/utils/skills.js +1 -1
  61. package/build/commands/utils/telemetry.js +1 -1
  62. package/build/commands/utils/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/build/skills/ranger/SKILL.md +16 -14
  67. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x52256b,_0x569503){const _0x57fc42=_0x5cbd,_0x486895=_0x52256b();while(!![]){try{const _0x22ed6e=-parseInt(_0x57fc42(0x83))/0x1*(parseInt(_0x57fc42(0x8f))/0x2)+-parseInt(_0x57fc42(0x93))/0x3+parseInt(_0x57fc42(0x92))/0x4*(parseInt(_0x57fc42(0xa4))/0x5)+parseInt(_0x57fc42(0xa6))/0x6*(-parseInt(_0x57fc42(0x9c))/0x7)+-parseInt(_0x57fc42(0x8d))/0x8+parseInt(_0x57fc42(0x85))/0x9*(-parseInt(_0x57fc42(0x88))/0xa)+parseInt(_0x57fc42(0xa2))/0xb;if(_0x22ed6e===_0x569503)break;else _0x486895['push'](_0x486895['shift']());}catch(_0x5f5143){_0x486895['push'](_0x486895['shift']());}}}(_0x5e38,0xcc585));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';export async function stopHook(_0xfc51fc){const _0x12b48a=_0x5cbd,_0x5e8d3d={'aWDTo':function(_0x12f1c8,_0x49eaa3){return _0x12f1c8(_0x49eaa3);},'dHLvX':function(_0x1fc2ff,_0x2975fd){return _0x1fc2ff(_0x2975fd);},'iEbDq':function(_0xcf49af,_0x3d0b76){return _0xcf49af===_0x3d0b76;},'oWLte':function(_0x419328,_0x4771e3,_0x4ac27d,_0x5f32f6){return _0x419328(_0x4771e3,_0x4ac27d,_0x5f32f6);},'YkpZJ':function(_0x217393){return _0x217393();},'dqTdb':function(_0x49d3de,_0x2cfb00,_0xaf5137){return _0x49d3de(_0x2cfb00,_0xaf5137);},'LFbzc':function(_0x564703,_0x1b278c){return _0x564703&&_0x1b278c;},'FEaSu':function(_0x428855,_0x3fb9b6,_0x3e0e5e,_0xe46f64){return _0x428855(_0x3fb9b6,_0x3e0e5e,_0xe46f64);}},_0x48d752=await _0x5e8d3d[_0x12b48a(0x87)](getEnabledHookContext,_0xfc51fc),_0x1ab5da=_0x48d752?.['sessionId']??null,_0x5cc740=_0x5e8d3d['dHLvX'](Boolean,_0x48d752?.[_0x12b48a(0xa3)]?.[_0x12b48a(0x9a)]),_0x4add56=_0x5e8d3d['iEbDq'](typeof _0x48d752?.['input']?.[_0x12b48a(0x97)],'string')?_0x48d752[_0x12b48a(0xa3)]['transcript_path']:null;let _0xc2104b=!![];if(!_0x1ab5da){await trackStop(_0x1ab5da,![],_0xc2104b);return;}try{const _0x47e16d=_0x5e8d3d[_0x12b48a(0x87)](getSessionEntry,_0x1ab5da);if(!_0x47e16d){await _0x5e8d3d[_0x12b48a(0x9e)](trackStop,_0x1ab5da,!![],_0xc2104b);return;}const _0x249700='https://dashboard.ranger.net/features/'+_0x47e16d['featureId'],_0x262acc='RANGER_SKIP_VERIFICATION',_0x1770b3=await _0x5e8d3d['YkpZJ'](getToken),_0x4563ce=!_0x5cc740;let _0x2a1279=null,_0x260754=null;const _0x46b7c9=_0x5cc740&&await _0x5e8d3d['dqTdb'](transcriptHasToken,_0x4add56,_0x262acc),_0x2ca0ff=await _0x5e8d3d['dqTdb'](transcriptHasToken,_0x4add56,_0x249700);if(_0x1770b3)try{const _0x3a6949=await getFeature(_0x47e16d['featureId']);_0x2a1279=_0x3a6949[_0x12b48a(0x8e)]??null,_0x260754=_0x3a6949['currentSessionId']??null;}catch{}if(_0x5e8d3d[_0x12b48a(0x98)](_0x1770b3,_0x260754))try{await concludeSession(_0x47e16d[_0x12b48a(0x96)],_0x260754);}catch(_0x457406){if(_0x46b7c9){await _0x5e8d3d[_0x12b48a(0x9d)](trackStop,_0x1ab5da,!![],_0xc2104b);return;}_0xc2104b=![];const _0x429dc9=_0x457406 instanceof Error?_0x457406[_0x12b48a(0x99)]:_0x5e8d3d[_0x12b48a(0x8b)](String,_0x457406),_0x2ffe07={'decision':_0x12b48a(0x94),'reason':_0x12b48a(0xa0)+(_0x2a1279?_0x12b48a(0x95)+_0x2a1279+'\x22':'')+_0x12b48a(0xa5)+_0x429dc9+'\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('+_0x249700+_0x12b48a(0x91)+_0x262acc+_0x12b48a(0x9f)};console['log'](JSON['stringify'](_0x2ffe07)),await trackStop(_0x1ab5da,!![],_0xc2104b);return;}await _0x5e8d3d['oWLte'](trackStop,_0x1ab5da,!![],_0xc2104b);return;}catch{await trackStop(_0x1ab5da,!![],_0xc2104b);return;}}function _0x5cbd(_0x24e2b7,_0x43b62e){_0x24e2b7=_0x24e2b7-0x83;const _0x5e3865=_0x5e38();let _0x5cbdc4=_0x5e3865[_0x24e2b7];return _0x5cbdc4;}async function trackStop(_0x477ead,_0xf060ec,_0x4b265d){const _0x3009d4=_0x5cbd,_0x2d53e7={'JhXly':_0x3009d4(0x8a),'NGLBt':function(_0xa571e0,_0x16a1c6){return _0xa571e0??_0x16a1c6;}};try{const _0x1694c8=createTelemetryCollector(_0x2d53e7['JhXly']);await _0x1694c8['trackCommandStart']({'sessionId':_0x2d53e7['NGLBt'](_0x477ead,undefined),'hooksEnabled':_0xf060ec,'stopAllowed':_0x4b265d}),await _0x1694c8['trackCommandEnd']('success');}catch{}}async function transcriptHasToken(_0x9cc51b,_0x24c1dd){const _0x48256c=_0x5cbd,_0x38b86c={'GDpKG':function(_0x34de15,_0x250384,_0x258117){return _0x34de15(_0x250384,_0x258117);}};if(!_0x9cc51b)return![];const _0x2bcbc3=await _0x38b86c['GDpKG'](readTranscriptTail,_0x9cc51b,0x30d40);return _0x2bcbc3?_0x2bcbc3[_0x48256c(0x90)](_0x24c1dd):![];}function _0x5e38(){const _0x18443a=['987464IKYCwS','3146898bZFIkj','block','\x20for\x20\x22','featureId','transcript_path','LFbzc','message','stop_hook_active','size','454951yRqZhO','FEaSu','oWLte','`,\x20then\x20run\x20/exit\x20again.','Failed\x20to\x20conclude\x20Ranger\x20feature\x20review\x20session','utf8','54684883yLpFRx','input','20UVWbJy',':\x0a\x0a','54pjNTjG','141lCGAOQ','read','9972bupdUo','min','aWDTo','9940IqkMLE','PnPqm','hook:stop','dHLvX','upYjK','13228048mQnKab','name','10398XDaELN','includes',')\x20and\x20the\x20token\x20`'];_0x5e38=function(){return _0x18443a;};return _0x5e38();}async function readTranscriptTail(_0x402ceb,_0x20c397){const _0x3cd959=_0x5cbd,_0x11632f={'upYjK':function(_0x1b48b7,_0x280ec3){return _0x1b48b7<=_0x280ec3;},'PnPqm':function(_0x799bb9,_0x519f2a){return _0x799bb9-_0x519f2a;}};let _0x4e8a32=null;try{_0x4e8a32=await open(_0x402ceb,'r');const _0x46f39b=await _0x4e8a32['stat'](),_0x1fcfbe=Math[_0x3cd959(0x86)](_0x46f39b[_0x3cd959(0x9b)],_0x20c397);if(_0x11632f[_0x3cd959(0x8c)](_0x1fcfbe,0x0))return'';const _0x5c04c3=Buffer['alloc'](_0x1fcfbe);return await _0x4e8a32[_0x3cd959(0x84)](_0x5c04c3,0x0,_0x1fcfbe,_0x11632f[_0x3cd959(0x89)](_0x46f39b['size'],_0x1fcfbe)),_0x5c04c3['toString'](_0x3cd959(0xa1));}catch{return null;}finally{try{await _0x4e8a32?.['close']();}catch{}}}
1
+ (function(_0x5d5224,_0x16ad95){const _0x3a0f1d=_0x1437,_0x40f2cf=_0x5d5224();while(!![]){try{const _0xbc6aea=parseInt(_0x3a0f1d(0xff))/0x1+parseInt(_0x3a0f1d(0x114))/0x2*(parseInt(_0x3a0f1d(0x112))/0x3)+parseInt(_0x3a0f1d(0xfa))/0x4*(parseInt(_0x3a0f1d(0x115))/0x5)+-parseInt(_0x3a0f1d(0x104))/0x6*(-parseInt(_0x3a0f1d(0x10c))/0x7)+parseInt(_0x3a0f1d(0x10b))/0x8*(parseInt(_0x3a0f1d(0xf7))/0x9)+-parseInt(_0x3a0f1d(0x106))/0xa*(-parseInt(_0x3a0f1d(0xfe))/0xb)+-parseInt(_0x3a0f1d(0xf9))/0xc;if(_0xbc6aea===_0x16ad95)break;else _0x40f2cf['push'](_0x40f2cf['shift']());}catch(_0x40d25d){_0x40f2cf['push'](_0x40f2cf['shift']());}}}(_0x22f1,0xa80b4));import{open}from'fs/promises';import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';function _0x22f1(){const _0x401917=['769794BoEMIQ','alloc','15070YNGuPC','min',':\x0a\x0a','frNad','transcript_path','56mRLCOx','7XrcuDG','\x20for\x20\x22','JxEqb','currentSessionId','ehDrC','dclOV','3yeqmwm','utf8','286684GmSkmq','505kMEvPI','message','RANGER_SKIP_VERIFICATION','1565469RlFIbJ','featureId','24620124ztHfdZ','40444fAGWJs','trackCommandStart','sessionId','close','847gwrBAp','113507nRFlUE','size','string','RGGSF','input'];_0x22f1=function(){return _0x401917;};return _0x22f1();}import{getSessionEntry}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0xff38f0){const _0x1cedee=_0x1437,_0x433da2={'zDkWu':function(_0x2241d8,_0x2d506d){return _0x2241d8(_0x2d506d);},'dclOV':function(_0x398640,_0x114504){return _0x398640===_0x114504;},'frNad':function(_0x2f00b9,_0x3bad95,_0x1c8f0b,_0x3ced19){return _0x2f00b9(_0x3bad95,_0x1c8f0b,_0x3ced19);},'JxEqb':_0x1cedee(0xf6),'rmNrk':function(_0x2ab5f8,_0x2f2805,_0x1fa080){return _0x2ab5f8(_0x2f2805,_0x1fa080);},'TBAhZ':function(_0x5b95e9,_0x43b04d){return _0x5b95e9&&_0x43b04d;},'iocPu':function(_0x3a8005,_0x4cfec8,_0x4747f7){return _0x3a8005(_0x4cfec8,_0x4747f7);}},_0x5d1211=await _0x433da2['zDkWu'](getEnabledHookContext,_0xff38f0),_0x1a70c5=_0x5d1211?.[_0x1cedee(0xfc)]??null,_0x55cda0=Boolean(_0x5d1211?.[_0x1cedee(0x103)]?.['stop_hook_active']),_0x2213be=_0x433da2[_0x1cedee(0x111)](typeof _0x5d1211?.['input']?.[_0x1cedee(0x10a)],_0x1cedee(0x101))?_0x5d1211[_0x1cedee(0x103)][_0x1cedee(0x10a)]:null;let _0x263878=!![];if(!_0x1a70c5){await trackStop(_0x1a70c5,![],_0x263878);return;}try{const _0x3d6974=getSessionEntry(_0x1a70c5);if(!_0x3d6974){await _0x433da2[_0x1cedee(0x109)](trackStop,_0x1a70c5,!![],_0x263878);return;}const _0x13084b='https://dashboard.ranger.net/features/'+_0x3d6974[_0x1cedee(0xf8)],_0x398ff8=_0x433da2[_0x1cedee(0x10e)],_0x4bc3b5=await getToken(),_0x3ba360=!_0x55cda0;let _0x2bf174=null,_0x54fe19=null;const _0x145139=_0x55cda0&&await _0x433da2['rmNrk'](transcriptHasToken,_0x2213be,_0x398ff8),_0x2a29a8=await transcriptHasToken(_0x2213be,_0x13084b);if(_0x4bc3b5)try{const _0x2eb6b0=await getFeature(_0x3d6974['featureId']);_0x2bf174=_0x2eb6b0['name']??null,_0x54fe19=_0x2eb6b0[_0x1cedee(0x10f)]??null;}catch{}if(_0x433da2['TBAhZ'](_0x4bc3b5,_0x54fe19))try{await _0x433da2['iocPu'](concludeSession,_0x3d6974['featureId'],_0x54fe19);}catch(_0x371c9e){if(_0x145139){await _0x433da2[_0x1cedee(0x109)](trackStop,_0x1a70c5,!![],_0x263878);return;}_0x263878=![];const _0x4f4e96=_0x371c9e instanceof Error?_0x371c9e[_0x1cedee(0x116)]:String(_0x371c9e),_0x1a031d={'decision':'block','reason':'Failed\x20to\x20conclude\x20Ranger\x20feature\x20review\x20session'+(_0x2bf174?_0x1cedee(0x10d)+_0x2bf174+'\x22':'')+_0x1cedee(0x108)+_0x4f4e96+'\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('+_0x13084b+')\x20and\x20the\x20token\x20`'+_0x398ff8+'`,\x20then\x20run\x20/exit\x20again.'};console['log'](JSON['stringify'](_0x1a031d)),await trackStop(_0x1a70c5,!![],_0x263878);return;}await trackStop(_0x1a70c5,!![],_0x263878);return;}catch{await trackStop(_0x1a70c5,!![],_0x263878);return;}}async function trackStop(_0x16c243,_0x17ca0f,_0x1e5b38){const _0x4217a0=_0x1437,_0x5ce79e={'IYubQ':function(_0x785283,_0x9f78c4){return _0x785283(_0x9f78c4);}};try{const _0x2ccc7c=_0x5ce79e['IYubQ'](createTelemetryCollector,'hook:stop');await _0x2ccc7c[_0x4217a0(0xfb)]({'sessionId':_0x16c243??undefined,'hooksEnabled':_0x17ca0f,'stopAllowed':_0x1e5b38}),await _0x2ccc7c['trackCommandEnd']('success');}catch{}}function _0x1437(_0x5f3c7c,_0x537429){_0x5f3c7c=_0x5f3c7c-0xf6;const _0x22f10e=_0x22f1();let _0x143793=_0x22f10e[_0x5f3c7c];return _0x143793;}async function transcriptHasToken(_0x57b890,_0x3eb3d3){if(!_0x57b890)return![];const _0x28190f=await readTranscriptTail(_0x57b890,0x30d40);return _0x28190f?_0x28190f['includes'](_0x3eb3d3):![];}async function readTranscriptTail(_0x3b183e,_0x202901){const _0x4756a8=_0x1437,_0x35ad66={'ehDrC':function(_0x5d6c28,_0x2e5320){return _0x5d6c28<=_0x2e5320;},'RGGSF':_0x4756a8(0x113)};let _0x23e585=null;try{_0x23e585=await open(_0x3b183e,'r');const _0x298b5f=await _0x23e585['stat'](),_0x24fd6b=Math[_0x4756a8(0x107)](_0x298b5f[_0x4756a8(0x100)],_0x202901);if(_0x35ad66[_0x4756a8(0x110)](_0x24fd6b,0x0))return'';const _0x26bbf9=Buffer[_0x4756a8(0x105)](_0x24fd6b);return await _0x23e585['read'](_0x26bbf9,0x0,_0x24fd6b,_0x298b5f['size']-_0x24fd6b),_0x26bbf9['toString'](_0x35ad66[_0x4756a8(0x102)]);}catch{return null;}finally{try{await _0x23e585?.[_0x4756a8(0xfd)]();}catch{}}}
@@ -1 +1 @@
1
- (function(_0x374887,_0x45f355){var _0x1632e4=_0x4930,_0x57f805=_0x374887();while(!![]){try{var _0x1eab0a=parseInt(_0x1632e4(0xd2))/0x1+-parseInt(_0x1632e4(0xcb))/0x2*(-parseInt(_0x1632e4(0xcc))/0x3)+parseInt(_0x1632e4(0xd1))/0x4*(-parseInt(_0x1632e4(0xce))/0x5)+parseInt(_0x1632e4(0xcd))/0x6+-parseInt(_0x1632e4(0xd3))/0x7+-parseInt(_0x1632e4(0xd0))/0x8+parseInt(_0x1632e4(0xcf))/0x9*(-parseInt(_0x1632e4(0xd4))/0xa);if(_0x1eab0a===_0x45f355)break;else _0x57f805['push'](_0x57f805['shift']());}catch(_0x32631c){_0x57f805['push'](_0x57f805['shift']());}}}(_0x4a70,0x1938c));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';function _0x4930(_0x2080fc,_0x2e36c7){_0x2080fc=_0x2080fc-0xcb;var _0x4a7090=_0x4a70();var _0x4930eb=_0x4a7090[_0x2080fc];return _0x4930eb;}export{login}from'./login.js';export{start}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';function _0x4a70(){var _0x406fe8=['1123578sRZfAO','129535ZESXoD','135yXWBMb','51608sUJMaS','8RJhSto','197565pRxonr','626227KghrLa','206660RNNPth','58732bzQAmj','18aTCDKt'];_0x4a70=function(){return _0x406fe8;};return _0x4a70();}export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
1
+ function _0x9f02(){var _0x521d81=['457686sDWxdm','132670bVCmMD','438702fPqXuK','18TrkNnT','347016Dtvmmz','1406128ZoaIbd','40qLyibk','808805vvtXLE','84mDnDDk','150MMyrTo','10151523XCfXMk'];_0x9f02=function(){return _0x521d81;};return _0x9f02();}(function(_0x1a6b62,_0x412e0f){var _0x2d053b=_0x55b8,_0x39066a=_0x1a6b62();while(!![]){try{var _0x533071=-parseInt(_0x2d053b(0x179))/0x1+parseInt(_0x2d053b(0x180))/0x2*(-parseInt(_0x2d053b(0x182))/0x3)+-parseInt(_0x2d053b(0x17a))/0x4*(-parseInt(_0x2d053b(0x17b))/0x5)+-parseInt(_0x2d053b(0x17f))/0x6+parseInt(_0x2d053b(0x17c))/0x7*(-parseInt(_0x2d053b(0x183))/0x8)+parseInt(_0x2d053b(0x17e))/0x9+-parseInt(_0x2d053b(0x17d))/0xa*(-parseInt(_0x2d053b(0x181))/0xb);if(_0x533071===_0x412e0f)break;else _0x39066a['push'](_0x39066a['shift']());}catch(_0x2ee62b){_0x39066a['push'](_0x39066a['shift']());}}}(_0x9f02,0xe62fc));function _0x55b8(_0xfd307e,_0xdb4c4){_0xfd307e=_0xfd307e-0x179;var _0x9f02f5=_0x9f02();var _0x55b8c9=_0x9f02f5[_0xfd307e];return _0x55b8c9;}export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';export{start}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
@@ -1 +1 @@
1
- (function(_0x8da1e9,_0x514054){const _0x5dc6a2=_0x52dd,_0x51c68b=_0x8da1e9();while(!![]){try{const _0x22efa9=-parseInt(_0x5dc6a2(0x12d))/0x1+-parseInt(_0x5dc6a2(0x126))/0x2*(-parseInt(_0x5dc6a2(0x12b))/0x3)+-parseInt(_0x5dc6a2(0x122))/0x4*(-parseInt(_0x5dc6a2(0x128))/0x5)+-parseInt(_0x5dc6a2(0x127))/0x6*(parseInt(_0x5dc6a2(0x12a))/0x7)+-parseInt(_0x5dc6a2(0x123))/0x8+parseInt(_0x5dc6a2(0x125))/0x9+parseInt(_0x5dc6a2(0x129))/0xa;if(_0x22efa9===_0x514054)break;else _0x51c68b['push'](_0x51c68b['shift']());}catch(_0x5ec51b){_0x51c68b['push'](_0x51c68b['shift']());}}}(_0x3a76,0xa57b2));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x3a76(){const _0x311d22=['9870000LGMYnv','7zplczy','29337HNjNSH','dexzR','981929XBSdZE','stdout','hHgUn','68Rgbvxq','6810584PFOpDN','isTTY','2486574IsKwnM','234QzxWAp','2355684WNrOIU','145955ANVODf'];_0x3a76=function(){return _0x311d22;};return _0x3a76();}import{getCurrentUser}from'./utils/userApi.js';function _0x52dd(_0x49a8c5,_0x3e102b){_0x49a8c5=_0x49a8c5-0x122;const _0x3a7669=_0x3a76();let _0x52dd9f=_0x3a7669[_0x49a8c5];return _0x52dd9f;}export async function login(){const _0x3b296c=_0x52dd,_0xfbd469={'nOumM':function(_0x154458,_0x438c44){return _0x154458(_0x438c44);},'dexzR':'\x0a✅\x20API\x20key\x20stored\x20successfully','hHgUn':function(_0x573f92,_0x33472b){return _0x573f92 instanceof _0x33472b;}},_0x3a31a0=process['stdin'][_0x3b296c(0x124)]&&process[_0x3b296c(0x12e)][_0x3b296c(0x124)];if(!_0x3a31a0)throw new Error('Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.');try{const _0x3fc930=await runDeviceAuthFlow(),_0x3aedb2=await _0xfbd469['nOumM'](getCurrentUser,_0x3fc930);_0x3aedb2['success']?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x3aedb2['user']['organizationName']):console['log'](_0xfbd469[_0x3b296c(0x12c)]);}catch(_0x2064c9){throw new Error('Login\x20failed:\x20'+(_0xfbd469[_0x3b296c(0x12f)](_0x2064c9,Error)?_0x2064c9['message']:_0x2064c9));}}
1
+ (function(_0x93462b,_0x1ba87e){const _0xf77173=_0x21f9,_0x56a883=_0x93462b();while(!![]){try{const _0x3be358=-parseInt(_0xf77173(0x179))/0x1*(-parseInt(_0xf77173(0x181))/0x2)+-parseInt(_0xf77173(0x187))/0x3*(parseInt(_0xf77173(0x186))/0x4)+-parseInt(_0xf77173(0x180))/0x5*(-parseInt(_0xf77173(0x17b))/0x6)+-parseInt(_0xf77173(0x182))/0x7*(parseInt(_0xf77173(0x17e))/0x8)+-parseInt(_0xf77173(0x17f))/0x9*(parseInt(_0xf77173(0x17c))/0xa)+-parseInt(_0xf77173(0x17d))/0xb+parseInt(_0xf77173(0x185))/0xc;if(_0x3be358===_0x1ba87e)break;else _0x56a883['push'](_0x56a883['shift']());}catch(_0x26702e){_0x56a883['push'](_0x56a883['shift']());}}}(_0x2037,0x8eb74));function _0x21f9(_0x45a192,_0x260049){_0x45a192=_0x45a192-0x179;const _0x2037e9=_0x2037();let _0x21f92a=_0x2037e9[_0x45a192];return _0x21f92a;}import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';export async function login(){const _0x818816=_0x21f9,_0x2a4e80={'BXmOO':function(_0x64c555){return _0x64c555();},'uTLsf':function(_0x3d83a8,_0x19f026){return _0x3d83a8(_0x19f026);},'YyxCO':function(_0x5097d2,_0x28311c){return _0x5097d2 instanceof _0x28311c;}},_0x233efe=process['stdin'][_0x818816(0x18b)]&&process[_0x818816(0x188)][_0x818816(0x18b)];if(!_0x233efe)throw new Error(_0x818816(0x189));try{const _0x3890b5=await _0x2a4e80['BXmOO'](runDeviceAuthFlow),_0x5f235d=await _0x2a4e80[_0x818816(0x18a)](getCurrentUser,_0x3890b5);_0x5f235d['success']?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x5f235d['user'][_0x818816(0x17a)]):console[_0x818816(0x184)]('\x0a✅\x20API\x20key\x20stored\x20successfully');}catch(_0x398642){throw new Error('Login\x20failed:\x20'+(_0x2a4e80[_0x818816(0x183)](_0x398642,Error)?_0x398642['message']:_0x398642));}}function _0x2037(){const _0x29ce41=['2VVYtBT','243229ETJTOB','YyxCO','log','12357528qAYVDI','32iTJgeh','163590JjiTHU','stdout','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','uTLsf','isTTY','871593DrpdGW','organizationName','1352604BVBLWF','300QHcDSm','5142929FCKAgr','240JLjjFU','81711yjYXMo','20Hcsczq'];_0x2037=function(){return _0x29ce41;};return _0x2037();}
@@ -1 +1 @@
1
- (function(_0x4ff4c3,_0x873ed4){const _0x3e98e9=_0x5045,_0x22266f=_0x4ff4c3();while(!![]){try{const _0x337205=-parseInt(_0x3e98e9(0x21d))/0x1*(parseInt(_0x3e98e9(0x1ea))/0x2)+-parseInt(_0x3e98e9(0x207))/0x3*(-parseInt(_0x3e98e9(0x219))/0x4)+parseInt(_0x3e98e9(0x20c))/0x5*(parseInt(_0x3e98e9(0x21b))/0x6)+-parseInt(_0x3e98e9(0x20f))/0x7+-parseInt(_0x3e98e9(0x211))/0x8+-parseInt(_0x3e98e9(0x200))/0x9+parseInt(_0x3e98e9(0x1f7))/0xa;if(_0x337205===_0x873ed4)break;else _0x22266f['push'](_0x22266f['shift']());}catch(_0x29fc05){_0x22266f['push'](_0x22266f['shift']());}}}(_0x3db1,0xdbc9c));import{join}from'path';import{existsSync}from'fs';import _0x3b8b3e from'inquirer';function _0x5045(_0x188867,_0x3deef3){_0x188867=_0x188867-0x1e7;const _0x3db1eb=_0x3db1();let _0x5045c0=_0x3db1eb[_0x188867];return _0x5045c0;}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x847469){const _0x49525d=_0x5045,_0x28a2f4={'nKAfp':function(_0x2bd2e6,_0x2ff6cd){return _0x2bd2e6(_0x2ff6cd);},'WhecF':function(_0x35a205,_0x492914,_0x488044){return _0x35a205(_0x492914,_0x488044);},'yONVG':function(_0x5b69ad){return _0x5b69ad();},'hQMnU':'\x0a📦\x20Claude\x20Code\x20Plugin\x0a','HcRGM':'pluginScope','hmtPD':_0x49525d(0x217),'FBode':_0x49525d(0x21c),'rfDaE':_0x49525d(0x1ff),'xqhOt':'✓\x20Marketplace\x20already\x20added','ombxa':_0x49525d(0x21a),'HvhKk':_0x49525d(0x1fb),'bMqDO':_0x49525d(0x1e7),'hmKhW':'❌\x20Failed\x20to\x20add\x20marketplace:','RRPhX':function(_0x4c69f6,_0x22a0ca){return _0x4c69f6(_0x22a0ca);},'rHJsa':_0x49525d(0x204),'ecmhB':_0x49525d(0x1e8),'BWaTv':'\x0aYou\x20can\x20install\x20manually\x20with:','nVtrh':_0x49525d(0x208),'hYihy':_0x49525d(0x221)},_0xba7bdc=await isPluginInstalled('ranger@trailhead');if(_0xba7bdc)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x18f4eb=_0x28a2f4['nKAfp'](existsSync,_0x28a2f4['WhecF'](join,_0x28a2f4[_0x49525d(0x220)](getProjectRoot),'.claude'));let _0xd6c429;if(_0x847469)_0xd6c429=_0x847469;else{if(_0x18f4eb)_0xd6c429='project';else{console['log'](_0x28a2f4[_0x49525d(0x1ec)]);const _0x465767=await _0x3b8b3e['prompt']([{'type':'list','name':_0x28a2f4[_0x49525d(0x1f5)],'message':_0x28a2f4['hmtPD'],'choices':[{'name':_0x28a2f4[_0x49525d(0x1f4)],'value':'user'},{'name':_0x49525d(0x212),'value':_0x28a2f4['rfDaE']}],'default':_0x49525d(0x21e)}]);_0xd6c429=_0x465767['pluginScope'];}}console[_0x49525d(0x1eb)](_0x49525d(0x1ef)+_0xd6c429+_0x49525d(0x20b));const _0x5d7f53=await isMarketplaceAdded(_0x49525d(0x20a));let _0x10199b=_0x5d7f53;if(_0x5d7f53)console['log'](_0x28a2f4['xqhOt']);else{const _0x2a5ca8=await runClaudeCommand([_0x28a2f4[_0x49525d(0x1f8)],_0x28a2f4[_0x49525d(0x20e)],'add',_0x28a2f4['bMqDO']]);!_0x2a5ca8[_0x49525d(0x218)]?(console[_0x49525d(0x1fa)](_0x28a2f4[_0x49525d(0x205)],_0x2a5ca8[_0x49525d(0x1fa)]),console['log'](_0x49525d(0x21f)),console[_0x49525d(0x1eb)]('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0xd6c429)):_0x10199b=!![];}if(_0x10199b){const _0x3ebf15=await _0x28a2f4[_0x49525d(0x1f2)](runClaudeCommand,[_0x49525d(0x21a),_0x28a2f4[_0x49525d(0x210)],_0x49525d(0x208),_0x49525d(0x221),_0xd6c429]);if(!_0x3ebf15['success'])console[_0x49525d(0x1fa)](_0x28a2f4[_0x49525d(0x1f0)],_0x3ebf15[_0x49525d(0x1fa)]),console['log'](_0x28a2f4[_0x49525d(0x201)]),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0xd6c429);else{console['log'](_0x49525d(0x1f3));const _0x273671=[_0x28a2f4['ombxa'],'enable',_0x28a2f4['nVtrh']];_0xd6c429==='project'&&_0x273671['push'](_0x28a2f4[_0x49525d(0x209)],_0x28a2f4[_0x49525d(0x216)]);const _0x4759e1=await runClaudeCommand(_0x273671,{'captureOutput':!![]}),_0x4662da=_0x4759e1[_0x49525d(0x1f1)]?.[_0x49525d(0x1f9)]('already\x20enabled');!_0x4759e1[_0x49525d(0x218)]&&!_0x4662da?console[_0x49525d(0x1fa)]('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x4759e1[_0x49525d(0x1fa)]):console['log']('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}function _0x3db1(){const _0x34d3be=['PwUco','18821710JHbcra','ombxa','includes','error','marketplace','eajui','Anxel','HQbwV','project','14645043nuihrQ','BWaTv','confirm','prompt','install','hmKhW','SKILL.md','14757vBFiNT','ranger@trailhead','hYihy','trailhead','\x20level)...\x0a','140925XssKSr','ranger','HvhKk','5834507yLrwSb','rHJsa','4645272FhfDHl','Project\x20(shared\x20with\x20team\x20via\x20git)','gnzDk','wantsSkillup','QfXVe','rfDaE','Where\x20should\x20the\x20plugin\x20be\x20installed?','success','680jKWIFz','plugin','282iSATto','User\x20(available\x20in\x20all\x20your\x20projects)','9tUKkVg','user','\x0aYou\x20can\x20install\x20manually\x20with:','yONVG','--scope','ranger-testing/trailhead','❌\x20Failed\x20to\x20install\x20plugin:','✓\x20Ranger\x20skills\x20already\x20installed','22546yWAtPN','log','hQMnU','.claude','afPpI','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','ecmhB','output','RRPhX','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','FBode','HcRGM'];_0x3db1=function(){return _0x34d3be;};return _0x3db1();}export async function ensureClaudeSkills(_0x5586b3){const _0x1ba07d=_0x5045,_0x1f72d2={'afPpI':function(_0x1e883f,_0x2b22dd){return _0x1e883f(_0x2b22dd);},'eajui':'project','BvyxQ':_0x1ba07d(0x20d),'QfXVe':_0x1ba07d(0x206),'qVJcA':function(_0x54562d,_0xbb666f){return _0x54562d||_0xbb666f;},'PwUco':_0x1ba07d(0x1e9),'HQbwV':function(_0x25aa45,_0x4177da,_0x97603){return _0x25aa45(_0x4177da,_0x97603);},'ZsHxb':function(_0x39d644){return _0x39d644();},'UPoan':_0x1ba07d(0x1ed),'gnzDk':function(_0xde778c,_0x999d36){return _0xde778c(_0x999d36);},'Anxel':'wantsSkillup'},_0x3cc6fc=existsSync(join(getSkillsDir('user'),_0x1ba07d(0x20d),_0x1ba07d(0x206))),_0x3e6891=existsSync(join(_0x1f72d2[_0x1ba07d(0x1ee)](getSkillsDir,_0x1f72d2[_0x1ba07d(0x1fc)]),_0x1f72d2['BvyxQ'],_0x1f72d2[_0x1ba07d(0x215)]));if(_0x1f72d2['qVJcA'](_0x3cc6fc,_0x3e6891))return console['log'](_0x1f72d2[_0x1ba07d(0x1f6)]),![];const _0x5083db=existsSync(_0x1f72d2[_0x1ba07d(0x1fe)](join,_0x1f72d2['ZsHxb'](getProjectRoot),_0x1f72d2['UPoan']));let _0x510f35=!![];if(_0x5586b3)await _0x1f72d2['gnzDk'](skillup,{'autoInstall':_0x5586b3,'suppressUsage':!![]});else{if(_0x5083db)await _0x1f72d2[_0x1ba07d(0x213)](skillup,{'autoInstall':'project','suppressUsage':!![]});else{const _0x9b12f9=await _0x3b8b3e[_0x1ba07d(0x203)]([{'type':_0x1ba07d(0x202),'name':_0x1f72d2[_0x1ba07d(0x1fd)],'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x510f35=_0x9b12f9[_0x1ba07d(0x214)],_0x510f35&&await skillup({'suppressUsage':!![]});}}return _0x510f35;}
1
+ (function(_0x29a76b,_0xf7d970){const _0x12a2e1=_0x5599,_0x55e30e=_0x29a76b();while(!![]){try{const _0x176ed7=-parseInt(_0x12a2e1(0x180))/0x1*(parseInt(_0x12a2e1(0x175))/0x2)+-parseInt(_0x12a2e1(0x178))/0x3*(-parseInt(_0x12a2e1(0x16d))/0x4)+parseInt(_0x12a2e1(0x18a))/0x5+-parseInt(_0x12a2e1(0x16f))/0x6+parseInt(_0x12a2e1(0x165))/0x7*(parseInt(_0x12a2e1(0x169))/0x8)+parseInt(_0x12a2e1(0x198))/0x9*(-parseInt(_0x12a2e1(0x190))/0xa)+-parseInt(_0x12a2e1(0x174))/0xb;if(_0x176ed7===_0xf7d970)break;else _0x55e30e['push'](_0x55e30e['shift']());}catch(_0x1d3168){_0x55e30e['push'](_0x55e30e['shift']());}}}(_0x2428,0x5468f));import{join}from'path';function _0x5599(_0x25f86a,_0x38ac0f){_0x25f86a=_0x25f86a-0x165;const _0x24280f=_0x2428();let _0x55992e=_0x24280f[_0x25f86a];return _0x55992e;}import{existsSync}from'fs';function _0x2428(){const _0x1bbb11=['\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','SKILL.md','2YxCPeN','UEJUP','fLadX','KmhYW','❌\x20Failed\x20to\x20add\x20marketplace:','zGcVG','ranger-testing/trailhead','\x0aYou\x20can\x20install\x20manually\x20with:','wantsSkillup','wJRTJ','863475bDyXGs','.claude','JItNJ','log','iWLon','plugin','1991950ZLuyqQ','includes','TFHzU','success','push','ranger@trailhead','isfJu','user','9ztDyQG','eMfrE','zOPEe','1669479QHcOKu','gHLDL','jHuOY','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','16nOJZIU','WqIcn','TugQZ','fFXjE','3144aQEJJh','--scope','1103406CDgBwq','error','enable','IKIGD','egKpO','2091540KDfRby','3452LESCpc','prompt','YDarT','1041aReAwW','project','RghoR','Where\x20should\x20the\x20plugin\x20be\x20installed?','list','phkiG'];_0x2428=function(){return _0x1bbb11;};return _0x2428();}import _0xbc6e1d from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x19597b){const _0x45a8aa=_0x5599,_0x5bbcb1={'gHLDL':function(_0x3c29cc,_0x3e9b38){return _0x3c29cc(_0x3e9b38);},'KmhYW':_0x45a8aa(0x195),'jHuOY':_0x45a8aa(0x168),'zGcVG':function(_0x269cfd,_0x21db15,_0x5168dc){return _0x269cfd(_0x21db15,_0x5168dc);},'fLadX':_0x45a8aa(0x18b),'TFHzU':_0x45a8aa(0x179),'zOPEe':'\x0a📦\x20Claude\x20Code\x20Plugin\x0a','PwDnJ':_0x45a8aa(0x17c),'wJRTJ':'User\x20(available\x20in\x20all\x20your\x20projects)','fFXjE':_0x45a8aa(0x197),'iAaBM':function(_0x3c3f03,_0x1ba705){return _0x3c3f03(_0x1ba705);},'egKpO':'✓\x20Marketplace\x20already\x20added','yGigG':_0x45a8aa(0x187),'phkiG':'plugin','Rxgio':function(_0x3d9fed,_0x43019a,_0x1d34c8){return _0x3d9fed(_0x43019a,_0x1d34c8);},'TugQZ':'already\x20enabled','isfJu':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x260328=await _0x5bbcb1['gHLDL'](isPluginInstalled,_0x5bbcb1[_0x45a8aa(0x183)]);if(_0x260328)return console['log'](_0x5bbcb1[_0x45a8aa(0x167)]),![];const _0x2944c7=_0x5bbcb1[_0x45a8aa(0x166)](existsSync,_0x5bbcb1[_0x45a8aa(0x185)](join,getProjectRoot(),_0x5bbcb1[_0x45a8aa(0x182)]));let _0x30b6a5;if(_0x19597b)_0x30b6a5=_0x19597b;else{if(_0x2944c7)_0x30b6a5=_0x5bbcb1['TFHzU'];else{console['log'](_0x5bbcb1[_0x45a8aa(0x19a)]);const _0x2da235=await _0xbc6e1d['prompt']([{'type':_0x5bbcb1['PwDnJ'],'name':'pluginScope','message':_0x45a8aa(0x17b),'choices':[{'name':_0x5bbcb1[_0x45a8aa(0x189)],'value':_0x45a8aa(0x197)},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x45a8aa(0x179)}],'default':_0x5bbcb1[_0x45a8aa(0x16c)]}]);_0x30b6a5=_0x2da235['pluginScope'];}}console[_0x45a8aa(0x18d)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x30b6a5+'\x20level)...\x0a');const _0x1a45c1=await _0x5bbcb1['iAaBM'](isMarketplaceAdded,'trailhead');let _0x1f3db7=_0x1a45c1;if(_0x1a45c1)console[_0x45a8aa(0x18d)](_0x5bbcb1[_0x45a8aa(0x173)]);else{const _0x54d7c8=await runClaudeCommand([_0x45a8aa(0x18f),'marketplace','add',_0x45a8aa(0x186)]);!_0x54d7c8[_0x45a8aa(0x193)]?(console['error'](_0x45a8aa(0x184),_0x54d7c8[_0x45a8aa(0x170)]),console['log'](_0x5bbcb1['yGigG']),console[_0x45a8aa(0x18d)]('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console['log'](_0x45a8aa(0x17e)+_0x30b6a5)):_0x1f3db7=!![];}if(_0x1f3db7){const _0x4b0219=await runClaudeCommand([_0x5bbcb1[_0x45a8aa(0x17d)],'install',_0x45a8aa(0x195),_0x45a8aa(0x16e),_0x30b6a5]);if(!_0x4b0219[_0x45a8aa(0x193)])console['error']('❌\x20Failed\x20to\x20install\x20plugin:',_0x4b0219['error']),console['log'](_0x5bbcb1['yGigG']),console['log'](_0x45a8aa(0x17e)+_0x30b6a5);else{console['log']('✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully');const _0x2e70f1=[_0x5bbcb1[_0x45a8aa(0x17d)],_0x45a8aa(0x171),_0x45a8aa(0x195)];_0x30b6a5===_0x5bbcb1['TFHzU']&&_0x2e70f1[_0x45a8aa(0x194)]('--scope',_0x5bbcb1[_0x45a8aa(0x192)]);const _0x50bc8a=await _0x5bbcb1['Rxgio'](runClaudeCommand,_0x2e70f1,{'captureOutput':!![]}),_0x4da821=_0x50bc8a['output']?.[_0x45a8aa(0x191)](_0x5bbcb1[_0x45a8aa(0x16b)]);!_0x50bc8a['success']&&!_0x4da821?console['error']('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x50bc8a[_0x45a8aa(0x170)]):console['log'](_0x5bbcb1[_0x45a8aa(0x196)]);}}return!![];}export async function ensureClaudeSkills(_0x1cad20){const _0x4bac73=_0x5599,_0x54dbb9={'JItNJ':function(_0x4b77ac,_0x48ee7f){return _0x4b77ac(_0x48ee7f);},'YDarT':'user','eMfrE':'ranger','dKCGX':_0x4bac73(0x17f),'yoZQm':function(_0x452657,_0x4ed5a8,_0x156c94,_0x129c58){return _0x452657(_0x4ed5a8,_0x156c94,_0x129c58);},'FAMuA':function(_0xbf6857,_0x191ab6){return _0xbf6857(_0x191ab6);},'IKIGD':'project','eIGmc':function(_0xc034a8,_0x475773){return _0xc034a8||_0x475773;},'WqIcn':function(_0xa237e2,_0x4f196a){return _0xa237e2(_0x4f196a);},'iWLon':function(_0x14ab99,_0x599a80,_0x2f7e09){return _0x14ab99(_0x599a80,_0x2f7e09);},'gSOAj':function(_0x1d0897){return _0x1d0897();},'UEJUP':_0x4bac73(0x18b),'CPjwV':function(_0x42d03c,_0x31575b){return _0x42d03c(_0x31575b);},'RghoR':'wantsSkillup'},_0xe7d747=_0x54dbb9[_0x4bac73(0x18c)](existsSync,join(getSkillsDir(_0x54dbb9[_0x4bac73(0x177)]),_0x54dbb9[_0x4bac73(0x199)],_0x54dbb9['dKCGX'])),_0x20e7f5=existsSync(_0x54dbb9['yoZQm'](join,_0x54dbb9['FAMuA'](getSkillsDir,_0x54dbb9[_0x4bac73(0x172)]),_0x54dbb9[_0x4bac73(0x199)],'SKILL.md'));if(_0x54dbb9['eIGmc'](_0xe7d747,_0x20e7f5))return console[_0x4bac73(0x18d)]('✓\x20Ranger\x20skills\x20already\x20installed'),![];const _0x453826=_0x54dbb9[_0x4bac73(0x16a)](existsSync,_0x54dbb9[_0x4bac73(0x18e)](join,_0x54dbb9['gSOAj'](getProjectRoot),_0x54dbb9[_0x4bac73(0x181)]));let _0x2d1ed5=!![];if(_0x1cad20)await _0x54dbb9['CPjwV'](skillup,{'autoInstall':_0x1cad20,'suppressUsage':!![]});else{if(_0x453826)await skillup({'autoInstall':_0x4bac73(0x179),'suppressUsage':!![]});else{const _0x37e533=await _0xbc6e1d[_0x4bac73(0x176)]([{'type':'confirm','name':_0x54dbb9[_0x4bac73(0x17a)],'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x2d1ed5=_0x37e533[_0x4bac73(0x188)],_0x2d1ed5&&await skillup({'suppressUsage':!![]});}}return _0x2d1ed5;}
@@ -1 +1 @@
1
- (function(_0x134a2e,_0x2bd2a8){const _0x380d19=_0x265e,_0x1a86f6=_0x134a2e();while(!![]){try{const _0x3b5448=parseInt(_0x380d19(0xb7))/0x1+parseInt(_0x380d19(0xbf))/0x2+-parseInt(_0x380d19(0xae))/0x3*(-parseInt(_0x380d19(0xaf))/0x4)+-parseInt(_0x380d19(0xc3))/0x5*(parseInt(_0x380d19(0xb8))/0x6)+-parseInt(_0x380d19(0xc0))/0x7*(parseInt(_0x380d19(0xb1))/0x8)+parseInt(_0x380d19(0xb2))/0x9*(-parseInt(_0x380d19(0xb3))/0xa)+-parseInt(_0x380d19(0xb4))/0xb*(-parseInt(_0x380d19(0xc8))/0xc);if(_0x3b5448===_0x2bd2a8)break;else _0x1a86f6['push'](_0x1a86f6['shift']());}catch(_0x3ee51f){_0x1a86f6['push'](_0x1a86f6['shift']());}}}(_0x590e,0xb2380));import{join}from'path';function _0x265e(_0x418111,_0x23b790){_0x418111=_0x418111-0xae;const _0x590e6d=_0x590e();let _0x265e15=_0x590e6d[_0x418111];return _0x265e15;}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x3f4949 from'inquirer';function _0x590e(){const _0x14d712=['3268578fjSqYa','4qtHdye','opencode.json','12768dARkxX','336123MnmMee','140Mvwytf','99tJehYb','pluginScope','prompt','517100lsnbqm','462558dBWMmP','oHDwd','HIzoh','aguWB','@ranger-testing/opencode-plugin','Project\x20(shared\x20with\x20team\x20via\x20git)','Where\x20should\x20the\x20plugin\x20be\x20installed?','642146IgTnMo','1477yVVJFa','Failed\x20to\x20read\x20opencode.json','QOgBn','55DNgiWm','list','$schema','ogNft','isArray','679896GnQbab','user','plugin','log'];_0x590e=function(){return _0x14d712;};return _0x590e();}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0xfba701){const _0x25c9ac=_0x265e,_0x5d5a52={'oHDwd':function(_0x10b999,_0x1f02c8){return _0x10b999(_0x1f02c8);},'aguWB':'project','ogNft':_0x25c9ac(0xc9),'QOgBn':function(_0x127cf5,_0x342397){return _0x127cf5(_0x342397);},'HIzoh':function(_0x295b3b,_0x1ad91a,_0x42bf33){return _0x295b3b(_0x1ad91a,_0x42bf33);},'YZICT':'✓\x20OpenCode\x20plugin\x20already\x20configured','zHgpw':function(_0x4b9f1b,_0x3d7ea6,_0x246aeb){return _0x4b9f1b(_0x3d7ea6,_0x246aeb);},'eFvlu':function(_0x5a6a7d,_0x56d29c){return _0x5a6a7d+_0x56d29c;}},_0x43d226=_0x5d5a52[_0x25c9ac(0xb9)](existsSync,join(_0x5d5a52['oHDwd'](getOpencodeConfigDir,_0x5d5a52[_0x25c9ac(0xbb)]),_0x25c9ac(0xb0)));let _0x213425;if(_0xfba701)_0x213425=_0xfba701;else{if(_0x43d226)_0x213425='project';else{console[_0x25c9ac(0xcb)]('\x0a📦\x20OpenCode\x20Plugin\x0a');const _0x313bbe=await _0x3f4949[_0x25c9ac(0xb6)]([{'type':_0x25c9ac(0xc4),'name':_0x25c9ac(0xb5),'message':_0x25c9ac(0xbe),'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x5d5a52[_0x25c9ac(0xc6)]},{'name':_0x25c9ac(0xbd),'value':_0x5d5a52['aguWB']}],'default':_0x5d5a52['ogNft']}]);_0x213425=_0x313bbe['pluginScope'];}}const _0x5657b8=join(_0x5d5a52[_0x25c9ac(0xc2)](getOpencodeConfigDir,_0x213425),'opencode.json'),_0x57b165=_0x25c9ac(0xbc),_0x412de4='https://opencode.ai/config.json';let _0x145c84={};if(existsSync(_0x5657b8))try{const _0x3f197f=await _0x5d5a52[_0x25c9ac(0xba)](readFile,_0x5657b8,'utf-8');_0x145c84=JSON['parse'](_0x3f197f);}catch(_0x5777a5){return console['error']('⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.'),{'configured':![],'scope':_0x213425,'error':_0x25c9ac(0xc1),'details':_0x5777a5};}const _0x67ad7b=Array[_0x25c9ac(0xc7)](_0x145c84['plugin'])?_0x145c84['plugin']:[];if(_0x67ad7b['includes'](_0x57b165))return console[_0x25c9ac(0xcb)](_0x5d5a52['YZICT']),{'configured':![],'scope':_0x213425};return _0x145c84[_0x25c9ac(0xc5)]=_0x145c84[_0x25c9ac(0xc5)]||_0x412de4,_0x145c84[_0x25c9ac(0xca)]=[..._0x67ad7b,_0x57b165],await _0x5d5a52['zHgpw'](mkdir,getOpencodeConfigDir(_0x213425),{'recursive':!![]}),await _0x5d5a52['zHgpw'](writeFile,_0x5657b8,_0x5d5a52['eFvlu'](JSON['stringify'](_0x145c84,null,0x2),'\x0a')),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x213425};}
1
+ function _0x1fdf(){const _0x301ac2=['⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','1914990sGMQKJ','Failed\x20to\x20read\x20opencode.json','utf-8','user','XAEGB','28yYHURE','oqKTN','list','90dPwAEb','parse','6618feZrHw','error','1385TltGZP','3566444aATMhH','log','✓\x20OpenCode\x20plugin\x20configured','327487wImHJp','593542RapRJI','project','90198BpgCpv','8yWAlBv','plugin','opencode.json','476253fqIsOy','$schema','KDciK','includes'];_0x1fdf=function(){return _0x301ac2;};return _0x1fdf();}(function(_0x121cc6,_0x2bd48a){const _0x8bc502=_0x1111,_0x36488f=_0x121cc6();while(!![]){try{const _0x42b599=parseInt(_0x8bc502(0x9e))/0x1+parseInt(_0x8bc502(0x9f))/0x2+-parseInt(_0x8bc502(0xa1))/0x3*(-parseInt(_0x8bc502(0xaf))/0x4)+-parseInt(_0x8bc502(0x9a))/0x5*(parseInt(_0x8bc502(0xb4))/0x6)+-parseInt(_0x8bc502(0x9b))/0x7*(parseInt(_0x8bc502(0xa2))/0x8)+parseInt(_0x8bc502(0xa5))/0x9*(parseInt(_0x8bc502(0xb2))/0xa)+-parseInt(_0x8bc502(0xaa))/0xb;if(_0x42b599===_0x2bd48a)break;else _0x36488f['push'](_0x36488f['shift']());}catch(_0x153c04){_0x36488f['push'](_0x36488f['shift']());}}}(_0x1fdf,0x4e944));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x591f91 from'inquirer';function _0x1111(_0x2ca92b,_0xccd2dc){_0x2ca92b=_0x2ca92b-0x99;const _0x1fdf8c=_0x1fdf();let _0x1111eb=_0x1fdf8c[_0x2ca92b];return _0x1111eb;}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0xaaad45){const _0x52e389=_0x1111,_0x423fd3={'KDciK':function(_0x35c538,_0x4f86ce){return _0x35c538(_0x4f86ce);},'XAEGB':_0x52e389(0xa4),'saHbl':'\x0a📦\x20OpenCode\x20Plugin\x0a','XsRFt':'pluginScope','nxStf':'Where\x20should\x20the\x20plugin\x20be\x20installed?','Cmgcz':'User\x20(available\x20in\x20all\x20your\x20projects)','ULuGX':'project','oqKTN':'https://opencode.ai/config.json','BKfJM':function(_0x179466,_0x2ff987,_0xfc5e0a){return _0x179466(_0x2ff987,_0xfc5e0a);},'trfXo':_0x52e389(0xab),'QEuXe':function(_0x3a8828,_0x54a9e2,_0x1678a7){return _0x3a8828(_0x54a9e2,_0x1678a7);},'Koprq':function(_0x19f88d,_0x4f98a7){return _0x19f88d+_0x4f98a7;}},_0xb86985=existsSync(join(_0x423fd3[_0x52e389(0xa7)](getOpencodeConfigDir,_0x52e389(0xa0)),_0x423fd3['XAEGB']));let _0x31272b;if(_0xaaad45)_0x31272b=_0xaaad45;else{if(_0xb86985)_0x31272b='project';else{console[_0x52e389(0x9c)](_0x423fd3['saHbl']);const _0x4ace46=await _0x591f91['prompt']([{'type':_0x52e389(0xb1),'name':_0x423fd3['XsRFt'],'message':_0x423fd3['nxStf'],'choices':[{'name':_0x423fd3['Cmgcz'],'value':_0x52e389(0xad)},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x423fd3['ULuGX']}],'default':_0x52e389(0xad)}]);_0x31272b=_0x4ace46['pluginScope'];}}const _0x29d36f=join(getOpencodeConfigDir(_0x31272b),_0x423fd3[_0x52e389(0xae)]),_0x30d289='@ranger-testing/opencode-plugin',_0x22c1d7=_0x423fd3[_0x52e389(0xb0)];let _0x215396={};if(existsSync(_0x29d36f))try{const _0x445557=await _0x423fd3['BKfJM'](readFile,_0x29d36f,_0x52e389(0xac));_0x215396=JSON[_0x52e389(0xb3)](_0x445557);}catch(_0x3aab10){return console[_0x52e389(0x99)](_0x52e389(0xa9)),{'configured':![],'scope':_0x31272b,'error':_0x423fd3['trfXo'],'details':_0x3aab10};}const _0x39459f=Array['isArray'](_0x215396['plugin'])?_0x215396[_0x52e389(0xa3)]:[];if(_0x39459f[_0x52e389(0xa8)](_0x30d289))return console[_0x52e389(0x9c)]('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x31272b};return _0x215396['$schema']=_0x215396[_0x52e389(0xa6)]||_0x22c1d7,_0x215396[_0x52e389(0xa3)]=[..._0x39459f,_0x30d289],await _0x423fd3['QEuXe'](mkdir,_0x423fd3[_0x52e389(0xa7)](getOpencodeConfigDir,_0x31272b),{'recursive':!![]}),await writeFile(_0x29d36f,_0x423fd3['Koprq'](JSON['stringify'](_0x215396,null,0x2),'\x0a')),console['log'](_0x52e389(0x9d)),{'configured':!![],'scope':_0x31272b};}
@@ -1 +1 @@
1
- (function(_0x423bdf,_0x43c28d){const _0x24a6cb=_0x28c8,_0x29025d=_0x423bdf();while(!![]){try{const _0x52fc9d=-parseInt(_0x24a6cb(0x1df))/0x1+parseInt(_0x24a6cb(0x1e2))/0x2+-parseInt(_0x24a6cb(0x204))/0x3+parseInt(_0x24a6cb(0x20d))/0x4*(parseInt(_0x24a6cb(0x1fe))/0x5)+parseInt(_0x24a6cb(0x214))/0x6*(-parseInt(_0x24a6cb(0x206))/0x7)+-parseInt(_0x24a6cb(0x1ee))/0x8*(-parseInt(_0x24a6cb(0x207))/0x9)+parseInt(_0x24a6cb(0x200))/0xa*(parseInt(_0x24a6cb(0x202))/0xb);if(_0x52fc9d===_0x43c28d)break;else _0x29025d['push'](_0x29025d['shift']());}catch(_0x251d31){_0x29025d['push'](_0x29025d['shift']());}}}(_0xb39e,0x767e9));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 _0x28c8(_0x50c0a5,_0x1f594d){_0x50c0a5=_0x50c0a5-0x1dd;const _0xb39e73=_0xb39e();let _0x28c86b=_0xb39e73[_0x50c0a5];return _0x28c86b;}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 _0xb39e(){const _0x4e4d15=['Auto-detected\x20CI\x20profile:\x20','--scope','plugin','FlfwN','364266nOKKrk','baseUrl','ranger@trailhead','535500DlKlAh','ItKln','jLJSw','MWuPC','lXeqM','skills','rxaho','trailhead','YpcIC','chromium','path','project','28744BNcQJu','Multiple\x20CI\x20profiles\x20found:\x20','JvKkD','CHKxd','Ushxy','isDirectory','whUgf','log','uOHbW','mvPUw','marketplace','RseWK','name','success','✓\x20Claude\x20Code\x20plugin\x20installed','daRQK','443395OudINh','auth.json.enc','30UbWnqS','trackPhaseEnd','3067669ZMsuWO','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','2334801YrevGq','vJdwp','290668QrlCjZ','2295cQhdaF','EvIoQ','trackPhaseStart','qDkSP','error','profile_activate','16TkYPJM','vbhUN','No\x20API\x20token\x20available\x20for\x20decryption','✓\x20Active\x20profile:\x20','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','dir_setup','WujtH','108RLWmMu','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','DlSNV','yPhKE'];_0xb39e=function(){return _0x4e4d15;};return _0xb39e();}async function findCiProfile(_0x559a62){const _0x5557ea=_0x28c8,_0x4130e3={'YpcIC':function(_0x5b70a2,_0x536fc3,_0x57e462){return _0x5b70a2(_0x536fc3,_0x57e462);},'Jgcwd':function(_0x20c423,_0x2e82aa){return _0x20c423+_0x2e82aa;},'jLJSw':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','JvKkD':function(_0x238fad,_0x3e385e){return _0x238fad+_0x3e385e;},'CHKxd':function(_0x3705da,_0x24d207){return _0x3705da===_0x24d207;},'qDkSP':function(_0x55b59b,_0x5a854b,_0x2e4874){return _0x55b59b(_0x5a854b,_0x2e4874);}},_0x5bfde5=getRangerDir(),_0x51ebc2=_0x4130e3[_0x5557ea(0x1ea)](join,_0x5bfde5,'ci');if(_0x559a62){const _0x538952=join(_0x51ebc2,_0x559a62);return{'name':_0x559a62,'path':_0x538952};}if(!existsSync(_0x51ebc2))throw new Error(_0x4130e3['Jgcwd']('No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a',_0x4130e3['jLJSw']));const _0x2418f9=await readdir(_0x51ebc2,{'withFileTypes':!![]}),_0x5f15a8=_0x2418f9['filter'](_0x568c38=>_0x568c38[_0x5557ea(0x1f3)]())['map'](_0x50e0c4=>_0x50e0c4['name']);if(_0x5f15a8['length']===0x0)throw new Error(_0x4130e3[_0x5557ea(0x1f0)]('No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a',_0x4130e3[_0x5557ea(0x1e4)]));if(_0x4130e3[_0x5557ea(0x1f1)](_0x5f15a8['length'],0x1)){const _0x8763ef=_0x5f15a8[0x0];return console['log'](_0x5557ea(0x218)+_0x8763ef),{'name':_0x8763ef,'path':_0x4130e3[_0x5557ea(0x20a)](join,_0x51ebc2,_0x8763ef)};}throw new Error(_0x5557ea(0x1ef)+_0x5f15a8['join'](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x44dcf0=_0x28c8,_0x24c3d4={'yPhKE':function(_0xc14215,_0x581d25){return _0xc14215(_0x581d25);},'UdvPk':_0x44dcf0(0x1e1),'WxwTS':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','RseWK':'✓\x20Marketplace\x20already\x20added','whUgf':'plugin','lXeqM':_0x44dcf0(0x1f8),'vHmhn':'add','wDSpo':'ranger-testing/trailhead','JcuVc':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','EvIoQ':_0x44dcf0(0x1fc)},_0x13fded=await _0x24c3d4[_0x44dcf0(0x217)](isPluginInstalled,_0x24c3d4['UdvPk']);if(_0x13fded)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console['log'](_0x24c3d4['WxwTS']);const _0xef23cd=await isMarketplaceAdded(_0x44dcf0(0x1e9));let _0x2e359b=_0xef23cd;if(_0xef23cd)console[_0x44dcf0(0x1f5)](_0x24c3d4[_0x44dcf0(0x1f9)]);else{const _0x595c64=await _0x24c3d4['yPhKE'](runClaudeCommand,[_0x24c3d4[_0x44dcf0(0x1f4)],_0x24c3d4[_0x44dcf0(0x1e6)],_0x24c3d4['vHmhn'],_0x24c3d4['wDSpo']]);!_0x595c64['success']?(console[_0x44dcf0(0x20b)]('Failed\x20to\x20add\x20marketplace:',_0x595c64['error']),console['log'](_0x24c3d4['JcuVc'])):_0x2e359b=!![];}if(_0x2e359b){const _0x52763b=await runClaudeCommand(['plugin','install',_0x24c3d4['UdvPk'],_0x44dcf0(0x219),_0x44dcf0(0x1ed)]);!_0x52763b[_0x44dcf0(0x1fb)]?(console['error']('Failed\x20to\x20install\x20plugin:',_0x52763b[_0x44dcf0(0x20b)]),console['log']('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console['log'](_0x24c3d4[_0x44dcf0(0x208)]);}return!![];}export async function setupCi(_0x192862,_0x37d602,_0x9de248){const _0x32a7a5=_0x28c8,_0x1c696a={'CxEOT':'auth','UNOtV':function(_0xb001b1,_0x51af4d){return _0xb001b1(_0x51af4d);},'FlfwN':function(_0x56fb6f){return _0x56fb6f();},'daRQK':'sessions','MWuPC':function(_0x2df121,_0xe637fa){return _0x2df121(_0xe637fa);},'ItKln':function(_0x435c26,_0x4a5961,_0x558244){return _0x435c26(_0x4a5961,_0x558244);},'LBqQQ':'dir_setup','SMwET':_0x32a7a5(0x20c),'EKODp':'settings.json','uOHbW':function(_0x380a99,_0x31b274){return _0x380a99(_0x31b274);},'dwBBx':function(_0x3e7f90,_0x39e411,_0x57f608){return _0x3e7f90(_0x39e411,_0x57f608);},'jRjFd':'auth.json','vJdwp':function(_0x482173,_0x25db65,_0xbde687){return _0x482173(_0x25db65,_0xbde687);},'WujtH':_0x32a7a5(0x1ff),'SnJCm':function(_0xbb729d){return _0xbb729d();},'hEPkf':_0x32a7a5(0x20f),'DlSNV':function(_0x417fcb,_0xf2469c){return _0x417fcb(_0xf2469c);},'xGJIr':'✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','rxaho':function(_0x43854d,_0x44ae6c){return _0x43854d instanceof _0x44ae6c;},'vbhUN':'✓\x20Auth\x20state\x20found','mvPUw':_0x32a7a5(0x215),'Ushxy':function(_0x5e9765,_0x165b68){return _0x5e9765(_0x165b68);},'WvmqR':function(_0xb616b5){return _0xb616b5();},'CQuWs':'project','QNExO':'skills','qDAfa':_0x32a7a5(0x203)};console['log']('\x0a🔧\x20Ranger\x20CI\x20Setup\x0a'),_0x9de248?.[_0x32a7a5(0x209)](_0x1c696a['CxEOT']),await _0x1c696a['UNOtV'](authenticate,_0x192862),_0x9de248?.[_0x32a7a5(0x201)](_0x1c696a['CxEOT']),_0x9de248?.['trackPhaseStart'](_0x32a7a5(0x212));const {path:_0x228bff,installed:_0x301cec}=await _0x1c696a[_0x32a7a5(0x1de)](ensureRangerDir);await writeRangerGitignore(_0x228bff);const _0x3fc9e9=join(_0x228bff,_0x1c696a[_0x32a7a5(0x1fd)]);!_0x1c696a['MWuPC'](existsSync,_0x3fc9e9)&&await _0x1c696a[_0x32a7a5(0x1e3)](mkdir,_0x3fc9e9,{'recursive':!![]});_0x9de248?.['trackPhaseEnd'](_0x1c696a['LBqQQ'],{'installed':_0x301cec}),_0x9de248?.['trackPhaseStart']('chromium');let _0x3dbf1c=![];_0x37d602?.['skipChromium']?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x3dbf1c=await ensureChromium();_0x9de248?.[_0x32a7a5(0x201)](_0x32a7a5(0x1eb),{'installed':_0x3dbf1c,'skipped':!!_0x37d602?.['skipChromium']}),_0x9de248?.[_0x32a7a5(0x209)](_0x1c696a['SMwET']);const _0x43a51c=await findCiProfile(_0x37d602?.['profile']);let _0x47cd74=![];_0x37d602?.['baseUrl']&&(await _0x1c696a[_0x32a7a5(0x1e3)](mkdir,_0x43a51c['path'],{'recursive':!![]}),await saveSettings(_0x43a51c[_0x32a7a5(0x1fa)],{'baseUrl':_0x37d602['baseUrl'],'headless':!![]}),console['log']('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x37d602[_0x32a7a5(0x1e0)]),_0x47cd74=!![]);const _0x1c426f=_0x1c696a['ItKln'](join,_0x43a51c[_0x32a7a5(0x1ec)],_0x1c696a['EKODp']);if(!_0x1c696a[_0x32a7a5(0x1f6)](existsSync,_0x1c426f)&&!_0x47cd74)throw new Error('CI\x20profile\x20\x22'+_0x43a51c[_0x32a7a5(0x1fa)]+_0x32a7a5(0x211));const _0x1772bd=_0x1c696a['dwBBx'](join,_0x43a51c['path'],_0x1c696a['jRjFd']),_0x28635f=_0x1c696a[_0x32a7a5(0x205)](join,_0x43a51c['path'],_0x1c696a[_0x32a7a5(0x213)]),_0x4b7457=existsSync(_0x1772bd),_0x4e87f6=_0x1c696a[_0x32a7a5(0x1e5)](existsSync,_0x28635f);if(_0x4e87f6)try{const _0x2a5628=await _0x1c696a['SnJCm'](getToken);if(!_0x2a5628)throw new Error(_0x1c696a['hEPkf']);const _0x13ebc7=await _0x1c696a[_0x32a7a5(0x216)](readFile,_0x28635f);decrypt(_0x13ebc7,_0x2a5628),console[_0x32a7a5(0x1f5)](_0x1c696a['xGJIr']);}catch(_0x3e0fd9){const _0x1ea758=_0x1c696a[_0x32a7a5(0x1e8)](_0x3e0fd9,Error)?_0x3e0fd9['message']:String(_0x3e0fd9);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x43a51c['name']+'\x22:\x20'+_0x1ea758);}else _0x4b7457?console['log'](_0x1c696a[_0x32a7a5(0x20e)]):console['log'](_0x1c696a[_0x32a7a5(0x1f7)]);await _0x1c696a[_0x32a7a5(0x1f2)](writeActiveProfileName,_0x43a51c['name']),console[_0x32a7a5(0x1f5)](_0x32a7a5(0x210)+_0x43a51c[_0x32a7a5(0x1fa)]),_0x9de248?.[_0x32a7a5(0x201)](_0x32a7a5(0x20c),{'profileName':_0x43a51c[_0x32a7a5(0x1fa)],'hasAuth':_0x4b7457,'hasEncryptedAuth':_0x4e87f6,'createdSettings':_0x47cd74}),_0x9de248?.[_0x32a7a5(0x209)](_0x32a7a5(0x1dd));const _0x36f52b=await _0x1c696a['WvmqR'](installPluginNonInteractive);_0x9de248?.['trackPhaseEnd'](_0x32a7a5(0x1dd),{'installed':_0x36f52b}),_0x9de248?.['trackPhaseStart'](_0x32a7a5(0x1e7)),await skillup({'autoInstall':_0x1c696a['CQuWs']}),_0x9de248?.['trackPhaseEnd'](_0x1c696a['QNExO']),console['log'](_0x1c696a['qDAfa']);}
1
+ (function(_0x537f42,_0x5dd73a){const _0x5dc418=_0x50fa,_0x2f94ea=_0x537f42();while(!![]){try{const _0x3e6c45=-parseInt(_0x5dc418(0x187))/0x1*(parseInt(_0x5dc418(0x17b))/0x2)+parseInt(_0x5dc418(0x18c))/0x3*(-parseInt(_0x5dc418(0x1a9))/0x4)+-parseInt(_0x5dc418(0x175))/0x5+parseInt(_0x5dc418(0x18b))/0x6*(parseInt(_0x5dc418(0x16c))/0x7)+-parseInt(_0x5dc418(0x1a6))/0x8*(-parseInt(_0x5dc418(0x183))/0x9)+parseInt(_0x5dc418(0x195))/0xa*(parseInt(_0x5dc418(0x196))/0xb)+parseInt(_0x5dc418(0x1a4))/0xc*(-parseInt(_0x5dc418(0x19c))/0xd);if(_0x3e6c45===_0x5dd73a)break;else _0x2f94ea['push'](_0x2f94ea['shift']());}catch(_0x318ae0){_0x2f94ea['push'](_0x2f94ea['shift']());}}}(_0x161d,0x4f196));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x161d(){const _0x2c6fdf=['5377510bOCQHf','11ppdzIx','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','mZMvN','tmZWG','chromium','1464294PXObmz','skipChromium','trackPhaseEnd','profile_activate','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','sessions','project','XfYyF','72EpmNAv','joJiq','94832TFHStJ','avpWH','name','204DiFOJe','jBUOH','evELa','map','profile','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','7NPaRZi','eSmAo','GGBgh','--scope','plugin','OgGAM','DMIbR','install','wAAOe','1718915tVWBJj','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','auth.json','FEtfM','baseUrl','path','230662xHhzLC','EdrCY','auth','LZaoS','eKcCm','npNsx','\x22:\x20','length','261Mrykfj','PZFOM','skills','log','1LpFHNx','trackPhaseStart','imzVd','CI\x20profile\x20\x22','3664002yyMGHv','1956znMfLu','error','ranger@trailhead','✓\x20Claude\x20Code\x20plugin\x20installed','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','Auto-detected\x20CI\x20profile:\x20','add','marketplace','success'];_0x161d=function(){return _0x2c6fdf;};return _0x161d();}import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';function _0x50fa(_0x349875,_0x500e8b){_0x349875=_0x349875-0x168;const _0x161d84=_0x161d();let _0x50faa2=_0x161d84[_0x349875];return _0x50faa2;}import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x15c32c){const _0x3dd1c4=_0x50fa,_0x3cd934={'GXBKw':function(_0x5c0781,_0x3582e5,_0x496354){return _0x5c0781(_0x3582e5,_0x496354);},'abfQR':function(_0x3da730,_0x47d9bc,_0x572b53){return _0x3da730(_0x47d9bc,_0x572b53);},'SRFvp':_0x3dd1c4(0x1a0),'eSmAo':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','EdrCY':function(_0x10f1b5,_0x576d7d,_0x293d13){return _0x10f1b5(_0x576d7d,_0x293d13);},'EKHXq':function(_0x1076c4,_0x24b24d){return _0x1076c4+_0x24b24d;},'hghcX':'No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a'},_0x3a65a4=getRangerDir(),_0x22a350=_0x3cd934['GXBKw'](join,_0x3a65a4,'ci');if(_0x15c32c){const _0x5c1c70=_0x3cd934['abfQR'](join,_0x22a350,_0x15c32c);return{'name':_0x15c32c,'path':_0x5c1c70};}if(!existsSync(_0x22a350))throw new Error(_0x3cd934['SRFvp']+_0x3cd934[_0x3dd1c4(0x16d)]);const _0xe06a68=await _0x3cd934[_0x3dd1c4(0x17c)](readdir,_0x22a350,{'withFileTypes':!![]}),_0x576f5f=_0xe06a68['filter'](_0x49a5c5=>_0x49a5c5['isDirectory']())[_0x3dd1c4(0x169)](_0x3101f2=>_0x3101f2['name']);if(_0x576f5f[_0x3dd1c4(0x182)]===0x0)throw new Error(_0x3cd934['EKHXq'](_0x3cd934['hghcX'],'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'));if(_0x576f5f[_0x3dd1c4(0x182)]===0x1){const _0x19ac9e=_0x576f5f[0x0];return console[_0x3dd1c4(0x186)](_0x3dd1c4(0x191)+_0x19ac9e),{'name':_0x19ac9e,'path':join(_0x22a350,_0x19ac9e)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x576f5f['join'](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x54124c=_0x50fa,_0x58931e={'VjZBO':_0x54124c(0x18e),'GpXyl':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','FEtfM':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','XfYyF':function(_0x48aee3,_0x11ab56){return _0x48aee3(_0x11ab56);},'mZMvN':_0x54124c(0x170),'JKAMg':_0x54124c(0x192),'LZaoS':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','tmZWG':_0x54124c(0x173),'pyFaN':_0x54124c(0x16f),'evELa':'Failed\x20to\x20install\x20plugin:','bsGKQ':_0x54124c(0x18f)},_0x26f30b=await isPluginInstalled(_0x58931e['VjZBO']);if(_0x26f30b)return console[_0x54124c(0x186)](_0x58931e['GpXyl']),![];console[_0x54124c(0x186)](_0x58931e[_0x54124c(0x178)]);const _0x3fbb5c=await isMarketplaceAdded('trailhead');let _0x228782=_0x3fbb5c;if(_0x3fbb5c)console[_0x54124c(0x186)]('✓\x20Marketplace\x20already\x20added');else{const _0x5e2abb=await _0x58931e['XfYyF'](runClaudeCommand,[_0x58931e[_0x54124c(0x199)],_0x54124c(0x193),_0x58931e['JKAMg'],'ranger-testing/trailhead']);!_0x5e2abb[_0x54124c(0x194)]?(console['error']('Failed\x20to\x20add\x20marketplace:',_0x5e2abb['error']),console[_0x54124c(0x186)](_0x58931e[_0x54124c(0x17e)])):_0x228782=!![];}if(_0x228782){const _0x316675=await _0x58931e[_0x54124c(0x1a3)](runClaudeCommand,['plugin',_0x58931e[_0x54124c(0x19a)],_0x58931e['VjZBO'],_0x58931e['pyFaN'],_0x54124c(0x1a2)]);!_0x316675[_0x54124c(0x194)]?(console['error'](_0x58931e[_0x54124c(0x168)],_0x316675[_0x54124c(0x18d)]),console['log']('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console[_0x54124c(0x186)](_0x58931e['bsGKQ']);}return!![];}export async function setupCi(_0x2fefed,_0x3ead57,_0x34ab71){const _0x599280=_0x50fa,_0x124d6d={'jBUOH':_0x599280(0x17d),'imzVd':'dir_setup','TAuWN':function(_0x3c973d,_0x4b60be){return _0x3c973d(_0x4b60be);},'DkuVz':function(_0x495eb1,_0x5554e8,_0x164622){return _0x495eb1(_0x5554e8,_0x164622);},'dQxNm':function(_0x6efd04,_0x231c51){return _0x6efd04(_0x231c51);},'LJALW':_0x599280(0x190),'avpWH':function(_0x4589ba){return _0x4589ba();},'GGBgh':_0x599280(0x19b),'eKcCm':function(_0x1b0a0d,_0x352e58,_0x2a63e8){return _0x1b0a0d(_0x352e58,_0x2a63e8);},'npNsx':function(_0xef5bef,_0x553af9,_0x18bc7e){return _0xef5bef(_0x553af9,_0x18bc7e);},'OuEsL':function(_0x3e3193,_0x4b6860){return _0x3e3193(_0x4b6860);},'CnzJU':function(_0x525328,_0x4a37cc,_0x182557){return _0x525328(_0x4a37cc,_0x182557);},'uuGal':_0x599280(0x176),'DMIbR':function(_0x3d9301,_0x452755){return _0x3d9301 instanceof _0x452755;},'biyHC':'✓\x20Auth\x20state\x20found','DDeNx':_0x599280(0x198),'wAAOe':'profile_activate','OgGAM':_0x599280(0x170),'PZFOM':function(_0x5ea3b8,_0x24fad8){return _0x5ea3b8(_0x24fad8);},'joJiq':'project','rUClH':_0x599280(0x185)};console['log']('\x0a🔧\x20Ranger\x20CI\x20Setup\x0a'),_0x34ab71?.[_0x599280(0x188)](_0x124d6d[_0x599280(0x1aa)]),await authenticate(_0x2fefed),_0x34ab71?.['trackPhaseEnd']('auth'),_0x34ab71?.['trackPhaseStart'](_0x124d6d[_0x599280(0x189)]);const {path:_0xacdc59,installed:_0x2f8645}=await ensureRangerDir();await _0x124d6d['TAuWN'](writeRangerGitignore,_0xacdc59);const _0xa30817=_0x124d6d['DkuVz'](join,_0xacdc59,_0x599280(0x1a1));!_0x124d6d['dQxNm'](existsSync,_0xa30817)&&await _0x124d6d['DkuVz'](mkdir,_0xa30817,{'recursive':!![]});_0x34ab71?.[_0x599280(0x19e)](_0x124d6d[_0x599280(0x189)],{'installed':_0x2f8645}),_0x34ab71?.['trackPhaseStart'](_0x599280(0x19b));let _0xec1be6=![];_0x3ead57?.[_0x599280(0x19d)]?console['log'](_0x124d6d['LJALW']):_0xec1be6=await _0x124d6d[_0x599280(0x1a7)](ensureChromium);_0x34ab71?.['trackPhaseEnd'](_0x124d6d[_0x599280(0x16e)],{'installed':_0xec1be6,'skipped':!!_0x3ead57?.['skipChromium']}),_0x34ab71?.[_0x599280(0x188)](_0x599280(0x19f));const _0x170a8f=await findCiProfile(_0x3ead57?.[_0x599280(0x16a)]);let _0x4e4d28=![];_0x3ead57?.['baseUrl']&&(await mkdir(_0x170a8f[_0x599280(0x17a)],{'recursive':!![]}),await _0x124d6d[_0x599280(0x17f)](saveSettings,_0x170a8f['name'],{'baseUrl':_0x3ead57[_0x599280(0x179)],'headless':!![]}),console['log']('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x3ead57['baseUrl']),_0x4e4d28=!![]);const _0x48593d=_0x124d6d[_0x599280(0x180)](join,_0x170a8f[_0x599280(0x17a)],'settings.json');if(!_0x124d6d['OuEsL'](existsSync,_0x48593d)&&!_0x4e4d28)throw new Error(_0x599280(0x18a)+_0x170a8f[_0x599280(0x1a8)]+_0x599280(0x197));const _0xcba118=join(_0x170a8f[_0x599280(0x17a)],_0x599280(0x177)),_0x2d45de=_0x124d6d['CnzJU'](join,_0x170a8f['path'],'auth.json.enc'),_0x487dce=existsSync(_0xcba118),_0x5ca39f=_0x124d6d['TAuWN'](existsSync,_0x2d45de);if(_0x5ca39f)try{const _0x51c5d7=await getToken();if(!_0x51c5d7)throw new Error('No\x20API\x20token\x20available\x20for\x20decryption');const _0x376886=await readFile(_0x2d45de);_0x124d6d['CnzJU'](decrypt,_0x376886,_0x51c5d7),console['log'](_0x124d6d['uuGal']);}catch(_0x4d0073){const _0x4fcda8=_0x124d6d[_0x599280(0x172)](_0x4d0073,Error)?_0x4d0073['message']:String(_0x4d0073);throw new Error(_0x599280(0x16b)+_0x170a8f[_0x599280(0x1a8)]+_0x599280(0x181)+_0x4fcda8);}else _0x487dce?console['log'](_0x124d6d['biyHC']):console['log'](_0x124d6d['DDeNx']);await writeActiveProfileName(_0x170a8f['name']),console['log']('✓\x20Active\x20profile:\x20'+_0x170a8f['name']),_0x34ab71?.['trackPhaseEnd'](_0x124d6d[_0x599280(0x174)],{'profileName':_0x170a8f[_0x599280(0x1a8)],'hasAuth':_0x487dce,'hasEncryptedAuth':_0x5ca39f,'createdSettings':_0x4e4d28}),_0x34ab71?.[_0x599280(0x188)](_0x124d6d[_0x599280(0x171)]);const _0x519db1=await installPluginNonInteractive();_0x34ab71?.['trackPhaseEnd']('plugin',{'installed':_0x519db1}),_0x34ab71?.['trackPhaseStart'](_0x599280(0x185)),await _0x124d6d[_0x599280(0x184)](skillup,{'autoInstall':_0x124d6d[_0x599280(0x1a5)]}),_0x34ab71?.[_0x599280(0x19e)](_0x124d6d['rUClH']),console[_0x599280(0x186)]('\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a');}
@@ -1 +1 @@
1
- (function(_0x179a31,_0x3b09ed){const _0x11ef07=_0x28ad,_0x161c5f=_0x179a31();while(!![]){try{const _0x5cd496=parseInt(_0x11ef07(0x1d2))/0x1*(-parseInt(_0x11ef07(0x1d5))/0x2)+-parseInt(_0x11ef07(0x1ae))/0x3*(-parseInt(_0x11ef07(0x1ce))/0x4)+-parseInt(_0x11ef07(0x1da))/0x5*(-parseInt(_0x11ef07(0x1b8))/0x6)+parseInt(_0x11ef07(0x1ba))/0x7*(parseInt(_0x11ef07(0x1c5))/0x8)+parseInt(_0x11ef07(0x1c4))/0x9+-parseInt(_0x11ef07(0x1cf))/0xa+-parseInt(_0x11ef07(0x1d3))/0xb*(parseInt(_0x11ef07(0x1cd))/0xc);if(_0x5cd496===_0x3b09ed)break;else _0x161c5f['push'](_0x161c5f['shift']());}catch(_0x5d2d73){_0x161c5f['push'](_0x161c5f['shift']());}}}(_0x279d,0x4fac3));import{basename}from'path';function _0x279d(){const _0x801342=['61448zMQLRT','5811090QHgpjJ','icJui','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','7NbcXxq','97625xqRAJo','claude','54826TumTNq','CyLYv','project','/.claude/skills/','PEvWj','2015600agZepX','autoInstall','suppressUsage','6VIhYde','eTAFa','\x20\x202.\x20Run:\x20ranger\x20setup','installLevel','KENZR','user','\x0a✅\x20Installed\x20','log','/skills/','\x20successfully!\x0a','6LTBFyd','stdin','61565IxPvuw','\x20--opencode','\x0a📦\x20Installing\x20skills...\x0a','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','prompt','platform','list','opencode','This\x20project\x20only\x20(','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','370170MAAfHM','576nMBXiY','HRPSa','Lqcon','tVQRs','To\x20use:','VCSKA','EUvPq','ZMdCc','12AoPBnr'];_0x279d=function(){return _0x801342;};return _0x279d();}import _0x45280c from'inquirer';function _0x28ad(_0x325236,_0x4c9f87){_0x325236=_0x325236-0x1ac;const _0x279d8e=_0x279d();let _0x28ad39=_0x279d8e[_0x325236];return _0x28ad39;}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x21542e={}){const _0x54c4f2=_0x28ad,_0x9bc87f={'yyyJz':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','kOHuF':_0x54c4f2(0x1d4),'pDqOq':function(_0x52ee91){return _0x52ee91();},'hNDep':'5|0|1|3|4|2','NodNq':'To\x20get\x20started:','HzZnw':_0x54c4f2(0x1c3),'ZMdCc':_0x54c4f2(0x1bd),'vXUkz':'✓\x20Found\x20API\x20token','Lqcon':function(_0x11eda7,_0x521f2d){return _0x11eda7===_0x521f2d;},'XgKKa':'opencode','KENZR':function(_0x4ed86b,_0xfad7a){return _0x4ed86b(_0xfad7a);},'PEvWj':function(_0x3d7627,_0x36bc85){return _0x3d7627===_0x36bc85;},'MjmIA':_0x54c4f2(0x1c0),'eTAFa':_0x54c4f2(0x1b1),'ZZjft':'ranger','tVQRs':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','CyLYv':function(_0x4eed0a,_0x2705b1){return _0x4eed0a instanceof _0x2705b1;},'EUvPq':function(_0x193a17,_0x526133){return _0x193a17>_0x526133;},'HRPSa':function(_0x501050,_0x16a604){return _0x501050===_0x16a604;},'icJui':'user-level','MBLLZ':_0x54c4f2(0x1c9),'VCSKA':'\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!'};console['log'](_0x9bc87f['yyyJz']);const _0x54a835=_0x21542e[_0x54c4f2(0x1bf)]??_0x9bc87f['kOHuF'],_0x228d9e=await _0x9bc87f['pDqOq'](getToken);if(!_0x228d9e){const _0x31e8e6=_0x9bc87f['hNDep']['split']('|');let _0x46b780=0x0;while(!![]){switch(_0x31e8e6[_0x46b780++]){case'0':console[_0x54c4f2(0x1b5)](_0x9bc87f['NodNq']);continue;case'1':console[_0x54c4f2(0x1b5)](_0x9bc87f['HzZnw']);continue;case'2':return;case'3':console['log'](_0x54c4f2(0x1b0)+(_0x54a835==='opencode'?_0x54c4f2(0x1bb):'')+'\x20<your-api-token>');continue;case'4':console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x54a835===_0x54c4f2(0x1c1)?'\x20--opencode':'')+'\x0a');continue;case'5':console[_0x54c4f2(0x1b5)](_0x9bc87f[_0x54c4f2(0x1cc)]);continue;}break;}}console[_0x54c4f2(0x1b5)](_0x9bc87f['vXUkz']);const _0x1d33ea=getProjectRoot(),_0x27d802=basename(_0x1d33ea),_0x330c0b=_0x9bc87f[_0x54c4f2(0x1c7)](_0x54a835,_0x9bc87f['XgKKa'])?_0x9bc87f[_0x54c4f2(0x1b2)](getOpencodeConfigDir,'user')+'/skills/':getClaudeConfigDir()+_0x54c4f2(0x1b6),_0x57e322=_0x9bc87f[_0x54c4f2(0x1d9)](_0x54a835,_0x9bc87f['XgKKa'])?_0x1d33ea+'/.opencode/skills/':_0x1d33ea+_0x54c4f2(0x1d8),_0x136249=process[_0x54c4f2(0x1b9)]['isTTY']&&process['stdout']['isTTY'];let _0x2b72d3;if(_0x21542e[_0x54c4f2(0x1ac)])_0x2b72d3=_0x21542e[_0x54c4f2(0x1ac)];else{if(_0x136249){const _0x35f214=await _0x45280c[_0x54c4f2(0x1be)]([{'type':_0x9bc87f['MjmIA'],'name':_0x9bc87f[_0x54c4f2(0x1af)],'message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':'All\x20projects\x20('+_0x330c0b+')','value':_0x54c4f2(0x1b3)},{'name':_0x54c4f2(0x1c2)+_0x57e322+')','value':_0x54c4f2(0x1d7)}]}]);_0x2b72d3=_0x35f214['installLevel'];}else _0x2b72d3='project',console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x57e322+')');}let _0x46c5ff=0x0;const _0x2b9636=_0x9bc87f['pDqOq'](getCurrentVersion);console['log'](_0x54c4f2(0x1bc));try{const _0x20a917=await installSkill(_0x9bc87f['ZZjft'],{'cliVersion':_0x2b9636,'level':_0x2b72d3,'platform':_0x54a835});_0x20a917&&_0x46c5ff++;}catch(_0x507c23){console['warn'](_0x9bc87f[_0x54c4f2(0x1c8)],_0x9bc87f[_0x54c4f2(0x1d6)](_0x507c23,Error)?_0x507c23['message']:_0x507c23);}if(_0x9bc87f[_0x54c4f2(0x1cb)](_0x46c5ff,0x0)){const _0x2fc47e=_0x9bc87f[_0x54c4f2(0x1c6)](_0x2b72d3,_0x54c4f2(0x1b3))?_0x9bc87f[_0x54c4f2(0x1d0)]:'project-level';console['log'](_0x54c4f2(0x1b4)+_0x46c5ff+'\x20'+_0x2fc47e+'\x20skill'+(_0x46c5ff>0x1?'s':'')+_0x54c4f2(0x1b7)),!_0x21542e[_0x54c4f2(0x1ad)]&&(console[_0x54c4f2(0x1b5)](_0x9bc87f['MBLLZ']),_0x54a835===_0x9bc87f['XgKKa']?console[_0x54c4f2(0x1b5)](_0x54c4f2(0x1d1)):console['log'](_0x9bc87f[_0x54c4f2(0x1ca)]));}else console[_0x54c4f2(0x1b5)]('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
1
+ function _0x2521(_0x30879d,_0x5da847){_0x30879d=_0x30879d-0xd7;const _0x45ae2c=_0x45ae();let _0x2521ae=_0x45ae2c[_0x30879d];return _0x2521ae;}(function(_0x10cb6b,_0x3cd4f6){const _0x7546a4=_0x2521,_0x453a23=_0x10cb6b();while(!![]){try{const _0x501173=parseInt(_0x7546a4(0x101))/0x1+-parseInt(_0x7546a4(0xf2))/0x2+-parseInt(_0x7546a4(0xff))/0x3+-parseInt(_0x7546a4(0xe4))/0x4+parseInt(_0x7546a4(0xf4))/0x5+-parseInt(_0x7546a4(0xf5))/0x6+parseInt(_0x7546a4(0xd7))/0x7;if(_0x501173===_0x3cd4f6)break;else _0x453a23['push'](_0x453a23['shift']());}catch(_0x84615a){_0x453a23['push'](_0x453a23['shift']());}}}(_0x45ae,0x31aa2));import{basename}from'path';import _0x5ae3f3 from'inquirer';function _0x45ae(){const _0x1e2bc6=['\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!','eVwqE','EATnR','user','split','All\x20projects\x20(','1625064aPsCjZ','isTTY','platform','stdout','project-level','\x20skill','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','TFTSh','message','/skills/','ranger','\x0a📦\x20Installing\x20skills...\x0a','TBvri','list','190172MtLBxR','\x0a✅\x20Installed\x20','205135WIpkTk','1480896pNTaAd','aWYPg','zRmty','TEySU','IFGmy','dCOnz','autoInstall','opencode','\x20\x203.\x20Run:\x20ranger\x20skillup','To\x20get\x20started:','981963dSrdvG','stdin','311444dYaMFc','LcdaW','JNAGJ','log','project','prompt','6485108hzHRcl','\x20\x202.\x20Run:\x20ranger\x20setup','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','/.opencode/skills/','suppressUsage','MeNrS','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a'];_0x45ae=function(){return _0x1e2bc6;};return _0x45ae();}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x1f2e8e={}){const _0x4f0702=_0x2521,_0xd4ac1d={'zRmty':_0x4f0702(0xdd),'dCOnz':function(_0x59dfea){return _0x59dfea();},'MeNrS':'2|3|1|0|4|5','gqZEs':function(_0x5bdbeb,_0x3919b8){return _0x5bdbeb===_0x3919b8;},'IFGmy':'\x20--opencode','JNAGJ':'✓\x20Found\x20API\x20token','eVwqE':function(_0x52fa44){return _0x52fa44();},'TFTSh':function(_0x562f4e,_0x542c04){return _0x562f4e(_0x542c04);},'TBvri':_0x4f0702(0xfc),'TEySU':'user','oBqqZ':function(_0x3b4b6d){return _0x3b4b6d();},'HlmQD':'Where\x20should\x20skills\x20be\x20installed?','aWYPg':_0x4f0702(0x105),'EATnR':_0x4f0702(0xee),'aveQu':function(_0x1b5b45,_0x2270cc){return _0x1b5b45 instanceof _0x2270cc;},'ScRcK':_0x4f0702(0xe8),'LcdaW':function(_0x5d338a,_0x5eaafa){return _0x5d338a>_0x5eaafa;},'lEjUk':'To\x20use:','nbQBZ':_0x4f0702(0xea)};console[_0x4f0702(0x104)](_0xd4ac1d[_0x4f0702(0xf7)]);const _0x5045ce=_0x1f2e8e[_0x4f0702(0xe6)]??'claude',_0x1165f3=await _0xd4ac1d[_0x4f0702(0xfa)](getToken);if(!_0x1165f3){const _0x2e0871=_0xd4ac1d[_0x4f0702(0xdc)][_0x4f0702(0xe2)]('|');let _0x369481=0x0;while(!![]){switch(_0x2e0871[_0x369481++]){case'0':console['log'](_0x4f0702(0xd8)+(_0xd4ac1d['gqZEs'](_0x5045ce,'opencode')?_0xd4ac1d[_0x4f0702(0xf9)]:'')+'\x20<your-api-token>');continue;case'1':console[_0x4f0702(0x104)]('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli');continue;case'2':console[_0x4f0702(0x104)]('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a');continue;case'3':console['log'](_0x4f0702(0xfe));continue;case'4':console[_0x4f0702(0x104)](_0x4f0702(0xfd)+(_0x5045ce==='opencode'?_0xd4ac1d[_0x4f0702(0xf9)]:'')+'\x0a');continue;case'5':return;}break;}}console[_0x4f0702(0x104)](_0xd4ac1d[_0x4f0702(0x103)]);const _0x10ca91=_0xd4ac1d[_0x4f0702(0xdf)](getProjectRoot),_0x24162b=_0xd4ac1d['TFTSh'](basename,_0x10ca91),_0x5d5092=_0x5045ce===_0xd4ac1d['TBvri']?_0xd4ac1d[_0x4f0702(0xeb)](getOpencodeConfigDir,_0xd4ac1d['TEySU'])+_0x4f0702(0xed):_0xd4ac1d['oBqqZ'](getClaudeConfigDir)+_0x4f0702(0xed),_0x5c108d=_0xd4ac1d['gqZEs'](_0x5045ce,_0xd4ac1d[_0x4f0702(0xf0)])?_0x10ca91+_0x4f0702(0xda):_0x10ca91+'/.claude/skills/',_0x5067da=process[_0x4f0702(0x100)]['isTTY']&&process[_0x4f0702(0xe7)][_0x4f0702(0xe5)];let _0x25c223;if(_0x1f2e8e[_0x4f0702(0xfb)])_0x25c223=_0x1f2e8e['autoInstall'];else{if(_0x5067da){const _0x54c9bd=await _0x5ae3f3[_0x4f0702(0x106)]([{'type':_0x4f0702(0xf1),'name':'installLevel','message':_0xd4ac1d['HlmQD'],'choices':[{'name':_0x4f0702(0xe3)+_0x5d5092+')','value':_0xd4ac1d[_0x4f0702(0xf8)]},{'name':'This\x20project\x20only\x20('+_0x5c108d+')','value':_0xd4ac1d[_0x4f0702(0xf6)]}]}]);_0x25c223=_0x54c9bd['installLevel'];}else _0x25c223='project',console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x5c108d+')');}let _0x1ac44f=0x0;const _0x38dea2=getCurrentVersion();console[_0x4f0702(0x104)](_0x4f0702(0xef));try{const _0x2fbe1b=await installSkill(_0xd4ac1d[_0x4f0702(0xe0)],{'cliVersion':_0x38dea2,'level':_0x25c223,'platform':_0x5045ce});_0x2fbe1b&&_0x1ac44f++;}catch(_0x58ef70){console['warn'](_0x4f0702(0xd9),_0xd4ac1d['aveQu'](_0x58ef70,Error)?_0x58ef70[_0x4f0702(0xec)]:_0x58ef70);}if(_0x1ac44f>0x0){const _0x36fc0e=_0xd4ac1d['gqZEs'](_0x25c223,_0x4f0702(0xe1))?'user-level':_0xd4ac1d['ScRcK'];console['log'](_0x4f0702(0xf3)+_0x1ac44f+'\x20'+_0x36fc0e+_0x4f0702(0xe9)+(_0xd4ac1d[_0x4f0702(0x102)](_0x1ac44f,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x1f2e8e[_0x4f0702(0xdb)]&&(console[_0x4f0702(0x104)](_0xd4ac1d['lEjUk']),_0xd4ac1d['gqZEs'](_0x5045ce,'opencode')?console[_0x4f0702(0x104)](_0xd4ac1d['nbQBZ']):console[_0x4f0702(0x104)](_0x4f0702(0xde)));}else console[_0x4f0702(0x104)]('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
@@ -1 +1 @@
1
- const _0x3f6777=_0x405d;(function(_0x24bafa,_0x4eb7b4){const _0x2e48d5=_0x405d,_0x5dbb0c=_0x24bafa();while(!![]){try{const _0x3d4090=-parseInt(_0x2e48d5(0x1e6))/0x1+-parseInt(_0x2e48d5(0x222))/0x2+parseInt(_0x2e48d5(0x1d6))/0x3+parseInt(_0x2e48d5(0x227))/0x4+parseInt(_0x2e48d5(0x1f8))/0x5+parseInt(_0x2e48d5(0x1f1))/0x6+-parseInt(_0x2e48d5(0x1c0))/0x7*(parseInt(_0x2e48d5(0x221))/0x8);if(_0x3d4090===_0x4eb7b4)break;else _0x5dbb0c['push'](_0x5dbb0c['shift']());}catch(_0x4163c0){_0x5dbb0c['push'](_0x5dbb0c['shift']());}}}(_0x4705,0x878ce));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x352a9f from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';function _0x405d(_0x251187,_0x193159){_0x251187=_0x251187-0x1b9;const _0x47054c=_0x4705();let _0x405db7=_0x47054c[_0x251187];return _0x405db7;}function _0x4705(){const _0x5ab38f=['BYGgb','existing_token','6601662epwBjV','env','xNIVC','organizationName','.ranger','\x1b[1m','ready','700895zZfbio','skills','BDmNT','error','DwxIN','Installation\x20failed\x20with\x20exit\x20code\x20','.gitignore','You\x20can\x20install\x20it\x20manually\x20by\x20running:','JLNzU','JOzIM','FloBC','trackPhaseError','chromium','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','✓\x20Playwright\x20Chromium\x20browser\x20found','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','...','isTTY','log','XAsPG','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','✓\x20Created\x20.ranger/\x20directory','auth','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','skipChromium','ranger\x20profile\x20add\x20local','install','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','prompt','pQNrv','✓\x20Stored\x20credentials\x20locally','opencode','\x20\x20npx\x20playwright\x20install\x20chromium','platform','✓\x20Already\x20authenticated\x20to\x20','Authentication\x20failed:\x20','force','IGwUn','OQorh','24YwfLJk','1994870CbLdXV','XgSBA','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','No\x20git\x20repository\x20found','user','971856YrjdcM','stdin','version','stdout','provided_token','scope','to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','url','REAUA','success','uMOMT','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','✓\x20Local\x20profile\x20already\x20exists','XITWI','✓\x20Created\x20.ranger/.gitignore','85253zWomSi','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','\x0a❌\x20Profile\x20setup\x20failed:','dkNuH','LTpDT','aOAqK','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','WQMqv','NVxix','qjzmT','GITHUB_ENV','qAaDX','resolve','plugin','message','oYnma','✓\x20Exported\x20credentials\x20for\x20CI','\x0a⚠\x20Skipping\x20Chromium\x20installation.','warn','✓\x20Authenticated\x20to\x20','AMWJI','\x20install\x20chromium','1767174uOvUGS','eXTJV','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','\x20\x20npx\x20playwright@','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','TOCDr','trackPhaseStart','The\x20required\x20version\x20(','method','cXsVd','playwright@','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','ranger','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium','483292yHaoks','The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','GsFAw','lGpSW','QPXDg','trackPhaseEnd','VaWZK','profile'];_0x4705=function(){return _0x5ab38f;};return _0x4705();}import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url),bold=_0x2c0f0c=>_0x3f6777(0x1f6)+_0x2c0f0c+'\x1b[0m';function getPlaywrightVersion(){const _0x4ae0b4=_0x3f6777,_0x320741={'oQGqg':'playwright/package.json','xNIVC':function(_0x87ec1f,_0x1b4606){return _0x87ec1f(_0x1b4606);}};try{const _0x1ed282=require[_0x4ae0b4(0x1cc)](_0x320741['oQGqg']),_0x5bc468=_0x320741[_0x4ae0b4(0x1f3)](require,_0x1ed282);return _0x5bc468[_0x4ae0b4(0x229)];}catch{return null;}}function installChromiumBinary(_0x2ff176){const _0x3b966d={'aKMlf':function(_0x455f6a,_0x32878c){return _0x455f6a===_0x32878c;},'yvoWL':function(_0x31141c,_0x3407a6){return _0x31141c(_0x3407a6);},'mtTMB':'playwright','dcsVR':'chromium','Uhins':function(_0x19ee2d,_0x1bd162,_0x2e54d2,_0x144656){return _0x19ee2d(_0x1bd162,_0x2e54d2,_0x144656);},'IGwUn':'npx','qAaDX':function(_0x4f14f9,_0x25fa14){return _0x4f14f9===_0x25fa14;},'uyhXF':'win32'};return new Promise((_0x212498,_0x37f80a)=>{const _0x1dded1=_0x405d,_0x50ec34=_0x2ff176?[_0x1dded1(0x1e2)+_0x2ff176,'install','chromium']:[_0x3b966d['mtTMB'],_0x1dded1(0x214),_0x3b966d['dcsVR']],_0x56414a=_0x3b966d['Uhins'](spawn,_0x3b966d[_0x1dded1(0x21f)],_0x50ec34,{'stdio':'inherit','shell':_0x3b966d[_0x1dded1(0x1cb)](process[_0x1dded1(0x21b)],_0x3b966d['uyhXF'])});_0x56414a['on']('close',_0x539a6f=>{const _0x2798e8=_0x1dded1;_0x3b966d['aKMlf'](_0x539a6f,0x0)?_0x212498():_0x3b966d['yvoWL'](_0x37f80a,new Error(_0x2798e8(0x1fd)+_0x539a6f));}),_0x56414a['on']('error',_0x2c795a=>{_0x37f80a(_0x2c795a);});});}export async function authenticate(_0x30a3e9){const _0x42b7ca=_0x3f6777,_0x5ae061={'JopPE':function(_0x5e90f8){return _0x5e90f8();},'XAsPG':_0x42b7ca(0x1f0),'oKaob':function(_0xf8b60a){return _0xf8b60a();},'tfWPc':function(_0x53bafa,_0x4faced){return _0x53bafa instanceof _0x4faced;},'GsFAw':function(_0x263812,_0x5cba0b){return _0x263812(_0x5cba0b);},'CDySN':_0x42b7ca(0x1d0),'XITWI':_0x42b7ca(0x218),'ehUfi':_0x42b7ca(0x22b)};if(!_0x30a3e9){const _0x392c57=await _0x5ae061['JopPE'](getToken);if(_0x392c57){const _0x5994ad=await getCurrentUser(_0x392c57);if(_0x5994ad[_0x42b7ca(0x1ba)])return console[_0x42b7ca(0x20a)](_0x42b7ca(0x21c)+_0x5994ad[_0x42b7ca(0x226)][_0x42b7ca(0x1f4)]),{'token':_0x392c57,'method':_0x5ae061[_0x42b7ca(0x20b)]};}try{_0x30a3e9=await _0x5ae061['oKaob'](runDeviceAuthFlow);}catch(_0x59fc4c){throw new Error(_0x42b7ca(0x21d)+(_0x5ae061['tfWPc'](_0x59fc4c,Error)?_0x59fc4c[_0x42b7ca(0x1ce)]:_0x59fc4c));}const _0x30e6a2=await getCurrentUser(_0x30a3e9);if(!_0x30e6a2['success'])throw new Error(_0x42b7ca(0x224)+_0x30e6a2[_0x42b7ca(0x1fb)]);return console['log'](_0x42b7ca(0x1d3)+_0x30e6a2[_0x42b7ca(0x226)][_0x42b7ca(0x1f4)]),{'token':_0x30a3e9,'method':'device_auth'};}console['log']('Validating\x20API\x20token...');const _0x2a77a2=await _0x5ae061[_0x42b7ca(0x1e9)](getCurrentUser,_0x30a3e9);if(!_0x2a77a2['success']){if(_0x2a77a2['status'])throw new Error(_0x42b7ca(0x21d)+_0x2a77a2['error']+_0x42b7ca(0x211));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x2a77a2[_0x42b7ca(0x1fb)]+_0x42b7ca(0x1c6));}return console['log'](_0x42b7ca(0x1d3)+_0x2a77a2[_0x42b7ca(0x226)]['organizationName']),await _0x5ae061[_0x42b7ca(0x1e9)](storeToken,_0x30a3e9),console[_0x42b7ca(0x20a)](process[_0x42b7ca(0x1f2)][_0x42b7ca(0x1ca)]?_0x5ae061['CDySN']:_0x5ae061[_0x42b7ca(0x1be)]),{'token':_0x30a3e9,'method':_0x5ae061['ehUfi']};}export async function ensureRangerDir(){const _0x4caa4b=_0x3f6777,_0x44a06b={'iUrkr':function(_0x2dbeb9){return _0x2dbeb9();},'SJWXr':function(_0x1fa50f,_0x9bffa1){return _0x1fa50f(_0x9bffa1);},'dxEBB':function(_0x55254e,_0x548419,_0x23487f){return _0x55254e(_0x548419,_0x23487f);},'zNUml':'✓\x20.ranger/\x20directory\x20already\x20exists'},_0x1af432=_0x44a06b['iUrkr'](getRangerDir);return!_0x44a06b['SJWXr'](existsSync,_0x1af432)?(await _0x44a06b['dxEBB'](mkdir,_0x1af432,{'recursive':!![]}),console['log'](_0x4caa4b(0x20d)),{'path':_0x1af432,'installed':!![]}):(console['log'](_0x44a06b['zNUml']),{'path':_0x1af432,'installed':![]});}export async function ensureChromium(){const _0x43bcf8=_0x3f6777,_0x289d7b={'WQMqv':function(_0x50c2a7,_0x2b10a4){return _0x50c2a7(_0x2b10a4);},'eXTJV':_0x43bcf8(0x206),'oYnma':'confirm','HaRxN':function(_0x29aef6,_0x52ceae){return _0x29aef6 instanceof _0x52ceae;},'OQorh':_0x43bcf8(0x1ff),'aRKkv':_0x43bcf8(0x210),'XgSBA':_0x43bcf8(0x21a)};let _0x570865=![];try{const _0x2c03c0=chromium['executablePath']();_0x570865=_0x289d7b[_0x43bcf8(0x1c7)](existsSync,_0x2c03c0);}catch{_0x570865=![];}if(_0x570865)return console[_0x43bcf8(0x20a)](_0x289d7b[_0x43bcf8(0x1d7)]),![];const _0x1b1218=getPlaywrightVersion(),_0x225aa0=process[_0x43bcf8(0x228)]['isTTY']&&process[_0x43bcf8(0x22a)][_0x43bcf8(0x209)];let _0x4bed33=!![];if(_0x225aa0){const {install:_0x3769ba}=await _0x352a9f['prompt']([{'type':_0x289d7b[_0x43bcf8(0x1cf)],'name':_0x43bcf8(0x214),'message':_0x1b1218?_0x43bcf8(0x1df)+_0x1b1218+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?':_0x43bcf8(0x1e7),'default':!![]}]);_0x4bed33=_0x3769ba;}else console[_0x43bcf8(0x20a)](_0x43bcf8(0x1e5)+(_0x1b1218?'\x20'+_0x1b1218:'')+_0x43bcf8(0x208));if(_0x4bed33){console[_0x43bcf8(0x20a)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0x289d7b['WQMqv'](installChromiumBinary,_0x1b1218),console['log'](_0x43bcf8(0x1d9));}catch(_0x5bb0f1){console[_0x43bcf8(0x1fb)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x289d7b['HaRxN'](_0x5bb0f1,Error)?_0x5bb0f1['message']:_0x5bb0f1),console[_0x43bcf8(0x20a)](_0x289d7b[_0x43bcf8(0x220)]),_0x1b1218?console['log']('\x20\x20npx\x20playwright@'+_0x1b1218+_0x43bcf8(0x1d5)):console['log']('\x20\x20npx\x20playwright\x20install\x20chromium');}}else console['log'](_0x43bcf8(0x1d1)),console[_0x43bcf8(0x20a)](_0x289d7b['aRKkv']),_0x1b1218?console['log'](_0x43bcf8(0x1db)+_0x1b1218+'\x20install\x20chromium'):console[_0x43bcf8(0x20a)](_0x289d7b[_0x43bcf8(0x223)]);return!![];}export async function writeRangerGitignore(_0x369983){const _0x3e3857=_0x3f6777,_0x4395fe={'JOzIM':function(_0x3d4a40,_0x42028d,_0x43ee05){return _0x3d4a40(_0x42028d,_0x43ee05);},'QNRLP':_0x3e3857(0x1bf)},_0xc4e581=_0x4395fe['JOzIM'](join,_0x369983,_0x3e3857(0x1fe)),_0x414a74='\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 _0x4395fe[_0x3e3857(0x201)](writeFile,_0xc4e581,_0x414a74),console['log'](_0x4395fe['QNRLP']);}function printProfileSetupLaterInstructions(){const _0x26c3f7=_0x3f6777,_0x21b4d7={'LTpDT':_0x26c3f7(0x1da),'kZULg':_0x26c3f7(0x20f)};console[_0x26c3f7(0x20a)](_0x21b4d7[_0x26c3f7(0x1c4)]),console[_0x26c3f7(0x20a)]('\x20\x20'+bold(_0x26c3f7(0x213))),console[_0x26c3f7(0x20a)](_0x21b4d7['kZULg']);}async function ensureLocalEnv(_0x424f12,_0x538272){const _0x5d168a=_0x3f6777,_0x536ab0={'JLNzU':function(_0xaee11b){return _0xaee11b();},'DwxIN':_0x5d168a(0x20c),'YhyCX':function(_0x42a94c,_0x138973,_0x548a68){return _0x42a94c(_0x138973,_0x548a68);},'pQNrv':_0x5d168a(0x1bd),'jlaYe':_0x5d168a(0x1bc),'YCULr':_0x5d168a(0x22e),'REAUA':function(_0x50a10d,_0x8732bf,_0x1909fa,_0x40c678){return _0x50a10d(_0x8732bf,_0x1909fa,_0x40c678);},'TuMym':'local','UHRZy':function(_0x3bbdaf){return _0x3bbdaf();}};if(!_0x536ab0[_0x5d168a(0x200)](findGitRoot))return console['log'](_0x536ab0[_0x5d168a(0x1fc)]),{'ready':![],'skipped':!![]};if(_0x536ab0['YhyCX'](findExistingEnv,'local',{'locations':['local']}))return console[_0x5d168a(0x20a)](_0x536ab0[_0x5d168a(0x217)]),{'ready':!![],'skipped':![]};const _0x407c3a=process['stdin']['isTTY']&&process[_0x5d168a(0x22a)][_0x5d168a(0x209)];if(_0x407c3a&&!_0x424f12?.[_0x5d168a(0x22f)]){console['log']('\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how'),console[_0x5d168a(0x20a)](_0x5d168a(0x22d)),console['log'](_0x536ab0['jlaYe']),console[_0x5d168a(0x20a)]('use\x20until\x20the\x20session\x20expires.\x0a'),console[_0x5d168a(0x20a)](_0x536ab0['YCULr']);const {wantsProfile:_0x584860}=await _0x352a9f[_0x5d168a(0x216)]([{'type':'confirm','name':'wantsProfile','message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0x584860)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await _0x536ab0[_0x5d168a(0x1b9)](addEnv,_0x536ab0['TuMym'],{'url':_0x424f12?.[_0x5d168a(0x22f)],'force':_0x424f12?.['force']},_0x538272),{'ready':!![],'skipped':![]};}catch(_0x2ea350){return console['error'](_0x5d168a(0x1c2),_0x2ea350 instanceof Error?_0x2ea350['message']:_0x2ea350),_0x536ab0['UHRZy'](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x37a315,_0x33aebd,_0x58b8a2){const _0x11e736=_0x3f6777,_0x534e64={'FsYaS':'Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','aOAqK':'git_check','QPXDg':function(_0x554f87){return _0x554f87();},'cXsVd':'No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','DXsCP':function(_0x1abdf1){return _0x1abdf1();},'NVxix':function(_0x5a6ac8,_0x1b2dca){return _0x5a6ac8(_0x1b2dca);},'BYGgb':_0x11e736(0x20e),'AMWJI':_0x11e736(0x204),'RYzrT':_0x11e736(0x1cd),'WlwZn':function(_0x1572c9,_0x240541){return _0x1572c9(_0x240541);},'VaWZK':function(_0x34b776,_0x22ca8a){return _0x34b776&&_0x22ca8a;},'kfDty':_0x11e736(0x1e4),'dkNuH':'skills','lGpSW':_0x11e736(0x1e3),'DZBel':function(_0x53966a,_0x105005){return _0x53966a instanceof _0x105005;},'nnFjU':function(_0x518443,_0x280b2a,_0x523d9c){return _0x518443(_0x280b2a,_0x523d9c);},'NLuBf':'Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','TOCDr':'ranger\x20profile\x20add\x20local','FloBC':_0x11e736(0x1ee),'BDmNT':_0x11e736(0x207),'YLUvy':function(_0x152b65,_0xb2fdf0){return _0x152b65(_0xb2fdf0);},'IgzsG':'/ranger:enable','qjzmT':function(_0x35e537,_0x372fb1){return _0x35e537+_0x372fb1;},'uMOMT':function(_0x2698ab,_0x21b857){return _0x2698ab+_0x21b857;}};console['log']('\x0a🚀\x20Ranger\x20Setup\x0a');const _0x3f7392=process[_0x11e736(0x228)]['isTTY']&&process[_0x11e736(0x22a)]['isTTY'];!_0x3f7392&&!_0x33aebd?.[_0x11e736(0x22c)]&&(console['log'](_0x534e64['FsYaS']),_0x33aebd={..._0x33aebd,'scope':_0x11e736(0x226)});_0x58b8a2?.['trackPhaseStart'](_0x534e64[_0x11e736(0x1c5)]);if(!_0x534e64[_0x11e736(0x1eb)](findGitRoot)){await _0x58b8a2?.[_0x11e736(0x203)]('git_check',new Error(_0x11e736(0x225)));throw new Error(_0x534e64[_0x11e736(0x1e1)]);}_0x58b8a2?.['trackPhaseEnd']('git_check');const _0x2cb3bb=!existsSync(_0x534e64['DXsCP'](getRangerDir)),{path:_0x54be5a}=await ensureRangerDir();_0x58b8a2?.['trackPhaseStart']('auth');const _0x189549=await _0x534e64[_0x11e736(0x1c8)](authenticate,_0x37a315);_0x58b8a2?.[_0x11e736(0x1ec)](_0x534e64[_0x11e736(0x1ef)],{'isFirstRun':_0x2cb3bb,'method':_0x189549[_0x11e736(0x1e0)]}),_0x58b8a2?.[_0x11e736(0x1de)](_0x534e64[_0x11e736(0x1d4)]);_0x33aebd?.[_0x11e736(0x212)]?console[_0x11e736(0x20a)](_0x11e736(0x1e8)):await ensureChromium();_0x58b8a2?.[_0x11e736(0x1ec)](_0x534e64[_0x11e736(0x1d4)],{'isFirstRun':_0x2cb3bb,'skipped':!!_0x33aebd?.['skipChromium']}),await writeRangerGitignore(_0x54be5a),console[_0x11e736(0x20a)](_0x11e736(0x215));const _0x5e9154=_0x33aebd?.[_0x11e736(0x22c)],_0xb24671=_0x33aebd?.['opencode']??![];let _0xacb182=null;_0xb24671?(_0x58b8a2?.[_0x11e736(0x1de)](_0x534e64['RYzrT']),_0xacb182=await _0x534e64['WlwZn'](ensureOpencodePluginConfig,_0x5e9154),_0x58b8a2?.['trackPhaseEnd'](_0x11e736(0x1cd),{'isFirstRun':_0x2cb3bb,'opencode':!![]})):(_0x58b8a2?.['trackPhaseStart'](_0x11e736(0x1cd)),await _0x534e64['WlwZn'](ensureClaudePlugin,_0x5e9154),_0x58b8a2?.['trackPhaseEnd'](_0x11e736(0x1cd),{'isFirstRun':_0x2cb3bb}));if(_0x534e64[_0x11e736(0x1ed)](_0xb24671,_0xacb182)){_0x58b8a2?.[_0x11e736(0x1de)]('skills');try{await installSkill(_0x534e64['kfDty'],{'level':_0xacb182[_0x11e736(0x22c)],'cliVersion':_0x534e64['QPXDg'](getCurrentVersion),'platform':_0x11e736(0x219)}),_0x58b8a2?.[_0x11e736(0x1ec)](_0x534e64['dkNuH'],{'isFirstRun':_0x2cb3bb,'opencode':!![]});}catch(_0x49cb7a){console[_0x11e736(0x1d2)](_0x534e64[_0x11e736(0x1ea)],_0x534e64['DZBel'](_0x49cb7a,Error)?_0x49cb7a[_0x11e736(0x1ce)]:_0x49cb7a),_0x58b8a2?.['trackPhaseEnd'](_0x534e64[_0x11e736(0x1c3)],{'isFirstRun':_0x2cb3bb,'opencode':!![],'failed':!![]});}}else _0x58b8a2?.[_0x11e736(0x1de)](_0x534e64[_0x11e736(0x1c3)]),await ensureClaudeSkills(_0x5e9154),_0x58b8a2?.['trackPhaseEnd'](_0x11e736(0x1f9),{'isFirstRun':_0x2cb3bb});const _0x58a82b=findGitRoot();if(_0x58a82b){const _0x1c6de1=join(_0x58a82b,_0x11e736(0x1f5));!_0x534e64['WlwZn'](existsSync,_0x1c6de1)&&await _0x534e64['nnFjU'](mkdir,_0x1c6de1,{'recursive':!![]});}if(!_0x3f7392&&!_0x33aebd?.[_0x11e736(0x22f)])console['log'](_0x534e64['NLuBf']),console[_0x11e736(0x20a)]('\x20\x20'+_0x534e64['NVxix'](bold,_0x534e64[_0x11e736(0x1dd)])+'\x0a');else{_0x58b8a2?.['trackPhaseStart'](_0x534e64[_0x11e736(0x202)]);const _0x35f53a=await _0x534e64['nnFjU'](ensureLocalEnv,{'url':_0x33aebd?.[_0x11e736(0x22f)],'force':_0x33aebd?.[_0x11e736(0x21e)]},_0x58b8a2);_0x58b8a2?.[_0x11e736(0x1ec)](_0x534e64[_0x11e736(0x202)],{'isFirstRun':_0x2cb3bb,'profileReady':_0x35f53a['ready'],'userSkipped':_0x35f53a['skipped']}),_0x35f53a[_0x11e736(0x1f7)]&&console[_0x11e736(0x20a)](_0x11e736(0x1dc));}if(_0xb24671)console['log']('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console['log']('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console[_0x11e736(0x20a)]('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log'](_0x534e64[_0x11e736(0x1fa)]);else{const _0x5c9eda=_0x534e64['YLUvy'](bold,_0x534e64['IgzsG']);console[_0x11e736(0x20a)](_0x534e64[_0x11e736(0x1c9)](_0x534e64[_0x11e736(0x1c9)](_0x534e64[_0x11e736(0x1bb)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x5c9eda+'\x20and\x20prompt\x20the\x20coding',_0x11e736(0x205)),_0x11e736(0x1c1)),_0x11e736(0x1d8)));}}
1
+ (function(_0x43e1af,_0x4c8d98){const _0x18ba42=_0x2e84,_0x1c8904=_0x43e1af();while(!![]){try{const _0x2f52b5=parseInt(_0x18ba42(0x191))/0x1*(parseInt(_0x18ba42(0x172))/0x2)+-parseInt(_0x18ba42(0x192))/0x3+-parseInt(_0x18ba42(0x18d))/0x4+parseInt(_0x18ba42(0x180))/0x5+parseInt(_0x18ba42(0x17f))/0x6+-parseInt(_0x18ba42(0x149))/0x7*(parseInt(_0x18ba42(0x187))/0x8)+parseInt(_0x18ba42(0x154))/0x9;if(_0x2f52b5===_0x4c8d98)break;else _0x1c8904['push'](_0x1c8904['shift']());}catch(_0x503fe8){_0x1c8904['push'](_0x1c8904['shift']());}}}(_0xe2d8,0xba4a2));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x233726 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=_0x2b99d3=>'\x1b[1m'+_0x2b99d3+'\x1b[0m';function getPlaywrightVersion(){const _0x1d380d=_0x2e84,_0x73ad57={'aqCut':function(_0x70407,_0x2186d4){return _0x70407(_0x2186d4);}};try{const _0x3279cf=require['resolve']('playwright/package.json'),_0x44a5ae=_0x73ad57[_0x1d380d(0x196)](require,_0x3279cf);return _0x44a5ae['version'];}catch{return null;}}function installChromiumBinary(_0x4b2d6c){const _0x162570=_0x2e84,_0x14f897={'vcIGJ':function(_0x3d8071){return _0x3d8071();},'jEKyO':'install','fSLEi':_0x162570(0x188),'pDjdp':'inherit'};return new Promise((_0x3a26f6,_0x29cb16)=>{const _0x37495a=_0x162570,_0x3976ff=_0x4b2d6c?['playwright@'+_0x4b2d6c,_0x37495a(0x148),_0x37495a(0x188)]:[_0x37495a(0x16a),_0x14f897[_0x37495a(0x15a)],_0x14f897[_0x37495a(0x156)]],_0x292f2f=spawn('npx',_0x3976ff,{'stdio':_0x14f897['pDjdp'],'shell':process['platform']===_0x37495a(0x14c)});_0x292f2f['on']('close',_0x405a40=>{const _0x3b998b=_0x37495a;_0x405a40===0x0?_0x14f897['vcIGJ'](_0x3a26f6):_0x29cb16(new Error(_0x3b998b(0x197)+_0x405a40));}),_0x292f2f['on'](_0x37495a(0x186),_0x3391f5=>{_0x29cb16(_0x3391f5);});});}export async function authenticate(_0x12ac98){const _0xf04f3e=_0x2e84,_0x4489c0={'NcxQv':function(_0x18f7d5,_0x5d1923){return _0x18f7d5(_0x5d1923);},'HCwUH':function(_0x9f30ee){return _0x9f30ee();},'Hguaa':function(_0x42e18a,_0x477474){return _0x42e18a instanceof _0x477474;},'NudQR':function(_0x1052e7,_0x322a17){return _0x1052e7(_0x322a17);},'UfZLx':'device_auth'};if(!_0x12ac98){const _0x2c76c9=await getToken();if(_0x2c76c9){const _0x32198=await _0x4489c0[_0xf04f3e(0x153)](getCurrentUser,_0x2c76c9);if(_0x32198['success'])return console['log'](_0xf04f3e(0x1a2)+_0x32198[_0xf04f3e(0x15f)]['organizationName']),{'token':_0x2c76c9,'method':'existing_token'};}try{_0x12ac98=await _0x4489c0[_0xf04f3e(0x14a)](runDeviceAuthFlow);}catch(_0x8cc279){throw new Error(_0xf04f3e(0x185)+(_0x4489c0[_0xf04f3e(0x146)](_0x8cc279,Error)?_0x8cc279[_0xf04f3e(0x157)]:_0x8cc279));}const _0x29a1cd=await _0x4489c0['NudQR'](getCurrentUser,_0x12ac98);if(!_0x29a1cd['success'])throw new Error(_0xf04f3e(0x18b)+_0x29a1cd['error']);return console['log']('✓\x20Authenticated\x20to\x20'+_0x29a1cd[_0xf04f3e(0x15f)][_0xf04f3e(0x183)]),{'token':_0x12ac98,'method':_0x4489c0[_0xf04f3e(0x175)]};}console[_0xf04f3e(0x178)]('Validating\x20API\x20token...');const _0x5e814a=await getCurrentUser(_0x12ac98);if(!_0x5e814a[_0xf04f3e(0x18a)]){if(_0x5e814a[_0xf04f3e(0x160)])throw new Error(_0xf04f3e(0x185)+_0x5e814a['error']+_0xf04f3e(0x13a));else throw new Error(_0xf04f3e(0x150)+_0x5e814a['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console['log'](_0xf04f3e(0x177)+_0x5e814a['user'][_0xf04f3e(0x183)]),await _0x4489c0[_0xf04f3e(0x179)](storeToken,_0x12ac98),console['log'](process['env'][_0xf04f3e(0x165)]?'✓\x20Exported\x20credentials\x20for\x20CI':'✓\x20Stored\x20credentials\x20locally'),{'token':_0x12ac98,'method':'provided_token'};}export async function ensureRangerDir(){const _0x583c85=_0x2e84,_0x405728={'BRBND':function(_0x558e56){return _0x558e56();},'TZqII':'✓\x20Created\x20.ranger/\x20directory','XzJvq':'✓\x20.ranger/\x20directory\x20already\x20exists'},_0x48e63f=_0x405728['BRBND'](getRangerDir);return!existsSync(_0x48e63f)?(await mkdir(_0x48e63f,{'recursive':!![]}),console['log'](_0x405728['TZqII']),{'path':_0x48e63f,'installed':!![]}):(console[_0x583c85(0x178)](_0x405728[_0x583c85(0x19d)]),{'path':_0x48e63f,'installed':![]});}export async function ensureChromium(){const _0x4ff3c5=_0x2e84,_0x1432c5={'LEvfp':function(_0x18d5fe){return _0x18d5fe();},'zsTEt':_0x4ff3c5(0x164),'JcXzZ':_0x4ff3c5(0x15d),'WuBTb':_0x4ff3c5(0x15b),'bliKF':function(_0x1e5cac,_0xaed57f){return _0x1e5cac instanceof _0xaed57f;},'aqLzK':_0x4ff3c5(0x13d),'lTbEb':'\x20\x20npx\x20playwright\x20install\x20chromium','RtCKG':_0x4ff3c5(0x190),'ifUTx':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0x113550=![];try{const _0x2f76d2=chromium[_0x4ff3c5(0x152)]();_0x113550=existsSync(_0x2f76d2);}catch{_0x113550=![];}if(_0x113550)return console['log']('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x42e9af=_0x1432c5['LEvfp'](getPlaywrightVersion),_0x327417=process['stdin']['isTTY']&&process[_0x4ff3c5(0x19e)][_0x4ff3c5(0x171)];let _0x2498d8=!![];if(_0x327417){const {install:_0x35ec34}=await _0x233726['prompt']([{'type':_0x1432c5[_0x4ff3c5(0x16f)],'name':'install','message':_0x42e9af?'The\x20required\x20version\x20('+_0x42e9af+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?':'The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x2498d8=_0x35ec34;}else console[_0x4ff3c5(0x178)](_0x4ff3c5(0x17a)+(_0x42e9af?'\x20'+_0x42e9af:'')+_0x4ff3c5(0x141));if(_0x2498d8){console[_0x4ff3c5(0x178)](_0x1432c5[_0x4ff3c5(0x181)]);try{await installChromiumBinary(_0x42e9af),console[_0x4ff3c5(0x178)]('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x261d77){console[_0x4ff3c5(0x186)](_0x1432c5['WuBTb'],_0x1432c5[_0x4ff3c5(0x1a3)](_0x261d77,Error)?_0x261d77[_0x4ff3c5(0x157)]:_0x261d77),console[_0x4ff3c5(0x178)](_0x1432c5[_0x4ff3c5(0x17c)]),_0x42e9af?console['log'](_0x4ff3c5(0x19c)+_0x42e9af+_0x4ff3c5(0x15e)):console['log'](_0x1432c5['lTbEb']);}}else console[_0x4ff3c5(0x178)](_0x1432c5[_0x4ff3c5(0x159)]),console[_0x4ff3c5(0x178)](_0x1432c5[_0x4ff3c5(0x147)]),_0x42e9af?console[_0x4ff3c5(0x178)](_0x4ff3c5(0x19c)+_0x42e9af+'\x20install\x20chromium'):console['log'](_0x1432c5['lTbEb']);return!![];}function _0x2e84(_0x3e108,_0x12094f){_0x3e108=_0x3e108-0x139;const _0xe2d864=_0xe2d8();let _0x2e8409=_0xe2d864[_0x3e108];return _0x2e8409;}export async function writeRangerGitignore(_0x4219cb){const _0x3e25a4=_0x2e84,_0x9a38de={'ljuWY':function(_0x53fbdb,_0x5e3a44,_0x888756){return _0x53fbdb(_0x5e3a44,_0x888756);},'hdGdZ':_0x3e25a4(0x18e),'rWtKg':function(_0x42bf4b,_0x157da3,_0x5eb863){return _0x42bf4b(_0x157da3,_0x5eb863);},'UMfFO':'✓\x20Created\x20.ranger/.gitignore'},_0x1fb4a9=_0x9a38de['ljuWY'](join,_0x4219cb,_0x9a38de[_0x3e25a4(0x145)]),_0x3ff17d=_0x3e25a4(0x13e);await _0x9a38de[_0x3e25a4(0x199)](writeFile,_0x1fb4a9,_0x3ff17d),console['log'](_0x9a38de[_0x3e25a4(0x194)]);}function printProfileSetupLaterInstructions(){const _0x23ce78=_0x2e84,_0x5af042={'sJggJ':function(_0x3387ad,_0x1fe955){return _0x3387ad(_0x1fe955);},'mxAOo':_0x23ce78(0x19f)};console['log'](_0x23ce78(0x1a0)),console[_0x23ce78(0x178)]('\x20\x20'+_0x5af042['sJggJ'](bold,_0x23ce78(0x162))),console[_0x23ce78(0x178)](_0x5af042['mxAOo']);}function _0xe2d8(){const _0x4fdc28=['\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','eYPRx','\x20\x20npx\x20playwright@','XzJvq','stdout','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','BdplG','✓\x20Already\x20authenticated\x20to\x20','bliKF','ablkW','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','You\x20can\x20install\x20it\x20manually\x20by\x20running:','\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','git_check','pInwD','...','eMRGJ','\x20and\x20prompt\x20the\x20coding','aQRey','hdGdZ','Hguaa','ifUTx','install','806071yxOFGv','HCwUH','.ranger','win32','CWhef','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','hzClx','executablePath','NcxQv','31555962muIPHT','url','fSLEi','message','kVcID','RtCKG','jEKyO','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','ready','\x0aInstalling\x20Chromium\x20browser...\x0a','\x20install\x20chromium','user','status','plugin','ranger\x20profile\x20add\x20local','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','confirm','GITHUB_ENV','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','use\x20until\x20the\x20session\x20expires.\x0a','force','prompt','playwright','trackPhaseEnd','trackPhaseStart','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','zsTEt','BUSJu','isTTY','53962ERQqLC','auth','bkjrC','UfZLx','opencode','✓\x20Authenticated\x20to\x20','log','NudQR','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium','skipChromium','aqLzK','\x0aIn\x20Claude\x20Code,\x20run\x20','GhPqu','4490334OGlRyT','1925295jDIjVm','JcXzZ','skills','organizationName','DoUlg','Authentication\x20failed:\x20','error','104sHgGST','chromium','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','success','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','stdin','5282476tzXXRb','.gitignore','skipped','\x0a⚠\x20Skipping\x20Chromium\x20installation.','6tzQrSU','3662706GNgbmh','✓\x20Local\x20profile\x20already\x20exists','UMfFO','WwtBn','aqCut','Installation\x20failed\x20with\x20exit\x20code\x20','to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','rWtKg'];_0xe2d8=function(){return _0x4fdc28;};return _0xe2d8();}async function ensureLocalEnv(_0x4acc1b,_0x50d4b4){const _0x33b6a5=_0x2e84,_0x2167d9={'BUSJu':function(_0x1c36bc){return _0x1c36bc();},'WgPiu':function(_0x1a756c,_0x142a8e,_0x4cdbdd){return _0x1a756c(_0x142a8e,_0x4cdbdd);},'WwtBn':'local','eMRGJ':_0x33b6a5(0x193),'RxJPT':'\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','CDduh':_0x33b6a5(0x189),'oeQUa':'You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','VHXfN':_0x33b6a5(0x164),'eYPRx':'wantsProfile','WrXaR':'\x0a❌\x20Profile\x20setup\x20failed:','aQRey':function(_0x14faba,_0x1d7c89){return _0x14faba instanceof _0x1d7c89;}};if(!_0x2167d9[_0x33b6a5(0x170)](findGitRoot))return console['log'](_0x33b6a5(0x163)),{'ready':![],'skipped':!![]};if(_0x2167d9['WgPiu'](findExistingEnv,_0x2167d9[_0x33b6a5(0x195)],{'locations':[_0x2167d9[_0x33b6a5(0x195)]]}))return console[_0x33b6a5(0x178)](_0x2167d9[_0x33b6a5(0x142)]),{'ready':!![],'skipped':![]};const _0xca42d5=process[_0x33b6a5(0x18c)]['isTTY']&&process[_0x33b6a5(0x19e)]['isTTY'];if(_0xca42d5&&!_0x4acc1b?.['url']){console['log'](_0x2167d9['RxJPT']),console[_0x33b6a5(0x178)](_0x33b6a5(0x198)),console[_0x33b6a5(0x178)](_0x2167d9['CDduh']),console[_0x33b6a5(0x178)](_0x33b6a5(0x167)),console[_0x33b6a5(0x178)](_0x2167d9['oeQUa']);const {wantsProfile:_0xcfe4e3}=await _0x233726[_0x33b6a5(0x169)]([{'type':_0x2167d9['VHXfN'],'name':_0x2167d9[_0x33b6a5(0x19b)],'message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0xcfe4e3)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await addEnv(_0x2167d9[_0x33b6a5(0x195)],{'url':_0x4acc1b?.[_0x33b6a5(0x155)],'force':_0x4acc1b?.['force']},_0x50d4b4),{'ready':!![],'skipped':![]};}catch(_0x92a180){return console['error'](_0x2167d9['WrXaR'],_0x2167d9[_0x33b6a5(0x144)](_0x92a180,Error)?_0x92a180['message']:_0x92a180),_0x2167d9[_0x33b6a5(0x170)](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x33c4ca,_0x589042,_0x9650bd){const _0x52151b=_0x2e84,_0xa395b9={'fnnHl':_0x52151b(0x15f),'XBbvV':_0x52151b(0x13f),'pInwD':_0x52151b(0x13b),'BdplG':function(_0x57fb85,_0x450086){return _0x57fb85(_0x450086);},'kPonz':function(_0x5f14a7){return _0x5f14a7();},'hyvem':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','LkNvy':_0x52151b(0x188),'GhPqu':function(_0x3d785e,_0x3e0913){return _0x3d785e(_0x3e0913);},'ablkW':'plugin','DoUlg':_0x52151b(0x182),'hzClx':function(_0x3f4b22){return _0x3f4b22();},'CWhef':_0x52151b(0x176),'kVcID':_0x52151b(0x14b),'oVojp':function(_0x15b733,_0x43ae1d,_0x410df1){return _0x15b733(_0x43ae1d,_0x410df1);},'bkjrC':_0x52151b(0x14e),'kzkOr':function(_0x47e34c,_0xb12a6e,_0x23552b){return _0x47e34c(_0xb12a6e,_0x23552b);},'KufYH':'profile','YjAJY':_0x52151b(0x16e),'CIebu':'/ranger:enable','nJOtt':function(_0x13ca95,_0x3cf865){return _0x13ca95+_0x3cf865;}};console[_0x52151b(0x178)]('\x0a🚀\x20Ranger\x20Setup\x0a');const _0x202195=process['stdin']['isTTY']&&process[_0x52151b(0x19e)][_0x52151b(0x171)];!_0x202195&&!_0x589042?.['scope']&&(console['log'](_0x52151b(0x16d)),_0x589042={..._0x589042,'scope':_0xa395b9['fnnHl']});_0x9650bd?.['trackPhaseStart'](_0xa395b9['XBbvV']);if(!findGitRoot()){await _0x9650bd?.['trackPhaseError']('git_check',new Error('No\x20git\x20repository\x20found'));throw new Error(_0xa395b9[_0x52151b(0x140)]);}_0x9650bd?.[_0x52151b(0x16b)](_0x52151b(0x13f));const _0x32d11f=!_0xa395b9[_0x52151b(0x1a1)](existsSync,_0xa395b9['kPonz'](getRangerDir)),{path:_0x1fe8b2}=await ensureRangerDir();_0x9650bd?.[_0x52151b(0x16c)]('auth');const _0x579ba1=await authenticate(_0x33c4ca);_0x9650bd?.['trackPhaseEnd'](_0x52151b(0x173),{'isFirstRun':_0x32d11f,'method':_0x579ba1['method']}),_0x9650bd?.['trackPhaseStart'](_0x52151b(0x188));_0x589042?.[_0x52151b(0x17b)]?console[_0x52151b(0x178)](_0xa395b9['hyvem']):await _0xa395b9['kPonz'](ensureChromium);_0x9650bd?.['trackPhaseEnd'](_0xa395b9['LkNvy'],{'isFirstRun':_0x32d11f,'skipped':!!_0x589042?.['skipChromium']}),await _0xa395b9[_0x52151b(0x17e)](writeRangerGitignore,_0x1fe8b2),console['log']('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x286e6b=_0x589042?.['scope'],_0x44bbb0=_0x589042?.['opencode']??![];let _0x17ec46=null;_0x44bbb0?(_0x9650bd?.[_0x52151b(0x16c)](_0x52151b(0x161)),_0x17ec46=await ensureOpencodePluginConfig(_0x286e6b),_0x9650bd?.[_0x52151b(0x16b)](_0xa395b9[_0x52151b(0x139)],{'isFirstRun':_0x32d11f,'opencode':!![]})):(_0x9650bd?.[_0x52151b(0x16c)](_0x52151b(0x161)),await _0xa395b9[_0x52151b(0x1a1)](ensureClaudePlugin,_0x286e6b),_0x9650bd?.['trackPhaseEnd'](_0x52151b(0x161),{'isFirstRun':_0x32d11f}));if(_0x44bbb0&&_0x17ec46){_0x9650bd?.['trackPhaseStart'](_0xa395b9[_0x52151b(0x184)]);try{await installSkill('ranger',{'level':_0x17ec46['scope'],'cliVersion':_0xa395b9[_0x52151b(0x151)](getCurrentVersion),'platform':_0xa395b9[_0x52151b(0x14d)]}),_0x9650bd?.['trackPhaseEnd']('skills',{'isFirstRun':_0x32d11f,'opencode':!![]});}catch(_0x50f9ef){console['warn'](_0x52151b(0x14f),_0x50f9ef instanceof Error?_0x50f9ef['message']:_0x50f9ef),_0x9650bd?.['trackPhaseEnd']('skills',{'isFirstRun':_0x32d11f,'opencode':!![],'failed':!![]});}}else _0x9650bd?.[_0x52151b(0x16c)](_0xa395b9['DoUlg']),await ensureClaudeSkills(_0x286e6b),_0x9650bd?.['trackPhaseEnd'](_0xa395b9[_0x52151b(0x184)],{'isFirstRun':_0x32d11f});const _0x29385d=findGitRoot();if(_0x29385d){const _0x3dc53d=join(_0x29385d,_0xa395b9[_0x52151b(0x158)]);!existsSync(_0x3dc53d)&&await _0xa395b9['oVojp'](mkdir,_0x3dc53d,{'recursive':!![]});}if(!_0x202195&&!_0x589042?.[_0x52151b(0x155)])console['log'](_0xa395b9[_0x52151b(0x174)]),console['log']('\x20\x20'+_0xa395b9['BdplG'](bold,'ranger\x20profile\x20add\x20local')+'\x0a');else{_0x9650bd?.['trackPhaseStart']('profile');const _0x54ea28=await _0xa395b9['kzkOr'](ensureLocalEnv,{'url':_0x589042?.['url'],'force':_0x589042?.[_0x52151b(0x168)]},_0x9650bd);_0x9650bd?.[_0x52151b(0x16b)](_0xa395b9['KufYH'],{'isFirstRun':_0x32d11f,'profileReady':_0x54ea28[_0x52151b(0x15c)],'userSkipped':_0x54ea28[_0x52151b(0x18f)]}),_0x54ea28[_0x52151b(0x15c)]&&console['log'](_0x52151b(0x166));}if(_0x44bbb0)console[_0x52151b(0x178)]('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console['log']('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console[_0x52151b(0x178)]('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console[_0x52151b(0x178)](_0xa395b9['YjAJY']);else{const _0x45fc27=bold(_0xa395b9['CIebu']);console['log'](_0xa395b9['nJOtt'](_0x52151b(0x17d)+_0x45fc27+_0x52151b(0x143)+_0x52151b(0x19a)+_0x52151b(0x13c),'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'));}}
@@ -1 +1 @@
1
- function _0x1c3f(_0xdd6d2f,_0xe35472){_0xdd6d2f=_0xdd6d2f-0xee;const _0x5a7c57=_0x5a7c();let _0x1c3fd0=_0x5a7c57[_0xdd6d2f];return _0x1c3fd0;}(function(_0xb4798f,_0x3b9a15){const _0x39bace=_0x1c3f,_0x368d66=_0xb4798f();while(!![]){try{const _0x969da3=parseInt(_0x39bace(0x137))/0x1*(-parseInt(_0x39bace(0x11d))/0x2)+-parseInt(_0x39bace(0x11e))/0x3+-parseInt(_0x39bace(0x124))/0x4+-parseInt(_0x39bace(0xf2))/0x5+-parseInt(_0x39bace(0x10b))/0x6*(-parseInt(_0x39bace(0x132))/0x7)+parseInt(_0x39bace(0x12b))/0x8+parseInt(_0x39bace(0x13b))/0x9*(parseInt(_0x39bace(0x120))/0xa);if(_0x969da3===_0x3b9a15)break;else _0x368d66['push'](_0x368d66['shift']());}catch(_0x48d311){_0x368d66['push'](_0x368d66['shift']());}}}(_0x5a7c,0x86921));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x3b1b1f=>'\x1b[1m'+_0x3b1b1f+'\x1b[0m',link=(_0x435b4b,_0xc3e3d2)=>'\x1b]8;;file://'+_0x435b4b+'\x07'+(_0xc3e3d2||_0x435b4b)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x41cdaf=_0x1c3f,_0x3616a7={'MGzDP':function(_0x4248cc,_0xd8bc0e){return _0x4248cc(_0xd8bc0e);},'MMrvG':'not_configured','gXZla':'string','jVxqu':function(_0x25ee42,_0x1a007d,_0x159fa3,_0x44211d){return _0x25ee42(_0x1a007d,_0x159fa3,_0x44211d);},'mMvDh':_0x41cdaf(0x129),'SLVSt':_0x41cdaf(0xee)};return new Promise(_0x15a62c=>{const _0x159e2d=_0x41cdaf,_0x5087fb={'sadhO':_0x3616a7['gXZla'],'XgCbw':_0x159e2d(0xf3)},_0x3dc739=_0x3616a7[_0x159e2d(0x119)](spawn,'opencode',[_0x159e2d(0x131),_0x159e2d(0xfb)],{'stdio':[_0x159e2d(0x11b),'pipe',_0x159e2d(0x145)]});let _0x4ddee9='';_0x3dc739[_0x159e2d(0x141)]?.['on']('data',_0x42a621=>{_0x4ddee9+=_0x42a621['toString']();}),_0x3dc739['stderr']?.['on']('data',_0x4ff21f=>{_0x4ddee9+=_0x4ff21f['toString']();}),_0x3dc739['on'](_0x3616a7['mMvDh'],()=>{_0x15a62c({'status':'not_installed'});}),_0x3dc739['on'](_0x3616a7['SLVSt'],_0x22ef7d=>{const _0x3cf469=_0x159e2d;if(_0x22ef7d!==0x0){_0x3616a7['MGzDP'](_0x15a62c,{'status':_0x3cf469(0x10d)});return;}const _0x2a1730=_0x4ddee9[_0x3cf469(0x148)]();let _0x3f7c01=null;if(_0x2a1730)try{_0x3f7c01=JSON[_0x3cf469(0x146)](_0x2a1730);}catch{const _0x2fdf21=_0x2a1730['match'](/\{[\s\S]*\}$/);if(_0x2fdf21)try{_0x3f7c01=JSON['parse'](_0x2fdf21[0x0]);}catch{_0x3f7c01=null;}}const _0x52ad59=Array[_0x3cf469(0x13f)](_0x3f7c01?.[_0x3cf469(0xff)])?_0x3f7c01?.[_0x3cf469(0xff)]:[],_0x45d63c=_0x52ad59[_0x3cf469(0x123)](_0x150020=>{const _0x1a06f2=_0x3cf469;if(typeof _0x150020!==_0x5087fb[_0x1a06f2(0xfa)])return![];return _0x150020[_0x1a06f2(0xf9)](_0x5087fb[_0x1a06f2(0x138)])||_0x150020[_0x1a06f2(0xf9)]('opencode-plugin');});if(_0x45d63c){_0x3616a7[_0x3cf469(0x10a)](_0x15a62c,{'status':_0x3cf469(0x140),'details':_0x52ad59['length']>0x0?_0x52ad59[_0x3cf469(0x13d)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0x52ad59[_0x3cf469(0x13d)]>0x0){_0x3616a7['MGzDP'](_0x15a62c,{'status':_0x3616a7['MMrvG'],'details':_0x52ad59[_0x3cf469(0x13d)]+'\x20plugin(s)\x20configured'});return;}_0x15a62c({'status':'not_configured'});});});}async function getSkillsFromDir(_0x2b69ee,_0x35d019){const _0xeefeca=_0x1c3f,_0x11a614={'ZdpBu':function(_0x9b2f75,_0xbe848e,_0x53717e){return _0x9b2f75(_0xbe848e,_0x53717e);},'aKIMe':'utf-8'};if(!existsSync(_0x2b69ee))return[];const _0x352cfd=[];try{const _0x208f79=await _0x11a614['ZdpBu'](readdir,_0x2b69ee,{'withFileTypes':!![]});for(const _0x113899 of _0x208f79){if(_0x113899[_0xeefeca(0x109)]()){const _0x4fabb6=join(_0x2b69ee,_0x113899['name'],'SKILL.md');if(existsSync(_0x4fabb6)){let _0x23c726=_0x113899['name'];try{const _0x47bb07=await readFile(_0x4fabb6,_0x11a614['aKIMe']),_0x5465c6=_0x47bb07[_0xeefeca(0x11f)](/name:\s*(.+)/);_0x5465c6&&(_0x23c726=_0x5465c6[0x1][_0xeefeca(0x148)]());}catch{}_0x352cfd[_0xeefeca(0x125)]({'name':_0x113899['name'],'displayName':_0x23c726,'path':_0x4fabb6,'level':_0x35d019});}}}}catch{return[];}return _0x352cfd;}async function getInstalledSkills(){const _0xf122d6=_0x1c3f,_0x5b2f59={'JmDwb':_0xf122d6(0x11c),'sxcgA':function(_0x1761d2,_0x53b38f,_0x3d0d0c){return _0x1761d2(_0x53b38f,_0x3d0d0c);},'bFdZJ':function(_0x135c31){return _0x135c31();},'vhkFv':_0xf122d6(0x143)},[_0x406057,_0x20e85c]=await Promise[_0xf122d6(0x12d)]([getSkillsFromDir(getProjectSkillsDir(),_0x5b2f59[_0xf122d6(0x103)]),_0x5b2f59['sxcgA'](getSkillsFromDir,_0x5b2f59['bFdZJ'](getUserSkillsDir),_0x5b2f59[_0xf122d6(0x135)])]);return{'project':_0x406057,'user':_0x20e85c};}async function getEnvironments(){const _0x5a46ed=_0x1c3f,_0x20a4e4={'Rnkwm':_0x5a46ed(0x127),'wnzTQ':_0x5a46ed(0x12e),'DQlKC':function(_0xf4eac8,_0x54fe70){return _0xf4eac8(_0x54fe70);},'OKLUX':_0x5a46ed(0x112),'zSXZP':function(_0x264496,_0x2ded91){return _0x264496(_0x2ded91);},'vMCdg':function(_0x2a82d3){return _0x2a82d3();}},{envNames:_0x17e993,activeEnv:_0x34c1f5}=await _0x20a4e4[_0x5a46ed(0x113)](getEnvNames),_0x1e5342=_0x20a4e4[_0x5a46ed(0x113)](getRangerDir);if(!existsSync(_0x1e5342))return{'envs':[],'activeEnv':null};const _0x2f497=_0x17e993['map'](_0x204f35=>{const _0x5c723c=_0x5a46ed,_0x58430c=getEnvDir(_0x204f35),_0xb4ff6f=join(_0x58430c,'settings.json'),_0x259ed1=join(_0x58430c,_0x20a4e4[_0x5c723c(0x102)]),_0x1b1653=join(_0x58430c,_0x20a4e4['wnzTQ']);return{'name':_0x204f35,'settingsPath':_0x20a4e4[_0x5c723c(0x110)](existsSync,_0xb4ff6f)?_0xb4ff6f:_0x20a4e4['OKLUX'],'hasPlaintextAuth':_0x20a4e4[_0x5c723c(0x110)](existsSync,_0x259ed1),'hasEncryptedAuth':_0x20a4e4['zSXZP'](existsSync,_0x1b1653),'isActive':_0x204f35===_0x34c1f5};});return{'envs':_0x2f497,'activeEnv':_0x34c1f5};}export async function status(){const _0x3b51a4=_0x1c3f,_0x3a79c5={'fJEzq':'\x0a📊\x20Ranger\x20Status\x0a','VmgAo':function(_0x4a32ed,_0x41cc00){return _0x4a32ed(_0x41cc00);},'ZmcRv':function(_0x314aba,_0x3ef941){return _0x314aba(_0x3ef941);},'kbgnN':function(_0x3fa034,_0x559f30){return _0x3fa034(_0x559f30);},'wazuh':function(_0x242812){return _0x242812();},'MpDQz':function(_0x2c4525){return _0x2c4525();},'sPDWf':_0x3b51a4(0xfc),'byNph':function(_0x445943,_0x5a56ce){return _0x445943===_0x5a56ce;},'EzUUA':_0x3b51a4(0x107),'yxUIt':'disabled','AxlIz':_0x3b51a4(0x139),'thTBn':_0x3b51a4(0xf1),'dZrrV':function(_0x162c9b,_0x6065df){return _0x162c9b(_0x6065df);},'XAouv':function(_0x2a38c6,_0x380fb0,_0x28c2b3){return _0x2a38c6(_0x380fb0,_0x28c2b3);},'ZGBRv':'\x20\x20User-level:','pURzN':_0x3b51a4(0x118),'TyLCb':'No\x20profiles\x20configured','QIUrl':'\x20(active)','aAKOj':'encrypted','HLMDj':'plaintext','krUXN':function(_0x2ae4ef,_0x2f80b1){return _0x2ae4ef!==_0x2f80b1;},'rpxnl':function(_0x23e4e9,_0x2a2c79,_0x59515f){return _0x23e4e9(_0x2a2c79,_0x59515f);},'rRePJ':function(_0x45eedb,_0x55e811){return _0x45eedb(_0x55e811);}};console['log'](_0x3a79c5[_0x3b51a4(0x128)]);const _0x14a861=process[_0x3b51a4(0x12c)](),_0x204084=getRangerDir();if(!_0x3a79c5[_0x3b51a4(0x12a)](existsSync,_0x204084)){console['log'](_0x3b51a4(0x126)+link(_0x14a861,_0x3a79c5[_0x3b51a4(0x121)](bold,_0x3a79c5[_0x3b51a4(0x122)](basename,_0x14a861)))),console['log'](_0x3b51a4(0xfe)),console['log'](_0x3b51a4(0x106));return;}console[_0x3b51a4(0xfd)](_0x3b51a4(0x126)+link(_0x14a861,_0x3a79c5['kbgnN'](bold,basename(_0x14a861))));const _0x4e8848=getCurrentVersion(),_0x394776=getLatestVersion();if(_0x394776&&_0x394776!==_0x4e8848)console[_0x3b51a4(0xfd)]('Version:\x20'+_0x4e8848+_0x3b51a4(0x105)+_0x394776+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x394776?console['log'](_0x3b51a4(0xf4)+_0x4e8848+_0x3b51a4(0x116)):console['log'](_0x3b51a4(0xf4)+_0x4e8848);const _0x156952=await _0x3a79c5['wazuh'](getToken);if(_0x156952){const _0x37236c=await _0x3a79c5[_0x3b51a4(0x121)](getCurrentUser,_0x156952);_0x37236c[_0x3b51a4(0x13c)]?console['log'](_0x3b51a4(0x130)+_0x3a79c5[_0x3b51a4(0x12a)](bold,_0x37236c[_0x3b51a4(0x143)][_0x3b51a4(0x142)])):(console[_0x3b51a4(0xfd)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log'](_0x3b51a4(0x115)));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env']['DEBUG']&&(console['log']('API\x20Environment:\x20'+_0x3a79c5['MpDQz'](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+getApiBaseUrl()));console[_0x3b51a4(0xfd)](_0x3a79c5[_0x3b51a4(0xf5)]);const _0x1f395e=await getOpencodePluginStatus();if(_0x3a79c5['byNph'](_0x1f395e['status'],'configured'))console['log']('\x20\x20'+bold('@ranger-testing/opencode-plugin')+_0x3b51a4(0x133)),_0x1f395e['details']&&console['log']('\x20\x20'+_0x1f395e[_0x3b51a4(0x104)]);else _0x1f395e['status']===_0x3b51a4(0x144)?(console[_0x3b51a4(0xfd)](_0x3a79c5[_0x3b51a4(0xf6)]),_0x1f395e[_0x3b51a4(0x104)]&&console['log']('\x20\x20'+_0x1f395e['details']),console[_0x3b51a4(0xfd)](_0x3b51a4(0x134))):console[_0x3b51a4(0xfd)]('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x3a4f8c=await getPluginInfo('ranger@trailhead');if(_0x3a4f8c){const _0x113aff=_0x3a4f8c[_0x3b51a4(0xef)]||_0x3b51a4(0x13a),_0x2e8d50=_0x3a4f8c['enabled']?'enabled':_0x3a79c5[_0x3b51a4(0x12f)];console['log']('\x20\x20'+_0x3a79c5['kbgnN'](bold,'ranger@trailhead')+_0x3b51a4(0x13e)+_0x113aff+',\x20'+_0x2e8d50+')');}else console['log'](_0x3a79c5['AxlIz']),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console['log']('\x0a---\x20Skills\x20---');const {project:_0x4c0fbf,user:_0x5f35c4}=await _0x3a79c5['wazuh'](getInstalledSkills),_0x1eac89=_0x4c0fbf['filter'](_0xf4d67a=>RANGER_MANAGED_SKILLS['includes'](_0xf4d67a['name'])),_0x5974f3=_0x5f35c4[_0x3b51a4(0x11a)](_0x38abec=>RANGER_MANAGED_SKILLS[_0x3b51a4(0xf9)](_0x38abec[_0x3b51a4(0x108)])),_0x34e2db=_0x1eac89['length']+_0x5974f3['length'];if(_0x3a79c5['byNph'](_0x34e2db,0x0))console[_0x3b51a4(0xfd)](_0x3a79c5[_0x3b51a4(0x136)]),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x1eac89['length']>0x0){console['log'](_0x3b51a4(0xf8));for(const _0x2c9937 of _0x1eac89){console[_0x3b51a4(0xfd)]('\x20\x20\x20\x20'+_0x3a79c5['dZrrV'](bold,_0x2c9937[_0x3b51a4(0xf0)])+':\x20'+_0x3a79c5[_0x3b51a4(0x147)](link,_0x2c9937['path'],basename(_0x2c9937[_0x3b51a4(0x100)])));}}if(_0x5974f3['length']>0x0){console[_0x3b51a4(0xfd)](_0x3a79c5[_0x3b51a4(0x10e)]);for(const _0x51ba91 of _0x5974f3){console['log']('\x20\x20\x20\x20'+bold(_0x51ba91['displayName'])+':\x20'+_0x3a79c5['XAouv'](link,_0x51ba91['path'],basename(_0x51ba91[_0x3b51a4(0x100)])));}}}console[_0x3b51a4(0xfd)](_0x3a79c5['pURzN']);const {envs:_0x46910b,activeEnv:_0x425f64}=await getEnvironments();if(_0x3a79c5['byNph'](_0x46910b['length'],0x0))console['log'](_0x3a79c5['TyLCb']),console[_0x3b51a4(0xfd)](_0x3b51a4(0x114));else{for(const _0x4b647b of _0x46910b){const _0x447ec9=_0x4b647b['isActive']?_0x3a79c5[_0x3b51a4(0x117)]:'',_0x3ab18b=_0x4b647b['hasEncryptedAuth']?_0x3a79c5['aAKOj']:_0x4b647b['hasPlaintextAuth']?_0x3a79c5['HLMDj']:'none';console['log']('\x20\x20'+bold(_0x4b647b[_0x3b51a4(0x108)])+_0x447ec9),console['log'](_0x3b51a4(0xf7)+_0x3ab18b),_0x3a79c5[_0x3b51a4(0x101)](_0x4b647b['settingsPath'],'(not\x20found)')&&console[_0x3b51a4(0xfd)]('\x20\x20\x20\x20Settings:\x20'+_0x3a79c5[_0x3b51a4(0x111)](link,_0x4b647b[_0x3b51a4(0x10c)],_0x3a79c5['rRePJ'](basename,_0x4b647b['settingsPath'])));}!_0x425f64&&(console['log']('\x0a\x20\x20No\x20active\x20profile\x20set'),console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x46910b[_0x3b51a4(0x10f)](_0x4f95e9=>_0x4f95e9[_0x3b51a4(0x108)])['join'](',\x20')+')'));}console['log']('');}function _0x5a7c(){const _0x33aa9b=['\x0a---\x20OpenCode\x20Plugin\x20---','log','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','plugin','path','krUXN','Rnkwm','JmDwb','details','\x20(latest:\x20','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','\x20\x20Not\x20configured','name','isDirectory','MGzDP','137892gfljGp','settingsPath','not_installed','ZGBRv','map','DQlKC','rpxnl','(not\x20found)','vMCdg','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','\x20\x20Run:\x20ranger\x20setup\x20[token]','\x20(up\x20to\x20date)','QIUrl','\x0a---\x20Profiles\x20---','jVxqu','filter','ignore','project','12WUxZcz','2973360uvUoFH','match','17488840PoTUQg','ZmcRv','kbgnN','some','4033888njHtHw','push','Root:\x20','auth.json','fJEzq','error','VmgAo','2110696rWEteF','cwd','all','auth.json.enc','yxUIt','Organization:\x20','debug','308qLAzdO',':\x20configured','\x20\x20Run:\x20ranger\x20setup\x20--opencode','vhkFv','thTBn','47692ZcAqaE','XgCbw','\x20\x20Not\x20installed','unknown','9JaqTkr','success','length',':\x20installed\x20(','isArray','configured','stdout','organizationName','user','not_configured','pipe','parse','XAouv','trim','close','scope','displayName','No\x20skills\x20installed','934920doPDMy','@ranger-testing/opencode-plugin','Version:\x20','sPDWf','EzUUA','\x20\x20\x20\x20Auth:\x20','\x20\x20Project-level:','includes','sadhO','config'];_0x5a7c=function(){return _0x33aa9b;};return _0x5a7c();}
1
+ const _0x2ceca2=_0x50db;(function(_0x32fd70,_0x296681){const _0x4f5531=_0x50db,_0x48d348=_0x32fd70();while(!![]){try{const _0x2fb488=-parseInt(_0x4f5531(0x1bc))/0x1*(-parseInt(_0x4f5531(0x198))/0x2)+-parseInt(_0x4f5531(0x1ad))/0x3+-parseInt(_0x4f5531(0x19c))/0x4+parseInt(_0x4f5531(0x1bd))/0x5*(parseInt(_0x4f5531(0x1c6))/0x6)+-parseInt(_0x4f5531(0x17e))/0x7*(parseInt(_0x4f5531(0x183))/0x8)+-parseInt(_0x4f5531(0x1bb))/0x9*(parseInt(_0x4f5531(0x179))/0xa)+parseInt(_0x4f5531(0x19f))/0xb;if(_0x2fb488===_0x296681)break;else _0x48d348['push'](_0x48d348['shift']());}catch(_0x59299b){_0x48d348['push'](_0x48d348['shift']());}}}(_0x3d9f,0xb73a9));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';function _0x3d9f(){const _0x548425=['organizationName','JxXOS','log','hmVNh','status','\x1b[0m','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','not_configured','\x20\x20User-level:','6BspzVC','\x20(latest:\x20',':\x20installed\x20(','cpfQT','1952384APtMVZ','stdout','AJpVJ','8356260EaNuma','utf-8','API\x20Environment:\x20','kzAUW','enabled','match','AxxcI','data','\x20\x20\x20\x20Auth:\x20','join','details','\x0a---\x20OpenCode\x20Plugin\x20---','name','LZrCR','1684191FuKPVu','oQGFB','Organization:\x20','filter','KFKfN','\x20(active)','\x1b]8;;file://','rJGeF','@ranger-testing/opencode-plugin','tvaWF','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','auth.json','\x20\x20\x20\x20','error','186435urVjYS','322673LJlcfp','2885yGhemY','KdrKM','tBfYY','user','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','opencode','includes','EUMXH','API\x20Token:\x20✗\x20Not\x20found','5364QFtTWA','\x0a\x20\x20No\x20active\x20profile\x20set','iZRuw','length','HvOgP','configured','AMesq','NITWg','ignore','project','gvXgT','string','cGrst','TkjJX','diSmX','Ucmul','DDfwy','displayName','\x20\x20Run:\x20ranger\x20setup\x20[token]','\x0a---\x20Claude\x20Code\x20Plugin\x20---','hasEncryptedAuth','10ahHoms','\x1b]8;;\x07','isArray','\x20\x20Project-level:','parse','14VUwlZp','ranger@trailhead','\x20plugin(s)\x20configured','settingsPath','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','1691216xWpFag','auth.json.enc','SJkSi','settings.json','\x0a📊\x20Ranger\x20Status\x0a','inmaI','pipe','opencode-plugin','\x20\x20Run:\x20ranger\x20update','AaYuc','SrayE','zBqbp'];_0x3d9f=function(){return _0x548425;};return _0x3d9f();}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=_0x63dd62=>'\x1b[1m'+_0x63dd62+_0x2ceca2(0x194),link=(_0xfced7b,_0x42cbe1)=>_0x2ceca2(0x1b3)+_0xfced7b+'\x07'+(_0x42cbe1||_0xfced7b)+_0x2ceca2(0x17a);async function getOpencodePluginStatus(){const _0x44df12=_0x2ceca2,_0x866511={'EzEGn':function(_0x559321,_0x3bd5b9){return _0x559321(_0x3bd5b9);},'FrNvO':function(_0x2e3fca,_0xeb05ad){return _0x2e3fca(_0xeb05ad);},'gvXgT':_0x44df12(0x1cb),'zBqbp':_0x44df12(0x16f),'kzAUW':function(_0x1caf5d,_0x39b50b,_0x321080,_0x4230b5){return _0x1caf5d(_0x39b50b,_0x321080,_0x4230b5);},'TkjJX':'debug','KFKfN':'config','ZOukk':_0x44df12(0x1a6),'tBfYY':_0x44df12(0x1ba),'AxxcI':'close'};return new Promise(_0x5306f7=>{const _0x124e25=_0x44df12,_0x4e6a1b={'htIMg':function(_0x525c57,_0x1f263d){return _0x525c57(_0x1f263d);},'OgGYC':function(_0x367387,_0x55619d){return _0x367387!==_0x55619d;},'XJaAq':_0x866511[_0x124e25(0x18e)]},_0x32ddfc=_0x866511[_0x124e25(0x1a2)](spawn,_0x124e25(0x1c2),[_0x866511[_0x124e25(0x171)],_0x866511[_0x124e25(0x1b1)]],{'stdio':[_0x124e25(0x16c),_0x124e25(0x189),_0x124e25(0x189)]});let _0x58809a='';_0x32ddfc[_0x124e25(0x19d)]?.['on'](_0x124e25(0x1a6),_0x11062b=>{_0x58809a+=_0x11062b['toString']();}),_0x32ddfc['stderr']?.['on'](_0x866511['ZOukk'],_0x1d51f1=>{_0x58809a+=_0x1d51f1['toString']();}),_0x32ddfc['on'](_0x866511[_0x124e25(0x1bf)],()=>{_0x4e6a1b['htIMg'](_0x5306f7,{'status':'not_installed'});}),_0x32ddfc['on'](_0x866511[_0x124e25(0x1a5)],_0x7ae3c=>{const _0xb44d87=_0x124e25;if(_0x7ae3c!==0x0){_0x866511['EzEGn'](_0x5306f7,{'status':'not_installed'});return;}const _0x3137f4=_0x58809a['trim']();let _0x463802=null;if(_0x3137f4)try{_0x463802=JSON[_0xb44d87(0x17d)](_0x3137f4);}catch{const _0x215347=_0x3137f4[_0xb44d87(0x1a4)](/\{[\s\S]*\}$/);if(_0x215347)try{_0x463802=JSON['parse'](_0x215347[0x0]);}catch{_0x463802=null;}}const _0xa10646=Array[_0xb44d87(0x17b)](_0x463802?.['plugin'])?_0x463802?.['plugin']:[],_0xe0e27a=_0xa10646['some'](_0x2a6f8d=>{const _0x22fef7=_0xb44d87;if(_0x4e6a1b['OgGYC'](typeof _0x2a6f8d,_0x4e6a1b['XJaAq']))return![];return _0x2a6f8d['includes']('@ranger-testing/opencode-plugin')||_0x2a6f8d['includes'](_0x22fef7(0x18a));});if(_0xe0e27a){_0x866511['FrNvO'](_0x5306f7,{'status':_0x866511[_0xb44d87(0x16e)],'details':_0xa10646[_0xb44d87(0x1c9)]>0x0?_0xa10646[_0xb44d87(0x1c9)]+_0xb44d87(0x180):undefined});return;}if(_0xa10646['length']>0x0){_0x5306f7({'status':_0xb44d87(0x196),'details':_0xa10646['length']+_0xb44d87(0x180)});return;}_0x5306f7({'status':_0xb44d87(0x196)});});});}async function getSkillsFromDir(_0x2ee5ff,_0x5a5d9b){const _0x156fb5=_0x2ceca2,_0x432a7c={'KUZJO':function(_0x3ef5e9,_0x3e3c3d,_0x3bcad9){return _0x3ef5e9(_0x3e3c3d,_0x3bcad9);},'HvOgP':'SKILL.md','iZRuw':function(_0x3125e8,_0x3e407){return _0x3125e8(_0x3e407);},'EUMXH':function(_0x1dfff1,_0x578a06,_0x2bdb75){return _0x1dfff1(_0x578a06,_0x2bdb75);}};if(!existsSync(_0x2ee5ff))return[];const _0x5c35a2=[];try{const _0x3209bc=await _0x432a7c['KUZJO'](readdir,_0x2ee5ff,{'withFileTypes':!![]});for(const _0x32dd78 of _0x3209bc){if(_0x32dd78['isDirectory']()){const _0xe51ba7=join(_0x2ee5ff,_0x32dd78[_0x156fb5(0x1ab)],_0x432a7c[_0x156fb5(0x1ca)]);if(_0x432a7c[_0x156fb5(0x1c8)](existsSync,_0xe51ba7)){let _0x52bbe3=_0x32dd78['name'];try{const _0x28c1af=await _0x432a7c[_0x156fb5(0x1c4)](readFile,_0xe51ba7,_0x156fb5(0x1a0)),_0xa0ab58=_0x28c1af['match'](/name:\s*(.+)/);_0xa0ab58&&(_0x52bbe3=_0xa0ab58[0x1]['trim']());}catch{}_0x5c35a2['push']({'name':_0x32dd78['name'],'displayName':_0x52bbe3,'path':_0xe51ba7,'level':_0x5a5d9b});}}}}catch{return[];}return _0x5c35a2;}async function getInstalledSkills(){const _0x33933f=_0x2ceca2,_0x3f822f={'ajgfP':function(_0x307649,_0x1ec301,_0x255fb6){return _0x307649(_0x1ec301,_0x255fb6);},'rJGeF':function(_0x2d0693){return _0x2d0693();},'AMesq':_0x33933f(0x1c0)},[_0x184b70,_0x32813f]=await Promise['all']([getSkillsFromDir(getProjectSkillsDir(),_0x33933f(0x16d)),_0x3f822f['ajgfP'](getSkillsFromDir,_0x3f822f[_0x33933f(0x1b4)](getUserSkillsDir),_0x3f822f[_0x33933f(0x1cc)])]);return{'project':_0x184b70,'user':_0x32813f};}function _0x50db(_0xf4deea,_0x4787d1){_0xf4deea=_0xf4deea-0x16c;const _0x3d9f4d=_0x3d9f();let _0x50db5e=_0x3d9f4d[_0xf4deea];return _0x50db5e;}async function getEnvironments(){const _0xa063c3=_0x2ceca2,_0x162222={'KdrKM':function(_0x23e17c,_0x313ad7,_0x22637c){return _0x23e17c(_0x313ad7,_0x22637c);},'HOySg':_0xa063c3(0x184),'JxXOS':function(_0xcaaabb,_0x3d670d){return _0xcaaabb(_0x3d670d);},'REeCM':function(_0x207862){return _0x207862();},'diSmX':function(_0x596069,_0x11ab34){return _0x596069(_0x11ab34);}},{envNames:_0x79ddec,activeEnv:_0x2ef6af}=await _0x162222['REeCM'](getEnvNames),_0x1d0f96=_0x162222['REeCM'](getRangerDir);if(!_0x162222[_0xa063c3(0x172)](existsSync,_0x1d0f96))return{'envs':[],'activeEnv':null};const _0x2670c5=_0x79ddec['map'](_0x143cf1=>{const _0x548ac3=_0xa063c3,_0x3f209d=getEnvDir(_0x143cf1),_0x3d9579=join(_0x3f209d,_0x548ac3(0x186)),_0x4e417a=_0x162222[_0x548ac3(0x1be)](join,_0x3f209d,_0x548ac3(0x1b8)),_0x1069f9=join(_0x3f209d,_0x162222['HOySg']);return{'name':_0x143cf1,'settingsPath':existsSync(_0x3d9579)?_0x3d9579:'(not\x20found)','hasPlaintextAuth':_0x162222[_0x548ac3(0x190)](existsSync,_0x4e417a),'hasEncryptedAuth':existsSync(_0x1069f9),'isActive':_0x143cf1===_0x2ef6af};});return{'envs':_0x2670c5,'activeEnv':_0x2ef6af};}export async function status(){const _0x440f11=_0x2ceca2,_0x27d35e={'LZrCR':function(_0x2857d7,_0x50f950){return _0x2857d7(_0x50f950);},'SrayE':function(_0x6b9b40,_0x4ec6a8){return _0x6b9b40(_0x4ec6a8);},'AJpVJ':function(_0x2e2feb,_0x1d9bf6,_0x249f2){return _0x2e2feb(_0x1d9bf6,_0x249f2);},'bEjcB':function(_0x433b0e){return _0x433b0e();},'cpfQT':function(_0x56e312){return _0x56e312();},'cGrst':function(_0x71c135,_0x4c3b6b){return _0x71c135!==_0x4c3b6b;},'hmVNh':function(_0x5f466e){return _0x5f466e();},'DDfwy':function(_0x2882af,_0x452ce9){return _0x2882af(_0x452ce9);},'tIiit':function(_0x432d3a){return _0x432d3a();},'SJkSi':function(_0x333a45,_0x1c2f64){return _0x333a45===_0x1c2f64;},'AaYuc':_0x440f11(0x1cb),'meKTC':function(_0xaf8073,_0x160b6d){return _0xaf8073(_0x160b6d);},'oQGFB':'not_configured','Ijbgy':'\x20\x20Not\x20configured','NITWg':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','HIhzJ':'disabled','oOiqS':_0x440f11(0x17f),'inmaI':function(_0x41ae76,_0x1555eb){return _0x41ae76+_0x1555eb;},'nFsVr':'No\x20skills\x20installed','tvaWF':function(_0x5b80ce,_0x3a937a){return _0x5b80ce>_0x3a937a;},'Ucmul':'\x0a---\x20Profiles\x20---','BYcet':'No\x20profiles\x20configured','HQvRV':'plaintext'};console['log'](_0x440f11(0x187));const _0x2ebd99=process['cwd'](),_0x51cb17=getRangerDir();if(!_0x27d35e[_0x440f11(0x1ac)](existsSync,_0x51cb17)){console['log']('Root:\x20'+link(_0x2ebd99,_0x27d35e[_0x440f11(0x18d)](bold,_0x27d35e[_0x440f11(0x18d)](basename,_0x2ebd99)))),console[_0x440f11(0x191)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log'](_0x440f11(0x195));return;}console[_0x440f11(0x191)]('Root:\x20'+_0x27d35e['AJpVJ'](link,_0x2ebd99,bold(basename(_0x2ebd99))));const _0x99a1e3=_0x27d35e['bEjcB'](getCurrentVersion),_0x364559=_0x27d35e[_0x440f11(0x19b)](getLatestVersion);if(_0x364559&&_0x27d35e[_0x440f11(0x170)](_0x364559,_0x99a1e3))console[_0x440f11(0x191)]('Version:\x20'+_0x99a1e3+_0x440f11(0x199)+_0x364559+')'),console['log'](_0x440f11(0x18b));else _0x364559?console['log']('Version:\x20'+_0x99a1e3+'\x20(up\x20to\x20date)'):console['log']('Version:\x20'+_0x99a1e3);const _0x1647a4=await _0x27d35e['hmVNh'](getToken);if(_0x1647a4){const _0x3c2352=await getCurrentUser(_0x1647a4);_0x3c2352['success']?console['log'](_0x440f11(0x1af)+_0x27d35e[_0x440f11(0x174)](bold,_0x3c2352[_0x440f11(0x1c0)][_0x440f11(0x18f)])):(console[_0x440f11(0x191)](_0x440f11(0x1c1)),console[_0x440f11(0x191)](_0x440f11(0x176)));}else console[_0x440f11(0x191)](_0x440f11(0x1c5)),console[_0x440f11(0x191)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env']['DEBUG']&&(console[_0x440f11(0x191)](_0x440f11(0x1a1)+_0x27d35e['tIiit'](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+_0x27d35e[_0x440f11(0x192)](getApiBaseUrl)));console['log'](_0x440f11(0x1aa));const _0x1e71e1=await getOpencodePluginStatus();if(_0x27d35e[_0x440f11(0x185)](_0x1e71e1[_0x440f11(0x193)],_0x27d35e[_0x440f11(0x18c)]))console['log']('\x20\x20'+_0x27d35e['meKTC'](bold,_0x440f11(0x1b5))+':\x20configured'),_0x1e71e1['details']&&console[_0x440f11(0x191)]('\x20\x20'+_0x1e71e1[_0x440f11(0x1a9)]);else _0x27d35e['SJkSi'](_0x1e71e1['status'],_0x27d35e[_0x440f11(0x1ae)])?(console[_0x440f11(0x191)](_0x27d35e['Ijbgy']),_0x1e71e1[_0x440f11(0x1a9)]&&console['log']('\x20\x20'+_0x1e71e1['details']),console[_0x440f11(0x191)](_0x27d35e[_0x440f11(0x1cd)])):console[_0x440f11(0x191)]('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console[_0x440f11(0x191)](_0x440f11(0x177));const _0x29f0af=await getPluginInfo(_0x440f11(0x17f));if(_0x29f0af){const _0x1caadb=_0x29f0af['scope']||'unknown',_0x11499d=_0x29f0af[_0x440f11(0x1a3)]?_0x440f11(0x1a3):_0x27d35e['HIhzJ'];console['log']('\x20\x20'+_0x27d35e['LZrCR'](bold,_0x27d35e['oOiqS'])+_0x440f11(0x19a)+_0x1caadb+',\x20'+_0x11499d+')');}else console[_0x440f11(0x191)]('\x20\x20Not\x20installed'),console[_0x440f11(0x191)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console['log']('\x0a---\x20Skills\x20---');const {project:_0x34d872,user:_0x675da6}=await getInstalledSkills(),_0x153082=_0x34d872[_0x440f11(0x1b0)](_0x1f6c6d=>RANGER_MANAGED_SKILLS[_0x440f11(0x1c3)](_0x1f6c6d['name'])),_0x468b52=_0x675da6[_0x440f11(0x1b0)](_0x25fff0=>RANGER_MANAGED_SKILLS[_0x440f11(0x1c3)](_0x25fff0[_0x440f11(0x1ab)])),_0x5bb11f=_0x27d35e[_0x440f11(0x188)](_0x153082['length'],_0x468b52['length']);if(_0x27d35e[_0x440f11(0x185)](_0x5bb11f,0x0))console[_0x440f11(0x191)](_0x27d35e['nFsVr']),console[_0x440f11(0x191)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x27d35e[_0x440f11(0x1b6)](_0x153082['length'],0x0)){console[_0x440f11(0x191)](_0x440f11(0x17c));for(const _0x5e8e10 of _0x153082){console[_0x440f11(0x191)](_0x440f11(0x1b9)+_0x27d35e[_0x440f11(0x18d)](bold,_0x5e8e10['displayName'])+':\x20'+link(_0x5e8e10['path'],_0x27d35e[_0x440f11(0x174)](basename,_0x5e8e10['path'])));}}if(_0x468b52['length']>0x0){console['log'](_0x440f11(0x197));for(const _0x247b4a of _0x468b52){console[_0x440f11(0x191)]('\x20\x20\x20\x20'+bold(_0x247b4a[_0x440f11(0x175)])+':\x20'+_0x27d35e[_0x440f11(0x19e)](link,_0x247b4a['path'],_0x27d35e['DDfwy'](basename,_0x247b4a['path'])));}}}console[_0x440f11(0x191)](_0x27d35e[_0x440f11(0x173)]);const {envs:_0x23a148,activeEnv:_0x4a4c99}=await getEnvironments();if(_0x27d35e[_0x440f11(0x185)](_0x23a148[_0x440f11(0x1c9)],0x0))console['log'](_0x27d35e['BYcet']),console[_0x440f11(0x191)](_0x440f11(0x182));else{for(const _0x2ccb5b of _0x23a148){const _0x1406fc=_0x2ccb5b['isActive']?_0x440f11(0x1b2):'',_0x4175c3=_0x2ccb5b[_0x440f11(0x178)]?'encrypted':_0x2ccb5b['hasPlaintextAuth']?_0x27d35e['HQvRV']:'none';console['log']('\x20\x20'+bold(_0x2ccb5b[_0x440f11(0x1ab)])+_0x1406fc),console[_0x440f11(0x191)](_0x440f11(0x1a7)+_0x4175c3),_0x27d35e['cGrst'](_0x2ccb5b[_0x440f11(0x181)],'(not\x20found)')&&console[_0x440f11(0x191)]('\x20\x20\x20\x20Settings:\x20'+link(_0x2ccb5b['settingsPath'],basename(_0x2ccb5b[_0x440f11(0x181)])));}!_0x4a4c99&&(console[_0x440f11(0x191)](_0x440f11(0x1c7)),console['log'](_0x440f11(0x1b7)+_0x23a148['map'](_0x5217b5=>_0x5217b5[_0x440f11(0x1ab)])[_0x440f11(0x1a8)](',\x20')+')'));}console['log']('');}
@@ -1 +1 @@
1
- (function(_0x52ca44,_0x3cf5d5){const _0x452a3b=_0x1773,_0x21f676=_0x52ca44();while(!![]){try{const _0x5b44d6=-parseInt(_0x452a3b(0xc1))/0x1*(parseInt(_0x452a3b(0xec))/0x2)+parseInt(_0x452a3b(0xe7))/0x3+parseInt(_0x452a3b(0xb3))/0x4*(parseInt(_0x452a3b(0xd4))/0x5)+parseInt(_0x452a3b(0xb4))/0x6+-parseInt(_0x452a3b(0xc6))/0x7*(parseInt(_0x452a3b(0xca))/0x8)+parseInt(_0x452a3b(0xd0))/0x9+-parseInt(_0x452a3b(0xd7))/0xa;if(_0x5b44d6===_0x3cf5d5)break;else _0x21f676['push'](_0x21f676['shift']());}catch(_0x4726f4){_0x21f676['push'](_0x21f676['shift']());}}}(_0xba67,0x78f13));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x5653e7=_0x1773,_0x7b25bc={'lFdwh':function(_0x54ce99,_0x2ff208){return _0x54ce99(_0x2ff208);},'PQoiZ':function(_0x1e844b,_0x3172ae){return _0x1e844b===_0x3172ae;},'GahgV':function(_0x3f646a,_0x162a1d,_0x342797,_0x195dac){return _0x3f646a(_0x162a1d,_0x342797,_0x195dac);},'BxrVb':_0x5653e7(0xe9),'AfbXJ':'inherit'};return new Promise(_0x1bd47e=>{const _0x4822cd=_0x5653e7;console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x183cc8=_0x7b25bc['GahgV'](spawn,'npm',[_0x7b25bc[_0x4822cd(0xc0)],'-g',PACKAGE_NAME+_0x4822cd(0xe0)],{'stdio':_0x7b25bc[_0x4822cd(0xcb)],'shell':process[_0x4822cd(0xb0)]===_0x4822cd(0xba)});_0x183cc8['on']('close',_0x2702a1=>{_0x7b25bc['lFdwh'](_0x1bd47e,_0x7b25bc['PQoiZ'](_0x2702a1,0x0));}),_0x183cc8['on']('error',()=>{_0x1bd47e(![]);});});}async function updateClaudeMarketplace(){const _0x11347b=_0x1773,_0x5a625b={'vMJBk':function(_0x4c43c1,_0x3ab966,_0x35b30c,_0x15db46){return _0x4c43c1(_0x3ab966,_0x35b30c,_0x15db46);},'jYwfF':_0x11347b(0xc5),'OhSlw':'plugin','ZxdDE':_0x11347b(0xbb),'UOHPs':'update','iMchv':'pipe','voSrO':_0x11347b(0xba),'iPFGe':_0x11347b(0xcc)};return new Promise(_0x2c168d=>{const _0x59bc19=_0x11347b,_0x5286d2=_0x5a625b['vMJBk'](spawn,_0x5a625b[_0x59bc19(0xdc)],[_0x5a625b[_0x59bc19(0xc3)],_0x5a625b[_0x59bc19(0xeb)],_0x5a625b[_0x59bc19(0xb2)],'trailhead'],{'stdio':_0x5a625b[_0x59bc19(0xd5)],'shell':process[_0x59bc19(0xb0)]===_0x5a625b['voSrO']});_0x5286d2['on']('close',_0xbb934d=>{_0x2c168d(_0xbb934d===0x0);}),_0x5286d2['on'](_0x5a625b['iPFGe'],()=>{_0x2c168d(![]);});});}async function updateClaudePlugin(_0x361117){const _0x10a82b=_0x1773,_0x368358={'KuLuL':function(_0x1fa256,_0x454f81){return _0x1fa256(_0x454f81);},'Dvhqv':_0x10a82b(0xad),'iFLmK':'update','wasOI':_0x10a82b(0xd3),'oBltO':'claude','KIPHZ':_0x10a82b(0xb9),'caeIC':_0x10a82b(0xba),'sChnq':'close','ImMFo':_0x10a82b(0xcc)};return new Promise(_0x55cef9=>{const _0x205891=_0x10a82b,_0x15e0e7=[_0x368358['Dvhqv'],_0x368358[_0x205891(0xbd)],_0x368358['wasOI']];_0x361117&&_0x15e0e7[_0x205891(0xd8)]('--scope',_0x361117);const _0x1cecd6=spawn(_0x368358['oBltO'],_0x15e0e7,{'stdio':_0x368358[_0x205891(0xe8)],'shell':process[_0x205891(0xb0)]===_0x368358[_0x205891(0xdd)]});_0x1cecd6['on'](_0x368358['sChnq'],_0x1b5255=>{_0x55cef9(_0x1b5255===0x0);}),_0x1cecd6['on'](_0x368358['ImMFo'],()=>{const _0x16c437=_0x205891;_0x368358[_0x16c437(0xe1)](_0x55cef9,![]);});});}function isSkillInstalled(_0x137e02,_0x270679,_0x4a4a53){const _0x468977=_0x1773,_0x5e2837={'aXgHn':function(_0x2ce18a,_0x6f77ee){return _0x2ce18a===_0x6f77ee;},'jkhzY':'opencode'},_0x383e5f=_0x5e2837['aXgHn'](_0x4a4a53,_0x5e2837[_0x468977(0xb8)])?getOpencodeSkillsDir(_0x270679):getSkillsDir(_0x270679),_0x5a5280=join(_0x383e5f,_0x137e02);return existsSync(_0x5a5280);}async function reinstallSkills(_0x5c16b5){const _0x2c6482=_0x1773,_0x3b249f={'gsUbB':'user','ZqiWK':function(_0x571508,_0x29104e,_0x51ec50,_0x126a5a){return _0x571508(_0x29104e,_0x51ec50,_0x126a5a);},'mcSvT':_0x2c6482(0xc5),'WCGgq':function(_0x1161e3,_0x28b90b,_0x518210,_0x1e9406){return _0x1161e3(_0x28b90b,_0x518210,_0x1e9406);},'RXcNJ':function(_0x274520,_0x162464,_0x573755){return _0x274520(_0x162464,_0x573755);},'eRqiS':_0x2c6482(0xcf),'ccswY':function(_0x40f6d8,_0x189f23,_0x9af0db){return _0x40f6d8(_0x189f23,_0x9af0db);}},_0x4de03c=['project',_0x3b249f[_0x2c6482(0xbf)]],_0x405f6c=[];for(const _0x1e0f06 of _0x4de03c){for(const _0x483089 of RANGER_MANAGED_SKILLS){_0x3b249f['ZqiWK'](isSkillInstalled,_0x483089,_0x1e0f06,_0x2c6482(0xc5))&&_0x405f6c['push']({'skillName':_0x483089,'level':_0x1e0f06,'platform':_0x3b249f['mcSvT']}),_0x3b249f[_0x2c6482(0xde)](isSkillInstalled,_0x483089,_0x1e0f06,_0x2c6482(0xbc))&&_0x405f6c[_0x2c6482(0xd8)]({'skillName':_0x483089,'level':_0x1e0f06,'platform':'opencode'});}}for(const _0x109526 of _0x4de03c){for(const _0x24e76a of DEPRECATED_SKILLS){await _0x3b249f['RXcNJ'](removeSkill,_0x24e76a,_0x109526);}}if(_0x405f6c[_0x2c6482(0xc9)]===0x0){console['log'](_0x3b249f[_0x2c6482(0xb7)]);return;}console['log']('\x0aReinstalling\x20'+_0x405f6c['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x284931,level:_0x4e4e59,platform:_0x5b653}of _0x405f6c){try{await _0x3b249f['ccswY'](installSkill,_0x284931,{'level':_0x4e4e59,'cliVersion':_0x5c16b5,'platform':_0x5b653});}catch(_0x4bd77f){console[_0x2c6482(0xc8)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x5b653+'\x20'+_0x4e4e59+_0x2c6482(0xc4)+_0x284931+':',_0x4bd77f);}}}function _0xba67(){const _0x56ab32=['Checking\x20for\x20updates...','plugin','active-feature.txt','tZXOD','platform','\x0aSuccessfully\x20updated\x20to\x20version\x20','UOHPs','4DArlzH','5944338hCyBAD','MpEfQ','Update\x20failed.\x20You\x20may\x20need\x20to\x20run\x20with\x20sudo:\x20sudo\x20npm\x20install\x20-g\x20','eRqiS','jkhzY','pipe','win32','marketplace','opencode','iFLmK','split','gsUbB','BxrVb','135pJycBy','\x0a✅\x20Update\x20complete!','OhSlw','\x20skill\x20','claude','3325959wXwjnh','some','warn','length','8hBGeIR','AfbXJ','error','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','active-profile.txt','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','6735906VGdnjt','qjPMN','Claude\x20plugin\x20updated\x20(project\x20scope).','ranger@trailhead','1571010PVMZQC','iMchv','project','20004590CJPOKA','push','EKeoU','\x0aYour\x20version\x20(','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','jYwfF','caeIC','WCGgq','eQRWa','@latest','KuLuL','utf-8','log','✓\x20Migrated\x20active\x20profile\x20file',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','uKLwS','2767833IlhfMB','KIPHZ','install','YXgmM','ZxdDE','74lFwwZS'];_0xba67=function(){return _0x56ab32;};return _0xba67();}function _0x1773(_0x2b8551,_0x139a31){_0x2b8551=_0x2b8551-0xac;const _0xba6733=_0xba67();let _0x1773b6=_0xba6733[_0x2b8551];return _0x1773b6;}async function ensureActiveProfileGitignored(){const _0x51690e=_0x1773,_0x4e6691={'uKLwS':function(_0x39f249,_0x1003e4,_0x3ee704){return _0x39f249(_0x1003e4,_0x3ee704);},'DkHlL':_0x51690e(0xe2),'MpEfQ':function(_0x35863a,_0x246c73){return _0x35863a===_0x246c73;}},_0x44b648=join(getRangerDir(),'.gitignore');if(!existsSync(_0x44b648))return![];let _0xed126d='';try{_0xed126d=await _0x4e6691[_0x51690e(0xe6)](readFile,_0x44b648,_0x4e6691['DkHlL']);}catch{return![];}const _0x245188=_0xed126d[_0x51690e(0xbe)](/\r?\n/);if(_0x245188[_0x51690e(0xc7)](_0x107941=>_0x107941['trim']()===_0x51690e(0xce)))return![];let _0x529db2=_0x245188['findIndex'](_0x1749c7=>_0x1749c7['trim']()===_0x51690e(0xae));_0x4e6691[_0x51690e(0xb5)](_0x529db2,-0x1)&&(_0x529db2=_0x245188['length']);_0x245188['splice'](_0x529db2,0x0,_0x51690e(0xce));let _0xe0fc9a=_0x245188['join']('\x0a');!_0xe0fc9a['endsWith']('\x0a')&&(_0xe0fc9a+='\x0a');try{await writeFile(_0x44b648,_0xe0fc9a,'utf-8');}catch{return![];}return!![];}export async function update(){const _0x4cbab9=_0x1773,_0x5e324b={'eQRWa':function(_0x191edc){return _0x191edc();},'EKeoU':_0x4cbab9(0xac),'Ojpfz':function(_0x46dfe5,_0x3e8fa5,_0x1ce6e0){return _0x46dfe5(_0x3e8fa5,_0x1ce6e0);},'sArog':_0x4cbab9(0xcd),'qjPMN':function(_0x1efd3a){return _0x1efd3a();},'YXgmM':function(_0x3b25aa,_0x5882da){return _0x3b25aa(_0x5882da);},'rdtqd':_0x4cbab9(0xdb),'wzXYF':function(_0x2c813a,_0x4e5d1c){return _0x2c813a(_0x4e5d1c);},'tZXOD':_0x4cbab9(0xe4)},_0x307451=_0x5e324b['eQRWa'](getCurrentVersion);console['log']('\x0aCurrent\x20version:\x20'+_0x307451),console['log'](_0x5e324b[_0x4cbab9(0xd9)]);const _0x3a67f7=_0x5e324b[_0x4cbab9(0xdf)](getLatestVersion);if(!_0x3a67f7)throw new Error('Failed\x20to\x20check\x20for\x20updates.\x20Please\x20check\x20your\x20network\x20connection.');console[_0x4cbab9(0xe3)]('Latest\x20version:\x20\x20'+_0x3a67f7);const _0x2bd014=_0x5e324b['Ojpfz'](compareVersions,_0x307451,_0x3a67f7);let _0x74fa3b=_0x307451;if(_0x2bd014===0x0)console['log'](_0x5e324b['sArog']);else{if(_0x2bd014<0x0)console[_0x4cbab9(0xe3)](_0x4cbab9(0xda)+_0x307451+_0x4cbab9(0xe5)+_0x3a67f7+').');else{const _0x3f987b=await _0x5e324b[_0x4cbab9(0xd1)](runInstall);if(_0x3f987b)console['log'](_0x4cbab9(0xb1)+_0x3a67f7),_0x74fa3b=_0x3a67f7;else throw new Error(_0x4cbab9(0xb6)+PACKAGE_NAME+'@latest');}}await reinstallSkills(_0x74fa3b);const _0x143bea=await isMarketplaceAdded('trailhead'),_0x9c61ca=await _0x5e324b[_0x4cbab9(0xea)](isPluginInstalled,'ranger@trailhead');if(_0x143bea){const _0x2403f5=await updateClaudeMarketplace();_0x2403f5&&console['log']('\x0aClaude\x20marketplace\x20updated\x20(trailhead).');}if(_0x9c61ca){const _0x7a894b=await updateClaudePlugin();_0x7a894b&&console['log'](_0x5e324b['rdtqd']);const _0x1c5330=await _0x5e324b['wzXYF'](updateClaudePlugin,_0x4cbab9(0xd6));_0x1c5330&&console['log']((_0x7a894b?'':'\x0a')+_0x4cbab9(0xd2));}const _0x568377=await migrateActiveProfileFile();_0x568377&&console['log'](_0x5e324b[_0x4cbab9(0xaf)]);const _0xfb3b89=await ensureActiveProfileGitignored();console[_0x4cbab9(0xe3)](_0x4cbab9(0xc2));}
1
+ (function(_0x25da16,_0x3c4620){const _0xa3592=_0x3d1c,_0x3adacf=_0x25da16();while(!![]){try{const _0x10584f=-parseInt(_0xa3592(0x155))/0x1*(-parseInt(_0xa3592(0x176))/0x2)+parseInt(_0xa3592(0x181))/0x3+-parseInt(_0xa3592(0x184))/0x4*(parseInt(_0xa3592(0x15f))/0x5)+parseInt(_0xa3592(0x169))/0x6+parseInt(_0xa3592(0x14e))/0x7*(-parseInt(_0xa3592(0x16e))/0x8)+-parseInt(_0xa3592(0x144))/0x9*(parseInt(_0xa3592(0x18a))/0xa)+parseInt(_0xa3592(0x145))/0xb*(parseInt(_0xa3592(0x160))/0xc);if(_0x10584f===_0x3c4620)break;else _0x3adacf['push'](_0x3adacf['shift']());}catch(_0x550ec2){_0x3adacf['push'](_0x3adacf['shift']());}}}(_0x3eb1,0xd1aca));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x3be568=_0x3d1c,_0x5a7f9b={'zDWSG':function(_0x5e4bb3,_0x68024b){return _0x5e4bb3===_0x68024b;},'mjBww':'install','siGgJ':'inherit','gcqHR':'win32','zpcjI':'close','PhPCa':_0x3be568(0x14a)};return new Promise(_0x140d94=>{const _0x31f27c=_0x3be568,_0x282fa7={'wzjxb':function(_0x35e209,_0x554cae){return _0x35e209(_0x554cae);},'PVcul':function(_0x198b2b,_0x35636e){return _0x5a7f9b['zDWSG'](_0x198b2b,_0x35636e);}};console[_0x31f27c(0x148)]('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x1f40fd=spawn(_0x31f27c(0x15d),[_0x5a7f9b[_0x31f27c(0x149)],'-g',PACKAGE_NAME+'@latest'],{'stdio':_0x5a7f9b['siGgJ'],'shell':_0x5a7f9b[_0x31f27c(0x166)](process[_0x31f27c(0x16f)],_0x5a7f9b[_0x31f27c(0x173)])});_0x1f40fd['on'](_0x5a7f9b[_0x31f27c(0x165)],_0x2ffb68=>{_0x282fa7['wzjxb'](_0x140d94,_0x282fa7['PVcul'](_0x2ffb68,0x0));}),_0x1f40fd['on'](_0x5a7f9b[_0x31f27c(0x146)],()=>{const _0x6505e1=_0x31f27c;_0x282fa7[_0x6505e1(0x16a)](_0x140d94,![]);});});}async function updateClaudeMarketplace(){const _0x27f74f=_0x3d1c,_0x487ed2={'XOPWg':function(_0x3ed69a,_0x252ae6){return _0x3ed69a===_0x252ae6;},'eWUZN':function(_0x826bc5,_0x3d543c,_0x3d6126,_0xfb75ca){return _0x826bc5(_0x3d543c,_0x3d6126,_0xfb75ca);},'jMMuc':'claude','zzfdH':_0x27f74f(0x168),'SBOAz':'pipe','xTTAC':'close'};return new Promise(_0x5769b5=>{const _0x5359c3=_0x27f74f,_0xc70a57=_0x487ed2[_0x5359c3(0x154)](spawn,_0x487ed2[_0x5359c3(0x15a)],[_0x5359c3(0x147),_0x5359c3(0x179),'update',_0x487ed2[_0x5359c3(0x152)]],{'stdio':_0x487ed2[_0x5359c3(0x18b)],'shell':process[_0x5359c3(0x16f)]==='win32'});_0xc70a57['on'](_0x487ed2['xTTAC'],_0x1e4ce5=>{_0x5769b5(_0x487ed2['XOPWg'](_0x1e4ce5,0x0));}),_0xc70a57['on']('error',()=>{_0x5769b5(![]);});});}function _0x3eb1(){const _0x119877=['\x20ranger-managed\x20skill(s)...','bRvXv','PMENe','jMMuc','RwgCv','CLEdL','npm','Pfjjk','323165jMTJeB','53436YOSfZi','update','Claude\x20plugin\x20updated\x20(project\x20scope).','endsWith','yNRql','zpcjI','zDWSG','Efyqv','trailhead','4163250BQnrYh','wzjxb','HCjSv','utf-8','notYc','16CUOurj','platform','GkiCR','iOpwA','findIndex','gcqHR','zatJa','mCnXX','804746rTBWCC','--scope','vJYRB','marketplace','fHULq',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','user','Oydqn','gonqE','GqHzB','push','2009163WGqlKn','close','\x20skill\x20','32oZNJnA','pipe','claude','egVzN','\x0aReinstalling\x20','\x0aYour\x20version\x20(','80xVVnTn','SBOAz','length','KoGzG','active-profile.txt','.gitignore','1907397LyWeEE','4499slYtnZ','PhPCa','plugin','log','mjBww','error','split','wZXlb','NDwZH','1805622MARIDX','slQwd','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','\x20\x20Failed\x20to\x20reinstall\x20','zzfdH','mEutX','eWUZN','1amJokG','trim'];_0x3eb1=function(){return _0x119877;};return _0x3eb1();}async function updateClaudePlugin(_0x204192){const _0x462612=_0x3d1c,_0x522792={'gonqE':_0x462612(0x147),'ZoCfe':_0x462612(0x161),'slQwd':'ranger@trailhead','zatJa':_0x462612(0x177),'eLVPX':_0x462612(0x185),'bhUzL':_0x462612(0x182),'bRvXv':'error'};return new Promise(_0x5a15f0=>{const _0x243bcd=_0x462612,_0x32e8a6={'egVzN':function(_0x46427f,_0x178e70){return _0x46427f(_0x178e70);}},_0x33bdd9=[_0x522792[_0x243bcd(0x17e)],_0x522792['ZoCfe'],_0x522792[_0x243bcd(0x14f)]];_0x204192&&_0x33bdd9['push'](_0x522792[_0x243bcd(0x174)],_0x204192);const _0x338b63=spawn(_0x243bcd(0x186),_0x33bdd9,{'stdio':_0x522792['eLVPX'],'shell':process[_0x243bcd(0x16f)]==='win32'});_0x338b63['on'](_0x522792['bhUzL'],_0x1a57e8=>{const _0x52a062=_0x243bcd;_0x32e8a6[_0x52a062(0x187)](_0x5a15f0,_0x1a57e8===0x0);}),_0x338b63['on'](_0x522792[_0x243bcd(0x158)],()=>{_0x5a15f0(![]);});});}function isSkillInstalled(_0x228d2f,_0x99aeb7,_0xe68f46){const _0x1a5847=_0x3d1c,_0x28c04e={'bHeAS':function(_0x14f6b3,_0x82dae8){return _0x14f6b3===_0x82dae8;},'Pfjjk':'opencode'},_0x2aa3b6=_0x28c04e['bHeAS'](_0xe68f46,_0x28c04e[_0x1a5847(0x15e)])?getOpencodeSkillsDir(_0x99aeb7):getSkillsDir(_0x99aeb7),_0x42fb07=join(_0x2aa3b6,_0x228d2f);return existsSync(_0x42fb07);}function _0x3d1c(_0x170eaf,_0x5eda9d){_0x170eaf=_0x170eaf-0x141;const _0x3eb172=_0x3eb1();let _0x3d1ca8=_0x3eb172[_0x170eaf];return _0x3d1ca8;}async function reinstallSkills(_0x723bda){const _0x17d435=_0x3d1c,_0x49c60a={'Efyqv':'project','mEutX':function(_0x2755ec,_0x3e718d,_0x41b4db,_0x35d511){return _0x2755ec(_0x3e718d,_0x41b4db,_0x35d511);},'wZXlb':_0x17d435(0x186),'fHULq':'opencode','awdVf':function(_0x3c4a4a,_0x37db59,_0x11aa3c){return _0x3c4a4a(_0x37db59,_0x11aa3c);},'iOpwA':function(_0x142bc6,_0x2ffb01){return _0x142bc6===_0x2ffb01;}},_0x7746e7=[_0x49c60a[_0x17d435(0x167)],_0x17d435(0x17c)],_0x24509d=[];for(const _0x54730a of _0x7746e7){for(const _0x361fce of RANGER_MANAGED_SKILLS){_0x49c60a[_0x17d435(0x153)](isSkillInstalled,_0x361fce,_0x54730a,_0x49c60a[_0x17d435(0x14c)])&&_0x24509d['push']({'skillName':_0x361fce,'level':_0x54730a,'platform':_0x17d435(0x186)}),isSkillInstalled(_0x361fce,_0x54730a,_0x49c60a[_0x17d435(0x17a)])&&_0x24509d[_0x17d435(0x180)]({'skillName':_0x361fce,'level':_0x54730a,'platform':_0x49c60a[_0x17d435(0x17a)]});}}for(const _0x432454 of _0x7746e7){for(const _0x36fdf5 of DEPRECATED_SKILLS){await _0x49c60a['awdVf'](removeSkill,_0x36fdf5,_0x432454);}}if(_0x49c60a[_0x17d435(0x171)](_0x24509d[_0x17d435(0x18c)],0x0)){console['log']('\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.');return;}console[_0x17d435(0x148)](_0x17d435(0x188)+_0x24509d['length']+_0x17d435(0x157));for(const {skillName:_0x3c2ca1,level:_0x4a3c9b,platform:_0x419dcd}of _0x24509d){try{await _0x49c60a['awdVf'](installSkill,_0x3c2ca1,{'level':_0x4a3c9b,'cliVersion':_0x723bda,'platform':_0x419dcd});}catch(_0x2f99ca){console['warn'](_0x17d435(0x151)+_0x419dcd+'\x20'+_0x4a3c9b+_0x17d435(0x183)+_0x3c2ca1+':',_0x2f99ca);}}}async function ensureActiveProfileGitignored(){const _0x54e845=_0x3d1c,_0x5046dc={'KoGzG':function(_0x5c17ab,_0x5a77c1,_0x2834e7){return _0x5c17ab(_0x5a77c1,_0x2834e7);},'qYntG':function(_0x269c7f){return _0x269c7f();},'yNRql':_0x54e845(0x143),'bCUuj':function(_0x5e30e3,_0x307ee1){return _0x5e30e3(_0x307ee1);},'mCnXX':function(_0x4de25e,_0x2dccef,_0x4af53c){return _0x4de25e(_0x2dccef,_0x4af53c);},'HCjSv':_0x54e845(0x16c),'mQcdh':function(_0x167ae1,_0x42f705){return _0x167ae1===_0x42f705;},'Oydqn':function(_0x2bb2e1,_0x41c50c,_0x55e47c,_0x15e5a9){return _0x2bb2e1(_0x41c50c,_0x55e47c,_0x15e5a9);}},_0x544f4b=_0x5046dc[_0x54e845(0x141)](join,_0x5046dc['qYntG'](getRangerDir),_0x5046dc[_0x54e845(0x164)]);if(!_0x5046dc['bCUuj'](existsSync,_0x544f4b))return![];let _0x548d51='';try{_0x548d51=await _0x5046dc[_0x54e845(0x175)](readFile,_0x544f4b,_0x5046dc['HCjSv']);}catch{return![];}const _0x35514d=_0x548d51[_0x54e845(0x14b)](/\r?\n/);if(_0x35514d['some'](_0x874025=>_0x874025[_0x54e845(0x156)]()==='active-profile.txt'))return![];let _0x5a0e7c=_0x35514d[_0x54e845(0x172)](_0x44ade8=>_0x44ade8['trim']()==='active-feature.txt');_0x5046dc['mQcdh'](_0x5a0e7c,-0x1)&&(_0x5a0e7c=_0x35514d[_0x54e845(0x18c)]);_0x35514d['splice'](_0x5a0e7c,0x0,_0x54e845(0x142));let _0x3d4002=_0x35514d['join']('\x0a');!_0x3d4002[_0x54e845(0x163)]('\x0a')&&(_0x3d4002+='\x0a');try{await _0x5046dc[_0x54e845(0x17d)](writeFile,_0x544f4b,_0x3d4002,_0x5046dc[_0x54e845(0x16b)]);}catch{return![];}return!![];}export async function update(){const _0x5256a3=_0x3d1c,_0x3d3128={'PMENe':'Checking\x20for\x20updates...','NDwZH':function(_0xa934b7){return _0xa934b7();},'vJYRB':'Failed\x20to\x20check\x20for\x20updates.\x20Please\x20check\x20your\x20network\x20connection.','tEISU':function(_0x74eec,_0x132b82,_0x1beb6b){return _0x74eec(_0x132b82,_0x1beb6b);},'aUxOF':function(_0x3d2f5f,_0x3ec48c){return _0x3d2f5f===_0x3ec48c;},'GkiCR':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','UDrnY':function(_0x5c4344,_0x3d51b7){return _0x5c4344<_0x3d51b7;},'RwgCv':'ranger@trailhead','notYc':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','GqHzB':function(_0x24ad60,_0x5b0f6b){return _0x24ad60(_0x5b0f6b);},'qKXGN':'project','UVzQc':'✓\x20Migrated\x20active\x20profile\x20file','CLEdL':'\x0a✅\x20Update\x20complete!'},_0x2cf99b=getCurrentVersion();console['log']('\x0aCurrent\x20version:\x20'+_0x2cf99b),console['log'](_0x3d3128[_0x5256a3(0x159)]);const _0x2c3f4d=_0x3d3128[_0x5256a3(0x14d)](getLatestVersion);if(!_0x2c3f4d)throw new Error(_0x3d3128[_0x5256a3(0x178)]);console['log']('Latest\x20version:\x20\x20'+_0x2c3f4d);const _0x52776e=_0x3d3128['tEISU'](compareVersions,_0x2cf99b,_0x2c3f4d);let _0x3bca92=_0x2cf99b;if(_0x3d3128['aUxOF'](_0x52776e,0x0))console[_0x5256a3(0x148)](_0x3d3128[_0x5256a3(0x170)]);else{if(_0x3d3128['UDrnY'](_0x52776e,0x0))console['log'](_0x5256a3(0x189)+_0x2cf99b+_0x5256a3(0x17b)+_0x2c3f4d+').');else{const _0x360938=await _0x3d3128['NDwZH'](runInstall);if(_0x360938)console[_0x5256a3(0x148)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x2c3f4d),_0x3bca92=_0x2c3f4d;else throw new Error('Update\x20failed.\x20You\x20may\x20need\x20to\x20run\x20with\x20sudo:\x20sudo\x20npm\x20install\x20-g\x20'+PACKAGE_NAME+'@latest');}}await reinstallSkills(_0x3bca92);const _0x1d8355=await isMarketplaceAdded(_0x5256a3(0x168)),_0x57d152=await isPluginInstalled(_0x3d3128[_0x5256a3(0x15b)]);if(_0x1d8355){const _0x5afb29=await updateClaudeMarketplace();_0x5afb29&&console[_0x5256a3(0x148)](_0x5256a3(0x150));}if(_0x57d152){const _0x24c145=await updateClaudePlugin();_0x24c145&&console['log'](_0x3d3128[_0x5256a3(0x16d)]);const _0x4cee64=await _0x3d3128[_0x5256a3(0x17f)](updateClaudePlugin,_0x3d3128['qKXGN']);_0x4cee64&&console['log']((_0x24c145?'':'\x0a')+_0x5256a3(0x162));}const _0x2b80da=await migrateActiveProfileFile();_0x2b80da&&console['log'](_0x3d3128['UVzQc']);const _0x3f7bc8=await ensureActiveProfileGitignored();console[_0x5256a3(0x148)](_0x3d3128[_0x5256a3(0x15c)]);}