export type RuntimeAuthorityCallerKind = "application" | "official-module" | "sub-agent" | "operator" | "external-control" | "runtime-surface";
export type RuntimeAuthorityBoundary = "input" | "contract" | "governance" | "runtime-state";
export type RuntimeAuthorityErrorCode = "MISSING_RUNTIME_ID" | "MISSING_CALLER" | "MISSING_CALLER_ID" | "UNKNOWN_CALLER_KIND" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED";
export type RuntimeAuthorityGate = {
    accepted: boolean;
    reason?: string;
};
export type RuntimeAuthorityCaller = {
    kind: RuntimeAuthorityCallerKind;
    id: string;
    moduleId?: string;
    sessionId?: string;
};
export type RuntimeAuthorityResolverRequest = {
    runtimeId?: string;
    caller?: RuntimeAuthorityCaller;
    sessionId?: string;
    moduleSource?: string;
    grantedScopes?: readonly string[];
    policyScopes?: readonly string[];
    deniedScopes?: readonly string[];
    runtimeReady?: boolean;
    contract?: RuntimeAuthorityGate;
    governance?: RuntimeAuthorityGate;
};
export type RuntimeAuthorityContext = {
    runtimeId: string;
    caller: RuntimeAuthorityCaller;
    sessionId?: string;
    moduleSource?: string;
    scopes: readonly string[];
    policyScopes: readonly string[];
    deniedScopes: readonly string[];
    readonly: true;
    unsafeSideEffects: false;
};
export type RuntimeAuthorityError = {
    code: RuntimeAuthorityErrorCode;
    message: string;
    boundary: RuntimeAuthorityBoundary;
    publicSafe: true;
};
export type RuntimeAuthorityResolverResult = {
    ok: true;
    authority: RuntimeAuthorityContext;
    events: readonly string[];
} | {
    ok: false;
    error: RuntimeAuthorityError;
    events: readonly string[];
};
export declare function resolveRuntimeAuthority(request?: RuntimeAuthorityResolverRequest): RuntimeAuthorityResolverResult;
