8c10b7ecc7
feat(browser): 交互式会话的 timeout 改为必填,并补参数校验与测试
...
此前 `timeout` 默认 10m:Agent 不传也能开会话,于是"忘记设时长"会静默拿到一个
10 分钟就自己消失的浏览器会话,排查起来像是浏览器不稳。
改为**必填**:
- 新增 `parseBrowserSessionTimeout`(空值 → "timeout is required;创建浏览器会话时必须
明确指定关闭时长,如 15m 或 2h";非法或 ≤0 → 明确报错),工具 schema 的
`required` 加上 `timeout` 并同步描述;
- 缺参时返回可读错误结果(而不是静默套默认值);
- 新增 `plugin_test.go`(62 行)钉住「不传 timeout 必须报错」等边界;
- 示例版本 2.3.0 → 2.4.0,顺带对齐结构体字段(gofmt)。
验证:`go vet ./...` 干净、`go test ./...` → ok(browser 模块自带 go.mod)。
2026-09-12 20:17:18 +08:00
d57c5eaf3e
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。
2026-08-26 17:04:41 +08:00
cca9fdce9c
example: 新增 acp(ACP 代理通信)、vanblog(VanBlog 博客管理) 插件; 多插件工具调用检测与清理改进; weather 移除 onRemove/文本记忆; plugindev 精简
2026-08-15 09:03:05 +08:00
cb7999ca71
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
2026-07-25 11:17:21 +08:00
34f91ebd1a
fix(browser): pre-allocate chromedp context, remove timeout contexts from interactive handlers
...
- Pre-allocate browser in handleBrowserStart with chromedp.Run(s.ctx)
to avoid the first-Run timeout killing the browser process
- Replace all per-action context.WithTimeout with s.ctx in navigate,
click, type, screenshot, html, scroll handlers
- Add cleanupLoop goroutine for session-level timeout safety
- This matches chromedp docs warning: first Run with timeout context
stops the entire browser
2026-07-23 13:53:40 +08:00
52dc22f86f
feat: add example plugins (ai_image, calendar, music, rss, weather), fix .gitignore, move gengskill to tools/
2026-07-21 12:45:17 +08:00
2284d8897c
feat: restore bili plugin, merge only web+webfetch into browser plugin
2026-07-18 21:11:18 +08:00
0856a9b2c3
feat: merge web/webfetch/bili into single browser plugin (search/fetch/render/video)
2026-07-18 21:06:56 +08:00