pub struct TeamSpec {
pub name: String,
pub description: String,
pub coordinator: String,
pub members: Vec<TeamMemberSpec>,
pub relationships: Vec<TeamRelationship>,
pub policy: TeamPolicy,
}Expand description
A portable team definition independent of concrete model or runtime types.
Fields§
§name: StringStable name of the executable team root.
description: StringHuman-readable purpose of the team.
coordinator: StringMember that handles the initial request.
members: Vec<TeamMemberSpec>Named members expected at compilation time.
relationships: Vec<TeamRelationship>Exact directed handoff and delegation relationships.
policy: TeamPolicyRuntime policies enforced by the compiled team.
Implementations§
Source§impl TeamSpec
impl TeamSpec
Sourcepub async fn compile_with_registry(
&self,
registry: Arc<dyn TeamAgentRegistry>,
) -> Result<CompiledTeam, TeamError>
pub async fn compile_with_registry( &self, registry: Arc<dyn TeamAgentRegistry>, ) -> Result<CompiledTeam, TeamError>
Resolves missing concrete members by capability and freezes the roster.
Selection is reproducible: exact advertised-name matches win, followed by descending registry priority and then lexical binding identifier.
Source§impl TeamSpec
impl TeamSpec
Sourcepub fn validate(&self) -> Result<(), TeamError>
pub fn validate(&self) -> Result<(), TeamError>
Validates names, policies, edges, acyclicity, and coordinator reachability.
Sourcepub fn compile(
&self,
agents: impl IntoIterator<Item = Arc<dyn Agent>>,
) -> Result<CompiledTeam, TeamError>
pub fn compile( &self, agents: impl IntoIterator<Item = Arc<dyn Agent>>, ) -> Result<CompiledTeam, TeamError>
Binds this spec to concrete agents and returns an executable team root.
Any Agent implementation can be a member. Delegate edges additionally
require the team-tools feature, which lowers them to AgentTools.
Sourcepub fn compile_with_hooks(
&self,
agents: impl IntoIterator<Item = Arc<dyn Agent>>,
hooks: impl IntoIterator<Item = Arc<dyn TeamLifecycleHook>>,
) -> Result<CompiledTeam, TeamError>
pub fn compile_with_hooks( &self, agents: impl IntoIterator<Item = Arc<dyn Agent>>, hooks: impl IntoIterator<Item = Arc<dyn TeamLifecycleHook>>, ) -> Result<CompiledTeam, TeamError>
Binds concrete agents and ordered async team lifecycle hooks.
Generic Runner plugins continue to apply normally. These hooks add policy and observation at exact member and relationship boundaries.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TeamSpec
impl<'de> Deserialize<'de> for TeamSpec
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>,
impl Eq for TeamSpec
Source§impl JsonSchema for TeamSpec
impl JsonSchema for TeamSpec
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 TeamSpec
Auto Trait Implementations§
impl Freeze for TeamSpec
impl RefUnwindSafe for TeamSpec
impl Send for TeamSpec
impl Sync for TeamSpec
impl Unpin for TeamSpec
impl UnsafeUnpin for TeamSpec
impl UnwindSafe for TeamSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.