@ranger-testing/ranger-cli 2.5.4-alpha.ed286f1-2 → 2.5.4-alpha.f6504c0-8

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 (80) 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/build/skills/ranger/SKILL.md +18 -4
  78. package/build/skills/ranger/create.md +6 -0
  79. package/build/skills/ranger/verify.md +17 -3
  80. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x21b955,_0x465616){const _0x37a10c=_0x4636,_0x1677fe=_0x21b955();while(!![]){try{const _0x5b71e4=parseInt(_0x37a10c(0x1df))/0x1+-parseInt(_0x37a10c(0x1de))/0x2+parseInt(_0x37a10c(0x1d6))/0x3*(-parseInt(_0x37a10c(0x1d7))/0x4)+parseInt(_0x37a10c(0x1e3))/0x5*(-parseInt(_0x37a10c(0x1e4))/0x6)+parseInt(_0x37a10c(0x1e1))/0x7+parseInt(_0x37a10c(0x1db))/0x8*(-parseInt(_0x37a10c(0x1e2))/0x9)+parseInt(_0x37a10c(0x1d9))/0xa*(parseInt(_0x37a10c(0x1dc))/0xb);if(_0x5b71e4===_0x465616)break;else _0x1677fe['push'](_0x1677fe['shift']());}catch(_0x399cbb){_0x1677fe['push'](_0x1677fe['shift']());}}}(_0x1bea,0x3420f));import{isSessionEnabled}from'../utils/sessionCache.js';export function printBlock(_0x55ae2a){console['log'](_0x55ae2a);}function _0x1bea(){const _0xc7c74=['303256LdYfFt','37939yxuOGi','session_id','231024AQckVC','268222wiiDNh','pXOKk','1780842rpVNXT','18LYKMQt','57770iIMvTT','66ehGtxS','6ByhWjA','471136gRJlwa','trim','710UcZvdi','AFiTe'];_0x1bea=function(){return _0xc7c74;};return _0x1bea();}export async function readHookInput(){const _0x3f8ff7=_0x4636;let _0xffb69c='';try{for await(const _0x74cbb1 of process['stdin']){_0xffb69c+=_0x74cbb1;}}catch{return null;}if(!_0xffb69c[_0x3f8ff7(0x1d8)]())return null;try{return JSON['parse'](_0xffb69c);}catch{return null;}}export async function getEnabledSessionId(_0x563489){const _0x724f62=_0x4636,_0x44a689={'vNqhe':function(_0x2e5952,_0x3e4df8){return _0x2e5952(_0x3e4df8);},'AFiTe':function(_0x1419f5){return _0x1419f5();}};if(_0x563489)return _0x44a689['vNqhe'](isSessionEnabled,_0x563489)?_0x563489:null;const _0x743c49=await _0x44a689[_0x724f62(0x1da)](readHookInput),_0x50c727=_0x743c49?.[_0x724f62(0x1dd)];if(!_0x50c727||!isSessionEnabled(_0x50c727))return null;return _0x50c727;}function _0x4636(_0x51204e,_0x2d51fc){_0x51204e=_0x51204e-0x1d6;const _0x1bea84=_0x1bea();let _0x4636c1=_0x1bea84[_0x51204e];return _0x4636c1;}export async function getEnabledHookContext(_0x1621a7){const _0x26029f=_0x4636,_0x2824b6={'pXOKk':function(_0x2cf1e6,_0x14436c){return _0x2cf1e6(_0x14436c);}};if(_0x1621a7){if(!isSessionEnabled(_0x1621a7))return null;return{'sessionId':_0x1621a7,'input':{'session_id':_0x1621a7}};}const _0x411f85=await readHookInput(),_0x49cf57=_0x411f85?.['session_id'];if(!_0x49cf57||!_0x2824b6[_0x26029f(0x1e0)](isSessionEnabled,_0x49cf57))return null;return{'sessionId':_0x49cf57,'input':_0x411f85};}
1
+ (function(_0x1296fa,_0x2ded22){const _0x1f8197=_0x4522,_0x148985=_0x1296fa();while(!![]){try{const _0x2a0dd2=-parseInt(_0x1f8197(0x1aa))/0x1+-parseInt(_0x1f8197(0x1a8))/0x2*(-parseInt(_0x1f8197(0x1a2))/0x3)+-parseInt(_0x1f8197(0x1a5))/0x4*(-parseInt(_0x1f8197(0x19f))/0x5)+-parseInt(_0x1f8197(0x1ab))/0x6+parseInt(_0x1f8197(0x1a9))/0x7+parseInt(_0x1f8197(0x1a6))/0x8*(-parseInt(_0x1f8197(0x19d))/0x9)+-parseInt(_0x1f8197(0x1a3))/0xa;if(_0x2a0dd2===_0x2ded22)break;else _0x148985['push'](_0x148985['shift']());}catch(_0x318743){_0x148985['push'](_0x148985['shift']());}}}(_0x3692,0x5f2d9));import{isSessionEnabled}from'../utils/sessionCache.js';export function printBlock(_0x273fe0){const _0x38b833=_0x4522;console[_0x38b833(0x19e)](_0x273fe0);}function _0x4522(_0x2f80d0,_0x265afe){_0x2f80d0=_0x2f80d0-0x19d;const _0x36924b=_0x3692();let _0x4522cd=_0x36924b[_0x2f80d0];return _0x4522cd;}export async function readHookInput(){const _0x5003e0=_0x4522;let _0x2a2e02='';try{for await(const _0x35ff89 of process[_0x5003e0(0x1a0)]){_0x2a2e02+=_0x35ff89;}}catch{return null;}if(!_0x2a2e02[_0x5003e0(0x1a1)]())return null;try{return JSON[_0x5003e0(0x1a7)](_0x2a2e02);}catch{return null;}}function _0x3692(){const _0x3083b9=['391902AWEOqq','423269vDHOsj','877986OaMBlC','fPKLm','EmATi','1359BlwsMr','log','115825iuxVtt','stdin','trim','66CfyBdD','807740JsNJwF','session_id','116QVrqub','24720cqnQeF','parse','70822BdMSiX'];_0x3692=function(){return _0x3083b9;};return _0x3692();}export async function getEnabledSessionId(_0x2d7ed7){const _0x2d089c=_0x4522,_0x1d7055={'RLvqH':function(_0x41a9a0,_0x497492){return _0x41a9a0(_0x497492);},'fPKLm':function(_0x29a208){return _0x29a208();}};if(_0x2d7ed7)return _0x1d7055['RLvqH'](isSessionEnabled,_0x2d7ed7)?_0x2d7ed7:null;const _0x188138=await _0x1d7055[_0x2d089c(0x1ac)](readHookInput),_0x5c28d7=_0x188138?.[_0x2d089c(0x1a4)];if(!_0x5c28d7||!isSessionEnabled(_0x5c28d7))return null;return _0x5c28d7;}export async function getEnabledHookContext(_0x31c73b){const _0x2271e8=_0x4522,_0x1cbabd={'EmATi':function(_0x20e78a,_0xfb76eb){return _0x20e78a(_0xfb76eb);}};if(_0x31c73b){if(!isSessionEnabled(_0x31c73b))return null;return{'sessionId':_0x31c73b,'input':{'session_id':_0x31c73b}};}const _0x313e08=await readHookInput(),_0xc6f4f8=_0x313e08?.[_0x2271e8(0x1a4)];if(!_0xc6f4f8||!_0x1cbabd[_0x2271e8(0x1ad)](isSessionEnabled,_0xc6f4f8))return null;return{'sessionId':_0xc6f4f8,'input':_0x313e08};}
@@ -1 +1 @@
1
- (function(_0x24fbe9,_0x2978d2){const _0x1dc83d=_0x2d48,_0x420551=_0x24fbe9();while(!![]){try{const _0x425e0e=-parseInt(_0x1dc83d(0x15b))/0x1*(-parseInt(_0x1dc83d(0x163))/0x2)+parseInt(_0x1dc83d(0x157))/0x3+parseInt(_0x1dc83d(0x161))/0x4*(parseInt(_0x1dc83d(0x15c))/0x5)+parseInt(_0x1dc83d(0x15e))/0x6*(parseInt(_0x1dc83d(0x156))/0x7)+-parseInt(_0x1dc83d(0x160))/0x8+parseInt(_0x1dc83d(0x159))/0x9+-parseInt(_0x1dc83d(0x165))/0xa*(parseInt(_0x1dc83d(0x158))/0xb);if(_0x425e0e===_0x2978d2)break;else _0x420551['push'](_0x420551['shift']());}catch(_0x459ec8){_0x420551['push'](_0x420551['shift']());}}}(_0x3674,0xc909a));import{printBlock,getEnabledHookContext}from'./output.js';function _0x3674(){const _0xce49f2=['permission_mode','3826564wARmjb','703101vEcXKK','16907UOhpQl','5019813HOyumr','input','3CeHnhR','70EAhKec','plan','18eJeiRq','sessionId','9612872kmCsxt','296268tJguCr','YJKjS','699370Kdqhiv','ikzQU','16220fipwtf'];_0x3674=function(){return _0xce49f2;};return _0x3674();}function _0x2d48(_0xa624e5,_0x37fa6a){_0xa624e5=_0xa624e5-0x155;const _0x3674d4=_0x3674();let _0x2d489a=_0x3674d4[_0xa624e5];return _0x2d489a;}import{shouldShowPlanReminder}from'../utils/sessionCache.js';export async function planReminder(_0x241a6){const _0xdaf91=_0x2d48,_0x1eb7f6={'ikzQU':_0xdaf91(0x15d),'YJKjS':function(_0x26db64,_0x2e5557){return _0x26db64(_0x2e5557);}},_0xa98691=await getEnabledHookContext(_0x241a6);if(!_0xa98691)return;if(_0xa98691[_0xdaf91(0x15a)][_0xdaf91(0x155)]!==_0x1eb7f6[_0xdaf91(0x164)])return;if(!_0x1eb7f6['YJKjS'](shouldShowPlanReminder,_0xa98691[_0xdaf91(0x15f)]))return;_0x1eb7f6[_0xdaf91(0x162)](printBlock,'===\x20RANGER:\x20ACTION\x20REQUIRED\x20===\x0a\x0aIf\x20this\x20plan\x20involves\x20ANY\x20UI\x20changes,\x20you\x20MUST:\x0a\x0a1.\x20**READ\x20/ranger\x20skill\x20NOW**\x20-\x20specifically\x20the\x20create.md\x20instructions\x0a2.\x20**Add\x20a\x20Ranger\x20Feature\x20Review\x20Specification**\x20to\x20the\x20end\x20of\x20your\x20plan\x0a\x0aDO\x20NOT\x20write\x20scenarios\x20without\x20reading\x20create.md\x20first.\x0aScenarios\x20are\x20E2E\x20test\x20flows,\x20NOT\x20implementation\x20tasks.\x0a\x0aYour\x20plan\x20must\x20end\x20with:\x0a```\x0a###\x20Ranger\x20Feature\x20Review\x20Specification\x20(create\x20this\x20first\x20with\x20`ranger\x20create`)\x0aFeature\x20Review\x20Name:\x20<name>\x0aDescription:\x20<description>\x0aScenarios:\x0a1.\x20<E2E\x20user\x20flow\x20that\x20can\x20be\x20verified\x20in\x20browser>\x0a2.\x20<another\x20E2E\x20user\x20flow\x20if\x20needed>\x0a```\x0a\x0aThen\x20run:\x20`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<scenario1>\x22\x20-c\x20\x22<scenario2>\x22`\x0a\x0a===\x20END\x20===');}
1
+ (function(_0x4b4647,_0x377ac8){const _0x3ac255=_0x10ee,_0x2722f8=_0x4b4647();while(!![]){try{const _0x61ba08=parseInt(_0x3ac255(0x1b0))/0x1+-parseInt(_0x3ac255(0x1b2))/0x2*(-parseInt(_0x3ac255(0x1b1))/0x3)+parseInt(_0x3ac255(0x1b7))/0x4+parseInt(_0x3ac255(0x1b8))/0x5*(parseInt(_0x3ac255(0x1b4))/0x6)+-parseInt(_0x3ac255(0x1ad))/0x7+-parseInt(_0x3ac255(0x1af))/0x8+-parseInt(_0x3ac255(0x1b5))/0x9;if(_0x61ba08===_0x377ac8)break;else _0x2722f8['push'](_0x2722f8['shift']());}catch(_0x1a5875){_0x2722f8['push'](_0x2722f8['shift']());}}}(_0x49fd,0xb46ea));import{printBlock,getEnabledHookContext}from'./output.js';function _0x49fd(){const _0x56ad7c=['===\x20RANGER:\x20ACTION\x20REQUIRED\x20===\x0a\x0aIf\x20this\x20plan\x20involves\x20ANY\x20UI\x20changes,\x20you\x20MUST:\x0a\x0a1.\x20**READ\x20/ranger\x20skill\x20NOW**\x20-\x20specifically\x20the\x20create.md\x20instructions\x0a2.\x20**Add\x20a\x20Ranger\x20Feature\x20Review\x20Specification**\x20to\x20the\x20end\x20of\x20your\x20plan\x0a\x0aDO\x20NOT\x20write\x20scenarios\x20without\x20reading\x20create.md\x20first.\x0aScenarios\x20are\x20E2E\x20test\x20flows,\x20NOT\x20implementation\x20tasks.\x0a\x0aYour\x20plan\x20must\x20end\x20with:\x0a```\x0a###\x20Ranger\x20Feature\x20Review\x20Specification\x20(create\x20this\x20first\x20with\x20`ranger\x20create`)\x0aFeature\x20Review\x20Name:\x20<name>\x0aDescription:\x20<description>\x0aScenarios:\x0a1.\x20<E2E\x20user\x20flow\x20that\x20can\x20be\x20verified\x20in\x20browser>\x0a2.\x20<another\x20E2E\x20user\x20flow\x20if\x20needed>\x0a```\x0a\x0aThen\x20run:\x20`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<scenario1>\x22\x20-c\x20\x22<scenario2>\x22`\x0a\x0a===\x20END\x20===','6MUVEEq','12668742WqGibQ','plan','5541464dgDRNK','2937250FMmDMM','RyFli','9339204miULzg','nHahI','1893536ygCvDd','648236ZQnNvO','180wvsQiy','36550dXbwOE'];_0x49fd=function(){return _0x56ad7c;};return _0x49fd();}import{shouldShowPlanReminder}from'../utils/sessionCache.js';function _0x10ee(_0x5edd31,_0x201ec2){_0x5edd31=_0x5edd31-0x1ac;const _0x49fd8c=_0x49fd();let _0x10eeca=_0x49fd8c[_0x5edd31];return _0x10eeca;}export async function planReminder(_0x2935e0){const _0x5a60bb=_0x10ee,_0x37e6dc={'nHahI':_0x5a60bb(0x1b6),'RyFli':function(_0x5d0256,_0x45456b){return _0x5d0256(_0x45456b);}},_0x131c91=await getEnabledHookContext(_0x2935e0);if(!_0x131c91)return;if(_0x131c91['input']['permission_mode']!==_0x37e6dc[_0x5a60bb(0x1ae)])return;if(!_0x37e6dc[_0x5a60bb(0x1ac)](shouldShowPlanReminder,_0x131c91['sessionId']))return;printBlock(_0x5a60bb(0x1b3));}
@@ -1 +1 @@
1
- function _0x2c7e(){const _0x1bf04b=['1053jNGVqN','929420jflXhu','63oYMBND','===\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===','1105170IDfsgU','11VJjGPY','56QTUUWR','245TREczk','179120HjNuId','780296yxqwAG','1890fRSyDL','stYaY','81436zkqivD','1302060bPzhTw'];_0x2c7e=function(){return _0x1bf04b;};return _0x2c7e();}function _0x3358(_0x5a9445,_0x21615c){_0x5a9445=_0x5a9445-0xe8;const _0x2c7ee8=_0x2c7e();let _0x335822=_0x2c7ee8[_0x5a9445];return _0x335822;}(function(_0x18611b,_0x3cf06b){const _0x543260=_0x3358,_0x50b685=_0x18611b();while(!![]){try{const _0x2fe682=parseInt(_0x543260(0xea))/0x1+parseInt(_0x543260(0xeb))/0x2*(parseInt(_0x543260(0xef))/0x3)+parseInt(_0x543260(0xed))/0x4*(-parseInt(_0x543260(0xe8))/0x5)+-parseInt(_0x543260(0xf3))/0x6+-parseInt(_0x543260(0xf5))/0x7*(parseInt(_0x543260(0xe9))/0x8)+-parseInt(_0x543260(0xf1))/0x9*(-parseInt(_0x543260(0xf0))/0xa)+parseInt(_0x543260(0xf4))/0xb*(parseInt(_0x543260(0xee))/0xc);if(_0x2fe682===_0x3cf06b)break;else _0x50b685['push'](_0x50b685['shift']());}catch(_0x445463){_0x50b685['push'](_0x50b685['shift']());}}}(_0x2c7e,0x7c8e8));import{printBlock,getEnabledSessionId}from'./output.js';export async function planStart(_0x12e197){const _0x29e851=_0x3358,_0x46b989={'stYaY':function(_0x92d62d,_0x11219b){return _0x92d62d(_0x11219b);}},_0x55df9e=await _0x46b989['stYaY'](getEnabledSessionId,_0x12e197);if(!_0x55df9e)return;_0x46b989[_0x29e851(0xec)](printBlock,_0x29e851(0xf2));}
1
+ (function(_0x2e777e,_0x31216d){const _0x1acd81=_0x2453,_0x3157ea=_0x2e777e();while(!![]){try{const _0x528b90=parseInt(_0x1acd81(0xdb))/0x1*(-parseInt(_0x1acd81(0xe7))/0x2)+parseInt(_0x1acd81(0xe3))/0x3*(parseInt(_0x1acd81(0xe6))/0x4)+-parseInt(_0x1acd81(0xe0))/0x5+-parseInt(_0x1acd81(0xe4))/0x6*(parseInt(_0x1acd81(0xe5))/0x7)+parseInt(_0x1acd81(0xe1))/0x8*(parseInt(_0x1acd81(0xe2))/0x9)+-parseInt(_0x1acd81(0xde))/0xa+parseInt(_0x1acd81(0xdc))/0xb*(parseInt(_0x1acd81(0xdf))/0xc);if(_0x528b90===_0x31216d)break;else _0x3157ea['push'](_0x3157ea['shift']());}catch(_0xf0ae2e){_0x3157ea['push'](_0x3157ea['shift']());}}}(_0x28dd,0x800a7));function _0x28dd(){const _0x5befc7=['8328HMKoJb','7929fcCezl','1004037TXfKJc','654ZZuJZY','60200bqWYvy','12bplqRD','33704QcaRZl','1zrPaFT','134409DGedMM','===\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===','5548920szUuWu','1020fAkcux','4630870GUPXXH'];_0x28dd=function(){return _0x5befc7;};return _0x28dd();}import{printBlock,getEnabledSessionId}from'./output.js';function _0x2453(_0x29ffc0,_0x344d9e){_0x29ffc0=_0x29ffc0-0xdb;const _0x28ddd7=_0x28dd();let _0x24531f=_0x28ddd7[_0x29ffc0];return _0x24531f;}export async function planStart(_0x2640be){const _0x29617e=_0x2453,_0x5f2442={'bDSqJ':function(_0x1084f3,_0x552dcd){return _0x1084f3(_0x552dcd);}},_0x2452ba=await _0x5f2442['bDSqJ'](getEnabledSessionId,_0x2640be);if(!_0x2452ba)return;_0x5f2442['bDSqJ'](printBlock,_0x29617e(0xdd));}
@@ -1 +1 @@
1
- (function(_0x1816ed,_0x16ad2d){const _0x33c830=_0x1b3a,_0x205d66=_0x1816ed();while(!![]){try{const _0x4a8e11=-parseInt(_0x33c830(0x1f2))/0x1*(parseInt(_0x33c830(0x1fe))/0x2)+parseInt(_0x33c830(0x1f5))/0x3*(-parseInt(_0x33c830(0x1fb))/0x4)+-parseInt(_0x33c830(0x1f7))/0x5+-parseInt(_0x33c830(0x1fc))/0x6+parseInt(_0x33c830(0x1fd))/0x7+parseInt(_0x33c830(0x1f3))/0x8*(parseInt(_0x33c830(0x1f9))/0x9)+-parseInt(_0x33c830(0x1f4))/0xa*(-parseInt(_0x33c830(0x1f8))/0xb);if(_0x4a8e11===_0x16ad2d)break;else _0x205d66['push'](_0x205d66['shift']());}catch(_0x1881f7){_0x205d66['push'](_0x205d66['shift']());}}}(_0xe8f6,0x5a0a7));function _0x1b3a(_0x22929e,_0x25d608){_0x22929e=_0x22929e-0x1f2;const _0xe8f673=_0xe8f6();let _0x1b3ae0=_0xe8f673[_0x22929e];return _0x1b3ae0;}import{getSessionEntry,updateBranchTracking}from'../utils/sessionCache.js';function _0xe8f6(){const _0x3f4ede=['249910FtzNog','618ipsWFe','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).','1550365EelZIk','649lohngJ','128691rnBVMv','PostToolUse','4748KmNoZQ','3913836aHlAqX','4265835rKgItD','106CfbHyt','10937pzNRxE','40VpMKNG'];_0xe8f6=function(){return _0x3f4ede;};return _0xe8f6();}import{getToken}from'../utils/keychain.js';import{getEnabledSessionId}from'./output.js';export async function postEdit(_0x24c47f){const _0x3d76b0=_0x1b3a,_0x235429={'KSFwH':_0x3d76b0(0x1fa)},_0x5f5439=await getEnabledSessionId(_0x24c47f);if(!_0x5f5439)return;updateBranchTracking(_0x5f5439);const _0x2e693e=await getToken();if(!_0x2e693e)return;const _0x2f3956=getSessionEntry(_0x5f5439);if(_0x2f3956){const _0x51668d={'hookSpecificOutput':{'hookEventName':_0x3d76b0(0x1fa),'additionalContext':_0x3d76b0(0x1f6)}};console['log'](JSON['stringify'](_0x51668d));return;}const _0x356d27={'hookSpecificOutput':{'hookEventName':_0x235429['KSFwH'],'additionalContext':'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.'}};console['log'](JSON['stringify'](_0x356d27));}
1
+ (function(_0x2d9507,_0x4b9d6d){const _0x4014f5=_0x54d2,_0x41cac8=_0x2d9507();while(!![]){try{const _0x1ea6fa=parseInt(_0x4014f5(0x1b6))/0x1*(-parseInt(_0x4014f5(0x1b4))/0x2)+-parseInt(_0x4014f5(0x1ab))/0x3+parseInt(_0x4014f5(0x1a8))/0x4*(-parseInt(_0x4014f5(0x1b3))/0x5)+-parseInt(_0x4014f5(0x1aa))/0x6+parseInt(_0x4014f5(0x1ad))/0x7+-parseInt(_0x4014f5(0x1ae))/0x8+-parseInt(_0x4014f5(0x1b5))/0x9*(-parseInt(_0x4014f5(0x1b2))/0xa);if(_0x1ea6fa===_0x4b9d6d)break;else _0x41cac8['push'](_0x41cac8['shift']());}catch(_0x348da3){_0x41cac8['push'](_0x41cac8['shift']());}}}(_0x15e0,0x6ec5b));import{getSessionEntry,updateBranchTracking}from'../utils/sessionCache.js';function _0x15e0(){const _0x133995=['5254464EVgtRS','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','17304730YmgxCm','425jPUsif','2hHHWyT','18dYldCu','530644ZYUTIA','34628DRdtvl','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).','4449606paOqYa','1825575SVdYQa','PostToolUse','1863400OotOoo'];_0x15e0=function(){return _0x133995;};return _0x15e0();}import{getToken}from'../utils/keychain.js';import{getEnabledSessionId}from'./output.js';function _0x54d2(_0x165f77,_0x12a3ce){_0x165f77=_0x165f77-0x1a8;const _0x15e0c8=_0x15e0();let _0x54d206=_0x15e0c8[_0x165f77];return _0x54d206;}export async function postEdit(_0x342fec){const _0x233520=_0x54d2,_0x5ce731={'PFqIb':function(_0x560cef,_0x594568){return _0x560cef(_0x594568);},'dbTXT':function(_0x16752f,_0x85e497){return _0x16752f(_0x85e497);},'bfldY':'PostToolUse'},_0x377fe1=await getEnabledSessionId(_0x342fec);if(!_0x377fe1)return;_0x5ce731['PFqIb'](updateBranchTracking,_0x377fe1);const _0x5bfe43=await getToken();if(!_0x5bfe43)return;const _0x2ed819=_0x5ce731['dbTXT'](getSessionEntry,_0x377fe1);if(_0x2ed819){const _0x19bb7b={'hookSpecificOutput':{'hookEventName':_0x5ce731['bfldY'],'additionalContext':_0x233520(0x1a9)}};console[_0x233520(0x1b1)](JSON[_0x233520(0x1af)](_0x19bb7b));return;}const _0x5b9aec={'hookSpecificOutput':{'hookEventName':_0x233520(0x1ac),'additionalContext':_0x233520(0x1b0)}};console[_0x233520(0x1b1)](JSON[_0x233520(0x1af)](_0x5b9aec));}
@@ -1 +1 @@
1
- (function(_0x5928b2,_0x596371){const _0x54381e=_0x239f,_0x142946=_0x5928b2();while(!![]){try{const _0x3badb5=parseInt(_0x54381e(0x14e))/0x1*(parseInt(_0x54381e(0x149))/0x2)+parseInt(_0x54381e(0x14d))/0x3*(parseInt(_0x54381e(0x14a))/0x4)+parseInt(_0x54381e(0x151))/0x5+-parseInt(_0x54381e(0x14b))/0x6*(-parseInt(_0x54381e(0x154))/0x7)+parseInt(_0x54381e(0x14f))/0x8*(-parseInt(_0x54381e(0x152))/0x9)+parseInt(_0x54381e(0x150))/0xa*(-parseInt(_0x54381e(0x153))/0xb)+-parseInt(_0x54381e(0x14c))/0xc;if(_0x3badb5===_0x596371)break;else _0x142946['push'](_0x142946['shift']());}catch(_0x22f6da){_0x142946['push'](_0x142946['shift']());}}}(_0x35d0,0xb30e0));import{getToken}from'../utils/keychain.js';function _0x35d0(){const _0x26081c=['2453YJVqkD','7WcMpbv','8zhboDU','4fLuFSb','6614220jcGnwZ','6811992LakOxm','185589GuaSXg','322819rowCxm','8CHlcvg','48560xgDBTY','4751055jLtIeN','9195822IdUbGL'];_0x35d0=function(){return _0x26081c;};return _0x35d0();}import{printBlock,getEnabledSessionId}from'./output.js';function _0x239f(_0x397304,_0x31730b){_0x397304=_0x397304-0x149;const _0x35d0f4=_0x35d0();let _0x239f87=_0x35d0f4[_0x397304];return _0x239f87;}export async function preCompact(_0x2a5dd9){const _0x16c781={'gNWLL':function(_0x90ac4d){return _0x90ac4d();}},_0x2d4323=await getEnabledSessionId(_0x2a5dd9);if(!_0x2d4323)return;try{const _0x481f7d=await _0x16c781['gNWLL'](getToken);if(!_0x481f7d)return;printBlock('===\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`.');}catch{}}
1
+ (function(_0xeaf494,_0x2a3912){const _0x571f7b=_0x37cc,_0x4ceffc=_0xeaf494();while(!![]){try{const _0x1059c1=parseInt(_0x571f7b(0x1cb))/0x1*(parseInt(_0x571f7b(0x1c7))/0x2)+-parseInt(_0x571f7b(0x1c2))/0x3*(parseInt(_0x571f7b(0x1c5))/0x4)+-parseInt(_0x571f7b(0x1c3))/0x5+parseInt(_0x571f7b(0x1cd))/0x6*(parseInt(_0x571f7b(0x1c6))/0x7)+-parseInt(_0x571f7b(0x1cc))/0x8+-parseInt(_0x571f7b(0x1c1))/0x9*(parseInt(_0x571f7b(0x1c4))/0xa)+parseInt(_0x571f7b(0x1ca))/0xb;if(_0x1059c1===_0x2a3912)break;else _0x4ceffc['push'](_0x4ceffc['shift']());}catch(_0x4450fe){_0x4ceffc['push'](_0x4ceffc['shift']());}}}(_0x278a,0x9d201));import{getToken}from'../utils/keychain.js';import{printBlock,getEnabledSessionId}from'./output.js';export async function preCompact(_0x1c3c7a){const _0x4350e7=_0x37cc,_0x1ca748={'czeQn':function(_0x571003,_0x49b398){return _0x571003(_0x49b398);}},_0x3b9f3d=await _0x1ca748[_0x4350e7(0x1c8)](getEnabledSessionId,_0x1c3c7a);if(!_0x3b9f3d)return;try{const _0x1628de=await getToken();if(!_0x1628de)return;printBlock(_0x4350e7(0x1c9));}catch{}}function _0x37cc(_0x4a5caa,_0x2de5db){_0x4a5caa=_0x4a5caa-0x1c1;const _0x278a4e=_0x278a();let _0x37cc43=_0x278a4e[_0x4a5caa];return _0x37cc43;}function _0x278a(){const _0x29149c=['4751920WvqPNT','6yEWjDj','568323AUfUeq','3234ywrBis','5669035omNvlu','10sIDYHH','4604CFmktv','3477327WqcKRO','14KfinSg','czeQn','===\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`.','30741172qtKxZW','54842GrGnlP'];_0x278a=function(){return _0x29149c;};return _0x278a();}
@@ -1 +1 @@
1
- (function(_0x5095ec,_0x2ceb13){const _0x47e5c2=_0x151a,_0x5f21a8=_0x5095ec();while(!![]){try{const _0x453ae7=-parseInt(_0x47e5c2(0x16e))/0x1+-parseInt(_0x47e5c2(0x168))/0x2+-parseInt(_0x47e5c2(0x16c))/0x3+-parseInt(_0x47e5c2(0x167))/0x4+parseInt(_0x47e5c2(0x169))/0x5+parseInt(_0x47e5c2(0x16f))/0x6*(-parseInt(_0x47e5c2(0x164))/0x7)+parseInt(_0x47e5c2(0x166))/0x8*(parseInt(_0x47e5c2(0x16b))/0x9);if(_0x453ae7===_0x2ceb13)break;else _0x5f21a8['push'](_0x5f21a8['shift']());}catch(_0x5280a7){_0x5f21a8['push'](_0x5f21a8['shift']());}}}(_0x89ae,0xe7600));import{isSessionEnabled,recordEnabledSessionCleared}from'../utils/sessionCache.js';import{readHookInput}from'./output.js';function _0x151a(_0x316181,_0x148aab){_0x316181=_0x316181-0x164;const _0x89ae5b=_0x89ae();let _0x151a74=_0x89ae5b[_0x316181];return _0x151a74;}function _0x89ae(){const _0x1bef60=['1029934VIRgBe','7097058oUpnyZ','clear','7wgFASG','sZuVf','5176YwbgdD','449712hngqup','3515072bRZThx','1465930oLsYKv','env','88497JSxIMd','4874052nWsXHt','reason'];_0x89ae=function(){return _0x1bef60;};return _0x89ae();}export async function sessionEnd(_0xb208b5){const _0xdd7332=_0x151a,_0x2098e8={'GskhL':function(_0x924570,_0x15abdc){return _0x924570===_0x15abdc;},'sZuVf':function(_0x486e79,_0x40f402){return _0x486e79(_0x40f402);}},_0x396531=process[_0xdd7332(0x16a)]['CLAUDE_SESSION_ID'];let _0x1c5fdf=_0xb208b5,_0xf1d573;if(!_0xb208b5){if(_0x396531&&!isSessionEnabled(_0x396531))return;const _0x2f041c=await readHookInput();_0x1c5fdf=_0x2f041c?.['session_id']||_0x396531,_0xf1d573=_0x2f041c?.[_0xdd7332(0x16d)];}if(!_0x1c5fdf)return;_0x2098e8['GskhL'](_0xf1d573,_0xdd7332(0x170))&&_0x2098e8[_0xdd7332(0x165)](recordEnabledSessionCleared,_0x1c5fdf);}
1
+ (function(_0x148de0,_0x584bf2){const _0x46ebdc=_0x3056,_0x3a1fc0=_0x148de0();while(!![]){try{const _0x72647b=parseInt(_0x46ebdc(0x11a))/0x1*(parseInt(_0x46ebdc(0x113))/0x2)+-parseInt(_0x46ebdc(0x114))/0x3*(-parseInt(_0x46ebdc(0x120))/0x4)+parseInt(_0x46ebdc(0x11c))/0x5*(-parseInt(_0x46ebdc(0x116))/0x6)+-parseInt(_0x46ebdc(0x122))/0x7*(-parseInt(_0x46ebdc(0x11e))/0x8)+parseInt(_0x46ebdc(0x11b))/0x9*(parseInt(_0x46ebdc(0x118))/0xa)+-parseInt(_0x46ebdc(0x117))/0xb+-parseInt(_0x46ebdc(0x121))/0xc*(parseInt(_0x46ebdc(0x11d))/0xd);if(_0x72647b===_0x584bf2)break;else _0x3a1fc0['push'](_0x3a1fc0['shift']());}catch(_0x540f3d){_0x3a1fc0['push'](_0x3a1fc0['shift']());}}}(_0x4ead,0x253c5));function _0x3056(_0x3d14ba,_0x5c250a){_0x3d14ba=_0x3d14ba-0x113;const _0x4ead4c=_0x4ead();let _0x3056a8=_0x4ead4c[_0x3d14ba];return _0x3056a8;}import{isSessionEnabled,recordEnabledSessionCleared}from'../utils/sessionCache.js';function _0x4ead(){const _0x35a17c=['8KOWjhc','7358424RXBITM','14RtvTHt','66610oZuJgL','457428CGcold','session_id','216kBcSWD','107723ZtEjUt','10zgYvFE','env','5XxaiJo','2373561sbABAR','20140lkCZdS','13UyEDvr','741256xKnzhg','CLAUDE_SESSION_ID'];_0x4ead=function(){return _0x35a17c;};return _0x4ead();}import{readHookInput}from'./output.js';export async function sessionEnd(_0x14e027){const _0x4b89cf=_0x3056,_0xbb4aa={'iIvYm':function(_0xe4b813,_0x12084f){return _0xe4b813(_0x12084f);},'taVum':function(_0x14abb3){return _0x14abb3();}},_0x4b0073=process[_0x4b89cf(0x119)][_0x4b89cf(0x11f)];let _0x20d28b=_0x14e027,_0x55441b;if(!_0x14e027){if(_0x4b0073&&!_0xbb4aa['iIvYm'](isSessionEnabled,_0x4b0073))return;const _0xb56413=await _0xbb4aa['taVum'](readHookInput);_0x20d28b=_0xb56413?.[_0x4b89cf(0x115)]||_0x4b0073,_0x55441b=_0xb56413?.['reason'];}if(!_0x20d28b)return;_0x55441b==='clear'&&recordEnabledSessionCleared(_0x20d28b);}
@@ -1 +1 @@
1
- function _0x18ab(){const _0x33be06=['session_id','3222184GEfgFK','master','\x20(Branch:\x20','445782yPtUbX','SessionStart','1152912tJRNmH','ApZYR','hiYvH','3339486NMhkUJ','2CqntQX','log','42452pCUrzv','hook:session-start','qXGfK','482993OiHbIn','Hquxj','MEDTV','hZomj','1511920DyOJae','20XZxdMX','ZxKUU','stdin','UeCnz','parse','main'];_0x18ab=function(){return _0x33be06;};return _0x18ab();}(function(_0x13bedf,_0x31ae43){const _0x2f9d5f=_0x576e,_0x536c80=_0x13bedf();while(!![]){try{const _0x43b3d0=parseInt(_0x2f9d5f(0xd8))/0x1*(parseInt(_0x2f9d5f(0xd6))/0x2)+-parseInt(_0x2f9d5f(0xd2))/0x3+parseInt(_0x2f9d5f(0xdf))/0x4+parseInt(_0x2f9d5f(0xe0))/0x5*(parseInt(_0x2f9d5f(0xd0))/0x6)+-parseInt(_0x2f9d5f(0xdb))/0x7+-parseInt(_0x2f9d5f(0xcd))/0x8+parseInt(_0x2f9d5f(0xd5))/0x9;if(_0x43b3d0===_0x31ae43)break;else _0x536c80['push'](_0x536c80['shift']());}catch(_0xb97409){_0x536c80['push'](_0x536c80['shift']());}}}(_0x18ab,0x38c96));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 _0x576e(_0x2be64b,_0x35bed2){_0x2be64b=_0x2be64b-0xc7;const _0x18abdf=_0x18ab();let _0x576ef4=_0x18abdf[_0x2be64b];return _0x576ef4;}const RANGER_AUTO_ENABLED_PROMPT='=================================================================\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20🚨\x20RANGER\x20IS\x20ACTIVE\x20🚨\x0a=================================================================\x0a\x0aThis\x20session\x20has\x20Ranger\x20ENABLED.\x20Before\x20doing\x20ANYTHING\x20else:\x0a\x0a1.\x20**READ\x20the\x20/ranger\x20skill\x20FIRST**\x20-\x20Run\x20the\x20skill\x20to\x20understand\x20the\x20required\x20workflow\x20for\x20UI\x20features\x0a\x0a2.\x20**Check\x20for\x20existing\x20feature\x20reviews**\x20-\x20Run\x20`ranger\x20list`\x20to\x20see\x20if\x20there\x27s\x20an\x20in-progress\x20feature\x20review\x20to\x20resume\x0a\x0a3.\x20**For\x20ANY\x20UI\x20work**:\x20You\x20MUST\x20either:\x0a\x20\x20\x20-\x20Resume\x20an\x20existing\x20feature\x20review:\x20`ranger\x20resume\x20<id>`\x0a\x20\x20\x20-\x20Create\x20a\x20new\x20feature\x20review:\x20`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<scenario>\x22`\x0a\x0a4.\x20**If\x20resuming\x20a\x20feature\x20review\x20with\x20reviewer\x20comments**:\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20reviewers\x20want\x20fixed\x20before\x20making\x20code\x20changes\x0a\x0a=================================================================';export async function sessionStart(_0x1a813c){const _0x3196b8=_0x576e,_0x13d04f={'ZxKUU':function(_0xdfe296,_0x55f5ef){return _0xdfe296||_0x55f5ef;},'pGPUw':'source','hGJps':function(_0x1470fa,_0x182ce0){return _0x1470fa&&_0x182ce0;},'UeCnz':function(_0x18d21b,_0x1ee898,_0xfcbcc0){return _0x18d21b(_0x1ee898,_0xfcbcc0);},'haCHO':function(_0x315d56){return _0x315d56();},'enhwM':function(_0x61ae91,_0x2b8904){return _0x61ae91(_0x2b8904);},'MEDTV':function(_0x3d0556,_0x10994a){return _0x3d0556(_0x10994a);},'Hquxj':_0x3196b8(0xd9),'qXGfK':'success','MpiZb':function(_0x2fa0cd){return _0x2fa0cd();},'bEBJo':function(_0x501932,_0x5d296b){return _0x501932!==_0x5d296b;},'hZomj':_0x3196b8(0xcb),'ApZYR':_0x3196b8(0xce),'hiYvH':function(_0x38affd,_0x3d2863){return _0x38affd+_0x3d2863;}};let _0x11134d=_0x13d04f[_0x3196b8(0xc7)](_0x1a813c,''),_0xd03c2c;if(!_0x1a813c){let _0x517dae='';for await(const _0x2a6cf6 of process[_0x3196b8(0xc8)]){_0x517dae+=_0x2a6cf6;}try{const _0x4522b5=JSON[_0x3196b8(0xca)](_0x517dae);_0x11134d=_0x4522b5[_0x3196b8(0xcc)]||'',_0xd03c2c=_0x4522b5[_0x13d04f['pGPUw']];}catch{}const _0x5b9d20=process['env']['CLAUDE_ENV_FILE'];if(_0x13d04f['hGJps'](_0x5b9d20,_0x11134d))try{await _0x13d04f[_0x3196b8(0xc9)](appendFile,_0x5b9d20,'export\x20CLAUDE_SESSION_ID=\x22'+_0x11134d+'\x22\x0a');}catch{}}try{await _0x13d04f['haCHO'](getToken);}catch{}if(_0x11134d){_0x13d04f['enhwM'](shouldAutoEnableAfterClear,_0xd03c2c)&&_0x13d04f[_0x3196b8(0xdd)](autoEnableAfterClear,_0x11134d);initBranchTracking(_0x11134d);const _0x5d8a48=_0x13d04f[_0x3196b8(0xdd)](isSessionEnabled,_0x11134d);try{const _0x1f9d5e=createTelemetryCollector(_0x13d04f[_0x3196b8(0xdc)]);await _0x1f9d5e['trackCommandStart']({'sessionId':_0x11134d,'hooksEnabled':_0x5d8a48}),await _0x1f9d5e['trackCommandEnd'](_0x13d04f[_0x3196b8(0xda)]);}catch{}if(_0x5d8a48){const _0x3a18a8=_0x13d04f['MpiZb'](getCurrentBranch),_0x9cc93d=_0x3a18a8&&_0x13d04f['bEBJo'](_0x3a18a8,_0x13d04f[_0x3196b8(0xde)])&&_0x3a18a8!==_0x13d04f[_0x3196b8(0xd3)]?_0x3196b8(0xcf)+_0x3a18a8+')':'',_0x595928={'hookSpecificOutput':{'hookEventName':_0x3196b8(0xd1),'additionalContext':_0x13d04f[_0x3196b8(0xd4)](RANGER_AUTO_ENABLED_PROMPT,_0x9cc93d)}};console[_0x3196b8(0xd7)](JSON['stringify'](_0x595928));}}}
1
+ function _0x26c1(){const _0x5669ed=['success','2224dbFrls','hook:session-start','parse','Ftvxr','4433297tZNprg','18UIaitD','363895azZQhz','88878zZNZli','ANgIH','stdin','807xitkvG','ADQRA','snqeM','43999DQzSlA','98gsanTs','IfqhP','1407400RRNNWx','171EiwoRo','=================================================================\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=================================================================','trackCommandEnd','129584CXWJCC','12klCsmX'];_0x26c1=function(){return _0x5669ed;};return _0x26c1();}const _0x565abb=_0x141a;function _0x141a(_0x285086,_0x4fa682){_0x285086=_0x285086-0x9f;const _0x26c16b=_0x26c1();let _0x141a41=_0x26c16b[_0x285086];return _0x141a41;}(function(_0xda82bb,_0xdd2cb8){const _0x4ea8f8=_0x141a,_0x3b4941=_0xda82bb();while(!![]){try{const _0x3aef15=parseInt(_0x4ea8f8(0xa0))/0x1*(parseInt(_0x4ea8f8(0xaf))/0x2)+parseInt(_0x4ea8f8(0xb4))/0x3*(-parseInt(_0x4ea8f8(0xaa))/0x4)+parseInt(_0x4ea8f8(0xb0))/0x5+-parseInt(_0x4ea8f8(0xb1))/0x6*(-parseInt(_0x4ea8f8(0xa1))/0x7)+parseInt(_0x4ea8f8(0xa7))/0x8*(parseInt(_0x4ea8f8(0xa4))/0x9)+-parseInt(_0x4ea8f8(0xa3))/0xa+parseInt(_0x4ea8f8(0xae))/0xb*(-parseInt(_0x4ea8f8(0xa8))/0xc);if(_0x3aef15===_0xdd2cb8)break;else _0x3b4941['push'](_0x3b4941['shift']());}catch(_0x562eb2){_0x3b4941['push'](_0x3b4941['shift']());}}}(_0x26c1,0x46f17));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=_0x565abb(0xa5);export async function sessionStart(_0xd47270){const _0x15e64e=_0x565abb,_0x12c7ef={'XDZUH':'session_id','mfQcw':function(_0x339ecb){return _0x339ecb();},'IfqhP':function(_0x564fe6,_0x564c39){return _0x564fe6(_0x564c39);},'ANgIH':function(_0x3a217f,_0x26da1e){return _0x3a217f(_0x26da1e);},'snqeM':_0x15e64e(0xa9),'ADQRA':function(_0x57717e,_0x3e8463){return _0x57717e!==_0x3e8463;},'Ftvxr':'main','HQpEg':function(_0x56394e,_0x55f3b9){return _0x56394e+_0x55f3b9;}};let _0xa68580=_0xd47270||'',_0x47cdd1;if(!_0xd47270){let _0x2bbc62='';for await(const _0x1f1e22 of process[_0x15e64e(0xb3)]){_0x2bbc62+=_0x1f1e22;}try{const _0x22d180=JSON[_0x15e64e(0xac)](_0x2bbc62);_0xa68580=_0x22d180[_0x12c7ef['XDZUH']]||'',_0x47cdd1=_0x22d180['source'];}catch{}const _0x11eeb4=process['env']['CLAUDE_ENV_FILE'];if(_0x11eeb4&&_0xa68580)try{await appendFile(_0x11eeb4,'export\x20CLAUDE_SESSION_ID=\x22'+_0xa68580+'\x22\x0a');}catch{}}try{await _0x12c7ef['mfQcw'](getToken);}catch{}if(_0xa68580){shouldAutoEnableAfterClear(_0x47cdd1)&&autoEnableAfterClear(_0xa68580);initBranchTracking(_0xa68580);const _0x5932b7=_0x12c7ef[_0x15e64e(0xa2)](isSessionEnabled,_0xa68580);try{const _0x29fbae=_0x12c7ef[_0x15e64e(0xb2)](createTelemetryCollector,_0x15e64e(0xab));await _0x29fbae['trackCommandStart']({'sessionId':_0xa68580,'hooksEnabled':_0x5932b7}),await _0x29fbae[_0x15e64e(0xa6)](_0x12c7ef[_0x15e64e(0x9f)]);}catch{}if(_0x5932b7){const _0x3b292e=_0x12c7ef['mfQcw'](getCurrentBranch),_0x220c44=_0x3b292e&&_0x12c7ef['ADQRA'](_0x3b292e,_0x12c7ef[_0x15e64e(0xad)])&&_0x12c7ef[_0x15e64e(0xb5)](_0x3b292e,'master')?'\x20(Branch:\x20'+_0x3b292e+')':'',_0xa92b5c={'hookSpecificOutput':{'hookEventName':'SessionStart','additionalContext':_0x12c7ef['HQpEg'](RANGER_AUTO_ENABLED_PROMPT,_0x220c44)}};console['log'](JSON['stringify'](_0xa92b5c));}}}
@@ -1 +1 @@
1
- (function(_0x2f0e51,_0x2fe5ef){const _0x6aa6b=_0x5b85,_0xd1003c=_0x2f0e51();while(!![]){try{const _0x4c11d1=-parseInt(_0x6aa6b(0x1ba))/0x1+parseInt(_0x6aa6b(0x1cd))/0x2+-parseInt(_0x6aa6b(0x1bd))/0x3+parseInt(_0x6aa6b(0x1c6))/0x4*(-parseInt(_0x6aa6b(0x1b9))/0x5)+-parseInt(_0x6aa6b(0x1b3))/0x6*(-parseInt(_0x6aa6b(0x1b5))/0x7)+parseInt(_0x6aa6b(0x1b8))/0x8*(parseInt(_0x6aa6b(0x1c1))/0x9)+parseInt(_0x6aa6b(0x1b7))/0xa*(parseInt(_0x6aa6b(0x1b4))/0xb);if(_0x4c11d1===_0x2fe5ef)break;else _0xd1003c['push'](_0xd1003c['shift']());}catch(_0xc8660){_0xd1003c['push'](_0xd1003c['shift']());}}}(_0x1e48,0x56299));function _0x1e48(){const _0xfc841e=['123052EEmjKu','sessionId','featureId','1302654bjtyJQ','filter','closed','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','5925564iakogN','some','incomplete','status','stringify','2555428zMrldZ','blocked','log','currentSessionId','success','nwadr','checklistItems','258156Psmsnu','6KwFVXa','2124023wjmIIR','3979367gcEyYh','verified','10nkTwnz','8GbTqJD','5LfEDTq'];_0x1e48=function(){return _0xfc841e;};return _0x1e48();}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(_0x166a56){const _0x4da24e=_0x5b85,_0x1f0c07={'oQNNB':function(_0x3602ff,_0x5debfa,_0x2d74e4,_0x47f30e){return _0x3602ff(_0x5debfa,_0x2d74e4,_0x47f30e);},'VhcsW':function(_0x2315a9,_0x352dec){return _0x2315a9(_0x352dec);},'ivCfr':function(_0x22211c,_0x122f2c,_0x150e1b){return _0x22211c(_0x122f2c,_0x150e1b);}},_0x2eacdb=await getEnabledHookContext(_0x166a56),_0xed4c29=_0x2eacdb?.['sessionId']??null;let _0x5bb9c6=!![];if(!_0xed4c29){await trackStop(_0xed4c29,![],_0x5bb9c6);return;}try{const _0x27eeb8=getSessionEntry(_0xed4c29);if(!_0x27eeb8){await _0x1f0c07['oQNNB'](trackStop,_0xed4c29,!![],_0x5bb9c6);return;}const _0xedf1f=await getToken(),_0x7798d1='https://dashboard.ranger.net/features/'+_0x27eeb8[_0x4da24e(0x1bc)];let _0x4dfac7=null,_0x15da9c=![],_0x4b28c3=![];if(_0xedf1f)try{const _0xb260d1=await _0x1f0c07['VhcsW'](getFeature,_0x27eeb8[_0x4da24e(0x1bc)]);_0x4dfac7=_0xb260d1[_0x4da24e(0x1c9)]??null;const _0x288444=_0xb260d1[_0x4da24e(0x1cc)][_0x4da24e(0x1be)](_0x34a72d=>_0x34a72d[_0x4da24e(0x1bb)]===_0x4dfac7);_0x15da9c=_0x288444[_0x4da24e(0x1c2)](_0x39fc18=>_0x39fc18['status']!==_0x4da24e(0x1b6)&&_0x39fc18['status']!==_0x4da24e(0x1c7)&&_0x39fc18['status']!==_0x4da24e(0x1bf)&&_0x39fc18[_0x4da24e(0x1c4)]!==_0x4da24e(0x1c3)),_0x4b28c3=_0x288444['some'](_0x4bdd87=>_0x4bdd87[_0x4da24e(0x1c4)]==='verification_in_progress');}catch{}if(_0xedf1f&&_0x4dfac7&&_0x15da9c){if(!_0x4b28c3&&shouldShowStopReminder(_0xed4c29)){const _0xb2845={'hookSpecificOutput':{'hookEventName':'Stop','additionalContext':_0x4da24e(0x1c0)+_0x7798d1}};console[_0x4da24e(0x1c8)](JSON[_0x4da24e(0x1c5)](_0xb2845));}}if(_0xedf1f&&_0x4dfac7&&!_0x15da9c)try{await _0x1f0c07['ivCfr'](concludeSession,_0x27eeb8['featureId'],_0x4dfac7);}catch{}await _0x1f0c07['oQNNB'](trackStop,_0xed4c29,!![],_0x5bb9c6);return;}catch{await trackStop(_0xed4c29,!![],_0x5bb9c6);return;}}function _0x5b85(_0x22c4ae,_0x568e14){_0x22c4ae=_0x22c4ae-0x1b3;const _0x1e48f2=_0x1e48();let _0x5b8526=_0x1e48f2[_0x22c4ae];return _0x5b8526;}async function trackStop(_0x762a7e,_0x2cf488,_0x42b5b2){const _0x31815f=_0x5b85,_0x45b75c={'nwadr':function(_0x1c710c,_0x14ee04){return _0x1c710c(_0x14ee04);},'QCLyE':'hook:stop','CoJCN':function(_0x4929a2,_0x1c14fd){return _0x4929a2??_0x1c14fd;}};try{const _0x4824fb=_0x45b75c[_0x31815f(0x1cb)](createTelemetryCollector,_0x45b75c['QCLyE']);await _0x4824fb['trackCommandStart']({'sessionId':_0x45b75c['CoJCN'](_0x762a7e,undefined),'hooksEnabled':_0x2cf488,'stopAllowed':_0x42b5b2}),await _0x4824fb['trackCommandEnd'](_0x31815f(0x1ca));}catch{}}
1
+ (function(_0x1268ee,_0x5cc03e){const _0x27b49a=_0xea9d,_0x3721af=_0x1268ee();while(!![]){try{const _0x382003=parseInt(_0x27b49a(0x198))/0x1*(parseInt(_0x27b49a(0x19f))/0x2)+parseInt(_0x27b49a(0x1a4))/0x3+-parseInt(_0x27b49a(0x199))/0x4+-parseInt(_0x27b49a(0x192))/0x5+parseInt(_0x27b49a(0x194))/0x6+-parseInt(_0x27b49a(0x1a3))/0x7*(-parseInt(_0x27b49a(0x196))/0x8)+-parseInt(_0x27b49a(0x19c))/0x9;if(_0x382003===_0x5cc03e)break;else _0x3721af['push'](_0x3721af['shift']());}catch(_0x1c914b){_0x3721af['push'](_0x3721af['shift']());}}}(_0x366c,0xc30e4));import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';import{getSessionEntry,shouldShowStopReminder}from'../utils/sessionCache.js';function _0x366c(){const _0x39a931=['stringify','4588615LLfRUX','mjPxz','8096376aoXSbT','iebTS','67720SMDndB','wxdsN','72255SHOWSD','3290680DUVLom','verification_in_progress','verified','7037595bcyoKl','status','featureId','24XrOwVw','tVSEA','sessionId','log','462YovqHV','1638450fvljLJ','Stop'];_0x366c=function(){return _0x39a931;};return _0x366c();}function _0xea9d(_0x106a16,_0x9d2332){_0x106a16=_0x106a16-0x192;const _0x366c6f=_0x366c();let _0xea9d14=_0x366c6f[_0x106a16];return _0xea9d14;}import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0x17cfc9){const _0x372fca=_0xea9d,_0x321db0={'IlAUT':function(_0x159839,_0x29a406,_0x12686a,_0x1b657b){return _0x159839(_0x29a406,_0x12686a,_0x1b657b);},'xgdyy':function(_0xe47fba,_0x2c5396){return _0xe47fba(_0x2c5396);},'ZDnCo':function(_0x474dfc,_0x2d87c9){return _0x474dfc&&_0x2d87c9;},'wxdsN':_0x372fca(0x1a5),'oJlDJ':function(_0x17a0b2,_0x3da138,_0x1bb923){return _0x17a0b2(_0x3da138,_0x1bb923);},'mjPxz':function(_0x339b64,_0x1ebf78,_0x4ba672,_0x12c329){return _0x339b64(_0x1ebf78,_0x4ba672,_0x12c329);}},_0x1c6961=await getEnabledHookContext(_0x17cfc9),_0x2fabdf=_0x1c6961?.[_0x372fca(0x1a1)]??null;let _0x3bfd8f=!![];if(!_0x2fabdf){await _0x321db0['IlAUT'](trackStop,_0x2fabdf,![],_0x3bfd8f);return;}try{const _0x30e4cb=getSessionEntry(_0x2fabdf);if(!_0x30e4cb){await _0x321db0['IlAUT'](trackStop,_0x2fabdf,!![],_0x3bfd8f);return;}const _0x3d8558=await getToken(),_0x34a0f5='https://dashboard.ranger.net/features/'+_0x30e4cb[_0x372fca(0x19e)];let _0x4634cd=null,_0x25c77=![],_0x476410=![];if(_0x3d8558)try{const _0x3564a8=await _0x321db0['xgdyy'](getFeature,_0x30e4cb[_0x372fca(0x19e)]);_0x4634cd=_0x3564a8['currentSessionId']??null;const _0x559c0f=_0x3564a8['checklistItems']['filter'](_0x562018=>_0x562018[_0x372fca(0x1a1)]===_0x4634cd);_0x25c77=_0x559c0f['some'](_0x3a0708=>_0x3a0708[_0x372fca(0x19d)]!==_0x372fca(0x19b)&&_0x3a0708[_0x372fca(0x19d)]!=='blocked'&&_0x3a0708['status']!=='closed'&&_0x3a0708[_0x372fca(0x19d)]!=='incomplete'),_0x476410=_0x559c0f['some'](_0x1b3768=>_0x1b3768[_0x372fca(0x19d)]===_0x372fca(0x19a));}catch{}if(_0x321db0['ZDnCo'](_0x3d8558,_0x4634cd)&&_0x25c77){if(!_0x476410&&shouldShowStopReminder(_0x2fabdf)){const _0x3bec5d={'hookSpecificOutput':{'hookEventName':_0x321db0[_0x372fca(0x197)],'additionalContext':'RANGER:\x20The\x20active\x20feature\x20review\x20still\x20has\x20unfinished\x20checklist\x20items.\x20Before\x20responding\x20to\x20the\x20user,\x20if\x20this\x20UI\x20work\x20is\x20ready,\x20run\x20`ranger\x20show`\x20and\x20then\x20`ranger\x20go`\x20for\x20the\x20relevant\x20scenario(s).\x20If\x20it\x20is\x20not\x20ready\x20for\x20browser\x20verification\x20yet,\x20continue\x20implementing.\x20Dashboard:\x20'+_0x34a0f5}};console[_0x372fca(0x1a2)](JSON[_0x372fca(0x1a6)](_0x3bec5d));}}if(_0x3d8558&&_0x4634cd&&!_0x25c77)try{await _0x321db0['oJlDJ'](concludeSession,_0x30e4cb[_0x372fca(0x19e)],_0x4634cd);}catch{}await _0x321db0['mjPxz'](trackStop,_0x2fabdf,!![],_0x3bfd8f);return;}catch{await _0x321db0[_0x372fca(0x193)](trackStop,_0x2fabdf,!![],_0x3bfd8f);return;}}async function trackStop(_0x3e42cf,_0x5145f0,_0x3eb262){const _0xd57a26=_0xea9d,_0x26eab4={'htUPZ':'hook:stop','iebTS':function(_0x2cb4e8,_0x4a1cf0){return _0x2cb4e8??_0x4a1cf0;},'tVSEA':'success'};try{const _0x349104=createTelemetryCollector(_0x26eab4['htUPZ']);await _0x349104['trackCommandStart']({'sessionId':_0x26eab4[_0xd57a26(0x195)](_0x3e42cf,undefined),'hooksEnabled':_0x5145f0,'stopAllowed':_0x3eb262}),await _0x349104['trackCommandEnd'](_0x26eab4[_0xd57a26(0x1a0)]);}catch{}}
@@ -1 +1 @@
1
- (function(_0x450001,_0x24af0f){var _0x4d34fc=_0x35e9,_0x461fe5=_0x450001();while(!![]){try{var _0x356c69=parseInt(_0x4d34fc(0x13c))/0x1*(parseInt(_0x4d34fc(0x13f))/0x2)+-parseInt(_0x4d34fc(0x141))/0x3+parseInt(_0x4d34fc(0x142))/0x4+parseInt(_0x4d34fc(0x140))/0x5+parseInt(_0x4d34fc(0x144))/0x6*(-parseInt(_0x4d34fc(0x13d))/0x7)+-parseInt(_0x4d34fc(0x143))/0x8*(-parseInt(_0x4d34fc(0x13b))/0x9)+-parseInt(_0x4d34fc(0x13e))/0xa;if(_0x356c69===_0x24af0f)break;else _0x461fe5['push'](_0x461fe5['shift']());}catch(_0x3cf51a){_0x461fe5['push'](_0x461fe5['shift']());}}}(_0x585a,0x89ef7));export{addEnv}from'./addEnv.js';function _0x35e9(_0x2be673,_0x55494e){_0x2be673=_0x2be673-0x13b;var _0x585a1b=_0x585a();var _0x35e956=_0x585a1b[_0x2be673];return _0x35e956;}function _0x585a(){var _0x4b43aa=['2141004zxiRty','88RALoIJ','402GTlONw','810801ZtILcE','339QTIJuT','14532XwfyTs','4759730ZwzwsR','3426KutbMu','704800kjJiKI','3203547NpPGez'];_0x585a=function(){return _0x4b43aa;};return _0x585a();}export{clean}from'./clean.js';export{login}from'./login.js';export{start,ensureLocalEnv,ensureChromium,authenticate}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
1
+ (function(_0x1464cc,_0x500ccf){var _0xc54c83=_0x428f,_0x5daca5=_0x1464cc();while(!![]){try{var _0x493e04=parseInt(_0xc54c83(0xf8))/0x1*(parseInt(_0xc54c83(0xf0))/0x2)+-parseInt(_0xc54c83(0xf4))/0x3+-parseInt(_0xc54c83(0xf1))/0x4*(-parseInt(_0xc54c83(0xf5))/0x5)+parseInt(_0xc54c83(0xef))/0x6+-parseInt(_0xc54c83(0xf2))/0x7*(parseInt(_0xc54c83(0xed))/0x8)+-parseInt(_0xc54c83(0xf3))/0x9*(parseInt(_0xc54c83(0xf6))/0xa)+parseInt(_0xc54c83(0xee))/0xb*(parseInt(_0xc54c83(0xf7))/0xc);if(_0x493e04===_0x500ccf)break;else _0x5daca5['push'](_0x5daca5['shift']());}catch(_0x370546){_0x5daca5['push'](_0x5daca5['shift']());}}}(_0x49c6,0xd5bd5));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';export{start,ensureLocalEnv,ensureChromium,authenticate}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';function _0x49c6(){var _0x11be1f=['28arFtPy','10934838HgnIip','1957446bflxKd','1606390eGGNcW','10uvqyxy','1422108xUpAcA','10woUhwB','1477784eIzKgf','11HGhhqb','7224468wpBZUs','303338zeOdHP','8rEVcle'];_0x49c6=function(){return _0x11be1f;};return _0x49c6();}function _0x428f(_0x4bd1fc,_0x3ca3ab){_0x4bd1fc=_0x4bd1fc-0xed;var _0x49c684=_0x49c6();var _0x428fc8=_0x49c684[_0x4bd1fc];return _0x428fc8;}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(_0x78b54f,_0xbe80ba){const _0x2c34a3=_0x2879,_0x50de8b=_0x78b54f();while(!![]){try{const _0x1b3efb=-parseInt(_0x2c34a3(0x16b))/0x1*(parseInt(_0x2c34a3(0x164))/0x2)+-parseInt(_0x2c34a3(0x169))/0x3*(-parseInt(_0x2c34a3(0x160))/0x4)+parseInt(_0x2c34a3(0x167))/0x5*(parseInt(_0x2c34a3(0x16f))/0x6)+parseInt(_0x2c34a3(0x161))/0x7*(-parseInt(_0x2c34a3(0x166))/0x8)+-parseInt(_0x2c34a3(0x16c))/0x9+parseInt(_0x2c34a3(0x165))/0xa+parseInt(_0x2c34a3(0x16e))/0xb;if(_0x1b3efb===_0xbe80ba)break;else _0x50de8b['push'](_0x50de8b['shift']());}catch(_0xad3dcb){_0x50de8b['push'](_0x50de8b['shift']());}}}(_0x2407,0xbb9d4));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';export async function login(){const _0x2f0120=_0x2879,_0x366e58={'EZFrV':function(_0xfaa352){return _0xfaa352();},'aKgwr':'Re-authenticating\x20via\x20MCP\x20bootstrap...','xJsrt':'\x0a✅\x20API\x20key\x20stored\x20successfully'},_0xac3d61=await _0x366e58[_0x2f0120(0x172)](getMcpAuthOrigin);if(_0xac3d61){console['log'](_0x366e58['aKgwr']),await mcpBootstrap();return;}const _0x1c6f7f=process[_0x2f0120(0x168)][_0x2f0120(0x16d)]&&process[_0x2f0120(0x162)][_0x2f0120(0x16d)];if(!_0x1c6f7f)throw new Error(_0x2f0120(0x171));try{const _0x5ded07=await runDeviceAuthFlow(),_0x48898e=await getCurrentUser(_0x5ded07);_0x48898e['success']?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x48898e['user']['organizationName']):console[_0x2f0120(0x16a)](_0x366e58[_0x2f0120(0x163)]);}catch(_0x164095){throw new Error('Login\x20failed:\x20'+(_0x164095 instanceof Error?_0x164095[_0x2f0120(0x170)]:_0x164095));}}function _0x2879(_0x49b9e2,_0x30adb6){_0x49b9e2=_0x49b9e2-0x160;const _0x2407e0=_0x2407();let _0x287996=_0x2407e0[_0x49b9e2];return _0x287996;}function _0x2407(){const _0x1f4a86=['Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','EZFrV','160eWZXYw','14nRpSwd','stdout','xJsrt','668290vTAOvQ','2166160GGwzAp','5472784ZvGbhs','1060gbJpRS','stdin','65640ZaSNBJ','log','1NNkxfL','3391623eOrZJV','isTTY','16912280RPDeOu','6180iFydKB','message'];_0x2407=function(){return _0x1f4a86;};return _0x2407();}
1
+ function _0x581d(){const _0x2b0f1a=['6304100NNNNQT','message','603gurBUf','sPQeQ','295494dqUvKw','stdin','6694670ZHYYaw','40HSmRTx','organizationName','955508BvhpVo','stdout','978426aXCsqd','2bJxGun','17452Sjvwpn','log','21VJEETn','success','1071736OZOikF'];_0x581d=function(){return _0x2b0f1a;};return _0x581d();}(function(_0x1d6211,_0x29ff05){const _0x2b0644=_0x47d5,_0x662801=_0x1d6211();while(!![]){try{const _0x240a42=-parseInt(_0x2b0644(0x1b5))/0x1*(-parseInt(_0x2b0644(0x1a6))/0x2)+parseInt(_0x2b0644(0x1ae))/0x3*(parseInt(_0x2b0644(0x1a7))/0x4)+parseInt(_0x2b0644(0x1b3))/0x5*(parseInt(_0x2b0644(0x1b0))/0x6)+parseInt(_0x2b0644(0x1a9))/0x7*(-parseInt(_0x2b0644(0x1ab))/0x8)+parseInt(_0x2b0644(0x1b7))/0x9+-parseInt(_0x2b0644(0x1b2))/0xa+-parseInt(_0x2b0644(0x1ac))/0xb;if(_0x240a42===_0x29ff05)break;else _0x662801['push'](_0x662801['shift']());}catch(_0x4d2f29){_0x662801['push'](_0x662801['shift']());}}}(_0x581d,0xa8a15));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';function _0x47d5(_0x13f5c9,_0x5f599d){_0x13f5c9=_0x13f5c9-0x1a6;const _0x581de8=_0x581d();let _0x47d5df=_0x581de8[_0x13f5c9];return _0x47d5df;}export async function login(){const _0x3995e7=_0x47d5,_0x32a0c0={'sPQeQ':function(_0x33918c){return _0x33918c();},'tUBjq':function(_0x402d6d,_0x2fcdd8){return _0x402d6d(_0x2fcdd8);}},_0x30fe6e=await getMcpAuthOrigin();if(_0x30fe6e){console['log']('Re-authenticating\x20via\x20MCP\x20bootstrap...'),await _0x32a0c0[_0x3995e7(0x1af)](mcpBootstrap);return;}const _0x36cab4=process[_0x3995e7(0x1b1)]['isTTY']&&process[_0x3995e7(0x1b6)]['isTTY'];if(!_0x36cab4)throw new Error('Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.');try{const _0x2ce299=await _0x32a0c0[_0x3995e7(0x1af)](runDeviceAuthFlow),_0x4019ef=await _0x32a0c0['tUBjq'](getCurrentUser,_0x2ce299);_0x4019ef[_0x3995e7(0x1aa)]?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x4019ef['user'][_0x3995e7(0x1b4)]):console[_0x3995e7(0x1a8)]('\x0a✅\x20API\x20key\x20stored\x20successfully');}catch(_0x5dd232){throw new Error('Login\x20failed:\x20'+(_0x5dd232 instanceof Error?_0x5dd232[_0x3995e7(0x1ad)]:_0x5dd232));}}
@@ -1 +1 @@
1
- const _0x5e7a43=_0xc0bf;(function(_0x283c15,_0x6721df){const _0x56b791=_0xc0bf,_0x1bdfc8=_0x283c15();while(!![]){try{const _0x118aff=-parseInt(_0x56b791(0x163))/0x1+-parseInt(_0x56b791(0x142))/0x2*(parseInt(_0x56b791(0x15f))/0x3)+parseInt(_0x56b791(0x101))/0x4+parseInt(_0x56b791(0xe6))/0x5+parseInt(_0x56b791(0x113))/0x6+-parseInt(_0x56b791(0x103))/0x7*(-parseInt(_0x56b791(0x12b))/0x8)+parseInt(_0x56b791(0xde))/0x9;if(_0x118aff===_0x6721df)break;else _0x1bdfc8['push'](_0x1bdfc8['shift']());}catch(_0x57389a){_0x1bdfc8['push'](_0x1bdfc8['shift']());}}}(_0xa7cd,0x208c2));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(),'.ranger','mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),_0x5e7a43(0x114),_0x5e7a43(0x12f));function _0xa7cd(){const _0x3b5a14=['content-type','JToer','xdgpt','127.0.0.1','POST','sha256','iQORx','refreshToken','child_process','\x0aOpening\x20browser\x20for\x20authentication...','kPxMp','expires_in','isTTY','name','application/json,\x20text/event-stream','proxied','Ranger\x20CLI','write','ranger-cli','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','win32','log','toString','JEmUN','35448IHvYUo','stdout','23107SHWMeJ','sJRQC','KSavH','refresh.txt','Discovering\x20authorization\x20server...','token','get','result','utf-8','KCyhn','HTTP\x20','code','error_description','zztGS','content','rBIeB','218340fzyIUE','.ranger','isError','1.0.0','code_challenge','response_type','Initializing\x20MCP\x20session...','/callback','parse','get_cli_token','application/json','match','text','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','clientSecret','authorization_endpoint','PRcaz','CJbSF','mwQOD','digest','resource','status','oHINL','error','416WxkNBR','\x0aToken\x20written\x20to\x20','xrEvg','json','auth-origin.txt','xdg-open','zxjIC','2.0','base64url','accessToken','OAuth\x20error:\x20','string','jdOBA','refresh_token','kjHoC','waUpV','AmWRR','message','close','text/event-stream','stringify','oYbsD','NGatp','1954RAhFHd','OAuthTimeoutError','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','includes','http://localhost:','client_id','client_secret','XFSaP','data:','set','SHhTt','replace','/.well-known/oauth-authorization-server','2025-03-26','xIRKE','searchParams','listen','No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','TnjII','now','Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','tvUAu','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','ojDqn','clientId','Not\x20found','start','\x20done','none','753fUrykc','authorization_code','access_token','WVlJt','74811QEShHg','<html><body><h2>Authentication\x20failed</h2><p>','writeHead','856233AbYlNK','MCP\x20initialize\x20failed:\x20','QDBUT','end','zcKog','redirect_uri','initialize','text/html','706555enGJaB','kSOvu','notifications/initialized'];_0xa7cd=function(){return _0x3b5a14;};return _0xa7cd();}export async function getMcpAuthOrigin(){const _0x1819bf=_0x5e7a43,_0x4a2c7b={'mwQOD':'utf-8','DJebb':function(_0xd16091,_0x1a5e1e){return _0xd16091||_0x1a5e1e;}};try{const _0x159f43=(await readFile(AUTH_ORIGIN_PATH,_0x4a2c7b[_0x1819bf(0x125)]))['trim']();return _0x4a2c7b['DJebb'](_0x159f43,null);}catch{return null;}}export async function mcpBootstrap(){const _0x2147ee=_0x5e7a43,_0x57dad3={'TnjII':function(_0x34fbc6){return _0x34fbc6();},'lUwin':function(_0x2a3fb5,_0x5f2e2a){return _0x2a3fb5(_0x5f2e2a);},'DqYKL':'proxied','JToer':function(_0x2c66e5,_0x2ba23b){return _0x2c66e5+_0x2ba23b;},'oJJJs':'MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','ccHLO':function(_0x11c778,_0x4ec7c9,_0x101e37){return _0x11c778(_0x4ec7c9,_0x101e37);}},_0x3d340a=_0x57dad3['TnjII'](getMcpAuthUrl);currentOrigin=_0x3d340a;const _0x3cee86=process['stdout'][_0x2147ee(0xf5)]??![];console['log'](_0x2147ee(0x120)+_0x3d340a+'\x0a');const _0x13ff09=await _0x57dad3['lUwin'](tryUnauthenticated,_0x3d340a);let _0x1548fb=null;if(_0x13ff09===_0x57dad3['DqYKL'])_0x1548fb='';else{_0x1548fb=await _0x57dad3[_0x2147ee(0x154)](loadCachedToken);if(!_0x1548fb){if(!_0x3cee86)throw new Error(_0x57dad3[_0x2147ee(0xea)](_0x57dad3['oJJJs'],'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.'));_0x1548fb=await oauthFlow(_0x3d340a);}}await _0x57dad3['ccHLO'](callGetCliToken,_0x3d340a,_0x1548fb);}async function tryUnauthenticated(_0x2184a5){const _0x126e1d=_0x5e7a43,_0x464725={'rBIeB':function(_0x1c1e65,_0x83d7ec,_0x392f16){return _0x1c1e65(_0x83d7ec,_0x392f16);},'MbwGg':_0x126e1d(0x11d),'bxTkl':_0x126e1d(0x14f),'DZcri':function(_0x563e60,_0xff1e3a){return _0x563e60===_0xff1e3a;},'rdjed':'needs-oauth'},_0x2ad9e8=await _0x464725[_0x126e1d(0x112)](fetch,_0x2184a5,{'method':'POST','headers':{'Content-Type':_0x464725['MbwGg'],'Accept':_0x126e1d(0xf7)},'body':JSON[_0x126e1d(0x13f)]({'jsonrpc':'2.0','id':0x1,'method':_0x126e1d(0xe4),'params':{'protocolVersion':_0x464725['bxTkl'],'capabilities':{},'clientInfo':{'name':_0x126e1d(0xfb),'version':'1.0.0'}}})});if(_0x2ad9e8['ok'])return await _0x2ad9e8['text'](),_0x126e1d(0xf8);if(_0x464725['DZcri'](_0x2ad9e8[_0x126e1d(0x128)],0x191))return await _0x2ad9e8[_0x126e1d(0x11f)](),_0x464725['rdjed'];const _0x417348=await _0x2ad9e8['text']();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0x2ad9e8[_0x126e1d(0x128)]+':\x20'+_0x417348);}class OAuthTimeoutError extends Error{constructor(_0x2ccf9f){const _0x4ec326=_0x5e7a43,_0x132504={'mAGCs':_0x4ec326(0x143)};super(_0x2ccf9f),this[_0x4ec326(0xf6)]=_0x132504['mAGCs'];}}async function oauthFlow(_0x2a6099){const _0x38ca70=_0x5e7a43,_0x341497={'oYbsD':function(_0x4d0746,_0x4b99a5){return _0x4d0746(_0x4b99a5);},'FgsJk':function(_0x243117,_0x2fc45f){return _0x243117 instanceof _0x2fc45f;},'zxjIC':function(_0x52496a){return _0x52496a();}};try{return await _0x341497[_0x38ca70(0x140)](oauthFlowAttempt,_0x2a6099);}catch(_0x1d10fb){if(_0x341497['FgsJk'](_0x1d10fb,OAuthTimeoutError)&&await _0x341497[_0x38ca70(0x131)](loadCachedClient))return console[_0x38ca70(0xfe)]('\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a'),await _0x341497['zxjIC'](clearCachedClient),await oauthFlowAttempt(_0x2a6099);throw _0x1d10fb;}}async function oauthFlowAttempt(_0x3c0e7b){const _0x32bda1=_0x5e7a43,_0x3792b8={'cyVuk':function(_0x44cebe,_0x574672){return _0x44cebe(_0x574672);},'ACXrl':_0x32bda1(0x156),'AKmRR':function(_0x5ac433,_0x253f46,_0x41f6b3){return _0x5ac433(_0x253f46,_0x41f6b3);},'WVlJt':_0x32bda1(0xf9),'Qmfvw':_0x32bda1(0x160),'NYnvm':_0x32bda1(0x10e),'oWflx':_0x32bda1(0x15e),'TjJdg':_0x32bda1(0x158),'afWor':_0x32bda1(0xee),'OKTta':'base64url','ybEzc':'hex','TMUTB':_0x32bda1(0x118),'QVxJz':_0x32bda1(0x147),'qFiHW':_0x32bda1(0xe3),'zXnnj':'state','bfWnE':function(_0x38bdcb,_0x2853bb){return _0x38bdcb(_0x2853bb);},'XqpdM':'Exchanging\x20authorization\x20code...','iQORx':'application/x-www-form-urlencoded','FpDwS':function(_0x14e308,_0x338440,_0x320233,_0x258b61){return _0x14e308(_0x338440,_0x320233,_0x258b61);}},_0x5a8433=_0x3c0e7b[_0x32bda1(0x14d)](/\/mcp$/,'');process['stdout'][_0x32bda1(0xfa)](_0x32bda1(0x107));const _0x2aca00=await _0x3792b8['cyVuk'](fetch,_0x5a8433+'/.well-known/oauth-protected-resource');if(!_0x2aca00['ok'])throw new Error(_0x3792b8['ACXrl']);const _0x450670=await _0x2aca00[_0x32bda1(0x12e)](),_0x52aa64=_0x450670['authorization_servers']?.[0x0];if(!_0x52aa64)throw new Error(_0x32bda1(0x153));console['log']('\x20'+_0x52aa64);const _0x54dd3d=await fetchAuthServerMetadata(_0x52aa64);let _0x5e5a4a,_0x5622c1;const _0x342886=await loadCachedClient();if(_0x342886)_0x5e5a4a=_0x342886[_0x32bda1(0x15a)],_0x5622c1=_0x342886[_0x32bda1(0x121)];else{if(_0x54dd3d['registration_endpoint']){process['stdout'][_0x32bda1(0xfa)]('Registering\x20OAuth\x20client...');const _0x5fb08a=await _0x3792b8['AKmRR'](fetch,_0x54dd3d['registration_endpoint'],{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON[_0x32bda1(0x13f)]({'client_name':_0x3792b8[_0x32bda1(0x162)],'redirect_uris':[_0x32bda1(0x146)+CALLBACK_PORT+'/callback'],'grant_types':[_0x3792b8['Qmfvw'],_0x32bda1(0x138)],'response_types':[_0x3792b8['NYnvm']],'token_endpoint_auth_method':_0x3792b8['oWflx']})});if(!_0x5fb08a['ok']){const _0x52ce19=await _0x5fb08a['text']();throw new Error('Client\x20registration\x20failed:\x20'+_0x52ce19);}const _0x38ec38=await _0x5fb08a['json']();_0x5e5a4a=_0x38ec38['client_id'],_0x5622c1=_0x38ec38[_0x32bda1(0x148)],await saveCachedClient(_0x5e5a4a,_0x5622c1),console['log'](_0x32bda1(0x15d));}else throw new Error(_0x3792b8['TjJdg']);}const _0x115474=randomBytes(0x20)[_0x32bda1(0xff)](_0x32bda1(0x133)),_0x302b5b=createHash(_0x3792b8['afWor'])['update'](_0x115474)[_0x32bda1(0x126)](_0x3792b8['OKTta']),_0x40e824=randomBytes(0x10)['toString'](_0x3792b8['ybEzc']),_0x1b822a=new URL(_0x54dd3d[_0x32bda1(0x122)]);_0x1b822a[_0x32bda1(0x151)]['set'](_0x3792b8['TMUTB'],_0x32bda1(0x10e)),_0x1b822a[_0x32bda1(0x151)]['set'](_0x3792b8['QVxJz'],_0x5e5a4a),_0x1b822a['searchParams'][_0x32bda1(0x14b)](_0x3792b8['qFiHW'],'http://localhost:'+CALLBACK_PORT+'/callback'),_0x1b822a[_0x32bda1(0x151)]['set'](_0x32bda1(0x117),_0x302b5b),_0x1b822a[_0x32bda1(0x151)]['set']('code_challenge_method','S256'),_0x1b822a['searchParams'][_0x32bda1(0x14b)](_0x3792b8['zXnnj'],_0x40e824);_0x450670[_0x32bda1(0x127)]&&_0x1b822a['searchParams']['set']('resource',_0x450670[_0x32bda1(0x127)]);console[_0x32bda1(0xfe)](_0x32bda1(0xf2)),console[_0x32bda1(0xfe)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a'+_0x1b822a['toString']()+'\x0a'),await openBrowser(_0x1b822a[_0x32bda1(0xff)]());const _0x7e4ab=await _0x3792b8['bfWnE'](waitForCallback,_0x40e824);process[_0x32bda1(0x102)]['write'](_0x3792b8['XqpdM']);const _0xdc2d54=new URLSearchParams({'grant_type':_0x32bda1(0x160),'code':_0x7e4ab,'redirect_uri':_0x32bda1(0x146)+CALLBACK_PORT+'/callback','client_id':_0x5e5a4a,'code_verifier':_0x115474});_0x5622c1&&_0xdc2d54['set']('client_secret',_0x5622c1);_0x450670[_0x32bda1(0x127)]&&_0xdc2d54[_0x32bda1(0x14b)](_0x32bda1(0x127),_0x450670[_0x32bda1(0x127)]);const _0x5cb9e2=await fetch(_0x54dd3d['token_endpoint'],{'method':'POST','headers':{'Content-Type':_0x3792b8[_0x32bda1(0xef)]},'body':_0xdc2d54});if(!_0x5cb9e2['ok']){const _0x5c6100=await _0x5cb9e2['text']();throw new Error('Token\x20exchange\x20failed:\x20'+_0x5c6100);}const _0x14c5dc=await _0x5cb9e2[_0x32bda1(0x12e)]();return console['log']('\x20done'),await _0x3792b8['FpDwS'](saveCachedToken,_0x14c5dc[_0x32bda1(0x161)],_0x14c5dc['refresh_token'],_0x14c5dc[_0x32bda1(0xf4)]),_0x14c5dc[_0x32bda1(0x161)];}async function callGetCliToken(_0x4bbe26,_0x112c17){const _0x554d6c=_0x5e7a43,_0x49396={'NSGLU':function(_0x5385fb,_0x57efd3,_0xa98c10){return _0x5385fb(_0x57efd3,_0xa98c10);},'IxqtS':function(_0x34efec,_0x57ec33){return _0x34efec(_0x57ec33);},'sJRQC':_0x554d6c(0x11d),'xrEvg':'Authorization','CJbSF':_0x554d6c(0x119),'kjHoC':_0x554d6c(0x132),'xIRKE':_0x554d6c(0x14f),'uMUiF':_0x554d6c(0x116),'bBPOO':_0x554d6c(0x11c),'xdgpt':_0x554d6c(0x15d),'MrXOS':function(_0x36352e,_0x617461){return _0x36352e(_0x617461);},'jdOBA':function(_0x262df2,_0x4de73a,_0x1659ac){return _0x262df2(_0x4de73a,_0x1659ac);},'PRcaz':_0x554d6c(0x114),'hldST':function(_0x530c98,_0x503ab8,_0x8ad9cd){return _0x530c98(_0x503ab8,_0x8ad9cd);},'KCyhn':_0x554d6c(0x106),'XFSaP':function(_0x5bdd25,_0x20899e,_0x161e0f,_0x5ae3ae){return _0x5bdd25(_0x20899e,_0x161e0f,_0x5ae3ae);},'kPxMp':function(_0x499af9,_0x229ce5,_0x3c93db){return _0x499af9(_0x229ce5,_0x3c93db);},'kzNTN':'Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a'},_0x1532d7={'Content-Type':_0x49396[_0x554d6c(0x104)],'Accept':_0x554d6c(0xf7)};_0x112c17&&(_0x1532d7[_0x49396[_0x554d6c(0x12d)]]='Bearer\x20'+_0x112c17);const _0x2adb5d=async _0xf5e12d=>{const _0x416077=_0x554d6c,_0x24cf0a=await _0x49396['NSGLU'](fetch,_0x4bbe26,{'method':_0x416077(0xed),'headers':_0x1532d7,'body':JSON[_0x416077(0x13f)](_0xf5e12d)});if(!_0x24cf0a['ok']){const _0x190f7f=await _0x24cf0a[_0x416077(0x11f)]();throw new Error(_0x416077(0x10d)+_0x24cf0a[_0x416077(0x128)]+':\x20'+_0x190f7f);}return _0x49396['IxqtS'](parseResponse,_0x24cf0a);};process['stdout'][_0x554d6c(0xfa)](_0x49396[_0x554d6c(0x124)]);const _0x48a02d=await _0x2adb5d({'jsonrpc':_0x49396[_0x554d6c(0x139)],'id':0x1,'method':_0x554d6c(0xe4),'params':{'protocolVersion':_0x49396[_0x554d6c(0x150)],'capabilities':{},'clientInfo':{'name':'ranger-cli','version':_0x49396['uMUiF']}}});if(_0x48a02d[_0x554d6c(0x12a)])throw new Error(_0x554d6c(0xdf)+(_0x48a02d['error'][_0x554d6c(0x13c)]??JSON[_0x554d6c(0x13f)](_0x48a02d['error'])));console['log']('\x20done'),await _0x49396['NSGLU'](fetch,_0x4bbe26,{'method':_0x554d6c(0xed),'headers':_0x1532d7,'body':JSON['stringify']({'jsonrpc':'2.0','method':_0x554d6c(0xe8)})})['then'](_0x3a75fc=>_0x3a75fc[_0x554d6c(0x11f)]()),process['stdout'][_0x554d6c(0xfa)]('Requesting\x20CLI\x20token...');const _0x344a56=await _0x49396['IxqtS'](_0x2adb5d,{'jsonrpc':_0x49396[_0x554d6c(0x139)],'id':0x2,'method':'tools/call','params':{'name':_0x49396['bBPOO'],'arguments':{}}});if(_0x344a56['error'])throw new Error('get_cli_token\x20failed:\x20'+(_0x344a56['error'][_0x554d6c(0x13c)]??JSON['stringify'](_0x344a56[_0x554d6c(0x12a)])));console['log'](_0x49396[_0x554d6c(0xeb)]);const _0x2cde00=_0x49396['MrXOS'](extractToken,_0x344a56[_0x554d6c(0x10a)]);if(!_0x2cde00){console[_0x554d6c(0x12a)]('\x0aUnexpected\x20response\x20structure:'),console[_0x554d6c(0x12a)](JSON[_0x554d6c(0x13f)](_0x344a56['result'],null,0x2));throw new Error('Could\x20not\x20extract\x20token\x20from\x20MCP\x20response');}const _0x645ac6=_0x49396[_0x554d6c(0x137)](join,homedir(),_0x49396[_0x554d6c(0x123)]),_0x1c773e=_0x49396['hldST'](join,_0x645ac6,_0x49396[_0x554d6c(0x10c)]);await mkdir(_0x645ac6,{'recursive':!![]}),await _0x49396[_0x554d6c(0x149)](writeFile,_0x1c773e,_0x2cde00,{'mode':0x180}),await writeFile(_0x49396[_0x554d6c(0xf3)](join,_0x645ac6,'auth-origin.txt'),_0x4bbe26,{'mode':0x180}),console['log'](_0x554d6c(0x12c)+_0x1c773e),console['log'](_0x49396['kzNTN']);}async function fetchAuthServerMetadata(_0x1fa68d){const _0x2a69af=_0x5e7a43,_0x50ea78={'JEmUN':function(_0x4c7f63,_0x1811bc){return _0x4c7f63(_0x1811bc);}},_0x30fa17=_0x1fa68d+_0x2a69af(0x14e),_0x52b4b9=await _0x50ea78[_0x2a69af(0x100)](fetch,_0x30fa17);if(!_0x52b4b9['ok'])throw new Error(_0x2a69af(0x144)+_0x30fa17+':\x20'+_0x52b4b9['status']);return _0x52b4b9[_0x2a69af(0x12e)]();}function waitForCallback(_0x21405f){const _0x475725=_0x5e7a43,_0x3fb2eb={'Btrrg':function(_0xfe9491,_0x480fbb){return _0xfe9491!==_0x480fbb;},'PdCbY':function(_0x6890a9,_0x4ef571){return _0x6890a9(_0x4ef571);},'KSavH':_0x475725(0xec)};return new Promise((_0x1b0f53,_0x4a6e4)=>{const _0x4e0262=_0x475725,_0x481522={'QDBUT':_0x4e0262(0x12a),'WtbFB':_0x4e0262(0x10f),'rZiEF':function(_0x7cc2f8,_0x51878){return _0x3fb2eb['Btrrg'](_0x7cc2f8,_0x51878);}},_0x44a510=setTimeout(()=>{const _0x53ba4e=_0x4e0262;_0x1b2184['close'](),_0x4a6e4(new OAuthTimeoutError(_0x53ba4e(0xfc)));},0x1d4c0),_0x1b2184=_0x3fb2eb['PdCbY'](createServer,(_0x2bd1a6,_0x29ddcd)=>{const _0x471da1=_0x4e0262,_0x593519=new URL(_0x2bd1a6['url']??'/','http://localhost:'+CALLBACK_PORT);if(_0x593519['pathname']!==_0x471da1(0x11a)){_0x29ddcd['writeHead'](0x194),_0x29ddcd['end'](_0x471da1(0x15b));return;}const _0xe137b0=_0x593519[_0x471da1(0x151)][_0x471da1(0x109)]('code'),_0x466ffb=_0x593519['searchParams']['get']('state'),_0x2c428f=_0x593519['searchParams']['get'](_0x481522[_0x471da1(0xe0)]);if(_0x2c428f){const _0xb326fc=_0x593519['searchParams'][_0x471da1(0x109)](_0x481522['WtbFB'])??_0x2c428f;_0x29ddcd['writeHead'](0xc8,{'Content-Type':'text/html'}),_0x29ddcd[_0x471da1(0xe1)](_0x471da1(0x164)+_0xb326fc+'</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>'),clearTimeout(_0x44a510),_0x1b2184['close'](),_0x4a6e4(new Error(_0x471da1(0x135)+_0xb326fc));return;}if(!_0xe137b0||_0x481522['rZiEF'](_0x466ffb,_0x21405f)){_0x29ddcd[_0x471da1(0xdd)](0x190,{'Content-Type':_0x471da1(0xe5)}),_0x29ddcd['end']('<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>');return;}_0x29ddcd[_0x471da1(0xdd)](0xc8,{'Content-Type':_0x471da1(0xe5)}),_0x29ddcd['end']('<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>'),clearTimeout(_0x44a510),_0x1b2184[_0x471da1(0x13d)](),_0x1b0f53(_0xe137b0);});_0x1b2184[_0x4e0262(0x152)](CALLBACK_PORT,_0x3fb2eb[_0x4e0262(0x105)]);});}async function openBrowser(_0x2495ed){const _0x325c3e=_0x5e7a43,_0xe67a25={'mBGNB':function(_0x83858,_0x3b4aa0){return _0x83858===_0x3b4aa0;},'zcKog':'open','VuGwP':_0x325c3e(0x15c),'XNeXs':_0x325c3e(0x130),'fvZWC':function(_0xbb4d6,_0x15f4b0){return _0xbb4d6(_0x15f4b0);}},{exec:_0x306ed9}=await import(_0x325c3e(0xf1)),_0x10d7bb=_0xe67a25['mBGNB'](process['platform'],'darwin')?_0xe67a25[_0x325c3e(0xe2)]:_0xe67a25['mBGNB'](process['platform'],_0x325c3e(0xfd))?_0xe67a25['VuGwP']:_0xe67a25['XNeXs'];_0xe67a25['fvZWC'](_0x306ed9,_0x10d7bb+'\x20\x22'+_0x2495ed+'\x22');}function _0xc0bf(_0x5506ab,_0x95344d){_0x5506ab=_0x5506ab-0xdd;const _0xa7cde=_0xa7cd();let _0xc0bf74=_0xa7cde[_0x5506ab];return _0xc0bf74;}let currentOrigin='';async function loadCachedToken(){const _0x4f8666=_0x5e7a43,_0x2bdc37={'oHINL':'utf-8','SHhTt':function(_0x15d522,_0x58f8bf){return _0x15d522!==_0x58f8bf;},'pbfcJ':function(_0x325312,_0xb7de35){return _0x325312>_0xb7de35;}};try{const _0x38b0b3=JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x2bdc37[_0x4f8666(0x129)]));if(_0x38b0b3['origin']&&_0x2bdc37[_0x4f8666(0x14c)](_0x38b0b3['origin'],currentOrigin))return null;if(_0x38b0b3['expiresAt']&&_0x2bdc37['pbfcJ'](Date['now'](),_0x38b0b3['expiresAt']))return null;return _0x38b0b3['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x497675,_0x36f18e,_0x2e7b06){const _0x3c09ae=_0x5e7a43,_0x5ced15={'ojDqn':function(_0x563b5b,_0x51a184){return _0x563b5b*_0x51a184;},'kMmRQ':function(_0x992b6b,_0x1b8652,_0x2dcf41){return _0x992b6b(_0x1b8652,_0x2dcf41);},'zztGS':function(_0x4377ef){return _0x4377ef();},'kSOvu':function(_0x23eaa3,_0x22c761,_0x277595,_0x1557e0){return _0x23eaa3(_0x22c761,_0x277595,_0x1557e0);}},_0x2f46cb=await loadCachedData(),_0x33c89e={..._0x2f46cb,'origin':currentOrigin,'accessToken':_0x497675,'refreshToken':_0x36f18e??_0x2f46cb?.[_0x3c09ae(0xf0)],'expiresAt':_0x2e7b06?Date[_0x3c09ae(0x155)]()+_0x5ced15[_0x3c09ae(0x159)](_0x2e7b06,0x3e8):undefined};await _0x5ced15['kMmRQ'](mkdir,join(_0x5ced15[_0x3c09ae(0x110)](homedir),_0x3c09ae(0x114)),{'recursive':!![]}),await _0x5ced15[_0x3c09ae(0xe7)](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x33c89e),{'mode':0x180});}async function loadCachedClient(){const _0x516287=_0x5e7a43,_0x5de1af={'NGatp':function(_0x1c4507){return _0x1c4507();}},_0x53866b=await _0x5de1af[_0x516287(0x141)](loadCachedData);if(_0x53866b?.['origin']&&_0x53866b['origin']!==currentOrigin)return null;return _0x53866b?.[_0x516287(0x15a)]?{'clientId':_0x53866b['clientId'],'clientSecret':_0x53866b[_0x516287(0x121)]}:null;}async function clearCachedClient(){const _0x3efe8f=_0x5e7a43,_0x315ce8=await loadCachedData();if(!_0x315ce8)return;const {clientId:_0x2726b9,clientSecret:_0x26a138,..._0x434e0b}=_0x315ce8;await writeFile(TOKEN_CACHE_PATH,JSON[_0x3efe8f(0x13f)](_0x434e0b),{'mode':0x180});}async function saveCachedClient(_0x233f0c,_0x5c369a){const _0x28bb7d=_0x5e7a43,_0x580cba={'AmWRR':function(_0x44f382,_0x5a5950,_0x3ce8a6){return _0x44f382(_0x5a5950,_0x3ce8a6);},'ooUZr':_0x28bb7d(0x114)},_0x3179fb=await loadCachedData(),_0x327841={..._0x3179fb,'origin':currentOrigin,'accessToken':_0x3179fb?.[_0x28bb7d(0x134)]??'','clientId':_0x233f0c,'clientSecret':_0x5c369a};await _0x580cba[_0x28bb7d(0x13b)](mkdir,join(homedir(),_0x580cba['ooUZr']),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON[_0x28bb7d(0x13f)](_0x327841),{'mode':0x180});}async function loadCachedData(){const _0x501cf1=_0x5e7a43,_0x39f940={'NmvQF':function(_0x50acf2,_0x3f889f,_0x3a7cfe){return _0x50acf2(_0x3f889f,_0x3a7cfe);}};try{return JSON['parse'](await _0x39f940['NmvQF'](readFile,TOKEN_CACHE_PATH,_0x501cf1(0x10b)));}catch{return null;}}async function parseResponse(_0x4e12af){const _0x3c6fa8=_0x5e7a43,_0x5abfb1={'gihJo':_0x3c6fa8(0xe9),'tnqRy':_0x3c6fa8(0x13e)},_0x302571=_0x4e12af['headers']['get'](_0x5abfb1['gihJo'])??'';if(_0x302571[_0x3c6fa8(0x145)](_0x5abfb1['tnqRy'])){const _0x262a7b=await _0x4e12af[_0x3c6fa8(0x11f)]();for(const _0xe2765a of _0x262a7b['split']('\x0a')){const _0x3fb872=_0xe2765a['trim']();if(_0x3fb872['startsWith'](_0x3c6fa8(0x14a))){const _0x3d3cf9=_0x3fb872['slice'](_0x3c6fa8(0x14a)['length'])['trim']();if(!_0x3d3cf9)continue;try{const _0x97293=JSON['parse'](_0x3d3cf9);if(_0x97293['id']!==undefined||_0x97293[_0x3c6fa8(0x12a)])return _0x97293;}catch{}}}throw new Error('No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream');}return _0x4e12af['json']();}function extractToken(_0x40e149){const _0x19946c=_0x5e7a43,_0x485e84={'tvUAu':function(_0x464b01,_0x27ff1f){return _0x464b01===_0x27ff1f;},'iXnlu':_0x19946c(0x136),'NxRoQ':'Unknown\x20error','waUpV':function(_0x3799fe,_0x76545a){return _0x3799fe===_0x76545a;}};if(!_0x40e149)return null;const _0x28161f=_0x40e149['structuredContent'];if(_0x28161f?.['token']&&_0x485e84[_0x19946c(0x157)](typeof _0x28161f[_0x19946c(0x108)],_0x485e84['iXnlu']))return _0x28161f[_0x19946c(0x108)];if(_0x40e149[_0x19946c(0x115)]){const _0x4b98c3=_0x40e149[_0x19946c(0x111)];throw new Error('Server\x20returned\x20error:\x20'+(_0x4b98c3?.[0x0]?.[_0x19946c(0x11f)]??_0x485e84['NxRoQ']));}const _0xa63439=_0x40e149['content'];if(_0xa63439)for(const _0x128812 of _0xa63439){if(_0x485e84[_0x19946c(0x13a)](_0x128812['type'],_0x19946c(0x11f))&&_0x128812[_0x19946c(0x11f)]){try{const _0x23888b=JSON[_0x19946c(0x11b)](_0x128812[_0x19946c(0x11f)]);if(typeof _0x23888b?.[_0x19946c(0x108)]==='string')return _0x23888b[_0x19946c(0x108)];}catch{}const _0x41474b=_0x128812[_0x19946c(0x11f)][_0x19946c(0x11e)](/(rngr_[A-Za-z0-9_-]+)/);if(_0x41474b)return _0x41474b[0x1];}}return null;}
1
+ const _0x5f2572=_0x1cee;(function(_0x3c1a83,_0x191a10){const _0x5412a6=_0x1cee,_0x30e0a9=_0x3c1a83();while(!![]){try{const _0x33c332=-parseInt(_0x5412a6(0x199))/0x1*(-parseInt(_0x5412a6(0x1ca))/0x2)+-parseInt(_0x5412a6(0x184))/0x3+parseInt(_0x5412a6(0x1a9))/0x4+-parseInt(_0x5412a6(0x189))/0x5+-parseInt(_0x5412a6(0x188))/0x6*(-parseInt(_0x5412a6(0x1f2))/0x7)+parseInt(_0x5412a6(0x1d6))/0x8+-parseInt(_0x5412a6(0x1cd))/0x9*(parseInt(_0x5412a6(0x1b5))/0xa);if(_0x33c332===_0x191a10)break;else _0x30e0a9['push'](_0x30e0a9['shift']());}catch(_0x4fbc24){_0x30e0a9['push'](_0x30e0a9['shift']());}}}(_0x7552,0x3bdb9));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(),_0x5f2572(0x1b4),'mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),'.ranger','auth-origin.txt');export async function getMcpAuthOrigin(){const _0x503f09=_0x5f2572,_0x20feb5={'Nfzcx':function(_0x377dc6,_0x72b8f7,_0x52a5f4){return _0x377dc6(_0x72b8f7,_0x52a5f4);},'OHFnL':_0x503f09(0x1b9)};try{const _0x59ff81=(await _0x20feb5['Nfzcx'](readFile,AUTH_ORIGIN_PATH,_0x20feb5['OHFnL']))[_0x503f09(0x1ad)]();return _0x59ff81||null;}catch{return null;}}export async function mcpBootstrap(){const _0x15cce8=_0x5f2572,_0x5bc1e9={'RqDmw':function(_0x159f17,_0x370835){return _0x159f17===_0x370835;},'xRUTF':function(_0x353e53){return _0x353e53();},'gOWVw':_0x15cce8(0x1bc),'nnYxG':_0x15cce8(0x197),'yIVbk':function(_0x2b2f01,_0x8b30ae,_0x505131){return _0x2b2f01(_0x8b30ae,_0x505131);}},_0x2657da=getMcpAuthUrl();currentOrigin=_0x2657da;const _0x16aae3=process[_0x15cce8(0x17d)][_0x15cce8(0x1ef)]??![];console['log']('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x2657da+'\x0a');const _0x559a89=await tryUnauthenticated(_0x2657da);let _0xa1f127=null;if(_0x5bc1e9['RqDmw'](_0x559a89,'proxied'))_0xa1f127='';else{_0xa1f127=await _0x5bc1e9['xRUTF'](loadCachedToken);if(!_0xa1f127){if(!_0x16aae3)throw new Error(_0x5bc1e9['gOWVw']+_0x5bc1e9['nnYxG']);_0xa1f127=await oauthFlow(_0x2657da);}}await _0x5bc1e9[_0x15cce8(0x16c)](callGetCliToken,_0x2657da,_0xa1f127);}async function tryUnauthenticated(_0xcf3aa3){const _0xe35533=_0x5f2572,_0x52a6aa={'PdNXy':function(_0x44f294,_0x2f05b8,_0x1a9b02){return _0x44f294(_0x2f05b8,_0x1a9b02);},'dXvRU':'application/json,\x20text/event-stream','CulJw':'2025-03-26','GNwBl':'ranger-cli','lLNKG':_0xe35533(0x1d4),'JdmLu':'needs-oauth'},_0x294fe7=await _0x52a6aa['PdNXy'](fetch,_0xcf3aa3,{'method':_0xe35533(0x174),'headers':{'Content-Type':'application/json','Accept':_0x52a6aa['dXvRU']},'body':JSON[_0xe35533(0x19d)]({'jsonrpc':'2.0','id':0x1,'method':_0xe35533(0x1b1),'params':{'protocolVersion':_0x52a6aa['CulJw'],'capabilities':{},'clientInfo':{'name':_0x52a6aa['GNwBl'],'version':_0x52a6aa['lLNKG']}}})});if(_0x294fe7['ok'])return await _0x294fe7[_0xe35533(0x183)](),'proxied';if(_0x294fe7[_0xe35533(0x1e7)]===0x191)return await _0x294fe7[_0xe35533(0x183)](),_0x52a6aa[_0xe35533(0x16b)];const _0x19c1cc=await _0x294fe7[_0xe35533(0x183)]();throw new Error(_0xe35533(0x1e8)+_0x294fe7[_0xe35533(0x1e7)]+':\x20'+_0x19c1cc);}class OAuthTimeoutError extends Error{constructor(_0x5e47a0){super(_0x5e47a0),this['name']='OAuthTimeoutError';}}async function oauthFlow(_0x15042c){const _0x30e24e=_0x5f2572,_0x46aec0={'vjMMP':function(_0x530a9b){return _0x530a9b();}};try{return await oauthFlowAttempt(_0x15042c);}catch(_0x1c9872){if(_0x1c9872 instanceof OAuthTimeoutError&&await _0x46aec0['vjMMP'](loadCachedClient))return console['log'](_0x30e24e(0x1d8)),await _0x46aec0[_0x30e24e(0x1f4)](clearCachedClient),await oauthFlowAttempt(_0x15042c);throw _0x1c9872;}}async function oauthFlowAttempt(_0x3654b5){const _0x207f3a=_0x5f2572,_0x1f402e={'WTepQ':'Discovering\x20authorization\x20server...','xmATQ':function(_0x26a21b,_0x17a3e2){return _0x26a21b(_0x17a3e2);},'CedAe':'Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','QImYE':function(_0x387431){return _0x387431();},'ljhPQ':_0x207f3a(0x1be),'djitZ':_0x207f3a(0x1df),'eZPew':'authorization_code','RCYBv':_0x207f3a(0x1db),'vAnaR':_0x207f3a(0x19f),'hNHeX':function(_0x9ce41a,_0x29e5fe){return _0x9ce41a(_0x29e5fe);},'JLkMq':_0x207f3a(0x18c),'dBZkN':'base64url','mKjDa':'hex','hFHVG':'response_type','wqxrl':_0x207f3a(0x1d5),'Yoych':_0x207f3a(0x1c0),'pgQkg':_0x207f3a(0x1a6),'qHxzs':_0x207f3a(0x1b7),'MxoEN':function(_0x169dcb,_0x355a40,_0x9b554a){return _0x169dcb(_0x355a40,_0x9b554a);},'oYPlz':'application/x-www-form-urlencoded','qQjeA':_0x207f3a(0x1f1)},_0x34ce72=_0x3654b5['replace'](/\/mcp$/,'');process[_0x207f3a(0x17d)]['write'](_0x1f402e[_0x207f3a(0x187)]);const _0x503b40=await _0x1f402e[_0x207f3a(0x18f)](fetch,_0x34ce72+_0x207f3a(0x190));if(!_0x503b40['ok'])throw new Error(_0x1f402e['CedAe']);const _0x2cd3b2=await _0x503b40[_0x207f3a(0x1b2)](),_0x497092=_0x2cd3b2['authorization_servers']?.[0x0];if(!_0x497092)throw new Error('No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata');console['log']('\x20'+_0x497092);const _0x2b64ac=await fetchAuthServerMetadata(_0x497092);let _0x5658a1,_0x42c9f4;const _0x506245=await _0x1f402e[_0x207f3a(0x175)](loadCachedClient);if(_0x506245)_0x5658a1=_0x506245['clientId'],_0x42c9f4=_0x506245['clientSecret'];else{if(_0x2b64ac['registration_endpoint']){process['stdout']['write'](_0x1f402e['ljhPQ']);const _0x285b5d=await fetch(_0x2b64ac[_0x207f3a(0x1a5)],{'method':'POST','headers':{'Content-Type':_0x207f3a(0x17c)},'body':JSON['stringify']({'client_name':_0x1f402e[_0x207f3a(0x1c5)],'redirect_uris':['http://localhost:'+CALLBACK_PORT+'/callback'],'grant_types':[_0x1f402e[_0x207f3a(0x1a7)],_0x1f402e[_0x207f3a(0x1e9)]],'response_types':['code'],'token_endpoint_auth_method':_0x207f3a(0x1b3)})});if(!_0x285b5d['ok']){const _0x1ae1ac=await _0x285b5d['text']();throw new Error('Client\x20registration\x20failed:\x20'+_0x1ae1ac);}const _0x3bf709=await _0x285b5d['json']();_0x5658a1=_0x3bf709[_0x207f3a(0x1c0)],_0x42c9f4=_0x3bf709['client_secret'],await saveCachedClient(_0x5658a1,_0x42c9f4),console['log']('\x20done');}else throw new Error(_0x1f402e['vAnaR']);}const _0x3677e4=randomBytes(0x20)['toString']('base64url'),_0x2e8746=_0x1f402e['hNHeX'](createHash,_0x1f402e[_0x207f3a(0x18a)])[_0x207f3a(0x19c)](_0x3677e4)[_0x207f3a(0x1cf)](_0x1f402e['dBZkN']),_0x3b95a3=_0x1f402e[_0x207f3a(0x19e)](randomBytes,0x10)['toString'](_0x1f402e[_0x207f3a(0x1e0)]),_0xbf2acc=new URL(_0x2b64ac['authorization_endpoint']);_0xbf2acc[_0x207f3a(0x182)][_0x207f3a(0x1bd)](_0x1f402e[_0x207f3a(0x1c4)],_0x1f402e[_0x207f3a(0x19a)]),_0xbf2acc[_0x207f3a(0x182)][_0x207f3a(0x1bd)](_0x1f402e['Yoych'],_0x5658a1),_0xbf2acc[_0x207f3a(0x182)][_0x207f3a(0x1bd)](_0x207f3a(0x195),'http://localhost:'+CALLBACK_PORT+_0x207f3a(0x1b6)),_0xbf2acc[_0x207f3a(0x182)]['set'](_0x207f3a(0x1d1),_0x2e8746),_0xbf2acc[_0x207f3a(0x182)]['set'](_0x1f402e[_0x207f3a(0x1c8)],_0x1f402e[_0x207f3a(0x16f)]),_0xbf2acc['searchParams']['set']('state',_0x3b95a3);_0x2cd3b2[_0x207f3a(0x177)]&&_0xbf2acc[_0x207f3a(0x182)][_0x207f3a(0x1bd)]('resource',_0x2cd3b2[_0x207f3a(0x177)]);console[_0x207f3a(0x1ba)](_0x207f3a(0x1f5)),console[_0x207f3a(0x1ba)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a'+_0xbf2acc[_0x207f3a(0x1b0)]()+'\x0a'),await openBrowser(_0xbf2acc['toString']());const _0x46658f=await waitForCallback(_0x3b95a3);process['stdout'][_0x207f3a(0x1aa)](_0x207f3a(0x1ab));const _0x57a13b=new URLSearchParams({'grant_type':_0x1f402e['eZPew'],'code':_0x46658f,'redirect_uri':'http://localhost:'+CALLBACK_PORT+_0x207f3a(0x1b6),'client_id':_0x5658a1,'code_verifier':_0x3677e4});_0x42c9f4&&_0x57a13b['set']('client_secret',_0x42c9f4);_0x2cd3b2['resource']&&_0x57a13b['set']('resource',_0x2cd3b2[_0x207f3a(0x177)]);const _0x182f01=await _0x1f402e['MxoEN'](fetch,_0x2b64ac[_0x207f3a(0x1c2)],{'method':_0x207f3a(0x174),'headers':{'Content-Type':_0x1f402e['oYPlz']},'body':_0x57a13b});if(!_0x182f01['ok']){const _0x180fd2=await _0x182f01['text']();throw new Error(_0x207f3a(0x193)+_0x180fd2);}const _0x453c62=await _0x182f01[_0x207f3a(0x1b2)]();return console['log'](_0x1f402e[_0x207f3a(0x1de)]),await saveCachedToken(_0x453c62[_0x207f3a(0x1eb)],_0x453c62['refresh_token'],_0x453c62[_0x207f3a(0x16d)]),_0x453c62['access_token'];}async function callGetCliToken(_0x27cf16,_0x2f46df){const _0x3c7399=_0x5f2572,_0x1ce377={'aHedj':function(_0x4e7004,_0x21062d,_0x1358a7){return _0x4e7004(_0x21062d,_0x1358a7);},'WsjeQ':'application/json','SnRfB':_0x3c7399(0x19b),'bWZIV':function(_0x2f2855,_0x541ab0){return _0x2f2855(_0x541ab0);},'vlVaf':_0x3c7399(0x1d4),'DjgVN':_0x3c7399(0x174),'wHiCr':'get_cli_token','MZBfW':_0x3c7399(0x1f1),'Hqkps':_0x3c7399(0x1ec),'EZILB':_0x3c7399(0x1e1),'cNSvr':_0x3c7399(0x1b4),'Omzas':function(_0x2f620e,_0xb7c8ff,_0x5a711c){return _0x2f620e(_0xb7c8ff,_0x5a711c);},'ldkjo':'refresh.txt','qEPAO':function(_0x165104,_0x451f6a,_0x529244,_0x351650){return _0x165104(_0x451f6a,_0x529244,_0x351650);},'vdbOg':_0x3c7399(0x1c1),'CVQtK':'Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a'},_0x1d0db3={'Content-Type':_0x1ce377[_0x3c7399(0x18e)],'Accept':_0x1ce377['SnRfB']};_0x2f46df&&(_0x1d0db3[_0x3c7399(0x18b)]=_0x3c7399(0x172)+_0x2f46df);const _0x23c83a=async _0x335b02=>{const _0x1f11b5=_0x3c7399,_0x4d22d0=await _0x1ce377[_0x1f11b5(0x16e)](fetch,_0x27cf16,{'method':'POST','headers':_0x1d0db3,'body':JSON[_0x1f11b5(0x19d)](_0x335b02)});if(!_0x4d22d0['ok']){const _0x5c2657=await _0x4d22d0[_0x1f11b5(0x183)]();throw new Error(_0x1f11b5(0x1c9)+_0x4d22d0['status']+':\x20'+_0x5c2657);}return parseResponse(_0x4d22d0);};process[_0x3c7399(0x17d)]['write']('Initializing\x20MCP\x20session...');const _0x539ae4=await _0x1ce377['bWZIV'](_0x23c83a,{'jsonrpc':'2.0','id':0x1,'method':_0x3c7399(0x1b1),'params':{'protocolVersion':_0x3c7399(0x1f6),'capabilities':{},'clientInfo':{'name':'ranger-cli','version':_0x1ce377['vlVaf']}}});if(_0x539ae4[_0x3c7399(0x1f7)])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x539ae4[_0x3c7399(0x1f7)]['message']??JSON[_0x3c7399(0x19d)](_0x539ae4[_0x3c7399(0x1f7)])));console['log'](_0x3c7399(0x1f1)),await _0x1ce377[_0x3c7399(0x16e)](fetch,_0x27cf16,{'method':_0x1ce377['DjgVN'],'headers':_0x1d0db3,'body':JSON[_0x3c7399(0x19d)]({'jsonrpc':_0x3c7399(0x1a0),'method':'notifications/initialized'})})['then'](_0x5ce8be=>_0x5ce8be['text']()),process[_0x3c7399(0x17d)]['write'](_0x3c7399(0x1ea));const _0x353b39=await _0x23c83a({'jsonrpc':'2.0','id':0x2,'method':_0x3c7399(0x17a),'params':{'name':_0x1ce377[_0x3c7399(0x1e6)],'arguments':{}}});if(_0x353b39[_0x3c7399(0x1f7)])throw new Error(_0x3c7399(0x1ac)+(_0x353b39[_0x3c7399(0x1f7)][_0x3c7399(0x1d2)]??JSON[_0x3c7399(0x19d)](_0x353b39['error'])));console['log'](_0x1ce377['MZBfW']);const _0x2ac533=extractToken(_0x353b39['result']);if(!_0x2ac533){console['error'](_0x1ce377['Hqkps']),console[_0x3c7399(0x1f7)](JSON[_0x3c7399(0x19d)](_0x353b39[_0x3c7399(0x1bf)],null,0x2));throw new Error(_0x1ce377[_0x3c7399(0x179)]);}const _0x455b34=join(homedir(),_0x1ce377['cNSvr']),_0x2c09f4=_0x1ce377['Omzas'](join,_0x455b34,_0x1ce377[_0x3c7399(0x186)]);await _0x1ce377['Omzas'](mkdir,_0x455b34,{'recursive':!![]}),await writeFile(_0x2c09f4,_0x2ac533,{'mode':0x180}),await _0x1ce377['qEPAO'](writeFile,join(_0x455b34,_0x1ce377[_0x3c7399(0x1e3)]),_0x27cf16,{'mode':0x180}),console['log']('\x0aToken\x20written\x20to\x20'+_0x2c09f4),console['log'](_0x1ce377['CVQtK']);}async function fetchAuthServerMetadata(_0x1646f3){const _0x42c792=_0x5f2572,_0x31e1b0={'adueJ':function(_0x72418e,_0x10107a){return _0x72418e(_0x10107a);}},_0x5deec2=_0x1646f3+'/.well-known/oauth-authorization-server',_0x13eb92=await _0x31e1b0['adueJ'](fetch,_0x5deec2);if(!_0x13eb92['ok'])throw new Error(_0x42c792(0x1da)+_0x5deec2+':\x20'+_0x13eb92['status']);return _0x13eb92['json']();}function waitForCallback(_0x255d57){const _0x80ebd9=_0x5f2572,_0x418161={'EJDCB':function(_0x2df108,_0x570bf4){return _0x2df108!==_0x570bf4;},'dNYAp':'Not\x20found','YweTu':_0x80ebd9(0x1d5),'pWOXQ':'error','YUmhM':_0x80ebd9(0x1dd),'BvzJI':_0x80ebd9(0x192),'aWgsZ':function(_0x4fc463,_0x366119){return _0x4fc463(_0x366119);},'tMWma':'<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','pEDOy':_0x80ebd9(0x1e5),'iiVFS':function(_0x5e2608,_0x13c1cf){return _0x5e2608(_0x13c1cf);},'AHWYZ':function(_0x370553,_0x503081,_0x482774){return _0x370553(_0x503081,_0x482774);}};return new Promise((_0x30d93d,_0x3ad1d6)=>{const _0x46f748=_0x80ebd9,_0x43d60b=_0x418161[_0x46f748(0x185)](setTimeout,()=>{_0x81b389['close'](),_0x3ad1d6(new OAuthTimeoutError('OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes'));},0x1d4c0),_0x81b389=_0x418161['iiVFS'](createServer,(_0xae1b3e,_0xb682f1)=>{const _0x4f90d2=_0x46f748,_0x566b4b=new URL(_0xae1b3e[_0x4f90d2(0x1f3)]??'/',_0x4f90d2(0x173)+CALLBACK_PORT);if(_0x418161[_0x4f90d2(0x18d)](_0x566b4b[_0x4f90d2(0x171)],_0x4f90d2(0x1b6))){_0xb682f1[_0x4f90d2(0x1e2)](0x194),_0xb682f1[_0x4f90d2(0x178)](_0x418161[_0x4f90d2(0x1cb)]);return;}const _0x2523d3=_0x566b4b[_0x4f90d2(0x182)]['get'](_0x418161['YweTu']),_0x11c4c2=_0x566b4b['searchParams']['get']('state'),_0x385b2=_0x566b4b[_0x4f90d2(0x182)]['get'](_0x418161['pWOXQ']);if(_0x385b2){const _0x411684=_0x566b4b['searchParams']['get'](_0x418161['YUmhM'])??_0x385b2;_0xb682f1[_0x4f90d2(0x1e2)](0xc8,{'Content-Type':_0x418161[_0x4f90d2(0x1d0)]}),_0xb682f1[_0x4f90d2(0x178)]('<html><body><h2>Authentication\x20failed</h2><p>'+_0x411684+_0x4f90d2(0x1dc)),clearTimeout(_0x43d60b),_0x81b389['close'](),_0x418161[_0x4f90d2(0x194)](_0x3ad1d6,new Error(_0x4f90d2(0x170)+_0x411684));return;}if(!_0x2523d3||_0x11c4c2!==_0x255d57){_0xb682f1['writeHead'](0x190,{'Content-Type':_0x418161['BvzJI']}),_0xb682f1[_0x4f90d2(0x178)](_0x418161['tMWma']);return;}_0xb682f1[_0x4f90d2(0x1e2)](0xc8,{'Content-Type':'text/html'}),_0xb682f1['end'](_0x418161['pEDOy']),_0x418161['iiVFS'](clearTimeout,_0x43d60b),_0x81b389['close'](),_0x30d93d(_0x2523d3);});_0x81b389[_0x46f748(0x196)](CALLBACK_PORT,_0x46f748(0x198));});}function _0x7552(){const _0x3b0406=['vdbOg','PDmFS','<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','wHiCr','status','MCP\x20server\x20returned\x20HTTP\x20','RCYBv','Requesting\x20CLI\x20token...','access_token','\x0aUnexpected\x20response\x20structure:','length','clientId','isTTY','child_process','\x20done','238RxTqjR','url','vjMMP','\x0aOpening\x20browser\x20for\x20authentication...','2025-03-26','error','JdmLu','yIVbk','expires_in','aHedj','qHxzs','OAuth\x20error:\x20','pathname','Bearer\x20','http://localhost:','POST','QImYE','uzbAQ','resource','end','EZILB','tools/call','refreshToken','application/json','stdout','accessToken','origin','content','THwUD','searchParams','text','1157214lRnWBB','AHWYZ','ldkjo','WTepQ','37434bvWyXZ','1468280yqOGgR','JLkMq','Authorization','sha256','EJDCB','WsjeQ','xmATQ','/.well-known/oauth-protected-resource','UiAUz','text/html','Token\x20exchange\x20failed:\x20','aWgsZ','redirect_uri','listen','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','127.0.0.1','365492TGHwyK','wqxrl','application/json,\x20text/event-stream','update','stringify','hNHeX','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','2.0','slice','Unknown\x20error','GgpWT','swNoZ','registration_endpoint','code_challenge_method','eZPew','xPMdc','1629192HVwgRJ','write','Exchanging\x20authorization\x20code...','get_cli_token\x20failed:\x20','trim','xFwYo','iLKGr','toString','initialize','json','none','.ranger','1000690CQrPvH','/callback','S256','PHSCt','utf-8','log','open','MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','set','Registering\x20OAuth\x20client...','result','client_id','auth-origin.txt','token_endpoint','JgRTu','hFHVG','djitZ','token','get','pgQkg','HTTP\x20','2WSwURe','dNYAp','match','9XQmeDP','expiresAt','digest','BvzJI','code_challenge','message','now','1.0.0','code','317792oHPNlY','platform','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','parse','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','refresh_token','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','error_description','qQjeA','Ranger\x20CLI','mKjDa','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','writeHead'];_0x7552=function(){return _0x3b0406;};return _0x7552();}async function openBrowser(_0x18ef40){const _0x20e409=_0x5f2572,_0x52a8ef={'GgpWT':function(_0x581164,_0x3cf1dc){return _0x581164===_0x3cf1dc;},'pUgiB':'xdg-open'},{exec:_0x3f6672}=await import(_0x20e409(0x1f0)),_0x586963=process[_0x20e409(0x1d7)]==='darwin'?_0x20e409(0x1bb):_0x52a8ef[_0x20e409(0x1a3)](process['platform'],'win32')?'start':_0x52a8ef['pUgiB'];_0x3f6672(_0x586963+'\x20\x22'+_0x18ef40+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x316f8c=_0x5f2572,_0x2ee3d8={'yOwhE':_0x316f8c(0x1b9),'PHSCt':function(_0x4b60df,_0x144077){return _0x4b60df>_0x144077;}};try{const _0x5091b2=JSON[_0x316f8c(0x1d9)](await readFile(TOKEN_CACHE_PATH,_0x2ee3d8['yOwhE']));if(_0x5091b2[_0x316f8c(0x17f)]&&_0x5091b2[_0x316f8c(0x17f)]!==currentOrigin)return null;if(_0x5091b2['expiresAt']&&_0x2ee3d8[_0x316f8c(0x1b8)](Date[_0x316f8c(0x1d3)](),_0x5091b2[_0x316f8c(0x1ce)]))return null;return _0x5091b2['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x487108,_0x5cb213,_0x298344){const _0x124c2b=_0x5f2572,_0x440ac8={'xFwYo':function(_0x460434){return _0x460434();},'iLKGr':function(_0x2b02c7,_0x113cef){return _0x2b02c7+_0x113cef;},'THwUD':function(_0x169afe,_0x66584d,_0xdf0612){return _0x169afe(_0x66584d,_0xdf0612);}},_0xb23d25=await _0x440ac8[_0x124c2b(0x1ae)](loadCachedData),_0xa87848={..._0xb23d25,'origin':currentOrigin,'accessToken':_0x487108,'refreshToken':_0x5cb213??_0xb23d25?.[_0x124c2b(0x17b)],'expiresAt':_0x298344?_0x440ac8[_0x124c2b(0x1af)](Date[_0x124c2b(0x1d3)](),_0x298344*0x3e8):undefined};await _0x440ac8[_0x124c2b(0x181)](mkdir,join(homedir(),'.ranger'),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON[_0x124c2b(0x19d)](_0xa87848),{'mode':0x180});}function _0x1cee(_0x1fabfc,_0x2fcc19){_0x1fabfc=_0x1fabfc-0x16b;const _0x755234=_0x7552();let _0x1cee83=_0x755234[_0x1fabfc];return _0x1cee83;}async function loadCachedClient(){const _0x7b6afd=_0x5f2572,_0x175911={'sNCvB':function(_0x5af854){return _0x5af854();}},_0x3d9454=await _0x175911['sNCvB'](loadCachedData);if(_0x3d9454?.['origin']&&_0x3d9454[_0x7b6afd(0x17f)]!==currentOrigin)return null;return _0x3d9454?.[_0x7b6afd(0x1ee)]?{'clientId':_0x3d9454[_0x7b6afd(0x1ee)],'clientSecret':_0x3d9454['clientSecret']}:null;}async function clearCachedClient(){const _0x3100b0=_0x5f2572,_0x567cb5=await loadCachedData();if(!_0x567cb5)return;const {clientId:_0x338bb5,clientSecret:_0x52eb71,..._0x1848b1}=_0x567cb5;await writeFile(TOKEN_CACHE_PATH,JSON[_0x3100b0(0x19d)](_0x1848b1),{'mode':0x180});}async function saveCachedClient(_0x1ff7fa,_0x47a70b){const _0x23bc0a=_0x5f2572,_0x460ded={'wdmRE':function(_0x54b6a4,_0x1699b5,_0x490520){return _0x54b6a4(_0x1699b5,_0x490520);},'uzbAQ':function(_0x16dcfd){return _0x16dcfd();},'xPMdc':_0x23bc0a(0x1b4)},_0x21f845=await loadCachedData(),_0x53a24d={..._0x21f845,'origin':currentOrigin,'accessToken':_0x21f845?.[_0x23bc0a(0x17e)]??'','clientId':_0x1ff7fa,'clientSecret':_0x47a70b};await mkdir(_0x460ded['wdmRE'](join,_0x460ded[_0x23bc0a(0x176)](homedir),_0x460ded[_0x23bc0a(0x1a8)]),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x53a24d),{'mode':0x180});}async function loadCachedData(){const _0x8acf81=_0x5f2572,_0x96b421={'PDmFS':function(_0x118958,_0x3f978b,_0x22ad2f){return _0x118958(_0x3f978b,_0x22ad2f);},'swNoZ':'utf-8'};try{return JSON[_0x8acf81(0x1d9)](await _0x96b421[_0x8acf81(0x1e4)](readFile,TOKEN_CACHE_PATH,_0x96b421[_0x8acf81(0x1a4)]));}catch{return null;}}async function parseResponse(_0x2e7af9){const _0x57d967=_0x5f2572,_0x5e67ea={'Aumtv':'content-type','UiAUz':'data:'},_0x1e8fad=_0x2e7af9['headers'][_0x57d967(0x1c7)](_0x5e67ea['Aumtv'])??'';if(_0x1e8fad['includes']('text/event-stream')){const _0x15175a=await _0x2e7af9['text']();for(const _0x22ae1b of _0x15175a['split']('\x0a')){const _0x1aead=_0x22ae1b[_0x57d967(0x1ad)]();if(_0x1aead['startsWith']('data:')){const _0x851ae6=_0x1aead[_0x57d967(0x1a1)](_0x5e67ea[_0x57d967(0x191)][_0x57d967(0x1ed)])[_0x57d967(0x1ad)]();if(!_0x851ae6)continue;try{const _0x52991a=JSON[_0x57d967(0x1d9)](_0x851ae6);if(_0x52991a['id']!==undefined||_0x52991a['error'])return _0x52991a;}catch{}}}throw new Error('No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream');}return _0x2e7af9[_0x57d967(0x1b2)]();}function extractToken(_0x3793f2){const _0x1c29c0=_0x5f2572,_0x3dd8f4={'HItKx':'string','iyHcv':_0x1c29c0(0x1a2),'JgRTu':function(_0x1ce17c,_0x4b0e90){return _0x1ce17c===_0x4b0e90;}};if(!_0x3793f2)return null;const _0x17922f=_0x3793f2['structuredContent'];if(_0x17922f?.['token']&&typeof _0x17922f['token']===_0x3dd8f4['HItKx'])return _0x17922f[_0x1c29c0(0x1c6)];if(_0x3793f2['isError']){const _0x37b73f=_0x3793f2[_0x1c29c0(0x180)];throw new Error('Server\x20returned\x20error:\x20'+(_0x37b73f?.[0x0]?.[_0x1c29c0(0x183)]??_0x3dd8f4['iyHcv']));}const _0x14fb83=_0x3793f2[_0x1c29c0(0x180)];if(_0x14fb83)for(const _0xc0f880 of _0x14fb83){if(_0x3dd8f4[_0x1c29c0(0x1c3)](_0xc0f880['type'],'text')&&_0xc0f880[_0x1c29c0(0x183)]){try{const _0x1ade0f=JSON['parse'](_0xc0f880['text']);if(typeof _0x1ade0f?.['token']===_0x3dd8f4['HItKx'])return _0x1ade0f['token'];}catch{}const _0x5dd85a=_0xc0f880['text'][_0x1c29c0(0x1cc)](/(rngr_[A-Za-z0-9_-]+)/);if(_0x5dd85a)return _0x5dd85a[0x1];}}return null;}
@@ -0,0 +1 @@
1
+ (function(_0x1eb8ce,_0x54d33a){const _0x1a655c=_0x5484,_0x1186f9=_0x1eb8ce();while(!![]){try{const _0x43f0c7=parseInt(_0x1a655c(0x13d))/0x1*(-parseInt(_0x1a655c(0x172))/0x2)+parseInt(_0x1a655c(0x184))/0x3*(-parseInt(_0x1a655c(0x137))/0x4)+parseInt(_0x1a655c(0x17f))/0x5*(-parseInt(_0x1a655c(0x147))/0x6)+-parseInt(_0x1a655c(0x145))/0x7*(-parseInt(_0x1a655c(0x181))/0x8)+-parseInt(_0x1a655c(0x154))/0x9*(-parseInt(_0x1a655c(0x150))/0xa)+-parseInt(_0x1a655c(0x182))/0xb*(-parseInt(_0x1a655c(0x165))/0xc)+-parseInt(_0x1a655c(0x164))/0xd*(-parseInt(_0x1a655c(0x149))/0xe);if(_0x43f0c7===_0x54d33a)break;else _0x1186f9['push'](_0x1186f9['shift']());}catch(_0x9b33c5){_0x1186f9['push'](_0x1186f9['shift']());}}}(_0x55e8,0x40360));import{readFile,rm}from'fs/promises';import{existsSync}from'fs';function _0x55e8(){const _0x50bda5=['750WhKfBW','XIGHv','14vUUlFv','ePjOb','eXFFX','profileName','kind','origin','XUjFR','2626420lVpXpa',':\x20failed\x20to\x20delete\x20local\x20dir\x20','prompt','IRwOp','18MWJIgb','bdoHJ','join','jiCVk','BKrNz','\x20profile','stdin','log','PYCuf','zxqhY','skip',',\x20preserving\x20baseUrl\x20','environments','FZUyD','domains','MjItr','8432125AZYnOF','261396xQmahW','\x20failed','\x20\x20⚠\x20','settings','No\x20local\x20profiles\x20found\x20to\x20migrate.',',\x20baseUrl\x20override\x20→\x20projects.json)','cwd','Qnwgu','\x20migrated\x20to\x20cloud\x20(env:\x20','envKey','no\x20baseUrl\x20in\x20settings.json','vyJrF','all','2338zYxRzW','sYudY','OHhQk','Could\x20not\x20fetch\x20auth\x20config\x20(','trackPhaseEnd','nwBOe','UMVLB',':\x20failed\x20to\x20save\x20credentials\x20(','\x20failed:\x20','\x20local\x20director','gitTrackedRanger',').\x20Cloud\x20profile\x20created;\x20local\x20auth.json\x20left\x20in\x20place.','FGEZm','6865yCRBKI','push','9280ukxaAY','44UeBlgC','profile.migrate.skipped','3XpUswZ','length','toISOString','\x20skipped','some','Continuing\x20with\x20migration...','ies','status','wBNAr','Aborted.','Proceed?','padEnd','1575116cOXdYR','parse','authJsonPath','trackPhaseStart','OBfHp','dryRun','381tSRjrq','Warning:\x20.ranger/\x20is\x20tracked\x20in\x20this\x20git\x20repo.','yes','message',':\x20failed\x20to\x20write\x20projects.json\x20override\x20(','preserveBaseUrl','baseUrl',').\x20Run:\x20ranger\x20setup','77sLuQyn','\x20\x20git\x20rm\x20-r\x20--cached\x20.ranger/'];_0x55e8=function(){return _0x50bda5;};return _0x55e8();}import{join}from'path';import _0x21ff36 from'inquirer';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';function _0x5484(_0x12bd2b,_0xdaf48e){_0x12bd2b=_0x12bd2b-0x134;const _0x55e8ba=_0x55e8();let _0x5484b7=_0x55e8ba[_0x12bd2b];return _0x5484b7;}import{isPathGitTracked}from'./utils/gitTracked.js';function formatPlanLine(_0x34ae33){const _0x442364=_0x5484,_0x32dc59={'YtLVV':'skip'};if(_0x34ae33[_0x442364(0x14d)]===_0x32dc59['YtLVV'])return'\x20\x20'+_0x34ae33['profileName'][_0x442364(0x136)](0x1e)+'\x20→\x20skip\x20('+_0x34ae33['reason']+')';if(_0x34ae33[_0x442364(0x142)]&&_0x34ae33['baseUrl'])return'\x20\x20'+_0x34ae33[_0x442364(0x14c)]['padEnd'](0x1e)+'\x20→\x20cloud\x20(env:\x20'+_0x34ae33[_0x442364(0x16e)]+_0x442364(0x15f)+_0x34ae33[_0x442364(0x143)]+'\x20as\x20project\x20override)';if(_0x34ae33['baseUrl'])return'\x20\x20'+_0x34ae33['profileName']['padEnd'](0x1e)+'\x20→\x20cloud\x20(env:\x20'+_0x34ae33[_0x442364(0x16e)]+',\x20matches\x20'+_0x34ae33['baseUrl']+')';return'\x20\x20'+_0x34ae33[_0x442364(0x14c)][_0x442364(0x136)](0x1e)+'\x20→\x20cloud\x20(env:\x20'+_0x34ae33['envKey']+')';}function shouldWarnGitTrackedOnce(_0xd9def1){const _0x5e9f32=_0x5484,_0x2c310e={'ePjOb':function(_0xa8555d,_0x45b692){return _0xa8555d===_0x45b692;}},_0x53885a=readProjectsConfig(),_0x40ba57=_0x53885a['projects'][_0xd9def1]??={},_0x49ba1f=_0x40ba57['_warnings']??={},_0x30d9bb=_0x49ba1f[_0x5e9f32(0x17c)],_0x2a820c=new Date(),_0x4e9212=_0x2a820c[_0x5e9f32(0x186)]()['slice'](0x0,0xa);if(_0x2c310e[_0x5e9f32(0x14a)](_0x30d9bb,_0x4e9212))return![];return _0x49ba1f['gitTrackedRanger']=_0x4e9212,writeProjectsConfig(_0x53885a),!![];}export async function migrateProfile(_0x31c1c9,_0x374d59){const _0x56342e=_0x5484,_0x489d06={'vyJrF':function(_0x1cd492,_0x2a1635){return _0x1cd492 instanceof _0x2a1635;},'sYudY':function(_0x51037a,_0x42c025){return _0x51037a(_0x42c025);},'zxqhY':'No\x20cloud\x20profile\x20auth\x20config\x20found\x20for\x20this\x20org.\x20Migration\x20requires\x20at\x20least\x20one\x20configured\x20auth\x20environment.','OHhQk':function(_0xd7b83f){return _0xd7b83f();},'UMVLB':function(_0xcfb09a,_0x673a75){return _0xcfb09a===_0x673a75;},'nwBOe':function(_0x817653,_0x5b981f){return _0x817653===_0x5b981f;},'XIGHv':_0x56342e(0x15e),'gNZtZ':_0x56342e(0x16f),'PYCuf':function(_0x2d60c1,_0x4968d9,_0x2c7eb7){return _0x2d60c1(_0x4968d9,_0x2c7eb7);},'apqVv':'no\x20matching\x20auth\x20env','Qnwgu':function(_0x164023,_0x41183f){return _0x164023===_0x41183f;},'ZVWGS':'Nothing\x20migrated.\x20Run\x20without\x20--dry-run\x20to\x20apply.','bdoHJ':function(_0x24669d,_0x189f28){return _0x24669d&&_0x189f28;},'FZUyD':'confirm','BKrNz':'proceed','VEahh':function(_0x3d2834){return _0x3d2834();},'FGEZm':function(_0x4c4961,_0x49f699){return _0x4c4961(_0x49f699);},'cpMAZ':function(_0x268246,_0x40e8e8){return _0x268246(_0x40e8e8);},'wBNAr':'After\x20migration,\x20uncommit\x20it:','XUjFR':_0x56342e(0x146),'gRHYC':'\x20\x20echo\x20\x27.ranger/\x27\x20>>\x20.gitignore','JGxzG':_0x56342e(0x189),'ASPLp':function(_0x37fc61,_0x1c6b03,_0x23e8de,_0x1f51d0){return _0x37fc61(_0x1c6b03,_0x23e8de,_0x1f51d0);},'MjItr':'name_conflict','ZMeTo':'utf-8','OBfHp':function(_0x32ed09,_0x3515ed,_0x430aa5){return _0x32ed09(_0x3515ed,_0x430aa5);},'ZVBVE':function(_0x3e95ed,_0x56efd5){return _0x3e95ed instanceof _0x56efd5;},'IRwOp':function(_0x262dc0,_0x1791b1,_0x22baa6,_0x18adb1,_0x51c670){return _0x262dc0(_0x1791b1,_0x22baa6,_0x18adb1,_0x51c670);},'glZhz':'baseUrl','cyLVE':function(_0x10221e,_0x2cb7a0){return _0x10221e(_0x2cb7a0);},'NcypQ':function(_0x1f99aa,_0x3c78a9){return _0x1f99aa(_0x3c78a9);},'NNzDd':function(_0x49a931,_0x35f2a7){return _0x49a931 instanceof _0x35f2a7;},'QKhAp':'profile.migrate.failed','Ebrbl':function(_0x5005f2,_0x15d1a5){return _0x5005f2===_0x15d1a5;},'eXFFX':function(_0x297045,_0x24d96a){return _0x297045>_0x24d96a;},'jiCVk':function(_0x2c1ea3,_0x253cdf){return _0x2c1ea3+_0x253cdf;}};if(!_0x31c1c9[_0x56342e(0x14c)]&&!_0x31c1c9[_0x56342e(0x171)])throw new Error('Provide\x20a\x20profile\x20name\x20or\x20--all.\x0a\x20\x20Example:\x20ranger\x20profile\x20migrate\x20--all\x20--dry-run');let _0x370618;try{_0x370618=await fetchAuthConfig();}catch(_0x423d30){throw new Error(_0x56342e(0x175)+(_0x489d06['vyJrF'](_0x423d30,Error)?_0x423d30[_0x56342e(0x140)]:_0x489d06[_0x56342e(0x173)](String,_0x423d30))+_0x56342e(0x144));}if(!_0x370618||!_0x370618[_0x56342e(0x160)]||Object['keys'](_0x370618[_0x56342e(0x160)])[_0x56342e(0x185)]===0x0)throw new Error(_0x489d06[_0x56342e(0x15d)]);const _0x71ca2a=[];if(_0x31c1c9['all']){const {envNames:_0xaf46fc,envTypes:_0x4c2628}=await _0x489d06[_0x56342e(0x174)](getEnvNames);for(const _0x59bd73 of _0xaf46fc){if(_0x489d06[_0x56342e(0x178)](_0x4c2628[_0x59bd73],'ci'))continue;_0x71ca2a['push'](_0x59bd73);}}else _0x31c1c9[_0x56342e(0x14c)]&&_0x71ca2a['push'](_0x31c1c9['profileName']);if(_0x489d06['nwBOe'](_0x71ca2a[_0x56342e(0x185)],0x0)){console[_0x56342e(0x15b)](_0x56342e(0x169));return;}const _0x2845f9=[];for(const _0x17b89b of _0x71ca2a){const _0x31f002=_0x489d06[_0x56342e(0x173)](getEnvDir,_0x17b89b);if(!existsSync(_0x31f002)){_0x2845f9[_0x56342e(0x180)]({'kind':_0x489d06['XIGHv'],'profileName':_0x17b89b,'reason':'local\x20profile\x20directory\x20not\x20found'});continue;}const _0x46bb85=await _0x489d06['sYudY'](loadSettings,_0x17b89b),_0x3f538c=_0x46bb85[_0x56342e(0x143)];if(!_0x3f538c){_0x2845f9[_0x56342e(0x180)]({'kind':_0x489d06['XIGHv'],'profileName':_0x17b89b,'reason':_0x489d06['gNZtZ']});continue;}const _0x550254=_0x489d06[_0x56342e(0x15c)](matchAuthEnvironment,_0x3f538c,_0x370618);if(!_0x550254){_0x2845f9[_0x56342e(0x180)]({'kind':_0x489d06[_0x56342e(0x148)],'profileName':_0x17b89b,'reason':_0x489d06['apqVv']});continue;}const _0x4f5c5c=_0x370618['environments'][_0x550254],_0x495b80=_0x4f5c5c?.[_0x56342e(0x162)]??[],_0x3b9f4c=_0x495b80[_0x56342e(0x188)](_0x1f78e3=>{const _0x37dad5=_0x56342e;try{return new URL(_0x1f78e3)[_0x37dad5(0x14e)]===new URL(_0x3f538c)['origin'];}catch{return![];}}),_0x19386b={};for(const [_0x3fd7b3,_0x43261a]of Object['entries'](_0x46bb85)){if(_0x489d06['Qnwgu'](_0x3fd7b3,'baseUrl'))continue;if(_0x489d06['nwBOe'](_0x43261a,undefined))continue;_0x19386b[_0x3fd7b3]=_0x43261a;}!_0x3b9f4c&&(_0x19386b['baseUrl']=_0x3f538c);const _0xcdabc8=_0x489d06['PYCuf'](join,_0x31f002,'auth.json'),_0x10599e=_0x489d06['sYudY'](existsSync,_0xcdabc8);_0x2845f9['push']({'kind':'migrate','profileName':_0x17b89b,'envKey':_0x550254,'baseUrl':_0x3f538c,'preserveBaseUrl':!_0x3b9f4c,'settings':_0x19386b,'authJsonPath':_0x10599e?_0xcdabc8:null});}console[_0x56342e(0x15b)]('Plan:');for(const _0x3f767e of _0x2845f9){console[_0x56342e(0x15b)](formatPlanLine(_0x3f767e));}if(_0x31c1c9[_0x56342e(0x13c)]){console[_0x56342e(0x15b)](_0x489d06['ZVWGS']);return;}const _0x93b40a=Boolean(process[_0x56342e(0x15a)]['isTTY']&&process['stdout']['isTTY']),_0xd1aae=_0x2845f9[_0x56342e(0x188)](_0x1af40c=>_0x1af40c[_0x56342e(0x14d)]==='migrate');if(_0x489d06[_0x56342e(0x155)](_0xd1aae,_0x93b40a)&&!_0x31c1c9[_0x56342e(0x13f)]){const {proceed:_0x14774f}=await _0x21ff36[_0x56342e(0x152)]([{'type':_0x489d06[_0x56342e(0x161)],'name':_0x489d06[_0x56342e(0x158)],'message':_0x56342e(0x135),'default':![]}]);if(!_0x14774f){console['log'](_0x56342e(0x134));return;}}const _0x258724=_0x489d06['VEahh'](getRangerDir);let _0x33534f=![];if(_0x489d06['FGEZm'](existsSync,_0x258724))try{_0x33534f=await isPathGitTracked(_0x258724);}catch{_0x33534f=![];}_0x33534f&&_0x489d06['cpMAZ'](shouldWarnGitTrackedOnce,process['cwd']())&&(console['log'](_0x56342e(0x13e)),console['log'](_0x489d06[_0x56342e(0x18c)]),console['log'](_0x489d06[_0x56342e(0x14f)]),console[_0x56342e(0x15b)](_0x489d06['gRHYC']),console[_0x56342e(0x15b)](_0x489d06['JGxzG']));let _0x26a1e4=0x0,_0x4eaf18=0x0,_0x25337a=0x0,_0x43615b=0x0;for(const _0x357724 of _0x2845f9){if(_0x357724['kind']===_0x56342e(0x15e)){_0x43615b++,_0x374d59?.['trackPhaseEnd'](_0x56342e(0x183),{'profileName':_0x357724[_0x56342e(0x14c)],'reason':_0x357724['reason']});continue;}_0x374d59?.[_0x56342e(0x13a)]('profile.migrate.started',{'profileName':_0x357724['profileName'],'envKey':_0x357724[_0x56342e(0x16e)]});try{try{await _0x489d06['ASPLp'](createCloudProfile,_0x357724['profileName'],_0x357724[_0x56342e(0x16e)],{'settings':_0x357724[_0x56342e(0x168)]});}catch(_0x26cdf8){if(_0x489d06[_0x56342e(0x170)](_0x26cdf8,ApiError)&&_0x489d06[_0x56342e(0x177)](_0x26cdf8[_0x56342e(0x18b)],0x199)){console['log'](_0x56342e(0x167)+_0x357724[_0x56342e(0x14c)]+':\x20cloud\x20profile\x20with\x20this\x20name\x20already\x20exists.\x20Skipping.'),_0x43615b++,_0x374d59?.[_0x56342e(0x176)]('profile.migrate.skipped',{'profileName':_0x357724[_0x56342e(0x14c)],'reason':_0x489d06[_0x56342e(0x163)]});continue;}throw _0x26cdf8;}let _0xf6c1bd=![],_0x39d9d5=![];if(_0x357724['authJsonPath'])try{const _0x24c64a=await readFile(_0x357724[_0x56342e(0x139)],_0x489d06['ZMeTo']),_0x17e7be=JSON[_0x56342e(0x138)](_0x24c64a);await _0x489d06[_0x56342e(0x13b)](uploadCloudProfileSession,_0x357724[_0x56342e(0x14c)],_0x17e7be),_0xf6c1bd=!![];}catch(_0x23e747){_0x39d9d5=!![],console[_0x56342e(0x15b)](_0x56342e(0x167)+_0x357724['profileName']+':\x20session\x20upload\x20failed\x20('+(_0x489d06['ZVBVE'](_0x23e747,Error)?_0x23e747['message']:_0x489d06['FGEZm'](String,_0x23e747))+_0x56342e(0x17d));}let _0x44445b=![];if(_0x31c1c9['saveCreds']){const _0x5a0c31=process['env']['RANGER_TEST_USERNAME'],_0x6f4aae=process['env']['RANGER_TEST_PASSWORD'];if(_0x5a0c31&&_0x6f4aae)try{await saveCloudProfileCredentials(_0x357724['profileName'],_0x5a0c31,_0x6f4aae),_0x44445b=!![];}catch(_0x294fcd){console['log']('\x20\x20⚠\x20'+_0x357724[_0x56342e(0x14c)]+_0x56342e(0x179)+(_0x294fcd instanceof Error?_0x294fcd[_0x56342e(0x140)]:String(_0x294fcd))+').');}else console[_0x56342e(0x15b)](_0x56342e(0x167)+_0x357724[_0x56342e(0x14c)]+':\x20--save-creds\x20requested,\x20but\x20RANGER_TEST_USERNAME/PASSWORD\x20not\x20set\x20in\x20env.');}if(_0x357724[_0x56342e(0x142)]&&_0x357724['baseUrl'])try{_0x489d06[_0x56342e(0x153)](setProfileOverride,process[_0x56342e(0x16b)](),_0x357724[_0x56342e(0x14c)],_0x489d06['glZhz'],_0x357724[_0x56342e(0x143)]);}catch(_0x20155b){console[_0x56342e(0x15b)]('\x20\x20⚠\x20'+_0x357724[_0x56342e(0x14c)]+_0x56342e(0x141)+(_0x20155b instanceof Error?_0x20155b[_0x56342e(0x140)]:String(_0x20155b))+').');}const _0x480fff=_0x489d06['cyLVE'](getEnvDir,_0x357724['profileName']);if(!_0x39d9d5&&_0x489d06['NcypQ'](existsSync,_0x480fff))try{await rm(_0x480fff,{'recursive':!![],'force':!![]}),_0x4eaf18++;}catch(_0x335668){console[_0x56342e(0x15b)](_0x56342e(0x167)+_0x357724['profileName']+_0x56342e(0x151)+_0x480fff+'\x20('+(_0x489d06['NNzDd'](_0x335668,Error)?_0x335668[_0x56342e(0x140)]:_0x489d06[_0x56342e(0x17e)](String,_0x335668))+').');}_0x26a1e4++,_0x357724[_0x56342e(0x142)]&&_0x357724[_0x56342e(0x143)]?console[_0x56342e(0x15b)]('\x20\x20✓\x20'+_0x357724['profileName']+_0x56342e(0x16d)+_0x357724[_0x56342e(0x16e)]+_0x56342e(0x16a)):console['log']('\x20\x20✓\x20'+_0x357724[_0x56342e(0x14c)]+'\x20migrated\x20to\x20cloud\x20(env:\x20'+_0x357724['envKey']+')'),_0x374d59?.['trackPhaseEnd']('profile.migrate.succeeded',{'profileName':_0x357724['profileName'],'envKey':_0x357724[_0x56342e(0x16e)],'wasGitTracked':_0x33534f,'hadSession':_0xf6c1bd,'savedCreds':_0x44445b});}catch(_0x2170c3){_0x25337a++,console['log']('\x20\x20✗\x20'+_0x357724[_0x56342e(0x14c)]+_0x56342e(0x17a)+(_0x489d06['NNzDd'](_0x2170c3,Error)?_0x2170c3['message']:String(_0x2170c3))),_0x374d59?.['trackPhaseEnd'](_0x489d06['QKhAp'],{'profileName':_0x357724['profileName'],'error':_0x2170c3 instanceof Error?_0x2170c3[_0x56342e(0x140)]:_0x489d06['sYudY'](String,_0x2170c3)});}}const _0xeb76cc=[];if(_0x26a1e4>0x0)_0xeb76cc[_0x56342e(0x180)](_0x26a1e4+_0x56342e(0x159)+(_0x489d06[_0x56342e(0x16c)](_0x26a1e4,0x1)?'':'s')+'\x20migrated');if(_0x4eaf18>0x0)_0xeb76cc[_0x56342e(0x180)]('Deleted\x20'+_0x4eaf18+_0x56342e(0x17b)+(_0x489d06['Ebrbl'](_0x4eaf18,0x1)?'y':_0x56342e(0x18a)));if(_0x489d06[_0x56342e(0x14b)](_0x43615b,0x0))_0xeb76cc['push'](_0x43615b+_0x56342e(0x187));if(_0x25337a>0x0)_0xeb76cc[_0x56342e(0x180)](_0x25337a+_0x56342e(0x166));if(_0x489d06[_0x56342e(0x14b)](_0xeb76cc[_0x56342e(0x185)],0x0))console[_0x56342e(0x15b)](_0x489d06[_0x56342e(0x157)](_0xeb76cc[_0x56342e(0x156)]('.\x20'),'.'));}
@@ -1 +1 @@
1
- (function(_0x293ef0,_0x43f41b){const _0x6ee06e=_0x4010,_0x57bf9c=_0x293ef0();while(!![]){try{const _0x4f6810=-parseInt(_0x6ee06e(0x15c))/0x1+-parseInt(_0x6ee06e(0x184))/0x2*(-parseInt(_0x6ee06e(0x169))/0x3)+parseInt(_0x6ee06e(0x17f))/0x4+-parseInt(_0x6ee06e(0x17c))/0x5+-parseInt(_0x6ee06e(0x179))/0x6+parseInt(_0x6ee06e(0x172))/0x7*(parseInt(_0x6ee06e(0x185))/0x8)+parseInt(_0x6ee06e(0x183))/0x9;if(_0x4f6810===_0x43f41b)break;else _0x57bf9c['push'](_0x57bf9c['shift']());}catch(_0x31cc45){_0x57bf9c['push'](_0x57bf9c['shift']());}}}(_0x186b,0xc5236));import{join}from'path';import{existsSync}from'fs';function _0x186b(){const _0x3f4afe=['RdNtS','JoIqr','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','TOPIu','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','✓\x20Claude\x20Code\x20plugin\x20enabled','success','fzuVB','sVyUn','Would\x20you\x20like\x20to\x20install\x20skills?','error','391727lSiYeO','✓\x20Marketplace\x20already\x20added','nopbd','pluginScope','BMMro','confirm','list','SKILL.md','rQVrV','✓\x20Ranger\x20skills\x20already\x20installed','PmGmr','marketplace','vRRGx','459eDSeIR','KJRkS','enable','❌\x20Failed\x20to\x20install\x20plugin:','user','eIYNY','cJJjh','FOJOP','WIszo','63JMPpMm','nluLq','--scope','bmuZg','ranger','\x20level)...\x0a','output','8598090ILiSGt','log','.claude','6548685nPgqCA','mqRWq','bVIND','2885728VcvMPZ','ranger@trailhead','prompt','⚠\x20Failed\x20to\x20enable\x20plugin:','18353637ACmbpk','5674ZDxqfd','664152IYcsLk','project','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','includes','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','❌\x20Failed\x20to\x20add\x20marketplace:'];_0x186b=function(){return _0x3f4afe;};return _0x186b();}function _0x4010(_0x527e55,_0x5333a2){_0x527e55=_0x527e55-0x151;const _0x186b59=_0x186b();let _0x4010f8=_0x186b59[_0x527e55];return _0x4010f8;}import _0x26ab74 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x4f1db2){const _0x444de2=_0x4010,_0x405f50={'FOJOP':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','eIYNY':function(_0x30fcc6,_0x47d7e1,_0x36151a){return _0x30fcc6(_0x47d7e1,_0x36151a);},'wDjKR':_0x444de2(0x153),'OXtdX':_0x444de2(0x162),'KJRkS':'Where\x20should\x20the\x20plugin\x20be\x20installed?','WXVUg':'add','EEjpE':_0x444de2(0x18a),'rQVrV':'\x0aYou\x20can\x20install\x20manually\x20with:','JoIqr':_0x444de2(0x174),'fzuVB':_0x444de2(0x155),'vRRGx':'plugin','bmuZg':_0x444de2(0x16b),'nopbd':_0x444de2(0x180),'mqRWq':_0x444de2(0x186),'bVIND':'already\x20enabled','BMMro':_0x444de2(0x182)},_0xc4dd17=await isPluginInstalled(_0x444de2(0x180));if(_0xc4dd17)return console[_0x444de2(0x17a)](_0x405f50[_0x444de2(0x170)]),![];const _0x34a193=existsSync(_0x405f50[_0x444de2(0x16e)](join,getProjectRoot(),_0x444de2(0x17b)));let _0x251631;if(_0x4f1db2)_0x251631=_0x4f1db2;else{if(_0x34a193)_0x251631='project';else{console[_0x444de2(0x17a)](_0x405f50['wDjKR']);const _0x37e198=await _0x26ab74[_0x444de2(0x181)]([{'type':_0x405f50['OXtdX'],'name':'pluginScope','message':_0x405f50[_0x444de2(0x16a)],'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':'user'},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x444de2(0x186)}],'default':'user'}]);_0x251631=_0x37e198[_0x444de2(0x15f)];}}console['log'](_0x444de2(0x189)+_0x251631+_0x444de2(0x177));const _0x1a01f9=await isMarketplaceAdded('trailhead');let _0x3b8fe0=_0x1a01f9;if(_0x1a01f9)console['log'](_0x444de2(0x15d));else{const _0x40099a=await runClaudeCommand(['plugin',_0x444de2(0x167),_0x405f50['WXVUg'],'ranger-testing/trailhead']);!_0x40099a['success']?(console['error'](_0x405f50['EEjpE'],_0x40099a['error']),console[_0x444de2(0x17a)](_0x405f50[_0x444de2(0x164)]),console[_0x444de2(0x17a)]('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console[_0x444de2(0x17a)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x251631)):_0x3b8fe0=!![];}if(_0x3b8fe0){const _0x564b7f=await runClaudeCommand(['plugin','install',_0x444de2(0x180),_0x405f50[_0x444de2(0x152)],_0x251631]);if(!_0x564b7f['success'])console['error'](_0x444de2(0x16c),_0x564b7f['error']),console['log'](_0x405f50[_0x444de2(0x164)]),console['log'](_0x444de2(0x187)+_0x251631);else{console[_0x444de2(0x17a)](_0x405f50[_0x444de2(0x158)]);const _0x4aa454=[_0x405f50[_0x444de2(0x168)],_0x405f50[_0x444de2(0x175)],_0x405f50[_0x444de2(0x15e)]];_0x251631===_0x405f50['mqRWq']&&_0x4aa454['push'](_0x405f50['JoIqr'],_0x405f50[_0x444de2(0x17d)]);const _0x55a432=await runClaudeCommand(_0x4aa454,{'captureOutput':!![]}),_0x3b715e=_0x55a432[_0x444de2(0x178)]?.[_0x444de2(0x188)](_0x405f50[_0x444de2(0x17e)]);!_0x55a432[_0x444de2(0x157)]&&!_0x3b715e?console[_0x444de2(0x15b)](_0x405f50[_0x444de2(0x160)],_0x55a432['error']):console[_0x444de2(0x17a)](_0x444de2(0x156));}}return!![];}export async function ensureClaudeSkills(_0x341b14){const _0x2c787d=_0x4010,_0x1f3509={'sVyUn':function(_0x4bf1c8,_0x14385c){return _0x4bf1c8(_0x14385c);},'WIszo':function(_0x33aa4f,_0x1b771a,_0xf64c28,_0x14dc5f){return _0x33aa4f(_0x1b771a,_0xf64c28,_0x14dc5f);},'nluLq':_0x2c787d(0x16d),'cJJjh':_0x2c787d(0x163),'PmGmr':function(_0x1baea0,_0x5c7b1c){return _0x1baea0(_0x5c7b1c);},'BwyNK':'ranger','kYbuT':function(_0x215ef4,_0x2d7872){return _0x215ef4||_0x2d7872;},'TOPIu':function(_0x34746a,_0x5b0e2a,_0x4b98e8){return _0x34746a(_0x5b0e2a,_0x4b98e8);},'rUkdb':function(_0x5bbd8b){return _0x5bbd8b();},'NLTrf':_0x2c787d(0x17b),'vyyEh':function(_0x621af4,_0x37ff2a){return _0x621af4(_0x37ff2a);},'ZOzJE':function(_0x33f88e,_0x2a2606){return _0x33f88e(_0x2a2606);},'lTMFH':'wantsSkillup','RdNtS':function(_0x62be57,_0x554fed){return _0x62be57(_0x554fed);}},_0x2d6f35=_0x1f3509[_0x2c787d(0x159)](existsSync,_0x1f3509[_0x2c787d(0x171)](join,getSkillsDir(_0x1f3509[_0x2c787d(0x173)]),_0x2c787d(0x176),_0x1f3509[_0x2c787d(0x16f)])),_0x2e7eef=_0x1f3509['sVyUn'](existsSync,join(_0x1f3509[_0x2c787d(0x166)](getSkillsDir,_0x2c787d(0x186)),_0x1f3509['BwyNK'],_0x1f3509['cJJjh']));if(_0x1f3509['kYbuT'](_0x2d6f35,_0x2e7eef))return console[_0x2c787d(0x17a)](_0x2c787d(0x165)),![];const _0xbf4314=existsSync(_0x1f3509[_0x2c787d(0x154)](join,_0x1f3509['rUkdb'](getProjectRoot),_0x1f3509['NLTrf']));let _0x558038=!![];if(_0x341b14)await _0x1f3509['vyyEh'](skillup,{'autoInstall':_0x341b14,'suppressUsage':!![]});else{if(_0xbf4314)await _0x1f3509['ZOzJE'](skillup,{'autoInstall':_0x2c787d(0x186),'suppressUsage':!![]});else{const _0x106d4a=await _0x26ab74[_0x2c787d(0x181)]([{'type':_0x2c787d(0x161),'name':_0x1f3509['lTMFH'],'message':_0x2c787d(0x15a),'default':!![]}]);_0x558038=_0x106d4a['wantsSkillup'],_0x558038&&await _0x1f3509[_0x2c787d(0x151)](skillup,{'suppressUsage':!![]});}}return _0x558038;}
1
+ (function(_0x56b255,_0x483dfb){const _0x46fc41=_0x5771,_0x3ba5cb=_0x56b255();while(!![]){try{const _0x2fbc2c=-parseInt(_0x46fc41(0x151))/0x1+-parseInt(_0x46fc41(0x157))/0x2*(parseInt(_0x46fc41(0x15a))/0x3)+-parseInt(_0x46fc41(0x15f))/0x4*(-parseInt(_0x46fc41(0x142))/0x5)+parseInt(_0x46fc41(0x137))/0x6*(-parseInt(_0x46fc41(0x13e))/0x7)+parseInt(_0x46fc41(0x141))/0x8+parseInt(_0x46fc41(0x154))/0x9+parseInt(_0x46fc41(0x136))/0xa;if(_0x2fbc2c===_0x483dfb)break;else _0x3ba5cb['push'](_0x3ba5cb['shift']());}catch(_0x112da1){_0x3ba5cb['push'](_0x3ba5cb['shift']());}}}(_0x34eb,0x40c46));import{join}from'path';function _0x5771(_0x39ee5e,_0x441388){_0x39ee5e=_0x39ee5e-0x133;const _0x34eb84=_0x34eb();let _0x577111=_0x34eb84[_0x39ee5e];return _0x577111;}import{existsSync}from'fs';import _0x27bd48 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';function _0x34eb(){const _0x420ec2=['ranger','SKILL.md','lLBFy','ranger@trailhead','CtjEC','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','136103jgNXsk','wantsSkillup','plugin','1146366cNJTsF','error','trailhead','16090tfNOEo','pfjIn','log','60LCbZNj','prompt','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','CJgoD','user','182656eJHEZg','add','KLfTw','confirm','✓\x20Ranger\x20skills\x20already\x20installed','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','3718730dqNMBA','2226MwtMVk','Where\x20should\x20the\x20plugin\x20be\x20installed?','project','bOqzQ','ranger-testing/trailhead','✓\x20Marketplace\x20already\x20added','Would\x20you\x20like\x20to\x20install\x20skills?','4445VSJOWo','.claude','\x0aYou\x20can\x20install\x20manually\x20with:','1293080lcFkwJ','15PKwKZy','❌\x20Failed\x20to\x20add\x20marketplace:','yDQhp','Project\x20(shared\x20with\x20team\x20via\x20git)','NOTJn','pluginScope','ZvnRg','vaKuW','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'];_0x34eb=function(){return _0x420ec2;};return _0x34eb();}export async function ensureClaudePlugin(_0x211733){const _0x310feb=_0x5771,_0x5d6858={'CtjEC':function(_0x1688c7,_0x405e8f,_0x25c745){return _0x1688c7(_0x405e8f,_0x25c745);},'ryZrk':'.claude','QvGDx':_0x310feb(0x139),'LlzWO':'list','ngHAM':_0x310feb(0x13c),'oINsj':_0x310feb(0x153),'Qaxqw':_0x310feb(0x160),'bOqzQ':_0x310feb(0x140),'yDQhp':'install','AsqSf':_0x310feb(0x15c),'kukpM':'enable','CJgoD':'already\x20enabled'},_0x89d195=await isPluginInstalled(_0x310feb(0x14e));if(_0x89d195)return console['log'](_0x310feb(0x150)),![];const _0x41dd4d=existsSync(_0x5d6858[_0x310feb(0x14f)](join,getProjectRoot(),_0x5d6858['ryZrk']));let _0x447f80;if(_0x211733)_0x447f80=_0x211733;else{if(_0x41dd4d)_0x447f80=_0x5d6858['QvGDx'];else{console[_0x310feb(0x159)](_0x310feb(0x135));const _0x3f8c21=await _0x27bd48['prompt']([{'type':_0x5d6858['LlzWO'],'name':_0x310feb(0x147),'message':_0x310feb(0x138),'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x310feb(0x15e)},{'name':_0x310feb(0x145),'value':_0x5d6858['QvGDx']}],'default':'user'}]);_0x447f80=_0x3f8c21['pluginScope'];}}console[_0x310feb(0x159)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x447f80+'\x20level)...\x0a');const _0x816502=await isMarketplaceAdded(_0x310feb(0x156));let _0x40b605=_0x816502;if(_0x816502)console['log'](_0x5d6858['ngHAM']);else{const _0x472700=await runClaudeCommand([_0x5d6858['oINsj'],'marketplace',_0x5d6858['Qaxqw'],_0x310feb(0x13b)]);!_0x472700['success']?(console['error'](_0x310feb(0x143),_0x472700[_0x310feb(0x155)]),console['log'](_0x5d6858[_0x310feb(0x13a)]),console[_0x310feb(0x159)]('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console[_0x310feb(0x159)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x447f80)):_0x40b605=!![];}if(_0x40b605){const _0x249093=await runClaudeCommand([_0x310feb(0x153),_0x5d6858[_0x310feb(0x144)],_0x310feb(0x14e),'--scope',_0x447f80]);if(!_0x249093['success'])console['error']('❌\x20Failed\x20to\x20install\x20plugin:',_0x249093[_0x310feb(0x155)]),console['log'](_0x5d6858['bOqzQ']),console[_0x310feb(0x159)](_0x310feb(0x14a)+_0x447f80);else{console['log'](_0x5d6858['AsqSf']);const _0x9ed9ac=[_0x310feb(0x153),_0x5d6858['kukpM'],'ranger@trailhead'];_0x447f80===_0x310feb(0x139)&&_0x9ed9ac['push']('--scope',_0x5d6858['QvGDx']);const _0x1ac25d=await runClaudeCommand(_0x9ed9ac,{'captureOutput':!![]}),_0x2e03db=_0x1ac25d['output']?.['includes'](_0x5d6858[_0x310feb(0x15d)]);!_0x1ac25d['success']&&!_0x2e03db?console['error']('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x1ac25d['error']):console[_0x310feb(0x159)]('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}export async function ensureClaudeSkills(_0x6cf58a){const _0x3337a1=_0x5771,_0x355da4={'pfjIn':function(_0x54bcf4,_0x20f8ed,_0x2c521d,_0x550183){return _0x54bcf4(_0x20f8ed,_0x2c521d,_0x550183);},'lLBFy':function(_0x39e0ef,_0xca7025){return _0x39e0ef(_0xca7025);},'znCCn':_0x3337a1(0x14c),'vuPtf':_0x3337a1(0x139),'ZvnRg':'ranger','KLfTw':function(_0xd063bf,_0x1320ac){return _0xd063bf||_0x1320ac;},'vaKuW':function(_0x546c70,_0x3c37c5,_0x3a6a57){return _0x546c70(_0x3c37c5,_0x3a6a57);},'NOTJn':function(_0x128ef5){return _0x128ef5();},'mGCEC':function(_0x1c8e30,_0x488799){return _0x1c8e30(_0x488799);}},_0xfb3dfc=existsSync(_0x355da4[_0x3337a1(0x158)](join,_0x355da4[_0x3337a1(0x14d)](getSkillsDir,_0x3337a1(0x15e)),_0x3337a1(0x14b),_0x355da4['znCCn'])),_0x4fe792=_0x355da4['lLBFy'](existsSync,_0x355da4['pfjIn'](join,_0x355da4[_0x3337a1(0x14d)](getSkillsDir,_0x355da4['vuPtf']),_0x355da4[_0x3337a1(0x148)],_0x355da4['znCCn']));if(_0x355da4[_0x3337a1(0x161)](_0xfb3dfc,_0x4fe792))return console[_0x3337a1(0x159)](_0x3337a1(0x134)),![];const _0x924797=_0x355da4['lLBFy'](existsSync,_0x355da4[_0x3337a1(0x149)](join,_0x355da4[_0x3337a1(0x146)](getProjectRoot),_0x3337a1(0x13f)));let _0x3b1bca=!![];if(_0x6cf58a)await skillup({'autoInstall':_0x6cf58a,'suppressUsage':!![]});else{if(_0x924797)await _0x355da4['lLBFy'](skillup,{'autoInstall':'project','suppressUsage':!![]});else{const _0x599844=await _0x27bd48[_0x3337a1(0x15b)]([{'type':_0x3337a1(0x133),'name':_0x3337a1(0x152),'message':_0x3337a1(0x13d),'default':!![]}]);_0x3b1bca=_0x599844[_0x3337a1(0x152)],_0x3b1bca&&await _0x355da4['mGCEC'](skillup,{'suppressUsage':!![]});}}return _0x3b1bca;}
@@ -1 +1 @@
1
- (function(_0x16f332,_0x73a45f){const _0x3e2541=_0x5c25,_0x56e346=_0x16f332();while(!![]){try{const _0x25ff43=parseInt(_0x3e2541(0xd4))/0x1+parseInt(_0x3e2541(0xe3))/0x2+parseInt(_0x3e2541(0xe2))/0x3*(parseInt(_0x3e2541(0xe4))/0x4)+parseInt(_0x3e2541(0xd9))/0x5*(parseInt(_0x3e2541(0xd2))/0x6)+-parseInt(_0x3e2541(0xd6))/0x7*(parseInt(_0x3e2541(0xe5))/0x8)+parseInt(_0x3e2541(0xe9))/0x9+-parseInt(_0x3e2541(0xdd))/0xa;if(_0x25ff43===_0x73a45f)break;else _0x56e346['push'](_0x56e346['shift']());}catch(_0x400384){_0x56e346['push'](_0x56e346['shift']());}}}(_0x2982,0xa4df1));function _0x5c25(_0x23b97a,_0x565601){_0x23b97a=_0x23b97a-0xcd;const _0x298294=_0x2982();let _0x5c25ab=_0x298294[_0x23b97a];return _0x5c25ab;}import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x472936 from'inquirer';function _0x2982(){const _0x1d9def=['40FDyuPQ','stringify','pluginScope','parse','21144660QtRFUy','Project\x20(shared\x20with\x20team\x20via\x20git)','Where\x20should\x20the\x20plugin\x20be\x20installed?','✓\x20OpenCode\x20plugin\x20already\x20configured','log','3ewpXoJ','2433482nuVjcs','3978772QbhFey','40EteXbw','user','ULFFR','project','1703187EyOSur','OHImF','✓\x20OpenCode\x20plugin\x20configured','@ranger-testing/opencode-plugin','HUABi','zjgpO','\x0a📦\x20OpenCode\x20Plugin\x0a','Failed\x20to\x20read\x20opencode.json','518718RtUnVP','plugin','444053FWWYSa','heBNL','1045205cljvVy','SXysX','includes'];_0x2982=function(){return _0x1d9def;};return _0x2982();}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x41e6a9){const _0x5a41ad=_0x5c25,_0x49add6={'ULFFR':function(_0x2b64fa,_0x5c0f56){return _0x2b64fa(_0x5c0f56);},'BetIk':function(_0x585491,_0x3d614b,_0x250a51){return _0x585491(_0x3d614b,_0x250a51);},'gxOum':'project','zjgpO':_0x5a41ad(0xd0),'heBNL':'list','QysXD':'User\x20(available\x20in\x20all\x20your\x20projects)','SXysX':_0x5a41ad(0xde),'qGpgb':function(_0x15d402,_0x49d62c,_0x3c434d){return _0x15d402(_0x49d62c,_0x3c434d);},'HEIfc':'opencode.json','TRWCl':_0x5a41ad(0xcd),'LadKy':'https://opencode.ai/config.json','CwpPv':'utf-8','JJmOh':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','VkQmR':_0x5a41ad(0xd1),'OHImF':function(_0x226675,_0x1cdf03){return _0x226675(_0x1cdf03);},'BVZPw':function(_0x3c71f6,_0x5926cc){return _0x3c71f6+_0x5926cc;},'HUABi':_0x5a41ad(0xeb)},_0x13ab9e=_0x49add6[_0x5a41ad(0xe7)](existsSync,_0x49add6['BetIk'](join,getOpencodeConfigDir('project'),'opencode.json'));let _0x311e38;if(_0x41e6a9)_0x311e38=_0x41e6a9;else{if(_0x13ab9e)_0x311e38=_0x49add6['gxOum'];else{console['log'](_0x49add6[_0x5a41ad(0xcf)]);const _0x5b27e3=await _0x472936['prompt']([{'type':_0x49add6[_0x5a41ad(0xd5)],'name':'pluginScope','message':_0x5a41ad(0xdf),'choices':[{'name':_0x49add6['QysXD'],'value':_0x5a41ad(0xe6)},{'name':_0x49add6[_0x5a41ad(0xd7)],'value':_0x5a41ad(0xe8)}],'default':_0x5a41ad(0xe6)}]);_0x311e38=_0x5b27e3[_0x5a41ad(0xdb)];}}const _0x53d2b6=_0x49add6['qGpgb'](join,getOpencodeConfigDir(_0x311e38),_0x49add6['HEIfc']),_0x263f3c=_0x49add6['TRWCl'],_0x585ec4=_0x49add6['LadKy'];let _0x16de1c={};if(existsSync(_0x53d2b6))try{const _0x548f6d=await readFile(_0x53d2b6,_0x49add6['CwpPv']);_0x16de1c=JSON[_0x5a41ad(0xdc)](_0x548f6d);}catch(_0x14bf4b){return console['error'](_0x49add6['JJmOh']),{'configured':![],'scope':_0x311e38,'error':_0x49add6['VkQmR'],'details':_0x14bf4b};}const _0x5f41db=Array['isArray'](_0x16de1c['plugin'])?_0x16de1c[_0x5a41ad(0xd3)]:[];if(_0x5f41db[_0x5a41ad(0xd8)](_0x263f3c))return console[_0x5a41ad(0xe1)](_0x5a41ad(0xe0)),{'configured':![],'scope':_0x311e38};return _0x16de1c['$schema']=_0x16de1c['$schema']||_0x585ec4,_0x16de1c[_0x5a41ad(0xd3)]=[..._0x5f41db,_0x263f3c],await mkdir(_0x49add6[_0x5a41ad(0xea)](getOpencodeConfigDir,_0x311e38),{'recursive':!![]}),await writeFile(_0x53d2b6,_0x49add6['BVZPw'](JSON[_0x5a41ad(0xda)](_0x16de1c,null,0x2),'\x0a')),console['log'](_0x49add6[_0x5a41ad(0xce)]),{'configured':!![],'scope':_0x311e38};}
1
+ function _0x317b(){const _0xd78ab2=['✓\x20OpenCode\x20plugin\x20already\x20configured','list','176652ZKoMKB','180WJMQlN','vVJEr','1029479wuXWLT','https://opencode.ai/config.json','lBWKb','gQoMz','EjGQt','708340ZqOaKi','8WUpPbE','@ranger-testing/opencode-plugin','Wvinj','isArray','utf-8','26lRvoOU','project','$schema','2786305rmpSgW','pluginScope','WJPnw','opencode.json','148905PfFmKX','CWmJd','6558237LZdmaX','320DiuFag','log','NxLcZ','User\x20(available\x20in\x20all\x20your\x20projects)','6zgVOLl','15294000cKOKvI','parse','includes','Failed\x20to\x20read\x20opencode.json','HeRiF','\x0a📦\x20OpenCode\x20Plugin\x0a','plugin'];_0x317b=function(){return _0xd78ab2;};return _0x317b();}function _0x17bf(_0x18e6e9,_0x5e5d7b){_0x18e6e9=_0x18e6e9-0x98;const _0x317bc2=_0x317b();let _0x17bf12=_0x317bc2[_0x18e6e9];return _0x17bf12;}(function(_0x437695,_0x596073){const _0x554920=_0x17bf,_0x3c3771=_0x437695();while(!![]){try{const _0x1f67b8=parseInt(_0x554920(0xad))/0x1+-parseInt(_0x554920(0xb3))/0x2*(-parseInt(_0x554920(0xba))/0x3)+parseInt(_0x554920(0xae))/0x4*(parseInt(_0x554920(0xb6))/0x5)+-parseInt(_0x554920(0x9b))/0x6*(parseInt(_0x554920(0xbc))/0x7)+-parseInt(_0x554920(0xbd))/0x8*(parseInt(_0x554920(0xa5))/0x9)+parseInt(_0x554920(0x9c))/0xa+parseInt(_0x554920(0xa8))/0xb*(-parseInt(_0x554920(0xa6))/0xc);if(_0x1f67b8===_0x596073)break;else _0x3c3771['push'](_0x3c3771['shift']());}catch(_0x460e07){_0x3c3771['push'](_0x3c3771['shift']());}}}(_0x317b,0xd4cf7));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0xe8a89f from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x5c144f){const _0x27391e=_0x17bf,_0x2fc8e7={'HMHPH':function(_0xa68de0,_0x47b97e){return _0xa68de0(_0x47b97e);},'sIZrA':function(_0x2ffe2c,_0x373bc7){return _0x2ffe2c(_0x373bc7);},'Wvinj':_0x27391e(0xb4),'nPCAQ':_0x27391e(0xb9),'lBWKb':'Where\x20should\x20the\x20plugin\x20be\x20installed?','vVJEr':'Project\x20(shared\x20with\x20team\x20via\x20git)','TKmZk':function(_0x10e37b,_0x40a400,_0x38e4a0){return _0x10e37b(_0x40a400,_0x38e4a0);},'WJPnw':function(_0x2dd824,_0x5f1278){return _0x2dd824(_0x5f1278);},'NxLcZ':_0x27391e(0xa9),'HeRiF':function(_0x4f3f27,_0x3a53ce){return _0x4f3f27(_0x3a53ce);},'gQoMz':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','xkcSs':_0x27391e(0xa3),'EjGQt':function(_0x42c73e,_0x530cd8,_0x3fb3f9){return _0x42c73e(_0x530cd8,_0x3fb3f9);},'CWmJd':'✓\x20OpenCode\x20plugin\x20configured'},_0x236828=_0x2fc8e7['HMHPH'](existsSync,join(_0x2fc8e7['sIZrA'](getOpencodeConfigDir,_0x2fc8e7[_0x27391e(0xb0)]),_0x2fc8e7['nPCAQ']));let _0x33f6ff;if(_0x5c144f)_0x33f6ff=_0x5c144f;else{if(_0x236828)_0x33f6ff=_0x27391e(0xb4);else{console[_0x27391e(0x98)](_0x27391e(0xa1));const _0x3ae138=await _0xe8a89f['prompt']([{'type':_0x27391e(0xa4),'name':_0x27391e(0xb7),'message':_0x2fc8e7[_0x27391e(0xaa)],'choices':[{'name':_0x27391e(0x9a),'value':'user'},{'name':_0x2fc8e7[_0x27391e(0xa7)],'value':_0x2fc8e7[_0x27391e(0xb0)]}],'default':'user'}]);_0x33f6ff=_0x3ae138['pluginScope'];}}const _0xcaf910=_0x2fc8e7['TKmZk'](join,_0x2fc8e7[_0x27391e(0xb8)](getOpencodeConfigDir,_0x33f6ff),'opencode.json'),_0x2f6b9f=_0x27391e(0xaf),_0x5e2283=_0x2fc8e7[_0x27391e(0x99)];let _0x5c2d6e={};if(_0x2fc8e7[_0x27391e(0xa0)](existsSync,_0xcaf910))try{const _0x4dc4e3=await readFile(_0xcaf910,_0x27391e(0xb2));_0x5c2d6e=JSON[_0x27391e(0x9d)](_0x4dc4e3);}catch(_0x1e1bdf){return console['error'](_0x2fc8e7[_0x27391e(0xab)]),{'configured':![],'scope':_0x33f6ff,'error':_0x27391e(0x9f),'details':_0x1e1bdf};}const _0x2faee9=Array[_0x27391e(0xb1)](_0x5c2d6e['plugin'])?_0x5c2d6e[_0x27391e(0xa2)]:[];if(_0x2faee9[_0x27391e(0x9e)](_0x2f6b9f))return console['log'](_0x2fc8e7['xkcSs']),{'configured':![],'scope':_0x33f6ff};return _0x5c2d6e[_0x27391e(0xb5)]=_0x5c2d6e['$schema']||_0x5e2283,_0x5c2d6e['plugin']=[..._0x2faee9,_0x2f6b9f],await mkdir(getOpencodeConfigDir(_0x33f6ff),{'recursive':!![]}),await _0x2fc8e7[_0x27391e(0xac)](writeFile,_0xcaf910,JSON['stringify'](_0x5c2d6e,null,0x2)+'\x0a'),console[_0x27391e(0x98)](_0x2fc8e7[_0x27391e(0xbb)]),{'configured':!![],'scope':_0x33f6ff};}