From 5951b3fb04aaf53b875afe265a57a944d6fce641 Mon Sep 17 00:00:00 2001 From: Tianren Dong Date: Wed, 13 May 2026 07:20:35 -0400 Subject: pi-chrome: remove obsolete REBUILD-NOTES.md Internal scratch notes from an earlier rebuild; no external references. docs/, CHANGELOG.md, CONTRIBUTING.md, and README.md cover the same ground for the current shape of the package. --- REBUILD-NOTES.md | 185 ------------------------------------------------------- 1 file changed, 185 deletions(-) delete mode 100644 REBUILD-NOTES.md diff --git a/REBUILD-NOTES.md b/REBUILD-NOTES.md deleted file mode 100644 index 7e49d9f..0000000 --- a/REBUILD-NOTES.md +++ /dev/null @@ -1,185 +0,0 @@ -# pi-chrome 0.7.0 → 0.8.0 rebuild - -Scoped to Tier 1 (bugs + diagnostics), Tier 2 (surface gaps), Tier 5.1 (version -drift), and Tier 6 (primer) from the design plan. Tier 3 (CDP backend), Tier 4 -(multi-session reliability), and Tier 5.2/5.3 (auto-reload + Web Store) are -deferred. - -## What changed - -### T1.1 — `chrome_evaluate` returning `null` (root cause fixed) - -`page.evaluate` no longer goes through the `executeInTab` helper-source -re-eval pipeline. A dedicated `evaluateInTab` path compiles the expression via -`new Function(...)` directly in MAIN world, with a syntax-error fallback that -re-compiles in statement-mode so multi-statement bodies still work. Special -return values (`undefined`, errors, symbols, bigints, functions) are surfaced -via a tagged envelope so the Node side can return them faithfully. - -Verified live: -- `chrome_evaluate("1+1")` → `2` -- `chrome_evaluate("Promise.resolve(99)")` → `99` -- `chrome_evaluate("(()=>{throw new Error('x')})()")` → throws `Error: x` -- `chrome_evaluate("document.body.innerHTML = '<...>'; return 'ok'")` → `"ok"` - -### T1.2 — Truthful click/type/fill results - -Every action handler now returns `isTrusted: false`, -`defaultPrevented`, `elementVisible`, `occludedBy`, `valueMatches`, and -`pageMutated`. The Node side formats those into the tool result text so the -agent can read failure cause from a single response. - -Verified live: -- `chrome_click(occluded-button)` → `"Clicked el-3 — pageMutated=false; occluded by "` -- `chrome_click(working-button)` → `"Clicked el-1"` (silent on success) - -### T1.3 — `/chrome-doctor` extended - -The command now probes: -- Local bridge mode + URL -- Companion extension version (with mismatch warning vs `PI_CHROME_VERSION`) -- `chrome_evaluate("1+1") === 2` in the active tab -- MAIN-world helper injection via `page.probe`, including `navigator.webdriver` fingerprint -- CDP availability at `127.0.0.1:9222` (informational; not used yet) - -### T1.4 — Misleading params removed/implemented - -- Dropped `chrome_evaluate.returnByValue` (was ignored). -- Implemented `chrome_screenshot.fullPage` via tile stitching (see T2.2). - -### T1.5 — Autoplay-gate heuristic - -`clickPage` checks whether the clicked element's label looks media-related -(`/^(play|start|begin|next|continue|unmute)/`) AND the page has paused -`