infrastructure tier

infrastructure-gemini-cdp

Gemini adapter via Chrome DevTools Protocol: the composer is found by an ordered, ratified candidate list and a miss is a typed refusal naming what was tried; prompts go in as trusted input (Input.insertText, Input.dispatchMouseEvent), never Runtime.enable. B-086 step 2.

Gemini adapter via Chrome DevTools Protocol: the composer is found by an ordered, ratified candidate list and a miss is a typed refusal naming what was tried; prompts go in as trusted input (Input.insertText, Input.dispatchMouseEvent), never Runtime.enable. B-086 step 2.

Tierinfrastructure
Roleadapter
Pathcrates/infrastructure/gemini-cdp
Edition2021
Targetsgemini-cdp, infrastructure_gemini_cdp
Public items9 across 1 module
Tests13

What it is for

Gemini adapter via Chrome DevTools Protocol (B-086 step 2).

The composer is found by an ordered, ratified candidate list (candidates::COMPOSER_CANDIDATES), tried in order inside one Runtime.evaluate; the outcome names the candidate that matched, or is a typed refusal carrying every candidate tried. Nothing here guesses.

Input is trusted: text goes in through Input.insertText after the matched element is focused, and the send button is clicked with Input.dispatchMouseEvent at its bounding-box centre. The CDP safety policy in docs/research/PRIVACY_RESEARCH_SYSTEM.md holds: no Runtime.enable, no Page.addScriptToEvaluateOnNewDocument, no user-agent override.

Requires Chrome running with --remote-debugging-port and a logged-in Gemini tab open.

Capabilities

Candidate

The ordered, ratified candidate lists and the probe that tries them.

Item
pub struct Candidate
pub const COMPOSER_CANDIDATES: & Candidate
pub const SEND_CANDIDATES: & Candidate
fn probe_js(cands : & Candidate) -> String

ComposerMatch

The ordered, ratified candidate lists and the probe that tries them.

Item
pub struct ComposerMatch

ProbeOutcome

The ordered, ratified candidate lists and the probe that tries them.

Item
pub enum ProbeOutcome
fn parse_probe(raw : & str) -> Result <ProbeOutcome, String>

Rect

The ordered, ratified candidate lists and the probe that tries them.

Item
pub struct Rect
Rect :: fn centre(& self) ->(f64, f64)

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

infrastructure_gemini_cdp

Public surface

`candidates`

ItemWhat it is
pub struct CandidateOne thing to try, by name, with the CSS that tries it.
pub const COMPOSER_CANDIDATES: & CandidateComposer candidates, in ratified order.
pub const SEND_CANDIDATES: & CandidateSend-button candidates, in ratified order.
pub struct RectBounding box of the matched element, viewport CSS pixels.
Rect :: fn centre(& self) ->(f64, f64)Where a trusted click lands.
pub struct ComposerMatchThe candidate that matched, with what the page said about the element.
pub enum ProbeOutcomeWhat the probe found.
fn probe_js(cands : & Candidate) -> StringBuild the one expression that tries cands in order and returns JSON
fn parse_probe(raw : & str) -> Result <ProbeOutcome, String>Parse what the page returned from probe_js.

Re-exports. Exported here, defined elsewhere.

ExportDefined in
GeminiErrorerror::GeminiError
GeminiSessionsession::GeminiSession
{probe_js,Candidate,ComposerMatch,ProbeOutcome,Rect,COMPOSER_CANDIDATES,SEND_CANDIDATES,}candidates::{probe_js,Candidate,ComposerMatch,ProbeOutcome,Rect,COMPOSER_CANDIDATES,SEND_CANDIDATES,}

Boundary

Depends on no other workspace tier.

Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-shodan, infrastructure-adapters-yelp, infrastructure-agent, … (82 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)infrastructure
Architectural role (taxonomy)adapter
Locationcrates/infrastructure/gemini-cdp
Vocabulary in force (lexicon)current

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`infrastructure-browser-cdp`infrastructurenoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
serde^1derivenoalways
serde_json^1noalways
thiserror^2noalways
tracing^0.1noalways

Development. None.

Build. None.

Depended on by. Nothing in this workspace.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  SELF["infrastructure-gemini-cdp"]
  SELF -->|runtime| n_infrastructure_browser_cdp["infrastructure-browser-cdp"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
bingemini-cdp`src/bin/gemini-cdp.rs`
libinfrastructure_gemini_cdp`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

No workspace crate depends on this one.

Verification

KindCount
Unit tests13
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
candidates800

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc99
Public modules with a //! block11
pie showData
    title Public items with rustdoc
    "Documented" : 9
    "No rustdoc detected" : 0

Metrics

MetricValue
Rust source files6
Source lines769
Code lines577
Public API items9
Public modules1
Tests13
Examples0
Cargo features0
Direct runtime dependencies5
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "constant" : 2
    "enum" : 1
    "function" : 2
    "method" : 1
    "struct" : 3
pie showData
    title Rust source composition
    "Code" : 577
    "Blank or comment" : 192

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

All infrastructure · Manual