75447aa7f8
fix(plugins): 全插件审查修复(qq/a2a/memo/calendar/rss/browser)
...
17 个生产插件全量审查:编译/vet 全过、无硬编码密钥、内核
executeToolCall 有 panic recover + 超时兜底。发现并修复:
P1 qq: downloadURL 裸 http.Get 无超时 → 120s client(挂起泄漏)
P2 a2a: inbound http.Server 无超时 → Read 30s/Write 120s/Idle 60s
(慢速连接占用 goroutine)
P5 memo/calendar/rss: 数据持久化直写 → atomicWriteJSON temp+rename
(崩溃截断 JSON 丢全部数据)
P6 qq: 3 处后台 goroutine(已读标记/rcon转发/下载任务)加 recover
(工具调用外 panic 会带崩 homed 进程)
P7 browser: dump-dom failback Kill 后补 wait 回收僵尸进程
已知可接受项:bili output_dir 用户可控(本机单用户)、recoverydiag
db_path 可读任意 sqlite(诊断工具固有权限,argv 传参无注入)。
全部经 plugindev 重打包 v+0.1 安装验证 config_kept=true。
2026-08-26 16:46:06 +08:00
c431af0902
fix(browser): render 改走共享后端(带登录态),v2.2.1
...
browser_render 原实现每次独立 chromium --dump-dom 冷启动:不带共享
profile 登录态、每次 ~2s 启动开销。现改为主路径经 CDP 9222 开临时
标签页渲染(Title+OuterHTML)后即关——登录态与 interactive 会话一致;
后端不可用时保持 dump-dom failback(补 30s 超时防挂死)。
返回新增 mode 字段(backend-tab / local-dump-dom)便于 agent 判断。
修复过程中清理 python 重写残留的重复函数定义。
2026-08-26 12:38:53 +08:00
bb0c274563
feat(browser): systemd 托管共享浏览器后端 + 全机 agent 标签页架构 v2.2.0
...
浏览器插件重新定位为本机所有 agent 的统一浏览器操作壳:
1. 主路径:homeagent-browser.service(systemd 托管)
- chromium --headless --remote-debugging-port=9222
--user-data-dir=<data>/browser_profiles/shared
- 独立于 homed 生命周期,崩溃自动重启,登录态持久保存
- 本机所有 agent(HomeAgent/pi/opencode/deepseekharness 等)
共享同一实例:登录一次全机可用
2. 每 agent 一个标签页(CDP Target 隔离),同 source 复用已有标签页
3. browser_start 探测链:CDP 9222 在线 → 直连;服务已装未跑 →
systemctl start 等待就绪;未安装 → 返回 need_install+guide 引导
4. 新工具 browser_install:探测 chromium 二进制 → 写 systemd 单元 →
daemon-reload + enable --now → 验证 CDP → 返回全机共享使用指南
(含其他 agent 经 connectOverCDP 接入的说明);无 root 权限时
返回手动安装命令清单
5. failback:无法联网装 chromium 的机器,重试 start 自动降级本地
spawn 临时模式(登录态不持久,仅保证功能可用)
工具链打包 v2.2.0 已部署验证:need_install 引导 / install 装服 /
start 复用与开新标签页全链路通过。
2026-08-26 12:22:15 +08:00
c945eace1a
fix(webui): 附件死锁 + qq 插件文件发送收敛到 output 通道
...
1. webui 附件死锁修复(output_send__webui 发图 60s 超时根因)
EventAgentOutput 订阅者已持 chatMu,附件分支调 addChatMsg(内部
再次 Lock)——sync.Mutex 不可重入导致 Publish 永久阻塞,工具超时、
图片永远发不出来。改为持锁状态下直接操作 chatHistory+persist。
2. qq 插件 image/file 分支收敛到 output 通道
output_send__qq 的 type=image/file 此前只透传 payload 给 CQ 码,
发本地文件必须绕道 upload_group_file 独立工具。现在与 voice 分支
同模式:本地路径拷入 NapCat 共享目录转 file:///app/files/<name> URI,
http(s)/file:// URL 保持透传。upload_group_file 保留作为群文件柜
专用入口。
验证:工具链重编译 → qq.hmap 重打包 → pluginmgr overwrite 安装
(config_kept=true)→ agent 经 output_send__qq 用本地路径发图成功,
mascot.webp 已落共享目录。
2026-08-26 11:14:03 +08:00
1f1233b823
refactor: P0-P3 fixes, C1 cleanup, architecture diagrams, go.work upgrade
...
- P0-1: ProviderError type + ReportStatus for precise 401/403 detection
- P0-2: Remove -config flag from deploy/homeagent.service
- P2-1: 5s debounce on context.go Save()
- P2-2→C1: Delete output_set_channel entirely
- P2-3: Extract mediaDataURL/mediaChat helpers
- P2-4: Dedup defaultSources var
- P3: Delete dead packages (embed/tokenizer/container/snapshot)
- P3: Delete dead functions (messagesToMap, RunStageAll)
- CL: Update .gitignore, docs, Makefile, gojieba removal
- Config: Delete config/config.yaml, update docs
- Arch: Remove EmitOutputTo from emitResponse
- CL-1: go.work 1.19→1.21
- Docs: Add Mermaid architecture diagrams to README
- Docs: Add kernel-rebuild requires plugin-rebuild note to PLUGIN_DEV.md
2026-07-12 11:42:56 +08:00
dad62516a8
fix: openclaw translateAndRegister uses full tool name for LLM visibility
2026-07-10 13:55:03 +08:00
b55f1dcf0e
fix: cap distiller startup scan and switch to formal SDK module dependency
...
- replace vendored third_party/homeagent-sdk with formal module dependency
- keep canonical SDK via go.mod pinned commit
- optimize distiller startup loading to stream recent raw records only
- parse timestamps correctly and cap startup load to 5000 records
- remove quadratic string building in raw record parsing
- restore fast startup while preserving memory pipeline
2026-07-06 20:18:13 +08:00
50e5dec745
feat: converge dynamic plugins onto canonical homeagent-sdk
...
- Separate built-in plugin interface from external plugin interface
- Route dynamic plugin loading through homeagent-sdk/sdk using reflection
- Turn internal/sdk into an enhanced wrapper over canonical SDK types
- Vendor SDK repo snapshot under third_party/homeagent-sdk for stable builds
- Keep internal constructors/adapters for memory, knowledge, llm, settings
- Align dynamic QQ loading with canonical SDK chain
2026-07-06 19:27:51 +08:00