Commit Graph

3865 Commits

Author SHA1 Message Date
Peter Steinberger
4118a32aad test: enforce per-test ci threshold 2026-05-26 04:35:20 +01:00
Gio Della-Libera
17ab9b967c fix(agents): skip wildcard catalog metadata refs (#86524)
* fix(agents): skip wildcard catalog metadata refs

* fix(models): skip wildcard configured rows
2026-05-25 20:22:32 -07:00
brokemac79
56633e4f3c fix(cli): route plugin packaging recovery hints
Route invalid-config recovery output for source-only installed plugin packages to plugin packaging guidance instead of openclaw doctor --fix.

Validated with focused config/CLI/gateway/plugin tests, autoreview, Crabbox/Testbox E2E tbx_01ksgr80tnvvc13kv6t126yv78, and green PR CI on 3b3ce73d0f.

Thanks @brokemac79.
2026-05-26 01:13:20 +01:00
Peter Steinberger
77d9ac30bb refactor: reuse shared coercion helpers (#86419)
* refactor: share talk event metric extraction

* refactor: reuse shared coercion helpers

* refactor: reuse shared primitive guards

* refactor: reuse shared record guard

* refactor: reuse shared primitive helpers

* refactor: reuse shared string guards

* refactor: reuse shared non-empty string guard

* refactor: share plugin primitive coercion helpers

* refactor: reuse plugin coercion helpers

* refactor: reuse plugin coercion helpers in more plugins

* refactor: reuse channel coercion helpers

* refactor: reuse monitor coercion helpers

* refactor: reuse provider coercion helpers

* refactor: reuse core coercion helpers

* refactor: reuse runtime coercion helpers

* refactor: reuse helper coercion in codex paths

* refactor: reuse helper coercion in runtime paths

* refactor: reuse codex app-server coercion helpers

* refactor: reuse codex record helpers

* refactor: reuse migration and qa record helpers

* refactor: reuse feishu and core helper guards

* refactor: reuse browser and policy coercion helpers

* refactor: reuse memory wiki record helper

* refactor: share boolean coercion helpers

* refactor: reuse finite number coercion

* refactor: reuse trimmed string list helpers

* refactor: reuse string list normalization

* refactor: reuse remaining string list helpers

* refactor: reuse string entry normalizer

* refactor: share sorted string helpers

* refactor: share string list normalization

* test: preserve command registry browser imports

* refactor: reuse trimmed list helpers

* refactor: reuse string dedupe helpers

* refactor: reuse local dedupe helpers

* refactor: reuse more string dedupe helpers

* refactor: reuse command string dedupe helpers

* refactor: dedupe memory path lists with helper

* refactor: expose string dedupe helpers to plugins

* refactor: reuse core string dedupe helpers

* refactor: reuse shared unique value helpers

* refactor: reuse unique helpers in agent utilities

* refactor: reuse unique helpers in config plumbing

* refactor: reuse unique helpers in extensions

* refactor: reuse unique helpers in core utilities

* refactor: reuse unique helpers in qa plugins

* refactor: reuse unique helpers in memory plugins

* refactor: reuse unique helpers in channel plugins

* refactor: reuse unique helpers in core tails

* refactor: reuse unique helper in comfy workflow

* refactor: reuse unique helpers in test utilities

* refactor: expose unique value helper to plugins

* refactor: reuse unique helpers for numeric lists

* refactor: replace index dedupe filters

* refactor: reuse string entry normalization

* refactor: reuse string normalization in plugin helpers

* refactor: reuse string normalization in extension helpers

* refactor: reuse string normalization in channel parsers

* refactor: reuse string normalization in memory search

* refactor: reuse string normalization in provider parsers

* refactor: reuse string normalization in qa helpers

* refactor: reuse string normalization in infra parsers

* refactor: reuse string normalization in messaging parsers

* refactor: reuse string normalization in core parsers

* refactor: reuse string normalization in extension parsers

* refactor: reuse string normalization in remaining parsers

* refactor: reuse string normalization in final parser spots

* refactor: reuse string normalization in qa media helpers

* refactor: reuse normalization in provider and media lists

* refactor: reuse normalization for remaining set filters

* refactor: reuse normalization in policy allowlists

* refactor: reuse normalization in session and owner lists

* refactor: centralize primitive string lists

* refactor: reuse lowercase entry helpers

* refactor: reuse sorted string helpers

* refactor: reuse unique trimmed helpers

* refactor: reuse string normalization helpers

* refactor: reuse catalog string helpers

* refactor: reuse remaining string helpers

* refactor: simplify remaining list normalization

* refactor: reuse codex auth order normalization

* chore: refresh plugin sdk api baseline

* fix: make shared string sorting deterministic

* chore: refresh plugin sdk api baseline

* fix: align host env security ordering
2026-05-25 21:20:41 +01:00
Peter Steinberger
a0023fbfa0 perf: speed up local TUI startup 2026-05-25 20:30:00 +01:00
Dallin Romney
a61d5308b5 fix(auth): emit one-shot doctor-pointer warning for Keychain-only legacy Codex OAuth profiles (#86220) 2026-05-25 11:39:32 -07:00
IWhatsskill
c916906584 fix(cron): preserve unsupported payload rows on writes 2026-05-25 19:23:47 +01:00
Sebastien Tardif
915c820c38 fix(google): stop appending preview to flash lite
Normalize Google Gemini 3.1 Flash Lite routing to the GA model id and keep the retired preview spelling as a compatibility alias. Align default alias docs, FAQ guidance, and deprecated-model manifest recommendations with the GA id.

Fixes #86151.

Co-authored-by: Sebastien Tardif <sebtardif@ncf.ca>
2026-05-25 19:12:36 +01:00
liaoyl830
6e8d2dbbbc fix(doctor): skip restart prompt when gateway is healthy after recent restart (#86533)
* fix(doctor): skip restart prompt when gateway is healthy after recent restart

`openclaw doctor` unconditionally prompted "Restart gateway service now?"
with default=Yes whenever the gateway was running, even if it had just
restarted via SIGUSR1 after an update. This caused restart loops on macOS
where the prompt raced with launchctl KeepAlive.

Changes:
- Probe gateway health before the restart prompt when a restart handoff
  exists (deep doctor mode). If healthy, skip the prompt entirely.
- Change `initialValue` from `true` to `false` as a safety net so users
  don't accidentally confirm a restart by pressing Enter.
- Update existing test that expected a single `readGatewayRestartHandoffSync`
  call (now called twice: diagnostic display + health-probe check).

Fixes #86518

* fix(doctor): correct GatewayRestartHandoff mock types in tests

Add explicit literal types + satisfies constraint so the mock handoff
objects match the exact GatewayRestartHandoff type expected by the
type-check CI.

* fix(doctor): apply recent-restart skip to normal doctor flow

* test(doctor): align normal-flow handoff expectation

* chore: add doctor restart prompt changelog

---------

Co-authored-by: OpenClaw Contributor <openclaw-contributor@example.com>
Co-authored-by: liaoyl830 <267396060+liaoyl830@users.noreply.github.com>
Co-authored-by: sallyom <somalley@redhat.com>
2026-05-25 13:53:28 -04:00
Jason (Json)
5cfa577778 Recover Codex context overflow prompt errors (#85542)
* fix: recover codex context overflow prompt errors

* test: align Codex overflow prompt proof

* test: satisfy manifest registry mock contract

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-25 17:44:48 +01:00
Gio Della-Libera
dc17412c3a Doctor: expose shell completion health findings (#85566)
* feat(doctor): expose shell completion health findings

* fix(doctor): keep shell completion lint informational
2026-05-25 08:39:41 -07:00
Chunyue Wang
89aea9b843 fix(sessions): stop doctor OOM on large session stores and reclaim stale store temps (#85967)
* fix(sessions): stop doctor OOM on large session stores and reclaim stale store temps

`openclaw doctor` loaded the full sessions.json via loadSessionStore with the
default cache-write plus return clone, materializing a multi-hundred-MB
monolithic store several times and exhausting the heap (#56827). The read-only
doctor checks (state integrity, heartbeat target, codex route scan) now load
with { skipCache: true, clone: false } so the store is materialized once.

Orphaned session-store atomic-write temps were also never reclaimed: the store
write went through the generic atomic writer, staging a shared
.fs-safe-replace.<pid>.<uuid>.tmp not identifiable as a store temp. Give the
store write a store-specific tempPrefix so its temps stage as
sessions.json.<pid>.<uuid>.tmp, classify them (isSessionStoreTempArtifactName),
and reclaim stale ones via the disk-budget sweep and the unreferenced-artifact
prune on a short staleness window so in-flight temps are preserved.

Fixes #56827

* docs(changelog): note large session store doctor fix

* test(qa): preserve WhatsApp RTT source literal

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-25 16:19:35 +01:00
Peter Steinberger
5f934830d3 fix: quiet retained lost task noise (#86475) 2026-05-25 13:28:23 +01:00
Rohit
a6df39dd92 fix(models): show oauth marker auth status (#86378) 2026-05-25 12:21:06 +01:00
xin zhuang
c637944707 fix(doctor): warn and continue when cron job store is unreadable (#86384)
Catch non-ENOENT load failures inside maybeRepairLegacyCronStore so an
unreadable ~/.openclaw/cron/jobs.json (e.g. root-owned 0600 inside
Docker) no longer aborts the rest of the doctor health checks. The
scheduler-side loadCronStore keeps its strict throw-on-read-failure
contract.

Closes #86102

Co-authored-by: 1052326311 <1052326311@users.noreply.github.com>
2026-05-25 12:20:52 +01:00
FullerStackDev
17edec75e4 honor migrate auth opt-out in plan 2026-05-25 09:16:37 +01:00
FullerStackDev
2016a511c3 fix migrate auth opt-out precedence 2026-05-25 09:16:37 +01:00
FullerStackDev
f036bac144 migrate auth credentials 2026-05-25 09:16:37 +01:00
Vincent Koc
a5d5604198 fix(tests): harden native macos plugin proof 2026-05-25 07:21:12 +02:00
pashpashpash
dd47e479ae Fail Codex compaction at the Codex boundary (#85958) 2026-05-24 22:12:34 -07:00
Gio Della-Libera
9e8cc7e077 fix(doctor): migrate Feishu account bot names (#86081) 2026-05-24 14:40:16 -07:00
Ayaan Zaidi
eb9b882dae fix(telegram): migrate legacy cache sidecars 2026-05-24 18:58:02 +05:30
Gio Della-Libera
76221b53c2 fix(doctor): prune stale bundled plugin paths (#85038) 2026-05-23 20:39:42 -07:00
NianJiu
0abedd546a fix(models): preserve source snapshots for SecretRef providers
* fix(models): preserve source snapshots for SecretRef providers

* docs: add models SecretRef changelog entry

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-24 03:48:05 +01:00
Andy Tien
aa050a6e95 fix(doctor): repair stale contextWindow for DeepSeek V4 Flash (#85840)
* fix(doctor): repair stale contextWindow for DeepSeek V4 Flash

Problem:
- Older releases configured deepseek-v4-flash with contextWindow: 200000
- Official DeepSeek V4 Flash context window is 1,000,000 (1M)
- Users switching from smaller models see incorrect progress bar (e.g.,
  50% instead of 10%) because stale config value overrides catalog

Fix:
- Add 'models.providers.*.models.*.contextWindow-stale' migration
- Detects deepseek-v4-flash models with 200K contextWindow
- Repairs to 1M to match catalog default
- Handles both bare and provider-prefixed model IDs
- 7 unit tests covering repair, passthrough, edge cases

Fixes: #85834

* fix(doctor): preserve custom DeepSeek context windows

* fix(doctor): detect stale DeepSeek context windows

* fix(doctor): scope DeepSeek context repair

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-24 02:22:53 +01:00
Jason O'Neal
77d1157618 fix(backup): reject missing hardlink targets 2026-05-24 00:05:55 +01:00
Jason O'Neal
d8a2cd5204 fix(backup): dereference archive hardlinks 2026-05-24 00:05:55 +01:00
Peter Steinberger
3cf806d172 fix(telegram): cache outbound replies for context
Co-authored-by: Keshav's Bot <keshavbotagent@gmail.com>
2026-05-24 00:04:16 +01:00
Peter Steinberger
4314674054 perf: reuse plugin metadata snapshots (#85843)
* perf: reuse plugin metadata snapshots

* test: update plugin metadata snapshot mocks
2026-05-23 23:34:19 +01:00
Peter Steinberger
f4b5e58231 fix: aggressively prune retired model catalogs 2026-05-23 17:29:50 +01:00
Joey Frasier (Boothe)
ec65b71f5e fix(doctor): skip empty entries and memoize routes in plugin session repairs (#85718)
* fix(doctor): skip empty entries and memoize routes in plugin session repairs

runPluginSessionStateDoctorRepairs called resolveConfiguredDoctorSessionStateRoute
once per session-store key, even for entries that carry no plugin route state
fields. On stores with many CLI sessions (observed ~800 entries), each call
takes ~1.5s due to resolveAgentHarnessPolicy walking config and provider
metadata, so the doctor's state-integrity contribution hangs for minutes
and the surrounding 'openclaw doctor' run effectively never completes.

scanEntryForOwner can only produce repair/manual-review findings when the
entry exposes one of the fields covered by entryMayContainPluginSessionRouteState
(providerOverride/modelOverride/agentHarnessId/cliSessionBindings/etc.), so
the route resolution for empty entries was pure waste. The route itself is
also a function of agentId (sessionKey is only used to derive agentId), so
sessions sharing an agent can reuse one resolved route.

Filter the store by entryMayContainPluginSessionRouteState before resolving,
and memoize resolveConfiguredDoctorSessionStateRoute by agentId within the
remaining entries. On the repro store this drops the contribution from
'never completes' to <100ms.

Adds a guard test that builds a 200-entry store with 2 route-state-carrying
entries and asserts (a) the repair fires exactly once on the codex owner
and (b) the run completes in under 2s (pre-fix would take >5 minutes).

* fix(doctor): skip manifest model-id normalization in plugin session repairs

After the previous filter+memoize fix, runPluginSessionStateDoctorRepairs was
still ~38s on a 230-entry store because every scanned entry calls parseModelRef
on its runtime model. That implicitly enters manifest-driven model-id
normalization via normalizeStaticProviderModelId, which calls
loadPluginMetadataSnapshot when no current snapshot is bound to process state.

loadPluginMetadataSnapshot is filesystem-heavy and is only memoized when a
'current' snapshot is bound (it is not, during doctor), so each parseModelRef
call paid ~40ms of fresh plugin-metadata loading. 672 calls × ~40ms = ~27s
of doctor wall-clock, all of it useless for doctor's purposes: the scan only
needs the normalized provider id of the configured runtime/route to compare
against an owner's providerIds, never the manifest-normalized model id.

Pass allowManifestNormalization: false alongside the existing
allowPluginNormalization: false on all three parseModelRef call sites in
this file. normalizeStaticProviderModelId short-circuits to
normalizeBuiltInProviderModelId when allowManifestNormalization is false,
which is what doctor wants here.

On the same 230-entry store doctor:state-integrity drops from ~38s to ~2.4s
and total openclaw doctor wall-clock drops from ~91s to ~56s.
2026-05-23 16:55:35 +01:00
Peter Steinberger
b6530beb05 fix: prune retired model catalog entries 2026-05-23 16:46:59 +01:00
Gio Della-Libera
c897384ae9 fix(doctor): canonicalize git checkout detection (#85735) 2026-05-23 08:42:23 -07:00
ANIRUDDHA ADAK
74e65f4d85 fix(skills): show empty state notice in config wizard (#85032)
* fix(skills): show empty state notice when no dependencies to install

* fix(skills): gate empty dependency notice

* fix(skills): tighten all-ready dependency notice

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
Co-authored-by: Gio Della-Libera <giodl73@gmail.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-23 15:49:49 +01:00
Daniel Marta
4ec85762ab feat(auth): support named model login profiles
* docs(auth): document named OAuth profile logins

* feat(auth): support --profile-id in models auth login

* docs: note named model login profiles

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-23 12:44:57 +01:00
Gio Della-Libera
f7c05dcc9e fix(status): bound deep docker audit probes (#85476)
* fix(status): bound deep docker audit probes

* chore(status): defer changelog entry to landing

* docs(changelog): note status docker probe timeout

* fix(status): surface Docker probe timeouts

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-23 12:08:48 +01:00
alkor2000
71ddc016a8 fix(twitch): preserve newer message handler during cleanup (#85425)
* fix(twitch): preserve newer message handler during cleanup

Fixes #83888.

`TwitchClientManager.onMessage` returns a cleanup closure that called
`messageHandlers.delete(key)` unconditionally. When a second onMessage()
for the same account replaced the handler, running the earlier cleanup
deleted the newer handler, leaving the account with no handler and
silently dropping all inbound messages.

Guard the delete with a referential check so the cleanup only removes
the handler it registered. Adds regression tests covering both the
stale-cleanup case (newer handler must survive) and the normal case
(current handler is still removed).

* fix(twitch): distinguish handler registrations

* fix(signal): avoid dangling test export name

* test(meeting-notes): use public sdk imports

* test(sdk): classify meeting-notes subpath

* fix(discord): keep channel entrypoint imports narrow

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-23 11:49:01 +01:00
Vincent Koc
5db773fad8 fix(docker): avoid printing gateway token 2026-05-23 11:54:53 +02:00
Peter Steinberger
2c536a8626 docs: absorb documentation PR sweep 2026-05-23 10:23:34 +01:00
Peter Steinberger
99a1107b61 docs: absorb hook and subagent guidance PRs 2026-05-23 09:47:37 +01:00
Gio Della-Libera
959b935f3d fix(doctor): classify codex asset notice as info (#85119) 2026-05-22 18:28:45 -07:00
Josh Avant
f2365053d3 fix(codex): add API key paste auth (#85533)
* fix codex api key auth paste

* changelog for codex api key auth

* support piped codex api key auth

* fix codex auth prompt validator type

* normalize pasted codex auth secrets

* honor codex auth profile type at runtime
2026-05-22 17:53:05 -07:00
Fermin Quant
951bbe67b0 fix: use fs-safe trash for agent delete (#84394) 2026-05-22 15:53:41 -07:00
Dallin Romney
299ed80834 fix: reuse provider auth lookup facts (#85499)
* fix: reuse provider auth lookup facts

* test: update model auth mocks

* fix: scope synthetic auth registry lookup
2026-05-22 15:14:04 -07:00
Sergio Cadavid
7134a95c90 fix(memory): report qmd workspace cwd probe failures (#63167) 2026-05-22 22:31:59 +01:00
Peter Steinberger
bb5010b89a docs: absorb docs sweep
Co-authored-by: Kai <kai@itskai.dev>
Co-authored-by: Weihang <gwh7078@163.com>
Co-authored-by: Scott Long <longstoryscott@gmail.com>
Co-authored-by: moejaberr <mjaber@uoguelph.ca>
Co-authored-by: huihui0822 <109355071+huihui0822@users.noreply.github.com>
2026-05-22 21:52:01 +01:00
Peter Steinberger
59aef2ff0d fix: apply docs sweep updates 2026-05-22 18:40:20 +01:00
Josh Lehman
cff5244a5b feat: add context-engine host capability requirements (#84994)
* feat(context-engine): add host capability requirements

* fix(context-engine): advertise pi host capabilities

* fix: repair incompatible context engine slots
2026-05-22 10:28:08 -04:00
Jayesh Betala
66d1d13889 fix(gateway): include openclaw bin in service PATH (#84475)
* fix(gateway): include openclaw bin in service PATH

* fix(doctor): accept expected service PATH

* docs(changelog): mention managed service PATH bin fix

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-05-22 21:28:50 +08:00
Peter Steinberger
111bad1065 fix(doctor): point codex asset warning at migrate plan (#85324) 2026-05-22 13:40:15 +01:00