export declare const runtimeManifestSurface: "runtime.manifest";
export type RuntimeManifestBoundary = "input" | "contract" | "governance" | "runtime-state" | "manifest" | "scope";
export type RuntimeManifestCallerKind = "application" | "official-module" | "runtime-surface" | "management" | "inspection" | "debug" | "test";
export type RuntimeManifestSurfaceKind = "application-surface" | "official-module-surface" | "contract-surface" | "governance-plane" | "invocation-method" | "inspection-surface" | "debug-surface" | "runtime-quality-surface" | "runtime-binding" | "runtime-extension" | (string & {});
export type RuntimeManifestErrorCode = "MISSING_RUNTIME_ID" | "MISSING_CALLER" | "MISSING_CALLER_ID" | "MISSING_SURFACES" | "MISSING_SURFACE_ID" | "MISSING_SURFACE_KIND" | "DUPLICATE_SURFACE_ID" | "REQUIRED_SURFACE_MISSING" | "SURFACE_NOT_READY" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "MODULE_NOT_MOUNTED" | "CAPABILITY_SURFACE_MISSING";
export type RuntimeManifestGate = {
    accepted: boolean;
    reason?: string;
};
export type RuntimeManifestCaller = {
    kind: RuntimeManifestCallerKind;
    id: string;
    moduleId?: string;
    sessionId?: string;
};
export type RuntimeManifestSurfaceDescriptor = {
    surfaceId?: string;
    kind?: RuntimeManifestSurfaceKind;
    ready?: boolean;
    mounted?: boolean;
    required?: boolean;
    contractId?: string;
    capabilities?: readonly string[];
    scopes?: readonly string[];
    exposesTo?: readonly RuntimeManifestCallerKind[];
    metadata?: Readonly<Record<string, unknown>>;
};
export type RuntimeManifestModuleDescriptor = {
    moduleId?: string;
    kind?: "CMP" | "MP" | "TAP" | "multiagent" | (string & {});
    surfaceId?: string;
    mounted?: boolean;
    ready?: boolean;
    contractId?: string;
};
export type RuntimeManifestCapabilityDescriptor = {
    capabilityId?: string;
    surfaceId?: string;
    contractId?: string;
    scopes?: readonly string[];
    ready?: boolean;
};
export type RuntimeManifestRequest = {
    runtimeId?: string;
    caller?: RuntimeManifestCaller;
    runtimeReady?: boolean;
    manifestVersion?: string;
    generatedAt?: string;
    requiredSurfaceIds?: readonly string[];
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    surfaces?: readonly RuntimeManifestSurfaceDescriptor[];
    modules?: readonly RuntimeManifestModuleDescriptor[];
    capabilities?: readonly RuntimeManifestCapabilityDescriptor[];
    eventTopics?: readonly string[];
    contract?: RuntimeManifestGate;
    governance?: RuntimeManifestGate;
};
export type RuntimeManifestError = {
    code: RuntimeManifestErrorCode;
    message: string;
    boundary: RuntimeManifestBoundary;
    safeForApplication: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type RuntimeManifestSurfaceEntry = {
    surfaceId: string;
    kind: RuntimeManifestSurfaceKind;
    ready: boolean;
    mounted: boolean;
    required: boolean;
    contractId?: string;
    capabilities: readonly string[];
    scopes: readonly string[];
    exposesTo: readonly RuntimeManifestCallerKind[];
};
export type RuntimeManifestModuleEntry = {
    moduleId: string;
    kind?: string;
    surfaceId?: string;
    mounted: boolean;
    ready: boolean;
    contractId?: string;
};
export type RuntimeManifestCapabilityEntry = {
    capabilityId: string;
    surfaceId: string;
    contractId?: string;
    scopes: readonly string[];
    ready: boolean;
};
export type RuntimeManifestBlockingIssue = {
    code: Extract<RuntimeManifestErrorCode, "SURFACE_NOT_READY" | "MODULE_NOT_MOUNTED" | "CAPABILITY_SURFACE_MISSING">;
    targetId: string;
    boundary: Extract<RuntimeManifestBoundary, "runtime-state" | "manifest">;
    message: string;
};
export type RuntimeManifestSnapshot = {
    runtimeId: string;
    caller: RuntimeManifestCaller;
    manifestSurface: typeof runtimeManifestSurface;
    manifestVersion: string;
    generatedAt: string;
    ready: boolean;
    surfaces: readonly RuntimeManifestSurfaceEntry[];
    surfaceIds: readonly string[];
    requiredSurfaceIds: readonly string[];
    modules: readonly RuntimeManifestModuleEntry[];
    capabilities: readonly RuntimeManifestCapabilityEntry[];
    eventTopics: readonly string[];
    acceptedScopes: readonly string[];
    blockingIssues: readonly RuntimeManifestBlockingIssue[];
    contractChecked: true;
    governanceChecked: true;
    dryRun: true;
    unsafeSideEffects: false;
    schemaFrozen: false;
};
export type RuntimeManifestResult = {
    ok: true;
    manifest: RuntimeManifestSnapshot;
    events: readonly string[];
} | {
    ok: false;
    error: RuntimeManifestError;
    events: readonly string[];
};
export declare const runtimeManifestDescriptor: {
    readonly surface: "runtime.manifest";
    readonly capability: "runtimeManifest";
    readonly purpose: "publish a readonly runtime manifest for applications, official modules, governance, and inspection surfaces";
    readonly unsafeSideEffects: false;
    readonly schemaFrozen: false;
};
export declare function buildRuntimeManifest(request?: RuntimeManifestRequest): RuntimeManifestResult;
