Expand description
Shared Chrome DevTools Protocol browser runtime for Right Suite products.
BrowserSessionowns one Chrome process and any number of pages. Launch uses Chrome for Testing (chrome_for_testing_path); the system browser only withLaunchOptions::system_chromeorLaunchOptions::system_chrome_only. Shutdown and drop close gracefully (CDPBrowser.close/ SIGTERM to the process group, bounded waits, SIGKILL last).ProfileSpecselects a temporary, named persistent, or caller-owned directory profile.- Pointer and keyboard actions use real
Input.dispatch*Eventcommands, soevent.isTrusted,:hover, focus, and default actions behave as for a user. NetworkPolicyblocks loopback/link-local/private/reserved/file:targets (redirects, subresources, and every proxied connection included) before they reach the network; denials are typed (BrowserError::Blocked).AdmissionHookthen gates every effect before it happens.BrowserEventreports start/stop/crash/denied with session id, reason, and time.BrowserPage::set_request_interceptorlets the caller continue, rewrite, fulfil or fail every request after the network policy;BrowserPage::accessibility_tree,BrowserPage::exceptions,BrowserPage::set_page_scaleandBrowserPage::set_download_behaviorexpose the matching CDP domains.- Real-session mode (consent-gated):
default_browser,UserConsentReceipt,ProfileSpec::ImportedFromandBrowserSession::attach_user_browserreuse the user’s own sign-ins in a private copy, confined to the consented domains. SeeImportSpec. cookies::parse_netscapereads a Netscapecookies.txt(bounded; values redacted inDebugand errors) andBrowserPage::import_cookiessets the result in the profile. With featurecookie-export,CookieExportgoes the other way: it keeps the cookies of declared domains and publishes them as a private Netscape file through rightkit-fs; an empty or invalid export never replaces the previous file.BrowserPage::observereturns refs that are checked for staleness before use.design_modeholds the element-picker primitives: an isolated-world binding bridge, a one-shot native-gesture submit gate, device-pixel capture geometry and the picker script builder.
Re-exports§
pub use cookies::parse_netscape;pub use cookies::CookieFieldError;pub use cookies::CookieParseError;pub use cookies::NetscapeCookie;pub use cookies::MAX_COOKIES;pub use cookies::MAX_COOKIES_FILE_BYTES;
Modules§
- cookies
- Netscape
cookies.txtparsing and the CDP mapping that imports the cookies into the current browser profile (BrowserPage::import_cookies). - design_
mode - Design-mode element-picker primitives: a trusted binding bridge with one-shot submit authentication, device-pixel capture geometry, and the picker script builder.
Structs§
- Admission
Request - One typed request to perform an effect. Typed text is never included, only its length, so admission logs stay content-free.
- AxNode
- One node of
Accessibility.getFullAXTree. - AxSummary
- One non-ignored node of an accessibility tree that has a role, as carried by an observation.
- Blocked
Request - Copy of the old string-only blocked record, kept per page.
- Browser
Event - One structured, content-free lifecycle event for the caller’s journal. Never carries typed text, page content, or full URLs.
- Browser
Page - Browser
Request - One network request about to leave the browser, as seen by the allow callback.
- Browser
Session - One Chrome process with any number of pages.
- Consent
Revocation - Live revocation switch shared with a running session. Calling
Self::revokemakes the session’s next action fail, without waiting for the app to persist the receipt. - Console
Line - Continue
Overrides - Overrides for a continued request. Anything left
Noneis unchanged. - Exception
Frame - One frame of an exception’s stack.
- Fixture
Attestation - Fixture
Bundle - Fixture
Cancellation - Sticky, cloneable cancellation signal for a fixture run.
- Fixture
Cleanup Evidence - Fixture
File - Fixture
Intent - Fixture
Outcome - Fixture
RunFailure - Fixture
Server - An exclusively owned server for one verified, immutable fixture bundle.
- Fixture
Session - Opaque execution authority for one immutable source bundle and one closed action list.
- Import
Report - Result of one import. Per-domain cookie counts need the cookie database opened, which this
module does not do, so
domain_countsisNone. - Import
Spec - Consent-gated copy of a browser profile’s sign-ins into a named RightKit profile (see
crate::ProfileSpec::ImportedFrom). - Intercepted
Request - One
Fetch.requestPausedevent, decoded. - Launch
Options - Managed
Root - The RightKit-managed Chrome for Testing folder and its fixed layout: one
currentinstall, onecurrent.previousrollback copy, andcurrent.stagingwhile an install runs. No per-version folders and no new id: every app resolves the same path. - Network
Policy - Typed SSRF/host policy. See the module docs for defaults.
- Observation
- Observed
Node - Page
Exception - One
Runtime.exceptionThrownevent: an uncaught exception or unhandled rejection. - Page
Setup - What to install on a page before its first navigation; see
BrowserSession::new_page_with. - Pinned
Connection - One connection the proxy made, with the address it pinned.
- Policy
Denial - Typed network-policy denial returned as
crate::BrowserError::Blocked. - Rect
- Screenshot
Options - Screenshot options for
BrowserPage::screenshot_with. - Source
Profile - One profile of a Chromium-family browser.
- User
Consent Receipt - What the user agreed to: which browser, which profile, which domains. The app persists it
(it is
Serialize/Deserialize), shows it, and revokes it. A revoked or expired receipt refuses every later import, attach and action.
Enums§
- Action
Kind - Address
Class - Address class of a destination. Everything except
Publicis blocked by default. - Block
Reason - Why the network policy refused a request.
- Browser
Error - Browser
Kind - A concrete browser product.
- Browser
Source - Which browser an import reads from.
- Decision
- Download
Behavior - What the page does with a download.
- Fixture
Action - Fixture
Confinement Backend - Fixture
Error - Fixture
Key - Fixture
Outcome Status - Intercept
Decision - The answer to one paused request.
- Intercept
Failure - Why a request is failed; maps to the CDP
Network.ErrorReasonthe page sees. - Intercept
Stage - Which stage a paused request is at.
- Lifecycle
Kind - Policy
Decision - Answer of the per-request allow callback.
- Profile
Spec - Where the browser keeps cookies, storage, and logins.
- Target
- What an action addresses.
Constants§
- CHROME_
FOR_ TESTING_ ENV - Environment variable naming an explicit Chrome for Testing executable.
- CHROME_
FOR_ TESTING_ INSTALL_ HINT - How to get Chrome for Testing; part of
BrowserError::ChromeForTestingNotFound. - CHROME_
FOR_ TESTING_ ROOT_ ENV - Override the RightKit-managed Chrome for Testing root (the folder that holds
current). - CONSENT_
SCHEMA - Schema version of
UserConsentReceipt. - FIXTURE_
SCHEMA - MAX_
EXCEPTIONS - Structured exceptions kept per page (oldest dropped first).
- OBSERVE_
AX_ DEPTH - Depth bound for the accessibility summary in an
Observation.
Functions§
- actions_
digest - browser_
executable - The installed browser executable for a Chromium-family kind.
- chrome_
for_ testing_ candidates - Known Chrome for Testing install locations, in resolution order: the RightKit-managed
current(thencurrent.previous, then legacy per-version folders;RIGHTKIT_CHROME_FOR_TESTING_ROOToverrides the root), app installs, then Puppeteer’s cache (PUPPETEER_CACHE_DIR), then Playwright’s (PLAYWRIGHT_BROWSERS_PATH), newest version first within each cache. - chrome_
for_ testing_ path - Resolve Chrome for Testing:
explicit, thenRIGHTKIT_CHROME_FOR_TESTING, thenchrome_for_testing_candidates. Errors with install instructions; never returns regular Chrome. - classify_
ip - default_
browser - The user’s default web browser on Windows, macOS and Linux, or
BrowserKind::Unknownwhen it cannot be determined. - find_
chrome - System Chrome, Chromium, then Edge.
CHROMEenv overrides. Launch uses this only withLaunchOptions::system_chromeorLaunchOptions::system_chrome_only; preferchrome_for_testing_pathfor isolated automation. - list_
profiles - Profiles of an installed Chromium-family browser, for the consent screen.
- purge_
imported_ profile - Delete an imported RightKit profile (revoking consent should call this). Refuses a directory RightKit did not import into, and a profile a live session holds.
- user_
data_ dir - The browser’s own user-data directory (read only by this module), when it exists.
Type Aliases§
- Admission
Hook - Allow
Callback - Event
Sink - Network
Request - Former name, kept for existing callers.
- Request
Interceptor - Caller-supplied hook, consulted for every request the page makes (redirect hops included).
- Resolver
- Result