Skip to main content

Crate idlewarden_plugin_api

Crate idlewarden_plugin_api 

Source
Expand description

The IdleWarden plugin contract.

This crate is the only stable surface a plugin depends on, and it is licensed Apache-2.0 (the rest of IdleWarden is MPL-2.0) so that anyone can build plugins under any license they like. See docs/adr/0010-*.md.

The contract is data, not Rust symbols: a plugin is described by a PluginManifest and speaks in Observations and Intents. The Core never loads third-party native code into its own process (ADR-0001), so the types here are all serialisable.

Re-exports§

pub use action::ActionOutcome;
pub use action::InputCommand;
pub use action::Intent;
pub use action::Key;
pub use action::MouseButton;
pub use action::Point;
pub use capability::Capability;
pub use capability::TrustLevel;
pub use manifest::ApiVersion;
pub use manifest::GameMatcher;
pub use manifest::PluginId;
pub use manifest::PluginManifest;
pub use manifest::SignalDecl;
pub use manifest::SignalId;
pub use manifest::API_VERSION;
pub use observation::Confidence;
pub use observation::Observation;
pub use observation::Signal;
pub use value::Value;

Modules§

action
Two strictly separated layers (ADR-0003):
capability
What a plugin is allowed to do, and how much the user is asked to trust it.
manifest
The plugin manifest, the actual contract (ADR-0010).
observation
What the Core perceives, and how sure it is about it.
value
Dynamically-typed signal values.

Enums§

PluginError
Errors that cross the plugin boundary.