import type { BehaviorEventSource, BehaviorExposureBoundary, BehaviorExposureCaller, BehaviorExposureGate, PublishedBehaviorEvent } from "./behaviorEventPublisher.js";
export type BehaviorObservationPortErrorCode = "MISSING_RUNTIME_ID" | "MISSING_SESSION_ID" | "MISSING_OBSERVER_ID" | "MISSING_CALLER" | "MISSING_OBSERVATION_INTEREST" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "OBSERVATION_SCOPE_DENIED" | "REAL_SUBSCRIPTION_BLOCKED";
export type BehaviorObservationPortRequest = {
    runtimeId?: string;
    sessionId?: string;
    observerId?: string;
    caller?: BehaviorExposureCaller;
    interestedEventKinds?: readonly string[];
    interestedSources?: readonly BehaviorEventSource[];
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    existingEvents?: readonly PublishedBehaviorEvent[];
    runtimeReady?: boolean;
    subscribe?: boolean;
    contract?: BehaviorExposureGate;
    governance?: BehaviorExposureGate;
    openedAt?: string;
    metadata?: Readonly<Record<string, unknown>>;
};
export type BehaviorObservationPortError = {
    code: BehaviorObservationPortErrorCode;
    message: string;
    boundary: BehaviorExposureBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type BehaviorObservationPort = {
    surface: "runtime.behaviorExposure";
    type: "behavior.observation.port";
    runtimeId: string;
    sessionId: string;
    observerId: string;
    caller: BehaviorExposureCaller;
    interestedEventKinds: readonly string[];
    interestedSources: readonly BehaviorEventSource[];
    acceptedScopes: readonly string[];
    matchedEventIds: readonly string[];
    openedAt: string;
    mode: "dry-run";
    liveSubscriptionStarted: false;
    unsafeSideEffects: false;
    route: "agent_runtimeImplementation.runtime.behaviorExposure.behaviorObservationPort";
    metadata: Readonly<Record<string, unknown>>;
};
export type BehaviorObservationPortResult = {
    ok: true;
    port: BehaviorObservationPort;
    events: readonly string[];
} | {
    ok: false;
    error: BehaviorObservationPortError;
    events: readonly string[];
};
export declare const behaviorObservationPortDescriptor: {
    readonly surface: "runtime.behaviorExposure";
    readonly capability: "behaviorObservationPort";
    readonly purpose: "open a governed behavior observation port without starting a live subscription";
    readonly mode: "dry-run";
    readonly unsafeSideEffects: false;
};
export declare function openBehaviorObservationPort(request?: BehaviorObservationPortRequest): BehaviorObservationPortResult;
