diff --git a/docs/plugins/sdk-migration.md b/docs/plugins/sdk-migration.md index 59d2ddcff6e..d0db094a591 100644 --- a/docs/plugins/sdk-migration.md +++ b/docs/plugins/sdk-migration.md @@ -270,7 +270,7 @@ releases. | `plugin-sdk/webhook-ingress` | Webhook request helpers | Webhook target utilities | | `plugin-sdk/webhook-request-guards` | Webhook body guard helpers | Request body read/limit helpers | | `plugin-sdk/reply-runtime` | Shared reply runtime | Inbound dispatch, heartbeat, reply planner, chunking | - | `plugin-sdk/reply-dispatch-runtime` | Narrow reply dispatch helpers | Finalize + provider dispatch helpers | + | `plugin-sdk/reply-dispatch-runtime` | Narrow reply dispatch helpers | Finalize, provider dispatch, and conversation-label helpers | | `plugin-sdk/reply-history` | Reply-history helpers | `buildHistoryContext`, `buildPendingHistoryContextFromMap`, `recordPendingHistoryEntry`, `clearHistoryEntriesIfEnabled` | | `plugin-sdk/reply-reference` | Reply reference planning | `createReplyReferencePlanner` | | `plugin-sdk/reply-chunking` | Reply chunk helpers | Text/markdown chunking helpers | diff --git a/docs/plugins/sdk-subpaths.md b/docs/plugins/sdk-subpaths.md index a52cc263d70..8b9253989fe 100644 --- a/docs/plugins/sdk-subpaths.md +++ b/docs/plugins/sdk-subpaths.md @@ -158,7 +158,7 @@ For the plugin authoring guide, see [Plugin SDK overview](/plugins/sdk-overview) | `plugin-sdk/text-autolink-runtime` | File-reference autolink detection without the broad text-runtime barrel | | `plugin-sdk/approval-runtime` | Exec/plugin approval helpers, approval-capability builders, auth/profile helpers, native routing/runtime helpers | | `plugin-sdk/reply-runtime` | Shared inbound/reply runtime helpers, chunking, dispatch, heartbeat, reply planner | - | `plugin-sdk/reply-dispatch-runtime` | Narrow reply dispatch/finalize helpers | + | `plugin-sdk/reply-dispatch-runtime` | Narrow reply dispatch/finalize and conversation-label helpers | | `plugin-sdk/reply-history` | Shared short-window reply-history helpers such as `buildHistoryContext`, `recordPendingHistoryEntry`, and `clearHistoryEntriesIfEnabled` | | `plugin-sdk/reply-reference` | `createReplyReferencePlanner` | | `plugin-sdk/reply-chunking` | Narrow text/markdown chunking helpers | diff --git a/extensions/telegram/src/auto-topic-label.test.ts b/extensions/telegram/src/auto-topic-label.test.ts index b5ecaf4a7c7..77e1f05dad2 100644 --- a/extensions/telegram/src/auto-topic-label.test.ts +++ b/extensions/telegram/src/auto-topic-label.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it, vi } from "vitest"; const generateConversationLabel = vi.hoisted(() => vi.fn()); -vi.mock("openclaw/plugin-sdk/reply-runtime", () => ({ +vi.mock("openclaw/plugin-sdk/reply-dispatch-runtime", () => ({ generateConversationLabel, })); diff --git a/extensions/telegram/src/auto-topic-label.ts b/extensions/telegram/src/auto-topic-label.ts index 22095ebf5d0..64546c9a8a9 100644 --- a/extensions/telegram/src/auto-topic-label.ts +++ b/extensions/telegram/src/auto-topic-label.ts @@ -1,5 +1,5 @@ import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import { generateConversationLabel } from "openclaw/plugin-sdk/reply-runtime"; +import { generateConversationLabel } from "openclaw/plugin-sdk/reply-dispatch-runtime"; export { AUTO_TOPIC_LABEL_DEFAULT_PROMPT, resolveAutoTopicLabelConfig, diff --git a/extensions/telegram/src/bot-message-dispatch.runtime.ts b/extensions/telegram/src/bot-message-dispatch.runtime.ts index ca49e4f10e4..e89dfbf3055 100644 --- a/extensions/telegram/src/bot-message-dispatch.runtime.ts +++ b/extensions/telegram/src/bot-message-dispatch.runtime.ts @@ -5,7 +5,7 @@ export { resolveStorePath, } from "openclaw/plugin-sdk/config-runtime"; export { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime"; -export { resolveChunkMode } from "openclaw/plugin-sdk/reply-runtime"; +export { resolveChunkMode } from "openclaw/plugin-sdk/reply-dispatch-runtime"; export { generateTelegramTopicLabel as generateTopicLabel, resolveAutoTopicLabelConfig, diff --git a/extensions/telegram/src/bot/delivery.replies.ts b/extensions/telegram/src/bot/delivery.replies.ts index 95835c6ea21..0f5985d4e2c 100644 --- a/extensions/telegram/src/bot/delivery.replies.ts +++ b/extensions/telegram/src/bot/delivery.replies.ts @@ -17,8 +17,8 @@ import { projectOutboundPayloadPlanForDelivery, } from "openclaw/plugin-sdk/outbound-runtime"; import { getGlobalHookRunner } from "openclaw/plugin-sdk/plugin-runtime"; -import type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime"; -import { chunkMarkdownTextWithMode, type ChunkMode } from "openclaw/plugin-sdk/reply-runtime"; +import { chunkMarkdownTextWithMode, type ChunkMode } from "openclaw/plugin-sdk/reply-chunking"; +import type { ReplyPayload } from "openclaw/plugin-sdk/reply-payload"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env"; import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env"; diff --git a/src/plugin-sdk/reply-dispatch-runtime.ts b/src/plugin-sdk/reply-dispatch-runtime.ts index ea774c92726..d1c7c0bffe2 100644 --- a/src/plugin-sdk/reply-dispatch-runtime.ts +++ b/src/plugin-sdk/reply-dispatch-runtime.ts @@ -1,4 +1,5 @@ export { resolveChunkMode } from "../auto-reply/chunk.js"; +export { generateConversationLabel } from "../auto-reply/reply/conversation-label-generator.js"; export { finalizeInboundContext } from "../auto-reply/reply/inbound-context.js"; import type { DispatchReplyWithBufferedBlockDispatcher,