← Back to PRs

#19953: Add SoundChain extension + Agent Eye browser bug catcher

by soundchainio open 2026-02-18 10:25 View on GitHub →
size: XL
## Summary - **SoundChain extension** (`extensions/soundchain/`) — 13 tools wrapping the SoundChain music platform API (search, play, trending, discover, leaderboard) + War Room fleet management + Phil Jackson Triangle diagnostic pipeline (7-model Ollama chain for automated bug diagnosis) - **Agent Eye extension** (`extensions/agent-eye/`) — Passive browser bug catcher. Content script captures user actions (clicks, scrolls, inputs, navigation) and auto-captures errors (JS errors, unhandled rejections, console.error, failed network requests) with full action timelines. 3-layer architecture: content script → Chrome background.js relay → OpenClaw HTTP route → in-memory BugStore. Exposes `agent_eye_bugs`, `agent_eye_status`, `agent_eye_clear` tools + `/eye` command - **Chrome extension updates** — Added `scripting` permission, `<all_urls>` host permission, and Agent Eye background logic (programmatic content script injection, typed enum state management) - **Zero booleans in Agent Eye** — All state uses typed string enums (`EYE_MODE`, `BUG_SEVERITY`, `TRIGGER_KIND`, `ACTION_KIND`, `REPORT_VERDICT`) with explicit `===` equality checks. No truthy/falsy patterns ## Test plan - [ ] `pnpm install` discovers both new workspace packages - [ ] `tsc --noEmit` compiles clean (verified locally) - [ ] Load updated Chrome extension in `chrome://extensions` - [ ] Visit any page, trigger `console.error('test')` in devtools - [ ] `/eye watch` activates capture, `/eye bugs` shows captured bug with action timeline - [ ] `agent_eye_bugs` tool returns bugs to LLM for diagnosis - [ ] `grep -r 'true\|false' extensions/agent-eye/` returns only framework API params (no state booleans) 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- greptile_comment --> <h3>Greptile Summary</h3> Adds two new extensions: **SoundChain** (music platform API + War Room fleet management + Phil Jackson Triangle diagnostic pipeline) and **Agent Eye** (passive browser bug catcher with Chrome content script injection). Also updates the Chrome extension manifest with `scripting` permission and `<all_urls>` host permission. - **Critical**: Agent Eye's `ctx.sandboxed` check in `extensions/agent-eye/index.ts:397` is inverted — tools are enabled only when `sandboxed === undefined` and disabled when `sandboxed === false`, which is opposite to every other extension in the repo. The tools will not be available in the normal non-sandboxed context. - **Critical**: Content script re-injection on `tabs.onUpdated` (`background.js:549`) stacks duplicate event listeners and monkey-patches (`console.error`, `window.fetch`, `window.onerror`) with each navigation, causing duplicate bug reports and compounding wrapper chains. - Both extensions use `Type.Union([Type.Literal(...)])` for tool parameter schemas, which compiles to `anyOf` — the repo explicitly provides `stringEnum`/`optionalStringEnum` helpers to avoid this pattern, as some providers reject `anyOf` schemas. - The `request()` and `fetchJson()` helpers in `extensions/soundchain/src/api.ts` and `extensions/soundchain/src/warroom.ts` do not check `res.ok` before calling `res.json()`, which will throw on non-JSON error responses. - `<all_urls>` host permission in the Chrome manifest is a significant scope increase from the previous localhost-only permissions. <h3>Confidence Score: 2/5</h3> - Two logic bugs (inverted sandboxed check, content script re-injection stacking) need to be fixed before merging. - Score of 2 reflects two confirmed logic bugs that would cause runtime misbehavior: (1) Agent Eye tools will not register in the normal non-sandboxed context due to an inverted condition, and (2) content script re-injection on navigation will cause duplicate event listeners and compounding monkey-patches. Additionally, Type.Union usage violates documented repo conventions. - `extensions/agent-eye/index.ts` (inverted sandboxed check), `assets/chrome-extension/background.js` and `assets/chrome-extension/content-script.js` (re-injection stacking bug) <sub>Last reviewed commit: ff525cb</sub> <!-- greptile_other_comments_section --> <sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) <!-- /greptile_comment -->

Most Similar PRs