feat: add seo diagnostics tool with cli commands, config paths, and static versioning

Add SEO_REPORTS_DIR to config, STATIC_VERSION for cache-busting, seo prune/clear CLI subcommands, tools router with seo job endpoints, and boot-versioned static URLs in Dockerfile and Makefile
This commit is contained in:
2026-06-14 00:16:22 +00:00
parent 61c1ae8c5d
commit 1b89f7c49f
110 changed files with 4501 additions and 270 deletions
@@ -566,6 +566,35 @@ ACTIONS: tuple[Action, ...] = (
params=(path("uid", "Fork job uid returned by fork_project."),),
requires_auth=False,
),
Action(
name="seo_diagnostics",
method="POST",
path="/tools/seo/run",
summary="Run an SEO audit on a URL or sitemap",
description=(
"Queues a background SEO diagnostics job and returns {uid, status_url}. Poll the "
"status_url with seo_status until status is 'done', then share the score, grade and "
"report_url. mode='url' audits a single page; mode='sitemap' crawls up to max_pages."
),
params=(
body("url", "The page URL or sitemap.xml URL to audit.", required=True),
body("mode", "'url' for a single page or 'sitemap' to crawl a sitemap."),
body("max_pages", "Maximum pages to crawl in sitemap mode (1-50)."),
),
requires_auth=False,
),
Action(
name="seo_status",
method="GET",
path="/tools/seo/{uid}",
summary="Check an SEO audit and obtain its score once finished",
description=(
"Returns the audit status. When status is 'done', score, grade and report_url are "
"populated; while 'pending' or 'running', poll again shortly."
),
params=(path("uid", "SEO job uid returned by seo_diagnostics."),),
requires_auth=False,
),
Action(
name="search_users",
method="GET",