mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-21 09:28:14 +00:00
feat: add plgreload tool for atomic plugin reload
- Agent can now call plgreload to reload plugins/ directory - Atomic swap: new devices Start → routes swapped → old devices Stop - Output channel capability validation on output_send - output_list_channels tool for channel discovery - OneBot V11 protocol implementation (Reverse WebSocket) - Plugin = container with embedded IO channel (composition) - Unified ToolDef type (agentIO.ToolDef = plugin.ToolDef)
This commit is contained in:
@ -251,6 +251,8 @@ func main() {
|
||||
DocStore: docStore,
|
||||
Knowledge: ks,
|
||||
Personality: personality,
|
||||
PluginReg: pluginReg,
|
||||
PluginDir: filepath.Join(cfg.Daemon.DataDir, "plugins"),
|
||||
})
|
||||
agent.Start()
|
||||
defer agent.Stop()
|
||||
@ -292,12 +294,4 @@ func main() {
|
||||
log.Printf("[homed] stopped")
|
||||
}
|
||||
|
||||
func countIOPlugins(r *plugin.Registry) int {
|
||||
n := 0
|
||||
for _, p := range r.List() {
|
||||
if p.IOConfig() != nil {
|
||||
n++
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user