Skip to content

feat(methods): add agents.conversations.* method examples - #262

Draft
zimeg wants to merge 3 commits into
mainfrom
clack/code-channels-method-examples
Draft

zimeg wants to merge 3 commits into
mainfrom
clack/code-channels-method-examples

Conversation

@zimeg

@zimeg zimeg commented Sep 24, 2026

Copy link
Copy Markdown
Member

Adds example snippets for the Slack Code code-channel Web API methods, under the agents.conversations.* family (methods/src/agents/conversations/) — the Node counterpart to bolt-python-examples #194:

  • agents.conversations.create — create a dedicated code channel for an agent session
  • agents.conversations.archive — archive a code channel (optionally recording a summary message)
  • agents.conversations.setProperties — set properties on a code channel (context bar items, external resource details)
  • agents.conversations.setView — create or update a view (HTML, diff, Block Kit, or canvas tabs)
  • agents.conversations.setCommands — register the agent's slash commands in a code channel
  • agents.conversations.listViews — list the view tabs attached to a code channel
  • agents.conversations.removeView — remove a view from a code channel
  • agents.conversations.getCanvas — fetch a canvas attached to a code channel
  • agents.conversations.setCanvasContent — replace the full markdown content of a plan canvas

Each snippet mirrors the existing agents.sessions examples: import WebClient, read SLACK_TOKEN, call client.agents.conversations.<method>({ ... }), log the response. The app manifest declares the code_channels feature and the code_channels:manage scope. Snake_case argument keys (origin_channel_id, channel_id, canvas_id, …) match @slack/web-api's convention.

The rename example lives in the sibling agents.sessions examples, so there is no agents.conversations.rename here.

Dependency — stays DRAFT

Depends on the agents.conversations.* methods landing in a published @slack/web-api release (SDK realign slackapi/node-slack-sdk#2748). The methods typecheck job will fail against the currently-released SDK because these methods aren't in a release yet — that is expected (executable-spec pattern). This PR stays DRAFT until #2748 ships and the pinned @slack/web-api version includes the methods.

Explicitly no legacy codeChannels.* method names — we ship agents.conversations.* only, mirroring the SDK realign.

🤖 Generated with Claude Code

zimeg and others added 3 commits September 23, 2026 17:21
Adds example snippets for the Slack Code code-channel Web API methods,
under the agents.conversations.* family (methods/src/agents/conversations/).
Node counterpart to bolt-python-examples #194.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Set socket_mode_enabled: true so the example app can register agent
slash commands. agents.conversations.setCommands returns no_actions_url
unless the app has either a code_channels.slash_command_url or Socket
Mode; Socket Mode routes command invocations automatically with no
public URL to stand up.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Align each example payload with the request example on its
docs.slack.dev reference page:
- create: session_id + 'Migrate billing cron to Temporal'
- archive: summary_message_ts
- setProperties: full 4-item context_bar_items (repo/branch/pr/ci)
- setView: html view with view_key/name/csp
- setCommands: create-pr (argument_hint) / run-tests / summarize
- removeView: identify by view_key
- getCanvas: include_resolved
- setCanvasContent: migration-plan content

Duplicates the canonical examples rather than inventing variants.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant