推进 server-rs DDD 分层与新接口接线

This commit is contained in:
Codex
2026-04-29 15:46:16 +08:00
parent 9d3fcfae77
commit f82775b852
89 changed files with 3657 additions and 9636 deletions

View File

@@ -1,3 +1,32 @@
//! AI 领域事件过渡落位。
//!
//! 用于表达任务开始、阶段完成、任务失败和结果引用挂接等跨上下文事实。
use crate::{
AiResultReferenceKind, AiTaskKind, AiTaskStageKind, AiTaskStatus, AiTextChunkSnapshot,
};
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum AiTaskDomainEvent {
TaskCreated {
task_id: String,
task_kind: AiTaskKind,
owner_user_id: String,
},
TaskStatusChanged {
task_id: String,
status: AiTaskStatus,
},
StageStarted {
task_id: String,
stage_kind: AiTaskStageKind,
},
StageCompleted {
task_id: String,
stage_kind: AiTaskStageKind,
},
TextChunkAppended {
chunk: AiTextChunkSnapshot,
},
ResultReferenceAttached {
task_id: String,
reference_kind: AiResultReferenceKind,
reference_id: String,
},
}