Commit Graph

3 Commits

Author SHA1 Message Date
Kieran Klukas
f6be8845b2
fix(slack): prevent duplicate messages and use Slack date formatting
- Skip text forwarder for Slack when execApprovals buttons are enabled
- Use <!date^timestamp^{time}|fallback> for localized expiry time
2026-01-26 02:41:51 -05:00
Kieran Klukas
07ae264704
fix(slack): use unique action_ids for approval buttons
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.
2026-01-26 02:29:32 -05:00
Kieran Klukas
26cd21e73b
feat(slack): add inline button support for exec approvals
Implements #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
```
2026-01-26 01:54:50 -05:00