import type { AgentService } from '../../agent/service.js';
import type { Config } from '../../config/schema.js';
import type { MessageBus } from '../../infra/bus/index.js';
import type { SessionIndex } from '../../session/index.js';
import type { AgentRunRelay } from '../agent-run-relay.js';
export type RunGatewayAgentYield = {
    type: string;
    content?: string;
    status?: string;
    runId?: string;
};
export type RunGatewayAgentDeps = {
    config: Config;
    agentService: AgentService;
    bus: MessageBus;
    runRelay: AgentRunRelay;
    runAbortControllers: Map<string, AbortController>;
    activeWebchatRunBySession: Map<string, string>;
    sessionIndex: SessionIndex;
    emit: (type: string, payload: unknown) => void;
};
/**
 * @param runOptions.signal — When set (e.g. client disconnect), aborts in-flight generation and persists partial output.
 */
export declare function runGatewayAgent(deps: RunGatewayAgentDeps, message: string, channel: string, chatId: string, attachments?: Array<{
    type: string;
    mimeType?: string;
    data?: string;
    name?: string;
    size?: number;
}>, thinking?: string, runOptions?: {
    signal?: AbortSignal;
    clientCreatedAtMs?: number;
}): AsyncGenerator<RunGatewayAgentYield, {
    status: string;
    summary: string;
}, unknown>;
