Skip to content

Commit 148047b

Browse files
committed
merge: main into feat/harbor-runner
Resolve conflicts after main reverted harbor-as-a-harness (#229) and added the separate harbor adaptor (#232), plus the remote-browser CDP refactor (#235). Resolution: - pyproject.toml: keep all harbor entry points — main's clawbench-harbor-adapt alongside the feature's clawbench-export-harbor / clawbench-harbor-parity. - runtime/harnesses/harbor/{harbor_driver.py,run-harbor.sh}: restore (main deleted, branch modified) to preserve the harbor harness the feature drives; re-add the harbor block to harnesses.yaml and "harbor" to EXPECTED_HARNESSES. - Restore Dockerfile.harbor / setup-harbor.sh / usage-emitter.py (deleted by main) so the registered harbor harness stays complete. - Adapt harbor to main's shared CDP API: read CLAWBENCH_BROWSER_CDP_URL instead of the hard-coded http://127.0.0.1:9222 (harbor_driver.py CDP_URL + docstring, run-harbor.sh readiness probe) to satisfy test_harnesses_use_shared_browser_cdp_env. - Adopt main's evolution everywhere else (runtime-server rename, browser_runtime providers, eval/harbor_adapter, runtime/harbor, base entrypoint) unchanged. ruff check + format, pyright (0 errors), and pytest (161 passed) all green.
2 parents d0e056c + fb0e587 commit 148047b

60 files changed

Lines changed: 2695 additions & 323 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"features": {
3+
"ghcr.io/devcontainers/features/docker-in-docker": {
4+
"version": "3.0.1",
5+
"resolved": "ghcr.io/devcontainers/features/docker-in-docker@sha256:ca2508495b01ba29eba93e8153772a2daa65eaa86471cc6863fe2a3d21933df9",
6+
"integrity": "sha256:ca2508495b01ba29eba93e8153772a2daa65eaa86471cc6863fe2a3d21933df9"
7+
},
8+
"ghcr.io/va-h/devcontainers-features/uv": {
9+
"version": "1.1.4",
10+
"resolved": "ghcr.io/va-h/devcontainers-features/uv@sha256:a15737142539d150ef4d358e2d6a7424a0a2f3dc43b29a3aa1b50162a8b11bc1",
11+
"integrity": "sha256:a15737142539d150ef4d358e2d6a7424a0a2f3dc43b29a3aa1b50162a8b11bc1"
12+
}
13+
}
14+
}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ build/
1414
.vscode/
1515
*.log
1616
.pytest_cache/
17-
run-logs/
17+
run-logs/
18+
harbor-datasets/
19+
harbor-jobs/

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ClawBench/
2525
runtime/
2626
shared/
2727
alex_green_personal_info.json
28-
extension-server/ # Container-only uv project for server deps
28+
runtime-server/ # Container-only uv project for server deps
2929
chrome-extension/ # Recording extension
3030
harnesses/ # Dockerfiles + setup/run scripts
3131
models/
@@ -139,7 +139,7 @@ test-output/<model>/<harness>-<case>-<model>-<timestamp>/
139139
## Key Documentation
140140

141141
- [README.md#-cli](README.md#-cli) -- CLI usage, batch runner flags, output format
142-
- [src/clawbench/runtime/extension-server/README.md](src/clawbench/runtime/extension-server/README.md) -- FastAPI server, endpoints, screen recording
142+
- [src/clawbench/runtime/runtime-server/README.md](src/clawbench/runtime/runtime-server/README.md) -- FastAPI server, endpoints, screen recording
143143
- [CONTRIBUTING.md](CONTRIBUTING.md) -- how to add new test cases
144144
- [eval/README.md](eval/README.md) -- evaluation guide and Claude Code prompt template
145145
- [eval/agentic_eval.md](eval/agentic_eval.md) -- evaluator rubric for PASS/FAIL judgment

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@ All notable changes to this project will be documented in this file.
66
The format is based on [Keep a Changelog](https://keepachangelog.com/)
77
and this project adheres to [Semantic Versioning](https://semver.org/).
88

9+
## [Unreleased]
10+
### Added
11+
- Added support for remote browsers with CDP connection.
12+
13+
## [0.7.0] - 2026-06-22
14+
### Added
15+
- Added support for the [Harbor framework](https://github.com/harbor-framework/harbor) through an adaptor to generate harbor-compatible task definitions.
16+
17+
### Changed
18+
- Refactored the container runtime to move the action recording and screenshot capturing logic into the CDP server rather than the Chrome extension, making it possible to integrate remote browsers in the future.
19+
20+
### Removed
21+
- Removed harbor as a runtime harness. Rather, it will be used as a benchmark runner to better utilize its capabilities.
22+
23+
## [0.6.0] - 2026-06-04
24+
### Added
25+
- Added support for the [Harbor](https://github.com/harbor-framework/harbor) framework.
26+
927
## [0.5.0] - 2026-05-24
1028
### Added
1129
- Added display of live token cost estimation during the run.

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ If the task requires additional context (e.g., a pre-filled profile, a specific
108108

109109
## Code changes
110110

111-
For changes to the framework itself (test driver, extension server, Chrome extension, container):
111+
For changes to the framework itself (test driver, runtime server, Chrome extension, container):
112112

113113
1. Read the relevant sub-README for component-specific documentation:
114114
- [README.md#-cli](README.md#-cli)
115-
- [src/clawbench/runtime/extension-server/README.md](src/clawbench/runtime/extension-server/README.md)
115+
- [src/clawbench/runtime/runtime-server/README.md](src/clawbench/runtime/runtime-server/README.md)
116116
- [src/clawbench/runtime/chrome-extension/README.md](src/clawbench/runtime/chrome-extension/README.md)
117117
2. Open an issue first for anything beyond a small bug fix so we can align on approach before you spend time.
118118
3. Open a PR with a clear description of the change and how you tested it.

README.md

Lines changed: 100 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[![Star this repo](https://img.shields.io/badge/%E2%98%85%20Star%20this%20repo-181717?style=flat-square&logo=github&logoColor=white)](https://github.com/reacher-z/ClawBench)
1111
[![arXiv](https://img.shields.io/badge/arXiv-2604.08523-B31B1B?style=flat-square&logo=arxiv&logoColor=white)](https://arxiv.org/abs/2604.08523)
1212
[![HF Daily Paper](https://img.shields.io/badge/Daily_Paper-FFD21E?style=flat-square&logo=huggingface&logoColor=000)](https://huggingface.co/papers/2604.08523)
13-
[![HF Dataset](https://img.shields.io/badge/Dataset-FFD21E?style=flat-square&logo=huggingface&logoColor=000)](https://huggingface.co/datasets/NAIL-Group/ClawBench)
13+
[![HF Dataset](https://img.shields.io/badge/Dataset-FFD21E?style=flat-square&logo=huggingface&logoColor=000)](https://huggingface.co/spaces/TIGER-Lab/ClawBench)
1414
[![HF Trace Dataset](https://img.shields.io/badge/Trace_Dataset-FFD21E?style=flat-square&logo=huggingface&logoColor=000)](https://huggingface.co/datasets/NAIL-Group/ClawBenchV1Trace)
1515
[![Project Page](https://img.shields.io/badge/claw--bench.com-4F46E5?style=flat-square&logo=googlechrome&logoColor=white)](https://claw-bench.com)
1616
[![GitHub stars](https://img.shields.io/github/stars/reacher-z/ClawBench?style=flat-square&logo=github&color=181717&cacheSeconds=300)](https://github.com/reacher-z/ClawBench)
@@ -122,7 +122,7 @@ order food, book travel, apply for jobs, write reviews, manage projects.<br/>
122122
<td align="center" valign="top">
123123

124124
📦 **Download the data**<br/>
125-
[`hf download NAIL-Group/ClawBench`](https://huggingface.co/datasets/NAIL-Group/ClawBench)<br/>
125+
[`hf download NAIL-Group/ClawBench`](https://huggingface.co/spaces/TIGER-Lab/ClawBench)<br/>
126126
<sub>Tasks · rubrics · metadata</sub>
127127

128128
</td>
@@ -178,11 +178,11 @@ ClawBench ships **three** Hugging Face datasets — task definitions plus full e
178178
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
179179
| **[NAIL-Group/ClawBench](https://huggingface.co/datasets/NAIL-Group/ClawBench)** _(also mirrored at [TIGER-Lab/ClawBench](https://huggingface.co/datasets/TIGER-Lab/ClawBench))_ | Task definitions, rubrics, and metadata for V1 (153 tasks) and V2 (130 tasks) — what to attempt and how it's judged. | `hf download --repo-type dataset NAIL-Group/ClawBench` |
180180
| **[NAIL-Group/ClawBenchV1Trace](https://huggingface.co/datasets/NAIL-Group/ClawBenchV1Trace)** | One directory per V1 model run, each with `recording.mp4`, `requests.jsonl`, `actions.jsonl`, `agent-messages.jsonl`, `interception.json`, and `run-meta.json` — everything we used to score the run. | `hf download --repo-type dataset NAIL-Group/ClawBenchV1Trace` |
181-
| **[NAIL-Group/ClawBenchV2Trace](https://huggingface.co/datasets/NAIL-Group/ClawBenchV2Trace)** | Same 5-layer bundle for **V2** model runs. Rolling — new models added as they're evaluated. | `hf download --repo-type dataset NAIL-Group/ClawBenchV2Trace` |
181+
| **[TIGER-Lab/ClawBenchV2Trace](https://huggingface.co/datasets/TIGER-Lab/ClawBenchV2Trace)** | Same 5-layer bundle for **V2** model runs. Rolling — new models added as they're evaluated. | `hf download --repo-type dataset TIGER-Lab/ClawBenchV2Trace` |
182182

183183
> The trace datasets are large; use `hf download --include "<pattern>"` to pull a single model or a single task.
184184
185-
> **🏆 Live leaderboard:** [`claw-bench.com/leaderboard`](https://claw-bench.com/leaderboard) (V2 default, two-stage scoring — interception + LLM judge). Full scoring formula in [`eval/scoring.md`](eval/scoring.md). Add your run: PR to [`leaderboard/results.csv`](https://huggingface.co/datasets/NAIL-Group/ClawBench/blob/main/leaderboard/results.csv).
185+
> **🏆 Live leaderboard:** [`claw-bench.com/leaderboard`](https://claw-bench.com/leaderboard) (V2 default, two-stage scoring — interception + LLM judge). Full scoring formula in [`eval/scoring.md`](eval/scoring.md). Add your run: PR to the current [`leaderboard/results.csv`](https://huggingface.co/datasets/TIGER-Lab/ClawBench/blob/main/leaderboard/results.csv) source.
186186
187187
## How It Works
188188

@@ -215,8 +215,8 @@ uv tool install clawbench-eval
215215
```
216216

217217
You can also use `pipx install clawbench-eval` or `python -m pip install clawbench-eval`.
218-
The installed commands are still `clawbench`, `clawbench-run`, and
219-
`clawbench-batch`.
218+
The installed commands are still `clawbench`, `clawbench-run`,
219+
`clawbench-batch`, and `clawbench-harbor-adapt`.
220220

221221
For those want more granular control and contribution, clone the repo and run the root `uv` package entrypoint:
222222

@@ -326,6 +326,78 @@ Open the noVNC URL the script prints, complete the task by hand, then close the
326326

327327
**(d) Pair with an external browser agent** — run in Human mode, open the noVNC URL, and let an external browser agent control that browser session while ClawBench records and intercepts it.
328328

329+
**(e) Run V2 through Harbor Framework** — convert the V2 cases into a local Harbor dataset, then let Harbor start the ClawBench browser runtime and connect its agent over CDP.
330+
331+
Harbor runs use Harbor's Docker provider, so make sure Docker is available even if you normally use Podman for native ClawBench runs.
332+
333+
```bash
334+
# Convert all V2 tasks into Harbor-compatible task directories.
335+
uv run clawbench-harbor-adapt \
336+
--output-dir ./harbor-datasets/clawbench-v2 \
337+
--overwrite
338+
339+
# Optional smoke dataset with one generated task.
340+
uv run clawbench-harbor-adapt \
341+
--output-dir ./harbor-datasets/clawbench-v2-smoke \
342+
--limit 1 \
343+
--overwrite
344+
345+
# Configure the verifier judge used for Harbor rewards.
346+
export CLAWBENCH_JUDGE_BASE_URL="https://your-judge-provider.example/v1"
347+
export CLAWBENCH_JUDGE_API_KEY="your-judge-api-key"
348+
export CLAWBENCH_JUDGE_MODEL="deepseek-v4-pro"
349+
export CLAWBENCH_JUDGE_API_TYPE="openai-completions"
350+
351+
# Run with Harbor. Use "harbor run" directly if Harbor is already installed.
352+
uvx --from harbor==0.15.0 harbor run \
353+
-p ./harbor-datasets/clawbench-v2 \
354+
-a "<agent>" \
355+
-m "<model>" \
356+
--env-file .env \
357+
--ve CLAWBENCH_JUDGE_BASE_URL="$CLAWBENCH_JUDGE_BASE_URL" \
358+
--ve CLAWBENCH_JUDGE_API_KEY="$CLAWBENCH_JUDGE_API_KEY" \
359+
--ve CLAWBENCH_JUDGE_MODEL="${CLAWBENCH_JUDGE_MODEL:-deepseek-v4-pro}" \
360+
--ve CLAWBENCH_JUDGE_API_TYPE="${CLAWBENCH_JUDGE_API_TYPE:-openai-completions}"
361+
```
362+
363+
The generated Harbor environment contains Chromium, the ClawBench recorder/interceptor, noVNC, and runtime helper scripts, but no ClawBench-native harness. Harbor installs/runs the selected agent from `-a` inside the task container.
364+
365+
PurelyMail credentials come from `.env` via `--env-file .env`. Scoring requires an intercepted request and a judge match; pass judge credentials to Harbor's verifier with `--ve CLAWBENCH_JUDGE_*`. If the judge base URL or API key is missing, intercepted tasks receive reward `0` with `missing judge configuration`.
366+
367+
Concrete agent examples:
368+
369+
```bash
370+
# OpenClaw through OpenRouter's OpenAI-compatible endpoint.
371+
export OPENAI_BASE_URL="https://openrouter.ai/api/v1"
372+
export OPENAI_API_KEY="$OPENROUTER_API_KEY"
373+
374+
uvx --from harbor==0.15.0 harbor run \
375+
-p ./harbor-datasets/clawbench-v2 \
376+
-a openclaw \
377+
-m openai/deepseek/deepseek-v4-flash \
378+
--ak thinking=off \
379+
--env-file .env \
380+
--ve CLAWBENCH_JUDGE_BASE_URL="$CLAWBENCH_JUDGE_BASE_URL" \
381+
--ve CLAWBENCH_JUDGE_API_KEY="$CLAWBENCH_JUDGE_API_KEY" \
382+
--ve CLAWBENCH_JUDGE_MODEL="${CLAWBENCH_JUDGE_MODEL:-deepseek-v4-pro}" \
383+
--ve CLAWBENCH_JUDGE_API_TYPE="${CLAWBENCH_JUDGE_API_TYPE:-openai-completions}" \
384+
--jobs-dir ./harbor-jobs/openclaw-deepseek-flash
385+
386+
# Hermes through OpenRouter.
387+
export OPENROUTER_API_KEY="your-openrouter-key"
388+
389+
uvx --from harbor==0.15.0 harbor run \
390+
-p ./harbor-datasets/clawbench-v2 \
391+
-a hermes \
392+
-m deepseek/deepseek-v4-flash \
393+
--env-file .env \
394+
--ve CLAWBENCH_JUDGE_BASE_URL="$CLAWBENCH_JUDGE_BASE_URL" \
395+
--ve CLAWBENCH_JUDGE_API_KEY="$CLAWBENCH_JUDGE_API_KEY" \
396+
--ve CLAWBENCH_JUDGE_MODEL="${CLAWBENCH_JUDGE_MODEL:-deepseek-v4-pro}" \
397+
--ve CLAWBENCH_JUDGE_API_TYPE="${CLAWBENCH_JUDGE_API_TYPE:-openai-completions}" \
398+
--jobs-dir ./harbor-jobs/hermes-deepseek-flash
399+
```
400+
329401
<details>
330402
<summary><b>Develop from source</b> &nbsp;— clone + ``./run.sh`` for contributors</summary>
331403

@@ -583,23 +655,20 @@ ClawBench's niche: **live consumer websites, everyday tasks, end-to-end recordin
583655
┌─────────────────────────────────────────────────┐
584656
│ Container (Docker / Podman) │
585657
│ │
586-
│ ┌───────────┐ DOM events ┌──────────────┐ │
587-
│ │ content.js├──────────────►│ background.js│ │
588-
│ │ (per tab) │ │ (service │ │
589-
│ └───────────┘ │ worker) │ │
590-
│ └──┬──────┬────┘ │
591-
│ │ │ │
592-
│ actions │ │ screenshots
593-
│ │ │ │
594-
│ ┌──────────┐ ┌──────▼──────▼────┐ │
658+
│ ┌──────────┐ CDP Fetch/Runtime/Page events │
659+
│ │ Chromium ├─────────────────────────────┐ │
660+
│ │ :9222 CDP│ │ │
661+
│ └──────────┘ │ │
662+
│ │ │
663+
│ ┌──────────┐ ┌────────────────▼─┐ │
595664
│ │ Xvfb │◄──ffmpeg──►│ FastAPI Server │ │
596665
│ │ :99 │ x11grab │ :7878 │ │
597666
│ └──────────┘ └──────────────────┘ │
598667
│ │ │
599-
┌──────────┐ ┌───────▼─────────┐ │
600-
│ Chromium │ │ /data │ │
601-
│ :9222 CDP│ │ actions.jsonl │ │
602-
└──────────┘ │ requests.jsonl │ │
668+
┌───────▼─────────┐ │
669+
│ /data │ │
670+
│ actions.jsonl │ │
671+
│ requests.jsonl │ │
603672
│ │ screenshots/ │ │
604673
│ │ recording.mp4 │ │
605674
│ └─────────────────┘ │
@@ -636,6 +705,18 @@ uv run clawbench-batch --models claude-sonnet-4-6 --cases-suite claw-eval --all-
636705

637706
# Batch a custom case directory:
638707
uv run clawbench-batch --models claude-sonnet-4-6 --cases-dir custom-cases --all-cases
708+
709+
# Convert V2 tasks into a local Harbor dataset:
710+
uv run clawbench-harbor-adapt --output-dir ./harbor-datasets/clawbench-v2 --overwrite
711+
712+
# Run the generated Harbor dataset:
713+
uvx --from harbor==0.15.0 harbor run -p ./harbor-datasets/clawbench-v2 -a "<agent>" -m "<model>" --env-file .env
714+
715+
# Examples:
716+
# openclaw via OpenRouter/OpenAI-compatible API:
717+
# -a openclaw -m openai/deepseek/deepseek-v4-flash --ak thinking=off
718+
# hermes via OpenRouter:
719+
# -a hermes -m deepseek/deepseek-v4-flash
639720
```
640721

641722
V1 tasks are in [`test-cases/v1/`](test-cases/v1/) (153 tasks). V2 tasks are in `test-cases/v2/` (130 tasks), Lite is in `test-cases/v1-lite/` (20 tasks), and converted Claw-Eval tasks live in `test-cases/claw-eval/` (19 tasks). All suites use [`test-cases/task.schema.json`](test-cases/task.schema.json). For test case authoring details, see [CONTRIBUTING.md](CONTRIBUTING.md). For output structure and evaluation guidance, see [eval/README.md](eval/README.md).

0 commit comments

Comments
 (0)