Commit Graph

141 Commits

Author SHA1 Message Date
lukeboyett
c39314c14a fix(agents): prefer target agent's bound Matrix account for subagent spawns (#67508)
Merged via squash.

Prepared head SHA: 9300111038
Co-authored-by: lukeboyett <46942646+lukeboyett@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-18 14:02:53 -04:00
Peter Steinberger
6b525023d4 fix: polish Slack thread starter context (#68594) 2026-04-18 18:45:29 +01:00
Peter Steinberger
df525b90f2 chore(lint): enable unnecessary type parameter rule 2026-04-18 18:31:13 +01:00
Peter Steinberger
aad9a833c0 fix: polish Slack thread fetch diagnostics (#68594) (thanks @martingarramon) 2026-04-18 17:55:05 +01:00
Martin Garramon
31e5cd6376 fix(slack): surface silent errors in thread starter/history fetch
Fixes #62571. `resolveSlackThreadStarter` and `resolveSlackThreadHistory`
in `extensions/slack/src/monitor/media.ts` swallowed ALL errors with bare
`catch {}` blocks — auth failures, rate-limit rejections, scope errors,
and network blips all mapped to the same silent `null` / `[]` fallback.
Operators had no way to distinguish "genuinely empty thread" from
"Slack rejected our call".

Replaces both bare catches with `logVerbose` calls that include the
channel, thread ts, and error message. Behavior is preserved — callers
still receive `null` / `[]` — but the failure reason now shows up in
verbose logs, matching the pattern already used elsewhere in the Slack
extension (see `monitor/context.ts:285`, `send.ts:140`, `actions.ts:49`).

Testing:
- New `describe("resolveSlackThreadStarter", ...)` block with 4 tests
  (previously uncovered): success path, empty-text skip, Error throw
  surfaces via logVerbose with channel/ts/reason, non-Error throw value
  surfaces via String(err).
- Existing `resolveSlackThreadHistory` throws test upgraded to assert
  the logVerbose call with channel/ts/reason.
- `pnpm vitest run extensions/slack/src/monitor/media.test.ts` → 35
  passed (31 previous + 4 new).
2026-04-18 17:55:05 +01:00
@zimeg
25ce5a5822 fix(slack): resolve stream recipient team in shared channels 2026-04-18 04:11:06 -07:00
Vincent Koc
2d26929ff1 test(slack): harden thread context fixture cleanup 2026-04-14 23:11:43 +01:00
@zimeg
d35bdf6311 refactor(slack): use packaged thread status method 2026-04-14 12:56:25 -07:00
@zimeg
1f14c8d96b fix(slack): fix slash commands with button arg menu errors
Co-authored-by: Wang Siyuan <wsy0227@sjtu.edu.cn>
2026-04-14 12:39:56 -07:00
Vincent Koc
df956f8162 test(slack): harden fixture cleanup retries 2026-04-14 19:51:21 +01:00
Agustin Rivera
1c35795fce fix(slack): align interaction auth with allowlists (#66028)
* fix(slack): align interaction auth with allowlists

* fix(slack): address review followups

* fix(slack): preserve explicit owners with wildcard

* chore: append Claude comments resolution worklog

* fix(slack): harden interaction auth with default-deny, mandatory actor binding, and channel type validation

- Add interactiveEvent flag to authorizeSlackSystemEventSender for stricter
  interactive control authorization
- Default-deny when no allowFrom or channel users are configured for
  interactive events (block actions, modals)
- Require expectedSenderId for all interactive event types; block actions
  pass Slack-verified userId, modals pass metadata-embedded userId
- Reject ambiguous channel types for interactive events to prevent DM
  authorization bypass via channel-type fallback
- Add comprehensive test coverage for all new behaviors

* fix(slack): scope interactive owner/allowFrom enforcement to interactive paths only

* fix(slack): preserve no-channel interactive default

* Update context-engine-maintenance test

* chore: remove USER.md worklog artifact

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* changelog: note Slack interactive auth allowlist alignment (#66028)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-13 20:38:11 -06:00
rafaelreis-r
68e0e456f3 fix: allow plugin commands on Slack when channel supports native commands (#64578)
Merged via squash.

Prepared head SHA: 2ec97bf0b3
Co-authored-by: rafaelreis-r <57492577+rafaelreis-r@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-04-13 13:14:02 -07:00
Vincent Koc
c73e80b5a7 fix(slack): make inbound retries explicit 2026-04-13 15:58:59 +01:00
Vincent Koc
ccbef550e5 fix(ci): restore extension boundary guards 2026-04-12 09:50:20 +01:00
Vincent Koc
eba501c303 test(slack): share private download redirect helper 2026-04-12 08:44:18 +01:00
Vincent Koc
1d1f10ecc2 test(slack): share thread message store fixtures 2026-04-12 05:24:01 +01:00
Vincent Koc
462d8e3bc0 fix(cycles): narrow channel runtime surface 2026-04-11 19:30:33 +01:00
Peter Steinberger
85c7748520 lint: enable no extraneous class 2026-04-11 01:45:06 +01:00
Peter Steinberger
776c8e037e perf: avoid heavy reply runtime imports 2026-04-11 01:18:11 +01:00
Peter Steinberger
11b0016e9e refactor: simplify provider channel conversions 2026-04-11 01:08:23 +01:00
Peter Steinberger
f3abc0c076 test: isolate media network fetches 2026-04-10 23:56:22 +01:00
Gustavo Madeira Santana
bd7801eefa Slack: key turn-local dedupe by dispatch kind
Scope Slack turn-local delivery dedupe by reply dispatch kind so identical tool and final payloads on the same thread do not collapse into one send.

Expose the existing dispatcher kind on the public reply-runtime seam and cover the Slack tracker and preview-fallback paths with regression tests.
2026-04-08 18:19:34 -04:00
Gustavo Madeira Santana
10c87527d5 Slack: dedupe partial streaming replies (#62859)
Merged via squash.

Prepared head SHA: cbecb50c06
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-08 17:55:30 -04:00
Peter Steinberger
95e397a266 refactor: dedupe repeated test helpers 2026-04-08 09:58:22 +01:00
Vincent Koc
952862b9e2 perf(plugins): narrow boundary compile import surfaces 2026-04-08 08:52:52 +01:00
Vincent Koc
55cbcd829d fix(slack): preserve auth on same-origin media redirects (#62996) (thanks @vincentkoc)
- Verified: pnpm build\n- Verified: pnpm test extensions/slack/src/monitor/media.test.ts\n- Verified: pnpm exec oxlint extensions/slack/src/monitor/media.ts extensions/slack/src/monitor/media.test.ts\n- Verified: pnpm exec oxfmt --check extensions/slack/src/monitor/media.ts extensions/slack/src/monitor/media.test.ts CHANGELOG.md\n\nRepo-wide pnpm lint and pnpm test were not clean on current main outside this fix, and the first full-suite test attempt from the default core sparse profile was additionally contaminated by missing ui/packages/OpenClawKit paths until they were materialized.
2026-04-08 08:11:27 +01:00
Peter Steinberger
aec24f4599 refactor: dedupe messaging trimmed readers 2026-04-08 01:36:39 +01:00
Peter Steinberger
2187b19d7e refactor: dedupe extension lowercase helpers 2026-04-07 22:24:32 +01:00
Gustavo Madeira Santana
28fc5d9b5e Plugin SDK: split approval adapter seams 2026-04-07 16:06:02 -04:00
Peter Steinberger
ba68537d9d refactor: dedupe line qqbot slack lowercase helpers 2026-04-07 20:58:01 +01:00
Gustavo Madeira Santana
d78512b09d Refactor: centralize native approval lifecycle assembly (#62135)
Merged via squash.

Prepared head SHA: b7c20a7398
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-07 14:40:26 -04:00
Peter Steinberger
f2b13b0a1a refactor: dedupe slack matrix venice lowercase helpers 2026-04-07 15:12:31 +01:00
Peter Steinberger
ce19b6bf6a refactor: dedupe channel extension readers 2026-04-07 08:40:34 +01:00
Peter Steinberger
625fd5b3e3 refactor: centralize inbound mention policy 2026-04-07 07:51:00 +01:00
Chunyue Wang
e8fb140642 fix: preserve Slack guarded media transport (#62239) (thanks @openperf)
* fix(slack ): prevent undici dispatcher leak to globalThis.fetch causing media download failure

* fix(slack): preserve guarded media transport

* fix: preserve Slack guarded media transport (#62239) (thanks @openperf)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-07 11:15:53 +05:30
Praktika Engineer
b8c8139138 feat(slack): add thread.requireExplicitMention config option (#58276)
* feat(slack): add thread.requireExplicitMention config option

When requireMention is true in a Slack channel, replying inside a thread
where the bot previously participated currently bypasses mention gating
via implicit mention detection. This makes the bot respond to every
thread message even without an explicit @mention.

Add channels.slack.thread.requireExplicitMention (default: false) which,
when set to true, suppresses implicit thread mentions. Only explicit
@bot mentions will trigger replies inside threads.

Closes #34389
Closes #49972

* slack: refresh changelog and generated config artifacts

* slack: restore bundled channel metadata generation

---------

Co-authored-by: praktika-devops <devops@praktika.ai>
Co-authored-by: George Pickett <gpickett00@gmail.com>
2026-04-06 17:05:11 -07:00
Peter Steinberger
ce87d5e242 refactor(deadcode): remove extension wrapper shims 2026-04-06 17:18:03 +01:00
Vincent Koc
6067f2d9ad chore(plugins): drop dead channel test any suppressions 2026-04-06 15:45:18 +01:00
Vincent Koc
3ded10f52a chore(plugins): drop dead test any suppressions 2026-04-06 15:43:48 +01:00
Peter Steinberger
af62a2c2e4 style: fix extension lint violations 2026-04-06 14:53:55 +01:00
Vincent Koc
4b2d528345 fix(plugins): finish channel lint cleanup 2026-04-06 14:48:35 +01:00
Vincent Koc
4d49c7b8a5 fix(plugins): clean fourth channel lint batch 2026-04-06 14:42:09 +01:00
Peter Steinberger
3da7c8610f fix: preserve slack fallback thread classification (#61835) 2026-04-06 14:38:51 +01:00
Ken Shimizu
7f7cfc794f fix(slack): remove stale issue reference comment 2026-04-06 14:38:51 +01:00
Ken Shimizu
177b326354 fix(slack): remove backward-compat fallback that overrides isThreadReply with incomingThreadTs 2026-04-06 14:38:51 +01:00
Vincent Koc
505b980f63 fix(plugins): clean third channel lint batch 2026-04-06 14:34:07 +01:00
Peter Steinberger
318c0f2e89 fix(plugins): repair channel lint batch types 2026-04-06 14:32:02 +01:00
Vincent Koc
98f222a661 fix(plugins): clean second channel lint batch 2026-04-06 14:29:51 +01:00
Vincent Koc
c3edcfd46e fix(plugins): clean first channel lint batch 2026-04-06 14:27:45 +01:00
Vincent Koc
0fdf9e874b fix(config): normalize channel streaming config shape (#61381)
* feat(config): add canonical streaming config helpers

* refactor(runtime): prefer canonical streaming accessors

* feat(config): normalize preview channel streaming shape

* test(config): lock streaming normalization followups

* fix(config): polish streaming migration edges

* chore(config): refresh streaming baseline hash
2026-04-06 05:08:20 +01:00