huskies: merge 948

This commit is contained in:
dave
2026-05-13 04:43:48 +00:00
parent 2f50e2198b
commit f2943c7e69
16 changed files with 995 additions and 205 deletions
+4 -2
View File
@@ -102,6 +102,10 @@ async fn main() -> Result<(), std::io::Error> {
}
let store = Arc::new(JsonFileStore::from_path(store_path).map_err(std::io::Error::other)?);
// Shared workflow state — same instance is reused for HTTP handlers below.
let workflow = Arc::new(std::sync::Mutex::new(WorkflowState::default()));
crate::crdt_sync::init_rpc_context(app_state.clone(), store.clone(), Arc::clone(&workflow));
// Collect CLI args, skipping the binary name (argv[0]).
let raw_args: Vec<String> = std::env::args().skip(1).collect();
@@ -174,8 +178,6 @@ async fn main() -> Result<(), std::io::Error> {
return agent_mode::run(agent_root, rendezvous, port, join_token, agent_gateway_url).await;
}
let workflow = Arc::new(std::sync::Mutex::new(WorkflowState::default()));
// Event bus: broadcast channel for pipeline lifecycle events.
let (watcher_tx, _) = broadcast::channel::<io::watcher::WatcherEvent>(1024);
let agents = Arc::new(AgentPool::new(port, watcher_tx.clone()));