import type { HarnessStreamPart, RunContext, Session } from '../types/index.js'; import type { HookRunner } from '../hooks/HookRunner.js'; import type { ConversationEventLog } from '../foundation/ConversationEventLog.js'; export interface StreamEmitterConfig { hookRunner: HookRunner; eventLog: ConversationEventLog; hasStreamPartHook: boolean; outputRedactions?: Array<{ re: RegExp; replacement: string; }>; redactCarryKey: string; redactLookbehind: number; saveSessionCheckpoint: (session: Session) => Promise; } /** * Hot-path optimized stream emitter. * Provides a fast path for text-delta events by skipping unnecessary * async hook calls and checkpoint checks when no stream part hooks are configured. */ export declare class StreamEmitter { private hookRunner; private eventLog; private hasStreamPartHook; private outputRedactions?; private redactCarryKey; private redactLookbehind; private saveCheckpoint; constructor(config: StreamEmitterConfig); emit(context: RunContext, part: HarnessStreamPart): AsyncGenerator; private emitCore; private applyOutputRedactions; }