export type AgentExecutionStatePhase = "idle" | "running" | "waiting" | "replying" | "completed" | "interrupted" | "failed";
export type AgentExecutionStateTransition = "start" | "wait" | "reply" | "complete" | "interrupt" | "fail" | "reset";
export type AgentExecutionStateBoundary = "input" | "state-machine" | "contract" | "governance";
export type AgentExecutionStateGate = {
    accepted: boolean;
    reason?: string;
};
export type AgentExecutionStateTrace = {
    correlationId?: string;
    callerId?: string;
};
export type AgentExecutionStateSnapshot = {
    sessionId: string;
    phase: AgentExecutionStatePhase;
    revision: number;
    reason?: string;
    trace: AgentExecutionStateTrace;
    mutable: false;
    unsafeSideEffects: false;
};
export type AgentExecutionStateRequest = {
    sessionId?: string;
    current?: AgentExecutionStateSnapshot;
    transition?: AgentExecutionStateTransition | string;
    reason?: string;
    trace?: AgentExecutionStateTrace;
    contract?: AgentExecutionStateGate;
    governance?: AgentExecutionStateGate;
};
export type AgentExecutionStateErrorCode = "MISSING_SESSION_ID" | "SESSION_MISMATCH" | "MISSING_TRANSITION" | "INVALID_TRANSITION" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED";
export type AgentExecutionStateError = {
    code: AgentExecutionStateErrorCode;
    message: string;
    boundary: AgentExecutionStateBoundary;
    stateSafe: true;
};
export type AgentExecutionStateResult = {
    ok: true;
    state: AgentExecutionStateSnapshot;
    previousPhase: AgentExecutionStatePhase;
    transition: AgentExecutionStateTransition;
    events: readonly string[];
} | {
    ok: false;
    error: AgentExecutionStateError;
    events: readonly string[];
};
export declare function advanceAgentExecutionState(request?: AgentExecutionStateRequest): AgentExecutionStateResult;
