Skip to content

feat(web-api): add agents.conversations.* methods - #2748

Draft
zimeg wants to merge 5 commits into
mainfrom
clack/agents-conversations-methods
Draft

zimeg wants to merge 5 commits into
mainfrom
clack/agents-conversations-methods

Conversation

@zimeg

@zimeg zimeg commented Sep 23, 2026

Copy link
Copy Markdown
Member

Summary

Adds the 9 Slack Code (code channel) Web API methods to @slack/web-api, under the agents.conversations.* namespace. Slack Code / code channels are going dev-GA; these type the client for that work.

All 9 methods require the code_channels:manage bot scope:

  • agents.conversations.create — create a dedicated code channel for an agent session
  • agents.conversations.archive — archive a code channel
  • agents.conversations.setProperties — set properties on a code channel
  • agents.conversations.setView — create or update a view in a code channel
  • agents.conversations.setCommands — register agent-defined slash commands (commands is required)
  • agents.conversations.listViews — list the views 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 a plan canvas's markdown content

Notes

  • Argument names preserved verbatim from the API schemas: getCanvas and setCanvasContent take channel (not channel_id); the other seven take channel_id. This asymmetry is intentional and matches the method definitions.
  • Response types follow this package's auto-generated shape (minimal WebAPICallResult extensions). Because these are net-new methods with no java-slack-sdk samples yet, the response files are hand-written minimal/honest stubs rather than codegen output; they can be regenerated once samples land.
  • No legacy codeChannels.* names — only the agents.conversations.* names are shipped, per the SDK naming decision (2026-09-23).
  • Argument interfaces were typed from the agents.conversations.* method schemas in docs PR Add TypeScript definitions for events #816.

Status

Experimental / draft — pending the API going dev-GA and docs PR #816 landing. Opened as a draft on purpose.

Testing

  • npm run build --workspace=packages/web-api (tsc typecheck) — clean
  • npx @biomejs/biome check packages — clean (666 files)
  • npm test --workspace=packages/web-api — 152/152 pass

🤖 Generated with Claude Code

Add the 9 Slack Code (code channel) Web API methods to @slack/web-api:
create, archive, setProperties, setView, setCommands, listViews,
removeView, getCanvas, setCanvasContent — all requiring the
code_channels:manage bot scope.

Argument interfaces are hand-typed from the docs #816 method schemas.
Per those schemas, getCanvas and setCanvasContent use `channel` (not
`channel_id`); the other seven use `channel_id`. Response types follow
the repo's auto-generated shape; since these are net-new methods with no
java-slack-sdk samples yet, they are hand-written minimal WebAPICallResult
extensions rather than codegen output.

Only agents.conversations.* names are added — the legacy codeChannels.*
names are intentionally not shipped (decision 2026-09-23).

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9a1fec4

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

This PR includes changesets to release 1 package
Name Type
@slack/web-api 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

@codecov

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.36%. Comparing base (334e6a6) to head (9a1fec4).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2748      +/-   ##
==========================================
+ Coverage   89.15%   89.36%   +0.20%     
==========================================
  Files          65       65              
  Lines       10442    10534      +92     
  Branches      480      480              
==========================================
+ Hits         9310     9414     +104     
+ Misses       1100     1090      -10     
+ Partials       32       30       -2     
Flag Coverage Δ
cli-hooks 89.21% <100.00%> (+0.09%) ⬆️
cli-test 89.21% <100.00%> (+0.09%) ⬆️
logger 89.21% <100.00%> (+0.09%) ⬆️
oauth 89.21% <100.00%> (+0.09%) ⬆️
socket-mode 89.21% <100.00%> (+0.09%) ⬆️
web-api 89.21% <100.00%> (+0.09%) ⬆️
webhook 89.21% <100.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…+ drop channel remark

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@zimeg zimeg changed the title feat(web-api): add agents.conversations.* code channel methods feat(web-api): add agents.conversations.* methods Sep 24, 2026
@zimeg zimeg self-assigned this Sep 25, 2026
@zimeg zimeg added semver:minor enhancement M-T: A feature request for new functionality pkg:web-api applies to `@slack/web-api` labels Sep 25, 2026
@zimeg zimeg added this to the web-api@next milestone Sep 25, 2026
zimeg and others added 3 commits September 25, 2026 14:04
Order the 9 agents.conversations method registrations (methods.ts) and
their request-argument interfaces (types/request/agents.ts)
alphabetically: archive, create, getCanvas, listViews, removeView,
setCanvasContent, setCommands, setProperties, setView. Pure reorder;
tsc --noEmit clean.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… add type tests

Six agents.conversations methods (archive, create, listViews, removeView,
setProperties, setView) were bound with bindApiCallWithOptionalArgument,
so calling them with no argument type-checked despite channel_id/name
being required. Switch all nine to bindApiCall (required argument) for
parity with getCanvas/setCanvasContent/setCommands, and add
test/types/methods/agents.test-d.ts covering the sad/happy paths for
each (tsd clean; tsc --noEmit clean).

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality pkg:web-api applies to `@slack/web-api` semver:minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant