Token导航 LogoToken导航

Agent Skill · 待分类

agent-quorum-manager(座席仲裁管理员)

agent-quorum-manager 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

agent-quorum-manager 是待分类类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有未通过项,按安装量在待分类类的 11,209 个 Skill 里排第 4,417。

总安装 749周安装 30GitHub Stars 34,001下载 242核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:agent-quorum-manager(座席仲裁管理员)
来源仓库:https://github.com/ruvnet/claude-flow
仓库路径:skills/agent-quorum-manager
安装命令:
npx skills add https://github.com/ruvnet/claude-flow --skill agent-quorum-manager
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ruvnet/claude-flow --skill agent-quorum-manager

这个 Skill 是做什么的

这个 Skill 的分类还没最终确定,用法以来源仓库的说明为准。

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。通过 npx skills add 命令从指定 GitHub 路径安装使用。

安装前需确认权限范围、维护状态,注意是否触发联网或文件操作。agent-quorum-manager 属于待分类类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/agent-quorum-manager

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/ruvnet/claude-flow --skill agent-quorum-manage…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

agent-quorum-manager 怎么安装?

在终端执行 npx skills add https://github.com/ruvnet/claude-flow --skill agent-quorum-manager。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

agent-quorum-manager 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

agent-quorum-manager 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

agent-quorum-manager 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

agent-quorum-manager 用的人多吗?

公开数据是累计安装 749 次,近一周安装 30 次,下载 242 次,GitHub 34,001 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

agent-quorum-manager 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 来源仓库有 34,001 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理待分类类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

待分类类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
infsh-cli

infsh CLI · Codex、Claude

4,374,576382权限未标注未明确未收录
ai-video-generation

AI 视频生成 · Codex、Claude

4,313,376382调用外部服务未明确有提醒
lark-openapi-explorer

云雀 OpenAPI 浏览器 · Codex、Claude

2,064,1209,011需要联网未明确有提醒
lark-workflow-standup-report

Lark 工作流程站立报告 · Codex、Claude

2,041,6328,978需要联网未明确通过
use-my-browser

使用我的浏览器 · Codex、Claude

1,848,49140操作浏览器未明确未通过
agent-quorum-manager

座席仲裁管理员 · 本页

74934,001需要联网未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
quorum-manager type: coordinator color: "#673AB7" description: Implements dynamic quorum adjustment and intelligent membership management capabilities:

Quorum Manager

Implements dynamic quorum adjustment and intelligent membership management for distributed consensus protocols.

Core Responsibilities

  1. Dynamic Quorum Calculation: Adapt quorum requirements based on real-time network conditions
  2. Membership Management: Handle seamless node addition, removal, and failure scenarios
  3. Network Monitoring: Assess connectivity, latency, and partition detection
  4. Weighted Voting: Implement capability-based voting weight assignments
  5. Fault Tolerance Optimization: Balance availability and consistency guarantees

Technical Implementation

Core Quorum Management System

class QuorumManager {
  constructor(nodeId, consensusProtocol) {
    this.nodeId = nodeId;
    this.protocol = consensusProtocol;
    this.currentQuorum = new Map(); // nodeId -> QuorumNode
    this.quorumHistory = [];
    this.networkMonitor = new NetworkConditionMonitor();
    this.membershipTracker = new MembershipTracker();
    this.faultToleranceCalculator = new FaultToleranceCalculator();
    this.adjustmentStrategies = new Map();

    this.initializeStrategies();
  }

  // Initialize quorum adjustment strategies
  initializeStrategies() {
    this.adjustmentStrategies.set('NETWORK_BASED', new NetworkBasedStrategy());
    this.adjustmentStrategies.set('PERFORMANCE_BASED', new PerformanceBasedStrategy());
    this.adjustmentStrategies.set('FAULT_TOLERANCE_BASED', new FaultToleranceStrategy());
    this.adjustmentStrategies.set('HYBRID', new HybridStrategy());
  }

  // Calculate optimal quorum size based on current conditions
  async calculateOptimalQuorum(context = {}) {
    const networkConditions = await this.networkMonitor.getCurrentConditions();
    const membershipStatus = await this.membershipTracker.getMembershipStatus();
    const performanceMetrics = context.performanceMetrics || await this.getPerformanceMetrics();

    const analysisInput = {
      networkConditions: networkConditions,
      membershipStatus: membershipStatus,
      performanceMetrics: performanceMetrics,
      currentQuorum: this.currentQuorum,
      protocol: this.protocol,
      faultToleranceRequirements: context.faultToleranceRequirements || this.getDefaultFaultTolerance()
    };

    // Apply multiple strategies and select optimal result
    const strategyResults = new Map();

    for (const [strategyName, strategy] of this.adjustmentStrategies) {
      try {
        const result = await strategy.calculateQuorum(analysisInput);
        strategyResults.set(strategyName, result);
      } catch (error) {
        console.warn(`Strategy ${strategyName} failed:`, error);
      }
    }

    // Select best strategy result
    const optimalResult = this.selectOptimalStrategy(strategyResults, analysisInput);

    return {
      recommendedQuorum: optimalResult.quorum,
      strategy: optimalResult.strategy,
      confidence: optimalResult.confidence,
      reasoning: optimalResult.reasoning,
      expectedImpact: optimalResult.expectedImpact
    };
  }

  // Apply quorum changes with validation and rollback capability
  async adjustQuorum(newQuorumConfig, options = {}) {
    const adjustmentId = `adjustment_${Date.now()}`;

    try {
      // Validate new quorum configuration
      await this.validateQuorumConfiguration(newQuorumConfig);

      // Create adjustment plan
      const adjustmentPlan = await this.createAdjustmentPlan(
        this.currentQuorum, newQuorumConfig
      );

      // Execute adjustment with monitoring
      const adjustmentResult = await this.executeQuorumAdjustment(
        adjustmentPlan, adjustmentId, options
      );

      // Verify adjustment success
      await this.verifyQuorumAdjustment(adjustmentResult);

      // Update current quorum
      this.currentQuorum = newQuorumConfig.quorum;

      // Record successful adjustment
      this.recordQuorumChange(adjustmentId, adjustmentResult);

      return {
        success: true,
        adjustmentId: adjustmentId,
        previousQuorum: adjustmentPlan.previousQuorum,
        newQuorum: this.currentQuorum,
        impact: adjustmentResult.impact
      };

    } catch (error) {
      console.error(`Quorum adjustment failed:`, error);

      // Attempt rollback
      await this.rollbackQuorumAdjustment(adjustmentId);

      throw error;
    }
  }

  async executeQuorumAdjustment(adjustmentPlan, adjustmentId, options) {
    const startTime = Date.now();

    // Phase 1: Prepare nodes for quorum change
    await this.prepareNodesForAdjustment(adjustmentPlan.affectedNodes);

    // Phase 2: Execute membership changes
    const membershipChanges = await this.executeMembershipChanges(
      adjustmentPlan.membershipChanges
    );

    // Phase 3: Update voting weights if needed
    if (adjustmentPlan.weightChanges.length > 0) {
      await this.updateVotingWeights(adjustmentPlan.weightChanges);
    }

    // Phase 4: Reconfigure consensus protocol
    await this.reconfigureConsensusProtocol(adjustmentPlan.protocolChanges);

    // Phase 5: Verify new quorum is operational
    const verificationResult = await this.verifyQuorumOperational(adjustmentPlan.newQuorum);

    const endTime = Date.now();

    return {
      adjustmentId: adjustmentId,
      duration: endTime - startTime,
      membershipChanges: membershipChanges,
      verificationResult: verificationResult,
      impact: await this.measureAdjustmentImpact(startTime, endTime)
    };
  }
}

Network-Based Quorum Strategy

class NetworkBasedStrategy {
  constructor() {
    this.networkAnalyzer = new NetworkAnalyzer();
    this.connectivityMatrix = new ConnectivityMatrix();
    this.partitionPredictor = new PartitionPredictor();
  }

  async calculateQuorum(analysisInput) {
    const { networkConditions, membershipStatus, currentQuorum } = analysisInput;

    // Analyze network topology and connectivity
    const topologyAnalysis = await this.analyzeNetworkTopology(membershipStatus.activeNodes);

    // Predict potential network partitions
    const partitionRisk = await this.assessPartitionRisk(networkConditions, topologyAnalysis);

    // Calculate minimum quorum for fault tolerance
    const minQuorum = this.calculateMinimumQuorum(
      membershipStatus.activeNodes.length,
      partitionRisk.maxPartitionSize
    );

    // Optimize for network conditions
    const optimizedQuorum = await this.optimizeForNetworkConditions(
      minQuorum,
      networkConditions,
      topologyAnalysis
    );

    return {
      quorum: optimizedQuorum,
      strategy: 'NETWORK_BASED',
      confidence: this.calculateConfidence(networkConditions, topologyAnalysis),
      reasoning: this.generateReasoning(optimizedQuorum, partitionRisk, networkConditions),
      expectedImpact: {
        availability: this.estimateAvailabilityImpact(optimizedQuorum),
        performance: this.estimatePerformanceImpact(optimizedQuorum, networkConditions)
      }
    };
  }

  async analyzeNetworkTopology(activeNodes) {
    const topology = {
      nodes: activeNodes.length,
      edges: 0,
      clusters: [],
      diameter: 0,
      connectivity: new Map()
    };

    // Build connectivity matrix
    for (const node of activeNodes) {
      const connections = await this.getNodeConnections(node);
      topology.connectivity.set(node.id, connections);
      topology.edges += connections.length;
    }

    // Identify network clusters
    topology.clusters = await this.identifyNetworkClusters(topology.connectivity);

    // Calculate network diameter
    topology.diameter = await this.calculateNetworkDiameter(topology.connectivity);

    return topology;
  }

  async assessPartitionRisk(networkConditions, topologyAnalysis) {
    const riskFactors = {
      connectivityReliability: this.assessConnectivityReliability(networkConditions),
      geographicDistribution: this.assessGeographicRisk(topologyAnalysis),
      networkLatency: this.assessLatencyRisk(networkConditions),
      historicalPartitions: await this.getHistoricalPartitionData()
    };

    // Calculate overall partition risk
    const overallRisk = this.calculateOverallPartitionRisk(riskFactors);

    // Estimate maximum partition size
    const maxPartitionSize = this.estimateMaxPartitionSize(
      topologyAnalysis,
      riskFactors
    );

    return {
      overallRisk: overallRisk,
      maxPartitionSize: maxPartitionSize,
      riskFactors: riskFactors,
      mitigationStrategies: this.suggestMitigationStrategies(riskFactors)
    };
  }

  calculateMinimumQuorum(totalNodes, maxPartitionSize) {
    // For Byzantine fault tolerance: need > 2/3 of total nodes
    const byzantineMinimum = Math.floor(2 * totalNodes / 3) + 1;

    // For network partition tolerance: need > 1/2 of largest connected component
    const partitionMinimum = Math.floor((totalNodes - maxPartitionSize) / 2) + 1;

    // Use the more restrictive requirement
    return Math.max(byzantineMinimum, partitionMinimum);
  }

  async optimizeForNetworkConditions(minQuorum, networkConditions, topologyAnalysis) {
    const optimization = {
      baseQuorum: minQuorum,
      nodes: new Map(),
      totalWeight: 0
    };

    // Select nodes for quorum based on network position and reliability
    const nodeScores = await this.scoreNodesForQuorum(networkConditions, topologyAnalysis);

    // Sort nodes by score (higher is better)
    const sortedNodes = Array.from(nodeScores.entries())
      .sort(([,scoreA], [,scoreB]) => scoreB - scoreA);

    // Select top nodes for quorum
    let selectedCount = 0;
    for (const [nodeId, score] of sortedNodes) {
      if (selectedCount < minQuorum) {
        const weight = this.calculateNodeWeight(nodeId, score, networkConditions);
        optimization.nodes.set(nodeId, {
          weight: weight,
          score: score,
          role: selectedCount === 0 ? 'primary' : 'secondary'
        });
        optimization.totalWeight += weight;
        selectedCount++;
      }
    }

    return optimization;
  }

  async scoreNodesForQuorum(networkConditions, topologyAnalysis) {
    const scores = new Map();

    for (const [nodeId, connections] of topologyAnalysis.connectivity) {
      let score = 0;

      // Connectivity score (more connections = higher score)
      score += (connections.length / topologyAnalysis.nodes) * 30;

      // Network position score (central nodes get higher scores)
      const centrality = this.calculateCentrality(nodeId, topologyAnalysis);
      score += centrality * 25;

      // Reliability score based on network conditions
      const reliability = await this.getNodeReliability(nodeId, networkConditions);
      score += reliability * 25;

      // Geographic diversity score
      const geoScore = await this.getGeographicDiversityScore(nodeId, topologyAnalysis);
      score += geoScore * 20;

      scores.set(nodeId, score);
    }

    return scores;
  }

  calculateNodeWeight(nodeId, score, networkConditions) {
    // Base weight of 1, adjusted by score and conditions
    let weight = 1.0;

    // Adjust based on normalized score (0-1)
    const normalizedScore = score / 100;
    weight *= (0.5 + normalizedScore);

    // Adjust based on network latency
    const nodeLatency = networkConditions.nodeLatencies.get(nodeId) || 100;
    const latencyFactor = Math.max(0.1, 1.0 - (nodeLatency / 1000)); // Lower latency = higher weight
    weight *= latencyFactor;

    // Ensure minimum weight
    return Math.max(0.1, Math.min(2.0, weight));
  }
}

Performance-Based Quorum Strategy

class PerformanceBasedStrategy {
  constructor() {
    this.performanceAnalyzer = new PerformanceAnalyzer();
    this.throughputOptimizer = new ThroughputOptimizer();
    this.latencyOptimizer = new LatencyOptimizer();
  }

  async calculateQuorum(analysisInput) {
    const { performanceMetrics, membershipStatus, protocol } = analysisInput;

    // Analyze current performance bottlenecks
    const bottlenecks = await this.identifyPerformanceBottlenecks(performanceMetrics);

    // Calculate throughput-optimal quorum size
    const throughputOptimal = await this.calculateThroughputOptimalQuorum(
      performanceMetrics, membershipStatus.activeNodes
    );

    // Calculate latency-optimal quorum size
    const latencyOptimal = await this.calculateLatencyOptimalQuorum(
      performanceMetrics, membershipStatus.activeNodes
    );

    // Balance throughput and latency requirements
    const balancedQuorum = await this.balanceThroughputAndLatency(
      throughputOptimal, latencyOptimal, performanceMetrics.requirements
    );

    return {
      quorum: balancedQuorum,
      strategy: 'PERFORMANCE_BASED',
      confidence: this.calculatePerformanceConfidence(performanceMetrics),
      reasoning: this.generatePerformanceReasoning(
        balancedQuorum, throughputOptimal, latencyOptimal, bottlenecks
      ),
      expectedImpact: {
        throughputImprovement: this.estimateThroughputImpact(balancedQuorum),
        latencyImprovement: this.estimateLatencyImpact(balancedQuorum)
      }
    };
  }

  async calculateThroughputOptimalQuorum(performanceMetrics, activeNodes) {
    const currentThroughput = performanceMetrics.throughput;
    const targetThroughput = performanceMetrics.requirements.targetThroughput;

    // Analyze relationship between quorum size and throughput
    const throughputCurve = await this.analyzeThroughputCurve(activeNodes);

    // Find quorum size that maximizes throughput while meeting requirements
    let optimalSize = Math.ceil(activeNodes.length / 2) + 1; // Minimum viable quorum
    let maxThroughput = 0;

    for (let size = optimalSize; size <= activeNodes.length; size++) {
      const projectedThroughput = this.projectThroughput(size, throughputCurve);

      if (projectedThroughput > maxThroughput && projectedThroughput >= targetThroughput) {
        maxThroughput = projectedThroughput;
        optimalSize = size;
      } else if (projectedThroughput < maxThroughput * 0.9) {
        // Stop if throughput starts decreasing significantly
        break;
      }
    }

    return await this.selectOptimalNodes(activeNodes, optimalSize, 'THROUGHPUT');
  }

  async calculateLatencyOptimalQuorum(performanceMetrics, activeNodes) {
    const currentLatency = performanceMetrics.latency;
    const targetLatency = performanceMetrics.requirements.maxLatency;

    // Analyze relationship between quorum size and latency
    const latencyCurve = await this.analyzeLatencyCurve(activeNodes);

    // Find minimum quorum size that meets latency requirements
    const minViableQuorum = Math.ceil(activeNodes.length / 2) + 1;

    for (let size = minViableQuorum; size <= activeNodes.length; size++) {
      const projectedLatency = this.projectLatency(size, latencyCurve);

      if (projectedLatency <= targetLatency) {
        return await this.selectOptimalNodes(activeNodes, size, 'LATENCY');
      }
    }

    // If no size meets requirements, return minimum viable with warning
    console.warn('No quorum size meets latency requirements');
    return await this.selectOptimalNodes(activeNodes, minViableQuorum, 'LATENCY');
  }

  async selectOptimalNodes(availableNodes, targetSize, optimizationTarget) {
    const nodeScores = new Map();

    // Score nodes based on optimization target
    for (const node of availableNodes) {
      let score = 0;

      if (optimizationTarget === 'THROUGHPUT') {
        score = await this.scoreThroughputCapability(node);
      } else if (optimizationTarget === 'LATENCY') {
        score = await this.scoreLatencyPerformance(node);
      }

      nodeScores.set(node.id, score);
    }

    // Select top-scoring nodes
    const sortedNodes = availableNodes.sort((a, b) =>
      nodeScores.get(b.id) - nodeScores.get(a.id)
    );

    const selectedNodes = new Map();

    for (let i = 0; i < Math.min(targetSize, sortedNodes.length); i++) {
      const node = sortedNodes[i];
      selectedNodes.set(node.id, {
        weight: this.calculatePerformanceWeight(node, nodeScores.get(node.id)),
        score: nodeScores.get(node.id),
        role: i === 0 ? 'primary' : 'secondary',
        optimizationTarget: optimizationTarget
      });
    }

    return {
      nodes: selectedNodes,
      totalWeight: Array.from(selectedNodes.values())
        .reduce((sum, node) => sum + node.weight, 0),
      optimizationTarget: optimizationTarget
    };
  }

  async scoreThroughputCapability(node) {
    let score = 0;

    // CPU capacity score
    const cpuCapacity = await this.getNodeCPUCapacity(node);
    score += (cpuCapacity / 100) * 30; // 30% weight for CPU

    // Network bandwidth score
    const bandwidth = await this.getNodeBandwidth(node);
    score += (bandwidth / 1000) * 25; // 25% weight for bandwidth (Mbps)

    // Memory capacity score
    const memory = await this.getNodeMemory(node);
    score += (memory / 8192) * 20; // 20% weight for memory (MB)

    // Historical throughput performance
    const historicalPerformance = await this.getHistoricalThroughput(node);
    score += (historicalPerformance / 1000) * 25; // 25% weight for historical performance

    return Math.min(100, score); // Normalize to 0-100
  }

  async scoreLatencyPerformance(node) {
    let score = 100; // Start with perfect score, subtract penalties

    // Network latency penalty
    const avgLatency = await this.getAverageNodeLatency(node);
    score -= (avgLatency / 10); // Subtract 1 point per 10ms latency

    // CPU load penalty
    const cpuLoad = await this.getNodeCPULoad(node);
    score -= (cpuLoad / 2); // Subtract 0.5 points per 1% CPU load

    // Geographic distance penalty (for distributed networks)
    const geoLatency = await this.getGeographicLatency(node);
    score -= (geoLatency / 20); // Subtract 1 point per 20ms geo latency

    // Consistency penalty (nodes with inconsistent performance)
    const consistencyScore = await this.getPerformanceConsistency(node);
    score *= consistencyScore; // Multiply by consistency factor (0-1)

    return Math.max(0, score);
  }
}

Fault Tolerance Strategy

class FaultToleranceStrategy {
  constructor() {
    this.faultAnalyzer = new FaultAnalyzer();
    this.reliabilityCalculator = new ReliabilityCalculator();
    this.redundancyOptimizer = new RedundancyOptimizer();
  }

  async calculateQuorum(analysisInput) {
    const { membershipStatus, faultToleranceRequirements, networkConditions } = analysisInput;

    // Analyze fault scenarios
    const faultScenarios = await this.analyzeFaultScenarios(
      membershipStatus.activeNodes, networkConditions
    );

    // Calculate minimum quorum for fault tolerance requirements
    const minQuorum = this.calculateFaultTolerantQuorum(
      faultScenarios, faultToleranceRequirements
    );

    // Optimize node selection for maximum fault tolerance
    const faultTolerantQuorum = await this.optimizeForFaultTolerance(
      membershipStatus.activeNodes, minQuorum, faultScenarios
    );

    return {
      quorum: faultTolerantQuorum,
      strategy: 'FAULT_TOLERANCE_BASED',
      confidence: this.calculateFaultConfidence(faultScenarios),
      reasoning: this.generateFaultToleranceReasoning(
        faultTolerantQuorum, faultScenarios, faultToleranceRequirements
      ),
      expectedImpact: {
        availability: this.estimateAvailabilityImprovement(faultTolerantQuorum),
        resilience: this.estimateResilienceImprovement(faultTolerantQuorum)
      }
    };
  }

  async analyzeFaultScenarios(activeNodes, networkConditions) {
    const scenarios = [];

    // Single node failure scenarios
    for (const node of activeNodes) {
      const scenario = await this.analyzeSingleNodeFailure(node, activeNodes, networkConditions);
      scenarios.push(scenario);
    }

    // Multiple node failure scenarios
    const multiFailureScenarios = await this.analyzeMultipleNodeFailures(
      activeNodes, networkConditions
    );
    scenarios.push(...multiFailureScenarios);

    // Network partition scenarios
    const partitionScenarios = await this.analyzeNetworkPartitionScenarios(
      activeNodes, networkConditions
    );
    scenarios.push(...partitionScenarios);

    // Correlated failure scenarios
    const correlatedFailureScenarios = await this.analyzeCorrelatedFailures(
      activeNodes, networkConditions
    );
    scenarios.push(...correlatedFailureScenarios);

    return this.prioritizeScenariosByLikelihood(scenarios);
  }

  calculateFaultTolerantQuorum(faultScenarios, requirements) {
    let maxRequiredQuorum = 0;

    for (const scenario of faultScenarios) {
      if (scenario.likelihood >= requirements.minLikelihoodToConsider) {
        const requiredQuorum = this.calculateQuorumForScenario(scenario, requirements);
        maxRequiredQuorum = Math.max(maxRequiredQuorum, requiredQuorum);
      }
    }

    return maxRequiredQuorum;
  }

  calculateQuorumForScenario(scenario, requirements) {
    const totalNodes = scenario.totalNodes;
    const failedNodes = scenario.failedNodes;
    const availableNodes = totalNodes - failedNodes;

    // For Byzantine fault tolerance
    if (requirements.byzantineFaultTolerance) {
      const maxByzantineNodes = Math.floor((totalNodes - 1) / 3);
      return Math.floor(2 * totalNodes / 3) + 1;
    }

    // For crash fault tolerance
    return Math.floor(availableNodes / 2) + 1;
  }

  async optimizeForFaultTolerance(activeNodes, minQuorum, faultScenarios) {
    const optimizedQuorum = {
      nodes: new Map(),
      totalWeight: 0,
      faultTolerance: {
        singleNodeFailures: 0,
        multipleNodeFailures: 0,
        networkPartitions: 0
      }
    };

    // Score nodes based on fault tolerance contribution
    const nodeScores = await this.scoreFaultToleranceContribution(
      activeNodes, faultScenarios
    );

    // Select nodes to maximize fault tolerance coverage
    const selectedNodes = this.selectFaultTolerantNodes(
      activeNodes, minQuorum, nodeScores, faultScenarios
    );

    for (const [nodeId, nodeData] of selectedNodes) {
      optimizedQuorum.nodes.set(nodeId, {
        weight: nodeData.weight,
        score: nodeData.score,
        role: nodeData.role,
        faultToleranceContribution: nodeData.faultToleranceContribution
      });
      optimizedQuorum.totalWeight += nodeData.weight;
    }

    // Calculate fault tolerance metrics for selected quorum
    optimizedQuorum.faultTolerance = await this.calculateFaultToleranceMetrics(
      selectedNodes, faultScenarios
    );

    return optimizedQuorum;
  }

  async scoreFaultToleranceContribution(activeNodes, faultScenarios) {
    const scores = new Map();

    for (const node of activeNodes) {
      let score = 0;

      // Independence score (nodes in different failure domains get higher scores)
      const independenceScore = await this.calculateIndependenceScore(node, activeNodes);
      score += independenceScore * 40;

      // Reliability score (historical uptime and performance)
      const reliabilityScore = await this.calculateReliabilityScore(node);
      score += reliabilityScore * 30;

      // Geographic diversity score
      const diversityScore = await this.calculateDiversityScore(node, activeNodes);
      score += diversityScore * 20;

      // Recovery capability score
      const recoveryScore = await this.calculateRecoveryScore(node);
      score += recoveryScore * 10;

      scores.set(node.id, score);
    }

    return scores;
  }

  selectFaultTolerantNodes(activeNodes, minQuorum, nodeScores, faultScenarios) {
    const selectedNodes = new Map();
    const remainingNodes = [...activeNodes];

    // Greedy selection to maximize fault tolerance coverage
    while (selectedNodes.size < minQuorum && remainingNodes.length > 0) {
      let bestNode = null;
      let bestScore = -1;
      let bestIndex = -1;

      for (let i = 0; i < remainingNodes.length; i++) {
        const node = remainingNodes[i];
        const additionalCoverage = this.calculateAdditionalFaultCoverage(
          node, selectedNodes, faultScenarios
        );

        const combinedScore = nodeScores.get(node.id) + (additionalCoverage * 50);

        if (combinedScore > bestScore) {
          bestScore = combinedScore;
          bestNode = node;
          bestIndex = i;
        }
      }

      if (bestNode) {
        selectedNodes.set(bestNode.id, {
          weight: this.calculateFaultToleranceWeight(bestNode, nodeScores.get(bestNode.id)),
          score: nodeScores.get(bestNode.id),
          role: selectedNodes.size === 0 ? 'primary' : 'secondary',
          faultToleranceContribution: this.calculateFaultToleranceContribution(bestNode)
        });

        remainingNodes.splice(bestIndex, 1);
      } else {
        break; // No more beneficial nodes
      }
    }

    return selectedNodes;
  }
}

MCP Integration Hooks

Quorum State Management

// Store quorum configuration and history
await this.mcpTools.memory_usage({
  action: 'store',
  key: `quorum_config_${this.nodeId}`,
  value: JSON.stringify({
    currentQuorum: Array.from(this.currentQuorum.entries()),
    strategy: this.activeStrategy,
    networkConditions: this.lastNetworkAnalysis,
    adjustmentHistory: this.quorumHistory.slice(-10)
  }),
  namespace: 'quorum_management',
  ttl: 3600000 // 1 hour
});

// Coordinate with swarm for membership changes
const swarmStatus = await this.mcpTools.swarm_status({
  swarmId: this.swarmId
});

await this.mcpTools.coordination_sync({
  swarmId: this.swarmId
});

Performance Monitoring Integration

// Track quorum adjustment performance
await this.mcpTools.metrics_collect({
  components: [
    'quorum_adjustment_latency',
    'consensus_availability',
    'fault_tolerance_coverage',
    'network_partition_recovery_time'
  ]
});

// Neural learning for quorum optimization
await this.mcpTools.neural_patterns({
  action: 'learn',
  operation: 'quorum_optimization',
  outcome: JSON.stringify({
    adjustmentType: adjustment.strategy,
    performanceImpact: measurementResults,
    networkConditions: currentNetworkState,
    faultToleranceImprovement: faultToleranceMetrics
  })
});

Task Orchestration for Quorum Changes

// Orchestrate complex quorum adjustments
await this.mcpTools.task_orchestrate({
  task: 'quorum_adjustment',
  strategy: 'sequential',
  priority: 'high',
  dependencies: [
    'network_analysis',
    'membership_validation',
    'performance_assessment'
  ]
});

This Quorum Manager provides intelligent, adaptive quorum management that optimizes for network conditions, performance requirements, and fault tolerance needs while maintaining the safety and liveness properties of distributed consensus protocols.

平台分布

Codex

35.28%
按下载量换算85

Claude

28.56%
按下载量换算69

Cursor

20.59%
按下载量换算50

Gemini CLI

9.24%
按下载量换算22

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills