import type { Config } from '../../config/schema.js';
import type { InternalAttachmentRoots } from '../../channels/attachments/inbound-persist.js';
import { type SessionConfigStore, type SessionStore } from '../../session/index.js';
import type { SessionContext } from '../session/index.js';
import type { AgentInstanceGateway } from '../agent-instance-gateway.js';
import type { CommandHandler } from '../messaging/command-handler.js';
import type { ModelManager } from '../models/index.js';
export type DirectStreamInboundAttachment = {
    type: string;
    mimeType?: string;
    data?: string;
    name?: string;
    size?: number;
    workspaceRelativePath?: string;
};
export type ProcessDirectStreamLog = {
    info: (obj: Record<string, unknown>, msg: string) => void;
    warn: (obj: Record<string, unknown>, msg: string) => void;
    debug?: (obj: Record<string, unknown>, msg: string) => void;
};
export interface ProcessDirectStreamingDeps {
    log: ProcessDirectStreamLog;
    parseSessionKey: (sessionKey: string) => {
        channel: string;
        chatId: string;
    };
    initDirectStreamingSession: (sessionKey: string, channel: string, chatId: string) => SessionContext;
    registerWebchatSsePublisher: (sessionKey: string, publisher: (event: {
        type: string;
        [key: string]: unknown;
    }) => void) => void;
    unregisterWebchatSsePublisher: (sessionKey: string) => void;
    agentManager: AgentInstanceGateway;
    hydrateSessionWorkspaceFromStore: (sessionKey: string) => Promise<void>;
    hydrateSessionModelFromStore: (sessionKey: string) => Promise<void>;
    sessionStore: SessionStore;
    modelManager: ModelManager;
    applyResolvedThinkingLevel: (sessionKey: string, thinking?: string | null) => Promise<void>;
    getConfig: () => Config | undefined;
    sessionConfigStore: SessionConfigStore;
    attachmentRootsForSession: (sessionKey: string) => InternalAttachmentRoots;
    commandHandler: Pick<CommandHandler, 'executeCommandAndAggregateReply'>;
    prepareInboundAttachments: (sessionKey: string, attachments?: DirectStreamInboundAttachment[]) => Promise<DirectStreamInboundAttachment[] | undefined>;
    buildMessageContent: (content: string, attachments: DirectStreamInboundAttachment[] | undefined, sessionKey: string) => Promise<Array<{
        type: 'text';
        text: string;
    } | {
        type: 'image';
        data: string;
        mimeType: string;
    }>>;
    recordPersistentGoalStreamOutcome?: (sessionKey: string, outcome: {
        skipPersistentGoalPostTurn: boolean;
    }) => void;
    onTurnComplete?: (sessionKey: string, lastAssistantText?: string) => void;
    /** Disk-only transcript sync (slash receipt already streamed as tokens). */
    reloadWebchatTranscript?: (sessionKey: string) => void;
    maybeEmitWebchatTts: (sessionKey: string, hadInboundVoice: boolean) => Promise<{
        type: 'tts_audio';
        workspaceRelativePath: string;
        mimeType: string;
        name: string;
    } | null>;
    endDirectRequestContext: () => void;
    resetSession: (sessionKey: string) => Promise<{
        sessionId: string;
        previousSessionId: string;
    } | null>;
}
export interface ProcessDirectStreamingInput {
    content: string;
    sessionKey?: string;
    attachments?: DirectStreamInboundAttachment[];
    thinking?: string;
    signal?: AbortSignal;
}
export type ProcessDirectStreamingSseEvent = {
    type: string;
    [key: string]: unknown;
};
export declare function runProcessDirectStreaming(deps: ProcessDirectStreamingDeps, input: ProcessDirectStreamingInput): AsyncGenerator<ProcessDirectStreamingSseEvent, void, unknown>;
