import type { UserContent } from "ai";
import type { ClientSession } from "#client/session.js";
import type { InputResponse } from "#runtime/input/types.js";
/**
 * Tracks local dev runtime-artifact revisions and starts a fresh session for
 * normal prompts after HMR, while preserving the current session for
 * input-response resumes.
 */
export interface DevelopmentRuntimeArtifactSessionRefresher {
    /**
     * Clears the remembered runtime-artifact revision.
     */
    clear(): void;
    /**
     * Returns the session that should dispatch the next turn.
     */
    refresh(input: {
        readonly createSession: () => ClientSession;
        readonly inputResponses?: readonly InputResponse[];
        readonly message?: string | UserContent;
        readonly onRuntimeArtifactsChanged?: (change: DevelopmentRuntimeArtifactChange) => void | Promise<void>;
        readonly session: ClientSession;
    }): Promise<ClientSession>;
    /**
     * Checks for a runtime-artifact revision change while the UI is idle.
     */
    refreshIdle(input: {
        readonly createSession: () => ClientSession;
        readonly onRuntimeArtifactsChanged?: (change: DevelopmentRuntimeArtifactChange) => void | Promise<void>;
        readonly session: ClientSession;
    }): Promise<ClientSession>;
}
export interface DevelopmentRuntimeArtifactChange {
    readonly previousRevision: string;
    readonly revision: string;
}
/**
 * Creates a revision-aware local dev session refresher.
 */
export declare function createDevelopmentRuntimeArtifactSessionRefresher(input: {
    readonly serverUrl: string;
}): DevelopmentRuntimeArtifactSessionRefresher;
