import type { SessionManager } from "@mariozechner/pi-coding-agent"; export type GuardedSessionManager = SessionManager & { /** Flush any synthetic tool results for pending tool calls. Idempotent. */ flushPendingToolResults?: () => void; }; /** * Apply the tool-result guard to a SessionManager exactly once and expose * a flush method on the instance for easy teardown handling. */ export declare function guardSessionManager(sessionManager: SessionManager, opts?: { koiId?: string; sessionKey?: string; allowSyntheticToolResults?: boolean; /** * The koi that's actually speaking this run — for broadcast * multi-koi turns this differs from the session's koi (the * companion replies, but the transcript is the host's). Tagged * onto every assistant message we persist so the chat-history * reader can return author info per message and the UI can * render the right name + avatar after a reload. */ speakerKoiId?: string; }): GuardedSessionManager;