use super::super::super::super::Reply;
use crate::boundary::answer::agent::AgentView;
use crate::config_edit::branch::GoverningConfig;
use crate::git_tree::{AgentMark, AgentState};
use crate::nav::convs::{Doing, Flight, FlightStrip, Seat};
fn seat(name: &str, doing: Doing) -> Seat {
Seat {
name: name.to_owned(),
doing,
}
}
pub(super) fn agent() -> Vec<Reply> {
vec![
Reply::Agent(AgentView {
agent_id: "r-0-c-1".to_owned(),
root: "r-0".to_owned(),
ancestors: vec!["r-0".to_owned()],
name: "pennant".to_owned(),
display_only: true,
tip: "a".repeat(40),
state: AgentState::InFlight,
refused: false,
failure: None,
marks: vec![
AgentMark::Notified,
AgentMark::BudgetExhausted,
AgentMark::Conflicted,
AgentMark::Held,
AgentMark::Abandoned,
],
held: Some(crate::control::hold::Held {
tool_use_id: "toolu_1".to_owned(),
tool: "Bash".to_owned(),
reason: "unconfined".to_owned(),
}),
flight: Some(Flight::Tools),
present: true,
nudgeable: false,
stoppable: true,
stop_children: true,
seats: vec![
seat("pennant", Doing::Waiting),
seat("kid-a", Doing::Thinking),
seat("kid-b", Doing::Inference),
seat("kid-c", Doing::Tools),
seat("kid-d", Doing::Idle),
],
strip: Some(FlightStrip {
class: Flight::Tools,
facts: "Bash · 5s".to_owned(),
}),
spend: crate::spend::Figure {
tokens: crate::budgets::BudgetSpend {
input_tokens: 120,
..crate::budgets::BudgetSpend::default()
},
cost: Some(crate::spend::Cost {
micro_usd: 4_000_000,
unpriced_tokens: 1,
}),
attribution: crate::spend::Attribution::Conversations(3),
},
context: Some(crate::context::Fullness {
model: "claude-x".to_owned(),
prompt_tokens: 4_000,
window: 200_000,
}),
}),
Reply::Agent(AgentView {
agent_id: "r-0".to_owned(),
root: "r-0".to_owned(),
ancestors: vec![],
name: "r-0".to_owned(),
display_only: false,
tip: String::new(),
state: AgentState::Stopped,
refused: true,
failure: Some("no credential for provider row \"work\"".to_owned()),
marks: vec![],
held: None,
flight: None,
present: false,
nudgeable: false,
stoppable: false,
stop_children: false,
seats: vec![],
strip: None,
spend: crate::spend::Figure {
tokens: crate::budgets::BudgetSpend::default(),
cost: None,
attribution: crate::spend::Attribution::Workspace,
},
context: None,
}),
Reply::Governing(GoverningConfig {
oid: "b".repeat(40),
short_oid: "bbbbbbbb".to_owned(),
governance: crate::config_edit::branch::Governance::Follows("default".to_owned()),
files: vec!["workflow.yaml".to_owned(), "souls/base.md".to_owned()],
}),
Reply::Governing(GoverningConfig {
oid: "c".repeat(40),
short_oid: "cccccccc".to_owned(),
governance: crate::config_edit::branch::Governance::Held {
diverged_lineages: 2,
},
files: vec![],
}),
]
}