import type { AgentState } from "./state";
import type { AgentBrain } from "./brain";
export interface FsmCallbacks {
    onPhaseChange?: (phase: AgentState["currentPhase"], state: AgentState) => void;
    onThought?: (thought: string, state: AgentState) => void;
    onToolCall?: (toolName: string, params: Record<string, unknown>, state: AgentState) => void;
    onObservation?: (observation: string, success: boolean, state: AgentState) => void;
    onComplete?: (summary: string, state: AgentState) => void;
    onFailed?: (reason: string, state: AgentState) => void;
    onIteration?: (iteration: number, maxIterations: number, state: AgentState) => void;
}
/**
 * Agent FSM — The Cyclic Graph State Machine.
 *
 * This is the control loop that drives the agent through:
 *
 *   [INIT] → [PLANNING] → [EXECUTING] → [VALIDATING]
 *                                           │
 *                             ┌─────────────┤
 *                             │             │
 *                       [COMPLETE]    [HEALING]
 *                                       │
 *                                       └──→ [PLANNING] (re-plan)
 *                                       │
 *                                       └──→ [FAILED] (maxIterations)
 *
 * Each node is a pure function: (state) → state.
 * The FSM orchestrates transitions and enforces the iteration ceiling.
 */
export declare class AgentFSM {
    private brain;
    private callbacks;
    constructor(brain: AgentBrain, callbacks?: FsmCallbacks);
    /**
     * Run the full agent loop from init to completion/failure.
     */
    run(initialState: AgentState): Promise<AgentState>;
    private emit;
}
//# sourceMappingURL=fsm.d.ts.map