blume 1.7.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (677) hide show
  1. package/AGENTS.md +19 -0
  2. package/CHANGELOG.md +227 -0
  3. package/README.md +34 -21
  4. package/dist/cli/chunk-11j0384y.js +148 -0
  5. package/dist/cli/chunk-11j0384y.js.map +10 -0
  6. package/dist/cli/{chunk-xhtpx3ff.js → chunk-1w8dp3qb.js} +17 -16
  7. package/dist/cli/{chunk-xhtpx3ff.js.map → chunk-1w8dp3qb.js.map} +3 -3
  8. package/dist/cli/chunk-2q1dwty4.js +75 -0
  9. package/dist/cli/chunk-2q1dwty4.js.map +11 -0
  10. package/dist/cli/chunk-41za066z.js +122 -0
  11. package/dist/cli/chunk-41za066z.js.map +11 -0
  12. package/dist/cli/chunk-5a2z0198.js +133 -0
  13. package/dist/cli/chunk-5a2z0198.js.map +10 -0
  14. package/dist/cli/{chunk-9he6crym.js → chunk-6k8vp3ta.js} +25 -13
  15. package/dist/cli/{chunk-9he6crym.js.map → chunk-6k8vp3ta.js.map} +4 -4
  16. package/dist/cli/{chunk-mt76t7dj.js → chunk-79njf86q.js} +133 -54
  17. package/dist/cli/chunk-79njf86q.js.map +11 -0
  18. package/dist/cli/{chunk-3w7b2vcx.js → chunk-7ez8ny0t.js} +2 -2
  19. package/dist/cli/{chunk-688e0dde.js → chunk-88cpgt6h.js} +1 -1
  20. package/dist/cli/chunk-a9kptbw5.js +361 -0
  21. package/dist/cli/chunk-a9kptbw5.js.map +14 -0
  22. package/dist/cli/chunk-abh8yjkn.js +31 -0
  23. package/dist/cli/chunk-abh8yjkn.js.map +10 -0
  24. package/dist/cli/chunk-b5aj94ah.js +91 -0
  25. package/dist/cli/chunk-b5aj94ah.js.map +10 -0
  26. package/dist/cli/{chunk-hs3gbh8p.js → chunk-bctazmbk.js} +9 -5
  27. package/dist/cli/chunk-bctazmbk.js.map +10 -0
  28. package/dist/cli/chunk-beat36xx.js +279 -0
  29. package/dist/cli/chunk-beat36xx.js.map +10 -0
  30. package/dist/cli/chunk-bnbmcwfb.js +145 -0
  31. package/dist/cli/chunk-bnbmcwfb.js.map +11 -0
  32. package/dist/cli/{chunk-9bkjd11x.js → chunk-bw22s759.js} +15 -5
  33. package/dist/cli/{chunk-9bkjd11x.js.map → chunk-bw22s759.js.map} +4 -4
  34. package/dist/cli/chunk-by2290sx.js +39 -0
  35. package/dist/cli/chunk-by2290sx.js.map +10 -0
  36. package/dist/cli/chunk-d1tadaw7.js +79 -0
  37. package/dist/cli/chunk-d1tadaw7.js.map +10 -0
  38. package/dist/cli/{chunk-t3tj0dgr.js → chunk-d80hr03s.js} +24 -19
  39. package/dist/cli/chunk-d80hr03s.js.map +15 -0
  40. package/dist/cli/chunk-ernrthtr.js +97 -0
  41. package/dist/cli/chunk-ernrthtr.js.map +10 -0
  42. package/dist/cli/chunk-f2972sbt.js +374 -0
  43. package/dist/cli/chunk-f2972sbt.js.map +10 -0
  44. package/dist/cli/{chunk-exeeb35e.js → chunk-f7t03s3g.js} +2 -2
  45. package/dist/cli/{chunk-2z47ypj8.js → chunk-fa25z98p.js} +16 -3
  46. package/dist/cli/chunk-fa25z98p.js.map +11 -0
  47. package/dist/cli/{chunk-12dxjqk7.js → chunk-fh5hj5jt.js} +44 -21
  48. package/dist/cli/chunk-fh5hj5jt.js.map +10 -0
  49. package/dist/cli/{chunk-8cd8tj54.js → chunk-j8mw0za6.js} +86 -57
  50. package/dist/cli/chunk-j8mw0za6.js.map +35 -0
  51. package/dist/cli/chunk-jts8mvcz.js +106 -0
  52. package/dist/cli/{chunk-2mzebbbz.js.map → chunk-jts8mvcz.js.map} +6 -4
  53. package/dist/cli/{chunk-ejjx8znq.js → chunk-mnqj32sj.js} +505 -536
  54. package/dist/cli/chunk-mnqj32sj.js.map +12 -0
  55. package/dist/cli/{chunk-196vjxp9.js → chunk-mwt1k8n7.js} +100 -372
  56. package/dist/cli/chunk-mwt1k8n7.js.map +10 -0
  57. package/dist/cli/chunk-nk3ts2xk.js +51 -0
  58. package/dist/cli/chunk-nk3ts2xk.js.map +10 -0
  59. package/dist/cli/{chunk-n9sra6sy.js → chunk-pat2zzwc.js} +10 -14
  60. package/dist/cli/{chunk-n9sra6sy.js.map → chunk-pat2zzwc.js.map} +2 -2
  61. package/dist/cli/chunk-pnnvybbk.js +176 -0
  62. package/dist/cli/chunk-pnnvybbk.js.map +11 -0
  63. package/dist/cli/{chunk-cvky9gb2.js → chunk-sqn5t4q0.js} +81 -87
  64. package/dist/cli/chunk-sqn5t4q0.js.map +10 -0
  65. package/dist/cli/{chunk-eevwt1sc.js → chunk-tzne8qfq.js} +15 -15
  66. package/dist/cli/{chunk-eevwt1sc.js.map → chunk-tzne8qfq.js.map} +1 -1
  67. package/dist/cli/chunk-xaz13gwg.js +12449 -0
  68. package/dist/cli/chunk-xaz13gwg.js.map +182 -0
  69. package/dist/cli/chunk-y3e45rc8.js +102 -0
  70. package/dist/cli/chunk-y3e45rc8.js.map +10 -0
  71. package/dist/cli/chunk-z01ze5c1.js +261 -0
  72. package/dist/cli/chunk-z01ze5c1.js.map +10 -0
  73. package/dist/cli/{chunk-5n7t497w.js → chunk-z1f5arsg.js} +247 -755
  74. package/dist/cli/chunk-z1f5arsg.js.map +36 -0
  75. package/dist/cli/{chunk-hdm2dkd2.js → chunk-zg2gtj10.js} +1086 -2596
  76. package/dist/cli/chunk-zg2gtj10.js.map +35 -0
  77. package/dist/cli/{chunk-ppfvdcd4.js → chunk-zxccj738.js} +1 -1
  78. package/dist/cli/index.js +214 -57
  79. package/dist/cli/index.js.map +8 -7
  80. package/dist/types/ai/agent-readability.d.ts +52 -0
  81. package/dist/types/ai/ai-catalog.d.ts +42 -0
  82. package/dist/types/ai/api/paths.d.ts +17 -0
  83. package/dist/types/ai/api-catalog.d.ts +18 -0
  84. package/dist/types/ai/ask.d.ts +368 -0
  85. package/dist/types/ai/changelog-markdown.d.ts +2 -0
  86. package/dist/types/ai/component-markdown.d.ts +2 -2
  87. package/dist/types/ai/index.d.ts +24 -0
  88. package/dist/types/ai/link-headers.d.ts +24 -0
  89. package/dist/types/ai/llms.d.ts +25 -0
  90. package/dist/types/ai/markdown.d.ts +45 -0
  91. package/dist/types/ai/mcp/discovery.d.ts +68 -0
  92. package/dist/types/ai/mcp/tools.d.ts +16 -0
  93. package/dist/types/ai/openapi-components.d.ts +43 -0
  94. package/dist/types/ai/relative-links.d.ts +26 -0
  95. package/dist/types/ai/serializers.d.ts +15 -0
  96. package/dist/types/ai/skills.d.ts +42 -0
  97. package/dist/types/ai/tar.d.ts +25 -0
  98. package/dist/types/ai/visibility.d.ts +17 -0
  99. package/dist/types/ai/web-bot-auth.d.ts +16 -0
  100. package/dist/types/analytics/adobe.d.ts +35 -0
  101. package/dist/types/analytics/amplitude.d.ts +50 -0
  102. package/dist/types/analytics/clarity.d.ts +31 -0
  103. package/dist/types/analytics/clearbit.d.ts +29 -0
  104. package/dist/types/analytics/cloudflare.d.ts +41 -0
  105. package/dist/types/analytics/fathom.d.ts +41 -0
  106. package/dist/types/analytics/google-analytics.d.ts +44 -0
  107. package/dist/types/analytics/google-tag-manager.d.ts +40 -0
  108. package/dist/types/analytics/head.d.ts +30 -0
  109. package/dist/types/analytics/heap.d.ts +40 -0
  110. package/dist/types/analytics/hightouch.d.ts +44 -0
  111. package/dist/types/analytics/hotjar.d.ts +33 -0
  112. package/dist/types/analytics/index.d.ts +61 -0
  113. package/dist/types/analytics/inline.d.ts +17 -0
  114. package/dist/types/analytics/logrocket.d.ts +44 -0
  115. package/dist/types/analytics/mixpanel.d.ts +67 -0
  116. package/dist/types/analytics/pirsch.d.ts +42 -0
  117. package/dist/types/analytics/plausible.d.ts +56 -0
  118. package/dist/types/analytics/posthog.d.ts +45 -0
  119. package/dist/types/analytics/schema.d.ts +320 -0
  120. package/dist/types/analytics/script.d.ts +46 -0
  121. package/dist/types/analytics/segment.d.ts +50 -0
  122. package/dist/types/analytics/vercel.d.ts +48 -0
  123. package/dist/types/astro/integration.d.ts +76 -0
  124. package/dist/types/astro/markdown-negotiation.d.ts +23 -0
  125. package/dist/types/astro/module-types.d.ts +14 -0
  126. package/dist/types/astro/pages.d.ts +44 -0
  127. package/dist/types/cli/env.d.ts +12 -0
  128. package/dist/types/cli/init/scaffold.d.ts +154 -0
  129. package/dist/types/components/layout/nav-utils.d.ts +11 -0
  130. package/dist/types/core/adapter.d.ts +47 -0
  131. package/dist/types/core/api-name.d.ts +7 -0
  132. package/dist/types/core/changelog-index.d.ts +13 -0
  133. package/dist/types/core/config-input.d.ts +209 -505
  134. package/dist/types/core/config.d.ts +60 -34
  135. package/dist/types/core/content-assets.d.ts +76 -0
  136. package/dist/types/core/custom-pages.d.ts +33 -0
  137. package/dist/types/core/data.d.ts +28 -11
  138. package/dist/types/core/define-components.d.ts +12 -9
  139. package/dist/types/core/deployment-env.d.ts +6 -11
  140. package/dist/types/core/frontmatter.d.ts +10 -0
  141. package/dist/types/core/graph.d.ts +18 -0
  142. package/dist/types/core/heading-markers.d.ts +54 -0
  143. package/dist/types/core/i18n-ui.d.ts +6 -2
  144. package/dist/types/core/i18n.d.ts +87 -0
  145. package/dist/types/core/includes.d.ts +138 -0
  146. package/dist/types/core/last-modified.d.ts +47 -0
  147. package/dist/types/core/links.d.ts +95 -0
  148. package/dist/types/core/locale-links.d.ts +60 -0
  149. package/dist/types/core/manifest.d.ts +17 -0
  150. package/dist/types/core/meta.d.ts +38 -0
  151. package/dist/types/core/nav-diagnostics.d.ts +26 -0
  152. package/dist/types/core/navigation.d.ts +6 -0
  153. package/dist/types/core/node-require.d.ts +19 -0
  154. package/dist/types/core/package-json.d.ts +13 -0
  155. package/dist/types/core/probe.d.ts +42 -0
  156. package/dist/types/core/project-graph.d.ts +51 -0
  157. package/dist/types/core/project.d.ts +2 -0
  158. package/dist/types/core/safe-href.d.ts +2 -0
  159. package/dist/types/core/safe-links.d.ts +26 -0
  160. package/dist/types/core/schema.d.ts +2291 -441
  161. package/dist/types/core/site-url.d.ts +16 -0
  162. package/dist/types/core/sources/assets.d.ts +36 -0
  163. package/dist/types/core/sources/cache.d.ts +37 -0
  164. package/dist/types/core/sources/collection.d.ts +28 -0
  165. package/dist/types/core/sources/contentful-rich-text.d.ts +31 -0
  166. package/dist/types/core/sources/contentful.d.ts +40 -0
  167. package/dist/types/core/sources/filesystem.d.ts +24 -0
  168. package/dist/types/core/sources/github-releases.d.ts +31 -0
  169. package/dist/types/core/sources/json.d.ts +30 -0
  170. package/dist/types/core/sources/lexical.d.ts +19 -0
  171. package/dist/types/core/sources/lower.d.ts +75 -0
  172. package/dist/types/core/sources/mdx-remote.d.ts +28 -0
  173. package/dist/types/core/sources/normalize.d.ts +147 -0
  174. package/dist/types/core/sources/notion.d.ts +131 -0
  175. package/dist/types/core/sources/obsidian.d.ts +46 -0
  176. package/dist/types/core/sources/payload.d.ts +39 -0
  177. package/dist/types/core/sources/portable-text.d.ts +42 -0
  178. package/dist/types/core/sources/read.d.ts +23 -0
  179. package/dist/types/core/sources/remote.d.ts +74 -0
  180. package/dist/types/core/sources/resolve.d.ts +19 -0
  181. package/dist/types/core/sources/sanity.d.ts +43 -0
  182. package/dist/types/core/sources/strapi-blocks.d.ts +12 -0
  183. package/dist/types/core/sources/strapi.d.ts +33 -0
  184. package/dist/types/core/sources/types.d.ts +7 -0
  185. package/dist/types/core/sources/watch.d.ts +45 -0
  186. package/dist/types/core/text-width.d.ts +11 -0
  187. package/dist/types/core/types.d.ts +20 -1
  188. package/dist/types/core/unrecognized-keys.d.ts +7 -0
  189. package/dist/types/core/versions.d.ts +72 -0
  190. package/dist/types/core/yaml.d.ts +9 -0
  191. package/dist/types/deploy/adapter-output.d.ts +45 -0
  192. package/dist/types/deploy/adapters/cloudflare.d.ts +40 -0
  193. package/dist/types/deploy/adapters/index.d.ts +29 -0
  194. package/dist/types/deploy/adapters/netlify.d.ts +37 -0
  195. package/dist/types/deploy/adapters/node.d.ts +37 -0
  196. package/dist/types/deploy/adapters/registry.d.ts +133 -0
  197. package/dist/types/deploy/adapters/types.d.ts +71 -0
  198. package/dist/types/deploy/adapters/vercel.d.ts +38 -0
  199. package/dist/types/deploy/artifacts.d.ts +65 -0
  200. package/dist/types/deploy/cloudflare-negotiation.d.ts +196 -0
  201. package/dist/types/deploy/function-bundle.d.ts +80 -0
  202. package/dist/types/deploy/headers.d.ts +50 -0
  203. package/dist/types/deploy/node-headers.d.ts +42 -0
  204. package/dist/types/deploy/platforms/cloudflare.d.ts +40 -0
  205. package/dist/types/deploy/platforms/index.d.ts +18 -0
  206. package/dist/types/deploy/platforms/netlify.d.ts +13 -0
  207. package/dist/types/deploy/platforms/node.d.ts +11 -0
  208. package/dist/types/deploy/platforms/paths.d.ts +27 -0
  209. package/dist/types/deploy/platforms/static.d.ts +10 -0
  210. package/dist/types/deploy/platforms/types.d.ts +104 -0
  211. package/dist/types/deploy/platforms/vercel.d.ts +32 -0
  212. package/dist/types/deploy/redirects.d.ts +53 -0
  213. package/dist/types/deploy/robots.d.ts +8 -0
  214. package/dist/types/deploy/rss.d.ts +31 -0
  215. package/dist/types/deploy/sitemap.d.ts +21 -0
  216. package/dist/types/deploy/vercel-negotiation.d.ts +109 -0
  217. package/dist/types/markdown/code-title.d.ts +32 -0
  218. package/dist/types/markdown/fence-meta.d.ts +23 -0
  219. package/dist/types/markdown/themes.d.ts +3 -3
  220. package/dist/types/openapi/asyncapi.d.ts +129 -0
  221. package/dist/types/openapi/graphql-build.d.ts +8 -0
  222. package/dist/types/openapi/graphql.d.ts +122 -0
  223. package/dist/types/openapi/model.d.ts +158 -0
  224. package/dist/types/openapi/parse.d.ts +57 -0
  225. package/dist/types/openapi/references.d.ts +37 -25
  226. package/dist/types/openapi/render-mdx.d.ts +33 -0
  227. package/dist/types/openapi/sentence.d.ts +7 -0
  228. package/dist/types/openapi/signature.d.ts +10 -0
  229. package/dist/types/openapi/source.d.ts +22 -0
  230. package/dist/types/openapi/spec-dependency-error.d.ts +10 -0
  231. package/dist/types/reference/asyncapi.d.ts +166 -0
  232. package/dist/types/reference/graphql.d.ts +181 -0
  233. package/dist/types/reference/index.d.ts +32 -0
  234. package/dist/types/reference/openapi.d.ts +165 -0
  235. package/dist/types/reference/options.d.ts +157 -0
  236. package/dist/types/reference/scalar.d.ts +136 -0
  237. package/dist/types/reference/schema.d.ts +630 -0
  238. package/dist/types/search/adapters/algolia.d.ts +32 -0
  239. package/dist/types/search/adapters/flexsearch.d.ts +12 -0
  240. package/dist/types/search/adapters/index.d.ts +31 -0
  241. package/dist/types/search/adapters/mixedbread.d.ts +22 -0
  242. package/dist/types/search/adapters/orama-cloud.d.ts +33 -0
  243. package/dist/types/search/adapters/orama.d.ts +13 -0
  244. package/dist/types/search/adapters/pagefind.d.ts +12 -0
  245. package/dist/types/search/adapters/registry.d.ts +228 -0
  246. package/dist/types/search/adapters/types.d.ts +34 -0
  247. package/dist/types/search/adapters/typesense.d.ts +42 -0
  248. package/dist/types/search/build.d.ts +23 -0
  249. package/dist/types/search/documents.d.ts +90 -0
  250. package/dist/types/search/facets.d.ts +3 -0
  251. package/dist/types/search/sync/algolia.d.ts +14 -0
  252. package/dist/types/search/sync/index.d.ts +14 -0
  253. package/dist/types/search/sync/orama-cloud.d.ts +10 -0
  254. package/dist/types/search/sync/typesense.d.ts +14 -0
  255. package/dist/types/sources/contentful.d.ts +68 -0
  256. package/dist/types/sources/custom.d.ts +20 -0
  257. package/dist/types/sources/filesystem.d.ts +42 -0
  258. package/dist/types/sources/github-releases.d.ts +46 -0
  259. package/dist/types/sources/index.d.ts +48 -0
  260. package/dist/types/sources/mdx-remote.d.ts +63 -0
  261. package/dist/types/sources/notion.d.ts +65 -0
  262. package/dist/types/sources/obsidian.d.ts +34 -0
  263. package/dist/types/sources/payload.d.ts +68 -0
  264. package/dist/types/sources/registry.d.ts +1414 -0
  265. package/dist/types/sources/sanity.d.ts +69 -0
  266. package/dist/types/sources/shared.d.ts +46 -0
  267. package/dist/types/sources/strapi.d.ts +66 -0
  268. package/dist/types/theme/icon-kind.d.ts +11 -0
  269. package/dist/types/theme/icons.d.ts +20 -0
  270. package/docs/01-quickstart.mdx +18 -18
  271. package/docs/02-deployment.mdx +50 -26
  272. package/docs/03-upgrading.mdx +351 -0
  273. package/docs/04-migrating.mdx +58 -0
  274. package/docs/08-faq.mdx +3 -3
  275. package/docs/advanced/blog.mdx +13 -6
  276. package/docs/advanced/changelog.mdx +23 -35
  277. package/docs/advanced/custom-pages.mdx +20 -8
  278. package/docs/advanced/meta.ts +1 -8
  279. package/docs/advanced/skills.mdx +8 -0
  280. package/docs/cli/audit.mdx +646 -0
  281. package/docs/cli/doctor.mdx +29 -0
  282. package/docs/{reference/eval.mdx → cli/evals.mdx} +9 -8
  283. package/docs/cli/index.mdx +105 -0
  284. package/docs/cli/meta.ts +7 -0
  285. package/docs/{reference → cli}/translate.mdx +1 -1
  286. package/docs/cli/validate.mdx +41 -0
  287. package/docs/cli/version.mdx +40 -0
  288. package/docs/configuration/analytics.mdx +350 -59
  289. package/docs/configuration/ask-ai.mdx +176 -61
  290. package/docs/configuration/customization.mdx +15 -9
  291. package/docs/configuration/index.mdx +52 -31
  292. package/docs/configuration/search.mdx +75 -54
  293. package/docs/configuration/theming.mdx +24 -15
  294. package/docs/content/components.mdx +21 -5
  295. package/docs/{reference → content}/frontmatter.mdx +37 -1
  296. package/docs/content/i18n.mdx +8 -6
  297. package/docs/content/includes.mdx +2 -4
  298. package/docs/content/index.mdx +1 -1
  299. package/docs/content/islands.mdx +10 -5
  300. package/docs/content/meta.mdx +1 -1
  301. package/docs/content/meta.ts +1 -0
  302. package/docs/content/navigation.mdx +12 -7
  303. package/docs/content/sources.mdx +145 -50
  304. package/docs/content/syntax.mdx +26 -12
  305. package/docs/content/versioning.mdx +3 -3
  306. package/docs/discoverability/agent-discovery.mdx +91 -10
  307. package/docs/discoverability/index.mdx +5 -5
  308. package/docs/discoverability/json-api.mdx +4 -4
  309. package/docs/discoverability/llms-txt.mdx +6 -6
  310. package/docs/discoverability/markdown.mdx +4 -4
  311. package/docs/discoverability/mcp.mdx +11 -11
  312. package/docs/discoverability/sitemap-and-robots.mdx +3 -3
  313. package/docs/index.mdx +2 -2
  314. package/docs/references/asyncapi.mdx +59 -0
  315. package/docs/{advanced → references}/graphql.mdx +45 -32
  316. package/docs/{reference → references}/meta.ts +2 -2
  317. package/docs/references/openapi.mdx +171 -0
  318. package/docs/references/scalar.mdx +64 -0
  319. package/package.json +42 -8
  320. package/skills/blume/SKILL.md +21 -8
  321. package/skills/blume-migrate/SKILL.md +22 -21
  322. package/skills/blume-migrate/assets/oxfmt@0.67.0.patch +49 -0
  323. package/skills/blume-migrate/references/docusaurus.md +5 -4
  324. package/skills/blume-migrate/references/fumadocs.md +4 -4
  325. package/skills/blume-migrate/references/mintlify.md +23 -8
  326. package/skills/blume-migrate/references/monorepo.md +6 -6
  327. package/skills/blume-migrate/references/starlight.md +4 -4
  328. package/src/ai/agent-readability.ts +26 -22
  329. package/src/ai/ai-catalog.ts +259 -0
  330. package/src/ai/api/handlers.ts +46 -11
  331. package/src/ai/api-catalog.ts +8 -8
  332. package/src/ai/ask-data.ts +1 -1
  333. package/src/ai/ask.ts +624 -100
  334. package/src/ai/changelog-markdown.ts +91 -0
  335. package/src/ai/component-markdown.ts +328 -12
  336. package/src/ai/index.ts +45 -0
  337. package/src/ai/link-headers.ts +19 -6
  338. package/src/ai/llms.ts +26 -15
  339. package/src/ai/markdown.ts +35 -5
  340. package/src/ai/mcp/data.ts +9 -5
  341. package/src/ai/mcp/discovery.ts +1 -1
  342. package/src/ai/openapi-components.ts +4 -1
  343. package/src/ai/relative-links.ts +170 -0
  344. package/src/ai/serializers.ts +2 -2
  345. package/src/ai/skills.ts +1 -1
  346. package/src/ai/web-bot-auth.ts +2 -2
  347. package/src/analytics/adobe.ts +46 -0
  348. package/src/analytics/amplitude.ts +79 -0
  349. package/src/analytics/clarity.ts +46 -0
  350. package/src/analytics/clearbit.ts +47 -0
  351. package/src/analytics/cloudflare.ts +67 -0
  352. package/src/analytics/fathom.ts +64 -0
  353. package/src/analytics/google-analytics.ts +84 -0
  354. package/src/analytics/google-tag-manager.ts +61 -0
  355. package/src/analytics/head.ts +130 -0
  356. package/src/analytics/heap.ts +65 -0
  357. package/src/analytics/hightouch.ts +77 -0
  358. package/src/analytics/hotjar.ts +47 -0
  359. package/src/analytics/index.ts +71 -0
  360. package/src/analytics/inline.ts +21 -0
  361. package/src/analytics/logrocket.ts +71 -0
  362. package/src/analytics/mixpanel.ts +92 -0
  363. package/src/analytics/pirsch.ts +66 -0
  364. package/src/analytics/plausible.ts +83 -0
  365. package/src/analytics/posthog.ts +78 -0
  366. package/src/analytics/schema.ts +60 -0
  367. package/src/analytics/script.ts +60 -0
  368. package/src/analytics/segment.ts +85 -0
  369. package/src/analytics/vercel.ts +50 -0
  370. package/src/astro/adapter-root.ts +7 -9
  371. package/src/astro/component-slots.ts +131 -91
  372. package/src/astro/generate.ts +114 -345
  373. package/src/astro/integration.ts +2 -6
  374. package/src/astro/pages.ts +13 -101
  375. package/src/astro/render-deps.ts +379 -0
  376. package/src/astro/runtime-deps.ts +201 -0
  377. package/src/astro/templates.ts +554 -541
  378. package/src/audit/agent.ts +24 -0
  379. package/src/audit/catalog.ts +2 -2
  380. package/src/audit/checks/assets.ts +2 -2
  381. package/src/audit/checks/dns-aid.ts +1 -1
  382. package/src/audit/checks/duplicates.ts +3 -1
  383. package/src/audit/checks/i18n.ts +1 -1
  384. package/src/audit/checks/indexability.ts +7 -7
  385. package/src/audit/checks/links.ts +2 -2
  386. package/src/audit/checks/llms.ts +6 -6
  387. package/src/audit/checks/network.ts +3 -3
  388. package/src/audit/checks/og-image.ts +2 -2
  389. package/src/audit/checks/robots.ts +1 -1
  390. package/src/audit/checks/sitemap.ts +2 -2
  391. package/src/audit/checks/social.ts +1 -1
  392. package/src/audit/run.ts +4 -3
  393. package/src/audit/terms.ts +31 -0
  394. package/src/audit/url.ts +13 -13
  395. package/src/cli/command-meta.ts +10 -0
  396. package/src/cli/commands/audit.ts +39 -20
  397. package/src/cli/commands/build.ts +71 -314
  398. package/src/cli/commands/check.ts +1 -0
  399. package/src/cli/commands/dev.ts +40 -1
  400. package/src/cli/commands/doctor.ts +90 -14
  401. package/src/cli/commands/eject.ts +44 -7
  402. package/src/cli/commands/eval.ts +2 -2
  403. package/src/cli/commands/init.ts +161 -41
  404. package/src/cli/commands/migrate.ts +121 -0
  405. package/src/cli/commands/preview.ts +7 -1
  406. package/src/cli/commands/translate.ts +2 -2
  407. package/src/cli/commands/upgrade.ts +141 -0
  408. package/src/cli/commands/version.ts +57 -44
  409. package/src/cli/eject-scripts.ts +121 -6
  410. package/src/cli/index.ts +11 -1
  411. package/src/cli/init/install.ts +70 -0
  412. package/src/cli/init/questions.ts +7 -0
  413. package/src/cli/init/scaffold.ts +459 -75
  414. package/src/cli/lazy-command.ts +37 -1
  415. package/src/cli/prepare.ts +40 -6
  416. package/src/cli/required-secrets.ts +38 -11
  417. package/src/cli/unknown-flags.ts +266 -0
  418. package/src/cli/yarn-pnp.ts +52 -0
  419. package/src/components/content/AccordionItem.astro +7 -1
  420. package/src/components/content/Card.astro +4 -3
  421. package/src/components/content/ColorItem.astro +22 -4
  422. package/src/components/content/GithubInfo.astro +2 -2
  423. package/src/components/content/Prompt.astro +25 -25
  424. package/src/components/content/Tabs.astro +3 -1
  425. package/src/components/content/Tile.astro +2 -3
  426. package/src/components/content/Tooltip.astro +57 -9
  427. package/src/components/content/content-strings.ts +34 -0
  428. package/src/components/content/diff.ts +1 -1
  429. package/src/components/content/mermaid-element.ts +13 -2
  430. package/src/components/content/prompt-markdown.ts +292 -0
  431. package/src/components/content/tooltip-id.ts +41 -0
  432. package/src/components/islands/hooks.ts +75 -3
  433. package/src/components/layout/Analytics.astro +21 -79
  434. package/src/components/layout/Banner.astro +3 -1
  435. package/src/components/layout/DiscoveryLinks.astro +69 -0
  436. package/src/components/layout/Header.astro +83 -20
  437. package/src/components/layout/LanguageSwitcher.astro +4 -1
  438. package/src/components/layout/Logo.astro +23 -2
  439. package/src/components/layout/NavSelector.astro +13 -2
  440. package/src/components/layout/NavTree.astro +12 -3
  441. package/src/components/layout/NavTreeScript.astro +17 -3
  442. package/src/components/layout/PageActions.astro +3 -3
  443. package/src/components/layout/PageFeedback.astro +11 -1
  444. package/src/components/layout/PageLayout.astro +52 -5
  445. package/src/components/layout/ReferenceLayout.astro +21 -12
  446. package/src/components/layout/RootLayout.astro +69 -43
  447. package/src/components/layout/Search.astro +30 -6
  448. package/src/components/layout/WebMcp.astro +1 -1
  449. package/src/components/layout/analytics-client.ts +101 -15
  450. package/src/components/layout/drawer-inert.ts +113 -15
  451. package/src/components/layout/dropdown-clamp.ts +105 -0
  452. package/src/components/layout/head-scripts.ts +15 -6
  453. package/src/components/layout/nav-utils.ts +17 -0
  454. package/src/components/layout/search/algolia.ts +8 -8
  455. package/src/components/layout/search/orama-cloud.ts +9 -7
  456. package/src/components/layout/search/typesense.ts +11 -17
  457. package/src/components/openapi/MessageComposer.astro +2 -2
  458. package/src/components/openapi/Playground.astro +2 -2
  459. package/src/components/openapi/playground-client.ts +79 -10
  460. package/src/core/changelog-index.ts +24 -0
  461. package/src/core/component-overrides.ts +399 -154
  462. package/src/core/config-input.ts +212 -543
  463. package/src/core/config.ts +130 -41
  464. package/src/core/custom-pages.ts +105 -0
  465. package/src/core/data.ts +32 -11
  466. package/src/core/define-components.ts +12 -9
  467. package/src/core/deployment-env.ts +18 -74
  468. package/src/core/diagnostics.ts +14 -7
  469. package/src/core/graph.ts +69 -25
  470. package/src/core/i18n-ui.ts +6 -2
  471. package/src/core/i18n.ts +17 -0
  472. package/src/core/includes.ts +156 -38
  473. package/src/core/last-modified.ts +6 -11
  474. package/src/core/links.ts +166 -2
  475. package/src/core/manifest.ts +10 -3
  476. package/src/core/navigation.ts +137 -19
  477. package/src/core/new-tab.ts +35 -0
  478. package/src/core/node-require.ts +21 -0
  479. package/src/core/project-graph.ts +42 -26
  480. package/src/core/project.ts +9 -4
  481. package/src/core/request-body.ts +61 -0
  482. package/src/core/safe-href.ts +28 -0
  483. package/src/core/safe-links.ts +68 -0
  484. package/src/core/schema.ts +531 -721
  485. package/src/core/server-features.ts +8 -9
  486. package/src/core/sources/assets.ts +47 -11
  487. package/src/core/sources/collection.ts +67 -0
  488. package/src/core/sources/contentful-rich-text.ts +285 -0
  489. package/src/core/sources/contentful.ts +173 -0
  490. package/src/core/sources/github-releases.ts +51 -1
  491. package/src/core/sources/json.ts +71 -0
  492. package/src/core/sources/lexical.ts +195 -0
  493. package/src/core/sources/lower.ts +226 -0
  494. package/src/core/sources/normalize.ts +52 -2
  495. package/src/core/sources/notion.ts +39 -28
  496. package/src/core/sources/payload.ts +135 -0
  497. package/src/core/sources/portable-text.ts +11 -16
  498. package/src/core/sources/remote.ts +226 -0
  499. package/src/core/sources/resolve.ts +104 -166
  500. package/src/core/sources/sanity.ts +16 -49
  501. package/src/core/sources/strapi-blocks.ts +124 -0
  502. package/src/core/sources/strapi.ts +191 -0
  503. package/src/core/sources/types.ts +12 -1
  504. package/src/core/types.ts +20 -1
  505. package/src/core/ui-packs/ar.ts +6 -2
  506. package/src/core/ui-packs/bg.ts +6 -2
  507. package/src/core/ui-packs/bn.ts +6 -2
  508. package/src/core/ui-packs/ca.ts +3 -1
  509. package/src/core/ui-packs/cs.ts +6 -2
  510. package/src/core/ui-packs/da.ts +6 -2
  511. package/src/core/ui-packs/de.ts +6 -2
  512. package/src/core/ui-packs/el.ts +3 -1
  513. package/src/core/ui-packs/es.ts +3 -1
  514. package/src/core/ui-packs/fa.ts +6 -2
  515. package/src/core/ui-packs/fi.ts +6 -2
  516. package/src/core/ui-packs/fr.ts +3 -1
  517. package/src/core/ui-packs/he.ts +6 -2
  518. package/src/core/ui-packs/hi.ts +6 -2
  519. package/src/core/ui-packs/hr.ts +6 -2
  520. package/src/core/ui-packs/hu.ts +6 -2
  521. package/src/core/ui-packs/id.ts +6 -2
  522. package/src/core/ui-packs/it.ts +3 -1
  523. package/src/core/ui-packs/ja.ts +3 -1
  524. package/src/core/ui-packs/ko.ts +3 -1
  525. package/src/core/ui-packs/nl.ts +6 -2
  526. package/src/core/ui-packs/no.ts +6 -2
  527. package/src/core/ui-packs/pl.ts +6 -2
  528. package/src/core/ui-packs/pt-br.ts +3 -1
  529. package/src/core/ui-packs/pt.ts +3 -1
  530. package/src/core/ui-packs/ro.ts +6 -2
  531. package/src/core/ui-packs/ru.ts +6 -2
  532. package/src/core/ui-packs/sk.ts +6 -2
  533. package/src/core/ui-packs/sr.ts +6 -2
  534. package/src/core/ui-packs/sv.ts +6 -2
  535. package/src/core/ui-packs/th.ts +3 -1
  536. package/src/core/ui-packs/tr.ts +6 -2
  537. package/src/core/ui-packs/uk.ts +6 -2
  538. package/src/core/ui-packs/vi.ts +3 -1
  539. package/src/core/ui-packs/zh-tw.ts +3 -1
  540. package/src/core/ui-packs/zh.ts +3 -1
  541. package/src/core/unrecognized-keys.ts +10 -0
  542. package/src/core/version-cut.ts +116 -8
  543. package/src/deploy/adapter-output.ts +57 -97
  544. package/src/deploy/adapters/cloudflare.ts +39 -0
  545. package/src/deploy/adapters/index.ts +41 -0
  546. package/src/deploy/adapters/netlify.ts +34 -0
  547. package/src/deploy/adapters/node.ts +34 -0
  548. package/src/deploy/adapters/registry.ts +127 -0
  549. package/src/deploy/adapters/types.ts +92 -0
  550. package/src/deploy/adapters/vercel.ts +35 -0
  551. package/src/deploy/artifacts.ts +67 -28
  552. package/src/deploy/cloudflare-negotiation.ts +179 -100
  553. package/src/deploy/function-bundle.ts +18 -3
  554. package/src/deploy/headers.ts +129 -22
  555. package/src/deploy/node-headers.ts +198 -0
  556. package/src/deploy/platforms/cloudflare.ts +312 -0
  557. package/src/deploy/platforms/index.ts +67 -0
  558. package/src/deploy/platforms/netlify.ts +52 -0
  559. package/src/deploy/platforms/node.ts +40 -0
  560. package/src/deploy/platforms/paths.ts +42 -0
  561. package/src/deploy/platforms/static.ts +29 -0
  562. package/src/deploy/platforms/types.ts +112 -0
  563. package/src/deploy/platforms/vercel.ts +193 -0
  564. package/src/deploy/redirects.ts +30 -18
  565. package/src/deploy/robots.ts +3 -3
  566. package/src/deploy/rss.ts +2 -2
  567. package/src/deploy/sitemap.ts +2 -2
  568. package/src/deploy/vercel-negotiation.ts +27 -4
  569. package/src/eval/agents.ts +32 -1
  570. package/src/eval/findings.ts +19 -11
  571. package/src/eval/report.ts +10 -2
  572. package/src/markdown/external-links.ts +65 -0
  573. package/src/markdown/include.ts +45 -27
  574. package/src/markdown/index.ts +34 -9
  575. package/src/markdown/inline-code.ts +12 -6
  576. package/src/markdown/relative-links.ts +324 -0
  577. package/src/markdown/themes.ts +3 -3
  578. package/src/migrate/migrate.ts +149 -0
  579. package/src/openapi/parse.ts +64 -16
  580. package/src/openapi/proxy.ts +62 -10
  581. package/src/openapi/references.ts +147 -147
  582. package/src/openapi/render-mdx.ts +32 -10
  583. package/src/openapi/scalar.ts +15 -13
  584. package/src/openapi/sentence.ts +14 -0
  585. package/src/openapi/source.ts +37 -21
  586. package/src/openapi/spec-dependency-error.ts +15 -0
  587. package/src/reference/asyncapi.ts +83 -0
  588. package/src/reference/graphql.ts +89 -0
  589. package/src/reference/index.ts +40 -0
  590. package/src/reference/openapi.ts +83 -0
  591. package/src/reference/options.ts +201 -0
  592. package/src/reference/scalar.ts +136 -0
  593. package/src/reference/schema.ts +88 -0
  594. package/src/registry/eject.ts +97 -42
  595. package/src/search/adapters/algolia.ts +46 -0
  596. package/src/search/adapters/flexsearch.ts +29 -0
  597. package/src/search/adapters/index.ts +39 -0
  598. package/src/search/adapters/mixedbread.ts +39 -0
  599. package/src/search/adapters/orama-cloud.ts +51 -0
  600. package/src/search/adapters/orama.ts +24 -0
  601. package/src/search/adapters/pagefind.ts +27 -0
  602. package/src/search/adapters/registry.ts +131 -0
  603. package/src/search/adapters/types.ts +46 -0
  604. package/src/search/adapters/typesense.ts +57 -0
  605. package/src/search/build.ts +33 -7
  606. package/src/search/documents.ts +6 -0
  607. package/src/search/sync/algolia.ts +12 -11
  608. package/src/search/sync/index.ts +35 -20
  609. package/src/search/sync/orama-cloud.ts +12 -9
  610. package/src/search/sync/typesense.ts +15 -13
  611. package/src/sources/contentful.ts +63 -0
  612. package/src/sources/custom.ts +38 -0
  613. package/src/sources/filesystem.ts +51 -0
  614. package/src/sources/github-releases.ts +52 -0
  615. package/src/sources/index.ts +60 -0
  616. package/src/sources/mdx-remote.ts +76 -0
  617. package/src/sources/notion.ts +63 -0
  618. package/src/sources/obsidian.ts +38 -0
  619. package/src/sources/payload.ts +60 -0
  620. package/src/sources/registry.ts +182 -0
  621. package/src/sources/sanity.ts +66 -0
  622. package/src/sources/shared.ts +52 -0
  623. package/src/sources/strapi.ts +58 -0
  624. package/src/theme/entry.ts +47 -2
  625. package/src/translate/report.ts +40 -7
  626. package/src/upgrade/upgrade.ts +499 -0
  627. package/dist/cli/chunk-12dxjqk7.js.map +0 -10
  628. package/dist/cli/chunk-196vjxp9.js.map +0 -13
  629. package/dist/cli/chunk-2mzebbbz.js +0 -69
  630. package/dist/cli/chunk-2z47ypj8.js.map +0 -11
  631. package/dist/cli/chunk-30e87n55.js +0 -108
  632. package/dist/cli/chunk-30e87n55.js.map +0 -10
  633. package/dist/cli/chunk-450a7rcr.js +0 -185
  634. package/dist/cli/chunk-450a7rcr.js.map +0 -11
  635. package/dist/cli/chunk-5n7t497w.js.map +0 -40
  636. package/dist/cli/chunk-61j18dwk.js +0 -5342
  637. package/dist/cli/chunk-61j18dwk.js.map +0 -58
  638. package/dist/cli/chunk-88by27n5.js +0 -17
  639. package/dist/cli/chunk-88by27n5.js.map +0 -10
  640. package/dist/cli/chunk-8cd8tj54.js.map +0 -34
  641. package/dist/cli/chunk-aztttvb3.js +0 -381
  642. package/dist/cli/chunk-aztttvb3.js.map +0 -12
  643. package/dist/cli/chunk-cvky9gb2.js.map +0 -11
  644. package/dist/cli/chunk-ejjx8znq.js.map +0 -15
  645. package/dist/cli/chunk-fmceyezb.js +0 -1007
  646. package/dist/cli/chunk-fmceyezb.js.map +0 -13
  647. package/dist/cli/chunk-hdm2dkd2.js.map +0 -48
  648. package/dist/cli/chunk-hs3gbh8p.js.map +0 -10
  649. package/dist/cli/chunk-jbj4qhfw.js +0 -30
  650. package/dist/cli/chunk-jbj4qhfw.js.map +0 -10
  651. package/dist/cli/chunk-mqb2ka8m.js +0 -68
  652. package/dist/cli/chunk-mqb2ka8m.js.map +0 -10
  653. package/dist/cli/chunk-mt76t7dj.js.map +0 -11
  654. package/dist/cli/chunk-q4rae3bg.js +0 -60
  655. package/dist/cli/chunk-q4rae3bg.js.map +0 -10
  656. package/dist/cli/chunk-ra1v2nc2.js +0 -35
  657. package/dist/cli/chunk-ra1v2nc2.js.map +0 -10
  658. package/dist/cli/chunk-t3tj0dgr.js.map +0 -15
  659. package/dist/cli/chunk-tqa1s0k8.js +0 -69
  660. package/dist/cli/chunk-tqa1s0k8.js.map +0 -11
  661. package/dist/cli/chunk-vh9w1sgp.js +0 -73
  662. package/dist/cli/chunk-vh9w1sgp.js.map +0 -10
  663. package/dist/cli/chunk-vkrsvbr5.js +0 -107
  664. package/dist/cli/chunk-vkrsvbr5.js.map +0 -11
  665. package/dist/cli/chunk-vrfp10qk.js +0 -81
  666. package/dist/cli/chunk-vrfp10qk.js.map +0 -10
  667. package/dist/cli/chunk-wjt80jps.js +0 -1049
  668. package/dist/cli/chunk-wjt80jps.js.map +0 -24
  669. package/docs/advanced/api-reference.mdx +0 -240
  670. package/docs/reference/cli.mdx +0 -197
  671. package/skills/blume-migrate/assets/oxfmt@0.55.0.patch +0 -20
  672. package/src/components/content/changelog-element.ts +0 -69
  673. package/src/search/providers.ts +0 -91
  674. /package/dist/cli/{chunk-3w7b2vcx.js.map → chunk-7ez8ny0t.js.map} +0 -0
  675. /package/dist/cli/{chunk-688e0dde.js.map → chunk-88cpgt6h.js.map} +0 -0
  676. /package/dist/cli/{chunk-exeeb35e.js.map → chunk-f7t03s3g.js.map} +0 -0
  677. /package/dist/cli/{chunk-ppfvdcd4.js.map → chunk-zxccj738.js.map} +0 -0
@@ -3,10 +3,10 @@
3
3
  "sources": ["../src/audit/report.ts", "../src/audit/catalog.ts", "../src/audit/agent.ts"],
4
4
  "sourcesContent": [
5
5
  "import { colors } from \"consola/utils\";\nimport type { ColorFunction } from \"consola/utils\";\nimport { relative } from \"pathe\";\n\nimport { countBySeverity } from \"../core/diagnostics.ts\";\nimport type { Diagnostic, DiagnosticSeverity } from \"../core/types.ts\";\nimport { CHECKS, checkMeta } from \"./catalog.ts\";\nimport type { CheckId } from \"./catalog.ts\";\nimport type { AuditResult } from \"./run.ts\";\nimport type { AuditCategory, AuditTier } from \"./types.ts\";\n\nconst SEVERITY_COLOR = {\n error: colors.red,\n info: colors.blue,\n warning: colors.yellow,\n} satisfies Record<DiagnosticSeverity, ColorFunction>;\n\nconst GLYPH = {\n error: \"✖\",\n info: \"ℹ\",\n warning: \"⚠\",\n} satisfies Record<DiagnosticSeverity, string>;\n\n/** How many affected pages to list before collapsing the rest. */\nconst PREVIEW = 3;\n\n/** The skippable tiers, each with the flag that runs it. */\nconst TIER_FLAGS: { tier: AuditTier; flag: string }[] = [\n { flag: \"--external\", tier: \"external\" },\n { flag: \"--url <origin>\", tier: \"network\" },\n];\n\ninterface CheckRollup {\n id: CheckId;\n count: number;\n severity: DiagnosticSeverity;\n category: AuditCategory;\n title: string;\n findings: Diagnostic[];\n}\n\n/**\n * Group findings by check. This is the difference between a report people read\n * and one they close: 214 pages × 6 findings is an unreadable wall, but \"Meta\n * description missing — 12 pages\" is a to-do list.\n */\nexport const rollup = (diagnostics: Diagnostic[]): CheckRollup[] => {\n const groups = new Map<string, Diagnostic[]>();\n for (const diagnostic of diagnostics) {\n const group = groups.get(diagnostic.code);\n if (group) {\n group.push(diagnostic);\n } else {\n groups.set(diagnostic.code, [diagnostic]);\n }\n }\n\n const order = {\n error: 0,\n info: 2,\n warning: 1,\n } satisfies Record<DiagnosticSeverity, number>;\n const checks = [...groups.entries()].map(([id, findings]) => {\n // SAFETY: audit findings are only ever created through `finding()`, whose\n // codes are the check catalog's ids.\n const checkId = id as CheckId;\n const { category, severity, title } = checkMeta(checkId);\n return {\n category,\n count: findings.length,\n findings,\n id: checkId,\n severity,\n title,\n };\n });\n\n // Rank each category by the worst thing in it, so the categories that need\n // attention lead. Sorting on severity alone would interleave the categories\n // and print \"content\" three separate times.\n const worst = new Map<AuditCategory, number>();\n for (const check of checks) {\n const rank = order[check.severity];\n worst.set(\n check.category,\n Math.min(worst.get(check.category) ?? rank, rank)\n );\n }\n\n return checks.toSorted(\n (a, b) =>\n (worst.get(a.category) ?? 0) - (worst.get(b.category) ?? 0) ||\n a.category.localeCompare(b.category) ||\n order[a.severity] - order[b.severity] ||\n b.count - a.count\n );\n};\n\n/** Categories that had no findings but were never run, and the flag that runs them. */\nconst skippedTiers = (tiers: Record<AuditTier, boolean>): string[] =>\n TIER_FLAGS.filter(({ tier }) => !tiers[tier]).map(({ flag, tier }) => {\n const label = CHECKS.filter((check) => check.tier === tier).length;\n return ` ${colors.dim(`⊘ ${tier.padEnd(12)} skipped — pass ${flag} (${label} checks)`)}`;\n });\n\n/** How many checks actually ran, i.e. those whose tier was enabled. */\nconst activeChecks = (tiers: Record<AuditTier, boolean>): number =>\n CHECKS.filter((check) => tiers[check.tier]).length;\n\n/**\n * Individual checks performed: every rule that ran, against every page crawled.\n * The headline number — it's what makes \"39 warnings\" legible as a proportion\n * rather than a bare count.\n */\nexport const auditCount = (result: AuditResult): number =>\n activeChecks(result.tiers) * result.pages;\n\nconst summaryLine = (\n counts: Record<DiagnosticSeverity, number>,\n audits: number\n): string =>\n [\n `${audits.toLocaleString(\"en-US\")} audit${audits === 1 ? \"\" : \"s\"}`,\n `${counts.error} error${counts.error === 1 ? \"\" : \"s\"}`,\n `${counts.warning} warning${counts.warning === 1 ? \"\" : \"s\"}`,\n `${counts.info} note${counts.info === 1 ? \"\" : \"s\"}`,\n ].join(\" · \");\n\n/** One affected page: the URL, and the source file that fixes it. */\nconst findingLine = (diagnostic: Diagnostic, root: string): string => {\n const url = diagnostic.url ?? \"\";\n const source = diagnostic.file\n ? colors.dim(\n `${relative(root, diagnostic.file)}${\n diagnostic.line === undefined ? \"\" : `:${diagnostic.line}`\n }`\n )\n : \"\";\n // padEnd alone yields no gap once the URL reaches the column width.\n return ` ${url.padEnd(34)} ${source}`.trimEnd();\n};\n\n/**\n * Render the audit as a report grouped by check, with each check's affected\n * pages, the source file to edit, and the fix.\n */\nexport const formatReport = (\n result: AuditResult,\n root: string,\n options: { verbose?: boolean } = {}\n): string => {\n const counts = countBySeverity(result.diagnostics);\n const groups = rollup(result.diagnostics);\n const lines: string[] = [];\n\n const where = result.origin\n ? `${relative(root, result.staticDir) || \"dist\"} + ${result.origin}`\n : `${relative(root, result.staticDir) || \"dist\"} · offline`;\n lines.push(\n \"\",\n ` ${colors.bold(\"blume audit\")} ${colors.dim(`${result.pages} pages · ${where}`)}`,\n ` ${summaryLine(counts, auditCount(result))}`,\n \"\"\n );\n\n if (groups.length === 0) {\n lines.push(` ${colors.green(\"✔ No issues found.\")}`, \"\");\n }\n\n let category: AuditCategory | null = null;\n for (const group of groups) {\n const { category: next } = group;\n if (next !== category) {\n category = next;\n lines.push(` ${colors.bold(category)}`, \"\");\n }\n\n const color = SEVERITY_COLOR[group.severity];\n const pages = `${group.count} page${group.count === 1 ? \"\" : \"s\"}`;\n lines.push(\n ` ${color(`${GLYPH[group.severity]} ${group.title}`)} ${colors.dim(pages)}`\n );\n\n const shown = options.verbose\n ? group.findings\n : group.findings.slice(0, PREVIEW);\n for (const diagnostic of shown) {\n lines.push(findingLine(diagnostic, root));\n // The message names the specifics the rolled-up line can't — which target\n // is broken, what the duplicate is — so --verbose prints it per finding.\n if (options.verbose) {\n lines.push(` ${colors.dim(diagnostic.message)}`);\n }\n }\n const hidden = group.count - shown.length;\n if (hidden > 0) {\n lines.push(` ${colors.dim(`… and ${hidden} more (--verbose)`)}`);\n }\n\n // Every finding in a group shares the catalog's fix unless it overrode it,\n // so showing the first one's is showing the group's.\n const [first] = group.findings;\n const fix = first?.suggestion;\n if (fix) {\n lines.push(` ${colors.cyan(`fix: ${fix}`)}`);\n }\n lines.push(\"\");\n }\n\n const skipped = skippedTiers(result.tiers);\n if (skipped.length > 0) {\n lines.push(...skipped, \"\");\n }\n\n return lines.join(\"\\n\");\n};\n\n/**\n * The machine-readable report. The existing `diagnostics` + `summary` shape is\n * preserved exactly — anything already parsing `blume validate --json` keeps\n * working — with the audit-specific rollup added alongside it.\n */\nexport const reportJson = (result: AuditResult, root: string): string => {\n const diagnostics = result.diagnostics.map((diagnostic) =>\n diagnostic.file\n ? { ...diagnostic, file: relative(root, diagnostic.file) }\n : diagnostic\n );\n return `${JSON.stringify(\n {\n audit: {\n /** Checks run × pages crawled — the total number of individual audits. */\n audits: auditCount(result),\n checks: rollup(result.diagnostics).map((group) => ({\n category: group.category,\n count: group.count,\n id: group.id,\n severity: group.severity,\n })),\n origin: result.origin,\n pages: result.pages,\n staticDir: relative(root, result.staticDir),\n tiers: result.tiers,\n },\n diagnostics,\n summary: countBySeverity(result.diagnostics),\n },\n null,\n 2\n )}\\n`;\n};\n\n/** `--list-checks`: the catalog, which is also the docs' source of truth. */\nexport const formatCatalog = (): string => {\n const lines: string[] = [\"\"];\n let category: AuditCategory | null = null;\n for (const check of [...CHECKS].toSorted((a, b) =>\n a.category.localeCompare(b.category)\n )) {\n const { category: next } = check;\n if (next !== category) {\n category = next;\n lines.push(` ${colors.bold(category)}`);\n }\n const tier =\n check.tier === \"static\" ? \"\" : ` ${colors.dim(`[${check.tier}]`)}`;\n lines.push(\n ` ${SEVERITY_COLOR[check.severity](GLYPH[check.severity])} ${check.id.replace(\"BLUME_AUDIT_\", \"\").toLowerCase().padEnd(34)} ${colors.dim(check.title)}${tier}`\n );\n }\n lines.push(\"\", ` ${CHECKS.length} checks.`, \"\");\n return lines.join(\"\\n\");\n};\n",
6
- "import type { Diagnostic } from \"../core/types.ts\";\nimport type { CheckMeta } from \"./types.ts\";\n\n/**\n * Every check `blume audit` can report.\n *\n * This is deliberately ~76 checks, not the ~173 rows an Ahrefs site audit\n * lists. Ahrefs crawls the open web, so its list is padded with rows that are\n * structurally impossible for an Astro-built Blume site, and shipping those as\n * permanent zeroes teaches people to ignore the report. What was dropped, and\n * why:\n *\n * - **Every `nofollow` check** (~6 rows, including all four \"nofollow incoming\n * internal links\" variants). `RootLayout.astro` only ever emits `<meta\n * name=\"robots\" content=\"noindex\">`; Blume has no way to emit `nofollow`, so\n * they could never fire. Hand-written `rel=\"nofollow\"` in MDX is still caught\n * by `INTERNAL_LINK_NOFOLLOW`.\n * - **The whole JavaScript + CSS section** (~11 rows: \"JS redirects\", \"CSS\n * redirects\", \"page has redirected JS/CSS\", \"HTTPS page links to HTTP\n * JS/CSS\"…). Vite emits content-hashed, existent, non-redirecting bundles.\n * Collapsed into one `SUBRESOURCE_MISSING`.\n * - **Ahrefs' indexable/non-indexable duplicates** (~20 rows). Carried instead\n * by `PageSnapshot.indexable` on a single finding.\n * - **\"Only one dofollow incoming internal link\"** and **\"page has no outgoing\n * links\"**. Blume's sidebar links every page from every page, so these fire on\n * ~100% of pages. Pure noise.\n * - **\"3XX redirect\"** and **\"302 redirect\"**: having a redirect is inventory,\n * not a finding. **\"HTTP to HTTPS redirect\"** is correct behavior.\n * - **\"Font size too small\" / \"tap targets too close\" / \"content not sized\n * correctly\"**: properties of the theme, identical on every page. A regression\n * there is a Blume bug, not a user finding.\n * - **\"Document uses plugins\"** and **\"poor FID\"** (FID is deprecated; lab\n * Lighthouse cannot measure INP, so we report TBT and say so).\n * - **\"More than three parameters in URL\"**: a static docs site emits no query\n * strings in its own links.\n * - **\"Page in multiple sitemaps\"**: Blume emits exactly one sitemap.\n * - **Core Web Vitals** (LCP/CLS/INP): these need a real browser. Rather than\n * ship a `--lighthouse` flag that silently reports nothing, they are deferred\n * until Lighthouse is actually wired in. A tier the audit cannot run is worse\n * than one it openly doesn't have.\n *\n * Severity discipline: `error` means \"this is definitely broken\". Anything\n * advisory ships as `warning`/`info`. One noisy check and the whole command gets\n * switched off.\n */\nexport const CHECKS = [\n // Content\n {\n category: \"content\",\n fix: \"Add a `title` to the page's frontmatter.\",\n id: \"BLUME_AUDIT_TITLE_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"Title tag missing or empty\",\n },\n {\n category: \"content\",\n fix: \"Remove the extra <title> from the page's layout or MDX.\",\n id: \"BLUME_AUDIT_TITLE_MULTIPLE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Multiple title tags\",\n },\n {\n category: \"content\",\n fix: \"Rewrite `title` in the frontmatter to fit the length range.\",\n id: \"BLUME_AUDIT_TITLE_LENGTH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Title too long or too short\",\n },\n {\n category: \"content\",\n fix: \"Add a `description` to the page's frontmatter.\",\n id: \"BLUME_AUDIT_DESCRIPTION_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Meta description missing or empty\",\n },\n {\n category: \"content\",\n fix: \"Remove the extra description <meta> from the page's layout or MDX.\",\n id: \"BLUME_AUDIT_DESCRIPTION_MULTIPLE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Multiple meta description tags\",\n },\n {\n category: \"content\",\n fix: \"Rewrite `description` in the frontmatter to fit the length range.\",\n id: \"BLUME_AUDIT_DESCRIPTION_LENGTH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Meta description too long or too short\",\n },\n {\n category: \"content\",\n fix: \"Give the page a `title` — Blume renders it as the page's <h1>.\",\n id: \"BLUME_AUDIT_H1_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"H1 tag missing or empty\",\n },\n {\n category: \"content\",\n fix: \"Demote the extra `# Heading` in the body to `##` — Blume already renders `title` as the h1.\",\n id: \"BLUME_AUDIT_H1_MULTIPLE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Multiple H1 tags\",\n },\n {\n category: \"content\",\n fix: \"Expand the page, or fold it into a larger one.\",\n id: \"BLUME_AUDIT_LOW_WORD_COUNT\",\n severity: \"info\",\n tier: \"static\",\n title: \"Low word count\",\n },\n {\n category: \"content\",\n fix: \"Adjust the heading to the next level down — skipped levels break table-of-contents nesting and screen-reader outlines.\",\n id: \"BLUME_AUDIT_HEADING_SKIP\",\n severity: \"info\",\n tier: \"static\",\n title: \"Heading levels skip (e.g. h2 to h4)\",\n },\n {\n category: \"content\",\n fix: \"Correct the `date`, or hold the page back until it is meant to be live.\",\n id: \"BLUME_AUDIT_FUTURE_DATED_PAGE\",\n severity: \"info\",\n tier: \"static\",\n title: \"Page is dated in the future\",\n },\n {\n category: \"content\",\n fix: \"Restore the viewport <meta> in your ejected layout.\",\n id: \"BLUME_AUDIT_VIEWPORT_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"Viewport not set\",\n },\n\n // Duplicates\n {\n category: \"duplicates\",\n fix: \"Give each page a distinct `title` — search engines show it as the result headline.\",\n id: \"BLUME_AUDIT_DUPLICATE_TITLE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Duplicate title\",\n },\n {\n category: \"duplicates\",\n fix: \"Give each page a distinct `description`.\",\n id: \"BLUME_AUDIT_DUPLICATE_DESCRIPTION\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Duplicate meta description\",\n },\n {\n category: \"duplicates\",\n fix: \"Merge the pages, or set `seo.canonical` on all but one.\",\n id: \"BLUME_AUDIT_DUPLICATE_CONTENT\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Duplicate pages without canonical\",\n },\n\n // Indexability\n {\n category: \"indexability\",\n fix: \"Set `deployment.site` in blume.config.ts to the site's public URL.\",\n id: \"BLUME_AUDIT_SITE_NOT_SET\",\n severity: \"warning\",\n tier: \"static\",\n title: \"deployment.site is not set\",\n },\n {\n category: \"indexability\",\n fix: \"Audit a production-like build (e.g. `VERCEL=1 VERCEL_PROJECT_PRODUCTION_URL=<host> blume build`) or the deployment itself with `--url <origin>`. Do not hardcode `deployment.site` — the platform sets it on every deploy.\",\n id: \"BLUME_AUDIT_SITE_INFERRED_AT_DEPLOY\",\n severity: \"info\",\n tier: \"static\",\n title: \"deployment.site is inferred at deploy time\",\n },\n {\n category: \"indexability\",\n fix: \"Drop the canonical from noindex pages — Google treats the pairing as contradictory and may ignore one of the two.\",\n id: \"BLUME_AUDIT_CANONICAL_ON_NOINDEX\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Page is noindex but declares a canonical\",\n },\n {\n category: \"indexability\",\n fix: \"Rebuild without `--preview` before deploying, or remove `draft: true` if the page is ready to ship.\",\n id: \"BLUME_AUDIT_DRAFT_PAGE_PUBLISHED\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Draft page is in the build\",\n },\n {\n category: \"indexability\",\n fix: \"Set `deployment.site` so Blume can emit absolute canonical URLs.\",\n id: \"BLUME_AUDIT_CANONICAL_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Canonical URL missing\",\n },\n {\n category: \"indexability\",\n fix: \"Point `seo.canonical` at this page, or remove it to use the default self-canonical.\",\n id: \"BLUME_AUDIT_CANONICAL_NOT_SELF\",\n severity: \"info\",\n tier: \"static\",\n title: \"Non-canonical page\",\n },\n {\n category: \"indexability\",\n fix: \"Point `seo.canonical` at a page that exists and doesn't redirect.\",\n id: \"BLUME_AUDIT_CANONICAL_BAD_TARGET\",\n severity: \"error\",\n tier: \"static\",\n title: \"Canonical points to a broken or redirecting page\",\n },\n {\n category: \"indexability\",\n fix: \"Use the same protocol in `seo.canonical` as in `deployment.site`.\",\n id: \"BLUME_AUDIT_CANONICAL_PROTOCOL_MISMATCH\",\n severity: \"error\",\n tier: \"static\",\n title: \"Canonical protocol does not match the site\",\n },\n {\n category: \"indexability\",\n fix: \"Remove `noindex` from the page's frontmatter if it should be indexed.\",\n id: \"BLUME_AUDIT_ROBOTS_META_UNEXPECTED\",\n severity: \"info\",\n tier: \"static\",\n title: \"Page is not indexable\",\n },\n {\n category: \"indexability\",\n fix: \"Split the page — Googlebot stops reading an HTML document at 2 MB.\",\n id: \"BLUME_AUDIT_HTML_TOO_LARGE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Page exceeds Googlebot's 2 MB crawl limit\",\n },\n {\n category: \"indexability\",\n fix: \"Remove the X-Robots-Tag header, or align it with the page's robots meta.\",\n id: \"BLUME_AUDIT_ROBOTS_HEADER_CONFLICT\",\n severity: \"error\",\n tier: \"network\",\n title: \"X-Robots-Tag header conflicts with the page's robots meta\",\n },\n\n // Links\n {\n category: \"links\",\n fix: \"Fix the link target, or create the page it points at.\",\n id: \"BLUME_AUDIT_LINK_TO_BROKEN\",\n severity: \"error\",\n tier: \"static\",\n title: \"Page has links to a broken page\",\n },\n {\n category: \"links\",\n fix: \"Link straight to the destination instead of through the redirect.\",\n id: \"BLUME_AUDIT_LINK_TO_REDIRECT\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Page has links to a redirect\",\n },\n {\n category: \"links\",\n fix: \"Link to this page from the body of a related page.\",\n id: \"BLUME_AUDIT_ORPHAN_PAGE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Orphan page (only reachable from navigation)\",\n },\n {\n category: \"links\",\n fix: \"Use a root-relative path (`/docs/x`) so the link survives previews and `basePath`.\",\n id: \"BLUME_AUDIT_INTERNAL_LINK_ABSOLUTE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Internal link hardcodes the site's own origin\",\n },\n {\n category: \"links\",\n fix: 'Drop `rel=\"nofollow\"` — it stops this page passing authority internally.',\n id: \"BLUME_AUDIT_INTERNAL_LINK_NOFOLLOW\",\n severity: \"info\",\n tier: \"static\",\n title: \"Page has nofollow outgoing internal links\",\n },\n {\n category: \"links\",\n fix: \"Check `basePath` / `deployment.base` — a trailing slash there produces `//`.\",\n id: \"BLUME_AUDIT_DOUBLE_SLASH_URL\",\n severity: \"error\",\n tier: \"static\",\n title: \"Double slash in URL\",\n },\n {\n category: \"links\",\n fix: \"Point the fragment at a heading that exists on the target page, or fix the heading it meant.\",\n id: \"BLUME_AUDIT_ANCHOR_BROKEN\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Link fragment matches no id on the target page\",\n },\n {\n category: \"links\",\n fix: \"Rename the source file to a lowercase, hyphenated slug — and add a redirect from the old URL if it was already published.\",\n id: \"BLUME_AUDIT_URL_STYLE\",\n severity: \"info\",\n tier: \"static\",\n title: \"URL contains uppercase, underscores, or spaces\",\n },\n\n // Redirects\n {\n category: \"redirects\",\n fix: \"Point the redirect at a page that exists.\",\n id: \"BLUME_AUDIT_REDIRECT_BROKEN\",\n severity: \"error\",\n tier: \"static\",\n title: \"Broken redirect\",\n },\n {\n category: \"redirects\",\n fix: \"Break the cycle in `redirects` — it never resolves.\",\n id: \"BLUME_AUDIT_REDIRECT_LOOP\",\n severity: \"error\",\n tier: \"static\",\n title: \"Redirect loop\",\n },\n {\n category: \"redirects\",\n fix: \"Point every hop straight at the final destination.\",\n id: \"BLUME_AUDIT_REDIRECT_CHAIN\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Redirect chain\",\n },\n {\n category: \"redirects\",\n fix: \"Use a real redirect in `blume.config.ts` instead of a meta refresh.\",\n id: \"BLUME_AUDIT_META_REFRESH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Meta refresh redirect\",\n },\n {\n category: \"redirects\",\n fix: \"Remove the redirect, or delete the page it shadows — the page wins and the redirect never fires.\",\n id: \"BLUME_AUDIT_REDIRECT_SOURCE_IS_PAGE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Redirect source is also a real page\",\n },\n {\n category: \"redirects\",\n fix: \"Redirect to the HTTPS URL.\",\n id: \"BLUME_AUDIT_REDIRECT_TO_HTTP\",\n severity: \"error\",\n tier: \"network\",\n title: \"HTTPS to HTTP redirect\",\n },\n\n // Social\n {\n category: \"social\",\n fix: \"Add a `description` — Blume fills the rest of the Open Graph tags for you.\",\n id: \"BLUME_AUDIT_OG_INCOMPLETE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph tags missing or incomplete\",\n },\n {\n category: \"social\",\n fix: \"Set `deployment.site` to turn on generated OG images, or set `seo.image` on the page.\",\n id: \"BLUME_AUDIT_OG_IMAGE_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph image missing\",\n },\n {\n category: \"social\",\n fix: \"Point `seo.image` at a file that exists, or rebuild — a dead og:image renders as a blank card everywhere the page is shared.\",\n id: \"BLUME_AUDIT_OG_IMAGE_BROKEN\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph image is not in the build\",\n },\n {\n category: \"social\",\n fix: \"Use an image of at least 1200×630 — smaller ones render blurry or get cropped into small-card layouts.\",\n id: \"BLUME_AUDIT_OG_IMAGE_SMALL\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph image is too small for large cards\",\n },\n {\n category: \"social\",\n fix: \"Align `og:url` with the page's canonical URL.\",\n id: \"BLUME_AUDIT_OG_URL_MISMATCH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph URL not matching canonical\",\n },\n {\n category: \"social\",\n fix: \"Set `seo.x.handle` in blume.config.ts so X can attribute the card.\",\n id: \"BLUME_AUDIT_TWITTER_CARD_INCOMPLETE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"X (Twitter) card missing or incomplete\",\n },\n\n // Localization\n {\n category: \"i18n\",\n fix: \"Restore the `lang` attribute on <html> in your ejected layout.\",\n id: \"BLUME_AUDIT_HTML_LANG_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"HTML lang attribute missing\",\n },\n {\n category: \"i18n\",\n fix: \"Use a valid BCP 47 tag (e.g. `en`, `en-GB`) for the locale.\",\n id: \"BLUME_AUDIT_HTML_LANG_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"HTML lang attribute invalid\",\n },\n {\n category: \"i18n\",\n fix: \"The page's <html lang> must match its own hreflang annotation.\",\n id: \"BLUME_AUDIT_HREFLANG_LANG_MISMATCH\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang and HTML lang mismatch\",\n },\n {\n category: \"i18n\",\n fix: \"Use a valid BCP 47 tag in the hreflang annotation.\",\n id: \"BLUME_AUDIT_HREFLANG_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang annotation invalid\",\n },\n {\n category: \"i18n\",\n fix: \"A page's hreflang set must include a self-reference.\",\n id: \"BLUME_AUDIT_HREFLANG_SELF_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Self-reference hreflang annotation missing\",\n },\n {\n category: \"i18n\",\n fix: \"Add an `x-default` alternate pointing at the default-locale page.\",\n id: \"BLUME_AUDIT_HREFLANG_XDEFAULT_MISSING\",\n severity: \"info\",\n tier: \"static\",\n title: \"X-default hreflang annotation missing\",\n },\n {\n category: \"i18n\",\n fix: \"Every page in an hreflang group must link back to every other one.\",\n id: \"BLUME_AUDIT_HREFLANG_NO_RETURN_TAG\",\n severity: \"error\",\n tier: \"static\",\n title: \"Missing reciprocal hreflang (no return-tag)\",\n },\n {\n category: \"i18n\",\n fix: \"Point the hreflang alternate at a page that exists and is canonical.\",\n id: \"BLUME_AUDIT_HREFLANG_BAD_TARGET\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang points to a broken, redirecting, or non-canonical page\",\n },\n {\n category: \"i18n\",\n fix: \"Each language in an hreflang group must name exactly one page.\",\n id: \"BLUME_AUDIT_HREFLANG_CONFLICT\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang group has a language conflict\",\n },\n\n // Assets\n {\n category: \"assets\",\n fix: 'Add descriptive `alt` text, or `alt=\"\"` if the image is decorative.',\n id: \"BLUME_AUDIT_IMAGE_ALT_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Missing alt text\",\n },\n {\n category: \"assets\",\n fix: \"Fix the image path, or add the file to public/.\",\n id: \"BLUME_AUDIT_IMAGE_BROKEN\",\n severity: \"error\",\n tier: \"static\",\n title: \"Image broken\",\n },\n {\n category: \"assets\",\n fix: \"Compress the asset, or serve a modern format (WebP/AVIF).\",\n id: \"BLUME_AUDIT_ASSET_TOO_LARGE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Asset file size too large\",\n },\n {\n category: \"assets\",\n fix: \"Set `width` and `height` so the browser can reserve space (avoids layout shift).\",\n id: \"BLUME_AUDIT_IMAGE_MISSING_DIMENSIONS\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Image has no width/height\",\n },\n {\n category: \"assets\",\n fix: \"Fix the reference, or restore the missing file.\",\n id: \"BLUME_AUDIT_SUBRESOURCE_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"Referenced script, style, or asset is missing from the build\",\n },\n {\n category: \"assets\",\n fix: \"Load the subresource over HTTPS — browsers block mixed content.\",\n id: \"BLUME_AUDIT_MIXED_CONTENT\",\n severity: \"error\",\n tier: \"static\",\n title: \"HTTPS/HTTP mixed content\",\n },\n\n // Sitemap\n {\n category: \"sitemap\",\n fix: \"Remove `draft`/`hidden`/`noindex` from the page's frontmatter if it should be indexed.\",\n id: \"BLUME_AUDIT_INDEXABLE_PAGE_NOT_IN_SITEMAP\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Indexable page not in sitemap\",\n },\n {\n category: \"sitemap\",\n fix: \"A noindex page should not be advertised in the sitemap.\",\n id: \"BLUME_AUDIT_NOINDEX_IN_SITEMAP\",\n severity: \"error\",\n tier: \"static\",\n title: \"Noindex page in sitemap\",\n },\n {\n category: \"sitemap\",\n fix: \"List only canonical URLs in the sitemap.\",\n id: \"BLUME_AUDIT_NON_CANONICAL_IN_SITEMAP\",\n severity: \"error\",\n tier: \"static\",\n title: \"Non-canonical page in sitemap\",\n },\n {\n category: \"sitemap\",\n fix: \"Remove the URL from the sitemap, or build the page it names.\",\n id: \"BLUME_AUDIT_SITEMAP_BAD_URL\",\n severity: \"error\",\n tier: \"static\",\n title: \"Sitemap names a page that does not exist or redirects\",\n },\n {\n category: \"sitemap\",\n fix: \"Sitemaps must be valid XML in the sitemaps.org urlset format.\",\n id: \"BLUME_AUDIT_SITEMAP_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"Sitemap has a syntax error or wrong format\",\n },\n {\n category: \"sitemap\",\n fix: \"Split the sitemap — the limits are 50 MB and 50,000 URLs.\",\n id: \"BLUME_AUDIT_SITEMAP_TOO_LARGE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Sitemap exceeds 50 MB or 50,000 URLs\",\n },\n {\n category: \"sitemap\",\n fix: \"Use a real W3C date that is not in the future — search engines that catch a sitemap lying about freshness stop trusting its lastmod entirely.\",\n id: \"BLUME_AUDIT_SITEMAP_LASTMOD_INVALID\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Sitemap lastmod is invalid or in the future\",\n },\n {\n category: \"sitemap\",\n fix: \"A sitemap may only list URLs on its own origin.\",\n id: \"BLUME_AUDIT_SITEMAP_OUT_OF_SCOPE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Sitemap includes URLs out of its scope\",\n },\n {\n category: \"sitemap\",\n fix: \"Make sitemap.xml reachable at the site root.\",\n id: \"BLUME_AUDIT_SITEMAP_NOT_ACCESSIBLE\",\n severity: \"error\",\n tier: \"network\",\n title: \"Sitemap is not accessible\",\n },\n\n // robots.txt\n {\n category: \"robots\",\n fix: \"Set `seo.robots: true` to generate robots.txt.\",\n id: \"BLUME_AUDIT_ROBOTS_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"robots.txt missing\",\n },\n {\n category: \"robots\",\n fix: \"Every robots.txt line must be a `Field: value` directive or a comment.\",\n id: \"BLUME_AUDIT_ROBOTS_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"robots.txt has a syntax error\",\n },\n {\n category: \"robots\",\n fix: \"A page can't be both disallowed in robots.txt and advertised in the sitemap.\",\n id: \"BLUME_AUDIT_ROBOTS_DISALLOWS_INDEXABLE\",\n severity: \"error\",\n tier: \"static\",\n title: \"robots.txt disallows a page that is in the sitemap\",\n },\n {\n category: \"robots\",\n fix: \"Set `deployment.site` so robots.txt can reference the sitemap.\",\n id: \"BLUME_AUDIT_ROBOTS_SITEMAP_MISSING\",\n severity: \"info\",\n tier: \"static\",\n title: \"robots.txt does not reference the sitemap\",\n },\n {\n category: \"robots\",\n fix: \"Make robots.txt reachable at the site root.\",\n id: \"BLUME_AUDIT_ROBOTS_NOT_ACCESSIBLE\",\n severity: \"error\",\n tier: \"network\",\n title: \"robots.txt is not accessible\",\n },\n\n // AI discovery. `llms.txt` is the sitemap of the AI era, and no SEO crawler\n // audits it — they audit for Google. Blume emits it, so Blume checks it.\n {\n category: \"ai\",\n fix: \"Rebuild — `ai.llmsTxt` is enabled but the build has no llms.txt. If that's intentional, set `ai.llmsTxt: false`.\",\n id: \"BLUME_AUDIT_LLMS_TXT_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"llms.txt missing from the build\",\n },\n {\n category: \"ai\",\n fix: \"Rebuild so llms.txt matches the site — a stale entry sends an AI agent to a page that is not there.\",\n id: \"BLUME_AUDIT_LLMS_TXT_STALE_ENTRY\",\n severity: \"warning\",\n tier: \"static\",\n title: \"llms.txt lists a page the build does not serve\",\n },\n {\n category: \"ai\",\n fix: \"Rebuild so llms.txt matches the site; if the page is deliberately excluded, mark it `seo.noindex` or `sidebar.hidden`.\",\n id: \"BLUME_AUDIT_LLMS_TXT_PAGE_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Indexable page missing from llms.txt\",\n },\n // DNS-AID (draft-mozleywilliams-dnsop-dnsaid) lives in the DNS zone, not the\n // build, so unlike the llms.txt checks these can only observe and advise —\n // hence `info`: publishing the records is a DNS-provider action Blume can't\n // take for you, and the draft is young enough that absence is the norm.\n {\n category: \"ai\",\n fix: \"Publish a ServiceMode SVCB or HTTPS record at `_index._agents.<host>` with your DNS provider so agents can discover the site via DNS (DNS-AID).\",\n id: \"BLUME_AUDIT_DNS_AID_MISSING\",\n severity: \"info\",\n tier: \"network\",\n title: \"No DNS-AID agent-discovery records\",\n },\n {\n category: \"ai\",\n fix: \"Enable DNSSEC for the zone so validating resolvers return authenticated DNS-AID answers; if your DNS provider doesn't support DNSSEC, the records still work unsigned.\",\n id: \"BLUME_AUDIT_DNS_AID_UNSIGNED\",\n severity: \"info\",\n tier: \"network\",\n title: \"DNS-AID records are not DNSSEC-authenticated\",\n },\n\n // Structured data. Note we validate only what Blume itself emits — we do not\n // claim Google-rich-results or full schema.org validation (the former is an\n // undocumented network API, the latter a vocabulary we don't bundle).\n {\n category: \"structured-data\",\n fix: \"The JSON-LD block must be valid JSON.\",\n id: \"BLUME_AUDIT_JSONLD_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"Structured data is not valid JSON\",\n },\n {\n category: \"structured-data\",\n fix: \"Every JSON-LD node needs `@context` and `@type`.\",\n id: \"BLUME_AUDIT_JSONLD_INCOMPLETE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Structured data is missing required properties\",\n },\n\n // Network (`--url`)\n {\n category: \"network\",\n fix: \"The page is linked or in the sitemap but the deployment 404s it.\",\n id: \"BLUME_AUDIT_HTTP_4XX\",\n severity: \"error\",\n tier: \"network\",\n title: \"4XX page\",\n },\n {\n category: \"network\",\n fix: \"The deployment is erroring on this page.\",\n id: \"BLUME_AUDIT_HTTP_5XX\",\n severity: \"error\",\n tier: \"network\",\n title: \"5XX page\",\n },\n {\n category: \"network\",\n fix: \"The page did not respond in time.\",\n id: \"BLUME_AUDIT_HTTP_TIMEOUT\",\n severity: \"error\",\n tier: \"network\",\n title: \"Timed out\",\n },\n {\n category: \"network\",\n fix: \"Enable gzip or brotli on the host.\",\n id: \"BLUME_AUDIT_NOT_COMPRESSED\",\n severity: \"warning\",\n tier: \"network\",\n title: \"Not compressed\",\n },\n {\n category: \"network\",\n fix: \"The page was slow to respond.\",\n id: \"BLUME_AUDIT_SLOW_RESPONSE\",\n severity: \"warning\",\n tier: \"network\",\n title: \"Slow page\",\n },\n\n // External (`--external`)\n {\n category: \"network\",\n fix: \"Fix or remove the outbound link.\",\n id: \"BLUME_AUDIT_EXTERNAL_LINK_BROKEN\",\n severity: \"error\",\n tier: \"external\",\n title: \"External link is broken\",\n },\n {\n category: \"network\",\n fix: \"Link straight to the destination.\",\n id: \"BLUME_AUDIT_EXTERNAL_LINK_REDIRECT\",\n severity: \"info\",\n tier: \"external\",\n title: \"External link redirects\",\n },\n] as const satisfies readonly CheckMeta[];\n\nexport type CheckId = (typeof CHECKS)[number][\"id\"];\n\nconst BY_ID = new Map<string, CheckMeta>(\n CHECKS.map((check) => [check.id, check])\n);\n\nexport const checkMeta = (id: CheckId): CheckMeta => {\n const meta = BY_ID.get(id);\n if (!meta) {\n throw new Error(`Unknown audit check: ${id}`);\n }\n return meta;\n};\n\nconst DOCS_BASE = \"https://useblume.dev/docs/reference/audit\";\n\n/** `BLUME_AUDIT_TITLE_TOO_LONG` -> `…/audit#title-too-long`. */\nexport const checkDocsUrl = (id: CheckId): string =>\n `${DOCS_BASE}#${id.replace(\"BLUME_AUDIT_\", \"\").toLowerCase().replaceAll(\"_\", \"-\")}`;\n\n/** Where a finding happened: the built URL, plus the source file that fixes it. */\nexport interface FindingSite {\n url: string;\n file?: string;\n line?: number;\n column?: number;\n}\n\n/**\n * Build a diagnostic for a check. Severity, remediation, and the docs anchor all\n * come from the catalog, so a check body only supplies what's specific to the\n * occurrence: where it happened and what was actually wrong.\n */\nexport const finding = (\n id: CheckId,\n site: FindingSite,\n detail: string,\n fix?: string\n): Diagnostic => {\n const meta = checkMeta(id);\n return {\n code: id,\n column: site.column,\n docsUrl: checkDocsUrl(id),\n file: site.file,\n line: site.line,\n message: detail,\n severity: meta.severity,\n suggestion: fix ?? meta.fix,\n url: site.url,\n };\n};\n",
7
- "import { mkdtemp, writeFile } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\n\nimport spawn from \"cross-spawn\";\nimport { join } from \"pathe\";\n\nimport { reportJson } from \"./report.ts\";\nimport type { AuditResult } from \"./run.ts\";\n\n/** A coding agent CLI the audit can hand its findings to (`--claude`, `--codex`). */\nexport interface AgentCli {\n /** The executable to look up on PATH. */\n bin: string;\n /** How to install it, shown when the executable is missing. */\n install: string;\n /** Display name for messages. */\n name: string;\n}\n\nexport type AgentKind = \"claude\" | \"codex\";\n\nexport const AGENTS = {\n claude: {\n bin: \"claude\",\n install: \"npm install -g @anthropic-ai/claude-code\",\n name: \"Claude Code\",\n },\n codex: {\n bin: \"codex\",\n install: \"npm install -g @openai/codex\",\n name: \"Codex\",\n },\n} satisfies Record<AgentKind, AgentCli>;\n\n/**\n * Write the full JSON report where the agent can read it. A file rather than\n * inline prompt text: a large site's report can exceed the platform's argv\n * limit, and the JSON already carries every finding untruncated — the terminal\n * report previews three pages per check, the file never does.\n */\nexport const writeAgentReport = async (\n result: AuditResult,\n root: string\n): Promise<string> => {\n const dir = await mkdtemp(join(tmpdir(), \"blume-audit-\"));\n const path = join(dir, \"report.json\");\n await writeFile(path, reportJson(result, root));\n return path;\n};\n\n/** The handoff prompt: where the report is, how to read it, and the ground rules. */\nexport const fixPrompt = (reportPath: string): string =>\n `Fix the issues found by \\`blume audit\\` in this project.\n\nThe full audit report is at ${reportPath}. It is JSON: each entry in \\`diagnostics\\` is one finding, with the check \\`code\\`, a \\`message\\` explaining what is wrong, the affected page \\`url\\`, the source \\`file\\` to edit (relative to the current directory, with a \\`line\\` when the finding points at a specific front matter key), and a \\`suggestion\\` describing the fix.\n\nWork through every finding:\n1. Read the report and group the findings by \\`file\\`.\n2. Apply each finding's \\`suggestion\\` by editing the named source file — most fixes are front matter edits at the cited line.\n3. Never fix a finding by deleting a page, removing content, or hiding it from the audit; if a finding genuinely needs a human decision, leave it and say so in your summary.\n\nWhen you are done, run \\`blume build\\` and then \\`blume audit\\` to verify, and repeat until the audit reports no issues.`;\n\nconst spawnAgent = (bin: string, args: string[]): Promise<number> =>\n // oxlint-disable-next-line promise/avoid-new -- adapt spawn's event callbacks\n new Promise((resolve, reject) => {\n const child = spawn(bin, args, { stdio: \"inherit\" });\n child.once(\"error\", reject);\n child.once(\"close\", (code) => resolve(code ?? 1));\n });\n\n/**\n * Run the agent CLI interactively with the handoff prompt, inheriting the\n * terminal so the user watches and steers the fixes rather than granting a\n * headless process blanket write access. Resolves with the agent's exit code;\n * rejects when the executable isn't on PATH — on every platform, since\n * cross-spawn resolves npm's `.cmd` shims itself and escapes their arguments\n * (the old `shell: true` launch left quoting to a hand-built command line and\n * reported a missing executable as cmd.exe's exit code 9009).\n *\n * cmd.exe still cannot carry the multi-line prompt as an argument (a newline\n * ends the command), so on Windows the prompt is written to a file next to\n * the report and handed over via a one-line pointer.\n */\nexport const launchAgent = async (\n bin: string,\n prompt: string,\n platform: NodeJS.Platform = process.platform\n): Promise<number> => {\n if (platform !== \"win32\") {\n return await spawnAgent(bin, [prompt]);\n }\n const dir = await mkdtemp(join(tmpdir(), \"blume-audit-\"));\n const promptPath = join(dir, \"prompt.md\");\n await writeFile(promptPath, prompt);\n return await spawnAgent(bin, [\n `Read ${promptPath} and follow its instructions exactly.`,\n ]);\n};\n"
6
+ "import type { Diagnostic } from \"../core/types.ts\";\nimport type { CheckMeta } from \"./types.ts\";\n\n/**\n * Every check `blume audit` can report.\n *\n * This is deliberately ~76 checks, not the ~173 rows an Ahrefs site audit\n * lists. Ahrefs crawls the open web, so its list is padded with rows that are\n * structurally impossible for an Astro-built Blume site, and shipping those as\n * permanent zeroes teaches people to ignore the report. What was dropped, and\n * why:\n *\n * - **Every `nofollow` check** (~6 rows, including all four \"nofollow incoming\n * internal links\" variants). `RootLayout.astro` only ever emits `<meta\n * name=\"robots\" content=\"noindex\">`; Blume has no way to emit `nofollow`, so\n * they could never fire. Hand-written `rel=\"nofollow\"` in MDX is still caught\n * by `INTERNAL_LINK_NOFOLLOW`.\n * - **The whole JavaScript + CSS section** (~11 rows: \"JS redirects\", \"CSS\n * redirects\", \"page has redirected JS/CSS\", \"HTTPS page links to HTTP\n * JS/CSS\"…). Vite emits content-hashed, existent, non-redirecting bundles.\n * Collapsed into one `SUBRESOURCE_MISSING`.\n * - **Ahrefs' indexable/non-indexable duplicates** (~20 rows). Carried instead\n * by `PageSnapshot.indexable` on a single finding.\n * - **\"Only one dofollow incoming internal link\"** and **\"page has no outgoing\n * links\"**. Blume's sidebar links every page from every page, so these fire on\n * ~100% of pages. Pure noise.\n * - **\"3XX redirect\"** and **\"302 redirect\"**: having a redirect is inventory,\n * not a finding. **\"HTTP to HTTPS redirect\"** is correct behavior.\n * - **\"Font size too small\" / \"tap targets too close\" / \"content not sized\n * correctly\"**: properties of the theme, identical on every page. A regression\n * there is a Blume bug, not a user finding.\n * - **\"Document uses plugins\"** and **\"poor FID\"** (FID is deprecated; lab\n * Lighthouse cannot measure INP, so we report TBT and say so).\n * - **\"More than three parameters in URL\"**: a static docs site emits no query\n * strings in its own links.\n * - **\"Page in multiple sitemaps\"**: Blume emits exactly one sitemap.\n * - **Core Web Vitals** (LCP/CLS/INP): these need a real browser. Rather than\n * ship a `--lighthouse` flag that silently reports nothing, they are deferred\n * until Lighthouse is actually wired in. A tier the audit cannot run is worse\n * than one it openly doesn't have.\n *\n * Severity discipline: `error` means \"this is definitely broken\". Anything\n * advisory ships as `warning`/`info`. One noisy check and the whole command gets\n * switched off.\n */\nexport const CHECKS = [\n // Content\n {\n category: \"content\",\n fix: \"Add a `title` to the page's frontmatter.\",\n id: \"BLUME_AUDIT_TITLE_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"Title tag missing or empty\",\n },\n {\n category: \"content\",\n fix: \"Remove the extra <title> from the page's layout or MDX.\",\n id: \"BLUME_AUDIT_TITLE_MULTIPLE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Multiple title tags\",\n },\n {\n category: \"content\",\n fix: \"Rewrite `title` in the frontmatter to fit the length range.\",\n id: \"BLUME_AUDIT_TITLE_LENGTH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Title too long or too short\",\n },\n {\n category: \"content\",\n fix: \"Add a `description` to the page's frontmatter.\",\n id: \"BLUME_AUDIT_DESCRIPTION_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Meta description missing or empty\",\n },\n {\n category: \"content\",\n fix: \"Remove the extra description <meta> from the page's layout or MDX.\",\n id: \"BLUME_AUDIT_DESCRIPTION_MULTIPLE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Multiple meta description tags\",\n },\n {\n category: \"content\",\n fix: \"Rewrite `description` in the frontmatter to fit the length range.\",\n id: \"BLUME_AUDIT_DESCRIPTION_LENGTH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Meta description too long or too short\",\n },\n {\n category: \"content\",\n fix: \"Give the page a `title` — Blume renders it as the page's <h1>.\",\n id: \"BLUME_AUDIT_H1_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"H1 tag missing or empty\",\n },\n {\n category: \"content\",\n fix: \"Demote the extra `# Heading` in the body to `##` — Blume already renders `title` as the h1.\",\n id: \"BLUME_AUDIT_H1_MULTIPLE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Multiple H1 tags\",\n },\n {\n category: \"content\",\n fix: \"Expand the page, or fold it into a larger one.\",\n id: \"BLUME_AUDIT_LOW_WORD_COUNT\",\n severity: \"info\",\n tier: \"static\",\n title: \"Low word count\",\n },\n {\n category: \"content\",\n fix: \"Adjust the heading to the next level down — skipped levels break table-of-contents nesting and screen-reader outlines.\",\n id: \"BLUME_AUDIT_HEADING_SKIP\",\n severity: \"info\",\n tier: \"static\",\n title: \"Heading levels skip (e.g. h2 to h4)\",\n },\n {\n category: \"content\",\n fix: \"Correct the `date`, or hold the page back until it is meant to be live.\",\n id: \"BLUME_AUDIT_FUTURE_DATED_PAGE\",\n severity: \"info\",\n tier: \"static\",\n title: \"Page is dated in the future\",\n },\n {\n category: \"content\",\n fix: \"Restore the viewport <meta> in your ejected layout.\",\n id: \"BLUME_AUDIT_VIEWPORT_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"Viewport not set\",\n },\n\n // Duplicates\n {\n category: \"duplicates\",\n fix: \"Give each page a distinct `title` — search engines show it as the result headline.\",\n id: \"BLUME_AUDIT_DUPLICATE_TITLE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Duplicate title\",\n },\n {\n category: \"duplicates\",\n fix: \"Give each page a distinct `description`.\",\n id: \"BLUME_AUDIT_DUPLICATE_DESCRIPTION\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Duplicate meta description\",\n },\n {\n category: \"duplicates\",\n fix: \"Merge the pages, or set `seo.canonical` on all but one.\",\n id: \"BLUME_AUDIT_DUPLICATE_CONTENT\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Duplicate pages without canonical\",\n },\n\n // Indexability\n {\n category: \"indexability\",\n fix: \"Set `deployment.site` in blume.config.ts to the site's public URL.\",\n id: \"BLUME_AUDIT_SITE_NOT_SET\",\n severity: \"warning\",\n tier: \"static\",\n title: \"deployment.site is not set\",\n },\n {\n category: \"indexability\",\n fix: \"Audit a production-like build (e.g. `VERCEL=1 VERCEL_PROJECT_PRODUCTION_URL=<host> blume build`) or the deployment itself with `--url <origin>`. Do not hardcode `deployment.site` — the platform sets it on every deploy.\",\n id: \"BLUME_AUDIT_SITE_INFERRED_AT_DEPLOY\",\n severity: \"info\",\n tier: \"static\",\n title: \"deployment.site is inferred at deploy time\",\n },\n {\n category: \"indexability\",\n fix: \"Drop the canonical from noindex pages — Google treats the pairing as contradictory and may ignore one of the two.\",\n id: \"BLUME_AUDIT_CANONICAL_ON_NOINDEX\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Page is noindex but declares a canonical\",\n },\n {\n category: \"indexability\",\n fix: \"Rebuild without `--preview` before deploying, or remove `draft: true` if the page is ready to ship.\",\n id: \"BLUME_AUDIT_DRAFT_PAGE_PUBLISHED\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Draft page is in the build\",\n },\n {\n category: \"indexability\",\n fix: \"Set `deployment.site` so Blume can emit absolute canonical URLs.\",\n id: \"BLUME_AUDIT_CANONICAL_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Canonical URL missing\",\n },\n {\n category: \"indexability\",\n fix: \"Point `seo.canonical` at this page, or remove it to use the default self-canonical.\",\n id: \"BLUME_AUDIT_CANONICAL_NOT_SELF\",\n severity: \"info\",\n tier: \"static\",\n title: \"Non-canonical page\",\n },\n {\n category: \"indexability\",\n fix: \"Point `seo.canonical` at a page that exists and doesn't redirect.\",\n id: \"BLUME_AUDIT_CANONICAL_BAD_TARGET\",\n severity: \"error\",\n tier: \"static\",\n title: \"Canonical points to a broken or redirecting page\",\n },\n {\n category: \"indexability\",\n fix: \"Use the same protocol in `seo.canonical` as in `deployment.site`.\",\n id: \"BLUME_AUDIT_CANONICAL_PROTOCOL_MISMATCH\",\n severity: \"error\",\n tier: \"static\",\n title: \"Canonical protocol does not match the site\",\n },\n {\n category: \"indexability\",\n fix: \"Remove `noindex` from the page's frontmatter if it should be indexed.\",\n id: \"BLUME_AUDIT_ROBOTS_META_UNEXPECTED\",\n severity: \"info\",\n tier: \"static\",\n title: \"Page is not indexable\",\n },\n {\n category: \"indexability\",\n fix: \"Split the page — Googlebot stops reading an HTML document at 2 MB.\",\n id: \"BLUME_AUDIT_HTML_TOO_LARGE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Page exceeds Googlebot's 2 MB crawl limit\",\n },\n {\n category: \"indexability\",\n fix: \"Remove the X-Robots-Tag header, or align it with the page's robots meta.\",\n id: \"BLUME_AUDIT_ROBOTS_HEADER_CONFLICT\",\n severity: \"error\",\n tier: \"network\",\n title: \"X-Robots-Tag header conflicts with the page's robots meta\",\n },\n\n // Links\n {\n category: \"links\",\n fix: \"Fix the link target, or create the page it points at.\",\n id: \"BLUME_AUDIT_LINK_TO_BROKEN\",\n severity: \"error\",\n tier: \"static\",\n title: \"Page has links to a broken page\",\n },\n {\n category: \"links\",\n fix: \"Link straight to the destination instead of through the redirect.\",\n id: \"BLUME_AUDIT_LINK_TO_REDIRECT\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Page has links to a redirect\",\n },\n {\n category: \"links\",\n fix: \"Link to this page from the body of a related page.\",\n id: \"BLUME_AUDIT_ORPHAN_PAGE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Orphan page (only reachable from navigation)\",\n },\n {\n category: \"links\",\n fix: \"Use a root-relative path (`/docs/x`) so the link survives previews and `basePath`.\",\n id: \"BLUME_AUDIT_INTERNAL_LINK_ABSOLUTE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Internal link hardcodes the site's own origin\",\n },\n {\n category: \"links\",\n fix: 'Drop `rel=\"nofollow\"` — it stops this page passing authority internally.',\n id: \"BLUME_AUDIT_INTERNAL_LINK_NOFOLLOW\",\n severity: \"info\",\n tier: \"static\",\n title: \"Page has nofollow outgoing internal links\",\n },\n {\n category: \"links\",\n fix: \"Check `basePath` / `deployment.base` — a trailing slash there produces `//`.\",\n id: \"BLUME_AUDIT_DOUBLE_SLASH_URL\",\n severity: \"error\",\n tier: \"static\",\n title: \"Double slash in URL\",\n },\n {\n category: \"links\",\n fix: \"Point the fragment at a heading that exists on the target page, or fix the heading it meant.\",\n id: \"BLUME_AUDIT_ANCHOR_BROKEN\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Link fragment matches no id on the target page\",\n },\n {\n category: \"links\",\n fix: \"Rename the source file to a lowercase, hyphenated slug — and add a redirect from the old URL if it was already published.\",\n id: \"BLUME_AUDIT_URL_STYLE\",\n severity: \"info\",\n tier: \"static\",\n title: \"URL contains uppercase, underscores, or spaces\",\n },\n\n // Redirects\n {\n category: \"redirects\",\n fix: \"Point the redirect at a page that exists.\",\n id: \"BLUME_AUDIT_REDIRECT_BROKEN\",\n severity: \"error\",\n tier: \"static\",\n title: \"Broken redirect\",\n },\n {\n category: \"redirects\",\n fix: \"Break the cycle in `redirects` — it never resolves.\",\n id: \"BLUME_AUDIT_REDIRECT_LOOP\",\n severity: \"error\",\n tier: \"static\",\n title: \"Redirect loop\",\n },\n {\n category: \"redirects\",\n fix: \"Point every hop straight at the final destination.\",\n id: \"BLUME_AUDIT_REDIRECT_CHAIN\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Redirect chain\",\n },\n {\n category: \"redirects\",\n fix: \"Use a real redirect in `blume.config.ts` instead of a meta refresh.\",\n id: \"BLUME_AUDIT_META_REFRESH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Meta refresh redirect\",\n },\n {\n category: \"redirects\",\n fix: \"Remove the redirect, or delete the page it shadows — the page wins and the redirect never fires.\",\n id: \"BLUME_AUDIT_REDIRECT_SOURCE_IS_PAGE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Redirect source is also a real page\",\n },\n {\n category: \"redirects\",\n fix: \"Redirect to the HTTPS URL.\",\n id: \"BLUME_AUDIT_REDIRECT_TO_HTTP\",\n severity: \"error\",\n tier: \"network\",\n title: \"HTTPS to HTTP redirect\",\n },\n\n // Social\n {\n category: \"social\",\n fix: \"Add a `description` — Blume fills the rest of the Open Graph tags for you.\",\n id: \"BLUME_AUDIT_OG_INCOMPLETE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph tags missing or incomplete\",\n },\n {\n category: \"social\",\n fix: \"Set `deployment.site` to turn on generated OG images, or set `seo.image` on the page.\",\n id: \"BLUME_AUDIT_OG_IMAGE_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph image missing\",\n },\n {\n category: \"social\",\n fix: \"Point `seo.image` at a file that exists, or rebuild — a dead og:image renders as a blank card everywhere the page is shared.\",\n id: \"BLUME_AUDIT_OG_IMAGE_BROKEN\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph image is not in the build\",\n },\n {\n category: \"social\",\n fix: \"Use an image of at least 1200×630 — smaller ones render blurry or get cropped into small-card layouts.\",\n id: \"BLUME_AUDIT_OG_IMAGE_SMALL\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph image is too small for large cards\",\n },\n {\n category: \"social\",\n fix: \"Align `og:url` with the page's canonical URL.\",\n id: \"BLUME_AUDIT_OG_URL_MISMATCH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph URL not matching canonical\",\n },\n {\n category: \"social\",\n fix: \"Set `seo.x.handle` in blume.config.ts so X can attribute the card.\",\n id: \"BLUME_AUDIT_TWITTER_CARD_INCOMPLETE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"X (Twitter) card missing or incomplete\",\n },\n\n // Localization\n {\n category: \"i18n\",\n fix: \"Restore the `lang` attribute on <html> in your ejected layout.\",\n id: \"BLUME_AUDIT_HTML_LANG_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"HTML lang attribute missing\",\n },\n {\n category: \"i18n\",\n fix: \"Use a valid BCP 47 tag (e.g. `en`, `en-GB`) for the locale.\",\n id: \"BLUME_AUDIT_HTML_LANG_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"HTML lang attribute invalid\",\n },\n {\n category: \"i18n\",\n fix: \"The page's <html lang> must match its own hreflang annotation.\",\n id: \"BLUME_AUDIT_HREFLANG_LANG_MISMATCH\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang and HTML lang mismatch\",\n },\n {\n category: \"i18n\",\n fix: \"Use a valid BCP 47 tag in the hreflang annotation.\",\n id: \"BLUME_AUDIT_HREFLANG_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang annotation invalid\",\n },\n {\n category: \"i18n\",\n fix: \"A page's hreflang set must include a self-reference.\",\n id: \"BLUME_AUDIT_HREFLANG_SELF_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Self-reference hreflang annotation missing\",\n },\n {\n category: \"i18n\",\n fix: \"Add an `x-default` alternate pointing at the default-locale page.\",\n id: \"BLUME_AUDIT_HREFLANG_XDEFAULT_MISSING\",\n severity: \"info\",\n tier: \"static\",\n title: \"X-default hreflang annotation missing\",\n },\n {\n category: \"i18n\",\n fix: \"Every page in an hreflang group must link back to every other one.\",\n id: \"BLUME_AUDIT_HREFLANG_NO_RETURN_TAG\",\n severity: \"error\",\n tier: \"static\",\n title: \"Missing reciprocal hreflang (no return-tag)\",\n },\n {\n category: \"i18n\",\n fix: \"Point the hreflang alternate at a page that exists and is canonical.\",\n id: \"BLUME_AUDIT_HREFLANG_BAD_TARGET\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang points to a broken, redirecting, or non-canonical page\",\n },\n {\n category: \"i18n\",\n fix: \"Each language in an hreflang group must name exactly one page.\",\n id: \"BLUME_AUDIT_HREFLANG_CONFLICT\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang group has a language conflict\",\n },\n\n // Assets\n {\n category: \"assets\",\n fix: 'Add descriptive `alt` text, or `alt=\"\"` if the image is decorative.',\n id: \"BLUME_AUDIT_IMAGE_ALT_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Missing alt text\",\n },\n {\n category: \"assets\",\n fix: \"Fix the image path, or add the file to public/.\",\n id: \"BLUME_AUDIT_IMAGE_BROKEN\",\n severity: \"error\",\n tier: \"static\",\n title: \"Image broken\",\n },\n {\n category: \"assets\",\n fix: \"Compress the asset, or serve a modern format (WebP/AVIF).\",\n id: \"BLUME_AUDIT_ASSET_TOO_LARGE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Asset file size too large\",\n },\n {\n category: \"assets\",\n fix: \"Set `width` and `height` so the browser can reserve space (avoids layout shift).\",\n id: \"BLUME_AUDIT_IMAGE_MISSING_DIMENSIONS\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Image has no width/height\",\n },\n {\n category: \"assets\",\n fix: \"Fix the reference, or restore the missing file.\",\n id: \"BLUME_AUDIT_SUBRESOURCE_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"Referenced script, style, or asset is missing from the build\",\n },\n {\n category: \"assets\",\n fix: \"Load the subresource over HTTPS — browsers block mixed content.\",\n id: \"BLUME_AUDIT_MIXED_CONTENT\",\n severity: \"error\",\n tier: \"static\",\n title: \"HTTPS/HTTP mixed content\",\n },\n\n // Sitemap\n {\n category: \"sitemap\",\n fix: \"Remove `draft`/`hidden`/`noindex` from the page's frontmatter if it should be indexed.\",\n id: \"BLUME_AUDIT_INDEXABLE_PAGE_NOT_IN_SITEMAP\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Indexable page not in sitemap\",\n },\n {\n category: \"sitemap\",\n fix: \"A noindex page should not be advertised in the sitemap.\",\n id: \"BLUME_AUDIT_NOINDEX_IN_SITEMAP\",\n severity: \"error\",\n tier: \"static\",\n title: \"Noindex page in sitemap\",\n },\n {\n category: \"sitemap\",\n fix: \"List only canonical URLs in the sitemap.\",\n id: \"BLUME_AUDIT_NON_CANONICAL_IN_SITEMAP\",\n severity: \"error\",\n tier: \"static\",\n title: \"Non-canonical page in sitemap\",\n },\n {\n category: \"sitemap\",\n fix: \"Remove the URL from the sitemap, or build the page it names.\",\n id: \"BLUME_AUDIT_SITEMAP_BAD_URL\",\n severity: \"error\",\n tier: \"static\",\n title: \"Sitemap names a page that does not exist or redirects\",\n },\n {\n category: \"sitemap\",\n fix: \"Sitemaps must be valid XML in the sitemaps.org urlset format.\",\n id: \"BLUME_AUDIT_SITEMAP_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"Sitemap has a syntax error or wrong format\",\n },\n {\n category: \"sitemap\",\n fix: \"Split the sitemap — the limits are 50 MB and 50,000 URLs.\",\n id: \"BLUME_AUDIT_SITEMAP_TOO_LARGE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Sitemap exceeds 50 MB or 50,000 URLs\",\n },\n {\n category: \"sitemap\",\n fix: \"Use a real W3C date that is not in the future — search engines that catch a sitemap lying about freshness stop trusting its lastmod entirely.\",\n id: \"BLUME_AUDIT_SITEMAP_LASTMOD_INVALID\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Sitemap lastmod is invalid or in the future\",\n },\n {\n category: \"sitemap\",\n fix: \"A sitemap may only list URLs on its own origin.\",\n id: \"BLUME_AUDIT_SITEMAP_OUT_OF_SCOPE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Sitemap includes URLs out of its scope\",\n },\n {\n category: \"sitemap\",\n fix: \"Make sitemap.xml reachable at the site root.\",\n id: \"BLUME_AUDIT_SITEMAP_NOT_ACCESSIBLE\",\n severity: \"error\",\n tier: \"network\",\n title: \"Sitemap is not accessible\",\n },\n\n // robots.txt\n {\n category: \"robots\",\n fix: \"Set `seo.robots: true` to generate robots.txt.\",\n id: \"BLUME_AUDIT_ROBOTS_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"robots.txt missing\",\n },\n {\n category: \"robots\",\n fix: \"Every robots.txt line must be a `Field: value` directive or a comment.\",\n id: \"BLUME_AUDIT_ROBOTS_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"robots.txt has a syntax error\",\n },\n {\n category: \"robots\",\n fix: \"A page can't be both disallowed in robots.txt and advertised in the sitemap.\",\n id: \"BLUME_AUDIT_ROBOTS_DISALLOWS_INDEXABLE\",\n severity: \"error\",\n tier: \"static\",\n title: \"robots.txt disallows a page that is in the sitemap\",\n },\n {\n category: \"robots\",\n fix: \"Set `deployment.site` so robots.txt can reference the sitemap.\",\n id: \"BLUME_AUDIT_ROBOTS_SITEMAP_MISSING\",\n severity: \"info\",\n tier: \"static\",\n title: \"robots.txt does not reference the sitemap\",\n },\n {\n category: \"robots\",\n fix: \"Make robots.txt reachable at the site root.\",\n id: \"BLUME_AUDIT_ROBOTS_NOT_ACCESSIBLE\",\n severity: \"error\",\n tier: \"network\",\n title: \"robots.txt is not accessible\",\n },\n\n // AI discovery. `llms.txt` is the sitemap of the AI era, and no SEO crawler\n // audits it — they audit for Google. Blume emits it, so Blume checks it.\n {\n category: \"ai\",\n fix: \"Rebuild — `agents.llmsTxt` is enabled but the build has no llms.txt. If that's intentional, set `agents.llmsTxt: false`.\",\n id: \"BLUME_AUDIT_LLMS_TXT_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"llms.txt missing from the build\",\n },\n {\n category: \"ai\",\n fix: \"Rebuild so llms.txt matches the site — a stale entry sends an AI agent to a page that is not there.\",\n id: \"BLUME_AUDIT_LLMS_TXT_STALE_ENTRY\",\n severity: \"warning\",\n tier: \"static\",\n title: \"llms.txt lists a page the build does not serve\",\n },\n {\n category: \"ai\",\n fix: \"Rebuild so llms.txt matches the site; if the page is deliberately excluded, mark it `seo.noindex` or `sidebar.hidden`.\",\n id: \"BLUME_AUDIT_LLMS_TXT_PAGE_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Indexable page missing from llms.txt\",\n },\n // DNS-AID (draft-mozleywilliams-dnsop-dnsaid) lives in the DNS zone, not the\n // build, so unlike the llms.txt checks these can only observe and advise —\n // hence `info`: publishing the records is a DNS-provider action Blume can't\n // take for you, and the draft is young enough that absence is the norm.\n {\n category: \"ai\",\n fix: \"Publish a ServiceMode SVCB or HTTPS record at `_index._agents.<host>` with your DNS provider so agents can discover the site via DNS (DNS-AID).\",\n id: \"BLUME_AUDIT_DNS_AID_MISSING\",\n severity: \"info\",\n tier: \"network\",\n title: \"No DNS-AID agent-discovery records\",\n },\n {\n category: \"ai\",\n fix: \"Enable DNSSEC for the zone so validating resolvers return authenticated DNS-AID answers; if your DNS provider doesn't support DNSSEC, the records still work unsigned.\",\n id: \"BLUME_AUDIT_DNS_AID_UNSIGNED\",\n severity: \"info\",\n tier: \"network\",\n title: \"DNS-AID records are not DNSSEC-authenticated\",\n },\n\n // Structured data. Note we validate only what Blume itself emits — we do not\n // claim Google-rich-results or full schema.org validation (the former is an\n // undocumented network API, the latter a vocabulary we don't bundle).\n {\n category: \"structured-data\",\n fix: \"The JSON-LD block must be valid JSON.\",\n id: \"BLUME_AUDIT_JSONLD_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"Structured data is not valid JSON\",\n },\n {\n category: \"structured-data\",\n fix: \"Every JSON-LD node needs `@context` and `@type`.\",\n id: \"BLUME_AUDIT_JSONLD_INCOMPLETE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Structured data is missing required properties\",\n },\n\n // Network (`--url`)\n {\n category: \"network\",\n fix: \"The page is linked or in the sitemap but the deployment 404s it.\",\n id: \"BLUME_AUDIT_HTTP_4XX\",\n severity: \"error\",\n tier: \"network\",\n title: \"4XX page\",\n },\n {\n category: \"network\",\n fix: \"The deployment is erroring on this page.\",\n id: \"BLUME_AUDIT_HTTP_5XX\",\n severity: \"error\",\n tier: \"network\",\n title: \"5XX page\",\n },\n {\n category: \"network\",\n fix: \"The page did not respond in time.\",\n id: \"BLUME_AUDIT_HTTP_TIMEOUT\",\n severity: \"error\",\n tier: \"network\",\n title: \"Timed out\",\n },\n {\n category: \"network\",\n fix: \"Enable gzip or brotli on the host.\",\n id: \"BLUME_AUDIT_NOT_COMPRESSED\",\n severity: \"warning\",\n tier: \"network\",\n title: \"Not compressed\",\n },\n {\n category: \"network\",\n fix: \"The page was slow to respond.\",\n id: \"BLUME_AUDIT_SLOW_RESPONSE\",\n severity: \"warning\",\n tier: \"network\",\n title: \"Slow page\",\n },\n\n // External (`--external`)\n {\n category: \"network\",\n fix: \"Fix or remove the outbound link.\",\n id: \"BLUME_AUDIT_EXTERNAL_LINK_BROKEN\",\n severity: \"error\",\n tier: \"external\",\n title: \"External link is broken\",\n },\n {\n category: \"network\",\n fix: \"Link straight to the destination.\",\n id: \"BLUME_AUDIT_EXTERNAL_LINK_REDIRECT\",\n severity: \"info\",\n tier: \"external\",\n title: \"External link redirects\",\n },\n] as const satisfies readonly CheckMeta[];\n\nexport type CheckId = (typeof CHECKS)[number][\"id\"];\n\nconst BY_ID = new Map<string, CheckMeta>(\n CHECKS.map((check) => [check.id, check])\n);\n\nexport const checkMeta = (id: CheckId): CheckMeta => {\n const meta = BY_ID.get(id);\n if (!meta) {\n throw new Error(`Unknown audit check: ${id}`);\n }\n return meta;\n};\n\nconst DOCS_BASE = \"https://useblume.dev/docs/cli/audit\";\n\n/** `BLUME_AUDIT_TITLE_TOO_LONG` -> `…/audit#title-too-long`. */\nexport const checkDocsUrl = (id: CheckId): string =>\n `${DOCS_BASE}#${id.replace(\"BLUME_AUDIT_\", \"\").toLowerCase().replaceAll(\"_\", \"-\")}`;\n\n/** Where a finding happened: the built URL, plus the source file that fixes it. */\nexport interface FindingSite {\n url: string;\n file?: string;\n line?: number;\n column?: number;\n}\n\n/**\n * Build a diagnostic for a check. Severity, remediation, and the docs anchor all\n * come from the catalog, so a check body only supplies what's specific to the\n * occurrence: where it happened and what was actually wrong.\n */\nexport const finding = (\n id: CheckId,\n site: FindingSite,\n detail: string,\n fix?: string\n): Diagnostic => {\n const meta = checkMeta(id);\n return {\n code: id,\n column: site.column,\n docsUrl: checkDocsUrl(id),\n file: site.file,\n line: site.line,\n message: detail,\n severity: meta.severity,\n suggestion: fix ?? meta.fix,\n url: site.url,\n };\n};\n",
7
+ "import { mkdtemp, writeFile } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\n\nimport spawn from \"cross-spawn\";\nimport { join } from \"pathe\";\n\nimport { reportJson } from \"./report.ts\";\nimport type { AuditResult } from \"./run.ts\";\n\n/** A coding agent CLI the audit can hand its findings to (`--claude`, `--codex`). */\nexport interface AgentCli {\n /** The executable to look up on PATH. */\n bin: string;\n /** How to install it, shown when the executable is missing. */\n install: string;\n /** Display name for messages. */\n name: string;\n}\n\nexport type AgentKind = \"claude\" | \"codex\";\n\nexport const AGENTS = {\n claude: {\n bin: \"claude\",\n install: \"npm install -g @anthropic-ai/claude-code\",\n name: \"Claude Code\",\n },\n codex: {\n bin: \"codex\",\n install: \"npm install -g @openai/codex\",\n name: \"Codex\",\n },\n} satisfies Record<AgentKind, AgentCli>;\n\n/**\n * Write the full JSON report where the agent can read it. A file rather than\n * inline prompt text: a large site's report can exceed the platform's argv\n * limit, and the JSON already carries every finding untruncated — the terminal\n * report previews three pages per check, the file never does.\n */\nexport const writeAgentReport = async (\n result: AuditResult,\n root: string\n): Promise<string> => {\n const dir = await mkdtemp(join(tmpdir(), \"blume-audit-\"));\n const path = join(dir, \"report.json\");\n await writeFile(path, reportJson(result, root));\n return path;\n};\n\n/** The handoff prompt: where the report is, how to read it, and the ground rules. */\nexport const fixPrompt = (reportPath: string): string =>\n `Fix the issues found by \\`blume audit\\` in this project.\n\nThe full audit report is at ${reportPath}. It is JSON: each entry in \\`diagnostics\\` is one finding, with the check \\`code\\`, a \\`message\\` explaining what is wrong, the affected page \\`url\\`, the source \\`file\\` to edit (relative to the current directory, with a \\`line\\` when the finding points at a specific front matter key), and a \\`suggestion\\` describing the fix.\n\nWork through every finding:\n1. Read the report and group the findings by \\`file\\`.\n2. Apply each finding's \\`suggestion\\` by editing the named source file — most fixes are front matter edits at the cited line.\n3. Never fix a finding by deleting a page, removing content, or hiding it from the audit; if a finding genuinely needs a human decision, leave it and say so in your summary.\n\nWhen you are done, run \\`blume build\\` and then \\`blume audit\\` to verify, and repeat until the audit reports no issues.`;\n\nconst spawnAgent = (bin: string, args: string[]): Promise<number> =>\n // oxlint-disable-next-line promise/avoid-new -- adapt spawn's event callbacks\n new Promise((resolve, reject) => {\n const child = spawn(bin, args, { stdio: \"inherit\" });\n child.once(\"error\", reject);\n child.once(\"close\", (code) => resolve(code ?? 1));\n });\n\n/**\n * Run the agent CLI interactively with the handoff prompt, inheriting the\n * terminal so the user watches and steers the fixes rather than granting a\n * headless process blanket write access. Resolves with the agent's exit code;\n * rejects when the executable isn't on PATH — on every platform, since\n * cross-spawn resolves npm's `.cmd` shims itself and escapes their arguments\n * (the old `shell: true` launch left quoting to a hand-built command line and\n * reported a missing executable as cmd.exe's exit code 9009).\n *\n * cmd.exe still cannot carry the multi-line prompt as an argument (a newline\n * ends the command), so on Windows the prompt is written to a file next to\n * the report and handed over via a one-line pointer.\n */\nexport const launchAgent = async (\n bin: string,\n prompt: string,\n platform: NodeJS.Platform = process.platform\n): Promise<number> => {\n if (platform !== \"win32\") {\n return await spawnAgent(bin, [prompt]);\n }\n const dir = await mkdtemp(join(tmpdir(), \"blume-audit-\"));\n const promptPath = join(dir, \"prompt.md\");\n await writeFile(promptPath, prompt);\n return await spawnAgent(bin, [\n `Read ${promptPath} and follow its instructions exactly.`,\n ]);\n};\n\n/**\n * {@link launchAgent}, but resolving `null` instead of rejecting when the\n * executable isn't on PATH, so each command can print its own install hint.\n * Only `ENOENT` means \"not installed\" — any other spawn failure (`EACCES`,\n * `EMFILE`, …) must surface as itself, not be masked by an irrelevant hint.\n */\nexport const launchInstalledAgent = async (\n bin: string,\n prompt: string,\n platform: NodeJS.Platform = process.platform\n): Promise<number | null> => {\n try {\n return await launchAgent(bin, prompt, platform);\n } catch (error) {\n // SAFETY: only the `code` tag is inspected; a spawn failure throws an\n // ErrnoException, and any other thrown value fails the comparison and\n // rethrows unchanged.\n if ((error as NodeJS.ErrnoException)?.code !== \"ENOENT\") {\n throw error;\n }\n return null;\n }\n};\n"
8
8
  ],
9
- "mappings": ";;;;;;AAAA;AAEA;;;AC2CO,IAAM,SAAS;AAAA,EAEpB;AAAA,IACE,UAAU;AAAA,IACV,KAAK;AAAA,IACL,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,KAAK;AAAA,IACL,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,KAAK;AAAA,IACL,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,KAAK;AAAA,IACL,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,KAAK;AAAA,IACL,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,KAAK;AAAA,IACL,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA;AAAA,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,MAAM,EAAE,OAAO,UAAU,CAAC;AAAA,EACnD,MAAM,KAAK,SAAS,MAAM;AAAA,EAC1B,MAAM,KAAK,SAAS,CAAC,SAAS,QAAQ,QAAQ,CAAC,CAAC;AAAA,CACjD;AAeI,IAAM,cAAc,OACzB,KACA,QACA,WAA4B,QAAQ,aAChB;AAAA,EACpB,IAAI,aAAa,SAAS;AAAA,IACxB,OAAO,MAAM,WAAW,KAAK,CAAC,MAAM,CAAC;AAAA,EACvC;AAAA,EACA,MAAM,MAAM,MAAM,QAAQ,KAAK,OAAO,GAAG,cAAc,CAAC;AAAA,EACxD,MAAM,aAAa,KAAK,KAAK,WAAW;AAAA,EACxC,MAAM,UAAU,YAAY,MAAM;AAAA,EAClC,OAAO,MAAM,WAAW,KAAK;AAAA,IAC3B,QAAQ;AAAA,EACV,CAAC;AAAA;AASI,IAAM,uBAAuB,OAClC,KACA,QACA,WAA4B,QAAQ,aACT;AAAA,EAC3B,IAAI;AAAA,IACF,OAAO,MAAM,YAAY,KAAK,QAAQ,QAAQ;AAAA,IAC9C,OAAO,OAAO;AAAA,IAId,IAAK,OAAiC,SAAS,UAAU;AAAA,MACvD,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA;AAAA;",
10
+ "debugId": "0DEBBF082B3707F764756E2164756E21",
11
11
  "names": []
12
12
  }
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ commandsFor
4
+ } from "./chunk-xaz13gwg.js";
5
+
6
+ // src/cli/init/install.ts
7
+ import { spawn } from "node:child_process";
8
+ import { once } from "node:events";
9
+ var installDependencies = async (root, pm, { quiet }) => {
10
+ const command = commandsFor(pm).install;
11
+ const child = spawn(pm, ["install"], {
12
+ cwd: root,
13
+ env: process.env,
14
+ shell: process.platform === "win32",
15
+ stdio: quiet ? ["ignore", "pipe", "pipe"] : "inherit"
16
+ });
17
+ const chunks = [];
18
+ child.stdout?.on("data", (chunk) => chunks.push(chunk));
19
+ child.stderr?.on("data", (chunk) => chunks.push(chunk));
20
+ try {
21
+ const [code] = await once(child, "close");
22
+ if (code === 0) {
23
+ return { command };
24
+ }
25
+ const output = Buffer.concat(chunks).toString("utf-8").trim();
26
+ return {
27
+ command,
28
+ failure: [`${command} exited with code ${code}`, output].filter(Boolean).join(`
29
+ `)
30
+ };
31
+ } catch (error) {
32
+ return { command, failure: error.message };
33
+ }
34
+ };
35
+
36
+ export { installDependencies };
37
+
38
+ //# debugId=3BBCF1D4B57D128664756E2164756E21
39
+ //# sourceMappingURL=chunk-by2290sx.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/cli/init/install.ts"],
4
+ "sourcesContent": [
5
+ "import { spawn } from \"node:child_process\";\nimport { once } from \"node:events\";\n\nimport { commandsFor } from \"./scaffold.ts\";\nimport type { PackageManager } from \"./scaffold.ts\";\n\n/** How `installDependencies` ended, plus the command to print on failure. */\nexport interface InstallOutcome {\n /** The install command that ran (`bun install`, `npm install`, …). */\n command: string;\n /**\n * Why the install failed: the package manager's exit code with whatever it\n * printed, or the spawn error when the binary isn't on PATH. Absent on\n * success.\n */\n failure?: string;\n}\n\nexport interface InstallOptions {\n /**\n * Capture the package manager's output instead of streaming it to the\n * terminal. Interactive runs capture it behind a spinner and show it only\n * on failure; non-interactive runs stream it as-is.\n */\n quiet: boolean;\n}\n\n/**\n * Run the package manager's install in a freshly scaffolded project so\n * `blume dev` works as soon as `init` returns. Never throws: a missing binary\n * or a non-zero exit resolves with a `failure`, so the caller can keep the\n * scaffolded files and print the exact command to retry by hand.\n */\nexport const installDependencies = async (\n root: string,\n pm: PackageManager,\n { quiet }: InstallOptions\n): Promise<InstallOutcome> => {\n const command = commandsFor(pm).install;\n const child = spawn(pm, [\"install\"], {\n cwd: root,\n env: process.env,\n // npm, pnpm and yarn are `.cmd` shims on Windows, which Node only runs\n // through a shell; bun is a real executable everywhere.\n shell: process.platform === \"win32\",\n stdio: quiet ? [\"ignore\", \"pipe\", \"pipe\"] : \"inherit\",\n });\n const chunks: Buffer[] = [];\n child.stdout?.on(\"data\", (chunk: Buffer) => chunks.push(chunk));\n child.stderr?.on(\"data\", (chunk: Buffer) => chunks.push(chunk));\n try {\n // `once` rejects when the child emits `error` (e.g. ENOENT) before `close`.\n // SAFETY: `close` is emitted with `(code, signal)`, so the first element\n // is the exit code, or null when a signal ended the process.\n const [code] = (await once(child, \"close\")) as [number | null];\n if (code === 0) {\n return { command };\n }\n const output = Buffer.concat(chunks).toString(\"utf-8\").trim();\n return {\n command,\n failure: [`${command} exited with code ${code}`, output]\n .filter(Boolean)\n .join(\"\\n\"),\n };\n } catch (error) {\n // SAFETY: a spawn failure is an ErrnoException; only its message is shown.\n return { command, failure: (error as Error).message };\n }\n};\n"
6
+ ],
7
+ "mappings": ";;;;;;AAAA;AACA;AAgCO,IAAM,sBAAsB,OACjC,MACA,MACE,YAC0B;AAAA,EAC5B,MAAM,UAAU,YAAY,EAAE,EAAE;AAAA,EAChC,MAAM,QAAQ,MAAM,IAAI,CAAC,SAAS,GAAG;AAAA,IACnC,KAAK;AAAA,IACL,KAAK,QAAQ;AAAA,IAGb,OAAO,QAAQ,aAAa;AAAA,IAC5B,OAAO,QAAQ,CAAC,UAAU,QAAQ,MAAM,IAAI;AAAA,EAC9C,CAAC;AAAA,EACD,MAAM,SAAmB,CAAC;AAAA,EAC1B,MAAM,QAAQ,GAAG,QAAQ,CAAC,UAAkB,OAAO,KAAK,KAAK,CAAC;AAAA,EAC9D,MAAM,QAAQ,GAAG,QAAQ,CAAC,UAAkB,OAAO,KAAK,KAAK,CAAC;AAAA,EAC9D,IAAI;AAAA,IAIF,OAAO,QAAS,MAAM,KAAK,OAAO,OAAO;AAAA,IACzC,IAAI,SAAS,GAAG;AAAA,MACd,OAAO,EAAE,QAAQ;AAAA,IACnB;AAAA,IACA,MAAM,SAAS,OAAO,OAAO,MAAM,EAAE,SAAS,OAAO,EAAE,KAAK;AAAA,IAC5D,OAAO;AAAA,MACL;AAAA,MACA,SAAS,CAAC,GAAG,4BAA4B,QAAQ,MAAM,EACpD,OAAO,OAAO,EACd,KAAK;AAAA,CAAI;AAAA,IACd;AAAA,IACA,OAAO,OAAO;AAAA,IAEd,OAAO,EAAE,SAAS,SAAU,MAAgB,QAAQ;AAAA;AAAA;",
8
+ "debugId": "3BBCF1D4B57D128664756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,79 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ commandsFor,
4
+ detectProjectPackageManager
5
+ } from "./chunk-xaz13gwg.js";
6
+ import {
7
+ packageRoot,
8
+ logger
9
+ } from "./index.js";
10
+ import {
11
+ EJECTED_CONFIG_HEADER
12
+ } from "./chunk-mnqj32sj.js";
13
+
14
+ // src/cli/eject-scripts.ts
15
+ import { existsSync, readFileSync } from "node:fs";
16
+ import { readFile, writeFile } from "node:fs/promises";
17
+ import { join } from "pathe";
18
+ var blumeDependencyRanges = () => {
19
+ const manifest = JSON.parse(readFileSync(join(packageRoot(), "package.json"), "utf-8"));
20
+ return {
21
+ ...manifest.peerDependencies,
22
+ ...manifest.dependencies,
23
+ blume: `^${manifest.version}`
24
+ };
25
+ };
26
+ var declares = (pkg, name) => [
27
+ pkg.dependencies,
28
+ pkg.devDependencies,
29
+ pkg.optionalDependencies,
30
+ pkg.peerDependencies
31
+ ].some((field) => field !== undefined && Object.hasOwn(field, name));
32
+ var updatePackageScripts = async (root, dependencies = [], ranges = blumeDependencyRanges()) => {
33
+ const pkgPath = join(root, "package.json");
34
+ let pkg;
35
+ try {
36
+ pkg = JSON.parse(await readFile(pkgPath, "utf-8"));
37
+ } catch {
38
+ return [];
39
+ }
40
+ const scripts = pkg.scripts ?? {};
41
+ pkg.scripts = {
42
+ ...scripts,
43
+ build: "astro build",
44
+ dev: "astro dev",
45
+ preview: "astro preview"
46
+ };
47
+ const added = dependencies.filter((name) => !declares(pkg, name));
48
+ if (added.length > 0) {
49
+ pkg.dependencies = Object.fromEntries(Object.entries({
50
+ ...pkg.dependencies,
51
+ ...Object.fromEntries(added.map((name) => [name, ranges[name] ?? "*"]))
52
+ }).toSorted(([a], [b]) => a < b ? -1 : 1));
53
+ }
54
+ await writeFile(pkgPath, `${JSON.stringify(pkg, null, 2)}
55
+ `, "utf-8");
56
+ return added;
57
+ };
58
+ var BLUME_1_EJECTED_CONFIG_HEADER = "// Generated by Blume. Do not edit; this file is recreated on each run.";
59
+ var isEjectedProject = (root) => {
60
+ const config = join(root, "astro.config.mjs");
61
+ if (!existsSync(config)) {
62
+ return false;
63
+ }
64
+ const source = readFileSync(config, "utf-8");
65
+ return source.startsWith(EJECTED_CONFIG_HEADER) || source.startsWith(BLUME_1_EJECTED_CONFIG_HEADER);
66
+ };
67
+ var refuseIfEjected = async (root, script) => {
68
+ if (!isEjectedProject(root)) {
69
+ return;
70
+ }
71
+ const commands = commandsFor(await detectProjectPackageManager(root));
72
+ logger.error(`This project was ejected to a standalone Astro app, so \`blume ${script}\` would run a regenerated copy of the site instead of it. Run \`${commands[script]}\` instead.`);
73
+ process.exit(1);
74
+ };
75
+
76
+ export { updatePackageScripts, isEjectedProject, refuseIfEjected };
77
+
78
+ //# debugId=5D0834602D1CB35B64756E2164756E21
79
+ //# sourceMappingURL=chunk-d1tadaw7.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/cli/eject-scripts.ts"],
4
+ "sourcesContent": [
5
+ "import { existsSync, readFileSync } from \"node:fs\";\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nimport { join } from \"pathe\";\n\nimport { EJECTED_CONFIG_HEADER } from \"../astro/templates.ts\";\nimport { packageRoot } from \"../core/package-root.ts\";\nimport { commandsFor, detectProjectPackageManager } from \"./init/scaffold.ts\";\nimport { logger } from \"./log.ts\";\n\n/** A JSON value, as `JSON.parse` of a manifest can return. */\ntype JsonValue =\n | string\n | number\n | boolean\n | null\n | JsonValue[]\n | { [key: string]: JsonValue };\n\n/** The slice of package.json the rewrite touches; the rest rides along. */\ninterface PackageManifest {\n [key: string]: JsonValue | undefined;\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n optionalDependencies?: Record<string, string>;\n peerDependencies?: Record<string, string>;\n scripts?: Record<string, string>;\n}\n\n/** Package name → the semver range to depend on it at. */\nexport interface DependencyRanges {\n [name: string]: string;\n}\n\n/**\n * The version range Blume itself uses for each package it depends on or\n * accepts as a peer, plus `blume` at the installed version — what an ejected\n * app should pin so it keeps building against the same majors.\n */\nexport const blumeDependencyRanges = (): DependencyRanges => {\n // SAFETY: blume's own package.json, which declares its version and both\n // dependency maps; nothing else is read.\n const manifest = JSON.parse(\n readFileSync(join(packageRoot(), \"package.json\"), \"utf-8\")\n ) as {\n dependencies: Record<string, string>;\n peerDependencies: Record<string, string>;\n version: string;\n };\n return {\n ...manifest.peerDependencies,\n ...manifest.dependencies,\n blume: `^${manifest.version}`,\n };\n};\n\n/** Whether the manifest already lists `name` in any dependency field. */\nconst declares = (pkg: PackageManifest, name: string): boolean =>\n [\n pkg.dependencies,\n pkg.devDependencies,\n pkg.optionalDependencies,\n pkg.peerDependencies,\n ].some((field) => field !== undefined && Object.hasOwn(field, name));\n\n/**\n * Point the project's package.json at the ejected app. Its scripts run Astro\n * directly: after an eject the Blume CLI no longer manages the runtime, so\n * scaffolded scripts like `\"dev\": \"blume dev\"` would rebuild the removed\n * `.blume` tree instead of serving the ejected app. And every package the\n * ejected app imports by bare name (`dependencies`, from `eject()`) that the\n * project doesn't list yet becomes a dependency at the range Blume itself\n * uses (`ranges`).\n *\n * Returns the names it added, so the caller can ask for an install. A missing\n * or unreadable package.json is left alone.\n */\nexport const updatePackageScripts = async (\n root: string,\n dependencies: string[] = [],\n ranges: DependencyRanges = blumeDependencyRanges()\n): Promise<string[]> => {\n const pkgPath = join(root, \"package.json\");\n let pkg: PackageManifest;\n try {\n pkg = JSON.parse(await readFile(pkgPath, \"utf-8\"));\n } catch {\n return [];\n }\n const scripts = pkg.scripts ?? {};\n pkg.scripts = {\n ...scripts,\n build: \"astro build\",\n dev: \"astro dev\",\n preview: \"astro preview\",\n };\n const added = dependencies.filter((name) => !declares(pkg, name));\n if (added.length > 0) {\n // Sorted, the way package managers write the field.\n pkg.dependencies = Object.fromEntries(\n Object.entries({\n ...pkg.dependencies,\n ...Object.fromEntries(added.map((name) => [name, ranges[name] ?? \"*\"])),\n }).toSorted(([a], [b]) => (a < b ? -1 : 1))\n );\n }\n await writeFile(pkgPath, `${JSON.stringify(pkg, null, 2)}\\n`, \"utf-8\");\n return added;\n};\n\n/**\n * The first line Blume 1's `blume eject` wrote into the ejected\n * `astro.config.mjs` — the hidden runtime's own header, carried over. Blume 2's\n * hidden runtime keeps it under `.blume/`, never at the project root, so a root\n * config that opens with it is an app Blume 1 ejected.\n */\nconst BLUME_1_EJECTED_CONFIG_HEADER =\n \"// Generated by Blume. Do not edit; this file is recreated on each run.\";\n\n/**\n * Whether `root` holds an app `blume eject` already wrote: a root\n * `astro.config.mjs` whose first line is eject's header, or the header Blume 1\n * ejected with. The header is the only signal: a Blume project may keep its own\n * `astro.config.mjs` and a codegen `src/generated/` folder beside its content,\n * and neither makes it an ejected app.\n */\nexport const isEjectedProject = (root: string): boolean => {\n const config = join(root, \"astro.config.mjs\");\n if (!existsSync(config)) {\n return false;\n }\n const source = readFileSync(config, \"utf-8\");\n return (\n source.startsWith(EJECTED_CONFIG_HEADER) ||\n source.startsWith(BLUME_1_EJECTED_CONFIG_HEADER)\n );\n};\n\n/**\n * Stop `blume dev`/`blume build` in an ejected app. Either would regenerate\n * `.blume/` from `blume.config.ts` and run that hidden copy, ignoring every\n * edit made to the app since eject, so point at the app's own script under\n * the project's package manager instead.\n */\nexport const refuseIfEjected = async (\n root: string,\n script: \"build\" | \"dev\"\n): Promise<void> => {\n if (!isEjectedProject(root)) {\n return;\n }\n const commands = commandsFor(await detectProjectPackageManager(root));\n logger.error(\n `This project was ejected to a standalone Astro app, so \\`blume ${script}\\` would run a regenerated copy of the site instead of it. Run \\`${commands[script]}\\`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,EACF;AAAA,EACA,MAAM,UAAU,SAAS,GAAG,KAAK,UAAU,KAAK,MAAM,CAAC;AAAA,GAAO,OAAO;AAAA,EACrE,OAAO;AAAA;AAST,IAAM,gCACJ;AASK,IAAM,mBAAmB,CAAC,SAA0B;AAAA,EACzD,MAAM,SAAS,KAAK,MAAM,kBAAkB;AAAA,EAC5C,IAAI,CAAC,WAAW,MAAM,GAAG;AAAA,IACvB,OAAO;AAAA,EACT;AAAA,EACA,MAAM,SAAS,aAAa,QAAQ,OAAO;AAAA,EAC3C,OACE,OAAO,WAAW,qBAAqB,KACvC,OAAO,WAAW,6BAA6B;AAAA;AAU5C,IAAM,kBAAkB,OAC7B,MACA,WACkB;AAAA,EAClB,IAAI,CAAC,iBAAiB,IAAI,GAAG;AAAA,IAC3B;AAAA,EACF;AAAA,EACA,MAAM,WAAW,YAAY,MAAM,4BAA4B,IAAI,CAAC;AAAA,EACpE,OAAO,MACL,kEAAkE,0EAA0E,SAAS,oBACvJ;AAAA,EACA,QAAQ,KAAK,CAAC;AAAA;",
8
+ "debugId": "5D0834602D1CB35B64756E2164756E21",
9
+ "names": []
10
+ }
@@ -5,23 +5,23 @@ import {
5
5
  BlumeError,
6
6
  countBySeverity,
7
7
  logger,
8
- flushStdout
8
+ flushStdout,
9
+ reportDiagnostics
9
10
  } from "./index.js";
10
11
  import {
11
12
  AGENTS,
12
13
  launchAgent
13
- } from "./chunk-9bkjd11x.js";
14
- import"./chunk-61j18dwk.js";
14
+ } from "./chunk-bw22s759.js";
15
+ import {
16
+ YAML_SCHEMA
17
+ } from "./chunk-xaz13gwg.js";
18
+ import"./chunk-jts8mvcz.js";
15
19
  import {
16
- YAML_SCHEMA,
17
20
  scanProject
18
- } from "./chunk-hdm2dkd2.js";
21
+ } from "./chunk-zg2gtj10.js";
19
22
  import {
20
23
  buildMcpData
21
- } from "./chunk-wjt80jps.js";
22
- import"./chunk-450a7rcr.js";
23
- import"./chunk-88by27n5.js";
24
- import"./chunk-tqa1s0k8.js";
24
+ } from "./chunk-a9kptbw5.js";
25
25
  import {
26
26
  seconds,
27
27
  money,
@@ -31,7 +31,7 @@ import {
31
31
  agentArgs,
32
32
  readAgentOutput,
33
33
  parseVerdict
34
- } from "./chunk-2z47ypj8.js";
34
+ } from "./chunk-fa25z98p.js";
35
35
 
36
36
  // src/cli/commands/eval.ts
37
37
  import { existsSync } from "node:fs";
@@ -169,7 +169,8 @@ var headerLine = (total, agent) => `${colors.bold("blume eval")} ${total} quest
169
169
  var startLine = (id, index, total) => ` ${colors.dim(`▸ ${id} (${index + 1}/${total})`)}`;
170
170
  var fixLines = (result, root) => result.diagnostics.filter((diagnostic) => diagnostic.code !== "BLUME_EVAL_ROUTE_UNKNOWN").map((finding) => {
171
171
  const site = finding.file ? `${relative(root, finding.file)}${finding.line ? `:${finding.line}` : ""}` : "";
172
- return ` ${colors.cyan("fix:")} ${site} ${colors.dim(finding.message)}`;
172
+ const label = finding.code === "BLUME_EVAL_QUESTION_ERROR" ? colors.red("run failed:") : colors.cyan("fix:");
173
+ return ` ${label} ${site} ${colors.dim(finding.message)}`;
173
174
  });
174
175
  var warningLines = (result, root) => result.diagnostics.filter((diagnostic) => diagnostic.code === "BLUME_EVAL_ROUTE_UNKNOWN").map((finding) => {
175
176
  const site = finding.file ? ` ${relative(root, finding.file)}${finding.line ? `:${finding.line}` : ""}` : "";
@@ -280,7 +281,7 @@ var locateQuestion = (raw, id) => {
280
281
  };
281
282
 
282
283
  // src/eval/findings.ts
283
- var DOCS_URL = "https://useblume.dev/docs/reference/eval";
284
+ var DOCS_URL = "https://useblume.dev/docs/cli/evals";
284
285
  var hintedRoute = (question, project) => {
285
286
  for (const hint of question.routes) {
286
287
  const route = project.manifest.routes.find((candidate) => candidate.path === hint);
@@ -302,18 +303,22 @@ var routeFindings = (question, project, anchor) => {
302
303
  }));
303
304
  };
304
305
  var questionFinding = (question, outcome, project, anchor) => {
305
- const route = hintedRoute(question, project);
306
- const site = route ? { file: route.sourcePath, url: route.path } : { file: anchor.path, line: locateQuestion(anchor.raw, question.id) };
306
+ const questionSite = {
307
+ file: anchor.path,
308
+ line: locateQuestion(anchor.raw, question.id)
309
+ };
307
310
  if (outcome.status === "error") {
308
311
  return {
309
312
  code: "BLUME_EVAL_QUESTION_ERROR",
310
313
  docsUrl: DOCS_URL,
311
- message: `Eval run failed for "${question.question}"${outcome.detail ? ` — ${outcome.detail}` : ""}.`,
314
+ message: `The agent run failed for "${question.question}"${outcome.detail ? ` — ${outcome.detail}` : ""}, so the docs weren't graded.`,
312
315
  severity: question.severity,
313
316
  suggestion: "Rerun `blume eval`; if it persists, check the agent CLI installation and the failure detail.",
314
- ...site
317
+ ...questionSite
315
318
  };
316
319
  }
320
+ const route = hintedRoute(question, project);
321
+ const site = route ? { file: route.sourcePath, url: route.path } : questionSite;
317
322
  const missing = outcome.missing.length > 0 ? ` — missing: ${outcome.missing.join("; ")}` : "";
318
323
  return {
319
324
  code: "BLUME_EVAL_QUESTION_FAILED",
@@ -626,7 +631,7 @@ var evalCommand = defineCommand({
626
631
  process.exit(1);
627
632
  }
628
633
  if (error instanceof BlumeError) {
629
- logger.error(error.diagnostic.message);
634
+ reportDiagnostics([error.diagnostic], root);
630
635
  process.exit(1);
631
636
  }
632
637
  if (error?.code === "ENOENT") {
@@ -668,5 +673,5 @@ export {
668
673
  passFraction
669
674
  };
670
675
 
671
- //# debugId=83C1CBF787A3FD3264756E2164756E21
672
- //# sourceMappingURL=chunk-t3tj0dgr.js.map
676
+ //# debugId=141822DD5472C23264756E2164756E21
677
+ //# sourceMappingURL=chunk-d80hr03s.js.map