export type ApplicationRuntimeEvent = {
    type: string;
    runtimeId: string;
    applicationId: string;
    sessionId?: string;
    payload?: unknown;
};
export type ApplicationEventSubscriptionErrorCode = "MISSING_RUNTIME_ID" | "MISSING_APPLICATION_ID" | "MISSING_EVENT_TYPES" | "EVENT_SCOPE_DENIED" | "GOVERNANCE_REJECTED";
export type ApplicationEventSubscriptionError = {
    code: ApplicationEventSubscriptionErrorCode;
    message: string;
    boundary: "input" | "governance" | "scope";
};
export type ApplicationEventSubscriptionGate = {
    accepted: boolean;
    reason?: string;
};
export type ApplicationEventSubscriptionRequest = {
    runtimeId: string;
    applicationId: string;
    sessionId?: string;
    eventTypes: readonly string[];
    allowedEventTypes?: readonly string[];
    governance?: ApplicationEventSubscriptionGate;
};
export type ApplicationEventSubscription = {
    subscriptionId: string;
    runtimeId: string;
    applicationId: string;
    sessionId?: string;
    eventTypes: readonly string[];
    governanceState: "accepted";
    accepts: (event: ApplicationRuntimeEvent) => boolean;
};
export type ApplicationEventSubscriptionResult = {
    ok: true;
    subscription: ApplicationEventSubscription;
    events: readonly string[];
} | {
    ok: false;
    error: ApplicationEventSubscriptionError;
    events: readonly string[];
};
export declare function subscribeToApplicationEvents(request: ApplicationEventSubscriptionRequest): ApplicationEventSubscriptionResult;
