84bf100a12
example/qq: add typing indicator on private messages
...
- setInputStatus helper wrapping NapCat set_input_status API
- startTyping/stopTyping with goroutine-based typing manager
(5s interval, 30s auto-timeout)
- start typing on webhook private message receipt
- stop typing when output channel sends a response
- fix plg.json UTF-8 BOM that broke plugindev parse
2026-07-30 09:24:20 +08:00
4d01e75282
example/qq: use relative replace path, disable bundle mode
2026-07-29 15:24:43 +08:00
c5bcae9404
sdk: add RegisterInputChannel + NoMemory/Cleaner support
...
- ChannelDef struct: NoMemory bool + Cleaner func(string) string
- InputChannelRegistrar interface + RegisterInputChannel method
- RegisterOutputChannel now takes ChannelDef parameter
- QQ example registers input channel with NoMemory:true + Cleaner
2026-07-29 14:46:15 +08:00
04837f237d
plugindev: 全面 plg.json 持久化 + --replace 支持 + 文档
2026-07-25 15:47:49 +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
5e0c8d5a40
feat(qq): download task tracking with qq_get_download_tasks, sync re-added
2026-07-23 10:41:08 +08:00
e182b89983
feat(qq): async file download, get_private_file_url, mark-as-read, get_recent_contacts
2026-07-23 10:36:49 +08:00
e030a9b9f9
refactor(qq): remove local message cache, direct NapCat query, URL-based file download
2026-07-23 10:27:55 +08:00
7705e4eb3b
feat(a2a): add management tools (a2a_configure, a2a_restart, a2a_status) for dynamic config
2026-07-22 17:32:28 +08:00
ab3c0bfd2d
fix(qq): use file_id instead of file field for group file download
...
NapCat file messages have file_id in data["file_id"], not data["file"].
data["file"] is the filename, causing get_file API to return empty.
Also pass url field to downloadFile for URL-direct fallback.
2026-07-21 15:33:41 +08:00
1a3e72e899
fix: use short config keys in RegisterDef, remove generics helpers
...
- qq, a2a, bili, files, rss: RegisterDef keys changed from
namespaced (e.g. "plugin.qq.listen") to short flat keys ("listen")
- a2a, bili: Get() calls updated to match short keys
- rss: replaced readCfg generics with getSetting, added SetAutoRestart(true)
- files: already uses short key Get, only RegisterDef needed fixing
2026-07-21 13:20:13 +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
75ae2b4692
fix: napcat returns json.RawMessage to avoid double-quoting in C ABI bridge
...
go_invoke_tool does json.Marshal(r) on handler results. When r is a string,
the raw JSON gets wrapped in quotes and escapes, causing the core's
json.Unmarshal into map[string]interface{} to fail (displayed as map[]).
Changed return type to json.RawMessage (implements json.Marshaler, outputs
raw bytes inline). Added rawString() helper for callers that need the
string representation.
2026-07-20 17:51:36 +08:00
bf08764c29
refactor: qq output channel to payload/meta/type interface
...
- handleChannelOutput: read payload/meta/type instead of content JSON
- Route by type: text/voice/image/file
- buildOutputHelp: show new parameter format
- Remove fixJSON (no longer needed without JSON-within-JSON)
2026-07-19 10:29:22 +08:00
02997a0dca
fix: QQ interrupt text explicitly requires output_send__ reply
2026-07-18 21:29:00 +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
1762f0c34b
docs: 修正全部文档使其与源码实现一致
...
- Plugin.Start(sdk *PluginSDK) 接口签名改为指针
- 方法表重写: 移除 CallLLM/QueryKnowledge/SetMemory 等不存在方法
- IOInjector 参数顺序修正为 (source, channel, text)
- 删除虚构 SDKConfig, 替换为实际 New() 构造函数签名
- .hmap 内容描述一致化 (plugin.so + plugin.dll + main.lua)
- 添加 meta/ 包元数据文件
2026-07-18 20:47:17 +08:00