starweaver_runtime/
run.rs1use serde::{Deserialize, Serialize};
4
5pub use starweaver_context::AgentRunState;
7pub use starweaver_core::RunLifecycle as RunStatus;
9
10#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
12pub struct AgentRunResult {
13 pub output: String,
15 pub state: AgentRunState,
17}
18
19impl AgentRunResult {
20 #[must_use]
22 pub const fn has_pending_hitl(&self) -> bool {
23 self.state.has_pending_hitl()
24 }
25
26 #[must_use]
28 pub fn pending_approvals(&self) -> &[starweaver_model::ToolReturnPart] {
29 self.state.pending_approvals()
30 }
31
32 #[must_use]
34 pub fn pending_deferred_tools(&self) -> &[starweaver_model::ToolReturnPart] {
35 self.state.pending_deferred_tools()
36 }
37}