From cae703c98a29fad7612069065d974427870f0325 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Wed, 14 Oct 2026 16:30:49 -0700 Subject: [PATCH] feat(web-api): add code_channels app manifest feature Co-Authored-By: Claude --- .changeset/manifest-code-channels.md | 5 +++ .../web-api/src/types/request/manifest.ts | 18 +++++++++++ .../web-api/test/types/methods/apps.test-d.ts | 32 +++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 .changeset/manifest-code-channels.md diff --git a/.changeset/manifest-code-channels.md b/.changeset/manifest-code-channels.md new file mode 100644 index 000000000..a41243c96 --- /dev/null +++ b/.changeset/manifest-code-channels.md @@ -0,0 +1,5 @@ +--- +"@slack/web-api": minor +--- + +feat: add the `code_channels` app manifest feature and the `code_channels:manage` bot scope to manifest types diff --git a/packages/web-api/src/types/request/manifest.ts b/packages/web-api/src/types/request/manifest.ts index 05bb110a8..37923ec38 100644 --- a/packages/web-api/src/types/request/manifest.ts +++ b/packages/web-api/src/types/request/manifest.ts @@ -65,6 +65,12 @@ interface ManifestFeatures { * @see {@link https://docs.slack.dev/legacy/legacy-bot-users Legacy bots}. */ bot_user?: ManifestBotUser; + /** + * @description Settings for apps that create {@link https://docs.slack.dev/ai/slack-code code channels}: dedicated + * channels where an agent collaborates with a user on a task. + * @see {@link https://docs.slack.dev/ai/slack-code#enabling-code-channels Enabling code channels}. + */ + code_channels?: ManifestCodeChannels; /** * @description An array of settings groups that describe {@link https://docs.slack.dev/interactivity/implementing-shortcuts shortcuts} * configuration. A maximum of 10 shortcuts can be included in this array. @@ -153,6 +159,17 @@ interface ManifestBotUser { always_online?: boolean; } +interface ManifestCodeChannels { + /** @description A boolean that specifies whether or not code channels are enabled for the app. */ + enabled?: boolean; + /** + * @description The URL where Slack delivers invocations of the agent's runtime-registered code channel slash + * commands. Must be an http:// or https:// URL, at most 3000 characters. Not required for Socket Mode or hosted apps. + * @see {@link https://docs.slack.dev/ai/slack-code/agent-slash-commands Agent slash commands}. + */ + slash_command_url?: string; +} + interface ManifestShortcut { /** @description Specifies which {@link https://docs.slack.dev/interactivity/implementing-shortcuts type of shortcut} is being described. */ type: 'global' | 'message'; @@ -362,6 +379,7 @@ type BotScope = | 'chat:write' | 'chat:write.customize' | 'chat:write.public' + | 'code_channels:manage' | 'commands' | 'conversations.connect:manage' | 'conversations.connect:read' diff --git a/packages/web-api/test/types/methods/apps.test-d.ts b/packages/web-api/test/types/methods/apps.test-d.ts index 3260a3c61..46655aa7c 100644 --- a/packages/web-api/test/types/methods/apps.test-d.ts +++ b/packages/web-api/test/types/methods/apps.test-d.ts @@ -37,6 +37,19 @@ expectError( }, }), ); +expectError( + web.apps.manifest.create({ + manifest: { + display_information: { name: 'Agent' }, + features: { + code_channels: { + // enabled is a boolean + enabled: 'true', + }, + }, + }, + }), +); // -- happy path expectAssignable>([ { @@ -75,6 +88,25 @@ expectAssignable>([ }, }, ]); +// -- happy path: code_channels +expectAssignable>([ + { + manifest: { + display_information: { name: 'Agent' }, + features: { + code_channels: { + enabled: true, + slash_command_url: 'https://example.com/slack/code-channel-commands', + }, + }, + oauth_config: { + scopes: { + bot: ['app_mentions:read', 'code_channels:manage'], + }, + }, + }, + }, +]); // apps.manifest.delete // -- sad path