| docs(example): 为每个插件补 README 此前 example/ 下 21 个插件里,13 个完全没有 README,另 4 个是 hmapdev init 生成的脚手架样板(# <name> + plugin build + Install 三行, 等于从没被写过)。只有 deepsearch / vikunja / plugindev / luademo 是真实文档。 本次为 **17 个**插件写了真文档(13 个缺失 + 4 个样板),现在 21 个全部有内容。 ## 写法 每个 README 覆盖:能力一句话 → 为什么需要 → 工具表 → 配置项表 → 通道与钩子(有才写)→ 构建 → 已知边界。 **事实全部从源码读出来,不推测**: - 工具名核对到注册点(含 tp+"x" / p.name+"_x" 前缀拼接,展开成最终名) - 配置键与默认值取自 RegisterDef / getStr 默认值 - 通道名、钩子名、依赖命令逐条 grep 确认 - 版本号与已部署实例交叉核对,17 个里 16 个一致 ## 几处按源码写、与直觉不同的点 - **rss**:订阅时会把抓到的历史条目一次性标为 seen,所以订阅一个源 **不会**把历史文章全推一遍 —— 这是避免刷屏的关键,写进了文档。 - **files**:路径校验是**两道**(规范化后判断 + 解析符号链接后再判断), 只做前者的话沙箱里的软链接就能逃逸。两种情况报错文案不同。 - **qq**:身份必须**绑帧**而非存插件全局,源码注释记录了由此产生的两个真实故障 (中断抢占恢复后权限门整体失效、运行中到达的消息改写正在跑那一轮的身份)。 多来源合并时权限取**交集**。硬私有工具按前缀一律拒绝。这些是安全关键, 单独成节写清楚。 - **memo**:待办与备忘录**刻意分两类**(一提醒一不提醒),提醒注入带 NoMemory。 - **sanitizer**:不注册任何工具,只挂三个阶段钩子;依赖 ABI v2 的 stage 写回能力。 - **editdoc**:本目录是 v1.0.0(单工具),而线上跑 v2.0.0(全能版,源码未公开)—— 在文档开头显式标注,**不按 v2 描述**,避免读者以为这里就是线上那份。 ## 验证 - 21/21 文件非空且非样板(最小 913B,最大 6845B) - 逐个核对 README 中出现的工具名能在源码找到依据;5 处报警经复核**全是误报** (ai_image_generate/music_* 前缀来自 metadata 的 name,on_input 等是钩子不是工具) - README 版本号 vs 线上 plugin.json:16/17 一致,editdoc 的差异已显式说明 注:本仓既有未提交改动(example/qq/plugin.go、sdk/plugin.go)**未纳入本次提交**。 | 1 天前 |
| examples: update weather with v0.8.0 API surface, add luademo Lua example, fix go.mod replaces | 1 个月前 |
| feat: sdk NoMemory/Cleaner + example build fixes - sdk/plugin.go: ToolDef adds NoMemory/Cleaner fields - sdk/plugin_test.go: unit tests for NoMemory/Cleaner - all example plugins: NoMemory/Cleaner annotated for each tool - plugindev/templates.go: template shows NoMemory/Cleaner pattern - plugindev/cmd_build.go: fix ensureGoMod, buildBundle/buildTarget sdkPath param, NewPluginFactory - example/go.mod: add external dependency declarations (chromedp, gofeed) - add main.go stubs for all example plugins | 1 个月前 |
| fix(examples): 全插件安全审查修复(qq/a2a/memo/calendar/rss/browser/bili/recoverydiag) 审查发现并修复 7 项问题: - P1 qq: downloadURL 裸 http.Get 无超时 → 120s client - P2 a2a: inbound http.Server 零超时 → Read 30s/Write 120s/Idle 60s - P3 bili: output_dir 配置项零校验 → 系统目录黑名单(/、/etc、/usr、/var 等) - P4 recoverydiag: db_path LLM 可控任意 sqlite → 强制限制 data 目录内 - P5 memo/calendar/rss: os.WriteFile 直写 → atomicWriteJSON (temp+rename) - P6 qq: 3 处后台 goroutine(已读/rcon转发/下载)加 panic recover - P7 browser: dump-dom failback Kill 后补 wait 回收僵尸进程 recoverydiag 此前被 .gitignore 排除,但其 db_path 安全修复 属生产代码,故取消忽略并入库。 全部经 plugindev 重打包升版安装验证 config_kept=true。 | 25 天前 |
| fix(examples): 全插件安全审查修复(qq/a2a/memo/calendar/rss/browser/bili/recoverydiag) 审查发现并修复 7 项问题: - P1 qq: downloadURL 裸 http.Get 无超时 → 120s client - P2 a2a: inbound http.Server 零超时 → Read 30s/Write 120s/Idle 60s - P3 bili: output_dir 配置项零校验 → 系统目录黑名单(/、/etc、/usr、/var 等) - P4 recoverydiag: db_path LLM 可控任意 sqlite → 强制限制 data 目录内 - P5 memo/calendar/rss: os.WriteFile 直写 → atomicWriteJSON (temp+rename) - P6 qq: 3 处后台 goroutine(已读/rcon转发/下载)加 panic recover - P7 browser: dump-dom failback Kill 后补 wait 回收僵尸进程 recoverydiag 此前被 .gitignore 排除,但其 db_path 安全修复 属生产代码,故取消忽略并入库。 全部经 plugindev 重打包升版安装验证 config_kept=true。 | 25 天前 |