/**
 * ADR-PIPELINE-090: stderr-line → AgentEvent parser for the MCP wrapper.
 *
 * Extracted into its own module so unit tests can exercise the parsing
 * without importing src/mcp/mcp-server.ts (which attaches stdin/stdout
 * listeners at module load time — inappropriate for jest).
 *
 * The grammars recognized here are the actual log prefixes emitted by:
 *   - src/commands/agents.ts            (ruvector simulation retry + [local] fallbacks)
 *   - src/pipeline/swarm-orchestrator.ts ([AGENTICS] [OK|FAIL|FB|!!] ...)
 *   - src/pipeline/auto-chain.ts         (>> Phase N: ...)
 *   - src/pipeline/phase2-preflight.ts   (via swarm-orchestrator — [PREFLIGHT] ...)
 *   - ADR-089 verdict line               (Phase 1 verdict: ...)
 *
 * If you add a new log prefix at one of those sites, add a matching
 * parser branch here so the event reaches the Agent Invocation Report
 * instead of being silently dropped.
 */
export interface AgentEvent {
    phase: number;
    kind: 'sim-start' | 'sim-ok' | 'sim-fail' | 'sim-retry' | 'ok' | 'fail' | 'fallback' | 'preflight' | 'verdict' | 'phase-header';
    domain?: string;
    agent?: string;
    role?: string;
    timingMs?: number;
    reason?: string;
    raw: string;
}
/**
 * Try to parse a single stderr line into an AgentEvent. Returns null for
 * lines that aren't agent-relevant.
 *
 * `state.phase` is mutated when a phase header is seen, so subsequent
 * events get tagged with the current phase. Callers pass the same state
 * across calls for a single pipeline run.
 */
export declare function parseAgentEvent(line: string, state: {
    phase: number;
}): AgentEvent | null;
/**
 * One-line human-readable render of an AgentEvent for MCP progress
 * notifications. Kept deliberately short so Claude Code's notification
 * area doesn't truncate the useful part.
 */
export declare function formatAgentEventLive(ev: AgentEvent): string;
/**
 * End-of-run Agent Invocation Report. Grouped by phase; per-phase shows
 * ok/fail/fallback counts then a per-agent table. Always appended to the
 * tool response so the user has a written record regardless of whether
 * live progress notifications were rendered.
 */
export declare function formatAgentReport(events: readonly AgentEvent[], traceId?: string): string;
//# sourceMappingURL=agent-event-parser.d.ts.map