From e42d9538ad5dafd4e11cf8f5a3912ebf0763d770 Mon Sep 17 00:00:00 2001 From: amankumarsingh77 Date: Tue, 5 May 2026 22:37:26 +0530 Subject: release: v0.3.2 — parallel tool execution, scroll fixes, TUI crash fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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) --- .pi/settings.json | 4 ++++ CHANGELOG.md | 14 ++++++++++++++ package.json | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .pi/settings.json diff --git a/.pi/settings.json b/.pi/settings.json new file mode 100644 index 0000000..59c7b93 --- /dev/null +++ b/.pi/settings.json @@ -0,0 +1,4 @@ +{ + "extensions": ["../src/index.ts"], + "skills": ["../skills"] +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 10c4571..9c10b3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,20 @@ All notable changes to pi-browser-harness will be documented in this file. +## 0.3.2 — 2026-05-05 + +### Added + +- **Parallel tool execution with automatic mutation serialization.** Observation tools (`browser_screenshot`, `browser_page_info`, `browser_execute_js`, `browser_list_tabs`, `browser_http_get` etc.) can now run in parallel with each other and with mutation tools. Mutation tools (`browser_click`, `browser_type`, `browser_scroll`, `browser_navigate`, `browser_switch_tab`, etc.) are automatically serialized through a shared async mutex so they never race on shared CDP session/page state. LLMs can emit independent operations in the same turn for better latency. +- **New `src/util/mutex.ts`** — lightweight async mutex (~25 LOC) with FIFO queue. `serialized?: boolean` flag added to `BrowserToolDefinition`; `mutationMutex()` exposed on `BrowserClient`. +- **Prompt and SKILL.md** updated with parallel-execution guidance and safe-parallel-call examples. + +### Fixed + +- **Scroll tool deltaY sign convention corrected.** Previously `deltaY` was documented as positive=up (inverted vs W3C wheel events). Now follows the W3C convention: positive=down, negative=up. Default changed from `-300` to `300` (scroll down). Prompt snippets, tool descriptions, and guidelines all updated. +- **Scroll tool now calls `Page.bringToFront`** before dispatching mouse events, preventing silent-drop when the target page is not the active browser tab. Mouse events now include explicit `button:"none"`, `buttons:0`, `pointerType:"mouse"`. +- **Screenshot TUI render no longer crashes the host on long file paths.** The `Image` text-fallback render did not respect terminal width, so a long path could overflow and crash the host TUI. Each rendered line is now truncated with `truncateToWidth` to fit the available width. + ## 0.3.1 — 2026-05-02 ### Bug fixes diff --git a/package.json b/package.json index 1b19280..761a56e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pi-browser-harness", - "version": "0.3.1", + "version": "0.3.2", "description": "Browser control extension for pi — navigate, click, type, screenshot, and extract data from real Chrome via CDP", "keywords": [ "pi-package", -- cgit v1.2.3