From e8cc66636ca5ae6a8ed217c0b484dad594f069f0 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Tue, 12 May 2026 14:06:27 +0800 Subject: [PATCH] fix: use static catalog for capabilities (not dynamic query) --- agent/internal/httpapi/capabilities.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/agent/internal/httpapi/capabilities.go b/agent/internal/httpapi/capabilities.go index cc62129..2601ad5 100644 --- a/agent/internal/httpapi/capabilities.go +++ b/agent/internal/httpapi/capabilities.go @@ -1,6 +1,8 @@ package httpapi -import "net/http" +import ( + "net/http" +) // Capability represents a detection capability the device supports. type Capability struct { @@ -69,11 +71,12 @@ func (s *Server) handleCapabilities(w http.ResponseWriter, r *http.Request) { }) } -// installedNodeTypes queries the media-server's graph node types API. +// installedNodeTypes returns all node types known to this agent build. +// The media-server binary carries the same plugin set, so all catalogued +// types are considered available. func (s *Server) installedNodeTypes() map[string]bool { set := map[string]bool{} - nodeTypes := graphNodeTypesCatalog() - for _, nt := range nodeTypes { + for _, nt := range graphNodeTypesCatalog() { set[nt.Type] = true } return set