pub struct RouteResult {
pub agent: String,
pub model: Option<String>,
pub complexity: String,
pub estimate: u8,
pub reason: String,
pub profile: AgentProfile,
pub selected_skills: Vec<String>,
pub warning: Option<String>,
}Expand description
Result of routing a task to an agent.
Fields§
§agent: StringThe selected agent: “claude”, “codex”, or “opencode”
model: Option<String>Optional model suggestion, e.g., “claude-sonnet-4-6”, “claude-opus-4-6”, “o3”
complexity: StringComplexity level: “simple”, “medium”, or “complex”
estimate: u8Fibonacci effort estimate (1, 2, 3, 5, 8, 13, or 21). 0 means not provided.
reason: StringWhy this agent was selected
profile: AgentProfileSpecialized agent profile (skills, tools, constraints)
selected_skills: Vec<String>Selected skill IDs from the catalog
warning: Option<String>Optional warning about routing decision
Implementations§
Source§impl RouteResult
impl RouteResult
Sourcepub fn from_config(
agent: String,
complexity: String,
reason: String,
config: &RouterConfig,
task_id: &str,
) -> Self
pub fn from_config( agent: String, complexity: String, reason: String, config: &RouterConfig, task_id: &str, ) -> Self
Build a standard route result from the three task-specific values.
Fills profile, selected_skills, and warning with router-config
defaults so call sites only need to supply what varies per task.
Trait Implementations§
Source§impl Clone for RouteResult
impl Clone for RouteResult
Source§impl Debug for RouteResult
impl Debug for RouteResult
Source§impl<'de> Deserialize<'de> for RouteResult
impl<'de> Deserialize<'de> for RouteResult
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RouteResult
impl PartialEq for RouteResult
Source§impl Serialize for RouteResult
impl Serialize for RouteResult
impl StructuralPartialEq for RouteResult
Auto Trait Implementations§
impl Freeze for RouteResult
impl RefUnwindSafe for RouteResult
impl Send for RouteResult
impl Sync for RouteResult
impl Unpin for RouteResult
impl UnsafeUnpin for RouteResult
impl UnwindSafe for RouteResult
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
Mutably borrows from an owned value. Read more
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> 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> ⓘ
Converts
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> ⓘ
Converts
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