pub struct ActionMeta {
pub name: String,
pub description: String,
pub category: Option<String>,
pub input_schema: Value,
pub output_schema: Value,
pub capabilities: Vec<String>,
pub input_kinds: Vec<String>,
pub output_kinds: Vec<String>,
}Expand description
Action metadata for planner
Fields§
§name: StringAction name
description: StringAction description
category: Option<String>Optional action grouping/category for planner UX and reporting.
input_schema: ValueJSON schema for fully resolved input payload.
output_schema: ValueJSON schema for action output payload.
capabilities: Vec<String>Semantic capability tags used by planner/runtime guardrails.
input_kinds: Vec<String>Abstract artifact/input kinds this action can consume.
output_kinds: Vec<String>Abstract artifact/output kinds this action can produce.
Implementations§
Source§impl ActionMeta
impl ActionMeta
Sourcepub fn new(
name: impl Into<String>,
description: impl Into<String>,
) -> ActionMeta
pub fn new( name: impl Into<String>, description: impl Into<String>, ) -> ActionMeta
Create new action metadata
Sourcepub fn with_category(self, category: impl Into<String>) -> ActionMeta
pub fn with_category(self, category: impl Into<String>) -> ActionMeta
Set action category/grouping metadata.
Sourcepub fn with_input_schema(self, schema: Value) -> ActionMeta
pub fn with_input_schema(self, schema: Value) -> ActionMeta
Set input schema.
Sourcepub fn with_output_schema(self, schema: Value) -> ActionMeta
pub fn with_output_schema(self, schema: Value) -> ActionMeta
Set output schema.
Sourcepub fn with_capability(self, capability: impl Into<String>) -> ActionMeta
pub fn with_capability(self, capability: impl Into<String>) -> ActionMeta
Add one capability tag.
Sourcepub fn with_capabilities<I, S>(self, capabilities: I) -> ActionMeta
pub fn with_capabilities<I, S>(self, capabilities: I) -> ActionMeta
Add multiple capability tags.
Sourcepub fn with_input_kinds<I, S>(self, kinds: I) -> ActionMeta
pub fn with_input_kinds<I, S>(self, kinds: I) -> ActionMeta
Add multiple supported input kinds.
Sourcepub fn with_output_kinds<I, S>(self, kinds: I) -> ActionMeta
pub fn with_output_kinds<I, S>(self, kinds: I) -> ActionMeta
Add multiple supported output kinds.
Sourcepub fn has_capability(&self, capability: &str) -> bool
pub fn has_capability(&self, capability: &str) -> bool
Check whether this action advertises a capability.
Sourcepub fn supports_input_kind(&self, kind: &str) -> bool
pub fn supports_input_kind(&self, kind: &str) -> bool
Check whether this action can consume the given abstract input kind.
Sourcepub fn supports_output_kind(&self, kind: &str) -> bool
pub fn supports_output_kind(&self, kind: &str) -> bool
Check whether this action can produce the given abstract output kind.
Trait Implementations§
Source§impl Clone for ActionMeta
impl Clone for ActionMeta
Source§fn clone(&self) -> ActionMeta
fn clone(&self) -> ActionMeta
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ActionMeta
impl RefUnwindSafe for ActionMeta
impl Send for ActionMeta
impl Sync for ActionMeta
impl Unpin for ActionMeta
impl UnsafeUnpin for ActionMeta
impl UnwindSafe for ActionMeta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more