Commit Graph

3888 Commits

Author SHA1 Message Date
Sasan
6938f7dddb fix: allow gateway service commands for named profiles (#116314)
* fix: gateway service commands refuse a named profile or relocated OPENCLAW_HOME

- Resolve the default install identity against the canonical state directory
  for the active OpenClaw home and profile instead of the unprofiled OS
  account default.
- `--profile <name>` / `--dev` project `.openclaw-<profile>` state and config
  paths, so every named profile was classified as isolated state and refused
  `install`, `start`, `stop`, `restart`, `uninstall`, Doctor service repair,
  and self-update service handling.
- `OPENCLAW_HOME` relocates all OpenClaw path defaults and is documented for
  running as a dedicated service user; a relocated home is now an install
  identity. `HOME` alone still is not.
- An `OPENCLAW_STATE_DIR` or `OPENCLAW_CONFIG_PATH` pointing outside those
  canonical paths is still treated as isolated state.
- Recovery guidance in the refusal message now names the paths that must match.

Verified: focused vitest shards for the changed suites plus the daemon, CLI,
and doctor suites that consume the identity check; tsgo core and core-test
lanes; oxlint; docs format, MDX, link, and map checks.

* fix(gateway): keep relocated homes isolated

* fix(config): validate service profile identity

* fix(daemon): enforce named-profile service ownership

* fix(update): reject drifted service selectors before probes

* test(windows): prove scheduled task lifecycle

* test(windows): harden scheduled task proof cleanup

* test(windows): bind lifecycle proof to checkout

* test(windows): normalize cleanup exit status

* test(windows): verify effective task privilege

* test(windows): protect scheduled task proof roots

* test(windows): prove listener-owned task lifecycle

* test(windows): fix scheduled task proof contracts

* test(windows): remove redundant mock coercions

* test(windows): measure fallback before task probes

* test(windows): prove scheduled task process origin

* fix(gateway): preserve unmanaged restart fallback

* test(gateway): cover denied restart ownership

* test(gateway): keep restart helper types private

* test(gateway): classify lifecycle helpers as test code

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-01 11:28:39 +08:00
Peter Steinberger
95e50d3a7f fix(terminal): measure unicode display width consistently (#117062)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 18:25:15 -07:00
Yuval Dinodia
c13a0493aa fix(config): delete one array element per config patch delete (#116463)
`openclaw config patch` with a null leaf at an array index removed three
entries instead of one, and reported success. runConfigOperations spliced the
element out of the in-memory config and also pushed the path into unsetPaths,
which the writer replays twice against the persist candidate, so every replay
removed one more neighbour.

runConfigUnset already suppresses unsetPaths for array leaves (fb73f2161e,
issue #76290). runConfigOperations ignored the leafContainer that unsetAtPath
returns and pushed unconditionally. It now applies the same guard, so object
keys keep their write-level unset path and array indices do not.
2026-07-31 17:53:24 -07:00
Vincent Koc
89aadef6ef feat(plugins): externalize iMessage channel (#117101) 2026-08-01 08:01:18 +08:00
Peter Steinberger
433bb3f954 fix(cli): make commands, completion, and JSON output reliable (#116033)
* fix(cli): make commands, completion, and JSON output reliable

* fix(cli): reconcile completion coverage with current main

* test(cli): keep test routing stable across isolation lanes
2026-07-31 16:20:34 -07:00
Peter Steinberger
6b40ad6a66 fix(cli): honor shell-owned completion profile locations (#117002)
* fix(cli): honor shell-owned completion profile locations

* test(cli): isolate completion profiles across platforms

* fix(wizard): reuse canonical completion profile hints

---------

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 15:41:08 -07:00
Vincent Koc
61fb29e90a feat(plugins): externalize OpenCode Go provider (#117064) 2026-08-01 06:31:19 +08:00
Peter Steinberger
383363e362 fix(cron): preserve lazy ownership and bounded notification lifetimes (#117018)
* fix(cron): preserve lazy ownership and bound notification lifetimes

* fix(cron): respect fs-safe policy boundary

---------

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 14:38:21 -07:00
Vincent Koc
e73250f54b feat(plugins): externalize OpenCode provider (#117035)
* feat(plugins): externalize OpenCode provider

* docs: refresh OpenCode provider map
2026-08-01 05:07:35 +08:00
Peter Steinberger
b9dadca579 fix(cli): keep config file output raw under JSON logging (#116968)
* fix(cli): keep config path output raw

* test(cli): assert raw config path output

* docs(changelog): note raw config path output

* fix(cli): terminate config path output

* docs(changelog): defer config output note
2026-07-31 13:28:53 -07:00
Vincent Koc
e84e2a49fc feat(plugins): externalize NovitaAI provider (#117007) 2026-08-01 03:53:46 +08:00
Peter Lee
daff73b7ad fix(gateway): prevent crash loops from state DB schema migration errors (#116733) 2026-08-01 03:34:49 +08:00
Vincent Koc
8b93fd963c feat(plugins): externalize Mistral provider (#116919)
* feat(plugins): externalize Mistral provider

* fix(update): preserve external provider models during repair

* chore(release): keep Mistral note in PR body
2026-08-01 03:04:12 +08:00
metaforismo
0388d0095e fix(cli): keep logs startup read-only (#116869)
Keep log retrieval diagnostic-first and non-mutating while core configuration validation remains active. Explicit Doctor runs continue to own plugin-sensitive validation and state migration.\n\nFixes #116853
2026-08-01 01:50:32 +08:00
Jason (Json)
df59af2fa6 fix: agent turns survive unavailable optional web credentials (#112522)
* fix: prevent web credential failures from blocking agent turns

* test: complete optional secret target mocks
2026-07-31 10:16:45 -06:00
Peter Steinberger
f66fff57f3 fix(cli): preserve completion profiles and option value contracts (#116906)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 08:59:11 -07:00
Vincent Koc
a1026663ae feat(plugins): externalize ComfyUI provider (#116888) 2026-07-31 23:26:51 +08:00
Vincent Koc
e93de36081 feat(plugins): externalize BytePlus provider (#116866) 2026-07-31 22:37:47 +08:00
Vincent Koc
fab2c33cad feat(plugins): externalize Xiaomi provider (#116861) 2026-07-31 22:02:07 +08:00
Vincent Koc
b2b62b2e1e feat(plugins): externalize Volcengine provider (#116854) 2026-07-31 21:28:01 +08:00
Peter Steinberger
c50a6119ef fix(cli): preserve config dry-run error and batch contracts (#116833)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 05:44:33 -07:00
Vincent Koc
ba1a6722bb feat(plugins): externalize Vydra provider (#116813) 2026-07-31 20:35:43 +08:00
Peter Steinberger
deee9ed3cb fix(daemon): verify service starts and installations (#116815)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 05:32:06 -07:00
Vincent Koc
eb55c8ea8f feat(plugins): externalize Voyage embeddings (#116785)
* feat(voyage): externalize embedding provider

* fix(voyage): drop stale bundled description
2026-07-31 19:52:33 +08:00
Vincent Koc
6830820755 feat(plugins): externalize DuckDuckGo search (#116740) 2026-07-31 18:49:07 +08:00
Peter Steinberger
454bf5ccd7 fix(cli): reject dangling config path escapes (#116738)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 03:16:06 -07:00
Vincent Koc
a550827dad feat(plugins): externalize Synthetic provider (#116720) 2026-07-31 17:19:43 +08:00
Vincent Koc
20e68e01df fix(gateway): sign device proofs with challenge time (#116679) 2026-07-31 16:45:53 +08:00
Vincent Koc
fa4cc51a87 feat(plugins): externalize Teams and Zoom meetings (#116682) 2026-07-31 14:10:46 +08:00
Vincent Koc
59c3606366 fix(cli): propagate web provider failures (#116674) 2026-07-31 13:21:21 +08:00
Peter Steinberger
31ccf56a81 fix(cli): report failed MCP probes to automation (#116664)
* fix(cli): fail MCP probes without losing output

* test(cli): use shared MCP probe temp cleanup
2026-07-30 21:57:35 -07:00
Ben Badejo
847dcad4a4 fix(gateway): avoid false port-busy reports behind Tailscale Serve (#116579)
* fix(gateway): scope lifecycle port probes to bind host

* fix(gateway): honor configured bind in lifecycle probes

* fix(gateway): preserve restart health call compatibility

* fix(gateway): scope daemon port ownership

---------

Co-authored-by: Benjamin Badejo <ben@benbadejo.com>
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-07-30 21:49:25 -07:00
Peter Steinberger
d81465f779 fix(cli): keep Gateway auth failures parseable in JSON (#116597)
* fix(cli): preserve gateway auth JSON errors

* docs(changelog): note Gateway JSON auth errors

* docs(changelog): defer Gateway JSON note to release
2026-07-30 17:48:36 -07:00
joshavant
2b639649b3 fix(cli): close MCP listener after one-shot commands 2026-07-30 18:11:14 -05:00
Omar Shahine
b82a59a798 feat(cli): add openclaw automations alias and reword cron display prose (#114854)
* feat(cli): add openclaw automations alias and reword cron display prose

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WhJ8EiMXue6ADLmHfb7FL6

* test(doctor): update cron doctor prose assertions for automations wording

* fix(plugins): include command aliases in plugin CLI collision detection

Codex review finding on the automations alias: plugin CLI registration
seeded existingCommands from command names only, so a plugin exposing a
top-level command matching an alias-only root name (automations, terminal,
chat) would crash Commander at startup instead of being skipped. Seed from
names plus aliases; regression test covers the alias path.

* fix(cli): rename residual cron prose in CLI and gateway RPC errors

Found in combined dev-gateway E2E: automation not found / unknown automation
id errors, add/edit prose, docs tip, skills-cli mention, and the gateway RPC
not-found message. The CLI missing-get matcher accepts both message forms so
older gateways keep resolving name lookups.

* fix(gateway): keep cron.get missing wording as a wire contract for older CLI matchers

ClawSweeper rank-up: shipped CLI matchers parse 'cron job not found: <id>'
before the name-lookup fallback; the rename stays CLI-display only. Adds a
regression pinning the exact wire form.

* fix(cli): rename doctor and task-summary cron prose flagged in review

Repair-plan advisories, session-registry task summary, and the heartbeat
migration health check now say automations; recreate hints use the
openclaw automations CLI form.

---------

Co-authored-by: Omar Shahine <10343873+omarshahine@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 07:16:57 -07:00
Peter Steinberger
1cbe674d6a fix(cli): preserve explicit option intent (#116389) 2026-07-30 05:22:50 -07:00
Peter Steinberger
a4c6efc998 fix(cli): preserve installed plugins in agent exec (#116336) 2026-07-30 03:00:17 -07:00
Vincent Koc
d5e3c68632 fix(daemon): block conflicting systemd gateway owners (#116162) 2026-07-30 09:53:38 +08:00
北京刻熵科技有限责任公司
9308557f72 fix(daemon): detect and resolve dueling user+system systemd gateway units
After upgrading on Linux, a user-scope unit
(~/.config/systemd/user/openclaw-gateway.service) and a system-scope unit
(/etc/systemd/system/openclaw-gateway.service) can both exist and both try to
manage the gateway. They bind the same port and each instance's stale-process
detection SIGTERMs the other, producing an endless restart cascade (#79375).

The detector `findInstalledSystemdGatewayScope` checked the user path first and
returned early, so it could never surface that both scopes coexist.

This adds, in three layers:

1. Detection: `findSystemdGatewayInstallation` — a discriminated union
   (none/user/system/dueling) that reports every installed scope without
   early-returning. `findInstalledSystemdGatewayScope` is refactored to delegate
   to it while preserving the exact user-first preference its four lifecycle
   callers rely on (no behavior change for stop/restart/is-enabled/runtime).
   Adds `uninstallUserSystemdGatewayUnit` (removes only the $HOME user unit, no
   root needed) and the pure `formatDuelingScopesWarning` helper.

2. Doctor: `maybeResolveDuelingSystemdGatewayScopes` detects the dueling state
   and, after the existing confirm/policy gate, removes the redundant user-scope
   unit while keeping the root-installed system unit authoritative. Declining or
   an externally-managed policy falls back to the existing cleanup hints.

3. Startup guard: in service mode, when a stale-kill actually happened, log a
   targeted remediation pointing at `openclaw doctor --fix` instead of letting
   the loop look like routine stale cleanup. Diagnostic only — the kill decision
   is unchanged.
2026-07-30 08:52:05 +09:00
Vincent Koc
215e49b1a2 fix(hooks): report eventless hooks as not ready (#116083)
Fixes #72370

Release note: hooks check now reports selected hooks without declared events as not ready instead of ready.
2026-07-30 05:29:25 +08:00
Peter Steinberger
d6f9affe79 feat(cli): run agent exec against the ambient config, composed in memory (#116038)
* feat(cli): run agent exec against the ambient config, composed in memory

Exec previously ignored the operator's config entirely, so a one-shot turn
could not reach configured providers, credentials, or agentRuntime harness
selection. It now layers config the way other folder-scoped coding CLIs do.

The composed config is published as this process's runtime snapshot rather
than serialized to a temp file and re-read through OPENCLAW_CONFIG_PATH. The
snapshot is the only in-process config cache, so the file only ever fed it --
while writing env-substituted provider keys to disk where the run's own exec
tool could read them.

* fix(cli): resolve exec stored credentials from the configured agent dir

* chore(scripts): allow agent exec the file-scoped config loader at its process boundary

* test(cli): cover the exec credential default and pinned-config flags
2026-07-29 15:38:27 -04:00
Peter Steinberger
b240703cfc fix(ui): compact the macOS gateway picker menu (#115977)
* fix(ui): compact native gateway menu

* chore: leave changelog to release automation

* test: stabilize UI and CLI process checks
2026-07-29 14:42:18 -04:00
Peter Steinberger
e80fe942c8 fix(gateway): stop start-time repair from retargeting managed services (#115935) 2026-07-29 13:41:19 -04:00
Harjoth Khara
895b691c55 fix(daemon): refuse duplicate launchd gateway managers (#97285)
* fix(daemon): block duplicate launchd owners

Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>

* fix(ci): satisfy launchd docs and lint gates

* fix(ci): remove unused launchd exports

* docs: refresh gateway map

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-29 13:31:22 -04:00
Vincent Koc
aaf7a432aa fix(skills): preserve configless workshop apply upgrades (#115982) 2026-07-30 01:09:56 +08:00
Peter Steinberger
d16e33e08e fix: restore trustworthy end-to-end QA and cross-channel delivery (#115404)
* fix(qa): repair verified end-to-end and channel regressions

* fix(gateway): make interrupted restart recovery lifecycle-safe

* test(heartbeat): target the canonical recovery session store

* fix(gateway): prioritize durable restart recovery before heartbeat

* fix(qa): preserve safe restart recovery and channel expiry

* fix(qa): fail closed and fence restart recovery

* test(agents): isolate restart recovery timing

* test(agents): prove actual restart retry timing

* fix(qa): report incompatible profile scenarios

* fix(scripts): resolve symlinked docker scheduler entrypoints

* fix(qa): require fresh native test evidence

* fix(heartbeat): fence active restart recovery delivery

* fix(gateway): consume untargeted restart acknowledgements

* fix(qa): satisfy exhaustive hosted validation gates

* fix(agents): fence stopped restart recovery dispatch

* style(agents): format restart recovery lifecycle regression

* test(gateway): isolate context prewarm sidecar lifecycle

* test(qa): make scenario process timeout cleanup deterministic

* fix(qa): stamp synthetic gateway configs with current version

* fix(openai): preserve vision capabilities in stale model catalogs

* test(qa): align profile channel rejection with current main

* fix(openai): forward supported moderation for image edits

* fix: restore latest-main CI and image edit documentation

* fix(qa): retain relocated code-mode evidence validation

* fix(openai): expose GPT-5.4 vision in static catalog

* fix(pricing): honor explicit model cost overrides

* test(pricing): keep isolated provider regressions deterministic

* fix(openai): inherit transport for discovered static models

* fix(gateway): honor agent-owned static image capabilities

* test(gateway): preserve prepared-snapshot attachment races

* test(gateway): isolate subagent persistence failure injection

* test(gateway): exercise concurrent voice replay admission

* fix(gateway): restore stale model image capabilities

* fix(agents): publish configured model vision capabilities

* fix(agents): isolate detached media transcript ownership

* test(agents): preserve generic transcript lock regression

* fix(gateway): require proven static model route identity

* fix(qa): accept bounded full-size generated image attachments

* fix(qa): require fresh script producer evidence

* test(qa): prove native E2E scenario execution
2026-07-29 12:45:27 -04:00
Peter Steinberger
b4d14d7848 refactor(config): move model normalization to input owners (#115965)
* refactor(config): move model normalization to input owners

* fix(config): merge canonical doctor model rows

* fix(config): align touched model map identities

* ci(env): lower production variable budget

* chore: leave changelog to release automation
2026-07-29 12:04:07 -04:00
Peter Steinberger
5bfc65d7f4 refactor: remove 3,543 lines of redundant runtime and tests (#115961)
* refactor: remove 3,543 lines of redundant runtime and tests

* refactor: ratchet production environment variable budget
2026-07-29 11:43:41 -04:00
Peter Steinberger
383f8947c1 fix: doctor skips host services for isolated state (#115922)
* fix(doctor): isolate host service management

* fix(doctor): clarify service isolation recovery

* test(doctor): isolate service identity fixtures

* test(daemon): keep lifecycle fixtures lint-clean

* test(daemon): isolate install identity fixtures
2026-07-29 11:09:56 -04:00
Peter Steinberger
628262a4af test(cli): keep help-exit process children single-process with a diagnosable timeout (#115940) 2026-07-29 10:28:25 -04:00