export type OfficialModuleKind = "cmp" | "mp" | "tap" | "multiagent" | (string & {});
export type OfficialModuleRuntimeBoundary = "input" | "contract" | "governance" | "runtime-state" | "scope";
export type OfficialModuleRuntimeGate = {
    accepted: boolean;
    reason?: string;
};
export type OfficialModuleIdentity = {
    moduleId: string;
    moduleKind: OfficialModuleKind;
};
export type OfficialModuleRuntimeError = {
    code: string;
    message: string;
    boundary: OfficialModuleRuntimeBoundary;
    publicSafe: true;
    internalDetailExposed: false;
};
export type OfficialModuleRuntimeSurfaceRequest = {
    runtimeId?: string;
    moduleId?: string;
    moduleKind?: OfficialModuleKind;
    requestedCapabilities?: readonly string[];
    requestedEvents?: readonly string[];
    requestedScopes?: readonly string[];
    grantedRuntimeScopes?: readonly string[];
    inheritedRuntimePolicyId?: string;
    modulePolicyExtensions?: readonly string[];
    runtimeReady?: boolean;
    contract?: OfficialModuleRuntimeGate;
    governance?: OfficialModuleRuntimeGate;
};
export type OfficialModuleRuntimeBridgeAccess = {
    governance: "runtime.officialModuleSurface.officialModuleGovernancePort";
    events: "runtime.officialModuleSurface.officialModuleEventBus";
    state: "runtime.officialModuleSurface.officialModuleStateBridge";
    invocation: "runtime.invocationMethod";
};
export type OfficialModuleRuntimeSurface = {
    runtimeId: string;
    module: OfficialModuleIdentity;
    requestedCapabilities: readonly string[];
    requestedEvents: readonly string[];
    requestedScopes: readonly string[];
    grantedRuntimeScopes: readonly string[];
    policy: {
        inheritsRuntimePolicy: true;
        inheritedRuntimePolicyId: string;
        modulePolicyExtensions: readonly string[];
        canExtendPolicy: true;
        canBypassRuntimePolicy: false;
    };
    bridgeAccess: OfficialModuleRuntimeBridgeAccess;
    entrySurface: "runtime.officialModuleSurface";
    dispatch: "dry-run";
    unsafeSideEffects: false;
    hiddenResourceAccess: false;
    canRequestCapability: (capability: string) => boolean;
    canSubscribeEvent: (eventType: string) => boolean;
    canUseScope: (scope: string) => boolean;
};
export type OfficialModuleRuntimeSurfaceResult = {
    ok: true;
    surface: OfficialModuleRuntimeSurface;
    events: readonly string[];
} | {
    ok: false;
    error: OfficialModuleRuntimeError;
    events: readonly string[];
};
export declare function createOfficialModuleRuntimeError(code: string, message: string, boundary: OfficialModuleRuntimeBoundary): OfficialModuleRuntimeError;
export declare function createOfficialModuleRuntimeSurface(request?: OfficialModuleRuntimeSurfaceRequest): OfficialModuleRuntimeSurfaceResult;
