MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / handleEntityUninstall

Method handleEntityUninstall

internal/sidecar/server.go:358–385  ·  view source on GitHub ↗

handleEntityUninstall removes an entity (skill/agent/plugin) from the registry and its installed filesystem locations.

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

356// handleEntityUninstall removes an entity (skill/agent/plugin) from the
357// registry and its installed filesystem locations.
358func (s *Server) handleEntityUninstall(w http.ResponseWriter, r *http.Request) {
359 if r.Method != http.MethodPost {
360 methodNotAllowed(w)
361 return
362 }
363 var input struct {
364 Kind string `json:"kind"`
365 Name string `json:"name"`
366 }
367 if err := decodeJSON(r, &input); err != nil {
368 writeError(w, http.StatusBadRequest, err.Error())
369 return
370 }
371 if input.Kind == "" {
372 writeError(w, http.StatusBadRequest, "kind is required")
373 return
374 }
375 if input.Name == "" {
376 writeError(w, http.StatusBadRequest, "name is required")
377 return
378 }
379 result, err := s.services.Entities.Uninstall(input.Kind, input.Name)
380 if err != nil {
381 writeResult(w, nil, err)
382 return
383 }
384 writeJSON(w, result)
385}
386
387func (s *Server) handleConfigFiles(w http.ResponseWriter, r *http.Request) {
388 if r.Method != http.MethodGet {

Callers

nothing calls this directly

Calls 7

methodNotAllowedFunction · 0.85
decodeJSONFunction · 0.85
writeErrorFunction · 0.85
writeResultFunction · 0.85
writeJSONFunction · 0.70
ErrorMethod · 0.45
UninstallMethod · 0.45

Tested by

no test coverage detected