memory: add audit log events

This commit is contained in:
2026-05-25 03:24:04 +09:00
parent 08710d808d
commit 10d3556792
17 changed files with 1534 additions and 60 deletions
+18
View File
@@ -425,6 +425,11 @@ pub enum Event {
result: serde_json::Value,
},
Alert(Alert),
/// Latest memory extract/consolidation lifecycle event for UI observability.
///
/// This is not part of LLM history or prompt context; clients may display it
/// briefly as operational status.
MemoryWorker(MemoryWorkerEvent),
/// Pod has started compacting the current session.
///
/// Fired immediately before a compaction run. Success is signalled by
@@ -460,6 +465,19 @@ pub struct Alert {
pub timestamp_ms: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MemoryWorkerEvent {
pub worker: String,
pub status: String,
pub run_id: String,
pub trigger: String,
pub reason: String,
/// Human-readable compact form for actionbar rendering.
pub message: String,
/// Milliseconds since the Unix epoch.
pub timestamp_ms: i64,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum AlertLevel {