Compare commits

...

1 Commits

Author SHA1 Message Date
maloqab
7e6e785556 fix(slack): rename /status to /agentstatus for Slack slash commands
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.
2026-02-27 10:53:39 -08:00
2 changed files with 15 additions and 0 deletions

View File

@@ -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 } },

View File

@@ -123,6 +123,11 @@ const NATIVE_NAME_OVERRIDES: Record<string, Record<string, string>> = {
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 {