@ranger-testing/ranger-cli 2.5.4-alpha.071b7bd-1 → 2.5.4-alpha.0e8b82c-9

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 +6 -2
@@ -1 +1 @@
1
- function _0x43c6(_0x2dd7df,_0x284c76){_0x2dd7df=_0x2dd7df-0x102;const _0x136458=_0x1364();let _0x43c697=_0x136458[_0x2dd7df];return _0x43c697;}(function(_0x15e3a3,_0x29cd27){const _0x2cda71=_0x43c6,_0x5743af=_0x15e3a3();while(!![]){try{const _0x3d3548=parseInt(_0x2cda71(0x108))/0x1*(-parseInt(_0x2cda71(0x10e))/0x2)+parseInt(_0x2cda71(0x109))/0x3+-parseInt(_0x2cda71(0x10d))/0x4*(-parseInt(_0x2cda71(0x10a))/0x5)+parseInt(_0x2cda71(0x106))/0x6*(-parseInt(_0x2cda71(0x102))/0x7)+-parseInt(_0x2cda71(0x10b))/0x8+parseInt(_0x2cda71(0x104))/0x9+-parseInt(_0x2cda71(0x107))/0xa;if(_0x3d3548===_0x29cd27)break;else _0x5743af['push'](_0x5743af['shift']());}catch(_0x4dff8c){_0x5743af['push'](_0x5743af['shift']());}}}(_0x1364,0x9adc0));import{isSessionEnabled}from'../utils/sessionCache.js';export function printBlock(_0x50a105){console['log'](_0x50a105);}function _0x1364(){const _0x49afdb=['309084IyWgxd','stdin','7808444sXGGFa','QnHks','5814288dzyxBK','parse','6JbnmgN','2995960AMEMQW','2AvfiQq','2327631mTMXAu','5ClhDOo','419584ivNday','NhZGG','3956060IIdPTB'];_0x1364=function(){return _0x49afdb;};return _0x1364();}export async function readHookInput(){const _0x2b88b8=_0x43c6;let _0xc73afb='';try{for await(const _0x1c0b3c of process[_0x2b88b8(0x10f)]){_0xc73afb+=_0x1c0b3c;}}catch{return null;}if(!_0xc73afb['trim']())return null;try{return JSON[_0x2b88b8(0x105)](_0xc73afb);}catch{return null;}}export async function getEnabledSessionId(_0x5b5b24){const _0x5a0624=_0x43c6,_0x4b6aea={'QnHks':function(_0x13e7a9,_0x3d26c0){return _0x13e7a9(_0x3d26c0);},'NhZGG':function(_0x11a0c3){return _0x11a0c3();}};if(_0x5b5b24)return _0x4b6aea[_0x5a0624(0x103)](isSessionEnabled,_0x5b5b24)?_0x5b5b24:null;const _0x4c9a87=await _0x4b6aea[_0x5a0624(0x10c)](readHookInput),_0x2914e3=_0x4c9a87?.['session_id'];if(!_0x2914e3||!isSessionEnabled(_0x2914e3))return null;return _0x2914e3;}export async function getEnabledHookContext(_0x1f52f6){if(_0x1f52f6){if(!isSessionEnabled(_0x1f52f6))return null;return{'sessionId':_0x1f52f6,'input':{'session_id':_0x1f52f6}};}const _0xd0e195=await readHookInput(),_0x434497=_0xd0e195?.['session_id'];if(!_0x434497||!isSessionEnabled(_0x434497))return null;return{'sessionId':_0x434497,'input':_0xd0e195};}
1
+ (function(_0x10459c,_0x156aa9){const _0x211e81=_0x3aef,_0x1929f1=_0x10459c();while(!![]){try{const _0x58ae68=-parseInt(_0x211e81(0x1e8))/0x1*(-parseInt(_0x211e81(0x1e7))/0x2)+-parseInt(_0x211e81(0x1de))/0x3*(-parseInt(_0x211e81(0x1e0))/0x4)+parseInt(_0x211e81(0x1ea))/0x5+parseInt(_0x211e81(0x1e1))/0x6+-parseInt(_0x211e81(0x1e4))/0x7+-parseInt(_0x211e81(0x1dd))/0x8*(-parseInt(_0x211e81(0x1df))/0x9)+-parseInt(_0x211e81(0x1e6))/0xa;if(_0x58ae68===_0x156aa9)break;else _0x1929f1['push'](_0x1929f1['shift']());}catch(_0x438f2f){_0x1929f1['push'](_0x1929f1['shift']());}}}(_0x58ed,0x210d0));import{isSessionEnabled}from'../utils/sessionCache.js';function _0x3aef(_0x372427,_0x262830){_0x372427=_0x372427-0x1dd;const _0x58ed28=_0x58ed();let _0x3aef16=_0x58ed28[_0x372427];return _0x3aef16;}export function printBlock(_0x102cf7){const _0x394525=_0x3aef;console[_0x394525(0x1e5)](_0x102cf7);}function _0x58ed(){const _0x26195e=['368914ZlSgZB','log','5862630vSlleM','336874KsSYhj','1WUHTGo','session_id','750440GurObG','40csDtXe','9nnUWaA','379737aHAzFf','293652eTAQBI','147672verRPo','ZVFri','parse'];_0x58ed=function(){return _0x26195e;};return _0x58ed();}export async function readHookInput(){const _0x47e3d3=_0x3aef;let _0x2955d6='';try{for await(const _0x4fc096 of process['stdin']){_0x2955d6+=_0x4fc096;}}catch{return null;}if(!_0x2955d6['trim']())return null;try{return JSON[_0x47e3d3(0x1e3)](_0x2955d6);}catch{return null;}}export async function getEnabledSessionId(_0x4c3677){const _0x4b3820=_0x3aef;if(_0x4c3677)return isSessionEnabled(_0x4c3677)?_0x4c3677:null;const _0x4c5b3d=await readHookInput(),_0xa88471=_0x4c5b3d?.[_0x4b3820(0x1e9)];if(!_0xa88471||!isSessionEnabled(_0xa88471))return null;return _0xa88471;}export async function getEnabledHookContext(_0x54b83b){const _0x7d4b46=_0x3aef,_0x369341={'ZVFri':function(_0x78bb14,_0xd7cb0d){return _0x78bb14(_0xd7cb0d);},'qKJQg':function(_0x3a886b){return _0x3a886b();}};if(_0x54b83b){if(!_0x369341[_0x7d4b46(0x1e2)](isSessionEnabled,_0x54b83b))return null;return{'sessionId':_0x54b83b,'input':{'session_id':_0x54b83b}};}const _0x1d344c=await _0x369341['qKJQg'](readHookInput),_0x4bf584=_0x1d344c?.['session_id'];if(!_0x4bf584||!isSessionEnabled(_0x4bf584))return null;return{'sessionId':_0x4bf584,'input':_0x1d344c};}
@@ -1 +1 @@
1
- (function(_0x1cb440,_0x2bfd87){const _0x231701=_0x5195,_0x305977=_0x1cb440();while(!![]){try{const _0x2abcf9=parseInt(_0x231701(0xdb))/0x1*(parseInt(_0x231701(0xd3))/0x2)+-parseInt(_0x231701(0xd5))/0x3+parseInt(_0x231701(0xd6))/0x4*(-parseInt(_0x231701(0xd1))/0x5)+parseInt(_0x231701(0xd9))/0x6+-parseInt(_0x231701(0xd4))/0x7*(parseInt(_0x231701(0xd7))/0x8)+-parseInt(_0x231701(0xd0))/0x9+-parseInt(_0x231701(0xcf))/0xa*(-parseInt(_0x231701(0xce))/0xb);if(_0x2abcf9===_0x2bfd87)break;else _0x305977['push'](_0x305977['shift']());}catch(_0x5153bf){_0x305977['push'](_0x305977['shift']());}}}(_0x52a6,0x2e3dc));function _0x5195(_0x3a3fd1,_0x49f59b){_0x3a3fd1=_0x3a3fd1-0xce;const _0x52a641=_0x52a6();let _0x5195f9=_0x52a641[_0x3a3fd1];return _0x5195f9;}function _0x52a6(){const _0x1da2a6=['84258CBKtNH','2332zwBDzF','2009416EAZLQH','sessionId','213714NglsLu','dtzig','26330DARruh','11GVJthh','5311430zaUvcS','2594970ltNReb','175vduLTo','qBStG','16nQJIbe','7ynsWui'];_0x52a6=function(){return _0x1da2a6;};return _0x52a6();}import{printBlock,getEnabledHookContext}from'./output.js';import{shouldShowPlanReminder}from'../utils/sessionCache.js';export async function planReminder(_0x5dd951){const _0x2506e5=_0x5195,_0x1abf59={'dtzig':function(_0x4e0363,_0x235bd7){return _0x4e0363!==_0x235bd7;},'qBStG':'plan','ncOpL':function(_0xfe2f92,_0x3e2088){return _0xfe2f92(_0x3e2088);}},_0x3cf6cb=await getEnabledHookContext(_0x5dd951);if(!_0x3cf6cb)return;if(_0x1abf59[_0x2506e5(0xda)](_0x3cf6cb['input']['permission_mode'],_0x1abf59[_0x2506e5(0xd2)]))return;if(!_0x1abf59['ncOpL'](shouldShowPlanReminder,_0x3cf6cb[_0x2506e5(0xd8)]))return;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 _0x9535(_0x4e0e78,_0x431d51){_0x4e0e78=_0x4e0e78-0xef;const _0x533381=_0x5333();let _0x9535e8=_0x533381[_0x4e0e78];return _0x9535e8;}function _0x5333(){const _0x290b72=['2194smdHtv','===\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===','75498bBQYVl','6611220qkYcsl','1670SvIhZL','8agjhxt','82511SCJnTu','permission_mode','1197508uthxOS','72QGfeoe','994QurzZJ','105615VNdzUt','32SvLbFJ','3629199QgtiqF','485okuBIO'];_0x5333=function(){return _0x290b72;};return _0x5333();}(function(_0x3eecf0,_0x2f48d4){const _0x621d0c=_0x9535,_0xf590ce=_0x3eecf0();while(!![]){try{const _0x35dab5=parseInt(_0x621d0c(0xf9))/0x1*(parseInt(_0x621d0c(0xf4))/0x2)+parseInt(_0x621d0c(0xf5))/0x3*(parseInt(_0x621d0c(0xf6))/0x4)+-parseInt(_0x621d0c(0xf8))/0x5*(-parseInt(_0x621d0c(0xfb))/0x6)+parseInt(_0x621d0c(0xf7))/0x7*(-parseInt(_0x621d0c(0xef))/0x8)+-parseInt(_0x621d0c(0xfc))/0x9+-parseInt(_0x621d0c(0xfd))/0xa*(parseInt(_0x621d0c(0xf0))/0xb)+-parseInt(_0x621d0c(0xf3))/0xc*(-parseInt(_0x621d0c(0xf2))/0xd);if(_0x35dab5===_0x2f48d4)break;else _0xf590ce['push'](_0xf590ce['shift']());}catch(_0x5d83a7){_0xf590ce['push'](_0xf590ce['shift']());}}}(_0x5333,0x9c271));import{printBlock,getEnabledHookContext}from'./output.js';import{shouldShowPlanReminder}from'../utils/sessionCache.js';export async function planReminder(_0xa832a0){const _0x3a1144=_0x9535,_0xf2fb0a={'Nugtp':'plan','pdsxm':function(_0x1c3fa6,_0x33e2ab){return _0x1c3fa6(_0x33e2ab);}},_0x4aeb58=await getEnabledHookContext(_0xa832a0);if(!_0x4aeb58)return;if(_0x4aeb58['input'][_0x3a1144(0xf1)]!==_0xf2fb0a['Nugtp'])return;if(!shouldShowPlanReminder(_0x4aeb58['sessionId']))return;_0xf2fb0a['pdsxm'](printBlock,_0x3a1144(0xfa));}
@@ -1 +1 @@
1
- (function(_0x30c6e6,_0x5a70d8){const _0x1bb71b=_0x49a3,_0x49ce87=_0x30c6e6();while(!![]){try{const _0x3f776c=parseInt(_0x1bb71b(0x1a5))/0x1*(-parseInt(_0x1bb71b(0x1a1))/0x2)+-parseInt(_0x1bb71b(0x1a4))/0x3+parseInt(_0x1bb71b(0x1a2))/0x4+parseInt(_0x1bb71b(0x1a6))/0x5+parseInt(_0x1bb71b(0x1a8))/0x6+parseInt(_0x1bb71b(0x1a9))/0x7*(parseInt(_0x1bb71b(0x1a3))/0x8)+-parseInt(_0x1bb71b(0x1a0))/0x9*(parseInt(_0x1bb71b(0x1a7))/0xa);if(_0x3f776c===_0x5a70d8)break;else _0x49ce87['push'](_0x49ce87['shift']());}catch(_0x24cfdf){_0x49ce87['push'](_0x49ce87['shift']());}}}(_0x3a36,0xd251e));import{printBlock,getEnabledSessionId}from'./output.js';function _0x3a36(){const _0xf2bdd3=['10nVvwva','4739880TvzowV','3423zCGRpq','168813NOWGlV','2uItmAt','3599356Zemlsf','18104jLpHOD','2712171myjGHA','1112957KrhDoM','504075qkGeMv'];_0x3a36=function(){return _0xf2bdd3;};return _0x3a36();}function _0x49a3(_0x2163d,_0x3a8bb0){_0x2163d=_0x2163d-0x1a0;const _0x3a3675=_0x3a36();let _0x49a3ee=_0x3a3675[_0x2163d];return _0x49a3ee;}export async function planStart(_0x16782a){const _0xf16acf=await getEnabledSessionId(_0x16782a);if(!_0xf16acf)return;printBlock('===\x20RANGER:\x20ACTION\x20REQUIRED\x20===\x0a\x0aIf\x20this\x20plan\x20involves\x20UI\x20changes,\x20you\x20MUST:\x0a\x0a1.\x20**READ\x20/ranger\x20skill**\x20-\x20specifically\x20create.md\x0a2.\x20**Add\x20a\x20Ranger\x20Feature\x20Review\x20Specification**\x20at\x20the\x20end\x20of\x20your\x20plan\x0a\x0aScenarios\x20are\x20E2E\x20test\x20flows,\x20NOT\x20implementation\x20tasks.\x0a\x0a**Good:**\x20\x22User\x20can\x20log\x20in\x20with\x20valid\x20credentials\x20and\x20see\x20dashboard\x22\x0a**Bad:**\x20\x22Add\x20form\x20validation\x22\x20or\x20\x22Button\x20is\x20visible\x22\x0a\x0aAfter\x20planning,\x20run:\x0a`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<E2E\x20flow\x201>\x22\x20-c\x20\x22<E2E\x20flow\x202>\x22`\x0a\x0a===\x20END\x20===');}
1
+ function _0x2e4c(_0x574280,_0xf0a4c8){_0x574280=_0x574280-0x109;const _0x14f2bb=_0x14f2();let _0x2e4c8e=_0x14f2bb[_0x574280];return _0x2e4c8e;}function _0x14f2(){const _0x563a08=['865cTnDIZ','13326YpcvDl','1139733YURbZB','697058XPkmYH','1856748FoVtwl','49TSyOKA','214764evKnEx','wzGMl','52594DNOsrK','41896SbYGWk'];_0x14f2=function(){return _0x563a08;};return _0x14f2();}(function(_0x2869ba,_0x1005c7){const _0x2628a8=_0x2e4c,_0x9589e7=_0x2869ba();while(!![]){try{const _0x31c428=parseInt(_0x2628a8(0x111))/0x1+-parseInt(_0x2628a8(0x10c))/0x2+-parseInt(_0x2628a8(0x10a))/0x3+parseInt(_0x2628a8(0x112))/0x4+parseInt(_0x2628a8(0x10e))/0x5*(-parseInt(_0x2628a8(0x10f))/0x6)+parseInt(_0x2628a8(0x109))/0x7*(-parseInt(_0x2628a8(0x10d))/0x8)+-parseInt(_0x2628a8(0x110))/0x9;if(_0x31c428===_0x1005c7)break;else _0x9589e7['push'](_0x9589e7['shift']());}catch(_0x2e6740){_0x9589e7['push'](_0x9589e7['shift']());}}}(_0x14f2,0x7def7));import{printBlock,getEnabledSessionId}from'./output.js';export async function planStart(_0x269a9d){const _0x5d31e0=_0x2e4c,_0x12f681={'wzGMl':function(_0x1cc78d,_0x5351fc){return _0x1cc78d(_0x5351fc);}},_0x298356=await _0x12f681[_0x5d31e0(0x10b)](getEnabledSessionId,_0x269a9d);if(!_0x298356)return;printBlock('===\x20RANGER:\x20ACTION\x20REQUIRED\x20===\x0a\x0aIf\x20this\x20plan\x20involves\x20UI\x20changes,\x20you\x20MUST:\x0a\x0a1.\x20**READ\x20/ranger\x20skill**\x20-\x20specifically\x20create.md\x0a2.\x20**Add\x20a\x20Ranger\x20Feature\x20Review\x20Specification**\x20at\x20the\x20end\x20of\x20your\x20plan\x0a\x0aScenarios\x20are\x20E2E\x20test\x20flows,\x20NOT\x20implementation\x20tasks.\x0a\x0a**Good:**\x20\x22User\x20can\x20log\x20in\x20with\x20valid\x20credentials\x20and\x20see\x20dashboard\x22\x0a**Bad:**\x20\x22Add\x20form\x20validation\x22\x20or\x20\x22Button\x20is\x20visible\x22\x0a\x0aAfter\x20planning,\x20run:\x0a`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<E2E\x20flow\x201>\x22\x20-c\x20\x22<E2E\x20flow\x202>\x22`\x0a\x0a===\x20END\x20===');}
@@ -1 +1 @@
1
- (function(_0x40f759,_0x8a4cff){const _0xe62862=_0x5775,_0x259694=_0x40f759();while(!![]){try{const _0x17030c=-parseInt(_0xe62862(0x14d))/0x1+-parseInt(_0xe62862(0x14b))/0x2*(-parseInt(_0xe62862(0x157))/0x3)+parseInt(_0xe62862(0x14f))/0x4+parseInt(_0xe62862(0x149))/0x5+-parseInt(_0xe62862(0x155))/0x6*(parseInt(_0xe62862(0x14c))/0x7)+-parseInt(_0xe62862(0x14a))/0x8*(parseInt(_0xe62862(0x14e))/0x9)+parseInt(_0xe62862(0x151))/0xa;if(_0x17030c===_0x8a4cff)break;else _0x259694['push'](_0x259694['shift']());}catch(_0x187478){_0x259694['push'](_0x259694['shift']());}}}(_0x9130,0xe9e66));import{getSessionEntry,updateBranchTracking}from'../utils/sessionCache.js';function _0x9130(){const _0x488127=['8257465PkTWNk','16GgjJKH','101666JHnKKY','7XdJBmn','1367479ssqiIW','7813845krFUKW','2321984PSiQmV','RANGER:\x20If\x20this\x20change\x20expands\x20the\x20scope\x20of\x20the\x20active\x20feature\x20review,\x20you\x20may\x20need\x20to\x20add\x20a\x20scenario.\x20See\x20Workflow\x201\x20in\x20/ranger.\x20If\x20you\x20decide\x20to\x20add\x20a\x20scenario,\x20you\x20MUST\x20read\x20Workflow\x201\x20IN\x20DETAIL\x20first.\x20Remember:\x20when\x20you\x20finish\x20your\x20work,\x20your\x20final\x20message\x20to\x20the\x20user\x20must\x20direct\x20them\x20to\x20the\x20Ranger\x20feature\x20review\x20dashboard\x20to\x20review\x20(e.g.\x20\x22Go\x20to\x20the\x20Ranger\x20feature\x20dashboard\x20to\x20review:\x20https://dashboard.ranger.net/features/{feature_id}\x22).','22041500VQFNZq','stringify','RANGER:\x20If\x20this\x20is\x20for\x20a\x20UI\x20feature,\x20you\x20MUST\x20use\x20/ranger\x20to\x20either\x20create\x20a\x20new\x20feature\x20review\x20or\x20resume\x20an\x20existing\x20one.','log','8955132TIrQwe','PostToolUse','66ozkxYI'];_0x9130=function(){return _0x488127;};return _0x9130();}function _0x5775(_0x48444f,_0x5bdb0e){_0x48444f=_0x48444f-0x149;const _0x91307f=_0x9130();let _0x577514=_0x91307f[_0x48444f];return _0x577514;}import{getToken}from'../utils/keychain.js';import{getEnabledSessionId}from'./output.js';export async function postEdit(_0x2eb34d){const _0x56b2d5=_0x5775,_0x147045={'gjBsq':_0x56b2d5(0x156)},_0x376cc5=await getEnabledSessionId(_0x2eb34d);if(!_0x376cc5)return;updateBranchTracking(_0x376cc5);const _0x37914d=await getToken();if(!_0x37914d)return;const _0x28148f=getSessionEntry(_0x376cc5);if(_0x28148f){const _0x1a98f1={'hookSpecificOutput':{'hookEventName':'PostToolUse','additionalContext':_0x56b2d5(0x150)}};console[_0x56b2d5(0x154)](JSON[_0x56b2d5(0x152)](_0x1a98f1));return;}const _0x2295df={'hookSpecificOutput':{'hookEventName':_0x147045['gjBsq'],'additionalContext':_0x56b2d5(0x153)}};console['log'](JSON[_0x56b2d5(0x152)](_0x2295df));}
1
+ function _0x4486(_0x430f02,_0x145dbc){_0x430f02=_0x430f02-0x1ef;const _0xdd09ec=_0xdd09();let _0x44867b=_0xdd09ec[_0x430f02];return _0x44867b;}(function(_0x1e565f,_0x4e84aa){const _0x2fcab3=_0x4486,_0x5aea3b=_0x1e565f();while(!![]){try{const _0x142941=-parseInt(_0x2fcab3(0x1fa))/0x1*(parseInt(_0x2fcab3(0x1f5))/0x2)+-parseInt(_0x2fcab3(0x1f3))/0x3+parseInt(_0x2fcab3(0x1f6))/0x4+parseInt(_0x2fcab3(0x1f7))/0x5+-parseInt(_0x2fcab3(0x1ff))/0x6+parseInt(_0x2fcab3(0x1f9))/0x7*(-parseInt(_0x2fcab3(0x1fd))/0x8)+-parseInt(_0x2fcab3(0x1f1))/0x9*(-parseInt(_0x2fcab3(0x1f0))/0xa);if(_0x142941===_0x4e84aa)break;else _0x5aea3b['push'](_0x5aea3b['shift']());}catch(_0x4e608a){_0x5aea3b['push'](_0x5aea3b['shift']());}}}(_0xdd09,0x19233));import{getSessionEntry,updateBranchTracking}from'../utils/sessionCache.js';import{getToken}from'../utils/keychain.js';import{getEnabledSessionId}from'./output.js';export async function postEdit(_0x4bfbda){const _0x1c2075=_0x4486,_0x4a77a7={'JBIgf':function(_0x4010b3,_0x490ab4){return _0x4010b3(_0x490ab4);},'HUjSV':function(_0x2f189b){return _0x2f189b();},'wEYIS':_0x1c2075(0x1fc)},_0x399cf7=await _0x4a77a7['JBIgf'](getEnabledSessionId,_0x4bfbda);if(!_0x399cf7)return;updateBranchTracking(_0x399cf7);const _0x34f33d=await _0x4a77a7[_0x1c2075(0x1ef)](getToken);if(!_0x34f33d)return;const _0x2162b3=getSessionEntry(_0x399cf7);if(_0x2162b3){const _0x25042e={'hookSpecificOutput':{'hookEventName':_0x4a77a7[_0x1c2075(0x1f8)],'additionalContext':_0x1c2075(0x1f2)}};console[_0x1c2075(0x1fb)](JSON['stringify'](_0x25042e));return;}const _0x5107f0={'hookSpecificOutput':{'hookEventName':_0x1c2075(0x1fc),'additionalContext':_0x1c2075(0x1fe)}};console['log'](JSON[_0x1c2075(0x1f4)](_0x5107f0));}function _0xdd09(){const _0x4a1b3a=['295590MHugyo','wEYIS','7PEmneI','88671bmVqtk','log','PostToolUse','1024232uMmYhC','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.','858870tmGXzs','HUjSV','50yuvMXz','633681dDnvFE','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).','248544QaOtgE','stringify','2SVzdJF','537972rUXdDY'];_0xdd09=function(){return _0x4a1b3a;};return _0xdd09();}
@@ -1 +1 @@
1
- function _0xccd1(){const _0x3801fe=['232849CSJupv','601134IvTyfO','HnBtg','514299aygZCF','7990xBnpxE','6057cOTQIb','2NLvMuA','===\x20RANGER:\x20PRESERVE\x20IN\x20COMPACTION\x20===\x0a\x0aIf\x20you\x20created\x20a\x20plan\x20with\x20a\x20**Ranger\x20Feature\x20Review\x20Specification**,\x20you\x20MUST\x20preserve\x20it\x20in\x20the\x20compaction\x20summary.\x0a\x0aThe\x20specification\x20contains\x20scenarios\x20that\x20will\x20be\x20used\x20with\x20`ranger\x20create`.','12766528wiItTE','56gEjGOR','28peQuuz','6530310ITUagC','10602702TxvAFz'];_0xccd1=function(){return _0x3801fe;};return _0xccd1();}(function(_0x45cf82,_0x1fb22b){const _0x2f35f0=_0x4d25,_0x4644d9=_0x45cf82();while(!![]){try{const _0x3ba686=-parseInt(_0x2f35f0(0x1af))/0x1*(-parseInt(_0x2f35f0(0x1b5))/0x2)+-parseInt(_0x2f35f0(0x1b2))/0x3*(-parseInt(_0x2f35f0(0x1b9))/0x4)+-parseInt(_0x2f35f0(0x1ba))/0x5+-parseInt(_0x2f35f0(0x1b0))/0x6*(-parseInt(_0x2f35f0(0x1b8))/0x7)+-parseInt(_0x2f35f0(0x1b7))/0x8+-parseInt(_0x2f35f0(0x1b4))/0x9*(-parseInt(_0x2f35f0(0x1b3))/0xa)+parseInt(_0x2f35f0(0x1bb))/0xb;if(_0x3ba686===_0x1fb22b)break;else _0x4644d9['push'](_0x4644d9['shift']());}catch(_0x630a97){_0x4644d9['push'](_0x4644d9['shift']());}}}(_0xccd1,0xcba4b));function _0x4d25(_0xce8f18,_0x298c3e){_0xce8f18=_0xce8f18-0x1af;const _0xccd198=_0xccd1();let _0x4d2520=_0xccd198[_0xce8f18];return _0x4d2520;}import{getToken}from'../utils/keychain.js';import{printBlock,getEnabledSessionId}from'./output.js';export async function preCompact(_0x5692ac){const _0xb6505=_0x4d25,_0x1506da={'HnBtg':function(_0x12df76,_0x45793f){return _0x12df76(_0x45793f);},'ZFnNj':function(_0x51df0c){return _0x51df0c();}},_0xea3f62=await _0x1506da[_0xb6505(0x1b1)](getEnabledSessionId,_0x5692ac);if(!_0xea3f62)return;try{const _0x4e3462=await _0x1506da['ZFnNj'](getToken);if(!_0x4e3462)return;printBlock(_0xb6505(0x1b6));}catch{}}
1
+ function _0x437d(_0x4c27a8,_0x279ee6){_0x4c27a8=_0x4c27a8-0x108;const _0x2d452d=_0x2d45();let _0x437d9e=_0x2d452d[_0x4c27a8];return _0x437d9e;}(function(_0x3df815,_0x372a70){const _0x3b3b4e=_0x437d,_0x4f0bb3=_0x3df815();while(!![]){try{const _0x11afbd=parseInt(_0x3b3b4e(0x110))/0x1*(-parseInt(_0x3b3b4e(0x10e))/0x2)+parseInt(_0x3b3b4e(0x10d))/0x3+parseInt(_0x3b3b4e(0x10a))/0x4+parseInt(_0x3b3b4e(0x10c))/0x5+-parseInt(_0x3b3b4e(0x10f))/0x6+parseInt(_0x3b3b4e(0x109))/0x7+-parseInt(_0x3b3b4e(0x108))/0x8;if(_0x11afbd===_0x372a70)break;else _0x4f0bb3['push'](_0x4f0bb3['shift']());}catch(_0x2b2d7a){_0x4f0bb3['push'](_0x4f0bb3['shift']());}}}(_0x2d45,0x6e5b5));function _0x2d45(){const _0x5b7c18=['116wCekwt','10958864iIIKWy','4198299QeNJOK','3549896QhcALs','gcxGr','2209080GeveUr','2472039yJHsoI','5466Tbhrcg','3684918EYOzMM'];_0x2d45=function(){return _0x5b7c18;};return _0x2d45();}import{getToken}from'../utils/keychain.js';import{printBlock,getEnabledSessionId}from'./output.js';export async function preCompact(_0x13d4ee){const _0x539714=_0x437d,_0x37f3a9={'gcxGr':function(_0xbf17ff,_0x486f5c){return _0xbf17ff(_0x486f5c);}},_0x1e9655=await getEnabledSessionId(_0x13d4ee);if(!_0x1e9655)return;try{const _0x32fadf=await getToken();if(!_0x32fadf)return;_0x37f3a9[_0x539714(0x10b)](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 +1 @@
1
- (function(_0x34aa8b,_0x52f95a){const _0x5c6475=_0x32d4,_0x3c5150=_0x34aa8b();while(!![]){try{const _0x1ccdc5=-parseInt(_0x5c6475(0x1a2))/0x1+parseInt(_0x5c6475(0x1a0))/0x2*(parseInt(_0x5c6475(0x1aa))/0x3)+parseInt(_0x5c6475(0x19f))/0x4+-parseInt(_0x5c6475(0x1ab))/0x5*(parseInt(_0x5c6475(0x1a3))/0x6)+parseInt(_0x5c6475(0x1a6))/0x7*(-parseInt(_0x5c6475(0x1a7))/0x8)+-parseInt(_0x5c6475(0x1a1))/0x9+-parseInt(_0x5c6475(0x1a5))/0xa*(-parseInt(_0x5c6475(0x1ad))/0xb);if(_0x1ccdc5===_0x52f95a)break;else _0x3c5150['push'](_0x3c5150['shift']());}catch(_0x25dc1e){_0x3c5150['push'](_0x3c5150['shift']());}}}(_0x1de3,0x6851e));import{isSessionEnabled,recordEnabledSessionCleared}from'../utils/sessionCache.js';function _0x32d4(_0x4e2f29,_0x19a812){_0x4e2f29=_0x4e2f29-0x19f;const _0x1de367=_0x1de3();let _0x32d4fe=_0x1de367[_0x4e2f29];return _0x32d4fe;}import{readHookInput}from'./output.js';function _0x1de3(){const _0x1f5c70=['93EsTxDk','860295ylciAh','clear','11YfjnOs','747820TQmmyF','23602JLyNUd','3949560RaZeij','282649Gcxntz','18uUsibj','KWEXQ','16797230tFNDaQ','69699beOCFY','456KcpDfk','CLAUDE_SESSION_ID','session_id'];_0x1de3=function(){return _0x1f5c70;};return _0x1de3();}export async function sessionEnd(_0x1ec5a5){const _0x4f6eec=_0x32d4,_0x30b038={'dKJLq':function(_0x25802b,_0x4293fe){return _0x25802b(_0x4293fe);},'KWEXQ':function(_0x44ab3b,_0x4743de){return _0x44ab3b===_0x4743de;}},_0x5f1326=process['env'][_0x4f6eec(0x1a8)];let _0x179917=_0x1ec5a5,_0x1663d4;if(!_0x1ec5a5){if(_0x5f1326&&!_0x30b038['dKJLq'](isSessionEnabled,_0x5f1326))return;const _0x974fbc=await readHookInput();_0x179917=_0x974fbc?.[_0x4f6eec(0x1a9)]||_0x5f1326,_0x1663d4=_0x974fbc?.['reason'];}if(!_0x179917)return;_0x30b038[_0x4f6eec(0x1a4)](_0x1663d4,_0x4f6eec(0x1ac))&&_0x30b038['dKJLq'](recordEnabledSessionCleared,_0x179917);}
1
+ (function(_0x1d34da,_0x51d73a){const _0x41cde1=_0x9e06,_0xf4207a=_0x1d34da();while(!![]){try{const _0x4f4bc1=-parseInt(_0x41cde1(0x1b5))/0x1*(parseInt(_0x41cde1(0x1bb))/0x2)+-parseInt(_0x41cde1(0x1b7))/0x3+-parseInt(_0x41cde1(0x1b6))/0x4*(-parseInt(_0x41cde1(0x1bf))/0x5)+parseInt(_0x41cde1(0x1b1))/0x6*(parseInt(_0x41cde1(0x1bc))/0x7)+parseInt(_0x41cde1(0x1b2))/0x8+-parseInt(_0x41cde1(0x1b9))/0x9+-parseInt(_0x41cde1(0x1b3))/0xa*(-parseInt(_0x41cde1(0x1be))/0xb);if(_0x4f4bc1===_0x51d73a)break;else _0xf4207a['push'](_0xf4207a['shift']());}catch(_0x25e857){_0xf4207a['push'](_0xf4207a['shift']());}}}(_0x1827,0x5a550));import{isSessionEnabled,recordEnabledSessionCleared}from'../utils/sessionCache.js';function _0x9e06(_0x43d5bc,_0x1aa252){_0x43d5bc=_0x43d5bc-0x1b1;const _0x18273f=_0x1827();let _0x9e0650=_0x18273f[_0x43d5bc];return _0x9e0650;}import{readHookInput}from'./output.js';export async function sessionEnd(_0x9cce96){const _0x45f2dc=_0x9e06,_0x3f24c4={'CcKby':function(_0x48f500,_0x31bdcf){return _0x48f500(_0x31bdcf);},'jPbzX':function(_0x43f3a8){return _0x43f3a8();}},_0x52a98c=process['env']['CLAUDE_SESSION_ID'];let _0x37d6e9=_0x9cce96,_0x286238;if(!_0x9cce96){if(_0x52a98c&&!_0x3f24c4['CcKby'](isSessionEnabled,_0x52a98c))return;const _0x43aae0=await _0x3f24c4[_0x45f2dc(0x1bd)](readHookInput);_0x37d6e9=_0x43aae0?.[_0x45f2dc(0x1b4)]||_0x52a98c,_0x286238=_0x43aae0?.[_0x45f2dc(0x1b8)];}if(!_0x37d6e9)return;_0x286238===_0x45f2dc(0x1ba)&&recordEnabledSessionCleared(_0x37d6e9);}function _0x1827(){const _0x2022bf=['385dpDZim','865tTVEBJ','1938YcrNdU','1403016eKTMcn','408010OMFTFV','session_id','21274MMXgBl','6476vCOEAx','1777629ogGmnV','reason','4599081VDqZYj','clear','56iaJPUv','4025VhdRPU','jPbzX'];_0x1827=function(){return _0x2022bf;};return _0x1827();}
@@ -1 +1 @@
1
- const _0x18aef3=_0x5840;(function(_0x370a1f,_0x309dcd){const _0x3f2c74=_0x5840,_0x542277=_0x370a1f();while(!![]){try{const _0x3a4c54=-parseInt(_0x3f2c74(0x10c))/0x1+parseInt(_0x3f2c74(0x10b))/0x2+parseInt(_0x3f2c74(0x106))/0x3+-parseInt(_0x3f2c74(0x112))/0x4+parseInt(_0x3f2c74(0x100))/0x5*(parseInt(_0x3f2c74(0x10a))/0x6)+parseInt(_0x3f2c74(0x101))/0x7+parseInt(_0x3f2c74(0x113))/0x8*(-parseInt(_0x3f2c74(0x105))/0x9);if(_0x3a4c54===_0x309dcd)break;else _0x542277['push'](_0x542277['shift']());}catch(_0x4820fb){_0x542277['push'](_0x542277['shift']());}}}(_0x497e,0x9ba0b));import{appendFile}from'fs/promises';import{initBranchTracking,shouldAutoEnableAfterClear,autoEnableAfterClear,isSessionEnabled,getCurrentBranch}from'../utils/sessionCache.js';import{createTelemetryCollector}from'../utils/telemetry.js';import{getToken}from'../utils/keychain.js';function _0x5840(_0x35eb61,_0x49b749){_0x35eb61=_0x35eb61-0xfd;const _0x497eb6=_0x497e();let _0x584086=_0x497eb6[_0x35eb61];return _0x584086;}const RANGER_AUTO_ENABLED_PROMPT=_0x18aef3(0x104);export async function sessionStart(_0x17d62e){const _0x437d58=_0x18aef3,_0x47dc08={'pEhEY':'session_id','YWpSD':'source','gBWoW':function(_0x1e48bc,_0x461cfa){return _0x1e48bc&&_0x461cfa;},'OwlnR':function(_0x10e018,_0x17dcf1){return _0x10e018(_0x17dcf1);},'SBONB':_0x437d58(0x114),'MgLxj':function(_0x294ed3){return _0x294ed3();},'VVXyD':_0x437d58(0xfe),'ldNfG':_0x437d58(0xfd),'QGAhq':function(_0x97b742,_0x327423){return _0x97b742+_0x327423;}};let _0xf58a3c=_0x17d62e||'',_0xf846ad;if(!_0x17d62e){let _0x2abc3e='';for await(const _0x5e77b0 of process[_0x437d58(0x107)]){_0x2abc3e+=_0x5e77b0;}try{const _0x54c0cd=JSON['parse'](_0x2abc3e);_0xf58a3c=_0x54c0cd[_0x47dc08[_0x437d58(0x102)]]||'',_0xf846ad=_0x54c0cd[_0x47dc08[_0x437d58(0x103)]];}catch{}const _0x57981c=process['env'][_0x437d58(0x10d)];if(_0x47dc08['gBWoW'](_0x57981c,_0xf58a3c))try{await appendFile(_0x57981c,_0x437d58(0x10e)+_0xf58a3c+'\x22\x0a');}catch{}}try{await getToken();}catch{}if(_0xf58a3c){shouldAutoEnableAfterClear(_0xf846ad)&&autoEnableAfterClear(_0xf58a3c);initBranchTracking(_0xf58a3c);const _0xcba818=isSessionEnabled(_0xf58a3c);try{const _0x583c55=_0x47dc08[_0x437d58(0x109)](createTelemetryCollector,_0x47dc08['SBONB']);await _0x583c55['trackCommandStart']({'sessionId':_0xf58a3c,'hooksEnabled':_0xcba818}),await _0x583c55['trackCommandEnd']('success');}catch{}if(_0xcba818){const _0x56c4a4=_0x47dc08['MgLxj'](getCurrentBranch),_0x436d2b=_0x56c4a4&&_0x56c4a4!==_0x437d58(0x10f)&&_0x56c4a4!==_0x47dc08[_0x437d58(0x108)]?'\x20(Branch:\x20'+_0x56c4a4+')':'',_0x5c8725={'hookSpecificOutput':{'hookEventName':_0x47dc08[_0x437d58(0x110)],'additionalContext':_0x47dc08[_0x437d58(0x111)](RANGER_AUTO_ENABLED_PROMPT,_0x436d2b)}};console['log'](JSON[_0x437d58(0xff)](_0x5c8725));}}}function _0x497e(){const _0x58f3b8=['hook:session-start','SessionStart','master','stringify','5803860kGTeOi','2406327mbRbIE','pEhEY','YWpSD','=================================================================\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20🚨\x20RANGER\x20IS\x20ACTIVE\x20🚨\x0a=================================================================\x0a\x0aThis\x20session\x20has\x20Ranger\x20ENABLED.\x20Before\x20doing\x20ANYTHING\x20else:\x0a\x0a1.\x20**READ\x20the\x20/ranger\x20skill\x20FIRST**\x20-\x20Run\x20the\x20skill\x20to\x20understand\x20the\x20required\x20workflow\x20for\x20UI\x20features\x0a\x0a2.\x20**Check\x20for\x20existing\x20feature\x20reviews**\x20-\x20Run\x20`ranger\x20list`\x20to\x20see\x20if\x20there\x27s\x20an\x20in-progress\x20feature\x20review\x20to\x20resume\x0a\x0a3.\x20**For\x20ANY\x20UI\x20work**:\x20You\x20MUST\x20either:\x0a\x20\x20\x20-\x20Resume\x20an\x20existing\x20feature\x20review:\x20`ranger\x20resume\x20<id>`\x0a\x20\x20\x20-\x20Create\x20a\x20new\x20feature\x20review:\x20`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<scenario>\x22`\x0a\x0a4.\x20**If\x20resuming\x20a\x20feature\x20review\x20with\x20reviewer\x20comments**:\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20reviewers\x20want\x20fixed\x20before\x20making\x20code\x20changes\x0a\x0a=================================================================','369801VlseTO','2536617syHlia','stdin','VVXyD','OwlnR','6XuvYfE','1304540clmxeG','1160919IezGGx','CLAUDE_ENV_FILE','export\x20CLAUDE_SESSION_ID=\x22','main','ldNfG','QGAhq','2186192DGnIXB','128HSmRVh'];_0x497e=function(){return _0x58f3b8;};return _0x497e();}
1
+ (function(_0x4623e0,_0x6ca763){const _0x4a1ab4=_0x3988,_0x5eee10=_0x4623e0();while(!![]){try{const _0x31d389=parseInt(_0x4a1ab4(0x1d4))/0x1+parseInt(_0x4a1ab4(0x1ca))/0x2*(parseInt(_0x4a1ab4(0x1cd))/0x3)+-parseInt(_0x4a1ab4(0x1c8))/0x4*(parseInt(_0x4a1ab4(0x1c0))/0x5)+parseInt(_0x4a1ab4(0x1ce))/0x6+-parseInt(_0x4a1ab4(0x1c3))/0x7*(parseInt(_0x4a1ab4(0x1c9))/0x8)+-parseInt(_0x4a1ab4(0x1cc))/0x9*(parseInt(_0x4a1ab4(0x1c6))/0xa)+parseInt(_0x4a1ab4(0x1c1))/0xb;if(_0x31d389===_0x6ca763)break;else _0x5eee10['push'](_0x5eee10['shift']());}catch(_0x300e81){_0x5eee10['push'](_0x5eee10['shift']());}}}(_0x3d00,0x869be));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='=================================================================\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=================================================================';function _0x3988(_0x20a945,_0x4f89c0){_0x20a945=_0x20a945-0x1c0;const _0x3d000e=_0x3d00();let _0x398893=_0x3d000e[_0x20a945];return _0x398893;}function _0x3d00(){const _0x1eb59e=['3507449eFKqJc','VQuIM','133oVmoOo','EkZoW','session_id','870LQfgkK','trackCommandEnd','577844ZmJoqd','142376PDDHVI','98qiwDmy','rowsb','26838htAqkn','18783Lmebje','2702916TzOSHs','CLAUDE_ENV_FILE','trackCommandStart','TOdrJ','main','hook:session-start','361723gTdfer','10GhFYRr'];_0x3d00=function(){return _0x1eb59e;};return _0x3d00();}export async function sessionStart(_0x3a3f4b){const _0x588d79=_0x3988,_0x31af17={'VQuIM':function(_0x4aecc7,_0x3edcfb){return _0x4aecc7||_0x3edcfb;},'LvQoS':function(_0x1644c8,_0x33b9b1){return _0x1644c8&&_0x33b9b1;},'ZPBdy':function(_0x3b310c,_0x19f56f,_0x13ce00){return _0x3b310c(_0x19f56f,_0x13ce00);},'XNodR':function(_0x5297e1){return _0x5297e1();},'EkZoW':function(_0x1ba275,_0x599ee3){return _0x1ba275(_0x599ee3);},'tpXJH':_0x588d79(0x1d3),'TOdrJ':_0x588d79(0x1d2),'vmPQT':'master','rowsb':function(_0x3f1219,_0xa10be0){return _0x3f1219+_0xa10be0;}};let _0x4cd19b=_0x31af17[_0x588d79(0x1c2)](_0x3a3f4b,''),_0x1d451a;if(!_0x3a3f4b){let _0x433f2e='';for await(const _0x4f3cf8 of process['stdin']){_0x433f2e+=_0x4f3cf8;}try{const _0x15313d=JSON['parse'](_0x433f2e);_0x4cd19b=_0x15313d[_0x588d79(0x1c5)]||'',_0x1d451a=_0x15313d['source'];}catch{}const _0x57c51b=process['env'][_0x588d79(0x1cf)];if(_0x31af17['LvQoS'](_0x57c51b,_0x4cd19b))try{await _0x31af17['ZPBdy'](appendFile,_0x57c51b,'export\x20CLAUDE_SESSION_ID=\x22'+_0x4cd19b+'\x22\x0a');}catch{}}try{await _0x31af17['XNodR'](getToken);}catch{}if(_0x4cd19b){_0x31af17[_0x588d79(0x1c4)](shouldAutoEnableAfterClear,_0x1d451a)&&autoEnableAfterClear(_0x4cd19b);initBranchTracking(_0x4cd19b);const _0x461cce=_0x31af17['EkZoW'](isSessionEnabled,_0x4cd19b);try{const _0x31fa5c=createTelemetryCollector(_0x31af17['tpXJH']);await _0x31fa5c[_0x588d79(0x1d0)]({'sessionId':_0x4cd19b,'hooksEnabled':_0x461cce}),await _0x31fa5c[_0x588d79(0x1c7)]('success');}catch{}if(_0x461cce){const _0x2bec7a=getCurrentBranch(),_0x59aa49=_0x2bec7a&&_0x2bec7a!==_0x31af17[_0x588d79(0x1d1)]&&_0x2bec7a!==_0x31af17['vmPQT']?'\x20(Branch:\x20'+_0x2bec7a+')':'',_0x3c7c0f={'hookSpecificOutput':{'hookEventName':'SessionStart','additionalContext':_0x31af17[_0x588d79(0x1cb)](RANGER_AUTO_ENABLED_PROMPT,_0x59aa49)}};console['log'](JSON['stringify'](_0x3c7c0f));}}}
@@ -1 +1 @@
1
- (function(_0x4388fc,_0x208706){const _0x433f89=_0x308d,_0x25d792=_0x4388fc();while(!![]){try{const _0x53c574=parseInt(_0x433f89(0xd2))/0x1*(parseInt(_0x433f89(0xdd))/0x2)+-parseInt(_0x433f89(0xca))/0x3+parseInt(_0x433f89(0xda))/0x4+-parseInt(_0x433f89(0xc9))/0x5+parseInt(_0x433f89(0xde))/0x6+-parseInt(_0x433f89(0xcc))/0x7+-parseInt(_0x433f89(0xce))/0x8;if(_0x53c574===_0x208706)break;else _0x25d792['push'](_0x25d792['shift']());}catch(_0x2f8d14){_0x25d792['push'](_0x25d792['shift']());}}}(_0x236b,0xaede0));import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';import{getSessionEntry,shouldShowStopReminder}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0xf8d321){const _0x325467=_0x308d,_0x2676e3={'LFoAQ':function(_0xc30d8a,_0x16f3dc,_0x3ee558,_0x2ef2b9){return _0xc30d8a(_0x16f3dc,_0x3ee558,_0x2ef2b9);},'bqPad':function(_0xb00025){return _0xb00025();},'cElvK':function(_0x8d7a47,_0x1afce1){return _0x8d7a47&&_0x1afce1;},'VcdXV':function(_0x397574,_0x4c2395,_0x1a6b07,_0x26c721){return _0x397574(_0x4c2395,_0x1a6b07,_0x26c721);}},_0x48ad9b=await getEnabledHookContext(_0xf8d321),_0x50bbbe=_0x48ad9b?.['sessionId']??null;let _0x232998=!![];if(!_0x50bbbe){await _0x2676e3['LFoAQ'](trackStop,_0x50bbbe,![],_0x232998);return;}try{const _0x104283=getSessionEntry(_0x50bbbe);if(!_0x104283){await trackStop(_0x50bbbe,!![],_0x232998);return;}const _0x2cf525=await _0x2676e3['bqPad'](getToken),_0x5755b0=_0x325467(0xd4)+_0x104283['featureId'];let _0x50b6e6=null,_0x59d996=![],_0x171f0e=![];if(_0x2cf525)try{const _0x85caae=await getFeature(_0x104283[_0x325467(0xcd)]);_0x50b6e6=_0x85caae['currentSessionId']??null;const _0x345019=_0x85caae[_0x325467(0xdc)]['filter'](_0x4943fa=>_0x4943fa['sessionId']===_0x50b6e6);_0x59d996=_0x345019[_0x325467(0xd8)](_0x4e350e=>_0x4e350e[_0x325467(0xd5)]!=='verified'&&_0x4e350e['status']!==_0x325467(0xd7)&&_0x4e350e[_0x325467(0xd5)]!=='closed'&&_0x4e350e['status']!=='incomplete'),_0x171f0e=_0x345019[_0x325467(0xd8)](_0x41cdcd=>_0x41cdcd[_0x325467(0xd5)]==='verification_in_progress');}catch{}if(_0x2676e3[_0x325467(0xd0)](_0x2cf525,_0x50b6e6)&&_0x59d996){if(!_0x171f0e&&shouldShowStopReminder(_0x50bbbe)){const _0x231304={'hookSpecificOutput':{'hookEventName':_0x325467(0xd3),'additionalContext':_0x325467(0xd1)+_0x5755b0}};console[_0x325467(0xc8)](JSON[_0x325467(0xcb)](_0x231304));}}if(_0x2cf525&&_0x50b6e6&&!_0x59d996)try{await concludeSession(_0x104283['featureId'],_0x50b6e6);}catch{}await _0x2676e3[_0x325467(0xd9)](trackStop,_0x50bbbe,!![],_0x232998);return;}catch{await trackStop(_0x50bbbe,!![],_0x232998);return;}}function _0x308d(_0xe6830,_0x3492c3){_0xe6830=_0xe6830-0xc8;const _0x236bf0=_0x236b();let _0x308dc6=_0x236bf0[_0xe6830];return _0x308dc6;}async function trackStop(_0x23d4b9,_0x446a2c,_0x4ff6f8){const _0xe71b37=_0x308d;try{const _0x2629be=createTelemetryCollector(_0xe71b37(0xd6));await _0x2629be['trackCommandStart']({'sessionId':_0x23d4b9??undefined,'hooksEnabled':_0x446a2c,'stopAllowed':_0x4ff6f8}),await _0x2629be[_0xe71b37(0xcf)](_0xe71b37(0xdb));}catch{}}function _0x236b(){const _0x4a80cc=['status','hook:stop','blocked','some','VcdXV','4781372SCAtPA','success','checklistItems','2TFdhxm','2906592zXfwrr','log','133975fAQYuf','211959UXCVLI','stringify','7695576pblqRR','featureId','1389264uybPRB','trackCommandEnd','cElvK','RANGER:\x20The\x20active\x20feature\x20review\x20still\x20has\x20unfinished\x20checklist\x20items.\x20Before\x20responding\x20to\x20the\x20user,\x20if\x20this\x20UI\x20work\x20is\x20ready,\x20run\x20`ranger\x20show`\x20and\x20then\x20`ranger\x20go`\x20for\x20the\x20relevant\x20scenario(s).\x20If\x20it\x20is\x20not\x20ready\x20for\x20browser\x20verification\x20yet,\x20continue\x20implementing.\x20Dashboard:\x20','406955cPiwOl','Stop','https://dashboard.ranger.net/features/'];_0x236b=function(){return _0x4a80cc;};return _0x236b();}
1
+ (function(_0x4344dd,_0x544b9b){const _0x156bc5=_0x1613,_0x2d37ba=_0x4344dd();while(!![]){try{const _0x2d73b0=parseInt(_0x156bc5(0x1e3))/0x1*(parseInt(_0x156bc5(0x1d6))/0x2)+parseInt(_0x156bc5(0x1e6))/0x3+-parseInt(_0x156bc5(0x1df))/0x4+-parseInt(_0x156bc5(0x1d9))/0x5*(-parseInt(_0x156bc5(0x1e8))/0x6)+parseInt(_0x156bc5(0x1e7))/0x7+parseInt(_0x156bc5(0x1da))/0x8+-parseInt(_0x156bc5(0x1d5))/0x9;if(_0x2d73b0===_0x544b9b)break;else _0x2d37ba['push'](_0x2d37ba['shift']());}catch(_0x492add){_0x2d37ba['push'](_0x2d37ba['shift']());}}}(_0x43ad,0x6919f));function _0x1613(_0x329cf3,_0x1c4a7f){_0x329cf3=_0x329cf3-0x1d5;const _0x43ad43=_0x43ad();let _0x1613da=_0x43ad43[_0x329cf3];return _0x1613da;}import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';function _0x43ad(){const _0xed12de=['KJbfE','305NTFfbT','2679632ADKCSQ','hook:stop','some','checklistItems','YWhmI','3224656JhKqjp','sessionId','featureId','closed','449DwPifr','success','blocked','2195418UZplak','813204OosCwo','3144SSirpF','xYPbv','wRWLG','stringify','4758399DgIlpI','2452HPBDjP','Stop'];_0x43ad=function(){return _0xed12de;};return _0x43ad();}import{getSessionEntry,shouldShowStopReminder}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0x339db2){const _0x4c1355=_0x1613,_0xcbbee9={'YWhmI':function(_0xa9b794,_0x7a9133){return _0xa9b794(_0x7a9133);},'wRWLG':function(_0x48dd0e,_0x4376df,_0x3c66bd,_0x1346c6){return _0x48dd0e(_0x4376df,_0x3c66bd,_0x1346c6);},'IogaB':function(_0x582d15,_0x51670e,_0x425b7b,_0x320948){return _0x582d15(_0x51670e,_0x425b7b,_0x320948);},'KJbfE':function(_0x3f8bce,_0x3e4e5c){return _0x3f8bce(_0x3e4e5c);},'xYPbv':function(_0x4599a0,_0x442a66,_0x1f5c1a){return _0x4599a0(_0x442a66,_0x1f5c1a);}},_0x19a5e9=await _0xcbbee9[_0x4c1355(0x1de)](getEnabledHookContext,_0x339db2),_0x9cf049=_0x19a5e9?.[_0x4c1355(0x1e0)]??null;let _0x15df5b=!![];if(!_0x9cf049){await _0xcbbee9[_0x4c1355(0x1ea)](trackStop,_0x9cf049,![],_0x15df5b);return;}try{const _0x396deb=_0xcbbee9[_0x4c1355(0x1de)](getSessionEntry,_0x9cf049);if(!_0x396deb){await _0xcbbee9['IogaB'](trackStop,_0x9cf049,!![],_0x15df5b);return;}const _0xb5a83a=await getToken(),_0x4071c1='https://dashboard.ranger.net/features/'+_0x396deb['featureId'];let _0x4e8730=null,_0x354a13=![],_0x4763fe=![];if(_0xb5a83a)try{const _0x44af51=await _0xcbbee9[_0x4c1355(0x1d8)](getFeature,_0x396deb['featureId']);_0x4e8730=_0x44af51['currentSessionId']??null;const _0x261e2b=_0x44af51[_0x4c1355(0x1dd)]['filter'](_0x1a3385=>_0x1a3385[_0x4c1355(0x1e0)]===_0x4e8730);_0x354a13=_0x261e2b[_0x4c1355(0x1dc)](_0x4032fe=>_0x4032fe['status']!=='verified'&&_0x4032fe['status']!==_0x4c1355(0x1e5)&&_0x4032fe['status']!==_0x4c1355(0x1e2)&&_0x4032fe['status']!=='incomplete'),_0x4763fe=_0x261e2b['some'](_0x48e03d=>_0x48e03d['status']==='verification_in_progress');}catch{}if(_0xb5a83a&&_0x4e8730&&_0x354a13){if(!_0x4763fe&&shouldShowStopReminder(_0x9cf049)){const _0x4748e2={'hookSpecificOutput':{'hookEventName':_0x4c1355(0x1d7),'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'+_0x4071c1}};console['log'](JSON[_0x4c1355(0x1eb)](_0x4748e2));}}if(_0xb5a83a&&_0x4e8730&&!_0x354a13)try{await _0xcbbee9[_0x4c1355(0x1e9)](concludeSession,_0x396deb[_0x4c1355(0x1e1)],_0x4e8730);}catch{}await _0xcbbee9[_0x4c1355(0x1ea)](trackStop,_0x9cf049,!![],_0x15df5b);return;}catch{await trackStop(_0x9cf049,!![],_0x15df5b);return;}}async function trackStop(_0x38cb34,_0x3dd6c7,_0x780dbf){const _0x590c42=_0x1613,_0x2adfb9={'gizus':_0x590c42(0x1db)};try{const _0x32122=createTelemetryCollector(_0x2adfb9['gizus']);await _0x32122['trackCommandStart']({'sessionId':_0x38cb34??undefined,'hooksEnabled':_0x3dd6c7,'stopAllowed':_0x780dbf}),await _0x32122['trackCommandEnd'](_0x590c42(0x1e4));}catch{}}
@@ -1 +1 @@
1
- (function(_0x4647aa,_0x46320d){var _0x28e5f0=_0x18a2,_0x2fe4fc=_0x4647aa();while(!![]){try{var _0x5341b0=-parseInt(_0x28e5f0(0x120))/0x1*(-parseInt(_0x28e5f0(0x122))/0x2)+-parseInt(_0x28e5f0(0x129))/0x3*(-parseInt(_0x28e5f0(0x121))/0x4)+parseInt(_0x28e5f0(0x127))/0x5+-parseInt(_0x28e5f0(0x128))/0x6+parseInt(_0x28e5f0(0x11f))/0x7*(-parseInt(_0x28e5f0(0x125))/0x8)+-parseInt(_0x28e5f0(0x124))/0x9*(-parseInt(_0x28e5f0(0x12a))/0xa)+parseInt(_0x28e5f0(0x123))/0xb*(-parseInt(_0x28e5f0(0x126))/0xc);if(_0x5341b0===_0x46320d)break;else _0x2fe4fc['push'](_0x2fe4fc['shift']());}catch(_0x1a9991){_0x2fe4fc['push'](_0x2fe4fc['shift']());}}}(_0xea53,0x72cea));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';function _0xea53(){var _0x80d9d6=['487643LBKOKJ','152976iTnJMh','2YpRGDy','22uNvdtM','259902SDIeGG','97784nOVNig','2951712VBgjov','2097945ixxUGJ','90546EEQQrN','3EmIuVm','320btRfLP','511fpJZFJ'];_0xea53=function(){return _0x80d9d6;};return _0xea53();}export{start,ensureLocalEnv,ensureChromium,authenticate}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';function _0x18a2(_0x554389,_0x43b4bb){_0x554389=_0x554389-0x11f;var _0xea532d=_0xea53();var _0x18a2e9=_0xea532d[_0x554389];return _0x18a2e9;}export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
1
+ (function(_0x31f91a,_0x44b88c){var _0x21d6e7=_0x2a96,_0x21d46d=_0x31f91a();while(!![]){try{var _0x3d3eff=-parseInt(_0x21d6e7(0x164))/0x1*(parseInt(_0x21d6e7(0x160))/0x2)+-parseInt(_0x21d6e7(0x15f))/0x3*(parseInt(_0x21d6e7(0x161))/0x4)+-parseInt(_0x21d6e7(0x163))/0x5*(-parseInt(_0x21d6e7(0x162))/0x6)+parseInt(_0x21d6e7(0x168))/0x7+-parseInt(_0x21d6e7(0x166))/0x8*(-parseInt(_0x21d6e7(0x167))/0x9)+parseInt(_0x21d6e7(0x169))/0xa+-parseInt(_0x21d6e7(0x165))/0xb;if(_0x3d3eff===_0x44b88c)break;else _0x21d46d['push'](_0x21d46d['shift']());}catch(_0x52b052){_0x21d46d['push'](_0x21d46d['shift']());}}}(_0x1c44,0xee0f6));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 _0x2a96(_0x5edc41,_0x3788b1){_0x5edc41=_0x5edc41-0x15f;var _0x1c44c3=_0x1c44();var _0x2a9670=_0x1c44c3[_0x5edc41];return _0x2a9670;}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';function _0x1c44(){var _0x1c5afd=['13583255YKPnKt','2340160qTQTUq','9xpxjTJ','330406xybIFh','174636kbXPxq','326778bRGdSf','75PuGCTq','8moqsYE','25473998RAeVlZ','3912scJgoE','32247pnVEoT'];_0x1c44=function(){return _0x1c5afd;};return _0x1c44();}
@@ -1 +1 @@
1
- (function(_0x3ba880,_0x34be7e){const _0xea963f=_0x8c3f,_0x2b31ec=_0x3ba880();while(!![]){try{const _0x5a57e4=-parseInt(_0xea963f(0xde))/0x1*(parseInt(_0xea963f(0xd3))/0x2)+parseInt(_0xea963f(0xcc))/0x3+parseInt(_0xea963f(0xcf))/0x4*(parseInt(_0xea963f(0xce))/0x5)+parseInt(_0xea963f(0xd7))/0x6*(parseInt(_0xea963f(0xc8))/0x7)+-parseInt(_0xea963f(0xd4))/0x8*(-parseInt(_0xea963f(0xd1))/0x9)+parseInt(_0xea963f(0xca))/0xa+parseInt(_0xea963f(0xd6))/0xb*(-parseInt(_0xea963f(0xd5))/0xc);if(_0x5a57e4===_0x34be7e)break;else _0x2b31ec['push'](_0x2b31ec['shift']());}catch(_0x2ab036){_0x2b31ec['push'](_0x2b31ec['shift']());}}}(_0x54c8,0x86b92));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';function _0x54c8(){const _0x1768c1=['59656BumdHi','159756uZQsGR','1925GDjiHQ','30WRSvEQ','log','stdin','isTTY','\x0a✅\x20API\x20key\x20stored\x20successfully','user','lgewF','2DMPuCu','success','1047361tqByCN','wwLda','7617440FOnIKc','organizationName','2202423dhweap','veFEw','144895OnuEEO','72CQtwek','Login\x20failed:\x20','207GjpAzY','stdout','55532cijiGH'];_0x54c8=function(){return _0x1768c1;};return _0x54c8();}function _0x8c3f(_0xcadbc4,_0x4aadc5){_0xcadbc4=_0xcadbc4-0xc8;const _0x54c8a0=_0x54c8();let _0x8c3f43=_0x54c8a0[_0xcadbc4];return _0x8c3f43;}export async function login(){const _0x39a6d2=_0x8c3f,_0x96d526={'sHoQs':'Re-authenticating\x20via\x20MCP\x20bootstrap...','wwLda':function(_0x32552e){return _0x32552e();},'AXDoP':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','lgewF':function(_0xf700e5,_0x164590){return _0xf700e5(_0x164590);},'veFEw':function(_0x23c0f5,_0x50fb59){return _0x23c0f5 instanceof _0x50fb59;}},_0x5a0019=await getMcpAuthOrigin();if(_0x5a0019){console[_0x39a6d2(0xd8)](_0x96d526['sHoQs']),await _0x96d526[_0x39a6d2(0xc9)](mcpBootstrap);return;}const _0x372bd3=process[_0x39a6d2(0xd9)][_0x39a6d2(0xda)]&&process[_0x39a6d2(0xd2)][_0x39a6d2(0xda)];if(!_0x372bd3)throw new Error(_0x96d526['AXDoP']);try{const _0x400d83=await runDeviceAuthFlow(),_0x2760a7=await _0x96d526[_0x39a6d2(0xdd)](getCurrentUser,_0x400d83);_0x2760a7[_0x39a6d2(0xdf)]?console[_0x39a6d2(0xd8)]('\x0a✅\x20Logged\x20in\x20to\x20'+_0x2760a7[_0x39a6d2(0xdc)][_0x39a6d2(0xcb)]):console['log'](_0x39a6d2(0xdb));}catch(_0x99b682){throw new Error(_0x39a6d2(0xd0)+(_0x96d526[_0x39a6d2(0xcd)](_0x99b682,Error)?_0x99b682['message']:_0x99b682));}}
1
+ function _0x4fdc(_0x568f1d,_0x215ea7){_0x568f1d=_0x568f1d-0x90;const _0x4b2e29=_0x4b2e();let _0x4fdccf=_0x4b2e29[_0x568f1d];return _0x4fdccf;}(function(_0x327953,_0x3f42b0){const _0x2019a7=_0x4fdc,_0x182022=_0x327953();while(!![]){try{const _0x262196=parseInt(_0x2019a7(0x96))/0x1*(-parseInt(_0x2019a7(0xa0))/0x2)+-parseInt(_0x2019a7(0x9e))/0x3+-parseInt(_0x2019a7(0x95))/0x4+-parseInt(_0x2019a7(0x90))/0x5+parseInt(_0x2019a7(0x9b))/0x6+parseInt(_0x2019a7(0x99))/0x7*(-parseInt(_0x2019a7(0x9d))/0x8)+-parseInt(_0x2019a7(0x9f))/0x9*(-parseInt(_0x2019a7(0x9c))/0xa);if(_0x262196===_0x3f42b0)break;else _0x182022['push'](_0x182022['shift']());}catch(_0x3ad43c){_0x182022['push'](_0x182022['shift']());}}}(_0x4b2e,0x4cf8f));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x4b2e(){const _0x5673ad=['1256703UvfBRW','27hvpFrE','2LzJLEz','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','1372420vUgAnt','isTTY','log','user','message','1700172YHHjEd','481647Eiijuv','\x0a✅\x20API\x20key\x20stored\x20successfully','Re-authenticating\x20via\x20MCP\x20bootstrap...','38829ykejxb','stdout','2430024Dtksdv','5052990xWVzLN','8bAYAbB'];_0x4b2e=function(){return _0x5673ad;};return _0x4b2e();}import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';export async function login(){const _0x5c4467=_0x4fdc,_0x241b43={'DMwul':_0x5c4467(0xa1)},_0x493209=await getMcpAuthOrigin();if(_0x493209){console[_0x5c4467(0x92)](_0x5c4467(0x98)),await mcpBootstrap();return;}const _0x2b9b39=process['stdin'][_0x5c4467(0x91)]&&process[_0x5c4467(0x9a)][_0x5c4467(0x91)];if(!_0x2b9b39)throw new Error(_0x241b43['DMwul']);try{const _0x3b43f7=await runDeviceAuthFlow(),_0x5870f3=await getCurrentUser(_0x3b43f7);_0x5870f3['success']?console[_0x5c4467(0x92)]('\x0a✅\x20Logged\x20in\x20to\x20'+_0x5870f3[_0x5c4467(0x93)]['organizationName']):console['log'](_0x5c4467(0x97));}catch(_0x18a785){throw new Error('Login\x20failed:\x20'+(_0x18a785 instanceof Error?_0x18a785[_0x5c4467(0x94)]:_0x18a785));}}
@@ -1 +1 @@
1
- function _0x37e1(_0x468dcd,_0x5ab2a6){_0x468dcd=_0x468dcd-0x17a;const _0x1eb9ce=_0x1eb9();let _0x37e12f=_0x1eb9ce[_0x468dcd];return _0x37e12f;}const _0x46302a=_0x37e1;(function(_0x173148,_0x34d147){const _0x485fb5=_0x37e1,_0x2712bd=_0x173148();while(!![]){try{const _0x33d14b=parseInt(_0x485fb5(0x1a0))/0x1*(parseInt(_0x485fb5(0x19e))/0x2)+parseInt(_0x485fb5(0x1c3))/0x3+-parseInt(_0x485fb5(0x1f1))/0x4*(-parseInt(_0x485fb5(0x1ab))/0x5)+parseInt(_0x485fb5(0x1eb))/0x6*(parseInt(_0x485fb5(0x17b))/0x7)+-parseInt(_0x485fb5(0x1b5))/0x8*(parseInt(_0x485fb5(0x1db))/0x9)+parseInt(_0x485fb5(0x1ca))/0xa*(-parseInt(_0x485fb5(0x1bd))/0xb)+-parseInt(_0x485fb5(0x1fe))/0xc;if(_0x33d14b===_0x34d147)break;else _0x2712bd['push'](_0x2712bd['shift']());}catch(_0x152728){_0x2712bd['push'](_0x2712bd['shift']());}}}(_0x1eb9,0x241ab));function _0x1eb9(){const _0x1b5e3e=['FZSfN','access_token','authorization_code','parse','1785179QSaBKn','sFKBF','listen','iGBeL','UfSSy','MCP\x20server\x20returned\x20HTTP\x20','315975wgOPrj','jLtzt','child_process','uGBUu','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','KDfcL','yvIBA','10EWqNBT','registration_endpoint','state','<html><body><h2>Authentication\x20failed</h2><p>','omFyQ','bwgKK','text','now','set','eKKgg','VLRlS','EbwxF','error','url','stringify','text/html','bGlDr','10845kicmMA','code_challenge','get','resource','darwin','POST','writeHead','refreshToken','HTTP\x20','auth-origin.txt','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','application/json,\x20text/event-stream','json','lnJrx','RuDTP','headers','887562ontATy','close','IHGZL','2025-03-26','Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','aaBWJ','4RUAhXD','Bxmel','zxksB','NbBBx','pathname','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','searchParams','open','SLjKr','stdout','OAuthTimeoutError','Authorization','needs-oauth','3281556GeWpXr','ZpEFx','vhmXX','clientId','string','content','Requesting\x20CLI\x20token...','1.0.0','authorization_endpoint','toString','AdJhO','Not\x20found','iZxnQ','response_type','Ranger\x20CLI','origin','wHGdm','QmHuN','match','/.well-known/oauth-authorization-server','zNgcK','mpLlz','kAOMG','7YwlRAU','includes','CKXnP','type','/callback','digest','haFjz','text/event-stream','authorization_servers','clientSecret','eUCRz','S256','end','DwBhf','\x20done','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','log','tdlpd','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','expires_in','<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','token','start','cSsZn','qdArK','accessToken','dpjHy','isTTY','application/x-www-form-urlencoded','EpTdI','pYwXj','WCkzF','dHrED','.ranger','ranger-cli','32iZvatW','2.0','7246kWcKDg','expiresAt','jHXzU','code_challenge_method','refresh_token','leklG','nUqhv','code','ScXpa','message','update','1409635bQyuxv','http://localhost:','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','EyMhf','win32','cxNtZ','gnqYX','status','akIhe','/.well-known/oauth-protected-resource','448haYjHK','application/json','WUXot','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response'];_0x1eb9=function(){return _0x1b5e3e;};return _0x1eb9();}import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createServer}from'http';import{randomBytes,createHash}from'crypto';import{getMcpAuthUrl}from'./utils/environment.js';const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),_0x46302a(0x19c),'mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),'.ranger',_0x46302a(0x1e4));export async function getMcpAuthOrigin(){const _0x592c42=_0x46302a,_0x7e79ef={'irGnz':function(_0x4a3b72,_0x36eeb3,_0x526b75){return _0x4a3b72(_0x36eeb3,_0x526b75);},'rRsiS':'utf-8','WCkzF':function(_0x44f8a3,_0x39d462){return _0x44f8a3||_0x39d462;}};try{const _0x401540=(await _0x7e79ef['irGnz'](readFile,AUTH_ORIGIN_PATH,_0x7e79ef['rRsiS']))['trim']();return _0x7e79ef[_0x592c42(0x19a)](_0x401540,null);}catch{return null;}}export async function mcpBootstrap(){const _0x4ccac6=_0x46302a,_0x527473={'bGlDr':function(_0x9bbfa4){return _0x9bbfa4();},'rYYRE':function(_0x1ab796,_0x36ddde){return _0x1ab796(_0x36ddde);},'RuDTP':'proxied','SLpca':function(_0x35cfea,_0x3bbd5f){return _0x35cfea+_0x3bbd5f;},'SLjKr':'MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','WUXot':_0x4ccac6(0x1ad)},_0x2a81dc=_0x527473[_0x4ccac6(0x1da)](getMcpAuthUrl);currentOrigin=_0x2a81dc;const _0x7f9be9=process['stdout'][_0x4ccac6(0x196)]??![];console['log'](_0x4ccac6(0x18d)+_0x2a81dc+'\x0a');const _0x1ac53f=await _0x527473['rYYRE'](tryUnauthenticated,_0x2a81dc);let _0x41024f=null;if(_0x1ac53f===_0x527473[_0x4ccac6(0x1e9)])_0x41024f='';else{_0x41024f=await loadCachedToken();if(!_0x41024f){if(!_0x7f9be9)throw new Error(_0x527473['SLpca'](_0x527473[_0x4ccac6(0x1f9)],_0x527473[_0x4ccac6(0x1b7)]));_0x41024f=await oauthFlow(_0x2a81dc);}}await callGetCliToken(_0x2a81dc,_0x41024f);}async function tryUnauthenticated(_0x25077){const _0x2177f8=_0x46302a,_0x1bbee2={'AdJhO':_0x2177f8(0x1e0),'exkWA':_0x2177f8(0x1b6),'ebSSt':'2.0','leklG':_0x2177f8(0x19d),'GRSCa':_0x2177f8(0x205),'iZxnQ':'proxied','akIhe':function(_0x516fa1,_0x36e48f){return _0x516fa1===_0x36e48f;}},_0x3fe59a=await fetch(_0x25077,{'method':_0x1bbee2[_0x2177f8(0x208)],'headers':{'Content-Type':_0x1bbee2['exkWA'],'Accept':_0x2177f8(0x1e6)},'body':JSON['stringify']({'jsonrpc':_0x1bbee2['ebSSt'],'id':0x1,'method':'initialize','params':{'protocolVersion':_0x2177f8(0x1ee),'capabilities':{},'clientInfo':{'name':_0x1bbee2[_0x2177f8(0x1a5)],'version':_0x1bbee2['GRSCa']}}})});if(_0x3fe59a['ok'])return await _0x3fe59a[_0x2177f8(0x1d0)](),_0x1bbee2[_0x2177f8(0x20a)];if(_0x1bbee2[_0x2177f8(0x1b3)](_0x3fe59a[_0x2177f8(0x1b2)],0x191))return await _0x3fe59a['text'](),_0x2177f8(0x1fd);const _0x39a34a=await _0x3fe59a[_0x2177f8(0x1d0)]();throw new Error(_0x2177f8(0x1c2)+_0x3fe59a['status']+':\x20'+_0x39a34a);}class OAuthTimeoutError extends Error{constructor(_0x23a8c5){const _0xdf5526=_0x46302a,_0x5e50d6={'NNdKJ':_0xdf5526(0x1fb)};super(_0x23a8c5),this['name']=_0x5e50d6['NNdKJ'];}}async function oauthFlow(_0x338e1e){const _0x27e007=_0x46302a,_0x3dbdaa={'jHXzU':function(_0x3c2723,_0x4f9fff){return _0x3c2723(_0x4f9fff);}};try{return await _0x3dbdaa[_0x27e007(0x1a2)](oauthFlowAttempt,_0x338e1e);}catch(_0x50429d){if(_0x50429d instanceof OAuthTimeoutError&&await loadCachedClient())return console[_0x27e007(0x18b)]('\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a'),await clearCachedClient(),await oauthFlowAttempt(_0x338e1e);throw _0x50429d;}}async function oauthFlowAttempt(_0x2fc1f0){const _0x11cb81=_0x46302a,_0x15ffdd={'CKXnP':_0x11cb81(0x1ef),'IHGZL':'Registering\x20OAuth\x20client...','mpLlz':function(_0x2152c3,_0x74bd36,_0x539958){return _0x2152c3(_0x74bd36,_0x539958);},'VqofJ':_0x11cb81(0x1e0),'dpjHy':_0x11cb81(0x1bb),'cSsZn':'none','EbwxF':_0x11cb81(0x1f6),'mtvno':function(_0x10f147,_0x22439b){return _0x10f147(_0x22439b);},'yxHzc':'base64url','gWpYG':'hex','yvIBA':'code','zxksB':'client_id','DSZsD':_0x11cb81(0x1a3),'VLRlS':_0x11cb81(0x186),'GQoyY':'Exchanging\x20authorization\x20code...'},_0x9e0e01=_0x2fc1f0['replace'](/\/mcp$/,'');process[_0x11cb81(0x1fa)]['write']('Discovering\x20authorization\x20server...');const _0x2ea4f4=await fetch(_0x9e0e01+_0x11cb81(0x1b4));if(!_0x2ea4f4['ok'])throw new Error(_0x15ffdd[_0x11cb81(0x17d)]);const _0x5df878=await _0x2ea4f4[_0x11cb81(0x1e7)](),_0x5b93af=_0x5df878[_0x11cb81(0x183)]?.[0x0];if(!_0x5b93af)throw new Error('No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata');console['log']('\x20'+_0x5b93af);const _0xad1211=await fetchAuthServerMetadata(_0x5b93af);let _0x141e2c,_0x4cf617;const _0xd9f43d=await loadCachedClient();if(_0xd9f43d)_0x141e2c=_0xd9f43d[_0x11cb81(0x201)],_0x4cf617=_0xd9f43d[_0x11cb81(0x184)];else{if(_0xad1211['registration_endpoint']){process['stdout']['write'](_0x15ffdd[_0x11cb81(0x1ed)]);const _0x4e3bc3=await _0x15ffdd[_0x11cb81(0x213)](fetch,_0xad1211[_0x11cb81(0x1cb)],{'method':_0x15ffdd['VqofJ'],'headers':{'Content-Type':'application/json'},'body':JSON['stringify']({'client_name':_0x11cb81(0x20c),'redirect_uris':[_0x11cb81(0x1ac)+CALLBACK_PORT+'/callback'],'grant_types':[_0x15ffdd[_0x11cb81(0x195)],_0x11cb81(0x1a4)],'response_types':[_0x11cb81(0x1a7)],'token_endpoint_auth_method':_0x15ffdd[_0x11cb81(0x192)]})});if(!_0x4e3bc3['ok']){const _0x5cb0cf=await _0x4e3bc3[_0x11cb81(0x1d0)]();throw new Error('Client\x20registration\x20failed:\x20'+_0x5cb0cf);}const _0x28b0d4=await _0x4e3bc3[_0x11cb81(0x1e7)]();_0x141e2c=_0x28b0d4['client_id'],_0x4cf617=_0x28b0d4['client_secret'],await _0x15ffdd[_0x11cb81(0x213)](saveCachedClient,_0x141e2c,_0x4cf617),console[_0x11cb81(0x18b)](_0x11cb81(0x189));}else throw new Error(_0x15ffdd[_0x11cb81(0x1d5)]);}const _0x38fe39=_0x15ffdd['mtvno'](randomBytes,0x20)['toString'](_0x15ffdd['yxHzc']),_0x48ed0f=createHash('sha256')[_0x11cb81(0x1aa)](_0x38fe39)[_0x11cb81(0x180)](_0x15ffdd['yxHzc']),_0x21628a=randomBytes(0x10)[_0x11cb81(0x207)](_0x15ffdd['gWpYG']),_0x508d50=new URL(_0xad1211[_0x11cb81(0x206)]);_0x508d50[_0x11cb81(0x1f7)]['set'](_0x11cb81(0x20b),_0x15ffdd[_0x11cb81(0x1c9)]),_0x508d50['searchParams'][_0x11cb81(0x1d2)](_0x15ffdd[_0x11cb81(0x1f3)],_0x141e2c),_0x508d50['searchParams']['set']('redirect_uri',_0x11cb81(0x1ac)+CALLBACK_PORT+'/callback'),_0x508d50['searchParams']['set'](_0x11cb81(0x1dc),_0x48ed0f),_0x508d50['searchParams']['set'](_0x15ffdd['DSZsD'],_0x15ffdd[_0x11cb81(0x1d4)]),_0x508d50['searchParams'][_0x11cb81(0x1d2)]('state',_0x21628a);_0x5df878['resource']&&_0x508d50['searchParams']['set']('resource',_0x5df878[_0x11cb81(0x1de)]);console[_0x11cb81(0x18b)]('\x0aOpening\x20browser\x20for\x20authentication...'),console[_0x11cb81(0x18b)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a'+_0x508d50[_0x11cb81(0x207)]()+'\x0a'),await openBrowser(_0x508d50['toString']());const _0x5a7310=await waitForCallback(_0x21628a);process['stdout']['write'](_0x15ffdd['GQoyY']);const _0x28b3b6=new URLSearchParams({'grant_type':_0x11cb81(0x1bb),'code':_0x5a7310,'redirect_uri':_0x11cb81(0x1ac)+CALLBACK_PORT+'/callback','client_id':_0x141e2c,'code_verifier':_0x38fe39});_0x4cf617&&_0x28b3b6[_0x11cb81(0x1d2)]('client_secret',_0x4cf617);_0x5df878['resource']&&_0x28b3b6['set'](_0x11cb81(0x1de),_0x5df878['resource']);const _0x277861=await fetch(_0xad1211['token_endpoint'],{'method':'POST','headers':{'Content-Type':_0x11cb81(0x197)},'body':_0x28b3b6});if(!_0x277861['ok']){const _0x12280a=await _0x277861['text']();throw new Error('Token\x20exchange\x20failed:\x20'+_0x12280a);}const _0x520890=await _0x277861['json']();return console['log'](_0x11cb81(0x189)),await saveCachedToken(_0x520890['access_token'],_0x520890['refresh_token'],_0x520890[_0x11cb81(0x18e)]),_0x520890[_0x11cb81(0x1ba)];}async function callGetCliToken(_0x4687d9,_0x24f9ec){const _0x3e12d8=_0x46302a,_0x515433={'yMFmY':function(_0x2b77b9,_0x5284c1){return _0x2b77b9(_0x5284c1);},'AvPoe':_0x3e12d8(0x1b6),'pnMfu':_0x3e12d8(0x1e6),'nUqhv':'Initializing\x20MCP\x20session...','YeRKW':function(_0x170117,_0x21a3ac){return _0x170117(_0x21a3ac);},'lnJrx':_0x3e12d8(0x19f),'bsCDt':'ranger-cli','tiHtV':'1.0.0','iGBeL':'\x20done','UBKQN':_0x3e12d8(0x204),'drnDS':function(_0x2a37e6,_0x82f3bb){return _0x2a37e6(_0x82f3bb);},'kAOMG':'tools/call','UfSSy':function(_0x4dfd00,_0x4aef85){return _0x4dfd00(_0x4aef85);},'rUXEl':function(_0x3ab012){return _0x3ab012();},'tdlpd':_0x3e12d8(0x19c),'KDfcL':function(_0x133ff7,_0x20e64f,_0x3b31c8){return _0x133ff7(_0x20e64f,_0x3b31c8);},'DwBhf':function(_0xd68768,_0x362fe4,_0x4bd0a6,_0xea5e5){return _0xd68768(_0x362fe4,_0x4bd0a6,_0xea5e5);},'wHGdm':'Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a'},_0x3d4cf8={'Content-Type':_0x515433['AvPoe'],'Accept':_0x515433['pnMfu']};_0x24f9ec&&(_0x3d4cf8[_0x3e12d8(0x1fc)]='Bearer\x20'+_0x24f9ec);const _0x2de054=async _0x167c38=>{const _0x18c7a3=_0x3e12d8,_0x3ae26c=await fetch(_0x4687d9,{'method':_0x18c7a3(0x1e0),'headers':_0x3d4cf8,'body':JSON['stringify'](_0x167c38)});if(!_0x3ae26c['ok']){const _0x3cbd56=await _0x3ae26c[_0x18c7a3(0x1d0)]();throw new Error(_0x18c7a3(0x1e3)+_0x3ae26c['status']+':\x20'+_0x3cbd56);}return _0x515433['yMFmY'](parseResponse,_0x3ae26c);};process['stdout']['write'](_0x515433[_0x3e12d8(0x1a6)]);const _0x277f2b=await _0x515433['YeRKW'](_0x2de054,{'jsonrpc':_0x515433[_0x3e12d8(0x1e8)],'id':0x1,'method':'initialize','params':{'protocolVersion':_0x3e12d8(0x1ee),'capabilities':{},'clientInfo':{'name':_0x515433['bsCDt'],'version':_0x515433['tiHtV']}}});if(_0x277f2b['error'])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x277f2b['error'][_0x3e12d8(0x1a9)]??JSON['stringify'](_0x277f2b[_0x3e12d8(0x1d6)])));console['log'](_0x515433[_0x3e12d8(0x1c0)]),await fetch(_0x4687d9,{'method':'POST','headers':_0x3d4cf8,'body':JSON['stringify']({'jsonrpc':_0x3e12d8(0x19f),'method':'notifications/initialized'})})['then'](_0x38df34=>_0x38df34['text']()),process['stdout']['write'](_0x515433['UBKQN']);const _0x1cab66=await _0x515433['drnDS'](_0x2de054,{'jsonrpc':_0x3e12d8(0x19f),'id':0x2,'method':_0x515433[_0x3e12d8(0x17a)],'params':{'name':'get_cli_token','arguments':{}}});if(_0x1cab66[_0x3e12d8(0x1d6)])throw new Error('get_cli_token\x20failed:\x20'+(_0x1cab66['error'][_0x3e12d8(0x1a9)]??JSON['stringify'](_0x1cab66[_0x3e12d8(0x1d6)])));console['log'](_0x3e12d8(0x189));const _0x557be0=_0x515433[_0x3e12d8(0x1c1)](extractToken,_0x1cab66['result']);if(!_0x557be0){console['error']('\x0aUnexpected\x20response\x20structure:'),console[_0x3e12d8(0x1d6)](JSON['stringify'](_0x1cab66['result'],null,0x2));throw new Error(_0x3e12d8(0x1b8));}const _0x438574=join(_0x515433['rUXEl'](homedir),_0x515433[_0x3e12d8(0x18c)]),_0x482db9=_0x515433[_0x3e12d8(0x1c8)](join,_0x438574,'refresh.txt');await mkdir(_0x438574,{'recursive':!![]}),await writeFile(_0x482db9,_0x557be0,{'mode':0x180}),await _0x515433[_0x3e12d8(0x188)](writeFile,join(_0x438574,_0x3e12d8(0x1e4)),_0x4687d9,{'mode':0x180}),console['log']('\x0aToken\x20written\x20to\x20'+_0x482db9),console['log'](_0x515433[_0x3e12d8(0x20e)]);}async function fetchAuthServerMetadata(_0xed2a17){const _0x57258b=_0x46302a,_0x23bbcd={'pYwXj':function(_0x18cbae,_0x21b382){return _0x18cbae(_0x21b382);}},_0x3f4a02=_0xed2a17+_0x57258b(0x211),_0x34761b=await _0x23bbcd[_0x57258b(0x199)](fetch,_0x3f4a02);if(!_0x34761b['ok'])throw new Error(_0x57258b(0x1e5)+_0x3f4a02+':\x20'+_0x34761b['status']);return _0x34761b['json']();}function waitForCallback(_0x46d8c1){const _0x423db7=_0x46302a,_0x320946={'qXqZj':function(_0x583af5,_0x1488fb){return _0x583af5(_0x1488fb);},'bwgKK':function(_0x4c17d6,_0x221056){return _0x4c17d6!==_0x221056;},'Bxmel':_0x423db7(0x1cc),'eUCRz':'error_description','dpwMZ':function(_0x1be8c8,_0x309322){return _0x1be8c8(_0x309322);},'omFyQ':_0x423db7(0x1d9),'ZpEFx':_0x423db7(0x18f)};return new Promise((_0x4bbae9,_0x1679e9)=>{const _0x379fd8=_0x423db7,_0x48aa4a={'sFKBF':function(_0x1e358e,_0x18c9d5){const _0x4b78c3=_0x37e1;return _0x320946[_0x4b78c3(0x1cf)](_0x1e358e,_0x18c9d5);},'uGBUu':_0x379fd8(0x17f),'zNgcK':_0x320946[_0x379fd8(0x1f2)],'OMpxJ':_0x320946[_0x379fd8(0x185)],'lHmaR':function(_0x4d5438,_0x5ef64d){return _0x320946['dpwMZ'](_0x4d5438,_0x5ef64d);},'dHrED':function(_0x2464a5,_0x3344d3){return _0x2464a5(_0x3344d3);},'ALYaZ':_0x320946[_0x379fd8(0x1ce)],'zjHlr':_0x320946[_0x379fd8(0x1ff)]},_0x225a98=setTimeout(()=>{const _0x4935df=_0x379fd8;_0x522b2a['close'](),_0x320946['qXqZj'](_0x1679e9,new OAuthTimeoutError(_0x4935df(0x1c7)));},0x1d4c0),_0x522b2a=_0x320946['qXqZj'](createServer,(_0x1d8428,_0x272d58)=>{const _0x50e8db=_0x379fd8,_0x22f52f=new URL(_0x1d8428[_0x50e8db(0x1d7)]??'/','http://localhost:'+CALLBACK_PORT);if(_0x48aa4a[_0x50e8db(0x1be)](_0x22f52f[_0x50e8db(0x1f5)],_0x48aa4a[_0x50e8db(0x1c6)])){_0x272d58['writeHead'](0x194),_0x272d58[_0x50e8db(0x187)](_0x50e8db(0x209));return;}const _0x47b75a=_0x22f52f['searchParams'][_0x50e8db(0x1dd)]('code'),_0x59ffa9=_0x22f52f[_0x50e8db(0x1f7)]['get'](_0x48aa4a[_0x50e8db(0x212)]),_0x243c53=_0x22f52f['searchParams']['get'](_0x50e8db(0x1d6));if(_0x243c53){const _0x483882=_0x22f52f['searchParams']['get'](_0x48aa4a['OMpxJ'])??_0x243c53;_0x272d58[_0x50e8db(0x1e1)](0xc8,{'Content-Type':_0x50e8db(0x1d9)}),_0x272d58[_0x50e8db(0x187)](_0x50e8db(0x1cd)+_0x483882+_0x50e8db(0x18a)),_0x48aa4a['lHmaR'](clearTimeout,_0x225a98),_0x522b2a[_0x50e8db(0x1ec)](),_0x48aa4a[_0x50e8db(0x19b)](_0x1679e9,new Error('OAuth\x20error:\x20'+_0x483882));return;}if(!_0x47b75a||_0x48aa4a['sFKBF'](_0x59ffa9,_0x46d8c1)){_0x272d58[_0x50e8db(0x1e1)](0x190,{'Content-Type':_0x48aa4a['ALYaZ']}),_0x272d58['end']('<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>');return;}_0x272d58['writeHead'](0xc8,{'Content-Type':_0x50e8db(0x1d9)}),_0x272d58['end'](_0x48aa4a['zjHlr']),clearTimeout(_0x225a98),_0x522b2a[_0x50e8db(0x1ec)](),_0x48aa4a[_0x50e8db(0x19b)](_0x4bbae9,_0x47b75a);});_0x522b2a[_0x379fd8(0x1bf)](CALLBACK_PORT,'127.0.0.1');});}async function openBrowser(_0x25c38e){const _0x5db714=_0x46302a,_0x231dcb={'ScXpa':_0x5db714(0x1f8),'EpTdI':function(_0x3902ab,_0xb8a298){return _0x3902ab===_0xb8a298;}},{exec:_0x541180}=await import(_0x5db714(0x1c5)),_0x4990b3=process['platform']===_0x5db714(0x1df)?_0x231dcb[_0x5db714(0x1a8)]:_0x231dcb[_0x5db714(0x198)](process['platform'],_0x5db714(0x1af))?_0x5db714(0x191):'xdg-open';_0x541180(_0x4990b3+'\x20\x22'+_0x25c38e+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x563ae2=_0x46302a,_0x53a0d5={'JHwHt':function(_0x675fac,_0x171782,_0x2a150f){return _0x675fac(_0x171782,_0x2a150f);}};try{const _0x1e3256=JSON['parse'](await _0x53a0d5['JHwHt'](readFile,TOKEN_CACHE_PATH,'utf-8'));if(_0x1e3256[_0x563ae2(0x20d)]&&_0x1e3256[_0x563ae2(0x20d)]!==currentOrigin)return null;if(_0x1e3256[_0x563ae2(0x1a1)]&&Date[_0x563ae2(0x1d1)]()>_0x1e3256['expiresAt'])return null;return _0x1e3256[_0x563ae2(0x194)]??null;}catch{return null;}}async function saveCachedToken(_0x4fec14,_0x1b175f,_0x2b726a){const _0x5291c5=_0x46302a,_0x43eab0={'QmHuN':function(_0x2041b8){return _0x2041b8();},'eKKgg':function(_0x2b865c,_0x4b7d8c){return _0x2b865c*_0x4b7d8c;},'aaBWJ':function(_0x23a7ab,_0x904aa1,_0x3ebb06){return _0x23a7ab(_0x904aa1,_0x3ebb06);},'QDcGu':'.ranger','EyMhf':function(_0x25b4d,_0x514239,_0x397adc,_0x1e099c){return _0x25b4d(_0x514239,_0x397adc,_0x1e099c);}},_0x28c240=await _0x43eab0[_0x5291c5(0x20f)](loadCachedData),_0x483906={..._0x28c240,'origin':currentOrigin,'accessToken':_0x4fec14,'refreshToken':_0x1b175f??_0x28c240?.[_0x5291c5(0x1e2)],'expiresAt':_0x2b726a?Date[_0x5291c5(0x1d1)]()+_0x43eab0[_0x5291c5(0x1d3)](_0x2b726a,0x3e8):undefined};await mkdir(_0x43eab0[_0x5291c5(0x1f0)](join,homedir(),_0x43eab0['QDcGu']),{'recursive':!![]}),await _0x43eab0[_0x5291c5(0x1ae)](writeFile,TOKEN_CACHE_PATH,JSON[_0x5291c5(0x1d8)](_0x483906),{'mode':0x180});}async function loadCachedClient(){const _0xdf24d0=_0x46302a,_0xba69c7=await loadCachedData();if(_0xba69c7?.[_0xdf24d0(0x20d)]&&_0xba69c7[_0xdf24d0(0x20d)]!==currentOrigin)return null;return _0xba69c7?.[_0xdf24d0(0x201)]?{'clientId':_0xba69c7['clientId'],'clientSecret':_0xba69c7['clientSecret']}:null;}async function clearCachedClient(){const _0x52f6c2=_0x46302a,_0x28514a={'cxNtZ':function(_0x2d8849,_0x4833b6,_0x344193,_0x3c8ed0){return _0x2d8849(_0x4833b6,_0x344193,_0x3c8ed0);}},_0x1fefa6=await loadCachedData();if(!_0x1fefa6)return;const {clientId:_0x5413bc,clientSecret:_0x574c01,..._0x133c0d}=_0x1fefa6;await _0x28514a[_0x52f6c2(0x1b0)](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x133c0d),{'mode':0x180});}async function saveCachedClient(_0x340a65,_0x466b49){const _0x33fe7c=_0x46302a,_0x44f5d6={'FZSfN':function(_0x2dcb2d,_0x11588c,_0x1d9311){return _0x2dcb2d(_0x11588c,_0x1d9311);},'jLtzt':_0x33fe7c(0x19c),'gnqYX':function(_0x5efc60,_0x58a9d9,_0x5be6e0,_0x39000c){return _0x5efc60(_0x58a9d9,_0x5be6e0,_0x39000c);}},_0x43bdc3=await loadCachedData(),_0x195147={..._0x43bdc3,'origin':currentOrigin,'accessToken':_0x43bdc3?.[_0x33fe7c(0x194)]??'','clientId':_0x340a65,'clientSecret':_0x466b49};await _0x44f5d6[_0x33fe7c(0x1b9)](mkdir,join(homedir(),_0x44f5d6[_0x33fe7c(0x1c4)]),{'recursive':!![]}),await _0x44f5d6[_0x33fe7c(0x1b1)](writeFile,TOKEN_CACHE_PATH,JSON[_0x33fe7c(0x1d8)](_0x195147),{'mode':0x180});}async function loadCachedData(){const _0x19ceb1=_0x46302a,_0x363502={'SAVuV':function(_0x23f048,_0x4dcbb5,_0x33c71a){return _0x23f048(_0x4dcbb5,_0x33c71a);},'vhmXX':'utf-8'};try{return JSON['parse'](await _0x363502['SAVuV'](readFile,TOKEN_CACHE_PATH,_0x363502[_0x19ceb1(0x200)]));}catch{return null;}}async function parseResponse(_0x2c3375){const _0x441bd7=_0x46302a,_0x1ff895={'QOPFv':'content-type','NbBBx':'data:','AiQeo':function(_0x99cc2c,_0x43fdb6){return _0x99cc2c!==_0x43fdb6;},'qdArK':'No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream'},_0x338a8f=_0x2c3375[_0x441bd7(0x1ea)][_0x441bd7(0x1dd)](_0x1ff895['QOPFv'])??'';if(_0x338a8f[_0x441bd7(0x17c)](_0x441bd7(0x182))){const _0x572a96=await _0x2c3375[_0x441bd7(0x1d0)]();for(const _0x5adcb0 of _0x572a96['split']('\x0a')){const _0x51f180=_0x5adcb0['trim']();if(_0x51f180['startsWith'](_0x1ff895['NbBBx'])){const _0x2decaa=_0x51f180['slice'](_0x1ff895[_0x441bd7(0x1f4)]['length'])['trim']();if(!_0x2decaa)continue;try{const _0x59450f=JSON[_0x441bd7(0x1bc)](_0x2decaa);if(_0x1ff895['AiQeo'](_0x59450f['id'],undefined)||_0x59450f['error'])return _0x59450f;}catch{}}}throw new Error(_0x1ff895[_0x441bd7(0x193)]);}return _0x2c3375['json']();}function extractToken(_0xa98c04){const _0x5ab2b7=_0x46302a,_0x3715b9={'tfHML':function(_0xda82d5,_0x320050){return _0xda82d5===_0x320050;},'haFjz':'text','oBKUV':_0x5ab2b7(0x202)};if(!_0xa98c04)return null;const _0x55443c=_0xa98c04['structuredContent'];if(_0x55443c?.[_0x5ab2b7(0x190)]&&_0x3715b9['tfHML'](typeof _0x55443c[_0x5ab2b7(0x190)],'string'))return _0x55443c[_0x5ab2b7(0x190)];if(_0xa98c04['isError']){const _0x26614c=_0xa98c04[_0x5ab2b7(0x203)];throw new Error('Server\x20returned\x20error:\x20'+(_0x26614c?.[0x0]?.['text']??'Unknown\x20error'));}const _0x16b679=_0xa98c04[_0x5ab2b7(0x203)];if(_0x16b679)for(const _0x2a1b7d of _0x16b679){if(_0x3715b9['tfHML'](_0x2a1b7d[_0x5ab2b7(0x17e)],_0x3715b9[_0x5ab2b7(0x181)])&&_0x2a1b7d[_0x5ab2b7(0x1d0)]){try{const _0x1c3d16=JSON[_0x5ab2b7(0x1bc)](_0x2a1b7d[_0x5ab2b7(0x1d0)]);if(typeof _0x1c3d16?.['token']===_0x3715b9['oBKUV'])return _0x1c3d16[_0x5ab2b7(0x190)];}catch{}const _0x4bb659=_0x2a1b7d['text'][_0x5ab2b7(0x210)](/(rngr_[A-Za-z0-9_-]+)/);if(_0x4bb659)return _0x4bb659[0x1];}}return null;}
1
+ function _0x84d7(_0x4d3b1f,_0x36044c){_0x4d3b1f=_0x4d3b1f-0x1cf;const _0x7a23d5=_0x7a23();let _0x84d7e3=_0x7a23d5[_0x4d3b1f];return _0x84d7e3;}const _0x30785e=_0x84d7;function _0x7a23(){const _0x3a8f42=['Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','ovZgQ','\x20done','OxaVY','CbBfA','.ranger','MapMx','HTTP\x20','XBFYk','Initializing\x20MCP\x20session...','OtCIc','aQMPl','initialize','refresh_token','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','client_secret','log','mhUdm','iAMND','child_process','toString','NfXwq','ranger-cli','LohGH','isError','\x0aUnexpected\x20response\x20structure:','NQATg','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','error_description','get_cli_token','text/event-stream','now','MCP\x20initialize\x20failed:\x20','ssLKR','tKerN','2.0','144392wtvKTE','expires_in','win32','2025-03-26','6751107lJDcFn','Not\x20found','error','VCbrs','writeHead','NEaap','eEZPy','dXXlI','Token\x20exchange\x20failed:\x20','auth-origin.txt','kIiUB','iTEAe','application/json','/callback','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','\x0aToken\x20written\x20to\x20','1660NuLRYH','stdout','swyPI','Discovering\x20authorization\x20server...','resource','authorization_endpoint','platform','dYJtR','redirect_uri','Authorization','type','refreshToken','get','code','QHNxI','NcbcX','KOTFi','evfUi','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','text/html','XpGtg','then','status','1.0.0','trim','access_token','text','aAEeF','tkEma','update','url','IKGKX','BBIru','utf-8','proxied','wAiay','includes','jrpGC','nizey','9155tmlVPK','/.well-known/oauth-authorization-server','nNAoe','stringify','start','authorization_code','GIFId','pAOWh','1439310CLiEVs','write','faEqM','replace','base64url','http://localhost:','Nxamk','origin','pathname','vwbWa','client_id','response_type','authorization_servers','listen','ZqUtA','fxZoi','application/x-www-form-urlencoded','POST','token','clientId','message','clientSecret','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','aNHbp','token_endpoint','searchParams','data:','469lsIchr','25980410LnEZMv','state','TVRTf','accessToken','Ranger\x20CLI','754452ByJMnh','json','lHKBO','expiresAt','62BFEhpD','Irlsl','lBwqw','length','close','application/json,\x20text/event-stream','dZlps','oxUQL','HmhLx','slice','registration_endpoint','GzwGj','Client\x20registration\x20failed:\x20','20521VHtgJQ','set'];_0x7a23=function(){return _0x3a8f42;};return _0x7a23();}(function(_0x2dc62d,_0x540877){const _0x1df598=_0x84d7,_0x32223f=_0x2dc62d();while(!![]){try{const _0x33a55d=-parseInt(_0x1df598(0x1e1))/0x1*(-parseInt(_0x1df598(0x1d4))/0x2)+parseInt(_0x1df598(0x1d0))/0x3+-parseInt(_0x1df598(0x21b))/0x4*(-parseInt(_0x1df598(0x242))/0x5)+-parseInt(_0x1df598(0x24a))/0x6+-parseInt(_0x1df598(0x265))/0x7*(-parseInt(_0x1df598(0x207))/0x8)+parseInt(_0x1df598(0x20b))/0x9+-parseInt(_0x1df598(0x266))/0xa;if(_0x33a55d===_0x540877)break;else _0x32223f['push'](_0x32223f['shift']());}catch(_0x1efc75){_0x32223f['push'](_0x32223f['shift']());}}}(_0x7a23,0xbbbd4));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(),'.ranger',_0x30785e(0x214));export async function getMcpAuthOrigin(){const _0x1b68a9=_0x30785e,_0x38cdbd={'YJUQu':function(_0x17b9cf,_0x21c812,_0x54d592){return _0x17b9cf(_0x21c812,_0x54d592);}};try{const _0x20ac34=(await _0x38cdbd['YJUQu'](readFile,AUTH_ORIGIN_PATH,_0x1b68a9(0x23c)))['trim']();return _0x20ac34||null;}catch{return null;}}export async function mcpBootstrap(){const _0x5a3e14=_0x30785e,_0x2db4fb={'XXtMZ':function(_0xd7f66c){return _0xd7f66c();},'aQMPl':function(_0x574b36,_0x436020){return _0x574b36===_0x436020;}},_0x3fd8b8=_0x2db4fb['XXtMZ'](getMcpAuthUrl);currentOrigin=_0x3fd8b8;const _0x222b24=process[_0x5a3e14(0x21c)]['isTTY']??![];console[_0x5a3e14(0x1f3)]('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x3fd8b8+'\x0a');const _0x51202c=await tryUnauthenticated(_0x3fd8b8);let _0x497106=null;if(_0x2db4fb[_0x5a3e14(0x1ee)](_0x51202c,_0x5a3e14(0x23d)))_0x497106='';else{_0x497106=await _0x2db4fb['XXtMZ'](loadCachedToken);if(!_0x497106){if(!_0x222b24)throw new Error('MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a'+_0x5a3e14(0x1f1));_0x497106=await oauthFlow(_0x3fd8b8);}}await callGetCliToken(_0x3fd8b8,_0x497106);}async function tryUnauthenticated(_0x3aa063){const _0x29a213=_0x30785e,_0x113aca={'EdBFQ':'POST','sBLnL':'application/json','QHNxI':_0x29a213(0x1d9),'OxaVY':_0x29a213(0x20a),'OtCIc':_0x29a213(0x1f9),'vwbWa':'proxied','SniDd':function(_0x139e25,_0x278abb){return _0x139e25===_0x278abb;},'wxRYQ':'needs-oauth'},_0x2a19de=await fetch(_0x3aa063,{'method':_0x113aca['EdBFQ'],'headers':{'Content-Type':_0x113aca['sBLnL'],'Accept':_0x113aca[_0x29a213(0x229)]},'body':JSON['stringify']({'jsonrpc':'2.0','id':0x1,'method':'initialize','params':{'protocolVersion':_0x113aca[_0x29a213(0x1e6)],'capabilities':{},'clientInfo':{'name':_0x113aca[_0x29a213(0x1ed)],'version':_0x29a213(0x232)}}})});if(_0x2a19de['ok'])return await _0x2a19de[_0x29a213(0x235)](),_0x113aca[_0x29a213(0x253)];if(_0x113aca['SniDd'](_0x2a19de['status'],0x191))return await _0x2a19de[_0x29a213(0x235)](),_0x113aca['wxRYQ'];const _0xa8a275=await _0x2a19de['text']();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0x2a19de[_0x29a213(0x231)]+':\x20'+_0xa8a275);}class OAuthTimeoutError extends Error{constructor(_0x429cde){super(_0x429cde),this['name']='OAuthTimeoutError';}}async function oauthFlow(_0x33c5bb){const _0x204abe=_0x30785e,_0x16211f={'JcKbr':function(_0x99fd2c,_0xae2ac4){return _0x99fd2c(_0xae2ac4);},'KOTFi':function(_0x2e9d9c){return _0x2e9d9c();},'lHKBO':function(_0x3fb054,_0x28fafe){return _0x3fb054(_0x28fafe);}};try{return await _0x16211f['JcKbr'](oauthFlowAttempt,_0x33c5bb);}catch(_0x4770f9){if(_0x4770f9 instanceof OAuthTimeoutError&&await _0x16211f[_0x204abe(0x22b)](loadCachedClient))return console['log'](_0x204abe(0x219)),await clearCachedClient(),await _0x16211f[_0x204abe(0x1d2)](oauthFlowAttempt,_0x33c5bb);throw _0x4770f9;}}async function oauthFlowAttempt(_0x33772e){const _0x12d0cc=_0x30785e,_0x38ee59={'mhUdm':_0x12d0cc(0x21e),'aAEeF':'Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','UZzAa':'No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','FClVm':'Registering\x20OAuth\x20client...','uuEON':'POST','BqnkU':_0x12d0cc(0x217),'GIFId':_0x12d0cc(0x247),'aNHbp':'none','etsgo':_0x12d0cc(0x24e),'vPquK':'sha256','MapMx':function(_0x2c0bef,_0x7aac45){return _0x2c0bef(_0x7aac45);},'XCOWE':'hex','NQATg':_0x12d0cc(0x228),'UuODv':'code_challenge','IKGKX':'code_challenge_method','tKerN':function(_0x2bdb39,_0x3a0e48){return _0x2bdb39(_0x3a0e48);},'eEZPy':'Exchanging\x20authorization\x20code...','fxZoi':'resource','XpGtg':_0x12d0cc(0x1e5)},_0x4a8adf=_0x33772e[_0x12d0cc(0x24d)](/\/mcp$/,'');process['stdout']['write'](_0x38ee59[_0x12d0cc(0x1f4)]);const _0x233584=await fetch(_0x4a8adf+'/.well-known/oauth-protected-resource');if(!_0x233584['ok'])throw new Error(_0x38ee59[_0x12d0cc(0x236)]);const _0x221436=await _0x233584['json'](),_0x5bdcb0=_0x221436[_0x12d0cc(0x256)]?.[0x0];if(!_0x5bdcb0)throw new Error(_0x38ee59['UZzAa']);console[_0x12d0cc(0x1f3)]('\x20'+_0x5bdcb0);const _0x4084eb=await fetchAuthServerMetadata(_0x5bdcb0);let _0x2ae56b,_0x1684f5;const _0x5cd95a=await loadCachedClient();if(_0x5cd95a)_0x2ae56b=_0x5cd95a['clientId'],_0x1684f5=_0x5cd95a['clientSecret'];else{if(_0x4084eb[_0x12d0cc(0x1de)]){process[_0x12d0cc(0x21c)][_0x12d0cc(0x24b)](_0x38ee59['FClVm']);const _0x33b810=await fetch(_0x4084eb['registration_endpoint'],{'method':_0x38ee59['uuEON'],'headers':{'Content-Type':_0x38ee59['BqnkU']},'body':JSON['stringify']({'client_name':_0x12d0cc(0x1cf),'redirect_uris':['http://localhost:'+CALLBACK_PORT+_0x12d0cc(0x218)],'grant_types':[_0x38ee59['GIFId'],_0x12d0cc(0x1f0)],'response_types':['code'],'token_endpoint_auth_method':_0x38ee59[_0x12d0cc(0x261)]})});if(!_0x33b810['ok']){const _0x545b28=await _0x33b810[_0x12d0cc(0x235)]();throw new Error(_0x12d0cc(0x1e0)+_0x545b28);}const _0x343ad1=await _0x33b810[_0x12d0cc(0x1d1)]();_0x2ae56b=_0x343ad1[_0x12d0cc(0x254)],_0x1684f5=_0x343ad1[_0x12d0cc(0x1f2)],await saveCachedClient(_0x2ae56b,_0x1684f5),console[_0x12d0cc(0x1f3)]('\x20done');}else throw new Error(_0x12d0cc(0x1e3));}const _0x43cf99=randomBytes(0x20)[_0x12d0cc(0x1f7)](_0x38ee59['etsgo']),_0x39da41=createHash(_0x38ee59['vPquK'])[_0x12d0cc(0x238)](_0x43cf99)['digest'](_0x12d0cc(0x24e)),_0x373f5c=_0x38ee59[_0x12d0cc(0x1e9)](randomBytes,0x10)[_0x12d0cc(0x1f7)](_0x38ee59['XCOWE']),_0xd25062=new URL(_0x4084eb[_0x12d0cc(0x220)]);_0xd25062[_0x12d0cc(0x263)][_0x12d0cc(0x1e2)](_0x12d0cc(0x255),_0x38ee59[_0x12d0cc(0x1fd)]),_0xd25062['searchParams'][_0x12d0cc(0x1e2)]('client_id',_0x2ae56b),_0xd25062[_0x12d0cc(0x263)][_0x12d0cc(0x1e2)](_0x12d0cc(0x223),'http://localhost:'+CALLBACK_PORT+_0x12d0cc(0x218)),_0xd25062[_0x12d0cc(0x263)]['set'](_0x38ee59['UuODv'],_0x39da41),_0xd25062['searchParams'][_0x12d0cc(0x1e2)](_0x38ee59[_0x12d0cc(0x23a)],'S256'),_0xd25062['searchParams'][_0x12d0cc(0x1e2)]('state',_0x373f5c);_0x221436[_0x12d0cc(0x21f)]&&_0xd25062['searchParams']['set'](_0x12d0cc(0x21f),_0x221436['resource']);console[_0x12d0cc(0x1f3)]('\x0aOpening\x20browser\x20for\x20authentication...'),console['log'](_0x12d0cc(0x1fe)+_0xd25062[_0x12d0cc(0x1f7)]()+'\x0a'),await _0x38ee59[_0x12d0cc(0x1e9)](openBrowser,_0xd25062[_0x12d0cc(0x1f7)]());const _0x8c6da1=await _0x38ee59[_0x12d0cc(0x205)](waitForCallback,_0x373f5c);process['stdout'][_0x12d0cc(0x24b)](_0x38ee59[_0x12d0cc(0x211)]);const _0x4ebc9a=new URLSearchParams({'grant_type':_0x38ee59[_0x12d0cc(0x248)],'code':_0x8c6da1,'redirect_uri':'http://localhost:'+CALLBACK_PORT+_0x12d0cc(0x218),'client_id':_0x2ae56b,'code_verifier':_0x43cf99});_0x1684f5&&_0x4ebc9a[_0x12d0cc(0x1e2)](_0x12d0cc(0x1f2),_0x1684f5);_0x221436[_0x12d0cc(0x21f)]&&_0x4ebc9a['set'](_0x38ee59[_0x12d0cc(0x259)],_0x221436['resource']);const _0x21844e=await fetch(_0x4084eb[_0x12d0cc(0x262)],{'method':'POST','headers':{'Content-Type':_0x12d0cc(0x25a)},'body':_0x4ebc9a});if(!_0x21844e['ok']){const _0x3d6b5b=await _0x21844e[_0x12d0cc(0x235)]();throw new Error(_0x12d0cc(0x213)+_0x3d6b5b);}const _0x5159a1=await _0x21844e[_0x12d0cc(0x1d1)]();return console[_0x12d0cc(0x1f3)](_0x38ee59[_0x12d0cc(0x22f)]),await saveCachedToken(_0x5159a1[_0x12d0cc(0x234)],_0x5159a1['refresh_token'],_0x5159a1[_0x12d0cc(0x208)]),_0x5159a1[_0x12d0cc(0x234)];}async function callGetCliToken(_0x273307,_0x23fd3d){const _0x2a787c=_0x30785e,_0x4e2886={'Nxamk':function(_0x21e879,_0x220f83,_0x1ac2d1){return _0x21e879(_0x220f83,_0x1ac2d1);},'jXoOr':function(_0x5d8952,_0x4959c5){return _0x5d8952(_0x4959c5);},'HmhLx':'application/json','pAOWh':_0x2a787c(0x1ec),'nizey':_0x2a787c(0x206),'NfXwq':'2025-03-26','ZqUtA':'ranger-cli','LMlQE':_0x2a787c(0x232),'aRJvu':'\x20done','tkEma':_0x2a787c(0x25b),'aKIIG':'notifications/initialized','WRlFV':'tools/call','kIiUB':_0x2a787c(0x200),'ssLKR':'Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','Yazvr':function(_0x1a60a9){return _0x1a60a9();},'nNAoe':function(_0x9b473e,_0xedf57c,_0x4a0ea4){return _0x9b473e(_0xedf57c,_0x4a0ea4);},'Irlsl':function(_0x441492,_0x2d376b,_0x49fd06,_0x5f0e2b){return _0x441492(_0x2d376b,_0x49fd06,_0x5f0e2b);}},_0x48e661={'Content-Type':_0x4e2886[_0x2a787c(0x1dc)],'Accept':_0x2a787c(0x1d9)};_0x23fd3d&&(_0x48e661[_0x2a787c(0x224)]='Bearer\x20'+_0x23fd3d);const _0x295464=async _0x190870=>{const _0x209060=_0x2a787c,_0xc8678a=await _0x4e2886[_0x209060(0x250)](fetch,_0x273307,{'method':_0x209060(0x25b),'headers':_0x48e661,'body':JSON['stringify'](_0x190870)});if(!_0xc8678a['ok']){const _0x206594=await _0xc8678a['text']();throw new Error(_0x209060(0x1ea)+_0xc8678a['status']+':\x20'+_0x206594);}return _0x4e2886['jXoOr'](parseResponse,_0xc8678a);};process[_0x2a787c(0x21c)]['write'](_0x4e2886[_0x2a787c(0x249)]);const _0x197afb=await _0x4e2886['jXoOr'](_0x295464,{'jsonrpc':_0x4e2886[_0x2a787c(0x241)],'id':0x1,'method':_0x2a787c(0x1ef),'params':{'protocolVersion':_0x4e2886[_0x2a787c(0x1f8)],'capabilities':{},'clientInfo':{'name':_0x4e2886[_0x2a787c(0x258)],'version':_0x4e2886['LMlQE']}}});if(_0x197afb[_0x2a787c(0x20d)])throw new Error(_0x2a787c(0x203)+(_0x197afb[_0x2a787c(0x20d)]['message']??JSON['stringify'](_0x197afb[_0x2a787c(0x20d)])));console[_0x2a787c(0x1f3)](_0x4e2886['aRJvu']),await _0x4e2886['Nxamk'](fetch,_0x273307,{'method':_0x4e2886[_0x2a787c(0x237)],'headers':_0x48e661,'body':JSON[_0x2a787c(0x245)]({'jsonrpc':_0x4e2886[_0x2a787c(0x241)],'method':_0x4e2886['aKIIG']})})[_0x2a787c(0x230)](_0x4a623e=>_0x4a623e[_0x2a787c(0x235)]()),process['stdout'][_0x2a787c(0x24b)]('Requesting\x20CLI\x20token...');const _0x12d14f=await _0x295464({'jsonrpc':_0x4e2886['nizey'],'id':0x2,'method':_0x4e2886['WRlFV'],'params':{'name':_0x4e2886[_0x2a787c(0x215)],'arguments':{}}});if(_0x12d14f[_0x2a787c(0x20d)])throw new Error('get_cli_token\x20failed:\x20'+(_0x12d14f[_0x2a787c(0x20d)][_0x2a787c(0x25e)]??JSON['stringify'](_0x12d14f[_0x2a787c(0x20d)])));console['log']('\x20done');const _0x1b6fa1=extractToken(_0x12d14f['result']);if(!_0x1b6fa1){console[_0x2a787c(0x20d)](_0x2a787c(0x1fc)),console[_0x2a787c(0x20d)](JSON['stringify'](_0x12d14f['result'],null,0x2));throw new Error(_0x4e2886[_0x2a787c(0x204)]);}const _0x47f64b=join(_0x4e2886['Yazvr'](homedir),'.ranger'),_0x32b6b4=_0x4e2886[_0x2a787c(0x244)](join,_0x47f64b,'refresh.txt');await mkdir(_0x47f64b,{'recursive':!![]}),await _0x4e2886[_0x2a787c(0x1d5)](writeFile,_0x32b6b4,_0x1b6fa1,{'mode':0x180}),await writeFile(_0x4e2886[_0x2a787c(0x244)](join,_0x47f64b,_0x2a787c(0x214)),_0x273307,{'mode':0x180}),console[_0x2a787c(0x1f3)](_0x2a787c(0x21a)+_0x32b6b4),console[_0x2a787c(0x1f3)]('Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a');}async function fetchAuthServerMetadata(_0x2c3ed2){const _0x1b285f=_0x30785e,_0x5da648=_0x2c3ed2+_0x1b285f(0x243),_0x1d1b5c=await fetch(_0x5da648);if(!_0x1d1b5c['ok'])throw new Error(_0x1b285f(0x22d)+_0x5da648+':\x20'+_0x1d1b5c['status']);return _0x1d1b5c[_0x1b285f(0x1d1)]();}function waitForCallback(_0x4a1dc6){const _0x3f1a32=_0x30785e,_0x55a031={'RKXAJ':'OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','oxUQL':function(_0x4e2dd3,_0x16c358){return _0x4e2dd3!==_0x16c358;},'hMYVv':_0x3f1a32(0x20c),'iAMND':_0x3f1a32(0x1ff),'PNYLw':_0x3f1a32(0x22e),'kVFbP':function(_0x537b2a,_0x3cacbd){return _0x537b2a(_0x3cacbd);},'jFdHQ':'<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','tXIri':function(_0x319b2d,_0x48e3dc,_0x2ea0c3){return _0x319b2d(_0x48e3dc,_0x2ea0c3);}};return new Promise((_0x5b5076,_0x2303af)=>{const _0x350c8a=_0x3f1a32,_0x491d71={'iTEAe':function(_0x14e5a1,_0x1dec66){return _0x14e5a1(_0x1dec66);},'AuUlE':_0x55a031['RKXAJ'],'GKQHY':function(_0xe1ab32,_0x4e30d2){const _0x25b9ea=_0x84d7;return _0x55a031[_0x25b9ea(0x1db)](_0xe1ab32,_0x4e30d2);},'YuvRF':_0x55a031['hMYVv'],'dYJtR':_0x350c8a(0x228),'kBRtZ':_0x350c8a(0x267),'WMNsN':_0x55a031[_0x350c8a(0x1f5)],'TVRTf':_0x55a031['PNYLw'],'NEaap':function(_0x2da7c2,_0x32d069){return _0x55a031['kVFbP'](_0x2da7c2,_0x32d069);},'ahbLm':function(_0xeaf045,_0x59730b){return _0xeaf045!==_0x59730b;},'lyHVO':_0x55a031['jFdHQ'],'CbBfA':'<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','BBIru':function(_0x3b270f,_0xd72f95){return _0x3b270f(_0xd72f95);}},_0x2bac98=_0x55a031['tXIri'](setTimeout,()=>{const _0xde0d6f=_0x350c8a;_0x1d8133[_0xde0d6f(0x1d8)](),_0x491d71[_0xde0d6f(0x216)](_0x2303af,new OAuthTimeoutError(_0x491d71['AuUlE']));},0x1d4c0),_0x1d8133=createServer((_0x615bb2,_0x591ef1)=>{const _0x433f92=_0x350c8a,_0x5c7770=new URL(_0x615bb2[_0x433f92(0x239)]??'/',_0x433f92(0x24f)+CALLBACK_PORT);if(_0x491d71['GKQHY'](_0x5c7770[_0x433f92(0x252)],'/callback')){_0x591ef1[_0x433f92(0x20f)](0x194),_0x591ef1['end'](_0x491d71['YuvRF']);return;}const _0x1a8f8d=_0x5c7770['searchParams'][_0x433f92(0x227)](_0x491d71[_0x433f92(0x222)]),_0x5bdd4f=_0x5c7770[_0x433f92(0x263)]['get'](_0x491d71['kBRtZ']),_0x3dd75f=_0x5c7770[_0x433f92(0x263)]['get'](_0x433f92(0x20d));if(_0x3dd75f){const _0x3fd270=_0x5c7770[_0x433f92(0x263)]['get'](_0x491d71['WMNsN'])??_0x3dd75f;_0x591ef1[_0x433f92(0x20f)](0xc8,{'Content-Type':_0x491d71[_0x433f92(0x268)]}),_0x591ef1['end']('<html><body><h2>Authentication\x20failed</h2><p>'+_0x3fd270+_0x433f92(0x260)),_0x491d71[_0x433f92(0x210)](clearTimeout,_0x2bac98),_0x1d8133['close'](),_0x491d71['iTEAe'](_0x2303af,new Error('OAuth\x20error:\x20'+_0x3fd270));return;}if(!_0x1a8f8d||_0x491d71['ahbLm'](_0x5bdd4f,_0x4a1dc6)){_0x591ef1[_0x433f92(0x20f)](0x190,{'Content-Type':_0x433f92(0x22e)}),_0x591ef1['end'](_0x491d71['lyHVO']);return;}_0x591ef1[_0x433f92(0x20f)](0xc8,{'Content-Type':_0x433f92(0x22e)}),_0x591ef1['end'](_0x491d71[_0x433f92(0x1e7)]),clearTimeout(_0x2bac98),_0x1d8133['close'](),_0x491d71[_0x433f92(0x23b)](_0x5b5076,_0x1a8f8d);});_0x1d8133[_0x350c8a(0x257)](CALLBACK_PORT,'127.0.0.1');});}async function openBrowser(_0xdca1d7){const _0x4fe33d=_0x30785e,_0x5edb61={'wAiay':function(_0x6c7013,_0x2728f2){return _0x6c7013===_0x2728f2;},'LohGH':'darwin','ovZgQ':'xdg-open','faEqM':function(_0x4e0c12,_0x13c08e){return _0x4e0c12(_0x13c08e);}},{exec:_0x21b2f8}=await import(_0x4fe33d(0x1f6)),_0x2440c2=_0x5edb61[_0x4fe33d(0x23e)](process[_0x4fe33d(0x221)],_0x5edb61[_0x4fe33d(0x1fa)])?'open':process[_0x4fe33d(0x221)]===_0x4fe33d(0x209)?_0x4fe33d(0x246):_0x5edb61[_0x4fe33d(0x1e4)];_0x5edb61[_0x4fe33d(0x24c)](_0x21b2f8,_0x2440c2+'\x20\x22'+_0xdca1d7+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x3e0f74=_0x30785e,_0x161781={'lgcIY':_0x3e0f74(0x23c),'evfUi':function(_0x193681,_0x5e9294){return _0x193681!==_0x5e9294;},'VCbrs':function(_0x1165aa,_0x56e11a){return _0x1165aa>_0x56e11a;}};try{const _0x284e23=JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x161781['lgcIY']));if(_0x284e23['origin']&&_0x161781[_0x3e0f74(0x22c)](_0x284e23['origin'],currentOrigin))return null;if(_0x284e23['expiresAt']&&_0x161781[_0x3e0f74(0x20e)](Date[_0x3e0f74(0x202)](),_0x284e23[_0x3e0f74(0x1d3)]))return null;return _0x284e23[_0x3e0f74(0x269)]??null;}catch{return null;}}async function saveCachedToken(_0x45e2d0,_0x4c8394,_0x44078d){const _0x48bb23=_0x30785e,_0x117bfe={'JTAME':function(_0x463ae0){return _0x463ae0();},'swyPI':function(_0x482419,_0x40097d,_0x206127){return _0x482419(_0x40097d,_0x206127);},'GzwGj':function(_0x5f3dde){return _0x5f3dde();}},_0x2a222d=await _0x117bfe['JTAME'](loadCachedData),_0x2ca542={..._0x2a222d,'origin':currentOrigin,'accessToken':_0x45e2d0,'refreshToken':_0x4c8394??_0x2a222d?.[_0x48bb23(0x226)],'expiresAt':_0x44078d?Date['now']()+_0x44078d*0x3e8:undefined};await _0x117bfe[_0x48bb23(0x21d)](mkdir,_0x117bfe[_0x48bb23(0x21d)](join,_0x117bfe[_0x48bb23(0x1df)](homedir),'.ranger'),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x2ca542),{'mode':0x180});}async function loadCachedClient(){const _0x2dbe99=_0x30785e,_0xbc85d9={'dXXlI':function(_0x1ca918){return _0x1ca918();}},_0x420d73=await _0xbc85d9[_0x2dbe99(0x212)](loadCachedData);if(_0x420d73?.[_0x2dbe99(0x251)]&&_0x420d73['origin']!==currentOrigin)return null;return _0x420d73?.[_0x2dbe99(0x25d)]?{'clientId':_0x420d73[_0x2dbe99(0x25d)],'clientSecret':_0x420d73[_0x2dbe99(0x25f)]}:null;}async function clearCachedClient(){const _0x2b5fe0=_0x30785e,_0x4b8700={'NcbcX':function(_0x584200,_0x2a5ec9,_0x5cb219,_0x28bff4){return _0x584200(_0x2a5ec9,_0x5cb219,_0x28bff4);}},_0x2f2fc5=await loadCachedData();if(!_0x2f2fc5)return;const {clientId:_0x3239a0,clientSecret:_0x2f1a05,..._0x548400}=_0x2f2fc5;await _0x4b8700[_0x2b5fe0(0x22a)](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x548400),{'mode':0x180});}async function saveCachedClient(_0x18988f,_0x426f05){const _0x1daaaf=_0x30785e,_0x73cf0d={'lBwqw':function(_0x2cc09){return _0x2cc09();},'ZmJuL':function(_0x33b2c9,_0x4a88ea,_0x6337ba){return _0x33b2c9(_0x4a88ea,_0x6337ba);}},_0x55b3ba=await _0x73cf0d[_0x1daaaf(0x1d6)](loadCachedData),_0x199712={..._0x55b3ba,'origin':currentOrigin,'accessToken':_0x55b3ba?.[_0x1daaaf(0x269)]??'','clientId':_0x18988f,'clientSecret':_0x426f05};await _0x73cf0d['ZmJuL'](mkdir,join(_0x73cf0d['lBwqw'](homedir),_0x1daaaf(0x1e8)),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x199712),{'mode':0x180});}async function loadCachedData(){const _0x3f37bd=_0x30785e,_0x44bbfc={'jrpGC':function(_0x313060,_0x29828e,_0x15692c){return _0x313060(_0x29828e,_0x15692c);},'dZlps':_0x3f37bd(0x23c)};try{return JSON['parse'](await _0x44bbfc[_0x3f37bd(0x240)](readFile,TOKEN_CACHE_PATH,_0x44bbfc[_0x3f37bd(0x1da)]));}catch{return null;}}async function parseResponse(_0x5ac972){const _0x287613=_0x30785e,_0x306fcf={'Xkrnp':'data:'},_0x2022ee=_0x5ac972['headers'][_0x287613(0x227)]('content-type')??'';if(_0x2022ee[_0x287613(0x23f)](_0x287613(0x201))){const _0x3c228f=await _0x5ac972['text']();for(const _0x17f059 of _0x3c228f['split']('\x0a')){const _0x2e0164=_0x17f059[_0x287613(0x233)]();if(_0x2e0164['startsWith'](_0x287613(0x264))){const _0x1054aa=_0x2e0164[_0x287613(0x1dd)](_0x306fcf['Xkrnp'][_0x287613(0x1d7)])['trim']();if(!_0x1054aa)continue;try{const _0x1d447d=JSON['parse'](_0x1054aa);if(_0x1d447d['id']!==undefined||_0x1d447d[_0x287613(0x20d)])return _0x1d447d;}catch{}}}throw new Error('No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream');}return _0x5ac972[_0x287613(0x1d1)]();}function extractToken(_0x85f594){const _0x1036d2=_0x30785e,_0x5258ed={'XBFYk':'string','QaxaO':_0x1036d2(0x235)};if(!_0x85f594)return null;const _0x24e9ee=_0x85f594['structuredContent'];if(_0x24e9ee?.[_0x1036d2(0x25c)]&&typeof _0x24e9ee[_0x1036d2(0x25c)]===_0x5258ed[_0x1036d2(0x1eb)])return _0x24e9ee['token'];if(_0x85f594[_0x1036d2(0x1fb)]){const _0x553312=_0x85f594['content'];throw new Error('Server\x20returned\x20error:\x20'+(_0x553312?.[0x0]?.['text']??'Unknown\x20error'));}const _0x1f9964=_0x85f594['content'];if(_0x1f9964)for(const _0x4ca356 of _0x1f9964){if(_0x4ca356[_0x1036d2(0x225)]===_0x5258ed['QaxaO']&&_0x4ca356[_0x1036d2(0x235)]){try{const _0x5889bd=JSON['parse'](_0x4ca356['text']);if(typeof _0x5889bd?.['token']==='string')return _0x5889bd[_0x1036d2(0x25c)];}catch{}const _0x49f48d=_0x4ca356['text']['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x49f48d)return _0x49f48d[0x1];}}return null;}
@@ -0,0 +1 @@
1
+ (function(_0x20ee61,_0x5d2ac6){const _0x2820e5=_0x3267,_0x49c71a=_0x20ee61();while(!![]){try{const _0x2ae43e=-parseInt(_0x2820e5(0x21f))/0x1*(-parseInt(_0x2820e5(0x1fa))/0x2)+-parseInt(_0x2820e5(0x21a))/0x3*(-parseInt(_0x2820e5(0x1f5))/0x4)+-parseInt(_0x2820e5(0x232))/0x5*(parseInt(_0x2820e5(0x20e))/0x6)+-parseInt(_0x2820e5(0x231))/0x7*(-parseInt(_0x2820e5(0x215))/0x8)+parseInt(_0x2820e5(0x22a))/0x9+-parseInt(_0x2820e5(0x23e))/0xa*(parseInt(_0x2820e5(0x212))/0xb)+-parseInt(_0x2820e5(0x219))/0xc*(parseInt(_0x2820e5(0x227))/0xd);if(_0x2ae43e===_0x5d2ac6)break;else _0x49c71a['push'](_0x49c71a['shift']());}catch(_0x14f7b7){_0x49c71a['push'](_0x49c71a['shift']());}}}(_0x1e06,0x4e565));import{readFile,rm}from'fs/promises';import{existsSync}from'fs';import{join}from'path';function _0x1e06(){const _0x2357f2=['185861djRPwZ','\x20\x20⚠\x20','tEDyP',',\x20baseUrl\x20override\x20→\x20projects.json)','RANGER_TEST_PASSWORD','length','ZvAuQ','env','3586791weyFoV',':\x20failed\x20to\x20delete\x20local\x20dir\x20','fKGBp','3728691RCTmLr','ovLkf','Aborted.','migrate','zsdcd','authJsonPath','profile.migrate.started','119pUYEvC','22965geaBCk','SvdEk','trackPhaseStart','AXaUu','HDJJo','BFAJD','trackPhaseEnd','kind','AfmiI','environments','log','preserveBaseUrl','50KdynuK','\x20migrated\x20to\x20cloud\x20(env:\x20','idJpj','yHTvY','KQZXT','some','sdbxO','profile.migrate.succeeded','saveCreds','profileName',':\x20--save-creds\x20requested,\x20but\x20RANGER_TEST_USERNAME/PASSWORD\x20not\x20set\x20in\x20env.','OmPkg','\x20profile','htXCk','yTQvX','name_conflict','\x20\x20✓\x20',',\x20matches\x20','25436dhjVqj','rsGAu','No\x20cloud\x20profile\x20auth\x20config\x20found\x20for\x20this\x20org.\x20Migration\x20requires\x20at\x20least\x20one\x20configured\x20auth\x20environment.','settings','join','4jwvJBN','ZXgot','reason','AsRiS','baseUrl','\x20migrated','NCtyF','skip','keys','\x20skipped','message','no\x20baseUrl\x20in\x20settings.json','RNFyP','After\x20migration,\x20uncommit\x20it:','dryRun','\x20→\x20skip\x20(',':\x20session\x20upload\x20failed\x20(','Continuing\x20with\x20migration...','push','cwd','708cVLACf','Warning:\x20.ranger/\x20is\x20tracked\x20in\x20this\x20git\x20repo.','\x20\x20✗\x20','envKey','1262547HGexuM','padEnd','lCphO','145784YxHsax','yWrXR','\x20→\x20cloud\x20(env:\x20','Nhfdb','12AVIrrx','291MEsBPj','ies','entries','isTTY','ZReUW'];_0x1e06=function(){return _0x2357f2;};return _0x1e06();}import _0x28ea0f 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';import{isPathGitTracked}from'./utils/gitTracked.js';function _0x3267(_0x2ad2e1,_0x24a2ee){_0x2ad2e1=_0x2ad2e1-0x1f3;const _0x1e0617=_0x1e06();let _0x3267fb=_0x1e0617[_0x2ad2e1];return _0x3267fb;}function formatPlanLine(_0x232c34){const _0x5f31fd=_0x3267;if(_0x232c34[_0x5f31fd(0x239)]===_0x5f31fd(0x201))return'\x20\x20'+_0x232c34[_0x5f31fd(0x247)][_0x5f31fd(0x213)](0x1e)+_0x5f31fd(0x209)+_0x232c34[_0x5f31fd(0x1fc)]+')';if(_0x232c34[_0x5f31fd(0x23d)]&&_0x232c34['baseUrl'])return'\x20\x20'+_0x232c34['profileName']['padEnd'](0x1e)+'\x20→\x20cloud\x20(env:\x20'+_0x232c34[_0x5f31fd(0x211)]+',\x20preserving\x20baseUrl\x20'+_0x232c34[_0x5f31fd(0x1fe)]+'\x20as\x20project\x20override)';if(_0x232c34[_0x5f31fd(0x1fe)])return'\x20\x20'+_0x232c34['profileName'][_0x5f31fd(0x213)](0x1e)+'\x20→\x20cloud\x20(env:\x20'+_0x232c34[_0x5f31fd(0x211)]+_0x5f31fd(0x1f4)+_0x232c34['baseUrl']+')';return'\x20\x20'+_0x232c34['profileName']['padEnd'](0x1e)+_0x5f31fd(0x217)+_0x232c34[_0x5f31fd(0x211)]+')';}function shouldWarnGitTrackedOnce(_0xf229ec){const _0x210606=_0x3267,_0x339b04={'sdbxO':function(_0x287e57){return _0x287e57();},'htXCk':function(_0x207b50,_0x9a9943){return _0x207b50===_0x9a9943;},'dDsDH':function(_0x46092e,_0x26cfee){return _0x46092e(_0x26cfee);}},_0x2d2506=_0x339b04[_0x210606(0x244)](readProjectsConfig),_0x5d9ae5=_0x2d2506['projects'][_0xf229ec]??={},_0x58ee0f=_0x5d9ae5['_warnings']??={},_0x535ba7=_0x58ee0f['gitTrackedRanger'],_0x20f248=new Date(),_0xb5f363=_0x20f248['toISOString']()['slice'](0x0,0xa);if(_0x339b04[_0x210606(0x24b)](_0x535ba7,_0xb5f363))return![];return _0x58ee0f['gitTrackedRanger']=_0xb5f363,_0x339b04['dDsDH'](writeProjectsConfig,_0x2d2506),!![];}export async function migrateProfile(_0x3d3ab7,_0x125ba3){const _0x4dfbe8=_0x3267,_0x48b329={'AzkeC':function(_0x816468,_0x27afaa){return _0x816468===_0x27afaa;},'tRkqi':'Provide\x20a\x20profile\x20name\x20or\x20--all.\x0a\x20\x20Example:\x20ranger\x20profile\x20migrate\x20--all\x20--dry-run','ZXgot':function(_0x23f58a,_0xcf7471){return _0x23f58a===_0xcf7471;},'HXjSd':'No\x20local\x20profiles\x20found\x20to\x20migrate.','OmPkg':function(_0x4add4e,_0x2515fd){return _0x4add4e(_0x2515fd);},'BFAJD':'local\x20profile\x20directory\x20not\x20found','yHTvY':function(_0x325de9,_0x333362){return _0x325de9(_0x333362);},'idJpj':'skip','nyVGa':'no\x20matching\x20auth\x20env','Huvsq':function(_0x57dda5,_0x3fbc07){return _0x57dda5===_0x3fbc07;},'uXWnU':function(_0x32c45d,_0x2f3ae8){return _0x32c45d===_0x2f3ae8;},'fKGBp':function(_0x43a26d,_0x5d9670,_0x51cb12){return _0x43a26d(_0x5d9670,_0x51cb12);},'SvdEk':'auth.json','RNFyP':_0x4dfbe8(0x22d),'qMGCd':'Nothing\x20migrated.\x20Run\x20without\x20--dry-run\x20to\x20apply.','AfmiI':function(_0x226503,_0x29bf23){return _0x226503&&_0x29bf23;},'OqFzC':'confirm','rsGAu':'proceed','lCphO':function(_0x25186b){return _0x25186b();},'AsRiS':function(_0x65954c,_0x312de0){return _0x65954c(_0x312de0);},'tEDyP':'\x20\x20git\x20rm\x20-r\x20--cached\x20.ranger/','zsdcd':'\x20\x20echo\x20\x27.ranger/\x27\x20>>\x20.gitignore','QqUBy':_0x4dfbe8(0x20b),'AXaUu':'profile.migrate.skipped','ovLkf':function(_0x4eda77,_0x26d53d,_0x683d9,_0x38e80b){return _0x4eda77(_0x26d53d,_0x683d9,_0x38e80b);},'ZvAuQ':function(_0x3f2fec,_0x252082){return _0x3f2fec instanceof _0x252082;},'NCtyF':_0x4dfbe8(0x24d),'KQZXT':'utf-8','KXstR':function(_0x3fe4a7,_0x488e2d,_0x4bda1c){return _0x3fe4a7(_0x488e2d,_0x4bda1c);},'yTQvX':function(_0x4863a8,_0x3d1258){return _0x4863a8 instanceof _0x3d1258;},'yWrXR':function(_0x1a82b3,_0x985ecc,_0x3d6f7a){return _0x1a82b3(_0x985ecc,_0x3d6f7a);},'ZReUW':function(_0x177779,_0x369712){return _0x177779(_0x369712);},'Nhfdb':function(_0xbae068,_0x44f8b6){return _0xbae068>_0x44f8b6;},'oeNyv':function(_0x1d782c,_0x818984){return _0x1d782c===_0x818984;},'HDJJo':_0x4dfbe8(0x21b)};if(!_0x3d3ab7[_0x4dfbe8(0x247)]&&!_0x3d3ab7['all'])throw new Error(_0x48b329['tRkqi']);let _0x4ef71e;try{_0x4ef71e=await fetchAuthConfig();}catch(_0x40c63a){throw new Error('Could\x20not\x20fetch\x20auth\x20config\x20('+(_0x40c63a instanceof Error?_0x40c63a[_0x4dfbe8(0x204)]:String(_0x40c63a))+').\x20Run:\x20ranger\x20setup');}if(!_0x4ef71e||!_0x4ef71e['environments']||_0x48b329['ZXgot'](Object[_0x4dfbe8(0x202)](_0x4ef71e[_0x4dfbe8(0x23b)])['length'],0x0))throw new Error(_0x4dfbe8(0x1f7));const _0x1f6e91=[];if(_0x3d3ab7['all']){const {envNames:_0x36326e,envTypes:_0x5614b7}=await getEnvNames();for(const _0x2c4565 of _0x36326e){if(_0x5614b7[_0x2c4565]==='ci')continue;_0x1f6e91['push'](_0x2c4565);}}else _0x3d3ab7[_0x4dfbe8(0x247)]&&_0x1f6e91[_0x4dfbe8(0x20c)](_0x3d3ab7[_0x4dfbe8(0x247)]);if(_0x1f6e91[_0x4dfbe8(0x224)]===0x0){console['log'](_0x48b329['HXjSd']);return;}const _0x322ad0=[];for(const _0x3e13dd of _0x1f6e91){const _0x406eac=_0x48b329[_0x4dfbe8(0x249)](getEnvDir,_0x3e13dd);if(!_0x48b329['OmPkg'](existsSync,_0x406eac)){_0x322ad0['push']({'kind':_0x4dfbe8(0x201),'profileName':_0x3e13dd,'reason':_0x48b329[_0x4dfbe8(0x237)]});continue;}const _0x5ea7f6=await _0x48b329[_0x4dfbe8(0x241)](loadSettings,_0x3e13dd),_0x50c42f=_0x5ea7f6[_0x4dfbe8(0x1fe)];if(!_0x50c42f){_0x322ad0[_0x4dfbe8(0x20c)]({'kind':_0x48b329['idJpj'],'profileName':_0x3e13dd,'reason':_0x4dfbe8(0x205)});continue;}const _0x3c9643=matchAuthEnvironment(_0x50c42f,_0x4ef71e);if(!_0x3c9643){_0x322ad0['push']({'kind':_0x48b329[_0x4dfbe8(0x240)],'profileName':_0x3e13dd,'reason':_0x48b329['nyVGa']});continue;}const _0x104fa6=_0x4ef71e['environments'][_0x3c9643],_0x389341=_0x104fa6?.['domains']??[],_0x10a992=_0x389341[_0x4dfbe8(0x243)](_0x53782a=>{try{return _0x48b329['AzkeC'](new URL(_0x53782a)['origin'],new URL(_0x50c42f)['origin']);}catch{return![];}}),_0x346954={};for(const [_0x185a89,_0x224af9]of Object[_0x4dfbe8(0x21c)](_0x5ea7f6)){if(_0x48b329['Huvsq'](_0x185a89,'baseUrl'))continue;if(_0x48b329['uXWnU'](_0x224af9,undefined))continue;_0x346954[_0x185a89]=_0x224af9;}!_0x10a992&&(_0x346954[_0x4dfbe8(0x1fe)]=_0x50c42f);const _0x294acc=_0x48b329[_0x4dfbe8(0x229)](join,_0x406eac,_0x48b329[_0x4dfbe8(0x233)]),_0x4c8a1f=existsSync(_0x294acc);_0x322ad0[_0x4dfbe8(0x20c)]({'kind':_0x48b329[_0x4dfbe8(0x206)],'profileName':_0x3e13dd,'envKey':_0x3c9643,'baseUrl':_0x50c42f,'preserveBaseUrl':!_0x10a992,'settings':_0x346954,'authJsonPath':_0x4c8a1f?_0x294acc:null});}console[_0x4dfbe8(0x23c)]('Plan:');for(const _0x1dce6a of _0x322ad0){console['log'](formatPlanLine(_0x1dce6a));}if(_0x3d3ab7[_0x4dfbe8(0x208)]){console[_0x4dfbe8(0x23c)](_0x48b329['qMGCd']);return;}const _0x310cfc=Boolean(process['stdin']['isTTY']&&process['stdout'][_0x4dfbe8(0x21d)]),_0x3bb00a=_0x322ad0['some'](_0x4565d4=>_0x4565d4[_0x4dfbe8(0x239)]===_0x4dfbe8(0x22d));if(_0x48b329[_0x4dfbe8(0x23a)](_0x3bb00a,_0x310cfc)&&!_0x3d3ab7['yes']){const {proceed:_0x3f0a7b}=await _0x28ea0f['prompt']([{'type':_0x48b329['OqFzC'],'name':_0x48b329[_0x4dfbe8(0x1f6)],'message':'Proceed?','default':![]}]);if(!_0x3f0a7b){console['log'](_0x4dfbe8(0x22c));return;}}const _0x10b475=_0x48b329[_0x4dfbe8(0x214)](getRangerDir);let _0x895d3a=![];if(existsSync(_0x10b475))try{_0x895d3a=await isPathGitTracked(_0x10b475);}catch{_0x895d3a=![];}_0x895d3a&&_0x48b329[_0x4dfbe8(0x1fd)](shouldWarnGitTrackedOnce,process[_0x4dfbe8(0x20d)]())&&(console[_0x4dfbe8(0x23c)](_0x4dfbe8(0x20f)),console['log'](_0x4dfbe8(0x207)),console['log'](_0x48b329[_0x4dfbe8(0x221)]),console[_0x4dfbe8(0x23c)](_0x48b329[_0x4dfbe8(0x22e)]),console[_0x4dfbe8(0x23c)](_0x48b329['QqUBy']));let _0x232834=0x0,_0x56ff4e=0x0,_0x386083=0x0,_0x4bb560=0x0;for(const _0x8e7e97 of _0x322ad0){if(_0x48b329[_0x4dfbe8(0x1fb)](_0x8e7e97[_0x4dfbe8(0x239)],_0x48b329[_0x4dfbe8(0x240)])){_0x4bb560++,_0x125ba3?.[_0x4dfbe8(0x238)](_0x48b329['AXaUu'],{'profileName':_0x8e7e97['profileName'],'reason':_0x8e7e97['reason']});continue;}_0x125ba3?.[_0x4dfbe8(0x234)](_0x4dfbe8(0x230),{'profileName':_0x8e7e97[_0x4dfbe8(0x247)],'envKey':_0x8e7e97[_0x4dfbe8(0x211)]});try{try{await _0x48b329[_0x4dfbe8(0x22b)](createCloudProfile,_0x8e7e97[_0x4dfbe8(0x247)],_0x8e7e97['envKey'],{'settings':_0x8e7e97[_0x4dfbe8(0x1f8)]});}catch(_0x82bd29){if(_0x48b329[_0x4dfbe8(0x225)](_0x82bd29,ApiError)&&_0x82bd29['status']===0x199){console[_0x4dfbe8(0x23c)](_0x4dfbe8(0x220)+_0x8e7e97['profileName']+':\x20cloud\x20profile\x20with\x20this\x20name\x20already\x20exists.\x20Skipping.'),_0x4bb560++,_0x125ba3?.['trackPhaseEnd'](_0x48b329[_0x4dfbe8(0x235)],{'profileName':_0x8e7e97['profileName'],'reason':_0x48b329[_0x4dfbe8(0x200)]});continue;}throw _0x82bd29;}let _0x2ed994=![],_0x22d741=![];if(_0x8e7e97['authJsonPath'])try{const _0x697bbd=await readFile(_0x8e7e97[_0x4dfbe8(0x22f)],_0x48b329[_0x4dfbe8(0x242)]),_0x3a95a=JSON['parse'](_0x697bbd);await _0x48b329['KXstR'](uploadCloudProfileSession,_0x8e7e97[_0x4dfbe8(0x247)],_0x3a95a),_0x2ed994=!![];}catch(_0x1c58a4){_0x22d741=!![],console['log'](_0x4dfbe8(0x220)+_0x8e7e97['profileName']+_0x4dfbe8(0x20a)+(_0x48b329['yTQvX'](_0x1c58a4,Error)?_0x1c58a4['message']:String(_0x1c58a4))+').\x20Cloud\x20profile\x20created;\x20local\x20auth.json\x20left\x20in\x20place.');}let _0x452ca1=![];if(_0x3d3ab7[_0x4dfbe8(0x246)]){const _0x32ae64=process[_0x4dfbe8(0x226)]['RANGER_TEST_USERNAME'],_0x488de6=process[_0x4dfbe8(0x226)][_0x4dfbe8(0x223)];if(_0x32ae64&&_0x488de6)try{await _0x48b329[_0x4dfbe8(0x22b)](saveCloudProfileCredentials,_0x8e7e97['profileName'],_0x32ae64,_0x488de6),_0x452ca1=!![];}catch(_0x28563f){console[_0x4dfbe8(0x23c)]('\x20\x20⚠\x20'+_0x8e7e97[_0x4dfbe8(0x247)]+':\x20failed\x20to\x20save\x20credentials\x20('+(_0x28563f instanceof Error?_0x28563f['message']:String(_0x28563f))+').');}else console[_0x4dfbe8(0x23c)]('\x20\x20⚠\x20'+_0x8e7e97[_0x4dfbe8(0x247)]+_0x4dfbe8(0x248));}if(_0x8e7e97[_0x4dfbe8(0x23d)]&&_0x8e7e97[_0x4dfbe8(0x1fe)])try{setProfileOverride(process['cwd'](),_0x8e7e97['profileName'],_0x4dfbe8(0x1fe),_0x8e7e97[_0x4dfbe8(0x1fe)]);}catch(_0x5c1621){console[_0x4dfbe8(0x23c)]('\x20\x20⚠\x20'+_0x8e7e97[_0x4dfbe8(0x247)]+':\x20failed\x20to\x20write\x20projects.json\x20override\x20('+(_0x48b329[_0x4dfbe8(0x24c)](_0x5c1621,Error)?_0x5c1621[_0x4dfbe8(0x204)]:_0x48b329['OmPkg'](String,_0x5c1621))+').');}const _0x16933c=getEnvDir(_0x8e7e97['profileName']);if(!_0x22d741&&existsSync(_0x16933c))try{await _0x48b329[_0x4dfbe8(0x216)](rm,_0x16933c,{'recursive':!![],'force':!![]}),_0x56ff4e++;}catch(_0xda0d99){console['log'](_0x4dfbe8(0x220)+_0x8e7e97[_0x4dfbe8(0x247)]+_0x4dfbe8(0x228)+_0x16933c+'\x20('+(_0x48b329[_0x4dfbe8(0x225)](_0xda0d99,Error)?_0xda0d99[_0x4dfbe8(0x204)]:String(_0xda0d99))+').');}_0x232834++,_0x8e7e97[_0x4dfbe8(0x23d)]&&_0x8e7e97[_0x4dfbe8(0x1fe)]?console[_0x4dfbe8(0x23c)]('\x20\x20✓\x20'+_0x8e7e97[_0x4dfbe8(0x247)]+_0x4dfbe8(0x23f)+_0x8e7e97[_0x4dfbe8(0x211)]+_0x4dfbe8(0x222)):console['log'](_0x4dfbe8(0x1f3)+_0x8e7e97[_0x4dfbe8(0x247)]+_0x4dfbe8(0x23f)+_0x8e7e97['envKey']+')'),_0x125ba3?.['trackPhaseEnd'](_0x4dfbe8(0x245),{'profileName':_0x8e7e97[_0x4dfbe8(0x247)],'envKey':_0x8e7e97['envKey'],'wasGitTracked':_0x895d3a,'hadSession':_0x2ed994,'savedCreds':_0x452ca1});}catch(_0x195ff2){_0x386083++,console['log'](_0x4dfbe8(0x210)+_0x8e7e97[_0x4dfbe8(0x247)]+'\x20failed:\x20'+(_0x48b329['yTQvX'](_0x195ff2,Error)?_0x195ff2['message']:String(_0x195ff2))),_0x125ba3?.['trackPhaseEnd']('profile.migrate.failed',{'profileName':_0x8e7e97['profileName'],'error':_0x195ff2 instanceof Error?_0x195ff2['message']:_0x48b329[_0x4dfbe8(0x21e)](String,_0x195ff2)});}}const _0x3706a7=[];if(_0x48b329[_0x4dfbe8(0x218)](_0x232834,0x0))_0x3706a7['push'](_0x232834+_0x4dfbe8(0x24a)+(_0x48b329['oeNyv'](_0x232834,0x1)?'':'s')+_0x4dfbe8(0x1ff));if(_0x48b329['Nhfdb'](_0x56ff4e,0x0))_0x3706a7[_0x4dfbe8(0x20c)]('Deleted\x20'+_0x56ff4e+'\x20local\x20director'+(_0x56ff4e===0x1?'y':_0x48b329[_0x4dfbe8(0x236)]));if(_0x4bb560>0x0)_0x3706a7[_0x4dfbe8(0x20c)](_0x4bb560+_0x4dfbe8(0x203));if(_0x48b329['Nhfdb'](_0x386083,0x0))_0x3706a7[_0x4dfbe8(0x20c)](_0x386083+'\x20failed');if(_0x3706a7['length']>0x0)console[_0x4dfbe8(0x23c)](_0x3706a7[_0x4dfbe8(0x1f9)]('.\x20')+'.');}
@@ -1 +1 @@
1
- (function(_0x566b11,_0x172bcb){const _0x5ae464=_0x70b3,_0xae7aac=_0x566b11();while(!![]){try{const _0xfe97c0=parseInt(_0x5ae464(0x189))/0x1+-parseInt(_0x5ae464(0x165))/0x2+-parseInt(_0x5ae464(0x18d))/0x3+-parseInt(_0x5ae464(0x18b))/0x4*(parseInt(_0x5ae464(0x188))/0x5)+parseInt(_0x5ae464(0x17a))/0x6+parseInt(_0x5ae464(0x175))/0x7+-parseInt(_0x5ae464(0x178))/0x8*(-parseInt(_0x5ae464(0x185))/0x9);if(_0xfe97c0===_0x172bcb)break;else _0xae7aac['push'](_0xae7aac['shift']());}catch(_0x1adfbf){_0xae7aac['push'](_0xae7aac['shift']());}}}(_0x7e5a,0x46792));import{join}from'path';import{existsSync}from'fs';import _0x33a0f2 from'inquirer';import{skillup}from'../skillup.js';function _0x70b3(_0xb504d8,_0x304f9f){_0xb504d8=_0xb504d8-0x161;const _0x7e5a87=_0x7e5a();let _0x70b356=_0x7e5a87[_0xb504d8];return _0x70b356;}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';function _0x7e5a(){const _0xa2d24d=['334737MRwsBU','cLQSo','CWbeG','jJSKb','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','PCAiI','260684vsKWNd','ZoQQK','ranger','MOwOF','WZxPL','pPxNW','LSFDA','list','error','wantsSkillup','push','plugin','bvbzT','VjQnJ','HbpLH','user','60018MtxVNH','confirm','XXZAq','27592hnIjkW','log','2515392tmzCGy','\x0aYou\x20can\x20install\x20manually\x20with:','\x20level)...\x0a','MUjOm','kggyc','NrNRt','--scope','output','✓\x20Ranger\x20skills\x20already\x20installed','oYHLI','success','261JkUhGd','HFOpk','✓\x20Claude\x20Code\x20plugin\x20enabled','594140yRZiaH','478064GbTtmo','seToj','16YtjAAp','project'];_0x7e5a=function(){return _0xa2d24d;};return _0x7e5a();}import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0xc0cabf){const _0x69a12f=_0x70b3,_0x2296fc={'MUjOm':function(_0x14e0c3,_0x27b8b3){return _0x14e0c3(_0x27b8b3);},'LSFDA':'ranger@trailhead','oYHLI':_0x69a12f(0x163),'MOwOF':function(_0x550877,_0xa11fc3){return _0x550877(_0xa11fc3);},'XXZAq':function(_0x4bc7c6,_0x4c9a79,_0x31f0d5){return _0x4bc7c6(_0x4c9a79,_0x31f0d5);},'kggyc':'.claude','ZoQQK':'pluginScope','mZzwX':'Where\x20should\x20the\x20plugin\x20be\x20installed?','rHZVj':'User\x20(available\x20in\x20all\x20your\x20projects)','AOkaz':_0x69a12f(0x174),'PCAiI':function(_0x2ba0ab,_0x495d3a){return _0x2ba0ab(_0x495d3a);},'CWbeG':'✓\x20Marketplace\x20already\x20added','HFOpk':'marketplace','bvbzT':'add','Bsxqd':'ranger-testing/trailhead','VjQnJ':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','IGAzr':_0x69a12f(0x180),'NrNRt':function(_0x34d3e1,_0x46753e){return _0x34d3e1===_0x46753e;},'WZxPL':_0x69a12f(0x18c),'IoPHQ':_0x69a12f(0x187)},_0x4180d7=await _0x2296fc[_0x69a12f(0x17d)](isPluginInstalled,_0x2296fc['LSFDA']);if(_0x4180d7)return console['log'](_0x2296fc[_0x69a12f(0x183)]),![];const _0x2cbe8a=_0x2296fc[_0x69a12f(0x168)](existsSync,_0x2296fc[_0x69a12f(0x177)](join,getProjectRoot(),_0x2296fc[_0x69a12f(0x17e)]));let _0x5b749d;if(_0xc0cabf)_0x5b749d=_0xc0cabf;else{if(_0x2cbe8a)_0x5b749d=_0x69a12f(0x18c);else{console['log']('\x0a📦\x20Claude\x20Code\x20Plugin\x0a');const _0x2a7f3=await _0x33a0f2['prompt']([{'type':_0x69a12f(0x16c),'name':_0x2296fc[_0x69a12f(0x166)],'message':_0x2296fc['mZzwX'],'choices':[{'name':_0x2296fc['rHZVj'],'value':'user'},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':'project'}],'default':_0x2296fc['AOkaz']}]);_0x5b749d=_0x2a7f3['pluginScope'];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x5b749d+_0x69a12f(0x17c));const _0x5edf90=await _0x2296fc[_0x69a12f(0x164)](isMarketplaceAdded,'trailhead');let _0x4954b2=_0x5edf90;if(_0x5edf90)console['log'](_0x2296fc[_0x69a12f(0x161)]);else{const _0x1879a3=await runClaudeCommand([_0x69a12f(0x170),_0x2296fc[_0x69a12f(0x186)],_0x2296fc[_0x69a12f(0x171)],_0x2296fc['Bsxqd']]);!_0x1879a3['success']?(console[_0x69a12f(0x16d)]('❌\x20Failed\x20to\x20add\x20marketplace:',_0x1879a3[_0x69a12f(0x16d)]),console['log'](_0x69a12f(0x17b)),console['log'](_0x2296fc[_0x69a12f(0x172)]),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x5b749d)):_0x4954b2=!![];}if(_0x4954b2){const _0x2c9098=await runClaudeCommand(['plugin','install',_0x2296fc[_0x69a12f(0x16b)],_0x2296fc['IGAzr'],_0x5b749d]);if(!_0x2c9098[_0x69a12f(0x184)])console[_0x69a12f(0x16d)]('❌\x20Failed\x20to\x20install\x20plugin:',_0x2c9098[_0x69a12f(0x16d)]),console[_0x69a12f(0x179)](_0x69a12f(0x17b)),console[_0x69a12f(0x179)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x5b749d);else{console['log']('✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully');const _0x4672e9=[_0x69a12f(0x170),'enable','ranger@trailhead'];_0x2296fc[_0x69a12f(0x17f)](_0x5b749d,_0x2296fc[_0x69a12f(0x169)])&&_0x4672e9[_0x69a12f(0x16f)]('--scope',_0x2296fc['WZxPL']);const _0x335be9=await _0x2296fc[_0x69a12f(0x177)](runClaudeCommand,_0x4672e9,{'captureOutput':!![]}),_0x1fc6cc=_0x335be9[_0x69a12f(0x181)]?.['includes']('already\x20enabled');!_0x335be9['success']&&!_0x1fc6cc?console['error']('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x335be9['error']):console[_0x69a12f(0x179)](_0x2296fc['IoPHQ']);}}return!![];}export async function ensureClaudeSkills(_0x32ffaa){const _0x2b17b3=_0x70b3,_0x122518={'cLQSo':function(_0x4ebb86,_0x54fe2c){return _0x4ebb86(_0x54fe2c);},'HbpLH':function(_0x331718,_0x25738e,_0x557503,_0x48f8f4){return _0x331718(_0x25738e,_0x557503,_0x48f8f4);},'alRYd':'SKILL.md','jJSKb':function(_0x2129ef,_0xd7c614){return _0x2129ef(_0xd7c614);},'seToj':'project','oqiZB':_0x2b17b3(0x167),'HNSJC':_0x2b17b3(0x182),'pPxNW':_0x2b17b3(0x16e)},_0x3d9c98=_0x122518[_0x2b17b3(0x18e)](existsSync,_0x122518[_0x2b17b3(0x173)](join,_0x122518['cLQSo'](getSkillsDir,'user'),'ranger',_0x122518['alRYd'])),_0x4b09e8=_0x122518['cLQSo'](existsSync,join(_0x122518['jJSKb'](getSkillsDir,_0x122518[_0x2b17b3(0x18a)]),_0x122518['oqiZB'],_0x122518['alRYd']));if(_0x3d9c98||_0x4b09e8)return console[_0x2b17b3(0x179)](_0x122518['HNSJC']),![];const _0x485872=_0x122518[_0x2b17b3(0x162)](existsSync,join(getProjectRoot(),'.claude'));let _0x2bbbb4=!![];if(_0x32ffaa)await skillup({'autoInstall':_0x32ffaa,'suppressUsage':!![]});else{if(_0x485872)await skillup({'autoInstall':_0x122518['seToj'],'suppressUsage':!![]});else{const _0x3c4535=await _0x33a0f2['prompt']([{'type':_0x2b17b3(0x176),'name':_0x122518[_0x2b17b3(0x16a)],'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x2bbbb4=_0x3c4535['wantsSkillup'],_0x2bbbb4&&await skillup({'suppressUsage':!![]});}}return _0x2bbbb4;}
1
+ function _0x1efc(_0x5dee12,_0x401da1){_0x5dee12=_0x5dee12-0x1da;const _0x270736=_0x2707();let _0x1efc2c=_0x270736[_0x5dee12];return _0x1efc2c;}(function(_0x37b2d5,_0x54affb){const _0x37edd1=_0x1efc,_0x2f9a53=_0x37b2d5();while(!![]){try{const _0x523bd2=parseInt(_0x37edd1(0x213))/0x1+parseInt(_0x37edd1(0x1eb))/0x2*(-parseInt(_0x37edd1(0x1f7))/0x3)+-parseInt(_0x37edd1(0x1fb))/0x4*(parseInt(_0x37edd1(0x205))/0x5)+-parseInt(_0x37edd1(0x1e6))/0x6*(-parseInt(_0x37edd1(0x207))/0x7)+-parseInt(_0x37edd1(0x1e9))/0x8*(parseInt(_0x37edd1(0x1f5))/0x9)+-parseInt(_0x37edd1(0x1f1))/0xa+parseInt(_0x37edd1(0x209))/0xb*(parseInt(_0x37edd1(0x1f9))/0xc);if(_0x523bd2===_0x54affb)break;else _0x2f9a53['push'](_0x2f9a53['shift']());}catch(_0x321c63){_0x2f9a53['push'](_0x2f9a53['shift']());}}}(_0x2707,0x1f714));import{join}from'path';import{existsSync}from'fs';import _0x288aae from'inquirer';function _0x2707(){const _0x4c4c41=['PQBQh','\x0aYou\x20can\x20install\x20manually\x20with:','gYxKm','pluginScope','error','Where\x20should\x20the\x20plugin\x20be\x20installed?','250396KdXVEE','QedTV','marketplace','install','prompt','SKILL.md','tJqfq','User\x20(available\x20in\x20all\x20your\x20projects)','pRmoP','YqDhJ','confirm','project','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','MNHbF','plugin','push','ranger-testing/trailhead','pQULC','1878Mgnatc','⚠\x20Failed\x20to\x20enable\x20plugin:','WaBJt','248VRWsdL','enable','4jesVHi','TgyFc','✓\x20Marketplace\x20already\x20added','ranger@trailhead','❌\x20Failed\x20to\x20add\x20marketplace:','UGsvs','1790230sdhKSA','ranger','jWkPm','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','30510EQXNCw','TDIKj','331851WJMmuc','CbCtN','73164ZUsyJF','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','97004nAKubx','iBeMj','KScjU','trailhead','YNOzZ','VMTTE','wantsSkillup','user','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','Would\x20you\x20like\x20to\x20install\x20skills?','35hiljyC','\x20level)...\x0a','4879rdYOac','✓\x20Ranger\x20skills\x20already\x20installed','605lKTtno','add','log','LHXoQ'];_0x2707=function(){return _0x4c4c41;};return _0x2707();}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x11ae01){const _0x2a4c49=_0x1efc,_0x5ddfc6={'LHXoQ':function(_0x639689,_0x2d409d){return _0x639689(_0x2d409d);},'uEywr':_0x2a4c49(0x203),'VMTTE':function(_0x18d5b6,_0x1bce82,_0x394b21){return _0x18d5b6(_0x1bce82,_0x394b21);},'MNHbF':'.claude','ZZDEZ':'project','CbCtN':_0x2a4c49(0x210),'pRmoP':_0x2a4c49(0x212),'YqDhJ':_0x2a4c49(0x1db),'pQULC':'user','PQBQh':_0x2a4c49(0x1ed),'YNOzZ':_0x2a4c49(0x215),'WaBJt':_0x2a4c49(0x20a),'iBeMj':_0x2a4c49(0x1ef),'JZCvK':'\x0aYou\x20can\x20install\x20manually\x20with:','jWkPm':'ranger@trailhead','KScjU':'--scope','gYxKm':'❌\x20Failed\x20to\x20install\x20plugin:','akDjt':'plugin','UGsvs':_0x2a4c49(0x1ea),'tJqfq':function(_0xe7ea07,_0x202e1a){return _0xe7ea07===_0x202e1a;},'LoKYZ':'already\x20enabled'},_0x4b4514=await _0x5ddfc6[_0x2a4c49(0x20c)](isPluginInstalled,_0x2a4c49(0x1ee));if(_0x4b4514)return console['log'](_0x5ddfc6['uEywr']),![];const _0x4f28b5=existsSync(_0x5ddfc6[_0x2a4c49(0x200)](join,getProjectRoot(),_0x5ddfc6[_0x2a4c49(0x1e1)]));let _0x43c3d3;if(_0x11ae01)_0x43c3d3=_0x11ae01;else{if(_0x4f28b5)_0x43c3d3=_0x5ddfc6['ZZDEZ'];else{console['log'](_0x2a4c49(0x1e0));const _0x139dab=await _0x288aae[_0x2a4c49(0x217)]([{'type':'list','name':_0x5ddfc6[_0x2a4c49(0x1f8)],'message':_0x5ddfc6[_0x2a4c49(0x1dc)],'choices':[{'name':_0x5ddfc6[_0x2a4c49(0x1dd)],'value':_0x5ddfc6[_0x2a4c49(0x1e5)]},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x2a4c49(0x1df)}],'default':_0x5ddfc6['pQULC']}]);_0x43c3d3=_0x139dab['pluginScope'];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x43c3d3+_0x2a4c49(0x206));const _0x4e313a=await isMarketplaceAdded(_0x2a4c49(0x1fe));let _0x5b0209=_0x4e313a;if(_0x4e313a)console['log'](_0x5ddfc6[_0x2a4c49(0x20d)]);else{const _0x39fd46=await _0x5ddfc6['LHXoQ'](runClaudeCommand,[_0x2a4c49(0x1e2),_0x5ddfc6[_0x2a4c49(0x1ff)],_0x5ddfc6[_0x2a4c49(0x1e8)],_0x2a4c49(0x1e4)]);!_0x39fd46['success']?(console['error'](_0x5ddfc6[_0x2a4c49(0x1fc)],_0x39fd46[_0x2a4c49(0x211)]),console['log'](_0x5ddfc6['JZCvK']),console[_0x2a4c49(0x20b)]('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console[_0x2a4c49(0x20b)](_0x2a4c49(0x1f4)+_0x43c3d3)):_0x5b0209=!![];}if(_0x5b0209){const _0x335c6e=await runClaudeCommand([_0x2a4c49(0x1e2),_0x2a4c49(0x216),_0x5ddfc6[_0x2a4c49(0x1f3)],_0x5ddfc6[_0x2a4c49(0x1fd)],_0x43c3d3]);if(!_0x335c6e['success'])console[_0x2a4c49(0x211)](_0x5ddfc6[_0x2a4c49(0x20f)],_0x335c6e['error']),console[_0x2a4c49(0x20b)](_0x2a4c49(0x20e)),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x43c3d3);else{console[_0x2a4c49(0x20b)](_0x2a4c49(0x1fa));const _0x109ac6=[_0x5ddfc6['akDjt'],_0x5ddfc6[_0x2a4c49(0x1f0)],_0x5ddfc6['jWkPm']];_0x5ddfc6[_0x2a4c49(0x1da)](_0x43c3d3,_0x2a4c49(0x1df))&&_0x109ac6[_0x2a4c49(0x1e3)]('--scope',_0x5ddfc6['ZZDEZ']);const _0x13bcc0=await runClaudeCommand(_0x109ac6,{'captureOutput':!![]}),_0x27cfc6=_0x13bcc0['output']?.['includes'](_0x5ddfc6['LoKYZ']);!_0x13bcc0['success']&&!_0x27cfc6?console[_0x2a4c49(0x211)](_0x2a4c49(0x1e7),_0x13bcc0[_0x2a4c49(0x211)]):console[_0x2a4c49(0x20b)]('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}export async function ensureClaudeSkills(_0x1eefc0){const _0x254275=_0x1efc,_0x28996b={'yTccj':function(_0x384b2e,_0x18cc76){return _0x384b2e(_0x18cc76);},'QedTV':function(_0x52b217,_0x2fb90c,_0x8f3414,_0x591255){return _0x52b217(_0x2fb90c,_0x8f3414,_0x591255);},'meuFr':_0x254275(0x1f2),'oxABN':function(_0x52d977,_0x474cb7){return _0x52d977(_0x474cb7);},'ibJpG':function(_0x3e20c0,_0x50569d){return _0x3e20c0||_0x50569d;},'pMKcS':'.claude','tCdQI':function(_0x4d2d39,_0x38808b){return _0x4d2d39(_0x38808b);},'TDIKj':_0x254275(0x201),'TgyFc':_0x254275(0x204)},_0x28fce6=_0x28996b['yTccj'](existsSync,_0x28996b[_0x254275(0x214)](join,_0x28996b['yTccj'](getSkillsDir,_0x254275(0x202)),_0x28996b['meuFr'],'SKILL.md')),_0x455b2f=existsSync(_0x28996b['QedTV'](join,_0x28996b['oxABN'](getSkillsDir,_0x254275(0x1df)),_0x28996b['meuFr'],_0x254275(0x218)));if(_0x28996b['ibJpG'](_0x28fce6,_0x455b2f))return console['log'](_0x254275(0x208)),![];const _0x5c2b36=existsSync(join(getProjectRoot(),_0x28996b['pMKcS']));let _0x121469=!![];if(_0x1eefc0)await skillup({'autoInstall':_0x1eefc0,'suppressUsage':!![]});else{if(_0x5c2b36)await _0x28996b['tCdQI'](skillup,{'autoInstall':'project','suppressUsage':!![]});else{const _0x354425=await _0x288aae[_0x254275(0x217)]([{'type':_0x254275(0x1de),'name':_0x28996b[_0x254275(0x1f6)],'message':_0x28996b[_0x254275(0x1ec)],'default':!![]}]);_0x121469=_0x354425['wantsSkillup'],_0x121469&&await skillup({'suppressUsage':!![]});}}return _0x121469;}
@@ -1 +1 @@
1
- (function(_0x3fbd98,_0x24ab2e){const _0x5c649e=_0x544c,_0x85e0e1=_0x3fbd98();while(!![]){try{const _0x143ce6=-parseInt(_0x5c649e(0x1e3))/0x1*(-parseInt(_0x5c649e(0x1f6))/0x2)+parseInt(_0x5c649e(0x1f1))/0x3*(-parseInt(_0x5c649e(0x1e2))/0x4)+parseInt(_0x5c649e(0x1ed))/0x5+-parseInt(_0x5c649e(0x1f0))/0x6*(-parseInt(_0x5c649e(0x1f7))/0x7)+-parseInt(_0x5c649e(0x1ee))/0x8*(parseInt(_0x5c649e(0x1f5))/0x9)+-parseInt(_0x5c649e(0x1f2))/0xa+parseInt(_0x5c649e(0x1e6))/0xb*(parseInt(_0x5c649e(0x1fa))/0xc);if(_0x143ce6===_0x24ab2e)break;else _0x85e0e1['push'](_0x85e0e1['shift']());}catch(_0x41787b){_0x85e0e1['push'](_0x85e0e1['shift']());}}}(_0x5e4f,0x6cfeb));function _0x544c(_0x3e48b3,_0x2f6dd4){_0x3e48b3=_0x3e48b3-0x1df;const _0x5e4f85=_0x5e4f();let _0x544cab=_0x5e4f85[_0x3e48b3];return _0x544cab;}import{join}from'path';function _0x5e4f(){const _0x365ba6=['XmWMb','$schema','187wDxzoA','Project\x20(shared\x20with\x20team\x20via\x20git)','user','plugin','https://opencode.ai/config.json','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','opencode.json','204365PXEhgo','6808cTrJxD','✓\x20OpenCode\x20plugin\x20already\x20configured','12jASuRM','6654eUpEKu','6161940rwvREU','log','quJzC','1278riHRKX','41462VYPIkH','325913cuhWfd','oNDmr','utf-8','785676mvSDwN','\x0a📦\x20OpenCode\x20Plugin\x0a','User\x20(available\x20in\x20all\x20your\x20projects)','Yoibq','project','Failed\x20to\x20read\x20opencode.json','nOGFG','includes','152aIXiAP','1GRioYP'];_0x5e4f=function(){return _0x365ba6;};return _0x5e4f();}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x54c18c from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x56955b){const _0x37a1e8=_0x544c,_0x4f961e={'FHDCV':function(_0x555067,_0x3c1334){return _0x555067(_0x3c1334);},'oNDmr':function(_0x1411fa,_0x58620f,_0x4d1696){return _0x1411fa(_0x58620f,_0x4d1696);},'nOGFG':function(_0x12b382,_0x58d840){return _0x12b382(_0x58d840);},'XmWMb':_0x37a1e8(0x1fe),'pmqNb':'pluginScope','QFUMZ':'Where\x20should\x20the\x20plugin\x20be\x20installed?','JembB':_0x37a1e8(0x1fc),'Hvbsu':function(_0xe12c4a,_0x10f111,_0x1ee0e5){return _0xe12c4a(_0x10f111,_0x1ee0e5);},'quJzC':function(_0x173a13,_0x209941){return _0x173a13(_0x209941);},'Yoibq':'opencode.json','MOyfR':'@ranger-testing/opencode-plugin','tilIY':_0x37a1e8(0x1ea),'okanP':_0x37a1e8(0x1f9),'Gixza':_0x37a1e8(0x1df),'NKRzz':function(_0x51f618,_0x3c9997){return _0x51f618(_0x3c9997);},'qfEPY':'✓\x20OpenCode\x20plugin\x20configured'},_0x1dd310=_0x4f961e['FHDCV'](existsSync,_0x4f961e['oNDmr'](join,_0x4f961e[_0x37a1e8(0x1e0)](getOpencodeConfigDir,_0x4f961e[_0x37a1e8(0x1e4)]),_0x37a1e8(0x1ec)));let _0x3fd065;if(_0x56955b)_0x3fd065=_0x56955b;else{if(_0x1dd310)_0x3fd065='project';else{console['log'](_0x37a1e8(0x1fb));const _0x34726e=await _0x54c18c['prompt']([{'type':'list','name':_0x4f961e['pmqNb'],'message':_0x4f961e['QFUMZ'],'choices':[{'name':_0x4f961e['JembB'],'value':_0x37a1e8(0x1e8)},{'name':_0x37a1e8(0x1e7),'value':_0x4f961e['XmWMb']}],'default':'user'}]);_0x3fd065=_0x34726e['pluginScope'];}}const _0x2d352c=_0x4f961e['Hvbsu'](join,_0x4f961e[_0x37a1e8(0x1f4)](getOpencodeConfigDir,_0x3fd065),_0x4f961e[_0x37a1e8(0x1fd)]),_0x325cb9=_0x4f961e['MOyfR'],_0x43bbef=_0x4f961e['tilIY'];let _0x508ec9={};if(existsSync(_0x2d352c))try{const _0x37d12d=await readFile(_0x2d352c,_0x4f961e['okanP']);_0x508ec9=JSON['parse'](_0x37d12d);}catch(_0x550ec3){return console['error'](_0x37a1e8(0x1eb)),{'configured':![],'scope':_0x3fd065,'error':_0x4f961e['Gixza'],'details':_0x550ec3};}const _0x10f041=Array['isArray'](_0x508ec9['plugin'])?_0x508ec9[_0x37a1e8(0x1e9)]:[];if(_0x10f041[_0x37a1e8(0x1e1)](_0x325cb9))return console[_0x37a1e8(0x1f3)](_0x37a1e8(0x1ef)),{'configured':![],'scope':_0x3fd065};return _0x508ec9[_0x37a1e8(0x1e5)]=_0x508ec9[_0x37a1e8(0x1e5)]||_0x43bbef,_0x508ec9['plugin']=[..._0x10f041,_0x325cb9],await _0x4f961e[_0x37a1e8(0x1f8)](mkdir,_0x4f961e['NKRzz'](getOpencodeConfigDir,_0x3fd065),{'recursive':!![]}),await writeFile(_0x2d352c,JSON['stringify'](_0x508ec9,null,0x2)+'\x0a'),console['log'](_0x4f961e['qfEPY']),{'configured':!![],'scope':_0x3fd065};}
1
+ (function(_0x51913c,_0x222294){const _0xa284cc=_0x24ba,_0x4b9df6=_0x51913c();while(!![]){try{const _0xbe1897=-parseInt(_0xa284cc(0xdf))/0x1+-parseInt(_0xa284cc(0xe0))/0x2*(-parseInt(_0xa284cc(0xd7))/0x3)+-parseInt(_0xa284cc(0xe7))/0x4+-parseInt(_0xa284cc(0xd2))/0x5+-parseInt(_0xa284cc(0xda))/0x6+parseInt(_0xa284cc(0xcf))/0x7*(-parseInt(_0xa284cc(0xe5))/0x8)+parseInt(_0xa284cc(0xd4))/0x9*(parseInt(_0xa284cc(0xe3))/0xa);if(_0xbe1897===_0x222294)break;else _0x4b9df6['push'](_0x4b9df6['shift']());}catch(_0x2233e6){_0x4b9df6['push'](_0x4b9df6['shift']());}}}(_0x17b3,0xe089f));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x71da78 from'inquirer';function _0x24ba(_0xd47d43,_0x354b94){_0xd47d43=_0xd47d43-0xcd;const _0x17b318=_0x17b3();let _0x24baca=_0x17b318[_0xd47d43];return _0x24baca;}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x22ce48){const _0x41edb8=_0x24ba,_0x4dd614={'PybPG':function(_0x116ddf,_0x8c936c,_0x51e0f9){return _0x116ddf(_0x8c936c,_0x51e0f9);},'Mivrr':_0x41edb8(0xe2),'LiFUz':'project','CeuUz':'\x0a📦\x20OpenCode\x20Plugin\x0a','tvEyl':'list','ZmDDo':'user','ZxODH':_0x41edb8(0xdb),'QqrQD':function(_0x556d5b,_0x488238){return _0x556d5b(_0x488238);},'uqnaa':'utf-8','yrYsJ':'✓\x20OpenCode\x20plugin\x20already\x20configured','ZxPwQ':function(_0x38a5c6,_0x50f16d){return _0x38a5c6(_0x50f16d);},'sXaCn':_0x41edb8(0xe6)},_0x2fd71c=existsSync(_0x4dd614[_0x41edb8(0xcd)](join,getOpencodeConfigDir('project'),_0x4dd614['Mivrr']));let _0x92d0a1;if(_0x22ce48)_0x92d0a1=_0x22ce48;else{if(_0x2fd71c)_0x92d0a1=_0x4dd614[_0x41edb8(0xe1)];else{console[_0x41edb8(0xd6)](_0x4dd614[_0x41edb8(0xd3)]);const _0x14e296=await _0x71da78['prompt']([{'type':_0x4dd614['tvEyl'],'name':_0x41edb8(0xdc),'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x41edb8(0xd8),'value':_0x4dd614['ZmDDo']},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':'project'}],'default':_0x4dd614[_0x41edb8(0xe4)]}]);_0x92d0a1=_0x14e296['pluginScope'];}}const _0x4e6b30=_0x4dd614[_0x41edb8(0xcd)](join,getOpencodeConfigDir(_0x92d0a1),_0x4dd614[_0x41edb8(0xd9)]),_0x1a198e='@ranger-testing/opencode-plugin',_0x15e210=_0x4dd614['ZxODH'];let _0x3c6fbc={};if(_0x4dd614['QqrQD'](existsSync,_0x4e6b30))try{const _0x44eee5=await _0x4dd614['PybPG'](readFile,_0x4e6b30,_0x4dd614[_0x41edb8(0xd0)]);_0x3c6fbc=JSON['parse'](_0x44eee5);}catch(_0x10f82b){return console[_0x41edb8(0xce)](_0x41edb8(0xde)),{'configured':![],'scope':_0x92d0a1,'error':'Failed\x20to\x20read\x20opencode.json','details':_0x10f82b};}const _0x7956dd=Array[_0x41edb8(0xdd)](_0x3c6fbc['plugin'])?_0x3c6fbc['plugin']:[];if(_0x7956dd['includes'](_0x1a198e))return console[_0x41edb8(0xd6)](_0x4dd614['yrYsJ']),{'configured':![],'scope':_0x92d0a1};return _0x3c6fbc['$schema']=_0x3c6fbc['$schema']||_0x15e210,_0x3c6fbc[_0x41edb8(0xd1)]=[..._0x7956dd,_0x1a198e],await _0x4dd614[_0x41edb8(0xcd)](mkdir,_0x4dd614['ZxPwQ'](getOpencodeConfigDir,_0x92d0a1),{'recursive':!![]}),await writeFile(_0x4e6b30,JSON['stringify'](_0x3c6fbc,null,0x2)+'\x0a'),console[_0x41edb8(0xd6)](_0x4dd614[_0x41edb8(0xd5)]),{'configured':!![],'scope':_0x92d0a1};}function _0x17b3(){const _0x5bbd58=['https://opencode.ai/config.json','pluginScope','isArray','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','64814yvnNhk','2QJyDhf','LiFUz','opencode.json','12122430VEJaTN','ZmDDo','8YjouWh','✓\x20OpenCode\x20plugin\x20configured','4477184wApNvH','PybPG','error','2573095yzDsVi','uqnaa','plugin','371520uJMomU','CeuUz','18YhUCYW','sXaCn','log','2979927jdDROx','User\x20(available\x20in\x20all\x20your\x20projects)','Mivrr','5232510JYUdiw'];_0x17b3=function(){return _0x5bbd58;};return _0x17b3();}
@@ -1 +1 @@
1
- (function(_0x4df791,_0x25803f){const _0x29c778=_0x1bf9,_0x5999c3=_0x4df791();while(!![]){try{const _0x35af39=parseInt(_0x29c778(0xfc))/0x1+-parseInt(_0x29c778(0x10b))/0x2*(-parseInt(_0x29c778(0x120))/0x3)+-parseInt(_0x29c778(0xf8))/0x4*(-parseInt(_0x29c778(0x134))/0x5)+-parseInt(_0x29c778(0x113))/0x6*(-parseInt(_0x29c778(0xf9))/0x7)+parseInt(_0x29c778(0x110))/0x8+-parseInt(_0x29c778(0xff))/0x9*(parseInt(_0x29c778(0x10d))/0xa)+-parseInt(_0x29c778(0x119))/0xb*(parseInt(_0x29c778(0x127))/0xc);if(_0x35af39===_0x25803f)break;else _0x5999c3['push'](_0x5999c3['shift']());}catch(_0x188f29){_0x5999c3['push'](_0x5999c3['shift']());}}}(_0x22a4,0x57aff));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';function _0x22a4(){const _0x33c480=['693621jTGEIe','length','FPhUa','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','isDirectory','ranger@trailhead','pkZsP','success','profile_activate','Failed\x20to\x20install\x20plugin:','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','sessions','32bBeAPI','map','30bDhXbn','BKezg','settings.json','4360528ldGjyC','QIufU','trackPhaseEnd','1761810MQYVeJ','oueph','AZjEz','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','EHagP','rWmbz','55JQdOiX','plugin','ranger-testing/trailhead','name','trackPhaseStart','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','87507zggpQY','filter','Fnoya','zXcJK','message','path','HtdbT','4045740JRgwUK','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','MwXsm','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','--scope','hIles','skills','EhjiT','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','baseUrl','chromium','project','10585gfloMb','ldrxX','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','MExJo','marketplace','log','dir_setup','profile','1172ccsxiV','7WocLvx','fLiYl','error','350413OlxPvH','wMZvL','OvfgI'];_0x22a4=function(){return _0x33c480;};return _0x22a4();}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x56a9ab){const _0x24e463=_0x1bf9,_0x47e09d={'QLeVr':function(_0x26b9df){return _0x26b9df();},'HtdbT':function(_0x49e4d3,_0x280642,_0x540f3e){return _0x49e4d3(_0x280642,_0x540f3e);},'MExJo':function(_0x27a294,_0x43dc9b){return _0x27a294+_0x43dc9b;},'ldrxX':_0x24e463(0x130),'IimeM':function(_0x1edc04,_0x2695ee,_0x5f564a){return _0x1edc04(_0x2695ee,_0x5f564a);},'mPLLQ':function(_0x1f2e33,_0x262045){return _0x1f2e33===_0x262045;},'BKezg':'No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','xuAXm':function(_0x43a323,_0x4f381a){return _0x43a323===_0x4f381a;}},_0x46990c=_0x47e09d['QLeVr'](getRangerDir),_0x5e6e82=join(_0x46990c,'ci');if(_0x56a9ab){const _0x1ac09d=_0x47e09d[_0x24e463(0x126)](join,_0x5e6e82,_0x56a9ab);return{'name':_0x56a9ab,'path':_0x1ac09d};}if(!existsSync(_0x5e6e82))throw new Error(_0x47e09d[_0x24e463(0x137)](_0x24e463(0x11f),_0x47e09d['ldrxX']));const _0xa845a0=await _0x47e09d['IimeM'](readdir,_0x5e6e82,{'withFileTypes':!![]}),_0x2d42f3=_0xa845a0[_0x24e463(0x121)](_0x20df26=>_0x20df26[_0x24e463(0x103)]())[_0x24e463(0x10c)](_0x577753=>_0x577753['name']);if(_0x47e09d['mPLLQ'](_0x2d42f3[_0x24e463(0x100)],0x0))throw new Error(_0x47e09d[_0x24e463(0x10e)]+_0x47e09d[_0x24e463(0x135)]);if(_0x47e09d['xuAXm'](_0x2d42f3['length'],0x1)){const _0x2e394c=_0x2d42f3[0x0];return console['log']('Auto-detected\x20CI\x20profile:\x20'+_0x2e394c),{'name':_0x2e394c,'path':join(_0x5e6e82,_0x2e394c)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x2d42f3['join'](',\x20')+_0x24e463(0x128));}function _0x1bf9(_0x4a4c57,_0x6f1644){_0x4a4c57=_0x4a4c57-0xf4;const _0x22a4e1=_0x22a4();let _0x1bf96c=_0x22a4e1[_0x4a4c57];return _0x1bf96c;}async function installPluginNonInteractive(){const _0x2e0ed5=_0x1bf9,_0x3e5716={'xGcHA':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','OvfgI':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','pkZsP':function(_0x5638e4,_0x5b51b1){return _0x5638e4(_0x5b51b1);},'fLiYl':'trailhead','NSsOm':'add','EhjiT':'Failed\x20to\x20add\x20marketplace:','RQJHe':_0x2e0ed5(0x136),'eLsWT':_0x2e0ed5(0x104),'lFcEo':_0x2e0ed5(0x12c),'MwXsm':_0x2e0ed5(0x133),'bhYmn':_0x2e0ed5(0x12b),'zXcJK':'✓\x20Claude\x20Code\x20plugin\x20installed'},_0x38025a=await isPluginInstalled('ranger@trailhead');if(_0x38025a)return console[_0x2e0ed5(0xf5)](_0x3e5716['xGcHA']),![];console['log'](_0x3e5716[_0x2e0ed5(0xfe)]);const _0x2cf9f3=await _0x3e5716[_0x2e0ed5(0x105)](isMarketplaceAdded,_0x3e5716[_0x2e0ed5(0xfa)]);let _0x3e7a46=_0x2cf9f3;if(_0x2cf9f3)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0x41234e=await runClaudeCommand(['plugin',_0x2e0ed5(0xf4),_0x3e5716['NSsOm'],_0x2e0ed5(0x11b)]);!_0x41234e[_0x2e0ed5(0x106)]?(console['error'](_0x3e5716[_0x2e0ed5(0x12f)],_0x41234e['error']),console['log'](_0x3e5716['RQJHe'])):_0x3e7a46=!![];}if(_0x3e7a46){const _0x58f918=await runClaudeCommand(['plugin','install',_0x3e5716['eLsWT'],_0x3e5716['lFcEo'],_0x3e5716[_0x2e0ed5(0x12a)]]);!_0x58f918[_0x2e0ed5(0x106)]?(console[_0x2e0ed5(0xfb)](_0x2e0ed5(0x108),_0x58f918['error']),console['log'](_0x3e5716['bhYmn'])):console['log'](_0x3e5716[_0x2e0ed5(0x123)]);}return!![];}export async function setupCi(_0x52cdd4,_0x2fe642,_0x25d122){const _0xd6331b=_0x1bf9,_0x327424={'QIufU':'auth','hIles':function(_0xab8c2c,_0xb30abd){return _0xab8c2c(_0xb30abd);},'Fnoya':function(_0x1a8eac,_0x1ef330,_0x243ae6){return _0x1a8eac(_0x1ef330,_0x243ae6);},'Sbtjn':_0xd6331b(0x10a),'YqjXD':_0xd6331b(0xf6),'ybTgB':function(_0x53545e){return _0x53545e();},'EHagP':function(_0x433481,_0x2c5c3b,_0xd9b37f){return _0x433481(_0x2c5c3b,_0xd9b37f);},'darUW':_0xd6331b(0x10f),'kFkJK':function(_0x24f2ca,_0x220f7d){return _0x24f2ca(_0x220f7d);},'FPhUa':'No\x20API\x20token\x20available\x20for\x20decryption','rWmbz':_0xd6331b(0x109),'SPLqz':_0xd6331b(0x11e),'wMZvL':_0xd6331b(0x11a),'AZjEz':_0xd6331b(0x133),'rtrAm':_0xd6331b(0x12e),'oueph':_0xd6331b(0x102)};console['log'](_0xd6331b(0x129)),_0x25d122?.[_0xd6331b(0x11d)](_0x327424[_0xd6331b(0x111)]),await _0x327424['hIles'](authenticate,_0x52cdd4),_0x25d122?.['trackPhaseEnd'](_0x327424[_0xd6331b(0x111)]),_0x25d122?.[_0xd6331b(0x11d)](_0xd6331b(0xf6));const {path:_0x4c5b77,installed:_0x470fa7}=await ensureRangerDir();await writeRangerGitignore(_0x4c5b77);const _0x39579f=_0x327424[_0xd6331b(0x122)](join,_0x4c5b77,_0x327424['Sbtjn']);!_0x327424[_0xd6331b(0x12d)](existsSync,_0x39579f)&&await mkdir(_0x39579f,{'recursive':!![]});_0x25d122?.['trackPhaseEnd'](_0x327424['YqjXD'],{'installed':_0x470fa7}),_0x25d122?.['trackPhaseStart']('chromium');let _0x49bf00=![];_0x2fe642?.['skipChromium']?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x49bf00=await _0x327424['ybTgB'](ensureChromium);_0x25d122?.[_0xd6331b(0x112)](_0xd6331b(0x132),{'installed':_0x49bf00,'skipped':!!_0x2fe642?.['skipChromium']}),_0x25d122?.['trackPhaseStart'](_0xd6331b(0x107));const _0x5cac05=await findCiProfile(_0x2fe642?.[_0xd6331b(0xf7)]);let _0x3485e9=![];_0x2fe642?.['baseUrl']&&(await _0x327424[_0xd6331b(0x117)](mkdir,_0x5cac05['path'],{'recursive':!![]}),await _0x327424[_0xd6331b(0x117)](saveSettings,_0x5cac05['name'],{'baseUrl':_0x2fe642[_0xd6331b(0x131)],'headless':!![]}),console[_0xd6331b(0xf5)]('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x2fe642[_0xd6331b(0x131)]),_0x3485e9=!![]);const _0x1e82de=_0x327424['Fnoya'](join,_0x5cac05[_0xd6331b(0x125)],_0x327424['darUW']);if(!_0x327424['kFkJK'](existsSync,_0x1e82de)&&!_0x3485e9)throw new Error('CI\x20profile\x20\x22'+_0x5cac05['name']+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x515a85=join(_0x5cac05[_0xd6331b(0x125)],'auth.json'),_0x54efb4=join(_0x5cac05[_0xd6331b(0x125)],'auth.json.enc'),_0x551757=existsSync(_0x515a85),_0x31cb3e=existsSync(_0x54efb4);if(_0x31cb3e)try{const _0x36ed20=await getToken();if(!_0x36ed20)throw new Error(_0x327424[_0xd6331b(0x101)]);const _0x3f1801=await readFile(_0x54efb4);decrypt(_0x3f1801,_0x36ed20),console['log'](_0x327424[_0xd6331b(0x118)]);}catch(_0x435de3){const _0x2e09c7=_0x435de3 instanceof Error?_0x435de3[_0xd6331b(0x124)]:_0x327424['kFkJK'](String,_0x435de3);throw new Error(_0xd6331b(0x116)+_0x5cac05['name']+'\x22:\x20'+_0x2e09c7);}else _0x551757?console['log']('✓\x20Auth\x20state\x20found'):console[_0xd6331b(0xf5)](_0x327424['SPLqz']);await writeActiveProfileName(_0x5cac05[_0xd6331b(0x11c)]),console[_0xd6331b(0xf5)]('✓\x20Active\x20profile:\x20'+_0x5cac05[_0xd6331b(0x11c)]),_0x25d122?.['trackPhaseEnd']('profile_activate',{'profileName':_0x5cac05[_0xd6331b(0x11c)],'hasAuth':_0x551757,'hasEncryptedAuth':_0x31cb3e,'createdSettings':_0x3485e9}),_0x25d122?.['trackPhaseStart'](_0x327424[_0xd6331b(0xfd)]);const _0x22c2bb=await installPluginNonInteractive();_0x25d122?.['trackPhaseEnd'](_0xd6331b(0x11a),{'installed':_0x22c2bb}),_0x25d122?.[_0xd6331b(0x11d)](_0xd6331b(0x12e)),await skillup({'autoInstall':_0x327424[_0xd6331b(0x115)]}),_0x25d122?.['trackPhaseEnd'](_0x327424['rtrAm']),console[_0xd6331b(0xf5)](_0x327424[_0xd6331b(0x114)]);}
1
+ (function(_0x140f0a,_0xd7ff77){const _0x2a4083=_0x290b,_0x122af1=_0x140f0a();while(!![]){try{const _0x58abc7=-parseInt(_0x2a4083(0x227))/0x1*(parseInt(_0x2a4083(0x1f5))/0x2)+-parseInt(_0x2a4083(0x214))/0x3*(-parseInt(_0x2a4083(0x202))/0x4)+-parseInt(_0x2a4083(0x224))/0x5+-parseInt(_0x2a4083(0x1fa))/0x6*(-parseInt(_0x2a4083(0x22e))/0x7)+parseInt(_0x2a4083(0x20e))/0x8+parseInt(_0x2a4083(0x221))/0x9+parseInt(_0x2a4083(0x21b))/0xa;if(_0x58abc7===_0xd7ff77)break;else _0x122af1['push'](_0x122af1['shift']());}catch(_0x3ca121){_0x122af1['push'](_0x122af1['shift']());}}}(_0x1eee,0xcffab));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x1eee(){const _0x3e4556=['bGFVH','4543820htHfVj','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','LIuzH','marketplace','nBLVw','OVkbV','1551960LvDbiQ','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','log','6181975TvIkbx','message','ranger@trailhead','9754qJwmEZ','profile','HnQJM','Uldkg','RwnrP','WXQVa','plugin','1981fahXMk','vTWxu','map','cRImN','SVowi','dir_setup','EaTji','filter','profile_activate','16bqjAjo','skipChromium','✓\x20Active\x20profile:\x20','trailhead','auth.json.enc','2982odlqEx','MyoRj','trackPhaseStart','NSfta','isDirectory','keYNb','FZojo','CI\x20profile\x20\x22','12eGItVt','error','ffqCM','success','USepq','trackPhaseEnd','lMxsh','sessions','baseUrl','xMqhU','ToCOd','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','5835072QPKham','RDmEk','length','path','tpapH','name','669453nFWJqC','add','eJPgp','ranger-testing/trailhead','No\x20API\x20token\x20available\x20for\x20decryption','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a'];_0x1eee=function(){return _0x3e4556;};return _0x1eee();}import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';function _0x290b(_0xf4a8d0,_0x494036){_0xf4a8d0=_0xf4a8d0-0x1f4;const _0x1eee07=_0x1eee();let _0x290b30=_0x1eee07[_0xf4a8d0];return _0x290b30;}async function findCiProfile(_0x598683){const _0x57c937=_0x290b,_0x551121={'wjMfb':function(_0x56c2aa,_0x150a15,_0x2c7554){return _0x56c2aa(_0x150a15,_0x2c7554);},'WCnnM':function(_0x1d96f4,_0x189fb7,_0x7fd202){return _0x1d96f4(_0x189fb7,_0x7fd202);},'jLZwr':function(_0x3f8cf5,_0x147d29){return _0x3f8cf5(_0x147d29);},'dyiTZ':'No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','ToCOd':_0x57c937(0x21c),'RwnrP':function(_0x98a612,_0x367597,_0x5040d2){return _0x98a612(_0x367597,_0x5040d2);},'USepq':function(_0x5496d1,_0x40e702){return _0x5496d1===_0x40e702;},'orwbt':function(_0x4356fd,_0xc6055){return _0x4356fd===_0xc6055;}},_0x485e63=getRangerDir(),_0x1e1ae5=_0x551121['wjMfb'](join,_0x485e63,'ci');if(_0x598683){const _0x3cb93c=_0x551121['WCnnM'](join,_0x1e1ae5,_0x598683);return{'name':_0x598683,'path':_0x3cb93c};}if(!_0x551121['jLZwr'](existsSync,_0x1e1ae5))throw new Error(_0x551121['dyiTZ']+_0x551121[_0x57c937(0x20c)]);const _0x28e913=await _0x551121[_0x57c937(0x22b)](readdir,_0x1e1ae5,{'withFileTypes':!![]}),_0x307f4=_0x28e913[_0x57c937(0x235)](_0x2e24df=>_0x2e24df[_0x57c937(0x1fe)]())[_0x57c937(0x230)](_0x23666d=>_0x23666d[_0x57c937(0x213)]);if(_0x551121[_0x57c937(0x206)](_0x307f4[_0x57c937(0x210)],0x0))throw new Error(_0x57c937(0x219)+_0x551121['ToCOd']);if(_0x551121['orwbt'](_0x307f4[_0x57c937(0x210)],0x1)){const _0x128438=_0x307f4[0x0];return console['log']('Auto-detected\x20CI\x20profile:\x20'+_0x128438),{'name':_0x128438,'path':join(_0x1e1ae5,_0x128438)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x307f4['join'](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x4e54e2=_0x290b,_0x66ce29={'cRImN':function(_0x28bdba,_0x36b26e){return _0x28bdba(_0x36b26e);},'MyoRj':_0x4e54e2(0x1f8),'kfUzD':_0x4e54e2(0x217),'FZojo':'Failed\x20to\x20add\x20marketplace:','LIuzH':_0x4e54e2(0x226),'ffqCM':'--scope','keYNb':'project','zoNcC':'✓\x20Claude\x20Code\x20plugin\x20installed'},_0x26b7d4=await isPluginInstalled('ranger@trailhead');if(_0x26b7d4)return console[_0x4e54e2(0x223)]('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console[_0x4e54e2(0x223)]('Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...');const _0x122382=await _0x66ce29[_0x4e54e2(0x231)](isMarketplaceAdded,_0x66ce29[_0x4e54e2(0x1fb)]);let _0x1fba21=_0x122382;if(_0x122382)console[_0x4e54e2(0x223)]('✓\x20Marketplace\x20already\x20added');else{const _0x1c8bed=await runClaudeCommand(['plugin',_0x4e54e2(0x21e),_0x4e54e2(0x215),_0x66ce29['kfUzD']]);!_0x1c8bed[_0x4e54e2(0x205)]?(console['error'](_0x66ce29[_0x4e54e2(0x200)],_0x1c8bed['error']),console[_0x4e54e2(0x223)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead')):_0x1fba21=!![];}if(_0x1fba21){const _0x112d3d=await runClaudeCommand(['plugin','install',_0x66ce29[_0x4e54e2(0x21d)],_0x66ce29[_0x4e54e2(0x204)],_0x66ce29[_0x4e54e2(0x1ff)]]);!_0x112d3d[_0x4e54e2(0x205)]?(console['error']('Failed\x20to\x20install\x20plugin:',_0x112d3d[_0x4e54e2(0x203)]),console[_0x4e54e2(0x223)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console[_0x4e54e2(0x223)](_0x66ce29['zoNcC']);}return!![];}export async function setupCi(_0x166bc3,_0x3f4cde,_0x12facc){const _0x232e07=_0x290b,_0x1d97f8={'HnQJM':'\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','RDmEk':'auth','jPdHh':_0x232e07(0x233),'NSfta':function(_0x50b903,_0x3f3f42){return _0x50b903(_0x3f3f42);},'SVowi':function(_0x2c1dd5,_0x2deced,_0x27a6ad){return _0x2c1dd5(_0x2deced,_0x27a6ad);},'WDScY':_0x232e07(0x209),'EaTji':function(_0x15ad09,_0xa2643a){return _0x15ad09(_0xa2643a);},'yLAVH':function(_0x41dd61,_0x268d6c,_0x412b13){return _0x41dd61(_0x268d6c,_0x412b13);},'vTWxu':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','WXQVa':function(_0x215145){return _0x215145();},'eJPgp':'chromium','tpapH':function(_0x3b4993,_0x13cae0,_0x222b99){return _0x3b4993(_0x13cae0,_0x222b99);},'xMqhU':'auth.json','axGuP':_0x232e07(0x1f9),'Uldkg':function(_0x193565,_0x1da69b){return _0x193565(_0x1da69b);},'bGFVH':function(_0xccbd33,_0x8175d5){return _0xccbd33(_0x8175d5);},'lMxsh':function(_0x1f1f81,_0x77aef3,_0x268135){return _0x1f1f81(_0x77aef3,_0x268135);},'ZNcRD':'✓\x20Auth\x20state\x20found','OVkbV':_0x232e07(0x20d),'rFMzF':'skills','nBLVw':'project'};console['log'](_0x1d97f8[_0x232e07(0x229)]),_0x12facc?.[_0x232e07(0x1fc)](_0x1d97f8[_0x232e07(0x20f)]),await authenticate(_0x166bc3),_0x12facc?.[_0x232e07(0x207)](_0x1d97f8['RDmEk']),_0x12facc?.[_0x232e07(0x1fc)](_0x1d97f8['jPdHh']);const {path:_0xfafbd3,installed:_0x45aaa0}=await ensureRangerDir();await _0x1d97f8[_0x232e07(0x1fd)](writeRangerGitignore,_0xfafbd3);const _0x55ade6=_0x1d97f8[_0x232e07(0x232)](join,_0xfafbd3,_0x1d97f8['WDScY']);!_0x1d97f8[_0x232e07(0x234)](existsSync,_0x55ade6)&&await _0x1d97f8['yLAVH'](mkdir,_0x55ade6,{'recursive':!![]});_0x12facc?.[_0x232e07(0x207)](_0x232e07(0x233),{'installed':_0x45aaa0}),_0x12facc?.[_0x232e07(0x1fc)]('chromium');let _0x404216=![];_0x3f4cde?.[_0x232e07(0x1f6)]?console['log'](_0x1d97f8[_0x232e07(0x22f)]):_0x404216=await _0x1d97f8[_0x232e07(0x22c)](ensureChromium);_0x12facc?.['trackPhaseEnd'](_0x1d97f8[_0x232e07(0x216)],{'installed':_0x404216,'skipped':!!_0x3f4cde?.[_0x232e07(0x1f6)]}),_0x12facc?.['trackPhaseStart']('profile_activate');const _0x51cb85=await _0x1d97f8[_0x232e07(0x1fd)](findCiProfile,_0x3f4cde?.[_0x232e07(0x228)]);let _0x1c8f32=![];_0x3f4cde?.['baseUrl']&&(await mkdir(_0x51cb85[_0x232e07(0x211)],{'recursive':!![]}),await _0x1d97f8[_0x232e07(0x212)](saveSettings,_0x51cb85[_0x232e07(0x213)],{'baseUrl':_0x3f4cde[_0x232e07(0x20a)],'headless':!![]}),console['log']('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x3f4cde[_0x232e07(0x20a)]),_0x1c8f32=!![]);const _0x26333d=_0x1d97f8[_0x232e07(0x212)](join,_0x51cb85['path'],'settings.json');if(!existsSync(_0x26333d)&&!_0x1c8f32)throw new Error(_0x232e07(0x201)+_0x51cb85['name']+_0x232e07(0x222));const _0x15e2d7=join(_0x51cb85[_0x232e07(0x211)],_0x1d97f8[_0x232e07(0x20b)]),_0x19c5af=_0x1d97f8['SVowi'](join,_0x51cb85['path'],_0x1d97f8['axGuP']),_0x2bedc4=_0x1d97f8[_0x232e07(0x22a)](existsSync,_0x15e2d7),_0x4b9a61=_0x1d97f8[_0x232e07(0x21a)](existsSync,_0x19c5af);if(_0x4b9a61)try{const _0x18aebb=await getToken();if(!_0x18aebb)throw new Error(_0x232e07(0x218));const _0x101d47=await readFile(_0x19c5af);_0x1d97f8[_0x232e07(0x208)](decrypt,_0x101d47,_0x18aebb),console[_0x232e07(0x223)]('✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)');}catch(_0x14b041){const _0x26d92d=_0x14b041 instanceof Error?_0x14b041[_0x232e07(0x225)]:String(_0x14b041);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x51cb85['name']+'\x22:\x20'+_0x26d92d);}else _0x2bedc4?console['log'](_0x1d97f8['ZNcRD']):console['log'](_0x1d97f8[_0x232e07(0x220)]);await writeActiveProfileName(_0x51cb85['name']),console[_0x232e07(0x223)](_0x232e07(0x1f7)+_0x51cb85[_0x232e07(0x213)]),_0x12facc?.[_0x232e07(0x207)](_0x232e07(0x1f4),{'profileName':_0x51cb85[_0x232e07(0x213)],'hasAuth':_0x2bedc4,'hasEncryptedAuth':_0x4b9a61,'createdSettings':_0x1c8f32}),_0x12facc?.['trackPhaseStart'](_0x232e07(0x22d));const _0x29fc77=await installPluginNonInteractive();_0x12facc?.['trackPhaseEnd'](_0x232e07(0x22d),{'installed':_0x29fc77}),_0x12facc?.[_0x232e07(0x1fc)](_0x1d97f8['rFMzF']),await skillup({'autoInstall':_0x1d97f8[_0x232e07(0x21f)]}),_0x12facc?.[_0x232e07(0x207)]('skills'),console['log']('\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a');}