feat(connect): per-session Chrome tab groups on the shared real browser
Shared browser, separate tab groups: when an agent drives the user's real Chrome via ab-connect, every tab it opens lands in a Chrome tab group named after its --session (stable color per name). Each agent's tabs stay visually separated from other agents' and from the user's own (ungrouped) tabs. Visibility is NOT restricted — all agents still see all tabs (per design). - CreateTargetParams gains an optional non-CDP `agentGroup` hint (skip-if-none), so a strict real-Chrome endpoint never receives it - BrowserManager.agent_group(): Some(session) only when ws_url == the live ab-connect relay URL (never on launched/direct CDP); DAEMON_SESSION set at daemon start supplies the name; emitted at all createTarget sites (transient storage target stays None) - ab-connect: +tabGroups permission; Target.createTarget reads agentGroup and groups the new tab (create/reuse by title, deterministic color), best-effort - extension 0.3.0 -> 0.4.0; re-signed crx + zip (id unchanged) Needs the v0.4.0 extension reloaded + a build with this change to take effect.
This commit is contained in:
@@ -17,6 +17,10 @@ use super::state;
|
||||
use super::stream::StreamServer;
|
||||
|
||||
pub async fn run_daemon(session: &str) {
|
||||
// Record this daemon's session so tabs it opens on the shared real Chrome
|
||||
// (via the ab-connect extension) land in a per-session Chrome tab group.
|
||||
let _ = super::browser::DAEMON_SESSION.set(session.to_string());
|
||||
|
||||
let socket_dir = get_daemon_socket_dir();
|
||||
if !socket_dir.exists() {
|
||||
let _ = fs::create_dir_all(&socket_dir);
|
||||
|
||||
Reference in New Issue
Block a user