Commit graph

73 commits

Author SHA1 Message Date
Tak Hoffman
59e2825274
fix: deprecate models add command (#71175) 2026-04-24 12:20:59 -05:00
Vincent Koc
25a2ea4480 perf(config): scope dry-run legacy validation 2026-04-13 20:40:52 +01:00
Vincent Koc
e02c6ca82a perf(config): narrow channel legacy rule loading 2026-04-13 20:37:21 +01:00
Peter Steinberger
ad7ad62632
test: narrow allowed-values validation coverage 2026-04-11 04:57:11 +01:00
Peter Steinberger
777c6f7580
refactor: split manifest command alias helpers 2026-04-10 17:37:31 +01:00
Peter Steinberger
beaff3c553 fix: clarify plugin command alias diagnostics (#64242) (thanks @feiskyer) 2026-04-10 14:56:12 +01:00
Pengfei Ni
8cb45c051e fix(config): give actionable guidance when command names are used in plugins.allow (#64191)
When users put a runtime command name like "dreaming" into `plugins.allow`,
validation now explains that it is a command provided by a specific plugin
(e.g. "memory-core") and suggests using the plugin id instead, rather than
the generic "plugin not found" warning that previously created a circular
trap with the CLI error message.

Similarly, running `openclaw dreaming` from the CLI now explains that
`/dreaming` is a runtime slash command (not a CLI command) and points users
to `openclaw memory` for CLI operations or `/dreaming` in a chat session.

Fixes two related UX problems:
1. `plugins.allow: ["dreaming"]` → validation warned "plugin not found"
2. `openclaw dreaming status` → CLI said "add dreaming to plugins.allow"
   (which then triggered problem 1)

Root cause: "dreaming" is a slash command registered by the memory-core
plugin via `api.registerCommand()`, not a standalone plugin or CLI command.
2026-04-10 14:56:12 +01:00
HollyChou
ab49afcd27
fix: surface specific sub-issue for config validation union errors (#40841)
Merged via squash.

Prepared head SHA: 6d7da51629
Co-authored-by: Hollychou924 <128659251+Hollychou924@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-09 09:40:22 +01:00
Peter Steinberger
20214d4232
test: fix disabled plugin config validation 2026-04-09 04:38:50 +01:00
fuller-stack-dev
6384271963
fix: allow disabled plugin config writes (#63296) (thanks @fuller-stack-dev)
* fix(config): ignore synthesized disabled plugin config on write

* test(config): keep write-prepare regression generic

* test(config): cover explicit disabled plugin config preservation

* fix(config): skip disabled plugin config validation

* fix(config): avoid tdz in plugin validation

* fix: allow disabled plugin config writes (#63296) (thanks @fuller-stack-dev)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-09 09:02:31 +05:30
Peter Steinberger
182d41d678
refactor: dedupe command config lowercase helpers 2026-04-07 20:57:03 +01:00
Peter Steinberger
017c25b075
test(runtime): fix stale harness and registry mocks 2026-04-07 01:16:15 +01:00
Peter Steinberger
1a63f5b972
fix: preserve plugin auto-enable activation context 2026-04-06 22:28:45 +01:00
Vincent Koc
7d54f2a3c2 fix(config): apply filtered doctor compat at read time 2026-04-06 20:45:07 +01:00
supermario_leo
92ffb9af86 fix(config): restore applyDefaults:true for AJV plugin/channel schema validation 2026-04-06 14:32:17 +01:00
Peter Steinberger
97878b853a
refactor: move legacy config migration behind doctor 2026-04-05 16:12:45 +01:00
Peter Steinberger
40ffada812
refactor: keep plugin legacy repair in doctor 2026-04-05 15:44:53 +01:00
Peter Steinberger
23275edef1
refactor: simplify web provider plugin discovery 2026-04-05 08:50:01 +01:00
Peter Steinberger
fb580b551e
fix: restore provider and config compatibility checks 2026-04-05 03:47:57 +01:00
Vincent Koc
9e389cff3d
fix(config): migrate legacy group allow aliases (#60597)
* fix(config): migrate legacy group allow aliases

* fix(config): inline legacy streaming migration helpers

* refactor(config): rename legacy account matcher helper

* chore(agents): codify config contract boundaries

* fix(config): keep legacy allow aliases writable

* Update AGENTS.md
2026-04-04 11:15:32 +09:00
Peter Steinberger
a5e725a3b8
test: align vitest defaults with migrated config 2026-04-03 17:42:48 +01:00
Shakker
8bd3067e69 refactor: move built-in channel normalization to ids 2026-04-04 01:07:28 +09:00
Brad Groux
0aa98a8e3b
fix: import CHANNEL_IDS from leaf module to avoid TDZ on init (#48832) (#60061)
schema.ts and validation.ts imported CHANNEL_IDS from channels/registry.js,
which re-exports from channels/ids.js but also imports plugins/runtime.js.
When the bundler resolves this dependency graph, the re-exported CHANNEL_IDS
can be undefined at the point config/validation.ts evaluates (temporal dead
zone), causing 'CHANNEL_IDS is not iterable' on startup.

Fix: import CHANNEL_IDS directly from channels/ids.js (the leaf module with
zero heavy dependencies) and normalizeChatChannelId from channels/chat-meta.js.

Fixes #48832

Co-authored-by: Brad Groux <bradgroux@users.noreply.github.com>
2026-04-03 00:20:17 -05:00
Vincent Koc
f911bbc353
refactor(plugins): separate activation from enablement (#59844)
* refactor(plugins): separate activation from enablement

* fix(cli): sanitize verbose plugin activation reasons
2026-04-03 03:22:37 +09:00
Peter Steinberger
ce58f55fe0
fix: require doctor migration for legacy web search config 2026-04-01 04:22:41 +09:00
Josh Avant
788f56f30f
Secrets: hard-fail unsupported SecretRef policy and fix gateway restart token drift (#58141)
* Secrets: enforce C2 SecretRef policy and drift resolution

* Tests: add gateway auth startup/reload SecretRef runtime coverage

* Docs: sync C2 SecretRef policy and coverage matrix

* Config: hard-fail parent SecretRef policy writes

* Secrets: centralize unsupported SecretRef policy metadata

* Daemon: test service-env precedence for token drift refs

* Config: keep per-ref dry-run resolvability errors

* Docs: clarify config-set parent-object policy checks

* Gateway: fix drift fallback and schema-key filtering

* Gateway: align drift fallback with credential planner

* changelog

Signed-off-by: joshavant <830519+joshavant@users.noreply.github.com>

---------

Signed-off-by: joshavant <830519+joshavant@users.noreply.github.com>
2026-03-31 02:37:31 -05:00
fuller-stack-dev
235908c30e
fix: support multi-kind plugins for dual slot ownership (#57507) (thanks @fuller-stack-dev)
* feat(plugins): support multi-kind plugins for dual slot ownership

* fix: address review feedback on multi-kind plugin support

- Use sorted normalizeKinds() for kind-mismatch comparison in loader.ts
  (fixes order-sensitive JSON.stringify for arrays)
- Derive slot-to-kind reverse mapping from SLOT_BY_KIND in slots.ts
  (removes hardcoded ternary that would break for future slot types)
- Use shared hasKind() helper in config-state.ts instead of inline logic

* fix: don't disable dual-kind plugin that still owns another slot

When a new plugin takes over one slot, a dual-kind plugin that still
owns the other slot must not be disabled — otherwise context engine
resolution fails at runtime.

* fix: exempt dual-kind plugins from memory slot disablement

A plugin with kind: ["memory", "context-engine"] must stay enabled even
when it loses the memory slot, so its context engine role can still load.

* fix: address remaining review feedback

- Pass manifest kind (not hardcoded "memory") in early memory gating
- Extract kindsEqual() helper for DRY kind comparison in loader.ts
- Narrow slotKeyForPluginKind back to single PluginKind with JSDoc
- Reject empty array in parsePluginKind
- Add kindsEqual tests

* fix: use toSorted() instead of sort() per lint rules

* plugins: include default slot ownership in disable checks and gate dual-kind memory registration
2026-03-31 10:06:48 +05:30
Peter Steinberger
193f781fad
fix: stabilize ci and serial test gate 2026-03-30 00:43:01 +01:00
Peter Steinberger
89a4f2a34e
refactor(config): centralize runtime config state 2026-03-30 00:17:23 +01:00
Peter Steinberger
66e7e29219 refactor(config): simplify version and allowed-value resolution 2026-03-27 02:37:17 +00:00
Peter Steinberger
465f830bcd fix(config): support uri formats in schema validation 2026-03-27 02:29:32 +00:00
Peter Steinberger
40bd36e35d
refactor: move channel config metadata into plugin-owned manifests 2026-03-27 01:59:30 +00:00
Vincent Koc
a1df10caac fix(config): ignore stale plugin allow entries 2026-03-23 09:57:46 -07:00
RichardCao
7bf437402d
fix: trim config validation startup imports (#51574)
Merged via squash.

Prepared head SHA: 23b235e465
Co-authored-by: RichardCao <4612401+RichardCao@users.noreply.github.com>
Co-authored-by: huntharo <5617868+huntharo@users.noreply.github.com>
Reviewed-by: @huntharo
2026-03-21 09:31:39 -04:00
Tyler Yust
b71686ab44 Enhance web search provider config validation and compatibility handling
- Added a test to ensure no warnings for legacy Brave config when bundled web search allowlist compatibility is applied.
- Updated validation logic to incorporate compatibility configuration for bundled web search plugins.
- Refactored the ensureRegistry function to utilize the new compatibility handling.
2026-03-20 18:20:50 -07:00
Tak Hoffman
112d1d3a7c
refactor web search config ownership into extensions 2026-03-17 23:39:51 -05:00
Peter Steinberger
6b28668104 test(plugins): cover retired google auth compatibility 2026-03-16 02:11:18 +00:00
Peter Steinberger
dd40741e18
feat(plugins): add compatible bundle support 2026-03-15 16:08:50 -07:00
Nimrod Gutman
d88da9f5f8
fix(config): avoid failing startup on implicit memory slot (#47494)
* fix(config): avoid failing on implicit memory slot

* fix(config): satisfy build for memory slot guard

* docs(changelog): note implicit memory slot startup fix (#47494)
2026-03-15 19:28:50 +02:00
Peter Steinberger
43a10677ed
fix: isolate plugin discovery env from global state 2026-03-12 02:46:29 +00:00
Peter Steinberger
3c71e2bd48 refactor(core): extract shared dedup helpers 2026-03-07 10:41:05 +00:00
Gustavo Madeira Santana
f26853f14c CLI: dedupe config validate errors and expose allowed values 2026-03-02 20:05:12 -05:00
Peter Steinberger
6bf84ac28c perf(runtime): reduce hot-path config and routing overhead 2026-03-03 00:20:46 +00:00
Peter Steinberger
53d10f8688 fix(gateway): land access/auth/config migration cluster
Land #28960 by @Glucksberg (Tailscale origin auto-allowlist).
Land #29394 by @synchronic1 (allowedOrigins upgrade migration).
Land #29198 by @Mariana-Codebase (plugin HTTP auth guard + route precedence).
Land #30910 by @liuxiaopai-ai (tailscale bind/config.patch guard).

Co-authored-by: Glucksberg <markuscontasul@gmail.com>
Co-authored-by: synchronic1 <synchronic1@users.noreply.github.com>
Co-authored-by: Mariana Sinisterra <mariana.data@outlook.com>
Co-authored-by: liuxiaopai-ai <73659136+liuxiaopai-ai@users.noreply.github.com>
2026-03-02 00:10:51 +00:00
SidQin-cyber
a481ed00f5 fix(config): warn and ignore unknown plugin entry keys
Prevent gateway startup failures when plugins.entries contains stale or removed plugin ids by downgrading unknown entry keys from validation errors to warnings.

Made-with: Cursor
(cherry picked from commit 34ef28cf63)
2026-02-26 13:40:58 +00:00
Peter Steinberger
bf8ca07deb fix(config): soften antigravity removal fallout (#25538)
Land #25538 by @chilu18 to keep legacy google-antigravity-auth config entries non-fatal after removal (see #25862).

Co-authored-by: chilu18 <chilu.machona@icloud.com>
2026-02-24 23:02:45 +00:00
Peter Steinberger
87603b5c45 fix: sync built-in channel enablement across config paths 2026-02-23 19:40:42 +00:00
pickaxe
0d93c9f759 fix: include modelByChannel in config validator allowedChannels
The hand-written config validator rejects `channels.modelByChannel` as
"unknown channel id: modelByChannel" even though the Zod schema, TypeScript
types, runtime code, and CLI docs all treat it as valid. The `defaults`
meta-key was already whitelisted but `modelByChannel` was missed when
the feature was added in 2026.2.21.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 10:41:40 +01:00
Peter Steinberger
e0db04a50d fix(security): harden avatar validation and size limits 2026-02-22 08:35:32 +01:00
Peter Steinberger
b8b43175c5 style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00