Commit Graph

451 Commits

Author SHA1 Message Date
Peter Steinberger
8bfa06e992 refactor: enforce plugin-owned channel boundaries 2026-04-18 22:48:27 +01:00
Peter Steinberger
4fa961d4f1 refactor(lint): enable map spread rule 2026-04-18 20:37:12 +01:00
Peter Steinberger
1f1ff0567a refactor(lint): reduce map spread patterns 2026-04-18 19:27:43 +01:00
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
Peter Steinberger
569247cff8 test: speed channel contract hotspots 2026-04-18 01:36:15 +01:00
Gustavo Madeira Santana
c550642cde test: keep command registry native overrides hermetic 2026-04-17 15:50:39 -04:00
Gustavo Madeira Santana
7ae670e501 Tests: fast-path Slack message tool discovery 2026-04-17 02:00:26 -04:00
Peter Steinberger
372c0051ba test: speed up slow import-boundary tests 2026-04-16 21:14:17 +01:00
Gustavo Madeira Santana
78ac118427 fix(plugins): stabilize bundled setup runtimes (#67200)
Merged via squash.

Prepared head SHA: e8d6738fd0
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-15 12:35:18 -04:00
Josh Avant
1769fb2aa1 fix(secrets): align SecretRef inspect/strict behavior across preload/runtime paths (#66818)
* Config: add inspect/strict SecretRef string resolver

* CLI: pass resolved/source config snapshots to plugin preload

* Slack: keep HTTP route registration config-only

* Providers: normalize SecretRef handling for auth and web tools

* Secrets: add Exa web search target to registry and docs

* Telegram: resolve env SecretRef tokens at runtime

* Agents: resolve custom provider env SecretRef ids

* Providers: fail closed on blocked SecretRef fallback

* Telegram: enforce env SecretRef policy for runtime token refs

* Status/Providers/Telegram: tighten SecretRef preload and fallback handling

* Providers: enforce env SecretRef policy checks in fallback auth paths

* fix: add SecretRef lifecycle changelog entry (#66818) (thanks @joshavant)
2026-04-14 17:59:28 -05: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
Vincent Koc
81535d394d fix(cycles): repair broken type surfaces 2026-04-11 13:42:17 +01:00
Peter Steinberger
39d1a817fa lint: enable small oxlint rules 2026-04-11 02:15:21 +01:00
Peter Steinberger
85c7748520 lint: enable no extraneous class 2026-04-11 01:45:06 +01:00
Peter Steinberger
3e80bd33e4 refactor: simplify extension conversions 2026-04-11 01:37:23 +01:00
Peter Steinberger
776c8e037e perf: avoid heavy reply runtime imports 2026-04-11 01:18:11 +01:00
Peter Steinberger
b146c0c26b perf: skip bundled session fallback on hot paths 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
Peter Steinberger
0ebeee8b0d chore: enable consistent-return 2026-04-10 20:56:43 +01:00
Vincent Koc
c3d3cf23bc fix(approval): split discord and slack runtime seams 2026-04-10 09:08:28 +01:00
Tak Hoffman
b83726d13e Feat: Add Active Memory recall plugin (#63286)
* Refine plugin debug plumbing

* Tighten plugin debug handling

* Reduce active memory overhead

* Abort active memory sidecar on timeout

* Rename active memory blocking subagent wording

* Fix active memory cache and recall selection

* Preserve active memory session scope

* Sanitize recalled context before retrieval

* Add active memory changelog entry

* Harden active memory debug and transcript handling

* Add active memory policy config

* Raise active memory timeout default

* Keep usage footer on primary reply

* Clear stale active memory status lines

* Match legacy active memory status prefixes

* Preserve numeric active memory bullets

* Reuse canonical session keys for active memory

* Let active memory subagent decide relevance

* Refine active memory plugin summary flow

* Fix active memory main-session DM detection

* Trim active memory summaries at word boundaries

* Add active memory prompt styles

* Fix active memory stale status cleanup

* Rename active memory subagent wording

* Add active memory prompt and thinking overrides

* Remove active memory legacy status compat

* Resolve active memory session id status

* Add active memory session toggle

* Add active memory global toggle

* Fix active memory toggle state handling

* Harden active memory transcript persistence

* Fix active memory chat type gating

* Scope active memory transcripts by agent

* Show plugin debug before replies
2026-04-09 11:27:37 -05:00
Peter Steinberger
62bde7ede3 test: isolate slack thread-ts recovery 2026-04-09 02:43:29 +01:00
Vignesh Natarajan
2484064c48 chore(lint): clear extension lint regressions and add #63416 changelog 2026-04-08 17:17:29 -07: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
Altay
554bc0a9fd fix(plugins): keep test helpers out of contract barrels (#63311)
Merged via squash.

Prepared head SHA: 769e90c6af
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-08 22:59:05 +01: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
Gustavo Madeira Santana
30211be1cb Slack: treat ACP block text as visible output (#62858)
Merged via squash.

Prepared head SHA: 14f202e1cc
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 16:33:43 -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
73c475023f perf(plugins): trim channel boundary core imports 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
Gustavo Madeira Santana
6c0d25cea4 Slack: clarify native streaming config hint 2026-04-08 00:58:00 -04:00
Peter Steinberger
825028289b fix: pass resolved Slack download tokens (#62097) (thanks @martingarramon) 2026-04-08 05:44:23 +01:00
Martin Garramon
fd68c28164 fix(slack): forward resolved botToken to downloadSlackFile
Closes #62088

When `buildActionOpts` returns undefined (default account, no token
override), `downloadSlackFile` calls `resolveToken(undefined, undefined)`
which re-reads raw config via `loadConfig()`. If botToken is a SecretRef
object, `normalizeResolvedSecretInputString` rejects it because it
expects a string — the download silently fails.

This injects the already-resolved botToken from the gateway runtime
snapshot into the download opts as a fallback, bypassing the raw config
re-read. Same root cause as the Discord fix in b51214ec3e.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 05:44:23 +01:00