Commit Graph

881 Commits

Author SHA1 Message Date
LZY3538
954a5089b3 fix(browser): detect Windows browsers when install roots are blank (#111256)
* fix(browser): ignore blank Windows install roots

* fix(browser): complete Windows install root fallbacks

Co-authored-by: LZY3538 <liu.zhenye@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-22 14:54:50 -07:00
Hiroshi Tanaka
52f412bf17 fix(browser): tab creation steals window focus during agent automation (#105356)
* fix(browser): tab creation steals window focus during agent automation

Agent-created tabs inherited CDP's foreground default: direct CDP
Target.createTarget omitted the background flag, and the extension
relay's createTab defaulted to active:true, so every agent tab open
activated the new tab (and, on the extension driver, focused the
window), interrupting whatever the human was doing in that browser.

Direct CDP tab creation now requests background:true (agent tab
ownership/selection is target-id based and never depended on
activation), and the extension relay defaults an omitted background
to true while preserving an explicit background:false, matching the
Codex/Claude-in-Chrome model the extension driver mirrors.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* refactor(browser): keep focus fix LOC-neutral

Preserve background tab creation while keeping the oversized CDP and relay modules within the current LOC ratchet.\n\nCodex-Session: 019f5e93-780a-7350-88f9-1986cdb64914

* fix(browser): honor explicit CDP focus requests

Keep background-by-default automation while treating Target.createTarget focus=true as an explicit foreground request in the extension relay.

Codex-Session: 019f5e93-780a-7350-88f9-1986cdb64914

* fix(browser): preserve explicit CDP focus semantics

Apply the background-by-default automation policy only when focus is omitted, preserving focus=false foreground-tab requests as well as focus=true.

Codex-Session: 019f5e93-780a-7350-88f9-1986cdb64914

* fix(browser): preserve create target window focus

Carry the resolved CDP focus intent through the extension relay and explicitly focus the containing Chrome window when requested.\n\nCodex-Session: 019f5e93-780a-7350-88f9-1986cdb64914

* style(browser): refresh relay import order

* test(secrets): use secure node exec fixtures

* test(doctor): secure exec secret fixture

* test(doctor): retain narrowed temp path

* test(secrets): secure remaining exec fixtures

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-21 21:35:40 -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
Peter Steinberger
4541c27f30 fix(browser): regenerate stale copilot runtime bundle (#112379) 2026-07-21 14:28:56 -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
FMLS
25d6f13a1f test(browser): add cross-operation tab reference parity contract (#111375) 2026-07-20 11:56:57 +08:00
mushuiyu886
34978b5a07 fix(browser): report final URL when opening managed Chrome tabs (#111374) 2026-07-19 10:01:42 -07:00
Peter Steinberger
7aedca21b2 test(release): align built-in timing proofs (#111483) 2026-07-19 09:42:16 -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
4efcea1fd2 feat(browser): send pages to OpenClaw from the Chrome extension (#111158)
* feat(browser): send pages to the main session from the Chrome extension

One-click page share in the OpenClaw Chrome extension: toolbar popup with an
optional note, page/selection context menu, and Alt+Shift+S. Capture is
selection-first with a readability heuristic, X/Twitter thread extraction, and
Google Docs plain-text export via the user's session cookies. Payloads ride the
existing paired relay WebSocket as a new pageShare message; the gateway-only
page-share sink wraps page text in the external-content safety boundary, then
enqueues a main-session system event and requests an immediate heartbeat
(hooks/wake semantics). Node-hosted relays report a clear unsupported error.

Capture heuristics adapted from Nat Eliason's MIT-licensed send-to-openclaw.

Co-authored-by: Codex <codex@openai.com>

* fix(browser): keep page-controlled metadata inside the share safety boundary

Review findings: move title/URL inside wrapExternalContent (a hostile <title>
must not become trusted header text), prefer the user's selection over the
full Google Docs export, and pass the context-menu selectionText through so
iframe selections and selections cleared during relay reconnect still win.

* fix(browser): bind context-menu shares to the click-time document

Selection shares from the context menu now send the click snapshot directly
(no recapture), so navigations during relay reconnect cannot mislabel the
source and iframe selections are preserved. The Google Docs selection probe
scans all accessible frames before falling back to the full-document export.

* test(browser): expect the page-share handler in relay server args

* fix(browser): probe only the main frame for Google Docs selections

All-frame injection rejects wholesale when one frame is inaccessible and
returns child frames in nondeterministic order, so the probe now reads the
main frame only. Child-frame selections still share correctly through the
context menu's click-time selectionText; toolbar/shortcut entry sends the
full page for that case (named tradeoff in the code comment).

* fix(browser): satisfy page-share CI gates

---------

Co-authored-by: Codex <codex@openai.com>
2026-07-19 01:07:28 -07:00
FMLS
4074e0cae1 fix(browser): close tracked tabs after gateway restart (#110797)
* fix(browser): preserve tab cleanup across restarts

* fix(browser): disambiguate restart tab aliases

* fix(browser): keep untrack selection type private

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-18 22:24:20 -07:00
Peter Steinberger
0a8c485395 fix(browser): make copilot runtime bundle deterministic (#111109) 2026-07-18 18:49:38 -07:00
Peter Steinberger
03c3c4b978 fix(browser): keep copilot runtime bundle in sync (#111089) 2026-07-18 18:15:21 -07:00
Peter Steinberger
e7fe47d63f fix(browser): allow one retry after transient failures (#110607)
* fix(browser): soften transient retry guidance

* style(browser): format retry hint test

* chore: keep release note in PR body
2026-07-18 10:58:22 +01:00
Alix-007
bc77ef3398 fix(browser): time out relay WebSocket opening (#109114)
* fix(browser): time out relay WebSocket opening

* test(browser): resolve worker import at runtime

* test(browser): refresh relay worker mocks

Co-authored-by: Alix-007 <li.long15@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Peter Steinberger <peter@steipete.me>
2026-07-18 09:36:46 +01:00
Shakker
3fd448c559 fix: keep browser asset build package-local 2026-07-18 06:42:27 +01:00
Shakker
643476f24d fix: derive generated asset watch exclusions 2026-07-18 06:42:27 +01:00
Shakker
b118e9e913 fix: preserve generated asset mtimes 2026-07-18 06:42:27 +01:00
Peter Steinberger
ec8f6e5e03 feat(browser): add secure per-tab copilot panel (#109817)
* feat(browser): add copilot security contracts

* fix(gateway): expose verified client identity to handlers

* feat(browser): add secure per-tab copilot panel

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* refactor(browser): separate copilot gateway hint custody

* fix(browser): preserve legacy pairing parse shape

* fix(browser): harden copilot lifecycle custody

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* fix(browser): enforce copilot lifecycle boundaries

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* style(browser): format copilot sources

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* fix(browser): preserve copilot consent revocation

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* refactor(browser): split copilot custody owners

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* test(browser): normalize websocket array buffers

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* chore(protocol): regenerate Swift gateway models

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* refactor(browser): model copilot runtime entrypoints

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* fix(browser): honor extension build boundaries

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* test(gateway): assert targeted chat delivery

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* test(gateway): cover targeted delivery calls

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* fix(browser): declare copilot build dependencies

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* fix(ci): clear browser copilot gate failures

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* test(ci): cover copilot lint exclusion

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* fix(browser): gate copilot on relay custody

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

* test(browser): bound copilot relay frames

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>

---------

Co-authored-by: Cameron Beeley <cameron.beeley@gmail.com>
2026-07-18 01:00:23 +01:00
Peter Steinberger
9cdb9762a3 style: format tab-discovery-poll-abort test
8243afc062 (#109617) landed unformatted, failing check-lint repo-wide.
2026-07-17 01:50:53 -07:00
wangmiao0668000666
1fe6b6b0f4 fix(browser): honor abortSignal during Playwright click-and-hold delay (#109710)
* fix(browser): honor abortSignal during Playwright click-and-hold delay

The click-and-hold delay in clickViaPlaywright slept with a bare
setTimeout(resolve, delayMs) where delayMs can reach ACT_MAX_CLICK_DELAY_MS
(5s). The interaction AbortSignal was checked before and after the sleep
but the sleep itself was not abortable, so an abort mid-hold left the
action chain orphaned: the ref'd timer kept the event loop busy for the
full remaining delay and postponed the navigation-guard teardown (grace
recheck and, with an SSRF policy, the page.route interception) until the
orphaned sleep ended.

Swap the bare timer for sleepWithAbort(delayMs, signal) from
openclaw/plugin-sdk/runtime-env so the abort clears the timer and unwinds
the chain immediately. The caller-visible rejection is unchanged: the
abort listener registered before the action still wins the race with the
original signal.reason.

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

* refactor(browser): reuse click abort helper

Keep the contributor abort-aware hold delay while deleting duplicate promise and listener lifecycle code in favor of the existing interaction helper.

Co-authored-by: wangmiao0668000666 <wang.miao86@xydigit.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 01:42:47 -07:00
wangmiao0668000666
8243afc062 fix(browser): honor AbortSignal in tab discovery poll (#109617)
* fix(browser): honor AbortSignal in tab discovery poll

* fix(browser): unify abort-aware tab discovery

Apply the canonical abortable sleep to both discovery loops, reject late backend results after cancellation, and replace timing-sensitive proof with deterministic timer coverage.

Co-authored-by: wangmiao0668000666 <wang.miao86@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 01:39:05 -07:00
Peter Steinberger
f1cb2a8f20 perf(test): poll Chrome MCP state faster (#109776) 2026-07-17 00:42:52 -07:00
Peter Steinberger
0631252f4b refactor: reduce plugin SDK test import overhead (#109333)
* refactor(test): split plugin SDK test helpers

* fix(test): align plugin SDK test subpaths
2026-07-16 13:55:23 -07:00
NIO
67699ddd82 fix(browser): do not sticky-adopt policy-blocked openTab targets (#105301)
* fix(browser): do not sticky-adopt policy-blocked openTab targets

* test(browser): narrow sticky redirect proof

Co-authored-by: NIO <hu.genshen@xydigit.com>

* fix(browser): validate tab adoption after navigation

Co-authored-by: NIO <hu.genshen@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 03:18:27 -07:00
Peter Steinberger
7e1d93d36d refactor(deadcode): enforce full-repository hard zero (#108717)
* refactor(deadcode): enforce full-repository hard zero

* refactor(deadcode): drop rebased test-support leftovers

* refactor(openai): remove stale TTS test bridge

* test(config): cover bundled tuple baseline merging

* fix(deadcode): reject external Windows paths

* test(config): preserve heterogeneous tuple coverage
2026-07-16 00:16:20 -07:00
Peter Steinberger
bae9752c5a refactor(deadcode): enforce repository hard zero (#108641) 2026-07-15 22:40:00 -07:00
Peter Steinberger
08ecf63bb6 fix(deadcode): resolve strict-workspace fallout from bundled plugin roots
The strict knip workspaces landed in #108547 flagged seven files. Two are
convention-resolved and become explicit entries (discord configured-state via
the package-state probes, qa-lab cli via the SDK facade basename resolver);
the other five were dead barrels/wrappers superseded by canonical modules and
are deleted (browser bridge/cdp barrels, discord timeouts wrapper, openai
register.runtime, qa-lab model-selection wrapper).
2026-07-16 03:08:17 +01:00
NIO
e25f512f83 fix(browser): pass control-client timeoutMs through guarded fetch dispatcher floors (#106497)
* fix(browser): pass control-client timeoutMs through guarded fetch dispatcher floors

* test(browser): simplify control timeout forwarding coverage

---------

Co-authored-by: Colin <colin@solvely.net>
2026-07-15 15:32:37 -04:00
Peter Steinberger
96eaf2be80 fix: restore recent native, browser, and audio behavior (#107631)
* fix: repair recent landed regressions

* chore: keep release changelog owned

* test(macos): align CLI fixtures with Node floor

* fix(macos): document Node runtime floor contract

* style(auto-reply): restore runtime mode formatting
2026-07-14 10:47:33 -07:00
Peter Steinberger
433656286d refactor(ws): use native socket contracts 2026-07-14 10:35:38 -07:00
Peter Steinberger
f81f9d8570 chore: enforce max-lines suppression ratchet (#107315)
* ci: enforce max-lines suppression ratchet

* chore: prune stale max-lines suppression

* fix: close max-lines ratchet enforcement gaps

* fix: harden max-lines ratchet checks

* fix(ci): satisfy max-lines ratchet checks

* style: format max-lines declarations

* fix(ci): match oxlint suppression grammar

* test: isolate max-lines git fixtures

* chore: prune resolved max-lines debt

* test: skip newline path fixture on Windows

* fix: harden max-lines suppression ratchet

* chore: refresh max-lines baseline

* fix: close max-lines ratchet bypasses

* fix: derive ratchet base from PR merge tree

* fix: support older Git in staged ratchet

* fix: align max-lines declarations and baseline

* chore: refresh max-lines baseline for current main

* fix: exclude generated wizard locales from max-lines

* chore: prune resolved max-lines debt
2026-07-14 09:27:02 -07:00
Peter Steinberger
034b259799 refactor(browser): trust Playwright tab focus 2026-07-14 06:33:40 -07:00
Peter Steinberger
673b163b72 refactor(cli): use Commander native APIs 2026-07-14 02:45:52 -07:00
Peter Steinberger
6e067f7662 test: restore moving-main quality gates (#106972)
* test(agents): preserve caught abort cause

* refactor(browser): privatize route handler type

* test(lint): cover browser route override
2026-07-13 19:06:30 -07:00
Peter Steinberger
56e9d3b05f refactor(browser): scope async route lint exception 2026-07-13 18:37:46 -07:00
Peter Steinberger
3442825e6b refactor(browser): use Express 5 async routes 2026-07-13 18:21:52 -07:00
Peter Steinberger
d5a9602b41 refactor(browser): privatize proxy request type (#106883) 2026-07-14 00:08:22 +01:00
Peter Steinberger
2e0f6d5304 fix: recover browser routing and Discord voice context 2026-07-13 23:38:56 +01:00
Peter Steinberger
db02a96c4c refactor(process): route bounded commands through Execa (#106495)
* refactor(process): centralize bounded command execution

* refactor(process): migrate core one-shot commands

* refactor(plugins): migrate one-shot commands

* fix(process): await Windows tree termination

* chore(plugin-sdk): refresh process runtime surface

* refactor(process): migrate remaining bounded commands

* refactor(process): normalize command result handling

* refactor(process): split execution responsibilities

* chore(plugin-sdk): refresh API baseline

* chore(process): remove release-owned changelog entry

* fix(process): narrow binary command input checks

* fix(process): cap sandbox command output

* fix(qa-lab): preserve exact node probe env

* chore(ci): refresh dead export baseline

* fix(process): preserve force-kill command deadlines

* fix(process): avoid post-exit timeout reclassification

* test(process): update scp staging wrapper mock

* test(process): update remaining wrapper mocks

* refactor(qa-lab): preserve Execa tar execution
2026-07-13 11:07:35 -07:00
Peter Steinberger
801ec63f92 refactor(cli): rely on Commander contracts (#106366) 2026-07-13 05:05:31 -07:00
Peter Steinberger
418dd85e66 improve: speed up focused test execution (#106307)
* test: speed up focused test execution

* style: format vitest config test

* test: preserve targeted watch routing
2026-07-13 04:38:05 -07:00
Peter Steinberger
279f21e02b chore(deps): remove redundant Commander declarations (#106345) 2026-07-13 04:34:19 -07:00
Peter Steinberger
1edc8b6c27 refactor(security): centralize timing-safe secret comparisons (#105989)
* refactor(plugins): reuse safe secret comparator

* refactor(security): centralize remaining secret comparisons

* chore(ci): lower refactored file baselines
2026-07-12 22:37:21 -07:00
Peter Steinberger
26210c1600 refactor: remove browser and codex dead exports (#105867)
* refactor(browser): collapse Playwright export paths

* refactor(browser): remove dead plugin exports

* refactor(codex): remove dead app-server exports

* refactor(codex): remove remaining dead exports

* test(codex): use canonical private-type owners

* test(browser): isolate proxy startup state

* test(browser): remove stale chrome imports

* refactor(codex): privatize remaining helpers

* chore(deadcode): refresh export baseline after rebase

* refactor(browser): finish canonical helper ownership

* refactor: fix dead-export cleanup gates

* refactor(codex): keep runtime facades LOC-neutral

* chore(ci): refresh TypeScript LOC baseline

* chore(deadcode): refresh ratchets after rebase

* chore(ci): refresh LOC baseline after main advance

* chore(deadcode): align ratchets with latest main
2026-07-12 22:23:11 -07:00
Peter Steinberger
c3ee86a068 refactor(browser): localize internal support types (#105839) 2026-07-12 18:59:01 -07:00
Peter Steinberger
3613b83c6c refactor(browser): trim private Playwright exports (#105794)
* refactor(browser): trim private Playwright exports

* chore(deadcode): refresh export baseline

* chore(deadcode): refresh current baseline

* chore(deadcode): refresh latest baseline
2026-07-12 18:30:34 -07:00
Peter Steinberger
774d5249cc test: eliminate unchecked TypeScript casts (#105804) 2026-07-12 18:08:26 -07:00
Vincent Koc
c25cd32c28 refactor(plugins): trim private helper exports (#105687) 2026-07-12 22:26:14 +02:00
Peter Steinberger
5b2ae5df9d test(browser): align existing-session document mock (#105398)
* test(browser): align existing-session document mock

* test(browser): type document evaluator mock

* test(browser): type document evaluator mock
2026-07-12 15:16:46 +01:00