Skip to main content

Crate nexo_plugin_browser

Crate nexo_plugin_browser 

Source
Expand description

Browser plugin library: the CDP client, Chrome launcher, and tool dispatch logic.

main.rs is the subprocess entrypoint that wraps a BrowserPlugin in the nexo-microapp-sdk PluginAdapter and routes incoming tool.invoke requests through BrowserPlugin::execute.

Re-exports§

pub use chrome::ChromeLauncher;
pub use chrome::RunningChrome;
pub use command::BrowserCmd;
pub use command::BrowserResult;
pub use config::BrowserConfig;
pub use config::BrowserConfigFile;
pub use config::BrowserPluginConfigFile;
pub use config::BrowserPluginShape;
pub use configured_state::configured_state;
pub use plugin::BrowserPlugin;
pub use profile::sanitize_agent_id;Deprecated
pub use profile::profile_color_argb;
pub use profile::sanitize_id;
pub use profile::user_data_dir_for;
pub use profile::IdError;
pub use profile::ProfileIdError;
pub use tool_defs::browser_tool_defs;
pub use nexo_cdp as cdp;

Modules§

admin
Step 7 of browser-multi-instance — admin RPC handlers.
auto_discovery
Step 7 of browser-multi-instance — auto-discovery broker request handlers.
boot
Step 6 of browser-multi-instance — boot-loop for the plugin.configure JSON-RPC payload.
chrome
command
config
Phase 93.4.e — plugin-owned config types.
configured_state
Operator config slice delivered via plugin.configure JSON-RPC.
dispatch
Subprocess-side tool dispatcher.
env_config
Build a nexo_config::BrowserConfig from environment variables. The daemon translates its cfg.plugins.browser YAML into env vars before spawning the subprocess; this module is the child-side reader.
instance_registry
Operator-declared instance registry. Step 3 of browser-multi-instance.
metrics
Step 9 of browser-multi-instance — per-instance Prometheus metrics.
plugin
Subprocess-side BrowserPlugin: launches Chrome, attaches a CDP session, dispatches BrowserCmd → BrowserResult.
profile
Filesystem-safe agent_id sanitiser + per-agent profile dir resolver + deterministic ARGB color derivation for Chrome profile decoration.
profile_decoration
Chrome profile decoration — writes ${user_data_dir}/Default/Preferences JSON so the Chrome window’s profile chip displays the agent’s name + a stable per-agent color.
profile_limits
Env-controlled limits for the per-agent profile DashMap.
tool_defs
Static ToolDef catalogue advertised in the initialize reply.

Structs§

CdpClient
CdpSession