import type { RuntimeContractBoundary, RuntimeContractCaller, RuntimeContractGate } from "./runtimePublicContract.js";
export type RuntimeStatePhase = "created" | "ready" | "invoking" | "streaming" | "paused" | "closed" | "failed";
export type RuntimeStateContractErrorCode = "MISSING_RUNTIME_ID" | "MISSING_STATE_PHASE" | "INVALID_STATE_PHASE" | "STALE_STATE_REVISION" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED";
export type RuntimeStateContractError = {
    code: RuntimeStateContractErrorCode;
    message: string;
    boundary: RuntimeContractBoundary;
    stateSafe: true;
};
export type RuntimeStateContractRequest = {
    runtimeId?: string;
    phase?: RuntimeStatePhase | string;
    revision?: number;
    expectedRevision?: number;
    observedBy?: RuntimeContractCaller;
    contract?: RuntimeContractGate;
    governance?: RuntimeContractGate;
};
export type RuntimeStateSnapshotContract = {
    runtimeId: string;
    phase: RuntimeStatePhase;
    revision: number;
    observedBy?: RuntimeContractCaller;
    visibility: "contract-surface";
    mutable: false;
    unsafeSideEffects: false;
};
export type RuntimeStateContractResult = {
    ok: true;
    state: RuntimeStateSnapshotContract;
    events: readonly string[];
} | {
    ok: false;
    error: RuntimeStateContractError;
    events: readonly string[];
};
export declare function defineRuntimeStateContract(request?: RuntimeStateContractRequest): RuntimeStateContractResult;
