import type { AgentRuntimeHandle, AgentRuntimeHandleOperation } from "./agentRuntimeHandle.js";
import type { AgentRuntimeSession } from "./agentRuntimeSessionFactory.js";
export type AgentRuntimeFactorySourceKind = "dsl" | "spec" | "class" | "manifest" | "configuration";
export type AgentRuntimeFactoryErrorCode = "MISSING_SOURCE" | "MISSING_RUNTIME_NAME" | "MISSING_APPLICATION_ID" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "ASSEMBLY_FAILED";
export type AgentRuntimeFactoryError = {
    code: AgentRuntimeFactoryErrorCode;
    message: string;
    boundary: "input" | "contract" | "governance" | "runtime-state";
};
export type AgentRuntimeFactoryGate = {
    accepted: boolean;
    reason?: string;
};
export type AgentRuntimeFactorySource = {
    kind: AgentRuntimeFactorySourceKind;
    name: string;
    version?: string;
};
export type AgentRuntimeFactorySessionSeed = {
    agentId: string;
    sessionKey?: string;
    initialContextKeys?: readonly string[];
};
export type AgentRuntimeFactoryRequest = {
    source?: AgentRuntimeFactorySource;
    applicationId: string;
    requestedSurfaces?: readonly string[];
    enabledHandleOperations?: readonly AgentRuntimeHandleOperation[];
    visibleEventTypes?: readonly string[];
    sessions?: readonly AgentRuntimeFactorySessionSeed[];
    contract?: AgentRuntimeFactoryGate;
    governance?: AgentRuntimeFactoryGate;
};
export type AgentRuntimeInstance = {
    runtimeId: string;
    sourceKind: AgentRuntimeFactorySourceKind;
    name: string;
    version?: string;
    readiness: "ready";
    applicationId: string;
    assembledSurfaces: readonly string[];
    sessions: readonly AgentRuntimeSession[];
    handle: AgentRuntimeHandle;
    unsafeSideEffects: false;
};
export type AgentRuntimeFactoryResult = {
    ok: true;
    runtime: AgentRuntimeInstance;
    events: readonly string[];
} | {
    ok: false;
    error: AgentRuntimeFactoryError;
    events: readonly string[];
};
export declare function createAgentRuntime(request: AgentRuntimeFactoryRequest): AgentRuntimeFactoryResult;
