/**
 * Agents Command
 *
 * Routes CLI invocations to 27 downstream agent Cloud Functions.
 * Uses the existing adapter layer (createAdapter + invoke_agent).
 *
 * Usage:
 *   agentics agents list
 *   agentics agents health <domain>
 *   agentics agents invoke <domain> <agent> [json-payload]
 */
import type { ServiceName } from '../adapters/base-adapter.js';
import type { CommandOptions } from '../types/index.js';
import { type Phase1VerdictResult } from '../pipeline/phase1-verdict.js';
interface AgentDomain {
    serviceName: ServiceName;
    agents: string[];
    phase: string;
}
export declare const AGENT_DOMAINS: Record<string, AgentDomain>;
/**
 * ADR-PIPELINE-087 §1 + 2.5.2 hotfix: domains that resolve through
 * AGENT_NAME_TO_DOMAIN but are NOT wired for direct cloud-function dispatch.
 *
 * Why: ADR-PIPELINE-080..086 added 14 AQE agents to the validation capability
 * as mandatory_agents. With 2.5.1 we registered AGENT_DOMAINS['quality-engineering']
 * and an adapter pointing at a guessed URL. Result: every ask call spawned 14
 * network attempts to a non-existent endpoint, each waiting out the per-call
 * timeout before the outer catch caught it. Stacked serially in
 * Promise.allSettled the delays were tolerable, but Claude Code's MCP client
 * tool-call budget is shorter than the pipeline wall time, so clients saw
 * "Tool result missing due to internal error."
 *
 * Resolution-only policy (2.5.2):
 *   - `quality-engineering` (AQE): no cloud handler deployed at a URL the CLI
 *     knows. Dispatch short-circuits with a clear 503 and zero network cost.
 *   - `diligence-artifacts`: SPARC/ADR/DDD/Context Map work is driven by the
 *     auto-chain phase coordinators (phase2/phase3/phase4), NOT by the graph-
 *     routed direct-dispatch path. Skip the adapter.
 *
 * Net effect: the ADR-087 goal is preserved (no silent drops — classifier
 * selections resolve and are observable in `routing.unresolved === []`) while
 * the pipeline finishes inside Claude Code's tool-call window again.
 *
 * Landing 2 removes entries here as real handlers come online.
 */
export declare const RESOLUTION_ONLY_DOMAINS: ReadonlySet<string>;
export declare function isResolutionOnlyDomain(domain: string): boolean;
export interface AgentsListResult {
    domains: {
        name: string;
        serviceName: string;
        agents: string[];
        agentCount: number;
        phase: string;
    }[];
    totalDomains: number;
    totalAgents: number;
    timing: number;
}
export interface AgentsHealthResult {
    domain: string;
    serviceName: string;
    healthy: boolean;
    response: unknown;
    timing: number;
}
export interface AgentsInvokeResult {
    domain: string;
    agent: string;
    status: number;
    response: unknown;
    timing: number;
}
export declare function executeAgentsListCommand(_options: CommandOptions): Promise<AgentsListResult>;
export declare function executeAgentsHealthCommand(domain: string, options: CommandOptions): Promise<AgentsHealthResult>;
export declare function executeAgentsInvokeCommand(domain: string, agent: string, payload: unknown, options: CommandOptions): Promise<AgentsInvokeResult>;
export declare function formatAgentsListForDisplay(result: AgentsListResult): string;
export declare function formatAgentResultForDisplay(result: AgentsInvokeResult): string;
export interface IntentClassification {
    domain: string;
    agent: string;
    confidence: number;
    suggested_payload: Record<string, unknown>;
    reasoning?: string;
    alternatives?: Array<{
        domain: string;
        agent: string;
        confidence: number;
    }>;
}
export interface NaturalLanguageRouteResult {
    intent: IntentClassification;
    invocation: AgentsInvokeResult;
    timing: number;
}
/**
 * ADR-PIPELINE-087 §4: classifier-selected agents whose display name did not
 * resolve to a domain/agent pair. Surfaced in the JSON envelope so MCP clients
 * and field operators can see routing-layer drops.
 */
export interface UnresolvedRoutingAgent {
    stage: string;
    agentName: string;
    capability: string;
}
export interface MultiAgentRouteResult {
    query: string;
    intents: IntentClassification[];
    invocations: Array<{
        intent: IntentClassification;
        result: AgentsInvokeResult | {
            error: string;
        };
    }>;
    /**
     * Agents the capability-graph classifier selected but whose display name
     * was not found in AGENT_NAME_TO_DOMAIN. Empty in the healthy case.
     * ADR-PIPELINE-087 §4.
     */
    routing?: {
        unresolved: UnresolvedRoutingAgent[];
    };
    /**
     * ADR-PIPELINE-089 §2: Phase 1 Health Gate classification. Present on every
     * multi-agent result. The `ask` command uses this to gate auto-chain and to
     * surface a one-line verdict banner to the user.
     */
    phase1Verdict?: Phase1VerdictResult;
    timing: number;
}
export type RouteResult = {
    kind: 'single';
    result: NaturalLanguageRouteResult;
} | {
    kind: 'multi';
    result: MultiAgentRouteResult;
};
/**
 * Build a dispatch payload adapted to each agent domain's required schema.
 * Downstream agents expect different field names (e.g. copilot wants "objective",
 * simulator wants "scenario_id" + "parameters"). This function maps the user's
 * natural-language query into the correct shape.
 */
export declare function buildDomainPayload(domain: string, agent: string, query: string, correlationId: string): Record<string, unknown>;
export declare function executeNaturalLanguageRoute(query: string, options: CommandOptions): Promise<RouteResult>;
export declare function formatNaturalLanguageRouteForDisplay(result: NaturalLanguageRouteResult): string;
export declare function formatMultiAgentRouteForDisplay(result: MultiAgentRouteResult): string;
export declare function formatRouteResultForDisplay(routeResult: RouteResult): string;
export declare function routeResultToJson(routeResult: RouteResult, query: string): unknown;
export {};
//# sourceMappingURL=agents.d.ts.map