fix: sync agent MCP payloads and query runtime state

This commit is contained in:
kory
2026-09-30 13:16:27 +08:00
parent 7f000b8833
commit 2a9d01d7f7
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"`