import type { AgentSubmitOptions } from '../contracts/agent-api.js';
export declare const EmbeddedTurnPhase: {
    readonly Idle: "idle";
    readonly Submitting: "submitting";
    readonly Running: "running";
    readonly Recovering: "recovering";
    readonly Refreshing: "refreshing";
    readonly Cancelling: "cancelling";
    readonly Disposed: "disposed";
};
export type EmbeddedTurnPhase = (typeof EmbeddedTurnPhase)[keyof typeof EmbeddedTurnPhase];
export interface EmbeddedTurnToken {
    readonly generation: number;
}
export declare const EmbeddedSubmitOverlapPolicy: {
    readonly Reject: "reject";
    readonly Steer: "steer";
};
export type EmbeddedSubmitOverlapPolicy = (typeof EmbeddedSubmitOverlapPolicy)[keyof typeof EmbeddedSubmitOverlapPolicy];
export declare class EmbeddedTurnLifecycle {
    private _generation;
    private _phase;
    get generation(): number;
    get phase(): EmbeddedTurnPhase;
    get isActive(): boolean;
    beginSubmit(): EmbeddedTurnToken;
    beginCancelling(): EmbeddedTurnToken;
    markRunning(token: EmbeddedTurnToken): void;
    markRecovering(): void;
    markRefreshing(token: EmbeddedTurnToken): void;
    finish(token: EmbeddedTurnToken): void;
    dispose(): void;
    isTurnActive(agentIsStreaming: boolean): boolean;
    isCurrent(token: EmbeddedTurnToken): boolean;
    snapshotShouldStayRunning(pendingContinuation: boolean): boolean;
    private _begin;
    private _transition;
}
export declare function getSubmitOverlapPolicy(submitOptions: AgentSubmitOptions | undefined): EmbeddedSubmitOverlapPolicy;
//# sourceMappingURL=turn-lifecycle.d.ts.map