export type OfficialModuleKind = "CMP" | "MP" | "TAP" | "multiagent";
export type OfficialModuleCapabilityChannel = "read" | "invoke" | "subscribe";
export type OfficialModuleSurfaceBoundary = "input" | "contract" | "governance" | "runtime-state" | "scope";
export type OfficialModuleCapabilityContractErrorCode = "MISSING_RUNTIME_ID" | "MISSING_MODULE_ID" | "MISSING_MODULE_KIND" | "MISSING_CAPABILITY_ID" | "MISSING_CAPABILITY_CHANNEL" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "CAPABILITY_NOT_GRANTED";
export type OfficialModuleGate = {
    accepted: boolean;
    reason?: string;
};
export type OfficialModuleCapabilityGrant = {
    capabilityId: string;
    channels: readonly OfficialModuleCapabilityChannel[];
    description?: string;
};
export type OfficialModuleCapabilityUse = {
    capabilityId: string;
    channel: OfficialModuleCapabilityChannel;
    reason?: string;
};
export type OfficialModuleCapabilityContractRequest = {
    runtimeId?: string;
    moduleId?: string;
    moduleKind?: OfficialModuleKind;
    requestedCapabilities?: readonly OfficialModuleCapabilityUse[];
    allowedCapabilities?: readonly OfficialModuleCapabilityGrant[];
    runtimeReady?: boolean;
    contract?: OfficialModuleGate;
    governance?: OfficialModuleGate;
};
export type OfficialModuleCapabilityContract = {
    runtimeId: string;
    moduleId: string;
    moduleKind: OfficialModuleKind;
    grantedCapabilities: readonly OfficialModuleCapabilityUse[];
    allowedCapabilities: readonly OfficialModuleCapabilityGrant[];
    contractSurface: "runtime.officialModuleSurface";
    requiresRuntimeGovernance: true;
    moduleStrategyImplemented: false;
    unsafeSideEffects: false;
};
export type OfficialModuleCapabilityContractError = {
    code: OfficialModuleCapabilityContractErrorCode;
    message: string;
    boundary: OfficialModuleSurfaceBoundary;
    publicSafe: true;
    internalDetailExposed: false;
};
export type OfficialModuleCapabilityContractResult = {
    ok: true;
    contract: OfficialModuleCapabilityContract;
    events: readonly string[];
} | {
    ok: false;
    error: OfficialModuleCapabilityContractError;
    events: readonly string[];
};
export declare const DEFAULT_OFFICIAL_MODULE_CAPABILITY_GRANTS: Readonly<Record<OfficialModuleKind, readonly OfficialModuleCapabilityGrant[]>>;
export declare function defineOfficialModuleCapabilityContract(request?: OfficialModuleCapabilityContractRequest): OfficialModuleCapabilityContractResult;
