/**
 * Graph Router (ADR-030)
 *
 * Resolves classified capabilities into a stage-sequenced agent pipeline.
 * This is the core routing engine that replaces full-fleet dispatch with
 * targeted agent selection.
 *
 * Decision flow:
 *   1. Receive classified capabilities
 *   2. Resolve transitive dependencies
 *   3. Look up agents and repos from the graph
 *   4. Sequence agents by execution stage
 *   5. Enforce agent budget constraints
 *   6. Return a minimal, ordered pipeline
 */
import type { EcosystemGraph, StageName } from './graph-loader.js';
import type { ClassificationResult } from './capability-classifier.js';
import type { CompositionResult } from './composition-engine.js';
export interface RoutedAgent {
    /** Agent display name from the graph. */
    readonly agentName: string;
    /** Capability that selected this agent. */
    readonly capability: string;
    /** Repository that implements this agent. */
    readonly repo: string;
    /** Execution stage this agent belongs to. */
    readonly stage: StageName;
    /** Agent weight from the graph (ADR-031 Phase 1). */
    readonly weight: number;
    /** Agent role classification (ADR-031 Phase 1). */
    readonly role: string;
}
export interface StageGroup {
    /** Stage name. */
    readonly stage: StageName;
    /** Agents to execute in this stage. */
    readonly agents: readonly RoutedAgent[];
}
export interface RoutingResult {
    /** Original classification that produced this routing. */
    readonly classification: ClassificationResult;
    /** Capabilities after dependency resolution. */
    readonly resolvedCapabilities: readonly string[];
    /** Agent pipeline ordered by stage. Only non-empty stages are included. */
    readonly pipeline: readonly StageGroup[];
    /** Total number of agents selected. */
    readonly totalAgents: number;
    /** Total number of repositories involved. */
    readonly totalRepos: number;
    /** Unique repository names. */
    readonly repos: readonly string[];
    /** Whether the agent budget was exceeded and pruning was applied. */
    readonly pruned: boolean;
    /** Human-readable routing explanation. */
    readonly explanation: string;
    /** Composition rules that fired (ADR-031 Phase 3). */
    readonly compositionResult?: CompositionResult;
}
export interface AgentBudget {
    /** Max agents for a single capability match. Default: 5. */
    readonly singleCapability: number;
    /** Max agents for 2-3 capability matches. Default: 8. */
    readonly multiCapability: number;
    /** Max agents for 4+ capability matches. Default: 12. */
    readonly fullPipeline: number;
    /** Absolute maximum agents regardless of capabilities. Default: 15. */
    readonly hardCeiling: number;
}
/**
 * Route classified capabilities through the ecosystem graph to produce
 * a stage-sequenced agent pipeline.
 *
 * @param classification - Output from classifyCapabilities()
 * @param graph - Loaded ecosystem graph
 * @param budget - Optional agent budget overrides
 * @returns Ordered pipeline of agents grouped by stage
 */
export declare function routeCapabilities(classification: ClassificationResult, graph: EcosystemGraph, budget?: Partial<AgentBudget>): RoutingResult;
/**
 * Map from graph agent names (e.g., "ERP Integration Agent") to the
 * domain/agent identifiers used by the existing invocation system
 * (e.g., { domain: "connector-hub", agent: "erp-surface" }).
 *
 * This mapping bridges the capability graph's human-readable agent names
 * to the AGENT_DOMAINS registry in commands/agents.ts.
 */
export interface DomainAgentRef {
    readonly domain: string;
    readonly agent: string;
}
/**
 * Resolve a graph agent name to its domain/agent invocation reference.
 * Returns undefined for unknown agents.
 */
export declare function resolveAgentRef(agentName: string): DomainAgentRef | undefined;
/**
 * Convert a routing result into a flat list of domain/agent pairs
 * ready for dispatch via the existing executeAgentsInvokeCommand.
 *
 * Agents that cannot be mapped are logged and skipped.
 */
export declare function toDomainAgentList(result: RoutingResult): DomainAgentRef[];
//# sourceMappingURL=graph-router.d.ts.map