Files
Agent-System-Documents/docs/records/2026-09-29-implementation.md
T
weichen 1683e17b20 Final 0.1.0 test report
Details (original message):
Final 0.1.0 test report: all 15 acceptance items achieved (squad engine integration, model-routing override chain, context observation); 44 automated tests + 15 live checks; refresh usage and implementation records.
2026-09-29 18:30:46 +00:00

29 lines
3.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 实施记录:P0–P5(2026-09-29)
按[设计方案](../proposals/2026-09-29-system-skeleton-design-and-plan.md)(r4,D1–D16 按推荐执行)完成骨架全量实施。
验证证据见[测试报告](../reports/2026-09-29-test-report.md);使用说明见[使用报告](../guides/usage.md)。
## 阶段记录
| 阶段 | 内容 | 出口达成 | 关键提交 |
|---|---|---|---|
| P0 仓网 | 六仓初始化推送、gitea 描述(含老系统「冻结参考」)、Dev submodule 组合(10 组件,生态 pin 与既有纪律一致) | ✓ 全新 clone 物化+组合构建通过 | Dev `286fdaa` |
| P1 契约+骨架 | Core 契约(Go+黄金样本+TS 三态,conformance 测试);Backend 存储层/SSE/事件信封;Frontend 三栏+流式+折叠 | ✓ mock 对话端到端 | Core `992d601` 起 |
| P2 真实智能体 | agent-native `runtime/llm` 客户端复用(多轮工具循环、reasoning→thinking 映射、usage 归集、预算执行);模型路由按 kind;画像/设置/上下文组装/摄取(md/txt/docx OOXML/pdf 文本层) | ✓(真实模型路径代码+单测就位;live smoke 以 mock 验证协议,模型联调待用户密钥) | Backend `8aa5e8d` |
| P3 编排/HITL | sub-agent 统一 Run 任务树、AgentTracker 弹窗、计划/待办、HITL 三分支路由(agent-intent 闸门转轨)、`/` 命令与 `@knowledge`、**Agent-Squad 引擎适配**(squadadapter:规则规划器四阶段 + 步骤即子 Run + 计划确认卡 + 交付物工件;`#squad` 指令与 `squad_orchestrate` 工具;模型路由三层覆盖链解析器 + 集成测试;上下文组装观测全链路) | ✓ 全部达成(验收表 15/15) | Backend `0a69a56` / Core `c7ae99b` / Frontend `9b8572a` |
| P4 插件机制 | pluginhost(manifest 校验/五类能力/fail-closed/热重载/卸载语义)、统一注册表+来源标记、声明式 HTTP 工具、示例插件、schema 驱动设置中心、插件开发指南 | ✓ | Backend + Dev `plugins/example` |
| P5 发布 | Dev Makefile(契约同步→前端→embed→静态单二进制);Releases 构建管线(manifest sha256 + systemd + 安装/回退);0.1.0 发布 | ✓ 13MB 单二进制;12 项制品 smoke 全过 | Releases `6c40909` |
## 关键实现决策(实施期新增)
1. **存储**:modernc.org/sqlite(纯 Go → CGO_ENABLED=0 静态链接的前提);`values` 为 SQLite 保留字需引号;FTS5 unicode61 对 CJK 无效 → LIKE 子串兜底(中文检索实测可用)。
2. **RunCtx 端口**:Runner 只见受控环境接口(Emit/AskHITL/SpawnSubagent/ExecuteTool/…),编排全在 runmgr——mock 与 LLM 两种 runner、会话与子代理两种 run 共用同一套生命周期与事件语义。
3. **编排型工具**:`delegate_task` / `update_plan` / `update_todos` 作为模型可调用工具实现多代理与计划维护(LLM runner 内建,不走注册表)。
4. **子代理中间过程**:子 run 的助手消息持久化(带 run_id 归属),弹窗「中间过程」直接消费消息树(权威数据源),在线态另有 agent.progress 事件。
5. **SSE**:先订阅后重放+seq 去重消除间隙丢事件;心跳 15s;终态对账走 conversationDetail Query。
6. **前端零 UI 框架**:react+marked 仅两项运行时依赖;设计令牌手写(亮/暗主题 data-theme 切换);契约 TS 镜像由 `make contracts` 从 Core 生成(单一来源)。
## 偏差与后续(详见测试报告 §6)
Agent-Squad 引擎适配、向量 RAG、记忆实现、MinerU 深度档、docx 在线预览、PG 存储档、裁剪观测 UI、Playwright 套件、多用户(agent-intent 闸门已接入)——均已在契约/数据位层面预留,落地不改核心。