feat(tui): add usage overlay and sidebar for displaying usage statistics and tasks

feat(tui): implement status bar with connection and turn state indicators
feat(tui): create workflow panel for agent status and progress visualization
feat(web): introduce web frontend interface with static file serving
feat(ws): add WebSocket interface for real-time communication and session management
This commit is contained in:
asepharyana
2026-07-20 09:04:57 +07:00
parent bceba665c0
commit da2ed6da25
454 changed files with 13979 additions and 29539 deletions
@@ -0,0 +1,38 @@
//! Consensus synthesis — reconciles multiple node outputs into one assessment.
use anyhow::Result;
use tracing::info;
use crate::tools::ToolCtx;
use crate::workflow::hive_mind::types::NodeOutput;
/// Synthesize a consensus from all node outputs.
///
/// Flow: combine node outputs → return consensus text.
/// Uses simple concatenation-based synthesis (avoids LLM call dependency).
pub async fn synthesize_consensus(
nodes: &[NodeOutput],
_tool_ctx: &ToolCtx,
) -> Result<String> {
info!("Synthesizing consensus from {} nodes", nodes.len());
let mut combined = String::new();
for node in nodes {
combined.push_str(&format!(
"\n## {}{}\n\n{}\n",
node.id, node.directive, node.output
));
}
Ok(format!(
"# Consensus Synthesis\n\
Nodes synthesized: {}\n\n\
## Summary\n\
The following node outputs were collected:\n\
{}\n\n\
## Key Findings\n\
Review the individual node outputs above for detailed findings.",
nodes.len(),
combined
))
}