diff --git a/internal/server/handler_audit.go b/internal/server/handler_audit.go index 8056e3089..1fb978080 100644 --- a/internal/server/handler_audit.go +++ b/internal/server/handler_audit.go @@ -40,6 +40,7 @@ type auditResultResponse struct { AuditableBytes int64 `json:"auditableBytes"` Analyzability float64 `json:"analyzability"` TierProfile audit.TierProfile `json:"tierProfile"` + Kind string `json:"kind,omitempty"` } type auditSummary struct { diff --git a/internal/server/handler_check.go b/internal/server/handler_check.go index d9e5adfd0..11ac5d189 100644 --- a/internal/server/handler_check.go +++ b/internal/server/handler_check.go @@ -23,6 +23,7 @@ type skillCheckResult struct { Version string `json:"version"` Status string `json:"status"` InstalledAt string `json:"installed_at,omitempty"` + Kind string `json:"kind,omitempty"` } func (s *Server) handleCheck(w http.ResponseWriter, r *http.Request) { diff --git a/internal/server/handler_install.go b/internal/server/handler_install.go index eb3c0301b..a919193ee 100644 --- a/internal/server/handler_install.go +++ b/internal/server/handler_install.go @@ -91,6 +91,7 @@ func (s *Server) handleInstallBatch(w http.ResponseWriter, r *http.Request) { SkipAudit bool `json:"skipAudit"` Into string `json:"into"` Name string `json:"name"` + Kind string `json:"kind,omitempty"` } if err := json.NewDecoder(r.Body).Decode(&body); err != nil { writeError(w, http.StatusBadRequest, "invalid JSON body") @@ -251,6 +252,7 @@ func (s *Server) handleInstall(w http.ResponseWriter, r *http.Request) { SkipAudit bool `json:"skipAudit"` Track bool `json:"track"` Into string `json:"into"` + Kind string `json:"kind,omitempty"` } if err := json.NewDecoder(r.Body).Decode(&body); err != nil { writeError(w, http.StatusBadRequest, "invalid JSON body") diff --git a/internal/server/handler_sync.go b/internal/server/handler_sync.go index b93f99d5c..9e6729db9 100644 --- a/internal/server/handler_sync.go +++ b/internal/server/handler_sync.go @@ -181,6 +181,7 @@ type diffItem struct { Skill string `json:"skill"` Action string `json:"action"` // "link", "update", "skip", "prune", "local" Reason string `json:"reason"` // human-readable description + Kind string `json:"kind,omitempty"` } type diffTarget struct { diff --git a/internal/server/handler_update.go b/internal/server/handler_update.go index eba69bcee..2743b39f1 100644 --- a/internal/server/handler_update.go +++ b/internal/server/handler_update.go @@ -28,6 +28,7 @@ type updateResultItem struct { IsRepo bool `json:"isRepo"` AuditRiskScore int `json:"auditRiskScore,omitempty"` AuditRiskLabel string `json:"auditRiskLabel,omitempty"` + Kind string `json:"kind,omitempty"` } func (s *Server) updateAuditThreshold() string {