export declare const runtimeCompositionRootSurface: "runtime.compositionRoot";
export type RuntimeCompositionRootBoundary = "input" | "contract" | "governance" | "runtime-state" | "composition" | "scope";
export type RuntimeCompositionRootCallerKind = "application" | "official-module" | "runtime-surface" | "inspection" | "debug" | "test";
export type RuntimeCompositionRootCaller = {
    kind: RuntimeCompositionRootCallerKind;
    id: string;
    moduleId?: string;
    sessionId?: string;
};
export type RuntimeCompositionRootGate = {
    accepted: boolean;
    reason?: string;
};
export type RuntimeCompositionSurfaceName = "runtime.applicationSurface" | "runtime.officialModuleSurface" | "runtime.contractSurface" | "runtime.governancePlane" | "runtime.invocationMethod" | "runtime.inspection" | "runtime.debug" | "runtime.execEngine" | "runtime.modelAdapter" | "runtime.interfaceAdapter" | (string & {});
export type RuntimeCompositionSurfaceInput = {
    surface?: RuntimeCompositionSurfaceName;
    bindingId?: string;
    ready?: boolean;
    capabilities?: readonly string[];
    metadata?: Readonly<Record<string, unknown>>;
};
export type RuntimeCompositionRootRequest = {
    runtimeId?: string;
    caller?: RuntimeCompositionRootCaller;
    surfaces?: readonly RuntimeCompositionSurfaceInput[];
    requiredSurfaces?: readonly RuntimeCompositionSurfaceName[];
    runtimeReady?: boolean;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    contract?: RuntimeCompositionRootGate;
    governance?: RuntimeCompositionRootGate;
};
export type RuntimeCompositionRootErrorCode = "MISSING_RUNTIME_ID" | "MISSING_CALLER" | "MISSING_CALLER_ID" | "MISSING_SURFACES" | "MISSING_SURFACE_NAME" | "MISSING_SURFACE_BINDING_ID" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SURFACE_NOT_READY" | "REQUIRED_SURFACE_MISSING" | "SCOPE_DENIED";
export type RuntimeCompositionRootError = {
    code: RuntimeCompositionRootErrorCode;
    message: string;
    boundary: RuntimeCompositionRootBoundary;
    publicSafe: true;
};
export type RuntimeCompositionSurfaceBinding = {
    surface: RuntimeCompositionSurfaceName;
    bindingId: string;
    ready: true;
    capabilities: readonly string[];
    metadata: Readonly<Record<string, unknown>>;
};
export type RuntimeCompositionRootSnapshot = {
    runtimeId: string;
    caller: RuntimeCompositionRootCaller;
    surface: typeof runtimeCompositionRootSurface;
    phase: "composed";
    surfaces: readonly RuntimeCompositionSurfaceBinding[];
    surfaceNames: readonly RuntimeCompositionSurfaceName[];
    bindingIds: readonly string[];
    requiredSurfaces: readonly RuntimeCompositionSurfaceName[];
    acceptedScopes: readonly string[];
    contractChecked: true;
    governanceChecked: true;
    dryRun: true;
    unsafeSideEffects: false;
};
export type RuntimeCompositionRootResult = {
    ok: true;
    composition: RuntimeCompositionRootSnapshot;
    events: readonly string[];
} | {
    ok: false;
    error: RuntimeCompositionRootError;
    events: readonly string[];
};
export declare function createRuntimeCompositionRoot(request?: RuntimeCompositionRootRequest): RuntimeCompositionRootResult;
