@capybara-hq/plugin-slack 0.1.0-rc.4 → 0.1.0-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,186 @@
1
+ # Create the Slack app
2
+
3
+ This connects one Slack workspace to Capybara as a bot. People message the bot directly, mention
4
+ it in channels and use the slash commands `/new`, `/env` and `/capybara`. You need permission to
5
+ create apps in the workspace (with "Only allow pre-approved apps", a workspace admin approves the
6
+ app after step 2).
7
+
8
+ ## 1. Create the app from the manifest
9
+
10
+ Open <https://api.slack.com/apps>, choose **Create New App → From a manifest**, pick your
11
+ workspace and paste the manifest below. It registers the bot scopes, the events and the slash
12
+ commands the plugin needs.
13
+
14
+ ::: mode long_connection
15
+ Socket Mode needs no public address: Slack keeps a connection open to Capybara.
16
+
17
+ ```yaml title="App manifest (Socket Mode)"
18
+ # Slack app manifest for the Capybara Slack plugin, Socket Mode (long connection).
19
+ # Reference: https://docs.slack.dev/reference/app-manifest (checked 2026-11-09).
20
+ display_information:
21
+ # Slack caps app names at 35 characters; shorten it in the app settings if it is longer.
22
+ name: "{{connectionName}}"
23
+ description: Chat with your organization's Capybara agents.
24
+ background_color: "#3d2f24"
25
+ features:
26
+ app_home:
27
+ home_tab_enabled: false
28
+ messages_tab_enabled: true
29
+ messages_tab_read_only_enabled: false
30
+ bot_user:
31
+ display_name: capybara
32
+ always_online: true
33
+ slash_commands:
34
+ - command: /new
35
+ description: Start a new conversation (direct message)
36
+ should_escape: false
37
+ - command: /env
38
+ description: List or set your default environment (direct message)
39
+ usage_hint: "[name]"
40
+ should_escape: false
41
+ - command: /capybara
42
+ description: Run a skill
43
+ usage_hint: "<skill> [args]"
44
+ should_escape: false
45
+ oauth_config:
46
+ # Sign in with Slack (identity-source@1).
47
+ redirect_urls:
48
+ - "{{signInCallbackUrl}}"
49
+ scopes:
50
+ bot:
51
+ - chat:write # post and update replies and cards
52
+ - commands # slash commands /new, /env, /capybara
53
+ - im:write # conversations.open: tell the bot's own DM from other DMs
54
+ - im:history # message.im: direct messages to the bot
55
+ - app_mentions:read # app_mention: @capybara in channels
56
+ - channels:history # message.channels: thread replies in public channels
57
+ - groups:history # message.groups: thread replies in private channels
58
+ - users:read # users.info; team_join / user_change; users.list
59
+ - users:read.email # directory@1: email addresses in users.list
60
+ settings:
61
+ event_subscriptions:
62
+ bot_events:
63
+ - message.im
64
+ - app_mention
65
+ - message.channels
66
+ - message.groups
67
+ - team_join
68
+ - user_change
69
+ interactivity:
70
+ is_enabled: true
71
+ socket_mode_enabled: true
72
+ org_deploy_enabled: false
73
+ token_rotation_enabled: false
74
+ ```
75
+
76
+ ## 2. Create the app-level token
77
+
78
+ Under **Basic Information → App-Level Tokens** choose **Generate Token and Scopes**, add the scope
79
+ `connections:write` and copy the `xapp-…` token into the **App-level token** field below.
80
+
81
+ ::check app-token App-level token opens a Socket Mode connection
82
+ :::
83
+
84
+ ::: mode webhook
85
+ In webhook mode Slack posts events, card clicks and slash commands to this connection's address
86
+ and checks it when you save.
87
+
88
+ ```yaml title="App manifest (webhook)"
89
+ # Slack app manifest for the Capybara Slack plugin, webhook inbound mode.
90
+ # Reference: https://docs.slack.dev/reference/app-manifest (checked 2026-11-09).
91
+ display_information:
92
+ # Slack caps app names at 35 characters; shorten it in the app settings if it is longer.
93
+ name: "{{connectionName}}"
94
+ description: Chat with your organization's Capybara agents.
95
+ background_color: "#3d2f24"
96
+ features:
97
+ app_home:
98
+ home_tab_enabled: false
99
+ messages_tab_enabled: true
100
+ messages_tab_read_only_enabled: false
101
+ bot_user:
102
+ display_name: capybara
103
+ always_online: true
104
+ slash_commands:
105
+ - command: /new
106
+ url: "{{webhookUrl}}"
107
+ description: Start a new conversation (direct message)
108
+ should_escape: false
109
+ - command: /env
110
+ url: "{{webhookUrl}}"
111
+ description: List or set your default environment (direct message)
112
+ usage_hint: "[name]"
113
+ should_escape: false
114
+ - command: /capybara
115
+ url: "{{webhookUrl}}"
116
+ description: Run a skill
117
+ usage_hint: "<skill> [args]"
118
+ should_escape: false
119
+ oauth_config:
120
+ # Sign in with Slack (identity-source@1).
121
+ redirect_urls:
122
+ - "{{signInCallbackUrl}}"
123
+ scopes:
124
+ bot:
125
+ - chat:write # post and update replies and cards
126
+ - commands # slash commands /new, /env, /capybara
127
+ - im:write # conversations.open: tell the bot's own DM from other DMs
128
+ - im:history # message.im: direct messages to the bot
129
+ - app_mentions:read # app_mention: @capybara in channels
130
+ - channels:history # message.channels: thread replies in public channels
131
+ - groups:history # message.groups: thread replies in private channels
132
+ - users:read # users.info; team_join / user_change; users.list
133
+ - users:read.email # directory@1: email addresses in users.list
134
+ settings:
135
+ event_subscriptions:
136
+ request_url: "{{webhookUrl}}"
137
+ bot_events:
138
+ - message.im
139
+ - app_mention
140
+ - message.channels
141
+ - message.groups
142
+ - team_join
143
+ - user_change
144
+ interactivity:
145
+ is_enabled: true
146
+ request_url: "{{webhookUrl}}"
147
+ socket_mode_enabled: false
148
+ org_deploy_enabled: false
149
+ token_rotation_enabled: false
150
+ ```
151
+
152
+ Slack checks the Request URL `{{webhookUrl}}` when you create the app or save **Event
153
+ Subscriptions**, and Capybara answers the check, so the channel connection must be saved first.
154
+ If Slack reports the URL unverified, save the connection here, then retry under **Event
155
+ Subscriptions**.
156
+
157
+ ## 2. Copy the signing secret
158
+
159
+ Copy **Basic Information → App Credentials → Signing Secret** into the **Signing secret** field
160
+ below. Every webhook request is verified with it; without it every request is refused.
161
+
162
+ ::check capybara:webhook-public Webhook address is reachable from the internet
163
+ ::check capybara:webhook-received Slack has delivered a signed request
164
+ :::
165
+
166
+ ## 3. Install the app and copy the bot token
167
+
168
+ Choose **Install App → Install to Workspace** and copy the **Bot User OAuth Token** (`xoxb-…`)
169
+ into the **Bot token** field below.
170
+
171
+ ::check bot-token Bot token works
172
+ ::check bot-scopes The app has every scope in the manifest
173
+
174
+ ## Sign in with Slack
175
+
176
+ The manifest's redirect URL `{{signInCallbackUrl}}` is for **Sign in with Slack**. It needs the
177
+ deployment's public URL; without it, delete the redirect URL from the manifest or ask your super
178
+ admin to set `http.publicUrl`.
179
+
180
+ ::check capybara:public-url The platform has a public URL
181
+
182
+ ## When the plugin changes this manifest
183
+
184
+ After a Slack plugin update that changes the manifest, Capybara shows a notice on this connection.
185
+ Open the app at <https://api.slack.com/apps>, go to **App Manifest**, paste the new manifest,
186
+ save, reinstall the app if Slack asks, then confirm here with **I have updated the Slack app**.
@@ -0,0 +1,181 @@
1
+ # 创建 Slack 应用
2
+
3
+ 这会把一个 Slack 工作区以机器人的形式接入 Capybara。成员可以直接私信机器人、在频道里 @ 它,
4
+ 并使用斜杠命令 `/new`、`/env` 和 `/capybara`。你需要有在该工作区创建应用的权限(工作区开启了
5
+ 「Only allow pre-approved apps」时,第 2 步之后需要工作区管理员批准该应用)。
6
+
7
+ ## 1. 用 manifest 创建应用
8
+
9
+ 打开 <https://api.slack.com/apps>,选择 **Create New App → From a manifest**,选中你的工作区,
10
+ 粘贴下面的 manifest。它会登记插件需要的机器人权限、事件和斜杠命令。
11
+
12
+ ::: mode long_connection
13
+ Socket Mode 不需要公网地址:由 Slack 与 Capybara 之间保持一条长连接。
14
+
15
+ ```yaml title="应用 manifest(Socket Mode)"
16
+ # Slack app manifest for the Capybara Slack plugin, Socket Mode (long connection).
17
+ # Reference: https://docs.slack.dev/reference/app-manifest (checked 2026-11-09).
18
+ display_information:
19
+ # Slack caps app names at 35 characters; shorten it in the app settings if it is longer.
20
+ name: "{{connectionName}}"
21
+ description: Chat with your organization's Capybara agents.
22
+ background_color: "#3d2f24"
23
+ features:
24
+ app_home:
25
+ home_tab_enabled: false
26
+ messages_tab_enabled: true
27
+ messages_tab_read_only_enabled: false
28
+ bot_user:
29
+ display_name: capybara
30
+ always_online: true
31
+ slash_commands:
32
+ - command: /new
33
+ description: Start a new conversation (direct message)
34
+ should_escape: false
35
+ - command: /env
36
+ description: List or set your default environment (direct message)
37
+ usage_hint: "[name]"
38
+ should_escape: false
39
+ - command: /capybara
40
+ description: Run a skill
41
+ usage_hint: "<skill> [args]"
42
+ should_escape: false
43
+ oauth_config:
44
+ # Sign in with Slack (identity-source@1).
45
+ redirect_urls:
46
+ - "{{signInCallbackUrl}}"
47
+ scopes:
48
+ bot:
49
+ - chat:write # post and update replies and cards
50
+ - commands # slash commands /new, /env, /capybara
51
+ - im:write # conversations.open: tell the bot's own DM from other DMs
52
+ - im:history # message.im: direct messages to the bot
53
+ - app_mentions:read # app_mention: @capybara in channels
54
+ - channels:history # message.channels: thread replies in public channels
55
+ - groups:history # message.groups: thread replies in private channels
56
+ - users:read # users.info; team_join / user_change; users.list
57
+ - users:read.email # directory@1: email addresses in users.list
58
+ settings:
59
+ event_subscriptions:
60
+ bot_events:
61
+ - message.im
62
+ - app_mention
63
+ - message.channels
64
+ - message.groups
65
+ - team_join
66
+ - user_change
67
+ interactivity:
68
+ is_enabled: true
69
+ socket_mode_enabled: true
70
+ org_deploy_enabled: false
71
+ token_rotation_enabled: false
72
+ ```
73
+
74
+ ## 2. 创建应用级令牌
75
+
76
+ 在 **Basic Information → App-Level Tokens** 选择 **Generate Token and Scopes**,添加权限
77
+ `connections:write`,把 `xapp-…` 令牌填进下方的 **应用令牌**。
78
+
79
+ ::check app-token 应用令牌能建立 Socket Mode 连接
80
+ :::
81
+
82
+ ::: mode webhook
83
+ Webhook 模式下,Slack 把事件、卡片点击和斜杠命令发到这个渠道连接的地址,并在保存时校验该地址。
84
+
85
+ ```yaml title="应用 manifest(Webhook)"
86
+ # Slack app manifest for the Capybara Slack plugin, webhook inbound mode.
87
+ # Reference: https://docs.slack.dev/reference/app-manifest (checked 2026-11-09).
88
+ display_information:
89
+ # Slack caps app names at 35 characters; shorten it in the app settings if it is longer.
90
+ name: "{{connectionName}}"
91
+ description: Chat with your organization's Capybara agents.
92
+ background_color: "#3d2f24"
93
+ features:
94
+ app_home:
95
+ home_tab_enabled: false
96
+ messages_tab_enabled: true
97
+ messages_tab_read_only_enabled: false
98
+ bot_user:
99
+ display_name: capybara
100
+ always_online: true
101
+ slash_commands:
102
+ - command: /new
103
+ url: "{{webhookUrl}}"
104
+ description: Start a new conversation (direct message)
105
+ should_escape: false
106
+ - command: /env
107
+ url: "{{webhookUrl}}"
108
+ description: List or set your default environment (direct message)
109
+ usage_hint: "[name]"
110
+ should_escape: false
111
+ - command: /capybara
112
+ url: "{{webhookUrl}}"
113
+ description: Run a skill
114
+ usage_hint: "<skill> [args]"
115
+ should_escape: false
116
+ oauth_config:
117
+ # Sign in with Slack (identity-source@1).
118
+ redirect_urls:
119
+ - "{{signInCallbackUrl}}"
120
+ scopes:
121
+ bot:
122
+ - chat:write # post and update replies and cards
123
+ - commands # slash commands /new, /env, /capybara
124
+ - im:write # conversations.open: tell the bot's own DM from other DMs
125
+ - im:history # message.im: direct messages to the bot
126
+ - app_mentions:read # app_mention: @capybara in channels
127
+ - channels:history # message.channels: thread replies in public channels
128
+ - groups:history # message.groups: thread replies in private channels
129
+ - users:read # users.info; team_join / user_change; users.list
130
+ - users:read.email # directory@1: email addresses in users.list
131
+ settings:
132
+ event_subscriptions:
133
+ request_url: "{{webhookUrl}}"
134
+ bot_events:
135
+ - message.im
136
+ - app_mention
137
+ - message.channels
138
+ - message.groups
139
+ - team_join
140
+ - user_change
141
+ interactivity:
142
+ is_enabled: true
143
+ request_url: "{{webhookUrl}}"
144
+ socket_mode_enabled: false
145
+ org_deploy_enabled: false
146
+ token_rotation_enabled: false
147
+ ```
148
+
149
+ 创建应用或保存 **Event Subscriptions** 时,Slack 会校验 Request URL `{{webhookUrl}}`,由 Capybara
150
+ 应答校验,所以要先保存渠道连接。若 Slack 提示地址未通过校验,先在这里保存连接,再到
151
+ **Event Subscriptions** 重试。
152
+
153
+ ## 2. 复制签名密钥
154
+
155
+ 把 **Basic Information → App Credentials → Signing Secret** 填进下方的 **签名密钥**。每个 webhook
156
+ 请求都用它校验;不填则所有请求都会被拒绝。
157
+
158
+ ::check capybara:webhook-public Webhook 地址可从公网访问
159
+ ::check capybara:webhook-received Slack 已送达一个签名有效的请求
160
+ :::
161
+
162
+ ## 3. 安装应用并复制机器人令牌
163
+
164
+ 选择 **Install App → Install to Workspace**,把 **Bot User OAuth Token**(`xoxb-…`)填进下方的
165
+ **机器人令牌**。
166
+
167
+ ::check bot-token 机器人令牌可用
168
+ ::check bot-scopes 应用具备 manifest 中的全部权限
169
+
170
+ ## Slack 登录
171
+
172
+ manifest 里的重定向地址 `{{signInCallbackUrl}}` 用于 **Sign in with Slack**(Slack 登录),需要部署
173
+ 设置公网地址;未设置时,请从 manifest 中删掉该重定向地址,或请超级管理员设置 `http.publicUrl`。
174
+
175
+ ::check capybara:public-url 平台已设置公网地址
176
+
177
+ ## 插件更新了 manifest 时
178
+
179
+ Slack 插件更新并改动了 manifest 后,Capybara 会在这个渠道连接上显示提示。在
180
+ <https://api.slack.com/apps> 打开该应用,进入 **App Manifest**,粘贴新的 manifest 并保存,Slack
181
+ 要求时重新安装应用,然后在这里点 **我已更新 Slack 应用** 确认。
@@ -0,0 +1,113 @@
1
+ # Set up the Slack connector
2
+
3
+ The Slack connector lets agents search, read and send Slack messages, canvases, lists and files
4
+ **as the person using them**, through Slack's MCP server. Each member connects their own Slack
5
+ account; there is no shared org token.
6
+
7
+ ::: audience admin
8
+ An org admin sets it up once: create an internal Slack app (a separate app from the bot), then
9
+ enter its client id and secret here. Members connect afterwards.
10
+
11
+ ## 1. Create the OAuth app
12
+
13
+ Open <https://api.slack.com/apps>, choose **Create New App → From a manifest** in the company
14
+ workspace and paste the manifest below. It turns on MCP and requests the user scopes the
15
+ {{templateName}} template asks for.
16
+
17
+ ```yaml title="App manifest (Slack connector)"
18
+ # Slack app manifest for the "{{templateName}}" connector template ({{pluginName}} {{pluginVersion}}).
19
+ # A separate internal app: user scopes only, MCP on, no bot, no Socket Mode.
20
+ # Reference: https://docs.slack.dev/reference/app-manifest and
21
+ # https://docs.slack.dev/ai/slack-mcp-server/ (checked 2026-11-08).
22
+ display_information:
23
+ name: "Capybara connector"
24
+ description: Lets Capybara agents use Slack as you, with your permission.
25
+ background_color: "#3d2f24"
26
+ oauth_config:
27
+ redirect_urls:
28
+ - "{{oauthCallbackUrl}}"
29
+ scopes:
30
+ user:
31
+ - search:read.public
32
+ - search:read.private
33
+ - search:read.mpim
34
+ - search:read.im
35
+ - search:read.files
36
+ - search:read.users
37
+ - channels:history
38
+ - groups:history
39
+ - mpim:history
40
+ - im:history
41
+ - channels:read
42
+ - groups:read
43
+ - mpim:read
44
+ - im:read
45
+ - channels:write
46
+ - groups:write
47
+ - mpim:write
48
+ - im:write
49
+ - chat:write
50
+ - canvases:read
51
+ - canvases:write
52
+ - lists:read
53
+ - lists:write
54
+ - files:read
55
+ - files:write
56
+ - reactions:read
57
+ - reactions:write
58
+ - emoji:read
59
+ - users:read
60
+ - users:read.email
61
+ settings:
62
+ is_mcp_enabled: true
63
+ org_deploy_enabled: false # true for an Enterprise Grid org-wide install
64
+ socket_mode_enabled: false
65
+ token_rotation_enabled: false
66
+ ```
67
+
68
+ ::check capybara:public-url The platform has a public URL
69
+
70
+ ## 2. Keep the app internal
71
+
72
+ - Leave **Manage Distribution** off. Slack's MCP server serves only internal apps and Marketplace
73
+ apps.
74
+ - Do **not** enable PKCE in the app settings: it turns the app into a public client for good.
75
+ Capybara stays a confidential client.
76
+ - Keep token rotation off (the manifest does); without it user tokens do not expire.
77
+ - Approve or install the app as your workspace requires (with "Only allow pre-approved apps", a
78
+ workspace admin approves it; on Enterprise Grid, an org admin).
79
+
80
+ ## 3. Enter the client
81
+
82
+ Copy **Basic Information → App Credentials → Client ID** and **Client Secret** into the fields
83
+ below. The secret is stored encrypted and reads back only as "set".
84
+
85
+ ::check capybara:oauth-client The client id and secret are entered
86
+ ::check capybara:oauth-token-endpoint Slack accepts the client id and secret
87
+ ::check capybara:connector-tools A member connected and the tool list was read
88
+
89
+ ### Reusing the bot app instead
90
+
91
+ You can add the user scopes, turn on MCP and add the redirect URL `{{oauthCallbackUrl}}` to the
92
+ bot's app instead, as long as token rotation stays off (rotation is app-wide and would expire the
93
+ bot's `xoxb` token). Slack prefix-matches redirect URLs, so one entry `{{publicUrl}}/api/v1/`
94
+ covers this callback and the Sign in with Slack callback `{{signInCallbackUrl}}`.
95
+
96
+ ## When the plugin changes this manifest
97
+
98
+ After an update that changes the scopes, Capybara shows a notice on the connector. Paste the new
99
+ manifest under **App Manifest**, save, and confirm here with **I have updated the Slack app**.
100
+ Members reconnect when Slack asks them to.
101
+ :::
102
+
103
+ ::: audience member
104
+ ## Connect your Slack account
105
+
106
+ Choose **Connect** and approve on Slack's consent screen. Agents then act in Slack as you, and
107
+ writes (sending, creating, reacting, uploading) ask you first unless your admin changed that.
108
+
109
+ **Disconnect** deletes the token in Capybara but does not revoke it at Slack: also remove the app
110
+ under your Slack profile's **Apps**, or ask a workspace admin.
111
+
112
+ ::check capybara:connector-connected Your Slack account is connected
113
+ :::
@@ -0,0 +1,107 @@
1
+ # 设置 Slack 连接器
2
+
3
+ Slack 连接器让智能体通过 Slack 的 MCP 服务器,**以使用者本人的身份**搜索、读取和发送 Slack 消息、
4
+ 画布、列表和文件。每个成员连接自己的 Slack 账号,组织没有共用的令牌。
5
+
6
+ ::: audience admin
7
+ 由组织管理员设置一次:创建一个内部 Slack 应用(与机器人应用分开),再把它的 Client ID 和
8
+ Client Secret 填到这里。之后成员各自连接。
9
+
10
+ ## 1. 创建 OAuth 应用
11
+
12
+ 打开 <https://api.slack.com/apps>,在公司工作区选择 **Create New App → From a manifest**,粘贴
13
+ 下面的 manifest。它会开启 MCP,并申请 {{templateName}} 模板需要的用户权限。
14
+
15
+ ```yaml title="应用 manifest(Slack 连接器)"
16
+ # Slack app manifest for the "{{templateName}}" connector template ({{pluginName}} {{pluginVersion}}).
17
+ # A separate internal app: user scopes only, MCP on, no bot, no Socket Mode.
18
+ # Reference: https://docs.slack.dev/reference/app-manifest and
19
+ # https://docs.slack.dev/ai/slack-mcp-server/ (checked 2026-11-08).
20
+ display_information:
21
+ name: "Capybara connector"
22
+ description: Lets Capybara agents use Slack as you, with your permission.
23
+ background_color: "#3d2f24"
24
+ oauth_config:
25
+ redirect_urls:
26
+ - "{{oauthCallbackUrl}}"
27
+ scopes:
28
+ user:
29
+ - search:read.public
30
+ - search:read.private
31
+ - search:read.mpim
32
+ - search:read.im
33
+ - search:read.files
34
+ - search:read.users
35
+ - channels:history
36
+ - groups:history
37
+ - mpim:history
38
+ - im:history
39
+ - channels:read
40
+ - groups:read
41
+ - mpim:read
42
+ - im:read
43
+ - channels:write
44
+ - groups:write
45
+ - mpim:write
46
+ - im:write
47
+ - chat:write
48
+ - canvases:read
49
+ - canvases:write
50
+ - lists:read
51
+ - lists:write
52
+ - files:read
53
+ - files:write
54
+ - reactions:read
55
+ - reactions:write
56
+ - emoji:read
57
+ - users:read
58
+ - users:read.email
59
+ settings:
60
+ is_mcp_enabled: true
61
+ org_deploy_enabled: false # true for an Enterprise Grid org-wide install
62
+ socket_mode_enabled: false
63
+ token_rotation_enabled: false
64
+ ```
65
+
66
+ ::check capybara:public-url 平台已设置公网地址
67
+
68
+ ## 2. 保持应用为内部应用
69
+
70
+ - 不要开启 **Manage Distribution**。Slack 的 MCP 服务器只服务内部应用和 Marketplace 应用。
71
+ - **不要**在应用设置里开启 PKCE:开启后应用会永久变成公开客户端。Capybara 始终是机密客户端。
72
+ - 保持令牌轮换关闭(manifest 已关闭);不轮换时用户令牌不会过期。
73
+ - 按工作区的要求批准或安装应用(开启了「Only allow pre-approved apps」时由工作区管理员批准;
74
+ Enterprise Grid 上由组织管理员批准)。
75
+
76
+ ## 3. 填写客户端
77
+
78
+ 把 **Basic Information → App Credentials → Client ID** 和 **Client Secret** 填进下方的字段。
79
+ 密钥加密存储,读回时只显示「已设置」。
80
+
81
+ ::check capybara:oauth-client 已填写 Client ID 和 Client Secret
82
+ ::check capybara:oauth-token-endpoint Slack 接受该 Client ID 和 Client Secret
83
+ ::check capybara:connector-tools 已有成员连接并读取到工具列表
84
+
85
+ ### 改用机器人应用
86
+
87
+ 也可以把这些用户权限、MCP 开关和重定向地址 `{{oauthCallbackUrl}}` 加到机器人应用上,前提是令牌
88
+ 轮换保持关闭(轮换对整个应用生效,会让机器人的 `xoxb` 令牌过期)。Slack 按前缀匹配重定向地址,
89
+ 所以一条 `{{publicUrl}}/api/v1/` 就能同时覆盖这个回调和 Slack 登录的回调 `{{signInCallbackUrl}}`。
90
+
91
+ ## 插件更新了 manifest 时
92
+
93
+ 插件更新并改动了权限后,Capybara 会在连接器上显示提示。在 **App Manifest** 粘贴新的 manifest
94
+ 并保存,然后在这里点 **我已更新 Slack 应用** 确认。Slack 要求时,成员重新连接。
95
+ :::
96
+
97
+ ::: audience member
98
+ ## 连接你的 Slack 账号
99
+
100
+ 点 **连接**,在 Slack 的授权页面上同意。之后智能体会以你的身份在 Slack 中操作;写操作(发送、
101
+ 创建、回应、上传)会先征求你的同意,除非管理员改了设置。
102
+
103
+ **断开连接** 会删除 Capybara 中的令牌,但不会在 Slack 端撤销它:请同时在 Slack 个人资料的
104
+ **Apps** 中移除该应用,或请工作区管理员处理。
105
+
106
+ ::check capybara:connector-connected 你的 Slack 账号已连接
107
+ :::
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capybara-hq/plugin-slack",
3
- "version": "0.1.0-rc.4",
3
+ "version": "0.1.0-rc.5",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Slack (channel@1 bot over Socket Mode with Block Kit cards, identity-source@1 Sign in with Slack, directory@1)",
@@ -1,52 +0,0 @@
1
- # Slack app manifest for the Slack connector of the Capybara Slack plugin (connectors/slack.json).
2
- # A separate internal app "Capybara connector": user scopes only, MCP on, no bot, no Socket Mode.
3
- # Paste it at https://api.slack.com/apps -> Create New App -> From a manifest, in the company
4
- # workspace, after replacing the redirect URL with <http.publicUrl>/api/v1/oauth/callback.
5
- # Leave Manage Distribution off (internal app) and do not enable PKCE (see README.md).
6
- # Reference: https://docs.slack.dev/reference/app-manifest and
7
- # https://docs.slack.dev/ai/slack-mcp-server/ (checked 2026-11-08).
8
- display_information:
9
- name: Capybara connector
10
- description: Lets Capybara agents use Slack as you, with your permission.
11
- background_color: "#3d2f24"
12
- oauth_config:
13
- redirect_urls:
14
- - https://capybara.example.com/api/v1/oauth/callback
15
- scopes:
16
- # The user scopes Slack's MCP server supports; the connector template asks for exactly these.
17
- user:
18
- - search:read.public
19
- - search:read.private
20
- - search:read.mpim
21
- - search:read.im
22
- - search:read.files
23
- - search:read.users
24
- - channels:history
25
- - groups:history
26
- - mpim:history
27
- - im:history
28
- - channels:read
29
- - groups:read
30
- - mpim:read
31
- - im:read
32
- - channels:write
33
- - groups:write
34
- - mpim:write
35
- - im:write
36
- - chat:write
37
- - canvases:read
38
- - canvases:write
39
- - lists:read
40
- - lists:write
41
- - files:read
42
- - files:write
43
- - reactions:read
44
- - reactions:write
45
- - emoji:read
46
- - users:read
47
- - users:read.email
48
- settings:
49
- is_mcp_enabled: true
50
- org_deploy_enabled: false # true for an Enterprise Grid org-wide install
51
- socket_mode_enabled: false
52
- token_rotation_enabled: false