Commit Graph

254 Commits (6ad675c1e9d13b94de246e794b90d6d9cefd761a)

Author SHA1 Message Date
Peter Steinberger 6a61d5504c refactor: share extension deferred and runtime helpers 8 months ago
Peter Steinberger e885f1999f refactor: reduce extension channel setup duplication 8 months ago
Peter Steinberger c0831927b0 refactor: share allowlist wildcard matching 8 months ago
Val Alexander 0e8672af87
fix(ui): stop dashboard chat history reload storm (#45541)
* UI: stop dashboard chat history reload storm

* Changelog: add PR number for chat reload fix

* fix: resolve branch typecheck regressions
8 months ago
Peter Steinberger b6c297af8c test: share matrix sdk test mocks 8 months ago
Peter Steinberger 2cf6e2e4f6 test: dedupe matrix target resolution cases 8 months ago
Peter Steinberger d0337a18b6
fix: clear typecheck backlog 8 months ago
Peter Steinberger 65cf2cea9d refactor: share matrix monitor test helpers 8 months ago
Peter Steinberger 16ececf0a6
chore: bump version to 2026.3.13 9 months ago
Peter Steinberger c25e46a433
chore: prepare 2026.3.12 release 9 months ago
Peter Steinberger 4dd4e36450
build: update deps and fix vitest 4 regressions 9 months ago
Peter Steinberger ce5dd742f8
build: sync versions to 2026.3.11 9 months ago
Peter Steinberger 0e397e62b7 chore: bump version to 2026.3.10 9 months ago
Peter Steinberger f4a4b50cd5 refactor: compile allowlist matchers 9 months ago
Peter Steinberger 50ded5052f refactor: share channel config schema fragments 9 months ago
Peter Steinberger 4a8e039a5f refactor: share channel config security scaffolding 9 months ago
Peter Steinberger f6d0712f50 build: sync plugin versions for 2026.3.9 9 months ago
Peter Steinberger 5fca4c0de0 chore: prepare 2026.3.8-beta.1 release 9 months ago
Peter Steinberger 2e79d82198 build: update app deps except carbon 9 months ago
Bronko d4a960fcca
fix(matrix): restore robust DM routing without the memberCount heuristic (#19736)
* fix(matrix): remove memberCount heuristic from DM detection

The memberCount === 2 check in isDirectMessage() misclassifies 2-person
group rooms (admin channels, monitoring rooms) as DMs, routing them to
the main session instead of their room-specific session.

Matrix already distinguishes DMs from groups at the protocol level via
m.direct account data and is_direct member state flags. Both are already
checked by client.dms.isDm() and hasDirectFlag(). The memberCount
heuristic only adds false positives for 2-person groups.

Move resolveMemberCount() below the protocol-level checks so it is only
reached for rooms not matched by m.direct or is_direct. This narrows its
role to diagnostic logging for confirmed group rooms.

Refs: #19739

* fix(matrix): add conservative fallback for broken DM flags

Some homeservers (notably Continuwuity) have broken m.direct account
data or never set is_direct on invite events. With the memberCount
heuristic removed, these DMs are no longer detected.

Add a conservative fallback that requires two signals before classifying
as DM: memberCount === 2 AND no explicit m.room.name. Group rooms almost
always have explicit names; DMs almost never do.

Error handling distinguishes M_NOT_FOUND (missing state event, expected
for unnamed rooms) from network/auth errors. Non-404 errors fall through
to group classification rather than guessing.

This is independently revertable — removing this commit restores pure
protocol-based detection without any heuristic fallback.

* fix(matrix): add parentPeer for DM room binding support

Add parentPeer to DM routes so conversations are bindable by room ID
while preserving DM trust semantics (secure 1:1, no group restrictions).

Suggested by @KirillShchetinin.

* fix(matrix): override DM detection for explicitly configured rooms

Builds on @robertcorreiro's config-driven approach from #9106.

Move resolveMatrixRoomConfig() before the DM check. If a room matches
a non-wildcard config entry (matchSource === "direct") and was
classified as DM, override the classification to group. This gives users
a deterministic escape hatch for misclassified rooms.

Wildcards are excluded from the override to avoid breaking DM routing
when a "*" catch-all exists. roomConfig is gated behind isRoom so DMs
never inherit group settings (skills, systemPrompt, autoReply).

This commit is independently droppable if the scope is too broad.

* test(matrix): add DM detection and config override tests

- 15 unit tests for direct.ts: all detection paths, priority order,
  M_NOT_FOUND vs network error handling, edge cases (whitespace names,
  API failures)
- 8 unit tests for rooms.ts: matchSource classification, wildcard
  safety for DM override, direct match priority over wildcard

* Changelog: note matrix DM routing follow-up

* fix(matrix): preserve DM fallback and room bindings

---------

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
9 months ago
Peter Steinberger 141738f717 refactor: harden browser runtime profile handling 9 months ago
Peter Steinberger 8d7778d1d6 refactor: dedupe plugin runtime stores 9 months ago
Peter Steinberger 64d4d9aabb refactor: move bundled extension gap allowlists into manifests 9 months ago
Peter Steinberger 05217845a7 build: bump version to 2026.3.8 9 months ago
Vincent Koc 4b0d55dadf Matrix: use scoped plugin SDK resolve-target imports 9 months ago
Vincent Koc 4b02a4eacf Matrix: use scoped plugin SDK channel imports 9 months ago
Vincent Koc 7c5d6c3dc9 Matrix: default missing media kind to unknown 9 months ago
Peter Steinberger cc03c097c5 refactor: share provider group-policy warning collectors 9 months ago
Peter Steinberger 846ec320e2 refactor: share account-scoped config adapter accessors 9 months ago
Peter Steinberger c9128e1f3f refactor: share trimmed list normalization in provider helpers 9 months ago
Peter Steinberger 556aa8a702 refactor: share config adapter allowFrom and defaultTo helpers 9 months ago
Peter Steinberger c91bfa830a refactor: share route-level group gating decisions 9 months ago
Peter Steinberger 5bbca5be91 refactor: share sender-scoped group policy derivation 9 months ago
Peter Steinberger b456649974 refactor: unify account-scoped dm security policy resolver 9 months ago
Peter Steinberger 7230b96cc7 refactor: unify extension allowlist resolver and directory scaffolding 9 months ago
Peter Steinberger 8e0e76697a refactor: unify channel open-group-policy warning builders 9 months ago
Peter Steinberger 5eba663c38 refactor: unify onboarding secret-input prompt state wiring 9 months ago
Peter Steinberger 6b1c82c4f1 refactor: unify onboarding dm/group policy scaffolding 9 months ago
Peter Steinberger 7242777d63 refactor: unify account list/default scaffolding 9 months ago
Peter Steinberger a82df52753 refactor(extensions): share secret input schema builder 9 months ago
Peter Steinberger 1aa77e4603 refactor(extensions): reuse shared helper primitives 9 months ago
Peter Steinberger 997a9f5b9e chore: bump version to 2026.3.7 9 months ago
Ayaan Zaidi 4ed5febc38 chore(extensions): sync plugin versions 9 months ago
Gustavo Madeira Santana b69b2a7ae0 Plugins/matrix: migrate to scoped plugin-sdk imports 9 months ago
Gustavo Madeira Santana 15f7e329c2 Extensions: migrate matrix plugin-sdk imports 9 months ago
Josh Avant 646817dd80
fix(outbound): unify resolved cfg threading across send paths (#33987) 9 months ago
Gustavo Madeira Santana 1278ee9248 plugin-sdk: add channel subpaths and migrate bundled plugins 9 months ago
Peter Steinberger e1503349c3 fix: scope extension runtime deps to plugin manifests 9 months ago
Josh Avant 806803b7ef
feat(secrets): expand SecretRef coverage across user-supplied credentials (#29580)
* feat(secrets): expand secret target coverage and gateway tooling

* docs(secrets): align gateway and CLI secret docs

* chore(protocol): regenerate swift gateway models for secrets methods

* fix(config): restore talk apiKey fallback and stabilize runner test

* ci(windows): reduce test worker count for shard stability

* ci(windows): raise node heap for test shard stability

* test(feishu): make proxy env precedence assertion windows-safe

* fix(gateway): resolve auth password SecretInput refs for clients

* fix(gateway): resolve remote SecretInput credentials for clients

* fix(secrets): skip inactive refs in command snapshot assignments

* fix(secrets): scope gateway.remote refs to effective auth surfaces

* fix(secrets): ignore memory defaults when enabled agents disable search

* fix(secrets): honor Google Chat serviceAccountRef inheritance

* fix(secrets): address tsgo errors in command and gateway collectors

* fix(secrets): avoid auth-store load in providers-only configure

* fix(gateway): defer local password ref resolution by precedence

* fix(secrets): gate telegram webhook secret refs by webhook mode

* fix(secrets): gate slack signing secret refs to http mode

* fix(secrets): skip telegram botToken refs when tokenFile is set

* fix(secrets): gate discord pluralkit refs by enabled flag

* fix(secrets): gate discord voice tts refs by voice enabled

* test(secrets): make runtime fixture modes explicit

* fix(cli): resolve local qr password secret refs

* fix(cli): fail when gateway leaves command refs unresolved

* fix(gateway): fail when local password SecretRef is unresolved

* fix(gateway): fail when required remote SecretRefs are unresolved

* fix(gateway): resolve local password refs only when password can win

* fix(cli): skip local password SecretRef resolution on qr token override

* test(gateway): cast SecretRef fixtures to OpenClawConfig

* test(secrets): activate mode-gated targets in runtime coverage fixture

* fix(cron): support SecretInput webhook tokens safely

* fix(bluebubbles): support SecretInput passwords across config paths

* fix(msteams): make appPassword SecretInput-safe in onboarding/token paths

* fix(bluebubbles): align SecretInput schema helper typing

* fix(cli): clarify secrets.resolve version-skew errors

* refactor(secrets): return structured inactive paths from secrets.resolve

* refactor(gateway): type onboarding secret writes as SecretInput

* chore(protocol): regenerate swift models for secrets.resolve

* feat(secrets): expand extension credential secretref support

* fix(secrets): gate web-search refs by active provider

* fix(onboarding): detect SecretRef credentials in extension status

* fix(onboarding): allow keeping existing ref in secret prompt

* fix(onboarding): resolve gateway password SecretRefs for probe and tui

* fix(onboarding): honor secret-input-mode for local gateway auth

* fix(acp): resolve gateway SecretInput credentials

* fix(secrets): gate gateway.remote refs to remote surfaces

* test(secrets): cover pattern matching and inactive array refs

* docs(secrets): clarify secrets.resolve and remote active surfaces

* fix(bluebubbles): keep existing SecretRef during onboarding

* fix(tests): resolve CI type errors in new SecretRef coverage

* fix(extensions): replace raw fetch with SSRF-guarded fetch

* test(secrets): mark gateway remote targets active in runtime coverage

* test(infra): normalize home-prefix expectation across platforms

* fix(cli): only resolve local qr password refs in password mode

* test(cli): cover local qr token mode with unresolved password ref

* docs(cli): clarify local qr password ref resolution behavior

* refactor(extensions): reuse sdk SecretInput helpers

* fix(wizard): resolve onboarding env-template secrets before plaintext

* fix(cli): surface secrets.resolve diagnostics in memory and qr

* test(secrets): repair post-rebase runtime and fixtures

* fix(gateway): skip remote password ref resolution when token wins

* fix(secrets): treat tailscale remote gateway refs as active

* fix(gateway): allow remote password fallback when token ref is unresolved

* fix(gateway): ignore stale local password refs for none and trusted-proxy

* fix(gateway): skip remote secret ref resolution on local call paths

* test(cli): cover qr remote tailscale secret ref resolution

* fix(secrets): align gateway password active-surface with auth inference

* fix(cli): resolve inferred local gateway password refs in qr

* fix(gateway): prefer resolvable remote password over token ref pre-resolution

* test(gateway): cover none and trusted-proxy stale password refs

* docs(secrets): sync qr and gateway active-surface behavior

* fix: restore stability blockers from pre-release audit

* Secrets: fix collector/runtime precedence contradictions

* docs: align secrets and web credential docs

* fix(rebase): resolve integration regressions after main rebase

* fix(node-host): resolve gateway secret refs for auth

* fix(secrets): harden secretinput runtime readers

* gateway: skip inactive auth secretref resolution

* cli: avoid gateway preflight for inactive secret refs

* extensions: allow unresolved refs in onboarding status

* tests: fix qr-cli module mock hoist ordering

* Security: align audit checks with SecretInput resolution

* Gateway: resolve local-mode remote fallback secret refs

* Node host: avoid resolving inactive password secret refs

* Secrets runtime: mark Slack appToken inactive for HTTP mode

* secrets: keep inactive gateway remote refs non-blocking

* cli: include agent memory secret targets in runtime resolution

* docs(secrets): sync docs with active-surface and web search behavior

* fix(secrets): keep telegram top-level token refs active for blank account tokens

* fix(daemon): resolve gateway password secret refs for probe auth

* fix(secrets): skip IRC NickServ ref resolution when NickServ is disabled

* fix(secrets): align token inheritance and exec timeout defaults

* docs(secrets): clarify active-surface notes in cli docs

* cli: require secrets.resolve gateway capability

* gateway: log auth secret surface diagnostics

* secrets: remove dead provider resolver module

* fix(secrets): restore gateway auth precedence and fallback resolution

* fix(tests): align plugin runtime mock typings

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
9 months ago
Peter Steinberger 3a08e69a05 refactor: unify queueing and normalize telegram slack flows 9 months ago