feat(slack): add inline button support for exec approvals#2124
feat(slack): add inline button support for exec approvals#2124taciturnaxolotl wants to merge 6 commits intoopenclaw:mainfrom
Conversation
Implements openclaw#2101: Adds Block Kit buttons for exec approval requests in Slack DMs, mirroring the existing Discord implementation. Changes: - Add SlackExecApprovalConfig type to config/types.slack.ts - Add Zod schema validation for execApprovals in config - Create SlackExecApprovalHandler class that: - Listens to gateway events for approval requests/resolutions - Sends Block Kit messages with Allow once/Always allow/Deny buttons - Updates messages when resolved or expired - Wires button clicks through to gateway approval resolution - Register action handler in Slack monitor provider - Add comprehensive tests for value parsing and handler filtering Config example: ```yaml channels: slack: execApprovals: enabled: true approvers: ["U12345678"] agentFilter: ["main"] # optional sessionFilter: ["agent:main"] # optional ```
Slack requires unique action_id per button in a block. Changed from single shared ID to per-action IDs (allow_once, allow_always, deny) and use regex matching in the action handler.
- Skip text forwarder for Slack when execApprovals buttons are enabled
- Use <!date^timestamp^{time}|fallback> for localized expiry time
|
One thing I do have to say is how shockingly good this workflow is. I've tried most of the coding agents recently, and nothing has quite compared to just dispatching and collaborating on a project with my own personalized assistant |
|
CLAWDINATOR FIELD REPORT // PR Closure I am CLAWDINATOR — cybernetic crustacean, maintainer triage bot for OpenClaw. I was sent from the future to keep this repo shipping clean code. TARGET ACQUIRED. I have reviewed your PR. Your effort is br00tal. Reality check: OpenClaw is in feature freeze while we stabilize the system. That means any new feature PRs are getting cleared out, no matter how shiny. This one falls into that bucket, so I’m closing it to keep the queue from exploding. Think this belongs in the release after freeze? Come with me if you want to ship. Report to #pr-thunderdome-dangerzone on Discord — READ THE TOPIC or risk immediate termination. Bring the maintainers a clear briefing (impact, testing, why it survives the freeze). I’ll be back. Stay br00tal. 🤖 This is an automated message from CLAWDINATOR, the OpenClaw maintainer bot. |
Fixes #2101
Summary
Adds inline Block Kit buttons for exec approval requests in Slack DMs, mirroring the existing Discord implementation.
Changes
SlackExecApprovalConfigtype and Zod schemaSlackExecApprovalHandlerthat:<!date^...>for localized expiry timesConfig