/**
 * Supervisor LangGraph workflow.
 *
 * Implements {@link ISupervisorAgent} as a graph with the nodes
 *
 *   ingest-event → evaluate → emit-decision
 *
 * Each node is a small pure function over the graph state; the graph is
 * compiled with an optional checkpointer so the same workflow can be
 * resumed across worker restarts (matches feature-agent worker shape).
 *
 * The evaluate node calls the supplied {@link IAgentExecutor} (resolved
 * by the worker through {@link IAgentExecutorProvider} — never imports a
 * provider SDK directly) with the prompt produced by
 * {@link buildEvaluatorPrompt}. The call is wrapped in a hard
 * {@link SUPERVISOR_EVALUATOR_SOFT_TIMEOUT_MS} timeout: on timeout the
 * graph short-circuits to a deterministic
 * {@link SUPERVISOR_TIMEOUT_DECISION} so the human path proceeds
 * (FR-22 fail-safe).
 *
 * Persistence + activity-log mirroring are NOT done here — the use case
 * layer owns those side effects.
 */
import { type BaseCheckpointSaver } from '@langchain/langgraph';
import type { IAgentExecutor } from '../../../../application/ports/output/agents/agent-executor.interface.js';
import type { IAgentPromptResolver } from '../../../../application/ports/output/agents/agent-prompt-resolver.interface.js';
import type { ISupervisorAgent, SupervisorDecisionResult, SupervisorEvaluateInput } from '../../../../application/ports/output/agents/supervisor-agent.interface.js';
export interface SupervisorGraphDeps {
    executor: IAgentExecutor;
    /**
     * Optional prompt resolver — when present, the evaluator system header is
     * resolved through it so user-saved overrides of the
     * `supervisor-agent/evaluator.system` slot take effect (FR-36). When
     * absent (e.g. in unit tests), the bundled
     * {@link SUPERVISOR_EVALUATOR_SYSTEM_HEADER} is used.
     */
    promptResolver?: IAgentPromptResolver;
    /** Override the soft timeout for the evaluator call (used by tests). */
    evaluatorTimeoutMs?: number;
    /** Fallback model id when the policy doesn't pin one. */
    defaultModelId?: string;
}
/**
 * Race a Promise against a timeout. Resolves with the original Promise's
 * value on success, rejects with a {@link SupervisorEvaluatorTimeoutError}
 * after `timeoutMs`.
 */
declare class SupervisorEvaluatorTimeoutError extends Error {
    readonly timeoutMs: number;
    constructor(timeoutMs: number);
}
/**
 * Compile the supervisor graph. The compiled graph satisfies
 * {@link ISupervisorAgent} via {@link createSupervisorAgent} below.
 */
export declare function createSupervisorGraph(deps: SupervisorGraphDeps, checkpointer?: BaseCheckpointSaver): import("@langchain/langgraph").CompiledStateGraph<{
    input: SupervisorEvaluateInput;
    prompt: string | undefined;
    decision: SupervisorDecisionResult | undefined;
}, {
    input?: SupervisorEvaluateInput | undefined;
    prompt?: string | undefined;
    decision?: SupervisorDecisionResult | undefined;
}, "__start__" | "ingest-event" | "evaluate" | "emit-decision", {
    input: import("@langchain/langgraph").LastValue<SupervisorEvaluateInput>;
    prompt: import("@langchain/langgraph").BinaryOperatorAggregate<string | undefined, string | undefined>;
    decision: import("@langchain/langgraph").BinaryOperatorAggregate<SupervisorDecisionResult | undefined, SupervisorDecisionResult | undefined>;
}, {
    input: import("@langchain/langgraph").LastValue<SupervisorEvaluateInput>;
    prompt: import("@langchain/langgraph").BinaryOperatorAggregate<string | undefined, string | undefined>;
    decision: import("@langchain/langgraph").BinaryOperatorAggregate<SupervisorDecisionResult | undefined, SupervisorDecisionResult | undefined>;
}, import("@langchain/langgraph").StateDefinition, {
    "ingest-event": Partial<import("@langchain/langgraph").StateType<{
        input: import("@langchain/langgraph").LastValue<SupervisorEvaluateInput>;
        prompt: import("@langchain/langgraph").BinaryOperatorAggregate<string | undefined, string | undefined>;
        decision: import("@langchain/langgraph").BinaryOperatorAggregate<SupervisorDecisionResult | undefined, SupervisorDecisionResult | undefined>;
    }>>;
    evaluate: Partial<import("@langchain/langgraph").StateType<{
        input: import("@langchain/langgraph").LastValue<SupervisorEvaluateInput>;
        prompt: import("@langchain/langgraph").BinaryOperatorAggregate<string | undefined, string | undefined>;
        decision: import("@langchain/langgraph").BinaryOperatorAggregate<SupervisorDecisionResult | undefined, SupervisorDecisionResult | undefined>;
    }>>;
    "emit-decision": Partial<import("@langchain/langgraph").StateType<{
        input: import("@langchain/langgraph").LastValue<SupervisorEvaluateInput>;
        prompt: import("@langchain/langgraph").BinaryOperatorAggregate<string | undefined, string | undefined>;
        decision: import("@langchain/langgraph").BinaryOperatorAggregate<SupervisorDecisionResult | undefined, SupervisorDecisionResult | undefined>;
    }>>;
}, unknown, unknown>;
/**
 * Build an {@link ISupervisorAgent} backed by the compiled supervisor
 * graph. The use-case layer depends on this port; the worker process
 * resolves the executor and invokes this factory.
 */
export declare function createSupervisorAgent(deps: SupervisorGraphDeps, checkpointer?: BaseCheckpointSaver): ISupervisorAgent;
export { SupervisorEvaluatorTimeoutError };
//# sourceMappingURL=supervisor-graph.d.ts.map