all repos — sz-chrome-remote-cdp @ bb691459f358d32267c552de643fededf647855e

pi-browser-harness, patched to drive a Chrome on another host over CDP, with castle_cdp_search web search

bb691459
refactor: delete legacy daemon, tools, protocol, renderers; collapse to single tsconfig
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:46:12 +0530
c86b220d
refactor: drop legacy daemon usage from index/setup; trim state; move 4 files to strict tsconfig

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:44:52 +0530
0f717bc7
feat(domains): migrate execute_js and run_script with path allowlist + timeout + return validation
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:41:15 +0530
b7fd72a6
feat(domains): migrate http_get (timeout covers body) and get_network_log (deprecation note)
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:36:50 +0530
96934b77
feat(domains): migrate drag_and_drop
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:35:30 +0530
dc07a515
feat(domains): migrate viewport_resize
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:34:39 +0530
5664dc8f
feat(domains): migrate upload_file (safeJs), download (validated dir), print_to_pdf
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:32:07 +0530
e8650dc5
feat(domains): migrate tab tools (list, current, switch, new)
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:28:15 +0530
1d0873c7
feat(domains): migrate go_back, go_forward, reload
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:26:01 +0530
3dfc4f11
feat(domains): migrate navigate (NavOutcome) and open_urls

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:24:23 +0530
6708da54
feat(domains): migrate screenshot, add typed sharp shim, restore click crosshair overlay
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:20:09 +0530
9ead6a05
feat(domains): migrate handle_dialog
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:16:24 +0530
1b11036e
feat(domains): migrate page_info, wait, wait_for_load with typed timeout
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:14:52 +0530
307f9e74
feat(domains): migrate scroll with W3C deltaY semantics and dialog guard
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:12:36 +0530
41e3b69b
feat(domains): migrate type, press_key, dispatch_key with safeJs and matched-count validation
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:08:50 +0530
0f962ef9
feat(domains): migrate browser_click to defineBrowserTool — vertical slice

Implements Task 9: adds src/domains/click.ts with the new architecture,
updates registry.ts to register clickTool, removes the legacy browser_click
block from tools.ts, and wires BrowserClient alongside BrowserDaemon in
index.ts so both systems coexist during migration.

Also fixes AnyBrowserToolDefinition variance: uses never-arg renderCall in
the erased type and a boundary cast in registerBrowserTool so concrete tool
definitions (with specific Static<S> args) are assignable to the registry
array without widening.
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:05:09 +0530
6a4bfa31
feat: add defineBrowserTool helper, truncation, schemas/common, empty registry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:00:58 +0530
d3d86f9d
fix(cdp): serialize event consumer; persist dialog until taken; validate page info shape
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:55:44 +0530
71228dea
feat: add CDP session and BrowserClient factory
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:52:10 +0530
52fd9523
fix(cdp): validate inbound CDP messages with a runtime type guard
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:48:28 +0530
22019a65
feat(cdp): add factory-based transport with Result and event AsyncIterable
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:46:05 +0530
73caf309
fix(cdp): clear socket timer on probe success; surface non-ENOENT readFile errors
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:43:52 +0530
962ae380
feat(cdp): port DevToolsActivePort discovery to Result
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:42:07 +0530
ede4b89e
feat(cdp): add types and error model for new transport layer
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:40:27 +0530
10f44002
build: enable strict tsconfig flags for new code, keep legacy lenient
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:39:06 +0530
60ddf56f
docs(util): clarify safeJs trust boundary and unsupported value types
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:38:07 +0530
31afcecd
feat(util): add pure keycodes and safeJs template helper
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:36:13 +0530
64cb4c87
fix(util): preserve AbortSignal.reason; validate namespace in temp paths
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:33:27 +0530
310d0a73
feat(util): add result, time, and paths primitives for v0.3 rewrite
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:31:01 +0530
6759b6fd
feat: v0.2.1 — feature parity with browser-use/browser-harness

Adds the missing tools called out in docs/browser-harness-comparison.md:
upload_file, dispatch_key, download (configure dir), viewport_resize,
drag_and_drop, print_to_pdf, get_network_log, plus the iframe-target
helper. Updates promptGuidelines and the system prompt's tools table.

Tracked in todo.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:29:23 +0530
5b76aa34
docs: add v0.3.0 harness rewrite implementation plan

27 tasks: foundations → CDP transport/session/client → defineTool helper
→ vertical slice (click) → 13 domain migrations → wire-up + delete legacy
→ smoke + release. Each task has concrete code, exact file paths, and a
typecheck checkpoint.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:17:27 +0530
f6204b10
docs: add v0.3.0 internal-rewrite design spec

Per-domain module split, frozen tool names, normalized params, unified
Result+details contract. Captures the full audit (predictability bugs,
security gaps) and the structural fixes for each.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 15:05:19 +0530
fa54f769
perf: v0.2.0 — event-based waitForLoad, fast ensureAlive, JPEG screenshots, page info caching

5 performance optimizations (14-36% faster end-to-end, output quality unchanged):

- fast ensureAlive(): WS state check instead of CDP roundtrip (96% faster per-call)
- event-based waitForLoad(): CDP load events instead of 300ms polling (99.5% faster for loaded tabs)
- JPEG screenshot support: 29-49% smaller files, faster CDP transfer
- page info caching: 1s TTL eliminates redundant evaluateJS calls
- parallel domain enables: Promise.all instead of sequential await in switchTab()

Benchmark: 3622ms vs 4243ms baseline on 3-tab navigation + screenshot task.
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 11:40:20 +0530
b77c5ec3
ci: suppress npm pack notice output
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 00:42:32 +0530
e865b26f
fix: commit package-lock.json for CI reproducibility

Removes package-lock.json from .gitignore so npm ci works in CI.
Without the lock file, actions/setup-node cache resolution fails
and npm ci has no dependency tree to install from.
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 00:40:51 +0530
5762eae6
docs: rewrite README — add hero image, condense tools, fix accuracy

- Add hero image banner at top
- Merge 4 tool tables into 1 compact reference table
- Fix tool syntax to match actual parameter schemas
- Add Core Patterns section (navigation, form fill, extraction, research)
- Add Dialogs, SPAs, Keyboard modifiers subsections
- Add What NOT to do section
- Add Architecture diagram
- Add Contributing link
- Remove verbose/duplicate usage examples
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 00:38:39 +0530
40c18b22
chore: update hero image
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 00:30:00 +0530
a122a32a
fix: normalize repository.url for npm
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 00:09:37 +0530
ae223796
chore: prepare v0.1.0 release

- Add hero image for pi package gallery
- Update CHANGELOG with release date
- Update README with npm install instructions
- Add assets/ to npm package files
- Add CONTRIBUTING.md and GitHub templates
- Add CI workflow for typecheck and pack validation
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 00:08:22 +0530
28578d1d
Replace dynamic tool registration with browser_run_script

Remove register_tool/remove_tool/list_dynamic_tools and the entire
dynamic-tools.ts module. Replace with a single browser_run_script tool
that executes temporary scripts from disk with daemon access.

Scripts are now written to disk before execution, making them auditable
and re-runnable. Same bindings (daemon, require, params, etc.) as before
via the same AsyncFunction mechanism.
amankumarsingh77 amankumarsingh7702@gmal.com
Thu, 30 Apr 2026 17:52:26 +0530
b6d75222
fix: stop Chrome remote-debugging consent popup storm

Previously a single consent-pending socket could spawn up to 5 stacked
'Allow remote debugging?' dialogs. Three causes:

- onopen reset _reconnectAttempts, but Chrome accepts the WS upgrade
  before the user clicks Allow, so a held socket looked healthy.
- ensureAlive's health probe used the full 15s CDP timeout; while the
  user was reading the dialog the probe would time out, trigger a
  stop()+start(), and a fresh popup would stack on top.
- onclose auto-reconnected unconditionally even when consent had never
  been granted on that connection.

Now a connection is only considered healthy once the first CDP
roundtrip completes (attachFirstPage). ensureAlive does a 2s short
probe before tearing down the socket. onclose bails out of auto-
reconnect when consent was never observed, so a denied dialog
surfaces a clean error instead of looping.
amankumarsingh77 amankumarsingh7702@gmal.com
Thu, 30 Apr 2026 13:09:27 +0530
63b16957
Replace socket daemon with direct CDP WebSocket connection

Drops the Unix socket subprocess in favor of talking CDP directly over
WebSocket from the extension. Removes the protocol's send/health helpers,
simplifies setup to just verifying Chrome's remote debugging port, and
tightens types in dynamic-tools. Bumps Node engine to >=22 and adds the
ws dependency.
amankumarsingh77 amankumarsingh7702@gmal.com
Wed, 29 Apr 2026 01:38:17 +0530
5317b329
Fix repo/bug URLs to point to amankumarsingh77/pi-browser-harness
amankumarsingh77 amankumarsingh7702@gmal.com
Wed, 29 Apr 2026 00:41:40 +0530
8fff9152
Initial release: pi-browser-harness

Browser control extension for pi — 20 browser_* tools for navigating,
clicking, typing, screenshotting, and extracting data from real Chrome
via CDP. Includes self-extending harness (register_tool/remove_tool),
guided /browser-setup, session persistence, and custom TUI renderers.
amankumarsingh77 amankumarsingh7702@gmal.com
Wed, 29 Apr 2026 00:40:36 +0530