import type { AgentSession } from "@mariozechner/pi-coding-agent"; import type { ReasoningLevel, VerboseLevel } from "../auto-reply/thinking.js"; import type { BlockReplyChunking } from "./pi-embedded-block-chunker.js"; export type ToolResultFormat = "markdown" | "plain"; export type SubscribeEmbeddedPiSessionParams = { session: AgentSession; runId: string; verboseLevel?: VerboseLevel; reasoningMode?: ReasoningLevel; toolResultFormat?: ToolResultFormat; shouldEmitToolResult?: () => boolean; shouldEmitToolOutput?: () => boolean; onToolResult?: (payload: { text?: string; mediaUrls?: string[] }) => void | Promise; onReasoningStream?: (payload: { text?: string; mediaUrls?: string[] }) => void | Promise; onBlockReply?: (payload: { text?: string; mediaUrls?: string[]; audioAsVoice?: boolean; replyToId?: string; replyToTag?: boolean; replyToCurrent?: boolean; }) => void | Promise; /** Flush pending block replies (e.g., before tool execution to preserve message boundaries). */ onBlockReplyFlush?: () => void | Promise; blockReplyBreak?: "text_end" | "message_end"; blockReplyChunking?: BlockReplyChunking; onPartialReply?: (payload: { text?: string; mediaUrls?: string[] }) => void | Promise; onAssistantMessageStart?: () => void | Promise; onAgentEvent?: (evt: { stream: string; data: Record }) => void | Promise; enforceFinalTag?: boolean; }; export type { BlockReplyChunking } from "./pi-embedded-block-chunker.js";