refactor(agents): share agent entry and block reply payload types

This commit is contained in:
Peter Steinberger
2026-02-19 00:06:19 +00:00
parent 5c5c032f42
commit 8b17a369e9
5 changed files with 18 additions and 28 deletions

View File

@@ -3,6 +3,7 @@ import type { ReasoningLevel, VerboseLevel } from "../auto-reply/thinking.js";
import type { OpenClawConfig } from "../config/types.openclaw.js";
import type { HookRunner } from "../plugins/hooks.js";
import type { BlockReplyChunking } from "./pi-embedded-block-chunker.js";
import type { BlockReplyPayload } from "./pi-embedded-payloads.js";
export type ToolResultFormat = "markdown" | "plain";
@@ -19,14 +20,7 @@ export type SubscribeEmbeddedPiSessionParams = {
onReasoningStream?: (payload: { text?: string; mediaUrls?: string[] }) => void | Promise<void>;
/** Called when a thinking/reasoning block ends (</think> tag processed). */
onReasoningEnd?: () => void | Promise<void>;
onBlockReply?: (payload: {
text?: string;
mediaUrls?: string[];
audioAsVoice?: boolean;
replyToId?: string;
replyToTag?: boolean;
replyToCurrent?: boolean;
}) => void | Promise<void>;
onBlockReply?: (payload: BlockReplyPayload) => void | Promise<void>;
/** Flush pending block replies (e.g., before tool execution to preserve message boundaries). */
onBlockReplyFlush?: () => void | Promise<void>;
blockReplyBreak?: "text_end" | "message_end";