Skip to content

feat: add agents.conversations.* methods - #1647

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

zimeg wants to merge 2 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 the Java Web API client, extending the existing agents.* namespace (agents.sessions.* already ships). All 9 require the bot scope code_channels:manage.

Method Rate limit Notes
agents.conversations.create t2 Create a dedicated code channel for an agent session
agents.conversations.archive t2 Archive a code channel
agents.conversations.setProperties t3 Set properties on a code channel
agents.conversations.setView t3 Create or update a view in a code channel
agents.conversations.setCommands t1 Register the agent's slash commands for a code channel
agents.conversations.listViews t3 List the views attached to a code channel
agents.conversations.removeView t3 Remove a view from a code channel
agents.conversations.getCanvas t3 Fetch a canvas attached to a code channel
agents.conversations.setCanvasContent t3 Replace the full markdown content of a plan canvas

Notes

  • Experimental / draft. Slack Code (code channels) is in a developer-GA state; the API and its docs are still landing (docs PR Unable to connect to RTM Api using java-slack-sdk #816). This PR is a draft pending API + docs stabilization. Request/response shapes may change before GA.
  • Arg-name caveat preserved. getCanvas and setCanvasContent take the channel argument (modeled as the channel field); the other 7 take channel_id (modeled as channelId).
  • No legacy codeChannels.* names are added (per the 2026-09-23 decision to ship agents.conversations.* only).
  • Honest, minimal shapes. Undocumented complex/object args (code_channel, agent_resource, csp, commands) are exposed as JSON-encoded String params (the *AsString pattern, mirroring blocks.validate) rather than guessing nested models; setView additionally accepts a typed List<LayoutBlock> for blocks. Response classes carry only the common top-level fields (ok/error/warning/needed/provided) because the API reference does not yet document response bodies.

Files

18 new request/response classes under com.slack.api.methods.{request,response}.agents.conversations, plus wiring in MethodsClient / MethodsClientImpl, AsyncMethodsClient / AsyncMethodsClientImpl, RequestFormBuilder, the Methods constants, and MethodsRateLimits.

Testing

  • mvn -pl slack-api-client -am compile — BUILD SUCCESS
  • mvn -pl slack-api-client -am test-compile — BUILD SUCCESS
  • MethodsTest (endpoint coverage) + MethodsRateLimitsTest — green (3 tests, 0 failures)
  • Remote API integration tests were not run (require live Slack credentials).

🤖 Generated with Claude Code

Add the 9 Slack Code / code channel Web API methods to the Java Web API
client, extending the existing agents.* namespace (agents.sessions.*
already ships):

- agents.conversations.create
- agents.conversations.archive
- agents.conversations.setProperties
- agents.conversations.setView
- agents.conversations.setCommands
- agents.conversations.listViews
- agents.conversations.removeView
- agents.conversations.getCanvas
- agents.conversations.setCanvasContent

All require the bot scope code_channels:manage. Arg schemas follow docs
PR #816. getCanvas + setCanvasContent use the `channel` arg (not
`channel_id`); the rest use `channel_id`. Only agents.conversations.*
names are added — no legacy codeChannels.* aliases (decision 2026-09-23).

Undocumented complex/object args (code_channel, agent_resource, csp,
commands) are exposed as JSON-encoded String params (the *AsString
pattern, mirroring blocks.validate) rather than guessing nested shapes;
setView also accepts a typed List<LayoutBlock>. Response classes carry
only the common top-level fields since the API reference does not yet
document response bodies (Slack Code is developer-GA).

Wires each method into MethodsClient/Impl, AsyncMethodsClient/Impl,
RequestFormBuilder, the Methods constants, and MethodsRateLimits.

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

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 8.33333% with 99 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.31%. Comparing base (49b62a6) to head (a9f095b).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...java/com/slack/api/methods/RequestFormBuilder.java 0.00% 63 Missing ⚠️
...slack/api/methods/impl/AsyncMethodsClientImpl.java 0.00% 18 Missing ⚠️
.../com/slack/api/methods/impl/MethodsClientImpl.java 0.00% 18 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1647      +/-   ##
============================================
- Coverage     72.79%   72.31%   -0.48%     
  Complexity     4550     4550              
============================================
  Files           483      483              
  Lines         14456    14564     +108     
  Branches       1513     1516       +3     
============================================
+ Hits          10523    10532       +9     
- Misses         3038     3137      +99     
  Partials        895      895              
Flag Coverage Δ
jdk-14 72.31% <8.33%> (-0.48%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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: add agents.conversations.* code channel methods feat: add agents.conversations.* methods Sep 24, 2026

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant