Skip to main content

Crate extro_core

Crate extro_core 

Source
Expand description

§Extro Core

Pure Rust domain logic for the Extro browser extension framework.

This crate provides the state machine, command dispatch, browser effects, and AI tool registry that form the deterministic “brain” of every Extro extension.

Key principle: The model proposes; Rust decides.

§Architecture

User Action → Content Script → Background → CoreState::dispatch() → BrowserEffects

JavaScript never contains domain logic. It captures browser state, sends it here, and executes the returned effects.

Structs§

AIToolCall
A tool call proposed by an AI model.
BrowserSnapshot
A snapshot of the current browser state at the moment a command is issued.
CoreCommand
A command sent from JavaScript to the Rust core.
CoreResult
The result of processing a CoreCommand.
CoreState
The central state machine for an Extro extension.
ToolDefinition
A tool that AI models are allowed to invoke.
ToolRegistry
Registry of allowed AI tools with validation.

Enums§

BrowserEffect
Side effects that the Rust core requests the JavaScript runtime to execute.
CoreAction
Actions that can be dispatched to the core state machine.
CoreError
Errors that can occur during core operations.
RuntimeSurface
Identifies which browser extension surface originated a command.