fix(audit): P0 反思引擎 LLM 接入 + P1 hand run_id/skill triggers/pipeline v2
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

审计修复 Batch 1 (M4-02/M3-01/M5-01/M6-02):

P0 M4-02: reflection_reflect 从 KernelState 获取 LLM driver
  - 新增 kernel_state 参数,从 kernel.driver() 获取驱动
  - 自动路径(post_conversation_hook)已正常,手动 Tauri 命令路径已修复

P1 M3-01: hand_execute 返回 run_id 给前端
  - HandResult 新增 run_id 字段
  - execute_hand 结果包含 run_id.to_string()

P1 M5-01: skill-discovery 使用后端 triggers 字段
  - BackendSkillInfo 新增 triggers 字段
  - convertFromBackend 优先使用 triggers,fallback tags

P1 M6-02: pipeline_list 支持 v2 YAML 格式
  - scan_pipelines_with_paths 增加 v2 fallback 解析
  - 新增 pipeline_v2_to_info 转换函数
  - discovery.rs 导入 parse_pipeline_v2_yaml

注: M4-01 双数据库问题已在之前批次修复
     M6-01 route_intent 已确认注册,审计结论过时
This commit is contained in:
iven
2026-04-04 18:11:21 +08:00
parent 442ec0eeef
commit 05762261be
5 changed files with 85 additions and 8 deletions

View File

@@ -760,9 +760,14 @@ pub async fn reflection_reflect(
agent_id: String,
memories: Vec<MemoryEntryForAnalysis>,
state: tauri::State<'_, ReflectionEngineState>,
kernel_state: tauri::State<'_, crate::kernel_commands::KernelState>,
) -> Result<ReflectionResult, String> {
let driver = {
let kernel_lock = kernel_state.lock().await;
kernel_lock.as_ref().map(|k| k.driver())
};
let mut engine = state.lock().await;
Ok(engine.reflect(&agent_id, &memories, None).await)
Ok(engine.reflect(&agent_id, &memories, driver).await)
}
/// Get reflection history