Commit Graph
44 Commits
Author SHA1 Message Date
Shadow c16bc71279 fix: add discord routing debug logging (#16202) (thanks @jayleekr) 2026-02-14 11:03:30 -06:00
Peter Steinberger 586176730c perf(gateway): optimize sessions/ws/routing 2026-02-14 12:21:44 +00:00
Peter Steinberger 2583de5305 refactor(routing): normalize binding matching and harden qmd boot-update tests 2026-02-14 03:40:28 +01:00
大猫子andPeter Steinberger dbe026214f fix(routing): exclude peer-specific bindings from guild-wide matching (#15274)
* fix(routing): exclude peer-specific bindings from guild-wide matching (#14752)

* fix(routing): enforce binding scope AND semantics + regressions

* fix(routing): document strict binding-scope behavior (#15274) (thanks @lailoo)

---------

Co-authored-by: Peter Steinberger <[email protected]>
2026-02-14 03:05:09 +01:00
Shadow 22fe30c1df fix: add discord role allowlists (#10650) (thanks @Minidoracat) 2026-02-12 19:52:24 -06:00
Minidoracat f7adc21d31 fix: exclude role-restricted bindings from guild-only matching 2026-02-12 19:52:24 -06:00
Minidoracat e084f07420 fix: add missing role-based type definitions for RBAC routing 2026-02-12 19:52:24 -06:00
Minidoracat e1e6e3f477 fix: add curly braces to resolve-route.ts for eslint(curly) compliance 2026-02-12 19:52:24 -06:00
Minidoracat 4bf06e7824 Discord: add unit tests for role-based agent routing 2026-02-12 19:52:24 -06:00
Minidoracat 75fc8cf25c Discord: implement role-based agent routing in resolveAgentRoute 2026-02-12 19:52:24 -06:00
max 223eee0a20 refactor: unify peer kind to ChatType, rename dm to direct (#11881)
* fix: use .js extension for ESM imports of RoutePeerKind

The imports incorrectly used .ts extension which doesn't resolve
with moduleResolution: NodeNext. Changed to .js and added 'type'
import modifier.

* fix tsconfig

* refactor: unify peer kind to ChatType, rename dm to direct

- Replace RoutePeerKind with ChatType throughout codebase
- Change 'dm' literal values to 'direct' in routing/session keys
- Keep backward compat: normalizeChatType accepts 'dm' -> 'direct'
- Add ChatType export to plugin-sdk, deprecate RoutePeerKind
- Update session key parsing to accept both 'dm' and 'direct' markers
- Update all channel monitors and extensions to use ChatType

BREAKING CHANGE: Session keys now use 'direct' instead of 'dm'.
Existing 'dm' keys still work via backward compat layer.

* fix tests

* test: update session key expectations for dmdirect migration

- Fix test expectations to expect :direct: in generated output
- Add explicit backward compat test for normalizeChatType('dm')
- Keep input test data with :dm: keys to verify backward compat

* fix: accept legacy 'dm' in session key parsing for backward compat

getDmHistoryLimitFromSessionKey now accepts both :dm: and :direct:
to ensure old session keys continue to work correctly.

* test: add explicit backward compat tests for dmdirect migration

- session-key.test.ts: verify both :dm: and :direct: keys are valid
- getDmHistoryLimitFromSessionKey: verify both formats work

* feat: backward compat for resetByType.dm config key

* test: skip unix-path Nix tests on Windows
2026-02-09 09:20:52 +09:00
4216449405 fix: guard resolveUserPath against undefined input (#10176)
* fix: guard resolveUserPath against undefined input

When subagent spawner omits workspaceDir, resolveUserPath receives
undefined and crashes on .trim().  Add a falsy guard that falls back
to process.cwd(), matching the behavior callers already expect.

Closes #10089

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: harden runner workspace fallback (#10176) (thanks @Yida-Dev)

* fix: harden workspace fallback scoping (#10176) (thanks @Yida-Dev)

* refactor: centralize workspace fallback classification and redaction (#10176) (thanks @Yida-Dev)

* test: remove explicit any from utils mock (#10176) (thanks @Yida-Dev)

* security: reject malformed agent session keys for workspace resolution (#10176) (thanks @Yida-Dev)

---------

Co-authored-by: Yida-Dev <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Gustavo Madeira Santana <[email protected]>
2026-02-06 13:16:58 -05:00
cpojer b48d72a2b8 chore: fix lint, and format after lint to catch reformats triggered by autofixes. 2026-02-01 13:19:06 +09:00
01d76e4799 feat(routing): add thread parent binding inheritance for Discord (#3892)
* feat(routing): add thread parent binding inheritance for Discord

When a Discord thread message doesn't match a direct peer binding,
now checks if the parent channel has a binding and uses that agent.

This enables multi-agent setups where threads inherit their parent
channel's agent binding automatically.

Changes:
- Add parentPeer parameter to ResolveAgentRouteInput
- Add binding.peer.parent match type
- Resolve thread parent early in Discord preflight
- Pass parentPeer to resolveAgentRoute for threads

Fixes thread routing in Discord multi-agent configurations where
threads were incorrectly routed to the default agent instead of
inheriting from their parent channel's binding.

* ci: trigger fresh macOS runners

* Discord: inherit thread bindings in reactions

* fix: add changelog for thread parent binding (#3892) (thanks @aerolalit)

---------

Co-authored-by: Lalit Singh <[email protected]>
Co-authored-by: OSS Agent <[email protected]>
Co-authored-by: Shadow <[email protected]>
2026-01-31 20:30:45 -06:00
cpojer f06dd8df06 chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
cpojer 5ceff756e1 chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
cpojer 15792b153f chore: Enable more lint rules, disable some that trigger a lot. Will clean up later. 2026-01-31 16:04:04 +09:00
Peter Steinberger 9a7160786a refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
Jarvis DeployandSebastian Almeida d499b14842 feat(routing): add per-account-channel-peer session scope
Adds a new dmScope option that includes accountId in session keys,
enabling isolated sessions per channel account for multi-bot setups.

- Add 'per-account-channel-peer' to DmScope type
- Update session key generation to include accountId
- Pass accountId through routing chain
- Add tests for new routing behavior (13/13 passing)

Closes #3094

Co-authored-by: Sebastian Almeida <[email protected]>
2026-01-28 11:42:33 +05:30
Peter Steinberger 6d16a658e5 refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
ShadowandRay Tien 73507e8654 Routing: precompile session key regexes (#1697)
Co-authored-by: Ray Tien <[email protected]>
2026-01-25 21:15:20 -06:00
Peter Steinberger 390b730b37 fix: unify reasoning tags + agent ids (#1613) (thanks @kyleok) (#1629) 2026-01-24 19:56:02 +00:00
Peter Steinberger 6d79c6cd26 fix: clean docker onboarding warnings + preserve agentId casing 2026-01-24 19:07:01 +00:00
Peter Steinberger 93737ee152 test: align agent id normalization 2026-01-24 14:36:31 +00:00
Peter Steinberger ef7971e3a4 fix: normalize heartbeat targets 2026-01-24 13:53:00 +00:00
Peter Steinberger 386d21b6d1 fix: sync tests with config normalization 2026-01-24 13:32:26 +00:00
Peter Steinberger fa746b05de fix: preserve agent id casing 2026-01-24 12:23:44 +00:00
Peter Steinberger 298901208d fix: align agent id normalization 2026-01-24 12:10:08 +00:00
Peter Steinberger 4b6cdd1d3c fix: normalize session keys and outbound mirroring 2026-01-24 11:57:11 +00:00
Peter Steinberger 65bed815a8 fix: resolve ci failures 2026-01-18 08:45:29 +00:00
Peter SteinbergerandJonathan Taylor de3b68740a feat(acp): add experimental ACP support
Co-authored-by: Jonathan Taylor <[email protected]>
2026-01-18 08:03:36 +00:00
Peter Steinberger c92265a51b refactor: canonicalize gateway session store keys 2026-01-17 07:41:24 +00:00
Peter Steinberger f14d622c0f refactor: centralize account bindings + health probes 2026-01-17 01:19:43 +00:00
RubyandShadow 0cd24137e8 feat: add session.identityLinks for cross-platform DM session linking (#1033)
Co-authored-by: Shadow <[email protected]>
2026-01-16 14:23:22 -06:00
UbuntuandAlphonse-arianee ca9688b5cc feat(session): add dmScope for multi-user DM isolation
Co-authored-by: Alphonse-arianee <[email protected]>
2026-01-16 04:13:10 +00:00
Peter SteinbergerandChristoph Nakazawa c379191f80 chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <[email protected]>
2026-01-14 15:02:19 +00:00
Peter Steinberger 90342a4f3a refactor!: rename chat providers to channels 2026-01-13 08:40:39 +00:00
Peter Steinberger 6c7a27c010 refactor: normalize main session key handling 2026-01-09 22:30:15 +01:00
Peter Steinberger 7641b142ad refactor: harden broadcast groups 2026-01-09 21:39:58 +01:00
Peter Steinberger 36bdec0f2c refactor(messages): centralize per-agent prefixes 2026-01-09 16:54:54 +01:00
Peter SteinbergerandMark Pors 7b81d97ec2 feat: wire multi-agent config and routing
Co-authored-by: Mark Pors <[email protected]>
2026-01-09 12:48:42 +00:00
Peter Steinberger cb9f8146c4 refactor: centralize thread helpers 2026-01-07 20:01:19 +01:00
Peter Steinberger 7973fd4caf feat: add agents command 2026-01-07 10:03:53 +01:00
Peter Steinberger dbfa316d19 feat: multi-agent routing + multi-account providers 2026-01-06 18:33:37 +00:00