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.CapabilitySpecand the non-sealedIntoCapability: the open conversion seam application values use to become capability registrations.Definition(featuredefinition): the code-defined capability authoring surface — typed tool handlers, schema metadata, structured execution errors — with no engine or host dependency.CapabilityIdIndexandActivationSet: 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§
- Activation
Set - Duplicate-activation guard used when composing an agent’s capability set.
- Capability
Id - Capability identifier — an open, string-based ID.
- Capability
IdIndex - Canonical-id and alias index for a capability registry.
- Capability
Ref - A reference to a capability implementation plus per-agent JSON.
- Capability
Spec - The normalized value produced by
IntoCapability. - Capability
Spec Parts - The decomposed contents of a
CapabilitySpec.
Enums§
- Capability
Error - 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§
- Into
Capability - Convert an application value into one capability registration.
Functions§
- is_
plugin_ capability - Return
trueifcapability_idis aplugin:…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.