fix: sync agent MCP payloads and query runtime state

This commit is contained in:
kyaring
2026-09-28 13:20:42 +08:00
parent 0c8ac02f82
commit 3ad7faba3b
3 changed files with 57 additions and 4 deletions
+2
View File
@@ -138,6 +138,8 @@ func run(hub, name, token string, insecure bool) error {
func handle(writeJSON func(cluster.Message) error, exec executor.Local, mcpRuntime *cluster.MCPRuntime, msg cluster.Message) error {
switch msg.Action {
case "mcp_list":
return writeJSON(cluster.Message{ID: msg.ID, Status: "success", Payload: mcpRuntime.List()})
case "mcp_call":
var p struct {
Server string `json:"server"`