mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-31 22:23:27 +08:00
feat: scaffold ECC 2.0 Rust TUI — agentic IDE control plane
Initial scaffold for ECC 2.0, a terminal-native agentic IDE built with Ratatui. Compiles to a 3.4MB single binary. Core modules: - Session manager with SQLite-backed state store - TUI dashboard with split-pane layout (sessions, output, metrics) - Worktree orchestration (auto-create per agent session) - Observability with tool call risk scoring - Inter-agent communication via SQLite mailbox - Background daemon with heartbeat monitoring - CLI with start/stop/sessions/status/daemon subcommands Tech stack: Rust + Ratatui + Crossterm + Tokio + rusqlite + git2 + clap
This commit is contained in:
33
ecc2/src/comms/mod.rs
Normal file
33
ecc2/src/comms/mod.rs
Normal file
@@ -0,0 +1,33 @@
|
||||
use anyhow::Result;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::session::store::StateStore;
|
||||
|
||||
/// Message types for inter-agent communication.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub enum MessageType {
|
||||
/// Task handoff from one agent to another
|
||||
TaskHandoff { task: String, context: String },
|
||||
/// Agent requesting information from another
|
||||
Query { question: String },
|
||||
/// Response to a query
|
||||
Response { answer: String },
|
||||
/// Notification of completion
|
||||
Completed { summary: String, files_changed: Vec<String> },
|
||||
/// Conflict detected (e.g., two agents editing the same file)
|
||||
Conflict { file: String, description: String },
|
||||
}
|
||||
|
||||
/// Send a structured message between sessions.
|
||||
pub fn send(db: &StateStore, from: &str, to: &str, msg: &MessageType) -> Result<()> {
|
||||
let content = serde_json::to_string(msg)?;
|
||||
let msg_type = match msg {
|
||||
MessageType::TaskHandoff { .. } => "task_handoff",
|
||||
MessageType::Query { .. } => "query",
|
||||
MessageType::Response { .. } => "response",
|
||||
MessageType::Completed { .. } => "completed",
|
||||
MessageType::Conflict { .. } => "conflict",
|
||||
};
|
||||
db.send_message(from, to, &content, msg_type)?;
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user