pub struct MetaDef {
pub name: String,
pub ctx: Value,
}Expand description
Named, multi-step-shared declarative context payload (GH #21 Phase 2).
Lives in the Blueprint::metas pool and is referenced by name from
two independent consumers: a $step_meta.ref envelope embedded in a
Step’s evaluated in value (the Step tier, resolved by
EngineDispatcher::dispatch in the mlua-swarm core crate at
dispatch time — see EngineDispatcher::with_step_metas), and
AgentMeta::meta_ref (the Agent tier, resolved at launch time and
merged UNDER the agent’s inline AgentMeta::ctx). The pool lets
multiple Steps and/or Agents share one declarative context object by
name instead of repeating it inline.
Fields§
§name: StringLogical name (= referenced by $step_meta.ref and
AgentMeta.meta_ref; unique within Blueprint::metas).
ctx: ValueDeclarative context payload. Consumers expect a JSON Object so
it can be shallow-merged with an inline override / an agent’s
own ctx (a non-Object value is rejected — loudly at dispatch
time for the Step tier, defensively (warn + skip) at launch time
for the Agent tier); the shape is otherwise free-form.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MetaDef
impl<'de> Deserialize<'de> for MetaDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for MetaDef
impl JsonSchema for MetaDef
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for MetaDef
Auto Trait Implementations§
impl Freeze for MetaDef
impl RefUnwindSafe for MetaDef
impl Send for MetaDef
impl Sync for MetaDef
impl Unpin for MetaDef
impl UnsafeUnpin for MetaDef
impl UnwindSafe for MetaDef
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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