-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
area:coreCore runtime and session stateCore runtime and session statearea:securityApproval, sandbox, and security policyApproval, sandbox, and security policyneeds-triageIssue needs initial triageIssue needs initial triage
Description
背景\n 目前承担了过多职责(LLM调用、工具调度、审批、上下文压缩、事件写入、hook分发),单文件体量和耦合度都较高。\n\n## 问题\n- 行为变更难以定位回归点。\n- 新能力(AI SDK step callbacks / approval bridge)接入成本高。\n- 测试粒度偏粗,难做模块级回归。\n\n## 目标\n将 runtime 主循环按职责拆分为可独立测试模块:\n1. :回合生命周期、history/context、hook/event 调度。\n2. :单轮推理与工具执行编排接口。\n3. :工具调用与结果标准化。\n\n## 范围\n- 只做架构重组,不改变外部 API(、 接口保持兼容)。\n- 不引入新功能。\n\n## 验收标准\n- 不再是单体入口(核心逻辑拆入子模块)。\n- 现有 全量通过。\n- 新增至少 3 个模块级单测,覆盖:生命周期调度、工具结果回填、异常/取消路径。\n\n## 关联\n- #196\n
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:coreCore runtime and session stateCore runtime and session statearea:securityApproval, sandbox, and security policyApproval, sandbox, and security policyneeds-triageIssue needs initial triageIssue needs initial triage