Commit Graph

9845 Commits

Author SHA1 Message Date
Peter Steinberger
5808b72ed6 refactor(models): own compat in provider catalogs (#112542) 2026-07-22 02:14:29 -07:00
Peter Steinberger
d4f19bfd79 feat(sessions): first-class archived-session handling (tri-state filter, pruning exemption, inline archived UI) (#112554)
* feat(sessions): first-class archived-session handling

Archived sessions are now exempt from every automatic maintenance path
(age prune, entry cap, model-run prune, disk budget, cleanup repairs);
only explicit sessions.delete removes them. sessions.list gains an
additive tri-state archived filter (true | false | "all"). The sidebar
gets a persisted Active/Archived/All status filter with inline dimmed
archived rows, replacing the nav-away View-archived button; the Sessions
page toggle becomes the same tri-state with dimmed+badged rows in All
mode; the chat composer's archived notice becomes a full-width banner
with an Unarchive action.

* chore(protocol): regenerate Swift gateway models for tri-state archived filter
2026-07-22 01:28:53 -07:00
Peter Steinberger
b40a8da70e refactor(channels): trim deprecated setup-input fields and legacy promotion keys to published readers (#112587)
* refactor(channels): trim deprecated setup-input fields and legacy promotion keys to published readers

* ci: retrigger after dropped ready event

* fix(channels): update setup-input guardrails and dead code for the trimmed tier
2026-07-22 01:15:58 -07:00
Josh Avant
3acc168c4f fix(cron): persist explicit scheduled tool authority (#112483)
* fix(cron): persist explicit scheduled tool authority

* test(cron): cover explicit scheduled authority

* fix(cron): preserve legacy authority on routine edits

* test(cron): add explicit authority e2e matrix

* test(cron): harden explicit authority live proof
2026-07-22 02:28:49 -05:00
Dallin Romney
132d91e427 refactor(qa): make taxonomy coverage ids unique (#110280) 2026-07-22 16:28:44 +09:00
Peter Steinberger
3c4a1ec905 refactor(agents): move CLI backend adapters from config DSL to registerCliBackend plugins (review request) (#112539)
* refactor(agents): move CLI backend adapters into plugins

* test(agents): register CLI backend fixtures through plugins
2026-07-22 00:25:29 -07:00
Peter Steinberger
b02d3e4707 feat(scripts): reference update script for source-checkout gateway servers (#112557)
* feat(scripts): reference update script for source-checkout gateway servers

Teams running a gateway from a git checkout kept re-deriving the same
update ritual by hand: restore the tracked bundle pnpm build rewrites,
fail closed on real local changes, fast-forward main or rebase a local
server branch, install deps, build clean (incremental builds have
shipped stale hashed chunks), restart the service. update-gateway.sh
encodes that as the documented reference; simple installs keep using
openclaw update --channel dev.

* fix(scripts): harden update-gateway guards and refresh docs map

Review findings: never run over a pre-existing rebase/merge/cherry-pick
(the abort path could discard operator progress), and treat untracked
files honestly — fail closed only where the clean build would delete
them, warn-list elsewhere. Regenerate docs_map for the new updating.md
section.

* fix(scripts): pipefail-safe warnings and honest disposable-dir policy

Review findings: head-truncating a long warning list through a pipe
dies under pipefail (SIGPIPE) in the warning path, so truncate via
here-strings; the untracked-under-build-dirs guard was theater since
ignored files bypassed it — declare dist/dist-runtime/.artifacts as
wholly disposable instead and say so; note the rm targets are
symlink-safe (no trailing slashes).

* fix(scripts): order guards before mutations and refuse symlinked build dirs

Review round: the in-progress-operation guard now precedes the bundle
restore (the script's first mutation), symlinked build dirs are refused
before the recursive clean (intermediate symlink resolution would
redirect the delete outside the checkout), and the untracked-files note
no longer overpromises — kept files can affect the build and the
message says so.

* fix(scripts): preserve merge commits when rebasing the server branch

Plain git rebase flattens merges, silently dropping merge-only conflict
resolutions from a local server branch; --rebase-merges keeps them.
2026-07-22 07:25:14 +00:00
Peter Steinberger
e01f3e18a7 feat(config): tier settings as common and advanced (#112538) 2026-07-21 23:17:47 -07:00
Dallin Romney
3946bcc20c fix(qa): run isolated Matrix evidence partitions in parallel (#112465)
* fix(qa): parallelize isolated Matrix evidence partitions

* refactor(qa): plan adapter instance concurrency

* fix(qa): let Docker assign Matrix harness ports

* refactor(qa): use instance isolation for Matrix concurrency

* test(ci): expect maturity concurrency six

* refactor(qa): remove Matrix harness manifest
2026-07-22 14:45:52 +09:00
Patrick Erichsen
a691eb7372 Revert "feat(skills): support skills-sh install references (#112517)" (#112531)
This reverts commit 7c353b7436.
2026-07-21 22:37:50 -07:00
Dallin Romney
40d2af6843 docs: validate extended-stable before tagging (#112529) 2026-07-21 22:35:20 -07:00
Patrick Erichsen
7c353b7436 feat(skills): support skills-sh install references (#112517) 2026-07-21 22:33:22 -07:00
Jason (Json)
1a42e005fb fix(anthropic): forward selected profiles to Claude CLI (#112458)
* fix(anthropic): forward Claude CLI auth profiles

* fix(system-agent): inject CLI auth route stores

* fix(claude-cli): pass profile credentials by descriptor

* fix(anthropic): repair selected profile CI coverage

* fix(anthropic): preserve profile owner validation

* test(system-agent): preserve selected profile fixtures

* test(system-agent): narrow selected profile fixture

* test(system-agent): resolve profile store merge

* fix(anthropic): forward profiles to node Claude runs

* fix(system-agent): reconcile profile route projection

* test(system-agent): thread profile store through projection

* fix(anthropic): make selected profile authoritative

* fix(system-agent): type auth setup failures

* fix(system-agent): type setup auth failures

* style: format Claude profile maintenance

* fix(anthropic): keep gateway credentials off nodes

* fix(anthropic): clear ambient auth for selected profiles

* fix(anthropic): secure paired-node Claude auth

* fix(node-host): type Claude fd spawn streams

* style(node-host): satisfy Claude spawn lint

* fix(process): capture exit before secret delivery

* fix(anthropic): preserve node-native Claude auth
2026-07-21 23:27:37 -06:00
Peter Steinberger
f236e83de7 refactor(channels): shrink ChannelSetupInput to a generic envelope with a deprecated compatibility tier (#112319)
* refactor(channels)!: shrink ChannelSetupInput to a generic envelope with a deprecated compatibility tier

* fix(channels): keep ChannelSetupInput structurally assignable without an index signature

* docs: regenerate docs map
2026-07-21 22:17:03 -07:00
Josh Lehman
cb797c959a feat(wizard): narrate app-recommendation scan phases in the progress spinner (#112414) 2026-07-21 22:13:36 -07:00
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
e81a2ce657 feat(ui): show chat run startup status (#112339)
* feat(ui): show chat run startup status

* refactor(agents): isolate run status emission

* chore(protocol): refresh startup status models

* refactor(swift): remove unused chat helpers

* test(swift): align retry and i18n fixtures

* fix(swift): restore outbox display helper
2026-07-21 21:25:23 -07:00
Peter Steinberger
c1a313676b docs(computer-use): add cua-computer troubleshooting/error-code reference and fix stale Codex macOS claim (#112502) 2026-07-21 21:07:01 -07:00
Peter Steinberger
1a8583ba45 feat(gateway,ui): ask-the-observer questions from the session HUD (#112448)
* feat(gateway,ui): ask-the-observer card input over sessions.observer.ask

* refactor(ui): single home for observer run-identity helper after restack

* test(ui): drop duplicated observer hud test after restack

* test(ui): give the observer ask flow its own colocated suite

* refactor(gateway): leaf observer contract and ask module split for ci gates

* refactor(gateway): drop observer contract re-export shims
2026-07-21 20:59:32 -07:00
Peter Steinberger
153636c702 feat(dashboard): workboard:mini aggregates all boards when boardId is unset (#112484)
* feat(dashboard): workboard:mini aggregates all boards when boardId is unset

* docs: regenerate docs map
2026-07-21 20:32:33 -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
Peter Steinberger
9b3b84a18b feat(slack): support Agent View (#103895)
* feat(slack): support Agent View

* fix(slack): align Agent View with current runtime

* fix(slack): keep suggested prompt type internal

* fix(slack): gate Agent View persistence on capability

* chore: leave Slack Agent View notes to release generation

* fix(slack): gate Agent View persistence on capability

* test(slack): use neutral bot token fixture

* feat(slack): support Agent View

* feat(slack): support Agent View

---------

Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-07-21 19:37:49 -07:00
Peter Steinberger
6c3caa38ab fix(ui): allow direct sessions in non-Git folders (#112433)
* fix(ui): allow direct sessions in non-Git folders

* test: align New Session fixtures with place picker

* fix(ui): preserve worktree intent on Git probe failures

* fix(types): keep worktree status alias internal
2026-07-21 19:36:53 -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
Jason (Json)
24c20eec76 fix(agents): enforce Claude CLI cron tool policies (#112457)
* fix(agents): enforce Claude CLI tool policies

* fix(agents): bound CLI runtime tool grants

* fix(agents): isolate restricted Claude runs
2026-07-21 19:38:21 -06:00
Jason (Json)
55cf9523e0 feat: discover models from live provider catalogs (#112412)
* feat: discover models from live provider catalogs

* fix(provider-catalog): satisfy current catalog contracts

* fix(deps): update fast-uri past new advisory

* fix(deps): refresh fast-uri shrinkwraps

* fix(openrouter): satisfy provider catalog lint

* fix(agents): preserve refreshable catalog metadata

* test(agents): keep catalog fallback proof within lint budget

* fix(provider-catalog): honor live model contracts

* fix(minimax): type discovery headers explicitly

* docs(plugin-sdk): define live model discovery contract
2026-07-21 19:29:57 -06: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
f0c43dcf72 feat(ui): format international phone numbers for display (#112400)
* feat(ui): format phone numbers for display

* ci: track normalization package exports in Knip
2026-07-21 17:10:25 -07:00
Peter Steinberger
1f0a3ecc68 feat(ui): session observer HUD, sidebar subtitles, and settings (#112260)
* feat(ui): session observer HUD, subtitle integration, and settings

* test(ui): observer demo fixtures for the mock control-ui harness

* fix(ui): satisfy lint and deadcode gates for observer surfaces

* test(ui): adopt renamed pull-request summary api after rebase

* fix(ui): clean rebase artifacts in observer test files
2026-07-21 17:05:14 -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
Peter Steinberger
440539b538 feat(workboard): routable boards, sidebar pinning, icon and color (#112302)
* feat(ui): add Workboard board routes and pins

* fix(ui): reject malformed Workboard board catalogs

* perf(ui): lazy-load Workboard sidebar runtime

* test(ui): align sidebar board fixtures with render contract

* fix(ui): clear Workboard landing gates
2026-07-21 15:16:38 -07:00
Peter Steinberger
98742bc2c7 feat(cron): stream schedule sources with durable source identity (#112387)
* feat(cron): stream schedule sources (supervised command stdout)

Add gated argv stream schedules with bounded line batching and trigger.streamBatch composition.

Reuse the gateway ProcessSupervisor for source ownership, deterministic teardown, capped restart backoff, and schedule-key guarded batch execution. Expose additive protocol, CLI, tool, UI, docs, and generated snapshot surfaces without storage DDL.

Contract: stream schedules are event-driven, require cron.triggers.enabled, reject command payloads, and retain at most one bounded pending batch.

* fix(cron): reject retired stream source epochs at run admission

Thread an invalidatable per-owner source-generation token (ownerNonce.generation)
through cron.run admission alongside the schedule key. A batch handed to cron.run
under one source epoch can wait behind another run while its owner is stopped; a
disable→re-enable or A→B→A edit leaves the schedule key unchanged, so the key
check alone would admit the retired epoch's batch. The token is persisted in
job.state on every lifecycle write and compared at every admission site plus the
executeJobCore guard, so a stale epoch's batch is skipped.

Also fix direct stream-job mutations recording the wrong lifecycle status when
global cron is off but triggers are on: extract resolveStreamStopReason so the
direct path reports the remediable cron-disabled state like reconcile does.

* fix(cron): close stream admission windows from round-10 review

- Persist the retired source generation before draining stop teardown, so a
  batch queued behind another cron run cannot gain admission during the up-to-10s
  in-flight-batch wait (server-cron routed stop path).
- Add streamSourceGeneration to the closed gateway response schema (excluded from
  the writable patch schema) so a running stream job passes strict result
  validation without letting callers spoof source identity.
- Close the mutation-epoch ABA: track an eviction epoch so a snapshotted absent-0
  is trusted as unchanged only when no LRU eviction happened during the await.

* refactor(cron): stream sources own a durable logical identity

Split the conflated restart-generation/admission token into two concepts:
a persisted streamSourceIdentity owned by cron store mutations (rotates on
enable/disable, source replacement, once-trigger auto-disable, and explicit
retirement; stable across supervised child restarts) and a watcher-local
process generation used only to fence stale child callbacks. Admission now
requires schedule key + identity together at every window, closing the
A-to-B-to-A and restart-flush races from review rounds 8-11.

Also: match-mode regexes now see raw source text (the [truncated] marker is
applied after matching), stop-timeout failures set the live restartExhausted
mirror so shutdown preserves the terminal diagnostic, and the watcher is
split into owner/output/registry modules under the max-lines budget.

* fix(cron): harden stream teardown and intake from round-4 review

An exit queued ahead of a requested stop no longer counts toward restart
exhaustion (the synchronous stop fence owns it), overlapping cron.stop and
stopAndDrain share one memoized shutdown drain instead of double-stopping
every owner, raw output intake is bounded at 4x the batch cap so normal
64 KiB pipe reads stop losing complete lines to OS chunk boundaries, and
persisted-shape quarantine coverage for unsafe match expressions is pinned.

* fix(cron): keep watcher-internal owner disposal from retiring live identity

Disposing an obsolete owner while a start replaces it is not a durable
removal; a retiring stop there rotated the live job's identity and stranded
the replacement behind the CAS ownership guard. Also align the docs with the
implemented match semantics: complete lines match on full text past the
batch cap, only intake-cut prefixes are unmatchable.

* fix(cron): make oversized-line matching independent of pipe chunking

Partial lines are retained up to the raw-intake bound rather than the
delivery cap, so a complete over-cap line matches identically whether it
arrives in one callback or several; only a line the intake bound itself cut
remains an unprovable prefix. Reconcile also contains schedule-replacement
stop failures per job, matching the other stop branches.

* fix(cron): bound assembled lines, drop stale payload override, barrier stopAll

- enforce the 4x raw-intake per-line cap while assembling split callbacks,
  so an oversized line stays an unprovable prefix regardless of chunking
- stop passing the watcher-cached payload as a cron.run override; the run
  snapshots the persisted payload under its admission lock
- stopAll waits for every owner stop to settle before surfacing failures
- split cron-stream-output interleaving tests into their own file (max-lines)

* fix(cron): address first full-CI round (lint, knip, schema test, unused param)

* chore(cron): refresh codex prompt snapshots for stream schedule schema

* fix(cron): keep the first clean line after an intake drop ending at a newline

* fix(cron): fence stream reconcile list snapshots against direct mutation routes

A cron.list snapshot captured across the reconcile await could be applied
after a direct add/update route already started the owner, stopping it as
removed and retiring its live identity. A mutation revision bumped at every
direct route start invalidates the stale snapshot; reconcile re-lists
(bounded) instead of applying it.

* style(cron): format stream owner imports

* fix(cron): discard severed stream prefixes at EOF

* fix(cron): retry failed stream shutdown drains

* fix(cron): honor stream stop fence after output drain

* chore(cron): refresh landing checks
2026-07-21 15:01:30 -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
Jason (Json)
c4911a2c77 improve(ui): simplify coding agent session headers (#112354)
* improve: simplify coding session catalog headers

* improve: simplify coding session catalog headers
2026-07-21 15:27:49 -06:00
Mark
7a0ae5070a fix(goals): route completion wakes to live session (#104265)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-21 13:58:16 -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
Yiğit ERDOĞAN
1096b74ab7 fix(browser): retire durable tab rows whose browser never returns (#111307)
* fix(browser): retire durable tab rows whose browser never returns

Durable cleanup defers whenever ownership cannot be proven, so a browser
that never comes back at the same cdpUrl leaves its rows behind forever:
each sweep re-claims them, fails the identity lookup, warns, and defers
again. Nothing in the subsystem removes a row by age.

The `browser.session-tabs` namespace is opened with a 5000-row cap and
`reject-new`, so once those rows accumulate to the cap, tracking a new tab
throws PLUGIN_STATE_LIMIT_EXCEEDED. That propagates into the compensation
path in browser-tool-session-tabs.ts, which closes the tab the user just
opened and rethrows -- every `browser open` on that profile then opens a
tab, closes it again, and errors, with no self-healing path.

Bound the retry: when a close attempt reports the target unavailable and
the tab has been unused for longer than the retire window, drop the row
instead of deferring again. A browser returning after that long almost
always carries a fresh instance fingerprint, which retires the row through
the ownership-mismatch path anyway.

closeTrackedBrowserTabsForSessions now accepts `now` like the sweep does,
so lifecycle cleanup can be exercised on a coherent clock.

* refactor(browser): split session tab cleanup claim and test harness

check-lint failed on max-lines: session-tab-registry.ts was at 699 of its
700-line budget and the durable registry test at 982 of 1000, so the retire
branch and its regression test pushed both over.

Extract the cleanup claim bookkeeping (claim, ownership match, delete) into
session-tab-cleanup-claim.ts, and the durable registry test shapes into
session-tab-registry.sqlite.test-helpers.ts, matching the existing
*.test-helpers.ts convention in this directory. No behavior change.

* test(browser): protect unreachable retirement races

Co-authored-by: Yigtwxx <yigiterdogan023@gmail.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-21 10:10:28 -07:00
Harjoth Khara
13348cad1a fix(doctor): migrate MCP flags in included config (#103970)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-21 10:06:19 -07:00
Papilionidae
3dfb4c9cd7 fix(anthropic): accept "cli" entrypoint in Claude session catalog discovery (#105162)
* fix(anthropic): accept "cli" entrypoint in Claude session catalog discovery

Claude Code v2.x writes entrypoint: "cli" in its JSONL session files.
Previously only "sdk-cli" was recognized, causing all v2.x sessions to
be silently skipped.

Extract CLI_ENTRYPOINTS set and isCliEntrypoint() helper, then apply
the same fix to both TypeScript catalog and macOS paired-node native
catalog. Add matching regression coverage on both platforms.

Closes #105164

* fix(anthropic): refresh Claude CLI session discovery

Apply the reviewed cli/sdk-cli allowlist, mirrored negative coverage, and fallback-scope documentation to current main.

Co-authored-by: 黄攀0668000858 <huang.pan@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-21 07:14:42 -07:00
Peter Steinberger
e1d5d3dc16 refactor(channels): move single-account promotion keys to plugin declarations (#112293)
* refactor(channels): move single-account promotion keys to plugin declarations

* fix(channels): keep legacy promotion tier for undeclared setup adapters

* fix(channels): keep plugin discovery lazy in setup promotion helpers

* fix(channels): resolve bundled promotion surfaces from setup-only artifacts

* test(matrix): use vi.stubEnv in setup test env helper
2026-07-21 06:48:30 -07:00
liuhao1024
cd38cdef05 fix(macos): respect OPENCLAW_STATE_DIR in openclaw-mac CLI config resolution (fixes #98591) (#98631)
* fix(macos): resolve OPENCLAW_STATE_DIR in openclaw-mac CLI config resolution

Add shared resolveOpenClawConfigURL() to GatewayConfig.swift with
precedence: OPENCLAW_CONFIG_PATH > OPENCLAW_STATE_DIR > default home.
Switch ConfigureRemoteCommand and loadGatewayConfig to use it.
Add focused tests for all three precedence paths.

* fix(macos): honor state directory in openclaw-mac

Use one normalized config resolver for connect, wizard, and configure-remote, with explicit config path precedence over the selected state directory.

Co-authored-by: liuhao1024 <sunsky.lau@gmail.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-21 05:59:21 -07:00
Peter Steinberger
f695be341c feat(cua-computer): add experimental Windows/Linux computer-use fulfiller (#112267)
* feat(cua-computer): add experimental Windows/Linux computer-use fulfiller

Bundled plugin that fulfills the capability-based computer.act + screen.snapshot
node contract on Windows and Linux by supervising a pinned cua-driver 0.10.x
daemon over MCP stdio. macOS keeps the Peekaboo fulfiller; this plugin is
disabled by default and never available on darwin.

Grounded in cua-driver 0.10.0 source (tool schemas, refusal codes, coordinate
spaces, session/daemon lifecycle). Notable safety and correctness properties:
- Deny-by-default env allowlist so OpenClaw secrets (provider/channel tokens,
  CUA_API_KEY) never reach the separately installed daemon; telemetry and
  update checks forced off.
- Version-gated handshake (exact-minor pin + capability/schema version),
  time-bounded so a corrected driver recovers without a node restart.
- Robust daemon supervision: full readiness-budget polling, startup-race
  tolerance, signal-death and spawn-error recovery, shared-daemon lifecycle
  (never killed on dispose).
- Frame authorization preserved within upstream limits (generation + full live
  geometry; capture refused when screen and screenshot geometry diverge).
- Action mapping refuses inputs cua-driver cannot faithfully deliver:
  layout-shifted keys, modifier-held drag/scroll, Linux modifier clicks,
  hold_key/mouse down-up, non-positive scroll; drag duration clamped.

* fix(cua-computer): satisfy lint, test-types, dead-code, and docs-map gates
2026-07-21 05:58:04 -07:00
Sebastien Tardif
3b565eb345 fix(agents): do not label finish_reason error as LLM timeout (#109313)
* fix(agents): do not label finish_reason error as LLM timeout

Bare provider finish/stop reason `error` is a completed failure, not a
hang. Classify it as server_error so failover stays eligible, and keep
the provider signal in user-facing copy instead of rewriting to
"LLM request timed out." Abort/network/malformed finish reasons remain
timeout-like.

Fixes #109218.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>

* test(agents): assert concrete finish_reason error copy

Avoid optional-string chaining that fails check-test-types (TS18048).

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>

* fix(docs-sync): declare pruneOrphanLocaleDocs in .d.mts

Root test types import the export from docs-sync-publish.mjs, but the
declaration file omitted it after the recent docs-sync change on main.
Unblocks check-test-types for this PR and current main.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>

* fix(scripts): register finish-reason proof script for knip

* docs(agents): classify bare finish_reason error as server_error

Align model-failover docs with the #109218 classifier: provider-completed
bare error stop/finish reasons are server_error (500), not timeout.
Expand the controlled-provider proof to show stream map, failover status,
user copy, and model-fallback eligibility.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>

* fix(scripts): drop unrelated docs-sync .d.mts drift

check-guards fails: pruneOrphanLocaleDocs is declared in
docs-sync-publish.d.mts but not exported from the .mjs. That
declaration was not part of the finish_reason error fix; restore
the main contract.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>

* test(agents): cover finish reason error transport

---------

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Co-authored-by: Altay <altay@hey.com>
2026-07-21 14:13:08 +03:00
Peter Steinberger
89fe452991 feat(gateway): session observer digests over the utility model (#112216)
* feat(gateway): session observer digests over the utility model

* fix(gateway): split session-observer modules and satisfy ci gates

* fix(gateway): observer reads session entries without materializing agent state
2026-07-21 04:04:13 -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
3d3fd97c7d fix(ui): tighten Labs settings spacing (#112038) 2026-07-21 01:28:32 -07:00
Peter Steinberger
5abcad51c8 refactor(media): introduce neutral MediaFact owner with identity-preserving adapters (#112197)
* refactor(media): introduce neutral MediaFact owner with identity-preserving adapters

Media-facts program PR 1 (audit-frozen plan): canonical MediaFact
ownership and normalization/projection helpers in a neutral core media
module; legacy channel/plugin/agent payload builders become adapters
that project exactly their declared input fields (structural richer
inputs cannot leak url/kind into historically path/contentType-only
outputs); persisted transcript input keeps accepting arbitrary stored
kind strings, narrowing only during runtime-fact normalization.

* fix(media): restore SDK and dead-code gates
2026-07-21 00:50:41 -07:00