Skip to main content

Crate bobby_browser_client

Crate bobby_browser_client 

Source
Expand description

Typed HTTP client and /v1 wire types for Bobby Browser.

The single crates.io Rust SDK package. Mirrors @cavi-ai/bobby-browser for Rust callers.

§Auth headers

Every request includes:

  • Authorization: Bearer <token>
  • x-interface-version
  • x-correlation-id
  • x-deadline

§Example

use bobby_browser_client::{BrowserRuntimeClient, CreateSessionRequest};

let client = BrowserRuntimeClient::new(
    "http://127.0.0.1:7777",
    std::env::var("AUTOMATION_RUNTIME_TOKEN")?,
)?;
let info = client.runtime_info(None).await?;
let session = client
    .create_session(
        &CreateSessionRequest {
            profile: "default".into(),
            proxy: None,
            execution_policy: Default::default(),
            zigzagzig: false,
        },
        None,
    )
    .await?;
client.delete_session(&session.id, None).await?;
let _ = info;

§Features

  • schema — derive schemars::JsonSchema on wire types.

Structs§

AccessibilityNode
One node in an accessibilitySnapshot result tree.
AccessibilitySnapshotCommand
AccessibilityTarget
Semantic target for accessibility-based commands (role + accessible name).
ActivatePageCommand
ArtifactId
ArtifactReference
Typed description of an artifact as issued by the runtime (evidence artifactId/mediaType/bytes/sha256 fields). The client verifies a fetched body against it before returning any bytes.
AttachmentId
AttemptId
BrowserRuntimeClient
Authenticated HTTP client for the Bobby Browser /v1 runtime interface.
CandidateEvidence
CapabilitySet
Canonical capability set. Serializes in lexical wire order.
CaptureScreenshotCommand
ChallengeDetection
ChallengeDetectionHints
ChallengeRegion
CheckpointId
CheckpointRequest
POST /v1/checkpoints request body: the checkpoint plus the command ids whose evidence the runtime resolves from its own journal.
ClickAndWaitForDownloadCommand
ClickAndWaitForPopupCommand
ClickCommand
ClosePageCommand
CommandEnvelope
Envelope submitted to POST /v1/commands.
CommandError
CommandId
CompanionId
CompleteFormField
CompleteFormIntent
ConfidenceMetricsSnapshot
ContextAnswer
Where the retained page context says a described control is.
ContextAskResponse
Response from GET /v1/context/ask.
ContextMetricsSnapshot
ContextNeighborControl
ContextNeighborStats
ContextNeighbors
The remembered form structure around a located control (context_neighbors). Structure only: roles, names, ordinals, and per-intent counters — never values, page text, or timestamps finer than a day.
ContextNeighborsResponse
Response from GET /v1/context/neighbors.
ContextRankedVisionMetricsSnapshot
ContextSiteResponse
Response from GET /v1/context/site/{key}.
ContextSiteView
One remembered site’s structure: page pattern → form key → controls.
ControlActionCommand
ControlActionEvidence
CookieRecord
One cookie as returned by a cookie read on any engine.
CorrelationId
Correlation id for a single request (x-correlation-id).
CreateSessionRequest
POST /v1/sessions body.
DeleteCookiesCommand
DetectChallengeHints
DetectChallengeIntent
DismissObstructionIntent
Dismiss an obstruction (overlay, cookie banner, etc.).
DownloadUrlCommand
EmulateCommand
EvaluateJavaScriptCommand
EventCursor
EvidenceId
ExecutionPolicy
Per-session gate for privileged execution. Defaults to deny; a session must opt in even when the bearer token holds the matching capability.
ExecutionRecord
ExtractField
One named field within an ExtractIntent, resolved independently of siblings.
ExtractIntent
Structured extraction intent. Replayable (does not mutate the page).
ExtractRequest
ExtractResult
Result of a structured extract command.
ExtractStructuredCommand
FillIntent
FollowIntent
Follow a control and wait for the expected destination.
FormControl
FormControlConstraints
FormControlTarget
FormControlValidity
FormDescriptor
FormGroup
FormOption
FormSnapshot
Semantic form observation returned by form-snapshot endpoints and evidence.
FormValidationIssue
Compact, value-free repair evidence for a control that rejected a form submission. Carries the semantic target and browser validity without the rest of the form snapshot.
FormValidity
GeolocationCoordinates
GetCookiesCommand
HandleDialogCommand
IdempotencyKey
Caller-provided key that identifies a repeated request (idempotency-key).
InspectCommand
IntentEnvelopeMeta
Meta that every intent envelope carries. Mirrors the TypeScript SDK’s IntentEnvelopeMeta.
IntentHints
Optional targeting hints for intents. All fields are optional on the wire (#[serde(default)]); a body like {"role":"textbox"} must deserialize.
IntentMetricsSnapshot
InterfaceError
InterfaceVersion
Marker for the sole supported interface version (CURRENT_INTERFACE_VERSION).
JobId
Runtime job identifier (job_<uuid>).
JobIdError
JobResult
JobStatusResponse
JobSubmitResponse
LatencyBucketSnapshot
LatencyHistogramSnapshot
ListPagesCommand
LocateIntent
NavigateCommand
NavigationRequest
NavigationResult
Result of a navigation command.
NetworkLogCommand
OpenPageCommand
OpenPageRequest
POST /v1/pages body.
OperationalMetricsSnapshot
PageEvidence
PageId
PageState
Page within a session.
PrefillMetricsSnapshot
PrincipalId
Authenticated caller id. Carries no credential material.
PrintToPdfCommand
ProfileId
ProviderHealthSnapshot
Operator-facing health of one vision provider mode. Carries the thresholds that produced status so consumers never re-derive them.
ReconciliationMetricsSnapshot
RecoveryCommandIdentity
RecoveryReceipt
RecoveryRecord
RecoveryRequest
RecoveryStatus
Current recovery status for a workflow (GET /v1/recovery/{id}).
RequestContext
RequestOptions
Options for a single request.
RestartLineage
RetryMetricsSnapshot
RevealedControl
A form control that an action revealed (conditional field). Emitted on ControlActionEvidence so an agent learns about fields that did not exist at snapshot time without re-snapshotting the whole page.
RuntimeInfo
GET /v1/runtime body.
SemanticTargetSegment
SessionId
SessionState
Browser session returned by session create/list endpoints.
SetCookieParam
One cookie to store. url anchors the cookie’s origin; path, flags, and expiry are optional per the driver defaults.
SetCookiesCommand
SetEmulatedMediaCommand
SetFocusEmulationCommand
SkillCheckpointProof
SkillCommandIdentity
SkillDecision
SkillEvidenceRef
SkillIssuedDecision
SkillProfile
SkillProfileRequest
SkillSessionState
SolveChallengeHints
SolveChallengeIntent
SubmitAndVerifyIntent
SubmitJobRequest
TargetFingerprint
TargetSpec
TypeTextCommand
UnknownCapability
A capability wire string no variant claims.
UploadAndConfirmCommand
UploadFilesCommand
VerificationMetricsSnapshot
ViewportSize
VisionMetricsSnapshot
WaitForCommand
WaitForStateIntent
WorkerId
WorkflowCallMetricsSnapshot
WorkflowCheckpoint
WorkflowId

Enums§

Capability
Capability granted by a token or policy.
ChallengeType
CheckpointInvariant
ClickModifier
ClientError
Errors returned by BrowserRuntimeClient.
CommandClass
CommandOutcome
CommandPhase
ContextAnswerSource
How a remembered control record entered the graph.
ContextMissReason
Machine-readable reason returned when retained context has no answer.
ContextNextStep
Repair step returned with a retained-context miss.
ContextObservedAt
Provenance of a ContextAnswer: live-observed under a page generation, or remembered from the persisted per-profile context store.
ControlAction
DialogAction
ElementState
ErrorCode
ErrorLayer
Evidence
ExecutionPath
Which strategy served a command: the direct-HTTP reader, or the live browser. The browser variants name the strategy, never an engine — a Firefox-companion run reports browser, and reporting chromium there contradicted the browserExecution evidence sitting beside it. The old wire names still deserialize so recorded journals keep replaying.
ExecutionReason
ExtractValueKind
Value to extract from a resolved field. Href is shorthand for attribute = "href"; other attributes use ExtractValueKind::Attribute.
FormControlKind
FormControlOperation
FormControlState
FormValidityFlag
IntentCommand
IntentResolutionPath
InterfaceErrorCode
InterfaceEvent
InterfaceOperation
Transport-neutral interface operations and their required capabilities.
InterfaceValidationError
JobPriority
JobStatus
NetworkResourceType
PageMode
Page rendering / interaction mode.
PrimitiveCommand
ProviderHealthStatus
Health classification of one vision provider boundary. degraded means consecutive propose-budget violations reached the failure threshold; unhealthy means consecutive provider failures did.
RecoveryDecision
RecoveryReceiptState
RuntimeCommand
Nested command wire shape: { kind: "intent" | "primitive", input: … }.
RuntimeError
ScreenshotMode
SkillBrowserEngine
SkillCapability
SkillCommand
SkillFailure
SkillGhostCommand
SkillOutcome
SkillTactic
SkillZigZagZigCommand
SolveStep
SubmitSettlementOutcome
TextMatch
WaitCondition
WaitUntil

Constants§

CURRENT_INTERFACE_VERSION
Value of the x-interface-version header for this release.
DEFAULT_DISMISS_OBSTRUCTION_TIMEOUT_MS
DEFAULT_MAX_ARTIFACT_BYTES
Client hard bounds for BrowserRuntimeClient::artifact, mirroring the TypeScript SDK defaults.
FORM_SNAPSHOT_SCHEMA_VERSION
Schema version for FormSnapshot payloads.
MAX_FORM_ACCEPT_TYPES
MAX_FORM_GROUPS
MAX_FORM_ID_BYTES
MAX_FORM_OPTIONS
MAX_FORM_REFERENCES
MAX_FORM_SNAPSHOT_CONTROLS
MAX_FORM_SNAPSHOT_FORMS
MAX_FORM_TARGET_ORDINAL
MAX_FORM_TARGET_PATH
MAX_FORM_TEXT_BYTES
MAX_FORM_VALIDATION_MESSAGE_BYTES
MAX_FORM_VALUE_BYTES
MAX_INTENT_PURPOSE_BYTES
Maximum UTF-8 byte length for intent purpose strings.
MAX_RECOVERY_RECEIPTS
MAX_RECOVERY_RECEIPT_BYTES
MAX_RECOVERY_RECEIPT_EVIDENCE
MAX_SDK_ARTIFACT_BYTES
MAX_WAIT_OBSERVED_CHARS
Upper bound on Evidence::Wait’s observed value, in characters.
SKILL_SCHEMA_VERSION

Functions§

annotate_page_derived_evidence
Add provenance only to page-derived evidence in a serialized outcome. This keeps public Rust enum variants source-compatible while extending the HTTP and MCP JSON representations.
complete_form_runtime_command
Build a completeForm intent command (1–128 uniquely named fields).
detect_challenge_envelope
Convenience: [detect_challenge] runtime command + intent_envelope.
detect_challenge_runtime_command
Build a detectChallenge intent command (Replayable, read-only).
dismiss_obstruction_envelope
Convenience: [dismiss_obstruction] runtime command + intent_envelope.
dismiss_obstruction_runtime_command
Build a dismissObstruction intent command.
extract_envelope
Convenience: [extract] runtime command + intent_envelope.
extract_runtime_command
Build an extract intent command (at least one uniquely named field).
fill_envelope
Convenience: [fill] runtime command + intent_envelope.
fill_runtime_command
Build a fill intent command.
follow_envelope
Convenience: [follow] runtime command + intent_envelope.
follow_runtime_command
Build a follow intent command.
intent_envelope
Wrap an intent RuntimeCommand in a CommandEnvelope.
locate_envelope
Convenience: [locate] runtime command + intent_envelope.
locate_runtime_command
Build a locate intent command.
solve_challenge_envelope
Convenience: [solve_challenge] runtime command + intent_envelope.
solve_challenge_runtime_command
Build a solveChallenge intent command (Reconciliable vision solve loop).
submit_and_verify_envelope
Convenience: [submit_and_verify] runtime command + intent_envelope.
submit_and_verify_runtime_command
Build a submitAndVerify intent command.
wait_for_state_envelope
Convenience: [wait_for_state] runtime command + intent_envelope.
wait_for_state_runtime_command
Build a waitForState intent command.