refactor(api): move webui endpoints out of nodes and fix office state updates

This commit is contained in:
lpf
2026-03-05 16:09:36 +08:00
parent e4da6d2141
commit 3553be2d53
6 changed files with 738 additions and 168 deletions

View File

@@ -14,6 +14,7 @@ import (
"time"
"clawgo/pkg/agent"
"clawgo/pkg/api"
"clawgo/pkg/autonomy"
"clawgo/pkg/bus"
"clawgo/pkg/channels"
@@ -140,7 +141,7 @@ func gatewayCmd() {
fmt.Printf("Error starting channels: %v\n", err)
}
registryServer := nodes.NewRegistryServer(cfg.Gateway.Host, cfg.Gateway.Port, cfg.Gateway.Token, nodes.DefaultManager())
registryServer := api.NewServer(cfg.Gateway.Host, cfg.Gateway.Port, cfg.Gateway.Token, nodes.DefaultManager())
registryServer.SetConfigPath(getConfigPath())
registryServer.SetWorkspacePath(cfg.WorkspacePath())
registryServer.SetLogFilePath(cfg.LogFilePath())