/** * Capacity tracking and load balancing for the Agent dimension. * * Tracks per-agent capacity (0.0-1.0) and provides queries for * capacity-aware work distribution. * * @module agents/capacity */ import { type AgentInstanceRow, type AgentType } from '../store/schema/agent-schema.js'; /** * Update the capacity value for an agent instance. * * @param id - Agent instance ID * @param capacity - New capacity value (0.0 to 1.0) * @param cwd - Working directory * @returns Updated agent row, or null if not found */ export declare function updateCapacity(id: string, capacity: number, cwd?: string): Promise; /** * Get the total available capacity across all active agents. * * Only considers agents in 'active' or 'idle' status. * Returns the sum of all capacity values. */ export declare function getAvailableCapacity(cwd?: string): Promise; /** * Find the agent with the most available capacity. * * @param agentType - Optional type filter * @param cwd - Working directory * @returns Agent with highest capacity, or null if no active agents */ export declare function findLeastLoadedAgent(agentType?: AgentType, cwd?: string): Promise; /** * Check if the system is overloaded (total capacity below threshold). * * @param threshold - Minimum acceptable capacity (default: 0.1) * @param cwd - Working directory * @returns true if total available capacity is below the threshold */ export declare function isOverloaded(threshold?: number, cwd?: string): Promise; /** Capacity summary for reporting. */ export interface CapacitySummary { totalCapacity: number; activeAgentCount: number; averageCapacity: number; overloaded: boolean; threshold: number; } /** * Get a capacity summary across the entire agent pool. * * @param threshold - Overload threshold (default: 0.1) * @param cwd - Working directory */ export declare function getCapacitySummary(threshold?: number, cwd?: string): Promise; //# sourceMappingURL=capacity.d.ts.map