P2c: in-app choir agent with proposals and approval

This commit is contained in:
Emil
2026-11-01 02:27:44 +03:00
parent 0df07577a1
commit 2ecb8822de
20 changed files with 2236 additions and 30 deletions
+40
View File
@@ -75,6 +75,7 @@ impl VeinId {
#[serde(rename_all = "snake_case")]
pub enum Actor {
Hand,
Agent,
Api,
Mcp,
System,
@@ -165,6 +166,9 @@ pub enum ServerMessage {
id: u64,
core: CoreSummary,
},
AgentHistory {
messages: Vec<AgentMessage>,
},
Error {
id: Option<u64>,
code: ErrorCode,
@@ -219,6 +223,16 @@ pub enum Command {
to: u8,
},
Render,
AgentAsk {
text: String,
},
AgentApprove {
id: u64,
},
AgentReject {
id: u64,
},
AgentReset,
Undo,
Redo,
/// Journal-only: a core was imported through the binary path.
@@ -282,6 +296,32 @@ pub enum Event {
path: String,
duration_sec: f32,
},
AgentMessage {
message: AgentMessage,
},
AgentProposal {
id: u64,
description: String,
commands: Vec<Command>,
},
AgentResolved {
id: u64,
applied: bool,
},
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum AgentRole {
User,
Agent,
System,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AgentMessage {
pub role: AgentRole,
pub text: String,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]