dbrowser · commands::browser
Source declarations, signatures and documentation for commands::browser.
Source: sigil/weave/tools/dbrowser/src-tauri/src/commands/browser.rs. SHA-256: af0e2808bf1ea1c3ce8d48441757d77152cf04892ecdf07101f446b64e1153f8.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
commands::browser::NavigationResult
Result of navigating to a URL.
#[derive(Debug, Serialize)]
pub struct NavigationResult {
/// The resolved URL to load.
pub url: String,
/// The detected protocol scheme.
pub scheme: String
}Source line: 29.
commands::browser::Web3GatewayCandidate
#[derive(Debug, Clone, Serialize)]
pub struct Web3GatewayCandidate {
pub label: String,
pub url: String
}Source line: 37.
commands::browser::Web3DomainResolution
#[derive(Debug, Clone, Serialize)]
pub struct Web3DomainResolution {
pub domain: String,
pub path: String,
pub status: String,
pub system_id: Option<String>,
pub system_name: Option<String>,
pub reason: String,
pub url: Option<String>,
pub gateway_candidates: Vec<Web3GatewayCandidate>
}Source line: 43.
commands::browser::BrowserObservationRequest
#[derive(Debug, Deserialize)]
pub struct BrowserObservationRequest {
pub url: String,
pub html: String,
pub profile_id: Option<String>,
pub tab_id: Option<String>,
pub frame_id: Option<String>,
pub navigation_id: Option<String>,
pub generation: Option<u64>,
pub timestamp_ms: Option<u64>
}Source line: 55.
commands::browser::BrowserObserveUrlRequest
#[derive(Debug, Deserialize)]
pub struct BrowserObserveUrlRequest {
pub url: String,
pub profile_id: Option<String>,
pub tab_id: Option<String>,
pub frame_id: Option<String>,
pub navigation_id: Option<String>,
pub generation: Option<u64>,
pub timestamp_ms: Option<u64>
}Source line: 67.
commands::browser::BrowserLiveObservationRequest
#[derive(Debug, Deserialize)]
pub struct BrowserLiveObservationRequest {
pub label: String,
pub url: String,
pub profile_id: Option<String>,
pub tab_id: Option<String>,
pub frame_id: Option<String>,
pub navigation_id: Option<String>,
pub generation: Option<u64>,
pub timestamp_ms: Option<u64>,
pub timeout_ms: Option<u64>,
pub max_html_chars: Option<usize>
}Source line: 78.
commands::browser::BrowserLiveObservationSnapshot
#[derive(Debug, Clone, Deserialize)]
pub struct BrowserLiveObservationSnapshot {
pub nonce: String,
pub url: String,
pub title: String,
pub html: String,
pub html_truncated: bool,
pub collected_at_ms: u64
}Source line: 92.
commands::browser::BrowserLiveObservationAck
#[derive(Debug, Serialize)]
pub struct BrowserLiveObservationAck {
pub accepted: bool
}Source line: 102.
commands::browser::BrowserObservationBridge
One-shot bridge for live renderer observations.
The frontend asks Rust to observe a specific native child webview. Rust injects a nonce-bearing script into that webview, and only the matching nonce can deliver a DOM snapshot back to the waiting request.
#[derive(Default)]
pub struct BrowserObservationBridge {
}Source line: 112.
commands::browser::navigate
Navigate to a URL. Detects the protocol scheme and performs any necessary backend resolution for weave:// and hns:// URLs.
#[tauri::command]
pub async fn navigate(url: String) -> Result<NavigationResult, String>;Source line: 159.
commands::browser::BrowserPageWebviewCreateInput
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BrowserPageWebviewCreateInput {
pub label: String,
pub url: String,
pub x: f64,
pub y: f64,
pub width: f64,
pub height: f64,
pub accept_first_mouse: bool,
pub drag_drop_enabled: bool,
pub focus: bool,
pub user_agent: String,
pub incognito: bool,
pub data_store_identifier: Option<Vec<u8>>,
pub javascript_disabled: bool,
pub zoom_hotkeys_enabled: bool,
pub allow_link_preview: bool,
pub devtools: bool,
pub initialization_script: String
}Source line: 169.
commands::browser::create_browser_page_webview
#[tauri::command]
pub fn create_browser_page_webview(
app: AppHandle,
input: BrowserPageWebviewCreateInput,
) -> Result<(), String>;Source line: 190.
commands::browser::observe_html
Build an agent-native semantic observation frame from page HTML.
#[tauri::command]
pub fn observe_html(input: BrowserObservationRequest) -> Result<ObservationFrame, String>;Source line: 244.
commands::browser::observe_url
Fetch a URL through the shared engine and observe the returned HTML.
#[tauri::command]
pub async fn observe_url(input: BrowserObserveUrlRequest) -> Result<ObservationFrame, String>;Source line: 266.
commands::browser::observe_live_webview
Observe the live DOM from a native child webview when the renderer permits
injected scripts to call Tauri IPC. The frontend falls back to observe_url
if this command times out or the page blocks the capture path.
#[tauri::command]
pub async fn observe_live_webview(
app: AppHandle,
bridge: State<'_, BrowserObservationBridge>,
input: BrowserLiveObservationRequest,
) -> Result<ObservationFrame, String>;Source line: 309.
commands::browser::submit_observation_snapshot
Receive a single live observation snapshot from an injected webview script.
#[tauri::command]
pub fn submit_observation_snapshot(
bridge: State<'_, BrowserObservationBridge>,
input: BrowserLiveObservationSnapshot,
) -> Result<BrowserLiveObservationAck, String>;Source line: 376.
commands::browser::resolve_url
Resolve a URL and return information about its protocol type.
For weave:// URLs, delegates to [protocol::resolve_weave_url] to
read the target file from the Locus distributed filesystem.
For hns:// URLs, delegates to [protocol::resolve_hns_url] for
Handshake decentralised DNS resolution (currently a placeholder).
Standard https:// URLs are returned with an informational message.
Uses block_in_place so that the !Send Locus/Lens futures run on the
current thread without crossing an async task boundary.
#[tauri::command]
pub async fn resolve_url(state: State<'_, AppState>, url: String) -> Result<String, String>;Source line: 394.
commands::browser::fetch_weave_content
Fetch the raw content of a weave:// URL as a UTF-8 string.
Unlike [resolve_url] which returns a human-readable description, this
command returns the actual file bytes decoded as UTF-8, suitable for
rendering directly in the frontend.
#[tauri::command]
pub async fn fetch_weave_content(
state: State<'_, AppState>,
url: String,
) -> Result<String, String>;Source line: 442.
commands::browser::fetch_weave_file
Fetch the raw bytes of a weave:// URL for browser-side artifact rendering.
#[tauri::command]
pub async fn fetch_weave_file(state: State<'_, AppState>, url: String) -> Result<Vec<u8>, String>;Source line: 459.
commands::browser::resolve_web3_domain
Resolve a Web3 domain into a browser-loadable URL, or into a typed no-record state that the frontend can render without showing gateway error pages.
#[tauri::command]
pub async fn resolve_web3_domain(input: String) -> Result<Web3DomainResolution, String>;Source line: 473.