import type { AgentMessage } from "@oh-my-pi/pi-agent-core"; export interface YieldDispatcher

{ /** Drop entries already delivered through another path. Called per-entry at flush time. */ isStale?(entry: P): boolean; /** Produce one batched AgentMessage from non-stale entries. Return null to skip. */ build(survivors: P[]): AgentMessage | null; } export interface YieldQueueOptions { isStreaming: () => boolean; injectStreaming(msg: AgentMessage): void; injectIdle(messages: AgentMessage[]): Promise; scheduleIdleFlush(run: () => Promise): void; } type YieldFlushMode = "streaming" | "idle"; export declare class YieldQueue { #private; constructor(options: YieldQueueOptions); register

(kind: string, dispatcher: YieldDispatcher

): () => void; enqueue

(kind: string, entry: P): void; has(kind?: string): boolean; flush(mode: YieldFlushMode): Promise; clear(): void; } export {};