Commit Graph

1321 Commits

Author SHA1 Message Date
Josh Lehman
4481c623cd fix(onboard): survive inference owner drift and prefer subscription logins in guided setup (#112378)
* fix(onboard): survive inference owner drift and verify credentials route-aware

Guided onboarding crashed ("Could not start the CLI") on the openai-api-key
candidate when OPENAI_API_KEY was set and a Codex CLI login existed:

- owner revalidation resolved provider auth without the route model's
  id/api, so the transport gate never applied and profile-first discovery
  picked the Codex-imported ChatGPT OAuth profile instead of the env key
  the probe ran with — a deterministic fingerprint mismatch
- that mismatch escaped the activation persistence path as a plain throw,
  crashing the wizard ladder instead of moving to the next candidate

Owner re-resolution now carries resolved model transport facts (fail closed
when the model cannot be resolved), and all setup revalidation sites route
through one helper whose drift error activation maps to
{ ok: false, status: "auth" }.

* feat(onboard): prefer logged-in subscription CLIs over env API keys in setup ladder

* fix(onboard): promote codex only on verifiable ChatGPT OAuth tokens

* fix(onboard): surface detected AI candidates in the top auth-choice tier

* fix(onboard): name detected candidates and the current model clearly

* test(setup): mock model resolution in the bound-session lock test

* fix(system-agent): carry verified model transport facts
2026-07-21 22:03:26 -07:00
Peter Steinberger
edecdbd05e refactor(config): config-surface reduction tranche 3 — product consolidations (review request) (#111527)
* refactor(config): consolidate media model lists

* refactor(config): unify memory configuration

* refactor(config): consolidate TTS ownership

* refactor(config): move typing policy to agents

* refactor(config): retire product-level config surfaces

* refactor(config): share scoped tool policy type

* chore(config): refresh generated baselines

* fix(config): honor agent typing overrides

* fix(config): migrate sibling config consumers

* refactor(infra): keep base64url decoder private

* fix(config): strip invalid legacy TTS values

* chore(config): refresh rebased baseline hash

* fix(doctor): route legacy messages.tts.realtime voice to talk during tts move

* refactor(config): polish final layout names

* refactor(config): freeze retired tuning defaults

* feat(config): add fast mode default symmetry

* refactor(config): key agent entries by id

* docs(config): update final layout reference

* test(config): cover final layout migrations

* chore(config): refresh final layout baselines

* fix(config): align final layout runtime readers

* fix(config): align remaining readers

* fix(config): stabilize final layout migrations

* fix(config): finalize config projection proof

* fix(config): address final layout review

* docs(release): preserve historical config names

* fix(config): complete keyed agent migration

* fix(config): close final migration gaps

* fix(config): finish full-branch review

* fix(config): complete runtime secret detection

* fix(config): close final review findings

* fix(config): finish canonical docs and heartbeat migration

* fix(config): integrate latest main after rebase

* refactor(env): isolate test-only controls

* refactor(env): isolate build and development controls

* refactor(env): collapse process identity indirection

* refactor(env): remove duplicate config and temp aliases

* docs(env): define the operator-facing allowlist

* ci(env): ratchet production variable count

* fix(env): remove stale provider helper import

* fix(env): make ratchet sorting explicit

* test(env): keep test seam in dead-code audit

* test(env): cover ratchet growth and boundary; document surface budgets

* docs(config): document tier-eval consolidations

* docs(config): clarify speech preference ownership

* test(memory): align retired tuning fixtures

* refactor(memory): freeze engine heuristics

* refactor(config): apply tier-eval tranche

* refactor(tts): move persona shaping to providers

* refactor(compaction): move prompt policy to providers

* test(config): align hookified prompt fixtures

* chore(deadcode): classify test-only exports

* chore(github): remove unused spawn helper

* chore(deadcode): classify queue diagnostics

* chore(deadcode): remove unused lane snapshot export

* chore(plugin-sdk): ratchet consolidated surface

* fix(config): integrate latest main after rebase
2026-07-21 20:28:43 -07:00
Gio Della-Libera
137dabc929 Add plan-first Claw status and remove (#102296)
* Add plan-first Claw status and remove

* test(claws): cover status and removal

* docs(claws): document status and removal

* fix(claws): report incomplete root state

* test(claws): complete adoption plan fixtures

* fix(claws): revalidate package removal ownership

* style(plugins): format lifecycle uninstall

* fix(claws): align agent removal preconditions

---------

Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-07-21 19:53:08 -07:00
Gio Della-Libera
ba467fbd3e Install ClawHub packages for new Claw agents (#102228)
* Install ClawHub packages for new Claw agents

* test(claws): cover skill and plugin installation

* docs(claws): document package artifacts

* fix(claws): bind package trust preflight

* fix(claws): bind package capability consent

* fix(claws): satisfy package type guards

* test(claws): update package installer fixtures

* test(claws): complete package plan fixtures

* test(claws): model complete ClawHub results

* fix(claws): serialize plugin ownership changes

* fix(claws): cover legacy plugin lifecycle updates

* fix(claws): preserve legacy ClawHub update selectors

* test(claws): type lifecycle lease mock

* refactor(claws): isolate plugin update lifecycle

* fix(claws): declare managed installer coordination

* test(claws): preserve partial collision result

* test(claws): clean installer temp dirs

---------

Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-07-21 18:55:10 -07:00
Gio Della-Libera
ebe2420482 Create Claw-managed workspace files (#101973)
* Create Claw-managed workspace files

* test(claws): cover managed workspace files

* docs(claws): document workspace files

* docs(claws): correct workspace manifest example

* fix(claws): preserve failed workspace ownership boundaries

* test(claws): align symlink escape diagnostic

* test(claws): canonicalize workspace alias fixture

* test(claws): clean workspace temp dirs

---------

Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-07-21 17:36:33 -07:00
Gio Della-Libera
88a7306308 Create Claw agent and root install record (#101755)
* Create Claw agent and root install record

* test(claws): cover consented agent creation

* docs(claws): document consented agent creation

* fix(claws): normalize agent collisions at commit

* test(claws): expect partial normalized collision

* test(claws): isolate normalized collision state

* test(claws): reject normalized agent collisions

* test(claws): align capability output expectation

* fix(claws): align add plan call with current schema

---------

Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-07-21 17:24:24 -07:00
Peter Steinberger
c84921634d fix(macos): require explicit consent for privacy-sensitive access (#112321)
* fix(macos): avoid passive Automation prompts

* fix(macos): keep Voice Wake recognition on device

* fix(macos): require consent for activity presence

* chore(apps): refresh native i18n inventory

* fix(macos): preserve presence clears across gateway versions

* fix(macos): prioritize activity privacy opt-out

* chore(apps): refresh native i18n inventory

* fix(macos): scrub legacy presence activity

* fix(macos): migrate permission status caller

* fix(macos): preserve unknown permission state

* fix(macos): refresh privacy change artifacts

* refactor(macos): remove stale presence helper

* fix(deps): patch URI and Jaeger advisories

* test(gateway): adopt pairing-bound node sessions
2026-07-21 15:28:13 -07:00
Gio Della-Libera
138d2a5627 Add grouped Claw schema and read-only add plan (#101328)
* Add grouped Claw schema and read-only add plan

* test(claws): cover grouped schema and preview

* docs(claws): document experimental preview

* fix(claws): harden preview consent

* fix(claws): satisfy tool filter lint

* fix(claws): bind plans to validated sources
2026-07-21 14:50:36 -07:00
Kate Stahnke
4400f4ca91 fix(cron): hint after disable about list filtering disabled jobs (#78139)
* fix(cron): hint after disable about list filtering disabled jobs by default

* fix(cron): use !params.enabled in disable-hint guard for oxlint compliance

* docs(cron): clarify disabled jobs in list output

* fix(cron): keep disable hint interactive

* test(cron): use exported store snapshot helper

* test(cron): create disable-list regression job via service

* docs(cron): defer list default contract wording

* test(cron): tighten disable list coverage

Co-authored-by: Kate Stahnke <35552+kate@users.noreply.github.com>

* docs(cron): document enabled-only list default

Co-authored-by: Kate Stahnke <35552+kate@users.noreply.github.com>

---------

Co-authored-by: Kate <35552+kate@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-21 12:04:15 -07:00
Peter Steinberger
d725632ee7 refactor(channels): move channel-flavored setup flags into plugin manifests (#112239)
* refactor(channels): move channel-flavored setup flags into plugin manifests

* refactor(channels): normalize manifest cliAddOptions formatting, drop changelog entry

* fix(channels): dedupe channels add options by commander switch identity

* fix(channels): let the selected channel's cliAddOptions win switch dedupe
2026-07-21 02:50:19 -07:00
Peter Steinberger
6f43c50f37 fix(cli): preserve failure exit semantics (#112210) 2026-07-21 01:48:25 -07:00
Peter Steinberger
c5254f13ee refactor(cli)!: remove automatic gateway→embedded fallback from openclaw agent (#112074)
A Gateway timeout or closed connection now fails the command with an
actionable stderr hint instead of silently re-running the whole turn
embedded under a fresh gateway-fallback-* session. The silent fallback
could double-execute side effects (the Gateway may still finish an
accepted turn), returned context-free answers to --session-key callers,
and ran with the CLI host's local config. --local remains the only
embedded execution path.

Also deletes the resultMetaOverrides plumbing (the fallback was its only
writer) and the fallback marker fields added in #111645.
2026-07-20 23:30:37 -07:00
Peter Steinberger
78b49f3a05 docs: refresh stale cua-driver claims (cross-platform prerelease, real MCP tool names) 2026-07-20 22:18:21 -07:00
Peter Steinberger
6ef6c9a15d fix(onboard): verify imported and local inference (#112028) 2026-07-20 21:35:22 -07:00
Peter Steinberger
d9cf85fa43 fix(cli): correct optional plugin guidance (#112019) 2026-07-20 21:31:30 -07:00
Peter Steinberger
b61619e03c fix(gateway): dev mode suppresses ambient channel env auto-configuration (#112011)
Channel plugins declare package env triggers in manifests, and ambient
environment variables count as "channel configured". A dev gateway
(gateway run --dev) inherits the operator's shell, so real channel
credentials silently configured channels and could connect development
instances to live services (observed with reef and a Telegram-range
connection during isolated stress testing).

Dev mode now drops presence signals whose only sources are env or
manifest-env across activation planning, auto-enable, autostart, health
recovery, readiness, reloads, and startup warnings. Explicit
channels.<id> config still works, --dev-ambient-channels restores the
old behavior, and startup logs the suppressed channel ids once. Non-dev
gateways are unchanged.
2026-07-20 19:28:07 -07:00
Peter Steinberger
e3488e1d73 fix(setup): preserve invalid config during baseline setup (#112010) 2026-07-20 19:15:51 -07:00
Peter Steinberger
3d841472bd fix(cli): align configure and channel wizard behavior (#111720) 2026-07-20 18:22:57 -07:00
Omar Shahine
e27e2d08fd feat(policy): check authored message routing (#111087)
* feat(policy): check authored message routing

* fix(policy): normalize routing probe comparisons

* Policy: keep routing evidence types internal

* Docs: refresh policy map

---------

Co-authored-by: Omar Shahine <10343873+omarshahine@users.noreply.github.com>
2026-07-20 17:31:29 -07:00
Peter Steinberger
7cafe35bd5 fix(onboard): never silently remap an existing fleet's workspaces (#111787)
* fix(onboard): preserve agent workspaces on rerun

* fix(onboard): preserve first-run workspace setup
2026-07-20 16:16:04 -07:00
Peter Steinberger
8bec61bab1 fix(cli): reject unknown models in config set (#111571)
* fix(cli): validate configured model references

* fix(cli): cover dependent model references

* fix(cli): reject malformed model references

* test(cli): satisfy model validation gates

* fix(cli): harden model validation drafts

* fix(cli): preserve model runtime ownership

* fix(cli): validate expanded model references

* fix(cli): close model validation gaps

* fix(cli): preserve model alias ownership

* fix(cli): secure model validation context

* fix(cli): redact expanded model references

* fix(cli): validate inherited agent catalogs

* fix(cli): align canonical model resolution

* fix(cli): scope inherited catalog validation

* fix(cli): compare resolved model snapshots

* fix(cli): cover model dependency transitions

* fix(cli): isolate model env validation

* fix(cli): redact dependent model checks

* fix(cli): compare agent model identity

* fix(cli): validate expanded model removal

* fix(cli): defer unresolved fallback validation

* fix(cli): preserve authored model changes
2026-07-20 03:31:03 -07:00
Peter Steinberger
7fe1d70a50 fix(mcp): prevent custom server config races and parsing errors (#111761)
* fix(mcp): harden custom server management

* fix(ui): keep config patch types private
2026-07-20 02:34:13 -07:00
Peter Steinberger
250e636ffd fix(onboard): reject invalid setup options before writes (#111680)
* fix(onboard): validate setup options before mutation

* fix(onboard): keep flow helper type local
2026-07-19 23:05:23 -07:00
Peter Steinberger
6d39d3cf0b fix(onboard): preserve gateway settings on rerun (#111569)
* fix(onboard): preserve gateway config on rerun

* fix(onboard): scope remote secrets to endpoint

* fix(onboard): honor rerun override boundaries

* fix(onboard): secure inherited tailscale auth

* fix(onboard): honor explicit token auth

* fix(onboard): enforce funnel auth on rerun

* fix(onboard): preserve env password on rerun
2026-07-19 20:18:34 -07:00
Peter Steinberger
171a3852ba fix: install exact app recommendations and retry failures (#111518)
* fix(onboard): preserve recommendation install retries

* fix(onboard): preserve bootstrap recommendation retries

* fix(onboard): commit recommendation outcomes after config

* fix(onboard): guard recommendation state transitions

* fix(onboard): reconcile durable skill installs

* docs(clawhub): clarify search publisher contract
2026-07-19 14:10:50 -07:00
Peter Steinberger
1a574923cb fix(onboard): honor remote flags in interactive setup (#111517)
* fix(onboard): honor interactive remote flags

* fix(onboard): clear credentials for changed gateway

* fix(onboard): validate remote URL before probe

* test(onboard): mark synthetic remote tokens

* test(onboard): avoid literal credential fixtures

* refactor(onboard): name remote probe auth role

* refactor(onboard): keep remote probe seed canonical

* test(onboard): type remote URL validator mock
2026-07-19 13:25:46 -07:00
Marvinthebored
22c336c0b4 fix(plugins): load active generation after upgrades (#111141)
* fix(plugins): load newest managed generation when a prior install lingers

An upgrade writes a plugin's new version into a distinct managed project
directory (an `__openclaw-generation__` dir) without removing the previous one.
The persisted install record keeps pointing at the older, still-present
directory, so `mergeRecoveredManagedNpmRecord` falls through to returning the
persisted record and the runtime imports the stale version even though the newer
generation is installed. `isUnavailableManagedNpmInstallRecord` only self-heals
when the persisted path is gone, so an upgrading install (both directories
present) is not covered — `plugins inspect <id> --runtime` reports the old
version and `install`/`update` appear to silently no-op.

- Recovery now selects the highest-version record per plugin id across the
  legacy flat dir and any generation dirs, instead of whichever project root
  sorts last (generation-dir suffixes are hashes, so on-disk order is unrelated
  to version).
- When the recovered managed install is a strictly newer version at a different
  path, repoint to it, reusing the metadata merge the unavailable-path branch
  uses. The repoint is gated to persisted records that live inside the managed
  npm root, so intentional custom/outside npm installs are left untouched.

This is a recovery-layer self-heal, so it also repairs installs that already
diverged from an earlier upgrade.

Refs #107228

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(plugins): honor active managed generations

Recover ambiguous managed installs by package recency only when no usable active ledger path exists, and let doctor retire non-authoritative generations safely.

Co-authored-by: Peter Lindsey <peter@lindsey.jp>

* test(plugins): use shared temp cleanup

* fix(plugins): compare active paths per platform

* fix(plugins): use managed install timestamps

* test(plugins): timestamp managed project roots

* test(plugins): exclude retired legacy recovery

* refactor(plugins): keep recovery candidate private

---------

Co-authored-by: Peter Lindsey <peter@lindsey.jp>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-19 12:50:35 -07:00
Peter Steinberger
c7e7ac2728 refactor: remove expired plugin compatibility surfaces (#111451)
* docs(secrets): remove retired web credential paths

* refactor(web): remove retired provider compatibility paths

* refactor(providers): delete retired compatibility routes

* refactor(secrets): remove retired credential aliases

* refactor(plugin-sdk): delete retired compatibility surfaces

* docs(plugin-sdk): remove retired migration guidance

* chore(plugin-sdk): refresh rebased surface budgets

* chore(plugin-sdk): refresh API removal baseline

* refactor(compat): migrate retired internal callers

* chore(plugin-sdk): refresh current-main baselines

* test(config): migrate plugin-owned secret assertions

* test(gateway): narrow plugin secret refs

* fix(plugin-sdk): preserve private boundary type identity

* chore(compat): remove stale sweep references

* chore(lint): lower max-lines budget

* refactor(secrets): remove unused web helper

* build(plugin-sdk): drop removed compat entries

* chore(plugin-sdk): refresh rebased API baseline

* chore(plugin-sdk): use Linux API baseline hash

* fix(plugin-sdk): preserve private bundled build entries

* fix(plugin-sdk): package private runtime facades

* fix(plugins): preserve external credential contracts
2026-07-19 11:04:48 -07:00
Peter Steinberger
783a5d21cf refactor(config): purge numeric tuning knobs behind built-in defaults (#111382) 2026-07-19 07:35:45 -07:00
Peter Steinberger
d685037c6e fix(workboard): avoid duplicate proof entries on completion (#111324)
* fix(workboard): resolve duplicate completion proof

* fix(workboard): import proof cap from constants

* fix(workboard): correlate completion proof by id

* fix(workboard): reuse terminal completion proof

* fix(workboard): retain correlated proof under budget
2026-07-19 03:00:37 -07:00
Peter Steinberger
b9fa1ffa27 feat(gateway): system change history RPC and Ask OpenClaw recent-changes panel (#111286)
* feat(gateway): system change history RPC and Ask OpenClaw recent-changes panel

* test(gateway): fix journal fixtures, split custodian page tests, refresh docs map

* chore: quiet lint on journal reader tests and custodian harness
2026-07-19 02:38:05 -07:00
Peter Steinberger
58452de711 refactor(config): config-surface reduction tranche 1 — retire dead keys, dedupe channel schemas, add growth ratchet (#111142)
* refactor(config): retire dead and aliased config keys via doctor migrations

* refactor(config): dedupe bundled channel config schemas into shared builders

* feat(config): add config-surface count ratchet to doc-baseline check

* test(config): drop stale fixtures for retired config keys

* fix(doctor): migrate only positive finite MCP timeout aliases

* fix(migrate-hermes): emit canonical MCP timeouts only

* fix(config): satisfy lint and contract gates
2026-07-19 00:52:37 -07:00
Jason (Json)
9c7800467c feat(mcp): open App views from channel replies (#111211)
* feat(mcp): add portable channel app actions

* test(gateway): keep origin reset private

* fix(mcp): require a resolved reply channel
2026-07-19 01:44:15 -06:00
LZY3538
7055ed578d fix(wizard): honor process locale when overrides are blank (#111076)
* fix(wizard): ignore blank locale env overrides

* test(wizard): cover locale fallback chain

* docs(wizard): document locale env precedence

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-18 23:28:03 -07:00
Peter Steinberger
a2ccbdfa96 feat(cli): list and resolve pending approvals headlessly (#111060)
* feat(cli): manage pending approvals

* fix(cli): show terminal-safe approval ids raw, reserve id64 tokens for hostile ids

* fix(cli): preserve opaque approval ids verbatim

* fix(cli): tokenize leading-hyphen approval ids for pasteability

* fix(cli): lossless utf16 id64 tokens for opaque approval ids

* fix(cli): resolve approval ids verbatim, no input trim

* fix(cli): scope-only approval auth, reviewer-safe system-agent summaries, skip ill-formed ids

* fix(cli): validate pending approval ids

* fix(cli): align approvals catalog and docs map
2026-07-18 23:23:49 -07:00
Peter Steinberger
56eef79989 fix(channels): recover dead-lettered inbound events (#111029)
* feat(channels): add ingress dead-letter recovery

* fix(channels): preserve dead-letter compatibility

* docs: refresh CLI map for channel dead letters
2026-07-19 00:44:23 +01:00
Peter Steinberger
9275837f41 docs: explain managed Gateway heap sizing (#111027) 2026-07-19 00:36:03 +01:00
Peter Steinberger
5590d7c280 docs: align SecretRef degradation semantics (#111021) 2026-07-19 00:18:01 +01:00
cxbAsDev
2295fae731 fix: bound miscellaneous unbounded file reads across 5 modules (#110516)
* fix: bound misc unbounded fs.readFile calls; remove unused fs import

* fix: decode buffer to string before passing to string consumers

readRegularFile and readRegularFileSync return { buffer, stat },
not a string. All 4 new call sites passed the raw object to functions
expecting a string (JSON.parse, RegExp.test, template literals, etc.),
causing TS2345 type errors and runtime failures.

Fix each call by extracting .buffer and calling .toString('utf8')
before passing the result to string consumers.

* style: fix oxfmt formatting in config-set-input.ts

* fix: bound config and trajectory metadata reads

Co-authored-by: 陈宪彪0668000387 <chen.xianbiao@xydigit.com>

* refactor: isolate bounded read ownership

Co-authored-by: 陈宪彪0668000387 <chen.xianbiao@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-18 23:27:26 +01:00
Peter Steinberger
09a64f7ab0 feat(models): make per-agent allowlists explicit (#110888) 2026-07-18 21:42:05 +01:00
Peter Steinberger
8a5c8690e1 fix(secrets): keep unaffected owners live during reload failures (#110779)
* fix(secrets): isolate reload failures per owner

* refactor(secrets): split runtime activation helpers

* fix(secrets): export web warning type

* fix(secrets): reject unsafe degraded config writes

* fix(secrets): derive reload defaults type

* fix(secrets): defer reload state publication

* fix(secrets): preserve partial refresh state

* fix(secrets): retry superseded reload preflight

* fix(secrets): bind stale credentials to owner contracts

* fix(secrets): scope degraded credential contracts

* fix(secrets): restore source ownership guards

* fix(secrets): recover provider-only degradation

* fix(secrets): enforce degraded reload contracts

* fix(secrets): preserve scoped reload state

* fix(secrets): reconcile deferred descendant state

* fix(secrets): commit reload state atomically

* fix(secrets): preserve source transaction lineage

* test(secrets): use non-secret lineage marker

* chore(plugin-sdk): refresh API baseline

* fix(secrets): canonicalize web owner contracts

* fix(plugin-sdk): preserve legacy secret owner contracts

* fix(secrets): satisfy startup activation types

* test(secrets): align reload fixtures with owner contracts

* refactor(secrets): move source recovery scope helper

* fix(secrets): preserve owner contracts on web failures

* fix(secrets): bind legacy web resolution contract

* fix(secrets): retry stale auth publication
2026-07-18 18:29:24 +01:00
Peter Steinberger
98410d986e refactor(state): move device identity into canonical SQLite state (#110392)
* refactor: store device identities in SQLite

* style: satisfy Swift identity lint limits

* test: harden device identity migration fixtures

* fix: harden SQLite device identity recovery

* chore: remove stale identity helper

* refactor: isolate device identity repair

* chore: remove stale migration import

* test: validate migrated identity key types

* fix: harden device identity repair

* style: format device identity assertion

* fix: derive repaired identity key from PEM

* style: remove redundant PEM conversions

* fix: align native identity store with schema v4

* fix(state): satisfy SQLite identity CI gates

* fix(state): coordinate native identity migration

* test(doctor): include native identity claim path

* fix(infra): preserve coordinator release error

* fix(state): clear identity validation gates

* refactor(apple): remove identity test-only APIs

* refactor(apple): remove dead identity error type

* test(apple): use canonical identity test seam

* test(macos): isolate gateway readiness identity
2026-07-18 17:43:56 +01:00
cxbAsDev
05fb8e6e61 fix(cli): bound --message-file reads for agent command (#101442)
* fix(cli): bound --message-file reads for agent command

* fix(cli): preserve symlinked --message-file paths with bounded reads

* fix(cli): preserve FIFO message files with bounded reads, document 4 MiB cap

* fix(cli): accept FIFO --message-file targets via bounded descriptor read

* test(cli): drop duplicate FIFO message-file read test

* docs(cli): note 4 MiB --message-file cap in agent help text

* style(commands): format agent-via-gateway test

* fix(cli): preserve procfs message-file reads

Co-authored-by: 陈宪彪0668000387 <chen.xianbiao@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Peter Steinberger <peter@steipete.me>
2026-07-18 12:29:33 +01:00
Peter Steinberger
105aebacea fix: report agent deletion cleanup failures (#110560) 2026-07-18 12:23:39 +01:00
Peter Steinberger
3b2797f09b improve(ui): settings cleanup batch — universal config.changed emitter, synced chat prefs, dedupe and copy fixes (#110581)
* fix(gateway): emit config.changed from the reload committer for every accepted write

Agent config_set, CLI, and doctor writes reach the gateway through the file
watcher's reload path, which never broadcast config.changed - only direct RPC
writes did. Move the broadcast to a single onConfigCandidateCommitted hook in
the reload committer so all writers notify connected UIs, including
runtime-skipped commits (writer-intent echo suppression, reload mode off),
and delete the duplicate RPC-side broadcasts.

* feat(ui): sync chat follow-up and commentary prefs across devices

Add chatPersistCommentary and chatFollowUpMode to the ui.prefs sync surface
(schema, types, docs) with clearable null removal for the follow-up override.
Rewrite server-prefs around a descriptor table so a synced pref is one entry
instead of five hand-written code sites. Caption synced rows/sections
(chat prefs, theme, language) and refresh the stale Settings subtitle.

* refactor(ui): dedupe settings constants, drop dead composer branch, refresh copy and docs

Derive the Security tool-profile options from PROFILE_OPTIONS and General's
thinking levels from BASE_THINKING_LEVELS instead of parallel literals.
Remove the unused composer mode:"model" branch, the orphaned
.config-view-toggle CSS family, and stale quick-settings wording. Add static
settings-search entries for the Sessions and Managed Worktrees pages plus a
provenance-row test, and update docs/cli/openclaw.md to describe the current
system-agent config-write policy (denylist roots, route-backing plugin guard,
per-agent routing escalations).

* chore: refresh plugin SDK API baseline after rebase onto current main
2026-07-18 12:10:20 +01:00
Peter Steinberger
347ee45895 fix(secrets): surface degradation in logs and doctor (#109792)
* fix(secrets): surface degraded owners safely

* fix(secrets): preserve degradation ownership across reloads

* fix(secrets): require cold ownership for source recovery

* refactor(secrets): keep assignment provenance internal

* test(secrets): use provider error contract

* fix(secrets): attribute provider failures to active co-owners

* test(secrets): clarify provider failure fixture

* fix(secrets): redact doctor degradation reasons

* test(secrets): align reload harness with runtime state

* test(secrets): cover atomic source publication

* fix(secrets): preserve web owner degradation context

* fix(secrets): retain active web degradation co-owners

* fix(secrets): keep web provider error internal

* refactor(secrets): unify reload degradation state

* refactor(config): remove obsolete source snapshot setter
2026-07-18 11:46:53 +01:00
Peter Steinberger
1710313596 fix(cli): offer config repair after invalid startup (#110533)
* fix(cli): offer doctor recovery for invalid config

* fix(cli): preserve invalid config overrides

* fix(cli): keep invalid config recovery controlled
2026-07-18 09:30:27 +01:00
Peter Steinberger
4186691885 feat(onboard): extend browser handoff and refresh recommendations (#110484)
* feat(onboard): enable browser handoff cross-platform

* feat(onboard): add recommendations refresh

* test(onboard): keep guided handoff coverage focused
2026-07-18 07:49:09 +01:00
xingzhou
75982be9a3 fix(cli): oversized secrets plans consume unbounded memory (#109652)
* fix(cli): reject oversized secrets plan files

* fix(cli): keep generated secrets plans applyable

* fix(cli): reject special plan files without blocking

* docs(cli): refresh secrets plan documentation map
2026-07-18 07:18:21 +01:00
Peter Lee
8539640abc fix(config,secrets): emit JSON errors and cover dotenv roots (#104340)
* fix(secrets): use resolveStateDir for .env path to cover legacy .clawdbot dir

* fix(secrets): replace override-based legacy .env test with true automatic fallback, add apply-path coverage

* fix(config-cli): emit JSON error on config get --json for missing paths

When  is used with a nonexistent
path, the command emits no JSON on stdout, only a text error on stderr.
This breaks automated consumers that expect machine-readable errors.

Fix: output  JSON to stdout before exit(1) when
opts.json is set. This matches the existing JSON error output pattern
already used by runConfigValidate and handleConfigMutationError.

Also re-throw synthetic exit errors in the catch block so the
--json branch's writeRuntimeJson+exit is not caught and re-emitted
as a text error.

* fix(config-cli): use typed ExitError signal instead of __exit__ string sentinel

* fix(secrets): reuse resolved stateDir for .env path in audit

* fix(secrets): pass resolved stateDir into apply .env scrubbing, add root-switch regression

* test(config-cli): migrate remaining __exit__ sentinel to ExitError

* fix(secrets): cover config and state dotenv roots

* style(secrets): format dotenv path helper

* test(secrets): track temporary directories

* test(config): expect typed exit for missing patch files

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Peter Steinberger <peter@steipete.me>
2026-07-17 23:14:05 -07:00