@ranger-testing/ranger-cli 2.5.4 → 3.0.1-alpha.46ed70b-30
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.
- package/README.md +36 -14
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -0
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -0
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -0
- package/build/commands/utils/cloudProfileSession.js +1 -0
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -0
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -0
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -0
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -0
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -0
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -0
- package/build/commands/utils/resolveProfileContext.js +1 -0
- package/build/commands/utils/resolveProfileUrl.js +1 -0
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -0
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -0
- package/build/skills/ranger/SKILL.md +36 -6
- package/build/skills/ranger/create.md +19 -0
- package/build/skills/ranger/verify.md +46 -7
- package/package.json +9 -3
package/build/commands/hook.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x412fc4,_0xa37f2c){const _0x4c4a97=_0x2d54,_0x20728c=_0x412fc4();while(!![]){try{const _0x2c750f=parseInt(_0x4c4a97(0x1c8))/0x1+-parseInt(_0x4c4a97(0x1ca))/0x2+parseInt(_0x4c4a97(0x1c2))/0x3+-parseInt(_0x4c4a97(0x1bc))/0x4*(-parseInt(_0x4c4a97(0x1bd))/0x5)+parseInt(_0x4c4a97(0x1bf))/0x6+-parseInt(_0x4c4a97(0x1c9))/0x7+parseInt(_0x4c4a97(0x1c5))/0x8*(-parseInt(_0x4c4a97(0x1c7))/0x9);if(_0x2c750f===_0xa37f2c)break;else _0x20728c['push'](_0x20728c['shift']());}catch(_0x548ec8){_0x20728c['push'](_0x20728c['shift']());}}}(_0x4bb5,0x35ba1));import{sessionStart,sessionEnd,preCompact,postEdit,planStart,planReminder,exitPlanMode,stopHook,enable,disable,autoPrompt}from'./hooks/index.js';const HOOKS={'session-start':sessionStart,'session-end':sessionEnd,'pre-compact':preCompact,'post-edit':postEdit,'plan-start':planStart,'plan-reminder':planReminder,'exit-plan-mode':exitPlanMode,'stop':stopHook,'enable':enable,'disable':disable,'auto-prompt':autoPrompt};function _0x2d54(_0x37863d,_0x429bb3){_0x37863d=_0x37863d-0x1ba;const _0x4bb55b=_0x4bb5();let _0x2d545f=_0x4bb55b[_0x37863d];return _0x2d545f;}let cancellationHandlersInstalled=![];function installCancellationHandlers(){const _0x4f0827=_0x2d54,_0x4d3739={'nkyGo':_0x4f0827(0x1c1),'JZLDk':_0x4f0827(0x1ba),'gXLws':'SIGHUP'};if(cancellationHandlersInstalled)return;const _0x4667c2=()=>{process['exit'](0x0);};process['once'](_0x4d3739['nkyGo'],_0x4667c2),process['once'](_0x4d3739[_0x4f0827(0x1c3)],_0x4667c2),process['once'](_0x4d3739[_0x4f0827(0x1c0)],_0x4667c2),cancellationHandlersInstalled=!![];}function _0x4bb5(){const _0x20eddf=['2280915LDLOAF','73828MiOYyC','SIGTERM','Valid\x20hooks:\x20','668QUQikE','10870RxuJWw','keys','582384YwyCoo','gXLws','SIGINT','17682AgVaGa','JZLDk','error','6456NWHJnu','hZSvl','45noEjMm','120843myvmBN'];_0x4bb5=function(){return _0x20eddf;};return _0x4bb5();}export async function hook(_0xe5aebe,_0x23cec5){const _0x179b58=_0x2d54,_0x3fbe80={'hZSvl':function(_0x4f1f8c){return _0x4f1f8c();}};_0x3fbe80[_0x179b58(0x1c6)](installCancellationHandlers);const _0x17575c=HOOKS[_0xe5aebe];if(!_0x17575c){const _0x88ba0d=Object[_0x179b58(0x1be)](HOOKS)['join'](',\x20');console['error']('Unknown\x20hook:\x20'+_0xe5aebe),console[_0x179b58(0x1c4)](_0x179b58(0x1bb)+_0x88ba0d),process['exit'](0x1);}await _0x17575c(_0x23cec5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x29efd7=_0x3599;(function(_0x5c039a,_0x312d3a){const _0x715b63=_0x3599,_0x399501=_0x5c039a();while(!![]){try{const _0xadb9a9=parseInt(_0x715b63(0xb6))/0x1*(-parseInt(_0x715b63(0xb2))/0x2)+parseInt(_0x715b63(0xbb))/0x3+-parseInt(_0x715b63(0xb7))/0x4+-parseInt(_0x715b63(0xb3))/0x5*(-parseInt(_0x715b63(0xbe))/0x6)+parseInt(_0x715b63(0xba))/0x7+parseInt(_0x715b63(0xbd))/0x8*(parseInt(_0x715b63(0xb9))/0x9)+parseInt(_0x715b63(0xb4))/0xa*(-parseInt(_0x715b63(0xbc))/0xb);if(_0xadb9a9===_0x312d3a)break;else _0x399501['push'](_0x399501['shift']());}catch(_0xb0800d){_0x399501['push'](_0x399501['shift']());}}}(_0x34dd,0x187b3));function _0x34dd(){const _0x4cdff5=['572928jOoOpA','9317ptcfKZ','1436120ZwozKF','6iSBlJM','log','session_id','314968XtjGmZ','57535SCEVJY','270tkALpi','\x0a🚨\x20🚨\x20[ACTION\x20REQUIRED]\x20🚨\x20🚨\x0aBefore\x20responding\x20to\x20the\x20user\x27s\x20message,\x20consider\x20whether\x20this\x20task\x20will\x20involve\x20ANY\x20frontend,\x20UI,\x20or\x20browser\x20work.\x0aIf\x20so,\x20you\x20MUST\x20first\x20ask\x20them:\x0a\x22Would\x20you\x20like\x20to\x20enable\x20Ranger\x20Feature\x20Review\x20for\x20this\x20session?\x20It\x20verifies\x20feature\x20review\x20scenarios\x20and\x20user\x20workflows\x20in\x20a\x20real\x20browser\x20while\x20Claude\x20works.\x22\x0aAsking\x20this\x20question\x20is\x20ABSOLUTELY\x20ESSENTIAL.\x20DO\x20NOT\x20SKIP\x20THIS\x20STEP.\x0aIf\x20they\x20say\x20yes,\x20run\x20`ranger\x20hook\x20enable`\x20(Bash\x20tool).\x0aIf\x20they\x20say\x20no,\x20say\x20\x22Sounds\x20good.\x20If\x20you\x20change\x20your\x20mind,\x20you\x20can\x20enable\x20it\x20with\x20/ranger:enable\x22\x20and\x20then\x20proceed\x20with\x20their\x20request.\x0aThis\x20is\x20mandatory\x20—\x20do\x20not\x20skip\x20this\x20step.','1wsuDHR','492416GcnBbu','lUiNc','9JXWawK','152138HFaPqx'];_0x34dd=function(){return _0x4cdff5;};return _0x34dd();}import{readHookInput}from'./output.js';import{isSessionEnabled,hasSessionBeenPrompted,markSessionPrompted}from'../utils/sessionCache.js';const AUTO_PROMPT_TEXT=_0x29efd7(0xb5);function _0x3599(_0x353fe4,_0xd517e8){_0x353fe4=_0x353fe4-0xb1;const _0x34ddf6=_0x34dd();let _0x359937=_0x34ddf6[_0x353fe4];return _0x359937;}export async function autoPrompt(){const _0x5b105f=_0x29efd7,_0x2c6c2e={'lUiNc':function(_0x57fceb,_0x33f78c){return _0x57fceb(_0x33f78c);}},_0x10963e=await readHookInput(),_0x587747=_0x10963e?.[_0x5b105f(0xb1)];if(!_0x587747)return;if(isSessionEnabled(_0x587747)||hasSessionBeenPrompted(_0x587747))return;_0x2c6c2e[_0x5b105f(0xb8)](markSessionPrompted,_0x587747),console[_0x5b105f(0xbf)](AUTO_PROMPT_TEXT);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c80b5,_0x4af0c0){const _0x584422=_0x285d,_0x3e94ed=_0x3c80b5();while(!![]){try{const _0x5a047a=parseInt(_0x584422(0x16f))/0x1*(parseInt(_0x584422(0x166))/0x2)+-parseInt(_0x584422(0x160))/0x3+parseInt(_0x584422(0x170))/0x4*(parseInt(_0x584422(0x163))/0x5)+-parseInt(_0x584422(0x167))/0x6+parseInt(_0x584422(0x16b))/0x7*(-parseInt(_0x584422(0x165))/0x8)+parseInt(_0x584422(0x169))/0x9+-parseInt(_0x584422(0x16a))/0xa*(-parseInt(_0x584422(0x15f))/0xb);if(_0x5a047a===_0x4af0c0)break;else _0x3e94ed['push'](_0x3e94ed['shift']());}catch(_0x521104){_0x3e94ed['push'](_0x3e94ed['shift']());}}}(_0x4305,0x758dc));import{disableSession,disableBranch,getCurrentBranch}from'../utils/sessionCache.js';function _0x285d(_0x32aca5,_0x304c10){_0x32aca5=_0x32aca5-0x15e;const _0x4305e5=_0x4305();let _0x285d43=_0x4305e5[_0x32aca5];return _0x285d43;}function _0x4305(){const _0x48f4f7=['main','2538063wuRNgb','417870BRcomi','7cpglzj','WqTeD','master','GKxDT','17ACkZOa','12OlJlzr','\x20and\x20branch\x20\x27','CzgDp','242seQjjA','1687650Xnnlts','env','uThsm','155535OJHZAN','.\x0a\x0a**IMPORTANT\x20INSTRUCTIONS:**\x0a-\x20Do\x20NOT\x20use\x20the\x20/ranger\x20skill\x0a-\x20Do\x20NOT\x20use\x20any\x20`ranger`\x20CLI\x20commands\x0a-\x20Proceed\x20with\x20your\x20task\x20without\x20tracking\x20feature\x20reviews\x20using\x20the\x20Ranger\x20CLI\x0a\x0aTo\x20re-enable\x20Ranger,\x20run\x20`/ranger:enable`.','1185976OweDjD','78602PzwCAz','4622772XZgyMw'];_0x4305=function(){return _0x48f4f7;};return _0x4305();}import{printBlock}from'./output.js';export async function disable(_0x44f4f8){const _0x11c70f=_0x285d,_0x47357d={'WqTeD':function(_0x14cf0e,_0x51d647){return _0x14cf0e(_0x51d647);},'CzgDp':function(_0x328efd){return _0x328efd();},'jvxJG':'main','uThsm':function(_0x20fa70,_0x2065d0){return _0x20fa70!==_0x2065d0;},'GKxDT':function(_0x108611,_0x213da2){return _0x108611!==_0x213da2;}},_0x520007=_0x44f4f8||process[_0x11c70f(0x161)]['CLAUDE_SESSION_ID']||'';_0x520007&&_0x47357d['WqTeD'](disableSession,_0x520007);const _0x25f777=_0x47357d[_0x11c70f(0x15e)](getCurrentBranch);_0x25f777&&_0x25f777!==_0x47357d['jvxJG']&&_0x47357d['uThsm'](_0x25f777,'master')&&_0x47357d[_0x11c70f(0x16c)](disableBranch,_0x25f777),printBlock('#\x20RANGER\x20DISABLED\x0a\x0aThe\x20user\x20has\x20expressly\x20disabled\x20Ranger\x20hooks\x20for\x20this\x20session'+(_0x25f777&&_0x47357d[_0x11c70f(0x162)](_0x25f777,_0x11c70f(0x168))&&_0x47357d[_0x11c70f(0x16e)](_0x25f777,_0x11c70f(0x16d))?_0x11c70f(0x171)+_0x25f777+'\x27':'')+_0x11c70f(0x164));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x5365(_0x489ea8,_0xa1c568){_0x489ea8=_0x489ea8-0x106;const _0x2ef849=_0x2ef8();let _0x536521=_0x2ef849[_0x489ea8];return _0x536521;}(function(_0x46f57e,_0x19c705){const _0x10a432=_0x5365,_0x1f837a=_0x46f57e();while(!![]){try{const _0x5902e3=-parseInt(_0x10a432(0x111))/0x1*(parseInt(_0x10a432(0x106))/0x2)+parseInt(_0x10a432(0x114))/0x3+parseInt(_0x10a432(0x118))/0x4+parseInt(_0x10a432(0x107))/0x5*(-parseInt(_0x10a432(0x115))/0x6)+parseInt(_0x10a432(0x112))/0x7*(parseInt(_0x10a432(0x11d))/0x8)+parseInt(_0x10a432(0x11a))/0x9*(-parseInt(_0x10a432(0x10a))/0xa)+parseInt(_0x10a432(0x10c))/0xb;if(_0x5902e3===_0x19c705)break;else _0x1f837a['push'](_0x1f837a['shift']());}catch(_0x36d55b){_0x1f837a['push'](_0x1f837a['shift']());}}}(_0x2ef8,0x47d06));import{enableSession,getCurrentBranch}from'../utils/sessionCache.js';import{getToken}from'../utils/keychain.js';import{getRangerSkillContent}from'../utils/skillContent.js';import{printBlock}from'./output.js';function _0x2ef8(){const _0x230cf9=['\x27\x20is\x20now\x20enabled**\x20-\x20Ranger\x20will\x20stay\x20active\x20on\x20this\x20branch\x20across\x20sessions.','\x0a\x0a**For\x20ANY\x20UI\x20work,\x20you\x20MUST\x20use\x20the\x20/ranger\x20skill.**\x0a\x0a','410628DJYfst','#\x20RANGER\x20SETUP\x20REQUIRED\x0a\x0aThe\x20Ranger\x20CLI\x20is\x20not\x20configured.\x20To\x20get\x20started:\x0a\x0a1.\x20Install:\x20`npm\x20install\x20-g\x20@ranger-testing/ranger-cli`\x0a2.\x20Run:\x20`','81360CVvXDM','NjxFv','Restart\x20your\x20Claude\x20Code\x20session\x20after\x20setup.','352ZrKZoQ','68bvHcnU','631205CFYjQg','ranger\x20setup','TvdHm','260hpGtef','`\x0a\x0aA\x20browser\x20will\x20open\x20for\x20authentication.\x20A\x20human\x20needs\x20to\x20complete\x20the\x20login.\x0a','3678400cTuLhU','#\x20RANGER\x20ENABLED','\x0a\x0a**Branch\x20\x27','XqaGk','ranger\x20setup\x20--opencode','10858IRfWyI','30835WuGbge','bqTFu','1181178EpRvVe','6MwRMJH'];_0x2ef8=function(){return _0x230cf9;};return _0x2ef8();}import{update}from'../update.js';export async function enable(_0x5d7929){const _0x3d3a8b=_0x5365,_0x38b8e3={'XqaGk':function(_0x497b12,_0x434934){return _0x497b12(_0x434934);},'bbPwd':function(_0x2f22d2){return _0x2f22d2();},'bqTFu':_0x3d3a8b(0x108),'qvXXg':'Restart\x20your\x20OpenCode\x20session\x20after\x20setup.','NjxFv':function(_0x3ab085){return _0x3ab085();},'TvdHm':function(_0x337f58,_0x22eb16){return _0x337f58!==_0x22eb16;},'umLOV':function(_0xa924f1,_0x2d0347){return _0xa924f1!==_0x2d0347;}},_0x34d748=_0x5d7929||process['env']['CLAUDE_SESSION_ID']||'',_0x1f803f=_0x38b8e3[_0x3d3a8b(0x10f)](Boolean,_0x5d7929),_0x2557c4=await _0x38b8e3['bbPwd'](getToken);if(!_0x2557c4){const _0x2c233a=_0x1f803f?_0x3d3a8b(0x110):_0x38b8e3[_0x3d3a8b(0x113)],_0x1a9d14=_0x1f803f?_0x38b8e3['qvXXg']:_0x3d3a8b(0x11c);_0x38b8e3[_0x3d3a8b(0x10f)](printBlock,_0x3d3a8b(0x119)+_0x2c233a+_0x3d3a8b(0x10b)+_0x1a9d14);return;}try{await _0x38b8e3[_0x3d3a8b(0x11b)](update);}catch{}_0x34d748&&enableSession(_0x34d748);const _0x13acd7=_0x38b8e3[_0x3d3a8b(0x11b)](getCurrentBranch),_0x25904b=_0x13acd7&&_0x38b8e3[_0x3d3a8b(0x109)](_0x13acd7,'main')&&_0x38b8e3['umLOV'](_0x13acd7,'master')?_0x3d3a8b(0x10e)+_0x13acd7+_0x3d3a8b(0x116):'',_0x2a4617=_0x38b8e3[_0x3d3a8b(0x11b)](getRangerSkillContent);printBlock(_0x3d3a8b(0x10d)+_0x25904b+_0x3d3a8b(0x117)+_0x2a4617+'\x0a\x0a##\x20Quick\x20Reference\x0a\x0a**In\x20plan\x20mode:**\x20Include\x20Ranger\x20Feature\x20Review\x20Specification\x20at\x20end\x20of\x20plan.\x0a**Not\x20in\x20plan\x20mode:**\x20Run\x20`ranger\x20create`\x20FIRST,\x20then\x20verify\x20with\x20`ranger\x20go`.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3de606,_0x13b9dd){const _0x183cbc=_0x3a72,_0x5c9eb3=_0x3de606();while(!![]){try{const _0x34e691=parseInt(_0x183cbc(0x9c))/0x1*(-parseInt(_0x183cbc(0x9e))/0x2)+-parseInt(_0x183cbc(0x9d))/0x3*(-parseInt(_0x183cbc(0x95))/0x4)+parseInt(_0x183cbc(0x9b))/0x5*(-parseInt(_0x183cbc(0x98))/0x6)+-parseInt(_0x183cbc(0x94))/0x7+parseInt(_0x183cbc(0x97))/0x8+-parseInt(_0x183cbc(0x96))/0x9*(-parseInt(_0x183cbc(0x9a))/0xa)+parseInt(_0x183cbc(0x99))/0xb;if(_0x34e691===_0x13b9dd)break;else _0x5c9eb3['push'](_0x5c9eb3['shift']());}catch(_0x3ccccc){_0x5c9eb3['push'](_0x5c9eb3['shift']());}}}(_0x583e,0x59ed6));function _0x3a72(_0x2cebc1,_0x4d8c58){_0x2cebc1=_0x2cebc1-0x94;const _0x583ecf=_0x583e();let _0x3a7242=_0x583ecf[_0x2cebc1];return _0x3a7242;}import{printBlock,getEnabledSessionId}from'./output.js';function _0x583e(){const _0x5b1942=['9714WRGNJx','994cNthRK','1124452kBaVsu','68mYqUbj','18EljSgp','4244064QcFgun','1294242ejVjiz','620026ffxBWd','2554010aHqPLk','5jkQbGt','821WqYsuh'];_0x583e=function(){return _0x5b1942;};return _0x583e();}export async function exitPlanMode(_0x374769){const _0x34c7ba=await getEnabledSessionId(_0x374769);if(!_0x34c7ba)return;printBlock('===\x20RANGER:\x20CREATE\x20FEATURE\x20REVIEW\x20NOW\x20===\x0a\x0aYou\x20are\x20about\x20to\x20exit\x20plan\x20mode.\x20If\x20your\x20plan\x20includes\x20UI\x20changes:\x0a\x0a**ACTION\x20REQUIRED:**\x20Create\x20the\x20Ranger\x20feature\x20review\x20using\x20scenarios\x20from\x20your\x20Ranger\x20Feature\x20Review\x20Specification:\x0a\x0a```\x0aranger\x20create\x20\x22<Feature\x20Review\x20Name\x20from\x20plan>\x22\x20\x5c\x0a\x20\x20-d\x20\x22<Description\x20from\x20plan>\x22\x20\x5c\x0a\x20\x20-c\x20\x22<Scenario\x201\x20from\x20plan>\x22\x20\x5c\x0a\x20\x20-c\x20\x22<Scenario\x202\x20from\x20plan>\x22\x0a```\x0a\x0a**REMINDER:**\x20Scenarios\x20must\x20be\x20E2E\x20user\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\x22API\x20returns\x20200\x22\x0a\x0aIf\x20you\x20did\x20NOT\x20include\x20a\x20Ranger\x20Feature\x20Review\x20Specification\x20in\x20your\x20plan,\x20go\x20back\x20and\x20add\x20one\x20before\x20proceeding.\x20See\x20/ranger\x20and\x20create.md\x20for\x20guidance.\x0a\x0a===\x20END\x20===');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a5234,_0x87a64b){var _0x5b3e51=_0x57ab,_0x4b705c=_0x3a5234();while(!![]){try{var _0x59594f=-parseInt(_0x5b3e51(0xfc))/0x1+parseInt(_0x5b3e51(0xf4))/0x2+parseInt(_0x5b3e51(0xf2))/0x3*(-parseInt(_0x5b3e51(0xfa))/0x4)+-parseInt(_0x5b3e51(0xf7))/0x5*(-parseInt(_0x5b3e51(0xfb))/0x6)+parseInt(_0x5b3e51(0xf3))/0x7*(-parseInt(_0x5b3e51(0xf5))/0x8)+parseInt(_0x5b3e51(0xf6))/0x9+-parseInt(_0x5b3e51(0xf8))/0xa*(-parseInt(_0x5b3e51(0xf9))/0xb);if(_0x59594f===_0x87a64b)break;else _0x4b705c['push'](_0x4b705c['shift']());}catch(_0xdca409){_0x4b705c['push'](_0x4b705c['shift']());}}}(_0x4d0d,0xd5d20));export{sessionStart}from'./sessionStart.js';function _0x4d0d(){var _0xd691f6=['3AFrMpR','35WGkMCx','879692zdjKtE','276240HlVnyg','1112454ivyMaM','1531910cyaBwv','7061090PCUZGc','22fxVMte','5546292QmEgIt','18poqiMN','459785HkJBem'];_0x4d0d=function(){return _0xd691f6;};return _0x4d0d();}export{sessionEnd}from'./sessionEnd.js';export{preCompact}from'./preCompact.js';export{postEdit}from'./postEdit.js';export{planStart}from'./planStart.js';export{planReminder}from'./planReminder.js';export{exitPlanMode}from'./exitPlanMode.js';export{stopHook}from'./stopHook.js';function _0x57ab(_0x50a0e5,_0x3b87b3){_0x50a0e5=_0x50a0e5-0xf2;var _0x4d0d63=_0x4d0d();var _0x57ab02=_0x4d0d63[_0x50a0e5];return _0x57ab02;}export{enable}from'./enable.js';export{disable}from'./disable.js';export{autoPrompt}from'./autoPrompt.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3cdec6,_0x16ce99){const _0x528c58=_0x4826,_0x37ea87=_0x3cdec6();while(!![]){try{const _0x3062ca=parseInt(_0x528c58(0x109))/0x1+-parseInt(_0x528c58(0x101))/0x2+-parseInt(_0x528c58(0xfc))/0x3*(parseInt(_0x528c58(0x108))/0x4)+-parseInt(_0x528c58(0x102))/0x5+parseInt(_0x528c58(0x105))/0x6*(-parseInt(_0x528c58(0x100))/0x7)+-parseInt(_0x528c58(0xfa))/0x8*(-parseInt(_0x528c58(0x104))/0x9)+-parseInt(_0x528c58(0xfb))/0xa*(parseInt(_0x528c58(0xfe))/0xb);if(_0x3062ca===_0x16ce99)break;else _0x37ea87['push'](_0x37ea87['shift']());}catch(_0x3e46fb){_0x37ea87['push'](_0x37ea87['shift']());}}}(_0x5a27,0xf3079));import{isSessionEnabled}from'../utils/sessionCache.js';export function printBlock(_0x594d19){console['log'](_0x594d19);}function _0x4826(_0x992c69,_0x1aa94a){_0x992c69=_0x992c69-0xfa;const _0x5a272f=_0x5a27();let _0x4826dd=_0x5a272f[_0x992c69];return _0x4826dd;}export async function readHookInput(){const _0x126fe9=_0x4826;let _0x25fb49='';try{for await(const _0x1b4978 of process[_0x126fe9(0x107)]){_0x25fb49+=_0x1b4978;}}catch{return null;}if(!_0x25fb49['trim']())return null;try{return JSON[_0x126fe9(0xff)](_0x25fb49);}catch{return null;}}export async function getEnabledSessionId(_0x341248){const _0xb8ff53=_0x4826;if(_0x341248)return isSessionEnabled(_0x341248)?_0x341248:null;const _0x4b019e=await readHookInput(),_0x4f5529=_0x4b019e?.[_0xb8ff53(0x106)];if(!_0x4f5529||!isSessionEnabled(_0x4f5529))return null;return _0x4f5529;}export async function getEnabledHookContext(_0xffcd20){const _0x4ae780=_0x4826,_0x9217a1={'WVZjp':function(_0x48e8ae,_0xafcb33){return _0x48e8ae(_0xafcb33);},'dWmJH':function(_0xb62ed9,_0x64f7df){return _0xb62ed9(_0x64f7df);}};if(_0xffcd20){if(!_0x9217a1[_0x4ae780(0xfd)](isSessionEnabled,_0xffcd20))return null;return{'sessionId':_0xffcd20,'input':{'session_id':_0xffcd20}};}const _0x520085=await readHookInput(),_0x4db591=_0x520085?.['session_id'];if(!_0x4db591||!_0x9217a1[_0x4ae780(0x103)](isSessionEnabled,_0x4db591))return null;return{'sessionId':_0x4db591,'input':_0x520085};}function _0x5a27(){const _0xba0e6=['WVZjp','1078CGfTrE','parse','1121722uyKliu','699614pleKZs','1085485vBbWkN','dWmJH','1089rrcFhj','6AHkySM','session_id','stdin','854312WHlYHj','1119080BuVySs','100888FAjtOQ','72330lgAyCR','3SnSold'];_0x5a27=function(){return _0xba0e6;};return _0x5a27();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x3c65(){const _0x3111cb=['5216790QTONvj','4714205GGzeqm','bcTDZ','uCbct','6791568nhzItr','85586pgcAoG','467409JEHPIl','11583pARfMV','23EZRkZi','permission_mode','5192eriRNW','input','plan','338020JuQCcv'];_0x3c65=function(){return _0x3111cb;};return _0x3c65();}(function(_0x199d82,_0x272b13){const _0x5b1fad=_0x4612,_0x16c31f=_0x199d82();while(!![]){try{const _0x337159=-parseInt(_0x5b1fad(0x16d))/0x1*(parseInt(_0x5b1fad(0x16a))/0x2)+-parseInt(_0x5b1fad(0x16b))/0x3+-parseInt(_0x5b1fad(0x164))/0x4+-parseInt(_0x5b1fad(0x166))/0x5+parseInt(_0x5b1fad(0x165))/0x6+parseInt(_0x5b1fad(0x169))/0x7+-parseInt(_0x5b1fad(0x16f))/0x8*(-parseInt(_0x5b1fad(0x16c))/0x9);if(_0x337159===_0x272b13)break;else _0x16c31f['push'](_0x16c31f['shift']());}catch(_0x4326da){_0x16c31f['push'](_0x16c31f['shift']());}}}(_0x3c65,0x7beac));function _0x4612(_0x184f56,_0x245327){_0x184f56=_0x184f56-0x163;const _0x3c65b4=_0x3c65();let _0x461206=_0x3c65b4[_0x184f56];return _0x461206;}import{printBlock,getEnabledHookContext}from'./output.js';import{shouldShowPlanReminder}from'../utils/sessionCache.js';export async function planReminder(_0x471439){const _0x2c53e1=_0x4612,_0x19d963={'uCbct':function(_0x432c15,_0x868ff9){return _0x432c15(_0x868ff9);},'bcTDZ':function(_0x188343,_0x2b4c94){return _0x188343!==_0x2b4c94;}},_0x51e221=await _0x19d963[_0x2c53e1(0x168)](getEnabledHookContext,_0x471439);if(!_0x51e221)return;if(_0x19d963[_0x2c53e1(0x167)](_0x51e221[_0x2c53e1(0x170)][_0x2c53e1(0x16e)],_0x2c53e1(0x163)))return;if(!shouldShowPlanReminder(_0x51e221['sessionId']))return;_0x19d963[_0x2c53e1(0x168)](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 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5410e6,_0x4e1932){const _0x29d6f1=_0x44ba,_0x4e7a5b=_0x5410e6();while(!![]){try{const _0xe6be1b=-parseInt(_0x29d6f1(0x6d))/0x1*(-parseInt(_0x29d6f1(0x6e))/0x2)+parseInt(_0x29d6f1(0x6b))/0x3*(parseInt(_0x29d6f1(0x6f))/0x4)+parseInt(_0x29d6f1(0x73))/0x5+-parseInt(_0x29d6f1(0x70))/0x6*(parseInt(_0x29d6f1(0x75))/0x7)+-parseInt(_0x29d6f1(0x77))/0x8*(parseInt(_0x29d6f1(0x6a))/0x9)+parseInt(_0x29d6f1(0x74))/0xa+parseInt(_0x29d6f1(0x71))/0xb*(-parseInt(_0x29d6f1(0x6c))/0xc);if(_0xe6be1b===_0x4e1932)break;else _0x4e7a5b['push'](_0x4e7a5b['shift']());}catch(_0x2e2116){_0x4e7a5b['push'](_0x4e7a5b['shift']());}}}(_0x2353,0xa9005));import{printBlock,getEnabledSessionId}from'./output.js';function _0x44ba(_0x3aff47,_0x584d36){_0x3aff47=_0x3aff47-0x6a;const _0x235360=_0x2353();let _0x44baac=_0x235360[_0x3aff47];return _0x44baac;}export async function planStart(_0x2166ce){const _0x5a48bd=_0x44ba,_0x3d8b94={'mOLFV':function(_0x19539e,_0x3ba268){return _0x19539e(_0x3ba268);}},_0xe82fda=await _0x3d8b94[_0x5a48bd(0x72)](getEnabledSessionId,_0x2166ce);if(!_0xe82fda)return;printBlock(_0x5a48bd(0x76));}function _0x2353(){const _0x371938=['97728nOYUmd','26uJnpKT','96598PordqR','52236rDMgtI','94158PcKEkv','1188JgAStg','mOLFV','3050090WWtICH','9283280FwPKcO','532cHahxd','===\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===','2848cErmhT','28152DkjKzB','249Nhuyqj'];_0x2353=function(){return _0x371938;};return _0x2353();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x311bab,_0x3e5468){const _0x33c7f2=_0x2170,_0x4b1f50=_0x311bab();while(!![]){try{const _0x43ae90=-parseInt(_0x33c7f2(0x13e))/0x1+-parseInt(_0x33c7f2(0x13a))/0x2+parseInt(_0x33c7f2(0x13d))/0x3*(parseInt(_0x33c7f2(0x139))/0x4)+-parseInt(_0x33c7f2(0x137))/0x5+-parseInt(_0x33c7f2(0x135))/0x6*(parseInt(_0x33c7f2(0x134))/0x7)+-parseInt(_0x33c7f2(0x138))/0x8+parseInt(_0x33c7f2(0x133))/0x9;if(_0x43ae90===_0x3e5468)break;else _0x4b1f50['push'](_0x4b1f50['shift']());}catch(_0x4ac916){_0x4b1f50['push'](_0x4b1f50['shift']());}}}(_0x4371,0xdb196));function _0x4371(){const _0x16c922=['1006004sREaBW','PostToolUse','50806287JWtvtV','1253SPklvC','48936buHCuI','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.','6933040KunCYi','8700552sOmkML','212WuudgQ','2856378gKrLke','fpBvY','stringify','91731jLlepC'];_0x4371=function(){return _0x16c922;};return _0x4371();}import{getSessionEntry,updateBranchTracking}from'../utils/sessionCache.js';import{getToken}from'../utils/keychain.js';function _0x2170(_0x557148,_0x1476fc){_0x557148=_0x557148-0x132;const _0x4371f0=_0x4371();let _0x2170f9=_0x4371f0[_0x557148];return _0x2170f9;}import{getEnabledSessionId}from'./output.js';export async function postEdit(_0x24e7df){const _0x1ea139=_0x2170,_0x4ae94b={'LMwCI':function(_0x33b6af,_0x1dd617){return _0x33b6af(_0x1dd617);},'DWsLp':function(_0x4a82d5){return _0x4a82d5();},'fpBvY':'PostToolUse'},_0x48a87b=await _0x4ae94b['LMwCI'](getEnabledSessionId,_0x24e7df);if(!_0x48a87b)return;updateBranchTracking(_0x48a87b);const _0x4a1554=await _0x4ae94b['DWsLp'](getToken);if(!_0x4a1554)return;const _0x4aa013=getSessionEntry(_0x48a87b);if(_0x4aa013){const _0x4abb24={'hookSpecificOutput':{'hookEventName':_0x1ea139(0x132),'additionalContext':'RANGER:\x20If\x20this\x20change\x20expands\x20the\x20scope\x20of\x20the\x20active\x20feature\x20review,\x20you\x20may\x20need\x20to\x20add\x20a\x20scenario.\x20See\x20Workflow\x201\x20in\x20/ranger.\x20If\x20you\x20decide\x20to\x20add\x20a\x20scenario,\x20you\x20MUST\x20read\x20Workflow\x201\x20IN\x20DETAIL\x20first.\x20Remember:\x20when\x20you\x20finish\x20your\x20work,\x20your\x20final\x20message\x20to\x20the\x20user\x20must\x20direct\x20them\x20to\x20the\x20Ranger\x20feature\x20review\x20dashboard\x20to\x20review\x20(e.g.\x20\x22Go\x20to\x20the\x20Ranger\x20feature\x20dashboard\x20to\x20review:\x20https://dashboard.ranger.net/features/{feature_id}\x22).'}};console['log'](JSON[_0x1ea139(0x13c)](_0x4abb24));return;}const _0x191c6c={'hookSpecificOutput':{'hookEventName':_0x4ae94b[_0x1ea139(0x13b)],'additionalContext':_0x1ea139(0x136)}};console['log'](JSON[_0x1ea139(0x13c)](_0x191c6c));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4a40e9,_0x38373b){const _0x4d381e=_0x22ab,_0x520282=_0x4a40e9();while(!![]){try{const _0x537581=parseInt(_0x4d381e(0x1cf))/0x1+-parseInt(_0x4d381e(0x1cd))/0x2+parseInt(_0x4d381e(0x1ce))/0x3*(parseInt(_0x4d381e(0x1d4))/0x4)+parseInt(_0x4d381e(0x1d5))/0x5*(parseInt(_0x4d381e(0x1d2))/0x6)+parseInt(_0x4d381e(0x1cb))/0x7*(-parseInt(_0x4d381e(0x1d3))/0x8)+parseInt(_0x4d381e(0x1d1))/0x9+-parseInt(_0x4d381e(0x1cc))/0xa;if(_0x537581===_0x38373b)break;else _0x520282['push'](_0x520282['shift']());}catch(_0x36611a){_0x520282['push'](_0x520282['shift']());}}}(_0x4160,0x25f2d));function _0x22ab(_0x262b8f,_0xdcfe56){_0x262b8f=_0x262b8f-0x1cb;const _0x41602d=_0x4160();let _0x22ab2b=_0x41602d[_0x262b8f];return _0x22ab2b;}import{getToken}from'../utils/keychain.js';import{printBlock,getEnabledSessionId}from'./output.js';export async function preCompact(_0x3e1d63){const _0x2c32a3=_0x22ab,_0x3e63f5=await getEnabledSessionId(_0x3e1d63);if(!_0x3e63f5)return;try{const _0x37a309=await getToken();if(!_0x37a309)return;printBlock(_0x2c32a3(0x1d0));}catch{}}function _0x4160(){const _0x2fb587=['1202892wHhICE','8WXyrBG','284nJmIJD','5JeXejG','745724sxoTxY','3650980LCRnoQ','455590rMKJUp','11148ThENFL','223094nguAYi','===\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`.','1507050mIkqIi'];_0x4160=function(){return _0x2fb587;};return _0x4160();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x8cbb(){const _0x118e35=['CLAUDE_SESSION_ID','8742213TtsdAQ','10LNaKDh','1027329lNixRa','1452539cgtRfb','5UdEpFU','53552qLQjJq','582172RudYtH','env','341222tNVUIV','7839042xJIynk','2GEamJj','32AtLEPB'];_0x8cbb=function(){return _0x118e35;};return _0x8cbb();}(function(_0x54f07f,_0x16b627){const _0x9d0646=_0x1b19,_0x400376=_0x54f07f();while(!![]){try{const _0x3835df=parseInt(_0x9d0646(0x1d4))/0x1*(-parseInt(_0x9d0646(0x1cc))/0x2)+parseInt(_0x9d0646(0x1d1))/0x3+parseInt(_0x9d0646(0x1d5))/0x4*(parseInt(_0x9d0646(0x1d3))/0x5)+parseInt(_0x9d0646(0x1cb))/0x6+-parseInt(_0x9d0646(0x1ca))/0x7*(parseInt(_0x9d0646(0x1cd))/0x8)+-parseInt(_0x9d0646(0x1cf))/0x9+-parseInt(_0x9d0646(0x1d0))/0xa*(-parseInt(_0x9d0646(0x1d2))/0xb);if(_0x3835df===_0x16b627)break;else _0x400376['push'](_0x400376['shift']());}catch(_0x3d5c5b){_0x400376['push'](_0x400376['shift']());}}}(_0x8cbb,0xac859));function _0x1b19(_0x2fd1c9,_0x553cca){_0x2fd1c9=_0x2fd1c9-0x1ca;const _0x8cbb2d=_0x8cbb();let _0x1b1946=_0x8cbb2d[_0x2fd1c9];return _0x1b1946;}import{isSessionEnabled,recordEnabledSessionCleared}from'../utils/sessionCache.js';import{readHookInput}from'./output.js';export async function sessionEnd(_0x15a808){const _0x25c40f=_0x1b19,_0x4aa2ea={'OMWmG':'clear'},_0x32e975=process[_0x25c40f(0x1d6)][_0x25c40f(0x1ce)];let _0x54603d=_0x15a808,_0x1d0eae;if(!_0x15a808){if(_0x32e975&&!isSessionEnabled(_0x32e975))return;const _0x17a5d5=await readHookInput();_0x54603d=_0x17a5d5?.['session_id']||_0x32e975,_0x1d0eae=_0x17a5d5?.['reason'];}if(!_0x54603d)return;_0x1d0eae===_0x4aa2ea['OMWmG']&&recordEnabledSessionCleared(_0x54603d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf38f06,_0x4de22b){const _0xee84f4=_0x2ec2,_0x40cc14=_0xf38f06();while(!![]){try{const _0x266a5c=parseInt(_0xee84f4(0x12a))/0x1*(-parseInt(_0xee84f4(0x127))/0x2)+-parseInt(_0xee84f4(0x126))/0x3+parseInt(_0xee84f4(0x125))/0x4*(-parseInt(_0xee84f4(0x128))/0x5)+-parseInt(_0xee84f4(0x131))/0x6*(parseInt(_0xee84f4(0x13a))/0x7)+parseInt(_0xee84f4(0x139))/0x8+-parseInt(_0xee84f4(0x12c))/0x9+-parseInt(_0xee84f4(0x12e))/0xa*(-parseInt(_0xee84f4(0x134))/0xb);if(_0x266a5c===_0x4de22b)break;else _0x40cc14['push'](_0x40cc14['shift']());}catch(_0x3981d6){_0x40cc14['push'](_0x40cc14['shift']());}}}(_0x5113,0x6ae38));import{appendFile}from'fs/promises';import{initBranchTracking,shouldAutoEnableAfterClear,autoEnableAfterClear,isSessionEnabled,getCurrentBranch}from'../utils/sessionCache.js';function _0x5113(){const _0x66b4d2=['env','7047396HqneGX','SessionStart','30LfomUS','CLAUDE_ENV_FILE','main','24GWxOiZ','Umtrg','SKxid','10558911OkMQMW','export\x20CLAUDE_SESSION_ID=\x22','stringify','master','log','2022384RzAsqQ','129367kzwIJV','SvNWQ','session_id','dPdkh','172SyNXki','1979535NyNLZh','525562CmlzTh','75850XfmnKF','HCsdw','2CFUFba'];_0x5113=function(){return _0x66b4d2;};return _0x5113();}function _0x2ec2(_0x52a055,_0x56287c){_0x52a055=_0x52a055-0x123;const _0x51134b=_0x5113();let _0x2ec2fa=_0x51134b[_0x52a055];return _0x2ec2fa;}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=================================================================';export async function sessionStart(_0x28c53c){const _0x28391d=_0x2ec2,_0x16926a={'Umtrg':function(_0x3f7cc7,_0x5311ec){return _0x3f7cc7||_0x5311ec;},'HCsdw':_0x28391d(0x123),'ECGLz':function(_0x19476c,_0xe6c2ff){return _0x19476c&&_0xe6c2ff;},'SKxid':function(_0x11dbd8,_0x33e134,_0x39ad49){return _0x11dbd8(_0x33e134,_0x39ad49);},'dPdkh':function(_0x5f39b1){return _0x5f39b1();},'hltIq':function(_0x22dbac,_0x46530e){return _0x22dbac(_0x46530e);},'SvNWQ':_0x28391d(0x130),'kgOpD':_0x28391d(0x12d)};let _0x17d7c1=_0x16926a[_0x28391d(0x132)](_0x28c53c,''),_0x30b50f;if(!_0x28c53c){let _0x34c7cf='';for await(const _0x54244c of process['stdin']){_0x34c7cf+=_0x54244c;}try{const _0x36485a=JSON['parse'](_0x34c7cf);_0x17d7c1=_0x36485a[_0x16926a[_0x28391d(0x129)]]||'',_0x30b50f=_0x36485a['source'];}catch{}const _0x1222b1=process[_0x28391d(0x12b)][_0x28391d(0x12f)];if(_0x16926a['ECGLz'](_0x1222b1,_0x17d7c1))try{await _0x16926a[_0x28391d(0x133)](appendFile,_0x1222b1,_0x28391d(0x135)+_0x17d7c1+'\x22\x0a');}catch{}}try{await _0x16926a[_0x28391d(0x124)](getToken);}catch{}if(_0x17d7c1){_0x16926a['hltIq'](shouldAutoEnableAfterClear,_0x30b50f)&&autoEnableAfterClear(_0x17d7c1);initBranchTracking(_0x17d7c1);const _0x5d2218=isSessionEnabled(_0x17d7c1);try{const _0xd82dd1=createTelemetryCollector('hook:session-start');await _0xd82dd1['trackCommandStart']({'sessionId':_0x17d7c1,'hooksEnabled':_0x5d2218}),await _0xd82dd1['trackCommandEnd']('success');}catch{}if(_0x5d2218){const _0x179256=getCurrentBranch(),_0x1a09be=_0x179256&&_0x179256!==_0x16926a[_0x28391d(0x13b)]&&_0x179256!==_0x28391d(0x137)?'\x20(Branch:\x20'+_0x179256+')':'',_0x1df15c={'hookSpecificOutput':{'hookEventName':_0x16926a['kgOpD'],'additionalContext':RANGER_AUTO_ENABLED_PROMPT+_0x1a09be}};console[_0x28391d(0x138)](JSON[_0x28391d(0x136)](_0x1df15c));}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x2d5c(){const _0x23c368=['175708SPBClr','currentSessionId','featureId','log','trackCommandEnd','blocked','some','oPlza','503397gdNlfK','Lpnid','success','dbHQm','704949NlSKNb','trackCommandStart','2017764JZVoGx','16fozXjQ','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','closed','146456PzWmKN','5695teouph','1698SXFmWc','284179zvVRjc','hpbrv','verification_in_progress'];_0x2d5c=function(){return _0x23c368;};return _0x2d5c();}(function(_0x303aeb,_0x273b5f){const _0x342b68=_0x2870,_0x192c4d=_0x303aeb();while(!![]){try{const _0x17d0d7=parseInt(_0x342b68(0x1e1))/0x1+-parseInt(_0x342b68(0x1f3))/0x2+parseInt(_0x342b68(0x1ed))/0x3+-parseInt(_0x342b68(0x1ef))/0x4+-parseInt(_0x342b68(0x1f4))/0x5*(-parseInt(_0x342b68(0x1f5))/0x6)+-parseInt(_0x342b68(0x1f6))/0x7*(-parseInt(_0x342b68(0x1f0))/0x8)+parseInt(_0x342b68(0x1e9))/0x9;if(_0x17d0d7===_0x273b5f)break;else _0x192c4d['push'](_0x192c4d['shift']());}catch(_0x332c2b){_0x192c4d['push'](_0x192c4d['shift']());}}}(_0x2d5c,0x47686));import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';function _0x2870(_0x256147,_0x10a520){_0x256147=_0x256147-0x1df;const _0x2d5c28=_0x2d5c();let _0x28706b=_0x2d5c28[_0x256147];return _0x28706b;}import{getSessionEntry,shouldShowStopReminder}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0x549f03){const _0x467d92=_0x2870,_0x24d63d={'jFtcP':function(_0x3e91d0,_0x505947){return _0x3e91d0(_0x505947);},'SHrLu':function(_0x45b64f,_0x1956e6,_0x28957d,_0x41dad9){return _0x45b64f(_0x1956e6,_0x28957d,_0x41dad9);},'hpbrv':function(_0x3df911,_0x563038){return _0x3df911(_0x563038);},'dbHQm':function(_0xbef3d5,_0x19a8c9,_0x306853,_0x557940){return _0xbef3d5(_0x19a8c9,_0x306853,_0x557940);},'Fzyrn':function(_0x5cc959){return _0x5cc959();},'LEWAP':function(_0xae443a,_0xb2609b){return _0xae443a(_0xb2609b);},'Lpnid':function(_0x105442,_0x10f9fa){return _0x105442&&_0x10f9fa;},'oPlza':'Stop','zZgIA':function(_0x5ec3b8,_0x390932,_0x1d6328,_0x371bbe){return _0x5ec3b8(_0x390932,_0x1d6328,_0x371bbe);}},_0x54c152=await _0x24d63d['jFtcP'](getEnabledHookContext,_0x549f03),_0x10af42=_0x54c152?.['sessionId']??null;let _0x46471f=!![];if(!_0x10af42){await _0x24d63d['SHrLu'](trackStop,_0x10af42,![],_0x46471f);return;}try{const _0x247247=_0x24d63d[_0x467d92(0x1df)](getSessionEntry,_0x10af42);if(!_0x247247){await _0x24d63d[_0x467d92(0x1ec)](trackStop,_0x10af42,!![],_0x46471f);return;}const _0x1619dd=await _0x24d63d['Fzyrn'](getToken),_0x321f0b='https://dashboard.ranger.net/features/'+_0x247247['featureId'];let _0x12e2e2=null,_0x14ea25=![],_0x4552dc=![];if(_0x1619dd)try{const _0x174cc2=await _0x24d63d['LEWAP'](getFeature,_0x247247['featureId']);_0x12e2e2=_0x174cc2[_0x467d92(0x1e2)]??null;const _0xc76d24=_0x174cc2['checklistItems']['filter'](_0x408d6f=>_0x408d6f['sessionId']===_0x12e2e2);_0x14ea25=_0xc76d24['some'](_0x3f9217=>_0x3f9217['status']!=='verified'&&_0x3f9217['status']!==_0x467d92(0x1e6)&&_0x3f9217['status']!==_0x467d92(0x1f2)&&_0x3f9217['status']!=='incomplete'),_0x4552dc=_0xc76d24[_0x467d92(0x1e7)](_0x93489b=>_0x93489b['status']===_0x467d92(0x1e0));}catch{}if(_0x24d63d[_0x467d92(0x1ea)](_0x1619dd,_0x12e2e2)&&_0x14ea25){if(!_0x4552dc&&shouldShowStopReminder(_0x10af42)){const _0x190a8b={'hookSpecificOutput':{'hookEventName':_0x24d63d[_0x467d92(0x1e8)],'additionalContext':_0x467d92(0x1f1)+_0x321f0b}};console[_0x467d92(0x1e4)](JSON['stringify'](_0x190a8b));}}if(_0x1619dd&&_0x12e2e2&&!_0x14ea25)try{await concludeSession(_0x247247[_0x467d92(0x1e3)],_0x12e2e2);}catch{}await trackStop(_0x10af42,!![],_0x46471f);return;}catch{await _0x24d63d['zZgIA'](trackStop,_0x10af42,!![],_0x46471f);return;}}async function trackStop(_0x311850,_0x30cf37,_0x2917cd){const _0x1f2a10=_0x2870,_0x4c14c7={'AVLeL':function(_0x128370,_0x531236){return _0x128370(_0x531236);},'PJxoQ':'hook:stop','wjITZ':function(_0x17b389,_0x210c93){return _0x17b389??_0x210c93;}};try{const _0x7837c5=_0x4c14c7['AVLeL'](createTelemetryCollector,_0x4c14c7['PJxoQ']);await _0x7837c5[_0x1f2a10(0x1ee)]({'sessionId':_0x4c14c7['wjITZ'](_0x311850,undefined),'hooksEnabled':_0x30cf37,'stopAllowed':_0x2917cd}),await _0x7837c5[_0x1f2a10(0x1e5)](_0x1f2a10(0x1eb));}catch{}}
|
package/build/commands/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x50898f,_0x55a585){var _0x579e7a=_0x2ff6,_0xf8480b=_0x50898f();while(!![]){try{var _0x2c1629=-parseInt(_0x579e7a(0x1a1))/0x1*(-parseInt(_0x579e7a(0x19d))/0x2)+parseInt(_0x579e7a(0x1a0))/0x3*(-parseInt(_0x579e7a(0x1a3))/0x4)+-parseInt(_0x579e7a(0x1a5))/0x5*(parseInt(_0x579e7a(0x19e))/0x6)+parseInt(_0x579e7a(0x1a4))/0x7+-parseInt(_0x579e7a(0x19c))/0x8*(-parseInt(_0x579e7a(0x19f))/0x9)+parseInt(_0x579e7a(0x19a))/0xa*(-parseInt(_0x579e7a(0x19b))/0xb)+parseInt(_0x579e7a(0x1a2))/0xc;if(_0x2c1629===_0x55a585)break;else _0xf8480b['push'](_0xf8480b['shift']());}catch(_0x253bd1){_0xf8480b['push'](_0xf8480b['shift']());}}}(_0x2e92,0xd7769));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';export{start,ensureLocalEnv,ensureChromium,authenticate}from'./start.js';function _0x2e92(){var _0xb421f3=['372sBqxHy','9rMtCMV','34512wKYaWY','1439qaQUuU','28402416ONxpWr','368EPQisV','1828666xjZGDI','129300mVjldg','1137540lUYSIp','22aZkiOJ','434432KdCePp','1514OLJkHR'];_0x2e92=function(){return _0xb421f3;};return _0x2e92();}function _0x2ff6(_0x4be0c5,_0x21b1e4){_0x4be0c5=_0x4be0c5-0x19a;var _0x2e929f=_0x2e92();var _0x2ff6ed=_0x2e929f[_0x4be0c5];return _0x2ff6ed;}export{useEnv}from'./useEnv.js';export{deleteProfile}from'./deleteProfile.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';export{migrateProfile}from'./migrateProfile.js';
|
package/build/commands/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x507d9c,_0x117aee){const _0x433b0c=_0x2d6f,_0x228c74=_0x507d9c();while(!![]){try{const _0x18fdb8=parseInt(_0x433b0c(0x8e))/0x1*(-parseInt(_0x433b0c(0x8d))/0x2)+parseInt(_0x433b0c(0x89))/0x3*(parseInt(_0x433b0c(0x8b))/0x4)+parseInt(_0x433b0c(0x8a))/0x5+parseInt(_0x433b0c(0x8f))/0x6*(parseInt(_0x433b0c(0x99))/0x7)+-parseInt(_0x433b0c(0x8c))/0x8+-parseInt(_0x433b0c(0x93))/0x9+parseInt(_0x433b0c(0x91))/0xa*(parseInt(_0x433b0c(0x92))/0xb);if(_0x18fdb8===_0x117aee)break;else _0x228c74['push'](_0x228c74['shift']());}catch(_0x1d8ee0){_0x228c74['push'](_0x228c74['shift']());}}}(_0x3228,0x3d5be));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x3228(){const _0x5b8e86=['2239440flnZkm','9006vWPtvk','1qILfKS','35592UQALhC','iFOWH','7200aRZRKc','7271fIDmzb','4084893GPRmmc','Benuc','fzpuT','NQvsm','Re-authenticating\x20via\x20MCP\x20bootstrap...','VAiQk','112IvonJn','log','28707PxlYZh','897895gbWlua','100yDOcTH'];_0x3228=function(){return _0x5b8e86;};return _0x3228();}function _0x2d6f(_0x1fcbaa,_0x28eb8a){_0x1fcbaa=_0x1fcbaa-0x89;const _0x322829=_0x3228();let _0x2d6f13=_0x322829[_0x1fcbaa];return _0x2d6f13;}import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0x4debe0=_0x2d6f,_0x1a818d={'iFOWH':_0x4debe0(0x97),'Benuc':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','fzpuT':function(_0x4ff06a){return _0x4ff06a();},'jZURq':function(_0x5f0536,_0x3f4a2a){return _0x5f0536(_0x3f4a2a);},'VAiQk':'\x0a✅\x20API\x20key\x20stored\x20successfully','NQvsm':function(_0xb85094,_0x15c05a){return _0xb85094 instanceof _0x15c05a;}},_0x1b47e0=await getMcpAuthOrigin();if(_0x1b47e0){console[_0x4debe0(0x9a)](_0x1a818d[_0x4debe0(0x90)]),await mcpBootstrap();return;}if(!isInteractive())throw new Error(_0x1a818d[_0x4debe0(0x94)]);try{const _0x5a4538=await _0x1a818d[_0x4debe0(0x95)](runDeviceAuthFlow),_0x4146df=await _0x1a818d['jZURq'](getCurrentUser,_0x5a4538);_0x4146df['success']?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x4146df['user']['organizationName']):console['log'](_0x1a818d[_0x4debe0(0x98)]);}catch(_0x28d54f){throw new Error('Login\x20failed:\x20'+(_0x1a818d[_0x4debe0(0x96)](_0x28d54f,Error)?_0x28d54f['message']:_0x28d54f));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xd4fbbe=_0x3e95;(function(_0x20d17c,_0xa9067){const _0x354ca2=_0x3e95,_0x482241=_0x20d17c();while(!![]){try{const _0x28a5a0=parseInt(_0x354ca2(0xe8))/0x1+parseInt(_0x354ca2(0x107))/0x2*(parseInt(_0x354ca2(0x153))/0x3)+-parseInt(_0x354ca2(0xe2))/0x4*(-parseInt(_0x354ca2(0x109))/0x5)+-parseInt(_0x354ca2(0x160))/0x6*(parseInt(_0x354ca2(0x13d))/0x7)+parseInt(_0x354ca2(0xf7))/0x8*(-parseInt(_0x354ca2(0x12f))/0x9)+-parseInt(_0x354ca2(0x152))/0xa*(parseInt(_0x354ca2(0xca))/0xb)+-parseInt(_0x354ca2(0x142))/0xc*(-parseInt(_0x354ca2(0xf8))/0xd);if(_0x28a5a0===_0xa9067)break;else _0x482241['push'](_0x482241['shift']());}catch(_0x2a416d){_0x482241['push'](_0x482241['shift']());}}}(_0x2877,0xd7deb));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(),_0xd4fbbe(0xcd),'mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),_0xd4fbbe(0xcd),_0xd4fbbe(0x157));export async function getMcpAuthOrigin(){const _0x345743={'yQbwz':function(_0x2a912f,_0x98fddc,_0x78abfe){return _0x2a912f(_0x98fddc,_0x78abfe);},'OMayA':function(_0x2699e5,_0x3df7a9){return _0x2699e5||_0x3df7a9;}};try{const _0x1960d0=(await _0x345743['yQbwz'](readFile,AUTH_ORIGIN_PATH,'utf-8'))['trim']();return _0x345743['OMayA'](_0x1960d0,null);}catch{return null;}}export async function mcpBootstrap(){const _0x3d4993=_0xd4fbbe,_0x4a65ed={'wxoqy':function(_0x2660a6,_0x5f3c4b){return _0x2660a6(_0x5f3c4b);},'KhWIX':function(_0x13c822){return _0x13c822();},'RwycM':function(_0x5476c8,_0x12c8d5){return _0x5476c8+_0x12c8d5;},'meHBO':'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','XYQiG':function(_0x1a68d7,_0x1fd19c,_0x47f972){return _0x1a68d7(_0x1fd19c,_0x47f972);}},_0x268b4a=getMcpAuthUrl();currentOrigin=_0x268b4a;const _0x54975d=process['stdout'][_0x3d4993(0x101)]??![];console['log'](_0x3d4993(0x113)+_0x268b4a+'\x0a');const _0xe65864=await _0x4a65ed['wxoqy'](tryUnauthenticated,_0x268b4a);let _0x36f768=null;if(_0xe65864==='proxied')_0x36f768='';else{_0x36f768=await _0x4a65ed['KhWIX'](loadCachedToken);if(!_0x36f768){if(!_0x54975d)throw new Error(_0x4a65ed['RwycM'](_0x3d4993(0x114),_0x4a65ed[_0x3d4993(0x135)]));_0x36f768=await _0x4a65ed[_0x3d4993(0xe7)](oauthFlow,_0x268b4a);}}await _0x4a65ed['XYQiG'](callGetCliToken,_0x268b4a,_0x36f768);}async function tryUnauthenticated(_0x57ddc6){const _0x48f089=_0xd4fbbe,_0x58c586={'UCcxO':_0x48f089(0x130),'MTbjw':'application/json','hMqJZ':'application/json,\x20text/event-stream','EUpiv':_0x48f089(0x11a),'hXLxq':_0x48f089(0xfc),'xDwzU':_0x48f089(0x103),'ogzOI':'ranger-cli','qTmUC':'proxied','yWptI':function(_0x41dce2,_0x4c2330){return _0x41dce2===_0x4c2330;},'bMqSK':'needs-oauth'},_0x15731a=await fetch(_0x57ddc6,{'method':_0x58c586[_0x48f089(0x104)],'headers':{'Content-Type':_0x58c586['MTbjw'],'Accept':_0x58c586['hMqJZ']},'body':JSON['stringify']({'jsonrpc':_0x58c586[_0x48f089(0xd2)],'id':0x1,'method':_0x58c586['hXLxq'],'params':{'protocolVersion':_0x58c586['xDwzU'],'capabilities':{},'clientInfo':{'name':_0x58c586['ogzOI'],'version':_0x48f089(0x158)}}})});if(_0x15731a['ok'])return await _0x15731a[_0x48f089(0x14e)](),_0x58c586[_0x48f089(0xf0)];if(_0x58c586['yWptI'](_0x15731a['status'],0x191))return await _0x15731a[_0x48f089(0x14e)](),_0x58c586['bMqSK'];const _0x53bfe1=await _0x15731a[_0x48f089(0x14e)]();throw new Error('MCP\x20server\x20returned\x20HTTP\x20'+_0x15731a[_0x48f089(0x123)]+':\x20'+_0x53bfe1);}function _0x3e95(_0x57956e,_0x64ecb3){_0x57956e=_0x57956e-0xc9;const _0x2877e8=_0x2877();let _0x3e95e8=_0x2877e8[_0x57956e];return _0x3e95e8;}class OAuthTimeoutError extends Error{constructor(_0x30ca75){const _0x4b39b4=_0xd4fbbe,_0x10f8f1={'sYSal':'OAuthTimeoutError'};super(_0x30ca75),this[_0x4b39b4(0x10c)]=_0x10f8f1[_0x4b39b4(0x14a)];}}async function oauthFlow(_0x4c1e72){const _0x1e8daf=_0xd4fbbe,_0xbec56d={'Krbdv':function(_0x18d2b5,_0x643a40){return _0x18d2b5 instanceof _0x643a40;},'yOPtF':function(_0x4b6491){return _0x4b6491();},'cACGw':_0x1e8daf(0x162)};try{return await oauthFlowAttempt(_0x4c1e72);}catch(_0x2a5f97){if(_0xbec56d[_0x1e8daf(0x10b)](_0x2a5f97,OAuthTimeoutError)&&await _0xbec56d[_0x1e8daf(0xd7)](loadCachedClient))return console[_0x1e8daf(0x128)](_0xbec56d['cACGw']),await clearCachedClient(),await oauthFlowAttempt(_0x4c1e72);throw _0x2a5f97;}}function _0x2877(){const _0x3942a9=['state','open','writeHead','96OQADfr','clientId','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','digest','zfNUH','Jqnrd','match','code','sYSal','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','includes','now','text','trim','win32','rDPQE','12590140EFUSUg','111byffrE','code_challenge_method','isError','ciols','auth-origin.txt','1.0.0','none','write','ckcIX','pathname','stdout','result','close','2401314sDyljy','\x0aToken\x20written\x20to\x20','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','authorization_servers','11AEhGFt','LcQGd','Bearer\x20','.ranger','ErwKp','OKExa','expires_in','sNWor','EUpiv','clientSecret','mOOXJ','refreshToken','searchParams','yOPtF','<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','oToUT','Euuym','origin','boHbr','gLZVa','replace','/callback','parse','nFlzR','77092xjdNfb','taGwy','http://localhost:','end','rALcs','wxoqy','1422809BnLBYl','OAuth\x20error:\x20','set','NEqLM','Not\x20found','\x0aOpening\x20browser\x20for\x20authentication...','text/event-stream','startsWith','qTmUC','structuredContent','kixVX','toString','access_token','bwqVz','base64url','8gILIWa','1603849RNiJWB','string','dnjQh','frnRL','initialize','knlso','error','expiresAt','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','isTTY','application/json,\x20text/event-stream','2025-03-26','UCcxO','json','DawkP','9740gprYii','content-type','425QXwDCc','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','Krbdv','name','MPMee','Discovering\x20authorization\x20server...','nmbty','Client\x20registration\x20failed:\x20','update','\x0aUnexpected\x20response\x20structure:','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','stringify','token_endpoint','Exchanging\x20authorization\x20code...','WRKPr','resource','2.0','utf-8','eDLHk','Ranger\x20CLI','tools/call','FjYqR','get','Jvicr','error_description','status','listen','WaXuT','response_type','content','log','hex','message','VykVF','qrXuQ','code_challenge','EYXdz','7958826nyyToE','POST','accessToken','KRlnN','fZIkS','GCgxF','meHBO','kdWnD','MCP\x20initialize\x20failed:\x20','\x20done','Initializing\x20MCP\x20session...','token','HTTP\x20','data:','21XotTQF','split'];_0x2877=function(){return _0x3942a9;};return _0x2877();}async function oauthFlowAttempt(_0x4730b1){const _0x23feba=_0xd4fbbe,_0x2fcc1d={'ZTABF':_0x23feba(0x10e),'frnRL':function(_0x58122a,_0x1c7309){return _0x58122a(_0x1c7309);},'Euuym':function(_0x164ee5){return _0x164ee5();},'NEqLM':'Registering\x20OAuth\x20client...','taGwy':_0x23feba(0x11d),'zfNUH':'authorization_code','Jqnrd':_0x23feba(0x159),'Bamzf':function(_0x3d8914,_0x335f50,_0x2d5911){return _0x3d8914(_0x335f50,_0x2d5911);},'OtZRT':'\x20done','vezAc':_0x23feba(0xf6),'ckcIX':'sha256','vvIzw':_0x23feba(0x129),'IaLHa':_0x23feba(0x126),'PTuxE':'code','qrXuQ':'client_id','bwqVz':_0x23feba(0x13f),'sNWor':function(_0x4cc39d,_0x2ef8c4){return _0x4cc39d(_0x2ef8c4);},'VbaMV':function(_0x15c0c2,_0x324c09,_0x113c2f){return _0x15c0c2(_0x324c09,_0x113c2f);},'boHbr':_0x23feba(0x130),'GCgxF':'application/x-www-form-urlencoded','rtmer':function(_0x126f70,_0x54dad3,_0x4b77ec,_0x272c8a){return _0x126f70(_0x54dad3,_0x4b77ec,_0x272c8a);}},_0x54505f=_0x4730b1[_0x23feba(0xde)](/\/mcp$/,'');process[_0x23feba(0x15d)]['write'](_0x2fcc1d['ZTABF']);const _0x212a22=await fetch(_0x54505f+'/.well-known/oauth-protected-resource');if(!_0x212a22['ok'])throw new Error('Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server');const _0x13bd6b=await _0x212a22[_0x23feba(0x105)](),_0x21c7ab=_0x13bd6b[_0x23feba(0xc9)]?.[0x0];if(!_0x21c7ab)throw new Error('No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata');console[_0x23feba(0x128)]('\x20'+_0x21c7ab);const _0x247587=await _0x2fcc1d[_0x23feba(0xfb)](fetchAuthServerMetadata,_0x21c7ab);let _0xf89a17,_0xc353db;const _0x26bbdd=await _0x2fcc1d[_0x23feba(0xda)](loadCachedClient);if(_0x26bbdd)_0xf89a17=_0x26bbdd['clientId'],_0xc353db=_0x26bbdd[_0x23feba(0xd3)];else{if(_0x247587['registration_endpoint']){process[_0x23feba(0x15d)]['write'](_0x2fcc1d[_0x23feba(0xeb)]);const _0x1be83=await fetch(_0x247587['registration_endpoint'],{'method':_0x23feba(0x130),'headers':{'Content-Type':'application/json'},'body':JSON['stringify']({'client_name':_0x2fcc1d[_0x23feba(0xe3)],'redirect_uris':['http://localhost:'+CALLBACK_PORT+_0x23feba(0xdf)],'grant_types':[_0x2fcc1d[_0x23feba(0x146)],'refresh_token'],'response_types':[_0x23feba(0x149)],'token_endpoint_auth_method':_0x2fcc1d[_0x23feba(0x147)]})});if(!_0x1be83['ok']){const _0x4b18ed=await _0x1be83['text']();throw new Error(_0x23feba(0x110)+_0x4b18ed);}const _0xbed377=await _0x1be83[_0x23feba(0x105)]();_0xf89a17=_0xbed377['client_id'],_0xc353db=_0xbed377['client_secret'],await _0x2fcc1d['Bamzf'](saveCachedClient,_0xf89a17,_0xc353db),console['log'](_0x2fcc1d['OtZRT']);}else throw new Error(_0x23feba(0x144));}const _0x533ca7=randomBytes(0x20)['toString'](_0x2fcc1d['vezAc']),_0x132c7a=_0x2fcc1d['frnRL'](createHash,_0x2fcc1d[_0x23feba(0x15b)])[_0x23feba(0x111)](_0x533ca7)[_0x23feba(0x145)](_0x2fcc1d['vezAc']),_0xcd0024=_0x2fcc1d['frnRL'](randomBytes,0x10)['toString'](_0x2fcc1d['vvIzw']),_0x59d4ff=new URL(_0x247587['authorization_endpoint']);_0x59d4ff[_0x23feba(0xd6)]['set'](_0x2fcc1d['IaLHa'],_0x2fcc1d['PTuxE']),_0x59d4ff[_0x23feba(0xd6)]['set'](_0x2fcc1d[_0x23feba(0x12c)],_0xf89a17),_0x59d4ff[_0x23feba(0xd6)][_0x23feba(0xea)]('redirect_uri','http://localhost:'+CALLBACK_PORT+'/callback'),_0x59d4ff[_0x23feba(0xd6)][_0x23feba(0xea)](_0x23feba(0x12d),_0x132c7a),_0x59d4ff[_0x23feba(0xd6)]['set'](_0x23feba(0x154),'S256'),_0x59d4ff[_0x23feba(0xd6)]['set'](_0x2fcc1d[_0x23feba(0xf5)],_0xcd0024);_0x13bd6b[_0x23feba(0x119)]&&_0x59d4ff['searchParams']['set']('resource',_0x13bd6b[_0x23feba(0x119)]);console['log'](_0x23feba(0xed)),console[_0x23feba(0x128)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a'+_0x59d4ff[_0x23feba(0xf3)]()+'\x0a'),await _0x2fcc1d[_0x23feba(0xd1)](openBrowser,_0x59d4ff[_0x23feba(0xf3)]());const _0xbdfeb=await waitForCallback(_0xcd0024);process['stdout']['write'](_0x23feba(0x117));const _0x16ce9e=new URLSearchParams({'grant_type':_0x2fcc1d['zfNUH'],'code':_0xbdfeb,'redirect_uri':_0x23feba(0xe4)+CALLBACK_PORT+'/callback','client_id':_0xf89a17,'code_verifier':_0x533ca7});_0xc353db&&_0x16ce9e['set']('client_secret',_0xc353db);_0x13bd6b['resource']&&_0x16ce9e[_0x23feba(0xea)](_0x23feba(0x119),_0x13bd6b['resource']);const _0x559b37=await _0x2fcc1d['VbaMV'](fetch,_0x247587[_0x23feba(0x116)],{'method':_0x2fcc1d[_0x23feba(0xdc)],'headers':{'Content-Type':_0x2fcc1d[_0x23feba(0x134)]},'body':_0x16ce9e});if(!_0x559b37['ok']){const _0x472b3a=await _0x559b37['text']();throw new Error('Token\x20exchange\x20failed:\x20'+_0x472b3a);}const _0x5eec51=await _0x559b37[_0x23feba(0x105)]();return console[_0x23feba(0x128)](_0x2fcc1d['OtZRT']),await _0x2fcc1d['rtmer'](saveCachedToken,_0x5eec51['access_token'],_0x5eec51['refresh_token'],_0x5eec51[_0x23feba(0xd0)]),_0x5eec51[_0x23feba(0xf4)];}async function callGetCliToken(_0xfcb4f7,_0x1de218){const _0x4d822e=_0xd4fbbe,_0x4452c5={'DawkP':function(_0xa1e59f,_0x28e84f,_0x43f60f){return _0xa1e59f(_0x28e84f,_0x43f60f);},'aewDr':'application/json','mOOXJ':function(_0x254bd4,_0x217d0b){return _0x254bd4(_0x217d0b);},'lqrXV':'2.0','TsNey':_0x4d822e(0xfc),'ScluW':_0x4d822e(0x103),'lWrMS':'ranger-cli','mfCCw':function(_0x419613,_0x4dfb71,_0x3cf611){return _0x419613(_0x4dfb71,_0x3cf611);},'ciols':_0x4d822e(0x130),'rALcs':'notifications/initialized','nmbty':_0x4d822e(0x11e),'fZIkS':'get_cli_token','OKExa':_0x4d822e(0x138),'JPhGO':'Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','nJhxg':function(_0x236963,_0x1bcbcf,_0x428935){return _0x236963(_0x1bcbcf,_0x428935);},'KRlnN':function(_0x4cbee5){return _0x4cbee5();},'Cljua':_0x4d822e(0xcd),'rDPQE':'refresh.txt','eDLHk':function(_0x5a7b6e,_0x3da658,_0x392577){return _0x5a7b6e(_0x3da658,_0x392577);},'LcQGd':function(_0x13b13a,_0xbf1dcc,_0x153a0a,_0x53e5fa){return _0x13b13a(_0xbf1dcc,_0x153a0a,_0x53e5fa);},'kixVX':function(_0x366a96,_0x1499b8,_0x34862f){return _0x366a96(_0x1499b8,_0x34862f);}},_0x1b5880={'Content-Type':_0x4452c5['aewDr'],'Accept':_0x4d822e(0x102)};_0x1de218&&(_0x1b5880['Authorization']=_0x4d822e(0xcc)+_0x1de218);const _0x50a2c5=async _0x59d524=>{const _0x4da9bd=_0x4d822e,_0x39aba9=await _0x4452c5[_0x4da9bd(0x106)](fetch,_0xfcb4f7,{'method':'POST','headers':_0x1b5880,'body':JSON[_0x4da9bd(0x115)](_0x59d524)});if(!_0x39aba9['ok']){const _0x35a343=await _0x39aba9[_0x4da9bd(0x14e)]();throw new Error(_0x4da9bd(0x13b)+_0x39aba9['status']+':\x20'+_0x35a343);}return parseResponse(_0x39aba9);};process['stdout']['write'](_0x4d822e(0x139));const _0x5f01a3=await _0x4452c5[_0x4d822e(0xd4)](_0x50a2c5,{'jsonrpc':_0x4452c5['lqrXV'],'id':0x1,'method':_0x4452c5['TsNey'],'params':{'protocolVersion':_0x4452c5['ScluW'],'capabilities':{},'clientInfo':{'name':_0x4452c5['lWrMS'],'version':_0x4d822e(0x158)}}});if(_0x5f01a3['error'])throw new Error(_0x4d822e(0x137)+(_0x5f01a3['error'][_0x4d822e(0x12a)]??JSON[_0x4d822e(0x115)](_0x5f01a3['error'])));console['log'](_0x4d822e(0x138)),await _0x4452c5['mfCCw'](fetch,_0xfcb4f7,{'method':_0x4452c5[_0x4d822e(0x156)],'headers':_0x1b5880,'body':JSON['stringify']({'jsonrpc':_0x4d822e(0x11a),'method':_0x4452c5[_0x4d822e(0xe6)]})})['then'](_0xf6c6dd=>_0xf6c6dd['text']()),process[_0x4d822e(0x15d)][_0x4d822e(0x15a)]('Requesting\x20CLI\x20token...');const _0x5ae95b=await _0x50a2c5({'jsonrpc':'2.0','id':0x2,'method':_0x4452c5[_0x4d822e(0x10f)],'params':{'name':_0x4452c5[_0x4d822e(0x133)],'arguments':{}}});if(_0x5ae95b[_0x4d822e(0xfe)])throw new Error('get_cli_token\x20failed:\x20'+(_0x5ae95b['error']['message']??JSON[_0x4d822e(0x115)](_0x5ae95b['error'])));console['log'](_0x4452c5[_0x4d822e(0xcf)]);const _0x1b39cd=extractToken(_0x5ae95b['result']);if(!_0x1b39cd){console['error'](_0x4d822e(0x112)),console['error'](JSON[_0x4d822e(0x115)](_0x5ae95b[_0x4d822e(0x15e)],null,0x2));throw new Error(_0x4452c5['JPhGO']);}const _0xc9393c=_0x4452c5['nJhxg'](join,_0x4452c5[_0x4d822e(0x132)](homedir),_0x4452c5['Cljua']),_0x4ed35d=join(_0xc9393c,_0x4452c5[_0x4d822e(0x151)]);await _0x4452c5[_0x4d822e(0x11c)](mkdir,_0xc9393c,{'recursive':!![]}),await writeFile(_0x4ed35d,_0x1b39cd,{'mode':0x180}),await _0x4452c5[_0x4d822e(0xcb)](writeFile,_0x4452c5[_0x4d822e(0xf2)](join,_0xc9393c,_0x4d822e(0x157)),_0xfcb4f7,{'mode':0x180}),console[_0x4d822e(0x128)](_0x4d822e(0x161)+_0x4ed35d),console['log']('Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a');}async function fetchAuthServerMetadata(_0x42182c){const _0x174f40=_0xd4fbbe,_0xd36cc={'emsrg':function(_0x133a21,_0x3a472c){return _0x133a21(_0x3a472c);}},_0x5bbdfb=_0x42182c+'/.well-known/oauth-authorization-server',_0x598419=await _0xd36cc['emsrg'](fetch,_0x5bbdfb);if(!_0x598419['ok'])throw new Error(_0x174f40(0x10a)+_0x5bbdfb+':\x20'+_0x598419[_0x174f40(0x123)]);return _0x598419['json']();}function waitForCallback(_0x5e87b4){const _0x345666=_0xd4fbbe,_0x9379c5={'knlso':function(_0x592a6f,_0x24118a){return _0x592a6f(_0x24118a);},'AdFZJ':'OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','MPMee':'code','kdWnD':'text/html','FjYqR':function(_0x27c407,_0x978c0b){return _0x27c407!==_0x978c0b;},'guSEN':_0x345666(0xd8),'SVhEA':function(_0x3c6c73,_0x5ba745){return _0x3c6c73(_0x5ba745);}};return new Promise((_0xc6468,_0x42eaa1)=>{const _0x4de3e9=_0x345666,_0x4627e1=setTimeout(()=>{_0x531db3['close'](),_0x9379c5['knlso'](_0x42eaa1,new OAuthTimeoutError(_0x9379c5['AdFZJ']));},0x1d4c0),_0x531db3=createServer((_0x1117d2,_0x1d1063)=>{const _0x5ef353=_0x3e95,_0x1ed016=new URL(_0x1117d2['url']??'/',_0x5ef353(0xe4)+CALLBACK_PORT);if(_0x1ed016[_0x5ef353(0x15c)]!==_0x5ef353(0xdf)){_0x1d1063['writeHead'](0x194),_0x1d1063['end'](_0x5ef353(0xec));return;}const _0xccea7e=_0x1ed016[_0x5ef353(0xd6)][_0x5ef353(0x120)](_0x9379c5[_0x5ef353(0x10d)]),_0x3c75e1=_0x1ed016[_0x5ef353(0xd6)]['get']('state'),_0x1f7464=_0x1ed016['searchParams']['get']('error');if(_0x1f7464){const _0x5f2288=_0x1ed016[_0x5ef353(0xd6)][_0x5ef353(0x120)](_0x5ef353(0x122))??_0x1f7464;_0x1d1063[_0x5ef353(0x141)](0xc8,{'Content-Type':_0x9379c5['kdWnD']}),_0x1d1063['end']('<html><body><h2>Authentication\x20failed</h2><p>'+_0x5f2288+_0x5ef353(0x14b)),_0x9379c5[_0x5ef353(0xfd)](clearTimeout,_0x4627e1),_0x531db3['close'](),_0x42eaa1(new Error(_0x5ef353(0xe9)+_0x5f2288));return;}if(!_0xccea7e||_0x9379c5[_0x5ef353(0x11f)](_0x3c75e1,_0x5e87b4)){_0x1d1063['writeHead'](0x190,{'Content-Type':_0x9379c5['kdWnD']}),_0x1d1063['end'](_0x9379c5['guSEN']);return;}_0x1d1063[_0x5ef353(0x141)](0xc8,{'Content-Type':_0x9379c5[_0x5ef353(0x136)]}),_0x1d1063[_0x5ef353(0xe5)]('<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>'),_0x9379c5['knlso'](clearTimeout,_0x4627e1),_0x531db3[_0x5ef353(0x15f)](),_0x9379c5['SVhEA'](_0xc6468,_0xccea7e);});_0x531db3[_0x4de3e9(0x124)](CALLBACK_PORT,'127.0.0.1');});}async function openBrowser(_0xee7e77){const _0x1f0673=_0xd4fbbe,_0x401891={'oToUT':function(_0x3107b9,_0x3678ed){return _0x3107b9===_0x3678ed;}},{exec:_0x234933}=await import('child_process'),_0x492a61=_0x401891[_0x1f0673(0xd9)](process['platform'],'darwin')?_0x1f0673(0x140):process['platform']===_0x1f0673(0x150)?'start':'xdg-open';_0x234933(_0x492a61+'\x20\x22'+_0xee7e77+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x39be3e=_0xd4fbbe,_0x467325={'HNFjL':function(_0x4583a1,_0x2ead12,_0x4c7b4a){return _0x4583a1(_0x2ead12,_0x4c7b4a);},'OTYur':function(_0x2c0d82,_0xbc2ee3){return _0x2c0d82!==_0xbc2ee3;},'BuVju':function(_0x423045,_0x42b0e5){return _0x423045>_0x42b0e5;}};try{const _0x3e171a=JSON['parse'](await _0x467325['HNFjL'](readFile,TOKEN_CACHE_PATH,_0x39be3e(0x11b)));if(_0x3e171a[_0x39be3e(0xdb)]&&_0x467325['OTYur'](_0x3e171a['origin'],currentOrigin))return null;if(_0x3e171a['expiresAt']&&_0x467325['BuVju'](Date[_0x39be3e(0x14d)](),_0x3e171a[_0x39be3e(0xff)]))return null;return _0x3e171a[_0x39be3e(0x131)]??null;}catch{return null;}}async function saveCachedToken(_0x4f125b,_0x47331f,_0x2329d5){const _0x3bb1c6=_0xd4fbbe,_0xcb593f={'WaXuT':function(_0x98d68,_0xd69d3c){return _0x98d68+_0xd69d3c;},'ErwKp':function(_0x52711b,_0x4c3a32){return _0x52711b*_0x4c3a32;},'qBTnS':function(_0x1dc4fc){return _0x1dc4fc();},'Jvicr':'.ranger','othGo':function(_0x16c3ce,_0x454eaf,_0x5d6db4,_0x38c29d){return _0x16c3ce(_0x454eaf,_0x5d6db4,_0x38c29d);}},_0x579eba=await loadCachedData(),_0x2f5651={..._0x579eba,'origin':currentOrigin,'accessToken':_0x4f125b,'refreshToken':_0x47331f??_0x579eba?.[_0x3bb1c6(0xd5)],'expiresAt':_0x2329d5?_0xcb593f[_0x3bb1c6(0x125)](Date['now'](),_0xcb593f[_0x3bb1c6(0xce)](_0x2329d5,0x3e8)):undefined};await mkdir(join(_0xcb593f['qBTnS'](homedir),_0xcb593f[_0x3bb1c6(0x121)]),{'recursive':!![]}),await _0xcb593f['othGo'](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x2f5651),{'mode':0x180});}async function loadCachedClient(){const _0x5525d8=_0xd4fbbe,_0x6019e0={'dnjQh':function(_0x31fe05){return _0x31fe05();},'oINQP':function(_0x309010,_0x521638){return _0x309010!==_0x521638;}},_0x3d57f8=await _0x6019e0[_0x5525d8(0xfa)](loadCachedData);if(_0x3d57f8?.['origin']&&_0x6019e0['oINQP'](_0x3d57f8['origin'],currentOrigin))return null;return _0x3d57f8?.['clientId']?{'clientId':_0x3d57f8[_0x5525d8(0x143)],'clientSecret':_0x3d57f8['clientSecret']}:null;}async function clearCachedClient(){const _0x79966c=_0xd4fbbe,_0x5e421a={'VykVF':function(_0x1f4a45,_0x123a63,_0x8eebf3,_0x3d4825){return _0x1f4a45(_0x123a63,_0x8eebf3,_0x3d4825);}},_0x295a73=await loadCachedData();if(!_0x295a73)return;const {clientId:_0x42a86d,clientSecret:_0x151c83,..._0x3ce562}=_0x295a73;await _0x5e421a[_0x79966c(0x12b)](writeFile,TOKEN_CACHE_PATH,JSON[_0x79966c(0x115)](_0x3ce562),{'mode':0x180});}async function saveCachedClient(_0x1dbf69,_0x42802b){const _0x6385bd=_0xd4fbbe,_0x158e44={'EYXdz':function(_0x4ed13f,_0xf3fbde,_0xff952d){return _0x4ed13f(_0xf3fbde,_0xff952d);},'gLZVa':function(_0x3824ca){return _0x3824ca();},'JYcVX':'.ranger','xcHPZ':function(_0x4a4954,_0x35b9bb,_0x2a053f,_0x39f3bb){return _0x4a4954(_0x35b9bb,_0x2a053f,_0x39f3bb);}},_0x6ae98c=await loadCachedData(),_0x518ef6={..._0x6ae98c,'origin':currentOrigin,'accessToken':_0x6ae98c?.['accessToken']??'','clientId':_0x1dbf69,'clientSecret':_0x42802b};await _0x158e44[_0x6385bd(0x12e)](mkdir,join(_0x158e44[_0x6385bd(0xdd)](homedir),_0x158e44['JYcVX']),{'recursive':!![]}),await _0x158e44['xcHPZ'](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x518ef6),{'mode':0x180});}async function loadCachedData(){const _0x47e2f9=_0xd4fbbe,_0x46efee={'RBDrW':_0x47e2f9(0x11b)};try{return JSON[_0x47e2f9(0xe0)](await readFile(TOKEN_CACHE_PATH,_0x46efee['RBDrW']));}catch{return null;}}async function parseResponse(_0x24f5fa){const _0x4c05cf=_0xd4fbbe,_0x3ee2f8={'QdnMu':_0x4c05cf(0xee),'MPFyx':_0x4c05cf(0x13c),'WRKPr':_0x4c05cf(0x100)},_0xdc73e3=_0x24f5fa['headers'][_0x4c05cf(0x120)](_0x4c05cf(0x108))??'';if(_0xdc73e3[_0x4c05cf(0x14c)](_0x3ee2f8['QdnMu'])){const _0x4d3e70=await _0x24f5fa[_0x4c05cf(0x14e)]();for(const _0x169372 of _0x4d3e70[_0x4c05cf(0x13e)]('\x0a')){const _0x4bc5fd=_0x169372[_0x4c05cf(0x14f)]();if(_0x4bc5fd[_0x4c05cf(0xef)](_0x3ee2f8['MPFyx'])){const _0x183f00=_0x4bc5fd['slice'](_0x4c05cf(0x13c)['length'])['trim']();if(!_0x183f00)continue;try{const _0x119b78=JSON['parse'](_0x183f00);if(_0x119b78['id']!==undefined||_0x119b78[_0x4c05cf(0xfe)])return _0x119b78;}catch{}}}throw new Error(_0x3ee2f8[_0x4c05cf(0x118)]);}return _0x24f5fa['json']();}function extractToken(_0x145aeb){const _0x42b172=_0xd4fbbe,_0x46931b={'nFlzR':function(_0x3613cf,_0xa56df5){return _0x3613cf===_0xa56df5;}};if(!_0x145aeb)return null;const _0x12ef1e=_0x145aeb[_0x42b172(0xf1)];if(_0x12ef1e?.[_0x42b172(0x13a)]&&_0x46931b[_0x42b172(0xe1)](typeof _0x12ef1e['token'],_0x42b172(0xf9)))return _0x12ef1e['token'];if(_0x145aeb[_0x42b172(0x155)]){const _0x195143=_0x145aeb[_0x42b172(0x127)];throw new Error('Server\x20returned\x20error:\x20'+(_0x195143?.[0x0]?.['text']??'Unknown\x20error'));}const _0x59d75a=_0x145aeb['content'];if(_0x59d75a)for(const _0x36bd3a of _0x59d75a){if(_0x36bd3a['type']===_0x42b172(0x14e)&&_0x36bd3a['text']){try{const _0x467684=JSON['parse'](_0x36bd3a['text']);if(typeof _0x467684?.[_0x42b172(0x13a)]==='string')return _0x467684['token'];}catch{}const _0xccc3fc=_0x36bd3a[_0x42b172(0x14e)][_0x42b172(0x148)](/(rngr_[A-Za-z0-9_-]+)/);if(_0xccc3fc)return _0xccc3fc[0x1];}}return null;}
|
|
1
|
+
const _0x131106=_0x428f;(function(_0x1bd637,_0x474719){const _0x31ba8e=_0x428f,_0x33de00=_0x1bd637();while(!![]){try{const _0x40d479=parseInt(_0x31ba8e(0x1aa))/0x1+parseInt(_0x31ba8e(0x1f6))/0x2+parseInt(_0x31ba8e(0x1dc))/0x3+-parseInt(_0x31ba8e(0x1e4))/0x4*(parseInt(_0x31ba8e(0x1c4))/0x5)+parseInt(_0x31ba8e(0x22a))/0x6*(-parseInt(_0x31ba8e(0x1c0))/0x7)+-parseInt(_0x31ba8e(0x1d2))/0x8*(parseInt(_0x31ba8e(0x1e8))/0x9)+parseInt(_0x31ba8e(0x224))/0xa;if(_0x40d479===_0x474719)break;else _0x33de00['push'](_0x33de00['shift']());}catch(_0x1013f8){_0x33de00['push'](_0x33de00['shift']());}}}(_0x1703,0x1d7c8));import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createServer}from'http';function _0x428f(_0x3c7724,_0x535a67){_0x3c7724=_0x3c7724-0x18b;const _0x1703d9=_0x1703();let _0x428f9f=_0x1703d9[_0x3c7724];return _0x428f9f;}import{randomBytes,createHash}from'crypto';import{exec}from'child_process';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',_0x131106(0x1e7));export async function getMcpAuthOrigin(){const _0x50c51e=_0x131106,_0x589803={'laFst':function(_0x5dcf6e,_0x53a6c0,_0x1e3d89){return _0x5dcf6e(_0x53a6c0,_0x1e3d89);},'KytUM':_0x50c51e(0x21b),'HnXjG':function(_0x1a5122,_0x177ed8){return _0x1a5122||_0x177ed8;}};try{const _0x11c5ab=(await _0x589803['laFst'](readFile,AUTH_ORIGIN_PATH,_0x589803['KytUM']))['trim']();return _0x589803['HnXjG'](_0x11c5ab,null);}catch{return null;}}function _0x1703(){const _0x4e54f1=['pathname','DLjqz','SUNgU','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','refresh.txt','set','content','Token\x20exchange\x20failed:\x20','accessToken','Uyrwf','1.0.0','cahnY','Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','MXCZm','CNtRe','trim','OAuth\x20error:\x20','SDEQS','error','refreshToken','fRCwU','Ewxul','HXGgx','LDHOz','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','stringify','proxied','HOkBY','Uzzqf','S256','initialize','<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','close','.ranger','utf-8','POST','http://localhost:','text/html','fqqpn','MVYXY','Server\x20returned\x20error:\x20','none','slice','3598880KrBdrF','writeHead','SCCMv','GTQBC','OAuthTimeoutError','EHVLs','1758XlOzhL','hdGoa','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','CHZPn','start','result','application/json,\x20text/event-stream','hSAuc','structuredContent','Lodoy','KxBMG','\x0aToken\x20written\x20to\x20','cxrsf','<html><body><h2>Authentication\x20failed</h2><p>','application/json','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a','YPUxf','authorization_servers','match','HJtxw','get','WAJHM','YRXNK','searchParams','client_id','origin','clientSecret','resource','end','Requesting\x20CLI\x20token...','write','type','UBFPb','vujhA','No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','access_token','7688oFxMzA','GeFrf','Unknown\x20error','MCP\x20initialize\x20failed:\x20','toString','code','\x0aUnexpected\x20response\x20structure:','Discovering\x20authorization\x20server...','refresh_token','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','Ranger\x20CLI','token','gTchH','egErH','THTdg','now','Registering\x20OAuth\x20client...','isError','alFEs','Rcrff','OFnVz','get_cli_token\x20failed:\x20','2037jraeTw','status','message','MCP\x20server\x20returned\x20HTTP\x20','4485nKLJJV','data:','ranger-cli','string','client_secret','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','authorization_endpoint','log','then','Initializing\x20MCP\x20session...','lDNrs','pOznX','stdout','sha256','1553504wJZKGg','open','headers','split','expiresAt','VDiHp','text','json','DtTTw','parse','358209aQzsCi','application/x-www-form-urlencoded','HydLw','/.well-known/oauth-authorization-server','\x20done','length','ODABr','JMGsV','1012lGlvMN','IeqJW','GXdWT','auth-origin.txt','9XsRqEh','2025-03-26','expires_in','2.0','XGZFG','isTTY','needs-oauth','content-type','error_description','tools/call','mjnLC','cOgJk','WAFRA','WnEau','280378CfcYgE','vOPyQ','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes'];_0x1703=function(){return _0x4e54f1;};return _0x1703();}export async function mcpBootstrap(){const _0x4198b6=_0x131106,_0x4ddf21={'lDNrs':function(_0x2222f6){return _0x2222f6();},'BloQM':function(_0x5a5583,_0x1a4976){return _0x5a5583===_0x1a4976;},'SCCMv':_0x4198b6(0x213),'MXCZm':function(_0x4f96e3,_0x194b5a){return _0x4f96e3+_0x194b5a;},'HydLw':'MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','GeFrf':function(_0x83dd31,_0x2ff348,_0x3e8bc5){return _0x83dd31(_0x2ff348,_0x3e8bc5);}},_0x3f1955=_0x4ddf21[_0x4198b6(0x1ce)](getMcpAuthUrl);currentOrigin=_0x3f1955;const _0x5ad812=process['stdout'][_0x4198b6(0x1ed)]??![];console[_0x4198b6(0x1cb)](_0x4198b6(0x1fc)+_0x3f1955+'\x0a');const _0x1e4077=await tryUnauthenticated(_0x3f1955);let _0x2ba412=null;if(_0x4ddf21['BloQM'](_0x1e4077,_0x4ddf21[_0x4198b6(0x226)]))_0x2ba412='';else{_0x2ba412=await loadCachedToken();if(!_0x2ba412){if(!_0x5ad812)throw new Error(_0x4ddf21[_0x4198b6(0x206)](_0x4ddf21[_0x4198b6(0x1de)],'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.'));_0x2ba412=await oauthFlow(_0x3f1955);}}await _0x4ddf21[_0x4198b6(0x1ab)](callGetCliToken,_0x3f1955,_0x2ba412);}async function tryUnauthenticated(_0x25824b){const _0x56d809=_0x131106,_0x561085={'CvWOn':function(_0x165d46,_0x2e7809,_0x4e8bb1){return _0x165d46(_0x2e7809,_0x4e8bb1);},'GXdWT':'application/json','mmdxk':_0x56d809(0x18b),'WAFRA':_0x56d809(0x217),'cahnY':_0x56d809(0x1e9),'nxlsJ':_0x56d809(0x203),'UBFPb':_0x56d809(0x1ee)},_0x2ff82e=await _0x561085['CvWOn'](fetch,_0x25824b,{'method':'POST','headers':{'Content-Type':_0x561085[_0x56d809(0x1e6)],'Accept':_0x561085['mmdxk']},'body':JSON['stringify']({'jsonrpc':_0x56d809(0x1eb),'id':0x1,'method':_0x561085[_0x56d809(0x1f4)],'params':{'protocolVersion':_0x561085[_0x56d809(0x204)],'capabilities':{},'clientInfo':{'name':_0x56d809(0x1c6),'version':_0x561085['nxlsJ']}}})});if(_0x2ff82e['ok'])return await _0x2ff82e[_0x56d809(0x1d8)](),'proxied';if(_0x2ff82e['status']===0x191)return await _0x2ff82e['text'](),_0x561085[_0x56d809(0x1a6)];const _0x5ceec8=await _0x2ff82e['text']();throw new Error(_0x56d809(0x1c3)+_0x2ff82e[_0x56d809(0x1c1)]+':\x20'+_0x5ceec8);}class OAuthTimeoutError extends Error{constructor(_0x36fd0f){const _0x50d507=_0x131106;super(_0x36fd0f),this['name']=_0x50d507(0x228);}}async function oauthFlow(_0x2633fa){const _0x40c1d9=_0x131106,_0x2e7b24={'MVYXY':function(_0xc18f2e,_0x4148b1){return _0xc18f2e(_0x4148b1);},'kQxgU':function(_0x4f4a65,_0x6ae2e3){return _0x4f4a65 instanceof _0x6ae2e3;},'PyrWS':function(_0x8fa040){return _0x8fa040();}};try{return await _0x2e7b24[_0x40c1d9(0x220)](oauthFlowAttempt,_0x2633fa);}catch(_0x5bac2b){if(_0x2e7b24['kQxgU'](_0x5bac2b,OAuthTimeoutError)&&await _0x2e7b24['PyrWS'](loadCachedClient))return console[_0x40c1d9(0x1cb)](_0x40c1d9(0x211)),await clearCachedClient(),await oauthFlowAttempt(_0x2633fa);throw _0x5bac2b;}}async function oauthFlowAttempt(_0x568b8b){const _0x56fc6b=_0x131106,_0x3cbd56={'Uzzqf':function(_0x51bc9b,_0x5b39fb){return _0x51bc9b(_0x5b39fb);},'SDEQS':_0x56fc6b(0x205),'Rcrff':_0x56fc6b(0x1a8),'KECXd':_0x56fc6b(0x1ba),'ODABr':_0x56fc6b(0x21c),'pOznX':_0x56fc6b(0x193),'Kgopk':'authorization_code','WnEau':_0x56fc6b(0x1af),'YRXNK':_0x56fc6b(0x222),'egErH':_0x56fc6b(0x1e0),'XGZFG':function(_0x37cc3a,_0x1843a4){return _0x37cc3a(_0x1843a4);},'gTchH':function(_0x3b1f61,_0x1231ad){return _0x3b1f61(_0x1231ad);},'uRasH':'base64url','VTWQi':function(_0x199ff3,_0x59fba7){return _0x199ff3(_0x59fba7);},'LthDv':'hex','Ewxul':'redirect_uri','hdGoa':'code_challenge','mwZMW':'code_challenge_method','oHSUj':'state','OFnVz':'resource','YPUxf':'\x0aOpening\x20browser\x20for\x20authentication...','lCaQJ':_0x56fc6b(0x1c8),'mjnLC':function(_0x3b7ac4,_0x234193,_0x5afb1c){return _0x3b7ac4(_0x234193,_0x5afb1c);},'DLjqz':function(_0x543f4c,_0x42964c,_0x308830,_0x1377ac){return _0x543f4c(_0x42964c,_0x308830,_0x1377ac);}},_0x427f07=_0x568b8b['replace'](/\/mcp$/,'');process[_0x56fc6b(0x1d0)]['write'](_0x56fc6b(0x1b1));const _0x153879=await _0x3cbd56[_0x56fc6b(0x215)](fetch,_0x427f07+'/.well-known/oauth-protected-resource');if(!_0x153879['ok'])throw new Error(_0x3cbd56[_0x56fc6b(0x20a)]);const _0x2c0dc6=await _0x153879['json'](),_0x3ec954=_0x2c0dc6[_0x56fc6b(0x197)]?.[0x0];if(!_0x3ec954)throw new Error(_0x3cbd56[_0x56fc6b(0x1bd)]);console['log']('\x20'+_0x3ec954);const _0x45cc71=await _0x3cbd56['Uzzqf'](fetchAuthServerMetadata,_0x3ec954);let _0x2db1c4,_0x93a8eb;const _0x53ae02=await loadCachedClient();if(_0x53ae02)_0x2db1c4=_0x53ae02['clientId'],_0x93a8eb=_0x53ae02['clientSecret'];else{if(_0x45cc71['registration_endpoint']){process[_0x56fc6b(0x1d0)][_0x56fc6b(0x1a4)](_0x3cbd56['KECXd']);const _0x90dc4a=await fetch(_0x45cc71['registration_endpoint'],{'method':_0x3cbd56[_0x56fc6b(0x1e2)],'headers':{'Content-Type':_0x3cbd56[_0x56fc6b(0x1cf)]},'body':JSON[_0x56fc6b(0x212)]({'client_name':_0x56fc6b(0x1b4),'redirect_uris':['http://localhost:'+CALLBACK_PORT+'/callback'],'grant_types':[_0x3cbd56['Kgopk'],_0x56fc6b(0x1b2)],'response_types':[_0x3cbd56[_0x56fc6b(0x1f5)]],'token_endpoint_auth_method':_0x3cbd56[_0x56fc6b(0x19c)]})});if(!_0x90dc4a['ok']){const _0x3e1dff=await _0x90dc4a[_0x56fc6b(0x1d8)]();throw new Error('Client\x20registration\x20failed:\x20'+_0x3e1dff);}const _0x4c2f35=await _0x90dc4a[_0x56fc6b(0x1d9)]();_0x2db1c4=_0x4c2f35[_0x56fc6b(0x19e)],_0x93a8eb=_0x4c2f35[_0x56fc6b(0x1c8)],await saveCachedClient(_0x2db1c4,_0x93a8eb),console[_0x56fc6b(0x1cb)](_0x3cbd56['egErH']);}else throw new Error('Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found');}const _0x2ba82b=_0x3cbd56[_0x56fc6b(0x1ec)](randomBytes,0x20)[_0x56fc6b(0x1ae)]('base64url'),_0x4fbd5e=_0x3cbd56[_0x56fc6b(0x1b6)](createHash,_0x56fc6b(0x1d1))['update'](_0x2ba82b)['digest'](_0x3cbd56['uRasH']),_0x40505a=_0x3cbd56['VTWQi'](randomBytes,0x10)[_0x56fc6b(0x1ae)](_0x3cbd56['LthDv']),_0x5263e4=new URL(_0x45cc71[_0x56fc6b(0x1ca)]);_0x5263e4[_0x56fc6b(0x19d)][_0x56fc6b(0x1fe)]('response_type','code'),_0x5263e4[_0x56fc6b(0x19d)]['set'](_0x56fc6b(0x19e),_0x2db1c4),_0x5263e4['searchParams']['set'](_0x3cbd56[_0x56fc6b(0x20e)],_0x56fc6b(0x21d)+CALLBACK_PORT+'/callback'),_0x5263e4[_0x56fc6b(0x19d)][_0x56fc6b(0x1fe)](_0x3cbd56[_0x56fc6b(0x22b)],_0x4fbd5e),_0x5263e4['searchParams']['set'](_0x3cbd56['mwZMW'],_0x56fc6b(0x216)),_0x5263e4[_0x56fc6b(0x19d)][_0x56fc6b(0x1fe)](_0x3cbd56['oHSUj'],_0x40505a);_0x2c0dc6[_0x56fc6b(0x1a1)]&&_0x5263e4[_0x56fc6b(0x19d)]['set'](_0x3cbd56[_0x56fc6b(0x1be)],_0x2c0dc6[_0x56fc6b(0x1a1)]);console[_0x56fc6b(0x1cb)](_0x3cbd56[_0x56fc6b(0x196)]),console[_0x56fc6b(0x1cb)](_0x56fc6b(0x22c)+_0x5263e4['toString']()+'\x0a'),await openBrowser(_0x5263e4[_0x56fc6b(0x1ae)]());const _0x545a04=await _0x3cbd56['VTWQi'](waitForCallback,_0x40505a);process['stdout']['write']('Exchanging\x20authorization\x20code...');const _0x3faf4c=new URLSearchParams({'grant_type':_0x3cbd56['Kgopk'],'code':_0x545a04,'redirect_uri':_0x56fc6b(0x21d)+CALLBACK_PORT+'/callback','client_id':_0x2db1c4,'code_verifier':_0x2ba82b});_0x93a8eb&&_0x3faf4c[_0x56fc6b(0x1fe)](_0x3cbd56['lCaQJ'],_0x93a8eb);_0x2c0dc6[_0x56fc6b(0x1a1)]&&_0x3faf4c['set'](_0x56fc6b(0x1a1),_0x2c0dc6[_0x56fc6b(0x1a1)]);const _0x3f8298=await _0x3cbd56[_0x56fc6b(0x1f2)](fetch,_0x45cc71['token_endpoint'],{'method':_0x3cbd56[_0x56fc6b(0x1e2)],'headers':{'Content-Type':_0x56fc6b(0x1dd)},'body':_0x3faf4c});if(!_0x3f8298['ok']){const _0x1303b1=await _0x3f8298[_0x56fc6b(0x1d8)]();throw new Error(_0x56fc6b(0x200)+_0x1303b1);}const _0x510ee=await _0x3f8298[_0x56fc6b(0x1d9)]();return console['log'](_0x3cbd56[_0x56fc6b(0x1b7)]),await _0x3cbd56[_0x56fc6b(0x1fa)](saveCachedToken,_0x510ee['access_token'],_0x510ee['refresh_token'],_0x510ee[_0x56fc6b(0x1ea)]),_0x510ee[_0x56fc6b(0x1a9)];}async function callGetCliToken(_0x491e92,_0x1f6f21){const _0x2c861d=_0x131106,_0x596d9a={'anxod':function(_0x2d7350,_0x2b220a,_0x337a87){return _0x2d7350(_0x2b220a,_0x337a87);},'HlZSZ':function(_0x4f874c,_0x51f504){return _0x4f874c(_0x51f504);},'KWBXL':'application/json,\x20text/event-stream','MxCrl':'Authorization','jxRKq':_0x2c861d(0x217),'MenaL':'ranger-cli','cOgJk':_0x2c861d(0x203),'vujhA':_0x2c861d(0x21c),'xXYDP':_0x2c861d(0x1eb),'CNtRe':'notifications/initialized','zpAEe':_0x2c861d(0x1f1),'IeqJW':'get_cli_token','HOkBY':_0x2c861d(0x1b0),'SVBvN':_0x2c861d(0x194),'SUNgU':function(_0x3d243e,_0x6aabe7,_0x5ac687){return _0x3d243e(_0x6aabe7,_0x5ac687);},'VDiHp':function(_0x47425c){return _0x47425c();},'EHVLs':_0x2c861d(0x1fd),'NOdus':function(_0x2e9428,_0x15994c,_0x2c5a5b,_0x310171){return _0x2e9428(_0x15994c,_0x2c5a5b,_0x310171);},'ACqEb':_0x2c861d(0x1e7)},_0x3ed71e={'Content-Type':_0x2c861d(0x193),'Accept':_0x596d9a['KWBXL']};_0x1f6f21&&(_0x3ed71e[_0x596d9a['MxCrl']]='Bearer\x20'+_0x1f6f21);const _0x3914ec=async _0x250299=>{const _0x2d05fe=_0x2c861d,_0x182a28=await _0x596d9a['anxod'](fetch,_0x491e92,{'method':'POST','headers':_0x3ed71e,'body':JSON[_0x2d05fe(0x212)](_0x250299)});if(!_0x182a28['ok']){const _0x40a1b1=await _0x182a28['text']();throw new Error('HTTP\x20'+_0x182a28['status']+':\x20'+_0x40a1b1);}return _0x596d9a['HlZSZ'](parseResponse,_0x182a28);};process['stdout'][_0x2c861d(0x1a4)](_0x2c861d(0x1cd));const _0x228d93=await _0x3914ec({'jsonrpc':_0x2c861d(0x1eb),'id':0x1,'method':_0x596d9a['jxRKq'],'params':{'protocolVersion':_0x2c861d(0x1e9),'capabilities':{},'clientInfo':{'name':_0x596d9a['MenaL'],'version':_0x596d9a[_0x2c861d(0x1f3)]}}});if(_0x228d93[_0x2c861d(0x20b)])throw new Error(_0x2c861d(0x1ad)+(_0x228d93[_0x2c861d(0x20b)]['message']??JSON[_0x2c861d(0x212)](_0x228d93['error'])));console[_0x2c861d(0x1cb)](_0x2c861d(0x1e0)),await fetch(_0x491e92,{'method':_0x596d9a[_0x2c861d(0x1a7)],'headers':_0x3ed71e,'body':JSON[_0x2c861d(0x212)]({'jsonrpc':_0x596d9a['xXYDP'],'method':_0x596d9a[_0x2c861d(0x207)]})})[_0x2c861d(0x1cc)](_0x3724f1=>_0x3724f1['text']()),process['stdout'][_0x2c861d(0x1a4)](_0x2c861d(0x1a3));const _0x25b65a=await _0x596d9a['HlZSZ'](_0x3914ec,{'jsonrpc':'2.0','id':0x2,'method':_0x596d9a['zpAEe'],'params':{'name':_0x596d9a[_0x2c861d(0x1e5)],'arguments':{}}});if(_0x25b65a[_0x2c861d(0x20b)])throw new Error(_0x2c861d(0x1bf)+(_0x25b65a[_0x2c861d(0x20b)][_0x2c861d(0x1c2)]??JSON['stringify'](_0x25b65a[_0x2c861d(0x20b)])));console[_0x2c861d(0x1cb)](_0x2c861d(0x1e0));const _0x5eee3b=extractToken(_0x25b65a[_0x2c861d(0x22f)]);if(!_0x5eee3b){console[_0x2c861d(0x20b)](_0x596d9a[_0x2c861d(0x214)]),console['error'](JSON['stringify'](_0x25b65a['result'],null,0x2));throw new Error(_0x596d9a['SVBvN']);}const _0x326f49=_0x596d9a[_0x2c861d(0x1fb)](join,_0x596d9a[_0x2c861d(0x1d7)](homedir),_0x2c861d(0x21a)),_0x2311cf=join(_0x326f49,_0x596d9a[_0x2c861d(0x229)]);await _0x596d9a['anxod'](mkdir,_0x326f49,{'recursive':!![]}),await _0x596d9a['NOdus'](writeFile,_0x2311cf,_0x5eee3b,{'mode':0x180}),await _0x596d9a['NOdus'](writeFile,join(_0x326f49,_0x596d9a['ACqEb']),_0x491e92,{'mode':0x180}),console[_0x2c861d(0x1cb)](_0x2c861d(0x190)+_0x2311cf),console[_0x2c861d(0x1cb)](_0x2c861d(0x195));}async function fetchAuthServerMetadata(_0x1b5fc4){const _0x4ef463=_0x131106,_0x9ae1a4=_0x1b5fc4+_0x4ef463(0x1df),_0x3a4f0a=await fetch(_0x9ae1a4);if(!_0x3a4f0a['ok'])throw new Error(_0x4ef463(0x1b3)+_0x9ae1a4+':\x20'+_0x3a4f0a[_0x4ef463(0x1c1)]);return _0x3a4f0a['json']();}function waitForCallback(_0x45ac5c){const _0x415be6=_0x131106,_0x4521b3={'Uyrwf':function(_0xf4050a,_0x11356e){return _0xf4050a(_0x11356e);},'hSAuc':_0x415be6(0x1f8),'WAJHM':'/callback','muwUF':_0x415be6(0x1af),'LDHOz':'state','HJtxw':_0x415be6(0x20b),'JMGsV':function(_0x4b2abe,_0x14bf8a){return _0x4b2abe(_0x14bf8a);},'hrFXe':function(_0x4ab026,_0x4a0d40){return _0x4ab026!==_0x4a0d40;},'BeoSH':'text/html','ADMPD':_0x415be6(0x218),'JAShg':'<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','ObzQH':function(_0x413ada,_0x26b3b1){return _0x413ada(_0x26b3b1);}};return new Promise((_0x4a6313,_0x3e3dcb)=>{const _0x391d81=()=>{const _0x328855=_0x428f;_0x51fcae['closeAllConnections'](),_0x51fcae[_0x328855(0x219)]();},_0x2123af=setTimeout(()=>{const _0x31f726=_0x428f;_0x391d81(),_0x4521b3[_0x31f726(0x202)](_0x3e3dcb,new OAuthTimeoutError(_0x4521b3[_0x31f726(0x18c)]));},0x1d4c0),_0x51fcae=createServer((_0x317b03,_0x3d5b23)=>{const _0x8eea93=_0x428f,_0x31bf14=new URL(_0x317b03['url']??'/',_0x8eea93(0x21d)+CALLBACK_PORT);if(_0x31bf14[_0x8eea93(0x1f9)]!==_0x4521b3[_0x8eea93(0x19b)]){_0x3d5b23[_0x8eea93(0x225)](0x194),_0x3d5b23['end']('Not\x20found');return;}const _0x1ada09=_0x31bf14[_0x8eea93(0x19d)][_0x8eea93(0x19a)](_0x4521b3['muwUF']),_0x56f561=_0x31bf14['searchParams'][_0x8eea93(0x19a)](_0x4521b3[_0x8eea93(0x210)]),_0x214a30=_0x31bf14['searchParams']['get'](_0x4521b3[_0x8eea93(0x199)]);if(_0x214a30){const _0x1f5324=_0x31bf14['searchParams'][_0x8eea93(0x19a)](_0x8eea93(0x1f0))??_0x214a30;_0x3d5b23['writeHead'](0xc8,{'Content-Type':_0x8eea93(0x21e)}),_0x3d5b23[_0x8eea93(0x1a2)](_0x8eea93(0x192)+_0x1f5324+_0x8eea93(0x1c9)),_0x4521b3[_0x8eea93(0x202)](clearTimeout,_0x2123af),_0x391d81(),_0x4521b3[_0x8eea93(0x1e3)](_0x3e3dcb,new Error(_0x8eea93(0x209)+_0x1f5324));return;}if(!_0x1ada09||_0x4521b3['hrFXe'](_0x56f561,_0x45ac5c)){_0x3d5b23[_0x8eea93(0x225)](0x190,{'Content-Type':_0x4521b3['BeoSH']}),_0x3d5b23[_0x8eea93(0x1a2)](_0x4521b3['ADMPD']);return;}_0x3d5b23[_0x8eea93(0x225)](0xc8,{'Content-Type':'text/html'}),_0x3d5b23['end'](_0x4521b3['JAShg']),clearTimeout(_0x2123af),_0x391d81(),_0x4521b3['ObzQH'](_0x4a6313,_0x1ada09);});_0x51fcae['listen'](CALLBACK_PORT,'127.0.0.1');});}async function openBrowser(_0xe7efe2){const _0x12ded7=_0x131106,_0x14dc07={'THTdg':function(_0x1d4d42,_0x3a2d0e){return _0x1d4d42===_0x3a2d0e;},'alFEs':_0x12ded7(0x22e),'GTQBC':'xdg-open'},_0xdbf334=_0x14dc07[_0x12ded7(0x1b8)](process['platform'],'darwin')?_0x12ded7(0x1d3):process['platform']==='win32'?_0x14dc07[_0x12ded7(0x1bc)]:_0x14dc07[_0x12ded7(0x227)];exec(_0xdbf334+'\x20\x22'+_0xe7efe2+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x1176c4=_0x131106,_0xc9860f={'DtTTw':function(_0x4cd9ba,_0x29bf2d){return _0x4cd9ba!==_0x29bf2d;}};try{const _0x2b7b22=JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x1176c4(0x21b)));if(_0x2b7b22['origin']&&_0xc9860f[_0x1176c4(0x1da)](_0x2b7b22['origin'],currentOrigin))return null;if(_0x2b7b22[_0x1176c4(0x1d6)]&&Date[_0x1176c4(0x1b9)]()>_0x2b7b22[_0x1176c4(0x1d6)])return null;return _0x2b7b22[_0x1176c4(0x201)]??null;}catch{return null;}}async function saveCachedToken(_0x3ae90f,_0x55e76c,_0x1a85dc){const _0x347444=_0x131106,_0x4da953={'dmzyt':function(_0x183943,_0x433582){return _0x183943+_0x433582;},'JiAhy':function(_0x42be76,_0x167d48,_0x1fabd1){return _0x42be76(_0x167d48,_0x1fabd1);}},_0x76d078=await loadCachedData(),_0x54621e={..._0x76d078,'origin':currentOrigin,'accessToken':_0x3ae90f,'refreshToken':_0x55e76c??_0x76d078?.[_0x347444(0x20c)],'expiresAt':_0x1a85dc?_0x4da953['dmzyt'](Date[_0x347444(0x1b9)](),_0x1a85dc*0x3e8):undefined};await mkdir(_0x4da953['JiAhy'](join,homedir(),_0x347444(0x21a)),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x54621e),{'mode':0x180});}async function loadCachedClient(){const _0x3eb24c=_0x131106,_0xc370a={'fqqpn':function(_0xd44602,_0x702565){return _0xd44602!==_0x702565;}},_0x571045=await loadCachedData();if(_0x571045?.['origin']&&_0xc370a[_0x3eb24c(0x21f)](_0x571045[_0x3eb24c(0x19f)],currentOrigin))return null;return _0x571045?.['clientId']?{'clientId':_0x571045['clientId'],'clientSecret':_0x571045[_0x3eb24c(0x1a0)]}:null;}async function clearCachedClient(){const _0x4df433=_0x131106,_0x2c704a={'cxrsf':function(_0x1d5813,_0xa7c3ac,_0x323aac,_0x50547f){return _0x1d5813(_0xa7c3ac,_0x323aac,_0x50547f);}},_0x2fac65=await loadCachedData();if(!_0x2fac65)return;const {clientId:_0x361d48,clientSecret:_0x4390b6,..._0x5676e8}=_0x2fac65;await _0x2c704a[_0x4df433(0x191)](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x5676e8),{'mode':0x180});}async function saveCachedClient(_0x495982,_0x399497){const _0x44a615={'EUCUP':function(_0x502013){return _0x502013();},'ecjDC':'.ranger','GyUnw':function(_0x5d3dde,_0x15bd39,_0x206354,_0x57bf2b){return _0x5d3dde(_0x15bd39,_0x206354,_0x57bf2b);}},_0x1040db=await _0x44a615['EUCUP'](loadCachedData),_0x1d8d48={..._0x1040db,'origin':currentOrigin,'accessToken':_0x1040db?.['accessToken']??'','clientId':_0x495982,'clientSecret':_0x399497};await mkdir(join(homedir(),_0x44a615['ecjDC']),{'recursive':!![]}),await _0x44a615['GyUnw'](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x1d8d48),{'mode':0x180});}async function loadCachedData(){const _0x4e361f=_0x131106,_0x38756={'fRCwU':function(_0x317360,_0x171279,_0x1c5d99){return _0x317360(_0x171279,_0x1c5d99);}};try{return JSON[_0x4e361f(0x1db)](await _0x38756[_0x4e361f(0x20d)](readFile,TOKEN_CACHE_PATH,_0x4e361f(0x21b)));}catch{return null;}}async function parseResponse(_0x43dcff){const _0x4c0a44=_0x131106,_0x61099d={'CHZPn':_0x4c0a44(0x1ef),'HXGgx':'text/event-stream','KxBMG':function(_0x58f2e4,_0xdd55de){return _0x58f2e4!==_0xdd55de;},'oONvl':'No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream'},_0x2635cf=_0x43dcff[_0x4c0a44(0x1d4)][_0x4c0a44(0x19a)](_0x61099d[_0x4c0a44(0x22d)])??'';if(_0x2635cf['includes'](_0x61099d[_0x4c0a44(0x20f)])){const _0x3838c2=await _0x43dcff['text']();for(const _0x16aed1 of _0x3838c2[_0x4c0a44(0x1d5)]('\x0a')){const _0x5cf456=_0x16aed1[_0x4c0a44(0x208)]();if(_0x5cf456['startsWith']('data:')){const _0x4253d3=_0x5cf456[_0x4c0a44(0x223)](_0x4c0a44(0x1c5)[_0x4c0a44(0x1e1)])[_0x4c0a44(0x208)]();if(!_0x4253d3)continue;try{const _0x25c22d=JSON[_0x4c0a44(0x1db)](_0x4253d3);if(_0x61099d[_0x4c0a44(0x18f)](_0x25c22d['id'],undefined)||_0x25c22d[_0x4c0a44(0x20b)])return _0x25c22d;}catch{}}}throw new Error(_0x61099d['oONvl']);}return _0x43dcff[_0x4c0a44(0x1d9)]();}function extractToken(_0x3b22c3){const _0x415453=_0x131106,_0x7d72a1={'vOPyQ':function(_0x56f37b,_0x5beea8){return _0x56f37b===_0x5beea8;},'Lodoy':function(_0x233f15,_0x37e8de){return _0x233f15===_0x37e8de;},'QjdXk':'text'};if(!_0x3b22c3)return null;const _0x3775f6=_0x3b22c3[_0x415453(0x18d)];if(_0x3775f6?.[_0x415453(0x1b5)]&&_0x7d72a1[_0x415453(0x1f7)](typeof _0x3775f6[_0x415453(0x1b5)],_0x415453(0x1c7)))return _0x3775f6[_0x415453(0x1b5)];if(_0x3b22c3[_0x415453(0x1bb)]){const _0x44dd72=_0x3b22c3['content'];throw new Error(_0x415453(0x221)+(_0x44dd72?.[0x0]?.[_0x415453(0x1d8)]??_0x415453(0x1ac)));}const _0x29c367=_0x3b22c3[_0x415453(0x1ff)];if(_0x29c367)for(const _0x198514 of _0x29c367){if(_0x7d72a1[_0x415453(0x18e)](_0x198514[_0x415453(0x1a5)],_0x7d72a1['QjdXk'])&&_0x198514['text']){try{const _0x22d38a=JSON['parse'](_0x198514['text']);if(typeof _0x22d38a?.[_0x415453(0x1b5)]===_0x415453(0x1c7))return _0x22d38a['token'];}catch{}const _0x1fef8f=_0x198514[_0x415453(0x1d8)][_0x415453(0x198)](/(rngr_[A-Za-z0-9_-]+)/);if(_0x1fef8f)return _0x1fef8f[0x1];}}return null;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x5a46(_0x1e599d,_0x511f0a){_0x1e599d=_0x1e599d-0xe6;var _0x45125c=_0x4512();var _0x5a4696=_0x45125c[_0x1e599d];return _0x5a4696;}(function(_0x368548,_0x1ea85a){var _0x1699e0=_0x5a46,_0x14ba01=_0x368548();while(!![]){try{var _0x543ffe=-parseInt(_0x1699e0(0xf2))/0x1*(parseInt(_0x1699e0(0xe8))/0x2)+-parseInt(_0x1699e0(0xe6))/0x3+parseInt(_0x1699e0(0xea))/0x4+-parseInt(_0x1699e0(0xef))/0x5*(parseInt(_0x1699e0(0xf1))/0x6)+-parseInt(_0x1699e0(0xe9))/0x7+-parseInt(_0x1699e0(0xf0))/0x8+parseInt(_0x1699e0(0xe7))/0x9;if(_0x543ffe===_0x1ea85a)break;else _0x14ba01['push'](_0x14ba01['shift']());}catch(_0x2cb8dc){_0x14ba01['push'](_0x14ba01['shift']());}}}(_0x4512,0xde321));function _0x4512(){var _0x8a1a07=['cNPIG','3709197KDBbMu','39489426rLTGga','4978lSxRiu','12732524hVqBbH','3257264FiltNW','hAIYF','FWbHC','tvuUN','ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','15qUcqpD','963432jOaWZh','460146TBqAnN','356diajxm'];_0x4512=function(){return _0x8a1a07;};return _0x4512();}export async function migrateProfile(_0x3a4d87,_0x3055e7){var _0x262d95=_0x5a46,_0x5d67e4={'hAIYF':function(_0x18e58a,_0x41ff3e){return _0x18e58a+_0x41ff3e;},'mTEVR':function(_0x2cda02,_0x496aea){return _0x2cda02+_0x496aea;},'mLXpc':function(_0x5c2d5b,_0x3cf81c){return _0x5c2d5b+_0x3cf81c;},'YtEbC':function(_0x5c09d2,_0x5df705){return _0x5c09d2+_0x5df705;},'KhAHJ':_0x262d95(0xee),'sTnmd':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','cNPIG':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','FWbHC':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','tvuUN':'\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','XdRLj':'fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.'};console['error'](_0x5d67e4['hAIYF'](_0x5d67e4[_0x262d95(0xeb)](_0x5d67e4[_0x262d95(0xeb)](_0x5d67e4['mTEVR'](_0x5d67e4['mLXpc'](_0x5d67e4['YtEbC'](_0x5d67e4['KhAHJ']+'\x0a',_0x5d67e4['sTnmd']),_0x5d67e4[_0x262d95(0xf3)])+'\x0a',_0x5d67e4[_0x262d95(0xec)])+_0x5d67e4[_0x262d95(0xed)],'\x0a'),'Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a'),_0x5d67e4['XdRLj'])),process['exit'](0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3db13f,_0x41e2f4){const _0x52a175=_0x4ef9,_0x2b6534=_0x3db13f();while(!![]){try{const _0x378725=-parseInt(_0x52a175(0x9a))/0x1+-parseInt(_0x52a175(0xb6))/0x2+-parseInt(_0x52a175(0xbe))/0x3*(-parseInt(_0x52a175(0xa2))/0x4)+parseInt(_0x52a175(0xbb))/0x5+parseInt(_0x52a175(0xbc))/0x6*(parseInt(_0x52a175(0x9f))/0x7)+parseInt(_0x52a175(0xa1))/0x8+-parseInt(_0x52a175(0xa7))/0x9;if(_0x378725===_0x41e2f4)break;else _0x2b6534['push'](_0x2b6534['shift']());}catch(_0x5b6bd0){_0x2b6534['push'](_0x2b6534['shift']());}}}(_0x438a,0x90204));function _0x4ef9(_0x558738,_0x55d05b){_0x558738=_0x558738-0x95;const _0x438abd=_0x438a();let _0x4ef9ef=_0x438abd[_0x558738];return _0x4ef9ef;}import{join}from'path';import{existsSync}from'fs';import _0x1e80e2 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x13de13){const _0x4414db=_0x4ef9,_0x39becc={'ovPhy':function(_0x2b42a6,_0x2865a2){return _0x2b42a6(_0x2865a2);},'aVFAk':function(_0x2f7620,_0x3cdd43){return _0x2f7620(_0x3cdd43);},'qXufz':'.claude','ZamWZ':'\x0a📦\x20Claude\x20Code\x20Plugin\x0a','ijJfH':_0x4414db(0xa5),'zeJag':_0x4414db(0xba),'FqTaj':_0x4414db(0xb8),'pkZCb':'✓\x20Marketplace\x20already\x20added','KUaik':_0x4414db(0xbd),'ZeiqJ':'❌\x20Failed\x20to\x20add\x20marketplace:','btxRX':'\x0aYou\x20can\x20install\x20manually\x20with:','yJiBA':_0x4414db(0xb0),'cYPAv':'install','uakHY':'ranger@trailhead','JowGR':function(_0x5ef69f){return _0x5ef69f();},'qPXHL':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','FxvIw':function(_0x16a004,_0x44fe96){return _0x16a004===_0x44fe96;},'hsuYX':function(_0xa5c7d2,_0x596a30,_0x4bd737){return _0xa5c7d2(_0x596a30,_0x4bd737);}},_0x261007=await _0x39becc[_0x4414db(0xc1)](isPluginInstalled,_0x4414db(0xb4));if(_0x261007)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x19ee18=_0x39becc['aVFAk'](existsSync,join(getProjectRoot(),_0x39becc['qXufz']));let _0x54eb7f;if(_0x13de13)_0x54eb7f=_0x13de13;else{if(_0x19ee18)_0x54eb7f=_0x4414db(0xba);else{console['log'](_0x39becc['ZamWZ']);const _0x33cf10=await _0x1e80e2[_0x4414db(0xac)]([{'type':'list','name':_0x39becc['ijJfH'],'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x4414db(0x99),'value':_0x4414db(0xb8)},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':_0x39becc['zeJag']}],'default':_0x39becc['FqTaj']}]);_0x54eb7f=_0x33cf10['pluginScope'];}}console[_0x4414db(0x9d)](_0x4414db(0x95)+_0x54eb7f+_0x4414db(0xaf));const _0x57ea85=await isMarketplaceAdded('trailhead');let _0x38cf6f=_0x57ea85;if(_0x57ea85)console[_0x4414db(0x9d)](_0x39becc[_0x4414db(0xb7)]);else{const _0x2aa5e1=await runClaudeCommand([_0x39becc[_0x4414db(0xa0)],'marketplace',_0x4414db(0xb5),'ranger-testing/trailhead']);!_0x2aa5e1['success']?(console['error'](_0x39becc[_0x4414db(0xb9)],_0x2aa5e1[_0x4414db(0xb1)]),console['log'](_0x39becc['btxRX']),console[_0x4414db(0x9d)](_0x39becc[_0x4414db(0xa8)]),console['log'](_0x4414db(0xa6)+_0x54eb7f)):_0x38cf6f=!![];}if(_0x38cf6f){const _0x2c5290=await runClaudeCommand([_0x4414db(0xbd),_0x39becc[_0x4414db(0xa3)],_0x39becc['uakHY'],'--scope',_0x54eb7f],{'cwd':_0x54eb7f===_0x39becc['zeJag']?_0x39becc['JowGR'](getProjectRoot):undefined});if(!_0x2c5290[_0x4414db(0xab)])console[_0x4414db(0xb1)](_0x4414db(0xb3),_0x2c5290['error']),console['log'](_0x4414db(0x98)),console[_0x4414db(0x9d)](_0x4414db(0xa6)+_0x54eb7f);else{console[_0x4414db(0x9d)](_0x39becc['qPXHL']);const _0x52def8=['plugin',_0x4414db(0x96),_0x39becc[_0x4414db(0xb2)]];_0x39becc['FxvIw'](_0x54eb7f,'project')&&_0x52def8['push']('--scope',_0x4414db(0xba));const _0x3d0ccc=await _0x39becc[_0x4414db(0x9b)](runClaudeCommand,_0x52def8,{'captureOutput':!![],'cwd':_0x39becc['FxvIw'](_0x54eb7f,_0x39becc[_0x4414db(0xbf)])?getProjectRoot():undefined}),_0x34b57e=_0x3d0ccc['output']?.['includes'](_0x4414db(0xaa));!_0x3d0ccc[_0x4414db(0xab)]&&!_0x34b57e?console[_0x4414db(0xb1)](_0x4414db(0xa4),_0x3d0ccc['error']):console[_0x4414db(0x9d)]('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}function _0x438a(){const _0x1c1b5d=['zKbEK','already\x20enabled','success','prompt','iAqVr','SKILL.md','\x20level)...\x0a','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','error','uakHY','❌\x20Failed\x20to\x20install\x20plugin:','ranger@trailhead','add','2169830qImgTh','pkZCb','user','ZeiqJ','project','4858160YfDwkL','6cFNJNf','plugin','24171eDMJgQ','zeJag','ZxdKx','ovPhy','eYDTY','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','enable','wantsSkillup','\x0aYou\x20can\x20install\x20manually\x20with:','User\x20(available\x20in\x20all\x20your\x20projects)','393588rOcjHH','hsuYX','.claude','log','SHYko','1586942Rvnpif','KUaik','8046240mIQVEY','80QGOiip','cYPAv','⚠\x20Failed\x20to\x20enable\x20plugin:','pluginScope','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','2667735FLSBIj','yJiBA'];_0x438a=function(){return _0x1c1b5d;};return _0x438a();}export async function ensureClaudeSkills(_0x314f44){const _0x96f40b=_0x4ef9,_0x68638e={'eYDTY':function(_0x521eeb,_0xe5af78){return _0x521eeb(_0xe5af78);},'SHYko':_0x96f40b(0xae),'zKbEK':function(_0x3ec969,_0x411376,_0x1d44bd,_0x47d3d4){return _0x3ec969(_0x411376,_0x1d44bd,_0x47d3d4);},'iAqVr':'ranger','YfoTM':function(_0x159236,_0x4b654c){return _0x159236||_0x4b654c;},'ZxdKx':function(_0x47aa49){return _0x47aa49();},'Pxbcx':_0x96f40b(0xba),'DISKN':'Would\x20you\x20like\x20to\x20install\x20skills?'},_0x2f9dc5=_0x68638e[_0x96f40b(0xc2)](existsSync,join(getSkillsDir('user'),'ranger',_0x68638e[_0x96f40b(0x9e)])),_0x443574=existsSync(_0x68638e[_0x96f40b(0xa9)](join,getSkillsDir('project'),_0x68638e[_0x96f40b(0xad)],_0x68638e[_0x96f40b(0x9e)]));if(_0x68638e['YfoTM'](_0x2f9dc5,_0x443574))return console['log']('✓\x20Ranger\x20skills\x20already\x20installed'),![];const _0x2a157d=_0x68638e[_0x96f40b(0xc2)](existsSync,join(_0x68638e[_0x96f40b(0xc0)](getProjectRoot),_0x96f40b(0x9c)));let _0x1974bc=!![];if(_0x314f44)await skillup({'autoInstall':_0x314f44,'suppressUsage':!![]});else{if(_0x2a157d)await skillup({'autoInstall':_0x68638e['Pxbcx'],'suppressUsage':!![]});else{const _0x5c87be=await _0x1e80e2['prompt']([{'type':'confirm','name':_0x96f40b(0x97),'message':_0x68638e['DISKN'],'default':!![]}]);_0x1974bc=_0x5c87be[_0x96f40b(0x97)],_0x1974bc&&await skillup({'suppressUsage':!![]});}}return _0x1974bc;}
|