From a6fd76efebd3171d7f575e7ae298b60fdb3ef897 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Wed, 4 Feb 2026 19:59:08 -0500 Subject: [PATCH] Message: clarify media schema + fix MEDIA newline --- src/agents/tools/message-tool.ts | 6 +++++- src/infra/outbound/message-action-runner.test.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/agents/tools/message-tool.ts b/src/agents/tools/message-tool.ts index aec6d9d05..08309b2ef 100644 --- a/src/agents/tools/message-tool.ts +++ b/src/agents/tools/message-tool.ts @@ -56,7 +56,11 @@ function buildSendSchema(options: { includeButtons: boolean; includeCards: boole effect: Type.Optional( Type.String({ description: "Alias for effectId (e.g., invisible-ink, balloons)." }), ), - media: Type.Optional(Type.String()), + media: Type.Optional( + Type.String({ + description: "Media URL or local path. data: URLs are not supported here, use buffer.", + }), + ), filename: Type.Optional(Type.String()), buffer: Type.Optional( Type.String({ diff --git a/src/infra/outbound/message-action-runner.test.ts b/src/infra/outbound/message-action-runner.test.ts index 5ca3a5643..5926050ee 100644 --- a/src/infra/outbound/message-action-runner.test.ts +++ b/src/infra/outbound/message-action-runner.test.ts @@ -579,7 +579,7 @@ describe("runMessageAction sandboxed media validation", () => { params: { channel: "slack", target: "#C12345678", - message: "Hello\\nMEDIA: ./data/note.ogg", + message: "Hello\nMEDIA: ./data/note.ogg", }, sandboxRoot: sandboxDir, dryRun: true,