-
Notifications
You must be signed in to change notification settings - Fork 4k
feat(flows): browser companion core wiring — Chrome automation via slug:"browser" (Part 1) #5250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
66654f1
feat(flows): browser companion core wiring — Chrome automation via sl…
graycyrus 440456c
fix(browser-companion): address review — listener/state sync, active-…
graycyrus 1941695
fix(browser-companion): gate all public accessors on listener liveness
graycyrus 4350b22
Merge remote-tracking branch 'upstream/main' into feat/browser-companion
graycyrus e3c9366
chore(browser-companion): avoid literal cfg attribute in a comment tr…
graycyrus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| //! Browser Companion: owns the lifecycle + pairing of the TinyFlows | ||
| //! `CompanionServer` — a loopback WebSocket relay the Chrome extension | ||
| //! connects to so native workflow runs can drive/observe the user's browser. | ||
| //! | ||
| //! **Increment 1 scope** (this module): server lifecycle (start/stop), | ||
| //! pairing (pair/unpair/rotate secret), and status reporting. | ||
| //! | ||
| //! **Increment 2** added [`bind_run`]/[`unbind_run`] (Stage C3 — flows | ||
| //! wiring): `src/openhuman/flows/ops.rs` calls these around a real | ||
| //! `flows_run`/`flows_run_detached` execution whose graph has a | ||
| //! `tool_call { slug: "browser" }` node, binding the run's `thread_id` to the | ||
| //! caller-selected shared tab so its `slug:"browser"` calls (routed through | ||
| //! [`browser_relay`] wrapped in `tinyflows::browser::RoutingToolInvoker`) are | ||
| //! authorized. No RPC controllers (`browser_companion.*`) yet — that still | ||
| //! lands in a later stage. | ||
| //! | ||
| //! Entirely gated behind the existing `flows` Cargo feature — this domain | ||
| //! rides the same `tinyflows` dependency as `openhuman::flows` / | ||
| //! `openhuman::tinyflows`, adds no new feature, and is compiled out | ||
| //! wholesale (leaf-gate style, see `AGENTS.md`'s `flows` gate section) when | ||
| //! `flows` is off. The one exception is [`crate::openhuman::config::schema::BrowserCompanionConfig`] | ||
| //! (`src/openhuman/config/schema/browser_companion.rs`), which stays | ||
| //! ungated as inert config data — matching the `MeetConfig` precedent. | ||
| //! | ||
| //! Spawned at boot by `core::runtime::services::spawn_companion_relay_service`, | ||
| //! selected by `ServiceSet::companion_relay`. | ||
|
|
||
| mod ops; | ||
| mod store; | ||
| mod types; | ||
|
|
||
| pub use ops::{ | ||
| bind_run, browser_relay, companion_status, is_extension_connected, pair, rotate_secret, | ||
| start_companion_server, stop_companion_server, unbind_run, unpair, | ||
| }; | ||
| pub use types::{BrowserCompanionStatus, PairingInfo, SharedTabView}; | ||
|
|
||
| pub(crate) const LOG_PREFIX: &str = "[browser_companion]"; |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.