From 488f1b0ed349f286fbdaa17f62e8b28eafe30441 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sun, 15 Mar 2026 18:47:46 -0700 Subject: [PATCH] Outbound: parse shared interactive params --- src/infra/outbound/message-action-params.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/infra/outbound/message-action-params.ts b/src/infra/outbound/message-action-params.ts index ea527a74bd6..9f23419f7dc 100644 --- a/src/infra/outbound/message-action-params.ts +++ b/src/infra/outbound/message-action-params.ts @@ -422,3 +422,20 @@ export function parseComponentsParam(params: Record): void { throw new Error("--components must be valid JSON"); } } + +export function parseInteractiveParam(params: Record): void { + const raw = params.interactive; + if (typeof raw !== "string") { + return; + } + const trimmed = raw.trim(); + if (!trimmed) { + delete params.interactive; + return; + } + try { + params.interactive = JSON.parse(trimmed) as unknown; + } catch { + throw new Error("--interactive must be valid JSON"); + } +}