Skip to main content

Module browser

Module browser 

Source
Expand description

Chrome one-shot session: launch, actions, reap. One-shot browser session: launch-only + actions + reap (PR3–PR6).

PROHIBITED on this path: ensure_daemon, connect_cdp, multi-process session. Refs live only inside this process; multi-step scripts share one session via run.

Method-level docs are expanded over time; clap and skill surfaces document agent usage.

§Workload

Mista (I/O + light CPU):

  • CDP navigation / input / snapshot is I/O-bound (Tokio multi-thread).
  • Multi-ref snapshot/grab resolve via crate::concurrency::join_bounded.
  • Multi-target attach at launch uses join_bounded_ordered.
  • Heavy disk (PDF, heap, perf, screencast frames, eval dumps) uses crate::concurrency::write_bytes_blocking / spawn_blocking so workers are not pinned (docsrs spawn_blocking; rules: never std::fs on async path).
  • Single interactive acts (goto, press, type, …) stay sequential (DOM focus / product law one Page). Browser multi-URL batch is sequential by design (N-129); use --engine http for URL fan-out.

Structs§

CaptureOpts
Capture toggles for process-local console/network buffers.
OneShotSession
Headless Chrome session owned by a single CLI invocation (or one run script).

Enums§

ShutdownTrigger
Which OS event triggered cooperative shutdown (for logs / tests).

Functions§

block_on_browser
Block on tokio multi-thread runtime for one-shot browser work.
block_on_browser_timeout
Like block_on_browser, but abort with ErrorKind::Timeout when timeout_secs > 0.
run_goto
run_goto_capture
run_goto_with_options
One-shot goto with tool-ref navigation options (init script, beforeunload, timeout).
run_goto_with_robots
run_keys
run_press
run_scrape
run_type
run_view
run_with_session
run_write
shutdown_signal
Central OS shutdown detector (rules: single shutdown_signal entrypoint).
tree_to_at_refs
Rewrite native [ref=eN] markers to agent-facing [@eN].