huskies: merge 858
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
//! Agent subsystem — types, configuration, and orchestration for coding agents.
|
||||
/// Acceptance-gate checks (clippy, tests, doc coverage).
|
||||
pub mod gates;
|
||||
/// Agent start/stop and pipeline advancement on completion.
|
||||
pub mod lifecycle;
|
||||
/// Constructs the system prompt sent to coding agents.
|
||||
pub mod local_prompt;
|
||||
/// Merge-conflict resolution helpers.
|
||||
pub mod merge;
|
||||
pub(crate) mod pool;
|
||||
pub(crate) mod pty;
|
||||
/// Runtime backends (Claude Code, OpenAI, Gemini) that execute agent sessions.
|
||||
pub mod runtime;
|
||||
/// Persistent session-ID storage for agent resume support.
|
||||
pub mod session_store;
|
||||
/// Token-usage tracking and budget estimation.
|
||||
pub mod token_usage;
|
||||
|
||||
use crate::config::AgentConfig;
|
||||
@@ -74,6 +81,7 @@ pub enum AgentEvent {
|
||||
|
||||
#[derive(Debug, Clone, Serialize, PartialEq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
/// Lifecycle state of an agent session.
|
||||
pub enum AgentStatus {
|
||||
Pending,
|
||||
Running,
|
||||
@@ -212,6 +220,7 @@ impl TokenUsage {
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Clone)]
|
||||
/// Snapshot of a running or completed agent, exposed via the HTTP API.
|
||||
pub struct AgentInfo {
|
||||
pub story_id: String,
|
||||
pub agent_name: String,
|
||||
|
||||
@@ -48,6 +48,7 @@ pub struct AgentPool {
|
||||
}
|
||||
|
||||
impl AgentPool {
|
||||
/// Create a new agent pool bound to the given HTTP port and event channel.
|
||||
pub fn new(port: u16, watcher_tx: broadcast::Sender<WatcherEvent>) -> Self {
|
||||
let pool = Self {
|
||||
agents: Arc::new(Mutex::new(HashMap::new())),
|
||||
@@ -98,6 +99,7 @@ impl AgentPool {
|
||||
pool
|
||||
}
|
||||
|
||||
/// Return the HTTP port this pool's agents connect to.
|
||||
pub fn port(&self) -> u16 {
|
||||
self.port
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ pub struct ClaudeCodeRuntime {
|
||||
}
|
||||
|
||||
impl ClaudeCodeRuntime {
|
||||
/// Create a new Claude Code runtime with shared child-killer registry and event channel.
|
||||
pub fn new(
|
||||
child_killers: Arc<Mutex<HashMap<String, Box<dyn ChildKiller + Send + Sync>>>>,
|
||||
watcher_tx: broadcast::Sender<WatcherEvent>,
|
||||
|
||||
@@ -43,6 +43,7 @@ pub struct GeminiRuntime {
|
||||
}
|
||||
|
||||
impl GeminiRuntime {
|
||||
/// Create a new Gemini runtime instance.
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
cancelled: Arc::new(AtomicBool::new(false)),
|
||||
|
||||
@@ -30,6 +30,7 @@ pub struct OpenAiRuntime {
|
||||
}
|
||||
|
||||
impl OpenAiRuntime {
|
||||
/// Create a new OpenAI runtime instance.
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
cancelled: Arc::new(AtomicBool::new(false)),
|
||||
|
||||
Reference in New Issue
Block a user