mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-11-01 06:47:29 +00:00
docs: 按源码全面校正(插件数/内置 timer/RPC 数/工具数/失效行号)
逐条对着源码核过,修掉 5 类与实现不符的陈述(中英四份文档同步): 1. **内置插件数 20 → 17** `internal/plugins/all.go` 的空白导入实际是 17 个。旧文档还列了 `timer` (已外置)与 `data`/`kbtree`(根本不是内置插件,前者只有 skills 目录, 后者未进 all.go)。清单按 all.go 重写。 涉及:README、README_EN(含「许可」章节的 AGPL 覆盖范围)、OVERVIEW 中英、 ARCHITECTURE 中英的加载方式表。 2. **删除所有把 timer 当内置插件的表述** ARCHITECTURE 中英目录树里的 `internal/plugins/timer/` 行、 PLUGIN_DEV 内置插件示例表的 Timer 行(该行还与同页下方「timer 已移出内置插件」 的说明自相矛盾)。示例表改用 healthcheck(真实存在、30m 定时自检)。 3. **子进程 RPC 方法数 55 → 82** 权威清单是 `internal/plugin/proc/protocol.go` 的 Method 常量, 实际 82 个(settings 16 / plugin 9 / io 8 / secrets 7 …)。 v1.1.1「51 → 55」作为历史叙述保留,但补注说明 82 才是当前值, 避免读者把 55 当现值。 4. **qq 示例工具数 20 → 24** 按 `example/qq/plugin.go` 的 `Name: tp + "..."` 实数。 5. **修掉整张失效的「文件:行号」引用表** 原文写 `context.go:155` / `document.go:206` / `indexer.go:96+111`, 但 memory 重组后 `context.go` 已迁到 `agent/core/`,行号全部错位。 改为**函数名锚点**(`RelevanceContext.Prune`、`Store.Query`、 `Indexer.vectorSearchEntities`),并改正 `distill.go` 的算法描述: 文档写 Bigram Jaccard,源码是**加权** Jaccard(`scene_emerge.go` 有明确注释), 阈值 `sim > 0.75` 在 `distill.go`。 同时补 Provider 接口漏项:实际有 4 个方法(Name / Chat / ChatStream / MaxContextTokens),文档只写了前 3 个。 验证:`go build ./...` 通过;文档内相对链接 0 坏链; 引用的 22 个 .go 路径逐个 stat 存在(`internal/memory/media/` 两处是 「已删除机制」的历史叙述,指向不存在路径是正确语义,保持不变)。
This commit is contained in:
@ -802,7 +802,7 @@ pmgr.ReloadPlugins() // 重载所有插件
|
||||
|------|------|------|
|
||||
| [weather](https://github.com/JianFeeeee/homeagentsdk/tree/main/example/weather) | Go | 天气查询(wttr.in),演示 NoMemory/Cleaner/阶段钩子/通道/文本记忆 |
|
||||
| [luademo](https://github.com/JianFeeeee/homeagentsdk/tree/main/example/luademo) | Lua | Lua 全功能示例,覆盖 v0.8.0 Lua SDK 全部 API 面 |
|
||||
| [qq](https://github.com/JianFeeeee/homeagentsdk/tree/main/example/qq) | Go | NapCat OneBot 对接,20 个工具,输入/输出通道完整对接 |
|
||||
| [qq](https://github.com/JianFeeeee/homeagentsdk/tree/main/example/qq) | Go | NapCat OneBot 对接,24 个工具,输入/输出通道完整对接 |
|
||||
| [memo](https://github.com/JianFeeeee/homeagentsdk/tree/main/example/memo) | Go | 备忘管理,PreAction 注入 + 定时打断双提醒 |
|
||||
| [files](https://github.com/JianFeeeee/homeagentsdk/tree/main/example/files) | Go | 文件系统操作,4 种写入模式,沙箱隔离 |
|
||||
| [browser](https://github.com/JianFeeeee/homeagentsdk/tree/main/example/browser) | Go | 网络搜索、网页抓取(SSRF)、浏览器渲染(合并自 web/webfetch) |
|
||||
@ -826,7 +826,7 @@ pmgr.ReloadPlugins() // 重载所有插件
|
||||
|
||||
| 插件 | 位置 | 特点 |
|
||||
|------|------|------|
|
||||
| Timer | `internal/plugins/timer/` | 最简单的完整示例,注册一个工具 + 中断反馈 |
|
||||
| Healthcheck | `internal/plugins/healthcheck/` | 定时自检(30min)+ 工具面自报状态,最简的工具型内置插件 |
|
||||
| CLI | `internal/plugins/cli/` | Unix socket 监听 + 同步请求响应 |
|
||||
| WebUI | `internal/plugins/webui/` | HTTP 服务 + 依赖注入 |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user