Commit Graph

156 Commits

Author SHA1 Message Date
Peter Steinberger
3d7515f124 refactor: keep legacy state migration in doctor path 2026-05-11 01:43:23 +01:00
Peter Steinberger
8aeb8c6623 refactor: finish database-first state migration 2026-05-11 01:43:12 +01:00
Peter Steinberger
839b3aff8c refactor: move device and push state to sqlite 2026-05-11 01:42:09 +01:00
Peter Steinberger
b4809c6dd3 refactor: move session state migration to doctor 2026-05-11 01:42:08 +01:00
Peter Steinberger
f9c0dc2d2b fix(feishu): fall back from missing thread replies (#80306)
Summary:
- The branch adds an opt-in Feishu top-level group-send fallback for withdrawn or missing normal quoted thread replies, plus regression coverage, a changelog entry, and CI/lint typing and baseline refreshes.
- Reproducibility: yes. at source level. Current main hard-errors withdrawn/not-found Feishu reply targets when `replyInThread` is true, and the existing regression test asserts that no top-level create fallback occurs.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(feishu): fall back from missing thread replies
- PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8030…
- PR branch already contained follow-up commit before automerge: fix(clawsweeper): reconcile automerge-openclaw-openclaw-80306 with ma…
- PR branch already contained follow-up commit before automerge: fix(ci): satisfy stricter lint and test types
- PR branch already contained follow-up commit before automerge: fix(ci): align Node 24 test typing

Validation:
- ClawSweeper review passed for head 93146f9d13.
- Required merge gates passed before the squash merge.

Prepared head SHA: 93146f9d13
Review: https://github.com/openclaw/openclaw/pull/80306#issuecomment-4415604729

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-10 16:41:51 +00:00
Peter Steinberger
64a4ff41ce test: clear latest setup mock lint 2026-05-10 17:06:15 +01:00
Peter Steinberger
4aa960bd45 test: clear channel setup broad matchers 2026-05-10 16:56:21 +01:00
Vincent Koc
e1a7ee6b2b fix(cli): clarify channel setup paths 2026-05-10 06:36:15 +08:00
Peter Steinberger
ad4ec8049d test: tighten channel setup status assertions 2026-05-09 22:52:27 +01:00
Peter Steinberger
0873242dd0 test: tighten provider flow assertions 2026-05-09 22:51:28 +01:00
Peter Steinberger
c47797a549 test: tighten search setup assertions 2026-05-09 22:50:15 +01:00
Shakker
01741f81f8 test: remove stale unused imports 2026-05-09 11:26:43 +01:00
Peter Steinberger
abfa355884 test: tighten channel setup status formatter assertion 2026-05-09 07:10:46 +01:00
Peter Steinberger
86c0e3d3eb test: tighten doctor startup maintenance assertions 2026-05-09 07:08:23 +01:00
Shakker
d19735cbb3 test: tighten shared empty array assertions 2026-05-09 05:37:51 +01:00
Peter Steinberger
db35bc7693 fix: normalize retired Gemini config keys 2026-05-08 22:29:02 +01:00
Peter Steinberger
b81033d7d8 fix: normalize gemini 3.1 config writes 2026-05-08 07:26:42 +01:00
Peter Steinberger
fc1d238909 fix: normalize gemini 3.1 config refs 2026-05-08 06:48:36 +01:00
Peter Steinberger
d4eb40248a fix: normalize gemini 3 pro preview config 2026-05-08 06:08:58 +01:00
Peter Steinberger
9ef37d1907 test: tighten assertions and harness coverage 2026-05-08 05:28:12 +01:00
Vincent Koc
2597723dfc fix(test): align main channel assumptions 2026-05-07 13:03:49 -07:00
Vincent Koc
c97998ce21 chore(channels): remove bluebubbles bundled surface 2026-05-07 12:52:48 -07:00
pashpashpash
1c33990108 Route OpenAI agents through Codex by default (#78899)
* route openai agent runs through codex

* fix: load codex plugin for implicit openai runtime

* fix: preserve explicit OpenAI PI Codex auth routing

* fix: show codex auth for openai model listing

* fix: map codex auth into configured openai list rows

* fix: preserve explicit openai pi auth routes

* docs: keep openai model route examples canonical

* fix: clean openai codex test fixtures

* fix: scope codex auth status fallback

* fix: repair current ci boundary drift
2026-05-07 19:46:49 +09:00
pashpashpash
3a901b5e95 Revert "Install Codex plugin on OpenAI model selection (#78799)" (#78878)
This reverts commit c8f3fecad6.
2026-05-07 18:13:59 +09:00
pashpashpash
c8f3fecad6 Install Codex plugin on OpenAI model selection (#78799)
* route openai agent runs through codex

* fix: load codex plugin for implicit openai runtime

* docs: credit openai codex auth fix

* fix(agents): respect custom openai runtime routing

* fix(agents): install codex plugin on openai selection

* fix(agents): preserve OpenAI Codex auth switching

* fix(ci): restore channel contract runner expression

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-05-07 01:57:34 -07:00
the sun gif man
d4b4660026 config: stop automatic writes and guard Nix mutators (#78047)
Keep startup-derived plugin enablement, gateway auth tokens, control UI origins, and owner-display secrets runtime-only instead of persisting them into openclaw.json.

Refuse config writers, mutating update/plugin lifecycle commands, and doctor repair/token generation in Nix mode with agent-first nix-openclaw guidance.

Verification:
- pnpm check
- pnpm build
- pnpm test -- src/config/io.write-config.test.ts src/config/mutate.test.ts src/config/io.owner-display-secret.test.ts src/gateway/server-startup-config.recovery.test.ts src/gateway/startup-auth.test.ts src/gateway/startup-control-ui-origins.test.ts src/cli/plugins-cli.install.test.ts src/cli/plugins-cli.policy.test.ts src/cli/plugins-cli.uninstall.test.ts src/cli/plugins-cli.update.test.ts src/cli/update-cli.test.ts src/auto-reply/reply/commands-plugins.install.test.ts src/auto-reply/reply/commands-plugins.test.ts src/commands/onboarding-plugin-install.test.ts src/commands/doctor.runs-legacy-state-migrations-yes-mode-without.e2e.test.ts src/commands/doctor/shared/codex-route-warnings.test.ts src/commands/doctor/repair-sequencing.test.ts src/agents/auth-profile-runtime-contract.test.ts src/auto-reply/reply/agent-runner-execution.test.ts
- GitHub CI green on 05a2c71b90

Co-authored-by: Codex <noreply@openai.com>
2026-05-06 14:43:32 +02:00
Sliverp
329580c64d fix(onboard): recover externalized channel plugin from stale config (#78328)
When a user's config has a stale `channels.<id>` entry (e.g. `appId`
or tokens left over from an earlier install) and the plugin is no
longer on disk -- for instance because the externalized npm package
was uninstalled or pruned during an upgrade -- `handleChannelChoice`
used to dead-end with "<channel> plugin not available." and leave
onboard stuck until the user manually deleted the config entry and
re-ran the CLI.

Two discovery paths are affected:

1. The `installedCatalogEntry` branch: when
   `loadScopedChannelPlugin` returns null but the catalog entry still
   carries `install.npmSpec`, fall back to
   `ensureChannelSetupPluginInstalled` with the same entry so onboard
   can reinstall the plugin from the official catalog.

2. The bundled-enable `else` branch: with a non-empty
   `channels.<id>` record, `isStaticallyChannelConfigured` drops the
   channel from `installableCatalogEntries`; if the plugin is also
   missing on disk (so it never enters `manifestInstalledIds`), both
   discovery buckets come back empty and the channel falls through to
   `enableBundledPluginForSetup`. Before delegating to that bundled
   path, consult the trusted catalog via
   `getTrustedChannelPluginCatalogEntry` and, if an `install.npmSpec`
   is available, drive the same catalog install flow used by a fresh
   pick of the channel.

Both new fallbacks re-apply the `resolveConfigDisabledHint` guard
that `enableBundledPluginForSetup` has always enforced, so an
operator-disabled channel (`plugins.entries.<id>.enabled === false`
or explicit `channels.<id>.enabled === false`) with a stale config
entry cannot be silently reinstalled or re-enabled through the
catalog path.

Both branches also keep their previous behavior when no catalog npm
spec is available (e.g. purely bundled channels), so this change is
a superset of the old flow rather than a replacement.

Affects all externalized channel plugins listed in the core
package's `files` exclusion (qqbot, bluebubbles, discord, whatsapp,
line, msteams, feishu, googlechat, nostr, zalo, zalouser,
synology-chat, tlon, twitch, and similar).
2026-05-06 15:55:16 +08:00
Peter Steinberger
8bfabd6bb1 feat: add channel message lifecycle sdk 2026-05-06 01:46:42 +01:00
Vincent Koc
bca6709203 fix(doctor): repair legacy Codex route config
Repair legacy openai-codex route config and session pins safely.
2026-05-05 17:42:41 -07:00
Vincent Koc
5a0d6c7ad8 fix(gateway): keep reset and refresh paths responsive (#77701)
* fix(hooks): keep session memory slugging off reset hot path

* fix(hooks): run session memory capture asynchronously

* fix(cli): avoid stuck gateway command exits

* fix(gateway): cache empty read-only model catalog

* fix(doctor): stop stale TUI clients for WhatsApp responsiveness
2026-05-05 00:59:13 -07:00
Vincent Koc
0131343db8 docs(doctor): clarify configured plugin repair (#77613) 2026-05-04 18:16:29 -07:00
hcl
b1db87fb36 fix(doctor): commit legacy migrations even when unrelated validation fails (#76800)
* fix(doctor): commit legacy migrations even when unrelated validation fails (#76798)

migrateLegacyConfig previously returned config: null when post-migration
validation found any issue (e.g. a missing plugin). The caller then kept
the unmigrated config as the candidate, so doctor --fix never wrote the
legacy migration to disk.

Now when validation fails after a successful migration, the migrated
config is returned with partiallyValid: true. applyLegacyCompatibilityStep
always commits the migrated config to state.candidate, ensuring
agents.defaults.llm and other known-legacy keys are cleaned up on
doctor --fix even when an unrelated provider or plugin issue blocks
the full validator.

Adds regression test asserting that candidate is updated to the migrated
shape when partiallyValid is set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fixup: extend skipPluginValidation to write path with E2E coverage

Thread skipPluginValidationOnWrite through loadAndMaybeMigrateDoctorConfig
return value into runWriteConfigHealth so replaceConfigFile bypasses plugin
validation when migration is only partially valid. Add E2E test verifying
the flag propagates end-to-end.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fixup(doctor): wire skipPluginValidation through full write path (#76800)

Clawsweeper P2 x2:
1. io.ts exported writeConfigFile wrapper now passes skipPluginValidation to
   createConfigIO so both write-phase validation and post-write loadConfig
   re-read honor the flag.
2. mutate.ts tryWriteSingleTopLevelIncludeMutation now skips plugin validation
   when writeOptions.skipPluginValidation is set, so include-write fast path
   no longer blocks safe legacy migrations with unrelated plugin errors.

Adds regression test: skipPluginValidation bypasses plugin schema rejection
on writeConfigFile and falls back to throwing when flag is not set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fixup(doctor): bail out of include fast path when skipPluginValidation is set (#76800)

Clawsweeper P2: after the include write, readConfigFileSnapshotForWrite()
calls loadConfig() which validates with plugins; refreshedSnapshot.valid is
false when an unrelated plugin issue exists, causing the include path to
throw even though skipPluginValidation was requested.

Simplest fix: return false from tryWriteSingleTopLevelIncludeMutation when
skipPluginValidation is set, letting the root writer handle the write with
plugin validation disabled end-to-end (including post-write readback via
createConfigIO({ pluginValidation: "skip" })).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(doctor): cover partial legacy migration writes

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-04 00:34:24 +01:00
Peter Steinberger
797d02497e fix: prune stale plugin runtime symlinks 2026-05-03 21:49:53 +01:00
ANURAG BHEEMAPPA GNANAMURTHY
727398f41a fix(onboarding): mask token/credential inputs in CLI wizard prompts (#76693)
Summary:
- The PR adds `sensitive` support to wizard text prompts, routes sensitive Clack prompts through `password()`, ...  preserves existing gateway secrets through masked-preview confirms, and adds tests plus a changelog entry.
- Reproducibility: yes. Source inspection shows current main routes onboarding credential entry through visibl ... y provides a concrete Windows PowerShell `openclaw onboard --install-daemon` reproduction with screenshots.

Automerge notes:
- No ClawSweeper repair was needed after automerge opt-in.

Validation:
- ClawSweeper review passed for head a3db64c265.
- Required merge gates passed before the squash merge.

Prepared head SHA: a3db64c265
Review: https://github.com/openclaw/openclaw/pull/76693#issuecomment-4366253531

Co-authored-by: anurag-bg-neu <bheemappagnanamurt.a@northeastern.edu>
2026-05-03 14:33:58 +00:00
Peter Steinberger
1402997489 fix(sandbox): move registry file migration to doctor 2026-05-03 13:25:32 +01:00
Vincent Koc
d89be34360 fix(onboarding): trust official web search installs 2026-05-03 00:48:37 -07:00
Val Alexander
05c9492bff fix: reduce WebUI session latency churn (#76277) thanks @BunsDev
Reduce WebUI/Gateway latency churn by avoiding redundant session reloads, carrying session keys through transcript update events, and deferring explicit media provider discovery. Includes changelog attribution and closes the referenced runtime latency issues.
2026-05-02 18:39:06 -05:00
Peter Steinberger
15bbf4f2f3 fix(channels): clarify remote install hints
Clarify remote channel install hints and align onboarding install source labels with progress-bar coverage.
2026-05-02 15:57:41 -07:00
Peter Steinberger
282051a14f fix: install disabled external search providers 2026-05-02 22:14:37 +01:00
Vincent Koc
46d4238425 fix(plugins): install external search plugins during onboarding 2026-05-02 13:58:07 -07:00
Mariano
3b347d1c7e Add agent visibility to skills check (#75983)
Merged via squash.

Prepared head SHA: 63bac4340f
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
2026-05-02 20:50:38 +02:00
Peter Steinberger
b63d098e8c fix: repair configured plugin installs (#76129)
Summary:
- The PR adds a 2026.5.2 doctor repair pass for actively used configured downloadable plugins, prefers ClawHub ... pm fallback, records installed plugin state, extends upgrade-survivor coverage, and updates docs/changelog.
- Reproducibility: yes. Static inspection of current main and the PR head gives a high-confidence reproduction ... d-plugin install pass, while the PR tests the new repair-only path, success stamping, and warning behavior.

ClawSweeper fixups:
- Included follow-up commit: test: cover configured plugin install update path
- Included follow-up commit: test: isolate channel option metadata cache
- Included follow-up commit: fix: keep configured plugin repair scoped

Validation:
- ClawSweeper review passed for head d3519ce42c.
- Required merge gates passed before the squash merge.

Prepared head SHA: d3519ce42c
Review: https://github.com/openclaw/openclaw/pull/76129#issuecomment-4364120658

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-02 15:49:52 +00:00
Peter Steinberger
eceb382c01 refactor: hide doctor overview internals 2026-05-02 08:16:05 +01:00
Peter Steinberger
ee8f47eda7 feat(searxng): show setup JSON format note 2026-05-02 06:51:18 +01:00
Peter Steinberger
ba21070a57 refactor: trim flow contribution exports 2026-05-02 03:03:22 +01:00
Peter Steinberger
23fd8a90f9 refactor: simplify plugin module loading 2026-05-02 01:41:09 +01:00
Peter Steinberger
6af6688ce2 fix: warn on legacy WhatsApp cron health checks 2026-05-01 22:45:53 +01:00
Peter Steinberger
112dedd093 refactor: remove plugin dependency cleanup leftovers 2026-05-01 21:55:50 +01:00
Peter Steinberger
ed8f50f240 refactor: simplify plugin dependency handling
Simplify plugin installation and runtime loading around package-manager-owned dependencies, with Jiti reserved for local/TS fallback paths.

Also scans npm plugin install roots so hoisted transitive dependencies are covered by dependency denylist and node_modules symlink checks.
2026-05-01 21:32:22 +01:00
Peter Steinberger
32359e667b fix: allow doctor repair size drops 2026-05-01 13:02:24 +01:00