Skip to main content

Crate everruns_capability

Crate everruns_capability 

Source
Expand description

The neutral Everruns capability contract (EVE-873).

One open identity/configuration contract shared by the everruns Framework, the hosted product composition, and integration crates:

  • CapabilityId: an open, string-based capability identifier with one validation rule set (character set, length, reserved namespace).
  • CapabilityRef: a reference to a capability implementation plus its per-agent JSON object configuration. This is the persisted attachment representation and the Framework activation value — the same bytes round-trip through application code, database rows, and worker resolution.
  • CapabilitySpec and the non-sealed IntoCapability: the open conversion seam application values use to become capability registrations.
  • Definition (feature definition): the code-defined capability authoring surface — typed tool handlers, schema metadata, structured execution errors — with no engine or host dependency.
  • CapabilityIdIndex and ActivationSet: canonical-id/alias bookkeeping and duplicate/collision rejection shared by registries.

This crate deliberately depends on neither everruns-core nor everruns-host, and carries no Tokio, HTTP, SQLx, OpenAPI, inventory, or platform-record dependency. Third-party capability crates can depend on this crate alone; application authors normally consume the same types re-exported from everruns. Part of the Everruns ecosystem.

§Example

use everruns_capability::{CapabilityRef, CapabilitySpec, IntoCapability};
use serde_json::json;

struct VendorSearch {
    index: String,
}

impl IntoCapability for VendorSearch {
    fn into_capability(self) -> CapabilitySpec {
        CapabilityRef::new("vendor.search")
            .config(json!({ "index": self.index }))
            .into()
    }
}

let spec = VendorSearch { index: "prod".into() }.into_capability();
assert_eq!(spec.capability_ref().id(), "vendor.search");

Re-exports§

pub use definition::Definition;
pub use serde;
pub use serde_json;
pub use schemars;

Modules§

definition
Code-defined capability authoring: typed tool handlers, schema metadata, and structured execution errors.

Structs§

ActivationSet
Duplicate-activation guard used when composing an agent’s capability set.
CapabilityId
Capability identifier — an open, string-based ID.
CapabilityIdIndex
Canonical-id and alias index for a capability registry.
CapabilityRef
A reference to a capability implementation plus per-agent JSON.
CapabilitySpec
The normalized value produced by IntoCapability.
CapabilitySpecParts
The decomposed contents of a CapabilitySpec.

Enums§

CapabilityError
A structured capability contract violation.

Constants§

PLUGIN_CAPABILITY_PREFIX
The plugin: prefix used to identify installed plugin capabilities.
RESERVED_CAPABILITY_ID_NAMESPACE
The namespace reserved for Everruns-internal capability machinery.

Traits§

IntoCapability
Convert an application value into one capability registration.

Functions§

is_plugin_capability
Return true if capability_id is a plugin:… reference.
parse_plugin_capability_id
Strip the plugin: prefix and return the identity suffix.
plugin_capability_id
Construct a plugin capability reference from its stable identity suffix.
validate_capability_config
Validate the shared JSON object configuration boundary.
validate_capability_id
Validate a capability identifier against the shared open-ID grammar.

Attribute Macros§

async_trait