Plugin SDK: require unified message discovery

This commit is contained in:
Gustavo Madeira Santana
2026-03-18 03:02:02 +00:00
parent 870f260772
commit 682f4d1ca3
31 changed files with 155 additions and 301 deletions

View File

@@ -150,7 +150,7 @@ const createDiscordPollPluginRegistration = () => ({
id: "discord",
label: "Discord",
actions: {
listActions: () => ["poll"],
describeMessageTool: () => ({ actions: ["poll"] }),
handleAction: (async ({ action, params, cfg, accountId }: ChannelActionParams) => {
return await handleDiscordAction(
{ action, to: params.to, accountId: accountId ?? undefined },
@@ -168,7 +168,7 @@ const createTelegramSendPluginRegistration = () => ({
id: "telegram",
label: "Telegram",
actions: {
listActions: () => ["send"],
describeMessageTool: () => ({ actions: ["send"] }),
handleAction: (async ({ action, params, cfg, accountId }: ChannelActionParams) => {
return await handleTelegramAction(
{ action, to: params.to, accountId: accountId ?? undefined },
@@ -186,7 +186,7 @@ const createTelegramPollPluginRegistration = () => ({
id: "telegram",
label: "Telegram",
actions: {
listActions: () => ["poll"],
describeMessageTool: () => ({ actions: ["poll"] }),
handleAction: (async ({ action, params, cfg, accountId }: ChannelActionParams) => {
return await handleTelegramAction(
{ action, to: params.to, accountId: accountId ?? undefined },