RegisterStage: add scope parameter, remove RegisterStageOwnTools

- SDK: RegisterStage(stage, handler, scope...) with StageScopeGlobal/StageScopeOwnTools
- Delete RegisterStageOwnTools, migrate cmd and qq plugins
- Internal SDK: add StageScope alias
- Docs: update all zh/en docs for C ABI buildmode and stage scope
- C ABI: fix nil errorOut in Handle.Start/Handle.Stop (SIGSEGV fix)
- C ABI header: add dispatch IDs 26-45 for Settings/Doc/Knowledge/LLM/Social/TextMemory
This commit is contained in:
root
2026-07-17 11:25:54 +08:00
parent 7ffef4fb06
commit d0558aa705
10 changed files with 173 additions and 77 deletions

View File

@ -49,7 +49,7 @@ HomeAgent 是一个持续运行的个人智能 Agent 框架。
**插件系统** (`internal/plugin/`):
- 内置插件:Go `init()` 自注册,编译进内核
- 外部插件:Go `-buildmode=plugin` 编译为 `.so`/`.dll`,通过 `plugin.Open` 动态加载;也支持 Lua 脚本插件
- 外部插件:Go `-buildmode=c-shared` 编译为 `.so`,通过 C ABI bridge 动态加载;也支持 Lua 脚本插件
- PluginSDK (`internal/sdk/`) 定义四通道:RegisterTool / RegisterStage / Subscribe / RegisterOutputChannel
- 阶段钩子 7 个:on_input → pre_action → post_action → before_toolcall → after_toolcall → before_output → after_output