feat(agentic-os): add unified ControlHub, Playbook system, and CDP browser control#419
Merged
GCWing merged 9 commits intoGCWing:mainfrom Apr 16, 2026
Merged
Conversation
added 9 commits
April 14, 2026 13:26
…owser control
Introduce the Agentic OS unified control architecture with three major components:
1. **ControlHub tool** — single entry point for all control operations, routing
by domain (desktop, browser, app, terminal, system) to the appropriate
backend. Reuses existing ComputerUse, SelfControl, and TerminalControl tools
while adding new browser CDP and system-level capabilities. Cross-platform
open_app support (macOS/Windows/Linux).
2. **Playbook tool** — predefined YAML-based operation playbooks for common
tasks (browser screenshot, data extraction, form fill, desktop automation,
model setup). Features template variable substitution with type preservation
(numbers/booleans stay native), conditional step filtering (`X is Y`,
`X is not Y`, `X is provided`), and output variable annotations.
3. **CDP browser control** — connect to and control the user's default browser
(Chrome, Edge, etc.) via Chrome DevTools Protocol, preserving login sessions,
cookies, and extensions. Includes:
- CdpClient: WebSocket-based CDP command transport
- BrowserLauncher: cross-platform browser detection and CDP-enabled launch
- BrowserActions: high-level atomic actions (navigate, click, fill, snapshot,
screenshot, evaluate JS, etc.)
- Desktop API: Tauri commands for status/launch/create-launcher
4. **Frontend UI** — SessionConfig adds browser control section with CDP status
display, connect button, and create-launcher button (macOS). All toast
messages use i18n (en-US + zh-CN).
Existing tools (ComputerUse, SelfControl, TerminalControl) are retained for
backward compatibility while ControlHub provides the unified interface.
- Split BrowserKind::Arc from Unknown(name) pattern match to avoid E0408/E0381 on Windows and Linux cfg blocks - Add `let _ = script` in non-macOS applescript branch to suppress unused variable warning - Add cross-platform `shell` script_type for run_script action - Allow unused log::debug import (used only in macOS-gated code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Transform BitFun from an AI IDE into an Agentic OS by introducing a unified control architecture:
desktop,browser,app,terminal,system) to existing backends (ComputerUse, SelfControl, TerminalControl) and new capabilities. Existing tools are retained for backward compatibility.CdpClient(WebSocket transport),BrowserLauncher(cross-platform detection + CDP-enabled launch),BrowserActions(navigate, click, fill, snapshot, screenshot, evaluate JS, etc.), and Tauri desktop API commands.Key Design Decisions
ComputerUse,SelfControl, andTerminalControltools remain registered;ControlHubis an additive unified layer.{{var}}substitution preserves native JSON types (numbers, booleans) instead of always producing strings."X is Y","X is not Y","X is provided"conditions for conditional execution.system.open_appworks on macOS (open -a), Windows (cmd /C start), and Linux (xdg-open).Files Changed
browser_control/(4 files)control_hub_tool.rsplaybook_tool.rs+builtin_playbooks/(5 YAML)registry.rs,mod.rsbrowser_control_api.rs,lib.rsSessionConfig.tsxsession-config.json(en-US, zh-CN)Test Plan
cargo checkpasses with zero errors and warningsnpx tsc --noEmitpasses for web-uiControlHub { domain: "browser", action: "connect" }→navigate→snapshotflowPlaybook { action: "run", name: "browser_screenshot", params: { url: "https://example.com" } }ControlHub { domain: "system", action: "open_app", app_name: "Calculator" }