Repository navigation
feat(adapters/slack): add the Web API methods that the Coder Agents Slack bot needs - #113
ethanndickson wants to merge 2 commits into
Conversation
…t needs Add OAuthV2Access, PostEphemeral, FileInfo with shares, SetAgentSessionStatus, and CreateApp and DeleteApp for apps.manifest. Add redirect_urls and agent_view to Manifest, and decoders for agent_session_stopped and channel_shared events.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Maintainer review. I accept this. The new methods fit Every merge check passes on Merge order: this PR is based on Not blocking: these methods are only tested against Generated with |
TestLiveApp creates an app from a manifest and deletes it, after it checks the invalid_manifest error list. TestLiveOAuth exchanges a code from a real install. TestLive also checks FileInfo shares and PostEphemeral. Document that agents.sessions.setStatus returns not_authorized when the manifest has no features.agent_view.
|
Thanks Thomas. I ran them against my test workspace and added them to the live tests.
One finding: |
|
@codex review |
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Thanks. That covers the live check I asked for. The opt-in This PR still merges after #112. I approved #112, and you are clear to merge it whenever you like. After GitHub retargets this PR to Generated with |
The Coder Agents Slack bot in coderd still needs a few Web API methods that
slackapidoesn't have yet, so this adds them on top of #112. coderd will build against this branch with ago.modreplace until it merges.There are typed methods for
oauth.v2.access(to exchange an install code for a bot token),chat.postEphemeral,files.infowith the file's shares,agents.sessions.setStatus, andapps.manifest.createandapps.manifest.delete, which you call with an app configuration token viaWithToken.Manifestgainsoauth_config.redirect_urlsandfeatures.agent_view, andEnvelopecan now decodeagent_session_stoppedandchannel_sharedevents.FileInforeturns aFileInfoResponsethat embedsFileand adds the shares, rather than putting the shares onFileitself, since the maps would makeFileno longer comparable.OAuthV2Accessnever sends the client's token, andCreateAppsends the manifest as a JSON string, as Slack expects. I haven't tried these against a real workspace yet; they're only tested againstslackapitest.