import { Struct } from './generated/google/protobuf/struct.js';
import type { ScopedRuntimeBindingAttachment } from './generated/runtime/v1/common.js';
import type { RuntimeCallOptions, RuntimeStreamCallOptions } from './types.js';
import type { RuntimeAgentAnchorsModule, RuntimeAgentModule, RuntimeAgentTurnsModule } from './types-runtime-agent.js';
import type { RuntimeAgentClient } from './types-client-interfaces.js';
import type { SendAppMessageResponse } from './generated/runtime/v1/app.js';
type RuntimeAgentAppClient = {
    sendMessage(request: {
        fromAppId: string;
        toAppId: string;
        subjectUserId?: string;
        scopedBinding?: ScopedRuntimeBindingAttachment;
        messageType: string;
        payload?: Struct;
        requireAck?: boolean;
    }, options?: RuntimeCallOptions): Promise<SendAppMessageResponse>;
    subscribeMessages(request: {
        appId: string;
        subjectUserId?: string;
        scopedBinding?: ScopedRuntimeBindingAttachment;
        cursor?: string;
        fromAppIds?: string[];
    }, options?: RuntimeStreamCallOptions): Promise<AsyncIterable<{
        fromAppId?: string;
        toAppId?: string;
        messageType?: string;
        payload?: Struct;
    }>>;
};
type ProtectedScopeHelper = {
    getCallOptions(scopes: readonly string[], baseOptions?: RuntimeCallOptions): Promise<RuntimeCallOptions>;
    withScopes<T>(scopes: readonly string[], operation: (options: RuntimeCallOptions) => Promise<T>, baseOptions?: RuntimeCallOptions): Promise<T>;
};
export declare function createRuntimeAgentAnchorsModule(input: {
    appId: string;
    agent: RuntimeAgentClient;
    protectedAccess: ProtectedScopeHelper;
    resolveSubjectUserId: (explicit?: string) => Promise<string>;
}): RuntimeAgentAnchorsModule;
export declare function createRuntimeAgentTurnsModule(input: {
    appId: string;
    agent: RuntimeAgentClient;
    app: RuntimeAgentAppClient;
    protectedAccess: ProtectedScopeHelper;
    resolveSubjectUserId: (explicit?: string) => Promise<string>;
}): RuntimeAgentTurnsModule;
export declare function attachRuntimeAgentSurface(agent: RuntimeAgentClient, surface: {
    anchors: RuntimeAgentAnchorsModule;
    turns: RuntimeAgentTurnsModule;
}): RuntimeAgentModule;
export {};
//# sourceMappingURL=runtime-agent-surface.d.ts.map