Skip to content

feat(slack): close platform tools gap for assistants#2887

Merged
danielkov merged 5 commits into
mainfrom
daniel/age-2376-close-slack-platform-tools-gap-so-assistants-can-fully
May 20, 2026
Merged

feat(slack): close platform tools gap for assistants#2887
danielkov merged 5 commits into
mainfrom
daniel/age-2376-close-slack-platform-tools-gap-so-assistants-can-fully

Conversation

@danielkov
Copy link
Copy Markdown
Contributor

Summary

Closes AGE-2376.

Adds 53 new Slack Web API tools under server/internal/platformtools/slack/ so assistants can manage the full Slack message and channel lifecycle instead of only reading.

Coverage by API family:

  • chat.*update, delete, postEphemeral, getPermalink, deleteScheduledMessage, scheduledMessages.list, meMessage
  • conversations.*info, members, open, create, join, leave, invite, setTopic, setPurpose, mark, archive, unarchive, rename, kick
  • users.* / dnd.*users.lookupByEmail, users.conversations, users.getPresence, users.profile.get, dnd.info, dnd.teamInfo
  • reminders.*add, list, complete, delete, info (user-token)
  • files.* — combined upload (getUploadURLExternal + PUT + completeUploadExternal), info, list, delete
  • pins / bookmarks / usergroups / teampins.add|remove|list, bookmarks.add|edit|remove|list, usergroups.list, usergroups.users.list, team.info
  • canvases.*create, edit, delete, sections.lookup, access.set, access.delete, conversations.canvases.create

Each tool registers in the platformtools registry and contributes its bot/user scopes to the dashboard onboarding manifest so the generated Slack app deep link picks them up. reminders:read|write are user-only scopes appended to SLACK_USER_SCOPES; everything else lands in the bot-scope superset via SLACK_TOOL_SCOPES.

Out of scope (per the issue): views.*, workflows.*, triggers.*, admin.*, rtm.*, and assistant.threads.* (optional, deferred until we own a native Slack assistant surface).

✻ Clauded...

danielkov added 2 commits May 17, 2026 14:39
Add 53 new Slack Web API tools so assistants can manage the full
message and channel lifecycle, not just read. Covers chat.* (update,
delete, ephemeral, permalink, scheduled-message admin, meMessage),
conversations.* (info, members, open, create, join/leave, invite,
topic/purpose, archive/unarchive, rename, kick, mark), users.* +
dnd.* (lookup by email, presence, profile fields, conversations,
dnd info/teamInfo), reminders.*, files.* (combined upload flow plus
info/list/delete), pins.*, bookmarks.*, usergroups.list +
usergroups.users.list, team.info, and canvases.* (create/edit/delete,
sections.lookup, access set/delete, channel canvases).

Each tool registers in the platformtools registry and contributes
its bot/user scopes to the dashboard onboarding manifest so the
generated Slack app deep link picks them up.
Use require.Empty for empty-form-value check; replace require.NoError
inside httptest handler goroutines with t.Errorf so the linter is
happy and a failing assertion doesn't abort the handler goroutine
mid-request.
@danielkov danielkov requested review from a team as code owners May 17, 2026 13:40
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 17, 2026

AGE-2376

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gram-docs-redirect Ready Ready Preview, Comment May 17, 2026 7:09pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 17, 2026

🦋 Changeset detected

Latest commit: b4bb107

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
server Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the preview Spawn a preview environment label May 17, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a170035039

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread client/dashboard/src/pages/assistants/onboarding/slackManifest.ts Outdated
Comment thread server/internal/platformtools/slack/tool_set_canvas_access.go Outdated
Comment thread server/internal/platformtools/slack/tool_edit_canvas.go Outdated
@speakeasybot
Copy link
Copy Markdown
Collaborator

speakeasybot commented May 17, 2026

🚀 Preview Environment (PR #2887)

Preview URL: https://pr-2887.dev.getgram.ai

Component Status Details Updated (UTC)
✅ Database Ready Existing database reused 2026-05-20 12:02:59.
✅ Images Available Container images ready 2026-05-20 12:02:32.

Gram Preview Bot

- slackManifest: drop user-only `channels:write` from bot scopes;
  `channels:manage` (already present) is the bot-token equivalent
  for conversation-management methods, and Slack rejects manifests
  that put user-only scopes in `oauth_config.scopes.bot`.
- tool_set_canvas_access: reject mixed channel_ids + user_ids;
  canvases.access.set returns invalid_parameters when both target
  kinds are set.
- tool_edit_canvas: accept a single `change` instead of a list;
  Slack canvases.edit currently processes only one operation per
  call and silently dropping the tail in a batched call hides the
  problem from the assistant.
@danielkov
Copy link
Copy Markdown
Contributor Author

Addressed all three Codex review findings in 037fb85:

  • P1 — bot manifest with user-only channels:write: dropped channels:write from every entry in SLACK_TOOL_SCOPES. channels:manage was already present alongside it on each affected method, so the bot-token equivalent is preserved.
  • P2 — tool_set_canvas_access mixed targets: now rejects requests that set both channel_ids and user_ids (returns the same "mutually exclusive" guidance Slack would surface as invalid_parameters).
  • P2 — tool_edit_canvas multi-change: schema now takes a single change object instead of an ordered list. Multi-step edits become multiple tool calls.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 037fb857b4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread server/internal/platformtools/slack/tool_set_canvas_access.go Outdated
Comment thread server/internal/platformtools/slack/tool_remove_canvas_access.go Outdated
- set_canvas_access: drop the `none` access level from the schema
  hint; Slack rejects it on canvases.access.set, and revocation
  belongs on remove_canvas_access (canvases.access.delete).
- remove_canvas_access: require at least one of channel_ids/user_ids;
  canvases.access.delete returns invalid_parameters when both are
  empty, so the previous "all non-owners" wording was a dead path.
@danielkov
Copy link
Copy Markdown
Contributor Author

Round 2 — second batch of Codex findings addressed in 378f002:

  • set_canvas_access: schema no longer advertises none as a valid access_level. Revocation lives on remove_canvas_access (which calls canvases.access.delete).
  • remove_canvas_access: now requires at least one of channel_ids/user_ids; the "removes for all non-owners when both empty" claim was never honored by canvases.access.delete.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 378f002781

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread server/internal/platformtools/slack/tool_upload_file.go
files.completeUploadExternal takes a single `channel_id`. The
previous description told the model it could pass a comma-separated
list, which Slack rejects as an invalid channel. Multi-channel
sharing now becomes multiple tool calls.
@danielkov
Copy link
Copy Markdown
Contributor Author

Round 3 — addressed in b4bb107. files.completeUploadExternal is single-channel via channel_id; the schema description no longer suggests a comma-separated list.

@danielkov danielkov added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit 0ef489c May 20, 2026
30 checks passed
@danielkov danielkov deleted the daniel/age-2376-close-slack-platform-tools-gap-so-assistants-can-fully branch May 20, 2026 12:01
@github-actions github-actions Bot locked and limited conversation to collaborators May 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

preview Spawn a preview environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants