import type { JsonObject } from '../internal/utils.js';
import type { NimiError, VersionCompatibilityStatus } from '../types/index.js';
import { RoutePolicy } from './generated/runtime/v1/ai.js';
import type { RuntimeMetadata, RuntimeOptions } from './types.js';
export declare function checkRuntimeVersionCompatibility(input: {
    version: string;
    versionChecked: boolean;
    sdkRuntimeMajor: number;
    emitTelemetry: (name: string, data?: JsonObject) => void;
    emitError: (error: NimiError) => void;
    setStatus?: (status: VersionCompatibilityStatus) => void;
}): VersionCompatibilityStatus;
export declare function assertRuntimeMethodAvailable(input: {
    moduleKey: string;
    methodKey: string;
    runtimeVersion: string | null;
    sdkRuntimeMajor: number;
    phase2ModuleKeys: ReadonlySet<string>;
    phase2AuditMethodIds: ReadonlySet<string>;
    auditMethodIds: Record<string, string>;
}): void;
export declare function wrapModeDStream<T>(input: {
    source: AsyncIterable<T>;
    onCancelled: () => void;
}): AsyncIterable<T>;
export declare function resolveRuntimeSubjectUserId(input: {
    explicit?: string;
    subjectContext?: RuntimeOptions['subjectContext'];
}): Promise<string>;
export declare function resolveOptionalRuntimeSubjectUserId(input: {
    explicit?: string;
    subjectContext?: RuntimeOptions['subjectContext'];
}): Promise<string | undefined>;
type RuntimeAiRequestLike = {
    routePolicy?: RoutePolicy;
    connectorId?: string;
    head?: {
        routePolicy?: RoutePolicy;
        connectorId?: string;
    };
};
type RuntimeAiMetadataLike = Pick<RuntimeMetadata, 'keySource' | 'providerType' | 'providerEndpoint' | 'providerApiKey'> | JsonObject | undefined;
export declare function runtimeAiRequestRequiresSubject(input: {
    request: RuntimeAiRequestLike;
    metadata?: RuntimeAiMetadataLike;
}): boolean;
export {};
//# sourceMappingURL=runtime-guards.d.ts.map