From 7e6e78555627c8e93e96d88e8c3276209d288868 Mon Sep 17 00:00:00 2001 From: maloqab Date: Fri, 27 Feb 2026 21:09:56 +0300 Subject: [PATCH] fix(slack): rename /status to /agentstatus for Slack slash commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Slack reserves /status as a built-in command. Registering it in a Slack app manifest returns "invalid name" and invalidates the entire slash_commands array. This adds a Slack provider override using the existing NATIVE_NAME_OVERRIDES system (same pattern as Discord's tts → voice rename) so the handler registers as /agentstatus instead. --- src/auto-reply/commands-registry.test.ts | 10 ++++++++++ src/auto-reply/commands-registry.ts | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/src/auto-reply/commands-registry.test.ts b/src/auto-reply/commands-registry.test.ts index 918310278c9..1d8a1128cc1 100644 --- a/src/auto-reply/commands-registry.test.ts +++ b/src/auto-reply/commands-registry.test.ts @@ -109,6 +109,16 @@ describe("commands registry", () => { expect(findCommandByNativeName("tts", "discord")).toBeUndefined(); }); + it("renames status to agentstatus for slack", () => { + const native = listNativeCommandSpecsForConfig( + { commands: { native: true } }, + { provider: "slack" }, + ); + expect(native.find((spec) => spec.name === "agentstatus")).toBeTruthy(); + expect(native.find((spec) => spec.name === "status")).toBeFalsy(); + expect(findCommandByNativeName("agentstatus", "slack")?.key).toBe("status"); + }); + it("keeps discord native command specs within slash-command limits", () => { const native = listNativeCommandSpecsForConfig( { commands: { native: true } }, diff --git a/src/auto-reply/commands-registry.ts b/src/auto-reply/commands-registry.ts index 34ca31492bc..93f8872e37b 100644 --- a/src/auto-reply/commands-registry.ts +++ b/src/auto-reply/commands-registry.ts @@ -123,6 +123,11 @@ const NATIVE_NAME_OVERRIDES: Record> = { discord: { tts: "voice", }, + slack: { + // Slack reserves /status — registering it returns "invalid name" + // and invalidates the entire slash_commands manifest array. + status: "agentstatus", + }, }; function resolveNativeName(command: ChatCommandDefinition, provider?: string): string | undefined {