feat(plugins): the lab Chrome leaves the core for the lab-chrome plugin (plugin sockets, chrome.lab, full modal) #16
Closed
gabrielvidal
wants to merge 0 commits from
lab-chrome-plugin into main
pull from: lab-chrome-plugin
merge into: gabrielvidal:main
gabrielvidal:main
gabrielvidal:card-icon-beside-title
gabrielvidal:worktrees-cli
gabrielvidal:worktrees-plugin
gabrielvidal:agent-presets
gabrielvidal:no-plugin-white-flash
gabrielvidal:agy-tasks
gabrielvidal:home-declutter
gabrielvidal:perf-plugin-batching
gabrielvidal:fresh-context-plugin
gabrielvidal:remove-hooks-page
gabrielvidal:palette-plugins
gabrielvidal:linear-projects
gabrielvidal:agent-messaging
gabrielvidal:model-router
gabrielvidal:conv-card-layout
gabrielvidal:ask-more-options
gabrielvidal:agent-limits
gabrielvidal:generic-ui-strings
gabrielvidal:android-push-bridge
gabrielvidal:auto-translate
gabrielvidal:filter-chips
gabrielvidal:plugin-catalog
gabrielvidal:file-viewers
gabrielvidal:plugins-page-rework
gabrielvidal:hub-mcp-plugin
gabrielvidal:translation-plugin
gabrielvidal:scheduled-doors
gabrielvidal:cron-jobs-plugin
gabrielvidal:context-skills-plugin
gabrielvidal:files-plugins
gabrielvidal:worker-names
gabrielvidal:details-panel-perf
gabrielvidal:services-plugin-only
gabrielvidal:fix-test-env-leaks
gabrielvidal:bg-shells-plugin
gabrielvidal:feat-commits-plugins
gabrielvidal:fix-branch-line-tag-rows
gabrielvidal:retire-dead-leftovers
gabrielvidal:runner-into-harness-pi
gabrielvidal:retire-tool-proxy
gabrielvidal:new-project-policy-plugin-only
gabrielvidal:guest-jobs-sonnet
gabrielvidal:push-buttons-everywhere
gabrielvidal:mail-send-plugin
gabrielvidal:ui-polish-batch
gabrielvidal:command-palette-plugin
gabrielvidal:keyboard-shortcuts-plugin
gabrielvidal:prompt-shortcuts-plugin
gabrielvidal:matomo-site-grants
gabrielvidal:performance-plugin
gabrielvidal:whats-new-plugin
gabrielvidal:skills-agents-plugin
gabrielvidal:goals-plugin-only
gabrielvidal:storage-server-side
gabrielvidal:plugin-scheduled-conversations
gabrielvidal:plugin-fences
gabrielvidal:handoff-plugin
gabrielvidal:plugin-commands
gabrielvidal:plugin-speed
gabrielvidal:cleanup-provider-harness
gabrielvidal:plugin-conversation-labels
gabrielvidal:plugin-plan-usage
gabrielvidal:fix-worker-harness-sync
gabrielvidal:plugin-gcloud-reauth
gabrielvidal:feat/plugin-cards-in-thread
gabrielvidal:feat/plugin-proxy-wake
gabrielvidal:unify-subagents-children
gabrielvidal:wave3d-frontend-typed-plugins
gabrielvidal:wave3c-sidecar-strict-plugins
gabrielvidal:wave3a-catalog-accounts-profiles
gabrielvidal:wave3b-pricing-usage-cutover
gabrielvidal:wave1a-typed-plugins
gabrielvidal:wave1b-sidecar-runtime
gabrielvidal:fix-ios-overlay-scroll
gabrielvidal:batch2-work-resources-core
gabrielvidal:batch2-apikeys
gabrielvidal:plugin-blue-green-deploy
gabrielvidal:plugin-ship
gabrielvidal:plugin-project-env
gabrielvidal:plugin-memories
gabrielvidal:plugin-activity
gabrielvidal:plugin-templates
gabrielvidal:plugin-desk-phone
gabrielvidal:batch1-platform
gabrielvidal:plugins-list-view
gabrielvidal:dash-plugins
gabrielvidal:pets-plugin
gabrielvidal:ha-push-channel
gabrielvidal:mail-agents
gabrielvidal:graph-fix
gabrielvidal:graph-plugin
gabrielvidal:services-plugin
gabrielvidal:left-to-do-plugin
gabrielvidal:plugins-gallery
gabrielvidal:home-conv-menu
gabrielvidal:meta-business
gabrielvidal:agy-rdrand
gabrielvidal:bg-lag
gabrielvidal:conv-load-perf
gabrielvidal:askform-instant
gabrielvidal:fix/drawer-menu-done-chip
gabrielvidal:pi-midrun-compaction
gabrielvidal:interrupt-menu-btn
gabrielvidal:authz
gabrielvidal:inkling
gabrielvidal:repo-plugins
gabrielvidal:work-sync
gabrielvidal:leftovers
gabrielvidal:fix/agy-guest-guard
gabrielvidal:feat/model-presets
gabrielvidal:scroll-back
gabrielvidal:feedback-bell
gabrielvidal:feat/movies-tool
gabrielvidal:feat/running-thread-padding
gabrielvidal:feat/drawer-filter-button-card-chat
gabrielvidal:burn-rate
gabrielvidal:guest-install
gabrielvidal:guest-usage
gabrielvidal:guest-palette
gabrielvidal:guest-form-links
gabrielvidal:form-open-buttons
gabrielvidal:clarifier-lean
gabrielvidal:auto-archive
gabrielvidal:guests-profile
gabrielvidal:conv-motion
gabrielvidal:share-target
gabrielvidal:terminal-sync
gabrielvidal:work-context-past
gabrielvidal:work-context-brief
gabrielvidal:enroll-codes
gabrielvidal:open-image-file
gabrielvidal:worker-uploads
gabrielvidal:conv-drawer-search
gabrielvidal:stack-motion-v3
gabrielvidal:notif-stack-fixes
gabrielvidal:home-motion
gabrielvidal:i18n-fr
gabrielvidal:local-electricity-cost
gabrielvidal:cache-pill-thread
gabrielvidal:cache-scenarios
gabrielvidal:fresh-start
gabrielvidal:msg-select
gabrielvidal:shortcuts-setup
gabrielvidal:ui-0-40-3
gabrielvidal:outbox-landing
gabrielvidal:resume-scope
gabrielvidal:conv-filter-range
gabrielvidal:fix-subagent-form-session
gabrielvidal:ask-form-integration
gabrielvidal:form-visual-options
gabrielvidal:watcher-perf
gabrielvidal:last-msg-summary
gabrielvidal:secret-fields
gabrielvidal:commit-review
gabrielvidal:summary-mode-fixes
gabrielvidal:service-tag-parser
gabrielvidal:clarifier
gabrielvidal:fetch-diet-2
gabrielvidal:fetch-diet
gabrielvidal:conv-look
gabrielvidal:pwa-links
gabrielvidal:tool-widgets
gabrielvidal:worker-autoupdate
gabrielvidal:usage-rings
gabrielvidal:opencode-harness
gabrielvidal:notif-diet
gabrielvidal:conv-resources
gabrielvidal:scheduled-tasks
gabrielvidal:profiles
gabrielvidal:notify-exact-cost
gabrielvidal:usage-measuring
gabrielvidal:guest-projects
gabrielvidal:usage-calibration
gabrielvidal:account-switch
gabrielvidal:multiuser-improve
gabrielvidal:form-groups
gabrielvidal:multiuser
gabrielvidal:motion-reel
gabrielvidal:dashboards-fixes
gabrielvidal:split-big-files
gabrielvidal:held-regex
gabrielvidal:subagent-interrupts
gabrielvidal:form-html
gabrielvidal:tokunia-video
gabrielvidal:settings-uniform
gabrielvidal:worker-ask-fix
gabrielvidal:worker-generic-mac
gabrielvidal:runner-shortcuts
gabrielvidal:notify-unify
gabrielvidal:perf-list-cache
gabrielvidal:mac-worker
gabrielvidal:model-switch
gabrielvidal:pipeline-paths
gabrielvidal:multi-account
gabrielvidal:feature-flags
gabrielvidal:qwen38-support
gabrielvidal:url-prompt
gabrielvidal:running-pages
gabrielvidal:homelab-tag
gabrielvidal:root-project
gabrielvidal:or-models
gabrielvidal:deploying-loader
gabrielvidal:worktree-diff
gabrielvidal:conv-tags
gabrielvidal:tags-page
gabrielvidal:agents-page
gabrielvidal:icon-picker-shortcuts
gabrielvidal:conv-cta
gabrielvidal:stamp-refine
gabrielvidal:post-task-cache
gabrielvidal:post-tidy-completed
gabrielvidal:form-badge
gabrielvidal:hooks-delay-seconds
gabrielvidal:cost-dashboard
gabrielvidal:plan-forms
gabrielvidal:form-mobile
gabrielvidal:guidelines-dag
gabrielvidal:skills-view
gabrielvidal:navbar-hold
gabrielvidal:spawnbox-status
gabrielvidal:hold-editable-expand
gabrielvidal:drawer-transparent
gabrielvidal:hold-fix
gabrielvidal:hold-editable
gabrielvidal:charroll-bump
No Reviewers
Labels
No items
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
gabrielvidal (Gabriel Vidal)
Clear assignees
No Assignees
gabrielvidal
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gabrielvidal/ai-agent#16
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
The lab Chrome (Settings → Browser, the conversation's Browser dock with the noVNC live view and Take over, and the container's on-demand life) leaves the core for the
lab-chromelive plugin: gabrielvidal/ai-agent-plugins#8. The core keeps the Chrome chip (the harness capabilitychrome,meta.chrome) and gains three generic platform hooks the plugin is built on. This is move E of the "what could move into ai-agent-plugins" map (formai-agent-moves-to-ai-agent-plugins_o2qxmd). The hooks are:chrome.labprovider;app.modal.Key changes
sockets[]+aiAgentPlugin.openSocket(id, {protocols}):backend/plugins/sockets.py:WS /api/plugins/{pid}/sockets/{sid}bridges only to the upstream the plugin declared. It is owner only and refused on the guest host, using the gate's handshake rules, moved fromchrome/routes.pyasws_caller; on the owner's internet address the session is re-checked every 5 s. Declaring a socket needs operator approval and enters the fingerprint.GET /proxy/tools/plugins/{pid}/sockets/{sid}/probe→{up, open, lastActiveAt}, for the plugin's own handlers.business/plugins/frameSockets.ts. The host opens the real websocket with the reader's cookies and relays it over postMessage, binary as transferred ArrayBuffers, ≤ 4 sockets per frame, all closed with the frame. The frame side is a WebSocket-like channel in the bridge script, which noVNC'sRFBtakes as is.provides: {"chrome.lab": action}(backend/plugins/chrome_bridge.py):{op: "status"}returns{reachable, chipDefault, guests}, cached 10 s.runs/routes.py _guest_chromekeeps a guest's--chromeonly withguests. The composer reads its chip default from the same action (usePluginProvider+usePluginRead).{op: "ensure"}runs before a lab claude run launches with--chrome(runs/service.py, spawn and resume). It replaceslifecycle.ensure_upand never blocks a launch on a failure.ui.slots[].sizeonapp.modal(sm|md|lg|full):fullis near full screen, with the frame filling it (PluginModalHost).Conversation data: the
conversation.gizmosupdate addschromeandworker;hub/conversationsrows addchrome.Carry-over
carryover.chrome:/data/chrome.jsongoes to the plugin'slegacy-settings.jsonat once. It is merged into the owner's config at the plugin's install (_plugin_changed) or the next start; a key still at its field's default takes the old value. Then the file is renamed….migrated.Removed:
backend/chrome/,/api/chrome*andschemas/chrome.py(plus the generated types andopenapi.jsonentries);chromeevent and thelab.integrationspermission (catalog, matrix, roles mock);BrowserDock,BrowserSettings, the panel store, the header's Browser button and pane-menu item, and the eye popover's Browser switch (the plugin's slotvisreplaces it);@novnc/novnc(package, lockfile,novnc.d.ts, the vite chunk) and the Settings registry's Browser entry./settings/browserredirects to/settings/plugin/lab-chrome.ChromeToggle(the chip and badge) andsidecar/routes_chrome.pystay.Docs:
docs/plugins.mdhas a new section, "Websockets, the lab browser and a full modal";docs/settings.mdanddocs/security.md(G3) note the move.Key decisions
npx viteon the EVOX2 no longer dies on noVNC's top-level await.chrome.labis a provider, not a generic run hook.--chrome(the chip,meta.chrome), so "who runs the browser a lab--chromerun drives" is one narrow question with two ops.harnessHooks(SessionStart) didn't fit: they run inside the harness on every machine and can't hold a launch for the container.lab.integrationspermission is removed: Browser was its only route, and the authz test forbids a route permission with no route. Stored roles drop unknown ids on read.Changelog
/settings/browsertakes you there.Test notes
Not deployed from the EVOX2. Deploy and the plugin install go through the Homelab after review.
Homelab steps, in this order. The live hub's
validate_manifestrejects the plugin until this hub change is deployed: the top-levelsockets,provides.chrome.labandui.slots[].sizeare new.ai-agent-deploy(blue-green). At that start,carryover.chromecopies/data/chrome.json(chip default, guests, keep, idle minutes) into the plugin's sharedlegacy-settings.json; the plugin isn't installed yet, so the file stays in place.plugins/lab-chromeand approve it (operator approval: an internal proxy, a hub secret, a socket). Right after the install, the install route's_plugin_changedrunscarryover.chromeagain: the old settings merge into the owner's config, and/data/chrome.jsonis renamed….migrated.SIDECAR_TOKEN(the same one video-extract uses).Between steps 2 and 3, the Chrome chip still launches
--chrome, but nothing starts the lab Chrome, guests don't keep--chrome, and there is no live view. Do steps 2–4 back to back.Conflicts: sibling PRs (moves A–D, F and other sessions' plugin moves) touch
root.tsx,settings/registry.ts,CLAUDE.md,docs/plugins.md,plugins/carryover.pyandmain.py. Rebase in merge order.Backend: every module ran in its own process under bwrap (throwaway
/data): 155/157 pass.test_tool_proxy_media(test_the_quota_is_seerrs_…) andtest_typed_plugins(test_records_carry_kind) fail identically onmaine1b7b4ab. Newtest_plugin_sockets.py(14) covers:_guest_chrome, thechromerow and the carry-over.The ported
test_gateandtest_remote_accesssocket tests pass, as dotest_authzandtest_authz_matrix(golden updated).Frontend:
tsc --noEmitis clean. Full vitest: 1063/1066; the 3 failures (useShareTarget×2,FreshContextCacheExpiredNotice) fail onmaintoo. NewframeSockets.test.ts(4).npm run build:mockbuilds, with no noVNC indist.Live, on a local hub (port 8135):
RFB 003.008and refused an undeclared socket and a cross-site handshake (403).openSocket; Take over and a click on "Next" reached the server (its log:click 899,574) and the dot came back as an update;/settings/browserredirected to the plugin's page.{op: ensure}answered through the hub.Screenshots
Settings → Browser, the conversation's Browser dock (noVNC live view and take-over) and the container's on-demand life move into the lab-chrome live plugin (ai-agent-plugins). The core keeps the Chrome chip (the harness capability chrome) and gains three generic hooks: - sockets[] + aiAgentPlugin.openSocket(id): a frame's websocket, opened by the host with the reader's cookies and relayed over postMessage to WS /api/plugins/{pid}/sockets/{sid}, which bridges only to the declared upstream (owner only, the gate's handshake rules, never the guest host; operator approval). GET …/sockets/{sid}/probe → {up, open, lastActiveAt} for the plugin's handlers. - provides chrome.lab (plugins/chrome_bridge.py): {op: status} → the chip default and whether guests' runs keep --chrome; {op: ensure} before a lab --chrome run launches (spawn and resume). - ui.slots[].size on app.modal (full = near full screen, frame filling it); conversation.gizmos' update and hub/conversations rows carry chrome. Gone: backend/chrome/, /api/chrome*, schemas/chrome.py, the SSE chrome event, the lab.integrations permission, BrowserDock/BrowserSettings/store, the Browser header button and eye switch, @novnc/novnc. /settings/browser redirects to /settings/plugin/lab-chrome; carryover.chrome moves /data/chrome.json into the plugin's config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Merged into
mainas3e40144e(batch merge of the EVOX2 plugin moves on top of main0797e454, all ai-agent suites green) and deployed: ai-agent @7c397fbclive since 2026-11-27 00:57. lab-chrome installed, its sidecar token set.Pull request closed