@ranger-testing/ranger-cli 2.5.0 → 2.5.2

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 (73) 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/mcpBootstrap.js +1 -0
  25. package/build/commands/setup/claude.js +1 -1
  26. package/build/commands/setup/opencode.js +1 -1
  27. package/build/commands/setupCi.js +1 -1
  28. package/build/commands/skillup.js +1 -1
  29. package/build/commands/start.js +1 -1
  30. package/build/commands/status.js +1 -1
  31. package/build/commands/update.js +1 -1
  32. package/build/commands/updateEnv.js +1 -1
  33. package/build/commands/useEnv.js +1 -1
  34. package/build/commands/utils/activeProfile.js +1 -1
  35. package/build/commands/utils/agentEnv.js +1 -1
  36. package/build/commands/utils/browserSessionsApi.js +1 -1
  37. package/build/commands/utils/claudeConfig.js +1 -1
  38. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  39. package/build/commands/utils/claudePlugin.js +1 -1
  40. package/build/commands/utils/crypto.js +1 -1
  41. package/build/commands/utils/desirePathLog.js +1 -1
  42. package/build/commands/utils/deviceAuth.js +1 -1
  43. package/build/commands/utils/environment.js +1 -1
  44. package/build/commands/utils/featureApi.js +1 -1
  45. package/build/commands/utils/fixWebmDuration.js +1 -1
  46. package/build/commands/utils/keychain.js +1 -1
  47. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  48. package/build/commands/utils/mcpImageBase64.js +1 -1
  49. package/build/commands/utils/model.js +1 -1
  50. package/build/commands/utils/opencodeConfig.js +1 -1
  51. package/build/commands/utils/playwrightCli.js +1 -1
  52. package/build/commands/utils/profileMessages.js +1 -1
  53. package/build/commands/utils/profileSetupBanner.js +1 -1
  54. package/build/commands/utils/rangerConfig.js +1 -1
  55. package/build/commands/utils/rangerRoot.js +1 -1
  56. package/build/commands/utils/retry.js +1 -1
  57. package/build/commands/utils/sessionCache.js +1 -1
  58. package/build/commands/utils/settings.js +1 -1
  59. package/build/commands/utils/skillContent.js +1 -1
  60. package/build/commands/utils/skills.js +1 -1
  61. package/build/commands/utils/stitchWebmFiles.js +1 -1
  62. package/build/commands/utils/telemetry.js +1 -1
  63. package/build/commands/utils/tokenRefresh.js +1 -1
  64. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  65. package/build/commands/utils/userApi.js +1 -1
  66. package/build/commands/utils/version.js +1 -1
  67. package/build/commands/verifyFeature.js +1 -1
  68. package/build/commands/verifyFeatureCli.js +1 -1
  69. package/package.json +1 -1
  70. package/build/commands/utils/featureReportGenerator.js +0 -1
  71. package/build/commands/utils/git.js +0 -1
  72. package/build/commands/utils/reportGenerator.js +0 -1
  73. package/build/commands/verifyInBrowser.js +0 -1
@@ -1 +1 @@
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
+ const _0x33d342=_0x463b;function _0x463b(_0x2bdee5,_0x45bd21){_0x2bdee5=_0x2bdee5-0x1b8;const _0x54db2c=_0x54db();let _0x463bfa=_0x54db2c[_0x2bdee5];return _0x463bfa;}(function(_0x452a19,_0x7205b9){const _0x24d16f=_0x463b,_0x5b73c1=_0x452a19();while(!![]){try{const _0x597c72=parseInt(_0x24d16f(0x1ca))/0x1*(-parseInt(_0x24d16f(0x1c2))/0x2)+parseInt(_0x24d16f(0x1c7))/0x3*(-parseInt(_0x24d16f(0x1c1))/0x4)+-parseInt(_0x24d16f(0x1c8))/0x5+parseInt(_0x24d16f(0x1c4))/0x6+parseInt(_0x24d16f(0x1cc))/0x7+-parseInt(_0x24d16f(0x1cd))/0x8*(-parseInt(_0x24d16f(0x1bc))/0x9)+parseInt(_0x24d16f(0x1c5))/0xa;if(_0x597c72===_0x7205b9)break;else _0x5b73c1['push'](_0x5b73c1['shift']());}catch(_0x15ca4a){_0x5b73c1['push'](_0x5b73c1['shift']());}}}(_0x54db,0x19d45));function _0x54db(){const _0x3defa3=['2888990lUpzER','\x20(Branch:\x20','1497kpUuUl','896995IMjfPb','kahzF','1238Cfqlme','gLare','44310poPVcP','300368GcxlHX','trackCommandEnd','master','stringify','tPqtt','9tyUqRc','ZsytB','session_id','=================================================================\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=================================================================','parse','164qsntjc','254OzTUxl','choNI','780636QhJJAD'];_0x54db=function(){return _0x3defa3;};return _0x54db();}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=_0x33d342(0x1bf);export async function sessionStart(_0x2a171b){const _0x2763b9=_0x33d342,_0x1131d0={'kahzF':_0x2763b9(0x1be),'ZsytB':'source','choNI':function(_0x400d7f,_0x59fbdb,_0x298aa5){return _0x400d7f(_0x59fbdb,_0x298aa5);},'IIPKS':function(_0x46349c,_0x5d0c2c){return _0x46349c(_0x5d0c2c);},'FwCbr':'hook:session-start','TETbd':'success','tPqtt':function(_0x147d71,_0x47c67b){return _0x147d71!==_0x47c67b;},'ojFAj':_0x2763b9(0x1b9),'gLare':function(_0x49007e,_0x11bd94){return _0x49007e+_0x11bd94;}};let _0x1e7d3c=_0x2a171b||'',_0x11d64b;if(!_0x2a171b){let _0x54c018='';for await(const _0x4890f6 of process['stdin']){_0x54c018+=_0x4890f6;}try{const _0x29a676=JSON[_0x2763b9(0x1c0)](_0x54c018);_0x1e7d3c=_0x29a676[_0x1131d0[_0x2763b9(0x1c9)]]||'',_0x11d64b=_0x29a676[_0x1131d0[_0x2763b9(0x1bd)]];}catch{}const _0x2aa354=process['env']['CLAUDE_ENV_FILE'];if(_0x2aa354&&_0x1e7d3c)try{await _0x1131d0[_0x2763b9(0x1c3)](appendFile,_0x2aa354,'export\x20CLAUDE_SESSION_ID=\x22'+_0x1e7d3c+'\x22\x0a');}catch{}}try{await getToken();}catch{}if(_0x1e7d3c){shouldAutoEnableAfterClear(_0x11d64b)&&autoEnableAfterClear(_0x1e7d3c);_0x1131d0['IIPKS'](initBranchTracking,_0x1e7d3c);const _0x53f2d4=isSessionEnabled(_0x1e7d3c);try{const _0x445f24=createTelemetryCollector(_0x1131d0['FwCbr']);await _0x445f24['trackCommandStart']({'sessionId':_0x1e7d3c,'hooksEnabled':_0x53f2d4}),await _0x445f24[_0x2763b9(0x1b8)](_0x1131d0['TETbd']);}catch{}if(_0x53f2d4){const _0x276317=getCurrentBranch(),_0xbb031d=_0x276317&&_0x276317!=='main'&&_0x1131d0[_0x2763b9(0x1bb)](_0x276317,_0x1131d0['ojFAj'])?_0x2763b9(0x1c6)+_0x276317+')':'',_0x1fce67={'hookSpecificOutput':{'hookEventName':'SessionStart','additionalContext':_0x1131d0[_0x2763b9(0x1cb)](RANGER_AUTO_ENABLED_PROMPT,_0xbb031d)}};console['log'](JSON[_0x2763b9(0x1ba)](_0x1fce67));}}}
@@ -1 +1 @@
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
+ (function(_0x797ef6,_0x20c543){const _0x172264=_0x4d20,_0x4dc68f=_0x797ef6();while(!![]){try{const _0x35897e=-parseInt(_0x172264(0xd8))/0x1*(-parseInt(_0x172264(0xd5))/0x2)+-parseInt(_0x172264(0xdd))/0x3+-parseInt(_0x172264(0xc7))/0x4*(-parseInt(_0x172264(0xca))/0x5)+parseInt(_0x172264(0xcf))/0x6*(-parseInt(_0x172264(0xd2))/0x7)+-parseInt(_0x172264(0xcd))/0x8*(-parseInt(_0x172264(0xc9))/0x9)+parseInt(_0x172264(0xd1))/0xa+-parseInt(_0x172264(0xcb))/0xb;if(_0x35897e===_0x20c543)break;else _0x4dc68f['push'](_0x4dc68f['shift']());}catch(_0x233256){_0x4dc68f['push'](_0x4dc68f['shift']());}}}(_0x3c91,0x43881));import{getToken}from'../utils/keychain.js';function _0x4d20(_0x3883dc,_0x9a11f7){_0x3883dc=_0x3883dc-0xc5;const _0x3c911a=_0x3c91();let _0x4d2077=_0x3c911a[_0x3883dc];return _0x4d2077;}import{getFeature,concludeSession}from'../utils/featureApi.js';import{getSessionEntry,shouldShowStopReminder}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';function _0x3c91(){const _0xcc3dee=['FjzqF','1028nStwpT','dfjGJ','65862CZdlsl','2440OiWdoa','3771812oKXwgl','TnUBa','392OEpSoW','featureId','6gyEyBB','success','2580570lXFCXh','319109GlQGfS','closed','hook:stop','2gzmiMA','some','RACwJ','299311CeKjPn','stringify','status','tyiCA','OyFWR','1128834rVUgab','incomplete'];_0x3c91=function(){return _0xcc3dee;};return _0x3c91();}import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0x646b7c){const _0x52aa83=_0x4d20,_0x1fe202={'RACwJ':function(_0x5d27d7,_0x7770ba,_0x1a11f4,_0x390a60){return _0x5d27d7(_0x7770ba,_0x1a11f4,_0x390a60);},'tyiCA':function(_0x18d034){return _0x18d034();},'TnUBa':function(_0x3cef41,_0x2cb7b5){return _0x3cef41(_0x2cb7b5);},'OyFWR':'Stop','FjzqF':function(_0x39ac09,_0x2e1e08){return _0x39ac09&&_0x2e1e08;},'EcjYY':function(_0x390f0b,_0x4e654d,_0x220e1e,_0x150f72){return _0x390f0b(_0x4e654d,_0x220e1e,_0x150f72);}},_0x178068=await getEnabledHookContext(_0x646b7c),_0x48c988=_0x178068?.['sessionId']??null;let _0x15e3ea=!![];if(!_0x48c988){await _0x1fe202[_0x52aa83(0xd7)](trackStop,_0x48c988,![],_0x15e3ea);return;}try{const _0x139743=getSessionEntry(_0x48c988);if(!_0x139743){await trackStop(_0x48c988,!![],_0x15e3ea);return;}const _0x2611bf=await _0x1fe202[_0x52aa83(0xdb)](getToken),_0xa8cabc='https://dashboard.ranger.net/features/'+_0x139743[_0x52aa83(0xce)];let _0x1f0cf0=null,_0x41b91a=![],_0x365a72=![];if(_0x2611bf)try{const _0x401dfd=await getFeature(_0x139743['featureId']);_0x1f0cf0=_0x401dfd['currentSessionId']??null;const _0x2e73fa=_0x401dfd['checklistItems']['filter'](_0x5ec4a7=>_0x5ec4a7['sessionId']===_0x1f0cf0);_0x41b91a=_0x2e73fa[_0x52aa83(0xd6)](_0x3ad7f0=>_0x3ad7f0[_0x52aa83(0xda)]!=='verified'&&_0x3ad7f0['status']!=='blocked'&&_0x3ad7f0['status']!==_0x52aa83(0xd3)&&_0x3ad7f0['status']!==_0x52aa83(0xc5)),_0x365a72=_0x2e73fa['some'](_0x12e1c2=>_0x12e1c2['status']==='verification_in_progress');}catch{}if(_0x2611bf&&_0x1f0cf0&&_0x41b91a){if(!_0x365a72&&_0x1fe202[_0x52aa83(0xcc)](shouldShowStopReminder,_0x48c988)){const _0x3b684d={'hookSpecificOutput':{'hookEventName':_0x1fe202[_0x52aa83(0xdc)],'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'+_0xa8cabc}};console['log'](JSON[_0x52aa83(0xd9)](_0x3b684d));}}if(_0x1fe202[_0x52aa83(0xc6)](_0x2611bf,_0x1f0cf0)&&!_0x41b91a)try{await concludeSession(_0x139743['featureId'],_0x1f0cf0);}catch{}await trackStop(_0x48c988,!![],_0x15e3ea);return;}catch{await _0x1fe202['EcjYY'](trackStop,_0x48c988,!![],_0x15e3ea);return;}}async function trackStop(_0x5e7af4,_0x3b3e8a,_0x31eaf7){const _0x591894=_0x4d20,_0x10c6f4={'dfjGJ':function(_0x3e90f7,_0x3e11c7){return _0x3e90f7??_0x3e11c7;},'JcqHN':_0x591894(0xd0)};try{const _0x2f3530=createTelemetryCollector(_0x591894(0xd4));await _0x2f3530['trackCommandStart']({'sessionId':_0x10c6f4[_0x591894(0xc8)](_0x5e7af4,undefined),'hooksEnabled':_0x3b3e8a,'stopAllowed':_0x31eaf7}),await _0x2f3530['trackCommandEnd'](_0x10c6f4['JcqHN']);}catch{}}
@@ -1 +1 @@
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
+ (function(_0x1f7073,_0x54c8bb){var _0x446ab9=_0x5581,_0x4a7320=_0x1f7073();while(!![]){try{var _0x5788fe=parseInt(_0x446ab9(0x162))/0x1+-parseInt(_0x446ab9(0x16b))/0x2*(-parseInt(_0x446ab9(0x169))/0x3)+-parseInt(_0x446ab9(0x166))/0x4*(parseInt(_0x446ab9(0x164))/0x5)+-parseInt(_0x446ab9(0x165))/0x6*(-parseInt(_0x446ab9(0x167))/0x7)+parseInt(_0x446ab9(0x163))/0x8*(parseInt(_0x446ab9(0x168))/0x9)+-parseInt(_0x446ab9(0x16c))/0xa*(-parseInt(_0x446ab9(0x16d))/0xb)+-parseInt(_0x446ab9(0x16a))/0xc;if(_0x5788fe===_0x54c8bb)break;else _0x4a7320['push'](_0x4a7320['shift']());}catch(_0x5038d0){_0x4a7320['push'](_0x4a7320['shift']());}}}(_0x2aca,0x1e43c));export{addEnv}from'./addEnv.js';function _0x5581(_0x13553f,_0xc1f9f6){_0x13553f=_0x13553f-0x162;var _0x2aca71=_0x2aca();var _0x5581b9=_0x2aca71[_0x13553f];return _0x5581b9;}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';function _0x2aca(){var _0x1b1676=['300687YFYopg','4637760tImprI','2tPNTsU','863510HstXCG','11HJRDsP','155349TuPrvr','870488QiRalV','30DqaAWS','6MMRWIR','13520IyKnJj','559888QjGUDz','9gLBTCX'];_0x2aca=function(){return _0x1b1676;};return _0x2aca();}export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
@@ -1 +1 @@
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
+ function _0x7293(_0x5c32d6,_0x4e30a0){_0x5c32d6=_0x5c32d6-0x1e9;const _0x560faa=_0x560f();let _0x7293e1=_0x560faa[_0x5c32d6];return _0x7293e1;}(function(_0x14b625,_0x2f59ad){const _0x586748=_0x7293,_0x42e330=_0x14b625();while(!![]){try{const _0x544354=parseInt(_0x586748(0x1f2))/0x1+parseInt(_0x586748(0x1f8))/0x2*(parseInt(_0x586748(0x1f7))/0x3)+-parseInt(_0x586748(0x1ef))/0x4*(-parseInt(_0x586748(0x1f3))/0x5)+parseInt(_0x586748(0x1e9))/0x6*(-parseInt(_0x586748(0x1f4))/0x7)+-parseInt(_0x586748(0x1eb))/0x8*(parseInt(_0x586748(0x1ea))/0x9)+-parseInt(_0x586748(0x1f6))/0xa*(-parseInt(_0x586748(0x1f5))/0xb)+parseInt(_0x586748(0x1fb))/0xc*(-parseInt(_0x586748(0x1f9))/0xd);if(_0x544354===_0x2f59ad)break;else _0x42e330['push'](_0x42e330['shift']());}catch(_0x2cdb61){_0x42e330['push'](_0x42e330['shift']());}}}(_0x560f,0xc8254));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';function _0x560f(){const _0x13de16=['246kZUklQ','72449acMFjH','\x0a✅\x20Logged\x20in\x20to\x20','5316bBbJJS','success','slvaG','170760oQboZk','99423siTrHC','128enwsfi','Login\x20failed:\x20','organizationName','user','1676xFyvAC','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','stdout','942190adEwQl','18795tOkKwN','399avzUyQ','11mvhAyu','15661010MHucVP','24495kUeeHA'];_0x560f=function(){return _0x13de16;};return _0x560f();}export async function login(){const _0x428840=_0x7293,_0x2f585a={'slvaG':function(_0x475cdd,_0x3b9f00){return _0x475cdd(_0x3b9f00);},'uFkiv':function(_0x154941,_0x58cfa5){return _0x154941 instanceof _0x58cfa5;}},_0x5ef55e=await getMcpAuthOrigin();if(_0x5ef55e){console['log']('Re-authenticating\x20via\x20MCP\x20bootstrap...'),await mcpBootstrap();return;}const _0x1faec5=process['stdin']['isTTY']&&process[_0x428840(0x1f1)]['isTTY'];if(!_0x1faec5)throw new Error(_0x428840(0x1f0));try{const _0x178db3=await runDeviceAuthFlow(),_0x2cb4cb=await _0x2f585a[_0x428840(0x1fd)](getCurrentUser,_0x178db3);_0x2cb4cb[_0x428840(0x1fc)]?console['log'](_0x428840(0x1fa)+_0x2cb4cb[_0x428840(0x1ee)][_0x428840(0x1ed)]):console['log']('\x0a✅\x20API\x20key\x20stored\x20successfully');}catch(_0x917ea7){throw new Error(_0x428840(0x1ec)+(_0x2f585a['uFkiv'](_0x917ea7,Error)?_0x917ea7['message']:_0x917ea7));}}
@@ -0,0 +1 @@
1
+ const _0x513afc=_0xb1e6;function _0xb1e6(_0x4fb583,_0x290aa8){_0x4fb583=_0x4fb583-0x107;const _0x230479=_0x2304();let _0xb1e615=_0x230479[_0x4fb583];return _0xb1e615;}(function(_0x7ed3d9,_0x51dace){const _0x5a2d73=_0xb1e6,_0x3c9018=_0x7ed3d9();while(!![]){try{const _0x1f6590=-parseInt(_0x5a2d73(0x164))/0x1+-parseInt(_0x5a2d73(0x198))/0x2*(-parseInt(_0x5a2d73(0x15a))/0x3)+-parseInt(_0x5a2d73(0x134))/0x4*(-parseInt(_0x5a2d73(0x165))/0x5)+parseInt(_0x5a2d73(0x182))/0x6+parseInt(_0x5a2d73(0x183))/0x7*(-parseInt(_0x5a2d73(0x195))/0x8)+parseInt(_0x5a2d73(0x115))/0x9*(-parseInt(_0x5a2d73(0x179))/0xa)+-parseInt(_0x5a2d73(0x14a))/0xb*(-parseInt(_0x5a2d73(0x12f))/0xc);if(_0x1f6590===_0x51dace)break;else _0x3c9018['push'](_0x3c9018['shift']());}catch(_0x268109){_0x3c9018['push'](_0x3c9018['shift']());}}}(_0x2304,0xd7a39));import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createServer}from'http';import{randomBytes,createHash}from'crypto';import{getMcpAuthUrl}from'./utils/environment.js';const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),_0x513afc(0x10c),'mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),'.ranger','auth-origin.txt');export async function getMcpAuthOrigin(){const _0x397b60=_0x513afc;try{const _0x53ca08=(await readFile(AUTH_ORIGIN_PATH,'utf-8'))[_0x397b60(0x152)]();return _0x53ca08||null;}catch{return null;}}export async function mcpBootstrap(){const _0xd6e564=_0x513afc,_0x1d7392={'VCZBC':function(_0x55ded8){return _0x55ded8();},'wlhrV':function(_0x46b6c1,_0x38fb7e){return _0x46b6c1+_0x38fb7e;},'WvAji':function(_0x4beb15,_0x3be13d){return _0x4beb15(_0x3be13d);}},_0x14428d=getMcpAuthUrl();currentOrigin=_0x14428d;const _0xd11886=process['stdout'][_0xd6e564(0x127)]??![];console[_0xd6e564(0x17e)]('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x14428d+'\x0a');let _0x26f39f=await tryUnauthenticated(_0x14428d);!_0x26f39f&&(_0x26f39f=await _0x1d7392[_0xd6e564(0x14f)](loadCachedToken));if(!_0x26f39f){if(!_0xd11886)throw new Error(_0x1d7392[_0xd6e564(0x15e)](_0xd6e564(0x185),'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.'));_0x26f39f=await _0x1d7392['WvAji'](oauthFlow,_0x14428d);}await callGetCliToken(_0x14428d,_0x26f39f);}async function tryUnauthenticated(_0x3861b9){const _0x5b156a=_0x513afc,_0x3847ba={'mvaoU':function(_0x56d3d9,_0x1f8902,_0x3a0a5c){return _0x56d3d9(_0x1f8902,_0x3a0a5c);},'OqhFt':'POST','qEStS':_0x5b156a(0x108),'iLaui':_0x5b156a(0x12a),'aagJM':_0x5b156a(0x11d),'GTCmD':function(_0x2d8331,_0x700a06){return _0x2d8331===_0x700a06;}},_0x565953=await _0x3847ba[_0x5b156a(0x169)](fetch,_0x3861b9,{'method':_0x3847ba['OqhFt'],'headers':{'Content-Type':_0x3847ba['qEStS'],'Accept':_0x5b156a(0x144)},'body':JSON['stringify']({'jsonrpc':_0x3847ba['iLaui'],'id':0x1,'method':_0x3847ba[_0x5b156a(0x16b)],'params':{'protocolVersion':_0x5b156a(0x193),'capabilities':{},'clientInfo':{'name':'ranger-cli','version':_0x5b156a(0x10a)}}})});if(_0x565953['ok'])return await _0x565953[_0x5b156a(0x16f)](),'';if(_0x3847ba[_0x5b156a(0x155)](_0x565953[_0x5b156a(0x174)],0x191))return await _0x565953['text'](),null;const _0x494a6e=await _0x565953['text']();throw new Error(_0x5b156a(0x128)+_0x565953['status']+':\x20'+_0x494a6e);}async function oauthFlow(_0x3aaedf){const _0x241da3=_0x513afc,_0x14ea63={'yCxqr':_0x241da3(0x18d),'vTecL':'No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','BffsQ':function(_0x134989,_0x583c6d){return _0x134989(_0x583c6d);},'SPsgw':'POST','JLFFB':'application/json','vMYEY':_0x241da3(0x175),'ZOQzW':_0x241da3(0x140),'SAvSf':_0x241da3(0x166),'jSxLK':_0x241da3(0x180),'CvFZV':_0x241da3(0x109),'pUvHs':_0x241da3(0x14b),'fNbVb':'authorization_code','DAHmy':'client_secret','AEonA':_0x241da3(0x119),'gyeYN':function(_0x48c85e,_0x4c9904,_0x2b195b){return _0x48c85e(_0x4c9904,_0x2b195b);},'LPXME':_0x241da3(0x122)},_0x50a383=_0x3aaedf[_0x241da3(0x12b)](/\/mcp$/,'');process['stdout']['write']('Discovering\x20authorization\x20server...');const _0x3aa1e=await fetch(_0x50a383+_0x241da3(0x187));if(!_0x3aa1e['ok'])throw new Error(_0x14ea63[_0x241da3(0x150)]);const _0x465728=await _0x3aa1e['json'](),_0x2861b4=_0x465728[_0x241da3(0x136)]?.[0x0];if(!_0x2861b4)throw new Error(_0x14ea63[_0x241da3(0x192)]);console['log']('\x20'+_0x2861b4);const _0x410eb6=await _0x14ea63[_0x241da3(0x177)](fetchAuthServerMetadata,_0x2861b4);let _0x230e48,_0x1c4ac3;const _0x17f434=await loadCachedClient();if(_0x17f434)_0x230e48=_0x17f434[_0x241da3(0x11a)],_0x1c4ac3=_0x17f434['clientSecret'];else{if(_0x410eb6['registration_endpoint']){process[_0x241da3(0x138)]['write']('Registering\x20OAuth\x20client...');const _0x439071=await fetch(_0x410eb6['registration_endpoint'],{'method':_0x14ea63[_0x241da3(0x10e)],'headers':{'Content-Type':_0x14ea63['JLFFB']},'body':JSON['stringify']({'client_name':'Ranger\x20CLI','redirect_uris':['http://localhost:'+CALLBACK_PORT+_0x241da3(0x14c)],'grant_types':['authorization_code',_0x14ea63[_0x241da3(0x11b)]],'response_types':[_0x14ea63[_0x241da3(0x118)]],'token_endpoint_auth_method':'none'})});if(!_0x439071['ok']){const _0x59cc9f=await _0x439071['text']();throw new Error('Client\x20registration\x20failed:\x20'+_0x59cc9f);}const _0x599953=await _0x439071['json']();_0x230e48=_0x599953[_0x241da3(0x188)],_0x1c4ac3=_0x599953[_0x241da3(0x14d)],await saveCachedClient(_0x230e48,_0x1c4ac3),console['log']('\x20done');}else throw new Error(_0x241da3(0x112));}const _0x2468b5=randomBytes(0x20)['toString']('base64url'),_0x4bbd69=createHash(_0x241da3(0x151))['update'](_0x2468b5)['digest'](_0x241da3(0x154)),_0x5bf51d=_0x14ea63['BffsQ'](randomBytes,0x10)[_0x241da3(0x167)]('hex'),_0x13fa86=new URL(_0x410eb6[_0x241da3(0x125)]);_0x13fa86['searchParams']['set'](_0x14ea63[_0x241da3(0x19f)],_0x14ea63['ZOQzW']),_0x13fa86[_0x241da3(0x145)][_0x241da3(0x13e)](_0x241da3(0x188),_0x230e48),_0x13fa86[_0x241da3(0x145)][_0x241da3(0x13e)](_0x14ea63['jSxLK'],'http://localhost:'+CALLBACK_PORT+_0x241da3(0x14c)),_0x13fa86[_0x241da3(0x145)]['set']('code_challenge',_0x4bbd69),_0x13fa86[_0x241da3(0x145)]['set']('code_challenge_method',_0x14ea63['CvFZV']),_0x13fa86[_0x241da3(0x145)][_0x241da3(0x13e)](_0x14ea63[_0x241da3(0x159)],_0x5bf51d);_0x465728['resource']&&_0x13fa86['searchParams'][_0x241da3(0x13e)]('resource',_0x465728[_0x241da3(0x119)]);console['log'](_0x241da3(0x149)),console['log'](_0x241da3(0x163)+_0x13fa86['toString']()+'\x0a'),await _0x14ea63['BffsQ'](openBrowser,_0x13fa86[_0x241da3(0x167)]());const _0x68f606=await waitForCallback(_0x5bf51d);process[_0x241da3(0x138)]['write'](_0x241da3(0x17d));const _0xbe90a=new URLSearchParams({'grant_type':_0x14ea63[_0x241da3(0x176)],'code':_0x68f606,'redirect_uri':_0x241da3(0x143)+CALLBACK_PORT+'/callback','client_id':_0x230e48,'code_verifier':_0x2468b5});_0x1c4ac3&&_0xbe90a['set'](_0x14ea63[_0x241da3(0x120)],_0x1c4ac3);_0x465728[_0x241da3(0x119)]&&_0xbe90a[_0x241da3(0x13e)](_0x14ea63[_0x241da3(0x16e)],_0x465728['resource']);const _0x5d00db=await _0x14ea63['gyeYN'](fetch,_0x410eb6['token_endpoint'],{'method':'POST','headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':_0xbe90a});if(!_0x5d00db['ok']){const _0x262732=await _0x5d00db[_0x241da3(0x16f)]();throw new Error('Token\x20exchange\x20failed:\x20'+_0x262732);}const _0x35c810=await _0x5d00db[_0x241da3(0x114)]();return console['log'](_0x14ea63[_0x241da3(0x18b)]),await saveCachedToken(_0x35c810[_0x241da3(0x17c)],_0x35c810['refresh_token'],_0x35c810['expires_in']),_0x35c810[_0x241da3(0x17c)];}async function callGetCliToken(_0x480136,_0x144b9a){const _0x3c31ba=_0x513afc,_0x1cad41={'eAiGj':_0x3c31ba(0x173),'IkQcR':function(_0x2f70d3,_0x2f0be5){return _0x2f70d3(_0x2f0be5);},'fdJwA':_0x3c31ba(0x108),'HtTbJ':_0x3c31ba(0x144),'tqLtn':_0x3c31ba(0x12a),'jDGUa':_0x3c31ba(0x11d),'guBlF':_0x3c31ba(0x12d),'KXILE':'1.0.0','luzcm':'notifications/initialized','zAcfO':'Requesting\x20CLI\x20token...','XJmdW':_0x3c31ba(0x12c),'EoTKi':function(_0x243e38){return _0x243e38();},'TTOqa':_0x3c31ba(0x13f),'BBvYv':function(_0x4baaa6,_0x504e61,_0x186773){return _0x4baaa6(_0x504e61,_0x186773);}},_0x52f857={'Content-Type':_0x1cad41['fdJwA'],'Accept':_0x1cad41['HtTbJ']};_0x144b9a&&(_0x52f857['Authorization']='Bearer\x20'+_0x144b9a);const _0x27f0d5=async _0x4730d5=>{const _0x17933a=_0x3c31ba,_0x496446=await fetch(_0x480136,{'method':_0x1cad41['eAiGj'],'headers':_0x52f857,'body':JSON['stringify'](_0x4730d5)});if(!_0x496446['ok']){const _0x4bef92=await _0x496446[_0x17933a(0x16f)]();throw new Error(_0x17933a(0x147)+_0x496446[_0x17933a(0x174)]+':\x20'+_0x4bef92);}return _0x1cad41[_0x17933a(0x10f)](parseResponse,_0x496446);};process[_0x3c31ba(0x138)]['write']('Initializing\x20MCP\x20session...');const _0x50ba9b=await _0x27f0d5({'jsonrpc':_0x1cad41['tqLtn'],'id':0x1,'method':_0x1cad41[_0x3c31ba(0x124)],'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x1cad41['guBlF'],'version':_0x1cad41[_0x3c31ba(0x19e)]}}});if(_0x50ba9b[_0x3c31ba(0x133)])throw new Error(_0x3c31ba(0x16c)+(_0x50ba9b['error'][_0x3c31ba(0x156)]??JSON['stringify'](_0x50ba9b[_0x3c31ba(0x133)])));console[_0x3c31ba(0x17e)]('\x20done'),await fetch(_0x480136,{'method':'POST','headers':_0x52f857,'body':JSON['stringify']({'jsonrpc':_0x1cad41['tqLtn'],'method':_0x1cad41[_0x3c31ba(0x148)]})})['then'](_0x2bc9e4=>_0x2bc9e4['text']()),process['stdout']['write'](_0x1cad41['zAcfO']);const _0x21bcb7=await _0x27f0d5({'jsonrpc':_0x3c31ba(0x12a),'id':0x2,'method':_0x1cad41[_0x3c31ba(0x17f)],'params':{'name':_0x3c31ba(0x137),'arguments':{}}});if(_0x21bcb7[_0x3c31ba(0x133)])throw new Error('get_cli_token\x20failed:\x20'+(_0x21bcb7['error'][_0x3c31ba(0x156)]??JSON['stringify'](_0x21bcb7[_0x3c31ba(0x133)])));console['log']('\x20done');const _0x59b62d=extractToken(_0x21bcb7[_0x3c31ba(0x153)]);if(!_0x59b62d){console[_0x3c31ba(0x133)](_0x3c31ba(0x113)),console[_0x3c31ba(0x133)](JSON['stringify'](_0x21bcb7['result'],null,0x2));throw new Error('Could\x20not\x20extract\x20token\x20from\x20MCP\x20response');}const _0x3f098d=join(_0x1cad41['EoTKi'](homedir),_0x3c31ba(0x10c)),_0x882ba1=join(_0x3f098d,_0x1cad41['TTOqa']);await _0x1cad41[_0x3c31ba(0x11e)](mkdir,_0x3f098d,{'recursive':!![]}),await writeFile(_0x882ba1,_0x59b62d,{'mode':0x180}),await writeFile(_0x1cad41[_0x3c31ba(0x11e)](join,_0x3f098d,_0x3c31ba(0x171)),_0x480136,{'mode':0x180}),console[_0x3c31ba(0x17e)]('\x0aToken\x20written\x20to\x20'+_0x882ba1),console['log'](_0x3c31ba(0x130));}async function fetchAuthServerMetadata(_0x2f9bd4){const _0x2f4248=_0x513afc,_0x308bbd={'XaPnu':function(_0x1b06c6,_0xaa28ee){return _0x1b06c6(_0xaa28ee);}},_0x4f62ab=_0x2f9bd4+'/.well-known/oauth-authorization-server',_0x2d5a15=await _0x308bbd[_0x2f4248(0x13a)](fetch,_0x4f62ab);if(!_0x2d5a15['ok'])throw new Error(_0x2f4248(0x19a)+_0x4f62ab+':\x20'+_0x2d5a15['status']);return _0x2d5a15['json']();}function waitForCallback(_0x54c9d4){const _0x4a21c9=_0x513afc,_0x4efeba={'fwoof':'/callback','jmuuU':function(_0xdf9010,_0x4497ec){return _0xdf9010!==_0x4497ec;},'WkqJw':_0x4a21c9(0x161),'ClXmx':function(_0x401b95,_0x2e1f38){return _0x401b95(_0x2e1f38);}};return new Promise((_0x5e7af1,_0x183e0d)=>{const _0xe1fa88=_0x4a21c9,_0x88e552={'JGchr':_0x4efeba[_0xe1fa88(0x19d)],'OSfrv':_0xe1fa88(0x199),'mohYr':_0xe1fa88(0x140),'mtEcE':'error_description','mBmot':function(_0xe5f2d2,_0x23265b){return _0x4efeba['jmuuU'](_0xe5f2d2,_0x23265b);},'mRDOx':_0x4efeba['WkqJw'],'FcTga':_0xe1fa88(0x194),'qTztx':function(_0x232eef,_0x4b5b32){return _0x4efeba['ClXmx'](_0x232eef,_0x4b5b32);}},_0x27e81b=setTimeout(()=>{const _0x33d95c=_0xe1fa88;_0x37399d['close'](),_0x183e0d(new Error(_0x33d95c(0x186)));},0x1d4c0),_0x37399d=_0x4efeba[_0xe1fa88(0x15c)](createServer,(_0x2cc978,_0x2145b7)=>{const _0x50713f=_0xe1fa88,_0x1feed3=new URL(_0x2cc978[_0x50713f(0x126)]??'/','http://localhost:'+CALLBACK_PORT);if(_0x1feed3[_0x50713f(0x14e)]!==_0x88e552[_0x50713f(0x121)]){_0x2145b7['writeHead'](0x194),_0x2145b7['end'](_0x88e552[_0x50713f(0x107)]);return;}const _0x119b2a=_0x1feed3['searchParams']['get'](_0x88e552[_0x50713f(0x13b)]),_0x59f773=_0x1feed3[_0x50713f(0x145)][_0x50713f(0x131)](_0x50713f(0x14b)),_0xc72ecf=_0x1feed3[_0x50713f(0x145)][_0x50713f(0x131)](_0x50713f(0x133));if(_0xc72ecf){const _0x1dc40f=_0x1feed3['searchParams'][_0x50713f(0x131)](_0x88e552['mtEcE'])??_0xc72ecf;_0x2145b7['writeHead'](0xc8,{'Content-Type':'text/html'}),_0x2145b7[_0x50713f(0x170)](_0x50713f(0x16a)+_0x1dc40f+_0x50713f(0x181)),clearTimeout(_0x27e81b),_0x37399d['close'](),_0x183e0d(new Error(_0x50713f(0x18c)+_0x1dc40f));return;}if(!_0x119b2a||_0x88e552['mBmot'](_0x59f773,_0x54c9d4)){_0x2145b7[_0x50713f(0x19c)](0x190,{'Content-Type':'text/html'}),_0x2145b7['end'](_0x88e552['mRDOx']);return;}_0x2145b7[_0x50713f(0x19c)](0xc8,{'Content-Type':_0x50713f(0x110)}),_0x2145b7[_0x50713f(0x170)](_0x88e552[_0x50713f(0x129)]),_0x88e552['qTztx'](clearTimeout,_0x27e81b),_0x37399d[_0x50713f(0x139)](),_0x88e552[_0x50713f(0x135)](_0x5e7af1,_0x119b2a);});_0x37399d['listen'](CALLBACK_PORT,_0xe1fa88(0x15d));});}async function openBrowser(_0x2992f8){const _0x2419c3=_0x513afc,_0x1c26b5={'pgtvw':function(_0x1ce9ff,_0x12985a){return _0x1ce9ff===_0x12985a;},'YzbCB':_0x2419c3(0x17b),'mFbfL':function(_0x408e2b,_0x35176d){return _0x408e2b===_0x35176d;},'EQbXs':'win32','VbeIj':_0x2419c3(0x184),'tMsgH':function(_0x192637,_0x17a2ad){return _0x192637(_0x17a2ad);}},{exec:_0x3cf3d4}=await import(_0x2419c3(0x10b)),_0x59c463=_0x1c26b5['pgtvw'](process['platform'],'darwin')?_0x1c26b5['YzbCB']:_0x1c26b5[_0x2419c3(0x160)](process[_0x2419c3(0x123)],_0x1c26b5['EQbXs'])?_0x1c26b5['VbeIj']:'xdg-open';_0x1c26b5['tMsgH'](_0x3cf3d4,_0x59c463+'\x20\x22'+_0x2992f8+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0xfd50b1=_0x513afc,_0x132f4a={'dxmXj':_0xfd50b1(0x197),'kLpMT':function(_0x5229f0,_0x4918ad){return _0x5229f0!==_0x4918ad;}};try{const _0x4b08dc=JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x132f4a[_0xfd50b1(0x11f)]));if(_0x4b08dc['origin']&&_0x132f4a[_0xfd50b1(0x13c)](_0x4b08dc[_0xfd50b1(0x190)],currentOrigin))return null;if(_0x4b08dc['expiresAt']&&Date['now']()>_0x4b08dc[_0xfd50b1(0x111)])return null;return _0x4b08dc['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x273f67,_0x1c71f1,_0x4243a7){const _0x2edfa3=_0x513afc,_0x151fd8={'uYCyF':function(_0x545aeb,_0x53dbbf){return _0x545aeb+_0x53dbbf;},'JCEBz':function(_0x3f6673,_0x50ddb1,_0x18249f){return _0x3f6673(_0x50ddb1,_0x18249f);},'PYCfn':function(_0x48c5df){return _0x48c5df();},'ywsIU':function(_0xdb7e2f,_0x107a74,_0x45f3c2,_0x1ae824){return _0xdb7e2f(_0x107a74,_0x45f3c2,_0x1ae824);}},_0x44d261=await loadCachedData(),_0x26e676={..._0x44d261,'origin':currentOrigin,'accessToken':_0x273f67,'refreshToken':_0x1c71f1??_0x44d261?.['refreshToken'],'expiresAt':_0x4243a7?_0x151fd8['uYCyF'](Date[_0x2edfa3(0x12e)](),_0x4243a7*0x3e8):undefined};await _0x151fd8['JCEBz'](mkdir,join(_0x151fd8[_0x2edfa3(0x157)](homedir),'.ranger'),{'recursive':!![]}),await _0x151fd8[_0x2edfa3(0x11c)](writeFile,TOKEN_CACHE_PATH,JSON[_0x2edfa3(0x15f)](_0x26e676),{'mode':0x180});}function _0x2304(){const _0x560dcd=['/.well-known/oauth-protected-resource','client_id','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','parse','LPXME','OAuth\x20error:\x20','Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','accessToken','gKkPv','origin','isError','vTecL','2025-03-26','<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','814224YcMvcg','token','utf-8','106496bXPWSZ','Not\x20found','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','zMsOp','writeHead','fwoof','KXILE','SAvSf','xIaOB','OSfrv','application/json','S256','1.0.0','child_process','.ranger','clientSecret','SPsgw','IkQcR','text/html','expiresAt','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','\x0aUnexpected\x20response\x20structure:','json','64431wwkqKI','giObS','split','ZOQzW','resource','clientId','vMYEY','ywsIU','initialize','BBvYv','dxmXj','DAHmy','JGchr','\x20done','platform','jDGUa','authorization_endpoint','url','isTTY','MCP\x20server\x20returned\x20HTTP\x20','FcTga','2.0','replace','tools/call','ranger-cli','now','1112604AsYosV','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a','get','data:','error','156NaDypO','qTztx','authorization_servers','get_cli_token','stdout','close','XaPnu','mohYr','kLpMT','slice','set','refresh.txt','code','emfkq','QHZPR','http://localhost:','application/json,\x20text/event-stream','searchParams','content-type','HTTP\x20','luzcm','\x0aOpening\x20browser\x20for\x20authentication...','231hlvggJ','state','/callback','client_secret','pathname','VCZBC','yCxqr','sha256','trim','result','base64url','GTCmD','message','PYCfn','text/event-stream','pUvHs','18isNYBn','vJPHI','ClXmx','127.0.0.1','wlhrV','stringify','mFbfL','<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','JgztL','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','1754325dZvKhS','122895TictMX','response_type','toString','match','mvaoU','<html><body><h2>Authentication\x20failed</h2><p>','aagJM','MCP\x20initialize\x20failed:\x20','Unknown\x20error','AEonA','text','end','auth-origin.txt','includes','POST','status','refresh_token','fNbVb','BffsQ','string','970yJTiRO','structuredContent','open','access_token','Exchanging\x20authorization\x20code...','log','XJmdW','redirect_uri','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','2473278UNmxGh','21cyLYUz','start','MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes'];_0x2304=function(){return _0x560dcd;};return _0x2304();}async function loadCachedClient(){const _0x5ab60b=_0x513afc,_0x567f93={'giObS':function(_0x184cd3,_0x2b1a64){return _0x184cd3!==_0x2b1a64;}},_0x56cb76=await loadCachedData();if(_0x56cb76?.['origin']&&_0x567f93[_0x5ab60b(0x116)](_0x56cb76[_0x5ab60b(0x190)],currentOrigin))return null;return _0x56cb76?.['clientId']?{'clientId':_0x56cb76[_0x5ab60b(0x11a)],'clientSecret':_0x56cb76[_0x5ab60b(0x10d)]}:null;}async function saveCachedClient(_0x1074f4,_0x127b74){const _0x21413b=_0x513afc,_0x55e189={'gtWvH':function(_0x526296){return _0x526296();},'xIaOB':function(_0x5d826c,_0x55bb19,_0x5e0f81){return _0x5d826c(_0x55bb19,_0x5e0f81);},'QHZPR':function(_0x5392c0){return _0x5392c0();}},_0x18ee51=await _0x55e189['gtWvH'](loadCachedData),_0x452b83={..._0x18ee51,'origin':currentOrigin,'accessToken':_0x18ee51?.[_0x21413b(0x18e)]??'','clientId':_0x1074f4,'clientSecret':_0x127b74};await _0x55e189[_0x21413b(0x1a0)](mkdir,join(_0x55e189[_0x21413b(0x142)](homedir),_0x21413b(0x10c)),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON[_0x21413b(0x15f)](_0x452b83),{'mode':0x180});}async function loadCachedData(){const _0x1d4c84=_0x513afc,_0x1033c8={'gKkPv':function(_0x5a8bf1,_0x5a5057,_0x28c86d){return _0x5a8bf1(_0x5a5057,_0x28c86d);}};try{return JSON[_0x1d4c84(0x18a)](await _0x1033c8[_0x1d4c84(0x18f)](readFile,TOKEN_CACHE_PATH,_0x1d4c84(0x197)));}catch{return null;}}async function parseResponse(_0x170229){const _0x1c53cc=_0x513afc,_0x1ad6e1={'zMsOp':_0x1c53cc(0x158),'emfkq':_0x1c53cc(0x132),'fXSYB':_0x1c53cc(0x189)},_0x3b337f=_0x170229['headers'][_0x1c53cc(0x131)](_0x1c53cc(0x146))??'';if(_0x3b337f[_0x1c53cc(0x172)](_0x1ad6e1[_0x1c53cc(0x19b)])){const _0x3467f8=await _0x170229['text']();for(const _0xc0cd02 of _0x3467f8[_0x1c53cc(0x117)]('\x0a')){const _0x4e1347=_0xc0cd02['trim']();if(_0x4e1347['startsWith'](_0x1ad6e1[_0x1c53cc(0x141)])){const _0x1050f5=_0x4e1347[_0x1c53cc(0x13d)](_0x1c53cc(0x132)['length'])[_0x1c53cc(0x152)]();if(!_0x1050f5)continue;try{const _0x193641=JSON['parse'](_0x1050f5);if(_0x193641['id']!==undefined||_0x193641['error'])return _0x193641;}catch{}}}throw new Error(_0x1ad6e1['fXSYB']);}return _0x170229['json']();}function extractToken(_0x56010c){const _0x8798e0=_0x513afc,_0x3f4b63={'JgztL':function(_0x423ebb,_0x2d9985){return _0x423ebb===_0x2d9985;},'vJPHI':'text'};if(!_0x56010c)return null;const _0x53e2a2=_0x56010c[_0x8798e0(0x17a)];if(_0x53e2a2?.[_0x8798e0(0x196)]&&typeof _0x53e2a2[_0x8798e0(0x196)]==='string')return _0x53e2a2[_0x8798e0(0x196)];if(_0x56010c[_0x8798e0(0x191)]){const _0xc884f9=_0x56010c['content'];throw new Error('Server\x20returned\x20error:\x20'+(_0xc884f9?.[0x0]?.['text']??_0x8798e0(0x16d)));}const _0x40c67d=_0x56010c['content'];if(_0x40c67d)for(const _0x2077db of _0x40c67d){if(_0x3f4b63[_0x8798e0(0x162)](_0x2077db['type'],_0x3f4b63[_0x8798e0(0x15b)])&&_0x2077db[_0x8798e0(0x16f)]){try{const _0xc9f903=JSON[_0x8798e0(0x18a)](_0x2077db['text']);if(typeof _0xc9f903?.[_0x8798e0(0x196)]===_0x8798e0(0x178))return _0xc9f903['token'];}catch{}const _0xdbe108=_0x2077db[_0x8798e0(0x16f)][_0x8798e0(0x168)](/(rngr_[A-Za-z0-9_-]+)/);if(_0xdbe108)return _0xdbe108[0x1];}}return null;}
@@ -1 +1 @@
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
+ (function(_0x1b025f,_0x1a4a29){const _0x802060=_0xa57b,_0x5b8718=_0x1b025f();while(!![]){try{const _0x2ea369=-parseInt(_0x802060(0x90))/0x1+parseInt(_0x802060(0x8c))/0x2+-parseInt(_0x802060(0x7b))/0x3*(-parseInt(_0x802060(0x7c))/0x4)+parseInt(_0x802060(0xa3))/0x5+parseInt(_0x802060(0x81))/0x6*(-parseInt(_0x802060(0x79))/0x7)+-parseInt(_0x802060(0x97))/0x8+parseInt(_0x802060(0x96))/0x9*(-parseInt(_0x802060(0x87))/0xa);if(_0x2ea369===_0x1a4a29)break;else _0x5b8718['push'](_0x5b8718['shift']());}catch(_0x3cd6ef){_0x5b8718['push'](_0x5b8718['shift']());}}}(_0x4ce9,0x3b70d));import{join}from'path';import{existsSync}from'fs';import _0x46e1c4 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';function _0x4ce9(){const _0x41c0c2=['190217NxfHVX','confirm','❌\x20Failed\x20to\x20install\x20plugin:','prompt','push','log','18pmImaf','3359456rmYrKb','uiQuQ','✓\x20Ranger\x20skills\x20already\x20installed','WZiei','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','✓\x20Marketplace\x20already\x20added','ranger-testing/trailhead','user','eECyq','✓\x20Claude\x20Code\x20plugin\x20enabled','already\x20enabled','wantsSkillup','1953365HgQHTD','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','pluginScope','User\x20(available\x20in\x20all\x20your\x20projects)','sMHvP','zcbUy','HqCxO','atujp','ranger','kqlGb','OrXjs','SKILL.md','ZzMvu','includes','457282kcsrzF','list','766911zhLtQP','4obzhMN','⚠\x20Failed\x20to\x20enable\x20plugin:','add','--scope','marketplace','18hmDeCX','error','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','WfBQp','\x20level)...\x0a','OuuWS','349870nQYhxK','Would\x20you\x20like\x20to\x20install\x20skills?','BlIKI','success','ranger@trailhead','946520ztYaqs','output','project','\x0aYou\x20can\x20install\x20manually\x20with:'];_0x4ce9=function(){return _0x41c0c2;};return _0x4ce9();}export async function ensureClaudePlugin(_0x59b842){const _0xdef918=_0xa57b,_0x427d78={'OuuWS':_0xdef918(0x83),'zcbUy':function(_0x1c337c){return _0x1c337c();},'zZKnM':'project','WZiei':'\x0a📦\x20Claude\x20Code\x20Plugin\x0a','HkPBZ':_0xdef918(0x7a),'GwPvQ':'Where\x20should\x20the\x20plugin\x20be\x20installed?','eVjYG':'trailhead','ZzMvu':'plugin','YVVbM':_0xdef918(0x80),'ALVmv':'❌\x20Failed\x20to\x20add\x20marketplace:','uiQuQ':_0xdef918(0x9b),'atujp':'ranger@trailhead','OrXjs':_0xdef918(0x7f),'GwVWx':_0xdef918(0x8f),'WbJNr':'enable','fNSma':function(_0x2b0b33,_0x1f736b){return _0x2b0b33===_0x1f736b;},'WfBQp':_0xdef918(0xa1)},_0x26f143=await isPluginInstalled(_0xdef918(0x8b));if(_0x26f143)return console[_0xdef918(0x95)](_0x427d78[_0xdef918(0x86)]),![];const _0x409aad=existsSync(join(_0x427d78[_0xdef918(0xa8)](getProjectRoot),'.claude'));let _0x4f1ce4;if(_0x59b842)_0x4f1ce4=_0x59b842;else{if(_0x409aad)_0x4f1ce4=_0x427d78['zZKnM'];else{console['log'](_0x427d78[_0xdef918(0x9a)]);const _0x1f28cd=await _0x46e1c4[_0xdef918(0x93)]([{'type':_0x427d78['HkPBZ'],'name':'pluginScope','message':_0x427d78['GwPvQ'],'choices':[{'name':_0xdef918(0xa6),'value':'user'},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x427d78['zZKnM']}],'default':'user'}]);_0x4f1ce4=_0x1f28cd[_0xdef918(0xa5)];}}console[_0xdef918(0x95)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x4f1ce4+_0xdef918(0x85));const _0x44140f=await isMarketplaceAdded(_0x427d78['eVjYG']);let _0x6a1b59=_0x44140f;if(_0x44140f)console['log'](_0xdef918(0x9c));else{const _0xd30c76=await runClaudeCommand([_0x427d78[_0xdef918(0x77)],_0x427d78['YVVbM'],_0xdef918(0x7e),_0xdef918(0x9d)]);!_0xd30c76[_0xdef918(0x8a)]?(console[_0xdef918(0x82)](_0x427d78['ALVmv'],_0xd30c76['error']),console['log'](_0xdef918(0x8f)),console[_0xdef918(0x95)](_0x427d78[_0xdef918(0x98)]),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x4f1ce4)):_0x6a1b59=!![];}if(_0x6a1b59){const _0x46e007=await runClaudeCommand([_0x427d78['ZzMvu'],'install',_0x427d78[_0xdef918(0xaa)],_0x427d78[_0xdef918(0x75)],_0x4f1ce4]);if(!_0x46e007[_0xdef918(0x8a)])console['error'](_0xdef918(0x92),_0x46e007['error']),console['log'](_0x427d78['GwVWx']),console['log'](_0xdef918(0xa4)+_0x4f1ce4);else{console[_0xdef918(0x95)]('✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully');const _0x1f7f4b=['plugin',_0x427d78['WbJNr'],_0x427d78[_0xdef918(0xaa)]];_0x427d78['fNSma'](_0x4f1ce4,'project')&&_0x1f7f4b[_0xdef918(0x94)](_0xdef918(0x7f),'project');const _0xaf3f76=await runClaudeCommand(_0x1f7f4b,{'captureOutput':!![]}),_0x1d5f98=_0xaf3f76[_0xdef918(0x8d)]?.[_0xdef918(0x78)](_0x427d78[_0xdef918(0x84)]);!_0xaf3f76[_0xdef918(0x8a)]&&!_0x1d5f98?console[_0xdef918(0x82)](_0xdef918(0x7d),_0xaf3f76['error']):console[_0xdef918(0x95)](_0xdef918(0xa0));}}return!![];}function _0xa57b(_0x7df520,_0x3771f9){_0x7df520=_0x7df520-0x74;const _0x4ce9f0=_0x4ce9();let _0xa57b9a=_0x4ce9f0[_0x7df520];return _0xa57b9a;}export async function ensureClaudeSkills(_0x253a1b){const _0x3b8a79=_0xa57b,_0x54e87e={'eECyq':_0x3b8a79(0x9e),'HqCxO':_0x3b8a79(0x76),'XIiIQ':function(_0x4b4830,_0x3d9197){return _0x4b4830(_0x3d9197);},'VQYuX':'project','rIYOU':_0x3b8a79(0xab),'LbKlc':function(_0x42a8d7,_0x192ea0){return _0x42a8d7||_0x192ea0;},'dqPhh':_0x3b8a79(0x99),'sMHvP':'.claude','kqlGb':_0x3b8a79(0x91),'BlIKI':function(_0xb9d386,_0x16b9d9){return _0xb9d386(_0x16b9d9);}},_0x5655ad=existsSync(join(getSkillsDir(_0x54e87e[_0x3b8a79(0x9f)]),'ranger',_0x54e87e[_0x3b8a79(0xa9)])),_0x917605=_0x54e87e['XIiIQ'](existsSync,join(getSkillsDir(_0x54e87e['VQYuX']),_0x54e87e['rIYOU'],'SKILL.md'));if(_0x54e87e['LbKlc'](_0x5655ad,_0x917605))return console['log'](_0x54e87e['dqPhh']),![];const _0x3855ca=existsSync(join(getProjectRoot(),_0x54e87e[_0x3b8a79(0xa7)]));let _0x40eb10=!![];if(_0x253a1b)await _0x54e87e['XIiIQ'](skillup,{'autoInstall':_0x253a1b,'suppressUsage':!![]});else{if(_0x3855ca)await skillup({'autoInstall':_0x3b8a79(0x8e),'suppressUsage':!![]});else{const _0x184cb2=await _0x46e1c4['prompt']([{'type':_0x54e87e[_0x3b8a79(0x74)],'name':_0x3b8a79(0xa2),'message':_0x3b8a79(0x88),'default':!![]}]);_0x40eb10=_0x184cb2[_0x3b8a79(0xa2)],_0x40eb10&&await _0x54e87e[_0x3b8a79(0x89)](skillup,{'suppressUsage':!![]});}}return _0x40eb10;}
@@ -1 +1 @@
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
+ (function(_0x285896,_0x31102a){const _0x2039bc=_0x3052,_0x11b12e=_0x285896();while(!![]){try{const _0x563a87=parseInt(_0x2039bc(0x175))/0x1+-parseInt(_0x2039bc(0x176))/0x2+-parseInt(_0x2039bc(0x185))/0x3+-parseInt(_0x2039bc(0x171))/0x4*(parseInt(_0x2039bc(0x170))/0x5)+-parseInt(_0x2039bc(0x181))/0x6+parseInt(_0x2039bc(0x179))/0x7+-parseInt(_0x2039bc(0x17e))/0x8;if(_0x563a87===_0x31102a)break;else _0x11b12e['push'](_0x11b12e['shift']());}catch(_0x4d5eaa){_0x11b12e['push'](_0x11b12e['shift']());}}}(_0x1e13,0xe4090));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x4a82be from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';function _0x3052(_0x445785,_0x306237){_0x445785=_0x445785-0x16c;const _0x1e133f=_0x1e13();let _0x305263=_0x1e133f[_0x445785];return _0x305263;}export async function ensureOpencodePluginConfig(_0x11d501){const _0x86511f=_0x3052,_0x3ed3c7={'cvBkN':function(_0x3dc811,_0x8827c5){return _0x3dc811(_0x8827c5);},'aEulp':_0x86511f(0x17d),'eICkn':_0x86511f(0x17b),'cVaPk':_0x86511f(0x16e),'XXVCj':function(_0x69394c,_0x462940){return _0x69394c(_0x462940);},'NvpTf':'https://opencode.ai/config.json','gYwLZ':function(_0x3eed3a,_0xd503f1,_0x53772d){return _0x3eed3a(_0xd503f1,_0x53772d);},'eHobk':function(_0x4a6396,_0x4d9df5,_0x3f7f6c){return _0x4a6396(_0x4d9df5,_0x3f7f6c);}},_0x5a4626=_0x3ed3c7[_0x86511f(0x173)](existsSync,join(getOpencodeConfigDir(_0x3ed3c7[_0x86511f(0x172)]),'opencode.json'));let _0x3c220d;if(_0x11d501)_0x3c220d=_0x11d501;else{if(_0x5a4626)_0x3c220d=_0x3ed3c7[_0x86511f(0x172)];else{console[_0x86511f(0x17f)]('\x0a📦\x20OpenCode\x20Plugin\x0a');const _0x3b1505=await _0x4a82be[_0x86511f(0x177)]([{'type':'list','name':_0x86511f(0x182),'message':_0x86511f(0x16d),'choices':[{'name':_0x3ed3c7[_0x86511f(0x183)],'value':_0x3ed3c7['cVaPk']},{'name':_0x86511f(0x174),'value':_0x86511f(0x17d)}],'default':_0x86511f(0x16e)}]);_0x3c220d=_0x3b1505['pluginScope'];}}const _0x2f8b16=join(_0x3ed3c7['XXVCj'](getOpencodeConfigDir,_0x3c220d),'opencode.json'),_0x19e94a='@ranger-testing/opencode-plugin',_0x567d26=_0x3ed3c7[_0x86511f(0x16f)];let _0x5ec644={};if(existsSync(_0x2f8b16))try{const _0x3a65dd=await _0x3ed3c7[_0x86511f(0x184)](readFile,_0x2f8b16,_0x86511f(0x180));_0x5ec644=JSON['parse'](_0x3a65dd);}catch(_0x295df0){return console['error']('⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.'),{'configured':![],'scope':_0x3c220d,'error':'Failed\x20to\x20read\x20opencode.json','details':_0x295df0};}const _0x43589b=Array[_0x86511f(0x16c)](_0x5ec644[_0x86511f(0x178)])?_0x5ec644[_0x86511f(0x178)]:[];if(_0x43589b['includes'](_0x19e94a))return console[_0x86511f(0x17f)]('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x3c220d};return _0x5ec644['$schema']=_0x5ec644['$schema']||_0x567d26,_0x5ec644['plugin']=[..._0x43589b,_0x19e94a],await _0x3ed3c7['gYwLZ'](mkdir,_0x3ed3c7['XXVCj'](getOpencodeConfigDir,_0x3c220d),{'recursive':!![]}),await _0x3ed3c7[_0x86511f(0x17a)](writeFile,_0x2f8b16,JSON[_0x86511f(0x17c)](_0x5ec644,null,0x2)+'\x0a'),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x3c220d};}function _0x1e13(){const _0x42568d=['1391538HREQxF','isArray','Where\x20should\x20the\x20plugin\x20be\x20installed?','user','NvpTf','195SFSsQl','3688gmmGdC','aEulp','cvBkN','Project\x20(shared\x20with\x20team\x20via\x20git)','1510707ljdFrj','1613660ukYDzG','prompt','plugin','8742041PXbtQb','eHobk','User\x20(available\x20in\x20all\x20your\x20projects)','stringify','project','715616JVhbeJ','log','utf-8','2576712vJZHPH','pluginScope','eICkn','gYwLZ'];_0x1e13=function(){return _0x42568d;};return _0x1e13();}
@@ -1 +1 @@
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
+ (function(_0x2ffb8a,_0x563eeb){const _0x53f008=_0x58af,_0x5ae661=_0x2ffb8a();while(!![]){try{const _0x4bedd0=parseInt(_0x53f008(0x11a))/0x1+parseInt(_0x53f008(0x125))/0x2+parseInt(_0x53f008(0x13c))/0x3*(-parseInt(_0x53f008(0x135))/0x4)+parseInt(_0x53f008(0x124))/0x5*(-parseInt(_0x53f008(0x11d))/0x6)+-parseInt(_0x53f008(0x12a))/0x7+parseInt(_0x53f008(0x116))/0x8*(parseInt(_0x53f008(0x13e))/0x9)+-parseInt(_0x53f008(0x12d))/0xa*(-parseInt(_0x53f008(0x143))/0xb);if(_0x4bedd0===_0x563eeb)break;else _0x5ae661['push'](_0x5ae661['shift']());}catch(_0x45770b){_0x5ae661['push'](_0x5ae661['shift']());}}}(_0x5cee,0x55306));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x58af(_0x298357,_0x24ae3e){_0x298357=_0x298357-0x112;const _0x5cee6e=_0x5cee();let _0x58afbb=_0x5cee6e[_0x298357];return _0x58afbb;}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(_0x53e7eb){const _0x41d390=_0x58af,_0x12759e={'XOZUp':function(_0x241ece,_0x50bd86,_0x1a78cf){return _0x241ece(_0x50bd86,_0x1a78cf);},'AWKUp':function(_0x37608c,_0x29e48a){return _0x37608c===_0x29e48a;},'qctPd':_0x41d390(0x12b),'AkERP':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','tvObO':function(_0x20d57d,_0x159f66){return _0x20d57d===_0x159f66;}},_0x529e84=getRangerDir(),_0x9a7154=_0x12759e['XOZUp'](join,_0x529e84,'ci');if(_0x53e7eb){const _0x73b09e=join(_0x9a7154,_0x53e7eb);return{'name':_0x53e7eb,'path':_0x73b09e};}if(!existsSync(_0x9a7154))throw new Error('No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a'+_0x41d390(0x112));const _0x3e09ce=await _0x12759e[_0x41d390(0x149)](readdir,_0x9a7154,{'withFileTypes':!![]}),_0x59da0c=_0x3e09ce['filter'](_0x4a31e4=>_0x4a31e4[_0x41d390(0x128)]())[_0x41d390(0x120)](_0x5bd98f=>_0x5bd98f['name']);if(_0x12759e['AWKUp'](_0x59da0c[_0x41d390(0x133)],0x0))throw new Error(_0x12759e[_0x41d390(0x11b)]+_0x12759e['AkERP']);if(_0x12759e[_0x41d390(0x126)](_0x59da0c[_0x41d390(0x133)],0x1)){const _0xc4987=_0x59da0c[0x0];return console['log'](_0x41d390(0x144)+_0xc4987),{'name':_0xc4987,'path':join(_0x9a7154,_0xc4987)};}throw new Error(_0x41d390(0x114)+_0x59da0c['join'](',\x20')+_0x41d390(0x136));}async function installPluginNonInteractive(){const _0x5c3a63=_0x58af,_0x916166={'AhjFB':'ranger@trailhead','wlfiu':function(_0x44b39a,_0x44cf18){return _0x44b39a(_0x44cf18);},'upYhg':_0x5c3a63(0x119),'uFUSC':'✓\x20Marketplace\x20already\x20added','tKYRd':_0x5c3a63(0x132),'Rsogg':'ranger-testing/trailhead','xLBxJ':'Failed\x20to\x20add\x20marketplace:','SmseG':_0x5c3a63(0x12f),'APjVQ':'install','HIuta':_0x5c3a63(0x13d),'WcyUf':_0x5c3a63(0x122),'LxJJj':'✓\x20Claude\x20Code\x20plugin\x20installed'},_0x242f13=await isPluginInstalled(_0x916166['AhjFB']);if(_0x242f13)return console[_0x5c3a63(0x123)]('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console['log']('Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...');const _0x52525e=await _0x916166['wlfiu'](isMarketplaceAdded,_0x916166['upYhg']);let _0x23bab3=_0x52525e;if(_0x52525e)console['log'](_0x916166['uFUSC']);else{const _0x1289a9=await runClaudeCommand(['plugin','marketplace',_0x916166['tKYRd'],_0x916166[_0x5c3a63(0x12c)]]);!_0x1289a9['success']?(console[_0x5c3a63(0x12e)](_0x916166['xLBxJ'],_0x1289a9['error']),console[_0x5c3a63(0x123)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead')):_0x23bab3=!![];}if(_0x23bab3){const _0xc22c3a=await runClaudeCommand([_0x916166['SmseG'],_0x916166['APjVQ'],_0x916166[_0x5c3a63(0x11c)],_0x916166['HIuta'],_0x916166['WcyUf']]);!_0xc22c3a[_0x5c3a63(0x11f)]?(console[_0x5c3a63(0x12e)]('Failed\x20to\x20install\x20plugin:',_0xc22c3a[_0x5c3a63(0x12e)]),console['log'](_0x5c3a63(0x117))):console['log'](_0x916166[_0x5c3a63(0x145)]);}return!![];}export async function setupCi(_0x557356,_0x2caad1,_0x1da3e2){const _0xbcbcd9=_0x58af,_0x405d0a={'buFqx':'auth','ecBRK':function(_0x14bcd1,_0xa70c7a){return _0x14bcd1(_0xa70c7a);},'PLLEo':function(_0x3a2d18,_0x18e4b7,_0x1fd106){return _0x3a2d18(_0x18e4b7,_0x1fd106);},'fJMhn':'chromium','ZsRyE':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','gqNIT':function(_0x228048){return _0x228048();},'ernmL':'profile_activate','tCiqq':'auth.json','qNvaK':'auth.json.enc','EoPfO':function(_0x803c3a,_0x38b546){return _0x803c3a(_0x38b546);},'LOeaa':'No\x20API\x20token\x20available\x20for\x20decryption','zOfSA':function(_0x287f98,_0x5e1742){return _0x287f98(_0x5e1742);},'tVlOk':function(_0xc6c255,_0x16b734){return _0xc6c255 instanceof _0x16b734;},'JxJvE':_0xbcbcd9(0x134),'UNBbT':'\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','nkfEG':'project','gCwRT':'\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a'};console['log']('\x0a🔧\x20Ranger\x20CI\x20Setup\x0a'),_0x1da3e2?.[_0xbcbcd9(0x118)](_0x405d0a[_0xbcbcd9(0x148)]),await _0x405d0a['ecBRK'](authenticate,_0x557356),_0x1da3e2?.['trackPhaseEnd'](_0xbcbcd9(0x14a)),_0x1da3e2?.['trackPhaseStart']('dir_setup');const {path:_0x4e1bf7,installed:_0x536247}=await ensureRangerDir();await writeRangerGitignore(_0x4e1bf7);const _0x19e34f=_0x405d0a['PLLEo'](join,_0x4e1bf7,'sessions');!existsSync(_0x19e34f)&&await _0x405d0a[_0xbcbcd9(0x130)](mkdir,_0x19e34f,{'recursive':!![]});_0x1da3e2?.['trackPhaseEnd'](_0xbcbcd9(0x129),{'installed':_0x536247}),_0x1da3e2?.['trackPhaseStart'](_0x405d0a[_0xbcbcd9(0x14b)]);let _0x1d1e97=![];_0x2caad1?.[_0xbcbcd9(0x113)]?console[_0xbcbcd9(0x123)](_0x405d0a['ZsRyE']):_0x1d1e97=await _0x405d0a['gqNIT'](ensureChromium);_0x1da3e2?.[_0xbcbcd9(0x11e)](_0x405d0a[_0xbcbcd9(0x14b)],{'installed':_0x1d1e97,'skipped':!!_0x2caad1?.[_0xbcbcd9(0x113)]}),_0x1da3e2?.[_0xbcbcd9(0x118)](_0x405d0a['ernmL']);const _0x33739b=await _0x405d0a['ecBRK'](findCiProfile,_0x2caad1?.['profile']);let _0x2e6b0e=![];_0x2caad1?.[_0xbcbcd9(0x13b)]&&(await mkdir(_0x33739b['path'],{'recursive':!![]}),await saveSettings(_0x33739b[_0xbcbcd9(0x127)],{'baseUrl':_0x2caad1['baseUrl'],'headless':!![]}),console[_0xbcbcd9(0x123)](_0xbcbcd9(0x140)+_0x2caad1['baseUrl']),_0x2e6b0e=!![]);const _0x259059=_0x405d0a[_0xbcbcd9(0x130)](join,_0x33739b[_0xbcbcd9(0x137)],_0xbcbcd9(0x147));if(!_0x405d0a[_0xbcbcd9(0x146)](existsSync,_0x259059)&&!_0x2e6b0e)throw new Error(_0xbcbcd9(0x13a)+_0x33739b[_0xbcbcd9(0x127)]+_0xbcbcd9(0x138));const _0x1cba6f=join(_0x33739b['path'],_0x405d0a[_0xbcbcd9(0x13f)]),_0x30f72b=join(_0x33739b[_0xbcbcd9(0x137)],_0x405d0a[_0xbcbcd9(0x131)]),_0xc5155f=existsSync(_0x1cba6f),_0x4c5013=_0x405d0a['EoPfO'](existsSync,_0x30f72b);if(_0x4c5013)try{const _0xdf12b1=await getToken();if(!_0xdf12b1)throw new Error(_0x405d0a['LOeaa']);const _0x900157=await _0x405d0a['zOfSA'](readFile,_0x30f72b);_0x405d0a['PLLEo'](decrypt,_0x900157,_0xdf12b1),console[_0xbcbcd9(0x123)](_0xbcbcd9(0x139));}catch(_0x3406ef){const _0x1450c2=_0x405d0a[_0xbcbcd9(0x141)](_0x3406ef,Error)?_0x3406ef['message']:String(_0x3406ef);throw new Error(_0xbcbcd9(0x142)+_0x33739b['name']+'\x22:\x20'+_0x1450c2);}else _0xc5155f?console['log'](_0x405d0a['JxJvE']):console[_0xbcbcd9(0x123)](_0x405d0a['UNBbT']);await writeActiveProfileName(_0x33739b['name']),console['log'](_0xbcbcd9(0x121)+_0x33739b[_0xbcbcd9(0x127)]),_0x1da3e2?.[_0xbcbcd9(0x11e)]('profile_activate',{'profileName':_0x33739b[_0xbcbcd9(0x127)],'hasAuth':_0xc5155f,'hasEncryptedAuth':_0x4c5013,'createdSettings':_0x2e6b0e}),_0x1da3e2?.['trackPhaseStart'](_0xbcbcd9(0x12f));const _0x4b20e7=await installPluginNonInteractive();_0x1da3e2?.['trackPhaseEnd'](_0xbcbcd9(0x12f),{'installed':_0x4b20e7}),_0x1da3e2?.[_0xbcbcd9(0x118)](_0xbcbcd9(0x115)),await skillup({'autoInstall':_0x405d0a['nkfEG']}),_0x1da3e2?.['trackPhaseEnd']('skills'),console[_0xbcbcd9(0x123)](_0x405d0a['gCwRT']);}function _0x5cee(){const _0x592f8b=['107850jZMdfL','tvObO','name','isDirectory','dir_setup','168147cfKTzi','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','Rsogg','88010pPzBVC','error','plugin','PLLEo','qNvaK','add','length','✓\x20Auth\x20state\x20found','4qPktms','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','path','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','CI\x20profile\x20\x22','baseUrl','184533xrfzWK','--scope','2545407fNfcmv','tCiqq','✓\x20Created\x20profile\x20settings:\x20baseUrl=','tVlOk','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','55HEfNak','Auto-detected\x20CI\x20profile:\x20','LxJJj','ecBRK','settings.json','buFqx','XOZUp','auth','fJMhn','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','skipChromium','Multiple\x20CI\x20profiles\x20found:\x20','skills','16tYWexg','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','trackPhaseStart','trailhead','384346XtxbVk','qctPd','AhjFB','276ANthNB','trackPhaseEnd','success','map','✓\x20Active\x20profile:\x20','project','log','66680xREVTS'];_0x5cee=function(){return _0x592f8b;};return _0x5cee();}
@@ -1 +1 @@
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
+ (function(_0x562bc6,_0x43bdc1){const _0x315ee8=_0x376f,_0x5da854=_0x562bc6();while(!![]){try{const _0x1791a0=-parseInt(_0x315ee8(0x8e))/0x1+-parseInt(_0x315ee8(0x94))/0x2+parseInt(_0x315ee8(0xb7))/0x3+-parseInt(_0x315ee8(0xad))/0x4*(-parseInt(_0x315ee8(0x9d))/0x5)+-parseInt(_0x315ee8(0x8d))/0x6+-parseInt(_0x315ee8(0xa7))/0x7*(parseInt(_0x315ee8(0xb0))/0x8)+parseInt(_0x315ee8(0xb9))/0x9;if(_0x1791a0===_0x43bdc1)break;else _0x5da854['push'](_0x5da854['shift']());}catch(_0x2346cd){_0x5da854['push'](_0x5da854['shift']());}}}(_0x37c2,0x7e82d));function _0x37c2(){const _0x525550=['bhzNH','\x20<your-api-token>','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','\x20--opencode','YANFW','claude','45235JMcbKb','xIjyW','warn','JBpYY','\x0a📦\x20Installing\x20skills...\x0a','MjEnI','user-level','LnoRZ','project-level','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','14xnoOZR','Where\x20should\x20skills\x20be\x20installed?','/.opencode/skills/','To\x20get\x20started:','All\x20projects\x20(','HHcME','28IodDQE','project','sfUCk','1243648IBPrrG','user','OCuRJ','FOKIc','\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!','To\x20use:','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','344958cmIQYo','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','26553015ZUNSoS','3131382LULSFw','863797QopVZq','log','nQcqd','platform','/skills/','\x20skill','1827710HJdtfx','\x20\x202.\x20Run:\x20ranger\x20setup'];_0x37c2=function(){return _0x525550;};return _0x37c2();}import{basename}from'path';import _0x232341 from'inquirer';import{getToken}from'./utils/keychain.js';function _0x376f(_0x2f0cf8,_0x446e57){_0x2f0cf8=_0x2f0cf8-0x8d;const _0x37c2b1=_0x37c2();let _0x376f39=_0x37c2b1[_0x2f0cf8];return _0x376f39;}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(_0xcffd0a={}){const _0x515e16=_0x376f,_0x2bbdcd={'uomJd':_0x515e16(0xa6),'OCuRJ':function(_0x1811d6){return _0x1811d6();},'sfUCk':'5|4|3|1|0|2','YANFW':'opencode','HHcME':function(_0x78b824,_0x468f36){return _0x78b824===_0x468f36;},'LnoRZ':'\x20--opencode','xIjyW':_0x515e16(0x99),'nQcqd':_0x515e16(0x98),'FOKIc':'✓\x20Found\x20API\x20token','mvvlw':function(_0x292c09,_0x50e793){return _0x292c09===_0x50e793;},'bhzNH':function(_0x5f4050,_0x2e4db8){return _0x5f4050(_0x2e4db8);},'zcvDP':'user','MjEnI':function(_0x16a172){return _0x16a172();},'pIBHc':'installLevel','hQTJP':_0x515e16(0xa1),'JKzFl':function(_0x49a01d,_0x5d8d09,_0x3d054d){return _0x49a01d(_0x5d8d09,_0x3d054d);},'WSLWu':_0x515e16(0xa5),'JBpYY':function(_0x3fbce5,_0x124c9c){return _0x3fbce5>_0x124c9c;}};console[_0x515e16(0x8f)](_0x2bbdcd['uomJd']);const _0x125b32=_0xcffd0a[_0x515e16(0x91)]??_0x515e16(0x9c),_0x99095d=await _0x2bbdcd[_0x515e16(0xb2)](getToken);if(!_0x99095d){const _0x267555=_0x2bbdcd[_0x515e16(0xaf)]['split']('|');let _0x40089a=0x0;while(!![]){switch(_0x267555[_0x40089a++]){case'0':console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x125b32===_0x2bbdcd[_0x515e16(0x9b)]?_0x515e16(0x9a):'')+'\x0a');continue;case'1':console['log'](_0x515e16(0x95)+(_0x2bbdcd[_0x515e16(0xac)](_0x125b32,_0x2bbdcd[_0x515e16(0x9b)])?_0x2bbdcd[_0x515e16(0xa4)]:'')+_0x515e16(0x97));continue;case'2':return;case'3':console[_0x515e16(0x8f)](_0x2bbdcd[_0x515e16(0x9e)]);continue;case'4':console['log'](_0x515e16(0xaa));continue;case'5':console['log'](_0x2bbdcd[_0x515e16(0x90)]);continue;}break;}}console['log'](_0x2bbdcd[_0x515e16(0xb3)]);const _0xd3dd36=getProjectRoot(),_0x2ef75c=basename(_0xd3dd36),_0x260a81=_0x2bbdcd['mvvlw'](_0x125b32,'opencode')?_0x2bbdcd[_0x515e16(0x96)](getOpencodeConfigDir,_0x2bbdcd['zcvDP'])+_0x515e16(0x92):_0x2bbdcd[_0x515e16(0xa2)](getClaudeConfigDir)+'/skills/',_0x5d5d14=_0x125b32===_0x2bbdcd[_0x515e16(0x9b)]?_0xd3dd36+_0x515e16(0xa9):_0xd3dd36+'/.claude/skills/',_0x24d8a0=process['stdin']['isTTY']&&process['stdout']['isTTY'];let _0x24e9b8;if(_0xcffd0a['autoInstall'])_0x24e9b8=_0xcffd0a['autoInstall'];else{if(_0x24d8a0){const _0x16b720=await _0x232341['prompt']([{'type':'list','name':_0x2bbdcd['pIBHc'],'message':_0x515e16(0xa8),'choices':[{'name':_0x515e16(0xab)+_0x260a81+')','value':_0x515e16(0xb1)},{'name':'This\x20project\x20only\x20('+_0x5d5d14+')','value':'project'}]}]);_0x24e9b8=_0x16b720['installLevel'];}else _0x24e9b8=_0x515e16(0xae),console[_0x515e16(0x8f)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x5d5d14+')');}let _0x2b7300=0x0;const _0x1a0aa4=getCurrentVersion();console['log'](_0x2bbdcd['hQTJP']);try{const _0x5794b3=await _0x2bbdcd['JKzFl'](installSkill,'ranger',{'cliVersion':_0x1a0aa4,'level':_0x24e9b8,'platform':_0x125b32});_0x5794b3&&_0x2b7300++;}catch(_0x37b48a){console[_0x515e16(0x9f)]('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x37b48a instanceof Error?_0x37b48a['message']:_0x37b48a);}if(_0x2b7300>0x0){const _0x236a5c=_0x2bbdcd[_0x515e16(0xac)](_0x24e9b8,_0x2bbdcd['zcvDP'])?_0x515e16(0xa3):_0x2bbdcd['WSLWu'];console[_0x515e16(0x8f)]('\x0a✅\x20Installed\x20'+_0x2b7300+'\x20'+_0x236a5c+_0x515e16(0x93)+(_0x2bbdcd[_0x515e16(0xa0)](_0x2b7300,0x1)?'s':'')+'\x20successfully!\x0a'),!_0xcffd0a['suppressUsage']&&(console['log'](_0x515e16(0xb5)),_0x125b32===_0x2bbdcd[_0x515e16(0x9b)]?console[_0x515e16(0x8f)](_0x515e16(0xb6)):console[_0x515e16(0x8f)](_0x515e16(0xb4)));}else console['log'](_0x515e16(0xb8));}
@@ -1 +1 @@
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
+ const _0x397cca=_0x49ab;(function(_0x258f0f,_0x1a76d2){const _0xe943e8=_0x49ab,_0x195dce=_0x258f0f();while(!![]){try{const _0x7d6cf4=-parseInt(_0xe943e8(0xcc))/0x1+-parseInt(_0xe943e8(0xad))/0x2+-parseInt(_0xe943e8(0xec))/0x3+-parseInt(_0xe943e8(0xf4))/0x4+parseInt(_0xe943e8(0xaa))/0x5+parseInt(_0xe943e8(0xc2))/0x6*(-parseInt(_0xe943e8(0xe3))/0x7)+-parseInt(_0xe943e8(0xb2))/0x8*(-parseInt(_0xe943e8(0x10c))/0x9);if(_0x7d6cf4===_0x1a76d2)break;else _0x195dce['push'](_0x195dce['shift']());}catch(_0x49f481){_0x195dce['push'](_0x195dce['shift']());}}}(_0x2202,0xeadf3));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x58e25c from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';function _0x49ab(_0x354148,_0x2dc0b1){_0x354148=_0x354148-0x9f;const _0x22029b=_0x2202();let _0x49ab73=_0x22029b[_0x354148];return _0x49ab73;}import{chromium}from'playwright';function _0x2202(){const _0x252847=['XDToG','version','4251228xupdHm','existing_token','isTTY','jdKdy','1.58.2','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','HVIWn','boOLA','2133896KCUGsh','wantsProfile','\x20now?','user','aLvHX','skills','chromium','\x1b[0m','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','force','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','KQeBe','plugin','JtjAG','\x20and\x20prompt\x20the\x20coding','organizationName','platform','\x0a❌\x20Profile\x20setup\x20failed:','pURaL','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','log','NWwls','.ranger','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','171wnYVdl','✓\x20Already\x20authenticated\x20to\x20','HPKSE','sKQvS','MPsSu','opencode','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','profile','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','TETer','stdin','DuAQA','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','prompt','trackPhaseStart','GITHUB_ENV','QDEtA','mFmPS','2392040DdXsaH','Installation\x20failed\x20with\x20exit\x20code\x20','✓\x20Authenticated\x20to\x20','147216WCcYZF','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','\x20install\x20chromium','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','2035064GkaaQg','resolve','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','close','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','skipChromium','npx','local','.gitignore','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','bhKAP','install','miSDY','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','lKstp','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','17178YQERpo','IMEIn','ranger','hFqvP','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','XOQpS','message','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','warn','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','541843DlBCCX','\x0aIn\x20Claude\x20Code,\x20run\x20','allowInsecureLocalhost','\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','ranger\x20profile\x20add\x20local','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','ARlHu','trackPhaseEnd','\x0a🚀\x20Ranger\x20Setup\x0a','auth','RFfQE','error',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','ready','/ranger:enable','KRWeX','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','scope','device_auth','UHphE','provided_token','status','✓\x20Playwright\x20Chromium\x20browser\x20found','4361IsfzWT','rEMtA','stdout','qgXaz','VXwtC','\x20\x20npx\x20playwright@','url'];_0x2202=function(){return _0x252847;};return _0x2202();}import{addEnv}from'./addEnv.js';import{getRangerDir,getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url),PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x397cca(0xf0),bold=_0x551727=>'\x1b[1m'+_0x551727+_0x397cca(0xfb);function getPlaywrightVersion(){const _0x3b22fc=_0x397cca,_0x3a59ac={'HctDU':'playwright/package.json','fTreF':function(_0x1176e8,_0x4b58c8){return _0x1176e8(_0x4b58c8);}};try{const _0x178d3e=require[_0x3b22fc(0xb3)](_0x3a59ac['HctDU']),_0x3a90b4=_0x3a59ac['fTreF'](require,_0x178d3e);return _0x3a90b4[_0x3b22fc(0xeb)];}catch{return null;}}function installChromiumBinary(_0x5d98e7){const _0x317eb4=_0x397cca,_0x54e098={'lKstp':function(_0x414319,_0x5c079d){return _0x414319===_0x5c079d;},'Tsyou':function(_0x2cacbd,_0x176320){return _0x2cacbd(_0x176320);},'gGPOJ':function(_0x37e13e,_0x52aa77,_0x17d589,_0x904d32){return _0x37e13e(_0x52aa77,_0x17d589,_0x904d32);},'nEmKp':_0x317eb4(0xb8),'DuAQA':'inherit','hkwwj':'win32','HPKSE':_0x317eb4(0xb5),'rEMtA':'error'};return new Promise((_0x2fcd44,_0x5c8031)=>{const _0x1d5730=_0x317eb4,_0x4c66eb={'kRLWW':function(_0x2db309,_0x22c301){return _0x2db309(_0x22c301);}},_0x33be81=['playwright@'+_0x5d98e7,'install','chromium'],_0x230476=_0x54e098['gGPOJ'](spawn,_0x54e098['nEmKp'],_0x33be81,{'stdio':['ignore',_0x54e098[_0x1d5730(0xa3)],_0x54e098['DuAQA']],'shell':_0x54e098[_0x1d5730(0xc0)](process[_0x1d5730(0x104)],_0x54e098['hkwwj'])});_0x230476['on'](_0x54e098[_0x1d5730(0x10e)],_0x3d678a=>{const _0x328da6=_0x1d5730;_0x54e098['lKstp'](_0x3d678a,0x0)?_0x2fcd44():_0x54e098['Tsyou'](_0x5c8031,new Error(_0x328da6(0xab)+_0x3d678a));}),_0x230476['on'](_0x54e098[_0x1d5730(0xe4)],_0x243e7b=>{_0x4c66eb['kRLWW'](_0x5c8031,_0x243e7b);});});}export async function authenticate(_0x21faa1){const _0x26e090=_0x397cca,_0x4e5905={'Bvpfl':function(_0x1b7965,_0x9fef6d){return _0x1b7965(_0x9fef6d);},'iUjMJ':function(_0x408dae){return _0x408dae();},'mFmPS':function(_0xcb59a6,_0x77ee4f){return _0xcb59a6 instanceof _0x77ee4f;},'OeZEu':_0x26e090(0xde),'TETer':'✓\x20Stored\x20credentials\x20locally','VXwtC':_0x26e090(0xe0)};if(!_0x21faa1){const _0x24a71d=await getToken();if(_0x24a71d){const _0x5492b9=await _0x4e5905['Bvpfl'](getCurrentUser,_0x24a71d);if(_0x5492b9['success'])return console['log'](_0x26e090(0x10d)+_0x5492b9['user'][_0x26e090(0x103)]),{'token':_0x24a71d,'method':_0x26e090(0xed)};}try{_0x21faa1=await _0x4e5905['iUjMJ'](runDeviceAuthFlow);}catch(_0x3bc970){throw new Error('Authentication\x20failed:\x20'+(_0x4e5905[_0x26e090(0xa9)](_0x3bc970,Error)?_0x3bc970[_0x26e090(0xc8)]:_0x3bc970));}const _0x1a7502=await getCurrentUser(_0x21faa1);if(!_0x1a7502['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x1a7502[_0x26e090(0xd7)]);return console['log']('✓\x20Authenticated\x20to\x20'+_0x1a7502['user'][_0x26e090(0x103)]),{'token':_0x21faa1,'method':_0x4e5905['OeZEu']};}console[_0x26e090(0x108)]('Validating\x20API\x20token...');const _0x2e01f3=await getCurrentUser(_0x21faa1);if(!_0x2e01f3['success']){if(_0x2e01f3[_0x26e090(0xe1)])throw new Error('Authentication\x20failed:\x20'+_0x2e01f3[_0x26e090(0xd7)]+_0x26e090(0xf1));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x2e01f3[_0x26e090(0xd7)]+_0x26e090(0xb6));}return console[_0x26e090(0x108)](_0x26e090(0xac)+_0x2e01f3['user']['organizationName']),await storeToken(_0x21faa1),console['log'](process['env'][_0x26e090(0xa7)]?'✓\x20Exported\x20credentials\x20for\x20CI':_0x4e5905[_0x26e090(0xa1)]),{'token':_0x21faa1,'method':_0x4e5905[_0x26e090(0xe7)]};}export async function ensureRangerDir(_0x3573d8){const _0x31d7aa=_0x397cca,_0x3f766b={'zguxs':function(_0x34dc8b,_0x2806e8){return _0x34dc8b===_0x2806e8;},'MzneB':'user','RFfQE':function(_0x20ac60){return _0x20ac60();},'HVIWn':function(_0x121bc6){return _0x121bc6();},'gZGDZ':function(_0x1b0041,_0x718def,_0x6e96d){return _0x1b0041(_0x718def,_0x6e96d);},'HzCvj':'✓\x20Created\x20.ranger/\x20directory'};let _0x201687;if(_0x3f766b['zguxs'](_0x3573d8,_0x3f766b['MzneB']))_0x201687=_0x3f766b[_0x31d7aa(0xd6)](getRangerHomeDir);else{const _0x5ecff4=findGitRoot();_0x201687=_0x5ecff4?join(_0x5ecff4,_0x31d7aa(0x10a)):_0x3f766b[_0x31d7aa(0xf2)](getRangerDir);}return!existsSync(_0x201687)?(await _0x3f766b['gZGDZ'](mkdir,_0x201687,{'recursive':!![]}),console[_0x31d7aa(0x108)](_0x3f766b['HzCvj']),{'path':_0x201687,'installed':!![]}):(console['log']('✓\x20.ranger/\x20directory\x20already\x20exists'),{'path':_0x201687,'installed':![]});}export async function ensureChromium(){const _0x525a54=_0x397cca,_0x5e846c={'JtjAG':_0x525a54(0xe2),'zDuaE':function(_0x4ed5c0){return _0x4ed5c0();},'cClnZ':function(_0x5bee8a,_0x182c75){return _0x5bee8a??_0x182c75;},'PtPmm':'confirm','vDCSX':'\x20(fallback\x20version)','FULTe':function(_0x1b3779,_0x7c2f23){return _0x1b3779(_0x7c2f23);},'xGvZN':function(_0x40bbd0,_0x533fb4){return _0x40bbd0 instanceof _0x533fb4;},'IMEIn':'You\x20can\x20install\x20it\x20manually\x20by\x20running:'};let _0x4cefee=![];try{const _0x21f0f9=chromium['executablePath']();_0x4cefee=existsSync(_0x21f0f9);}catch{_0x4cefee=![];}if(_0x4cefee)return console['log'](_0x5e846c[_0x525a54(0x101)]),![];const _0x4f72ec=_0x5e846c['zDuaE'](getPlaywrightVersion),_0x3f99d4=_0x5e846c['cClnZ'](_0x4f72ec,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0xe56d80=!_0x4f72ec,_0x3bda13=process['stdin']['isTTY']&&process['stdout'][_0x525a54(0xee)];let _0x54bb4f=!![];if(_0x3bda13){const {install:_0x4e2d3a}=await _0x58e25c[_0x525a54(0xa5)]([{'type':_0x5e846c['PtPmm'],'name':_0x525a54(0xbd),'message':_0xe56d80?_0x525a54(0xcb)+_0x3f99d4+_0x525a54(0xf6):'The\x20required\x20version\x20('+_0x3f99d4+_0x525a54(0xd8),'default':!![]}]);_0x54bb4f=_0x4e2d3a;}else console[_0x525a54(0x108)](_0x525a54(0xbf)+_0x3f99d4+(_0xe56d80?_0x5e846c['vDCSX']:'')+'...');if(_0x54bb4f){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0x5e846c['FULTe'](installChromiumBinary,_0x3f99d4),console[_0x525a54(0x108)](_0x525a54(0xd1));}catch(_0x37e21e){console[_0x525a54(0xd7)](_0x525a54(0xfc),_0x5e846c['xGvZN'](_0x37e21e,Error)?_0x37e21e['message']:_0x37e21e),console['log'](_0x5e846c[_0x525a54(0xc3)]),console[_0x525a54(0x108)](_0x525a54(0xe8)+_0x3f99d4+_0x525a54(0xaf));}}else console['log']('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console[_0x525a54(0x108)](_0x525a54(0xfe)),console[_0x525a54(0x108)]('\x20\x20npx\x20playwright@'+_0x3f99d4+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x266745){const _0x5738f5=_0x397cca,_0x4cbadc={'aLvHX':function(_0x5cb6da,_0x4a16a2,_0x5473a3){return _0x5cb6da(_0x4a16a2,_0x5473a3);},'ysUxT':function(_0x8d9886,_0x3e532a,_0x9a082c){return _0x8d9886(_0x3e532a,_0x9a082c);},'cHZAs':'✓\x20Created\x20.ranger/.gitignore'},_0x418c16=_0x4cbadc[_0x5738f5(0xf8)](join,_0x266745,_0x5738f5(0xba)),_0x546b96=_0x5738f5(0xcf);await _0x4cbadc['ysUxT'](writeFile,_0x418c16,_0x546b96),console['log'](_0x4cbadc['cHZAs']);}function printProfileSetupLaterInstructions(){const _0x52625d=_0x397cca,_0x5b606e={'ProYk':function(_0x49fcd1,_0x2a27e4){return _0x49fcd1(_0x2a27e4);},'unWMe':_0x52625d(0xd0)};console['log'](_0x52625d(0xa0)),console[_0x52625d(0x108)]('\x20\x20'+_0x5b606e['ProYk'](bold,_0x5b606e['unWMe'])),console['log'](_0x52625d(0x107));}async function ensureLocalEnv(_0x2978c0,_0x43113a){const _0x5e5a22=_0x397cca,_0x188363={'hFqvP':function(_0x4ba6bb){return _0x4ba6bb();},'UHphE':_0x5e5a22(0xb1),'KQeBe':function(_0x37f362,_0x191abb){return _0x37f362===_0x191abb;},'uUGeq':_0x5e5a22(0xf7),'xSSHI':function(_0xbc3135){return _0xbc3135();},'OuPVC':function(_0x28ef89,_0x21256b,_0x19b179){return _0x28ef89(_0x21256b,_0x19b179);},'MPsSu':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','bhKAP':'confirm','sqIIU':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','miSDY':function(_0x594a16,_0x498804,_0x88130b,_0x18e909){return _0x594a16(_0x498804,_0x88130b,_0x18e909);},'XOQpS':'local','EbSIo':_0x5e5a22(0x105),'KRWeX':function(_0x553957,_0x3b6204){return _0x553957 instanceof _0x3b6204;},'ARlHu':function(_0x27c70b){return _0x27c70b();}};if(!_0x188363['hFqvP'](findGitRoot))return console[_0x5e5a22(0x108)](_0x188363[_0x5e5a22(0xdf)]),{'ready':![],'skipped':!![]};const _0x335e06=_0x188363[_0x5e5a22(0xff)](_0x2978c0?.['scope'],_0x188363['uUGeq'])?_0x188363['xSSHI'](getRangerHomeDir):undefined;if(_0x188363['OuPVC'](findExistingEnv,_0x5e5a22(0xb9),{'locations':[_0x5e5a22(0xb9)],'rangerDir':_0x335e06}))return console[_0x5e5a22(0x108)]('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};const _0x20ce64=process['stdin']['isTTY']&&process[_0x5e5a22(0xe5)]['isTTY'];if(_0x20ce64&&!_0x2978c0?.['url']){console[_0x5e5a22(0x108)](_0x5e5a22(0xbb)),console['log'](_0x188363[_0x5e5a22(0x110)]),console['log']('auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to'),console['log']('use\x20until\x20the\x20session\x20expires.\x0a'),console['log']('You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.');const {wantsProfile:_0xe41a4f}=await _0x58e25c['prompt']([{'type':_0x188363[_0x5e5a22(0xbc)],'name':_0x5e5a22(0xf5),'message':_0x188363['sqIIU'],'default':!![]}]);if(!_0xe41a4f)return _0x188363[_0x5e5a22(0xc5)](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await _0x188363[_0x5e5a22(0xbe)](addEnv,_0x188363[_0x5e5a22(0xc7)],{'url':_0x2978c0?.[_0x5e5a22(0xe9)],'force':_0x2978c0?.[_0x5e5a22(0xfd)],'allowInsecureLocalhost':_0x2978c0?.['allowInsecureLocalhost'],'scope':_0x2978c0?.['scope']},_0x43113a),{'ready':!![],'skipped':![]};}catch(_0x570a40){return console['error'](_0x188363['EbSIo'],_0x188363[_0x5e5a22(0xdb)](_0x570a40,Error)?_0x570a40['message']:_0x570a40),_0x188363[_0x5e5a22(0xd2)](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x5e3c51,_0x49f581,_0x62d21e){const _0x4885ff=_0x397cca,_0x3bcda3={'jdKdy':'git_check','boOLA':function(_0x49533a){return _0x49533a();},'aSJCs':'No\x20git\x20repository\x20found','oUMMI':'No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','cpDPp':function(_0x152492,_0x1d9955){return _0x152492(_0x1d9955);},'HsrZA':'user','NWwls':_0x4885ff(0xd5),'QDEtA':'chromium','WlMcW':function(_0x4c0c25,_0x5cdaac){return _0x4c0c25(_0x5cdaac);},'sKQvS':_0x4885ff(0x100),'CLNyM':function(_0x8956fe,_0x27c878){return _0x8956fe(_0x27c878);},'Mpmrm':function(_0x43ed39,_0x34a772){return _0x43ed39&&_0x34a772;},'jpbGs':'skills','DRpIC':'Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','XDToG':_0x4885ff(0x9f),'pURaL':function(_0x1f3340,_0x3f28ec){return _0x1f3340===_0x3f28ec;},'qgXaz':_0x4885ff(0xda),'dWYXe':function(_0x46371d,_0x43ef9f){return _0x46371d+_0x43ef9f;}};console['log'](_0x4885ff(0xd4));const _0x1407bc=process[_0x4885ff(0xa2)][_0x4885ff(0xee)]&&process['stdout']['isTTY'];!_0x1407bc&&!_0x49f581?.[_0x4885ff(0xdd)]&&(console[_0x4885ff(0x108)](_0x4885ff(0xae)),_0x49f581={..._0x49f581,'scope':_0x4885ff(0xf7)});_0x62d21e?.['trackPhaseStart'](_0x3bcda3[_0x4885ff(0xef)]);if(!_0x3bcda3[_0x4885ff(0xf3)](findGitRoot)){await _0x62d21e?.['trackPhaseError'](_0x3bcda3['jdKdy'],new Error(_0x3bcda3['aSJCs']));throw new Error(_0x3bcda3['oUMMI']);}_0x62d21e?.['trackPhaseEnd']('git_check');const _0x43d4b7=!_0x3bcda3['cpDPp'](existsSync,_0x3bcda3[_0x4885ff(0xf3)](getRangerDir)),_0x343848=_0x49f581?.[_0x4885ff(0xdd)]===_0x4885ff(0xf7),{path:_0x4289ac}=await ensureRangerDir(_0x343848?_0x3bcda3['HsrZA']:undefined);_0x62d21e?.['trackPhaseStart']('auth');const _0x3db30b=await authenticate(_0x5e3c51);_0x62d21e?.[_0x4885ff(0xd3)](_0x3bcda3[_0x4885ff(0x109)],{'isFirstRun':_0x43d4b7,'method':_0x3db30b['method']}),_0x62d21e?.[_0x4885ff(0xa6)](_0x3bcda3[_0x4885ff(0xa8)]);_0x49f581?.[_0x4885ff(0xb7)]?console[_0x4885ff(0x108)](_0x4885ff(0xa4)):await _0x3bcda3[_0x4885ff(0xf3)](ensureChromium);_0x62d21e?.[_0x4885ff(0xd3)](_0x4885ff(0xfa),{'isFirstRun':_0x43d4b7,'skipped':!!_0x49f581?.[_0x4885ff(0xb7)]});!_0x343848&&await _0x3bcda3['WlMcW'](writeRangerGitignore,_0x4289ac);console[_0x4885ff(0x108)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x594cfa=_0x49f581?.[_0x4885ff(0xdd)],_0x3c8855=_0x49f581?.[_0x4885ff(0x111)]??![];let _0x2b4b50=null;_0x3c8855?(_0x62d21e?.[_0x4885ff(0xa6)](_0x3bcda3['sKQvS']),_0x2b4b50=await _0x3bcda3['CLNyM'](ensureOpencodePluginConfig,_0x594cfa),_0x62d21e?.[_0x4885ff(0xd3)](_0x3bcda3[_0x4885ff(0x10f)],{'isFirstRun':_0x43d4b7,'opencode':!![]})):(_0x62d21e?.['trackPhaseStart'](_0x3bcda3['sKQvS']),await ensureClaudePlugin(_0x594cfa),_0x62d21e?.['trackPhaseEnd'](_0x3bcda3[_0x4885ff(0x10f)],{'isFirstRun':_0x43d4b7}));if(_0x3bcda3['Mpmrm'](_0x3c8855,_0x2b4b50)){_0x62d21e?.[_0x4885ff(0xa6)](_0x4885ff(0xf9));try{await installSkill(_0x4885ff(0xc4),{'level':_0x2b4b50[_0x4885ff(0xdd)],'cliVersion':getCurrentVersion(),'platform':_0x4885ff(0x111)}),_0x62d21e?.[_0x4885ff(0xd3)](_0x4885ff(0xf9),{'isFirstRun':_0x43d4b7,'opencode':!![]});}catch(_0x57dab8){console[_0x4885ff(0xca)](_0x4885ff(0xb0),_0x57dab8 instanceof Error?_0x57dab8[_0x4885ff(0xc8)]:_0x57dab8),_0x62d21e?.['trackPhaseEnd'](_0x3bcda3['jpbGs'],{'isFirstRun':_0x43d4b7,'opencode':!![],'failed':!![]});}}else _0x62d21e?.['trackPhaseStart'](_0x4885ff(0xf9)),await ensureClaudeSkills(_0x594cfa),_0x62d21e?.['trackPhaseEnd'](_0x3bcda3['jpbGs'],{'isFirstRun':_0x43d4b7});if(!_0x1407bc&&!_0x49f581?.[_0x4885ff(0xe9)])console['log'](_0x3bcda3['DRpIC']),console['log']('\x20\x20'+bold(_0x4885ff(0xd0))+'\x0a');else{_0x62d21e?.['trackPhaseStart'](_0x3bcda3[_0x4885ff(0xea)]);const _0x15288e=await ensureLocalEnv({'url':_0x49f581?.[_0x4885ff(0xe9)],'force':_0x49f581?.[_0x4885ff(0xfd)],'allowInsecureLocalhost':_0x49f581?.[_0x4885ff(0xce)],'scope':_0x3bcda3[_0x4885ff(0x106)](_0x49f581?.[_0x4885ff(0xdd)],_0x3bcda3['HsrZA'])?'user':undefined},_0x62d21e);_0x62d21e?.[_0x4885ff(0xd3)](_0x4885ff(0x9f),{'isFirstRun':_0x43d4b7,'profileReady':_0x15288e['ready'],'userSkipped':_0x15288e['skipped']}),_0x15288e[_0x4885ff(0xd9)]&&console[_0x4885ff(0x108)](_0x4885ff(0xc6));}if(_0x3c8855)console[_0x4885ff(0x108)](_0x4885ff(0x10b)),console[_0x4885ff(0x108)](_0x4885ff(0x112)),console['log']('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log'](_0x4885ff(0xc9));else{const _0x39f6cb=bold(_0x3bcda3[_0x4885ff(0xe6)]);console['log'](_0x3bcda3['dWYXe'](_0x4885ff(0xcd)+_0x39f6cb+_0x4885ff(0x102)+_0x4885ff(0xdc),_0x4885ff(0xc1))+_0x4885ff(0xb4));}}