Peter Steinberger
e7a5f9f4d8
fix(channels,sandbox): land hard breakage cluster from reviewed PR bases
...
Lands reviewed fixes based on #25839 (@pewallin), #25841 (@joshjhall), and #25737/@25713 (@DennisGoldfinger/@peteragility), with additional hardening + regression tests for queue cleanup and shell script safety.
Fixes #25836
Fixes #25840
Fixes #25824
Fixes #25868
Co-authored-by: Peter Wallin <pwallin@gmail.com >
Co-authored-by: Joshua Hall <josh@yaplabs.com >
Co-authored-by: Dennis Goldfinger <dennisgoldfinger@gmail.com >
Co-authored-by: peteragility <peteragility@users.noreply.github.com >
2026-02-24 23:27:56 +00:00
justinhuangcode
e8a4d5d9bd
fix(discord): strip reasoning tags from partial stream preview
...
When streamMode is "partial", reasoning/thinking block content can leak
into the Discord draft preview because the partial text is forwarded to
the draft stream without filtering. Apply `stripReasoningTagsFromText`
before updating the draft and skip pure-reasoning messages (those
starting with "Reasoning:\n") so internal thinking traces never reach
the user-visible preview.
Fixes #24532
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-24 04:37:30 +00:00
Sid
38da3f40cb
fix(discord): suppress reasoning/thinking block payloads from delivery ( #24969 )
...
Block payloads (info.kind === "block") contain reasoning/thinking content
that should only be visible in the internal web UI. When streamMode is
"partial", these blocks were being delivered to Discord as visible
messages, leaking chain-of-thought to end users.
Add an early return for block payloads in the deliver callback,
consistent with the WhatsApp fix and Telegram's existing behavior.
Fixes #24532
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-02-24 03:33:40 +00:00
Peter Steinberger
161d9841dc
refactor(security): unify dangerous name matching handling
2026-02-24 01:33:08 +00:00
Peter Steinberger
cfa44ea6b4
fix(security): make allowFrom id-only by default with dangerous name opt-in ( #24907 )
...
* fix(channels): default allowFrom to id-only; add dangerous name opt-in
* docs(security): align channel allowFrom docs with id-only default
2026-02-24 01:01:51 +00:00
Peter Steinberger
2c14b0cf4c
refactor(config): unify streaming config across channels
2026-02-21 19:53:42 +01:00
Onur
8178ea472d
feat: thread-bound subagents on Discord ( #21805 )
...
* docs: thread-bound subagents plan
* docs: add exact thread-bound subagent implementation touchpoints
* Docs: prioritize auto thread-bound subagent flow
* Docs: add ACP harness thread-binding extensions
* Discord: add thread-bound session routing and auto-bind spawn flow
* Subagents: add focus commands and ACP/session binding lifecycle hooks
* Tests: cover thread bindings, focus commands, and ACP unbind hooks
* Docs: add plugin-hook appendix for thread-bound subagents
* Plugins: add subagent lifecycle hook events
* Core: emit subagent lifecycle hooks and decouple Discord bindings
* Discord: handle subagent bind lifecycle via plugin hooks
* Subagents: unify completion finalizer and split registry modules
* Add subagent lifecycle events module
* Hooks: fix subagent ended context key
* Discord: share thread bindings across ESM and Jiti
* Subagents: add persistent sessions_spawn mode for thread-bound sessions
* Subagents: clarify thread intro and persistent completion copy
* test(subagents): stabilize sessions_spawn lifecycle cleanup assertions
* Discord: add thread-bound session TTL with auto-unfocus
* Subagents: fail session spawns when thread bind fails
* Subagents: cover thread session failure cleanup paths
* Session: add thread binding TTL config and /session ttl controls
* Tests: align discord reaction expectations
* Agent: persist sessionFile for keyed subagent sessions
* Discord: normalize imports after conflict resolution
* Sessions: centralize sessionFile resolve/persist helper
* Discord: harden thread-bound subagent session routing
* Rebase: resolve upstream/main conflicts
* Subagents: move thread binding into hooks and split bindings modules
* Docs: add channel-agnostic subagent routing hook plan
* Agents: decouple subagent routing from Discord
* Discord: refactor thread-bound subagent flows
* Subagents: prevent duplicate end hooks and orphaned failed sessions
* Refactor: split subagent command and provider phases
* Subagents: honor hook delivery target overrides
* Discord: add thread binding kill switches and refresh plan doc
* Discord: fix thread bind channel resolution
* Routing: centralize account id normalization
* Discord: clean up thread bindings on startup failures
* Discord: add startup cleanup regression tests
* Docs: add long-term thread-bound subagent architecture
* Docs: split session binding plan and dedupe thread-bound doc
* Subagents: add channel-agnostic session binding routing
* Subagents: stabilize announce completion routing tests
* Subagents: cover multi-bound completion routing
* Subagents: suppress lifecycle hooks on failed thread bind
* tests: fix discord provider mock typing regressions
* docs/protocol: sync slash command aliases and delete param models
* fix: add changelog entry for Discord thread-bound subagents (#21805 ) (thanks @onutc)
---------
Co-authored-by: Shadow <hi@shadowing.dev >
2026-02-21 16:14:55 +01:00
Shadow
f555835b09
Channels: add thread-aware model overrides
2026-02-20 19:26:25 -06:00
Shadow
eedea6cf34
Discord: add trusted channel topics on new sessions
2026-02-20 18:22:13 -06:00
Shadow
64c29c3755
Discord: avoid reply spam on chunked sends
2026-02-20 16:37:28 -06:00
Shadow
30a0d3fce1
Status reactions: fix stall timers and gating ( #22190 )
...
* feat: add shared status reaction controller
* feat: add statusReactions config schema
* feat: wire status reactions for Discord and Telegram
* fix: restore original 10s/30s stall defaults for Discord compatibility
* Status reactions: fix stall timers and gating
* Format status reaction imports
---------
Co-authored-by: Matt <mateus.carniatto@gmail.com >
2026-02-20 15:27:42 -06:00
Shadow
09e6970386
Discord: implement stream preview mode ( #22111 )
...
* Discord: implement stream preview mode
* Changelog: note Discord stream preview mode
* Tests: type discord draft stream mocks
* Docs: document Discord stream preview
2026-02-20 12:37:15 -06:00
Peter Steinberger
b8b43175c5
style: align formatting with oxfmt 0.33
2026-02-18 01:34:35 +00:00
Peter Steinberger
31f9be126c
style: run oxfmt and fix gate failures
2026-02-18 01:29:02 +00:00
Shakker
b0d4c9b721
fix(discord): preserve DM lastRoute user target
2026-02-17 13:56:30 +00:00
cpojer
d0cb8c19b2
chore: wtf.
2026-02-17 13:36:48 +09:00
Sebastian
ed11e93cf2
chore(format)
2026-02-16 23:20:16 -05:00
cpojer
90ef2d6bdf
chore: Update formatting.
2026-02-17 09:18:40 +09:00
Rain
a0ab301dc3
Fix Discord auto-thread attempting to thread in Forum/Media channels\n\nCreating threads on messages within Forum/Media channels is often redundant\nor invalid (as messages are already posts). This prevents API errors and spam.\n\nFix: Check channel type before attempting auto-thread creation.
2026-02-16 23:59:16 +01:00
Rain
b90d7625e5
Fix Discord session routing continuity (enable lastRoute for groups)\n\nPreviously, 'updateLastRoute' was only enabled for Direct Messages.\nThis meant that group/channel sessions did not update their routing\nmetadata (last channel/to/accountId) in 'session-meta.json'.\n\nIf the bot restarted or a proactive cron job tried to send a message\nto a group session using 'sessions_send' without an explicit 'to' field,\nit would fail because 'lastRoute' was missing or stale.\n\nFix: Enable 'updateLastRoute' for all Discord messages (Group + DM),\nensuring the session store always has the latest valid routing target.
2026-02-16 23:59:16 +01:00
pip-nomel
1567d6cbb4
feat(discord): download attachments from forwarded messages ( #17049 )
...
Co-authored-by: Shadow <shadow@openclaw.ai >
2026-02-16 15:23:40 -06:00
victor-wu.eth
7c240a2b58
feat(discord): faster reaction status state machine (watchdog + debounce) ( #18248 )
...
* fix(discord): avoid unnecessary message fetches in reaction notifications
* style(discord): format reaction listener for CI
* feat(discord): add reaction status machine and fix tool/final wiring
* fix(discord): harden reaction status transitions and cleanup
* revert(discord): restore status-machine flow from 0a5a72204
* fix(auto-reply): restore lifecycle callback forwarding for channels
* chore(ci): add daily upstream sync workflow for custom branch
* fix(discord): non-blocking reactions and robust cleanup
* chore: remove unrelated workflow from Discord-only PR
* Discord: streamline reaction handling
* Docs: add Discord reaction changelog
---------
Co-authored-by: Shadow <hi@shadowing.dev >
2026-02-16 13:38:39 -06:00
Shakker
09566b1693
fix(discord): preserve channel session keys via channel_id fallbacks ( #17622 )
...
* fix(discord): preserve channel session keys via channel_id fallbacks
* docs(changelog): add discord session continuity note
* Tests: cover discord channel_id fallback
---------
Co-authored-by: Shadow <hi@shadowing.dev >
2026-02-15 20:30:17 -06:00
Shadow
b6069fc68c
feat: support per-channel ackReaction config ( #17092 ) (thanks @zerone0x)
2026-02-15 11:30:25 -06:00
Peter Steinberger
53273b490b
fix(auto-reply): prevent sender spoofing in group prompts
2026-02-10 00:44:38 -06:00
Peter Steinberger
d84eb46467
fix: restore discord owner hint from allowlists
2026-02-04 23:34:22 -08:00
Josh Palmer
bebf323775
Discord: allow disabling thread starter context
2026-02-04 13:25:56 -08:00
mudrii
5d82c82313
feat: per-channel responsePrefix override ( #9001 )
...
* feat: per-channel responsePrefix override
Add responsePrefix field to all channel config types and Zod schemas,
enabling per-channel and per-account outbound response prefix overrides.
Resolution cascade (most specific wins):
L1: channels.<ch>.accounts.<id>.responsePrefix
L2: channels.<ch>.responsePrefix
L3: (reserved for channels.defaults)
L4: messages.responsePrefix (existing global)
Semantics:
- undefined -> inherit from parent level
- empty string -> explicitly no prefix (stops cascade)
- "auto" -> derive [identity.name] from routed agent
Changes:
- Core logic: resolveResponsePrefix() in identity.ts accepts
optional channel/accountId and walks the cascade
- resolveEffectiveMessagesConfig() passes channel context through
- Types: responsePrefix added to WhatsApp, Telegram, Discord, Slack,
Signal, iMessage, Google Chat, MS Teams, Feishu, BlueBubbles configs
- Zod schemas: responsePrefix added for config validation
- All channel handlers wired: telegram, discord, slack, signal,
imessage, line, heartbeat runner, route-reply, native commands
- 23 new tests covering backward compat, channel/account levels,
full cascade, auto keyword, empty string stops, unknown fallthrough
Fully backward compatible - no existing config is affected.
Fixes #8857
* fix: address CI lint + review feedback
- Replace Record<string, any> with proper typed helpers (no-explicit-any)
- Add curly braces to single-line if returns (eslint curly)
- Fix JSDoc: 'Per-channel' → 'channel/account' on shared config types
- Extract getChannelConfig() helper for type-safe dynamic key access
* fix: finish responsePrefix overrides (#9001 ) (thanks @mudrii)
* fix: normalize prefix wiring and types (#9001 ) (thanks @mudrii)
---------
Co-authored-by: Gustavo Madeira Santana <gumadeiras@gmail.com >
2026-02-04 16:16:34 -05:00
Peter Steinberger
35eb40a700
fix(security): separate untrusted channel metadata from system prompt (thanks @KonstantinMirin)
2026-02-03 23:02:45 -08:00
Shadow
abcca0f9bd
Discord: fix PK sender identity context
2026-01-31 20:20:17 -06:00
Shadow
8e2b17e0c5
Discord: add PluralKit sender identity resolver ( #5838 )
...
* Discord: add PluralKit sender identity resolver
* fix: resolve PluralKit sender identities (#5838 ) (thanks @thewilloftheshadow)
2026-01-31 19:50:06 -06:00
cpojer
f06dd8df06
chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts.
2026-02-01 10:03:47 +09:00
Seb Slight
d4f60bf16a
TTS: gate auto audio on inbound voice notes ( #1667 )
...
Co-authored-by: Sebastian <sebslight@gmail.com >
2026-01-25 04:35:20 +00:00
Peter Steinberger
50bb418fe7
fix: guard discord thread channel
2026-01-25 04:11:55 +00:00
Peter Steinberger
458e731f8b
fix: newline chunking across channels
2026-01-25 04:11:36 +00:00
Peter Steinberger
580fd7abbd
fix: guard discord forum thread access
2026-01-25 04:11:04 +00:00
Shadow
cdceff2284
Discord: add forum parent context
2026-01-24 21:57:48 -06:00
Peter Steinberger
bf4544784a
fix: stabilize typing + summary merge
2026-01-23 23:34:30 +00:00
Peter Steinberger
aeb6b2ffad
refactor: standardize channel logging
2026-01-23 23:34:30 +00:00
Peter Steinberger
1113f17d4c
refactor: share reply prefix context
2026-01-23 23:34:30 +00:00
Peter Steinberger
8252ae2da1
refactor: unify typing callbacks
2026-01-23 23:33:32 +00:00
Peter Steinberger
d82ecaf9dc
refactor: centralize inbound session updates
2026-01-23 23:33:32 +00:00
Peter Steinberger
521ea4ae5b
refactor: unify pending history helpers
2026-01-23 23:33:32 +00:00
Peter Steinberger
cb8c8fee9a
refactor: centralize ack reaction removal
2026-01-23 23:32:14 +00:00
Peter Steinberger
2e0a835e07
fix: unify inbound dispatch pipeline
2026-01-23 22:58:54 +00:00
Peter Steinberger
02bd6e4a24
refactor: centralize ack reaction gating
2026-01-23 22:24:31 +00:00
Peter Steinberger
b77e730657
fix: add per-channel markdown table conversion ( #1495 ) (thanks @odysseus0)
2026-01-23 18:39:25 +00:00
Peter Steinberger
744d1329cb
feat: make inbound envelopes configurable
...
Co-authored-by: Shiva Prasad <shiv19@users.noreply.github.com >
2026-01-18 18:50:37 +00:00
Peter Steinberger
0d9172d761
fix: persist session origin metadata
2026-01-18 03:41:51 +00:00
Peter Steinberger
34590d2144
feat: persist session origin metadata across connectors
2026-01-18 02:42:10 +00:00