all repos — sz-chrome-remote-cdp @ 0b32e88f84f36a759d7191e8bdfd09a44789fa95

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

0b32e88f
feat: address elements by stable refs across re-renders (#8)

Interaction tools could only target elements by raw viewport coordinates
(browser_click) or model-guessed CSS selectors (browser_fill/focus/
select_option/upload). Neither survives a re-render: on React/SPA forms,
every save or edit reflows the page, so captured @(x,y) coordinates go
stale and guessed selectors miss — leaving the agent to fall back to
hand-rolled execute_js DOM walks and unnoticed failed saves.

Add a stable ref system, mirroring Playwright MCP / browser-use:

- snapshot assigns each interactive element a ref (e1, e2, …), shown as
  [eN] in the outline, and publishes a per-tab ref → backendNodeId map
- interaction tools accept an optional `ref` that re-resolves the element
  at call time (via DOM.resolveNode / getBoxModel), so it stays valid
  across re-renders; coordinates/selectors remain as fallbacks
- mutating tools append a compact diff of changed / newly-appeared (*) /
  removed interactive elements, so silent failed saves surface immediately
- stale refs return an actionable "re-snapshot" error instead of a miss

Ref map is replaced per snapshot (bounded memory); fill keeps the native
_valueTracker write path so React controlled inputs still update.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Aman Kumar 145339995+amankumarsingh77@users.noreply.github.com
Mon, 29 Jun 2026 00:02:54 +0530
9f428cce
ci: use Node 24 for OIDC/npm 11 support
amankumarsingh77 amankumarsingh7702@gmail.com
Sun, 21 Jun 2026 00:55:38 +0530
0825b683
ci: add trusted-publishing workflow for npm
amankumarsingh77 amankumarsingh7702@gmail.com
Sun, 21 Jun 2026 00:51:33 +0530
da5d31af
release: v0.6.0 — per-tab isolation, Unix socket daemon, on-demand init (#6)

* feat: Unix socket daemon with auto-reconnect for persistent Chrome CDP

Eliminates the 'Allow Remote Debugging' Chrome prompt that appeared on
every pi session by multiplexing pi instances through a single persistent
daemon process.

Key additions:
- Unix socket IPC (net.createServer + readline JSON framing)
- CdpBridge with ID multiplexer + event router
- DaemonTransport implementing CdpTransport interface
- Auto-spawn with ensureDaemon() (lazy, checks socket)

Fixes since initial implementation:
- Bridge auto-reconnects to Chrome with exponential backoff (1s-60s).
  Previously the bridge tried once at startup and permanently failed
  if Chrome wasn't ready — causing 'Chrome not connected' on every
  browser tool call.
- Daemon spawn uses project-local tsx binary instead of global --import
  flag, fixing silent spawn failure (ERR_MODULE_NOT_FOUND).
- Stale ctx crash: persistState in onOwnershipChange wrapped in
  try/catch to prevent CDP event consumer crashes.

49 test assertions across 4 test files. Zero TypeScript errors.

* feat: on-demand browser initialization

Browser daemon no longer auto-starts on session_start. Instead:
- session_start creates the client lazily but does NOT connect or spawn
  the daemon. Zero Chrome prompts for non-browser pi sessions.
- Browser tool wrapper checks for daemon socket before each call.
  Socket missing → clear error: 'Run /browser-setup first'.
  Socket exists → proceeds silently (daemon already running).
- /browser-setup is the explicit, one-time init point. It spawns
  the daemon and connects to Chrome only when the user opts in.
- SKILL.md updated with Connection Setup instructions telling agents
  to direct users to /browser-setup when socket is missing.

* fix: checkChromeRunning on macOS — match by substring not exact

ps -A -o comm= returns full executable paths on modern macOS
(e.g. /Applications/Google Chrome.app/Contents/MacOS/Google Chrome),
not the basename. The old exact-match check (browserProcesses.includes(l))
never matched, causing false 'No browser instance running' errors.
Changed to substring includes() with helper/renderer/crashpad filtering.

* feat: browser_setup as agent-callable tool

The agent can now self-recover from 'Browser harness not initialized'
errors by calling browser_setup directly — no user mediation needed.

- Extracted shared performSetup() from the slash command into setup.ts
- Created src/domains/setup.ts with ensureAlive:false to bypass the
  socket guard (this tool IS the setup, can't require itself)
- Registered browser_setup in the tool registry
- Updated SKILL.md: agent calls browser_setup directly, not ask user
- Removed stale test/manual/spawn-test.ts

* release: v0.6.0 — per-tab isolation, Unix socket daemon, on-demand init
Aman Kumar 145339995+amankumarsingh77@users.noreply.github.com
Sun, 21 Jun 2026 00:46:44 +0530
8db684d4
docs: add per-tab isolation research, design, and implementation plan

- Research: multi-agent safety analysis with precedent findings
- Design: 4-slice per-tab isolation architecture (thoughts/shared/designs/)
- Plan: 3-phase implementation plan (thoughts/shared/plans/)
- Agent definitions (.pi/agents/) for codebase analysis workflow
amankumarsingh77 amankumarsingh7702@gmal.com
Fri, 08 May 2026 00:18:22 +0530
aa08e740
feat: add per-tab isolation for multi-agent safety

Replace singleton dialog, pageInfoDirty, networkBuffer, and consoleBuffer
with per-tab TabSession objects stored in a Map<string, TabSession>.

- Add TabSession type (sessionId, targetId, dialog, pageInfoDirty,
  networkBuffer, consoleBuffer) and tabs/sessionIdToTargetId Maps
- Add ev.sessionId filter guard in consumeEvents to prevent cross-tab
  event contamination
- Rework switchTo to create/reuse TabSession without clearing buffers,
  updating sessionId on re-attach
- Route all CDP events (dialog, network, console) through resolveTab
  to the correct TabSession
- takeDialog/drainPageInfoInvalidations/drainNetworkBuffer/
  drainConsoleBuffer read from current TabSession
- Target.targetDestroyed prunes dead TabSession entries
- attachFirstPage creates initial TabSession and prunes dead entries
- Per-tab pageCaches Map in client.ts replaces pageCache singleton
- listTabs reconciliation prunes dead pageCaches entries
- console-buffer.ts clear() resets nextSeq to 1 (per-tab seq space)
- Multi-agent warning in prompt.ts Parallel Execution section
amankumarsingh77 amankumarsingh7702@gmal.com
Fri, 08 May 2026 00:18:15 +0530
4052e6e6
release: v0.5.0 — browser_console tool for JS error/console diagnostics
amankumarsingh77 amankumarsingh7702@gmal.com
Thu, 07 May 2026 12:54:12 +0530
bd197399
docs: rewrite README for v0.4.0 — comparison table, snapshot-first patterns

Adds a "Why pi-browser-harness?" comparison table (vs Playwright MCP, Stagehand,
Puppeteer MCP) at the top, surfacing the differentiators a chooser actually
cares about: real Chrome, coordinate clicks through iframes/shadow DOM, inline
TUI rendering, AX tree with @(x,y) coords, parallel execution, scripts.

Tool list reorganized into "Page inspection (use these by default)" / "Visual
(last resort)" / Navigation / Interaction / Utility — adds browser_snapshot,
browser_network_requests, browser_close_tab. Patterns rewritten snapshot-first;
form filling and research no longer screenshot. New sections for parallel
execution and tab ownership. Temporary scripts example fixed to use the actual
daemon.session().call() binding. Three explicit anti-screenshot rules in
"What NOT to do".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
amankumarsingh77 amankumarsingh7702@gmal.com
Wed, 06 May 2026 00:20:20 +0530
589cd294
release: v0.4.0 — accessibility snapshot, network capture, snapshot-first prompts

Adds two new tools and pivots the agent's default workflow away from
screenshots toward structured page data.

browser_snapshot — CDP accessibility tree (roles, names, states, hierarchy)
with click coordinates @(x,y) attached to every interactive element via
DOM.getBoxModel (parallel, 1.5s aggregate budget). Pass directly to
browser_click — no screenshot round-trip. Optional includeScreenshot:true
for visual confirmation. format:"json" returns a slim structure with full
box per node.

browser_network_requests — replaces the deprecated browser_get_network_log
placeholder. Filters by urlPattern (substring or /regex/), method, status,
resource type, recency. Optional response-body capture under a 5s aggregate
budget with 50KB per-body cap. Buffer is page-scoped (cleared on tab switch),
500 records/tab, with a bufferOverflowed flag on drain.

CDP plumbing: in-process aggregator in src/cdp/network-buffer.ts wired into
the existing single-consumer event loop. Accessibility domain enabled
alongside Page/DOM/Runtime/Network on every attach.

Ctrl+O expand/collapse on three tools' renderResult — browser_snapshot,
browser_network_requests, browser_execute_js. Compact-by-default views with
keyHint("app.tools.expand") that respects user keybinding remaps.

Tool prompts pivoted snapshot-first: browser_screenshot is documented as
LAST RESORT for visual verification only; browser_snapshot is the default
for understanding pages; browser_execute_js is the default for surgical
reads. browser_click and browser_open_urls guidance follows.

SKILL.md collapsed from ~342 to ~53 lines — keeping only what isn't already
in tool prompts: the decision tree, connection rules, browser_run_script
daemon bindings.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
amankumarsingh77 amankumarsingh7702@gmal.com
Wed, 06 May 2026 00:06:49 +0530
20ceaa1c
feat: tab ownership — isolate harness tabs from the user's browsing

Track which page targets this harness session opened so the agent can never
attach to, switch to, or close a tab the user opened themselves. New tabs
are spawned in a dedicated Chrome window (newWindow:true on first open,
openerId chaining after) so harness activity stays visually separate.

- new OwnershipRegistry (src/cdp/ownership.ts) tracks owned targetIds and
  the harness window seed; mutations notify a single listener that persists
  to BrowserState (ownedTargetIds, harnessWindowTargetId)
- attachFirstPage prefers an already-owned live target; otherwise opens a
  fresh harness-owned tab in its own window instead of grabbing whatever
  page the user is on
- session subscribes Target.setDiscoverTargets and reaps targetDestroyed
  events so the registry stays in sync with reality
- listTabs returns owned:boolean per tab and reconciles dead ids
- browser_list_tabs defaults to scope:"owned"; pass scope:"all" to inspect
  the user's other tabs (read-only — they cannot be switched to or closed)
- browser_switch_tab refuses non-owned tabs, with a clear remediation hint
- browser_new_tab opens inside the harness window via openerId, falling
  back to a fresh window when the seed has been closed
- new browser_close_tab tool — owned tabs only, supports unique hex prefix

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
amankumarsingh77 amankumarsingh7702@gmal.com
Tue, 05 May 2026 23:23:59 +0530
e42d9538
release: v0.3.2 — parallel tool execution, scroll fixes, TUI crash fix

- Add async mutex for auto-serialization of mutation tools
- Observation tools can run in parallel with mutations
- Fix scroll deltaY sign convention (positive=down per W3C)
- Add Page.bringToFront before scroll to prevent silent drops
- Fix screenshot TUI crash on long file paths (truncateToWidth)
amankumarsingh77 amankumarsingh7702@gmal.com
Tue, 05 May 2026 22:37:26 +0530
f73941cb
fix: prevent TUI crash when screenshot path overflows terminal width (#2)

The Image text-fallback render does not respect the rendered width,
so a long file path can blow past the terminal width and crash the
host TUI. Wrap the component to truncate each rendered line with
truncateToWidth so it fits the available width.

Co-authored-by: amankumarsingh77 <amankumarsingh7702@gmal.com>
Aman Kumar 145339995+amankumarsingh77@users.noreply.github.com
Tue, 05 May 2026 00:52:11 +0530
71da8e07
feat: parallel tool execution with automatic mutation serialization

- Add lightweight async mutex (src/util/mutex.ts) for FIFO serialization
- Add serialized?: boolean to BrowserToolDefinition
- Wire mutex acquisition into registerBrowserTool execute wrapper
- Expose mutationMutex() on BrowserClient
- Mark all mutation tools (click, type, scroll, navigate, switch_tab, etc.) as serialized
- Leave observation tools (screenshot, page_info, execute_js, http_get, etc.) unguarded
- Update prompt and skill docs to reflect parallel-safe behavior
- Fix scroll tool: add Page.bringToFront, explicit button:none/buttons:0/pointerType:mouse
- Update .gitignore to ignore scripts/ and data/ folders
amankumarsingh77 amankumarsingh7702@gmal.com
Mon, 04 May 2026 22:44:55 +0530
2a98be01
Revert "chore: add pre-parallel-execution latency baseline"

This reverts commit 361f4b31f7870f0a8bbd46793edc46c9967fdd69.
amankumarsingh77 amankumarsingh7702@gmal.com
Mon, 04 May 2026 21:18:34 +0530
361f4b31
chore: add pre-parallel-execution latency baseline
amankumarsingh77 amankumarsingh7702@gmal.com
Mon, 04 May 2026 21:17:21 +0530
7d70b2ba
docs: add speed-optimizations research; chore: improve browser detection in setup
amankumarsingh77 amankumarsingh7702@gmal.com
Mon, 04 May 2026 21:14:30 +0530
cb9a51eb
feat: render screenshots inline in TUI via Image component; add parallelization guidance to SKILL.md

- browser_screenshot now has renderResult that creates an Image component
  for inline display in Kitty/iTerm2/Ghostty/WezTerm terminals
- Falls back to dim text placeholder on terminals without image support
- Updated system prompt table description to mention TUI inline rendering
- Added Parallelization section to SKILL.md teaching the agent to batch
  independent operations (browser_open_urls, browser_http_get, etc.)
amankumarsingh77 amankumarsingh7702@gmal.com
Sun, 03 May 2026 00:43:43 +0530
ff485923
fix: replace @ts-expect-error with @ts-ignore for dynamic sharp import
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 22:15:41 +0530
167c50de
chore: update lock file for sharp optional dependency
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 22:01:18 +0530
a1df2d3e
release: v0.3.1 — audit fixes for list_tabs IDs, switch_tab prefix matching, download auto-mkdir, session recovery, docs updates

Bug fixes:
- list_tabs: show full 32-char targetIds (was truncated to 8 chars)
- switch_tab: prefix matching fallback for hex prefixes >= 8 chars
- download: auto-create directory with mkdir -p
- ensureAlive: Runtime.evaluate probe to recover from crashed page targets

Docs:
- dispatch_key: clarify DOM-only event behavior
- navigate: warn about Google anti-bot limitation
- network_log: update deprecated promptSnippet
- SKILL.md: document actual daemon API (evaluateJs, pageInfo, session.call)
- SKILL.md: add troubleshooting for sharp/maxDim and Google navigation
- sharp: add to optionalDependencies for screenshot maxDim auto-resize
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 21:59:30 +0530
c9d1605b
chore: address final-review minors — surface event-consumer crashes, document IIFE-wrap heuristic, log shutdown failures, fix CHANGELOG file-size claim

Five tweaks from the whole-implementation review:
- session.ts: log unexpected event-consumer rejections instead of silent swallow
- client.ts: comment the return-substring IIFE-wrap false-positive case
- transport.ts: comment that ws.onclose post-open settle is no-op-by-design
- index.ts: log client.stop() failures during shutdown
- CHANGELOG.md: correct largest-file claim (transport.ts and client.ts are ~220 each, not "client.ts at ~180")

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:53:34 +0530
500dd206
chore(release): v0.3.0 — internal rewrite
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:50:13 +0530
43b74f78
chore: final cleanup — drop unused keyCode export
amankumarsingh77 amankumarsingh7702@gmal.com
Sat, 02 May 2026 16:48:19 +0530
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