Skip to content

feat(slack): allow direct posts with standing consent - #974

Merged
nixuuu merged 1 commit into
devfrom
feat/allow-consented-agent-sends
Nov 18, 2026
Merged

nixuuu merged 1 commit into
devfrom
feat/allow-consented-agent-sends

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 18, 2026

Copy link
Copy Markdown
Member

Change

  • Let Canopy post and reply in Slack as the installed app. The tool uses the existing Slack messaging authorization and connected-account grants.
  • Ask for the owner's first decision in a private bot conversation, including in Full auto. Always allow… saves consent for one bot, connected account and Slack conversation. Remove it in Allowed actions. Standing consent also covers follow-ups after a delegated thread finishes.
  • Apply the thread's connector permission mode in coding threads. The gateway verifies grants and account availability before dispatch and deduplicates write calls.

Verification

  • The gateway and integration test packages passed typechecking. Edited TypeScript files passed targeted formatting and lint checks. All test files have shard assignments.
  • Local integration coverage passed for Slack consent, different destinations, revocation, thread approvals, duplicate calls, connector sessions, shared Slack authorization, and existing Slack transport behavior. The focused Slack consent test passed again after the copy edits.
  • GitHub CI runs the full gate. Local tests used a Slack fixture. A live workspace send still needs verification.

Copy audit

  • The generic connector approval now identifies the action as Post as Canopy and asks Post this message in Slack?. The standing option identifies the connected account and conversation it covers.
  • Channel id and Thread ts became Channel and Reply to. The card shows the message in the existing approval controls.
  • Checked the existing approval card and menu in Chromium with short, typical, and long account names across desktop and phone widths in both color schemes. The focused integration test checks the final field labels and the standing option's scope.

@nixuuu
nixuuu enabled auto-merge (squash) November 18, 2026 16:15
nixuuu added a commit that referenced this pull request Nov 18, 2026
## Change

After a worker falls back from an unavailable saved secure route,
SIGTERM can race the first configuration probe. A probe that returns
after shutdown has stopped the CLI check timer can start it again. The
process then stays alive even after the journal and connections have
closed.

Check shutdown state before and after probing. Configuration that loses
the race is reported as unapplied. The next worker process applies the
configuration on connection.

Fixes: #967
Related: #974

## Verification

- Reproduced exit code 137 using the worker route migration test on the
commit for #967. The same test passed on its parent.
- All 8 tests in the worker route migration, worker shutdown, and worker
update cleanup suites passed with this change through `check:tmp`.
- Worker typecheck, targeted lint and formatting, and `git diff --check`
passed. GitHub CI runs the full gate.
@nixuuu
nixuuu force-pushed the feat/allow-consented-agent-sends branch from a3b9873 to 83b2847 Compare November 18, 2026 16:46
@nixuuu
nixuuu merged commit ab38acf into dev Nov 18, 2026
15 checks passed
@nixuuu
nixuuu deleted the feat/allow-consented-agent-sends branch November 18, 2026 16:53
nixuuu added a commit that referenced this pull request Nov 19, 2026
The gateway omitted the native Slack posting tool when building the
catalog for a bot routine. A scheduled run could read its destination
but could never reach the approval check, even when the owner had
already allowed that bot to post in the channel.

Expose the posting tool to routines and use the existing approval check
for the bot, Slack account and conversation. The integration test runs a
scheduled routine with a rule granted in private chat, verifies
delivery, revokes the rule, and verifies that the next run waits for
approval.

Fixes: #974

## Verification

The targeted integration test passed locally with `bun run check:tmp
./tests/integration/slack-post-approval.test.ts`. Lint passed on the
edited TypeScript files, and `git diff --check` passed. Repository-wide
checks run in CI.
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