33 lines
2.4 KiB
Markdown
33 lines
2.4 KiB
Markdown
# Slack tools for the agent
|
|
|
|
Let the agent act in Slack: write canvases and lists, add bookmarks and pins, set the channel topic, look people up, use custom emoji.
|
|
|
|
## Don't hand the bot token to containers
|
|
|
|
With `channels:history` and the other read scopes, a container holding the bot token could read every channel the bot is in, and anyone who can talk to a channel's agent could make it do so. Instead, the bot keeps the token and exposes a narrow set of tools.
|
|
|
|
## Shape
|
|
|
|
- The bot exposes the tools through the same in-container MCP server as `send_file` (`internal/tools`). The container side stays a thin relay: it forwards each call to the bot, and the bot answers.
|
|
- **Getting calls to the bot:** the relay talks back over the agent connection the bot already has open (a new ACP extension method such as `_slackerbot/call`, which goose would pass through from the MCP server, if it can), or over a new stream from container → node → master. The second option is a new direction on the cluster link (slave → master) and has to be additive, because masters and slaves may run different versions for a while.
|
|
- **Every call is scoped to the session's owner:** the channel (or the user's DM) and its threads. The bot checks this, not the container.
|
|
|
|
## Tools
|
|
|
|
| Tool | Scope | Notes |
|
|
|---|---|---|
|
|
| `create_canvas`, `edit_canvas` | `canvases:write`, `canvases:read` | Channel canvas, or a standalone canvas shared into the thread |
|
|
| `create_list`, `add_list_item` | `lists:write`, `lists:read` | |
|
|
| `add_bookmark`, `list_bookmarks` | `bookmarks:write`, `bookmarks:read` | Channel only |
|
|
| `pin_message`, `list_pins` | `pins:write`, `pins:read` | Messages in this conversation only |
|
|
| `set_topic` | `channels:write.topic` | Channel only. Probably behind a new permission, since it changes what everyone sees |
|
|
| `lookup_user` | `users:read`, `users:read.email` | Only users in this conversation. Email is handy for git commit authors |
|
|
| `list_emoji` | `emoji:read` | |
|
|
| `workspace_info` | `team:read` | Name and domain, for building links |
|
|
| `post_to_channel` | `chat:write.public` | Only if we decide the agent may post outside its own conversation. Probably not |
|
|
|
|
## Before building
|
|
|
|
- Decide which tools need a permission (`set_topic` and `post_to_channel` at least), and add it to `model` and USERGUIDE.
|
|
- Drop from the manifest any scope we decide not to use, since Slack lists every scope on the install screen.
|