-
Notifications
You must be signed in to change notification settings - Fork 3.7k
feat(slack): slack-v2 copilot entitlement and agent_view custom-bot manifests #5876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,10 +20,12 @@ export interface SlackCapability { | |
| scopes: readonly string[] | ||
| events: readonly string[] | ||
| /** | ||
| * Marks the AI Assistant capability. When enabled the manifest additionally | ||
| * declares the app as an Agents & AI app (`features.assistant_view`) and | ||
| * enables the App Home messages tab — required for assistant threads, the | ||
| * "thinking" status (`assistant.threads.setStatus`), and DM-style chat to work. | ||
| * Marks the AI agent capability. When enabled the manifest additionally | ||
| * declares the app as an Agents & AI app (`features.agent_view` — the current | ||
| * agent messaging experience; new Slack apps cannot use the deprecated | ||
| * `assistant_view`) and enables the App Home messages tab — required for the | ||
| * agent surface, the "thinking" status (`assistant.threads.setStatus`), and | ||
| * DM-style chat to work. | ||
| */ | ||
| assistant?: boolean | ||
| /** | ||
|
|
@@ -166,13 +168,18 @@ export const SLACK_CAPABILITIES: readonly SlackCapability[] = [ | |
| }, | ||
| { | ||
| id: 'action_assistant', | ||
| label: 'AI assistant', | ||
| label: 'AI agent', | ||
| description: | ||
| 'Register the bot as an AI assistant: users open an assistant thread, the bot shows a "thinking" status, and can set the thread title and suggested prompts (assistant.threads.*).', | ||
| 'Register the bot as an AI agent: users chat with it in the agent surface, the bot shows a "thinking" status, and can set the thread title and suggested prompts (assistant.threads.*).', | ||
| defaultChecked: true, | ||
| group: 'action', | ||
| scopes: ['assistant:write', 'im:history'], | ||
| events: ['assistant_thread_started', 'assistant_thread_context_changed', 'message.im'], | ||
| // The agent messaging experience's event set: app_home_opened (user opened | ||
| // the agent DM), app_context_changed (what the user is viewing; requires | ||
| // features.agent_view), message.im (incoming messages). The legacy | ||
| // assistant_thread_* events belong to the deprecated assistant_view | ||
| // experience and are not subscribable by new agent_view apps. | ||
| events: ['app_home_opened', 'app_context_changed', 'message.im'], | ||
| assistant: true, | ||
| }, | ||
| { | ||
|
|
@@ -211,7 +218,7 @@ const WEBHOOK_URL_PLACEHOLDER = '<deploy workflow to generate webhook URL>' | |
| export interface BuildManifestOptions { | ||
| appName: string | ||
| webhookUrl: string | null | ||
| /** Shown on the bot's Slack profile and as the assistant description. */ | ||
| /** Shown on the bot's Slack profile and as the agent description. */ | ||
| description?: string | ||
| } | ||
|
|
||
|
|
@@ -241,12 +248,16 @@ export function buildSlackManifest( | |
| bot_user: { display_name: displayName, always_online: true }, | ||
| } | ||
| if (isAssistant) { | ||
| // Declares the app as an Agents & AI app; without this Slack won't surface | ||
| // the assistant thread UI or fire assistant_thread_* events. The messages | ||
| // tab must be enabled so users can chat the assistant. | ||
| features.assistant_view = { | ||
| assistant_description: | ||
| trimmedDescription || `${displayName} — an AI assistant powered by Sim.`, | ||
| // Declares the app as an Agents & AI app via the current agent messaging | ||
| // experience. New Slack apps can ONLY use agent_view (assistant_view is | ||
| // deprecated and rejected for new apps; switching an existing app to | ||
| // agent_view is irreversible). Without this Slack won't surface the agent | ||
| // UI or fire app_context_changed. The messages tab must be enabled so | ||
| // users can chat with the agent. agent_description caps at 300 chars. | ||
| features.agent_view = { | ||
| agent_description: ( | ||
| trimmedDescription || `${displayName} — an AI agent powered by Sim.` | ||
| ).slice(0, 300), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Profile description exceeds agent capMedium Severity The PR caps the user-supplied description at 300 characters for Reviewed by Cursor Bugbot for commit b6aab2c. Configure here. |
||
| } | ||
| features.app_home = { | ||
| home_tab_enabled: false, | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -127,6 +127,11 @@ export const SLACK_TRIGGER_OUTPUTS: Record<string, TriggerOutput> = { | |||||||||||||||||||||
| description: | ||||||||||||||||||||||
| 'Timestamp of the message the interaction originated from. Present for block_actions', | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
| context: { | ||||||||||||||||||||||
| type: 'json', | ||||||||||||||||||||||
| description: | ||||||||||||||||||||||
| 'What the user is currently viewing: an object with an entities array (each entry: type, value, team_id), e.g. context.entities[0].value. Present for app_context_changed; null otherwise', | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
|
Comment on lines
+130
to
+134
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The normalizer returns the full
Suggested change
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed — description now says it's an object with an |
||||||||||||||||||||||
| view: { | ||||||||||||||||||||||
| type: 'json', | ||||||||||||||||||||||
| description: | ||||||||||||||||||||||
|
|
@@ -245,6 +250,12 @@ export const SLACK_EVENT_CATALOG: readonly SlackEventCatalogEntry[] = [ | |||||||||||||||||||||
| { id: 'pin_removed', label: 'Pin removed', simSubscribed: false, filters: ['channels'] }, | ||||||||||||||||||||||
| { id: 'team_join', label: 'Member joined workspace', simSubscribed: false, filters: [] }, | ||||||||||||||||||||||
| { id: 'app_home_opened', label: 'App home opened', simSubscribed: false, filters: [] }, | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
| id: 'app_context_changed', | ||||||||||||||||||||||
| label: 'App context changed', | ||||||||||||||||||||||
| simSubscribed: false, | ||||||||||||||||||||||
| filters: [], | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
| { id: 'assistant_thread_started', label: 'Assistant opened', simSubscribed: true, filters: [] }, | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
| id: 'assistant_thread_context_changed', | ||||||||||||||||||||||
|
|
||||||||||||||||||||||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assistant triggers lack manifest events
Medium Severity
Custom-bot manifests with the AI agent capability now subscribe to
app_home_opened,app_context_changed, andmessage.iminstead ofassistant_thread_*, but the trigger event picker still offers “Assistant opened” and “Assistant context changed.” Workflows using those events never receive webhooks from newly created agent apps.Additional Locations (1)
apps/sim/triggers/slack/shared.ts#L258-L264Reviewed by Cursor Bugbot for commit b6aab2c. Configure here.