@ranger-testing/ranger-cli 2.4.6 → 2.5.0

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 (78) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/env.js +1 -1
  7. package/build/commands/feature.js +1 -1
  8. package/build/commands/hook.js +1 -1
  9. package/build/commands/hooks/autoPrompt.js +1 -1
  10. package/build/commands/hooks/disable.js +1 -1
  11. package/build/commands/hooks/enable.js +1 -1
  12. package/build/commands/hooks/exitPlanMode.js +1 -1
  13. package/build/commands/hooks/index.js +1 -1
  14. package/build/commands/hooks/output.js +1 -1
  15. package/build/commands/hooks/planReminder.js +1 -1
  16. package/build/commands/hooks/planStart.js +1 -1
  17. package/build/commands/hooks/postEdit.js +1 -1
  18. package/build/commands/hooks/preCompact.js +1 -1
  19. package/build/commands/hooks/sessionEnd.js +1 -1
  20. package/build/commands/hooks/sessionStart.js +1 -1
  21. package/build/commands/hooks/stopHook.js +1 -1
  22. package/build/commands/index.js +1 -1
  23. package/build/commands/login.js +1 -1
  24. package/build/commands/setup/claude.js +1 -1
  25. package/build/commands/setup/opencode.js +1 -1
  26. package/build/commands/setupCi.js +1 -1
  27. package/build/commands/skillup.js +1 -1
  28. package/build/commands/start.js +1 -1
  29. package/build/commands/status.js +1 -1
  30. package/build/commands/update.js +1 -1
  31. package/build/commands/updateEnv.js +1 -1
  32. package/build/commands/useEnv.js +1 -1
  33. package/build/commands/utils/activeProfile.js +1 -1
  34. package/build/commands/utils/agentEnv.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/claudeOverrideSettings.js +1 -1
  38. package/build/commands/utils/claudePlugin.js +1 -1
  39. package/build/commands/utils/crypto.js +1 -1
  40. package/build/commands/utils/desirePathLog.js +1 -1
  41. package/build/commands/utils/deviceAuth.js +1 -1
  42. package/build/commands/utils/environment.js +1 -1
  43. package/build/commands/utils/featureApi.js +1 -1
  44. package/build/commands/utils/featureReportGenerator.js +1 -1
  45. package/build/commands/utils/fixWebmDuration.js +1 -1
  46. package/build/commands/utils/git.js +1 -1
  47. package/build/commands/utils/keychain.js +1 -1
  48. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  49. package/build/commands/utils/mcpImageBase64.js +1 -1
  50. package/build/commands/utils/model.js +1 -1
  51. package/build/commands/utils/opencodeConfig.js +1 -1
  52. package/build/commands/utils/playwrightCli.js +1 -1
  53. package/build/commands/utils/profileMessages.js +1 -1
  54. package/build/commands/utils/profileSetupBanner.js +1 -1
  55. package/build/commands/utils/rangerConfig.js +1 -1
  56. package/build/commands/utils/rangerRoot.js +1 -1
  57. package/build/commands/utils/reportGenerator.js +1 -1
  58. package/build/commands/utils/retry.js +1 -1
  59. package/build/commands/utils/sessionCache.js +1 -1
  60. package/build/commands/utils/settings.js +1 -1
  61. package/build/commands/utils/skillContent.js +1 -1
  62. package/build/commands/utils/skills.js +1 -1
  63. package/build/commands/utils/stitchWebmFiles.js +1 -1
  64. package/build/commands/utils/telemetry.js +1 -1
  65. package/build/commands/utils/tokenRefresh.js +1 -1
  66. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  67. package/build/commands/utils/userApi.js +1 -1
  68. package/build/commands/utils/version.js +1 -1
  69. package/build/commands/verifyFeature.js +1 -1
  70. package/build/commands/verifyFeatureCli.js +1 -1
  71. package/build/commands/verifyInBrowser.js +1 -1
  72. package/build/skills/ranger/SKILL.md +38 -41
  73. package/build/skills/ranger/create.md +5 -13
  74. package/build/skills/ranger/feedback.md +3 -3
  75. package/build/skills/ranger/start.md +13 -13
  76. package/build/skills/ranger/verify.md +15 -28
  77. package/package.json +5 -3
  78. package/scripts/postinstall.js +4 -1
@@ -1 +1 @@
1
- (function(_0x284241,_0x4d8c2a){const _0x2c29f5=_0x168f,_0x273427=_0x284241();while(!![]){try{const _0x15f891=-parseInt(_0x2c29f5(0x1c3))/0x1+parseInt(_0x2c29f5(0x1c8))/0x2*(parseInt(_0x2c29f5(0x1bd))/0x3)+parseInt(_0x2c29f5(0x1c7))/0x4+-parseInt(_0x2c29f5(0x1c6))/0x5+-parseInt(_0x2c29f5(0x1ae))/0x6*(parseInt(_0x2c29f5(0x1ba))/0x7)+parseInt(_0x2c29f5(0x1b5))/0x8+parseInt(_0x2c29f5(0x1b3))/0x9*(parseInt(_0x2c29f5(0x1b0))/0xa);if(_0x15f891===_0x4d8c2a)break;else _0x273427['push'](_0x273427['shift']());}catch(_0x40ef8f){_0x273427['push'](_0x273427['shift']());}}}(_0x5129,0xc034f));function _0x5129(){const _0x27d0f7=['2tebLxw','stringify','5494668FmpTsi','log','1390pIDGsJ','oPcTe','success','128943mHnIIU','SessionStart','5825624NsPWxd','HtfDJ','vXkax','KwpkK','main','7TdCMEE','ZjfYk','xwCsl','3720189upCZDe','ZXvfA','source','trackCommandStart','hook:session-start','\x20(Branch:\x20','1307566RMNEXO','export\x20CLAUDE_SESSION_ID=\x22','master','5027675pgUsVL','225756QFQtob'];_0x5129=function(){return _0x27d0f7;};return _0x5129();}import{appendFile}from'fs/promises';import{initBranchTracking,shouldAutoEnableAfterClear,autoEnableAfterClear,isSessionEnabled,getCurrentBranch}from'../utils/sessionCache.js';import{createTelemetryCollector}from'../utils/telemetry.js';function _0x168f(_0x42e3ce,_0x143346){_0x42e3ce=_0x42e3ce-0x1ad;const _0x5129b1=_0x5129();let _0x168f1b=_0x5129b1[_0x42e3ce];return _0x168f1b;}import{getToken}from'../utils/keychain.js';const RANGER_AUTO_ENABLED_PROMPT='=================================================================\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20🚨\x20RANGER\x20IS\x20ACTIVE\x20🚨\x0a=================================================================\x0a\x0aThis\x20session\x20has\x20Ranger\x20ENABLED.\x20Before\x20doing\x20ANYTHING\x20else:\x0a\x0a1.\x20**READ\x20the\x20/ranger\x20skill\x20FIRST**\x20-\x20Run\x20the\x20skill\x20to\x20understand\x20the\x20required\x20workflow\x20for\x20UI\x20features\x0a\x0a2.\x20**Check\x20for\x20existing\x20feature\x20reviews**\x20-\x20Run\x20`ranger\x20list`\x20to\x20see\x20if\x20there\x27s\x20an\x20in-progress\x20feature\x20review\x20to\x20resume\x0a\x0a3.\x20**For\x20ANY\x20UI\x20work**:\x20You\x20MUST\x20either:\x0a\x20\x20\x20-\x20Resume\x20an\x20existing\x20feature\x20review:\x20`ranger\x20resume\x20<id>`\x0a\x20\x20\x20-\x20Create\x20a\x20new\x20feature\x20review:\x20`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<scenario>\x22`\x0a\x0a4.\x20**If\x20resuming\x20a\x20feature\x20review\x20with\x20reviewer\x20comments**:\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20reviewers\x20want\x20fixed\x20before\x20making\x20code\x20changes\x0a\x0a=================================================================';export async function sessionStart(_0x578da2){const _0x30daa2=_0x168f,_0x97d205={'wWJWM':function(_0x1100ff,_0x28d691){return _0x1100ff||_0x28d691;},'vXkax':'session_id','xwCsl':_0x30daa2(0x1bf),'ZjfYk':function(_0x4bab1a,_0x2a90af){return _0x4bab1a&&_0x2a90af;},'mkFKe':function(_0x2b24c6,_0x48c6f8){return _0x2b24c6(_0x48c6f8);},'oPcTe':function(_0x28c365,_0x7bacd9){return _0x28c365(_0x7bacd9);},'KwpkK':_0x30daa2(0x1c1),'HtfDJ':_0x30daa2(0x1b2),'JnsuU':function(_0x94185e){return _0x94185e();},'ZXvfA':_0x30daa2(0x1b9),'NwEWq':function(_0x289c86,_0x3169d4){return _0x289c86!==_0x3169d4;}};let _0xf13d3a=_0x97d205['wWJWM'](_0x578da2,''),_0x25d20c;if(!_0x578da2){let _0x26ed01='';for await(const _0x2fbb92 of process['stdin']){_0x26ed01+=_0x2fbb92;}try{const _0x38645d=JSON['parse'](_0x26ed01);_0xf13d3a=_0x38645d[_0x97d205[_0x30daa2(0x1b7)]]||'',_0x25d20c=_0x38645d[_0x97d205[_0x30daa2(0x1bc)]];}catch{}const _0x769f11=process['env']['CLAUDE_ENV_FILE'];if(_0x97d205[_0x30daa2(0x1bb)](_0x769f11,_0xf13d3a))try{await appendFile(_0x769f11,_0x30daa2(0x1c4)+_0xf13d3a+'\x22\x0a');}catch{}}try{await getToken();}catch{}if(_0xf13d3a){_0x97d205['mkFKe'](shouldAutoEnableAfterClear,_0x25d20c)&&autoEnableAfterClear(_0xf13d3a);_0x97d205['mkFKe'](initBranchTracking,_0xf13d3a);const _0x3b6169=isSessionEnabled(_0xf13d3a);try{const _0x3a6d63=_0x97d205[_0x30daa2(0x1b1)](createTelemetryCollector,_0x97d205[_0x30daa2(0x1b8)]);await _0x3a6d63[_0x30daa2(0x1c0)]({'sessionId':_0xf13d3a,'hooksEnabled':_0x3b6169}),await _0x3a6d63['trackCommandEnd'](_0x97d205[_0x30daa2(0x1b6)]);}catch{}if(_0x3b6169){const _0x523081=_0x97d205['JnsuU'](getCurrentBranch),_0x2d5ea5=_0x523081&&_0x523081!==_0x97d205[_0x30daa2(0x1be)]&&_0x97d205['NwEWq'](_0x523081,_0x30daa2(0x1c5))?_0x30daa2(0x1c2)+_0x523081+')':'',_0x310360={'hookSpecificOutput':{'hookEventName':_0x30daa2(0x1b4),'additionalContext':RANGER_AUTO_ENABLED_PROMPT+_0x2d5ea5}};console[_0x30daa2(0x1af)](JSON[_0x30daa2(0x1ad)](_0x310360));}}}
1
+ const _0x2d86c5=_0x2d43;function _0x430d(){const _0x1ef991=['2723vMGRaC','aeAnG','7437822XiuAVZ','706857GuXuVa','16872cwbXAJ','HNEEI','success','AgeGE','parse','11307366edpyOd','GWUte','main','75823VReqth','TMxBV','session_id','2653180yLJUTo','LWmZH','TCWwK','1stIufU','stringify','=================================================================\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20🚨\x20RANGER\x20IS\x20ACTIVE\x20🚨\x0a=================================================================\x0a\x0aThis\x20session\x20has\x20Ranger\x20ENABLED.\x20Before\x20doing\x20ANYTHING\x20else:\x0a\x0a1.\x20**READ\x20the\x20/ranger\x20skill\x20FIRST**\x20-\x20Run\x20the\x20skill\x20to\x20understand\x20the\x20required\x20workflow\x20for\x20UI\x20features\x0a\x0a2.\x20**Check\x20for\x20existing\x20feature\x20reviews**\x20-\x20Run\x20`ranger\x20list`\x20to\x20see\x20if\x20there\x27s\x20an\x20in-progress\x20feature\x20review\x20to\x20resume\x0a\x0a3.\x20**For\x20ANY\x20UI\x20work**:\x20You\x20MUST\x20either:\x0a\x20\x20\x20-\x20Resume\x20an\x20existing\x20feature\x20review:\x20`ranger\x20resume\x20<id>`\x0a\x20\x20\x20-\x20Create\x20a\x20new\x20feature\x20review:\x20`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<scenario>\x22`\x0a\x0a4.\x20**If\x20resuming\x20a\x20feature\x20review\x20with\x20reviewer\x20comments**:\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20reviewers\x20want\x20fixed\x20before\x20making\x20code\x20changes\x0a\x0a=================================================================','vGoxi','38965LpbjoX','trackCommandEnd','1490gIcGHO','264QYAUjt'];_0x430d=function(){return _0x1ef991;};return _0x430d();}function _0x2d43(_0x33e0e2,_0xaf0909){_0x33e0e2=_0x33e0e2-0xae;const _0x430da2=_0x430d();let _0x2d43e4=_0x430da2[_0x33e0e2];return _0x2d43e4;}(function(_0x231b40,_0xd7c4a7){const _0x133d2f=_0x2d43,_0x178afc=_0x231b40();while(!![]){try{const _0x42e6c9=-parseInt(_0x133d2f(0xba))/0x1*(parseInt(_0x133d2f(0xb7))/0x2)+parseInt(_0x133d2f(0xc5))/0x3+-parseInt(_0x133d2f(0xc1))/0x4*(parseInt(_0x133d2f(0xbe))/0x5)+parseInt(_0x133d2f(0xc4))/0x6+parseInt(_0x133d2f(0xc2))/0x7*(parseInt(_0x133d2f(0xc6))/0x8)+parseInt(_0x133d2f(0xb1))/0x9+parseInt(_0x133d2f(0xc0))/0xa*(-parseInt(_0x133d2f(0xb4))/0xb);if(_0x42e6c9===_0xd7c4a7)break;else _0x178afc['push'](_0x178afc['shift']());}catch(_0x18f44d){_0x178afc['push'](_0x178afc['shift']());}}}(_0x430d,0xa700e));import{appendFile}from'fs/promises';import{initBranchTracking,shouldAutoEnableAfterClear,autoEnableAfterClear,isSessionEnabled,getCurrentBranch}from'../utils/sessionCache.js';import{createTelemetryCollector}from'../utils/telemetry.js';import{getToken}from'../utils/keychain.js';const RANGER_AUTO_ENABLED_PROMPT=_0x2d86c5(0xbc);export async function sessionStart(_0x4b613e){const _0x19ba05=_0x2d86c5,_0x1083ec={'TMxBV':function(_0x1d2d96,_0x872aa0){return _0x1d2d96||_0x872aa0;},'vGoxi':'source','LWmZH':function(_0x5b5986,_0x366e01){return _0x5b5986(_0x366e01);},'sKjJa':function(_0xa60908,_0x607be7){return _0xa60908(_0x607be7);},'AgeGE':_0x19ba05(0xae),'GWUte':function(_0x286e2c){return _0x286e2c();},'aeAnG':function(_0x35b854,_0xfcc68b){return _0x35b854!==_0xfcc68b;},'rwaUc':function(_0x56ac88,_0x550a12){return _0x56ac88!==_0x550a12;},'HNEEI':'SessionStart','TCWwK':function(_0x53777d,_0xe560df){return _0x53777d+_0xe560df;}};let _0x2732d3=_0x1083ec[_0x19ba05(0xb5)](_0x4b613e,''),_0x34e3e7;if(!_0x4b613e){let _0x5b7ab2='';for await(const _0x55d3b0 of process['stdin']){_0x5b7ab2+=_0x55d3b0;}try{const _0x585cef=JSON[_0x19ba05(0xb0)](_0x5b7ab2);_0x2732d3=_0x585cef[_0x19ba05(0xb6)]||'',_0x34e3e7=_0x585cef[_0x1083ec[_0x19ba05(0xbd)]];}catch{}const _0x3ad021=process['env']['CLAUDE_ENV_FILE'];if(_0x3ad021&&_0x2732d3)try{await appendFile(_0x3ad021,'export\x20CLAUDE_SESSION_ID=\x22'+_0x2732d3+'\x22\x0a');}catch{}}try{await getToken();}catch{}if(_0x2732d3){shouldAutoEnableAfterClear(_0x34e3e7)&&_0x1083ec[_0x19ba05(0xb8)](autoEnableAfterClear,_0x2732d3);_0x1083ec['sKjJa'](initBranchTracking,_0x2732d3);const _0x38f917=isSessionEnabled(_0x2732d3);try{const _0x63af2a=createTelemetryCollector('hook:session-start');await _0x63af2a['trackCommandStart']({'sessionId':_0x2732d3,'hooksEnabled':_0x38f917}),await _0x63af2a[_0x19ba05(0xbf)](_0x1083ec[_0x19ba05(0xaf)]);}catch{}if(_0x38f917){const _0x12a2fe=_0x1083ec[_0x19ba05(0xb2)](getCurrentBranch),_0x3a039f=_0x12a2fe&&_0x1083ec[_0x19ba05(0xc3)](_0x12a2fe,_0x19ba05(0xb3))&&_0x1083ec['rwaUc'](_0x12a2fe,'master')?'\x20(Branch:\x20'+_0x12a2fe+')':'',_0x574aee={'hookSpecificOutput':{'hookEventName':_0x1083ec[_0x19ba05(0xc7)],'additionalContext':_0x1083ec[_0x19ba05(0xb9)](RANGER_AUTO_ENABLED_PROMPT,_0x3a039f)}};console['log'](JSON[_0x19ba05(0xbb)](_0x574aee));}}}
@@ -1 +1 @@
1
- (function(_0x136cf2,_0x1b9e51){const _0x3e1a5e=_0x2529,_0x256120=_0x136cf2();while(!![]){try{const _0x33bfc2=-parseInt(_0x3e1a5e(0x187))/0x1*(parseInt(_0x3e1a5e(0x181))/0x2)+-parseInt(_0x3e1a5e(0x177))/0x3*(parseInt(_0x3e1a5e(0x171))/0x4)+parseInt(_0x3e1a5e(0x182))/0x5*(-parseInt(_0x3e1a5e(0x16b))/0x6)+parseInt(_0x3e1a5e(0x188))/0x7*(-parseInt(_0x3e1a5e(0x17f))/0x8)+parseInt(_0x3e1a5e(0x17a))/0x9+parseInt(_0x3e1a5e(0x17d))/0xa*(parseInt(_0x3e1a5e(0x172))/0xb)+-parseInt(_0x3e1a5e(0x16f))/0xc*(-parseInt(_0x3e1a5e(0x16d))/0xd);if(_0x33bfc2===_0x1b9e51)break;else _0x256120['push'](_0x256120['shift']());}catch(_0x4ca93e){_0x256120['push'](_0x256120['shift']());}}}(_0x214e,0x902b9));import{getToken}from'../utils/keychain.js';function _0x214e(){const _0x7be608=['ixbjR','80nIfCOg','featureId','8UxZxeP','RANGER:\x20The\x20active\x20feature\x20review\x20still\x20has\x20unfinished\x20checklist\x20items.\x20Before\x20responding\x20to\x20the\x20user,\x20if\x20this\x20UI\x20work\x20is\x20ready,\x20run\x20`ranger\x20show`\x20and\x20then\x20`ranger\x20go`\x20for\x20the\x20relevant\x20scenario(s).\x20If\x20it\x20is\x20not\x20ready\x20for\x20browser\x20verification\x20yet,\x20continue\x20implementing.\x20Dashboard:\x20','2VpormA','108890QnNXrZ','IkMri','checklistItems','some','log','856346tetBeF','402829hddOhX','cdAkz','78yxUilb','verification_in_progress','1488526ZoijuF','blocked','192vEfVtF','sessionId','3836072IMEVPk','28468oDRpYB','status','trackCommandEnd','verified','success','3fOJHYR','FJcZe','incomplete','8044290kBVZBo','closed'];_0x214e=function(){return _0x7be608;};return _0x214e();}import{getFeature,concludeSession}from'../utils/featureApi.js';import{getSessionEntry,shouldShowStopReminder}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0x28c6bf){const _0x8624b5=_0x2529,_0x3bf615={'IkMri':function(_0x3a16c5,_0x2b10c4,_0x43328a,_0x3d979d){return _0x3a16c5(_0x2b10c4,_0x43328a,_0x3d979d);},'uMnkD':function(_0x4aff3d,_0x4678d5){return _0x4aff3d(_0x4678d5);},'PoPFT':function(_0x42e31b){return _0x42e31b();},'FJcZe':function(_0x55903a,_0x566060){return _0x55903a&&_0x566060;},'GssoY':function(_0x51daff,_0x8de748){return _0x51daff(_0x8de748);},'fRxwM':'Stop','FSbVA':function(_0x1f0447,_0x1505e9,_0x115ff8){return _0x1f0447(_0x1505e9,_0x115ff8);}},_0x50efd6=await getEnabledHookContext(_0x28c6bf),_0xf86576=_0x50efd6?.[_0x8624b5(0x170)]??null;let _0x55cc0a=!![];if(!_0xf86576){await _0x3bf615[_0x8624b5(0x183)](trackStop,_0xf86576,![],_0x55cc0a);return;}try{const _0x5cbe2c=_0x3bf615['uMnkD'](getSessionEntry,_0xf86576);if(!_0x5cbe2c){await trackStop(_0xf86576,!![],_0x55cc0a);return;}const _0x4f1895=await _0x3bf615['PoPFT'](getToken),_0x2a3ecb='https://dashboard.ranger.net/features/'+_0x5cbe2c[_0x8624b5(0x17e)];let _0x592dd6=null,_0x58a145=![],_0x374cda=![];if(_0x4f1895)try{const _0x1a17e6=await getFeature(_0x5cbe2c[_0x8624b5(0x17e)]);_0x592dd6=_0x1a17e6['currentSessionId']??null;const _0x44cab8=_0x1a17e6[_0x8624b5(0x184)]['filter'](_0x11a83d=>_0x11a83d[_0x8624b5(0x170)]===_0x592dd6);_0x58a145=_0x44cab8[_0x8624b5(0x185)](_0x185d25=>_0x185d25[_0x8624b5(0x173)]!==_0x8624b5(0x175)&&_0x185d25[_0x8624b5(0x173)]!==_0x8624b5(0x16e)&&_0x185d25['status']!==_0x8624b5(0x17b)&&_0x185d25['status']!==_0x8624b5(0x179)),_0x374cda=_0x44cab8[_0x8624b5(0x185)](_0x536316=>_0x536316[_0x8624b5(0x173)]===_0x8624b5(0x16c));}catch{}if(_0x3bf615[_0x8624b5(0x178)](_0x4f1895,_0x592dd6)&&_0x58a145){if(!_0x374cda&&_0x3bf615['GssoY'](shouldShowStopReminder,_0xf86576)){const _0x45bd0a={'hookSpecificOutput':{'hookEventName':_0x3bf615['fRxwM'],'additionalContext':_0x8624b5(0x180)+_0x2a3ecb}};console[_0x8624b5(0x186)](JSON['stringify'](_0x45bd0a));}}if(_0x4f1895&&_0x592dd6&&!_0x58a145)try{await _0x3bf615['FSbVA'](concludeSession,_0x5cbe2c[_0x8624b5(0x17e)],_0x592dd6);}catch{}await trackStop(_0xf86576,!![],_0x55cc0a);return;}catch{await trackStop(_0xf86576,!![],_0x55cc0a);return;}}function _0x2529(_0x295e09,_0x1096de){_0x295e09=_0x295e09-0x16b;const _0x214e51=_0x214e();let _0x2529a1=_0x214e51[_0x295e09];return _0x2529a1;}async function trackStop(_0x283d3f,_0x3b0ff2,_0x463add){const _0x2167d8=_0x2529,_0x6b30ad={'cdAkz':function(_0x4711ff,_0x149601){return _0x4711ff(_0x149601);},'roOxl':function(_0x854616,_0x2c6a77){return _0x854616??_0x2c6a77;},'ixbjR':_0x2167d8(0x176)};try{const _0x2e0b60=_0x6b30ad[_0x2167d8(0x189)](createTelemetryCollector,'hook:stop');await _0x2e0b60['trackCommandStart']({'sessionId':_0x6b30ad['roOxl'](_0x283d3f,undefined),'hooksEnabled':_0x3b0ff2,'stopAllowed':_0x463add}),await _0x2e0b60[_0x2167d8(0x174)](_0x6b30ad[_0x2167d8(0x17c)]);}catch{}}
1
+ function _0x5ac7(){const _0x2f8b29=['hook:stop','8HWezuw','882259ShmEnF','1URhKKE','verification_in_progress','2310NUjJfg','4165056jKmHsk','checklistItems','verified','6905rTQpgF','137008jdwxlN','Stop','433279QHzKwv','featureId','closed','OZIsi','6093uDkADT','some','5776GbLVVa','success','status','228IuCVaH','510ztkLqX'];_0x5ac7=function(){return _0x2f8b29;};return _0x5ac7();}(function(_0x157bf0,_0x5b1e93){const _0x5eb224=_0x5f52,_0x14dfba=_0x157bf0();while(!![]){try{const _0x3b7f7d=-parseInt(_0x5eb224(0xb7))/0x1*(-parseInt(_0x5eb224(0xa7))/0x2)+-parseInt(_0x5eb224(0xb2))/0x3*(parseInt(_0x5eb224(0xaf))/0x4)+-parseInt(_0x5eb224(0xa6))/0x5*(-parseInt(_0x5eb224(0xb3))/0x6)+parseInt(_0x5eb224(0xb6))/0x7*(-parseInt(_0x5eb224(0xb5))/0x8)+-parseInt(_0x5eb224(0xad))/0x9*(parseInt(_0x5eb224(0xb9))/0xa)+-parseInt(_0x5eb224(0xa9))/0xb+parseInt(_0x5eb224(0xa3))/0xc;if(_0x3b7f7d===_0x5b1e93)break;else _0x14dfba['push'](_0x14dfba['shift']());}catch(_0x579469){_0x14dfba['push'](_0x14dfba['shift']());}}}(_0x5ac7,0x18c2c));function _0x5f52(_0x4f7d07,_0x571354){_0x4f7d07=_0x4f7d07-0xa3;const _0x5ac7e2=_0x5ac7();let _0x5f5273=_0x5ac7e2[_0x4f7d07];return _0x5f5273;}import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';import{getSessionEntry,shouldShowStopReminder}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0x494ed8){const _0x2ec2f6=_0x5f52,_0x2ca191={'OZIsi':function(_0x4dd2c6,_0x349f46,_0x4b693a,_0x374764){return _0x4dd2c6(_0x349f46,_0x4b693a,_0x374764);},'xtLtQ':function(_0x3e6252,_0x1259ad){return _0x3e6252&&_0x1259ad;},'AATij':_0x2ec2f6(0xa8)},_0x21ca40=await getEnabledHookContext(_0x494ed8),_0x13cba1=_0x21ca40?.['sessionId']??null;let _0x3e6092=!![];if(!_0x13cba1){await trackStop(_0x13cba1,![],_0x3e6092);return;}try{const _0x3e137b=getSessionEntry(_0x13cba1);if(!_0x3e137b){await _0x2ca191[_0x2ec2f6(0xac)](trackStop,_0x13cba1,!![],_0x3e6092);return;}const _0x5c98c2=await getToken(),_0x1445c1='https://dashboard.ranger.net/features/'+_0x3e137b['featureId'];let _0x1ae6fe=null,_0x553cad=![],_0x2abde2=![];if(_0x5c98c2)try{const _0x3f4e39=await getFeature(_0x3e137b['featureId']);_0x1ae6fe=_0x3f4e39['currentSessionId']??null;const _0x367616=_0x3f4e39[_0x2ec2f6(0xa4)]['filter'](_0x5ed228=>_0x5ed228['sessionId']===_0x1ae6fe);_0x553cad=_0x367616['some'](_0x10b7b2=>_0x10b7b2[_0x2ec2f6(0xb1)]!==_0x2ec2f6(0xa5)&&_0x10b7b2['status']!=='blocked'&&_0x10b7b2['status']!==_0x2ec2f6(0xab)&&_0x10b7b2['status']!=='incomplete'),_0x2abde2=_0x367616[_0x2ec2f6(0xae)](_0x49b38b=>_0x49b38b[_0x2ec2f6(0xb1)]===_0x2ec2f6(0xb8));}catch{}if(_0x2ca191['xtLtQ'](_0x5c98c2,_0x1ae6fe)&&_0x553cad){if(!_0x2abde2&&shouldShowStopReminder(_0x13cba1)){const _0x18067d={'hookSpecificOutput':{'hookEventName':_0x2ca191['AATij'],'additionalContext':'RANGER:\x20The\x20active\x20feature\x20review\x20still\x20has\x20unfinished\x20checklist\x20items.\x20Before\x20responding\x20to\x20the\x20user,\x20if\x20this\x20UI\x20work\x20is\x20ready,\x20run\x20`ranger\x20show`\x20and\x20then\x20`ranger\x20go`\x20for\x20the\x20relevant\x20scenario(s).\x20If\x20it\x20is\x20not\x20ready\x20for\x20browser\x20verification\x20yet,\x20continue\x20implementing.\x20Dashboard:\x20'+_0x1445c1}};console['log'](JSON['stringify'](_0x18067d));}}if(_0x5c98c2&&_0x1ae6fe&&!_0x553cad)try{await concludeSession(_0x3e137b[_0x2ec2f6(0xaa)],_0x1ae6fe);}catch{}await trackStop(_0x13cba1,!![],_0x3e6092);return;}catch{await trackStop(_0x13cba1,!![],_0x3e6092);return;}}async function trackStop(_0x4f55d7,_0x523995,_0x11819c){const _0x4f020d=_0x5f52,_0x3ca43e={'nALdH':function(_0x48a45e,_0x25ec2e){return _0x48a45e(_0x25ec2e);},'tsJZP':_0x4f020d(0xb4)};try{const _0x142054=_0x3ca43e['nALdH'](createTelemetryCollector,_0x3ca43e['tsJZP']);await _0x142054['trackCommandStart']({'sessionId':_0x4f55d7??undefined,'hooksEnabled':_0x523995,'stopAllowed':_0x11819c}),await _0x142054['trackCommandEnd'](_0x4f020d(0xb0));}catch{}}
@@ -1 +1 @@
1
- (function(_0x7b88c2,_0x1662a8){var _0x27e654=_0x53f5,_0x5e9c0=_0x7b88c2();while(!![]){try{var _0x2f95cf=-parseInt(_0x27e654(0x1a2))/0x1*(-parseInt(_0x27e654(0x19c))/0x2)+-parseInt(_0x27e654(0x1a1))/0x3+-parseInt(_0x27e654(0x19f))/0x4+parseInt(_0x27e654(0x19a))/0x5*(-parseInt(_0x27e654(0x19e))/0x6)+-parseInt(_0x27e654(0x19b))/0x7+-parseInt(_0x27e654(0x1a0))/0x8+parseInt(_0x27e654(0x199))/0x9*(parseInt(_0x27e654(0x19d))/0xa);if(_0x2f95cf===_0x1662a8)break;else _0x5e9c0['push'](_0x5e9c0['shift']());}catch(_0x1b60b){_0x5e9c0['push'](_0x5e9c0['shift']());}}}(_0x5630,0x9f5b2));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';export{start}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';export{skillup}from'./skillup.js';function _0x53f5(_0x448e27,_0x6e53e5){_0x448e27=_0x448e27-0x199;var _0x5630e2=_0x5630();var _0x53f54d=_0x5630e2[_0x448e27];return _0x53f54d;}function _0x5630(){var _0x47cb78=['37321SviFnQ','603jUszSK','255iPkiON','577017BuyhMx','62vSPEVp','342530WnPUrG','52086dBUHqw','2239252DcrJzv','4560696enhtbV','3432354pFtSQL'];_0x5630=function(){return _0x47cb78;};return _0x5630();}export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
1
+ (function(_0x2f8e96,_0x2bb5ad){var _0x57b3d2=_0x111c,_0x5b22e9=_0x2f8e96();while(!![]){try{var _0x517124=-parseInt(_0x57b3d2(0x9f))/0x1*(parseInt(_0x57b3d2(0x9d))/0x2)+parseInt(_0x57b3d2(0x9c))/0x3+-parseInt(_0x57b3d2(0xa5))/0x4+parseInt(_0x57b3d2(0x9e))/0x5*(parseInt(_0x57b3d2(0x9b))/0x6)+parseInt(_0x57b3d2(0xa2))/0x7+-parseInt(_0x57b3d2(0xa4))/0x8*(parseInt(_0x57b3d2(0xa3))/0x9)+-parseInt(_0x57b3d2(0xa0))/0xa*(-parseInt(_0x57b3d2(0xa1))/0xb);if(_0x517124===_0x2bb5ad)break;else _0x5b22e9['push'](_0x5b22e9['shift']());}catch(_0x10c6b3){_0x5b22e9['push'](_0x5b22e9['shift']());}}}(_0x2f7f,0x78777));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';function _0x111c(_0x240afb,_0x224cca){_0x240afb=_0x240afb-0x9b;var _0x2f7f15=_0x2f7f();var _0x111c5f=_0x2f7f15[_0x240afb];return _0x111c5f;}export{start}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';export{skillup}from'./skillup.js';function _0x2f7f(){var _0x4057cb=['6sHeHEU','2520228dnxYlS','259262OeYVQB','3798180gnbXrK','7vZZtqO','200KIiXaz','195701OhoDwU','1282491VWQtYh','27ttFotd','451912qqtQTo','2273720dvUSRG'];_0x2f7f=function(){return _0x4057cb;};return _0x2f7f();}export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
@@ -1 +1 @@
1
- function _0x3859(_0x37b890,_0x10d82f){_0x37b890=_0x37b890-0x1b9;const _0x464dd0=_0x464d();let _0x385926=_0x464dd0[_0x37b890];return _0x385926;}(function(_0x1641e1,_0x23ed11){const _0x4c56ca=_0x3859,_0x582a1f=_0x1641e1();while(!![]){try{const _0x5e2ca4=-parseInt(_0x4c56ca(0x1b9))/0x1*(parseInt(_0x4c56ca(0x1c6))/0x2)+parseInt(_0x4c56ca(0x1c8))/0x3+parseInt(_0x4c56ca(0x1bb))/0x4+-parseInt(_0x4c56ca(0x1bf))/0x5*(parseInt(_0x4c56ca(0x1c1))/0x6)+parseInt(_0x4c56ca(0x1c4))/0x7*(-parseInt(_0x4c56ca(0x1bc))/0x8)+parseInt(_0x4c56ca(0x1ba))/0x9*(-parseInt(_0x4c56ca(0x1bd))/0xa)+parseInt(_0x4c56ca(0x1c0))/0xb;if(_0x5e2ca4===_0x23ed11)break;else _0x582a1f['push'](_0x582a1f['shift']());}catch(_0x301485){_0x582a1f['push'](_0x582a1f['shift']());}}}(_0x464d,0x902af));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x464d(){const _0x16ce13=['organizationName','2897AqiLsV','116199YjBtkb','794252QhEUQH','1117976vinMZF','80ySVevu','\x0a✅\x20API\x20key\x20stored\x20successfully','5ZbERFQ','6405575wyergW','1356738ilpuiY','stdin','bmHLz','35tUBsxA','message','14IBcmLh','success','2574144nzuUpQ','stdout'];_0x464d=function(){return _0x16ce13;};return _0x464d();}export async function login(){const _0x24a17f=_0x3859,_0x5551ff={'WKgTx':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','KczOj':function(_0x24bf89){return _0x24bf89();},'bmHLz':function(_0x5b5a4e,_0x49ab86){return _0x5b5a4e instanceof _0x49ab86;}},_0x49bbe0=process[_0x24a17f(0x1c2)]['isTTY']&&process[_0x24a17f(0x1c9)]['isTTY'];if(!_0x49bbe0)throw new Error(_0x5551ff['WKgTx']);try{const _0x5f286d=await _0x5551ff['KczOj'](runDeviceAuthFlow),_0x3e9050=await getCurrentUser(_0x5f286d);_0x3e9050[_0x24a17f(0x1c7)]?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x3e9050['user'][_0x24a17f(0x1ca)]):console['log'](_0x24a17f(0x1be));}catch(_0x370b9a){throw new Error('Login\x20failed:\x20'+(_0x5551ff[_0x24a17f(0x1c3)](_0x370b9a,Error)?_0x370b9a[_0x24a17f(0x1c5)]:_0x370b9a));}}
1
+ function _0x5f12(_0x4cc75c,_0x5c127b){_0x4cc75c=_0x4cc75c-0xe7;const _0x1c5ee4=_0x1c5e();let _0x5f12b1=_0x1c5ee4[_0x4cc75c];return _0x5f12b1;}(function(_0xeed18e,_0xacc34e){const _0x115301=_0x5f12,_0x4aa755=_0xeed18e();while(!![]){try{const _0x2063f3=parseInt(_0x115301(0xf3))/0x1+parseInt(_0x115301(0xe9))/0x2+-parseInt(_0x115301(0xf5))/0x3+-parseInt(_0x115301(0xf7))/0x4*(parseInt(_0x115301(0xf1))/0x5)+parseInt(_0x115301(0xea))/0x6+parseInt(_0x115301(0xf8))/0x7+-parseInt(_0x115301(0xec))/0x8*(parseInt(_0x115301(0xf6))/0x9);if(_0x2063f3===_0xacc34e)break;else _0x4aa755['push'](_0x4aa755['shift']());}catch(_0x241ef6){_0x4aa755['push'](_0x4aa755['shift']());}}}(_0x1c5e,0x2610a));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x1c5e(){const _0x2a3b3f=['stdin','245282kwtpVb','success','580674JaBdis','14778NaNgdk','561812SyxYJh','700154GVODDV','organizationName','message','user','BoAeP','370488aOdTiE','731610mvCaxY','\x0a✅\x20API\x20key\x20stored\x20successfully','792VqProE','isTTY','CRxOo','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','stdout','5EQIqZs'];_0x1c5e=function(){return _0x2a3b3f;};return _0x1c5e();}export async function login(){const _0x4e55a8=_0x5f12,_0xd37be8={'BoAeP':_0x4e55a8(0xef),'CRxOo':_0x4e55a8(0xeb),'ijNjr':function(_0x40f835,_0x9cac8f){return _0x40f835 instanceof _0x9cac8f;}},_0x47fba2=process[_0x4e55a8(0xf2)]['isTTY']&&process[_0x4e55a8(0xf0)][_0x4e55a8(0xed)];if(!_0x47fba2)throw new Error(_0xd37be8[_0x4e55a8(0xe8)]);try{const _0x21a891=await runDeviceAuthFlow(),_0x2bedbc=await getCurrentUser(_0x21a891);_0x2bedbc[_0x4e55a8(0xf4)]?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x2bedbc[_0x4e55a8(0xe7)][_0x4e55a8(0xf9)]):console['log'](_0xd37be8[_0x4e55a8(0xee)]);}catch(_0x1497e0){throw new Error('Login\x20failed:\x20'+(_0xd37be8['ijNjr'](_0x1497e0,Error)?_0x1497e0[_0x4e55a8(0xfa)]:_0x1497e0));}}
@@ -1 +1 @@
1
- (function(_0x53c41c,_0x3cac7b){const _0x20281f=_0x4c2f,_0x277a9a=_0x53c41c();while(!![]){try{const _0x3c47bf=-parseInt(_0x20281f(0x19b))/0x1+parseInt(_0x20281f(0x178))/0x2+-parseInt(_0x20281f(0x170))/0x3*(-parseInt(_0x20281f(0x17b))/0x4)+parseInt(_0x20281f(0x18d))/0x5+-parseInt(_0x20281f(0x173))/0x6*(parseInt(_0x20281f(0x17e))/0x7)+-parseInt(_0x20281f(0x1a3))/0x8*(parseInt(_0x20281f(0x176))/0x9)+parseInt(_0x20281f(0x186))/0xa;if(_0x3c47bf===_0x3cac7b)break;else _0x277a9a['push'](_0x277a9a['shift']());}catch(_0x13a4df){_0x277a9a['push'](_0x277a9a['shift']());}}}(_0x2436,0x2d93b));import{join}from'path';import{existsSync}from'fs';import _0x59d928 from'inquirer';function _0x2436(){const _0x4e1908=['yCOqy','.claude','push','mVwnz','yXTIR','marketplace','Project\x20(shared\x20with\x20team\x20via\x20git)','22656QUHKUQ','trailhead','UXYKc','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','prompt','PAApI','SKILL.md','project','197528FAoIMC','WTzvr','mGLMg','jXAvj','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','yysbc','✓\x20Marketplace\x20already\x20added','2181oTvJgo','--scope','plugin','552MwEClP','add','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','117bjbbii','Oatmk','691194pABArx','❌\x20Failed\x20to\x20add\x20marketplace:','lUIMO','1516CBMdwX','log','HIUXy','19369ptuxuJ','UwHec','DQdsZ','Where\x20should\x20the\x20plugin\x20be\x20installed?','confirm','SDQEn','Tdtiv','wantsSkillup','1138210svRAyB','list','ZbWkE','Baugr','ranger','already\x20enabled','JgZcC','249675cGkUdL','ranger-testing/trailhead','BNiXE','Argvb','Kwynv','pluginScope','user'];_0x2436=function(){return _0x4e1908;};return _0x2436();}function _0x4c2f(_0x40fc1e,_0x1821fe){_0x40fc1e=_0x40fc1e-0x16f;const _0x2436bb=_0x2436();let _0x4c2f22=_0x2436bb[_0x40fc1e];return _0x4c2f22;}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x3033b1){const _0x4c4da0=_0x4c2f,_0x55936c={'jXAvj':function(_0xe634b0,_0x1c6c09){return _0xe634b0(_0x1c6c09);},'ZtfsQ':function(_0x202299){return _0x202299();},'deiAZ':_0x4c4da0(0x193),'SLQhJ':_0x4c4da0(0x172),'PAApI':_0x4c4da0(0x199),'Oatmk':_0x4c4da0(0x174),'yXTIR':_0x4c4da0(0x18e),'SIWKX':_0x4c4da0(0x179),'mVwnz':'\x0aYou\x20can\x20install\x20manually\x20with:','Tdtiv':_0x4c4da0(0x1a7),'mGLMg':'install','BNiXE':_0x4c4da0(0x171),'UXYKc':'❌\x20Failed\x20to\x20install\x20plugin:','TuWEC':'ranger@trailhead','fbfqE':function(_0x8274c1,_0x6bab7c){return _0x8274c1===_0x6bab7c;},'zceVT':function(_0x5a0401,_0x3d2c6b,_0x97dc44){return _0x5a0401(_0x3d2c6b,_0x97dc44);},'iXZYh':_0x4c4da0(0x18b),'Baugr':'⚠\x20Failed\x20to\x20enable\x20plugin:','hnNEk':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x5199a2=await _0x55936c['jXAvj'](isPluginInstalled,'ranger@trailhead');if(_0x5199a2)return console[_0x4c4da0(0x17c)](_0x4c4da0(0x1a8)),![];const _0x156ce3=_0x55936c['jXAvj'](existsSync,join(_0x55936c['ZtfsQ'](getProjectRoot),'.claude'));let _0x1a89c0;if(_0x3033b1)_0x1a89c0=_0x3033b1;else{if(_0x156ce3)_0x1a89c0='project';else{console[_0x4c4da0(0x17c)](_0x4c4da0(0x19e));const _0x237a95=await _0x59d928['prompt']([{'type':_0x4c4da0(0x187),'name':_0x4c4da0(0x192),'message':_0x4c4da0(0x181),'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x4c4da0(0x193)},{'name':_0x4c4da0(0x19a),'value':'project'}],'default':_0x55936c['deiAZ']}]);_0x1a89c0=_0x237a95['pluginScope'];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x1a89c0+'\x20level)...\x0a');const _0x4425b6=await _0x55936c[_0x4c4da0(0x1a6)](isMarketplaceAdded,_0x4c4da0(0x19c));let _0xbc3a78=_0x4425b6;if(_0x4425b6)console['log'](_0x4c4da0(0x16f));else{const _0xe076b1=await runClaudeCommand([_0x55936c['SLQhJ'],_0x55936c[_0x4c4da0(0x1a0)],_0x55936c[_0x4c4da0(0x177)],_0x55936c[_0x4c4da0(0x198)]]);!_0xe076b1['success']?(console['error'](_0x55936c['SIWKX'],_0xe076b1['error']),console[_0x4c4da0(0x17c)](_0x55936c[_0x4c4da0(0x197)]),console[_0x4c4da0(0x17c)](_0x55936c[_0x4c4da0(0x184)]),console[_0x4c4da0(0x17c)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x1a89c0)):_0xbc3a78=!![];}if(_0xbc3a78){const _0x10d08b=await _0x55936c['jXAvj'](runClaudeCommand,[_0x55936c['SLQhJ'],_0x55936c[_0x4c4da0(0x1a5)],'ranger@trailhead',_0x55936c['BNiXE'],_0x1a89c0]);if(!_0x10d08b['success'])console['error'](_0x55936c[_0x4c4da0(0x19d)],_0x10d08b['error']),console[_0x4c4da0(0x17c)](_0x55936c['mVwnz']),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x1a89c0);else{console[_0x4c4da0(0x17c)](_0x4c4da0(0x175));const _0x580d0e=[_0x4c4da0(0x172),'enable',_0x55936c['TuWEC']];_0x55936c['fbfqE'](_0x1a89c0,_0x4c4da0(0x1a2))&&_0x580d0e[_0x4c4da0(0x196)](_0x55936c[_0x4c4da0(0x18f)],'project');const _0xacfd=await _0x55936c['zceVT'](runClaudeCommand,_0x580d0e,{'captureOutput':!![]}),_0xb70265=_0xacfd['output']?.['includes'](_0x55936c['iXZYh']);!_0xacfd['success']&&!_0xb70265?console['error'](_0x55936c[_0x4c4da0(0x189)],_0xacfd['error']):console['log'](_0x55936c['hnNEk']);}}return!![];}export async function ensureClaudeSkills(_0x309053){const _0x52a608=_0x4c2f,_0x1cfd9f={'Kwynv':'user','HIUXy':_0x52a608(0x18a),'FyAng':_0x52a608(0x1a1),'lUIMO':function(_0x45bed0,_0x4705bf){return _0x45bed0(_0x4705bf);},'DQdsZ':function(_0x1c23bf,_0x22732f,_0x4e08b5,_0x3edfc4){return _0x1c23bf(_0x22732f,_0x4e08b5,_0x3edfc4);},'ZbWkE':function(_0x5339ac,_0x4f5685){return _0x5339ac||_0x4f5685;},'SDQEn':'✓\x20Ranger\x20skills\x20already\x20installed','JgZcC':function(_0x599db0,_0x2d9696){return _0x599db0(_0x2d9696);},'yCOqy':function(_0xbc3f5e,_0x297d5f,_0x46267b){return _0xbc3f5e(_0x297d5f,_0x46267b);},'Argvb':_0x52a608(0x195),'oWfui':function(_0x42086c,_0x3635da){return _0x42086c(_0x3635da);},'YDvCN':'project','UwHec':_0x52a608(0x182),'yysbc':_0x52a608(0x185),'WTzvr':'Would\x20you\x20like\x20to\x20install\x20skills?'},_0x155fab=existsSync(join(getSkillsDir(_0x1cfd9f[_0x52a608(0x191)]),_0x1cfd9f['HIUXy'],_0x1cfd9f['FyAng'])),_0x579dd9=_0x1cfd9f[_0x52a608(0x17a)](existsSync,_0x1cfd9f[_0x52a608(0x180)](join,getSkillsDir('project'),_0x1cfd9f[_0x52a608(0x17d)],_0x1cfd9f['FyAng']));if(_0x1cfd9f[_0x52a608(0x188)](_0x155fab,_0x579dd9))return console['log'](_0x1cfd9f[_0x52a608(0x183)]),![];const _0x5ae55f=_0x1cfd9f[_0x52a608(0x18c)](existsSync,_0x1cfd9f[_0x52a608(0x194)](join,getProjectRoot(),_0x1cfd9f[_0x52a608(0x190)]));let _0x4d7258=!![];if(_0x309053)await _0x1cfd9f['oWfui'](skillup,{'autoInstall':_0x309053,'suppressUsage':!![]});else{if(_0x5ae55f)await skillup({'autoInstall':_0x1cfd9f['YDvCN'],'suppressUsage':!![]});else{const _0x3b09c0=await _0x59d928[_0x52a608(0x19f)]([{'type':_0x1cfd9f[_0x52a608(0x17f)],'name':_0x1cfd9f[_0x52a608(0x1a9)],'message':_0x1cfd9f[_0x52a608(0x1a4)],'default':!![]}]);_0x4d7258=_0x3b09c0[_0x52a608(0x185)],_0x4d7258&&await _0x1cfd9f['JgZcC'](skillup,{'suppressUsage':!![]});}}return _0x4d7258;}
1
+ (function(_0x409cd5,_0x4fd250){const _0x3dd172=_0x8d21,_0x4cc33c=_0x409cd5();while(!![]){try{const _0x33138f=-parseInt(_0x3dd172(0xe9))/0x1+-parseInt(_0x3dd172(0xf8))/0x2*(parseInt(_0x3dd172(0xc5))/0x3)+parseInt(_0x3dd172(0xea))/0x4+-parseInt(_0x3dd172(0xd7))/0x5*(-parseInt(_0x3dd172(0xe3))/0x6)+parseInt(_0x3dd172(0xda))/0x7*(parseInt(_0x3dd172(0xbc))/0x8)+-parseInt(_0x3dd172(0xd1))/0x9+-parseInt(_0x3dd172(0xbe))/0xa*(-parseInt(_0x3dd172(0xe5))/0xb);if(_0x33138f===_0x4fd250)break;else _0x4cc33c['push'](_0x4cc33c['shift']());}catch(_0x567fd4){_0x4cc33c['push'](_0x4cc33c['shift']());}}}(_0x2cb1,0x5000c));import{join}from'path';function _0x2cb1(){const _0x21e5ee=['10niClPB','JYUfu','tHvgB','error','add','⚠\x20Failed\x20to\x20enable\x20plugin:','HveVF','32817gXuVVU','\x20level)...\x0a','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','VMLdG','log','push','list','bFfth','XOEEf','jNUvI','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','ranger@trailhead','1550133WjJGDu','Ugyni','XQnOR','SNTDC','enable','✓\x20Ranger\x20skills\x20already\x20installed','5NBVCAR','ZfFlg','wantsSkillup','15365wtXHyd','success','sMSyN','Would\x20you\x20like\x20to\x20install\x20skills?','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','qKegZ','\x0aYou\x20can\x20install\x20manually\x20with:','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','ranger','1743432AVWmEM','marketplace','9235281XEFSBG','rJdlI','liDqO','pMzkU','631017jLFvKM','1026296kvyuFs','Where\x20should\x20the\x20plugin\x20be\x20installed?','project','fjjxn','confirm','BDHuY','Project\x20(shared\x20with\x20team\x20via\x20git)','wOwOA','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','output','.claude','BHpWp','pluginScope','QfmEq','58uWGnhH','BnOJo','224yzgFHQ','plugin'];_0x2cb1=function(){return _0x21e5ee;};return _0x2cb1();}import{existsSync}from'fs';import _0x2219a2 from'inquirer';function _0x8d21(_0x23a71a,_0x3b08b1){_0x23a71a=_0x23a71a-0xbb;const _0x2cb1f9=_0x2cb1();let _0x8d2151=_0x2cb1f9[_0x23a71a];return _0x8d2151;}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x37e3c8){const _0x3b000d=_0x8d21,_0x4787af={'fDMvr':function(_0x2a0b28,_0x2a652f){return _0x2a0b28(_0x2a652f);},'VMLdG':_0x3b000d(0xe1),'fjjxn':function(_0x309591,_0x488fbb){return _0x309591(_0x488fbb);},'pMzkU':function(_0x4932d6,_0x54c406,_0x127577){return _0x4932d6(_0x54c406,_0x127577);},'oTHoG':_0x3b000d(0xf4),'Ugyni':'project','jNUvI':_0x3b000d(0xcb),'qKegZ':'pluginScope','kGUnB':'User\x20(available\x20in\x20all\x20your\x20projects)','sMSyN':'user','XQnOR':function(_0x3457c2,_0x27b9c2){return _0x3457c2(_0x27b9c2);},'rJdlI':'trailhead','BbSuh':_0x3b000d(0xe4),'qwLNP':'ranger-testing/trailhead','liDqO':'❌\x20Failed\x20to\x20add\x20marketplace:','BnrTS':_0x3b000d(0xf2),'ylpQc':_0x3b000d(0xd0),'tHvgB':'--scope','ZYkWE':'❌\x20Failed\x20to\x20install\x20plugin:','XOEEf':'\x0aYou\x20can\x20install\x20manually\x20with:','BHpWp':_0x3b000d(0xbd),'QfmEq':_0x3b000d(0xd5),'tzKGC':'already\x20enabled'},_0x247014=await _0x4787af['fDMvr'](isPluginInstalled,'ranger@trailhead');if(_0x247014)return console['log'](_0x4787af[_0x3b000d(0xc8)]),![];const _0x5b5d0b=_0x4787af[_0x3b000d(0xed)](existsSync,_0x4787af['pMzkU'](join,getProjectRoot(),_0x4787af['oTHoG']));let _0x11915f;if(_0x37e3c8)_0x11915f=_0x37e3c8;else{if(_0x5b5d0b)_0x11915f=_0x4787af[_0x3b000d(0xd2)];else{console['log'](_0x3b000d(0xde));const _0x1c5992=await _0x2219a2['prompt']([{'type':_0x4787af[_0x3b000d(0xce)],'name':_0x4787af[_0x3b000d(0xdf)],'message':_0x3b000d(0xeb),'choices':[{'name':_0x4787af['kGUnB'],'value':_0x4787af['sMSyN']},{'name':_0x3b000d(0xf0),'value':_0x3b000d(0xec)}],'default':_0x4787af[_0x3b000d(0xdc)]}]);_0x11915f=_0x1c5992[_0x3b000d(0xf6)];}}console[_0x3b000d(0xc9)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x11915f+_0x3b000d(0xc6));const _0x48131d=await _0x4787af['XQnOR'](isMarketplaceAdded,_0x4787af[_0x3b000d(0xe6)]);let _0x4e2900=_0x48131d;if(_0x48131d)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0x187cc5=await _0x4787af[_0x3b000d(0xd3)](runClaudeCommand,[_0x3b000d(0xbd),_0x4787af['BbSuh'],_0x3b000d(0xc2),_0x4787af['qwLNP']]);!_0x187cc5[_0x3b000d(0xdb)]?(console['error'](_0x4787af[_0x3b000d(0xe7)],_0x187cc5[_0x3b000d(0xc1)]),console['log'](_0x3b000d(0xe0)),console[_0x3b000d(0xc9)](_0x4787af['BnrTS']),console['log'](_0x3b000d(0xc7)+_0x11915f)):_0x4e2900=!![];}if(_0x4e2900){const _0x18b789=await _0x4787af['fjjxn'](runClaudeCommand,[_0x3b000d(0xbd),'install',_0x4787af['ylpQc'],_0x4787af['tHvgB'],_0x11915f]);if(!_0x18b789[_0x3b000d(0xdb)])console['error'](_0x4787af['ZYkWE'],_0x18b789[_0x3b000d(0xc1)]),console['log'](_0x4787af[_0x3b000d(0xcd)]),console['log'](_0x3b000d(0xc7)+_0x11915f);else{console[_0x3b000d(0xc9)](_0x3b000d(0xcf));const _0x22d397=[_0x4787af[_0x3b000d(0xf5)],_0x4787af[_0x3b000d(0xf7)],_0x3b000d(0xd0)];_0x11915f===_0x3b000d(0xec)&&_0x22d397[_0x3b000d(0xca)](_0x4787af[_0x3b000d(0xc0)],_0x4787af[_0x3b000d(0xd2)]);const _0x5307c1=await _0x4787af[_0x3b000d(0xe8)](runClaudeCommand,_0x22d397,{'captureOutput':!![]}),_0x35e292=_0x5307c1[_0x3b000d(0xf3)]?.['includes'](_0x4787af['tzKGC']);!_0x5307c1[_0x3b000d(0xdb)]&&!_0x35e292?console[_0x3b000d(0xc1)](_0x3b000d(0xc3),_0x5307c1['error']):console['log']('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}export async function ensureClaudeSkills(_0x319f75){const _0x40309d=_0x8d21,_0x410981={'JYUfu':function(_0xf5f118,_0x476915,_0x488d29,_0x24d081){return _0xf5f118(_0x476915,_0x488d29,_0x24d081);},'BDHuY':'ranger','wOwOA':function(_0x1fd812,_0xda66e7){return _0x1fd812||_0xda66e7;},'jzKWs':_0x40309d(0xd6),'HveVF':function(_0x45f0cd,_0x687aa4){return _0x45f0cd(_0x687aa4);},'bFfth':function(_0x1c001d,_0x42bb32,_0x4d4abd){return _0x1c001d(_0x42bb32,_0x4d4abd);},'SNTDC':function(_0x4ff015){return _0x4ff015();},'eByRw':'.claude','RyEfZ':function(_0x3e6af1,_0x51783f){return _0x3e6af1(_0x51783f);},'ZfFlg':'project','fMMkr':_0x40309d(0xee),'BnOJo':_0x40309d(0xd9)},_0x5ee0b6=existsSync(join(getSkillsDir('user'),_0x40309d(0xe2),'SKILL.md')),_0x1b937d=existsSync(_0x410981[_0x40309d(0xbf)](join,getSkillsDir('project'),_0x410981[_0x40309d(0xef)],'SKILL.md'));if(_0x410981[_0x40309d(0xf1)](_0x5ee0b6,_0x1b937d))return console[_0x40309d(0xc9)](_0x410981['jzKWs']),![];const _0x383b81=_0x410981[_0x40309d(0xc4)](existsSync,_0x410981[_0x40309d(0xcc)](join,_0x410981[_0x40309d(0xd4)](getProjectRoot),_0x410981['eByRw']));let _0x62b9d4=!![];if(_0x319f75)await skillup({'autoInstall':_0x319f75,'suppressUsage':!![]});else{if(_0x383b81)await _0x410981['RyEfZ'](skillup,{'autoInstall':_0x410981[_0x40309d(0xd8)],'suppressUsage':!![]});else{const _0x598f04=await _0x2219a2['prompt']([{'type':_0x410981['fMMkr'],'name':_0x410981[_0x40309d(0xbb)],'message':_0x40309d(0xdd),'default':!![]}]);_0x62b9d4=_0x598f04['wantsSkillup'],_0x62b9d4&&await skillup({'suppressUsage':!![]});}}return _0x62b9d4;}
@@ -1 +1 @@
1
- (function(_0x188616,_0xd3d149){const _0x5b6467=_0xd009,_0x281bd3=_0x188616();while(!![]){try{const _0x32525a=parseInt(_0x5b6467(0x1c3))/0x1+-parseInt(_0x5b6467(0x1c7))/0x2*(parseInt(_0x5b6467(0x1cb))/0x3)+-parseInt(_0x5b6467(0x1bf))/0x4*(-parseInt(_0x5b6467(0x1d6))/0x5)+parseInt(_0x5b6467(0x1c9))/0x6+-parseInt(_0x5b6467(0x1c2))/0x7+parseInt(_0x5b6467(0x1c0))/0x8+parseInt(_0x5b6467(0x1d1))/0x9*(-parseInt(_0x5b6467(0x1c6))/0xa);if(_0x32525a===_0xd3d149)break;else _0x281bd3['push'](_0x281bd3['shift']());}catch(_0x57fc5c){_0x281bd3['push'](_0x281bd3['shift']());}}}(_0x2fda,0xf0d54));import{join}from'path';function _0xd009(_0x44ca64,_0x201b39){_0x44ca64=_0x44ca64-0x1ba;const _0x2fda75=_0x2fda();let _0xd00905=_0x2fda75[_0x44ca64];return _0xd00905;}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x308690 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';function _0x2fda(){const _0x332e3a=['ilBXB','Project\x20(shared\x20with\x20team\x20via\x20git)','project','✓\x20OpenCode\x20plugin\x20already\x20configured','8kPURWw','4416392HSHwck','opencode.json','8524229gMkNRu','1798217noLxur','pluginScope','lGoJV','10olatvu','514018GXRdse','KDWZP','6811728SgPERm','XewaS','12XzBtAW','Failed\x20to\x20read\x20opencode.json','dnQme','utf-8','Where\x20should\x20the\x20plugin\x20be\x20installed?','error','5895369wRPfBR','includes','stringify','list','UHich','1004305TjEzpR','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','User\x20(available\x20in\x20all\x20your\x20projects)'];_0x2fda=function(){return _0x332e3a;};return _0x2fda();}export async function ensureOpencodePluginConfig(_0x5448c3){const _0x4f802d=_0xd009,_0x3bf0f4={'NMqXq':function(_0x51ded8,_0x1c4451){return _0x51ded8(_0x1c4451);},'KDWZP':'\x0a📦\x20OpenCode\x20Plugin\x0a','tdbfR':_0x4f802d(0x1d4),'lGoJV':_0x4f802d(0x1cf),'qSYYl':_0x4f802d(0x1c1),'GXPeP':'@ranger-testing/opencode-plugin','UHich':'https://opencode.ai/config.json','dnQme':_0x4f802d(0x1cc),'ilBXB':_0x4f802d(0x1be),'WKORC':function(_0x5e71e9,_0x3b3938,_0x44cd57){return _0x5e71e9(_0x3b3938,_0x44cd57);},'XewaS':function(_0x23cdf5,_0x26ecdb){return _0x23cdf5+_0x26ecdb;}},_0x48aa67=_0x3bf0f4['NMqXq'](existsSync,join(getOpencodeConfigDir('project'),_0x4f802d(0x1c1)));let _0x4f8460;if(_0x5448c3)_0x4f8460=_0x5448c3;else{if(_0x48aa67)_0x4f8460='project';else{console['log'](_0x3bf0f4[_0x4f802d(0x1c8)]);const _0x215ec7=await _0x308690['prompt']([{'type':_0x3bf0f4['tdbfR'],'name':'pluginScope','message':_0x3bf0f4[_0x4f802d(0x1c5)],'choices':[{'name':_0x4f802d(0x1ba),'value':'user'},{'name':_0x4f802d(0x1bc),'value':_0x4f802d(0x1bd)}],'default':'user'}]);_0x4f8460=_0x215ec7[_0x4f802d(0x1c4)];}}const _0x37cccf=join(getOpencodeConfigDir(_0x4f8460),_0x3bf0f4['qSYYl']),_0xc8a5dd=_0x3bf0f4['GXPeP'],_0x2e7fe6=_0x3bf0f4[_0x4f802d(0x1d5)];let _0x49faee={};if(existsSync(_0x37cccf))try{const _0x353120=await readFile(_0x37cccf,_0x4f802d(0x1ce));_0x49faee=JSON['parse'](_0x353120);}catch(_0x486752){return console[_0x4f802d(0x1d0)](_0x4f802d(0x1d7)),{'configured':![],'scope':_0x4f8460,'error':_0x3bf0f4[_0x4f802d(0x1cd)],'details':_0x486752};}const _0xbea028=Array['isArray'](_0x49faee['plugin'])?_0x49faee['plugin']:[];if(_0xbea028[_0x4f802d(0x1d2)](_0xc8a5dd))return console['log'](_0x3bf0f4[_0x4f802d(0x1bb)]),{'configured':![],'scope':_0x4f8460};return _0x49faee['$schema']=_0x49faee['$schema']||_0x2e7fe6,_0x49faee['plugin']=[..._0xbea028,_0xc8a5dd],await mkdir(_0x3bf0f4['NMqXq'](getOpencodeConfigDir,_0x4f8460),{'recursive':!![]}),await _0x3bf0f4['WKORC'](writeFile,_0x37cccf,_0x3bf0f4[_0x4f802d(0x1ca)](JSON[_0x4f802d(0x1d3)](_0x49faee,null,0x2),'\x0a')),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x4f8460};}
1
+ function _0x33c4(_0x4dd291,_0x32b781){_0x4dd291=_0x4dd291-0x18c;const _0x11ba14=_0x11ba();let _0x33c4f6=_0x11ba14[_0x4dd291];return _0x33c4f6;}(function(_0x4cd5ae,_0x30f1ec){const _0x285551=_0x33c4,_0x213d0a=_0x4cd5ae();while(!![]){try{const _0x2c8afa=parseInt(_0x285551(0x1aa))/0x1*(parseInt(_0x285551(0x192))/0x2)+parseInt(_0x285551(0x190))/0x3+-parseInt(_0x285551(0x1a0))/0x4+-parseInt(_0x285551(0x18e))/0x5*(-parseInt(_0x285551(0x1a4))/0x6)+-parseInt(_0x285551(0x1a2))/0x7*(parseInt(_0x285551(0x1a5))/0x8)+parseInt(_0x285551(0x18c))/0x9+parseInt(_0x285551(0x1a3))/0xa;if(_0x2c8afa===_0x30f1ec)break;else _0x213d0a['push'](_0x213d0a['shift']());}catch(_0xf9dcd6){_0x213d0a['push'](_0x213d0a['shift']());}}}(_0x11ba,0x53402));function _0x11ba(){const _0x4a8fed=['7TMbUvd','5621130QxOBwZ','180102EQSAth','4125608Uugabu','usSrW','FTTVP','isArray','NwQXF','287624TVFvtU','4882923YCNjCl','pluginScope','5CsWTer','taLnS','183360FQluOl','Project\x20(shared\x20with\x20team\x20via\x20git)','2zcivtE','zuCbS','Failed\x20to\x20read\x20opencode.json','project','✓\x20OpenCode\x20plugin\x20configured','list','user','QpVqI','opencode.json','OSgZy','plugin','utf-8','@ranger-testing/opencode-plugin','tkpEH','2506904CQZyhD','$schema'];_0x11ba=function(){return _0x4a8fed;};return _0x11ba();}import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x5353e1 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x5dcb7a){const _0x49bd5e=_0x33c4,_0x384cf6={'taLnS':function(_0x348247,_0x2eee4a){return _0x348247(_0x2eee4a);},'zuCbS':'\x0a📦\x20OpenCode\x20Plugin\x0a','FTTVP':_0x49bd5e(0x197),'QpVqI':'user','tpUMK':'project','ANUJO':function(_0x41aee0,_0x1ab199){return _0x41aee0(_0x1ab199);},'OSgZy':_0x49bd5e(0x19e),'tkpEH':function(_0x35fb8f,_0x13e173,_0x4acf82){return _0x35fb8f(_0x13e173,_0x4acf82);},'KpMIQ':_0x49bd5e(0x19d),'NwQXF':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','pBuYh':'✓\x20OpenCode\x20plugin\x20already\x20configured','usSrW':function(_0x3be08a,_0xc09969,_0x287a5e){return _0x3be08a(_0xc09969,_0x287a5e);}},_0x393c9a=existsSync(join(_0x384cf6[_0x49bd5e(0x18f)](getOpencodeConfigDir,_0x49bd5e(0x195)),'opencode.json'));let _0x1e9951;if(_0x5dcb7a)_0x1e9951=_0x5dcb7a;else{if(_0x393c9a)_0x1e9951='project';else{console['log'](_0x384cf6[_0x49bd5e(0x193)]);const _0x244cc6=await _0x5353e1['prompt']([{'type':_0x384cf6[_0x49bd5e(0x1a7)],'name':'pluginScope','message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x384cf6[_0x49bd5e(0x199)]},{'name':_0x49bd5e(0x191),'value':_0x384cf6['tpUMK']}],'default':_0x49bd5e(0x198)}]);_0x1e9951=_0x244cc6[_0x49bd5e(0x18d)];}}const _0x296034=join(_0x384cf6['ANUJO'](getOpencodeConfigDir,_0x1e9951),_0x49bd5e(0x19a)),_0x43f801=_0x384cf6[_0x49bd5e(0x19b)],_0x5140ba='https://opencode.ai/config.json';let _0x1751e9={};if(existsSync(_0x296034))try{const _0x11a603=await _0x384cf6[_0x49bd5e(0x19f)](readFile,_0x296034,_0x384cf6['KpMIQ']);_0x1751e9=JSON['parse'](_0x11a603);}catch(_0xd480e7){return console['error'](_0x384cf6[_0x49bd5e(0x1a9)]),{'configured':![],'scope':_0x1e9951,'error':_0x49bd5e(0x194),'details':_0xd480e7};}const _0x3df835=Array[_0x49bd5e(0x1a8)](_0x1751e9['plugin'])?_0x1751e9['plugin']:[];if(_0x3df835['includes'](_0x43f801))return console['log'](_0x384cf6['pBuYh']),{'configured':![],'scope':_0x1e9951};return _0x1751e9[_0x49bd5e(0x1a1)]=_0x1751e9[_0x49bd5e(0x1a1)]||_0x5140ba,_0x1751e9[_0x49bd5e(0x19c)]=[..._0x3df835,_0x43f801],await mkdir(_0x384cf6[_0x49bd5e(0x18f)](getOpencodeConfigDir,_0x1e9951),{'recursive':!![]}),await _0x384cf6[_0x49bd5e(0x1a6)](writeFile,_0x296034,JSON['stringify'](_0x1751e9,null,0x2)+'\x0a'),console['log'](_0x49bd5e(0x196)),{'configured':!![],'scope':_0x1e9951};}
@@ -1 +1 @@
1
- (function(_0x40cd29,_0x1217c3){const _0x34d37c=_0x270d,_0x189a88=_0x40cd29();while(!![]){try{const _0x1bd6ea=-parseInt(_0x34d37c(0x11e))/0x1*(-parseInt(_0x34d37c(0x12c))/0x2)+parseInt(_0x34d37c(0x115))/0x3*(-parseInt(_0x34d37c(0x111))/0x4)+parseInt(_0x34d37c(0x109))/0x5*(-parseInt(_0x34d37c(0x108))/0x6)+parseInt(_0x34d37c(0x122))/0x7+-parseInt(_0x34d37c(0x136))/0x8*(parseInt(_0x34d37c(0x114))/0x9)+-parseInt(_0x34d37c(0x11d))/0xa*(-parseInt(_0x34d37c(0x12a))/0xb)+parseInt(_0x34d37c(0x10e))/0xc;if(_0x1bd6ea===_0x1217c3)break;else _0x189a88['push'](_0x189a88['shift']());}catch(_0x4a8c66){_0x189a88['push'](_0x189a88['shift']());}}}(_0x159c,0xd27ae));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';function _0x159c(){const _0x50eecc=['ranger-testing/trailhead','jPvwT','SHeaU','filter','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','Failed\x20to\x20install\x20plugin:','path','trackPhaseStart','add','Failed\x20to\x20add\x20marketplace:','Cvaez','plugin','IaAsI','GQvGV','ZDdGp','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','brQDO','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','project','6zdiUiJ','1949095jnNBDu','dir_setup','BNHsL','zypYU','exLHK','19886448TSjmlK','baseUrl','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','4TNzUaI','skipChromium','JWhaN','23175AnAJqu','1821813fxHIFZ','QMrUY','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','LHDvd','ARmKb','marketplace','bgyUu','length','10jqsUOl','7TmLvas','chromium','ICUvc','KZSYg','1495459GlxjOw','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','isDirectory','sessions','log','uWaNG','profile_activate','success','1056781XRCzdT','trackPhaseEnd','431994ovBRZs','auth.json.enc','error','scAmr','miNIG','QXqdj','mGKJC','name','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','Mjgqv','5032XDYKwl','settings.json','✓\x20Claude\x20Code\x20plugin\x20installed','trailhead'];_0x159c=function(){return _0x50eecc;};return _0x159c();}import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';function _0x270d(_0x359284,_0x375202){_0x359284=_0x359284-0xf5;const _0x159c3b=_0x159c();let _0x270d96=_0x159c3b[_0x359284];return _0x270d96;}import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x2d4ebb){const _0x336bc8=_0x270d,_0x24257e={'nuzJQ':function(_0xaa6fb6){return _0xaa6fb6();},'ICUvc':function(_0xf65743,_0x514bab,_0x9661fb){return _0xf65743(_0x514bab,_0x9661fb);},'exLHK':function(_0x217ab1,_0x40dbc5){return _0x217ab1+_0x40dbc5;},'SHeaU':_0x336bc8(0x102),'ARmKb':function(_0x4858f0,_0x262307){return _0x4858f0===_0x262307;},'Cvaez':function(_0x190002,_0x1d8d2c){return _0x190002===_0x1d8d2c;}},_0x500044=_0x24257e['nuzJQ'](getRangerDir),_0x552f84=join(_0x500044,'ci');if(_0x2d4ebb){const _0x462d24=_0x24257e[_0x336bc8(0x120)](join,_0x552f84,_0x2d4ebb);return{'name':_0x2d4ebb,'path':_0x462d24};}if(!existsSync(_0x552f84))throw new Error(_0x24257e[_0x336bc8(0x10d)](_0x336bc8(0x106),_0x24257e[_0x336bc8(0xf5)]));const _0x315c28=await readdir(_0x552f84,{'withFileTypes':!![]}),_0x4f0eba=_0x315c28[_0x336bc8(0xf6)](_0x4e1ec1=>_0x4e1ec1[_0x336bc8(0x124)]())['map'](_0x2a5882=>_0x2a5882[_0x336bc8(0x133)]);if(_0x24257e[_0x336bc8(0x119)](_0x4f0eba[_0x336bc8(0x11c)],0x0))throw new Error(_0x24257e['exLHK'](_0x336bc8(0x103),_0x336bc8(0x102)));if(_0x24257e[_0x336bc8(0xfd)](_0x4f0eba[_0x336bc8(0x11c)],0x1)){const _0x138f86=_0x4f0eba[0x0];return console['log']('Auto-detected\x20CI\x20profile:\x20'+_0x138f86),{'name':_0x138f86,'path':join(_0x552f84,_0x138f86)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x4f0eba['join'](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x191b55=_0x270d,_0x545228={'WglqU':function(_0x263890,_0x4ad841){return _0x263890(_0x4ad841);},'JWhaN':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','Zmpld':_0x191b55(0x11a),'GQvGV':_0x191b55(0xfb),'vNnmv':_0x191b55(0x13a),'KZSYg':_0x191b55(0xfc),'DBgHQ':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','Mjgqv':_0x191b55(0xfe),'BNHsL':'--scope','IaAsI':'project','ZDdGp':_0x191b55(0xf8),'bgyUu':_0x191b55(0x138)},_0x8c0aa6=await _0x545228['WglqU'](isPluginInstalled,'ranger@trailhead');if(_0x8c0aa6)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console[_0x191b55(0x126)](_0x545228[_0x191b55(0x113)]);const _0x1e0ee7=await isMarketplaceAdded(_0x191b55(0x139));let _0x308d3f=_0x1e0ee7;if(_0x1e0ee7)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0x11cb61=await runClaudeCommand(['plugin',_0x545228['Zmpld'],_0x545228[_0x191b55(0x100)],_0x545228['vNnmv']]);!_0x11cb61['success']?(console['error'](_0x545228[_0x191b55(0x121)],_0x11cb61[_0x191b55(0x12e)]),console['log'](_0x545228['DBgHQ'])):_0x308d3f=!![];}if(_0x308d3f){const _0x2cd2d1=await runClaudeCommand([_0x545228[_0x191b55(0x135)],'install','ranger@trailhead',_0x545228[_0x191b55(0x10b)],_0x545228[_0x191b55(0xff)]]);!_0x2cd2d1[_0x191b55(0x129)]?(console['error'](_0x545228[_0x191b55(0x101)],_0x2cd2d1[_0x191b55(0x12e)]),console[_0x191b55(0x126)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console['log'](_0x545228[_0x191b55(0x11b)]);}return!![];}export async function setupCi(_0x3cdf40,_0x5e8962,_0x5f1c91){const _0x2585c8=_0x270d,_0x31ed41={'brQDO':_0x2585c8(0x110),'cBiTa':'auth','LHDvd':function(_0x203e53,_0x101b69){return _0x203e53(_0x101b69);},'yBwjp':function(_0x1e17b7){return _0x1e17b7();},'QMrUY':function(_0xf8d067,_0x5210e1,_0x1e03f1){return _0xf8d067(_0x5210e1,_0x1e03f1);},'scAmr':_0x2585c8(0x10a),'QMWdm':'chromium','dXYVE':function(_0x18bd84,_0x5af8c8){return _0x18bd84(_0x5af8c8);},'zypYU':function(_0x4f09fd,_0x5f0d22){return _0x4f09fd(_0x5f0d22);},'QXqdj':_0x2585c8(0x12d),'mGKJC':function(_0x2f0a35,_0x36f25b){return _0x2f0a35(_0x36f25b);},'miNIG':_0x2585c8(0x123),'mPqcD':function(_0x406913,_0x4a8521){return _0x406913 instanceof _0x4a8521;},'jPvwT':_0x2585c8(0xfe),'uWaNG':'skills'};console[_0x2585c8(0x126)](_0x31ed41[_0x2585c8(0x104)]),_0x5f1c91?.[_0x2585c8(0xfa)](_0x31ed41['cBiTa']),await _0x31ed41[_0x2585c8(0x118)](authenticate,_0x3cdf40),_0x5f1c91?.['trackPhaseEnd']('auth'),_0x5f1c91?.[_0x2585c8(0xfa)](_0x2585c8(0x10a));const {path:_0x3e1fcd,installed:_0xc4ac0c}=await _0x31ed41['yBwjp'](ensureRangerDir);await _0x31ed41[_0x2585c8(0x118)](writeRangerGitignore,_0x3e1fcd);const _0x2e494c=_0x31ed41['QMrUY'](join,_0x3e1fcd,_0x2585c8(0x125));!_0x31ed41[_0x2585c8(0x118)](existsSync,_0x2e494c)&&await _0x31ed41['QMrUY'](mkdir,_0x2e494c,{'recursive':!![]});_0x5f1c91?.[_0x2585c8(0x12b)](_0x31ed41[_0x2585c8(0x12f)],{'installed':_0xc4ac0c}),_0x5f1c91?.['trackPhaseStart'](_0x31ed41['QMWdm']);let _0x132221=![];_0x5e8962?.[_0x2585c8(0x112)]?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x132221=await ensureChromium();_0x5f1c91?.[_0x2585c8(0x12b)](_0x2585c8(0x11f),{'installed':_0x132221,'skipped':!!_0x5e8962?.['skipChromium']}),_0x5f1c91?.['trackPhaseStart']('profile_activate');const _0x1f4513=await _0x31ed41['dXYVE'](findCiProfile,_0x5e8962?.['profile']);let _0x3b935c=![];_0x5e8962?.[_0x2585c8(0x10f)]&&(await mkdir(_0x1f4513['path'],{'recursive':!![]}),await saveSettings(_0x1f4513['name'],{'baseUrl':_0x5e8962[_0x2585c8(0x10f)],'headless':!![]}),console[_0x2585c8(0x126)]('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x5e8962[_0x2585c8(0x10f)]),_0x3b935c=!![]);const _0x2fb7f6=_0x31ed41['QMrUY'](join,_0x1f4513[_0x2585c8(0xf9)],_0x2585c8(0x137));if(!_0x31ed41[_0x2585c8(0x10c)](existsSync,_0x2fb7f6)&&!_0x3b935c)throw new Error('CI\x20profile\x20\x22'+_0x1f4513[_0x2585c8(0x133)]+_0x2585c8(0x134));const _0x58acef=_0x31ed41['QMrUY'](join,_0x1f4513['path'],'auth.json'),_0x18be45=join(_0x1f4513[_0x2585c8(0xf9)],_0x31ed41[_0x2585c8(0x131)]),_0x2b50dc=_0x31ed41[_0x2585c8(0x132)](existsSync,_0x58acef),_0x4278d3=existsSync(_0x18be45);if(_0x4278d3)try{const _0x455ad6=await getToken();if(!_0x455ad6)throw new Error('No\x20API\x20token\x20available\x20for\x20decryption');const _0x2d70a8=await readFile(_0x18be45);_0x31ed41[_0x2585c8(0x116)](decrypt,_0x2d70a8,_0x455ad6),console['log'](_0x31ed41[_0x2585c8(0x130)]);}catch(_0xa88f0c){const _0x55b09b=_0x31ed41['mPqcD'](_0xa88f0c,Error)?_0xa88f0c['message']:String(_0xa88f0c);throw new Error(_0x2585c8(0x117)+_0x1f4513['name']+'\x22:\x20'+_0x55b09b);}else _0x2b50dc?console['log']('✓\x20Auth\x20state\x20found'):console[_0x2585c8(0x126)](_0x2585c8(0xf7));await writeActiveProfileName(_0x1f4513[_0x2585c8(0x133)]),console['log']('✓\x20Active\x20profile:\x20'+_0x1f4513[_0x2585c8(0x133)]),_0x5f1c91?.['trackPhaseEnd'](_0x2585c8(0x128),{'profileName':_0x1f4513[_0x2585c8(0x133)],'hasAuth':_0x2b50dc,'hasEncryptedAuth':_0x4278d3,'createdSettings':_0x3b935c}),_0x5f1c91?.['trackPhaseStart'](_0x31ed41[_0x2585c8(0x13b)]);const _0x3ae714=await installPluginNonInteractive();_0x5f1c91?.['trackPhaseEnd'](_0x31ed41['jPvwT'],{'installed':_0x3ae714}),_0x5f1c91?.[_0x2585c8(0xfa)]('skills'),await skillup({'autoInstall':_0x2585c8(0x107)}),_0x5f1c91?.['trackPhaseEnd'](_0x31ed41[_0x2585c8(0x127)]),console[_0x2585c8(0x126)](_0x2585c8(0x105));}
1
+ (function(_0x1006f1,_0x4ff5de){const _0x3d20f5=_0x6e72,_0x27602d=_0x1006f1();while(!![]){try{const _0x4e4cbc=parseInt(_0x3d20f5(0x140))/0x1+parseInt(_0x3d20f5(0x10e))/0x2*(-parseInt(_0x3d20f5(0x11f))/0x3)+parseInt(_0x3d20f5(0x11d))/0x4+-parseInt(_0x3d20f5(0x12a))/0x5+parseInt(_0x3d20f5(0x120))/0x6*(parseInt(_0x3d20f5(0x118))/0x7)+-parseInt(_0x3d20f5(0x136))/0x8+parseInt(_0x3d20f5(0x12d))/0x9;if(_0x4e4cbc===_0x4ff5de)break;else _0x27602d['push'](_0x27602d['shift']());}catch(_0x48ba51){_0x27602d['push'](_0x27602d['shift']());}}}(_0x1ca5,0xb6137));import{mkdir,readFile,readdir}from'fs/promises';function _0x6e72(_0x4257d6,_0x4c68fc){_0x4257d6=_0x4257d6-0x10e;const _0x1ca599=_0x1ca5();let _0x6e7287=_0x1ca599[_0x4257d6];return _0x6e7287;}import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x16fefa){const _0x4033d4=_0x6e72,_0x496624={'mIzQc':function(_0x5736c7,_0x5e5a57){return _0x5736c7(_0x5e5a57);},'vnOux':function(_0x2fb173,_0x1a24ad){return _0x2fb173+_0x1a24ad;},'BOEfr':_0x4033d4(0x126),'wgTCu':function(_0xaa95f1,_0x412457,_0x4114cd){return _0xaa95f1(_0x412457,_0x4114cd);},'uiksL':function(_0x2da090,_0x344865){return _0x2da090+_0x344865;},'jzXbZ':'No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','iukJe':function(_0xd0ffcd,_0x48fad7){return _0xd0ffcd===_0x48fad7;},'JlwQN':function(_0x3e6a7c,_0x264562,_0x11b341){return _0x3e6a7c(_0x264562,_0x11b341);}},_0x576798=getRangerDir(),_0x813a3c=join(_0x576798,'ci');if(_0x16fefa){const _0x4d7325=join(_0x813a3c,_0x16fefa);return{'name':_0x16fefa,'path':_0x4d7325};}if(!_0x496624[_0x4033d4(0x148)](existsSync,_0x813a3c))throw new Error(_0x496624[_0x4033d4(0x13c)](_0x4033d4(0x14d),_0x496624['BOEfr']));const _0x4cb059=await _0x496624[_0x4033d4(0x11e)](readdir,_0x813a3c,{'withFileTypes':!![]}),_0x3b1c54=_0x4cb059['filter'](_0x1557b9=>_0x1557b9['isDirectory']())['map'](_0x1dae15=>_0x1dae15['name']);if(_0x3b1c54[_0x4033d4(0x117)]===0x0)throw new Error(_0x496624[_0x4033d4(0x12b)](_0x496624['jzXbZ'],_0x496624['BOEfr']));if(_0x496624[_0x4033d4(0x12c)](_0x3b1c54[_0x4033d4(0x117)],0x1)){const _0x1e5a74=_0x3b1c54[0x0];return console[_0x4033d4(0x14f)](_0x4033d4(0x10f)+_0x1e5a74),{'name':_0x1e5a74,'path':_0x496624[_0x4033d4(0x127)](join,_0x813a3c,_0x1e5a74)};}throw new Error(_0x4033d4(0x13d)+_0x3b1c54['join'](',\x20')+_0x4033d4(0x144));}function _0x1ca5(){const _0x314e8c=['iukJe','1121580loPKLy','settings.json','name','error','plugin','auth','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','AsXSC','✓\x20Claude\x20Code\x20plugin\x20installed','6035992idrKNX','ranger@trailhead','EQXoe','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','XBzCk','idACb','vnOux','Multiple\x20CI\x20profiles\x20found:\x20','Deort','zplaI','21426DtmzJX','✓\x20Marketplace\x20already\x20added','ThZWF','mqgYx','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','CHKeL','ranger-testing/trailhead','WXmxC','mIzQc','OjiFB','chromium','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','trailhead','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','EbTiH','log','htBjO','trackPhaseStart','baseUrl','path','277748XRXvco','Auto-detected\x20CI\x20profile:\x20','success','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','skills','install','Cdykl','YSNri','profile','length','7990549xVCKGo','✓\x20Active\x20profile:\x20','auth.json','Failed\x20to\x20install\x20plugin:','dir_setup','3625920AvYHUo','wgTCu','3YASPtr','6LYchFJ','KdEeN','mNFfZ','CI\x20profile\x20\x22','No\x20API\x20token\x20available\x20for\x20decryption','trackPhaseEnd','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','JlwQN','profile_activate','project','2774385pRDtIE','uiksL'];_0x1ca5=function(){return _0x314e8c;};return _0x1ca5();}async function installPluginNonInteractive(){const _0x5e1ba7=_0x6e72,_0x594d81={'mqgYx':_0x5e1ba7(0x137),'AsXSC':function(_0xc2d994,_0x42b609){return _0xc2d994(_0x42b609);},'vpgGY':_0x5e1ba7(0x131),'UMkZx':_0x5e1ba7(0x146),'Deort':'Failed\x20to\x20add\x20marketplace:','WCvgK':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','htBjO':_0x5e1ba7(0x113),'ZFuMp':'--scope','idACb':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','ThZWF':_0x5e1ba7(0x135)},_0x1a026e=await isPluginInstalled(_0x594d81[_0x5e1ba7(0x143)]);if(_0x1a026e)return console[_0x5e1ba7(0x14f)]('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console['log']('Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...');const _0x435a8c=await _0x594d81['AsXSC'](isMarketplaceAdded,_0x5e1ba7(0x14c));let _0x2c4de5=_0x435a8c;if(_0x435a8c)console['log'](_0x5e1ba7(0x141));else{const _0x5e0dce=await _0x594d81[_0x5e1ba7(0x134)](runClaudeCommand,[_0x594d81['vpgGY'],'marketplace','add',_0x594d81['UMkZx']]);!_0x5e0dce['success']?(console['error'](_0x594d81[_0x5e1ba7(0x13e)],_0x5e0dce[_0x5e1ba7(0x130)]),console[_0x5e1ba7(0x14f)](_0x594d81['WCvgK'])):_0x2c4de5=!![];}if(_0x2c4de5){const _0x4b0ad5=await runClaudeCommand([_0x594d81['vpgGY'],_0x594d81[_0x5e1ba7(0x150)],_0x5e1ba7(0x137),_0x594d81['ZFuMp'],_0x5e1ba7(0x129)]);!_0x4b0ad5[_0x5e1ba7(0x110)]?(console['error'](_0x5e1ba7(0x11b),_0x4b0ad5['error']),console['log'](_0x594d81[_0x5e1ba7(0x13b)])):console[_0x5e1ba7(0x14f)](_0x594d81[_0x5e1ba7(0x142)]);}return!![];}export async function setupCi(_0x47d956,_0x387465,_0xf5c5d7){const _0x80ff4d=_0x6e72,_0x4d3622={'eATOF':_0x80ff4d(0x14b),'amMNp':'auth','OjiFB':function(_0x1bcd14,_0x89b14a,_0x3cac8e){return _0x1bcd14(_0x89b14a,_0x3cac8e);},'KdEeN':'dir_setup','zplaI':_0x80ff4d(0x14a),'Cdykl':_0x80ff4d(0x128),'WXmxC':function(_0x15c602,_0x76e2ff){return _0x15c602(_0x76e2ff);},'YSNri':_0x80ff4d(0x12e),'CHKeL':function(_0x52d26d,_0x419bed){return _0x52d26d(_0x419bed);},'crzSA':function(_0x166f38,_0x1c13b5){return _0x166f38(_0x1c13b5);},'UzSLY':_0x80ff4d(0x124),'EQXoe':function(_0x3cbfb3,_0x2f4baa){return _0x3cbfb3 instanceof _0x2f4baa;},'mNFfZ':'✓\x20Auth\x20state\x20found','JfzTc':'\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','VBqQq':'plugin','wnqNf':_0x80ff4d(0x112),'XBzCk':function(_0x2901ff,_0x1bda4e){return _0x2901ff(_0x1bda4e);},'EbTiH':_0x80ff4d(0x111)};console['log'](_0x4d3622['eATOF']),_0xf5c5d7?.[_0x80ff4d(0x151)](_0x4d3622['amMNp']),await authenticate(_0x47d956),_0xf5c5d7?.['trackPhaseEnd'](_0x80ff4d(0x132)),_0xf5c5d7?.['trackPhaseStart'](_0x80ff4d(0x11c));const {path:_0x592a09,installed:_0x25c1e8}=await ensureRangerDir();await writeRangerGitignore(_0x592a09);const _0xc838a5=_0x4d3622['OjiFB'](join,_0x592a09,'sessions');!existsSync(_0xc838a5)&&await _0x4d3622['OjiFB'](mkdir,_0xc838a5,{'recursive':!![]});_0xf5c5d7?.['trackPhaseEnd'](_0x4d3622[_0x80ff4d(0x121)],{'installed':_0x25c1e8}),_0xf5c5d7?.['trackPhaseStart'](_0x4d3622[_0x80ff4d(0x13f)]);let _0x5707c7=![];_0x387465?.['skipChromium']?console[_0x80ff4d(0x14f)](_0x80ff4d(0x133)):_0x5707c7=await ensureChromium();_0xf5c5d7?.['trackPhaseEnd'](_0x4d3622['zplaI'],{'installed':_0x5707c7,'skipped':!!_0x387465?.['skipChromium']}),_0xf5c5d7?.[_0x80ff4d(0x151)](_0x4d3622[_0x80ff4d(0x114)]);const _0x3583b2=await _0x4d3622[_0x80ff4d(0x147)](findCiProfile,_0x387465?.[_0x80ff4d(0x116)]);let _0x6cb25e=![];_0x387465?.[_0x80ff4d(0x152)]&&(await mkdir(_0x3583b2[_0x80ff4d(0x153)],{'recursive':!![]}),await _0x4d3622[_0x80ff4d(0x149)](saveSettings,_0x3583b2[_0x80ff4d(0x12f)],{'baseUrl':_0x387465[_0x80ff4d(0x152)],'headless':!![]}),console[_0x80ff4d(0x14f)]('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x387465[_0x80ff4d(0x152)]),_0x6cb25e=!![]);const _0xf58de1=join(_0x3583b2[_0x80ff4d(0x153)],_0x4d3622[_0x80ff4d(0x115)]);if(!_0x4d3622[_0x80ff4d(0x145)](existsSync,_0xf58de1)&&!_0x6cb25e)throw new Error(_0x80ff4d(0x123)+_0x3583b2['name']+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x4a3d83=_0x4d3622['OjiFB'](join,_0x3583b2[_0x80ff4d(0x153)],_0x80ff4d(0x11a)),_0x27d2b5=join(_0x3583b2['path'],'auth.json.enc'),_0x5a5bfa=existsSync(_0x4a3d83),_0x752902=_0x4d3622['crzSA'](existsSync,_0x27d2b5);if(_0x752902)try{const _0x245154=await getToken();if(!_0x245154)throw new Error(_0x4d3622['UzSLY']);const _0x404c6c=await readFile(_0x27d2b5);_0x4d3622['OjiFB'](decrypt,_0x404c6c,_0x245154),console[_0x80ff4d(0x14f)](_0x80ff4d(0x139));}catch(_0x2b4f9b){const _0x29745f=_0x4d3622[_0x80ff4d(0x138)](_0x2b4f9b,Error)?_0x2b4f9b['message']:String(_0x2b4f9b);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x3583b2['name']+'\x22:\x20'+_0x29745f);}else _0x5a5bfa?console['log'](_0x4d3622[_0x80ff4d(0x122)]):console['log'](_0x4d3622['JfzTc']);await writeActiveProfileName(_0x3583b2[_0x80ff4d(0x12f)]),console[_0x80ff4d(0x14f)](_0x80ff4d(0x119)+_0x3583b2['name']),_0xf5c5d7?.['trackPhaseEnd'](_0x80ff4d(0x128),{'profileName':_0x3583b2['name'],'hasAuth':_0x5a5bfa,'hasEncryptedAuth':_0x752902,'createdSettings':_0x6cb25e}),_0xf5c5d7?.[_0x80ff4d(0x151)](_0x4d3622['VBqQq']);const _0x3afe6e=await installPluginNonInteractive();_0xf5c5d7?.['trackPhaseEnd'](_0x80ff4d(0x131),{'installed':_0x3afe6e}),_0xf5c5d7?.['trackPhaseStart'](_0x4d3622['wnqNf']),await _0x4d3622[_0x80ff4d(0x13a)](skillup,{'autoInstall':_0x80ff4d(0x129)}),_0xf5c5d7?.[_0x80ff4d(0x125)](_0x80ff4d(0x112)),console['log'](_0x4d3622[_0x80ff4d(0x14e)]);}
@@ -1 +1 @@
1
- (function(_0xbf6206,_0x89e29f){const _0x2c6c77=_0x4d7b,_0x462e80=_0xbf6206();while(!![]){try{const _0x60e89c=parseInt(_0x2c6c77(0x6a))/0x1*(-parseInt(_0x2c6c77(0x87))/0x2)+-parseInt(_0x2c6c77(0x8b))/0x3*(-parseInt(_0x2c6c77(0x88))/0x4)+parseInt(_0x2c6c77(0x7c))/0x5+parseInt(_0x2c6c77(0x80))/0x6+parseInt(_0x2c6c77(0x71))/0x7*(-parseInt(_0x2c6c77(0x89))/0x8)+-parseInt(_0x2c6c77(0x67))/0x9*(parseInt(_0x2c6c77(0x73))/0xa)+parseInt(_0x2c6c77(0x7e))/0xb;if(_0x60e89c===_0x89e29f)break;else _0x462e80['push'](_0x462e80['shift']());}catch(_0x52f645){_0x462e80['push'](_0x462e80['shift']());}}}(_0x5019,0xbab2d));import{basename}from'path';import _0x4983ee from'inquirer';function _0x5019(){const _0x128cb4=['/skills/','autoInstall','TrCcc','prompt','fBocB','712152Foxtkr','mVAKE','4610HIlxTv','installLevel','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','To\x20get\x20started:','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','\x20successfully!\x0a','TqOfb','project-level','\x20<your-api-token>','3725320VsftIj','isTTY','18281461rhiEPO','message','5745048VjSCEA','warn','suppressUsage','\x0a✅\x20Installed\x20','eZuNl','platform','user','20gJeZED','2515228IgNnKY','120xMxiuZ','\x0a📦\x20Installing\x20skills...\x0a','3hlCDfk','/.claude/skills/','Where\x20should\x20skills\x20be\x20installed?','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','fMyzY','26487QAjglY','\x20\x202.\x20Run:\x20ranger\x20setup','log','34585ljtJQp','fwpeq'];_0x5019=function(){return _0x128cb4;};return _0x5019();}function _0x4d7b(_0x2f3b41,_0x53428d){_0x2f3b41=_0x2f3b41-0x64;const _0x5019cb=_0x5019();let _0x4d7bd3=_0x5019cb[_0x2f3b41];return _0x4d7bd3;}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(_0x25bb63={}){const _0x39c370=_0x4d7b,_0x2d1b6f={'vheFI':_0x39c370(0x65),'TqOfb':'claude','mXWEy':_0x39c370(0x76),'mVAKE':'\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','rtsGK':function(_0x223c74,_0x3d25ec){return _0x223c74===_0x3d25ec;},'fMyzY':'opencode','KgUPw':'\x20--opencode','eZuNl':'✓\x20Found\x20API\x20token','ptHJG':function(_0x4de1f2){return _0x4de1f2();},'FuuXC':function(_0x36f6bd,_0x5678af){return _0x36f6bd(_0x5678af);},'MZRuq':function(_0x20a9b6,_0x2a5f53){return _0x20a9b6===_0x2a5f53;},'TrCcc':'user','faXJb':'list','zXfxU':function(_0x12b781,_0x4f4c68){return _0x12b781 instanceof _0x4f4c68;},'fwpeq':function(_0x4c330c,_0x34e522){return _0x4c330c>_0x34e522;},'IreTV':'user-level','fBocB':function(_0x3a876e,_0x179048){return _0x3a876e===_0x179048;},'rjvIs':'\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a'};console['log'](_0x2d1b6f['vheFI']);const _0x37ba82=_0x25bb63[_0x39c370(0x85)]??_0x2d1b6f[_0x39c370(0x79)],_0x50e5ea=await getToken();if(!_0x50e5ea){console[_0x39c370(0x69)](_0x39c370(0x75)),console[_0x39c370(0x69)](_0x2d1b6f['mXWEy']),console['log'](_0x2d1b6f[_0x39c370(0x72)]),console['log'](_0x39c370(0x68)+(_0x2d1b6f['rtsGK'](_0x37ba82,_0x2d1b6f['fMyzY'])?_0x2d1b6f['KgUPw']:'')+_0x39c370(0x7b)),console[_0x39c370(0x69)]('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x2d1b6f['rtsGK'](_0x37ba82,_0x2d1b6f[_0x39c370(0x66)])?_0x2d1b6f['KgUPw']:'')+'\x0a');return;}console[_0x39c370(0x69)](_0x2d1b6f[_0x39c370(0x84)]);const _0x1790de=_0x2d1b6f['ptHJG'](getProjectRoot),_0x4b8f33=_0x2d1b6f['FuuXC'](basename,_0x1790de),_0x29d681=_0x2d1b6f['MZRuq'](_0x37ba82,_0x2d1b6f['fMyzY'])?getOpencodeConfigDir(_0x2d1b6f['TrCcc'])+'/skills/':getClaudeConfigDir()+_0x39c370(0x6c),_0x18d2f6=_0x37ba82==='opencode'?_0x1790de+'/.opencode/skills/':_0x1790de+_0x39c370(0x8c),_0x2dd187=process['stdin']['isTTY']&&process['stdout'][_0x39c370(0x7d)];let _0x557a0c;if(_0x25bb63[_0x39c370(0x6d)])_0x557a0c=_0x25bb63['autoInstall'];else{if(_0x2dd187){const _0x1ce4ca=await _0x4983ee[_0x39c370(0x6f)]([{'type':_0x2d1b6f['faXJb'],'name':_0x39c370(0x74),'message':_0x39c370(0x64),'choices':[{'name':'All\x20projects\x20('+_0x29d681+')','value':_0x2d1b6f[_0x39c370(0x6e)]},{'name':'This\x20project\x20only\x20('+_0x18d2f6+')','value':'project'}]}]);_0x557a0c=_0x1ce4ca['installLevel'];}else _0x557a0c='project',console[_0x39c370(0x69)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x18d2f6+')');}let _0x489e8c=0x0;const _0x107847=_0x2d1b6f['ptHJG'](getCurrentVersion);console['log'](_0x39c370(0x8a));try{const _0x2c3cce=await installSkill('ranger',{'cliVersion':_0x107847,'level':_0x557a0c,'platform':_0x37ba82});_0x2c3cce&&_0x489e8c++;}catch(_0x1f8c3b){console[_0x39c370(0x81)]('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x2d1b6f['zXfxU'](_0x1f8c3b,Error)?_0x1f8c3b[_0x39c370(0x7f)]:_0x1f8c3b);}if(_0x2d1b6f[_0x39c370(0x6b)](_0x489e8c,0x0)){const _0x5e6a00=_0x2d1b6f['MZRuq'](_0x557a0c,_0x39c370(0x86))?_0x2d1b6f['IreTV']:_0x39c370(0x7a);console['log'](_0x39c370(0x83)+_0x489e8c+'\x20'+_0x5e6a00+'\x20skill'+(_0x489e8c>0x1?'s':'')+_0x39c370(0x78)),!_0x25bb63[_0x39c370(0x82)]&&(console['log']('To\x20use:'),_0x2d1b6f[_0x39c370(0x70)](_0x37ba82,_0x2d1b6f[_0x39c370(0x66)])?console[_0x39c370(0x69)](_0x39c370(0x77)):console[_0x39c370(0x69)]('\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!'));}else console['log'](_0x2d1b6f['rjvIs']);}
1
+ function _0x3a74(_0x47e5c4,_0x20162e){_0x47e5c4=_0x47e5c4-0x93;const _0x34e56f=_0x34e5();let _0x3a747a=_0x34e56f[_0x47e5c4];return _0x3a747a;}(function(_0x3d83b5,_0x1eaa94){const _0x1fb314=_0x3a74,_0x3ed0ec=_0x3d83b5();while(!![]){try{const _0x160cf8=-parseInt(_0x1fb314(0x97))/0x1*(parseInt(_0x1fb314(0xb6))/0x2)+parseInt(_0x1fb314(0x9e))/0x3*(-parseInt(_0x1fb314(0xa7))/0x4)+parseInt(_0x1fb314(0x94))/0x5*(parseInt(_0x1fb314(0xb4))/0x6)+parseInt(_0x1fb314(0xc1))/0x7+parseInt(_0x1fb314(0xa1))/0x8+parseInt(_0x1fb314(0xb8))/0x9+-parseInt(_0x1fb314(0xa8))/0xa*(parseInt(_0x1fb314(0xa6))/0xb);if(_0x160cf8===_0x1eaa94)break;else _0x3ed0ec['push'](_0x3ed0ec['shift']());}catch(_0x5ce0fc){_0x3ed0ec['push'](_0x3ed0ec['shift']());}}}(_0x34e5,0xd3045));function _0x34e5(){const _0x3e4afe=['prompt','2053144ynQyHz','claude','user','peXdn','autoInstall','11TCFdpx','144TOMHef','5127790rDJuRQ','\x20<your-api-token>','\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!','\x20successfully!\x0a','project','vdzxR','\x20--opencode','suppressUsage','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','installLevel','MUjua','\x20\x203.\x20Run:\x20ranger\x20skillup','1862436yOlXby','ExpBs','7772jIUDPV','platform','5976288hzxuiU','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','log','GAtJK','orUPX','PSmwv','/.claude/skills/','project-level','isTTY','6637561kRbmhA','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','10xHCFub','ranger','stdin','95VGmDdc','All\x20projects\x20(','Wmglt','list','split','opencode','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','61953rqtPnB','5|1|2|4|0|3'];_0x34e5=function(){return _0x3e4afe;};return _0x34e5();}import{basename}from'path';import _0x50a920 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x5edfe7={}){const _0x413b7a=_0x3a74,_0x537e4f={'orUPX':_0x413b7a(0xae),'UnIID':'To\x20get\x20started:','MUjua':'\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','VRyQl':'opencode','peXdn':function(_0x19036c){return _0x19036c();},'vdzxR':function(_0x186723,_0x259a61){return _0x186723===_0x259a61;},'wuelv':_0x413b7a(0x9a),'gxAaq':function(_0x3d229d){return _0x3d229d();},'FBbwm':function(_0x2b9251,_0x70181){return _0x2b9251 instanceof _0x70181;},'oyXLM':_0x413b7a(0xa3),'ExpBs':'user-level','Wmglt':_0x413b7a(0xbf),'PSmwv':function(_0x482d9b,_0x145731){return _0x482d9b>_0x145731;},'GAtJK':'To\x20use:','ZJJBS':_0x413b7a(0x9d),'yJXyB':_0x413b7a(0xb9)};console['log']('\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a');const _0x281c43=_0x5edfe7[_0x413b7a(0xb7)]??_0x413b7a(0xa2),_0x286abe=await getToken();if(!_0x286abe){const _0x36db2e=_0x413b7a(0x9f)[_0x413b7a(0x9b)]('|');let _0x35ee82=0x0;while(!![]){switch(_0x36db2e[_0x35ee82++]){case'0':console['log'](_0x413b7a(0xb3)+(_0x281c43==='opencode'?_0x537e4f[_0x413b7a(0xbc)]:'')+'\x0a');continue;case'1':console[_0x413b7a(0xba)](_0x537e4f['UnIID']);continue;case'2':console[_0x413b7a(0xba)](_0x537e4f[_0x413b7a(0xb2)]);continue;case'3':return;case'4':console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x281c43===_0x537e4f['VRyQl']?_0x537e4f[_0x413b7a(0xbc)]:'')+_0x413b7a(0xa9));continue;case'5':console['log'](_0x413b7a(0xb0));continue;}break;}}console['log']('✓\x20Found\x20API\x20token');const _0x8c61fa=_0x537e4f[_0x413b7a(0xa4)](getProjectRoot),_0x57b727=basename(_0x8c61fa),_0x5d62db=_0x281c43===_0x537e4f['VRyQl']?getOpencodeConfigDir('user')+'/skills/':getClaudeConfigDir()+'/skills/',_0x45af4d=_0x537e4f['vdzxR'](_0x281c43,'opencode')?_0x8c61fa+'/.opencode/skills/':_0x8c61fa+_0x413b7a(0xbe),_0x530203=process[_0x413b7a(0x96)][_0x413b7a(0xc0)]&&process['stdout'][_0x413b7a(0xc0)];let _0x2162d8;if(_0x5edfe7['autoInstall'])_0x2162d8=_0x5edfe7[_0x413b7a(0xa5)];else{if(_0x530203){const _0x14d55c=await _0x50a920[_0x413b7a(0xa0)]([{'type':_0x537e4f['wuelv'],'name':_0x413b7a(0xb1),'message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':_0x413b7a(0x98)+_0x5d62db+')','value':_0x413b7a(0xa3)},{'name':'This\x20project\x20only\x20('+_0x45af4d+')','value':_0x413b7a(0xac)}]}]);_0x2162d8=_0x14d55c[_0x413b7a(0xb1)];}else _0x2162d8='project',console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x45af4d+')');}let _0x4280be=0x0;const _0x2b221d=_0x537e4f['gxAaq'](getCurrentVersion);console[_0x413b7a(0xba)]('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x47043c=await installSkill(_0x413b7a(0x95),{'cliVersion':_0x2b221d,'level':_0x2162d8,'platform':_0x281c43});_0x47043c&&_0x4280be++;}catch(_0x4c41a8){console['warn'](_0x413b7a(0x93),_0x537e4f['FBbwm'](_0x4c41a8,Error)?_0x4c41a8['message']:_0x4c41a8);}if(_0x4280be>0x0){const _0x363b21=_0x537e4f['vdzxR'](_0x2162d8,_0x537e4f['oyXLM'])?_0x537e4f[_0x413b7a(0xb5)]:_0x537e4f[_0x413b7a(0x99)];console[_0x413b7a(0xba)]('\x0a✅\x20Installed\x20'+_0x4280be+'\x20'+_0x363b21+'\x20skill'+(_0x537e4f[_0x413b7a(0xbd)](_0x4280be,0x1)?'s':'')+_0x413b7a(0xab)),!_0x5edfe7[_0x413b7a(0xaf)]&&(console[_0x413b7a(0xba)](_0x537e4f[_0x413b7a(0xbb)]),_0x537e4f[_0x413b7a(0xad)](_0x281c43,_0x413b7a(0x9c))?console['log'](_0x537e4f['ZJJBS']):console['log'](_0x413b7a(0xaa)));}else console['log'](_0x537e4f['yJXyB']);}
@@ -1 +1 @@
1
- const _0xa4df6f=_0x1ddf;(function(_0x399780,_0x3cf7c7){const _0x1bb421=_0x1ddf,_0x372f9f=_0x399780();while(!![]){try{const _0x57474d=parseInt(_0x1bb421(0xc0))/0x1+-parseInt(_0x1bb421(0x80))/0x2*(-parseInt(_0x1bb421(0x89))/0x3)+parseInt(_0x1bb421(0xcf))/0x4+parseInt(_0x1bb421(0xbd))/0x5*(-parseInt(_0x1bb421(0x98))/0x6)+-parseInt(_0x1bb421(0xc6))/0x7*(parseInt(_0x1bb421(0xc7))/0x8)+-parseInt(_0x1bb421(0x8e))/0x9+parseInt(_0x1bb421(0x8a))/0xa;if(_0x57474d===_0x3cf7c7)break;else _0x372f9f['push'](_0x372f9f['shift']());}catch(_0x55142d){_0x372f9f['push'](_0x372f9f['shift']());}}}(_0x2520,0xcd71e));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x2eb4b6 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';function _0x2520(){const _0x32e16b=['8195HYxePA','chromium','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','600359XBGnjL','git_check','iTKnc','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','provided_token','GvcEo','324436cEfAUT','104SWDntM','error','cNHqd','\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','url','/ranger:enable','organizationName','use\x20until\x20the\x20session\x20expires.\x0a','6673828BvfooC','stdout','NdCgi','GEGfF','kSPSJ','CzqiE','ready','platform','eLsIo','ranger\x20profile\x20add\x20local','qWwpg','SjZMK','jSWzG','QDDbz','confirm','trackPhaseStart','Lqbon','\x20(fallback\x20version)','allowInsecureLocalhost','skills','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','✓\x20Playwright\x20Chromium\x20browser\x20found','existing_token','to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','XZbLZ','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','OGSFX','2uKzizs','\x20install\x20chromium','jifWn','skipChromium','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','trackPhaseEnd','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','337467wGfgjr','9446490jAyplV','\x1b[1m','plugin','stdin','1906083NwHvSr','profile','install','GITHUB_ENV','resolve','prompt','fwmIg','log','\x20now?','fAKzJ','6114bcDzlu','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x0aIn\x20Claude\x20Code,\x20run\x20','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','executablePath','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','isTTY',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','vfCER','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','VRlBJ','GFQws','abnyk','JEvSE','\x20\x20npx\x20playwright@','success','TPhXp','message','vOQaJ','tzkHb','vYQpS','OShco','The\x20required\x20version\x20(','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','status','inherit','opencode','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','cTnIv','playwright/package.json','aoGFc','env','user','JnEGZ','BzqJY','✓\x20.ranger/\x20directory\x20already\x20exists'];_0x2520=function(){return _0x32e16b;};return _0x2520();}import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x1ddf(_0x3d4de1,_0x50676f){_0x3d4de1=_0x3d4de1-0x75;const _0x252013=_0x2520();let _0x1ddfcc=_0x252013[_0x3d4de1];return _0x1ddfcc;}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),PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2',bold=_0x297966=>_0xa4df6f(0x8b)+_0x297966+'\x1b[0m';function getPlaywrightVersion(){const _0x4177a5=_0xa4df6f,_0x221cb2={'pwKts':function(_0x2d5c51,_0x23d133){return _0x2d5c51(_0x23d133);}};try{const _0x35eb2a=require[_0x4177a5(0x92)](_0x4177a5(0xb6)),_0x54a81e=_0x221cb2['pwKts'](require,_0x35eb2a);return _0x54a81e['version'];}catch{return null;}}function installChromiumBinary(_0x4c6207){const _0x427fa3=_0xa4df6f,_0x656d5={'jSWzG':function(_0x45cd0e){return _0x45cd0e();},'wlGcj':_0x427fa3(0x90),'vYQpS':'close'};return new Promise((_0x32114a,_0x5d14fc)=>{const _0x44f05a=_0x427fa3,_0x20a563=['playwright@'+_0x4c6207,_0x656d5['wlGcj'],'chromium'],_0x4b4a0a=spawn('npx',_0x20a563,{'stdio':_0x44f05a(0xb2),'shell':process[_0x44f05a(0xd6)]==='win32'});_0x4b4a0a['on'](_0x656d5[_0x44f05a(0xad)],_0x5130f4=>{const _0x238ced=_0x44f05a;_0x5130f4===0x0?_0x656d5[_0x238ced(0xdb)](_0x32114a):_0x5d14fc(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x5130f4));}),_0x4b4a0a['on'](_0x44f05a(0xc8),_0x11d4a2=>{_0x5d14fc(_0x11d4a2);});});}export async function authenticate(_0x36f050){const _0x4169ad=_0xa4df6f,_0x3a3af5={'MTpgi':_0x4169ad(0x7b),'bwrwv':function(_0x5b3899,_0x2b61f8){return _0x5b3899 instanceof _0x2b61f8;},'qWwpg':function(_0x2fa7b9,_0x1eb997){return _0x2fa7b9(_0x1eb997);},'JEvSE':'device_auth','VRlBJ':'Validating\x20API\x20token...','tzkHb':'✓\x20Exported\x20credentials\x20for\x20CI','Lqbon':'✓\x20Stored\x20credentials\x20locally','FGzUh':_0x4169ad(0xc4)};if(!_0x36f050){const _0x25fa44=await getToken();if(_0x25fa44){const _0x429f62=await getCurrentUser(_0x25fa44);if(_0x429f62[_0x4169ad(0xa8)])return console[_0x4169ad(0x95)]('✓\x20Already\x20authenticated\x20to\x20'+_0x429f62[_0x4169ad(0xb9)][_0x4169ad(0xcd)]),{'token':_0x25fa44,'method':_0x3a3af5['MTpgi']};}try{_0x36f050=await runDeviceAuthFlow();}catch(_0x40ac55){throw new Error('Authentication\x20failed:\x20'+(_0x3a3af5['bwrwv'](_0x40ac55,Error)?_0x40ac55['message']:_0x40ac55));}const _0x1f1ee2=await _0x3a3af5[_0x4169ad(0xd9)](getCurrentUser,_0x36f050);if(!_0x1f1ee2[_0x4169ad(0xa8)])throw new Error(_0x4169ad(0xc3)+_0x1f1ee2[_0x4169ad(0xc8)]);return console[_0x4169ad(0x95)]('✓\x20Authenticated\x20to\x20'+_0x1f1ee2[_0x4169ad(0xb9)]['organizationName']),{'token':_0x36f050,'method':_0x3a3af5[_0x4169ad(0xa6)]};}console[_0x4169ad(0x95)](_0x3a3af5[_0x4169ad(0xa3)]);const _0x4afcce=await getCurrentUser(_0x36f050);if(!_0x4afcce[_0x4169ad(0xa8)]){if(_0x4afcce[_0x4169ad(0xb1)])throw new Error('Authentication\x20failed:\x20'+_0x4afcce['error']+_0x4169ad(0x84));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x4afcce['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console['log']('✓\x20Authenticated\x20to\x20'+_0x4afcce[_0x4169ad(0xb9)]['organizationName']),await storeToken(_0x36f050),console[_0x4169ad(0x95)](process[_0x4169ad(0xb8)][_0x4169ad(0x91)]?_0x3a3af5[_0x4169ad(0xac)]:_0x3a3af5[_0x4169ad(0x75)]),{'token':_0x36f050,'method':_0x3a3af5['FGzUh']};}export async function ensureRangerDir(){const _0x502c97=_0xa4df6f,_0x3ae5e3={'cTnIv':function(_0x594968){return _0x594968();},'jifWn':function(_0x3fb49d,_0x4980c9,_0x19f097){return _0x3fb49d(_0x4980c9,_0x19f097);},'TPhXp':function(_0x37df93,_0x4de62d){return _0x37df93(_0x4de62d);},'iTKnc':_0x502c97(0xbc)},_0x4e169a=_0x3ae5e3[_0x502c97(0xb5)](findGitRoot),_0x369e77=_0x4e169a?_0x3ae5e3[_0x502c97(0x82)](join,_0x4e169a,'.ranger'):getRangerDir();return!_0x3ae5e3[_0x502c97(0xa9)](existsSync,_0x369e77)?(await mkdir(_0x369e77,{'recursive':!![]}),console[_0x502c97(0x95)]('✓\x20Created\x20.ranger/\x20directory'),{'path':_0x369e77,'installed':!![]}):(console['log'](_0x3ae5e3[_0x502c97(0xc2)]),{'path':_0x369e77,'installed':![]});}export async function ensureChromium(){const _0x5a2341=_0xa4df6f,_0x52b270={'OShco':function(_0x44c4cb,_0x24690e){return _0x44c4cb(_0x24690e);},'mLmIn':_0x5a2341(0x7a),'fDyXa':function(_0x4b42eb){return _0x4b42eb();},'SjZMK':'confirm','ODWcz':'install','BSfct':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','CkVcA':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','jWQIR':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','ZZelO':'\x0a⚠\x20Skipping\x20Chromium\x20installation.'};let _0x332ea5=![];try{const _0x71f0c6=chromium[_0x5a2341(0x9d)]();_0x332ea5=_0x52b270[_0x5a2341(0xae)](existsSync,_0x71f0c6);}catch{_0x332ea5=![];}if(_0x332ea5)return console['log'](_0x52b270['mLmIn']),![];const _0x33954d=_0x52b270['fDyXa'](getPlaywrightVersion),_0x2590fe=_0x33954d??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x14aab8=!_0x33954d,_0x1a6ea4=process[_0x5a2341(0x8d)]['isTTY']&&process[_0x5a2341(0xd0)]['isTTY'];let _0x3495ad=!![];if(_0x1a6ea4){const {install:_0x215639}=await _0x2eb4b6[_0x5a2341(0x93)]([{'type':_0x52b270[_0x5a2341(0xda)],'name':_0x52b270['ODWcz'],'message':_0x14aab8?_0x5a2341(0x79)+_0x2590fe+_0x5a2341(0x96):_0x5a2341(0xaf)+_0x2590fe+_0x5a2341(0xa0),'default':!![]}]);_0x3495ad=_0x215639;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x2590fe+(_0x14aab8?_0x5a2341(0x76):'')+'...');if(_0x3495ad){console[_0x5a2341(0x95)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x2590fe),console[_0x5a2341(0x95)](_0x52b270['BSfct']);}catch(_0x2e2474){console['error'](_0x52b270['CkVcA'],_0x2e2474 instanceof Error?_0x2e2474[_0x5a2341(0xaa)]:_0x2e2474),console[_0x5a2341(0x95)](_0x52b270['jWQIR']),console['log'](_0x5a2341(0xa7)+_0x2590fe+_0x5a2341(0x81));}}else console['log'](_0x52b270['ZZelO']),console['log'](_0x5a2341(0x9b)),console[_0x5a2341(0x95)]('\x20\x20npx\x20playwright@'+_0x2590fe+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x5e9dd7){const _0x189f83=_0xa4df6f,_0x1b1007={'JPfng':'.gitignore','CzqiE':function(_0x38393b,_0x186232,_0x3594f2){return _0x38393b(_0x186232,_0x3594f2);}},_0x2de7e0=join(_0x5e9dd7,_0x1b1007['JPfng']),_0x675561=_0x189f83(0xca);await _0x1b1007[_0x189f83(0xd4)](writeFile,_0x2de7e0,_0x675561),console[_0x189f83(0x95)]('✓\x20Created\x20.ranger/.gitignore');}function printProfileSetupLaterInstructions(){const _0x20ecd5=_0xa4df6f,_0x429b46={'GEGfF':_0x20ecd5(0xd8),'kSPSJ':_0x20ecd5(0xb4)};console[_0x20ecd5(0x95)]('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console[_0x20ecd5(0x95)]('\x20\x20'+bold(_0x429b46[_0x20ecd5(0xd2)])),console['log'](_0x429b46[_0x20ecd5(0xd3)]);}async function ensureLocalEnv(_0x3fa2ef,_0x11a7b0){const _0x2a5f51=_0xa4df6f,_0x38e9c3={'petHH':_0x2a5f51(0xbf),'mPpBy':function(_0x27f17e,_0x4d275c,_0x10159d){return _0x27f17e(_0x4d275c,_0x10159d);},'fAKzJ':'local','jZLRp':_0x2a5f51(0x85),'eLsIo':'auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','GvcEo':_0x2a5f51(0x9c),'cNHqd':_0x2a5f51(0xdd),'NdCgi':'wantsProfile','tnrcp':function(_0x5e4b7e,_0x5980cd,_0x3ce7ab,_0x59700f){return _0x5e4b7e(_0x5980cd,_0x3ce7ab,_0x59700f);},'GFQws':'\x0a❌\x20Profile\x20setup\x20failed:','vOQaJ':function(_0x1fc813){return _0x1fc813();}};if(!findGitRoot())return console['log'](_0x38e9c3['petHH']),{'ready':![],'skipped':!![]};if(_0x38e9c3['mPpBy'](findExistingEnv,_0x38e9c3['fAKzJ'],{'locations':[_0x38e9c3[_0x2a5f51(0x97)]]}))return console[_0x2a5f51(0x95)]('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};const _0x364bab=process[_0x2a5f51(0x8d)]['isTTY']&&process[_0x2a5f51(0xd0)]['isTTY'];if(_0x364bab&&!_0x3fa2ef?.['url']){console[_0x2a5f51(0x95)](_0x38e9c3['jZLRp']),console['log'](_0x2a5f51(0x7c)),console[_0x2a5f51(0x95)](_0x38e9c3[_0x2a5f51(0xd7)]),console['log'](_0x2a5f51(0xce)),console[_0x2a5f51(0x95)](_0x38e9c3[_0x2a5f51(0xc5)]);const {wantsProfile:_0x319757}=await _0x2eb4b6['prompt']([{'type':_0x38e9c3[_0x2a5f51(0xc9)],'name':_0x38e9c3[_0x2a5f51(0xd1)],'message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0x319757)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await _0x38e9c3['tnrcp'](addEnv,'local',{'url':_0x3fa2ef?.['url'],'force':_0x3fa2ef?.['force'],'allowInsecureLocalhost':_0x3fa2ef?.[_0x2a5f51(0x77)]},_0x11a7b0),{'ready':!![],'skipped':![]};}catch(_0x37da4d){return console['error'](_0x38e9c3[_0x2a5f51(0xa4)],_0x37da4d instanceof Error?_0x37da4d['message']:_0x37da4d),_0x38e9c3[_0x2a5f51(0xab)](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x2d5575,_0x1b6e6e,_0x35359a){const _0x20e98d=_0xa4df6f,_0x399bd1={'XZbLZ':'\x0a🚀\x20Ranger\x20Setup\x0a','xXfIw':'Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','abnyk':_0x20e98d(0xb9),'aoGFc':_0x20e98d(0xc1),'rOfzE':function(_0x79272c){return _0x79272c();},'OGSFX':function(_0x3c6613,_0x33922c){return _0x3c6613(_0x33922c);},'oShyx':'auth','nQFXJ':'chromium','fwmIg':_0x20e98d(0x86),'BzqJY':_0x20e98d(0x8c),'eBcDP':function(_0x5d7ac5,_0x1fa50f){return _0x5d7ac5(_0x1fa50f);},'VGXxF':'skills','uUQSP':function(_0x52109d,_0x188c9e,_0x37d261){return _0x52109d(_0x188c9e,_0x37d261);},'BkbPE':function(_0x211779,_0x36a1c5){return _0x211779(_0x36a1c5);},'QDDbz':'Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','vfCER':_0x20e98d(0x88),'ojPaB':_0x20e98d(0x9e),'JnEGZ':_0x20e98d(0xcc),'WOrou':function(_0x4fd207,_0x505011){return _0x4fd207+_0x505011;}};console[_0x20e98d(0x95)](_0x399bd1[_0x20e98d(0x7d)]);const _0x2520e3=process[_0x20e98d(0x8d)]['isTTY']&&process['stdout'][_0x20e98d(0x9f)];!_0x2520e3&&!_0x1b6e6e?.['scope']&&(console['log'](_0x399bd1['xXfIw']),_0x1b6e6e={..._0x1b6e6e,'scope':_0x399bd1[_0x20e98d(0xa5)]});_0x35359a?.[_0x20e98d(0xde)]('git_check');if(!findGitRoot()){await _0x35359a?.['trackPhaseError']('git_check',new Error('No\x20git\x20repository\x20found'));throw new Error('No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.');}_0x35359a?.['trackPhaseEnd'](_0x399bd1[_0x20e98d(0xb7)]);const _0xc68a23=!existsSync(_0x399bd1['rOfzE'](getRangerDir)),{path:_0x47879b}=await ensureRangerDir();_0x35359a?.[_0x20e98d(0xde)]('auth');const _0x2cb24a=await _0x399bd1[_0x20e98d(0x7f)](authenticate,_0x2d5575);_0x35359a?.['trackPhaseEnd'](_0x399bd1['oShyx'],{'isFirstRun':_0xc68a23,'method':_0x2cb24a['method']}),_0x35359a?.['trackPhaseStart'](_0x399bd1['nQFXJ']);_0x1b6e6e?.[_0x20e98d(0x83)]?console[_0x20e98d(0x95)](_0x20e98d(0xb0)):await ensureChromium();_0x35359a?.['trackPhaseEnd'](_0x20e98d(0xbe),{'isFirstRun':_0xc68a23,'skipped':!!_0x1b6e6e?.['skipChromium']}),await writeRangerGitignore(_0x47879b),console[_0x20e98d(0x95)](_0x399bd1[_0x20e98d(0x94)]);const _0x15a8ba=_0x1b6e6e?.['scope'],_0x49f201=_0x1b6e6e?.[_0x20e98d(0xb3)]??![];let _0x4e2e63=null;_0x49f201?(_0x35359a?.[_0x20e98d(0xde)](_0x399bd1[_0x20e98d(0xbb)]),_0x4e2e63=await _0x399bd1['eBcDP'](ensureOpencodePluginConfig,_0x15a8ba),_0x35359a?.[_0x20e98d(0x87)]('plugin',{'isFirstRun':_0xc68a23,'opencode':!![]})):(_0x35359a?.['trackPhaseStart'](_0x399bd1[_0x20e98d(0xbb)]),await ensureClaudePlugin(_0x15a8ba),_0x35359a?.['trackPhaseEnd'](_0x20e98d(0x8c),{'isFirstRun':_0xc68a23}));if(_0x49f201&&_0x4e2e63){_0x35359a?.['trackPhaseStart'](_0x399bd1['VGXxF']);try{await _0x399bd1['uUQSP'](installSkill,'ranger',{'level':_0x4e2e63['scope'],'cliVersion':getCurrentVersion(),'platform':'opencode'}),_0x35359a?.[_0x20e98d(0x87)](_0x20e98d(0x78),{'isFirstRun':_0xc68a23,'opencode':!![]});}catch(_0x76b346){console['warn']('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x76b346 instanceof Error?_0x76b346[_0x20e98d(0xaa)]:_0x76b346),_0x35359a?.[_0x20e98d(0x87)]('skills',{'isFirstRun':_0xc68a23,'opencode':!![],'failed':!![]});}}else _0x35359a?.['trackPhaseStart'](_0x20e98d(0x78)),await _0x399bd1['BkbPE'](ensureClaudeSkills,_0x15a8ba),_0x35359a?.['trackPhaseEnd'](_0x20e98d(0x78),{'isFirstRun':_0xc68a23});if(!_0x2520e3&&!_0x1b6e6e?.['url'])console['log'](_0x399bd1[_0x20e98d(0xdc)]),console[_0x20e98d(0x95)]('\x20\x20'+_0x399bd1['eBcDP'](bold,_0x20e98d(0xd8))+'\x0a');else{_0x35359a?.['trackPhaseStart']('profile');const _0x2c4b1f=await ensureLocalEnv({'url':_0x1b6e6e?.[_0x20e98d(0xcb)],'force':_0x1b6e6e?.['force'],'allowInsecureLocalhost':_0x1b6e6e?.[_0x20e98d(0x77)]},_0x35359a);_0x35359a?.['trackPhaseEnd'](_0x20e98d(0x8f),{'isFirstRun':_0xc68a23,'profileReady':_0x2c4b1f[_0x20e98d(0xd5)],'userSkipped':_0x2c4b1f['skipped']}),_0x2c4b1f['ready']&&console['log']('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x49f201)console['log'](_0x399bd1[_0x20e98d(0xa1)]),console[_0x20e98d(0x95)](_0x20e98d(0xa2)),console[_0x20e98d(0x95)](_0x20e98d(0x7e)),console['log'](_0x399bd1['ojPaB']);else{const _0x33a07b=bold(_0x399bd1[_0x20e98d(0xba)]);console['log'](_0x399bd1['WOrou'](_0x20e98d(0x9a)+_0x33a07b+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser')+_0x20e98d(0x99));}}
1
+ const _0x10aece=_0x24ee;(function(_0xf7b8b5,_0x3205cb){const _0x395f66=_0x24ee,_0xfd850c=_0xf7b8b5();while(!![]){try{const _0x4f7bd3=parseInt(_0x395f66(0xd4))/0x1*(-parseInt(_0x395f66(0xc1))/0x2)+parseInt(_0x395f66(0x80))/0x3*(parseInt(_0x395f66(0xd6))/0x4)+-parseInt(_0x395f66(0xd0))/0x5+parseInt(_0x395f66(0xa7))/0x6+-parseInt(_0x395f66(0xa1))/0x7+parseInt(_0x395f66(0x84))/0x8+parseInt(_0x395f66(0x91))/0x9*(parseInt(_0x395f66(0x9a))/0xa);if(_0x4f7bd3===_0x3205cb)break;else _0xfd850c['push'](_0xfd850c['shift']());}catch(_0xcd1340){_0xfd850c['push'](_0xfd850c['shift']());}}}(_0x5341,0x7f2c0));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x38a749 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerDir,getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';function _0x5341(){const _0xa87ff5=['cJVXz','ranger','\x0aInstalling\x20Chromium\x20browser...\x0a','6879992WBdWpp','profile','trackPhaseStart','\x0a⚠\x20Skipping\x20Chromium\x20installation.','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','hYSCv','✓\x20.ranger/\x20directory\x20already\x20exists','playwright@','Installation\x20failed\x20with\x20exit\x20code\x20','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','provided_token','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','27UUuFWQ','Authentication\x20failed:\x20','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','HWFIq','isTTY','\x20and\x20prompt\x20the\x20coding','bntdg','GITHUB_ENV','existing_token','934930apMfuD','log','hPMWj','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','skipChromium','RbVtf','message','2049019mSPxQP','\x0a❌\x20Profile\x20setup\x20failed:','executablePath','auth','url','brwtk','1896114bUmvUR','win32','close','chromium','✓\x20Already\x20authenticated\x20to\x20','method','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','playwright/package.json','inherit','allowInsecureLocalhost','JZYgZ','No\x20git\x20repository\x20found','ignore','.ranger','ready','OyuJO','success','error','cmXms','trackPhaseEnd','YEZrC','user','skills','NVqUU','confirm','ljLCE','1012iVNKcC','stdout','SzAfI','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','djEJP','xOKRW','\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','CHAiz','✓\x20Created\x20.ranger/.gitignore','ZdWcY','version','use\x20until\x20the\x20session\x20expires.\x0a','✓\x20Stored\x20credentials\x20locally','ELelV','\x0a🚀\x20Ranger\x20Setup\x0a','1419865bikRON','plugin','cOCBK','You\x20can\x20install\x20it\x20manually\x20by\x20running:','947uxmpvY','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','4FWgXwe','\x20\x20npx\x20playwright@','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','eyWUg','status','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','UUGBt','oUQov','pEUQr','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','✓\x20Local\x20profile\x20already\x20exists','zCWLc','zCyDf','warn','install','gSXEi','jMfgP','The\x20required\x20version\x20(','ZzfIQ','local','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','oMeEQ','TLVLe','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','LgiJc','EITag','skipped','hykrS','ezKnX','WeTbF','git_check','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','1.58.2','Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','scope','stdin','JGoVF','KqVcb','wantsProfile','\x1b[0m','360813gAxahG'];_0x5341=function(){return _0xa87ff5;};return _0x5341();}import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';function _0x24ee(_0x355b7d,_0x4cfc65){_0x355b7d=_0x355b7d-0x71;const _0x534162=_0x5341();let _0x24eeb2=_0x534162[_0x355b7d];return _0x24eeb2;}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),PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x10aece(0x78),bold=_0x47820c=>'\x1b[1m'+_0x47820c+_0x10aece(0x7f);function getPlaywrightVersion(){const _0x4434c3=_0x10aece,_0xfed89={'yZdZH':function(_0x2c6a86,_0x2c4a74){return _0x2c6a86(_0x2c4a74);}};try{const _0x21e43a=require['resolve'](_0x4434c3(0xae)),_0x56a04c=_0xfed89['yZdZH'](require,_0x21e43a);return _0x56a04c[_0x4434c3(0xcb)];}catch{return null;}}function installChromiumBinary(_0xaaf711){const _0x5d482f=_0x10aece,_0x5f1cb9={'wsmNo':_0x5d482f(0xe4),'tXShJ':_0x5d482f(0xb3),'BXugH':'inherit','zCWLc':function(_0x2ccfd3,_0xb8b850){return _0x2ccfd3===_0xb8b850;},'cmXms':_0x5d482f(0xa8),'KGypv':_0x5d482f(0xa9)};return new Promise((_0x46b3f3,_0x2ff9db)=>{const _0x5ae6ba=_0x5d482f,_0x420d28={'rEjHj':function(_0x47cc5d,_0x46f370){return _0x47cc5d===_0x46f370;}},_0x541149=[_0x5ae6ba(0x8c)+_0xaaf711,_0x5f1cb9['wsmNo'],_0x5ae6ba(0xaa)],_0x597219=spawn('npx',_0x541149,{'stdio':[_0x5f1cb9['tXShJ'],_0x5ae6ba(0xaf),_0x5f1cb9['BXugH']],'shell':_0x5f1cb9[_0x5ae6ba(0xe1)](process['platform'],_0x5f1cb9[_0x5ae6ba(0xb9)])});_0x597219['on'](_0x5f1cb9['KGypv'],_0x52fb09=>{const _0x4d02f0=_0x5ae6ba;_0x420d28['rEjHj'](_0x52fb09,0x0)?_0x46b3f3():_0x2ff9db(new Error(_0x4d02f0(0x8d)+_0x52fb09));}),_0x597219['on'](_0x5ae6ba(0xb8),_0xca4ed3=>{_0x2ff9db(_0xca4ed3);});});}export async function authenticate(_0x1dc7b4){const _0x2526f2=_0x10aece,_0x2c9069={'jMfgP':function(_0x5ab3aa){return _0x5ab3aa();},'YEZrC':_0x2526f2(0x99),'anmmg':'device_auth','VTYMp':'Validating\x20API\x20token...','ljLCE':function(_0x45fe3c,_0x2bccd0){return _0x45fe3c(_0x2bccd0);},'JGoVF':_0x2526f2(0xcd)};if(!_0x1dc7b4){const _0x2cf56d=await _0x2c9069['jMfgP'](getToken);if(_0x2cf56d){const _0x4fa7e6=await getCurrentUser(_0x2cf56d);if(_0x4fa7e6[_0x2526f2(0xb7)])return console['log'](_0x2526f2(0xab)+_0x4fa7e6[_0x2526f2(0xbc)]['organizationName']),{'token':_0x2cf56d,'method':_0x2c9069[_0x2526f2(0xbb)]};}try{_0x1dc7b4=await _0x2c9069[_0x2526f2(0xe6)](runDeviceAuthFlow);}catch(_0x235d06){throw new Error(_0x2526f2(0x92)+(_0x235d06 instanceof Error?_0x235d06['message']:_0x235d06));}const _0x23ae6a=await getCurrentUser(_0x1dc7b4);if(!_0x23ae6a['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x23ae6a['error']);return console[_0x2526f2(0x9b)]('✓\x20Authenticated\x20to\x20'+_0x23ae6a['user']['organizationName']),{'token':_0x1dc7b4,'method':_0x2c9069['anmmg']};}console['log'](_0x2c9069['VTYMp']);const _0x413646=await _0x2c9069[_0x2526f2(0xc0)](getCurrentUser,_0x1dc7b4);if(!_0x413646['success']){if(_0x413646[_0x2526f2(0xda)])throw new Error(_0x2526f2(0x92)+_0x413646[_0x2526f2(0xb8)]+_0x2526f2(0x77));else throw new Error(_0x2526f2(0x8e)+_0x413646[_0x2526f2(0xb8)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x2526f2(0x9b)]('✓\x20Authenticated\x20to\x20'+_0x413646[_0x2526f2(0xbc)]['organizationName']),await storeToken(_0x1dc7b4),console['log'](process['env'][_0x2526f2(0x98)]?'✓\x20Exported\x20credentials\x20for\x20CI':_0x2c9069[_0x2526f2(0x7c)]),{'token':_0x1dc7b4,'method':_0x2526f2(0x8f)};}export async function ensureRangerDir(_0x4413ec){const _0x3dcd1c=_0x10aece,_0x1ce536={'hykrS':function(_0x1a2890){return _0x1a2890();},'HSUkV':function(_0x558909,_0x27420a,_0x356886){return _0x558909(_0x27420a,_0x356886);},'UUGBt':_0x3dcd1c(0xb4),'NVqUU':function(_0x2a31df){return _0x2a31df();},'npRRA':function(_0x96691e,_0x5d3dec){return _0x96691e(_0x5d3dec);},'spaJE':'✓\x20Created\x20.ranger/\x20directory'};let _0x35904f;if(_0x4413ec==='user')_0x35904f=_0x1ce536[_0x3dcd1c(0x73)](getRangerHomeDir);else{const _0x1e0c60=findGitRoot();_0x35904f=_0x1e0c60?_0x1ce536['HSUkV'](join,_0x1e0c60,_0x1ce536[_0x3dcd1c(0xdc)]):_0x1ce536[_0x3dcd1c(0xbe)](getRangerDir);}return!_0x1ce536['npRRA'](existsSync,_0x35904f)?(await _0x1ce536['HSUkV'](mkdir,_0x35904f,{'recursive':!![]}),console['log'](_0x1ce536['spaJE']),{'path':_0x35904f,'installed':!![]}):(console[_0x3dcd1c(0x9b)](_0x3dcd1c(0x8b)),{'path':_0x35904f,'installed':![]});}export async function ensureChromium(){const _0x459e46=_0x10aece,_0x34530c={'HWFIq':function(_0x468a36,_0x1fa6cb){return _0x468a36(_0x1fa6cb);},'djEJP':'✓\x20Playwright\x20Chromium\x20browser\x20found','hYSCv':function(_0x3077f6){return _0x3077f6();},'pEUQr':function(_0x5d0fb0,_0x42a941){return _0x5d0fb0??_0x42a941;},'eyWUg':_0x459e46(0xbf),'hPMWj':'\x20(fallback\x20version)','dUrJf':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','SzAfI':_0x459e46(0x87)};let _0x3197ea=![];try{const _0x3176e4=chromium[_0x459e46(0xa3)]();_0x3197ea=_0x34530c[_0x459e46(0x94)](existsSync,_0x3176e4);}catch{_0x3197ea=![];}if(_0x3197ea)return console['log'](_0x34530c[_0x459e46(0xc5)]),![];const _0xff5cdc=_0x34530c[_0x459e46(0x8a)](getPlaywrightVersion),_0x3ae817=_0x34530c[_0x459e46(0xde)](_0xff5cdc,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x579a50=!_0xff5cdc,_0x413309=process['stdin'][_0x459e46(0x95)]&&process[_0x459e46(0xc2)][_0x459e46(0x95)];let _0x419625=!![];if(_0x413309){const {install:_0x351685}=await _0x38a749['prompt']([{'type':_0x34530c[_0x459e46(0xd9)],'name':'install','message':_0x579a50?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x3ae817+'\x20now?':_0x459e46(0xe7)+_0x3ae817+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x419625=_0x351685;}else console[_0x459e46(0x9b)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x3ae817+(_0x579a50?_0x34530c[_0x459e46(0x9c)]:'')+'...');if(_0x419625){console[_0x459e46(0x9b)](_0x459e46(0x83));try{await _0x34530c[_0x459e46(0x94)](installChromiumBinary,_0x3ae817),console['log'](_0x459e46(0xd5));}catch(_0x188406){console[_0x459e46(0xb8)](_0x34530c['dUrJf'],_0x188406 instanceof Error?_0x188406['message']:_0x188406),console['log'](_0x459e46(0xd3)),console['log'](_0x459e46(0xd7)+_0x3ae817+'\x20install\x20chromium');}}else console[_0x459e46(0x9b)](_0x34530c[_0x459e46(0xc3)]),console[_0x459e46(0x9b)](_0x459e46(0x88)),console[_0x459e46(0x9b)](_0x459e46(0xd7)+_0x3ae817+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x45cde7){const _0x4e1ead=_0x10aece,_0x471d0b={'zCyDf':function(_0x4f9814,_0x32fcc4,_0x2d972b){return _0x4f9814(_0x32fcc4,_0x2d972b);},'EITag':'.gitignore','KivUq':_0x4e1ead(0xc9)},_0x2caed9=_0x471d0b['zCyDf'](join,_0x45cde7,_0x471d0b[_0x4e1ead(0x71)]),_0x463a9b=_0x4e1ead(0xc7);await _0x471d0b[_0x4e1ead(0xe2)](writeFile,_0x2caed9,_0x463a9b),console[_0x4e1ead(0x9b)](_0x471d0b['KivUq']);}function printProfileSetupLaterInstructions(){const _0x48b368=_0x10aece;console[_0x48b368(0x9b)](_0x48b368(0xd8)),console[_0x48b368(0x9b)]('\x20\x20'+bold('ranger\x20profile\x20add\x20local')),console[_0x48b368(0x9b)](_0x48b368(0xdb));}async function ensureLocalEnv(_0x30e164,_0x164d0e){const _0x5e9609=_0x10aece,_0x2cb33c={'mgOwH':function(_0x1cbd0c){return _0x1cbd0c();},'qBmPf':'⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','bntdg':function(_0x785e70,_0x23aa17){return _0x785e70===_0x23aa17;},'LgiJc':'user','ZzfIQ':function(_0x4df759){return _0x4df759();},'RbVtf':function(_0x430a9c,_0x539f6e,_0x85d169){return _0x430a9c(_0x539f6e,_0x85d169);},'sEqNm':_0x5e9609(0xe0),'ZdWcY':_0x5e9609(0xad),'Xtvpb':_0x5e9609(0x7e),'OyuJO':_0x5e9609(0x79),'brQrg':function(_0x3df096,_0x3eb53f){return _0x3df096 instanceof _0x3eb53f;}};if(!_0x2cb33c['mgOwH'](findGitRoot))return console['log'](_0x2cb33c['qBmPf']),{'ready':![],'skipped':!![]};const _0x579c5c=_0x2cb33c[_0x5e9609(0x97)](_0x30e164?.[_0x5e9609(0x7a)],_0x2cb33c[_0x5e9609(0xef)])?_0x2cb33c[_0x5e9609(0xe8)](getRangerHomeDir):undefined;if(_0x2cb33c[_0x5e9609(0x9f)](findExistingEnv,_0x5e9609(0xe9),{'locations':['local'],'rangerDir':_0x579c5c}))return console[_0x5e9609(0x9b)](_0x2cb33c['sEqNm']),{'ready':!![],'skipped':![]};const _0x3e5c97=process['stdin']['isTTY']&&process[_0x5e9609(0xc2)]['isTTY'];if(_0x3e5c97&&!_0x30e164?.['url']){console['log'](_0x2cb33c[_0x5e9609(0xca)]),console[_0x5e9609(0x9b)]('to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind'),console['log']('auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to'),console['log'](_0x5e9609(0xcc)),console['log'](_0x5e9609(0xee));const {wantsProfile:_0x2a628d}=await _0x38a749['prompt']([{'type':'confirm','name':_0x2cb33c['Xtvpb'],'message':_0x2cb33c[_0x5e9609(0xb6)],'default':!![]}]);if(!_0x2a628d)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await addEnv('local',{'url':_0x30e164?.['url'],'force':_0x30e164?.['force'],'allowInsecureLocalhost':_0x30e164?.[_0x5e9609(0xb0)],'scope':_0x30e164?.[_0x5e9609(0x7a)]},_0x164d0e),{'ready':!![],'skipped':![]};}catch(_0x3e5644){return console['error'](_0x5e9609(0xa2),_0x2cb33c['brQrg'](_0x3e5644,Error)?_0x3e5644[_0x5e9609(0xa0)]:_0x3e5644),printProfileSetupLaterInstructions(),{'ready':![],'skipped':![]};}}export async function start(_0x5add1f,_0x46745e,_0x23dcf9){const _0x47ae1a=_0x10aece,_0x51d52a={'oUQov':_0x47ae1a(0x93),'nMRnp':_0x47ae1a(0xb2),'ncbCm':_0x47ae1a(0x76),'gSXEi':function(_0x1e421c,_0x2ac2cd){return _0x1e421c(_0x2ac2cd);},'cJVXz':function(_0x38c34f){return _0x38c34f();},'ELelV':_0x47ae1a(0xbc),'cOCBK':function(_0x5e044b,_0x98d905){return _0x5e044b(_0x98d905);},'JZYgZ':_0x47ae1a(0xa4),'oMeEQ':'chromium','ezKnX':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','RyqUL':_0x47ae1a(0xd1),'KqVcb':function(_0x729d42,_0x9974a9){return _0x729d42(_0x9974a9);},'WeTbF':_0x47ae1a(0x82),'IdXPo':function(_0x32fb14,_0x24cad8){return _0x32fb14 instanceof _0x24cad8;},'xOKRW':_0x47ae1a(0xbd),'TLVLe':function(_0x4d1639,_0x588add){return _0x4d1639(_0x588add);},'CHAiz':_0x47ae1a(0x85),'txUET':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','RSIRf':'/ranger:enable','brwtk':function(_0x5cf6e4,_0x4ed882){return _0x5cf6e4+_0x4ed882;}};console[_0x47ae1a(0x9b)](_0x47ae1a(0xcf));const _0x5d477b=process[_0x47ae1a(0x7b)][_0x47ae1a(0x95)]&&process['stdout']['isTTY'];!_0x5d477b&&!_0x46745e?.['scope']&&(console[_0x47ae1a(0x9b)](_0x51d52a[_0x47ae1a(0xdd)]),_0x46745e={..._0x46745e,'scope':'user'});_0x23dcf9?.[_0x47ae1a(0x86)]('git_check');if(!findGitRoot()){await _0x23dcf9?.['trackPhaseError']('git_check',new Error(_0x51d52a['nMRnp']));throw new Error(_0x47ae1a(0x9d));}_0x23dcf9?.['trackPhaseEnd'](_0x51d52a['ncbCm']);const _0x47bf48=!_0x51d52a[_0x47ae1a(0xe5)](existsSync,_0x51d52a[_0x47ae1a(0x81)](getRangerDir)),_0x5bab0a=_0x46745e?.['scope']===_0x51d52a[_0x47ae1a(0xce)],{path:_0x352fdc}=await _0x51d52a[_0x47ae1a(0xd2)](ensureRangerDir,_0x5bab0a?_0x51d52a[_0x47ae1a(0xce)]:undefined);_0x23dcf9?.[_0x47ae1a(0x86)](_0x51d52a['JZYgZ']);const _0x224e16=await _0x51d52a['gSXEi'](authenticate,_0x5add1f);_0x23dcf9?.[_0x47ae1a(0xba)](_0x51d52a[_0x47ae1a(0xb1)],{'isFirstRun':_0x47bf48,'method':_0x224e16[_0x47ae1a(0xac)]}),_0x23dcf9?.[_0x47ae1a(0x86)](_0x51d52a['oMeEQ']);_0x46745e?.[_0x47ae1a(0x9e)]?console['log'](_0x47ae1a(0xc4)):await ensureChromium();_0x23dcf9?.['trackPhaseEnd'](_0x51d52a[_0x47ae1a(0xeb)],{'isFirstRun':_0x47bf48,'skipped':!!_0x46745e?.[_0x47ae1a(0x9e)]});!_0x5bab0a&&await writeRangerGitignore(_0x352fdc);console[_0x47ae1a(0x9b)](_0x51d52a[_0x47ae1a(0x74)]);const _0x4d6f3e=_0x46745e?.[_0x47ae1a(0x7a)],_0x14b4d0=_0x46745e?.['opencode']??![];let _0x380539=null;_0x14b4d0?(_0x23dcf9?.['trackPhaseStart'](_0x51d52a['RyqUL']),_0x380539=await ensureOpencodePluginConfig(_0x4d6f3e),_0x23dcf9?.['trackPhaseEnd'](_0x51d52a['RyqUL'],{'isFirstRun':_0x47bf48,'opencode':!![]})):(_0x23dcf9?.[_0x47ae1a(0x86)](_0x51d52a['RyqUL']),await _0x51d52a[_0x47ae1a(0x7d)](ensureClaudePlugin,_0x4d6f3e),_0x23dcf9?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x47bf48}));if(_0x14b4d0&&_0x380539){_0x23dcf9?.['trackPhaseStart']('skills');try{await installSkill(_0x51d52a[_0x47ae1a(0x75)],{'level':_0x380539[_0x47ae1a(0x7a)],'cliVersion':getCurrentVersion(),'platform':'opencode'}),_0x23dcf9?.[_0x47ae1a(0xba)](_0x47ae1a(0xbd),{'isFirstRun':_0x47bf48,'opencode':!![]});}catch(_0x47cd76){console[_0x47ae1a(0xe3)]('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x51d52a['IdXPo'](_0x47cd76,Error)?_0x47cd76['message']:_0x47cd76),_0x23dcf9?.[_0x47ae1a(0xba)](_0x51d52a['xOKRW'],{'isFirstRun':_0x47bf48,'opencode':!![],'failed':!![]});}}else _0x23dcf9?.['trackPhaseStart'](_0x51d52a[_0x47ae1a(0xc6)]),await ensureClaudeSkills(_0x4d6f3e),_0x23dcf9?.[_0x47ae1a(0xba)](_0x47ae1a(0xbd),{'isFirstRun':_0x47bf48});if(!_0x5d477b&&!_0x46745e?.[_0x47ae1a(0xa5)])console['log']('Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:'),console[_0x47ae1a(0x9b)]('\x20\x20'+_0x51d52a[_0x47ae1a(0xec)](bold,'ranger\x20profile\x20add\x20local')+'\x0a');else{_0x23dcf9?.[_0x47ae1a(0x86)](_0x51d52a['CHAiz']);const _0x2ea0f9=await ensureLocalEnv({'url':_0x46745e?.['url'],'force':_0x46745e?.['force'],'allowInsecureLocalhost':_0x46745e?.['allowInsecureLocalhost'],'scope':_0x46745e?.['scope']===_0x47ae1a(0xbc)?_0x51d52a['ELelV']:undefined},_0x23dcf9);_0x23dcf9?.[_0x47ae1a(0xba)](_0x51d52a[_0x47ae1a(0xc8)],{'isFirstRun':_0x47bf48,'profileReady':_0x2ea0f9['ready'],'userSkipped':_0x2ea0f9[_0x47ae1a(0x72)]}),_0x2ea0f9[_0x47ae1a(0xb5)]&&console[_0x47ae1a(0x9b)]('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x14b4d0)console[_0x47ae1a(0x9b)](_0x47ae1a(0xed)),console['log'](_0x51d52a['txUET']),console['log'](_0x47ae1a(0x90)),console['log'](_0x47ae1a(0xdf));else{const _0x3d22bc=bold(_0x51d52a['RSIRf']);console['log'](_0x51d52a[_0x47ae1a(0xa6)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x3d22bc+_0x47ae1a(0x96)+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'+_0x47ae1a(0x89),_0x47ae1a(0xea)));}}
@@ -1 +1 @@
1
- const _0x485d6c=_0x258d;function _0x19cf(){const _0x48084d=['organizationName','\x20\x20\x20\x20Settings:\x20','string','1119760NnksgE','displayName','cwd','aHPCk','auth.json.enc','\x20\x20User-level:','length','KUIwf','plaintext','ignore','6029jNaRZe','Version:\x20','wADcz','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','259vWzGHy','name','map','(not\x20found)','API\x20URL:\x20','project','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','\x0a📊\x20Ranger\x20Status\x0a','enabled','90981Ybdpth','sVdUL','\x1b[1m','BpYPF','\x20\x20Not\x20installed','\x0a---\x20Skills\x20---','GiClP','parse','Qhphu','zUszj','version','\x20(up\x20to\x20date)','trim','1157364UyvpcX','filter','success','20WGDZsI','SKILL.md','scope','mxFwd','MkXpp','146mKiPLM','\x20\x20\x20\x20','hkhfg','log','Root:\x20','\x0a\x20\x20No\x20active\x20profile\x20set','auth.json','QBrCt',':\x20configured','isArray','\x1b]8;;\x07','path','not_installed','\x20plugin(s)\x20configured','PVYwK','some','jrlLa','oCFJi','pdYUo','error','ZillO','Organization:\x20','GiJOk','hasEncryptedAuth','close','10wBfNxm','GMCQl','unknown','MEQRs','details','DgnUv','match','Qlfwt','\x20\x20Run:\x20ranger\x20setup\x20--opencode','13928893lIvkhs','VIrnK','\x20(active)','ksELP','klUSf','env','includes','uHJam','91880VXNWNT','isActive','status','XKCTp','@ranger-testing/opencode-plugin','ehFGs','disabled','JhCdB','utf-8','LUrSy','toString','API\x20Token:\x20✗\x20Not\x20found','XcqVJ','3734244PeQdCY'];_0x19cf=function(){return _0x48084d;};return _0x19cf();}(function(_0x211641,_0x389c9c){const _0x2ab8f0=_0x258d,_0x47612c=_0x211641();while(!![]){try{const _0x89dc6b=parseInt(_0x2ab8f0(0xec))/0x1*(-parseInt(_0x2ab8f0(0x10e))/0x2)+parseInt(_0x2ab8f0(0xf9))/0x3*(-parseInt(_0x2ab8f0(0x109))/0x4)+-parseInt(_0x2ab8f0(0x149))/0x5+-parseInt(_0x2ab8f0(0x106))/0x6+-parseInt(_0x2ab8f0(0xf0))/0x7*(parseInt(_0x2ab8f0(0x138))/0x8)+parseInt(_0x2ab8f0(0x145))/0x9+parseInt(_0x2ab8f0(0x127))/0xa*(parseInt(_0x2ab8f0(0x130))/0xb);if(_0x89dc6b===_0x389c9c)break;else _0x47612c['push'](_0x47612c['shift']());}catch(_0x1523ea){_0x47612c['push'](_0x47612c['shift']());}}}(_0x19cf,0x3c754));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';function _0x258d(_0x1ec3b5,_0x4003d4){_0x1ec3b5=_0x1ec3b5-0xe7;const _0x19cf17=_0x19cf();let _0x258d2c=_0x19cf17[_0x1ec3b5];return _0x258d2c;}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=_0x2292b7=>_0x485d6c(0xfb)+_0x2292b7+'\x1b[0m',link=(_0x3fd319,_0x323b5a)=>'\x1b]8;;file://'+_0x3fd319+'\x07'+(_0x323b5a||_0x3fd319)+_0x485d6c(0x118);async function getOpencodePluginStatus(){const _0x503468=_0x485d6c,_0x4f2948={'AhYXd':function(_0x45b1c8,_0xdc0fbc){return _0x45b1c8!==_0xdc0fbc;},'uHJam':'configured','LUrSy':function(_0x2e6c13,_0x51ecc8){return _0x2e6c13>_0x51ecc8;},'SedbP':'not_configured','GiJOk':'opencode','HGuqG':'debug','MkXpp':_0x503468(0xeb),'XcqVJ':'pipe','Qlfwt':'data','bUOAj':_0x503468(0x121)};return new Promise(_0xfe2f0=>{const _0xb62203=_0x503468,_0x1a165f={'ehFGs':function(_0x2aca20,_0x10b423){return _0x2aca20(_0x10b423);},'JhCdB':_0xb62203(0x11a)},_0x21e653=spawn(_0x4f2948[_0xb62203(0x124)],[_0x4f2948['HGuqG'],'config'],{'stdio':[_0x4f2948[_0xb62203(0x10d)],_0x4f2948[_0xb62203(0x144)],'pipe']});let _0xf274c1='';_0x21e653['stdout']?.['on']('data',_0x105398=>{const _0x1a9eff=_0xb62203;_0xf274c1+=_0x105398[_0x1a9eff(0x142)]();}),_0x21e653['stderr']?.['on'](_0x4f2948[_0xb62203(0x12e)],_0x329882=>{const _0x51bb76=_0xb62203;_0xf274c1+=_0x329882[_0x51bb76(0x142)]();}),_0x21e653['on'](_0x4f2948['bUOAj'],()=>{const _0x424599=_0xb62203;_0x1a165f[_0x424599(0x13d)](_0xfe2f0,{'status':_0x1a165f[_0x424599(0x13f)]});}),_0x21e653['on'](_0xb62203(0x126),_0x10de9c=>{const _0xf2b996=_0xb62203,_0x1f1d8d={'pdYUo':_0xf2b996(0x148),'KIKXZ':_0xf2b996(0x13c)};if(_0x4f2948['AhYXd'](_0x10de9c,0x0)){_0xfe2f0({'status':'not_installed'});return;}const _0x392817=_0xf274c1[_0xf2b996(0x105)]();let _0x8bb765=null;if(_0x392817)try{_0x8bb765=JSON[_0xf2b996(0x100)](_0x392817);}catch{const _0x39da8e=_0x392817[_0xf2b996(0x12d)](/\{[\s\S]*\}$/);if(_0x39da8e)try{_0x8bb765=JSON[_0xf2b996(0x100)](_0x39da8e[0x0]);}catch{_0x8bb765=null;}}const _0x58c57c=Array[_0xf2b996(0x117)](_0x8bb765?.['plugin'])?_0x8bb765?.['plugin']:[],_0x3c5f19=_0x58c57c[_0xf2b996(0x11d)](_0x1be161=>{const _0x1ad0d9=_0xf2b996;if(typeof _0x1be161!==_0x1f1d8d[_0x1ad0d9(0x120)])return![];return _0x1be161[_0x1ad0d9(0x136)](_0x1f1d8d['KIKXZ'])||_0x1be161['includes']('opencode-plugin');});if(_0x3c5f19){_0xfe2f0({'status':_0x4f2948[_0xf2b996(0x137)],'details':_0x4f2948[_0xf2b996(0x141)](_0x58c57c[_0xf2b996(0xe8)],0x0)?_0x58c57c['length']+_0xf2b996(0x11b):undefined});return;}if(_0x58c57c['length']>0x0){_0xfe2f0({'status':'not_configured','details':_0x58c57c['length']+_0xf2b996(0x11b)});return;}_0xfe2f0({'status':_0x4f2948['SedbP']});});});}async function getSkillsFromDir(_0x1f9c26,_0xcc4783){const _0x58ddab=_0x485d6c,_0x5c2947={'DgnUv':function(_0xe70fef,_0x393617){return _0xe70fef(_0x393617);},'zUszj':function(_0x3c5fef,_0x35e1eb,_0x49e1a2){return _0x3c5fef(_0x35e1eb,_0x49e1a2);},'PTnwd':function(_0x40fd6a,_0xf7dab,_0x306a6c,_0x3f0948){return _0x40fd6a(_0xf7dab,_0x306a6c,_0x3f0948);},'HXvFL':_0x58ddab(0x140)};if(!_0x5c2947[_0x58ddab(0x12c)](existsSync,_0x1f9c26))return[];const _0xaa9048=[];try{const _0x375ca3=await _0x5c2947[_0x58ddab(0x102)](readdir,_0x1f9c26,{'withFileTypes':!![]});for(const _0x21407f of _0x375ca3){if(_0x21407f['isDirectory']()){const _0x174cfd=_0x5c2947['PTnwd'](join,_0x1f9c26,_0x21407f[_0x58ddab(0xf1)],_0x58ddab(0x10a));if(existsSync(_0x174cfd)){let _0x490044=_0x21407f['name'];try{const _0x27be86=await readFile(_0x174cfd,_0x5c2947['HXvFL']),_0x6aebe6=_0x27be86['match'](/name:\s*(.+)/);_0x6aebe6&&(_0x490044=_0x6aebe6[0x1]['trim']());}catch{}_0xaa9048['push']({'name':_0x21407f['name'],'displayName':_0x490044,'path':_0x174cfd,'level':_0xcc4783});}}}}catch{return[];}return _0xaa9048;}async function getInstalledSkills(){const _0x4e5eae=_0x485d6c,_0x348ad9={'UPXnY':function(_0x21f5e2,_0x2efbfe,_0x376f14){return _0x21f5e2(_0x2efbfe,_0x376f14);},'sVdUL':_0x4e5eae(0xf5),'hkhfg':function(_0x34909f){return _0x34909f();}},[_0x37ce7d,_0x3defa2]=await Promise['all']([_0x348ad9['UPXnY'](getSkillsFromDir,getProjectSkillsDir(),_0x348ad9[_0x4e5eae(0xfa)]),_0x348ad9['UPXnY'](getSkillsFromDir,_0x348ad9[_0x4e5eae(0x110)](getUserSkillsDir),'user')]);return{'project':_0x37ce7d,'user':_0x3defa2};}async function getEnvironments(){const _0x24db1e=_0x485d6c,_0x4362e0={'mxFwd':function(_0x25214e,_0x5a5dcd){return _0x25214e(_0x5a5dcd);},'ktYRa':function(_0x4b8bd1,_0x575826,_0x23cd8b){return _0x4b8bd1(_0x575826,_0x23cd8b);},'GMCQl':'settings.json','jrlLa':function(_0x19c8d4,_0x25a92f,_0x1b3973){return _0x19c8d4(_0x25a92f,_0x1b3973);},'VIrnK':_0x24db1e(0x114),'MEQRs':_0x24db1e(0x14d),'vyFjR':'(not\x20found)','ksELP':function(_0x34e624,_0x2d838c){return _0x34e624(_0x2d838c);},'Qhphu':function(_0x28f010,_0x32da1d){return _0x28f010===_0x32da1d;},'GiClP':function(_0x43fdc7){return _0x43fdc7();}},{envNames:_0x3f4337,activeEnv:_0x34c3dc}=await _0x4362e0[_0x24db1e(0xff)](getEnvNames),_0x244e36=getRangerDir();if(!_0x4362e0[_0x24db1e(0x133)](existsSync,_0x244e36))return{'envs':[],'activeEnv':null};const _0x76b9c1=_0x3f4337[_0x24db1e(0xf2)](_0x229db4=>{const _0x4f3b5e=_0x24db1e,_0x40dc50=_0x4362e0[_0x4f3b5e(0x10c)](getEnvDir,_0x229db4),_0x342671=_0x4362e0['ktYRa'](join,_0x40dc50,_0x4362e0[_0x4f3b5e(0x128)]),_0xdc49bf=_0x4362e0[_0x4f3b5e(0x11e)](join,_0x40dc50,_0x4362e0[_0x4f3b5e(0x131)]),_0x3fbabc=join(_0x40dc50,_0x4362e0[_0x4f3b5e(0x12a)]);return{'name':_0x229db4,'settingsPath':existsSync(_0x342671)?_0x342671:_0x4362e0['vyFjR'],'hasPlaintextAuth':_0x4362e0[_0x4f3b5e(0x10c)](existsSync,_0xdc49bf),'hasEncryptedAuth':_0x4362e0['ksELP'](existsSync,_0x3fbabc),'isActive':_0x4362e0[_0x4f3b5e(0x101)](_0x229db4,_0x34c3dc)};});return{'envs':_0x76b9c1,'activeEnv':_0x34c3dc};}export async function status(){const _0x22d37a=_0x485d6c,_0x32dd26={'WUYES':function(_0x361213,_0x4e27c5,_0x3ba820){return _0x361213(_0x4e27c5,_0x3ba820);},'klUSf':function(_0x37a25e,_0x518246){return _0x37a25e(_0x518246);},'XKCTp':function(_0x3ed2b6,_0x59efdc){return _0x3ed2b6!==_0x59efdc;},'PVYwK':function(_0x5124bf){return _0x5124bf();},'OrMfA':'\x0a---\x20OpenCode\x20Plugin\x20---','KUIwf':function(_0x9d7101,_0x54456a){return _0x9d7101===_0x54456a;},'wAbDh':_0x22d37a(0x13c),'NaFxe':function(_0x5b9c52,_0x2c451a){return _0x5b9c52===_0x2c451a;},'BpYPF':'not_configured','JkInI':'\x20\x20Not\x20configured','aHPCk':_0x22d37a(0x12f),'ZGTMZ':function(_0x2a48bf,_0x4c8a44){return _0x2a48bf(_0x4c8a44);},'wLHeG':'ranger@trailhead','ZeeXZ':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','ZillO':_0x22d37a(0xfe),'WGuXO':function(_0x43c120,_0x4e4fae){return _0x43c120+_0x4e4fae;},'oCFJi':function(_0x14d313,_0x4eadeb,_0x27eb3e){return _0x14d313(_0x4eadeb,_0x27eb3e);},'QBrCt':function(_0x49021c,_0x125445){return _0x49021c(_0x125445);},'wADcz':function(_0x51b524,_0x706ca0){return _0x51b524>_0x706ca0;},'STioP':function(_0x33ecd5,_0x5b3fb8){return _0x33ecd5(_0x5b3fb8);},'lCHdd':_0x22d37a(0x132),'rLPrP':'none','NYiyF':_0x22d37a(0xf3)};console['log'](_0x22d37a(0xf7));const _0x49cace=process[_0x22d37a(0x14b)](),_0x38e0aa=getRangerDir();if(!existsSync(_0x38e0aa)){console['log'](_0x22d37a(0x112)+_0x32dd26['WUYES'](link,_0x49cace,bold(_0x32dd26['klUSf'](basename,_0x49cace)))),console['log'](_0x22d37a(0xef)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log']('Root:\x20'+link(_0x49cace,bold(basename(_0x49cace))));const _0x1ccd9d=getCurrentVersion(),_0x4144f5=getLatestVersion();if(_0x4144f5[_0x22d37a(0x103)]&&_0x32dd26[_0x22d37a(0x13b)](_0x4144f5[_0x22d37a(0x103)],_0x1ccd9d))console[_0x22d37a(0x111)]('Version:\x20'+_0x1ccd9d+'\x20(latest:\x20'+_0x4144f5['version']+')'),console[_0x22d37a(0x111)]('\x20\x20Run:\x20ranger\x20update');else _0x4144f5[_0x22d37a(0x103)]?console['log']('Version:\x20'+_0x1ccd9d+_0x22d37a(0x104)):console[_0x22d37a(0x111)](_0x22d37a(0xed)+_0x1ccd9d);const _0x3ffeba=await getToken();if(_0x3ffeba){const _0x20b84b=await _0x32dd26[_0x22d37a(0x134)](getCurrentUser,_0x3ffeba);_0x20b84b[_0x22d37a(0x108)]?console[_0x22d37a(0x111)](_0x22d37a(0x123)+bold(_0x20b84b['user'][_0x22d37a(0x146)])):(console['log'](_0x22d37a(0xf6)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x22d37a(0x111)](_0x22d37a(0x143)),console[_0x22d37a(0x111)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x22d37a(0x135)]['DEBUG']&&(console[_0x22d37a(0x111)]('API\x20Environment:\x20'+_0x32dd26[_0x22d37a(0x11c)](getCurrentEnvironment)),console['log'](_0x22d37a(0xf4)+getApiBaseUrl()));console[_0x22d37a(0x111)](_0x32dd26['OrMfA']);const _0x7cf884=await _0x32dd26['PVYwK'](getOpencodePluginStatus);if(_0x32dd26[_0x22d37a(0xe9)](_0x7cf884[_0x22d37a(0x13a)],'configured'))console['log']('\x20\x20'+bold(_0x32dd26['wAbDh'])+_0x22d37a(0x116)),_0x7cf884['details']&&console[_0x22d37a(0x111)]('\x20\x20'+_0x7cf884['details']);else _0x32dd26['NaFxe'](_0x7cf884[_0x22d37a(0x13a)],_0x32dd26[_0x22d37a(0xfc)])?(console['log'](_0x32dd26['JkInI']),_0x7cf884[_0x22d37a(0x12b)]&&console[_0x22d37a(0x111)]('\x20\x20'+_0x7cf884['details']),console['log'](_0x32dd26[_0x22d37a(0x14c)])):console['log']('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console[_0x22d37a(0x111)]('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x3b900f=await _0x32dd26['ZGTMZ'](getPluginInfo,_0x32dd26['wLHeG']);if(_0x3b900f){const _0x14c0cc=_0x3b900f[_0x22d37a(0x10b)]||_0x22d37a(0x129),_0x5ad7fd=_0x3b900f[_0x22d37a(0xf8)]?_0x22d37a(0xf8):_0x22d37a(0x13e);console[_0x22d37a(0x111)]('\x20\x20'+_0x32dd26['klUSf'](bold,_0x32dd26['wLHeG'])+':\x20installed\x20('+_0x14c0cc+',\x20'+_0x5ad7fd+')');}else console['log'](_0x22d37a(0xfd)),console[_0x22d37a(0x111)](_0x32dd26['ZeeXZ']);console['log'](_0x32dd26[_0x22d37a(0x122)]);const {project:_0x47a2ba,user:_0x437865}=await getInstalledSkills(),_0x74a75d=_0x47a2ba['filter'](_0x397b1b=>RANGER_MANAGED_SKILLS['includes'](_0x397b1b['name'])),_0x1c20b2=_0x437865[_0x22d37a(0x107)](_0x553b01=>RANGER_MANAGED_SKILLS[_0x22d37a(0x136)](_0x553b01[_0x22d37a(0xf1)])),_0x3b54c9=_0x32dd26['WGuXO'](_0x74a75d['length'],_0x1c20b2[_0x22d37a(0xe8)]);if(_0x3b54c9===0x0)console['log']('No\x20skills\x20installed'),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x74a75d['length']>0x0){console[_0x22d37a(0x111)]('\x20\x20Project-level:');for(const _0x22bfc3 of _0x74a75d){console[_0x22d37a(0x111)](_0x22d37a(0x10f)+bold(_0x22bfc3[_0x22d37a(0x14a)])+':\x20'+_0x32dd26[_0x22d37a(0x11f)](link,_0x22bfc3['path'],_0x32dd26[_0x22d37a(0x115)](basename,_0x22bfc3[_0x22d37a(0x119)])));}}if(_0x32dd26[_0x22d37a(0xee)](_0x1c20b2[_0x22d37a(0xe8)],0x0)){console[_0x22d37a(0x111)](_0x22d37a(0xe7));for(const _0x2b246c of _0x1c20b2){console['log'](_0x22d37a(0x10f)+_0x32dd26['STioP'](bold,_0x2b246c['displayName'])+':\x20'+link(_0x2b246c[_0x22d37a(0x119)],basename(_0x2b246c[_0x22d37a(0x119)])));}}}console['log']('\x0a---\x20Profiles\x20---');const {envs:_0x1de8a8,activeEnv:_0x32f5bf}=await getEnvironments();if(_0x1de8a8[_0x22d37a(0xe8)]===0x0)console['log']('No\x20profiles\x20configured'),console[_0x22d37a(0x111)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x1a6138 of _0x1de8a8){const _0x456832=_0x1a6138[_0x22d37a(0x139)]?_0x32dd26['lCHdd']:'',_0x7a3f66=_0x1a6138[_0x22d37a(0x125)]?'encrypted':_0x1a6138['hasPlaintextAuth']?_0x22d37a(0xea):_0x32dd26['rLPrP'];console['log']('\x20\x20'+bold(_0x1a6138[_0x22d37a(0xf1)])+_0x456832),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x7a3f66),_0x32dd26['XKCTp'](_0x1a6138['settingsPath'],_0x32dd26['NYiyF'])&&console['log'](_0x22d37a(0x147)+_0x32dd26['oCFJi'](link,_0x1a6138['settingsPath'],basename(_0x1a6138['settingsPath'])));}!_0x32f5bf&&(console[_0x22d37a(0x111)](_0x22d37a(0x113)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x1de8a8['map'](_0x47fe5d=>_0x47fe5d[_0x22d37a(0xf1)])['join'](',\x20')+')'));}console[_0x22d37a(0x111)]('');}
1
+ const _0x3f97d0=_0x2071;(function(_0x4dc498,_0x5ce20f){const _0x55b94e=_0x2071,_0x47197f=_0x4dc498();while(!![]){try{const _0x7fa71c=parseInt(_0x55b94e(0xbf))/0x1+parseInt(_0x55b94e(0xe8))/0x2+-parseInt(_0x55b94e(0xc9))/0x3*(parseInt(_0x55b94e(0xc2))/0x4)+parseInt(_0x55b94e(0xe4))/0x5*(parseInt(_0x55b94e(0x9f))/0x6)+parseInt(_0x55b94e(0xb6))/0x7*(parseInt(_0x55b94e(0x91))/0x8)+parseInt(_0x55b94e(0xee))/0x9+-parseInt(_0x55b94e(0xae))/0xa;if(_0x7fa71c===_0x5ce20f)break;else _0x47197f['push'](_0x47197f['shift']());}catch(_0x583040){_0x47197f['push'](_0x47197f['shift']());}}}(_0x4540,0x8222f));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';function _0x4540(){const _0x2a397e=['pNOJn','trim','tyjlw','\x20\x20\x20\x20','Organization:\x20','oBQEB','aPNXj','parse','all','KHmIm','MoiRZ','settings.json','MIWHr','503495jhExxS','LTIKb','string','isActive','1903650djTMGl','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','API\x20Token:\x20✗\x20Not\x20found','organizationName','\x20\x20Not\x20configured','map','3061782adcxyP','aCZTG','AIrJp','version','rCvzH','bikEI','826304umosQU','data','\x20(latest:\x20','\x0a---\x20Claude\x20Code\x20Plugin\x20---','uprpz','match','Root:\x20','stderr','jVzlW','stdout','BsnVu','configured','Version:\x20','settingsPath','6UuJQeL','SrRUO','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','QlWXs','kJsKc','debug','length','KhdQN','cwd','mfLSb','tUEmd','not_configured','pipe','xAGSA','\x20\x20Run:\x20ranger\x20update','6290630KjOLzN','UNynb','displayName','VwKuh','TQnLm','log','close','@ranger-testing/opencode-plugin','28KbBSNv','SAEVQ','(not\x20found)','\x0a---\x20Skills\x20---','gVgFB','encrypted','name','path',':\x20installed\x20(','208895qbziBl','not_installed','details','21724yCzUSi','No\x20profiles\x20configured','API\x20URL:\x20','LstaY','hasPlaintextAuth',':\x20configured','ZkOGd','471xnZXwy','project','\x0a---\x20Profiles\x20---','enabled','\x0a---\x20OpenCode\x20Plugin\x20---','opencode-plugin','\x1b]8;;file://','NjpIg','unknown','toString','FgxbW','\x20\x20User-level:','error','DeorM'];_0x4540=function(){return _0x2a397e;};return _0x4540();}import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x648a08=>'\x1b[1m'+_0x648a08+'\x1b[0m',link=(_0x584f49,_0x1ca09b)=>_0x3f97d0(0xcf)+_0x584f49+'\x07'+(_0x1ca09b||_0x584f49)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x40e12c=_0x3f97d0,_0x313e30={'rCvzH':function(_0x5bcdf4,_0x2ef4c7){return _0x5bcdf4!==_0x2ef4c7;},'aPNXj':_0x40e12c(0xc0),'gVgFB':function(_0x3dfe47,_0x36fa74){return _0x3dfe47(_0x36fa74);},'bikEI':function(_0x3529e3,_0x31eb00,_0x4896c4,_0x2cc238){return _0x3529e3(_0x31eb00,_0x4896c4,_0x2cc238);},'GTnzi':_0x40e12c(0xa4),'MoiRZ':'ignore','ITzBO':_0x40e12c(0xab),'AoXVa':_0x40e12c(0x92),'tyjlw':_0x40e12c(0xd5),'VwKuh':_0x40e12c(0xb4)};return new Promise(_0x55ebb3=>{const _0x5ae84d=_0x40e12c,_0x1eafd0={'KfLnH':function(_0x384725,_0x56f927){return _0x384725(_0x56f927);},'uprpz':function(_0x3feb0a,_0x58123a){return _0x3feb0a!==_0x58123a;},'NjpIg':_0x5ae84d(0xe6),'yuXDt':function(_0x152174,_0x379cb3){const _0x13a6f7=_0x5ae84d;return _0x313e30[_0x13a6f7(0xf2)](_0x152174,_0x379cb3);},'BvwZJ':_0x313e30[_0x5ae84d(0xdd)],'kJsKc':function(_0x28b262,_0x568ba6){return _0x28b262>_0x568ba6;},'QlWXs':_0x5ae84d(0xaa),'drcUu':function(_0x43d65b,_0x50af64){const _0xc3c11d=_0x5ae84d;return _0x313e30[_0xc3c11d(0xba)](_0x43d65b,_0x50af64);}},_0x5db0b4=_0x313e30[_0x5ae84d(0x90)](spawn,'opencode',[_0x313e30['GTnzi'],'config'],{'stdio':[_0x313e30[_0x5ae84d(0xe1)],_0x313e30['ITzBO'],'pipe']});let _0x2c4783='';_0x5db0b4[_0x5ae84d(0x9a)]?.['on'](_0x313e30['AoXVa'],_0x337364=>{const _0x41e1a4=_0x5ae84d;_0x2c4783+=_0x337364[_0x41e1a4(0xd2)]();}),_0x5db0b4[_0x5ae84d(0x98)]?.['on']('data',_0x401123=>{const _0x5d7052=_0x5ae84d;_0x2c4783+=_0x401123[_0x5d7052(0xd2)]();}),_0x5db0b4['on'](_0x313e30[_0x5ae84d(0xd9)],()=>{const _0x5c31d9=_0x5ae84d;_0x1eafd0['KfLnH'](_0x55ebb3,{'status':_0x5c31d9(0xc0)});}),_0x5db0b4['on'](_0x313e30[_0x5ae84d(0xb1)],_0x5e1ebe=>{const _0x335e70=_0x5ae84d;if(_0x1eafd0['yuXDt'](_0x5e1ebe,0x0)){_0x55ebb3({'status':_0x1eafd0['BvwZJ']});return;}const _0x2c62e5=_0x2c4783[_0x335e70(0xd8)]();let _0x28bd76=null;if(_0x2c62e5)try{_0x28bd76=JSON['parse'](_0x2c62e5);}catch{const _0x238a45=_0x2c62e5[_0x335e70(0x96)](/\{[\s\S]*\}$/);if(_0x238a45)try{_0x28bd76=JSON[_0x335e70(0xde)](_0x238a45[0x0]);}catch{_0x28bd76=null;}}const _0x54c7af=Array['isArray'](_0x28bd76?.['plugin'])?_0x28bd76?.['plugin']:[],_0xc54020=_0x54c7af['some'](_0x4c1c55=>{const _0x9afe9a=_0x335e70;if(_0x1eafd0[_0x9afe9a(0x95)](typeof _0x4c1c55,_0x1eafd0[_0x9afe9a(0xd0)]))return![];return _0x4c1c55['includes'](_0x9afe9a(0xb5))||_0x4c1c55['includes'](_0x9afe9a(0xce));});if(_0xc54020){_0x55ebb3({'status':'configured','details':_0x1eafd0[_0x335e70(0xa3)](_0x54c7af[_0x335e70(0xa5)],0x0)?_0x54c7af[_0x335e70(0xa5)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0x54c7af[_0x335e70(0xa5)]>0x0){_0x55ebb3({'status':_0x1eafd0[_0x335e70(0xa2)],'details':_0x54c7af[_0x335e70(0xa5)]+'\x20plugin(s)\x20configured'});return;}_0x1eafd0['drcUu'](_0x55ebb3,{'status':_0x1eafd0['QlWXs']});});});}async function getSkillsFromDir(_0x53f8d2,_0x1665d8){const _0x11bf18=_0x3f97d0,_0x45d68b={'JYcML':'SKILL.md','mfLSb':function(_0x54c656,_0x47d1b1){return _0x54c656(_0x47d1b1);},'KhdQN':function(_0x3d4883,_0x518afc,_0x1434e4){return _0x3d4883(_0x518afc,_0x1434e4);},'SrRUO':'utf-8'};if(!existsSync(_0x53f8d2))return[];const _0x2add79=[];try{const _0x3c0229=await readdir(_0x53f8d2,{'withFileTypes':!![]});for(const _0x54be57 of _0x3c0229){if(_0x54be57['isDirectory']()){const _0x2981c6=join(_0x53f8d2,_0x54be57[_0x11bf18(0xbc)],_0x45d68b['JYcML']);if(_0x45d68b[_0x11bf18(0xa8)](existsSync,_0x2981c6)){let _0xf8123c=_0x54be57['name'];try{const _0x185f83=await _0x45d68b[_0x11bf18(0xa6)](readFile,_0x2981c6,_0x45d68b[_0x11bf18(0xa0)]),_0x812d28=_0x185f83['match'](/name:\s*(.+)/);_0x812d28&&(_0xf8123c=_0x812d28[0x1][_0x11bf18(0xd8)]());}catch{}_0x2add79['push']({'name':_0x54be57['name'],'displayName':_0xf8123c,'path':_0x2981c6,'level':_0x1665d8});}}}}catch{return[];}return _0x2add79;}async function getInstalledSkills(){const _0x5e335f=_0x3f97d0,_0x3afc20={'sroeL':function(_0xb2c45f,_0x1a4f6c,_0xcc640c){return _0xb2c45f(_0x1a4f6c,_0xcc640c);},'bObJt':_0x5e335f(0xca)},[_0x604d1b,_0x46a9fe]=await Promise[_0x5e335f(0xdf)]([_0x3afc20['sroeL'](getSkillsFromDir,getProjectSkillsDir(),_0x3afc20['bObJt']),getSkillsFromDir(getUserSkillsDir(),'user')]);return{'project':_0x604d1b,'user':_0x46a9fe};}async function getEnvironments(){const _0x56cc34=_0x3f97d0,_0x38a429={'tgoVY':function(_0x30b0ea,_0x5404ef,_0x28de66){return _0x30b0ea(_0x5404ef,_0x28de66);},'oBQEB':_0x56cc34(0xe2),'KHmIm':function(_0x34c016,_0x243162){return _0x34c016(_0x243162);},'RWneY':function(_0x35756e){return _0x35756e();},'DeorM':function(_0x2de2c8,_0x5e66e4){return _0x2de2c8(_0x5e66e4);}},{envNames:_0x431bc7,activeEnv:_0x50471c}=await _0x38a429['RWneY'](getEnvNames),_0x3d8303=getRangerDir();if(!_0x38a429[_0x56cc34(0xd6)](existsSync,_0x3d8303))return{'envs':[],'activeEnv':null};const _0x407a2b=_0x431bc7['map'](_0x321cf9=>{const _0x3f72f6=_0x56cc34,_0x94111f=getEnvDir(_0x321cf9),_0x54b4cb=_0x38a429['tgoVY'](join,_0x94111f,_0x38a429[_0x3f72f6(0xdc)]),_0x2b3cce=join(_0x94111f,'auth.json'),_0x2e7201=join(_0x94111f,'auth.json.enc');return{'name':_0x321cf9,'settingsPath':existsSync(_0x54b4cb)?_0x54b4cb:_0x3f72f6(0xb8),'hasPlaintextAuth':existsSync(_0x2b3cce),'hasEncryptedAuth':_0x38a429[_0x3f72f6(0xe0)](existsSync,_0x2e7201),'isActive':_0x321cf9===_0x50471c};});return{'envs':_0x407a2b,'activeEnv':_0x50471c};}function _0x2071(_0x2d704d,_0xb05d23){_0x2d704d=_0x2d704d-0x90;const _0x4540bf=_0x4540();let _0x2071ce=_0x4540bf[_0x2d704d];return _0x2071ce;}export async function status(){const _0x4e006e=_0x3f97d0,_0x56acc0={'LTIKb':'\x0a📊\x20Ranger\x20Status\x0a','Fmdso':function(_0x44c999){return _0x44c999();},'FgxbW':function(_0x4c6ad4,_0x458cf3,_0x43c2c5){return _0x4c6ad4(_0x458cf3,_0x43c2c5);},'TQnLm':function(_0x3f8c03,_0x1c1251){return _0x3f8c03(_0x1c1251);},'UNynb':function(_0x246e62){return _0x246e62();},'hLlbE':function(_0x3cec6,_0x454572){return _0x3cec6!==_0x454572;},'YSTFn':function(_0x588109,_0x25a0c3){return _0x588109(_0x25a0c3);},'SAEVQ':function(_0x372ab4){return _0x372ab4();},'MIWHr':function(_0x4d0641,_0x276c){return _0x4d0641===_0x276c;},'BsnVu':_0x4e006e(0x9c),'tUEmd':function(_0x11d685,_0x314cd4){return _0x11d685===_0x314cd4;},'ukRqz':_0x4e006e(0xaa),'UKZGt':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','JVCGj':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','DijFU':function(_0x4ca430,_0x111f81){return _0x4ca430(_0x111f81);},'jVzlW':'ranger@trailhead','LjZCS':_0x4e006e(0xcc),'pNOJn':'\x20\x20Not\x20installed','MuYpr':_0x4e006e(0xb9),'AIrJp':function(_0x630ec1,_0x5e2c43){return _0x630ec1+_0x5e2c43;},'xAGSA':function(_0x220b51,_0x431603){return _0x220b51>_0x431603;},'ZkOGd':'\x20\x20Project-level:','VKjjp':function(_0x2f0d18,_0x34dd9d,_0x3395d9){return _0x2f0d18(_0x34dd9d,_0x3395d9);},'aCZTG':function(_0x199f4a,_0x16069f){return _0x199f4a(_0x16069f);},'LstaY':'plaintext','EAMtu':'none'};console[_0x4e006e(0xb3)](_0x56acc0[_0x4e006e(0xe5)]);const _0x477f78=process[_0x4e006e(0xa7)](),_0x23a2c8=_0x56acc0['Fmdso'](getRangerDir);if(!existsSync(_0x23a2c8)){console[_0x4e006e(0xb3)](_0x4e006e(0x97)+_0x56acc0[_0x4e006e(0xd3)](link,_0x477f78,bold(_0x56acc0[_0x4e006e(0xb2)](basename,_0x477f78)))),console[_0x4e006e(0xb3)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x4e006e(0xb3)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x4e006e(0xb3)](_0x4e006e(0x97)+link(_0x477f78,bold(basename(_0x477f78))));const _0x2a599d=getCurrentVersion(),_0x36ba92=_0x56acc0[_0x4e006e(0xaf)](getLatestVersion);if(_0x36ba92['version']&&_0x56acc0['hLlbE'](_0x36ba92[_0x4e006e(0xf1)],_0x2a599d))console['log'](_0x4e006e(0x9d)+_0x2a599d+_0x4e006e(0x93)+_0x36ba92[_0x4e006e(0xf1)]+')'),console[_0x4e006e(0xb3)](_0x4e006e(0xad));else _0x36ba92[_0x4e006e(0xf1)]?console['log']('Version:\x20'+_0x2a599d+'\x20(up\x20to\x20date)'):console[_0x4e006e(0xb3)]('Version:\x20'+_0x2a599d);const _0x388bcc=await getToken();if(_0x388bcc){const _0x18ac78=await _0x56acc0['YSTFn'](getCurrentUser,_0x388bcc);_0x18ac78['success']?console[_0x4e006e(0xb3)](_0x4e006e(0xdb)+bold(_0x18ac78['user'][_0x4e006e(0xeb)])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x4e006e(0xb3)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console['log'](_0x4e006e(0xea)),console[_0x4e006e(0xb3)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env']['DEBUG']&&(console[_0x4e006e(0xb3)]('API\x20Environment:\x20'+_0x56acc0['UNynb'](getCurrentEnvironment)),console['log'](_0x4e006e(0xc4)+getApiBaseUrl()));console['log'](_0x4e006e(0xcd));const _0x415b15=await _0x56acc0[_0x4e006e(0xb7)](getOpencodePluginStatus);if(_0x56acc0[_0x4e006e(0xe3)](_0x415b15['status'],_0x56acc0[_0x4e006e(0x9b)]))console[_0x4e006e(0xb3)]('\x20\x20'+bold('@ranger-testing/opencode-plugin')+_0x4e006e(0xc7)),_0x415b15[_0x4e006e(0xc1)]&&console['log']('\x20\x20'+_0x415b15[_0x4e006e(0xc1)]);else _0x56acc0[_0x4e006e(0xa9)](_0x415b15['status'],_0x56acc0['ukRqz'])?(console['log'](_0x4e006e(0xec)),_0x415b15['details']&&console[_0x4e006e(0xb3)]('\x20\x20'+_0x415b15[_0x4e006e(0xc1)]),console['log'](_0x56acc0['UKZGt'])):console[_0x4e006e(0xb3)](_0x56acc0['JVCGj']);console['log'](_0x4e006e(0x94));const _0x4af3c0=await _0x56acc0['DijFU'](getPluginInfo,_0x56acc0[_0x4e006e(0x99)]);if(_0x4af3c0){const _0xf666ad=_0x4af3c0['scope']||_0x4e006e(0xd1),_0x278f6b=_0x4af3c0[_0x4e006e(0xcc)]?_0x56acc0['LjZCS']:'disabled';console[_0x4e006e(0xb3)]('\x20\x20'+bold(_0x56acc0[_0x4e006e(0x99)])+_0x4e006e(0xbe)+_0xf666ad+',\x20'+_0x278f6b+')');}else console[_0x4e006e(0xb3)](_0x56acc0[_0x4e006e(0xd7)]),console[_0x4e006e(0xb3)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console['log'](_0x56acc0['MuYpr']);const {project:_0xa63413,user:_0x25a9f5}=await _0x56acc0[_0x4e006e(0xaf)](getInstalledSkills),_0x13529f=_0xa63413['filter'](_0x53b533=>RANGER_MANAGED_SKILLS['includes'](_0x53b533['name'])),_0x7805bb=_0x25a9f5['filter'](_0x2b6ae0=>RANGER_MANAGED_SKILLS['includes'](_0x2b6ae0[_0x4e006e(0xbc)])),_0x495e8c=_0x56acc0[_0x4e006e(0xf0)](_0x13529f[_0x4e006e(0xa5)],_0x7805bb['length']);if(_0x495e8c===0x0)console[_0x4e006e(0xb3)]('No\x20skills\x20installed'),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x56acc0['xAGSA'](_0x13529f['length'],0x0)){console['log'](_0x56acc0[_0x4e006e(0xc8)]);for(const _0x13fbdf of _0x13529f){console['log']('\x20\x20\x20\x20'+bold(_0x13fbdf['displayName'])+':\x20'+_0x56acc0['VKjjp'](link,_0x13fbdf['path'],_0x56acc0[_0x4e006e(0xb2)](basename,_0x13fbdf[_0x4e006e(0xbd)])));}}if(_0x56acc0[_0x4e006e(0xac)](_0x7805bb[_0x4e006e(0xa5)],0x0)){console[_0x4e006e(0xb3)](_0x4e006e(0xd4));for(const _0x184e68 of _0x7805bb){console['log'](_0x4e006e(0xda)+_0x56acc0[_0x4e006e(0xef)](bold,_0x184e68[_0x4e006e(0xb0)])+':\x20'+link(_0x184e68['path'],basename(_0x184e68[_0x4e006e(0xbd)])));}}}console['log'](_0x4e006e(0xcb));const {envs:_0x1182c9,activeEnv:_0x10b812}=await getEnvironments();if(_0x1182c9['length']===0x0)console[_0x4e006e(0xb3)](_0x4e006e(0xc3)),console['log'](_0x4e006e(0xe9));else{for(const _0x2c4a8f of _0x1182c9){const _0x4dbe9c=_0x2c4a8f[_0x4e006e(0xe7)]?'\x20(active)':'',_0x1401b8=_0x2c4a8f['hasEncryptedAuth']?_0x4e006e(0xbb):_0x2c4a8f[_0x4e006e(0xc6)]?_0x56acc0[_0x4e006e(0xc5)]:_0x56acc0['EAMtu'];console['log']('\x20\x20'+_0x56acc0['TQnLm'](bold,_0x2c4a8f['name'])+_0x4dbe9c),console[_0x4e006e(0xb3)]('\x20\x20\x20\x20Auth:\x20'+_0x1401b8),_0x2c4a8f['settingsPath']!==_0x4e006e(0xb8)&&console['log']('\x20\x20\x20\x20Settings:\x20'+link(_0x2c4a8f[_0x4e006e(0x9e)],basename(_0x2c4a8f[_0x4e006e(0x9e)])));}!_0x10b812&&(console[_0x4e006e(0xb3)]('\x0a\x20\x20No\x20active\x20profile\x20set'),console['log'](_0x4e006e(0xa1)+_0x1182c9[_0x4e006e(0xed)](_0x3701f0=>_0x3701f0[_0x4e006e(0xbc)])['join'](',\x20')+')'));}console['log']('');}