UNPKG

claude-flow

Version:

Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration

27 lines 729 B
/** * MCP Request Tracker * Lightweight counter for tracking MCP tool invocations. * Used by system_metrics to report real request counts. */ let counts = { total: 0, success: 0, errors: 0, byTool: {}, startedAt: new Date().toISOString(), }; export function trackRequest(toolName, success) { counts.total++; if (success) counts.success++; else counts.errors++; counts.byTool[toolName] = (counts.byTool[toolName] || 0) + 1; } export function getRequestCounts() { return { ...counts }; } export function resetRequestCounts() { counts = { total: 0, success: 0, errors: 0, byTool: {}, startedAt: new Date().toISOString() }; } //# sourceMappingURL=request-tracker.js.map