Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/manifest-code-channels.md
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions packages/web-api/src/types/request/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -362,6 +379,7 @@ type BotScope =
| 'chat:write'
| 'chat:write.customize'
| 'chat:write.public'
| 'code_channels:manage'
| 'commands'
| 'conversations.connect:manage'
| 'conversations.connect:read'
Expand Down
32 changes: 32 additions & 0 deletions packages/web-api/test/types/methods/apps.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Parameters<typeof web.apps.manifest.create>>([
{
Expand Down Expand Up @@ -75,6 +88,25 @@ expectAssignable<Parameters<typeof web.apps.manifest.create>>([
},
},
]);
// -- happy path: code_channels
expectAssignable<Parameters<typeof web.apps.manifest.create>>([
{
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
Expand Down
Loading