feat: management API and an MCP tool per SEO admin operation

- /_seo/api/v1 routes for the effective SEO of a URL with sources and
  owner, URL rules, redirects (loops refused with redirect_loop), the
  404 log actions, robots.txt and its tester, settings and history
- the CMS-data issue report: missing and duplicate titles and
  descriptions, rules over records, redirect chains, canonicals to
  noindex or redirected addresses, noindex addresses robots.txt blocks
- 24 MCP tools on those routes (backend guard, golem15.seo.manage)
- AdminOperations maps every admin operation to its tool;
  TestEveryAdminOperationHasTool and TestMCPReadToolsAreGET guard drift
- robots.txt writes go through classes.SaveRobots from the admin too
This commit is contained in:
2026-10-27 12:17:36 +01:00
parent cadf6ad805
commit aa0c3bcacf
22 changed files with 2723 additions and 46 deletions

View File

@@ -42,7 +42,30 @@ func (p *Plugin) Routes(r pact.Router) error {
})
r.Group("/_seo/api/v1", nil, func(g pact.Router) {
api := "throttle:" + BucketAPI
g.Get("/seo", apicontrollers.GetSEO(p.Service), api)
g.Put("/seo", apicontrollers.SetSEO(p.Service), api)
g.Get("/rules", apicontrollers.ListRules(p.Service), api)
g.Post("/rules", apicontrollers.CreateRule(p.Service), api)
g.Get("/rules/{id}", apicontrollers.ShowRule(p.Service), api)
g.Put("/rules/{id}", apicontrollers.UpdateRule(p.Service), api)
g.Delete("/rules/{id}", apicontrollers.DeleteRule(p.Service), api)
g.Get("/redirects", apicontrollers.ListRedirects(p.Service), api)
g.Post("/redirects", apicontrollers.CreateRedirect(p.Service), api)
g.Get("/redirects/{id}", apicontrollers.ShowRedirect(p.Service), api)
g.Put("/redirects/{id}", apicontrollers.UpdateRedirect(p.Service), api)
g.Delete("/redirects/{id}", apicontrollers.DeleteRedirect(p.Service), api)
g.Get("/notfound", apicontrollers.ListNotFound(p.Service), api)
g.Post("/notfound/{id}/redirect", apicontrollers.RedirectNotFound(p.Service), api)
g.Post("/notfound/{id}/gone", apicontrollers.GoneNotFound(p.Service), api)
g.Delete("/notfound/{id}", apicontrollers.DeleteNotFound(p.Service), api)
g.Get("/robots", apicontrollers.ShowRobots(p.Service), api)
g.Put("/robots", apicontrollers.UpdateRobots(p.Service), api)
g.Get("/robots/test", apicontrollers.TestRobotsURL(p.Service), api)
g.Get("/settings", apicontrollers.ShowSettings(p.Service), api)
g.Put("/settings", apicontrollers.UpdateSettings(p.Service), api)
g.Get("/history", apicontrollers.ListHistory(p.Service), api)
g.Get("/history/{id}", apicontrollers.ShowHistory(p.Service), api)
g.Get("/issues", apicontrollers.ListIssues(p.Service), api)
})
return nil
}