From eaee01042b9adc16a22b4e03e75e39882b3de782 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Thu, 19 Mar 2026 01:06:22 -0400 Subject: [PATCH] Plugin SDK: move generic message tool schemas out of core --- src/agents/tools/message-tool.test.ts | 2 +- src/plugin-sdk/channel-runtime.ts | 2 +- src/{channels/plugins => plugin-sdk}/message-tool-schema.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename src/{channels/plugins => plugin-sdk}/message-tool-schema.ts (92%) diff --git a/src/agents/tools/message-tool.test.ts b/src/agents/tools/message-tool.test.ts index bd5b45f94f6..eeb88630072 100644 --- a/src/agents/tools/message-tool.test.ts +++ b/src/agents/tools/message-tool.test.ts @@ -1,9 +1,9 @@ import { Type } from "@sinclair/typebox"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import type { ChannelMessageCapability } from "../../channels/plugins/message-capabilities.js"; -import { createMessageToolButtonsSchema } from "../../channels/plugins/message-tool-schema.js"; import type { ChannelMessageActionName, ChannelPlugin } from "../../channels/plugins/types.js"; import type { MessageActionRunResult } from "../../infra/outbound/message-action-runner.js"; +import { createMessageToolButtonsSchema } from "../../plugin-sdk/message-tool-schema.js"; type CreateMessageTool = typeof import("./message-tool.js").createMessageTool; type SetActivePluginRegistry = typeof import("../../plugins/runtime.js").setActivePluginRegistry; type CreateTestRegistry = typeof import("../../test-utils/channel-plugins.js").createTestRegistry; diff --git a/src/plugin-sdk/channel-runtime.ts b/src/plugin-sdk/channel-runtime.ts index 67e4ceef1ea..dfbbad1e854 100644 --- a/src/plugin-sdk/channel-runtime.ts +++ b/src/plugin-sdk/channel-runtime.ts @@ -34,7 +34,7 @@ export type * from "../channels/plugins/types.js"; export * from "../channels/plugins/config-writes.js"; export * from "../channels/plugins/directory-adapters.js"; export * from "../channels/plugins/media-payload.js"; -export * from "../channels/plugins/message-tool-schema.js"; +export * from "./message-tool-schema.js"; export * from "../channels/plugins/normalize/signal.js"; export * from "../channels/plugins/normalize/whatsapp.js"; export * from "../channels/plugins/outbound/direct-text-media.js"; diff --git a/src/channels/plugins/message-tool-schema.ts b/src/plugin-sdk/message-tool-schema.ts similarity index 92% rename from src/channels/plugins/message-tool-schema.ts rename to src/plugin-sdk/message-tool-schema.ts index 1e3557729b6..889812fdbe4 100644 --- a/src/channels/plugins/message-tool-schema.ts +++ b/src/plugin-sdk/message-tool-schema.ts @@ -1,6 +1,6 @@ import { Type } from "@sinclair/typebox"; import type { TSchema } from "@sinclair/typebox"; -import { stringEnum } from "../../agents/schema/typebox.js"; +import { stringEnum } from "../agents/schema/typebox.js"; export function createMessageToolButtonsSchema(): TSchema { return Type.Array(