新增: 并行调度+Token预算池+事件协议+前端类型+编译警告清理
- Coordinator.dispatch_with_budget: JoinSet层内并行+层间串行+预算超限降级串行 - TokenBudgetPool: AtomicU64 CAS无锁并发安全,0=不限制 - 4个新事件: AiPlanCreated/AiSubTaskStatusChanged/AiMergeCompleted/AiConflictResolved - 前端类型: PlanRecord/SubTaskRecord/ConflictRecord/PlanLayerInfo/ConflictInfo - PlanProgress.vue: 接入真实状态+persona徽章+冲突徽章+i18n - 编译警告全部清零(audit子模块allow+事件allow+record allow) - Coordinator测试27个全绿(含4个Token预算+4个并行调度)
This commit is contained in:
@@ -734,3 +734,81 @@ export interface KnowledgeConfig {
|
||||
/** embedding 模型名(如 embedding-3) */
|
||||
embedding_model: string | null
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 多 Agent 并行执行(Plan/SubTask/Conflict)
|
||||
// ============================================================
|
||||
|
||||
/** Plan 执行状态 */
|
||||
export type PlanStatus = 'planning' | 'executing' | 'merging' | 'done' | 'error'
|
||||
|
||||
/** SubTask 执行状态 */
|
||||
export type SubTaskStatus = 'pending' | 'running' | 'done' | 'error'
|
||||
|
||||
/** 冲突解决状态 */
|
||||
export type ConflictResolution = 'pending' | 'a' | 'b' | 'merged' | 'manual'
|
||||
|
||||
/** 冲突类型 */
|
||||
export type ConflictType = 'file' | 'semantic'
|
||||
|
||||
/** Plan 记录 */
|
||||
export interface PlanRecord {
|
||||
id: string
|
||||
conversation_id: string
|
||||
user_message_id: string | null
|
||||
status: PlanStatus
|
||||
subtask_count: number
|
||||
created_at: string
|
||||
completed_at: string | null
|
||||
}
|
||||
|
||||
/** SubTask 记录 */
|
||||
export interface SubTaskRecord {
|
||||
id: string
|
||||
plan_id: string
|
||||
persona_id: string | null
|
||||
intent: string
|
||||
status: SubTaskStatus
|
||||
layer: number
|
||||
/** 依赖的 SubTask id 列表(JSON 数组字符串,需 parse) */
|
||||
deps: string | null
|
||||
/** Git worktree 分支名(null=非 Git 工程降级串行) */
|
||||
branch: string | null
|
||||
created_at: string
|
||||
completed_at: string | null
|
||||
}
|
||||
|
||||
/** 冲突记录 */
|
||||
export interface ConflictRecord {
|
||||
id: string
|
||||
plan_id: string
|
||||
file_path: string
|
||||
conflict_type: ConflictType
|
||||
subtask_a: string | null
|
||||
subtask_b: string | null
|
||||
diff_a: string | null
|
||||
diff_b: string | null
|
||||
resolution: ConflictResolution
|
||||
resolved_by: 'reviewer' | 'user' | null
|
||||
created_at: string
|
||||
resolved_at: string | null
|
||||
}
|
||||
|
||||
/** PlanProgress 展示用 DAG 层结构(事件载荷) */
|
||||
export interface PlanLayerInfo {
|
||||
items: Array<{
|
||||
id: string
|
||||
persona_id: string | null
|
||||
intent: string
|
||||
status: SubTaskStatus
|
||||
}>
|
||||
}
|
||||
|
||||
/** 冲突信息(AiMergeCompleted 事件载荷) */
|
||||
export interface ConflictInfo {
|
||||
id: string
|
||||
file_path: string
|
||||
conflict_type: ConflictType
|
||||
subtask_a: string | null
|
||||
subtask_b: string | null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user