@ranger-testing/ranger-cli 2.5.4-alpha.071b7bd-1 → 2.5.4-alpha.78800d3-3

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 (77) 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 -1
  25. package/build/commands/migrateProfile.js +1 -0
  26. package/build/commands/setup/claude.js +1 -1
  27. package/build/commands/setup/opencode.js +1 -1
  28. package/build/commands/setupCi.js +1 -1
  29. package/build/commands/skillup.js +1 -1
  30. package/build/commands/start.js +1 -1
  31. package/build/commands/status.js +1 -1
  32. package/build/commands/update.js +1 -1
  33. package/build/commands/updateEnv.js +1 -1
  34. package/build/commands/useEnv.js +1 -1
  35. package/build/commands/utils/activeProfile.js +1 -1
  36. package/build/commands/utils/agentEnv.js +1 -1
  37. package/build/commands/utils/browserSessionsApi.js +1 -1
  38. package/build/commands/utils/claudeConfig.js +1 -1
  39. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  40. package/build/commands/utils/claudePlugin.js +1 -1
  41. package/build/commands/utils/cloudProfile.js +1 -0
  42. package/build/commands/utils/cloudProfileSession.js +1 -0
  43. package/build/commands/utils/crypto.js +1 -1
  44. package/build/commands/utils/desirePathLog.js +1 -1
  45. package/build/commands/utils/deviceAuth.js +1 -1
  46. package/build/commands/utils/environment.js +1 -1
  47. package/build/commands/utils/featureApi.js +1 -1
  48. package/build/commands/utils/fixWebmDuration.js +1 -1
  49. package/build/commands/utils/gitTracked.js +1 -0
  50. package/build/commands/utils/keychain.js +1 -1
  51. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  52. package/build/commands/utils/matchAuthEnvironment.js +1 -0
  53. package/build/commands/utils/mcpImageBase64.js +1 -1
  54. package/build/commands/utils/model.js +1 -1
  55. package/build/commands/utils/opencodeConfig.js +1 -1
  56. package/build/commands/utils/playwrightCli.js +1 -1
  57. package/build/commands/utils/profileMessages.js +1 -1
  58. package/build/commands/utils/profileSetupBanner.js +1 -1
  59. package/build/commands/utils/projectsConfig.js +1 -0
  60. package/build/commands/utils/rangerConfig.js +1 -1
  61. package/build/commands/utils/rangerRoot.js +1 -1
  62. package/build/commands/utils/resolveProfileContext.js +1 -0
  63. package/build/commands/utils/resolveProfileUrl.js +1 -0
  64. package/build/commands/utils/retry.js +1 -1
  65. package/build/commands/utils/sessionCache.js +1 -1
  66. package/build/commands/utils/settings.js +1 -1
  67. package/build/commands/utils/skillContent.js +1 -1
  68. package/build/commands/utils/skills.js +1 -1
  69. package/build/commands/utils/stitchWebmFiles.js +1 -1
  70. package/build/commands/utils/telemetry.js +1 -1
  71. package/build/commands/utils/tokenRefresh.js +1 -1
  72. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  73. package/build/commands/utils/userApi.js +1 -1
  74. package/build/commands/utils/version.js +1 -1
  75. package/build/commands/verifyFeature.js +1 -1
  76. package/build/commands/verifyFeatureCli.js +1 -1
  77. package/package.json +6 -2
@@ -1 +1 @@
1
- (function(_0x30c6e6,_0x5a70d8){const _0x1bb71b=_0x49a3,_0x49ce87=_0x30c6e6();while(!![]){try{const _0x3f776c=parseInt(_0x1bb71b(0x1a5))/0x1*(-parseInt(_0x1bb71b(0x1a1))/0x2)+-parseInt(_0x1bb71b(0x1a4))/0x3+parseInt(_0x1bb71b(0x1a2))/0x4+parseInt(_0x1bb71b(0x1a6))/0x5+parseInt(_0x1bb71b(0x1a8))/0x6+parseInt(_0x1bb71b(0x1a9))/0x7*(parseInt(_0x1bb71b(0x1a3))/0x8)+-parseInt(_0x1bb71b(0x1a0))/0x9*(parseInt(_0x1bb71b(0x1a7))/0xa);if(_0x3f776c===_0x5a70d8)break;else _0x49ce87['push'](_0x49ce87['shift']());}catch(_0x24cfdf){_0x49ce87['push'](_0x49ce87['shift']());}}}(_0x3a36,0xd251e));import{printBlock,getEnabledSessionId}from'./output.js';function _0x3a36(){const _0xf2bdd3=['10nVvwva','4739880TvzowV','3423zCGRpq','168813NOWGlV','2uItmAt','3599356Zemlsf','18104jLpHOD','2712171myjGHA','1112957KrhDoM','504075qkGeMv'];_0x3a36=function(){return _0xf2bdd3;};return _0x3a36();}function _0x49a3(_0x2163d,_0x3a8bb0){_0x2163d=_0x2163d-0x1a0;const _0x3a3675=_0x3a36();let _0x49a3ee=_0x3a3675[_0x2163d];return _0x49a3ee;}export async function planStart(_0x16782a){const _0xf16acf=await getEnabledSessionId(_0x16782a);if(!_0xf16acf)return;printBlock('===\x20RANGER:\x20ACTION\x20REQUIRED\x20===\x0a\x0aIf\x20this\x20plan\x20involves\x20UI\x20changes,\x20you\x20MUST:\x0a\x0a1.\x20**READ\x20/ranger\x20skill**\x20-\x20specifically\x20create.md\x0a2.\x20**Add\x20a\x20Ranger\x20Feature\x20Review\x20Specification**\x20at\x20the\x20end\x20of\x20your\x20plan\x0a\x0aScenarios\x20are\x20E2E\x20test\x20flows,\x20NOT\x20implementation\x20tasks.\x0a\x0a**Good:**\x20\x22User\x20can\x20log\x20in\x20with\x20valid\x20credentials\x20and\x20see\x20dashboard\x22\x0a**Bad:**\x20\x22Add\x20form\x20validation\x22\x20or\x20\x22Button\x20is\x20visible\x22\x0a\x0aAfter\x20planning,\x20run:\x0a`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<E2E\x20flow\x201>\x22\x20-c\x20\x22<E2E\x20flow\x202>\x22`\x0a\x0a===\x20END\x20===');}
1
+ (function(_0x22b19e,_0x1d0ca8){const _0x5025ce=_0x2444,_0x46d8d8=_0x22b19e();while(!![]){try{const _0x416ce7=parseInt(_0x5025ce(0x187))/0x1+-parseInt(_0x5025ce(0x181))/0x2+parseInt(_0x5025ce(0x180))/0x3*(parseInt(_0x5025ce(0x17f))/0x4)+parseInt(_0x5025ce(0x186))/0x5+-parseInt(_0x5025ce(0x184))/0x6+parseInt(_0x5025ce(0x182))/0x7+-parseInt(_0x5025ce(0x183))/0x8;if(_0x416ce7===_0x1d0ca8)break;else _0x46d8d8['push'](_0x46d8d8['shift']());}catch(_0x548a74){_0x46d8d8['push'](_0x46d8d8['shift']());}}}(_0x2a5f,0x4ccfa));function _0x2a5f(){const _0xd6506a=['2108099yoFjwO','4576792VLPSTa','1073298VZYiBX','===\x20RANGER:\x20ACTION\x20REQUIRED\x20===\x0a\x0aIf\x20this\x20plan\x20involves\x20UI\x20changes,\x20you\x20MUST:\x0a\x0a1.\x20**READ\x20/ranger\x20skill**\x20-\x20specifically\x20create.md\x0a2.\x20**Add\x20a\x20Ranger\x20Feature\x20Review\x20Specification**\x20at\x20the\x20end\x20of\x20your\x20plan\x0a\x0aScenarios\x20are\x20E2E\x20test\x20flows,\x20NOT\x20implementation\x20tasks.\x0a\x0a**Good:**\x20\x22User\x20can\x20log\x20in\x20with\x20valid\x20credentials\x20and\x20see\x20dashboard\x22\x0a**Bad:**\x20\x22Add\x20form\x20validation\x22\x20or\x20\x22Button\x20is\x20visible\x22\x0a\x0aAfter\x20planning,\x20run:\x0a`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<E2E\x20flow\x201>\x22\x20-c\x20\x22<E2E\x20flow\x202>\x22`\x0a\x0a===\x20END\x20===','1664975FuMqGO','89774WiwJvk','268908rKsVVh','24PTueFy','392284uPNjzi'];_0x2a5f=function(){return _0xd6506a;};return _0x2a5f();}function _0x2444(_0x579b46,_0x56318b){_0x579b46=_0x579b46-0x17f;const _0x2a5fa1=_0x2a5f();let _0x244485=_0x2a5fa1[_0x579b46];return _0x244485;}import{printBlock,getEnabledSessionId}from'./output.js';export async function planStart(_0x4f368e){const _0x54c9c8=_0x2444,_0x497952=await getEnabledSessionId(_0x4f368e);if(!_0x497952)return;printBlock(_0x54c9c8(0x185));}
@@ -1 +1 @@
1
- (function(_0x40f759,_0x8a4cff){const _0xe62862=_0x5775,_0x259694=_0x40f759();while(!![]){try{const _0x17030c=-parseInt(_0xe62862(0x14d))/0x1+-parseInt(_0xe62862(0x14b))/0x2*(-parseInt(_0xe62862(0x157))/0x3)+parseInt(_0xe62862(0x14f))/0x4+parseInt(_0xe62862(0x149))/0x5+-parseInt(_0xe62862(0x155))/0x6*(parseInt(_0xe62862(0x14c))/0x7)+-parseInt(_0xe62862(0x14a))/0x8*(parseInt(_0xe62862(0x14e))/0x9)+parseInt(_0xe62862(0x151))/0xa;if(_0x17030c===_0x8a4cff)break;else _0x259694['push'](_0x259694['shift']());}catch(_0x187478){_0x259694['push'](_0x259694['shift']());}}}(_0x9130,0xe9e66));import{getSessionEntry,updateBranchTracking}from'../utils/sessionCache.js';function _0x9130(){const _0x488127=['8257465PkTWNk','16GgjJKH','101666JHnKKY','7XdJBmn','1367479ssqiIW','7813845krFUKW','2321984PSiQmV','RANGER:\x20If\x20this\x20change\x20expands\x20the\x20scope\x20of\x20the\x20active\x20feature\x20review,\x20you\x20may\x20need\x20to\x20add\x20a\x20scenario.\x20See\x20Workflow\x201\x20in\x20/ranger.\x20If\x20you\x20decide\x20to\x20add\x20a\x20scenario,\x20you\x20MUST\x20read\x20Workflow\x201\x20IN\x20DETAIL\x20first.\x20Remember:\x20when\x20you\x20finish\x20your\x20work,\x20your\x20final\x20message\x20to\x20the\x20user\x20must\x20direct\x20them\x20to\x20the\x20Ranger\x20feature\x20review\x20dashboard\x20to\x20review\x20(e.g.\x20\x22Go\x20to\x20the\x20Ranger\x20feature\x20dashboard\x20to\x20review:\x20https://dashboard.ranger.net/features/{feature_id}\x22).','22041500VQFNZq','stringify','RANGER:\x20If\x20this\x20is\x20for\x20a\x20UI\x20feature,\x20you\x20MUST\x20use\x20/ranger\x20to\x20either\x20create\x20a\x20new\x20feature\x20review\x20or\x20resume\x20an\x20existing\x20one.','log','8955132TIrQwe','PostToolUse','66ozkxYI'];_0x9130=function(){return _0x488127;};return _0x9130();}function _0x5775(_0x48444f,_0x5bdb0e){_0x48444f=_0x48444f-0x149;const _0x91307f=_0x9130();let _0x577514=_0x91307f[_0x48444f];return _0x577514;}import{getToken}from'../utils/keychain.js';import{getEnabledSessionId}from'./output.js';export async function postEdit(_0x2eb34d){const _0x56b2d5=_0x5775,_0x147045={'gjBsq':_0x56b2d5(0x156)},_0x376cc5=await getEnabledSessionId(_0x2eb34d);if(!_0x376cc5)return;updateBranchTracking(_0x376cc5);const _0x37914d=await getToken();if(!_0x37914d)return;const _0x28148f=getSessionEntry(_0x376cc5);if(_0x28148f){const _0x1a98f1={'hookSpecificOutput':{'hookEventName':'PostToolUse','additionalContext':_0x56b2d5(0x150)}};console[_0x56b2d5(0x154)](JSON[_0x56b2d5(0x152)](_0x1a98f1));return;}const _0x2295df={'hookSpecificOutput':{'hookEventName':_0x147045['gjBsq'],'additionalContext':_0x56b2d5(0x153)}};console['log'](JSON[_0x56b2d5(0x152)](_0x2295df));}
1
+ function _0x482c(_0x4e4688,_0x4fcf24){_0x4e4688=_0x4e4688-0xb0;const _0x8949cd=_0x8949();let _0x482cdb=_0x8949cd[_0x4e4688];return _0x482cdb;}function _0x8949(){const _0x5d3b51=['bkEWz','879304rgsmwx','6pjpojH','848796lOKSuA','log','1860680TAdfkq','stringify','197599kpLtgD','466978NxoWVs','RANGER:\x20If\x20this\x20is\x20for\x20a\x20UI\x20feature,\x20you\x20MUST\x20use\x20/ranger\x20to\x20either\x20create\x20a\x20new\x20feature\x20review\x20or\x20resume\x20an\x20existing\x20one.','1776372oTwWcJ','2977912gqtlzT','9aLWRLr','zOKSi','PostToolUse'];_0x8949=function(){return _0x5d3b51;};return _0x8949();}(function(_0x4426d7,_0xb265d0){const _0x33a276=_0x482c,_0x2d47e0=_0x4426d7();while(!![]){try{const _0x5392c1=-parseInt(_0x33a276(0xb7))/0x1+parseInt(_0x33a276(0xb8))/0x2+parseInt(_0x33a276(0xb2))/0x3*(-parseInt(_0x33a276(0xb3))/0x4)+parseInt(_0x33a276(0xb5))/0x5+-parseInt(_0x33a276(0xba))/0x6+parseInt(_0x33a276(0xbb))/0x7+parseInt(_0x33a276(0xb1))/0x8*(parseInt(_0x33a276(0xbc))/0x9);if(_0x5392c1===_0xb265d0)break;else _0x2d47e0['push'](_0x2d47e0['shift']());}catch(_0x18f095){_0x2d47e0['push'](_0x2d47e0['shift']());}}}(_0x8949,0x366af));import{getSessionEntry,updateBranchTracking}from'../utils/sessionCache.js';import{getToken}from'../utils/keychain.js';import{getEnabledSessionId}from'./output.js';export async function postEdit(_0x5c2e6a){const _0x1daeec=_0x482c,_0x4638bd={'zOKSi':function(_0x5f18b9,_0x280311){return _0x5f18b9(_0x280311);},'bkEWz':_0x1daeec(0xbe)},_0x1efed6=await _0x4638bd['zOKSi'](getEnabledSessionId,_0x5c2e6a);if(!_0x1efed6)return;updateBranchTracking(_0x1efed6);const _0x4c874f=await getToken();if(!_0x4c874f)return;const _0x13cc2b=_0x4638bd[_0x1daeec(0xbd)](getSessionEntry,_0x1efed6);if(_0x13cc2b){const _0x1172f4={'hookSpecificOutput':{'hookEventName':_0x4638bd[_0x1daeec(0xb0)],'additionalContext':'RANGER:\x20If\x20this\x20change\x20expands\x20the\x20scope\x20of\x20the\x20active\x20feature\x20review,\x20you\x20may\x20need\x20to\x20add\x20a\x20scenario.\x20See\x20Workflow\x201\x20in\x20/ranger.\x20If\x20you\x20decide\x20to\x20add\x20a\x20scenario,\x20you\x20MUST\x20read\x20Workflow\x201\x20IN\x20DETAIL\x20first.\x20Remember:\x20when\x20you\x20finish\x20your\x20work,\x20your\x20final\x20message\x20to\x20the\x20user\x20must\x20direct\x20them\x20to\x20the\x20Ranger\x20feature\x20review\x20dashboard\x20to\x20review\x20(e.g.\x20\x22Go\x20to\x20the\x20Ranger\x20feature\x20dashboard\x20to\x20review:\x20https://dashboard.ranger.net/features/{feature_id}\x22).'}};console[_0x1daeec(0xb4)](JSON['stringify'](_0x1172f4));return;}const _0x204761={'hookSpecificOutput':{'hookEventName':_0x1daeec(0xbe),'additionalContext':_0x1daeec(0xb9)}};console['log'](JSON[_0x1daeec(0xb6)](_0x204761));}
@@ -1 +1 @@
1
- function _0xccd1(){const _0x3801fe=['232849CSJupv','601134IvTyfO','HnBtg','514299aygZCF','7990xBnpxE','6057cOTQIb','2NLvMuA','===\x20RANGER:\x20PRESERVE\x20IN\x20COMPACTION\x20===\x0a\x0aIf\x20you\x20created\x20a\x20plan\x20with\x20a\x20**Ranger\x20Feature\x20Review\x20Specification**,\x20you\x20MUST\x20preserve\x20it\x20in\x20the\x20compaction\x20summary.\x0a\x0aThe\x20specification\x20contains\x20scenarios\x20that\x20will\x20be\x20used\x20with\x20`ranger\x20create`.','12766528wiItTE','56gEjGOR','28peQuuz','6530310ITUagC','10602702TxvAFz'];_0xccd1=function(){return _0x3801fe;};return _0xccd1();}(function(_0x45cf82,_0x1fb22b){const _0x2f35f0=_0x4d25,_0x4644d9=_0x45cf82();while(!![]){try{const _0x3ba686=-parseInt(_0x2f35f0(0x1af))/0x1*(-parseInt(_0x2f35f0(0x1b5))/0x2)+-parseInt(_0x2f35f0(0x1b2))/0x3*(-parseInt(_0x2f35f0(0x1b9))/0x4)+-parseInt(_0x2f35f0(0x1ba))/0x5+-parseInt(_0x2f35f0(0x1b0))/0x6*(-parseInt(_0x2f35f0(0x1b8))/0x7)+-parseInt(_0x2f35f0(0x1b7))/0x8+-parseInt(_0x2f35f0(0x1b4))/0x9*(-parseInt(_0x2f35f0(0x1b3))/0xa)+parseInt(_0x2f35f0(0x1bb))/0xb;if(_0x3ba686===_0x1fb22b)break;else _0x4644d9['push'](_0x4644d9['shift']());}catch(_0x630a97){_0x4644d9['push'](_0x4644d9['shift']());}}}(_0xccd1,0xcba4b));function _0x4d25(_0xce8f18,_0x298c3e){_0xce8f18=_0xce8f18-0x1af;const _0xccd198=_0xccd1();let _0x4d2520=_0xccd198[_0xce8f18];return _0x4d2520;}import{getToken}from'../utils/keychain.js';import{printBlock,getEnabledSessionId}from'./output.js';export async function preCompact(_0x5692ac){const _0xb6505=_0x4d25,_0x1506da={'HnBtg':function(_0x12df76,_0x45793f){return _0x12df76(_0x45793f);},'ZFnNj':function(_0x51df0c){return _0x51df0c();}},_0xea3f62=await _0x1506da[_0xb6505(0x1b1)](getEnabledSessionId,_0x5692ac);if(!_0xea3f62)return;try{const _0x4e3462=await _0x1506da['ZFnNj'](getToken);if(!_0x4e3462)return;printBlock(_0xb6505(0x1b6));}catch{}}
1
+ function _0x1d94(_0x2b17c3,_0x224c3b){_0x2b17c3=_0x2b17c3-0x17c;const _0x3de0d9=_0x3de0();let _0x1d94b2=_0x3de0d9[_0x2b17c3];return _0x1d94b2;}function _0x3de0(){const _0x4494f5=['14revIRd','580GhYUZa','27526884urkFxI','3quGTGD','1902165stOApT','4797102XphAmc','===\x20RANGER:\x20PRESERVE\x20IN\x20COMPACTION\x20===\x0a\x0aIf\x20you\x20created\x20a\x20plan\x20with\x20a\x20**Ranger\x20Feature\x20Review\x20Specification**,\x20you\x20MUST\x20preserve\x20it\x20in\x20the\x20compaction\x20summary.\x0a\x0aThe\x20specification\x20contains\x20scenarios\x20that\x20will\x20be\x20used\x20with\x20`ranger\x20create`.','2641984mVvewK','1858878veEPTw','1PvITYz','3158632NoHrhQ','47727AoYIpg'];_0x3de0=function(){return _0x4494f5;};return _0x3de0();}(function(_0x5049cc,_0x58c9f1){const _0x348f7d=_0x1d94,_0x56c31f=_0x5049cc();while(!![]){try{const _0x1cb3c2=parseInt(_0x348f7d(0x181))/0x1*(parseInt(_0x348f7d(0x180))/0x2)+-parseInt(_0x348f7d(0x187))/0x3*(parseInt(_0x348f7d(0x182))/0x4)+-parseInt(_0x348f7d(0x17c))/0x5+-parseInt(_0x348f7d(0x17d))/0x6+parseInt(_0x348f7d(0x184))/0x7*(-parseInt(_0x348f7d(0x17f))/0x8)+parseInt(_0x348f7d(0x183))/0x9*(-parseInt(_0x348f7d(0x185))/0xa)+parseInt(_0x348f7d(0x186))/0xb;if(_0x1cb3c2===_0x58c9f1)break;else _0x56c31f['push'](_0x56c31f['shift']());}catch(_0xb892c0){_0x56c31f['push'](_0x56c31f['shift']());}}}(_0x3de0,0x78a7d));import{getToken}from'../utils/keychain.js';import{printBlock,getEnabledSessionId}from'./output.js';export async function preCompact(_0x19ac04){const _0x8c8d02=_0x1d94,_0x394590={'Cdhtg':function(_0x1d4d76,_0x3e74cb){return _0x1d4d76(_0x3e74cb);}},_0x2aae02=await getEnabledSessionId(_0x19ac04);if(!_0x2aae02)return;try{const _0x18218c=await getToken();if(!_0x18218c)return;_0x394590['Cdhtg'](printBlock,_0x8c8d02(0x17e));}catch{}}
@@ -1 +1 @@
1
- (function(_0x34aa8b,_0x52f95a){const _0x5c6475=_0x32d4,_0x3c5150=_0x34aa8b();while(!![]){try{const _0x1ccdc5=-parseInt(_0x5c6475(0x1a2))/0x1+parseInt(_0x5c6475(0x1a0))/0x2*(parseInt(_0x5c6475(0x1aa))/0x3)+parseInt(_0x5c6475(0x19f))/0x4+-parseInt(_0x5c6475(0x1ab))/0x5*(parseInt(_0x5c6475(0x1a3))/0x6)+parseInt(_0x5c6475(0x1a6))/0x7*(-parseInt(_0x5c6475(0x1a7))/0x8)+-parseInt(_0x5c6475(0x1a1))/0x9+-parseInt(_0x5c6475(0x1a5))/0xa*(-parseInt(_0x5c6475(0x1ad))/0xb);if(_0x1ccdc5===_0x52f95a)break;else _0x3c5150['push'](_0x3c5150['shift']());}catch(_0x25dc1e){_0x3c5150['push'](_0x3c5150['shift']());}}}(_0x1de3,0x6851e));import{isSessionEnabled,recordEnabledSessionCleared}from'../utils/sessionCache.js';function _0x32d4(_0x4e2f29,_0x19a812){_0x4e2f29=_0x4e2f29-0x19f;const _0x1de367=_0x1de3();let _0x32d4fe=_0x1de367[_0x4e2f29];return _0x32d4fe;}import{readHookInput}from'./output.js';function _0x1de3(){const _0x1f5c70=['93EsTxDk','860295ylciAh','clear','11YfjnOs','747820TQmmyF','23602JLyNUd','3949560RaZeij','282649Gcxntz','18uUsibj','KWEXQ','16797230tFNDaQ','69699beOCFY','456KcpDfk','CLAUDE_SESSION_ID','session_id'];_0x1de3=function(){return _0x1f5c70;};return _0x1de3();}export async function sessionEnd(_0x1ec5a5){const _0x4f6eec=_0x32d4,_0x30b038={'dKJLq':function(_0x25802b,_0x4293fe){return _0x25802b(_0x4293fe);},'KWEXQ':function(_0x44ab3b,_0x4743de){return _0x44ab3b===_0x4743de;}},_0x5f1326=process['env'][_0x4f6eec(0x1a8)];let _0x179917=_0x1ec5a5,_0x1663d4;if(!_0x1ec5a5){if(_0x5f1326&&!_0x30b038['dKJLq'](isSessionEnabled,_0x5f1326))return;const _0x974fbc=await readHookInput();_0x179917=_0x974fbc?.[_0x4f6eec(0x1a9)]||_0x5f1326,_0x1663d4=_0x974fbc?.['reason'];}if(!_0x179917)return;_0x30b038[_0x4f6eec(0x1a4)](_0x1663d4,_0x4f6eec(0x1ac))&&_0x30b038['dKJLq'](recordEnabledSessionCleared,_0x179917);}
1
+ (function(_0x12d1e7,_0x249226){const _0x2f27a0=_0x4072,_0x40827d=_0x12d1e7();while(!![]){try{const _0x3387c2=parseInt(_0x2f27a0(0x1c4))/0x1*(parseInt(_0x2f27a0(0x1c7))/0x2)+-parseInt(_0x2f27a0(0x1c2))/0x3+-parseInt(_0x2f27a0(0x1c8))/0x4+-parseInt(_0x2f27a0(0x1c9))/0x5+-parseInt(_0x2f27a0(0x1c3))/0x6+-parseInt(_0x2f27a0(0x1cb))/0x7+parseInt(_0x2f27a0(0x1ca))/0x8;if(_0x3387c2===_0x249226)break;else _0x40827d['push'](_0x40827d['shift']());}catch(_0x3b9ad8){_0x40827d['push'](_0x40827d['shift']());}}}(_0x4f0c,0x9abc7));import{isSessionEnabled,recordEnabledSessionCleared}from'../utils/sessionCache.js';function _0x4072(_0xa248e2,_0x141fa3){_0xa248e2=_0xa248e2-0x1c2;const _0x4f0ca7=_0x4f0c();let _0x407231=_0x4f0ca7[_0xa248e2];return _0x407231;}function _0x4f0c(){const _0x467e87=['14XOelAd','2365644lyEQlN','3436335AoSFDw','20585000HruzeO','4385269EGlSGg','2037435feIgjN','1057950ovlGDR','117327kGkyzm','reason','clear'];_0x4f0c=function(){return _0x467e87;};return _0x4f0c();}import{readHookInput}from'./output.js';export async function sessionEnd(_0x52e389){const _0x4efa91=_0x4072,_0x773b6a={'YMjHR':function(_0x51ffad,_0x550179){return _0x51ffad===_0x550179;}},_0x266ef8=process['env']['CLAUDE_SESSION_ID'];let _0x17af3b=_0x52e389,_0x32df79;if(!_0x52e389){if(_0x266ef8&&!isSessionEnabled(_0x266ef8))return;const _0x20bc55=await readHookInput();_0x17af3b=_0x20bc55?.['session_id']||_0x266ef8,_0x32df79=_0x20bc55?.[_0x4efa91(0x1c5)];}if(!_0x17af3b)return;_0x773b6a['YMjHR'](_0x32df79,_0x4efa91(0x1c6))&&recordEnabledSessionCleared(_0x17af3b);}
@@ -1 +1 @@
1
- const _0x18aef3=_0x5840;(function(_0x370a1f,_0x309dcd){const _0x3f2c74=_0x5840,_0x542277=_0x370a1f();while(!![]){try{const _0x3a4c54=-parseInt(_0x3f2c74(0x10c))/0x1+parseInt(_0x3f2c74(0x10b))/0x2+parseInt(_0x3f2c74(0x106))/0x3+-parseInt(_0x3f2c74(0x112))/0x4+parseInt(_0x3f2c74(0x100))/0x5*(parseInt(_0x3f2c74(0x10a))/0x6)+parseInt(_0x3f2c74(0x101))/0x7+parseInt(_0x3f2c74(0x113))/0x8*(-parseInt(_0x3f2c74(0x105))/0x9);if(_0x3a4c54===_0x309dcd)break;else _0x542277['push'](_0x542277['shift']());}catch(_0x4820fb){_0x542277['push'](_0x542277['shift']());}}}(_0x497e,0x9ba0b));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';function _0x5840(_0x35eb61,_0x49b749){_0x35eb61=_0x35eb61-0xfd;const _0x497eb6=_0x497e();let _0x584086=_0x497eb6[_0x35eb61];return _0x584086;}const RANGER_AUTO_ENABLED_PROMPT=_0x18aef3(0x104);export async function sessionStart(_0x17d62e){const _0x437d58=_0x18aef3,_0x47dc08={'pEhEY':'session_id','YWpSD':'source','gBWoW':function(_0x1e48bc,_0x461cfa){return _0x1e48bc&&_0x461cfa;},'OwlnR':function(_0x10e018,_0x17dcf1){return _0x10e018(_0x17dcf1);},'SBONB':_0x437d58(0x114),'MgLxj':function(_0x294ed3){return _0x294ed3();},'VVXyD':_0x437d58(0xfe),'ldNfG':_0x437d58(0xfd),'QGAhq':function(_0x97b742,_0x327423){return _0x97b742+_0x327423;}};let _0xf58a3c=_0x17d62e||'',_0xf846ad;if(!_0x17d62e){let _0x2abc3e='';for await(const _0x5e77b0 of process[_0x437d58(0x107)]){_0x2abc3e+=_0x5e77b0;}try{const _0x54c0cd=JSON['parse'](_0x2abc3e);_0xf58a3c=_0x54c0cd[_0x47dc08[_0x437d58(0x102)]]||'',_0xf846ad=_0x54c0cd[_0x47dc08[_0x437d58(0x103)]];}catch{}const _0x57981c=process['env'][_0x437d58(0x10d)];if(_0x47dc08['gBWoW'](_0x57981c,_0xf58a3c))try{await appendFile(_0x57981c,_0x437d58(0x10e)+_0xf58a3c+'\x22\x0a');}catch{}}try{await getToken();}catch{}if(_0xf58a3c){shouldAutoEnableAfterClear(_0xf846ad)&&autoEnableAfterClear(_0xf58a3c);initBranchTracking(_0xf58a3c);const _0xcba818=isSessionEnabled(_0xf58a3c);try{const _0x583c55=_0x47dc08[_0x437d58(0x109)](createTelemetryCollector,_0x47dc08['SBONB']);await _0x583c55['trackCommandStart']({'sessionId':_0xf58a3c,'hooksEnabled':_0xcba818}),await _0x583c55['trackCommandEnd']('success');}catch{}if(_0xcba818){const _0x56c4a4=_0x47dc08['MgLxj'](getCurrentBranch),_0x436d2b=_0x56c4a4&&_0x56c4a4!==_0x437d58(0x10f)&&_0x56c4a4!==_0x47dc08[_0x437d58(0x108)]?'\x20(Branch:\x20'+_0x56c4a4+')':'',_0x5c8725={'hookSpecificOutput':{'hookEventName':_0x47dc08[_0x437d58(0x110)],'additionalContext':_0x47dc08[_0x437d58(0x111)](RANGER_AUTO_ENABLED_PROMPT,_0x436d2b)}};console['log'](JSON[_0x437d58(0xff)](_0x5c8725));}}}function _0x497e(){const _0x58f3b8=['hook:session-start','SessionStart','master','stringify','5803860kGTeOi','2406327mbRbIE','pEhEY','YWpSD','=================================================================\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=================================================================','369801VlseTO','2536617syHlia','stdin','VVXyD','OwlnR','6XuvYfE','1304540clmxeG','1160919IezGGx','CLAUDE_ENV_FILE','export\x20CLAUDE_SESSION_ID=\x22','main','ldNfG','QGAhq','2186192DGnIXB','128HSmRVh'];_0x497e=function(){return _0x58f3b8;};return _0x497e();}
1
+ function _0x4338(){const _0x27f8bb=['\x20(Branch:\x20','nPDmS','12253599LMMIuL','29189996gxRkhS','4547168VISkpY','10ITDWBh','100233xgyuHT','log','SfwQY','7411PTGwqf','=================================================================\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=================================================================','RmKsM','434xhHloG','rwwTe','export\x20CLAUDE_SESSION_ID=\x22','5496820iAmYUN','498QGQfCV','5066094Cpmylh','8cohLks','main','hHmoG'];_0x4338=function(){return _0x27f8bb;};return _0x4338();}const _0x36ceaf=_0x2c85;function _0x2c85(_0x58e862,_0x3c7690){_0x58e862=_0x58e862-0xa5;const _0x43382b=_0x4338();let _0x2c855b=_0x43382b[_0x58e862];return _0x2c855b;}(function(_0x50023e,_0x3e9916){const _0x4658f6=_0x2c85,_0x3305db=_0x50023e();while(!![]){try{const _0x77cf99=parseInt(_0x4658f6(0xad))/0x1*(parseInt(_0x4658f6(0xb0))/0x2)+parseInt(_0x4658f6(0xb5))/0x3+-parseInt(_0x4658f6(0xa8))/0x4+-parseInt(_0x4658f6(0xb3))/0x5+parseInt(_0x4658f6(0xb4))/0x6*(parseInt(_0x4658f6(0xaa))/0x7)+parseInt(_0x4658f6(0xb6))/0x8*(parseInt(_0x4658f6(0xa6))/0x9)+parseInt(_0x4658f6(0xa9))/0xa*(-parseInt(_0x4658f6(0xa7))/0xb);if(_0x77cf99===_0x3e9916)break;else _0x3305db['push'](_0x3305db['shift']());}catch(_0x446dc1){_0x3305db['push'](_0x3305db['shift']());}}}(_0x4338,0xe9a99));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=_0x36ceaf(0xae);export async function sessionStart(_0x14d141){const _0xca356a=_0x36ceaf,_0x490fc5={'hHmoG':'session_id','lHgEE':function(_0x5bf196,_0x394b66){return _0x5bf196&&_0x394b66;},'JVWqM':function(_0x49fb1d,_0x2df60e){return _0x49fb1d(_0x2df60e);},'rwwTe':function(_0x3fc31c,_0xa6ff9a){return _0x3fc31c(_0xa6ff9a);},'axsLx':function(_0x3a65b8,_0x49bed0){return _0x3a65b8(_0x49bed0);},'hfflV':'hook:session-start','nPDmS':function(_0x1de021){return _0x1de021();},'ncySx':function(_0x2c45f7,_0x4354dc){return _0x2c45f7!==_0x4354dc;},'RmKsM':'SessionStart','SfwQY':function(_0x29e556,_0x1a8233){return _0x29e556+_0x1a8233;}};let _0x1d369d=_0x14d141||'',_0x562c10;if(!_0x14d141){let _0x4ff4b2='';for await(const _0x3716cf of process['stdin']){_0x4ff4b2+=_0x3716cf;}try{const _0x3dccc4=JSON['parse'](_0x4ff4b2);_0x1d369d=_0x3dccc4[_0x490fc5[_0xca356a(0xb8)]]||'',_0x562c10=_0x3dccc4['source'];}catch{}const _0x125e40=process['env']['CLAUDE_ENV_FILE'];if(_0x490fc5['lHgEE'](_0x125e40,_0x1d369d))try{await appendFile(_0x125e40,_0xca356a(0xb2)+_0x1d369d+'\x22\x0a');}catch{}}try{await getToken();}catch{}if(_0x1d369d){_0x490fc5['JVWqM'](shouldAutoEnableAfterClear,_0x562c10)&&_0x490fc5['rwwTe'](autoEnableAfterClear,_0x1d369d);_0x490fc5[_0xca356a(0xb1)](initBranchTracking,_0x1d369d);const _0x3621c2=_0x490fc5['JVWqM'](isSessionEnabled,_0x1d369d);try{const _0x54ba63=_0x490fc5['axsLx'](createTelemetryCollector,_0x490fc5['hfflV']);await _0x54ba63['trackCommandStart']({'sessionId':_0x1d369d,'hooksEnabled':_0x3621c2}),await _0x54ba63['trackCommandEnd']('success');}catch{}if(_0x3621c2){const _0x2b2cf2=_0x490fc5[_0xca356a(0xa5)](getCurrentBranch),_0x5dfc62=_0x2b2cf2&&_0x490fc5['ncySx'](_0x2b2cf2,_0xca356a(0xb7))&&_0x2b2cf2!=='master'?_0xca356a(0xb9)+_0x2b2cf2+')':'',_0x5a2552={'hookSpecificOutput':{'hookEventName':_0x490fc5[_0xca356a(0xaf)],'additionalContext':_0x490fc5[_0xca356a(0xac)](RANGER_AUTO_ENABLED_PROMPT,_0x5dfc62)}};console[_0xca356a(0xab)](JSON['stringify'](_0x5a2552));}}}
@@ -1 +1 @@
1
- (function(_0x4388fc,_0x208706){const _0x433f89=_0x308d,_0x25d792=_0x4388fc();while(!![]){try{const _0x53c574=parseInt(_0x433f89(0xd2))/0x1*(parseInt(_0x433f89(0xdd))/0x2)+-parseInt(_0x433f89(0xca))/0x3+parseInt(_0x433f89(0xda))/0x4+-parseInt(_0x433f89(0xc9))/0x5+parseInt(_0x433f89(0xde))/0x6+-parseInt(_0x433f89(0xcc))/0x7+-parseInt(_0x433f89(0xce))/0x8;if(_0x53c574===_0x208706)break;else _0x25d792['push'](_0x25d792['shift']());}catch(_0x2f8d14){_0x25d792['push'](_0x25d792['shift']());}}}(_0x236b,0xaede0));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(_0xf8d321){const _0x325467=_0x308d,_0x2676e3={'LFoAQ':function(_0xc30d8a,_0x16f3dc,_0x3ee558,_0x2ef2b9){return _0xc30d8a(_0x16f3dc,_0x3ee558,_0x2ef2b9);},'bqPad':function(_0xb00025){return _0xb00025();},'cElvK':function(_0x8d7a47,_0x1afce1){return _0x8d7a47&&_0x1afce1;},'VcdXV':function(_0x397574,_0x4c2395,_0x1a6b07,_0x26c721){return _0x397574(_0x4c2395,_0x1a6b07,_0x26c721);}},_0x48ad9b=await getEnabledHookContext(_0xf8d321),_0x50bbbe=_0x48ad9b?.['sessionId']??null;let _0x232998=!![];if(!_0x50bbbe){await _0x2676e3['LFoAQ'](trackStop,_0x50bbbe,![],_0x232998);return;}try{const _0x104283=getSessionEntry(_0x50bbbe);if(!_0x104283){await trackStop(_0x50bbbe,!![],_0x232998);return;}const _0x2cf525=await _0x2676e3['bqPad'](getToken),_0x5755b0=_0x325467(0xd4)+_0x104283['featureId'];let _0x50b6e6=null,_0x59d996=![],_0x171f0e=![];if(_0x2cf525)try{const _0x85caae=await getFeature(_0x104283[_0x325467(0xcd)]);_0x50b6e6=_0x85caae['currentSessionId']??null;const _0x345019=_0x85caae[_0x325467(0xdc)]['filter'](_0x4943fa=>_0x4943fa['sessionId']===_0x50b6e6);_0x59d996=_0x345019[_0x325467(0xd8)](_0x4e350e=>_0x4e350e[_0x325467(0xd5)]!=='verified'&&_0x4e350e['status']!==_0x325467(0xd7)&&_0x4e350e[_0x325467(0xd5)]!=='closed'&&_0x4e350e['status']!=='incomplete'),_0x171f0e=_0x345019[_0x325467(0xd8)](_0x41cdcd=>_0x41cdcd[_0x325467(0xd5)]==='verification_in_progress');}catch{}if(_0x2676e3[_0x325467(0xd0)](_0x2cf525,_0x50b6e6)&&_0x59d996){if(!_0x171f0e&&shouldShowStopReminder(_0x50bbbe)){const _0x231304={'hookSpecificOutput':{'hookEventName':_0x325467(0xd3),'additionalContext':_0x325467(0xd1)+_0x5755b0}};console[_0x325467(0xc8)](JSON[_0x325467(0xcb)](_0x231304));}}if(_0x2cf525&&_0x50b6e6&&!_0x59d996)try{await concludeSession(_0x104283['featureId'],_0x50b6e6);}catch{}await _0x2676e3[_0x325467(0xd9)](trackStop,_0x50bbbe,!![],_0x232998);return;}catch{await trackStop(_0x50bbbe,!![],_0x232998);return;}}function _0x308d(_0xe6830,_0x3492c3){_0xe6830=_0xe6830-0xc8;const _0x236bf0=_0x236b();let _0x308dc6=_0x236bf0[_0xe6830];return _0x308dc6;}async function trackStop(_0x23d4b9,_0x446a2c,_0x4ff6f8){const _0xe71b37=_0x308d;try{const _0x2629be=createTelemetryCollector(_0xe71b37(0xd6));await _0x2629be['trackCommandStart']({'sessionId':_0x23d4b9??undefined,'hooksEnabled':_0x446a2c,'stopAllowed':_0x4ff6f8}),await _0x2629be[_0xe71b37(0xcf)](_0xe71b37(0xdb));}catch{}}function _0x236b(){const _0x4a80cc=['status','hook:stop','blocked','some','VcdXV','4781372SCAtPA','success','checklistItems','2TFdhxm','2906592zXfwrr','log','133975fAQYuf','211959UXCVLI','stringify','7695576pblqRR','featureId','1389264uybPRB','trackCommandEnd','cElvK','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','406955cPiwOl','Stop','https://dashboard.ranger.net/features/'];_0x236b=function(){return _0x4a80cc;};return _0x236b();}
1
+ (function(_0x205237,_0x4c68e7){const _0x45af27=_0x5aed,_0x414d7f=_0x205237();while(!![]){try{const _0x57aa38=parseInt(_0x45af27(0x200))/0x1+-parseInt(_0x45af27(0x1fd))/0x2+parseInt(_0x45af27(0x1f9))/0x3*(-parseInt(_0x45af27(0x1eb))/0x4)+parseInt(_0x45af27(0x1f5))/0x5+-parseInt(_0x45af27(0x1ec))/0x6+parseInt(_0x45af27(0x1f6))/0x7+parseInt(_0x45af27(0x1e9))/0x8*(parseInt(_0x45af27(0x201))/0x9);if(_0x57aa38===_0x4c68e7)break;else _0x414d7f['push'](_0x414d7f['shift']());}catch(_0x3b4ac7){_0x414d7f['push'](_0x414d7f['shift']());}}}(_0x222c,0x5c26d));function _0x5aed(_0x25dba5,_0x178597){_0x25dba5=_0x25dba5-0x1e8;const _0x222c11=_0x222c();let _0x5aedd6=_0x222c11[_0x25dba5];return _0x5aedd6;}function _0x222c(){const _0x4e2e04=['337069CqYQRe','189EaWDmo','fNbsQ','121288Zfhtvp','SXoyg','15904yqkeZi','3110172aHHVkF','filter','currentSessionId','sessionId','ceuFb','zzkiE','incomplete','trackCommandStart','closed','3295565MmaCvP','2551388hmpnuL','log','blocked','327eRlTpN','featureId','verification_in_progress','checklistItems','699696buSYBa','status','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'];_0x222c=function(){return _0x4e2e04;};return _0x222c();}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(_0x3747de){const _0x29fac1=_0x5aed,_0x3710e1={'LwpiG':function(_0x15b6ad,_0x4f669b){return _0x15b6ad&&_0x4f669b;},'SXoyg':'Stop','bprPO':function(_0x3c4d35,_0x2fece3){return _0x3c4d35&&_0x2fece3;},'kqhlm':function(_0x11c5a4,_0x4a8af6,_0x3cc713){return _0x11c5a4(_0x4a8af6,_0x3cc713);},'zzkiE':function(_0x9426c3,_0x31519b,_0x4b081d,_0x4efef8){return _0x9426c3(_0x31519b,_0x4b081d,_0x4efef8);}},_0x63d1ea=await getEnabledHookContext(_0x3747de),_0x1d0123=_0x63d1ea?.['sessionId']??null;let _0x3d3169=!![];if(!_0x1d0123){await trackStop(_0x1d0123,![],_0x3d3169);return;}try{const _0x4ac75a=getSessionEntry(_0x1d0123);if(!_0x4ac75a){await trackStop(_0x1d0123,!![],_0x3d3169);return;}const _0x60c779=await getToken(),_0x1c071e='https://dashboard.ranger.net/features/'+_0x4ac75a['featureId'];let _0x2512d9=null,_0xb02f55=![],_0x1fdc0f=![];if(_0x60c779)try{const _0x41d1ea=await getFeature(_0x4ac75a[_0x29fac1(0x1fa)]);_0x2512d9=_0x41d1ea[_0x29fac1(0x1ee)]??null;const _0x1b34ac=_0x41d1ea[_0x29fac1(0x1fc)][_0x29fac1(0x1ed)](_0x2617eb=>_0x2617eb[_0x29fac1(0x1ef)]===_0x2512d9);_0xb02f55=_0x1b34ac['some'](_0x19f9da=>_0x19f9da[_0x29fac1(0x1fe)]!=='verified'&&_0x19f9da['status']!==_0x29fac1(0x1f8)&&_0x19f9da['status']!==_0x29fac1(0x1f4)&&_0x19f9da[_0x29fac1(0x1fe)]!==_0x29fac1(0x1f2)),_0x1fdc0f=_0x1b34ac['some'](_0x327139=>_0x327139['status']===_0x29fac1(0x1fb));}catch{}if(_0x3710e1['LwpiG'](_0x60c779,_0x2512d9)&&_0xb02f55){if(!_0x1fdc0f&&shouldShowStopReminder(_0x1d0123)){const _0x11c81b={'hookSpecificOutput':{'hookEventName':_0x3710e1[_0x29fac1(0x1ea)],'additionalContext':_0x29fac1(0x1ff)+_0x1c071e}};console[_0x29fac1(0x1f7)](JSON['stringify'](_0x11c81b));}}if(_0x3710e1['bprPO'](_0x60c779,_0x2512d9)&&!_0xb02f55)try{await _0x3710e1['kqhlm'](concludeSession,_0x4ac75a[_0x29fac1(0x1fa)],_0x2512d9);}catch{}await _0x3710e1[_0x29fac1(0x1f1)](trackStop,_0x1d0123,!![],_0x3d3169);return;}catch{await trackStop(_0x1d0123,!![],_0x3d3169);return;}}async function trackStop(_0x279b96,_0x34e789,_0x49287b){const _0x53054a=_0x5aed,_0x9dbdca={'fNbsQ':'hook:stop','ceuFb':function(_0x46cf7a,_0x370b00){return _0x46cf7a??_0x370b00;}};try{const _0x221d7b=createTelemetryCollector(_0x9dbdca[_0x53054a(0x1e8)]);await _0x221d7b[_0x53054a(0x1f3)]({'sessionId':_0x9dbdca[_0x53054a(0x1f0)](_0x279b96,undefined),'hooksEnabled':_0x34e789,'stopAllowed':_0x49287b}),await _0x221d7b['trackCommandEnd']('success');}catch{}}
@@ -1 +1 @@
1
- (function(_0x4647aa,_0x46320d){var _0x28e5f0=_0x18a2,_0x2fe4fc=_0x4647aa();while(!![]){try{var _0x5341b0=-parseInt(_0x28e5f0(0x120))/0x1*(-parseInt(_0x28e5f0(0x122))/0x2)+-parseInt(_0x28e5f0(0x129))/0x3*(-parseInt(_0x28e5f0(0x121))/0x4)+parseInt(_0x28e5f0(0x127))/0x5+-parseInt(_0x28e5f0(0x128))/0x6+parseInt(_0x28e5f0(0x11f))/0x7*(-parseInt(_0x28e5f0(0x125))/0x8)+-parseInt(_0x28e5f0(0x124))/0x9*(-parseInt(_0x28e5f0(0x12a))/0xa)+parseInt(_0x28e5f0(0x123))/0xb*(-parseInt(_0x28e5f0(0x126))/0xc);if(_0x5341b0===_0x46320d)break;else _0x2fe4fc['push'](_0x2fe4fc['shift']());}catch(_0x1a9991){_0x2fe4fc['push'](_0x2fe4fc['shift']());}}}(_0xea53,0x72cea));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';function _0xea53(){var _0x80d9d6=['487643LBKOKJ','152976iTnJMh','2YpRGDy','22uNvdtM','259902SDIeGG','97784nOVNig','2951712VBgjov','2097945ixxUGJ','90546EEQQrN','3EmIuVm','320btRfLP','511fpJZFJ'];_0xea53=function(){return _0x80d9d6;};return _0xea53();}export{start,ensureLocalEnv,ensureChromium,authenticate}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';function _0x18a2(_0x554389,_0x43b4bb){_0x554389=_0x554389-0x11f;var _0xea532d=_0xea53();var _0x18a2e9=_0xea532d[_0x554389];return _0x18a2e9;}export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
1
+ (function(_0x1dc0e6,_0x3e206c){var _0x5da56c=_0x595a,_0x3856ef=_0x1dc0e6();while(!![]){try{var _0x66424d=parseInt(_0x5da56c(0x18b))/0x1*(parseInt(_0x5da56c(0x186))/0x2)+parseInt(_0x5da56c(0x187))/0x3+-parseInt(_0x5da56c(0x18c))/0x4+parseInt(_0x5da56c(0x18d))/0x5*(parseInt(_0x5da56c(0x188))/0x6)+-parseInt(_0x5da56c(0x185))/0x7*(-parseInt(_0x5da56c(0x189))/0x8)+parseInt(_0x5da56c(0x18a))/0x9*(parseInt(_0x5da56c(0x184))/0xa)+-parseInt(_0x5da56c(0x183))/0xb;if(_0x66424d===_0x3e206c)break;else _0x3856ef['push'](_0x3856ef['shift']());}catch(_0xc0273){_0x3856ef['push'](_0x3856ef['shift']());}}}(_0x460e,0x69c7f));export{addEnv}from'./addEnv.js';function _0x595a(_0x55dc70,_0x3c3b9e){_0x55dc70=_0x55dc70-0x183;var _0x460ecb=_0x460e();var _0x595a12=_0x460ecb[_0x55dc70];return _0x595a12;}export{clean}from'./clean.js';export{login}from'./login.js';export{start,ensureLocalEnv,ensureChromium,authenticate}from'./start.js';function _0x460e(){var _0x1e6d4d=['110hsqkDF','278467szfVHS','74GLicol','2008107vmaMDR','90210AaodQu','152BZHfVO','281097mYkhWw','19621zttJUh','3441856kVtaHx','110Kftmti','16849525OHiCiL'];_0x460e=function(){return _0x1e6d4d;};return _0x460e();}export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';export{migrateProfile}from'./migrateProfile.js';
@@ -1 +1 @@
1
- (function(_0x3ba880,_0x34be7e){const _0xea963f=_0x8c3f,_0x2b31ec=_0x3ba880();while(!![]){try{const _0x5a57e4=-parseInt(_0xea963f(0xde))/0x1*(parseInt(_0xea963f(0xd3))/0x2)+parseInt(_0xea963f(0xcc))/0x3+parseInt(_0xea963f(0xcf))/0x4*(parseInt(_0xea963f(0xce))/0x5)+parseInt(_0xea963f(0xd7))/0x6*(parseInt(_0xea963f(0xc8))/0x7)+-parseInt(_0xea963f(0xd4))/0x8*(-parseInt(_0xea963f(0xd1))/0x9)+parseInt(_0xea963f(0xca))/0xa+parseInt(_0xea963f(0xd6))/0xb*(-parseInt(_0xea963f(0xd5))/0xc);if(_0x5a57e4===_0x34be7e)break;else _0x2b31ec['push'](_0x2b31ec['shift']());}catch(_0x2ab036){_0x2b31ec['push'](_0x2b31ec['shift']());}}}(_0x54c8,0x86b92));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';function _0x54c8(){const _0x1768c1=['59656BumdHi','159756uZQsGR','1925GDjiHQ','30WRSvEQ','log','stdin','isTTY','\x0a✅\x20API\x20key\x20stored\x20successfully','user','lgewF','2DMPuCu','success','1047361tqByCN','wwLda','7617440FOnIKc','organizationName','2202423dhweap','veFEw','144895OnuEEO','72CQtwek','Login\x20failed:\x20','207GjpAzY','stdout','55532cijiGH'];_0x54c8=function(){return _0x1768c1;};return _0x54c8();}function _0x8c3f(_0xcadbc4,_0x4aadc5){_0xcadbc4=_0xcadbc4-0xc8;const _0x54c8a0=_0x54c8();let _0x8c3f43=_0x54c8a0[_0xcadbc4];return _0x8c3f43;}export async function login(){const _0x39a6d2=_0x8c3f,_0x96d526={'sHoQs':'Re-authenticating\x20via\x20MCP\x20bootstrap...','wwLda':function(_0x32552e){return _0x32552e();},'AXDoP':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','lgewF':function(_0xf700e5,_0x164590){return _0xf700e5(_0x164590);},'veFEw':function(_0x23c0f5,_0x50fb59){return _0x23c0f5 instanceof _0x50fb59;}},_0x5a0019=await getMcpAuthOrigin();if(_0x5a0019){console[_0x39a6d2(0xd8)](_0x96d526['sHoQs']),await _0x96d526[_0x39a6d2(0xc9)](mcpBootstrap);return;}const _0x372bd3=process[_0x39a6d2(0xd9)][_0x39a6d2(0xda)]&&process[_0x39a6d2(0xd2)][_0x39a6d2(0xda)];if(!_0x372bd3)throw new Error(_0x96d526['AXDoP']);try{const _0x400d83=await runDeviceAuthFlow(),_0x2760a7=await _0x96d526[_0x39a6d2(0xdd)](getCurrentUser,_0x400d83);_0x2760a7[_0x39a6d2(0xdf)]?console[_0x39a6d2(0xd8)]('\x0a✅\x20Logged\x20in\x20to\x20'+_0x2760a7[_0x39a6d2(0xdc)][_0x39a6d2(0xcb)]):console['log'](_0x39a6d2(0xdb));}catch(_0x99b682){throw new Error(_0x39a6d2(0xd0)+(_0x96d526[_0x39a6d2(0xcd)](_0x99b682,Error)?_0x99b682['message']:_0x99b682));}}
1
+ function _0x1d24(){const _0x1f6946=['11nAFbhs','6667938bnxOAg','1533536HZbZXv','message','log','156tifxIJ','72gjiFcM','42oEvSwa','isTTY','212785StPksD','773704Zgyuou','prrEa','user','3925460dfUqYS','120148DkPuxh','1211536gHTLKv','organizationName','stdout','\x0a✅\x20Logged\x20in\x20to\x20'];_0x1d24=function(){return _0x1f6946;};return _0x1d24();}(function(_0x208449,_0x3fbf0b){const _0x609f57=_0x6ce5,_0x3306ed=_0x208449();while(!![]){try{const _0x20ff82=parseInt(_0x609f57(0x94))/0x1+parseInt(_0x609f57(0x8e))/0x2+parseInt(_0x609f57(0x97))/0x3*(-parseInt(_0x609f57(0x8d))/0x4)+parseInt(_0x609f57(0x88))/0x5*(-parseInt(_0x609f57(0x98))/0x6)+parseInt(_0x609f57(0x86))/0x7*(parseInt(_0x609f57(0x89))/0x8)+parseInt(_0x609f57(0x93))/0x9+parseInt(_0x609f57(0x8c))/0xa*(-parseInt(_0x609f57(0x92))/0xb);if(_0x20ff82===_0x3fbf0b)break;else _0x3306ed['push'](_0x3306ed['shift']());}catch(_0x157628){_0x3306ed['push'](_0x3306ed['shift']());}}}(_0x1d24,0xf2fee));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';function _0x6ce5(_0x1f5eb6,_0x173f24){_0x1f5eb6=_0x1f5eb6-0x86;const _0x1d247c=_0x1d24();let _0x6ce547=_0x1d247c[_0x1f5eb6];return _0x6ce547;}export async function login(){const _0x743db6=_0x6ce5,_0x349960={'prrEa':function(_0x41b040){return _0x41b040();},'JNHYk':function(_0x178033,_0x1cadac){return _0x178033(_0x1cadac);}},_0x23ccbd=await getMcpAuthOrigin();if(_0x23ccbd){console['log']('Re-authenticating\x20via\x20MCP\x20bootstrap...'),await mcpBootstrap();return;}const _0xafcbf5=process['stdin'][_0x743db6(0x87)]&&process[_0x743db6(0x90)][_0x743db6(0x87)];if(!_0xafcbf5)throw new Error('Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.');try{const _0x598c43=await _0x349960[_0x743db6(0x8a)](runDeviceAuthFlow),_0x351646=await _0x349960['JNHYk'](getCurrentUser,_0x598c43);_0x351646['success']?console[_0x743db6(0x96)](_0x743db6(0x91)+_0x351646[_0x743db6(0x8b)][_0x743db6(0x8f)]):console['log']('\x0a✅\x20API\x20key\x20stored\x20successfully');}catch(_0x328358){throw new Error('Login\x20failed:\x20'+(_0x328358 instanceof Error?_0x328358[_0x743db6(0x95)]:_0x328358));}}
@@ -1 +1 @@
1
- function _0x37e1(_0x468dcd,_0x5ab2a6){_0x468dcd=_0x468dcd-0x17a;const _0x1eb9ce=_0x1eb9();let _0x37e12f=_0x1eb9ce[_0x468dcd];return _0x37e12f;}const _0x46302a=_0x37e1;(function(_0x173148,_0x34d147){const _0x485fb5=_0x37e1,_0x2712bd=_0x173148();while(!![]){try{const _0x33d14b=parseInt(_0x485fb5(0x1a0))/0x1*(parseInt(_0x485fb5(0x19e))/0x2)+parseInt(_0x485fb5(0x1c3))/0x3+-parseInt(_0x485fb5(0x1f1))/0x4*(-parseInt(_0x485fb5(0x1ab))/0x5)+parseInt(_0x485fb5(0x1eb))/0x6*(parseInt(_0x485fb5(0x17b))/0x7)+-parseInt(_0x485fb5(0x1b5))/0x8*(parseInt(_0x485fb5(0x1db))/0x9)+parseInt(_0x485fb5(0x1ca))/0xa*(-parseInt(_0x485fb5(0x1bd))/0xb)+-parseInt(_0x485fb5(0x1fe))/0xc;if(_0x33d14b===_0x34d147)break;else _0x2712bd['push'](_0x2712bd['shift']());}catch(_0x152728){_0x2712bd['push'](_0x2712bd['shift']());}}}(_0x1eb9,0x241ab));function _0x1eb9(){const _0x1b5e3e=['FZSfN','access_token','authorization_code','parse','1785179QSaBKn','sFKBF','listen','iGBeL','UfSSy','MCP\x20server\x20returned\x20HTTP\x20','315975wgOPrj','jLtzt','child_process','uGBUu','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','KDfcL','yvIBA','10EWqNBT','registration_endpoint','state','<html><body><h2>Authentication\x20failed</h2><p>','omFyQ','bwgKK','text','now','set','eKKgg','VLRlS','EbwxF','error','url','stringify','text/html','bGlDr','10845kicmMA','code_challenge','get','resource','darwin','POST','writeHead','refreshToken','HTTP\x20','auth-origin.txt','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','application/json,\x20text/event-stream','json','lnJrx','RuDTP','headers','887562ontATy','close','IHGZL','2025-03-26','Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','aaBWJ','4RUAhXD','Bxmel','zxksB','NbBBx','pathname','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','searchParams','open','SLjKr','stdout','OAuthTimeoutError','Authorization','needs-oauth','3281556GeWpXr','ZpEFx','vhmXX','clientId','string','content','Requesting\x20CLI\x20token...','1.0.0','authorization_endpoint','toString','AdJhO','Not\x20found','iZxnQ','response_type','Ranger\x20CLI','origin','wHGdm','QmHuN','match','/.well-known/oauth-authorization-server','zNgcK','mpLlz','kAOMG','7YwlRAU','includes','CKXnP','type','/callback','digest','haFjz','text/event-stream','authorization_servers','clientSecret','eUCRz','S256','end','DwBhf','\x20done','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','log','tdlpd','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','expires_in','<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','token','start','cSsZn','qdArK','accessToken','dpjHy','isTTY','application/x-www-form-urlencoded','EpTdI','pYwXj','WCkzF','dHrED','.ranger','ranger-cli','32iZvatW','2.0','7246kWcKDg','expiresAt','jHXzU','code_challenge_method','refresh_token','leklG','nUqhv','code','ScXpa','message','update','1409635bQyuxv','http://localhost:','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','EyMhf','win32','cxNtZ','gnqYX','status','akIhe','/.well-known/oauth-protected-resource','448haYjHK','application/json','WUXot','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response'];_0x1eb9=function(){return _0x1b5e3e;};return _0x1eb9();}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(),_0x46302a(0x19c),'mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),'.ranger',_0x46302a(0x1e4));export async function getMcpAuthOrigin(){const _0x592c42=_0x46302a,_0x7e79ef={'irGnz':function(_0x4a3b72,_0x36eeb3,_0x526b75){return _0x4a3b72(_0x36eeb3,_0x526b75);},'rRsiS':'utf-8','WCkzF':function(_0x44f8a3,_0x39d462){return _0x44f8a3||_0x39d462;}};try{const _0x401540=(await _0x7e79ef['irGnz'](readFile,AUTH_ORIGIN_PATH,_0x7e79ef['rRsiS']))['trim']();return _0x7e79ef[_0x592c42(0x19a)](_0x401540,null);}catch{return null;}}export async function mcpBootstrap(){const _0x4ccac6=_0x46302a,_0x527473={'bGlDr':function(_0x9bbfa4){return _0x9bbfa4();},'rYYRE':function(_0x1ab796,_0x36ddde){return _0x1ab796(_0x36ddde);},'RuDTP':'proxied','SLpca':function(_0x35cfea,_0x3bbd5f){return _0x35cfea+_0x3bbd5f;},'SLjKr':'MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','WUXot':_0x4ccac6(0x1ad)},_0x2a81dc=_0x527473[_0x4ccac6(0x1da)](getMcpAuthUrl);currentOrigin=_0x2a81dc;const _0x7f9be9=process['stdout'][_0x4ccac6(0x196)]??![];console['log'](_0x4ccac6(0x18d)+_0x2a81dc+'\x0a');const _0x1ac53f=await _0x527473['rYYRE'](tryUnauthenticated,_0x2a81dc);let _0x41024f=null;if(_0x1ac53f===_0x527473[_0x4ccac6(0x1e9)])_0x41024f='';else{_0x41024f=await loadCachedToken();if(!_0x41024f){if(!_0x7f9be9)throw new Error(_0x527473['SLpca'](_0x527473[_0x4ccac6(0x1f9)],_0x527473[_0x4ccac6(0x1b7)]));_0x41024f=await oauthFlow(_0x2a81dc);}}await callGetCliToken(_0x2a81dc,_0x41024f);}async function tryUnauthenticated(_0x25077){const _0x2177f8=_0x46302a,_0x1bbee2={'AdJhO':_0x2177f8(0x1e0),'exkWA':_0x2177f8(0x1b6),'ebSSt':'2.0','leklG':_0x2177f8(0x19d),'GRSCa':_0x2177f8(0x205),'iZxnQ':'proxied','akIhe':function(_0x516fa1,_0x36e48f){return _0x516fa1===_0x36e48f;}},_0x3fe59a=await fetch(_0x25077,{'method':_0x1bbee2[_0x2177f8(0x208)],'headers':{'Content-Type':_0x1bbee2['exkWA'],'Accept':_0x2177f8(0x1e6)},'body':JSON['stringify']({'jsonrpc':_0x1bbee2['ebSSt'],'id':0x1,'method':'initialize','params':{'protocolVersion':_0x2177f8(0x1ee),'capabilities':{},'clientInfo':{'name':_0x1bbee2[_0x2177f8(0x1a5)],'version':_0x1bbee2['GRSCa']}}})});if(_0x3fe59a['ok'])return await _0x3fe59a[_0x2177f8(0x1d0)](),_0x1bbee2[_0x2177f8(0x20a)];if(_0x1bbee2[_0x2177f8(0x1b3)](_0x3fe59a[_0x2177f8(0x1b2)],0x191))return await _0x3fe59a['text'](),_0x2177f8(0x1fd);const _0x39a34a=await _0x3fe59a[_0x2177f8(0x1d0)]();throw new Error(_0x2177f8(0x1c2)+_0x3fe59a['status']+':\x20'+_0x39a34a);}class OAuthTimeoutError extends Error{constructor(_0x23a8c5){const _0xdf5526=_0x46302a,_0x5e50d6={'NNdKJ':_0xdf5526(0x1fb)};super(_0x23a8c5),this['name']=_0x5e50d6['NNdKJ'];}}async function oauthFlow(_0x338e1e){const _0x27e007=_0x46302a,_0x3dbdaa={'jHXzU':function(_0x3c2723,_0x4f9fff){return _0x3c2723(_0x4f9fff);}};try{return await _0x3dbdaa[_0x27e007(0x1a2)](oauthFlowAttempt,_0x338e1e);}catch(_0x50429d){if(_0x50429d instanceof OAuthTimeoutError&&await loadCachedClient())return console[_0x27e007(0x18b)]('\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a'),await clearCachedClient(),await oauthFlowAttempt(_0x338e1e);throw _0x50429d;}}async function oauthFlowAttempt(_0x2fc1f0){const _0x11cb81=_0x46302a,_0x15ffdd={'CKXnP':_0x11cb81(0x1ef),'IHGZL':'Registering\x20OAuth\x20client...','mpLlz':function(_0x2152c3,_0x74bd36,_0x539958){return _0x2152c3(_0x74bd36,_0x539958);},'VqofJ':_0x11cb81(0x1e0),'dpjHy':_0x11cb81(0x1bb),'cSsZn':'none','EbwxF':_0x11cb81(0x1f6),'mtvno':function(_0x10f147,_0x22439b){return _0x10f147(_0x22439b);},'yxHzc':'base64url','gWpYG':'hex','yvIBA':'code','zxksB':'client_id','DSZsD':_0x11cb81(0x1a3),'VLRlS':_0x11cb81(0x186),'GQoyY':'Exchanging\x20authorization\x20code...'},_0x9e0e01=_0x2fc1f0['replace'](/\/mcp$/,'');process[_0x11cb81(0x1fa)]['write']('Discovering\x20authorization\x20server...');const _0x2ea4f4=await fetch(_0x9e0e01+_0x11cb81(0x1b4));if(!_0x2ea4f4['ok'])throw new Error(_0x15ffdd[_0x11cb81(0x17d)]);const _0x5df878=await _0x2ea4f4[_0x11cb81(0x1e7)](),_0x5b93af=_0x5df878[_0x11cb81(0x183)]?.[0x0];if(!_0x5b93af)throw new Error('No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata');console['log']('\x20'+_0x5b93af);const _0xad1211=await fetchAuthServerMetadata(_0x5b93af);let _0x141e2c,_0x4cf617;const _0xd9f43d=await loadCachedClient();if(_0xd9f43d)_0x141e2c=_0xd9f43d[_0x11cb81(0x201)],_0x4cf617=_0xd9f43d[_0x11cb81(0x184)];else{if(_0xad1211['registration_endpoint']){process['stdout']['write'](_0x15ffdd[_0x11cb81(0x1ed)]);const _0x4e3bc3=await _0x15ffdd[_0x11cb81(0x213)](fetch,_0xad1211[_0x11cb81(0x1cb)],{'method':_0x15ffdd['VqofJ'],'headers':{'Content-Type':'application/json'},'body':JSON['stringify']({'client_name':_0x11cb81(0x20c),'redirect_uris':[_0x11cb81(0x1ac)+CALLBACK_PORT+'/callback'],'grant_types':[_0x15ffdd[_0x11cb81(0x195)],_0x11cb81(0x1a4)],'response_types':[_0x11cb81(0x1a7)],'token_endpoint_auth_method':_0x15ffdd[_0x11cb81(0x192)]})});if(!_0x4e3bc3['ok']){const _0x5cb0cf=await _0x4e3bc3[_0x11cb81(0x1d0)]();throw new Error('Client\x20registration\x20failed:\x20'+_0x5cb0cf);}const _0x28b0d4=await _0x4e3bc3[_0x11cb81(0x1e7)]();_0x141e2c=_0x28b0d4['client_id'],_0x4cf617=_0x28b0d4['client_secret'],await _0x15ffdd[_0x11cb81(0x213)](saveCachedClient,_0x141e2c,_0x4cf617),console[_0x11cb81(0x18b)](_0x11cb81(0x189));}else throw new Error(_0x15ffdd[_0x11cb81(0x1d5)]);}const _0x38fe39=_0x15ffdd['mtvno'](randomBytes,0x20)['toString'](_0x15ffdd['yxHzc']),_0x48ed0f=createHash('sha256')[_0x11cb81(0x1aa)](_0x38fe39)[_0x11cb81(0x180)](_0x15ffdd['yxHzc']),_0x21628a=randomBytes(0x10)[_0x11cb81(0x207)](_0x15ffdd['gWpYG']),_0x508d50=new URL(_0xad1211[_0x11cb81(0x206)]);_0x508d50[_0x11cb81(0x1f7)]['set'](_0x11cb81(0x20b),_0x15ffdd[_0x11cb81(0x1c9)]),_0x508d50['searchParams'][_0x11cb81(0x1d2)](_0x15ffdd[_0x11cb81(0x1f3)],_0x141e2c),_0x508d50['searchParams']['set']('redirect_uri',_0x11cb81(0x1ac)+CALLBACK_PORT+'/callback'),_0x508d50['searchParams']['set'](_0x11cb81(0x1dc),_0x48ed0f),_0x508d50['searchParams']['set'](_0x15ffdd['DSZsD'],_0x15ffdd[_0x11cb81(0x1d4)]),_0x508d50['searchParams'][_0x11cb81(0x1d2)]('state',_0x21628a);_0x5df878['resource']&&_0x508d50['searchParams']['set']('resource',_0x5df878[_0x11cb81(0x1de)]);console[_0x11cb81(0x18b)]('\x0aOpening\x20browser\x20for\x20authentication...'),console[_0x11cb81(0x18b)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a'+_0x508d50[_0x11cb81(0x207)]()+'\x0a'),await openBrowser(_0x508d50['toString']());const _0x5a7310=await waitForCallback(_0x21628a);process['stdout']['write'](_0x15ffdd['GQoyY']);const _0x28b3b6=new URLSearchParams({'grant_type':_0x11cb81(0x1bb),'code':_0x5a7310,'redirect_uri':_0x11cb81(0x1ac)+CALLBACK_PORT+'/callback','client_id':_0x141e2c,'code_verifier':_0x38fe39});_0x4cf617&&_0x28b3b6[_0x11cb81(0x1d2)]('client_secret',_0x4cf617);_0x5df878['resource']&&_0x28b3b6['set'](_0x11cb81(0x1de),_0x5df878['resource']);const _0x277861=await fetch(_0xad1211['token_endpoint'],{'method':'POST','headers':{'Content-Type':_0x11cb81(0x197)},'body':_0x28b3b6});if(!_0x277861['ok']){const _0x12280a=await _0x277861['text']();throw new Error('Token\x20exchange\x20failed:\x20'+_0x12280a);}const _0x520890=await _0x277861['json']();return console['log'](_0x11cb81(0x189)),await saveCachedToken(_0x520890['access_token'],_0x520890['refresh_token'],_0x520890[_0x11cb81(0x18e)]),_0x520890[_0x11cb81(0x1ba)];}async function callGetCliToken(_0x4687d9,_0x24f9ec){const _0x3e12d8=_0x46302a,_0x515433={'yMFmY':function(_0x2b77b9,_0x5284c1){return _0x2b77b9(_0x5284c1);},'AvPoe':_0x3e12d8(0x1b6),'pnMfu':_0x3e12d8(0x1e6),'nUqhv':'Initializing\x20MCP\x20session...','YeRKW':function(_0x170117,_0x21a3ac){return _0x170117(_0x21a3ac);},'lnJrx':_0x3e12d8(0x19f),'bsCDt':'ranger-cli','tiHtV':'1.0.0','iGBeL':'\x20done','UBKQN':_0x3e12d8(0x204),'drnDS':function(_0x2a37e6,_0x82f3bb){return _0x2a37e6(_0x82f3bb);},'kAOMG':'tools/call','UfSSy':function(_0x4dfd00,_0x4aef85){return _0x4dfd00(_0x4aef85);},'rUXEl':function(_0x3ab012){return _0x3ab012();},'tdlpd':_0x3e12d8(0x19c),'KDfcL':function(_0x133ff7,_0x20e64f,_0x3b31c8){return _0x133ff7(_0x20e64f,_0x3b31c8);},'DwBhf':function(_0xd68768,_0x362fe4,_0x4bd0a6,_0xea5e5){return _0xd68768(_0x362fe4,_0x4bd0a6,_0xea5e5);},'wHGdm':'Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a'},_0x3d4cf8={'Content-Type':_0x515433['AvPoe'],'Accept':_0x515433['pnMfu']};_0x24f9ec&&(_0x3d4cf8[_0x3e12d8(0x1fc)]='Bearer\x20'+_0x24f9ec);const _0x2de054=async _0x167c38=>{const _0x18c7a3=_0x3e12d8,_0x3ae26c=await fetch(_0x4687d9,{'method':_0x18c7a3(0x1e0),'headers':_0x3d4cf8,'body':JSON['stringify'](_0x167c38)});if(!_0x3ae26c['ok']){const _0x3cbd56=await _0x3ae26c[_0x18c7a3(0x1d0)]();throw new Error(_0x18c7a3(0x1e3)+_0x3ae26c['status']+':\x20'+_0x3cbd56);}return _0x515433['yMFmY'](parseResponse,_0x3ae26c);};process['stdout']['write'](_0x515433[_0x3e12d8(0x1a6)]);const _0x277f2b=await _0x515433['YeRKW'](_0x2de054,{'jsonrpc':_0x515433[_0x3e12d8(0x1e8)],'id':0x1,'method':'initialize','params':{'protocolVersion':_0x3e12d8(0x1ee),'capabilities':{},'clientInfo':{'name':_0x515433['bsCDt'],'version':_0x515433['tiHtV']}}});if(_0x277f2b['error'])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x277f2b['error'][_0x3e12d8(0x1a9)]??JSON['stringify'](_0x277f2b[_0x3e12d8(0x1d6)])));console['log'](_0x515433[_0x3e12d8(0x1c0)]),await fetch(_0x4687d9,{'method':'POST','headers':_0x3d4cf8,'body':JSON['stringify']({'jsonrpc':_0x3e12d8(0x19f),'method':'notifications/initialized'})})['then'](_0x38df34=>_0x38df34['text']()),process['stdout']['write'](_0x515433['UBKQN']);const _0x1cab66=await _0x515433['drnDS'](_0x2de054,{'jsonrpc':_0x3e12d8(0x19f),'id':0x2,'method':_0x515433[_0x3e12d8(0x17a)],'params':{'name':'get_cli_token','arguments':{}}});if(_0x1cab66[_0x3e12d8(0x1d6)])throw new Error('get_cli_token\x20failed:\x20'+(_0x1cab66['error'][_0x3e12d8(0x1a9)]??JSON['stringify'](_0x1cab66[_0x3e12d8(0x1d6)])));console['log'](_0x3e12d8(0x189));const _0x557be0=_0x515433[_0x3e12d8(0x1c1)](extractToken,_0x1cab66['result']);if(!_0x557be0){console['error']('\x0aUnexpected\x20response\x20structure:'),console[_0x3e12d8(0x1d6)](JSON['stringify'](_0x1cab66['result'],null,0x2));throw new Error(_0x3e12d8(0x1b8));}const _0x438574=join(_0x515433['rUXEl'](homedir),_0x515433[_0x3e12d8(0x18c)]),_0x482db9=_0x515433[_0x3e12d8(0x1c8)](join,_0x438574,'refresh.txt');await mkdir(_0x438574,{'recursive':!![]}),await writeFile(_0x482db9,_0x557be0,{'mode':0x180}),await _0x515433[_0x3e12d8(0x188)](writeFile,join(_0x438574,_0x3e12d8(0x1e4)),_0x4687d9,{'mode':0x180}),console['log']('\x0aToken\x20written\x20to\x20'+_0x482db9),console['log'](_0x515433[_0x3e12d8(0x20e)]);}async function fetchAuthServerMetadata(_0xed2a17){const _0x57258b=_0x46302a,_0x23bbcd={'pYwXj':function(_0x18cbae,_0x21b382){return _0x18cbae(_0x21b382);}},_0x3f4a02=_0xed2a17+_0x57258b(0x211),_0x34761b=await _0x23bbcd[_0x57258b(0x199)](fetch,_0x3f4a02);if(!_0x34761b['ok'])throw new Error(_0x57258b(0x1e5)+_0x3f4a02+':\x20'+_0x34761b['status']);return _0x34761b['json']();}function waitForCallback(_0x46d8c1){const _0x423db7=_0x46302a,_0x320946={'qXqZj':function(_0x583af5,_0x1488fb){return _0x583af5(_0x1488fb);},'bwgKK':function(_0x4c17d6,_0x221056){return _0x4c17d6!==_0x221056;},'Bxmel':_0x423db7(0x1cc),'eUCRz':'error_description','dpwMZ':function(_0x1be8c8,_0x309322){return _0x1be8c8(_0x309322);},'omFyQ':_0x423db7(0x1d9),'ZpEFx':_0x423db7(0x18f)};return new Promise((_0x4bbae9,_0x1679e9)=>{const _0x379fd8=_0x423db7,_0x48aa4a={'sFKBF':function(_0x1e358e,_0x18c9d5){const _0x4b78c3=_0x37e1;return _0x320946[_0x4b78c3(0x1cf)](_0x1e358e,_0x18c9d5);},'uGBUu':_0x379fd8(0x17f),'zNgcK':_0x320946[_0x379fd8(0x1f2)],'OMpxJ':_0x320946[_0x379fd8(0x185)],'lHmaR':function(_0x4d5438,_0x5ef64d){return _0x320946['dpwMZ'](_0x4d5438,_0x5ef64d);},'dHrED':function(_0x2464a5,_0x3344d3){return _0x2464a5(_0x3344d3);},'ALYaZ':_0x320946[_0x379fd8(0x1ce)],'zjHlr':_0x320946[_0x379fd8(0x1ff)]},_0x225a98=setTimeout(()=>{const _0x4935df=_0x379fd8;_0x522b2a['close'](),_0x320946['qXqZj'](_0x1679e9,new OAuthTimeoutError(_0x4935df(0x1c7)));},0x1d4c0),_0x522b2a=_0x320946['qXqZj'](createServer,(_0x1d8428,_0x272d58)=>{const _0x50e8db=_0x379fd8,_0x22f52f=new URL(_0x1d8428[_0x50e8db(0x1d7)]??'/','http://localhost:'+CALLBACK_PORT);if(_0x48aa4a[_0x50e8db(0x1be)](_0x22f52f[_0x50e8db(0x1f5)],_0x48aa4a[_0x50e8db(0x1c6)])){_0x272d58['writeHead'](0x194),_0x272d58[_0x50e8db(0x187)](_0x50e8db(0x209));return;}const _0x47b75a=_0x22f52f['searchParams'][_0x50e8db(0x1dd)]('code'),_0x59ffa9=_0x22f52f[_0x50e8db(0x1f7)]['get'](_0x48aa4a[_0x50e8db(0x212)]),_0x243c53=_0x22f52f['searchParams']['get'](_0x50e8db(0x1d6));if(_0x243c53){const _0x483882=_0x22f52f['searchParams']['get'](_0x48aa4a['OMpxJ'])??_0x243c53;_0x272d58[_0x50e8db(0x1e1)](0xc8,{'Content-Type':_0x50e8db(0x1d9)}),_0x272d58[_0x50e8db(0x187)](_0x50e8db(0x1cd)+_0x483882+_0x50e8db(0x18a)),_0x48aa4a['lHmaR'](clearTimeout,_0x225a98),_0x522b2a[_0x50e8db(0x1ec)](),_0x48aa4a[_0x50e8db(0x19b)](_0x1679e9,new Error('OAuth\x20error:\x20'+_0x483882));return;}if(!_0x47b75a||_0x48aa4a['sFKBF'](_0x59ffa9,_0x46d8c1)){_0x272d58[_0x50e8db(0x1e1)](0x190,{'Content-Type':_0x48aa4a['ALYaZ']}),_0x272d58['end']('<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>');return;}_0x272d58['writeHead'](0xc8,{'Content-Type':_0x50e8db(0x1d9)}),_0x272d58['end'](_0x48aa4a['zjHlr']),clearTimeout(_0x225a98),_0x522b2a[_0x50e8db(0x1ec)](),_0x48aa4a[_0x50e8db(0x19b)](_0x4bbae9,_0x47b75a);});_0x522b2a[_0x379fd8(0x1bf)](CALLBACK_PORT,'127.0.0.1');});}async function openBrowser(_0x25c38e){const _0x5db714=_0x46302a,_0x231dcb={'ScXpa':_0x5db714(0x1f8),'EpTdI':function(_0x3902ab,_0xb8a298){return _0x3902ab===_0xb8a298;}},{exec:_0x541180}=await import(_0x5db714(0x1c5)),_0x4990b3=process['platform']===_0x5db714(0x1df)?_0x231dcb[_0x5db714(0x1a8)]:_0x231dcb[_0x5db714(0x198)](process['platform'],_0x5db714(0x1af))?_0x5db714(0x191):'xdg-open';_0x541180(_0x4990b3+'\x20\x22'+_0x25c38e+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x563ae2=_0x46302a,_0x53a0d5={'JHwHt':function(_0x675fac,_0x171782,_0x2a150f){return _0x675fac(_0x171782,_0x2a150f);}};try{const _0x1e3256=JSON['parse'](await _0x53a0d5['JHwHt'](readFile,TOKEN_CACHE_PATH,'utf-8'));if(_0x1e3256[_0x563ae2(0x20d)]&&_0x1e3256[_0x563ae2(0x20d)]!==currentOrigin)return null;if(_0x1e3256[_0x563ae2(0x1a1)]&&Date[_0x563ae2(0x1d1)]()>_0x1e3256['expiresAt'])return null;return _0x1e3256[_0x563ae2(0x194)]??null;}catch{return null;}}async function saveCachedToken(_0x4fec14,_0x1b175f,_0x2b726a){const _0x5291c5=_0x46302a,_0x43eab0={'QmHuN':function(_0x2041b8){return _0x2041b8();},'eKKgg':function(_0x2b865c,_0x4b7d8c){return _0x2b865c*_0x4b7d8c;},'aaBWJ':function(_0x23a7ab,_0x904aa1,_0x3ebb06){return _0x23a7ab(_0x904aa1,_0x3ebb06);},'QDcGu':'.ranger','EyMhf':function(_0x25b4d,_0x514239,_0x397adc,_0x1e099c){return _0x25b4d(_0x514239,_0x397adc,_0x1e099c);}},_0x28c240=await _0x43eab0[_0x5291c5(0x20f)](loadCachedData),_0x483906={..._0x28c240,'origin':currentOrigin,'accessToken':_0x4fec14,'refreshToken':_0x1b175f??_0x28c240?.[_0x5291c5(0x1e2)],'expiresAt':_0x2b726a?Date[_0x5291c5(0x1d1)]()+_0x43eab0[_0x5291c5(0x1d3)](_0x2b726a,0x3e8):undefined};await mkdir(_0x43eab0[_0x5291c5(0x1f0)](join,homedir(),_0x43eab0['QDcGu']),{'recursive':!![]}),await _0x43eab0[_0x5291c5(0x1ae)](writeFile,TOKEN_CACHE_PATH,JSON[_0x5291c5(0x1d8)](_0x483906),{'mode':0x180});}async function loadCachedClient(){const _0xdf24d0=_0x46302a,_0xba69c7=await loadCachedData();if(_0xba69c7?.[_0xdf24d0(0x20d)]&&_0xba69c7[_0xdf24d0(0x20d)]!==currentOrigin)return null;return _0xba69c7?.[_0xdf24d0(0x201)]?{'clientId':_0xba69c7['clientId'],'clientSecret':_0xba69c7['clientSecret']}:null;}async function clearCachedClient(){const _0x52f6c2=_0x46302a,_0x28514a={'cxNtZ':function(_0x2d8849,_0x4833b6,_0x344193,_0x3c8ed0){return _0x2d8849(_0x4833b6,_0x344193,_0x3c8ed0);}},_0x1fefa6=await loadCachedData();if(!_0x1fefa6)return;const {clientId:_0x5413bc,clientSecret:_0x574c01,..._0x133c0d}=_0x1fefa6;await _0x28514a[_0x52f6c2(0x1b0)](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x133c0d),{'mode':0x180});}async function saveCachedClient(_0x340a65,_0x466b49){const _0x33fe7c=_0x46302a,_0x44f5d6={'FZSfN':function(_0x2dcb2d,_0x11588c,_0x1d9311){return _0x2dcb2d(_0x11588c,_0x1d9311);},'jLtzt':_0x33fe7c(0x19c),'gnqYX':function(_0x5efc60,_0x58a9d9,_0x5be6e0,_0x39000c){return _0x5efc60(_0x58a9d9,_0x5be6e0,_0x39000c);}},_0x43bdc3=await loadCachedData(),_0x195147={..._0x43bdc3,'origin':currentOrigin,'accessToken':_0x43bdc3?.[_0x33fe7c(0x194)]??'','clientId':_0x340a65,'clientSecret':_0x466b49};await _0x44f5d6[_0x33fe7c(0x1b9)](mkdir,join(homedir(),_0x44f5d6[_0x33fe7c(0x1c4)]),{'recursive':!![]}),await _0x44f5d6[_0x33fe7c(0x1b1)](writeFile,TOKEN_CACHE_PATH,JSON[_0x33fe7c(0x1d8)](_0x195147),{'mode':0x180});}async function loadCachedData(){const _0x19ceb1=_0x46302a,_0x363502={'SAVuV':function(_0x23f048,_0x4dcbb5,_0x33c71a){return _0x23f048(_0x4dcbb5,_0x33c71a);},'vhmXX':'utf-8'};try{return JSON['parse'](await _0x363502['SAVuV'](readFile,TOKEN_CACHE_PATH,_0x363502[_0x19ceb1(0x200)]));}catch{return null;}}async function parseResponse(_0x2c3375){const _0x441bd7=_0x46302a,_0x1ff895={'QOPFv':'content-type','NbBBx':'data:','AiQeo':function(_0x99cc2c,_0x43fdb6){return _0x99cc2c!==_0x43fdb6;},'qdArK':'No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream'},_0x338a8f=_0x2c3375[_0x441bd7(0x1ea)][_0x441bd7(0x1dd)](_0x1ff895['QOPFv'])??'';if(_0x338a8f[_0x441bd7(0x17c)](_0x441bd7(0x182))){const _0x572a96=await _0x2c3375[_0x441bd7(0x1d0)]();for(const _0x5adcb0 of _0x572a96['split']('\x0a')){const _0x51f180=_0x5adcb0['trim']();if(_0x51f180['startsWith'](_0x1ff895['NbBBx'])){const _0x2decaa=_0x51f180['slice'](_0x1ff895[_0x441bd7(0x1f4)]['length'])['trim']();if(!_0x2decaa)continue;try{const _0x59450f=JSON[_0x441bd7(0x1bc)](_0x2decaa);if(_0x1ff895['AiQeo'](_0x59450f['id'],undefined)||_0x59450f['error'])return _0x59450f;}catch{}}}throw new Error(_0x1ff895[_0x441bd7(0x193)]);}return _0x2c3375['json']();}function extractToken(_0xa98c04){const _0x5ab2b7=_0x46302a,_0x3715b9={'tfHML':function(_0xda82d5,_0x320050){return _0xda82d5===_0x320050;},'haFjz':'text','oBKUV':_0x5ab2b7(0x202)};if(!_0xa98c04)return null;const _0x55443c=_0xa98c04['structuredContent'];if(_0x55443c?.[_0x5ab2b7(0x190)]&&_0x3715b9['tfHML'](typeof _0x55443c[_0x5ab2b7(0x190)],'string'))return _0x55443c[_0x5ab2b7(0x190)];if(_0xa98c04['isError']){const _0x26614c=_0xa98c04[_0x5ab2b7(0x203)];throw new Error('Server\x20returned\x20error:\x20'+(_0x26614c?.[0x0]?.['text']??'Unknown\x20error'));}const _0x16b679=_0xa98c04[_0x5ab2b7(0x203)];if(_0x16b679)for(const _0x2a1b7d of _0x16b679){if(_0x3715b9['tfHML'](_0x2a1b7d[_0x5ab2b7(0x17e)],_0x3715b9[_0x5ab2b7(0x181)])&&_0x2a1b7d[_0x5ab2b7(0x1d0)]){try{const _0x1c3d16=JSON[_0x5ab2b7(0x1bc)](_0x2a1b7d[_0x5ab2b7(0x1d0)]);if(typeof _0x1c3d16?.['token']===_0x3715b9['oBKUV'])return _0x1c3d16[_0x5ab2b7(0x190)];}catch{}const _0x4bb659=_0x2a1b7d['text'][_0x5ab2b7(0x210)](/(rngr_[A-Za-z0-9_-]+)/);if(_0x4bb659)return _0x4bb659[0x1];}}return null;}
1
+ const _0x400ccc=_0x114e;(function(_0x1a85f5,_0xa391b1){const _0x484d93=_0x114e,_0x8ca015=_0x1a85f5();while(!![]){try{const _0x22445d=-parseInt(_0x484d93(0xdb))/0x1+parseInt(_0x484d93(0x140))/0x2+parseInt(_0x484d93(0x10b))/0x3*(parseInt(_0x484d93(0x11b))/0x4)+parseInt(_0x484d93(0x124))/0x5*(-parseInt(_0x484d93(0x117))/0x6)+parseInt(_0x484d93(0x11f))/0x7*(-parseInt(_0x484d93(0xef))/0x8)+parseInt(_0x484d93(0xd0))/0x9+parseInt(_0x484d93(0x105))/0xa*(parseInt(_0x484d93(0xbe))/0xb);if(_0x22445d===_0xa391b1)break;else _0x8ca015['push'](_0x8ca015['shift']());}catch(_0xffdbd5){_0x8ca015['push'](_0x8ca015['shift']());}}}(_0x4135,0x63852));import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';import{homedir}from'os';function _0x4135(){const _0x20eb89=['bRjeF','WQRIG','583cKYBps','FlcJB','accessToken','slice','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','end','cYnhw','vEtbN','close','writeHead','PNQSs','127.0.0.1','MspSs','EGVwn','CwMbv','application/json','Discovering\x20authorization\x20server...','client_id','158364PbCelA','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','type','result','POST','.ranger','QGgKn','Client\x20registration\x20failed:\x20','TVDup','utf-8','stringify','774865pGzHce','resource','then','registration_endpoint','eIbGs','1.0.0','RzlWE','MCP\x20initialize\x20failed:\x20','rGkim','token','text','KIfZf','access_token','text/event-stream','ytKHo','isError','searchParams','tools/call','status','jJGoh','102920sWKcNF','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','content','clientId','startsWith','cEOCO','nGOae','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','uNPBR','now','client_secret','error','dLjri','eQSPo','Exchanging\x20authorization\x20code...','NoUxV','BjMDi','GPcLO','<html><body><h2>Authentication\x20failed</h2><p>','application/json,\x20text/event-stream','get','message','175050aMHnuH','clientSecret','HTTP\x20','notifications/initialized','\x0aToken\x20written\x20to\x20','write','3489wIHosc','zSAfn','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','ZQnIC','url','WXKUP','code','set','http://localhost:','ranger-cli','redirect_uri','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','6tkJxMb','refreshToken','pathname','ZuYQK','2108PHfkEC','oszUk','Bearer\x20','ZSabB','133HGobtD','refresh.txt','replace','initialize','update','2497535HkuJWC','OAuth\x20error:\x20','Token\x20exchange\x20failed:\x20','mcp-oauth-tokens.json','Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','PgAcU','iSGuy','state','structuredContent','stdout','platform','/.well-known/oauth-protected-resource','log','kgLbc','open','YJZDL','application/x-www-form-urlencoded','nGCtH','oGRUV','listen','hOJNZ','expires_in','json','get_cli_token\x20failed:\x20','2025-03-26','auth-origin.txt','trim','2.0','736358afIiPL','uAayy','pCMrI','parse','KYRyt','VeUkC','oprqC','\x20done','MCP\x20server\x20returned\x20HTTP\x20','isThZ','origin','/callback','eMZBT','JUJLz','name','cWeMA','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','ofJiH','Requesting\x20CLI\x20token...','yljsZ','HKSGH'];_0x4135=function(){return _0x20eb89;};return _0x4135();}import{createServer}from'http';import{randomBytes,createHash}from'crypto';import{getMcpAuthUrl}from'./utils/environment.js';const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),_0x400ccc(0xd5),_0x400ccc(0x127)),AUTH_ORIGIN_PATH=join(homedir(),_0x400ccc(0xd5),_0x400ccc(0x13d));export async function getMcpAuthOrigin(){const _0x14a904=_0x400ccc;try{const _0x95070=(await readFile(AUTH_ORIGIN_PATH,_0x14a904(0xd9)))[_0x14a904(0x13e)]();return _0x95070||null;}catch{return null;}}export async function mcpBootstrap(){const _0x8ad7c7=_0x400ccc,_0x4f2494={'UtTYo':function(_0x526200,_0x543042){return _0x526200(_0x543042);},'ypQCS':function(_0xfc6dc7,_0x20ab3a){return _0xfc6dc7===_0x20ab3a;},'PgAcU':function(_0x285ccc){return _0x285ccc();},'MspSs':'MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a'},_0x431fd2=getMcpAuthUrl();currentOrigin=_0x431fd2;const _0x2ef342=process['stdout']['isTTY']??![];console['log']('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x431fd2+'\x0a');const _0x258cc7=await _0x4f2494['UtTYo'](tryUnauthenticated,_0x431fd2);let _0x39f3c2=null;if(_0x4f2494['ypQCS'](_0x258cc7,'proxied'))_0x39f3c2='';else{_0x39f3c2=await _0x4f2494[_0x8ad7c7(0x129)](loadCachedToken);if(!_0x39f3c2){if(!_0x2ef342)throw new Error(_0x4f2494[_0x8ad7c7(0xca)]+_0x8ad7c7(0x116));_0x39f3c2=await oauthFlow(_0x431fd2);}}await callGetCliToken(_0x431fd2,_0x39f3c2);}async function tryUnauthenticated(_0x3a274a){const _0x1341ab=_0x400ccc,_0x36325b={'nGOae':function(_0x135b7c,_0x5534ea,_0x456f29){return _0x135b7c(_0x5534ea,_0x456f29);},'uAayy':_0x1341ab(0xcd),'jqGfc':_0x1341ab(0x102),'dIMxU':_0x1341ab(0x122),'oszUk':_0x1341ab(0x13c),'ilvqG':_0x1341ab(0x114),'ZYryP':_0x1341ab(0xe0),'ZuYQK':'proxied','qrETO':function(_0x40c4d6,_0x556760){return _0x40c4d6===_0x556760;}},_0x479364=await _0x36325b[_0x1341ab(0xf5)](fetch,_0x3a274a,{'method':'POST','headers':{'Content-Type':_0x36325b[_0x1341ab(0x141)],'Accept':_0x36325b['jqGfc']},'body':JSON['stringify']({'jsonrpc':'2.0','id':0x1,'method':_0x36325b['dIMxU'],'params':{'protocolVersion':_0x36325b[_0x1341ab(0x11c)],'capabilities':{},'clientInfo':{'name':_0x36325b['ilvqG'],'version':_0x36325b['ZYryP']}}})});if(_0x479364['ok'])return await _0x479364[_0x1341ab(0xe5)](),_0x36325b[_0x1341ab(0x11a)];if(_0x36325b['qrETO'](_0x479364['status'],0x191))return await _0x479364['text'](),'needs-oauth';const _0x4eec23=await _0x479364['text']();throw new Error(_0x1341ab(0x148)+_0x479364[_0x1341ab(0xed)]+':\x20'+_0x4eec23);}class OAuthTimeoutError extends Error{constructor(_0x444dcf){const _0x2091d1=_0x400ccc,_0x467267={'PNQSs':'OAuthTimeoutError'};super(_0x444dcf),this[_0x2091d1(0xb5)]=_0x467267[_0x2091d1(0xc8)];}}async function oauthFlow(_0x351b46){const _0x37c7d3=_0x400ccc,_0x21a8b3={'RtVIb':function(_0x226d26,_0x569a66){return _0x226d26(_0x569a66);},'qpfmA':function(_0x4bc4af,_0xb2e510){return _0x4bc4af instanceof _0xb2e510;},'uNPBR':'\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','ofJiH':function(_0x4eb35b){return _0x4eb35b();}};try{return await _0x21a8b3['RtVIb'](oauthFlowAttempt,_0x351b46);}catch(_0x278eb2){if(_0x21a8b3['qpfmA'](_0x278eb2,OAuthTimeoutError)&&await loadCachedClient())return console['log'](_0x21a8b3[_0x37c7d3(0xf7)]),await _0x21a8b3[_0x37c7d3(0xb8)](clearCachedClient),await oauthFlowAttempt(_0x351b46);throw _0x278eb2;}}async function oauthFlowAttempt(_0x291b3a){const _0x3fb818=_0x400ccc,_0x3ca172={'kgLbc':function(_0x2d1851,_0xb0abc1){return _0x2d1851(_0xb0abc1);},'pMtyn':function(_0xb75901,_0x4efc3d,_0x2ebf1d){return _0xb75901(_0x4efc3d,_0x2ebf1d);},'TVDup':_0x3fb818(0xd4),'QGgKn':_0x3fb818(0xcd),'TJrkp':'authorization_code','isThZ':_0x3fb818(0x111),'LhCUZ':_0x3fb818(0x147),'KmTKk':_0x3fb818(0xc2),'bRjeF':'base64url','vEtbN':'sha256','gecRe':function(_0x4b13d6,_0x3d97f9){return _0x4b13d6(_0x3d97f9);},'JUJLz':'code_challenge','eQSPo':'code_challenge_method','RrLNu':'S256','VeUkC':'resource','LzWTj':'\x0aOpening\x20browser\x20for\x20authentication...','KQWRk':_0x3fb818(0xfd),'WBYFM':'client_secret','iSGuy':_0x3fb818(0x134)},_0x4944d0=_0x291b3a[_0x3fb818(0x121)](/\/mcp$/,'');process[_0x3fb818(0x12d)][_0x3fb818(0x10a)](_0x3fb818(0xce));const _0x1c084f=await _0x3ca172[_0x3fb818(0x131)](fetch,_0x4944d0+_0x3fb818(0x12f));if(!_0x1c084f['ok'])throw new Error(_0x3fb818(0x128));const _0x47e0e4=await _0x1c084f['json'](),_0x3e6a6e=_0x47e0e4['authorization_servers']?.[0x0];if(!_0x3e6a6e)throw new Error('No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata');console['log']('\x20'+_0x3e6a6e);const _0x4fa9a6=await fetchAuthServerMetadata(_0x3e6a6e);let _0x2599df,_0x387c57;const _0x44555c=await loadCachedClient();if(_0x44555c)_0x2599df=_0x44555c['clientId'],_0x387c57=_0x44555c[_0x3fb818(0x106)];else{if(_0x4fa9a6['registration_endpoint']){process['stdout'][_0x3fb818(0x10a)]('Registering\x20OAuth\x20client...');const _0x466c1=await _0x3ca172['pMtyn'](fetch,_0x4fa9a6[_0x3fb818(0xde)],{'method':_0x3ca172[_0x3fb818(0xd8)],'headers':{'Content-Type':_0x3ca172[_0x3fb818(0xd6)]},'body':JSON[_0x3fb818(0xda)]({'client_name':'Ranger\x20CLI','redirect_uris':['http://localhost:'+CALLBACK_PORT+'/callback'],'grant_types':[_0x3ca172['TJrkp'],'refresh_token'],'response_types':[_0x3ca172[_0x3fb818(0x149)]],'token_endpoint_auth_method':'none'})});if(!_0x466c1['ok']){const _0x106881=await _0x466c1['text']();throw new Error(_0x3fb818(0xd7)+_0x106881);}const _0xe4944d=await _0x466c1['json']();_0x2599df=_0xe4944d[_0x3fb818(0xcf)],_0x387c57=_0xe4944d[_0x3fb818(0xf9)],await _0x3ca172['pMtyn'](saveCachedClient,_0x2599df,_0x387c57),console['log'](_0x3ca172['LhCUZ']);}else throw new Error(_0x3ca172['KmTKk']);}const _0x45f742=randomBytes(0x20)['toString'](_0x3ca172[_0x3fb818(0xbc)]),_0x24af44=createHash(_0x3ca172[_0x3fb818(0xc5)])[_0x3fb818(0x123)](_0x45f742)['digest']('base64url'),_0x49730c=_0x3ca172['gecRe'](randomBytes,0x10)['toString']('hex'),_0x28c261=new URL(_0x4fa9a6['authorization_endpoint']);_0x28c261[_0x3fb818(0xeb)]['set']('response_type',_0x3ca172['isThZ']),_0x28c261[_0x3fb818(0xeb)]['set'](_0x3fb818(0xcf),_0x2599df),_0x28c261[_0x3fb818(0xeb)][_0x3fb818(0x112)](_0x3fb818(0x115),_0x3fb818(0x113)+CALLBACK_PORT+_0x3fb818(0xb2)),_0x28c261['searchParams'][_0x3fb818(0x112)](_0x3ca172[_0x3fb818(0xb4)],_0x24af44),_0x28c261[_0x3fb818(0xeb)][_0x3fb818(0x112)](_0x3ca172[_0x3fb818(0xfc)],_0x3ca172['RrLNu']),_0x28c261['searchParams']['set'](_0x3fb818(0x12b),_0x49730c);_0x47e0e4[_0x3fb818(0xdc)]&&_0x28c261['searchParams']['set'](_0x3ca172['VeUkC'],_0x47e0e4[_0x3fb818(0xdc)]);console[_0x3fb818(0x130)](_0x3ca172['LzWTj']),console['log'](_0x3fb818(0xd1)+_0x28c261['toString']()+'\x0a'),await openBrowser(_0x28c261['toString']());const _0x6e6c43=await waitForCallback(_0x49730c);process[_0x3fb818(0x12d)][_0x3fb818(0x10a)](_0x3ca172['KQWRk']);const _0x2183e0=new URLSearchParams({'grant_type':_0x3ca172['TJrkp'],'code':_0x6e6c43,'redirect_uri':_0x3fb818(0x113)+CALLBACK_PORT+_0x3fb818(0xb2),'client_id':_0x2599df,'code_verifier':_0x45f742});_0x387c57&&_0x2183e0[_0x3fb818(0x112)](_0x3ca172['WBYFM'],_0x387c57);_0x47e0e4[_0x3fb818(0xdc)]&&_0x2183e0['set'](_0x3ca172[_0x3fb818(0x145)],_0x47e0e4['resource']);const _0x3fb7bb=await fetch(_0x4fa9a6['token_endpoint'],{'method':_0x3ca172['TVDup'],'headers':{'Content-Type':_0x3ca172[_0x3fb818(0x12a)]},'body':_0x2183e0});if(!_0x3fb7bb['ok']){const _0x569c9e=await _0x3fb7bb[_0x3fb818(0xe5)]();throw new Error(_0x3fb818(0x126)+_0x569c9e);}const _0x36c539=await _0x3fb7bb[_0x3fb818(0x13a)]();return console['log'](_0x3ca172['LhCUZ']),await saveCachedToken(_0x36c539[_0x3fb818(0xe7)],_0x36c539['refresh_token'],_0x36c539[_0x3fb818(0x139)]),_0x36c539[_0x3fb818(0xe7)];}async function callGetCliToken(_0x41c26b,_0x3f7002){const _0x25204e=_0x400ccc,_0x384640={'RWEwI':function(_0x2d857a,_0x2d8428,_0x33afd1){return _0x2d857a(_0x2d8428,_0x33afd1);},'IPVkb':function(_0x414e1e,_0x36f992){return _0x414e1e(_0x36f992);},'jJGoh':'Authorization','BjMDi':function(_0x39abac,_0x10ee93){return _0x39abac(_0x10ee93);},'ECfQW':'ranger-cli','Exosl':'1.0.0','cEOCO':_0x25204e(0x147),'MFXXn':function(_0x5682c7,_0x536025,_0x723e41){return _0x5682c7(_0x536025,_0x723e41);},'rOzxS':'2.0','eMZBT':_0x25204e(0xb9),'dLjri':_0x25204e(0xec),'KIfZf':'get_cli_token','ZSabB':function(_0x3f5da6){return _0x3f5da6();},'NoUxV':_0x25204e(0xd5),'GPcLO':function(_0x4dd6c5,_0x4c0342,_0x29668b){return _0x4dd6c5(_0x4c0342,_0x29668b);},'zSAfn':_0x25204e(0x120),'eIbGs':function(_0x2e4e1a,_0x5dad84,_0x2dea78){return _0x2e4e1a(_0x5dad84,_0x2dea78);},'ytKHo':function(_0x50dd62,_0x587543,_0x4b3741,_0x4c5255){return _0x50dd62(_0x587543,_0x4b3741,_0x4c5255);},'WxxnT':'Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a'},_0x91b093={'Content-Type':_0x25204e(0xcd),'Accept':'application/json,\x20text/event-stream'};_0x3f7002&&(_0x91b093[_0x384640[_0x25204e(0xee)]]=_0x25204e(0x11d)+_0x3f7002);const _0x13572c=async _0x3bc47a=>{const _0x122c3c=_0x25204e,_0x23235b=await _0x384640['RWEwI'](fetch,_0x41c26b,{'method':'POST','headers':_0x91b093,'body':JSON[_0x122c3c(0xda)](_0x3bc47a)});if(!_0x23235b['ok']){const _0x4d29cc=await _0x23235b['text']();throw new Error(_0x122c3c(0x107)+_0x23235b['status']+':\x20'+_0x4d29cc);}return _0x384640['IPVkb'](parseResponse,_0x23235b);};process[_0x25204e(0x12d)][_0x25204e(0x10a)]('Initializing\x20MCP\x20session...');const _0x2c7a10=await _0x384640[_0x25204e(0xff)](_0x13572c,{'jsonrpc':'2.0','id':0x1,'method':_0x25204e(0x122),'params':{'protocolVersion':_0x25204e(0x13c),'capabilities':{},'clientInfo':{'name':_0x384640['ECfQW'],'version':_0x384640['Exosl']}}});if(_0x2c7a10[_0x25204e(0xfa)])throw new Error(_0x25204e(0xe2)+(_0x2c7a10['error']['message']??JSON[_0x25204e(0xda)](_0x2c7a10['error'])));console[_0x25204e(0x130)](_0x384640[_0x25204e(0xf4)]),await _0x384640['MFXXn'](fetch,_0x41c26b,{'method':_0x25204e(0xd4),'headers':_0x91b093,'body':JSON[_0x25204e(0xda)]({'jsonrpc':_0x384640['rOzxS'],'method':_0x25204e(0x108)})})[_0x25204e(0xdd)](_0x149a20=>_0x149a20[_0x25204e(0xe5)]()),process['stdout']['write'](_0x384640[_0x25204e(0xb3)]);const _0x56ed90=await _0x13572c({'jsonrpc':_0x25204e(0x13f),'id':0x2,'method':_0x384640[_0x25204e(0xfb)],'params':{'name':_0x384640[_0x25204e(0xe6)],'arguments':{}}});if(_0x56ed90['error'])throw new Error(_0x25204e(0x13b)+(_0x56ed90['error'][_0x25204e(0x104)]??JSON['stringify'](_0x56ed90['error'])));console[_0x25204e(0x130)](_0x384640['cEOCO']);const _0x339280=extractToken(_0x56ed90[_0x25204e(0xd3)]);if(!_0x339280){console['error']('\x0aUnexpected\x20response\x20structure:'),console[_0x25204e(0xfa)](JSON['stringify'](_0x56ed90['result'],null,0x2));throw new Error(_0x25204e(0xf0));}const _0x5a9c43=join(_0x384640[_0x25204e(0x11e)](homedir),_0x384640[_0x25204e(0xfe)]),_0x4a5cb7=_0x384640[_0x25204e(0x100)](join,_0x5a9c43,_0x384640[_0x25204e(0x10c)]);await _0x384640[_0x25204e(0xdf)](mkdir,_0x5a9c43,{'recursive':!![]}),await _0x384640[_0x25204e(0xe9)](writeFile,_0x4a5cb7,_0x339280,{'mode':0x180}),await _0x384640[_0x25204e(0xe9)](writeFile,join(_0x5a9c43,'auth-origin.txt'),_0x41c26b,{'mode':0x180}),console[_0x25204e(0x130)](_0x25204e(0x109)+_0x4a5cb7),console[_0x25204e(0x130)](_0x384640['WxxnT']);}async function fetchAuthServerMetadata(_0x455cce){const _0x257314=_0x400ccc,_0x54a7d1={'yHqrW':function(_0x35b049,_0x53628a){return _0x35b049(_0x53628a);}},_0x54dcae=_0x455cce+'/.well-known/oauth-authorization-server',_0x258cec=await _0x54a7d1['yHqrW'](fetch,_0x54dcae);if(!_0x258cec['ok'])throw new Error(_0x257314(0xb7)+_0x54dcae+':\x20'+_0x258cec['status']);return _0x258cec[_0x257314(0x13a)]();}function waitForCallback(_0x4d1297){const _0x5b8da7=_0x400ccc,_0x12f5c4={'WXKUP':function(_0x4c4ad1,_0x221d77){return _0x4c4ad1(_0x221d77);},'uhkRR':function(_0x4acffa,_0x20fcbf){return _0x4acffa!==_0x20fcbf;},'VnYAo':_0x5b8da7(0x111),'WQRIG':'text/html','hPnPt':'<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','EGVwn':_0x5b8da7(0xc9)};return new Promise((_0x5e2eaf,_0x12b66f)=>{const _0x578ff7=_0x5b8da7,_0x255fc0={'JGZES':function(_0x1e54b9,_0x1026b1){return _0x12f5c4['WXKUP'](_0x1e54b9,_0x1026b1);},'YJZDL':_0x578ff7(0xf6),'tdsum':function(_0x36bce8,_0x375c84){return _0x12f5c4['uhkRR'](_0x36bce8,_0x375c84);},'RzlWE':_0x578ff7(0xb2),'oBIJS':'Not\x20found','WYfKT':_0x12f5c4['VnYAo'],'cYnhw':_0x578ff7(0xfa),'UVhMz':'error_description','oprqC':_0x12f5c4[_0x578ff7(0xbd)],'tEJQL':function(_0xe45bad,_0x1abc3c){return _0xe45bad(_0x1abc3c);},'pCMrI':function(_0x558055,_0x4a3d05){return _0x558055(_0x4a3d05);},'cGHTq':function(_0x1426ef,_0x16d4db){return _0x1426ef!==_0x16d4db;},'UxKMW':_0x12f5c4['hPnPt']},_0x1103b8=setTimeout(()=>{const _0x480936=_0x578ff7;_0x5d6616['close'](),_0x255fc0['JGZES'](_0x12b66f,new OAuthTimeoutError(_0x255fc0[_0x480936(0x133)]));},0x1d4c0),_0x5d6616=_0x12f5c4[_0x578ff7(0x110)](createServer,(_0x80bc39,_0x190690)=>{const _0x21f271=_0x578ff7,_0x2f1a22=new URL(_0x80bc39[_0x21f271(0x10f)]??'/','http://localhost:'+CALLBACK_PORT);if(_0x255fc0['tdsum'](_0x2f1a22[_0x21f271(0x119)],_0x255fc0[_0x21f271(0xe1)])){_0x190690[_0x21f271(0xc7)](0x194),_0x190690['end'](_0x255fc0['oBIJS']);return;}const _0x256e97=_0x2f1a22[_0x21f271(0xeb)][_0x21f271(0x103)](_0x255fc0['WYfKT']),_0x397bb5=_0x2f1a22['searchParams'][_0x21f271(0x103)]('state'),_0x4a39a9=_0x2f1a22['searchParams'][_0x21f271(0x103)](_0x255fc0[_0x21f271(0xc4)]);if(_0x4a39a9){const _0x1a5e75=_0x2f1a22['searchParams'][_0x21f271(0x103)](_0x255fc0['UVhMz'])??_0x4a39a9;_0x190690['writeHead'](0xc8,{'Content-Type':_0x255fc0['oprqC']}),_0x190690[_0x21f271(0xc3)](_0x21f271(0x101)+_0x1a5e75+_0x21f271(0x10d)),_0x255fc0['tEJQL'](clearTimeout,_0x1103b8),_0x5d6616[_0x21f271(0xc6)](),_0x255fc0[_0x21f271(0x142)](_0x12b66f,new Error(_0x21f271(0x125)+_0x1a5e75));return;}if(!_0x256e97||_0x255fc0['cGHTq'](_0x397bb5,_0x4d1297)){_0x190690[_0x21f271(0xc7)](0x190,{'Content-Type':_0x255fc0[_0x21f271(0x146)]}),_0x190690['end'](_0x255fc0['UxKMW']);return;}_0x190690[_0x21f271(0xc7)](0xc8,{'Content-Type':_0x255fc0['oprqC']}),_0x190690['end']('<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>'),clearTimeout(_0x1103b8),_0x5d6616['close'](),_0x5e2eaf(_0x256e97);});_0x5d6616[_0x578ff7(0x137)](CALLBACK_PORT,_0x12f5c4[_0x578ff7(0xcb)]);});}async function openBrowser(_0x161bc2){const _0x2f62f3=_0x400ccc,_0x1310a3={'KYRyt':'darwin','XeYbI':'win32','CwMbv':'xdg-open'},{exec:_0x30d82c}=await import('child_process'),_0x55a53d=process[_0x2f62f3(0x12e)]===_0x1310a3[_0x2f62f3(0x144)]?_0x2f62f3(0x132):process[_0x2f62f3(0x12e)]===_0x1310a3['XeYbI']?'start':_0x1310a3[_0x2f62f3(0xcc)];_0x30d82c(_0x55a53d+'\x20\x22'+_0x161bc2+'\x22');}function _0x114e(_0x1c5266,_0x360ccc){_0x1c5266=_0x1c5266-0xb1;const _0x413500=_0x4135();let _0x114e7b=_0x413500[_0x1c5266];return _0x114e7b;}let currentOrigin='';async function loadCachedToken(){const _0x56d3d5=_0x400ccc,_0xc4bb6e={'cWeMA':_0x56d3d5(0xd9),'yljsZ':function(_0x537dbd,_0x5245b7){return _0x537dbd>_0x5245b7;}};try{const _0x4fc542=JSON[_0x56d3d5(0x143)](await readFile(TOKEN_CACHE_PATH,_0xc4bb6e[_0x56d3d5(0xb6)]));if(_0x4fc542[_0x56d3d5(0xb1)]&&_0x4fc542['origin']!==currentOrigin)return null;if(_0x4fc542['expiresAt']&&_0xc4bb6e[_0x56d3d5(0xba)](Date['now'](),_0x4fc542['expiresAt']))return null;return _0x4fc542['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x1c22af,_0x46e44f,_0x254677){const _0x40447a=_0x400ccc,_0x573582={'dzhZx':function(_0x33fe34){return _0x33fe34();},'VEQqW':function(_0x2f7d0d,_0x448bad){return _0x2f7d0d+_0x448bad;},'rGkim':function(_0x5dc231,_0x4fc0f0){return _0x5dc231*_0x4fc0f0;},'DiORs':function(_0x26c84d,_0x4f02cb,_0x5504f9){return _0x26c84d(_0x4f02cb,_0x5504f9);},'zLdQL':function(_0x32df0e,_0x469c16,_0x33960c){return _0x32df0e(_0x469c16,_0x33960c);},'TxCeT':function(_0x346676){return _0x346676();}},_0xbbb54=await _0x573582['dzhZx'](loadCachedData),_0x46d8f6={..._0xbbb54,'origin':currentOrigin,'accessToken':_0x1c22af,'refreshToken':_0x46e44f??_0xbbb54?.[_0x40447a(0x118)],'expiresAt':_0x254677?_0x573582['VEQqW'](Date[_0x40447a(0xf8)](),_0x573582[_0x40447a(0xe3)](_0x254677,0x3e8)):undefined};await _0x573582['DiORs'](mkdir,_0x573582['zLdQL'](join,_0x573582['TxCeT'](homedir),_0x40447a(0xd5)),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON[_0x40447a(0xda)](_0x46d8f6),{'mode':0x180});}async function loadCachedClient(){const _0x5b85c1=_0x400ccc,_0x2b3c9b={'FlcJB':function(_0x3fbe4a){return _0x3fbe4a();}},_0x1e8e5c=await _0x2b3c9b[_0x5b85c1(0xbf)](loadCachedData);if(_0x1e8e5c?.[_0x5b85c1(0xb1)]&&_0x1e8e5c[_0x5b85c1(0xb1)]!==currentOrigin)return null;return _0x1e8e5c?.[_0x5b85c1(0xf2)]?{'clientId':_0x1e8e5c[_0x5b85c1(0xf2)],'clientSecret':_0x1e8e5c['clientSecret']}:null;}async function clearCachedClient(){const _0x684fb9={'LKBpU':function(_0x4c57af,_0x424a6b,_0x5c3ecd,_0x5cb4fb){return _0x4c57af(_0x424a6b,_0x5c3ecd,_0x5cb4fb);}},_0x5849ce=await loadCachedData();if(!_0x5849ce)return;const {clientId:_0x5d4761,clientSecret:_0x49bb7e,..._0x3c43fc}=_0x5849ce;await _0x684fb9['LKBpU'](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x3c43fc),{'mode':0x180});}async function saveCachedClient(_0x152dee,_0x34d4e4){const _0x3ab1cf=_0x400ccc,_0xb16d87={'MIwce':function(_0x22bd30){return _0x22bd30();},'jfNkr':function(_0x246239,_0x427676,_0x7502e6){return _0x246239(_0x427676,_0x7502e6);},'oGRUV':'.ranger','hOJNZ':function(_0x2f856f,_0x485e4d,_0x4a53f6,_0x1c5f68){return _0x2f856f(_0x485e4d,_0x4a53f6,_0x1c5f68);}},_0x5dea1f=await _0xb16d87['MIwce'](loadCachedData),_0x100ed2={..._0x5dea1f,'origin':currentOrigin,'accessToken':_0x5dea1f?.[_0x3ab1cf(0xc0)]??'','clientId':_0x152dee,'clientSecret':_0x34d4e4};await mkdir(_0xb16d87['jfNkr'](join,homedir(),_0xb16d87[_0x3ab1cf(0x136)]),{'recursive':!![]}),await _0xb16d87[_0x3ab1cf(0x138)](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x100ed2),{'mode':0x180});}async function loadCachedData(){const _0x1a4428=_0x400ccc,_0x5a7134={'weZuv':_0x1a4428(0xd9)};try{return JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x5a7134['weZuv']));}catch{return null;}}async function parseResponse(_0x40ad73){const _0x20de13=_0x400ccc,_0x506502={'Xlfyr':'data:','HKSGH':function(_0x331462,_0x329e7c){return _0x331462!==_0x329e7c;}},_0x56e468=_0x40ad73['headers'][_0x20de13(0x103)]('content-type')??'';if(_0x56e468['includes'](_0x20de13(0xe8))){const _0x1b1cbf=await _0x40ad73[_0x20de13(0xe5)]();for(const _0x16d164 of _0x1b1cbf['split']('\x0a')){const _0x31e13a=_0x16d164['trim']();if(_0x31e13a[_0x20de13(0xf3)](_0x506502['Xlfyr'])){const _0x536320=_0x31e13a[_0x20de13(0xc1)](_0x506502['Xlfyr']['length'])[_0x20de13(0x13e)]();if(!_0x536320)continue;try{const _0x2f6481=JSON['parse'](_0x536320);if(_0x506502[_0x20de13(0xbb)](_0x2f6481['id'],undefined)||_0x2f6481['error'])return _0x2f6481;}catch{}}}throw new Error('No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream');}return _0x40ad73[_0x20de13(0x13a)]();}function extractToken(_0x458b10){const _0x199cde=_0x400ccc,_0x22d220={'nGCtH':function(_0x5f1e06,_0x479163){return _0x5f1e06===_0x479163;},'pSnLQ':'Unknown\x20error','gnxOF':function(_0x283714,_0x1f2a28){return _0x283714===_0x1f2a28;},'ZQnIC':'text'};if(!_0x458b10)return null;const _0x2a01a5=_0x458b10[_0x199cde(0x12c)];if(_0x2a01a5?.['token']&&_0x22d220[_0x199cde(0x135)](typeof _0x2a01a5[_0x199cde(0xe4)],'string'))return _0x2a01a5[_0x199cde(0xe4)];if(_0x458b10[_0x199cde(0xea)]){const _0x4c93c9=_0x458b10['content'];throw new Error('Server\x20returned\x20error:\x20'+(_0x4c93c9?.[0x0]?.['text']??_0x22d220['pSnLQ']));}const _0x14e220=_0x458b10[_0x199cde(0xf1)];if(_0x14e220)for(const _0xfb669e of _0x14e220){if(_0x22d220['gnxOF'](_0xfb669e[_0x199cde(0xd2)],_0x22d220[_0x199cde(0x10e)])&&_0xfb669e['text']){try{const _0xa5a225=JSON['parse'](_0xfb669e[_0x199cde(0xe5)]);if(_0x22d220['gnxOF'](typeof _0xa5a225?.[_0x199cde(0xe4)],'string'))return _0xa5a225[_0x199cde(0xe4)];}catch{}const _0x3dcacb=_0xfb669e['text']['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x3dcacb)return _0x3dcacb[0x1];}}return null;}
@@ -0,0 +1 @@
1
+ (function(_0x4a4d9a,_0x4dc2e1){const _0x1b8717=_0x1498,_0x50c864=_0x4a4d9a();while(!![]){try{const _0x2601ff=parseInt(_0x1b8717(0xde))/0x1+-parseInt(_0x1b8717(0xc1))/0x2*(-parseInt(_0x1b8717(0x109))/0x3)+parseInt(_0x1b8717(0xe2))/0x4+parseInt(_0x1b8717(0x106))/0x5*(parseInt(_0x1b8717(0x110))/0x6)+-parseInt(_0x1b8717(0x10e))/0x7+-parseInt(_0x1b8717(0x107))/0x8+-parseInt(_0x1b8717(0xf4))/0x9*(parseInt(_0x1b8717(0xee))/0xa);if(_0x2601ff===_0x4dc2e1)break;else _0x50c864['push'](_0x50c864['shift']());}catch(_0x54961d){_0x50c864['push'](_0x50c864['shift']());}}}(_0x5149,0x38817));import{readFile,rm}from'fs/promises';import{existsSync}from'fs';import{join}from'path';import _0x25eb91 from'inquirer';function _0x1498(_0x271aca,_0x6c128a){_0x271aca=_0x271aca-0xc0;const _0x514969=_0x5149();let _0x1498c7=_0x514969[_0x271aca];return _0x1498c7;}import{getEnvNames}from'./env.js';import{getEnvDir,loadSettings}from'./utils/settings.js';import{getRangerDir}from'./utils/rangerRoot.js';import{ApiError,createCloudProfile,fetchAuthConfig,saveCloudProfileCredentials,uploadCloudProfileSession}from'./utils/cloudProfile.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{readProjectsConfig,setProfileOverride,writeProjectsConfig}from'./utils/projectsConfig.js';import{isPathGitTracked}from'./utils/gitTracked.js';function formatPlanLine(_0x54f119){const _0x453351=_0x1498,_0x5813ee={'bYRFw':function(_0x5e8b01,_0x190563){return _0x5e8b01===_0x190563;},'AQemF':_0x453351(0x100)};if(_0x5813ee[_0x453351(0xc9)](_0x54f119[_0x453351(0xd0)],_0x5813ee[_0x453351(0xdd)]))return'\x20\x20'+_0x54f119[_0x453351(0x115)]['padEnd'](0x1e)+'\x20→\x20skip\x20('+_0x54f119[_0x453351(0xf1)]+')';if(_0x54f119[_0x453351(0xf7)]&&_0x54f119['baseUrl'])return'\x20\x20'+_0x54f119['profileName'][_0x453351(0xca)](0x1e)+'\x20→\x20cloud\x20(env:\x20'+_0x54f119[_0x453351(0xd9)]+_0x453351(0xe4)+_0x54f119['baseUrl']+_0x453351(0xe3);if(_0x54f119[_0x453351(0x119)])return'\x20\x20'+_0x54f119['profileName']['padEnd'](0x1e)+'\x20→\x20cloud\x20(env:\x20'+_0x54f119[_0x453351(0xd9)]+_0x453351(0x10b)+_0x54f119['baseUrl']+')';return'\x20\x20'+_0x54f119[_0x453351(0x115)]['padEnd'](0x1e)+'\x20→\x20cloud\x20(env:\x20'+_0x54f119['envKey']+')';}function shouldWarnGitTrackedOnce(_0x2cbe08){const _0x64a1d=_0x1498,_0x56824b={'LaQlq':function(_0x2f83ef){return _0x2f83ef();}},_0x5d8e90=_0x56824b[_0x64a1d(0xe6)](readProjectsConfig),_0x4ef61b=_0x5d8e90[_0x64a1d(0xf8)][_0x2cbe08]??={},_0x482a17=_0x4ef61b[_0x64a1d(0xc5)]??={},_0x11b8be=_0x482a17['gitTrackedRanger'],_0xf32cdf=new Date(),_0x13275a=_0xf32cdf[_0x64a1d(0xce)]()['slice'](0x0,0xa);if(_0x11b8be===_0x13275a)return![];return _0x482a17[_0x64a1d(0xf2)]=_0x13275a,writeProjectsConfig(_0x5d8e90),!![];}export async function migrateProfile(_0x2568c0,_0x518139){const _0x1c0de6=_0x1498,_0x13679b={'LXxmI':function(_0x3d92df){return _0x3d92df();},'GJbod':function(_0x52f690,_0x5a4da7){return _0x52f690(_0x5a4da7);},'tBRRI':function(_0x16f7b9,_0x43772a){return _0x16f7b9===_0x43772a;},'lVQbH':'No\x20cloud\x20profile\x20auth\x20config\x20found\x20for\x20this\x20org.\x20Migration\x20requires\x20at\x20least\x20one\x20configured\x20auth\x20environment.','ORNKN':'skip','XAGMJ':_0x1c0de6(0xd5),'vhFSO':function(_0x6b8ee1,_0x430849){return _0x6b8ee1(_0x430849);},'FayGy':_0x1c0de6(0x103),'XwMcX':function(_0x420d72,_0x1f64a1){return _0x420d72===_0x1f64a1;},'uvSsy':function(_0x444fd7,_0x5d8f30,_0x2975d6){return _0x444fd7(_0x5d8f30,_0x2975d6);},'wkzFp':_0x1c0de6(0xe0),'oWaKK':_0x1c0de6(0x104),'gJSAa':_0x1c0de6(0xc2),'CyICP':function(_0x5e8c50,_0x1ff9d3){return _0x5e8c50(_0x1ff9d3);},'dJmfV':'confirm','Khwhx':'proceed','KGnDb':'Proceed?','MrVxY':'Aborted.','QEeIC':function(_0x36842f){return _0x36842f();},'XfsBE':function(_0x20bb61,_0x26f164){return _0x20bb61(_0x26f164);},'JoShP':'After\x20migration,\x20uncommit\x20it:','ZfjoN':_0x1c0de6(0xd2),'HSGjl':'Continuing\x20with\x20migration...','ZytPr':function(_0x36ea75,_0x35b3c7){return _0x36ea75===_0x35b3c7;},'omMvm':'profile.migrate.skipped','mGNkc':_0x1c0de6(0xc7),'vCKiB':function(_0x3dfb94,_0x2ce226){return _0x3dfb94&&_0x2ce226;},'miqJl':function(_0x4cabd3,_0x4ca396,_0x5f2364,_0x26352e){return _0x4cabd3(_0x4ca396,_0x5f2364,_0x26352e);},'IDXSo':function(_0x3379e7,_0x4d51ae,_0x474967,_0x1d6cd3,_0x166d03){return _0x3379e7(_0x4d51ae,_0x474967,_0x1d6cd3,_0x166d03);},'KpHQN':'baseUrl','pjabz':function(_0x10160f,_0x1f2c43){return _0x10160f instanceof _0x1f2c43;},'gezPZ':_0x1c0de6(0xd7),'kVxTG':function(_0x51cc71,_0x583c07){return _0x51cc71(_0x583c07);},'JntFl':function(_0x2fe94a,_0x315097){return _0x2fe94a>_0x315097;},'HnekA':_0x1c0de6(0x108),'gCoom':function(_0x7c14ac,_0x28bf06){return _0x7c14ac+_0x28bf06;}};if(!_0x2568c0[_0x1c0de6(0x115)]&&!_0x2568c0['all'])throw new Error(_0x1c0de6(0x114));let _0x4dfd0d;try{_0x4dfd0d=await _0x13679b['LXxmI'](fetchAuthConfig);}catch(_0x2f0e70){throw new Error(_0x1c0de6(0xed)+(_0x2f0e70 instanceof Error?_0x2f0e70['message']:_0x13679b['GJbod'](String,_0x2f0e70))+_0x1c0de6(0xf9));}if(!_0x4dfd0d||!_0x4dfd0d['environments']||_0x13679b['tBRRI'](Object['keys'](_0x4dfd0d['environments'])[_0x1c0de6(0xec)],0x0))throw new Error(_0x13679b[_0x1c0de6(0xd6)]);const _0x23d884=[];if(_0x2568c0[_0x1c0de6(0xfe)]){const {envNames:_0x412b12,envTypes:_0x4e4cfe}=await getEnvNames();for(const _0xf2b89a of _0x412b12){if(_0x13679b['tBRRI'](_0x4e4cfe[_0xf2b89a],'ci'))continue;_0x23d884[_0x1c0de6(0xc4)](_0xf2b89a);}}else _0x2568c0[_0x1c0de6(0x115)]&&_0x23d884['push'](_0x2568c0[_0x1c0de6(0x115)]);if(_0x23d884[_0x1c0de6(0xec)]===0x0){console['log']('No\x20local\x20profiles\x20found\x20to\x20migrate.');return;}const _0x2d0cd6=[];for(const _0x18c407 of _0x23d884){const _0xbe50c8=getEnvDir(_0x18c407);if(!_0x13679b[_0x1c0de6(0xf3)](existsSync,_0xbe50c8)){_0x2d0cd6['push']({'kind':_0x13679b['ORNKN'],'profileName':_0x18c407,'reason':_0x13679b[_0x1c0de6(0x113)]});continue;}const _0x511480=await _0x13679b['vhFSO'](loadSettings,_0x18c407),_0x40cee8=_0x511480[_0x1c0de6(0x119)];if(!_0x40cee8){_0x2d0cd6['push']({'kind':_0x13679b['ORNKN'],'profileName':_0x18c407,'reason':'no\x20baseUrl\x20in\x20settings.json'});continue;}const _0x5bfb55=matchAuthEnvironment(_0x40cee8,_0x4dfd0d);if(!_0x5bfb55){_0x2d0cd6[_0x1c0de6(0xc4)]({'kind':_0x1c0de6(0x100),'profileName':_0x18c407,'reason':_0x13679b['FayGy']});continue;}const _0x12dc19=_0x4dfd0d['environments'][_0x5bfb55],_0x27c8b8=_0x12dc19?.[_0x1c0de6(0xeb)]??[],_0x815701=_0x27c8b8[_0x1c0de6(0x112)](_0x38087d=>{const _0x4a559a=_0x1c0de6;try{return new URL(_0x38087d)[_0x4a559a(0x102)]===new URL(_0x40cee8)[_0x4a559a(0x102)];}catch{return![];}}),_0x3e244e={};for(const [_0xd4c94,_0x4e9cac]of Object['entries'](_0x511480)){if(_0xd4c94===_0x1c0de6(0x119))continue;if(_0x13679b[_0x1c0de6(0xcf)](_0x4e9cac,undefined))continue;_0x3e244e[_0xd4c94]=_0x4e9cac;}!_0x815701&&(_0x3e244e['baseUrl']=_0x40cee8);const _0x1a7e63=_0x13679b['uvSsy'](join,_0xbe50c8,_0x13679b[_0x1c0de6(0xc6)]),_0x3b4702=existsSync(_0x1a7e63);_0x2d0cd6[_0x1c0de6(0xc4)]({'kind':_0x13679b['oWaKK'],'profileName':_0x18c407,'envKey':_0x5bfb55,'baseUrl':_0x40cee8,'preserveBaseUrl':!_0x815701,'settings':_0x3e244e,'authJsonPath':_0x3b4702?_0x1a7e63:null});}console[_0x1c0de6(0xdf)](_0x13679b[_0x1c0de6(0xcc)]);for(const _0x2e8c40 of _0x2d0cd6){console['log'](_0x13679b[_0x1c0de6(0xf5)](formatPlanLine,_0x2e8c40));}if(_0x2568c0[_0x1c0de6(0xcd)]){console[_0x1c0de6(0xdf)]('Nothing\x20migrated.\x20Run\x20without\x20--dry-run\x20to\x20apply.');return;}const _0x306ca9=_0x13679b['vhFSO'](Boolean,process[_0x1c0de6(0xe1)]['isTTY']&&process['stdout']['isTTY']),_0x210a5e=_0x2d0cd6['some'](_0x4ee3fd=>_0x4ee3fd['kind']===_0x1c0de6(0x104));if(_0x210a5e&&_0x306ca9&&!_0x2568c0['yes']){const {proceed:_0x4dbd7b}=await _0x25eb91['prompt']([{'type':_0x13679b['dJmfV'],'name':_0x13679b[_0x1c0de6(0x101)],'message':_0x13679b[_0x1c0de6(0xef)],'default':![]}]);if(!_0x4dbd7b){console[_0x1c0de6(0xdf)](_0x13679b[_0x1c0de6(0xd8)]);return;}}const _0x43bd26=_0x13679b['QEeIC'](getRangerDir);let _0x4bc80d=![];if(_0x13679b[_0x1c0de6(0xf5)](existsSync,_0x43bd26))try{_0x4bc80d=await _0x13679b[_0x1c0de6(0xf0)](isPathGitTracked,_0x43bd26);}catch{_0x4bc80d=![];}_0x4bc80d&&_0x13679b['XfsBE'](shouldWarnGitTrackedOnce,process['cwd']())&&(console[_0x1c0de6(0xdf)]('Warning:\x20.ranger/\x20is\x20tracked\x20in\x20this\x20git\x20repo.'),console[_0x1c0de6(0xdf)](_0x13679b[_0x1c0de6(0xdc)]),console[_0x1c0de6(0xdf)]('\x20\x20git\x20rm\x20-r\x20--cached\x20.ranger/'),console[_0x1c0de6(0xdf)](_0x13679b['ZfjoN']),console['log'](_0x13679b['HSGjl']));let _0x1af5a5=0x0,_0x46d875=0x0,_0x38e51e=0x0,_0x49062b=0x0;for(const _0x5f238b of _0x2d0cd6){if(_0x13679b[_0x1c0de6(0xe8)](_0x5f238b['kind'],'skip')){_0x49062b++,_0x518139?.['trackPhaseEnd']('profile.migrate.skipped',{'profileName':_0x5f238b['profileName'],'reason':_0x5f238b[_0x1c0de6(0xf1)]});continue;}_0x518139?.[_0x1c0de6(0xff)](_0x1c0de6(0xfc),{'profileName':_0x5f238b[_0x1c0de6(0x115)],'envKey':_0x5f238b[_0x1c0de6(0xd9)]});try{try{await createCloudProfile(_0x5f238b['profileName'],_0x5f238b[_0x1c0de6(0xd9)],_0x5f238b['settings']);}catch(_0xc50965){if(_0xc50965 instanceof ApiError&&_0x13679b[_0x1c0de6(0xcf)](_0xc50965[_0x1c0de6(0xfd)],0x199)){console['log']('\x20\x20⚠\x20'+_0x5f238b['profileName']+':\x20cloud\x20profile\x20with\x20this\x20name\x20already\x20exists.\x20Skipping.'),_0x49062b++,_0x518139?.['trackPhaseEnd'](_0x13679b[_0x1c0de6(0xd4)],{'profileName':_0x5f238b['profileName'],'reason':_0x1c0de6(0xc0)});continue;}throw _0xc50965;}let _0x284614=![],_0x290de0=![];if(_0x5f238b[_0x1c0de6(0x10a)])try{const _0x333349=await readFile(_0x5f238b[_0x1c0de6(0x10a)],_0x13679b[_0x1c0de6(0x10c)]),_0x12f692=JSON[_0x1c0de6(0xc8)](_0x333349);await uploadCloudProfileSession(_0x5f238b['profileName'],_0x12f692),_0x284614=!![];}catch(_0x31c6bc){_0x290de0=!![],console['log'](_0x1c0de6(0xe9)+_0x5f238b[_0x1c0de6(0x115)]+_0x1c0de6(0xd1)+(_0x31c6bc instanceof Error?_0x31c6bc['message']:String(_0x31c6bc))+').\x20Cloud\x20profile\x20created;\x20local\x20auth.json\x20left\x20in\x20place.');}let _0x3e0b3a=![];if(_0x2568c0[_0x1c0de6(0x116)]){const _0x4b7bbe=process[_0x1c0de6(0x105)]['RANGER_TEST_USERNAME'],_0x5ac712=process['env']['RANGER_TEST_PASSWORD'];if(_0x13679b['vCKiB'](_0x4b7bbe,_0x5ac712))try{await _0x13679b['miqJl'](saveCloudProfileCredentials,_0x5f238b['profileName'],_0x4b7bbe,_0x5ac712),_0x3e0b3a=!![];}catch(_0x5d97bc){console[_0x1c0de6(0xdf)]('\x20\x20⚠\x20'+_0x5f238b['profileName']+_0x1c0de6(0x118)+(_0x5d97bc instanceof Error?_0x5d97bc[_0x1c0de6(0x117)]:_0x13679b[_0x1c0de6(0xc3)](String,_0x5d97bc))+').');}else console[_0x1c0de6(0xdf)]('\x20\x20⚠\x20'+_0x5f238b[_0x1c0de6(0x115)]+':\x20--save-creds\x20requested,\x20but\x20RANGER_TEST_USERNAME/PASSWORD\x20not\x20set\x20in\x20env.');}if(_0x5f238b['preserveBaseUrl']&&_0x5f238b[_0x1c0de6(0x119)])try{_0x13679b['IDXSo'](setProfileOverride,process[_0x1c0de6(0x10f)](),_0x5f238b['profileName'],_0x13679b[_0x1c0de6(0xd3)],_0x5f238b[_0x1c0de6(0x119)]);}catch(_0x35230d){console['log'](_0x1c0de6(0xe9)+_0x5f238b[_0x1c0de6(0x115)]+_0x1c0de6(0xf6)+(_0x13679b[_0x1c0de6(0xda)](_0x35230d,Error)?_0x35230d['message']:String(_0x35230d))+').');}const _0x6335ae=getEnvDir(_0x5f238b[_0x1c0de6(0x115)]);if(!_0x290de0&&_0x13679b[_0x1c0de6(0xc3)](existsSync,_0x6335ae))try{await rm(_0x6335ae,{'recursive':!![],'force':!![]}),_0x46d875++;}catch(_0x355e98){console['log'](_0x1c0de6(0xe9)+_0x5f238b[_0x1c0de6(0x115)]+':\x20failed\x20to\x20delete\x20local\x20dir\x20'+_0x6335ae+'\x20('+(_0x355e98 instanceof Error?_0x355e98[_0x1c0de6(0x117)]:String(_0x355e98))+').');}_0x1af5a5++,_0x5f238b[_0x1c0de6(0xf7)]&&_0x5f238b['baseUrl']?console['log'](_0x1c0de6(0xdb)+_0x5f238b[_0x1c0de6(0x115)]+'\x20migrated\x20to\x20cloud\x20(env:\x20'+_0x5f238b[_0x1c0de6(0xd9)]+_0x1c0de6(0xea)):console[_0x1c0de6(0xdf)](_0x1c0de6(0xdb)+_0x5f238b['profileName']+_0x1c0de6(0xe5)+_0x5f238b[_0x1c0de6(0xd9)]+')'),_0x518139?.[_0x1c0de6(0xfb)](_0x13679b[_0x1c0de6(0xfa)],{'profileName':_0x5f238b['profileName'],'envKey':_0x5f238b[_0x1c0de6(0xd9)],'wasGitTracked':_0x4bc80d,'hadSession':_0x284614,'savedCreds':_0x3e0b3a});}catch(_0x30725a){_0x38e51e++,console['log']('\x20\x20✗\x20'+_0x5f238b['profileName']+_0x1c0de6(0x10d)+(_0x30725a instanceof Error?_0x30725a['message']:_0x13679b['kVxTG'](String,_0x30725a))),_0x518139?.['trackPhaseEnd']('profile.migrate.failed',{'profileName':_0x5f238b[_0x1c0de6(0x115)],'error':_0x30725a instanceof Error?_0x30725a[_0x1c0de6(0x117)]:String(_0x30725a)});}}const _0x57dced=[];if(_0x13679b['JntFl'](_0x1af5a5,0x0))_0x57dced['push'](_0x1af5a5+'\x20profile'+(_0x13679b[_0x1c0de6(0xe8)](_0x1af5a5,0x1)?'':'s')+_0x1c0de6(0x111));if(_0x13679b['JntFl'](_0x46d875,0x0))_0x57dced['push']('Deleted\x20'+_0x46d875+'\x20local\x20director'+(_0x46d875===0x1?'y':_0x13679b[_0x1c0de6(0xe7)]));if(_0x13679b['JntFl'](_0x49062b,0x0))_0x57dced[_0x1c0de6(0xc4)](_0x49062b+'\x20skipped');if(_0x13679b['JntFl'](_0x38e51e,0x0))_0x57dced['push'](_0x38e51e+_0x1c0de6(0xcb));if(_0x13679b['JntFl'](_0x57dced['length'],0x0))console[_0x1c0de6(0xdf)](_0x13679b['gCoom'](_0x57dced['join']('.\x20'),'.'));}function _0x5149(){const _0xea39a4=['profile.migrate.started','status','all','trackPhaseStart','skip','Khwhx','origin','no\x20matching\x20auth\x20env','migrate','env','44340artDwQ','451368dFCMnl','ies','256296vZKalM','authJsonPath',',\x20matches\x20','mGNkc','\x20failed:\x20','2041193pQSLeJ','cwd','96HYOFHm','\x20migrated','some','XAGMJ','Provide\x20a\x20profile\x20name\x20or\x20--all.\x0a\x20\x20Example:\x20ranger\x20profile\x20migrate\x20--all\x20--dry-run','profileName','saveCreds','message',':\x20failed\x20to\x20save\x20credentials\x20(','baseUrl','name_conflict','8AceNEX','Plan:','vhFSO','push','_warnings','wkzFp','utf-8','parse','bYRFw','padEnd','\x20failed','gJSAa','dryRun','toISOString','XwMcX','kind',':\x20session\x20upload\x20failed\x20(','\x20\x20echo\x20\x27.ranger/\x27\x20>>\x20.gitignore','KpHQN','omMvm','local\x20profile\x20directory\x20not\x20found','lVQbH','profile.migrate.succeeded','MrVxY','envKey','pjabz','\x20\x20✓\x20','JoShP','AQemF','160066DtLtaL','log','auth.json','stdin','465676VNFYpj','\x20as\x20project\x20override)',',\x20preserving\x20baseUrl\x20','\x20migrated\x20to\x20cloud\x20(env:\x20','LaQlq','HnekA','ZytPr','\x20\x20⚠\x20',',\x20baseUrl\x20override\x20→\x20projects.json)','domains','length','Could\x20not\x20fetch\x20auth\x20config\x20(','48820wTxpBk','KGnDb','XfsBE','reason','gitTrackedRanger','GJbod','333WkcbXn','CyICP',':\x20failed\x20to\x20write\x20projects.json\x20override\x20(','preserveBaseUrl','projects',').\x20Run:\x20ranger\x20setup','gezPZ','trackPhaseEnd'];_0x5149=function(){return _0xea39a4;};return _0x5149();}
@@ -1 +1 @@
1
- (function(_0x566b11,_0x172bcb){const _0x5ae464=_0x70b3,_0xae7aac=_0x566b11();while(!![]){try{const _0xfe97c0=parseInt(_0x5ae464(0x189))/0x1+-parseInt(_0x5ae464(0x165))/0x2+-parseInt(_0x5ae464(0x18d))/0x3+-parseInt(_0x5ae464(0x18b))/0x4*(parseInt(_0x5ae464(0x188))/0x5)+parseInt(_0x5ae464(0x17a))/0x6+parseInt(_0x5ae464(0x175))/0x7+-parseInt(_0x5ae464(0x178))/0x8*(-parseInt(_0x5ae464(0x185))/0x9);if(_0xfe97c0===_0x172bcb)break;else _0xae7aac['push'](_0xae7aac['shift']());}catch(_0x1adfbf){_0xae7aac['push'](_0xae7aac['shift']());}}}(_0x7e5a,0x46792));import{join}from'path';import{existsSync}from'fs';import _0x33a0f2 from'inquirer';import{skillup}from'../skillup.js';function _0x70b3(_0xb504d8,_0x304f9f){_0xb504d8=_0xb504d8-0x161;const _0x7e5a87=_0x7e5a();let _0x70b356=_0x7e5a87[_0xb504d8];return _0x70b356;}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';function _0x7e5a(){const _0xa2d24d=['334737MRwsBU','cLQSo','CWbeG','jJSKb','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','PCAiI','260684vsKWNd','ZoQQK','ranger','MOwOF','WZxPL','pPxNW','LSFDA','list','error','wantsSkillup','push','plugin','bvbzT','VjQnJ','HbpLH','user','60018MtxVNH','confirm','XXZAq','27592hnIjkW','log','2515392tmzCGy','\x0aYou\x20can\x20install\x20manually\x20with:','\x20level)...\x0a','MUjOm','kggyc','NrNRt','--scope','output','✓\x20Ranger\x20skills\x20already\x20installed','oYHLI','success','261JkUhGd','HFOpk','✓\x20Claude\x20Code\x20plugin\x20enabled','594140yRZiaH','478064GbTtmo','seToj','16YtjAAp','project'];_0x7e5a=function(){return _0xa2d24d;};return _0x7e5a();}import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0xc0cabf){const _0x69a12f=_0x70b3,_0x2296fc={'MUjOm':function(_0x14e0c3,_0x27b8b3){return _0x14e0c3(_0x27b8b3);},'LSFDA':'ranger@trailhead','oYHLI':_0x69a12f(0x163),'MOwOF':function(_0x550877,_0xa11fc3){return _0x550877(_0xa11fc3);},'XXZAq':function(_0x4bc7c6,_0x4c9a79,_0x31f0d5){return _0x4bc7c6(_0x4c9a79,_0x31f0d5);},'kggyc':'.claude','ZoQQK':'pluginScope','mZzwX':'Where\x20should\x20the\x20plugin\x20be\x20installed?','rHZVj':'User\x20(available\x20in\x20all\x20your\x20projects)','AOkaz':_0x69a12f(0x174),'PCAiI':function(_0x2ba0ab,_0x495d3a){return _0x2ba0ab(_0x495d3a);},'CWbeG':'✓\x20Marketplace\x20already\x20added','HFOpk':'marketplace','bvbzT':'add','Bsxqd':'ranger-testing/trailhead','VjQnJ':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','IGAzr':_0x69a12f(0x180),'NrNRt':function(_0x34d3e1,_0x46753e){return _0x34d3e1===_0x46753e;},'WZxPL':_0x69a12f(0x18c),'IoPHQ':_0x69a12f(0x187)},_0x4180d7=await _0x2296fc[_0x69a12f(0x17d)](isPluginInstalled,_0x2296fc['LSFDA']);if(_0x4180d7)return console['log'](_0x2296fc[_0x69a12f(0x183)]),![];const _0x2cbe8a=_0x2296fc[_0x69a12f(0x168)](existsSync,_0x2296fc[_0x69a12f(0x177)](join,getProjectRoot(),_0x2296fc[_0x69a12f(0x17e)]));let _0x5b749d;if(_0xc0cabf)_0x5b749d=_0xc0cabf;else{if(_0x2cbe8a)_0x5b749d=_0x69a12f(0x18c);else{console['log']('\x0a📦\x20Claude\x20Code\x20Plugin\x0a');const _0x2a7f3=await _0x33a0f2['prompt']([{'type':_0x69a12f(0x16c),'name':_0x2296fc[_0x69a12f(0x166)],'message':_0x2296fc['mZzwX'],'choices':[{'name':_0x2296fc['rHZVj'],'value':'user'},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':'project'}],'default':_0x2296fc['AOkaz']}]);_0x5b749d=_0x2a7f3['pluginScope'];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x5b749d+_0x69a12f(0x17c));const _0x5edf90=await _0x2296fc[_0x69a12f(0x164)](isMarketplaceAdded,'trailhead');let _0x4954b2=_0x5edf90;if(_0x5edf90)console['log'](_0x2296fc[_0x69a12f(0x161)]);else{const _0x1879a3=await runClaudeCommand([_0x69a12f(0x170),_0x2296fc[_0x69a12f(0x186)],_0x2296fc[_0x69a12f(0x171)],_0x2296fc['Bsxqd']]);!_0x1879a3['success']?(console[_0x69a12f(0x16d)]('❌\x20Failed\x20to\x20add\x20marketplace:',_0x1879a3[_0x69a12f(0x16d)]),console['log'](_0x69a12f(0x17b)),console['log'](_0x2296fc[_0x69a12f(0x172)]),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x5b749d)):_0x4954b2=!![];}if(_0x4954b2){const _0x2c9098=await runClaudeCommand(['plugin','install',_0x2296fc[_0x69a12f(0x16b)],_0x2296fc['IGAzr'],_0x5b749d]);if(!_0x2c9098[_0x69a12f(0x184)])console[_0x69a12f(0x16d)]('❌\x20Failed\x20to\x20install\x20plugin:',_0x2c9098[_0x69a12f(0x16d)]),console[_0x69a12f(0x179)](_0x69a12f(0x17b)),console[_0x69a12f(0x179)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x5b749d);else{console['log']('✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully');const _0x4672e9=[_0x69a12f(0x170),'enable','ranger@trailhead'];_0x2296fc[_0x69a12f(0x17f)](_0x5b749d,_0x2296fc[_0x69a12f(0x169)])&&_0x4672e9[_0x69a12f(0x16f)]('--scope',_0x2296fc['WZxPL']);const _0x335be9=await _0x2296fc[_0x69a12f(0x177)](runClaudeCommand,_0x4672e9,{'captureOutput':!![]}),_0x1fc6cc=_0x335be9[_0x69a12f(0x181)]?.['includes']('already\x20enabled');!_0x335be9['success']&&!_0x1fc6cc?console['error']('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x335be9['error']):console[_0x69a12f(0x179)](_0x2296fc['IoPHQ']);}}return!![];}export async function ensureClaudeSkills(_0x32ffaa){const _0x2b17b3=_0x70b3,_0x122518={'cLQSo':function(_0x4ebb86,_0x54fe2c){return _0x4ebb86(_0x54fe2c);},'HbpLH':function(_0x331718,_0x25738e,_0x557503,_0x48f8f4){return _0x331718(_0x25738e,_0x557503,_0x48f8f4);},'alRYd':'SKILL.md','jJSKb':function(_0x2129ef,_0xd7c614){return _0x2129ef(_0xd7c614);},'seToj':'project','oqiZB':_0x2b17b3(0x167),'HNSJC':_0x2b17b3(0x182),'pPxNW':_0x2b17b3(0x16e)},_0x3d9c98=_0x122518[_0x2b17b3(0x18e)](existsSync,_0x122518[_0x2b17b3(0x173)](join,_0x122518['cLQSo'](getSkillsDir,'user'),'ranger',_0x122518['alRYd'])),_0x4b09e8=_0x122518['cLQSo'](existsSync,join(_0x122518['jJSKb'](getSkillsDir,_0x122518[_0x2b17b3(0x18a)]),_0x122518['oqiZB'],_0x122518['alRYd']));if(_0x3d9c98||_0x4b09e8)return console[_0x2b17b3(0x179)](_0x122518['HNSJC']),![];const _0x485872=_0x122518[_0x2b17b3(0x162)](existsSync,join(getProjectRoot(),'.claude'));let _0x2bbbb4=!![];if(_0x32ffaa)await skillup({'autoInstall':_0x32ffaa,'suppressUsage':!![]});else{if(_0x485872)await skillup({'autoInstall':_0x122518['seToj'],'suppressUsage':!![]});else{const _0x3c4535=await _0x33a0f2['prompt']([{'type':_0x2b17b3(0x176),'name':_0x122518[_0x2b17b3(0x16a)],'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x2bbbb4=_0x3c4535['wantsSkillup'],_0x2bbbb4&&await skillup({'suppressUsage':!![]});}}return _0x2bbbb4;}
1
+ (function(_0x1c7413,_0x4d222){const _0x25772c=_0xbe8e,_0x4e5d98=_0x1c7413();while(!![]){try{const _0x59ad4b=-parseInt(_0x25772c(0x12d))/0x1+-parseInt(_0x25772c(0x14c))/0x2+-parseInt(_0x25772c(0x13f))/0x3*(-parseInt(_0x25772c(0x14b))/0x4)+parseInt(_0x25772c(0x14a))/0x5+-parseInt(_0x25772c(0x158))/0x6+parseInt(_0x25772c(0x12e))/0x7*(parseInt(_0x25772c(0x157))/0x8)+parseInt(_0x25772c(0x146))/0x9;if(_0x59ad4b===_0x4d222)break;else _0x4e5d98['push'](_0x4e5d98['shift']());}catch(_0x70d488){_0x4e5d98['push'](_0x4e5d98['shift']());}}}(_0x4908,0xb9241));function _0x4908(){const _0x490d4c=['uWgPe','Rsyng','Bwelj','IBGja','Project\x20(shared\x20with\x20team\x20via\x20git)','✓\x20Claude\x20Code\x20plugin\x20enabled','pluginScope','AUVtk','1191757GFicwE','1687IOALpH','trailhead','user','hlzwu','uLTIJ','jHaRq','plugin','fKqmT','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','ranger','log','prompt','xRHCT','NOwBJ','QtGEb','ranger@trailhead','output','3pgZyET','\x20level)...\x0a','MEoXJ','VxdLc','User\x20(available\x20in\x20all\x20your\x20projects)','\x0aYou\x20can\x20install\x20manually\x20with:','project','21253509XCQqLp','push','marketplace','success','5706615TRMFUn','1645612zAghuz','2801098rEAvmo','wantsSkillup','❌\x20Failed\x20to\x20add\x20marketplace:','enable','confirm','kgBVw','SKILL.md','error','ranger-testing/trailhead','yACFZ','.claude','6224pUpTGE','4506492gjOjWW','FvYbO','Where\x20should\x20the\x20plugin\x20be\x20installed?','jdcJg','HfwlW'];_0x4908=function(){return _0x490d4c;};return _0x4908();}import{join}from'path';import{existsSync}from'fs';import _0x373e56 from'inquirer';function _0xbe8e(_0x3efd99,_0x17b385){_0x3efd99=_0x3efd99-0x121;const _0x49080c=_0x4908();let _0xbe8ec7=_0x49080c[_0x3efd99];return _0xbe8ec7;}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x4ecbb9){const _0x3306ad=_0xbe8e,_0x54b62e={'AUVtk':_0x3306ad(0x13d),'SYyvL':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','MEoXJ':function(_0x236c1b,_0x233009){return _0x236c1b(_0x233009);},'HfwlW':function(_0x3e0058,_0x3ca165,_0x2e0bdb){return _0x3e0058(_0x3ca165,_0x2e0bdb);},'jdcJg':_0x3306ad(0x145),'QtGEb':'list','FcPCy':_0x3306ad(0x122),'qeQOG':'user','kgBVw':'plugin','Bwelj':_0x3306ad(0x148),'NOwBJ':'add','iKkrL':_0x3306ad(0x14e),'rRnzX':'--scope','ERWnP':'❌\x20Failed\x20to\x20install\x20plugin:','phmgt':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','hlzwu':function(_0x544083,_0x137efc){return _0x544083===_0x137efc;},'uWgPe':'already\x20enabled','fKqmT':'⚠\x20Failed\x20to\x20enable\x20plugin:','nEJLr':_0x3306ad(0x12a)},_0x288e7b=await isPluginInstalled(_0x54b62e[_0x3306ad(0x12c)]);if(_0x288e7b)return console[_0x3306ad(0x138)](_0x54b62e['SYyvL']),![];const _0x488335=_0x54b62e[_0x3306ad(0x141)](existsSync,_0x54b62e[_0x3306ad(0x124)](join,getProjectRoot(),'.claude'));let _0x1500dd;if(_0x4ecbb9)_0x1500dd=_0x4ecbb9;else{if(_0x488335)_0x1500dd=_0x54b62e['jdcJg'];else{console['log']('\x0a📦\x20Claude\x20Code\x20Plugin\x0a');const _0x34ecaf=await _0x373e56['prompt']([{'type':_0x54b62e[_0x3306ad(0x13c)],'name':'pluginScope','message':_0x54b62e['FcPCy'],'choices':[{'name':_0x3306ad(0x143),'value':_0x3306ad(0x130)},{'name':_0x3306ad(0x129),'value':'project'}],'default':_0x54b62e['qeQOG']}]);_0x1500dd=_0x34ecaf[_0x3306ad(0x12b)];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x1500dd+_0x3306ad(0x140));const _0x2a3b71=await _0x54b62e[_0x3306ad(0x141)](isMarketplaceAdded,_0x3306ad(0x12f));let _0x20c522=_0x2a3b71;if(_0x2a3b71)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0x3b5fdd=await _0x54b62e['MEoXJ'](runClaudeCommand,[_0x54b62e['kgBVw'],_0x54b62e[_0x3306ad(0x127)],_0x54b62e[_0x3306ad(0x13b)],_0x3306ad(0x154)]);!_0x3b5fdd[_0x3306ad(0x149)]?(console[_0x3306ad(0x153)](_0x54b62e['iKkrL'],_0x3b5fdd['error']),console['log'](_0x3306ad(0x144)),console[_0x3306ad(0x138)](_0x3306ad(0x136)),console[_0x3306ad(0x138)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x1500dd)):_0x20c522=!![];}if(_0x20c522){const _0x5ba596=await runClaudeCommand([_0x54b62e[_0x3306ad(0x151)],'install',_0x54b62e['AUVtk'],_0x54b62e['rRnzX'],_0x1500dd]);if(!_0x5ba596[_0x3306ad(0x149)])console[_0x3306ad(0x153)](_0x54b62e['ERWnP'],_0x5ba596['error']),console['log'](_0x3306ad(0x144)),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x1500dd);else{console['log'](_0x54b62e['phmgt']);const _0x25d5b3=[_0x3306ad(0x134),_0x3306ad(0x14f),_0x3306ad(0x13d)];_0x54b62e[_0x3306ad(0x131)](_0x1500dd,_0x54b62e[_0x3306ad(0x123)])&&_0x25d5b3[_0x3306ad(0x147)](_0x54b62e['rRnzX'],_0x3306ad(0x145));const _0x4288c3=await runClaudeCommand(_0x25d5b3,{'captureOutput':!![]}),_0x17ab74=_0x4288c3[_0x3306ad(0x13e)]?.['includes'](_0x54b62e[_0x3306ad(0x125)]);!_0x4288c3['success']&&!_0x17ab74?console[_0x3306ad(0x153)](_0x54b62e[_0x3306ad(0x135)],_0x4288c3['error']):console[_0x3306ad(0x138)](_0x54b62e['nEJLr']);}}return!![];}export async function ensureClaudeSkills(_0x5b5bcd){const _0xc865d9=_0xbe8e,_0x17ca0b={'xRHCT':function(_0x742e41,_0x21798e,_0x520cde,_0x26acf0){return _0x742e41(_0x21798e,_0x520cde,_0x26acf0);},'uLTIJ':_0xc865d9(0x130),'jHaRq':function(_0x33cc68,_0x56c880){return _0x33cc68(_0x56c880);},'Bqouc':'ranger','Rsyng':'SKILL.md','yACFZ':'✓\x20Ranger\x20skills\x20already\x20installed','FvYbO':function(_0x505403){return _0x505403();},'IBGja':_0xc865d9(0x156),'WkcNh':function(_0x1423e6,_0x7e8a71){return _0x1423e6(_0x7e8a71);},'YUQJe':_0xc865d9(0x14d),'VxdLc':'Would\x20you\x20like\x20to\x20install\x20skills?','PZeQc':function(_0x24e3d7,_0x442b26){return _0x24e3d7(_0x442b26);}},_0x5d1e92=existsSync(_0x17ca0b[_0xc865d9(0x13a)](join,getSkillsDir(_0x17ca0b[_0xc865d9(0x132)]),_0xc865d9(0x137),_0xc865d9(0x152))),_0x5d0f31=existsSync(join(_0x17ca0b['jHaRq'](getSkillsDir,_0xc865d9(0x145)),_0x17ca0b['Bqouc'],_0x17ca0b[_0xc865d9(0x126)]));if(_0x5d1e92||_0x5d0f31)return console[_0xc865d9(0x138)](_0x17ca0b[_0xc865d9(0x155)]),![];const _0x5c26ae=_0x17ca0b['jHaRq'](existsSync,join(_0x17ca0b[_0xc865d9(0x121)](getProjectRoot),_0x17ca0b[_0xc865d9(0x128)]));let _0x560d1a=!![];if(_0x5b5bcd)await _0x17ca0b['WkcNh'](skillup,{'autoInstall':_0x5b5bcd,'suppressUsage':!![]});else{if(_0x5c26ae)await _0x17ca0b[_0xc865d9(0x133)](skillup,{'autoInstall':'project','suppressUsage':!![]});else{const _0x25b25e=await _0x373e56[_0xc865d9(0x139)]([{'type':_0xc865d9(0x150),'name':_0x17ca0b['YUQJe'],'message':_0x17ca0b[_0xc865d9(0x142)],'default':!![]}]);_0x560d1a=_0x25b25e[_0xc865d9(0x14d)],_0x560d1a&&await _0x17ca0b['PZeQc'](skillup,{'suppressUsage':!![]});}}return _0x560d1a;}
@@ -1 +1 @@
1
- (function(_0x3fbd98,_0x24ab2e){const _0x5c649e=_0x544c,_0x85e0e1=_0x3fbd98();while(!![]){try{const _0x143ce6=-parseInt(_0x5c649e(0x1e3))/0x1*(-parseInt(_0x5c649e(0x1f6))/0x2)+parseInt(_0x5c649e(0x1f1))/0x3*(-parseInt(_0x5c649e(0x1e2))/0x4)+parseInt(_0x5c649e(0x1ed))/0x5+-parseInt(_0x5c649e(0x1f0))/0x6*(-parseInt(_0x5c649e(0x1f7))/0x7)+-parseInt(_0x5c649e(0x1ee))/0x8*(parseInt(_0x5c649e(0x1f5))/0x9)+-parseInt(_0x5c649e(0x1f2))/0xa+parseInt(_0x5c649e(0x1e6))/0xb*(parseInt(_0x5c649e(0x1fa))/0xc);if(_0x143ce6===_0x24ab2e)break;else _0x85e0e1['push'](_0x85e0e1['shift']());}catch(_0x41787b){_0x85e0e1['push'](_0x85e0e1['shift']());}}}(_0x5e4f,0x6cfeb));function _0x544c(_0x3e48b3,_0x2f6dd4){_0x3e48b3=_0x3e48b3-0x1df;const _0x5e4f85=_0x5e4f();let _0x544cab=_0x5e4f85[_0x3e48b3];return _0x544cab;}import{join}from'path';function _0x5e4f(){const _0x365ba6=['XmWMb','$schema','187wDxzoA','Project\x20(shared\x20with\x20team\x20via\x20git)','user','plugin','https://opencode.ai/config.json','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','opencode.json','204365PXEhgo','6808cTrJxD','✓\x20OpenCode\x20plugin\x20already\x20configured','12jASuRM','6654eUpEKu','6161940rwvREU','log','quJzC','1278riHRKX','41462VYPIkH','325913cuhWfd','oNDmr','utf-8','785676mvSDwN','\x0a📦\x20OpenCode\x20Plugin\x0a','User\x20(available\x20in\x20all\x20your\x20projects)','Yoibq','project','Failed\x20to\x20read\x20opencode.json','nOGFG','includes','152aIXiAP','1GRioYP'];_0x5e4f=function(){return _0x365ba6;};return _0x5e4f();}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x54c18c from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x56955b){const _0x37a1e8=_0x544c,_0x4f961e={'FHDCV':function(_0x555067,_0x3c1334){return _0x555067(_0x3c1334);},'oNDmr':function(_0x1411fa,_0x58620f,_0x4d1696){return _0x1411fa(_0x58620f,_0x4d1696);},'nOGFG':function(_0x12b382,_0x58d840){return _0x12b382(_0x58d840);},'XmWMb':_0x37a1e8(0x1fe),'pmqNb':'pluginScope','QFUMZ':'Where\x20should\x20the\x20plugin\x20be\x20installed?','JembB':_0x37a1e8(0x1fc),'Hvbsu':function(_0xe12c4a,_0x10f111,_0x1ee0e5){return _0xe12c4a(_0x10f111,_0x1ee0e5);},'quJzC':function(_0x173a13,_0x209941){return _0x173a13(_0x209941);},'Yoibq':'opencode.json','MOyfR':'@ranger-testing/opencode-plugin','tilIY':_0x37a1e8(0x1ea),'okanP':_0x37a1e8(0x1f9),'Gixza':_0x37a1e8(0x1df),'NKRzz':function(_0x51f618,_0x3c9997){return _0x51f618(_0x3c9997);},'qfEPY':'✓\x20OpenCode\x20plugin\x20configured'},_0x1dd310=_0x4f961e['FHDCV'](existsSync,_0x4f961e['oNDmr'](join,_0x4f961e[_0x37a1e8(0x1e0)](getOpencodeConfigDir,_0x4f961e[_0x37a1e8(0x1e4)]),_0x37a1e8(0x1ec)));let _0x3fd065;if(_0x56955b)_0x3fd065=_0x56955b;else{if(_0x1dd310)_0x3fd065='project';else{console['log'](_0x37a1e8(0x1fb));const _0x34726e=await _0x54c18c['prompt']([{'type':'list','name':_0x4f961e['pmqNb'],'message':_0x4f961e['QFUMZ'],'choices':[{'name':_0x4f961e['JembB'],'value':_0x37a1e8(0x1e8)},{'name':_0x37a1e8(0x1e7),'value':_0x4f961e['XmWMb']}],'default':'user'}]);_0x3fd065=_0x34726e['pluginScope'];}}const _0x2d352c=_0x4f961e['Hvbsu'](join,_0x4f961e[_0x37a1e8(0x1f4)](getOpencodeConfigDir,_0x3fd065),_0x4f961e[_0x37a1e8(0x1fd)]),_0x325cb9=_0x4f961e['MOyfR'],_0x43bbef=_0x4f961e['tilIY'];let _0x508ec9={};if(existsSync(_0x2d352c))try{const _0x37d12d=await readFile(_0x2d352c,_0x4f961e['okanP']);_0x508ec9=JSON['parse'](_0x37d12d);}catch(_0x550ec3){return console['error'](_0x37a1e8(0x1eb)),{'configured':![],'scope':_0x3fd065,'error':_0x4f961e['Gixza'],'details':_0x550ec3};}const _0x10f041=Array['isArray'](_0x508ec9['plugin'])?_0x508ec9[_0x37a1e8(0x1e9)]:[];if(_0x10f041[_0x37a1e8(0x1e1)](_0x325cb9))return console[_0x37a1e8(0x1f3)](_0x37a1e8(0x1ef)),{'configured':![],'scope':_0x3fd065};return _0x508ec9[_0x37a1e8(0x1e5)]=_0x508ec9[_0x37a1e8(0x1e5)]||_0x43bbef,_0x508ec9['plugin']=[..._0x10f041,_0x325cb9],await _0x4f961e[_0x37a1e8(0x1f8)](mkdir,_0x4f961e['NKRzz'](getOpencodeConfigDir,_0x3fd065),{'recursive':!![]}),await writeFile(_0x2d352c,JSON['stringify'](_0x508ec9,null,0x2)+'\x0a'),console['log'](_0x4f961e['qfEPY']),{'configured':!![],'scope':_0x3fd065};}
1
+ (function(_0x3ece10,_0x276d5b){const _0x3f1d35=_0x35a0,_0x313b18=_0x3ece10();while(!![]){try{const _0x5c3c64=parseInt(_0x3f1d35(0xef))/0x1*(parseInt(_0x3f1d35(0xec))/0x2)+-parseInt(_0x3f1d35(0xf8))/0x3+parseInt(_0x3f1d35(0xdf))/0x4+parseInt(_0x3f1d35(0xf3))/0x5*(parseInt(_0x3f1d35(0xf0))/0x6)+parseInt(_0x3f1d35(0xf5))/0x7+parseInt(_0x3f1d35(0xf6))/0x8+-parseInt(_0x3f1d35(0xe8))/0x9*(parseInt(_0x3f1d35(0xe3))/0xa);if(_0x5c3c64===_0x276d5b)break;else _0x313b18['push'](_0x313b18['shift']());}catch(_0x56bc7f){_0x313b18['push'](_0x313b18['shift']());}}}(_0x3f6d,0x5fcce));function _0x35a0(_0x1d9299,_0x52c890){_0x1d9299=_0x1d9299-0xdf;const _0x3f6d5b=_0x3f6d();let _0x35a072=_0x3f6d5b[_0x1d9299];return _0x35a072;}import{join}from'path';function _0x3f6d(){const _0x23df46=['cicTw','User\x20(available\x20in\x20all\x20your\x20projects)','includes','11214099lKHXBS','bsMrm','BqxWk','ZKPlY','4sDoHiu','$schema','\x0a📦\x20OpenCode\x20Plugin\x0a','245137prxxdy','42VZTPnK','parse','Where\x20should\x20the\x20plugin\x20be\x20installed?','97410JOPVHx','pluginScope','4457089tbvyGp','4083128ZncuZg','@ranger-testing/opencode-plugin','1529199pZojHe','log','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','✓\x20OpenCode\x20plugin\x20already\x20configured','list','jvsCQ','opencode.json','✓\x20OpenCode\x20plugin\x20configured','FPqNr','1497504ooBDKd','wqzPu','user','plugin','10daYEDu','stringify'];_0x3f6d=function(){return _0x23df46;};return _0x3f6d();}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x848681 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x5b5bdd){const _0x257df2=_0x35a0,_0x520621={'BqxWk':function(_0x4a32b1,_0x23ac59){return _0x4a32b1(_0x23ac59);},'pvQsP':function(_0x91dd48,_0xd5f0b1,_0x573521){return _0x91dd48(_0xd5f0b1,_0x573521);},'BGnzO':'project','ZKPlY':_0x257df2(0xfe),'jvsCQ':_0x257df2(0xee),'aRjEV':_0x257df2(0xf2),'bsMrm':_0x257df2(0xe6),'UxQtA':'user','cicTw':'Project\x20(shared\x20with\x20team\x20via\x20git)','kfIzg':function(_0x2d1357,_0x39011a,_0x3f7580){return _0x2d1357(_0x39011a,_0x3f7580);},'sKIpw':_0x257df2(0xf7),'MQcDf':'https://opencode.ai/config.json','wqzPu':_0x257df2(0xfa),'nPZwf':'Failed\x20to\x20read\x20opencode.json','FPqNr':_0x257df2(0xfb),'AknQC':function(_0x6dece6,_0x3c6e49){return _0x6dece6+_0x3c6e49;},'ulXfy':_0x257df2(0xff)},_0x2e72b2=_0x520621[_0x257df2(0xea)](existsSync,_0x520621['pvQsP'](join,getOpencodeConfigDir(_0x520621['BGnzO']),_0x520621[_0x257df2(0xeb)]));let _0x31166e;if(_0x5b5bdd)_0x31166e=_0x5b5bdd;else{if(_0x2e72b2)_0x31166e='project';else{console['log'](_0x520621[_0x257df2(0xfd)]);const _0x514f45=await _0x848681['prompt']([{'type':_0x257df2(0xfc),'name':_0x257df2(0xf4),'message':_0x520621['aRjEV'],'choices':[{'name':_0x520621[_0x257df2(0xe9)],'value':_0x520621['UxQtA']},{'name':_0x520621[_0x257df2(0xe5)],'value':'project'}],'default':_0x257df2(0xe1)}]);_0x31166e=_0x514f45[_0x257df2(0xf4)];}}const _0x5ce59a=_0x520621['kfIzg'](join,getOpencodeConfigDir(_0x31166e),'opencode.json'),_0x141fd7=_0x520621['sKIpw'],_0x559ded=_0x520621['MQcDf'];let _0x53c1d9={};if(_0x520621['BqxWk'](existsSync,_0x5ce59a))try{const _0x11daf0=await readFile(_0x5ce59a,'utf-8');_0x53c1d9=JSON[_0x257df2(0xf1)](_0x11daf0);}catch(_0x4db55f){return console['error'](_0x520621[_0x257df2(0xe0)]),{'configured':![],'scope':_0x31166e,'error':_0x520621['nPZwf'],'details':_0x4db55f};}const _0x7b063c=Array['isArray'](_0x53c1d9[_0x257df2(0xe2)])?_0x53c1d9['plugin']:[];if(_0x7b063c[_0x257df2(0xe7)](_0x141fd7))return console[_0x257df2(0xf9)](_0x520621[_0x257df2(0x100)]),{'configured':![],'scope':_0x31166e};return _0x53c1d9[_0x257df2(0xed)]=_0x53c1d9[_0x257df2(0xed)]||_0x559ded,_0x53c1d9[_0x257df2(0xe2)]=[..._0x7b063c,_0x141fd7],await mkdir(getOpencodeConfigDir(_0x31166e),{'recursive':!![]}),await writeFile(_0x5ce59a,_0x520621['AknQC'](JSON[_0x257df2(0xe4)](_0x53c1d9,null,0x2),'\x0a')),console['log'](_0x520621['ulXfy']),{'configured':!![],'scope':_0x31166e};}
@@ -1 +1 @@
1
- (function(_0x4df791,_0x25803f){const _0x29c778=_0x1bf9,_0x5999c3=_0x4df791();while(!![]){try{const _0x35af39=parseInt(_0x29c778(0xfc))/0x1+-parseInt(_0x29c778(0x10b))/0x2*(-parseInt(_0x29c778(0x120))/0x3)+-parseInt(_0x29c778(0xf8))/0x4*(-parseInt(_0x29c778(0x134))/0x5)+-parseInt(_0x29c778(0x113))/0x6*(-parseInt(_0x29c778(0xf9))/0x7)+parseInt(_0x29c778(0x110))/0x8+-parseInt(_0x29c778(0xff))/0x9*(parseInt(_0x29c778(0x10d))/0xa)+-parseInt(_0x29c778(0x119))/0xb*(parseInt(_0x29c778(0x127))/0xc);if(_0x35af39===_0x25803f)break;else _0x5999c3['push'](_0x5999c3['shift']());}catch(_0x188f29){_0x5999c3['push'](_0x5999c3['shift']());}}}(_0x22a4,0x57aff));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';function _0x22a4(){const _0x33c480=['693621jTGEIe','length','FPhUa','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','isDirectory','ranger@trailhead','pkZsP','success','profile_activate','Failed\x20to\x20install\x20plugin:','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','sessions','32bBeAPI','map','30bDhXbn','BKezg','settings.json','4360528ldGjyC','QIufU','trackPhaseEnd','1761810MQYVeJ','oueph','AZjEz','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','EHagP','rWmbz','55JQdOiX','plugin','ranger-testing/trailhead','name','trackPhaseStart','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','87507zggpQY','filter','Fnoya','zXcJK','message','path','HtdbT','4045740JRgwUK','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','MwXsm','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','--scope','hIles','skills','EhjiT','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','baseUrl','chromium','project','10585gfloMb','ldrxX','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','MExJo','marketplace','log','dir_setup','profile','1172ccsxiV','7WocLvx','fLiYl','error','350413OlxPvH','wMZvL','OvfgI'];_0x22a4=function(){return _0x33c480;};return _0x22a4();}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x56a9ab){const _0x24e463=_0x1bf9,_0x47e09d={'QLeVr':function(_0x26b9df){return _0x26b9df();},'HtdbT':function(_0x49e4d3,_0x280642,_0x540f3e){return _0x49e4d3(_0x280642,_0x540f3e);},'MExJo':function(_0x27a294,_0x43dc9b){return _0x27a294+_0x43dc9b;},'ldrxX':_0x24e463(0x130),'IimeM':function(_0x1edc04,_0x2695ee,_0x5f564a){return _0x1edc04(_0x2695ee,_0x5f564a);},'mPLLQ':function(_0x1f2e33,_0x262045){return _0x1f2e33===_0x262045;},'BKezg':'No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','xuAXm':function(_0x43a323,_0x4f381a){return _0x43a323===_0x4f381a;}},_0x46990c=_0x47e09d['QLeVr'](getRangerDir),_0x5e6e82=join(_0x46990c,'ci');if(_0x56a9ab){const _0x1ac09d=_0x47e09d[_0x24e463(0x126)](join,_0x5e6e82,_0x56a9ab);return{'name':_0x56a9ab,'path':_0x1ac09d};}if(!existsSync(_0x5e6e82))throw new Error(_0x47e09d[_0x24e463(0x137)](_0x24e463(0x11f),_0x47e09d['ldrxX']));const _0xa845a0=await _0x47e09d['IimeM'](readdir,_0x5e6e82,{'withFileTypes':!![]}),_0x2d42f3=_0xa845a0[_0x24e463(0x121)](_0x20df26=>_0x20df26[_0x24e463(0x103)]())[_0x24e463(0x10c)](_0x577753=>_0x577753['name']);if(_0x47e09d['mPLLQ'](_0x2d42f3[_0x24e463(0x100)],0x0))throw new Error(_0x47e09d[_0x24e463(0x10e)]+_0x47e09d[_0x24e463(0x135)]);if(_0x47e09d['xuAXm'](_0x2d42f3['length'],0x1)){const _0x2e394c=_0x2d42f3[0x0];return console['log']('Auto-detected\x20CI\x20profile:\x20'+_0x2e394c),{'name':_0x2e394c,'path':join(_0x5e6e82,_0x2e394c)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x2d42f3['join'](',\x20')+_0x24e463(0x128));}function _0x1bf9(_0x4a4c57,_0x6f1644){_0x4a4c57=_0x4a4c57-0xf4;const _0x22a4e1=_0x22a4();let _0x1bf96c=_0x22a4e1[_0x4a4c57];return _0x1bf96c;}async function installPluginNonInteractive(){const _0x2e0ed5=_0x1bf9,_0x3e5716={'xGcHA':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','OvfgI':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','pkZsP':function(_0x5638e4,_0x5b51b1){return _0x5638e4(_0x5b51b1);},'fLiYl':'trailhead','NSsOm':'add','EhjiT':'Failed\x20to\x20add\x20marketplace:','RQJHe':_0x2e0ed5(0x136),'eLsWT':_0x2e0ed5(0x104),'lFcEo':_0x2e0ed5(0x12c),'MwXsm':_0x2e0ed5(0x133),'bhYmn':_0x2e0ed5(0x12b),'zXcJK':'✓\x20Claude\x20Code\x20plugin\x20installed'},_0x38025a=await isPluginInstalled('ranger@trailhead');if(_0x38025a)return console[_0x2e0ed5(0xf5)](_0x3e5716['xGcHA']),![];console['log'](_0x3e5716[_0x2e0ed5(0xfe)]);const _0x2cf9f3=await _0x3e5716[_0x2e0ed5(0x105)](isMarketplaceAdded,_0x3e5716[_0x2e0ed5(0xfa)]);let _0x3e7a46=_0x2cf9f3;if(_0x2cf9f3)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0x41234e=await runClaudeCommand(['plugin',_0x2e0ed5(0xf4),_0x3e5716['NSsOm'],_0x2e0ed5(0x11b)]);!_0x41234e[_0x2e0ed5(0x106)]?(console['error'](_0x3e5716[_0x2e0ed5(0x12f)],_0x41234e['error']),console['log'](_0x3e5716['RQJHe'])):_0x3e7a46=!![];}if(_0x3e7a46){const _0x58f918=await runClaudeCommand(['plugin','install',_0x3e5716['eLsWT'],_0x3e5716['lFcEo'],_0x3e5716[_0x2e0ed5(0x12a)]]);!_0x58f918[_0x2e0ed5(0x106)]?(console[_0x2e0ed5(0xfb)](_0x2e0ed5(0x108),_0x58f918['error']),console['log'](_0x3e5716['bhYmn'])):console['log'](_0x3e5716[_0x2e0ed5(0x123)]);}return!![];}export async function setupCi(_0x52cdd4,_0x2fe642,_0x25d122){const _0xd6331b=_0x1bf9,_0x327424={'QIufU':'auth','hIles':function(_0xab8c2c,_0xb30abd){return _0xab8c2c(_0xb30abd);},'Fnoya':function(_0x1a8eac,_0x1ef330,_0x243ae6){return _0x1a8eac(_0x1ef330,_0x243ae6);},'Sbtjn':_0xd6331b(0x10a),'YqjXD':_0xd6331b(0xf6),'ybTgB':function(_0x53545e){return _0x53545e();},'EHagP':function(_0x433481,_0x2c5c3b,_0xd9b37f){return _0x433481(_0x2c5c3b,_0xd9b37f);},'darUW':_0xd6331b(0x10f),'kFkJK':function(_0x24f2ca,_0x220f7d){return _0x24f2ca(_0x220f7d);},'FPhUa':'No\x20API\x20token\x20available\x20for\x20decryption','rWmbz':_0xd6331b(0x109),'SPLqz':_0xd6331b(0x11e),'wMZvL':_0xd6331b(0x11a),'AZjEz':_0xd6331b(0x133),'rtrAm':_0xd6331b(0x12e),'oueph':_0xd6331b(0x102)};console['log'](_0xd6331b(0x129)),_0x25d122?.[_0xd6331b(0x11d)](_0x327424[_0xd6331b(0x111)]),await _0x327424['hIles'](authenticate,_0x52cdd4),_0x25d122?.['trackPhaseEnd'](_0x327424[_0xd6331b(0x111)]),_0x25d122?.[_0xd6331b(0x11d)](_0xd6331b(0xf6));const {path:_0x4c5b77,installed:_0x470fa7}=await ensureRangerDir();await writeRangerGitignore(_0x4c5b77);const _0x39579f=_0x327424[_0xd6331b(0x122)](join,_0x4c5b77,_0x327424['Sbtjn']);!_0x327424[_0xd6331b(0x12d)](existsSync,_0x39579f)&&await mkdir(_0x39579f,{'recursive':!![]});_0x25d122?.['trackPhaseEnd'](_0x327424['YqjXD'],{'installed':_0x470fa7}),_0x25d122?.['trackPhaseStart']('chromium');let _0x49bf00=![];_0x2fe642?.['skipChromium']?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x49bf00=await _0x327424['ybTgB'](ensureChromium);_0x25d122?.[_0xd6331b(0x112)](_0xd6331b(0x132),{'installed':_0x49bf00,'skipped':!!_0x2fe642?.['skipChromium']}),_0x25d122?.['trackPhaseStart'](_0xd6331b(0x107));const _0x5cac05=await findCiProfile(_0x2fe642?.[_0xd6331b(0xf7)]);let _0x3485e9=![];_0x2fe642?.['baseUrl']&&(await _0x327424[_0xd6331b(0x117)](mkdir,_0x5cac05['path'],{'recursive':!![]}),await _0x327424[_0xd6331b(0x117)](saveSettings,_0x5cac05['name'],{'baseUrl':_0x2fe642[_0xd6331b(0x131)],'headless':!![]}),console[_0xd6331b(0xf5)]('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x2fe642[_0xd6331b(0x131)]),_0x3485e9=!![]);const _0x1e82de=_0x327424['Fnoya'](join,_0x5cac05[_0xd6331b(0x125)],_0x327424['darUW']);if(!_0x327424['kFkJK'](existsSync,_0x1e82de)&&!_0x3485e9)throw new Error('CI\x20profile\x20\x22'+_0x5cac05['name']+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x515a85=join(_0x5cac05[_0xd6331b(0x125)],'auth.json'),_0x54efb4=join(_0x5cac05[_0xd6331b(0x125)],'auth.json.enc'),_0x551757=existsSync(_0x515a85),_0x31cb3e=existsSync(_0x54efb4);if(_0x31cb3e)try{const _0x36ed20=await getToken();if(!_0x36ed20)throw new Error(_0x327424[_0xd6331b(0x101)]);const _0x3f1801=await readFile(_0x54efb4);decrypt(_0x3f1801,_0x36ed20),console['log'](_0x327424[_0xd6331b(0x118)]);}catch(_0x435de3){const _0x2e09c7=_0x435de3 instanceof Error?_0x435de3[_0xd6331b(0x124)]:_0x327424['kFkJK'](String,_0x435de3);throw new Error(_0xd6331b(0x116)+_0x5cac05['name']+'\x22:\x20'+_0x2e09c7);}else _0x551757?console['log']('✓\x20Auth\x20state\x20found'):console[_0xd6331b(0xf5)](_0x327424['SPLqz']);await writeActiveProfileName(_0x5cac05[_0xd6331b(0x11c)]),console[_0xd6331b(0xf5)]('✓\x20Active\x20profile:\x20'+_0x5cac05[_0xd6331b(0x11c)]),_0x25d122?.['trackPhaseEnd']('profile_activate',{'profileName':_0x5cac05[_0xd6331b(0x11c)],'hasAuth':_0x551757,'hasEncryptedAuth':_0x31cb3e,'createdSettings':_0x3485e9}),_0x25d122?.['trackPhaseStart'](_0x327424[_0xd6331b(0xfd)]);const _0x22c2bb=await installPluginNonInteractive();_0x25d122?.['trackPhaseEnd'](_0xd6331b(0x11a),{'installed':_0x22c2bb}),_0x25d122?.[_0xd6331b(0x11d)](_0xd6331b(0x12e)),await skillup({'autoInstall':_0x327424[_0xd6331b(0x115)]}),_0x25d122?.['trackPhaseEnd'](_0x327424['rtrAm']),console[_0xd6331b(0xf5)](_0x327424[_0xd6331b(0x114)]);}
1
+ (function(_0x1fb5ff,_0x10ef82){const _0x2a3801=_0x16ff,_0x26e544=_0x1fb5ff();while(!![]){try{const _0x497705=-parseInt(_0x2a3801(0x100))/0x1*(parseInt(_0x2a3801(0x10f))/0x2)+-parseInt(_0x2a3801(0x129))/0x3+-parseInt(_0x2a3801(0x11b))/0x4*(-parseInt(_0x2a3801(0x12c))/0x5)+parseInt(_0x2a3801(0xf8))/0x6+-parseInt(_0x2a3801(0x12a))/0x7+-parseInt(_0x2a3801(0x127))/0x8*(-parseInt(_0x2a3801(0x10b))/0x9)+-parseInt(_0x2a3801(0x133))/0xa*(-parseInt(_0x2a3801(0x130))/0xb);if(_0x497705===_0x10ef82)break;else _0x26e544['push'](_0x26e544['shift']());}catch(_0x354b2a){_0x26e544['push'](_0x26e544['shift']());}}}(_0x4863,0xaf63c));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';function _0x4863(){const _0x10c3a3=['RXRsB','UmRqV','trackPhaseStart','eQwIv','settings.json','lDBTB','chromium','dir_setup','log','profile_activate','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','12072lMrkuB','gqBGT','4106550zPTqsm','8923236LJeyWl','IddrW','5812405cFkpbO','trailhead','No\x20API\x20token\x20available\x20for\x20decryption','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','154bMulld','join','fmmtP','367390MylLZj','XZXZU','TbAFU','length','plugin','baseUrl','error','cPpLW','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','ufxLb','OYcJN','skills','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','success','UkAiS','ixCII','kJpPU','path','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','6001008bXtCuu','✓\x20Claude\x20Code\x20plugin\x20installed','ySBHY','myFlD','message','✓\x20Created\x20profile\x20settings:\x20baseUrl=','Failed\x20to\x20add\x20marketplace:','UXVko','3TwUVAx','map','cJdOB','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','auth.json.enc','VHAFT','trackPhaseEnd','✓\x20Auth\x20state\x20found','OHTxS','wzTSE','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','5337ILZNQt','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','RRCYY','filter','139892RkptzF','project','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','JVYUO','onlWs','name','HVzei','skipChromium','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','wYtOK','auth','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','4HJtLjg'];_0x4863=function(){return _0x10c3a3;};return _0x4863();}import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x16ff(_0x4a98d3,_0x433ae6){_0x4a98d3=_0x4a98d3-0xf3;const _0x4863de=_0x4863();let _0x16ff33=_0x4863de[_0x4a98d3];return _0x16ff33;}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(_0x34b2bf){const _0xaaa9cb=_0x16ff,_0x26f8b3={'NeMrx':function(_0x3ff3aa){return _0x3ff3aa();},'gqBGT':function(_0x4036bf,_0x3bc664,_0x58e9d8){return _0x4036bf(_0x3bc664,_0x58e9d8);},'ezjrh':_0xaaa9cb(0x103),'eQwIv':function(_0x4de6b7,_0x4615e8){return _0x4de6b7===_0x4615e8;},'lDBTB':function(_0x161e7a,_0x334c53){return _0x161e7a+_0x334c53;},'OHTxS':_0xaaa9cb(0x11a),'myFlD':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'},_0x310b04=_0x26f8b3['NeMrx'](getRangerDir),_0x458dd9=join(_0x310b04,'ci');if(_0x34b2bf){const _0x343a4c=_0x26f8b3[_0xaaa9cb(0x128)](join,_0x458dd9,_0x34b2bf);return{'name':_0x34b2bf,'path':_0x343a4c};}if(!existsSync(_0x458dd9))throw new Error(_0x26f8b3['ezjrh']+_0xaaa9cb(0x13b));const _0x5a3d9e=await readdir(_0x458dd9,{'withFileTypes':!![]}),_0x19c092=_0x5a3d9e[_0xaaa9cb(0x10e)](_0x42dacd=>_0x42dacd['isDirectory']())[_0xaaa9cb(0x101)](_0x32a46f=>_0x32a46f['name']);if(_0x26f8b3[_0xaaa9cb(0x11f)](_0x19c092[_0xaaa9cb(0x136)],0x0))throw new Error(_0x26f8b3[_0xaaa9cb(0x121)](_0x26f8b3[_0xaaa9cb(0x108)],_0x26f8b3[_0xaaa9cb(0xfb)]));if(_0x19c092[_0xaaa9cb(0x136)]===0x1){const _0x41325f=_0x19c092[0x0];return console[_0xaaa9cb(0x124)]('Auto-detected\x20CI\x20profile:\x20'+_0x41325f),{'name':_0x41325f,'path':join(_0x458dd9,_0x41325f)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x19c092[_0xaaa9cb(0x131)](',\x20')+_0xaaa9cb(0xf7));}async function installPluginNonInteractive(){const _0x36cdff=_0x16ff,_0x3fa74d={'IddrW':function(_0x481d20,_0x2b67db){return _0x481d20(_0x2b67db);},'UXVko':_0x36cdff(0x13f),'ixCII':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','VHAFT':_0x36cdff(0x12d),'OYcJN':'✓\x20Marketplace\x20already\x20added','DpGBB':'marketplace','gFKfi':'ranger-testing/trailhead','ieojc':_0x36cdff(0xfe),'TbAFU':_0x36cdff(0x111),'RRCYY':'plugin','vSbfS':'install','wPsVU':'ranger@trailhead','onlWs':'--scope','XXLtt':'Failed\x20to\x20install\x20plugin:','ySBHY':_0x36cdff(0x117),'ufxLb':_0x36cdff(0xf9)},_0x262a88=await _0x3fa74d[_0x36cdff(0x12b)](isPluginInstalled,'ranger@trailhead');if(_0x262a88)return console['log'](_0x3fa74d[_0x36cdff(0xff)]),![];console['log'](_0x3fa74d[_0x36cdff(0xf4)]);const _0x424b0f=await isMarketplaceAdded(_0x3fa74d[_0x36cdff(0x105)]);let _0xcacc58=_0x424b0f;if(_0x424b0f)console[_0x36cdff(0x124)](_0x3fa74d[_0x36cdff(0x13d)]);else{const _0x3ee3a5=await _0x3fa74d['IddrW'](runClaudeCommand,[_0x36cdff(0x137),_0x3fa74d['DpGBB'],'add',_0x3fa74d['gFKfi']]);!_0x3ee3a5['success']?(console['error'](_0x3fa74d['ieojc'],_0x3ee3a5[_0x36cdff(0x139)]),console['log'](_0x3fa74d[_0x36cdff(0x135)])):_0xcacc58=!![];}if(_0xcacc58){const _0x332d03=await runClaudeCommand([_0x3fa74d[_0x36cdff(0x10d)],_0x3fa74d['vSbfS'],_0x3fa74d['wPsVU'],_0x3fa74d[_0x36cdff(0x113)],_0x36cdff(0x110)]);!_0x332d03[_0x36cdff(0x140)]?(console['error'](_0x3fa74d['XXLtt'],_0x332d03[_0x36cdff(0x139)]),console[_0x36cdff(0x124)](_0x3fa74d[_0x36cdff(0xfa)])):console['log'](_0x3fa74d[_0x36cdff(0x13c)]);}return!![];}export async function setupCi(_0x19ce0d,_0x4c1c59,_0x10bfea){const _0x415991=_0x16ff,_0x642f74={'wYtOK':_0x415991(0x119),'fmmtP':function(_0x16f84f,_0x16bae5){return _0x16f84f(_0x16bae5);},'UkAiS':function(_0xd70b64){return _0xd70b64();},'RXRsB':function(_0x36db1b,_0x142361){return _0x36db1b(_0x142361);},'cPpLW':function(_0x41d59,_0x3481f3,_0x182ea7){return _0x41d59(_0x3481f3,_0x182ea7);},'pebBx':'chromium','dKdLd':_0x415991(0x125),'HVzei':function(_0x5baa1c,_0x403e8f,_0x132bb1){return _0x5baa1c(_0x403e8f,_0x132bb1);},'UmRqV':_0x415991(0x120),'JVYUO':function(_0x39551b,_0x46cc58,_0x481a85){return _0x39551b(_0x46cc58,_0x481a85);},'cJdOB':'auth.json','NUBNA':_0x415991(0x104),'wzTSE':_0x415991(0x12e),'kJpPU':_0x415991(0x12f),'XZXZU':function(_0x2574d2,_0x563c42){return _0x2574d2 instanceof _0x563c42;},'VChAe':function(_0x30c34b,_0x4e9123){return _0x30c34b(_0x4e9123);},'TOnJF':_0x415991(0x13e),'rDXjd':_0x415991(0x10a)};console[_0x415991(0x124)](_0x415991(0x126)),_0x10bfea?.['trackPhaseStart'](_0x642f74['wYtOK']),await _0x642f74[_0x415991(0x132)](authenticate,_0x19ce0d),_0x10bfea?.[_0x415991(0x106)](_0x642f74[_0x415991(0x118)]),_0x10bfea?.['trackPhaseStart'](_0x415991(0x123));const {path:_0x1ce6ac,installed:_0x3fb084}=await _0x642f74[_0x415991(0xf3)](ensureRangerDir);await writeRangerGitignore(_0x1ce6ac);const _0x35ac06=join(_0x1ce6ac,'sessions');!_0x642f74[_0x415991(0x11c)](existsSync,_0x35ac06)&&await _0x642f74[_0x415991(0x13a)](mkdir,_0x35ac06,{'recursive':!![]});_0x10bfea?.['trackPhaseEnd'](_0x415991(0x123),{'installed':_0x3fb084}),_0x10bfea?.['trackPhaseStart'](_0x642f74['pebBx']);let _0x4953ff=![];_0x4c1c59?.[_0x415991(0x116)]?console[_0x415991(0x124)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x4953ff=await ensureChromium();_0x10bfea?.[_0x415991(0x106)](_0x415991(0x122),{'installed':_0x4953ff,'skipped':!!_0x4c1c59?.['skipChromium']}),_0x10bfea?.[_0x415991(0x11e)](_0x642f74['dKdLd']);const _0x1c80e7=await _0x642f74['fmmtP'](findCiProfile,_0x4c1c59?.['profile']);let _0xd5cd49=![];_0x4c1c59?.['baseUrl']&&(await mkdir(_0x1c80e7['path'],{'recursive':!![]}),await _0x642f74['HVzei'](saveSettings,_0x1c80e7['name'],{'baseUrl':_0x4c1c59[_0x415991(0x138)],'headless':!![]}),console[_0x415991(0x124)](_0x415991(0xfd)+_0x4c1c59[_0x415991(0x138)]),_0xd5cd49=!![]);const _0x42dbe5=join(_0x1c80e7[_0x415991(0xf6)],_0x642f74[_0x415991(0x11d)]);if(!existsSync(_0x42dbe5)&&!_0xd5cd49)throw new Error('CI\x20profile\x20\x22'+_0x1c80e7['name']+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x500d61=_0x642f74[_0x415991(0x112)](join,_0x1c80e7['path'],_0x642f74[_0x415991(0x102)]),_0x2c9f83=join(_0x1c80e7['path'],_0x642f74['NUBNA']),_0x514a97=_0x642f74['fmmtP'](existsSync,_0x500d61),_0x4b0c1b=_0x642f74[_0x415991(0x11c)](existsSync,_0x2c9f83);if(_0x4b0c1b)try{const _0x2d5b4f=await getToken();if(!_0x2d5b4f)throw new Error(_0x642f74[_0x415991(0x109)]);const _0x42273e=await readFile(_0x2c9f83);_0x642f74[_0x415991(0x115)](decrypt,_0x42273e,_0x2d5b4f),console['log'](_0x642f74[_0x415991(0xf5)]);}catch(_0x2537fd){const _0x28ba59=_0x642f74[_0x415991(0x134)](_0x2537fd,Error)?_0x2537fd[_0x415991(0xfc)]:String(_0x2537fd);throw new Error(_0x415991(0x10c)+_0x1c80e7['name']+'\x22:\x20'+_0x28ba59);}else _0x514a97?console[_0x415991(0x124)](_0x415991(0x107)):console['log']('\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)');await _0x642f74['VChAe'](writeActiveProfileName,_0x1c80e7['name']),console[_0x415991(0x124)]('✓\x20Active\x20profile:\x20'+_0x1c80e7[_0x415991(0x114)]),_0x10bfea?.[_0x415991(0x106)](_0x415991(0x125),{'profileName':_0x1c80e7[_0x415991(0x114)],'hasAuth':_0x514a97,'hasEncryptedAuth':_0x4b0c1b,'createdSettings':_0xd5cd49}),_0x10bfea?.['trackPhaseStart']('plugin');const _0x1184b0=await _0x642f74['UkAiS'](installPluginNonInteractive);_0x10bfea?.[_0x415991(0x106)]('plugin',{'installed':_0x1184b0}),_0x10bfea?.['trackPhaseStart'](_0x642f74['TOnJF']),await _0x642f74['fmmtP'](skillup,{'autoInstall':_0x415991(0x110)}),_0x10bfea?.[_0x415991(0x106)](_0x415991(0x13e)),console[_0x415991(0x124)](_0x642f74['rDXjd']);}
@@ -1 +1 @@
1
- function _0x357d(){const _0x3f0fb4=['\x20--opencode','YzuOX','\x20skill','109574XQbJGa','installLevel','\x20<your-api-token>','This\x20project\x20only\x20(','\x20successfully!\x0a','warn','\x20\x203.\x20Run:\x20ranger\x20skillup','3rPvwbz','90NPdWHD','1003036dFssTK','14880bJtwYU','8fxcUWf','project-level','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','2gMxZNi','ranger','CJCvd','log','user-level','1887636lpXBMj','YIVZT','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','user','All\x20projects\x20(','\x20\x202.\x20Run:\x20ranger\x20setup','PbNFu','autoInstall','XiedE','Where\x20should\x20skills\x20be\x20installed?','ZJdeh','message','VcePr','1859KyybiP','stdin','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','prompt','\x0a✅\x20Installed\x20','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','74097WWnuQJ','ooUYd','opencode','HBzFU','vTONS','869743LkDuXr','split','tfkzF','402310ZappGS','list','✓\x20Found\x20API\x20token','xVQiY'];_0x357d=function(){return _0x3f0fb4;};return _0x357d();}(function(_0x2f4ebb,_0x5ec1bc){const _0x5ab2f2=_0x40bb,_0x55e439=_0x2f4ebb();while(!![]){try{const _0xbc468f=-parseInt(_0x5ab2f2(0x17f))/0x1*(-parseInt(_0x5ab2f2(0x18d))/0x2)+-parseInt(_0x5ab2f2(0x186))/0x3*(parseInt(_0x5ab2f2(0x188))/0x4)+parseInt(_0x5ab2f2(0x178))/0x5+parseInt(_0x5ab2f2(0x192))/0x6+-parseInt(_0x5ab2f2(0x175))/0x7*(-parseInt(_0x5ab2f2(0x18a))/0x8)+-parseInt(_0x5ab2f2(0x170))/0x9*(-parseInt(_0x5ab2f2(0x187))/0xa)+parseInt(_0x5ab2f2(0x19f))/0xb*(-parseInt(_0x5ab2f2(0x189))/0xc);if(_0xbc468f===_0x5ec1bc)break;else _0x55e439['push'](_0x55e439['shift']());}catch(_0x56de54){_0x55e439['push'](_0x55e439['shift']());}}}(_0x357d,0x3b3ed));import{basename}from'path';import _0x1b1bcd from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';function _0x40bb(_0x36fb7a,_0x5d3d7b){_0x36fb7a=_0x36fb7a-0x170;const _0x357d91=_0x357d();let _0x40bb9b=_0x357d91[_0x36fb7a];return _0x40bb9b;}import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x1af866={}){const _0x49b0b5=_0x40bb,_0x526db3={'coqyO':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','ZJdeh':'claude','OTgjS':function(_0x179362){return _0x179362();},'tfkzF':function(_0x17c196,_0x43bfe0){return _0x17c196===_0x43bfe0;},'ooUYd':_0x49b0b5(0x17c),'XiedE':function(_0x2be8c2,_0x20c70b){return _0x2be8c2===_0x20c70b;},'PbNFu':_0x49b0b5(0x172),'PRjXN':'To\x20get\x20started:','YIVZT':_0x49b0b5(0x17a),'sqvQb':function(_0x44b2a7){return _0x44b2a7();},'xVQiY':function(_0xace1a,_0x1d9c95){return _0xace1a(_0x1d9c95);},'YzuOX':function(_0x5b8d39,_0x5da432){return _0x5b8d39===_0x5da432;},'JvxNB':'project','CJCvd':function(_0x2715da,_0xe979ef,_0x586cb8){return _0x2715da(_0xe979ef,_0x586cb8);},'HBzFU':_0x49b0b5(0x1a1),'VcePr':function(_0xfe2fa8,_0x303649){return _0xfe2fa8>_0x303649;},'fdWef':_0x49b0b5(0x195),'vTONS':_0x49b0b5(0x18b),'ZtsUH':_0x49b0b5(0x1a4)};console[_0x49b0b5(0x190)](_0x526db3['coqyO']);const _0x23a342=_0x1af866['platform']??_0x526db3[_0x49b0b5(0x19c)],_0x31a0a3=await _0x526db3['OTgjS'](getToken);if(!_0x31a0a3){const _0x449382='1|4|0|3|2|5'[_0x49b0b5(0x176)]('|');let _0x114ac4=0x0;while(!![]){switch(_0x449382[_0x114ac4++]){case'0':console['log']('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli');continue;case'1':console[_0x49b0b5(0x190)](_0x49b0b5(0x194));continue;case'2':console['log'](_0x49b0b5(0x185)+(_0x526db3[_0x49b0b5(0x177)](_0x23a342,_0x49b0b5(0x172))?_0x526db3[_0x49b0b5(0x171)]:'')+'\x0a');continue;case'3':console['log'](_0x49b0b5(0x197)+(_0x526db3[_0x49b0b5(0x19a)](_0x23a342,_0x526db3[_0x49b0b5(0x198)])?_0x526db3[_0x49b0b5(0x171)]:'')+_0x49b0b5(0x181));continue;case'4':console[_0x49b0b5(0x190)](_0x526db3['PRjXN']);continue;case'5':return;}break;}}console['log'](_0x526db3[_0x49b0b5(0x193)]);const _0x2f0cc6=_0x526db3['sqvQb'](getProjectRoot),_0x5a4a19=_0x526db3[_0x49b0b5(0x17b)](basename,_0x2f0cc6),_0x2a4255=_0x526db3[_0x49b0b5(0x17d)](_0x23a342,'opencode')?getOpencodeConfigDir('user')+'/skills/':getClaudeConfigDir()+'/skills/',_0x4f8616=_0x23a342==='opencode'?_0x2f0cc6+'/.opencode/skills/':_0x2f0cc6+'/.claude/skills/',_0x1558cd=process[_0x49b0b5(0x1a0)]['isTTY']&&process['stdout']['isTTY'];let _0x174d7a;if(_0x1af866['autoInstall'])_0x174d7a=_0x1af866[_0x49b0b5(0x199)];else{if(_0x1558cd){const _0x402bab=await _0x1b1bcd[_0x49b0b5(0x1a2)]([{'type':_0x49b0b5(0x179),'name':_0x49b0b5(0x180),'message':_0x49b0b5(0x19b),'choices':[{'name':_0x49b0b5(0x196)+_0x2a4255+')','value':_0x49b0b5(0x195)},{'name':_0x49b0b5(0x182)+_0x4f8616+')','value':'project'}]}]);_0x174d7a=_0x402bab['installLevel'];}else _0x174d7a=_0x526db3['JvxNB'],console[_0x49b0b5(0x190)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x4f8616+')');}let _0x125fb2=0x0;const _0x4e2e70=getCurrentVersion();console[_0x49b0b5(0x190)]('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x3e7707=await _0x526db3[_0x49b0b5(0x18f)](installSkill,_0x49b0b5(0x18e),{'cliVersion':_0x4e2e70,'level':_0x174d7a,'platform':_0x23a342});_0x3e7707&&_0x125fb2++;}catch(_0x449a73){console[_0x49b0b5(0x184)](_0x526db3[_0x49b0b5(0x173)],_0x449a73 instanceof Error?_0x449a73[_0x49b0b5(0x19d)]:_0x449a73);}if(_0x526db3[_0x49b0b5(0x19e)](_0x125fb2,0x0)){const _0x4814c6=_0x174d7a===_0x526db3['fdWef']?_0x49b0b5(0x191):_0x526db3[_0x49b0b5(0x174)];console['log'](_0x49b0b5(0x1a3)+_0x125fb2+'\x20'+_0x4814c6+_0x49b0b5(0x17e)+(_0x125fb2>0x1?'s':'')+_0x49b0b5(0x183)),!_0x1af866['suppressUsage']&&(console['log']('To\x20use:'),_0x23a342===_0x526db3['PbNFu']?console[_0x49b0b5(0x190)](_0x49b0b5(0x18c)):console[_0x49b0b5(0x190)]('\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!'));}else console['log'](_0x526db3['ZtsUH']);}
1
+ (function(_0x110155,_0xba47af){const _0x2e2fab=_0x59d5,_0x3779fb=_0x110155();while(!![]){try{const _0x43c1fd=-parseInt(_0x2e2fab(0x104))/0x1*(parseInt(_0x2e2fab(0x10f))/0x2)+parseInt(_0x2e2fab(0x116))/0x3+-parseInt(_0x2e2fab(0x113))/0x4+-parseInt(_0x2e2fab(0x117))/0x5+-parseInt(_0x2e2fab(0x11c))/0x6+parseInt(_0x2e2fab(0xfe))/0x7*(parseInt(_0x2e2fab(0x100))/0x8)+parseInt(_0x2e2fab(0xfa))/0x9;if(_0x43c1fd===_0xba47af)break;else _0x3779fb['push'](_0x3779fb['shift']());}catch(_0x5632a9){_0x3779fb['push'](_0x3779fb['shift']());}}}(_0x570e,0x6026c));import{basename}from'path';import _0x4d3038 from'inquirer';import{getToken}from'./utils/keychain.js';function _0x570e(){const _0x30e98e=['770655pvAPFI','\x20--opencode','isTTY','project-level','To\x20get\x20started:','4547418qoVXQa','MKjYi','/skills/','ENZdn','AWHbu','prompt','ErfHP','Where\x20should\x20skills\x20be\x20installed?','suppressUsage','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','split','\x20successfully!\x0a','9720423xKfwoL','\x20skill','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','7qLDoeT','WkzCq','3129784NywopH','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','txFaZ','user','31WjEksD','project','claude','To\x20use:','log','warn','Elkhu','iYGxD','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','\x20\x202.\x20Run:\x20ranger\x20setup','ByKLQ','17972URMOez','\x20<your-api-token>','dKYSx','\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!','1113544BUIsZK','installLevel','\x0a✅\x20Installed\x20','1174656Nahzmr'];_0x570e=function(){return _0x30e98e;};return _0x570e();}import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';function _0x59d5(_0x2b09c5,_0xa5c6b2){_0x2b09c5=_0x2b09c5-0xf3;const _0x570e05=_0x570e();let _0x59d566=_0x570e05[_0x2b09c5];return _0x59d566;}import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x2b03c4={}){const _0x4dbae9=_0x59d5,_0x4029f3={'gYzhG':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','ErfHP':'3|1|2|4|5|0','dKYSx':'opencode','AWHbu':function(_0x124315,_0x16ef6c){return _0x124315===_0x16ef6c;},'ENZdn':function(_0x2d45ed,_0x83ce96){return _0x2d45ed===_0x83ce96;},'WkzCq':function(_0x4d5744,_0xad5056){return _0x4d5744(_0xad5056);},'MKjYi':_0x4dbae9(0x103),'Elkhu':function(_0x5e70f5){return _0x5e70f5();},'gNMSo':'list','rIVzR':_0x4dbae9(0xf5),'iHWrU':_0x4dbae9(0x105),'iYGxD':function(_0x398680,_0x4b8681,_0xd23939){return _0x398680(_0x4b8681,_0xd23939);},'jdIvk':_0x4dbae9(0x10c),'txFaZ':function(_0x4c6489,_0x30c500){return _0x4c6489>_0x30c500;},'SBnDK':'user-level','ByKLQ':function(_0x28b881,_0x5241c8){return _0x28b881===_0x5241c8;}};console['log'](_0x4029f3['gYzhG']);const _0x9ae306=_0x2b03c4['platform']??_0x4dbae9(0x106),_0x412503=await getToken();if(!_0x412503){const _0x5c5b8d=_0x4029f3[_0x4dbae9(0xf4)][_0x4dbae9(0xf8)]('|');let _0x4b2043=0x0;while(!![]){switch(_0x5c5b8d[_0x4b2043++]){case'0':return;case'1':console[_0x4dbae9(0x108)](_0x4dbae9(0x11b));continue;case'2':console['log'](_0x4dbae9(0xfd));continue;case'3':console[_0x4dbae9(0x108)](_0x4dbae9(0xf7));continue;case'4':console['log'](_0x4dbae9(0x10d)+(_0x9ae306===_0x4029f3['dKYSx']?'\x20--opencode':'')+_0x4dbae9(0x110));continue;case'5':console[_0x4dbae9(0x108)]('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x4029f3[_0x4dbae9(0x120)](_0x9ae306,_0x4029f3['dKYSx'])?_0x4dbae9(0x118):'')+'\x0a');continue;}break;}}console[_0x4dbae9(0x108)]('✓\x20Found\x20API\x20token');const _0x5cebcb=getProjectRoot(),_0x13c01e=basename(_0x5cebcb),_0xf7bb90=_0x4029f3[_0x4dbae9(0x11f)](_0x9ae306,_0x4029f3['dKYSx'])?_0x4029f3[_0x4dbae9(0xff)](getOpencodeConfigDir,_0x4029f3[_0x4dbae9(0x11d)])+_0x4dbae9(0x11e):_0x4029f3[_0x4dbae9(0x10a)](getClaudeConfigDir)+_0x4dbae9(0x11e),_0x42544a=_0x9ae306===_0x4029f3[_0x4dbae9(0x111)]?_0x5cebcb+'/.opencode/skills/':_0x5cebcb+'/.claude/skills/',_0x1b3868=process['stdin'][_0x4dbae9(0x119)]&&process['stdout'][_0x4dbae9(0x119)];let _0x546324;if(_0x2b03c4['autoInstall'])_0x546324=_0x2b03c4['autoInstall'];else{if(_0x1b3868){const _0x354f20=await _0x4d3038[_0x4dbae9(0xf3)]([{'type':_0x4029f3['gNMSo'],'name':_0x4dbae9(0x114),'message':_0x4029f3['rIVzR'],'choices':[{'name':'All\x20projects\x20('+_0xf7bb90+')','value':_0x4029f3['MKjYi']},{'name':'This\x20project\x20only\x20('+_0x42544a+')','value':_0x4dbae9(0x105)}]}]);_0x546324=_0x354f20['installLevel'];}else _0x546324=_0x4029f3['iHWrU'],console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x42544a+')');}let _0x1949ee=0x0;const _0x273e32=getCurrentVersion();console['log']('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x1f6128=await _0x4029f3[_0x4dbae9(0x10b)](installSkill,'ranger',{'cliVersion':_0x273e32,'level':_0x546324,'platform':_0x9ae306});_0x1f6128&&_0x1949ee++;}catch(_0x44d9b2){console[_0x4dbae9(0x109)](_0x4029f3['jdIvk'],_0x44d9b2 instanceof Error?_0x44d9b2['message']:_0x44d9b2);}if(_0x4029f3[_0x4dbae9(0x102)](_0x1949ee,0x0)){const _0x118f00=_0x4029f3[_0x4dbae9(0x11f)](_0x546324,'user')?_0x4029f3['SBnDK']:_0x4dbae9(0x11a);console[_0x4dbae9(0x108)](_0x4dbae9(0x115)+_0x1949ee+'\x20'+_0x118f00+_0x4dbae9(0xfb)+(_0x1949ee>0x1?'s':'')+_0x4dbae9(0xf9)),!_0x2b03c4[_0x4dbae9(0xf6)]&&(console[_0x4dbae9(0x108)](_0x4dbae9(0x107)),_0x4029f3[_0x4dbae9(0x10e)](_0x9ae306,'opencode')?console[_0x4dbae9(0x108)](_0x4dbae9(0xfc)):console[_0x4dbae9(0x108)](_0x4dbae9(0x112)));}else console['log'](_0x4dbae9(0x101));}