Commit Graph

445 Commits

Author SHA1 Message Date
Vincent Koc
8d87e85705 test(browser): stabilize default browser detection mocks 2026-03-24 18:02:47 -07:00
Peter Steinberger
c9f4dd3c1b test: speed up browser control suites 2026-03-24 23:45:33 +00:00
Peter Steinberger
23a4ae4759 refactor: dedupe test helpers and harnesses 2026-03-24 21:41:46 +00:00
Peter Steinberger
e2acfcf527 test: speed up browser pw-tools-core suites 2026-03-24 20:39:13 +00:00
Peter Steinberger
6e9591c4ce test: speed up browser suites 2026-03-24 17:49:25 +00:00
Peter Steinberger
a8bf75f03e test: speed up browser and gateway suites 2026-03-24 17:27:02 +00:00
Vincent Koc
7eefddd0ed test(memory): clear browser and plugin caches between cases 2026-03-24 10:05:32 -07:00
Peter Steinberger
43131dcc08 test: harden threaded shared-worker suites 2026-03-24 08:37:00 +00:00
Peter Steinberger
90fab48416 ci: stabilize sharded channel lanes 2026-03-24 00:21:50 +00:00
Vincent Koc
3fe2f0a550 docs: fix CLI command tree, SDK import path, and tool group listing
- Remove non-existent 'secrets migrate' from CLI command tree
- Add actual secrets subcommands: audit, configure, apply
- Add missing plugin subcommands: inspect, uninstall, update, marketplace list
- Fix plugins info -> inspect (actual command name)
- Add message send and broadcast subcommands to command tree
- Remove misleading deprecated import from sdk-overview
- Add sessions_yield and subagents to group:sessions tool group docs
- Fix formatting
2026-03-23 10:40:41 -07:00
Vincent Koc
b4dd600b37 fix(browser): reuse running loopback browser after probe miss 2026-03-23 10:05:26 -07:00
Luke
d98e3a1ea9 Tests: fix fresh-main regressions (#53011)
* Tests: fix fresh-main regressions

* Tests: avoid chat notice cache priming

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-03-23 09:54:50 -07:00
Vincent Koc
beadd4c553 fix(gateway): harden supervised lock and browser attach readiness 2026-03-23 08:42:00 -07:00
Peter Steinberger
b393effba6 test: harden channel suite isolation 2026-03-23 12:57:43 +00:00
Peter Steinberger
fc9739313c test: harden channel suite isolation 2026-03-23 11:09:12 +00:00
Peter Steinberger
2df10e81c8 test: isolate server-context browser harness imports 2026-03-23 03:23:30 -07:00
Peter Steinberger
3ff2f85bad fix: stop browser server tests from launching real chrome 2026-03-23 03:15:02 -07:00
Peter Steinberger
eac93507c3 fix(browser): enforce node browser proxy allowProfiles 2026-03-23 00:56:44 -07:00
Peter Steinberger
80cd8cd6be refactor: unify minimax model and failover live policies 2026-03-23 00:02:35 -07:00
Stephen Schoettler
ca778b3f3c fix(browser): add ChildProcessWithoutNullStreams cast for @types/node compat
The stdio tuple overload resolves differently across @types/node versions
(v20 vs v24/v25). Cast the spawn() result to ChildProcessWithoutNullStreams
to ensure proc.stderr?.on/off type-checks regardless of installed @types/node.
2026-03-22 18:39:24 -07:00
Stephen Schoettler
5e64265537 fix(browser): prevent stdio buffer blocking in Docker environments 2026-03-22 18:39:24 -07:00
Roger Deng
c3f1d43a10 test: align chrome launch args fixture with current browser profile type 2026-03-22 15:37:19 -07:00
Roger Deng
72d775e069 fix: stop forcing an extra blank tab on browser launch 2026-03-22 15:37:19 -07:00
Radek Sienkiewicz
7deb543624 Browser: support non-Chrome existing-session profiles via userDataDir (#48170)
Merged via squash.

Prepared head SHA: e490035a24
Co-authored-by: velvet-shark <126378+velvet-shark@users.noreply.github.com>
Co-authored-by: velvet-shark <126378+velvet-shark@users.noreply.github.com>
Reviewed-by: @velvet-shark
2026-03-16 14:21:22 +01:00
Vincent Koc
476d948732 !refactor(browser): remove Chrome extension path and add MCP doctor migration (#47893)
* Browser: replace extension path with Chrome MCP

* Browser: clarify relay stub and doctor checks

* Docs: mark browser MCP migration as breaking

* Browser: reject unsupported profile drivers

* Browser: accept clawd alias on profile create

* Doctor: narrow legacy browser driver migration
2026-03-15 23:56:08 -07:00
Peter Steinberger
a472f988d8 fix: harden remote cdp probes 2026-03-15 08:23:01 -07:00
George Zhang
3704293e6f browser: drop headless/remote MCP attach modes, simplify existing-session to autoConnect-only (#46628) 2026-03-14 15:54:22 -07:00
George Zhang
b1d8737017 browser: drop chrome-relay auto-creation, simplify to user profile only (#46596)
Merged via squash.

Prepared head SHA: 74becc8f7d
Co-authored-by: odysseus0 <8635094+odysseus0@users.noreply.github.com>
Co-authored-by: odysseus0 <8635094+odysseus0@users.noreply.github.com>
Reviewed-by: @odysseus0
2026-03-14 15:40:02 -07:00
Vincent Koc
173fe3cb54 feat(browser): add headless existing-session MCP support esp for Linux/Docker/VPS (#45769)
* fix(browser): prefer managed default profile in headless mode

* test(browser): cover headless default profile fallback

* feat(browser): support headless MCP profile resolution

* feat(browser): add headless and target-url Chrome MCP modes

* feat(browser): allow MCP target URLs in profile creation

* docs(browser): document headless MCP existing-session flows

* fix(browser): restore playwright browser act helpers

* fix(browser): preserve strict selector actions

* docs(changelog): add existing-session MCP note
2026-03-14 14:59:30 -07:00
scoootscooob
ac29edf6c3 fix(ci): update vitest configs after channel move to extensions/ (openclaw#46066)
Verified:
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: scoootscooob <167050519+scoootscooob@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-14 13:23:25 -05:00
Peter Steinberger
61d171ab0b fix(browser): restore batch playwright dispatch 2026-03-14 05:34:37 +00:00
Vincent Koc
a6bdf2dfd0 Revert "Browser: scope nested batch failures in switch"
This reverts commit aaeb348bb7.
2026-03-13 22:17:57 -07:00
Vincent Koc
81ecae9d7a Merge branch 'main' of https://github.com/openclaw/openclaw
* 'main' of https://github.com/openclaw/openclaw: (640 commits)
  ci: add npm token fallback for npm releases
  build: prepare 2026.3.13-beta.1
  docs: reorder unreleased changelog by impact
  fix: keep windows onboarding logs ascii-safe
  test: harden parallels all-os smoke harness
  chore: bump pi to 0.58.0
  fix(browser): prefer user profile over chrome relay
  build: upload Android native debug symbols
  Gateway: treat scope-limited probe RPC as degraded reachability (#45622)
  build: shrink Android app release bundle
  fix: keep exec summaries inline
  docs: fix changelog formatting
  test(discord): align rate limit error mock with carbon
  build(android): strip unused dnsjava resolver service before R8
  build(android): add auto-bump signed aab release script
  fix(browser): add browser session selection
  fix(models): apply Gemini model-id normalization to google-vertex provider (#42435)
  fix(feishu): add early event-level dedup to prevent duplicate replies (#43762)
  fix: unblock discord startup on deploy rate limits
  fix: default Android TLS setup codes to port 443
  ...

# Conflicts:
#	src/browser/pw-tools-core.interactions.batch.test.ts
#	src/browser/pw-tools-core.interactions.ts
2026-03-13 22:13:33 -07:00
Peter Steinberger
b6d1d0d72d fix(browser): prefer user profile over chrome relay 2026-03-14 04:15:34 +00:00
Peter Steinberger
5c40c1c78a fix(browser): add browser session selection 2026-03-14 03:46:44 +00:00
George Zhang
eee5d7c6b0 fix(browser): harden existing-session driver validation and session lifecycle (#45682)
* fix(browser): harden existing-session driver validation, session lifecycle, and code quality

Fix config validation rejecting existing-session profiles that lack
cdpPort/cdpUrl (they use Chrome MCP auto-connect instead). Fix callTool
tearing down the MCP session on tool-level errors (element not found,
script error), which caused expensive npx re-spawns. Skip unnecessary
CDP port allocation for existing-session profiles. Remove redundant
ensureChromeMcpAvailable call in isReachable.

Extract shared ARIA role sets (INTERACTIVE_ROLES, CONTENT_ROLES,
STRUCTURAL_ROLES) into snapshot-roles.ts so both the Playwright and
Chrome MCP snapshot paths stay in sync. Add usesChromeMcp capability
flag and replace ~20 scattered driver === "existing-session" string
checks with the centralized flag.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(browser): harden existing-session driver validation and session lifecycle (#45682) (thanks @odysseus0)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 20:21:47 -07:00
Peter Steinberger
dcbc574a27 test: share browser route test helpers 2026-03-14 00:35:07 +00:00
Peter Steinberger
97aa786dd5 refactor: share browser route helpers 2026-03-14 00:30:14 +00:00
Peter Steinberger
9442260a20 test: share browser loopback auth error assertions 2026-03-14 00:30:14 +00:00
Peter Steinberger
766f13d37a test: expand browser existing-session coverage 2026-03-14 00:22:45 +00:00
Val Alexander
0e8672af87 fix(ui): stop dashboard chat history reload storm (#45541)
* UI: stop dashboard chat history reload storm

* Changelog: add PR number for chat reload fix

* fix: resolve branch typecheck regressions
2026-03-13 19:19:53 -05:00
Peter Steinberger
4357cf4e37 fix: harden browser existing-session flows 2026-03-13 23:56:48 +00:00
Vincent Koc
aaeb348bb7 Browser: scope nested batch failures in switch 2026-03-13 15:51:08 -07:00
Peter Steinberger
ae1a1fccfe fix: stabilize browser existing-session control 2026-03-13 22:41:17 +00:00
Vincent Koc
e82ba71911 fix(browser): follow up batch failure and limit handling (#45506)
* fix(browser): propagate nested batch failures

* fix(browser): validate top-level batch limits

* test(browser): cover nested batch failures

* test(browser): cover top-level batch limits
2026-03-13 15:39:28 -07:00
Vincent Koc
f59b2b1db3 fix(browser): normalize batch act dispatch for selector and batch support (#45457)
* feat(browser): add batch actions, CSS selector support, and click delayMs

Adds three improvements to the browser act tool:

1. CSS selector support: All element-targeting actions (click, type,
   hover, drag, scrollIntoView, select) now accept an optional
   'selector' parameter alongside 'ref'. When selector is provided,
   Playwright's page.locator() is used directly, skipping the need
   for a snapshot to obtain refs. This reduces roundtrips for agents
   that already know the DOM structure.

2. Click delay (delayMs): The click action now accepts an optional
   'delayMs' parameter. When set, the element is hovered first, then
   after the specified delay, clicked. This enables human-like
   hover-before-click in a single tool call instead of three
   (hover + wait + click).

3. Batch actions: New 'batch' action kind that accepts an array of
   actions to execute sequentially in a single tool call. Supports
   'stopOnError' (default true) to control whether execution halts
   on first failure. Results are returned as an array. This eliminates
   the AI inference roundtrip between each action, dramatically
   reducing latency and token cost for multi-step flows.

Addresses: #44431, #38844

* fix(browser): address security review — batch evaluateEnabled guard, input validation, recursion limit

Fixes all 4 issues raised by Greptile review:

1. Security: batch actions now respect evaluateEnabled flag.
   executeSingleAction and batchViaPlaywright accept evaluateEnabled
   param. evaluate and wait-with-fn inside batches are rejected
   when evaluateEnabled=false, matching the direct route guards.

2. Security: batch input validation. Each action in body.actions
   is validated as a plain object with a known kind string before
   dispatch. Applies same normalization as direct action handlers.

3. Perf: SELECTOR_ALLOWED_KINDS moved to module scope as a
   ReadonlySet<string> constant (was re-created on every request).

4. Security: max batch nesting depth of 5. Nested batch actions
   track depth and throw if MAX_BATCH_DEPTH exceeded, preventing
   call stack exhaustion from crafted payloads.

* fix(browser): normalize batch act dispatch

* fix(browser): tighten existing-session act typing

* fix(browser): preserve batch type text

* fix(browser): complete batch action execution

* test(browser): cover batch route normalization

* test(browser): cover batch interaction dispatch

* fix(browser): bound batch route action inputs

* fix(browser): harden batch interaction limits

* test(browser): cover batch security guardrails

---------

Co-authored-by: Diwakar <diwakarrankawat@gmail.com>
2026-03-13 15:10:55 -07:00
Peter Steinberger
b84c7037de fix: repair ci audit and type drift 2026-03-13 21:02:19 +00:00
Peter Steinberger
d2a36d0a98 refactor: share small test harness helpers 2026-03-13 20:19:38 +00:00
Peter Steinberger
593964560b feat(browser): add chrome MCP existing-session support 2026-03-13 20:10:08 +00:00
Vincent Koc
18f15850e6 fix(browser): restore proxy attachment media size cap (#43684)
* browser: honor shared proxy file size cap

* test(browser): cover proxy file size cap

* docs(changelog): note browser proxy size cap fix
2026-03-12 01:04:31 -04:00