Release 0.21.3 — concurrent per-agent tab groups#126
Conversation
Multiple AI agents can now share one browser context without touching each other's tabs. Each agent scopes itself with --group <label> (or INTERCEPTOR_GROUP env): its tabs live in a named, colored tab group rendered as "<brand>-<label>", every command resolves strictly within that group, and cross-group targets are rejected. Extension: - Named-group registry (label -> groupId) in chrome.storage.session, lifetime-matched to Chrome's session-scoped group ids - Per-label serialized group creation (concurrent opens join one group instead of minting duplicates) - Per-group auto-target keys (activeTabId:<label>); grouped resolution never falls back to the browser-active tab; the ownership gate runs before the auto-target persists, and stored targets are validated for group membership (self-healing) - group_list / group_close actions; group_close is one atomic tabs.remove over exactly that group's tab ids - tabGroups.onRemoved purges registry + auto-target when a group is closed by hand; brand retitles propagate to named groups - Monitor: child tabs inherit their opener's group; auto-attach accepts any managed group - Graceful degradation where tabGroups is unavailable (MV2 bridge, Firefox) CLI: - Global --group / --group-color flags + INTERCEPTOR_GROUP fallback, injected at the transport choke point so every command path is scoped - New `interceptor group list|close <label>` command; help text Tests: 19 new unit + source-assertion tests (label grammar, title/color determinism, creation serialization, no-active-tab-fallback, atomic close, action registration). Verified live: 100 tabs / 10 groups / 3 browser contexts opened, scrolled, and torn down fully concurrently. Closes #124 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (22)
📝 WalkthroughWalkthroughThis PR introduces concurrent, named per-agent tab groups within a single browser context. CLI adds ChangesNamed per-agent tab groups
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Agent
participant CLI as CLI (cli/index.ts)
participant Transport as cli/transport.ts
participant Dispatch as message-dispatch.ts
participant TabGroup as tab-group.ts
participant Tabs as chrome.tabs/tabGroups
Agent->>CLI: interceptor open url --group ai134
CLI->>Transport: setGlobalGroup, sendCommand(action)
Transport->>Dispatch: action with group=ai134
Dispatch->>TabGroup: ensureNamedGroup(ai134)
TabGroup->>Tabs: create/query group, persist registry
Tabs-->>TabGroup: groupId
Dispatch->>Tabs: resolve/create tab within group
Dispatch->>Dispatch: setActiveTabId(tabId, ai134)
Dispatch-->>Agent: result with tabId, group
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Prepares Interceptor
0.21.3and closes #124: concurrent per-agent tab groups. Multiple AI agents can drive the same browser context at the same time, each penned into its own named, colored tab group — no cross-agent tab grabs, no shared-target clobbering, atomic per-job cleanup.What Changed
Named per-agent groups (extension)
label → groupIdinchrome.storage.session, lifetime-matched to Chrome's session-scoped group ids; exact-title rediscovery (never pattern-matchedquery({title})).activeTabId:<label>). Grouped resolution never falls back to the browser-active tab; the ownership gate runs before the auto-target persists, and stored targets are membership-validated (self-healing).group_list/group_closeactions — close is one atomictabs.removeover exactly that group's ids; atabGroups.onRemovedlistener keeps the registry honest when a human closes a group by hand.interceptor brand tab-group) propagate to named groups (<brand>-<label>).tabGroupsis unavailable (MV2 Electron bridge, Firefox).CLI
--group <label>/--group-color <color>flags withINTERCEPTOR_GROUPenv fallback (flag wins), injected at the transport choke point so simple, compound, and looping paths are all scoped.interceptor group list/interceptor group close <label>.Docs
ARCHITECTURE.mdnamed-groups section;interceptor-browseragent skill updated with multi-agent scoping guidance.Testing
--reuse, staggered teardown.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes