import type { RuntimeContractError, RuntimeContractGate } from "./runtimeErrorContract.js";
export type RuntimeExtensionKind = "official-module" | "application-plugin" | "adapter" | "inspection-hook";
export type RuntimeExtensionMountSurface = "applicationSurface" | "officialModuleSurface" | "governancePlane" | "invocationMethod" | "inspection" | "debug";
export type RuntimeExtensionContractErrorCode = "MISSING_RUNTIME_ID" | "MISSING_CONTRACT_ID" | "MISSING_EXTENSION_ID" | "MISSING_MOUNT_SURFACE" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "EXTENSION_SCOPE_DENIED";
export type RuntimeExtensionContractRequest = {
    runtimeId: string;
    contractId: string;
    extensionId: string;
    kind?: RuntimeExtensionKind;
    mountSurface?: RuntimeExtensionMountSurface;
    allowedMountSurfaces?: readonly RuntimeExtensionMountSurface[];
    requiredCapabilities?: readonly string[];
    exposedEvents?: readonly string[];
    runtimeReady?: boolean;
    contract?: RuntimeContractGate;
    governance?: RuntimeContractGate;
};
export type RuntimeExtensionMountPlan = {
    extensionId: string;
    mountSurface: RuntimeExtensionMountSurface;
    dryRun: true;
    requiresGovernance: true;
};
export type RuntimeExtensionContract = {
    runtimeId: string;
    contractId: string;
    extensionId: string;
    kind: RuntimeExtensionKind;
    mountPlan: RuntimeExtensionMountPlan;
    requiredCapabilities: readonly string[];
    exposedEvents: readonly string[];
    contractSurface: "runtime.contractSurface";
    internalRuntimeStateExposed: false;
    unsafeSideEffects: false;
};
export type RuntimeExtensionContractResult = {
    ok: true;
    extension: RuntimeExtensionContract;
    events: readonly string[];
} | {
    ok: false;
    error: RuntimeContractError;
    events: readonly string[];
};
export declare function defineRuntimeExtensionContract(request: RuntimeExtensionContractRequest): RuntimeExtensionContractResult;
