blume 2.0.1 → 2.0.3

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 (492) hide show
  1. package/CHANGELOG.md +147 -0
  2. package/dist/cli/{chunk-qwsrynx5.js → chunk-1d7ve1dm.js} +38 -19
  3. package/dist/cli/{chunk-qwsrynx5.js.map → chunk-1d7ve1dm.js.map} +4 -4
  4. package/dist/cli/{chunk-s6jhgk0q.js → chunk-2eytanqx.js} +2 -2
  5. package/dist/cli/{chunk-kdp5q7ke.js → chunk-2hsdwb9n.js} +18 -19
  6. package/dist/cli/{chunk-kdp5q7ke.js.map → chunk-2hsdwb9n.js.map} +2 -2
  7. package/dist/cli/{chunk-hdpx1tax.js → chunk-2z928egk.js} +5 -5
  8. package/dist/cli/{chunk-jwyddg7y.js → chunk-35d4wj9f.js} +30 -24
  9. package/dist/cli/chunk-35d4wj9f.js.map +15 -0
  10. package/dist/cli/{chunk-ah61y8py.js → chunk-364znk6q.js} +2 -2
  11. package/dist/cli/{chunk-jts8mvcz.js → chunk-3em5wd2y.js} +25 -6
  12. package/dist/cli/{chunk-jts8mvcz.js.map → chunk-3em5wd2y.js.map} +3 -3
  13. package/dist/cli/{chunk-s1p84fyh.js → chunk-5f86nr5m.js} +63 -22
  14. package/dist/cli/chunk-5f86nr5m.js.map +11 -0
  15. package/dist/cli/{chunk-2hn4b8z7.js → chunk-5m5nmvyq.js} +170 -76
  16. package/dist/cli/chunk-5m5nmvyq.js.map +13 -0
  17. package/dist/cli/{chunk-epjnccmv.js → chunk-5xvm6tfj.js} +18 -15
  18. package/dist/cli/chunk-5xvm6tfj.js.map +10 -0
  19. package/dist/cli/{chunk-fz5wtpmh.js → chunk-6dsbexzp.js} +18 -15
  20. package/dist/cli/chunk-6dsbexzp.js.map +10 -0
  21. package/dist/cli/{chunk-vtk4a6dg.js → chunk-8ktnccpt.js} +1 -1
  22. package/dist/cli/{chunk-6hsn950k.js → chunk-9t7a85s3.js} +178 -48
  23. package/dist/cli/chunk-9t7a85s3.js.map +10 -0
  24. package/dist/cli/{chunk-fxypxtvm.js → chunk-a58773jm.js} +2 -2
  25. package/dist/cli/{chunk-mb2919y2.js → chunk-acanzt5p.js} +17 -6
  26. package/dist/cli/chunk-acanzt5p.js.map +10 -0
  27. package/dist/cli/{chunk-27g6wdth.js → chunk-akbpwfxc.js} +90 -26
  28. package/dist/cli/chunk-akbpwfxc.js.map +10 -0
  29. package/dist/cli/{chunk-wm7js3j9.js → chunk-b07cmahc.js} +2 -2
  30. package/dist/cli/{chunk-wgm7m9qk.js → chunk-c8chx29p.js} +179 -51
  31. package/dist/cli/chunk-c8chx29p.js.map +36 -0
  32. package/dist/cli/{chunk-qs4q5p4e.js → chunk-crgn1q09.js} +32 -14
  33. package/dist/cli/chunk-crgn1q09.js.map +10 -0
  34. package/dist/cli/chunk-e04dxsz1.js +39 -0
  35. package/dist/cli/chunk-e04dxsz1.js.map +10 -0
  36. package/dist/cli/{chunk-yt5n7ppj.js → chunk-ey84smr6.js} +17 -7
  37. package/dist/cli/chunk-ey84smr6.js.map +10 -0
  38. package/dist/cli/{chunk-f2z5v128.js → chunk-g4hq16wv.js} +14 -15
  39. package/dist/cli/{chunk-f2z5v128.js.map → chunk-g4hq16wv.js.map} +2 -2
  40. package/dist/cli/{chunk-fa25z98p.js → chunk-ga0pf4aj.js} +9 -8
  41. package/dist/cli/chunk-ga0pf4aj.js.map +11 -0
  42. package/dist/cli/{chunk-kpf8rrjc.js → chunk-hm3vjy5s.js} +109 -58
  43. package/dist/cli/chunk-hm3vjy5s.js.map +19 -0
  44. package/dist/cli/{chunk-fs23ddbb.js → chunk-j85vccga.js} +625 -750
  45. package/dist/cli/chunk-j85vccga.js.map +36 -0
  46. package/dist/cli/{chunk-ch6g3ar0.js → chunk-p3v96n38.js} +6 -6
  47. package/dist/cli/{chunk-ch6g3ar0.js.map → chunk-p3v96n38.js.map} +3 -3
  48. package/dist/cli/{chunk-q5163e60.js → chunk-p73c0m7w.js} +21 -19
  49. package/dist/cli/chunk-p73c0m7w.js.map +11 -0
  50. package/dist/cli/{chunk-dh8cwk36.js → chunk-pehfxfta.js} +24 -9
  51. package/dist/cli/chunk-pehfxfta.js.map +10 -0
  52. package/dist/cli/{chunk-qkqwkpte.js → chunk-pv29h0wf.js} +3688 -1313
  53. package/dist/cli/chunk-pv29h0wf.js.map +190 -0
  54. package/dist/cli/{chunk-6vm74dry.js → chunk-q58y5e6a.js} +10 -10
  55. package/dist/cli/{chunk-6vm74dry.js.map → chunk-q58y5e6a.js.map} +3 -3
  56. package/dist/cli/{chunk-zxcczpyx.js → chunk-r20tn01b.js} +1 -1
  57. package/dist/cli/{chunk-m3vmjgmq.js → chunk-r9rcc4w7.js} +16 -8
  58. package/dist/cli/chunk-r9rcc4w7.js.map +10 -0
  59. package/dist/cli/{chunk-5shv93fd.js → chunk-tkacnehg.js} +2 -2
  60. package/dist/cli/{chunk-zxh4d9vy.js → chunk-tzmab476.js} +4 -4
  61. package/dist/cli/{chunk-yw7dm696.js → chunk-vg9r4eb9.js} +24 -11
  62. package/dist/cli/chunk-vg9r4eb9.js.map +14 -0
  63. package/dist/cli/{chunk-79jhk4py.js → chunk-wrr3j9w9.js} +260 -132
  64. package/dist/cli/chunk-wrr3j9w9.js.map +35 -0
  65. package/dist/cli/{chunk-6crbhc3x.js → chunk-yfyb25rh.js} +54 -27
  66. package/dist/cli/chunk-yfyb25rh.js.map +14 -0
  67. package/dist/cli/index.js +162 -35
  68. package/dist/cli/index.js.map +4 -4
  69. package/dist/types/ai/agent-surface.d.ts +32 -0
  70. package/dist/types/ai/api-catalog.d.ts +7 -1
  71. package/dist/types/ai/ask-context.d.ts +7 -0
  72. package/dist/types/ai/component-markdown.d.ts +4 -4
  73. package/dist/types/ai/link-headers.d.ts +8 -1
  74. package/dist/types/ai/openapi-components.d.ts +5 -2
  75. package/dist/types/ai/relative-links.d.ts +11 -4
  76. package/dist/types/ai/skills.d.ts +4 -1
  77. package/dist/types/ai/static-expression.d.ts +28 -0
  78. package/dist/types/ai/tar.d.ts +1 -3
  79. package/dist/types/analytics/databuddy.d.ts +43 -0
  80. package/dist/types/analytics/index.d.ts +4 -0
  81. package/dist/types/analytics/one-dollar-stats.d.ts +48 -0
  82. package/dist/types/analytics/schema.d.ts +28 -0
  83. package/dist/types/astro/integration.d.ts +3 -2
  84. package/dist/types/cli/env.d.ts +5 -0
  85. package/dist/types/cli/init/scaffold.d.ts +19 -3
  86. package/dist/types/cli/init/starter-spec.d.ts +11 -0
  87. package/dist/types/core/base-path.d.ts +24 -1
  88. package/dist/types/core/config-input.d.ts +13 -11
  89. package/dist/types/core/config.d.ts +2 -2
  90. package/dist/types/core/directive-diagnostics.d.ts +12 -0
  91. package/dist/types/core/graph.d.ts +2 -0
  92. package/dist/types/core/heading-markers.d.ts +5 -7
  93. package/dist/types/core/i18n-ui.d.ts +31 -0
  94. package/dist/types/core/i18n.d.ts +9 -1
  95. package/dist/types/core/last-modified.d.ts +10 -0
  96. package/dist/types/core/links.d.ts +3 -1
  97. package/dist/types/core/load-module.d.ts +10 -0
  98. package/dist/types/core/locale-links.d.ts +12 -2
  99. package/dist/types/core/meta.d.ts +13 -1
  100. package/dist/types/core/nav-diagnostics.d.ts +10 -0
  101. package/dist/types/core/navigation.d.ts +38 -0
  102. package/dist/types/core/ordering-prefix.d.ts +4 -0
  103. package/dist/types/core/safe-links.d.ts +3 -1
  104. package/dist/types/core/schema.d.ts +59 -13
  105. package/dist/types/core/sources/github-releases.d.ts +5 -0
  106. package/dist/types/core/sources/lower.d.ts +38 -13
  107. package/dist/types/core/sources/normalize.d.ts +23 -2
  108. package/dist/types/core/sources/remote.d.ts +11 -1
  109. package/dist/types/core/sources/resolve.d.ts +12 -0
  110. package/dist/types/core/sources/types.d.ts +31 -0
  111. package/dist/types/core/sources/watch.d.ts +12 -5
  112. package/dist/types/core/standard-schema.d.ts +5 -0
  113. package/dist/types/core/types.d.ts +9 -0
  114. package/dist/types/deploy/adapters/node.d.ts +5 -2
  115. package/dist/types/deploy/adapters/types.d.ts +7 -0
  116. package/dist/types/deploy/artifacts.d.ts +6 -4
  117. package/dist/types/deploy/cloudflare-negotiation.d.ts +3 -2
  118. package/dist/types/deploy/headers.d.ts +36 -7
  119. package/dist/types/deploy/node-headers.d.ts +43 -8
  120. package/dist/types/deploy/platforms/netlify.d.ts +27 -2
  121. package/dist/types/deploy/platforms/node.d.ts +6 -5
  122. package/dist/types/deploy/platforms/types.d.ts +15 -0
  123. package/dist/types/deploy/platforms/vercel.d.ts +3 -2
  124. package/dist/types/deploy/redirects.d.ts +31 -15
  125. package/dist/types/deploy/vercel-negotiation.d.ts +3 -2
  126. package/dist/types/markdown/directives.d.ts +62 -0
  127. package/dist/types/markdown/features.d.ts +21 -0
  128. package/dist/types/markdown/mdast.d.ts +63 -0
  129. package/dist/types/openapi/asyncapi.d.ts +4 -2
  130. package/dist/types/openapi/model.d.ts +20 -6
  131. package/dist/types/search/sync/algolia.d.ts +3 -1
  132. package/docs/01-quickstart.mdx +3 -2
  133. package/docs/02-deployment.mdx +20 -9
  134. package/docs/08-faq.mdx +10 -3
  135. package/docs/advanced/changelog.mdx +1 -1
  136. package/docs/advanced/custom-pages.mdx +7 -5
  137. package/docs/cli/audit.mdx +19 -3
  138. package/docs/cli/doctor.mdx +2 -2
  139. package/docs/cli/evals.mdx +4 -4
  140. package/docs/cli/index.mdx +4 -1
  141. package/docs/cli/translate.mdx +4 -4
  142. package/docs/cli/version.mdx +1 -1
  143. package/docs/configuration/analytics.mdx +42 -2
  144. package/docs/configuration/assistant.mdx +1 -1
  145. package/docs/configuration/customization.mdx +6 -3
  146. package/docs/configuration/index.mdx +5 -3
  147. package/docs/configuration/search.mdx +2 -2
  148. package/docs/content/components.mdx +2 -2
  149. package/docs/content/frontmatter.mdx +5 -1
  150. package/docs/content/i18n.mdx +3 -1
  151. package/docs/content/index.mdx +8 -4
  152. package/docs/content/islands.mdx +1 -1
  153. package/docs/content/meta.mdx +7 -3
  154. package/docs/content/navigation.mdx +29 -4
  155. package/docs/content/sources.mdx +18 -16
  156. package/docs/content/syntax.mdx +14 -0
  157. package/docs/content/versioning.mdx +2 -1
  158. package/docs/discoverability/agent-discovery.mdx +22 -8
  159. package/docs/discoverability/index.mdx +4 -3
  160. package/docs/discoverability/llms-txt.mdx +2 -5
  161. package/docs/discoverability/markdown.mdx +6 -4
  162. package/docs/discoverability/mcp.mdx +4 -0
  163. package/docs/discoverability/metadata.mdx +3 -2
  164. package/docs/discoverability/open-graph.mdx +8 -4
  165. package/docs/discoverability/rss.mdx +4 -2
  166. package/docs/references/asyncapi.mdx +2 -2
  167. package/docs/references/graphql.mdx +2 -2
  168. package/docs/references/openapi.mdx +6 -4
  169. package/package.json +1 -1
  170. package/skills/blume-migrate/SKILL.md +6 -6
  171. package/skills/blume-migrate/references/docusaurus.md +6 -6
  172. package/skills/blume-migrate/references/fumadocs.md +1 -1
  173. package/skills/blume-migrate/references/mintlify.md +3 -3
  174. package/skills/blume-migrate/references/monorepo.md +1 -1
  175. package/skills/blume-migrate/references/nextra.md +2 -2
  176. package/skills/blume-migrate/references/starlight.md +5 -5
  177. package/skills/blume-migrate/scripts/mintlify-codemod.mjs +9 -4
  178. package/skills/blume-update-docs/references/audit-checklist.md +1 -1
  179. package/src/ai/agent-readability.ts +2 -2
  180. package/src/ai/agent-surface.ts +56 -0
  181. package/src/ai/ai-catalog.ts +6 -2
  182. package/src/ai/api/handlers.ts +2 -2
  183. package/src/ai/api/spec.ts +17 -4
  184. package/src/ai/api-catalog.ts +13 -3
  185. package/src/ai/ask-context.ts +14 -2
  186. package/src/ai/ask-data.ts +26 -12
  187. package/src/ai/changelog-markdown.ts +2 -2
  188. package/src/ai/component-markdown.ts +43 -37
  189. package/src/ai/link-headers.ts +22 -8
  190. package/src/ai/llms.ts +22 -10
  191. package/src/ai/markdown.ts +23 -11
  192. package/src/ai/mcp/discovery.ts +2 -2
  193. package/src/ai/mcp/query.ts +2 -2
  194. package/src/ai/mcp/server.ts +80 -9
  195. package/src/ai/openapi-components.ts +22 -6
  196. package/src/ai/relative-links.ts +99 -15
  197. package/src/ai/serializers.ts +2 -1
  198. package/src/ai/skills.ts +14 -1
  199. package/src/ai/static-expression.ts +416 -0
  200. package/src/ai/tar.ts +139 -12
  201. package/src/ai/visibility.ts +45 -14
  202. package/src/analytics/databuddy.ts +67 -0
  203. package/src/analytics/head.ts +8 -0
  204. package/src/analytics/index.ts +7 -0
  205. package/src/analytics/one-dollar-stats.ts +86 -0
  206. package/src/analytics/posthog.ts +21 -3
  207. package/src/analytics/schema.ts +4 -0
  208. package/src/astro/generate.ts +72 -28
  209. package/src/astro/include-hmr.ts +31 -12
  210. package/src/astro/include-refresh.ts +19 -8
  211. package/src/astro/integration.ts +108 -14
  212. package/src/astro/runtime-modules.ts +28 -13
  213. package/src/astro/templates.ts +139 -57
  214. package/src/audit/catalog.ts +2 -2
  215. package/src/audit/checks/assets.ts +25 -5
  216. package/src/audit/checks/content.ts +20 -2
  217. package/src/audit/checks/i18n.ts +46 -8
  218. package/src/audit/checks/indexability.ts +39 -19
  219. package/src/audit/checks/links.ts +22 -1
  220. package/src/audit/checks/llms.ts +6 -3
  221. package/src/audit/checks/network.ts +3 -1
  222. package/src/audit/checks/og-image.ts +10 -0
  223. package/src/audit/checks/robots.ts +6 -1
  224. package/src/audit/checks/sitemap.ts +56 -31
  225. package/src/audit/checks/social.ts +21 -2
  226. package/src/audit/crawl.ts +88 -15
  227. package/src/audit/graph.ts +3 -1
  228. package/src/audit/report.ts +54 -17
  229. package/src/audit/run.ts +13 -9
  230. package/src/audit/snapshot.ts +5 -0
  231. package/src/audit/types.ts +18 -0
  232. package/src/audit/url.ts +37 -6
  233. package/src/cli/args.ts +32 -0
  234. package/src/cli/build-failure.ts +50 -0
  235. package/src/cli/commands/audit.ts +11 -1
  236. package/src/cli/commands/build.ts +19 -5
  237. package/src/cli/commands/check.ts +2 -0
  238. package/src/cli/commands/doctor.ts +3 -1
  239. package/src/cli/commands/eval.ts +20 -18
  240. package/src/cli/commands/init.ts +15 -5
  241. package/src/cli/commands/preview.ts +15 -0
  242. package/src/cli/commands/sync.ts +2 -0
  243. package/src/cli/commands/translate.ts +18 -18
  244. package/src/cli/commands/upgrade.ts +11 -0
  245. package/src/cli/commands/validate.ts +3 -1
  246. package/src/cli/dev-lock.ts +157 -37
  247. package/src/cli/eject-scripts.ts +32 -7
  248. package/src/cli/env.ts +12 -1
  249. package/src/cli/init/scaffold.ts +117 -11
  250. package/src/cli/init/starter-spec.ts +235 -0
  251. package/src/cli/report-format.ts +11 -6
  252. package/src/components/colors.ts +19 -0
  253. package/src/components/content/AccordionItem.astro +26 -22
  254. package/src/components/content/Badge.astro +7 -12
  255. package/src/components/content/Card.astro +2 -2
  256. package/src/components/content/Component.astro +11 -5
  257. package/src/components/content/Expandable.astro +5 -1
  258. package/src/components/content/Frame.astro +2 -7
  259. package/src/components/content/GithubInfo.astro +12 -2
  260. package/src/components/content/Prompt.astro +2 -7
  261. package/src/components/content/Tab.astro +0 -1
  262. package/src/components/content/Tabs.astro +58 -5
  263. package/src/components/content/Tile.astro +1 -1
  264. package/src/components/content/Tooltip.astro +69 -7
  265. package/src/components/content/Tree.astro +7 -2
  266. package/src/components/content/TypeTable.astro +10 -5
  267. package/src/components/content/Update.astro +8 -2
  268. package/src/components/content/auto-type-table.ts +4 -1
  269. package/src/components/content/badge-color.ts +20 -0
  270. package/src/components/content/base-href.ts +14 -22
  271. package/src/components/content/inline-markdown.ts +27 -7
  272. package/src/components/copy-feedback.ts +35 -8
  273. package/src/components/islands/assistant.tsx +37 -6
  274. package/src/components/islands/base-path.ts +47 -10
  275. package/src/components/islands/hooks.ts +42 -21
  276. package/src/components/islands/webmcp.ts +16 -10
  277. package/src/components/layout/Banner.astro +23 -4
  278. package/src/components/layout/Breadcrumbs.astro +5 -2
  279. package/src/components/layout/DiscoveryLinks.astro +9 -5
  280. package/src/components/layout/Header.astro +23 -10
  281. package/src/components/layout/LanguageSwitcher.astro +2 -2
  282. package/src/components/layout/Logo.astro +5 -0
  283. package/src/components/layout/NavSelector.astro +8 -3
  284. package/src/components/layout/NavTabMenu.astro +133 -0
  285. package/src/components/layout/NavTree.astro +31 -12
  286. package/src/components/layout/NavTreeCache.astro +5 -2
  287. package/src/components/layout/NavTreeScript.astro +45 -5
  288. package/src/components/layout/PageActions.astro +4 -3
  289. package/src/components/layout/PageLayout.astro +28 -13
  290. package/src/components/layout/Pagination.astro +3 -3
  291. package/src/components/layout/ReferenceLayout.astro +4 -1
  292. package/src/components/layout/RootLayout.astro +25 -12
  293. package/src/components/layout/Search.astro +38 -14
  294. package/src/components/layout/VersionBanner.astro +2 -2
  295. package/src/components/layout/analytics-client.ts +14 -0
  296. package/src/components/layout/toc-active.ts +41 -0
  297. package/src/components/layout/toc-element.ts +8 -14
  298. package/src/components/openapi/ApiTagOperations.astro +2 -2
  299. package/src/components/openapi/AsyncApiOperation.astro +7 -4
  300. package/src/components/openapi/GraphqlChip.astro +2 -2
  301. package/src/components/openapi/GraphqlType.astro +11 -3
  302. package/src/components/openapi/MessageComposer.astro +1 -1
  303. package/src/components/openapi/Operation.astro +23 -5
  304. package/src/components/openapi/PanelTabs.astro +4 -1
  305. package/src/components/openapi/Playground.astro +8 -2
  306. package/src/components/openapi/RequestPanel.astro +13 -6
  307. package/src/components/openapi/SchemaProperty.astro +11 -33
  308. package/src/components/openapi/SchemaTable.astro +34 -52
  309. package/src/components/openapi/async.ts +38 -6
  310. package/src/components/openapi/helpers.ts +100 -12
  311. package/src/components/openapi/message-composer.ts +14 -1
  312. package/src/components/openapi/message-model.ts +12 -2
  313. package/src/components/openapi/message.ts +21 -3
  314. package/src/components/openapi/operation-model.ts +119 -17
  315. package/src/components/openapi/panel.ts +31 -5
  316. package/src/components/openapi/param-style.ts +181 -0
  317. package/src/components/openapi/playground-client.ts +110 -23
  318. package/src/components/openapi/playground-schema.ts +25 -6
  319. package/src/components/openapi/request.ts +192 -26
  320. package/src/components/openapi/schema-tree.ts +209 -0
  321. package/src/components/openapi/snippets.ts +113 -19
  322. package/src/components/openapi/validate-json.ts +1 -1
  323. package/src/components/openapi/ws-client.ts +18 -2
  324. package/src/core/base-path.ts +69 -8
  325. package/src/core/config-input.ts +13 -11
  326. package/src/core/config.ts +18 -4
  327. package/src/core/diagnostics.ts +219 -30
  328. package/src/core/directive-diagnostics.ts +99 -0
  329. package/src/core/frontmatter.ts +21 -18
  330. package/src/core/graph.ts +120 -11
  331. package/src/core/heading-markers.ts +5 -18
  332. package/src/core/i18n-ui.ts +39 -2
  333. package/src/core/i18n.ts +44 -5
  334. package/src/core/last-modified.ts +25 -3
  335. package/src/core/links.ts +7 -4
  336. package/src/core/load-module.ts +20 -0
  337. package/src/core/locale-links.ts +22 -18
  338. package/src/core/manifest.ts +3 -2
  339. package/src/core/meta.ts +89 -12
  340. package/src/core/nav-diagnostics.ts +56 -1
  341. package/src/core/navigation.ts +272 -83
  342. package/src/core/ordering-prefix.ts +27 -0
  343. package/src/core/project-graph.ts +50 -6
  344. package/src/core/safe-href.ts +53 -1
  345. package/src/core/safe-links.ts +11 -2
  346. package/src/core/schema.ts +94 -18
  347. package/src/core/sources/assets.ts +83 -41
  348. package/src/core/sources/contentful-rich-text.ts +28 -20
  349. package/src/core/sources/contentful.ts +25 -12
  350. package/src/core/sources/filesystem.ts +25 -3
  351. package/src/core/sources/github-releases.ts +131 -11
  352. package/src/core/sources/lexical.ts +30 -20
  353. package/src/core/sources/lower.ts +276 -56
  354. package/src/core/sources/mdx-remote.ts +52 -16
  355. package/src/core/sources/normalize.ts +456 -119
  356. package/src/core/sources/notion.ts +77 -34
  357. package/src/core/sources/obsidian.ts +40 -9
  358. package/src/core/sources/payload.ts +1 -0
  359. package/src/core/sources/portable-text.ts +85 -49
  360. package/src/core/sources/remote.ts +18 -2
  361. package/src/core/sources/resolve.ts +52 -33
  362. package/src/core/sources/sanity.ts +1 -0
  363. package/src/core/sources/strapi-blocks.ts +28 -19
  364. package/src/core/sources/strapi.ts +1 -0
  365. package/src/core/sources/types.ts +31 -0
  366. package/src/core/sources/watch.ts +20 -7
  367. package/src/core/standard-schema.ts +10 -6
  368. package/src/core/types.ts +9 -0
  369. package/src/core/ui-packs/ar.ts +13 -0
  370. package/src/core/ui-packs/bg.ts +13 -0
  371. package/src/core/ui-packs/bn.ts +13 -0
  372. package/src/core/ui-packs/ca.ts +13 -0
  373. package/src/core/ui-packs/cs.ts +13 -0
  374. package/src/core/ui-packs/da.ts +13 -0
  375. package/src/core/ui-packs/de.ts +13 -0
  376. package/src/core/ui-packs/el.ts +13 -0
  377. package/src/core/ui-packs/es.ts +13 -0
  378. package/src/core/ui-packs/fa.ts +13 -0
  379. package/src/core/ui-packs/fi.ts +13 -0
  380. package/src/core/ui-packs/fr.ts +13 -0
  381. package/src/core/ui-packs/he.ts +13 -0
  382. package/src/core/ui-packs/hi.ts +13 -0
  383. package/src/core/ui-packs/hr.ts +13 -0
  384. package/src/core/ui-packs/hu.ts +13 -0
  385. package/src/core/ui-packs/id.ts +13 -0
  386. package/src/core/ui-packs/it.ts +13 -0
  387. package/src/core/ui-packs/ja.ts +13 -0
  388. package/src/core/ui-packs/ko.ts +13 -0
  389. package/src/core/ui-packs/nl.ts +13 -0
  390. package/src/core/ui-packs/no.ts +13 -0
  391. package/src/core/ui-packs/pl.ts +13 -0
  392. package/src/core/ui-packs/pt-br.ts +13 -0
  393. package/src/core/ui-packs/pt.ts +13 -0
  394. package/src/core/ui-packs/ro.ts +13 -0
  395. package/src/core/ui-packs/ru.ts +13 -0
  396. package/src/core/ui-packs/sk.ts +13 -0
  397. package/src/core/ui-packs/sr.ts +13 -0
  398. package/src/core/ui-packs/sv.ts +13 -0
  399. package/src/core/ui-packs/th.ts +13 -0
  400. package/src/core/ui-packs/tr.ts +13 -0
  401. package/src/core/ui-packs/uk.ts +13 -0
  402. package/src/core/ui-packs/vi.ts +13 -0
  403. package/src/core/ui-packs/zh-tw.ts +13 -0
  404. package/src/core/ui-packs/zh.ts +13 -0
  405. package/src/core/version-cut.ts +69 -17
  406. package/src/core/versions.ts +4 -1
  407. package/src/deploy/adapters/node.ts +5 -2
  408. package/src/deploy/adapters/registry.ts +2 -1
  409. package/src/deploy/adapters/types.ts +13 -1
  410. package/src/deploy/artifacts.ts +52 -11
  411. package/src/deploy/cloudflare-negotiation.ts +27 -16
  412. package/src/deploy/headers.ts +75 -55
  413. package/src/deploy/node-headers.ts +148 -27
  414. package/src/deploy/platforms/cloudflare.ts +13 -3
  415. package/src/deploy/platforms/netlify.ts +83 -5
  416. package/src/deploy/platforms/node.ts +8 -5
  417. package/src/deploy/platforms/static.ts +2 -0
  418. package/src/deploy/platforms/types.ts +15 -0
  419. package/src/deploy/platforms/vercel.ts +10 -3
  420. package/src/deploy/redirects.ts +68 -21
  421. package/src/deploy/robots.ts +2 -2
  422. package/src/deploy/rss.ts +4 -3
  423. package/src/deploy/sitemap.ts +7 -5
  424. package/src/deploy/vercel-negotiation.ts +35 -3
  425. package/src/eval/agents.ts +10 -2
  426. package/src/eval/run.ts +25 -0
  427. package/src/markdown/base-links.ts +74 -29
  428. package/src/markdown/directives.ts +242 -36
  429. package/src/markdown/features.ts +17 -0
  430. package/src/markdown/index.ts +13 -9
  431. package/src/markdown/mdast.ts +5 -2
  432. package/src/markdown/relative-links.ts +15 -27
  433. package/src/markdown/route-snapshot.ts +37 -0
  434. package/src/og/card.ts +149 -9
  435. package/src/og/derive.ts +156 -5
  436. package/src/og/index.ts +1 -0
  437. package/src/openapi/asyncapi.ts +4 -2
  438. package/src/openapi/graphql-build.ts +28 -2
  439. package/src/openapi/model.ts +99 -27
  440. package/src/openapi/proxy.ts +63 -10
  441. package/src/openapi/render-mdx.ts +51 -3
  442. package/src/registry/eject.ts +297 -43
  443. package/src/search/adapters/version-scope.ts +30 -0
  444. package/src/search/documents.ts +89 -27
  445. package/src/search/popular.ts +2 -1
  446. package/src/search/sync/algolia.ts +36 -2
  447. package/src/seo/jsonld.ts +7 -3
  448. package/src/sources/registry.ts +5 -0
  449. package/src/theme/entry.ts +11 -4
  450. package/src/translate/agents.ts +6 -1
  451. package/src/translate/ledger.ts +26 -3
  452. package/src/translate/meta.ts +76 -24
  453. package/src/translate/run.ts +14 -8
  454. package/src/translate/validate.ts +14 -2
  455. package/src/translate/work-list.ts +91 -19
  456. package/src/upgrade/upgrade.ts +36 -4
  457. package/dist/cli/chunk-27g6wdth.js.map +0 -10
  458. package/dist/cli/chunk-2hn4b8z7.js.map +0 -12
  459. package/dist/cli/chunk-6crbhc3x.js.map +0 -14
  460. package/dist/cli/chunk-6hsn950k.js.map +0 -10
  461. package/dist/cli/chunk-79jhk4py.js.map +0 -35
  462. package/dist/cli/chunk-82bbrxdn.js +0 -51
  463. package/dist/cli/chunk-82bbrxdn.js.map +0 -10
  464. package/dist/cli/chunk-abh8yjkn.js +0 -31
  465. package/dist/cli/chunk-abh8yjkn.js.map +0 -10
  466. package/dist/cli/chunk-ce574jw2.js +0 -23
  467. package/dist/cli/chunk-ce574jw2.js.map +0 -10
  468. package/dist/cli/chunk-dh8cwk36.js.map +0 -10
  469. package/dist/cli/chunk-epjnccmv.js.map +0 -10
  470. package/dist/cli/chunk-fa25z98p.js.map +0 -11
  471. package/dist/cli/chunk-fs23ddbb.js.map +0 -35
  472. package/dist/cli/chunk-fz5wtpmh.js.map +0 -10
  473. package/dist/cli/chunk-jwyddg7y.js.map +0 -15
  474. package/dist/cli/chunk-kpf8rrjc.js.map +0 -19
  475. package/dist/cli/chunk-m3vmjgmq.js.map +0 -10
  476. package/dist/cli/chunk-mb2919y2.js.map +0 -10
  477. package/dist/cli/chunk-q5163e60.js.map +0 -11
  478. package/dist/cli/chunk-qkqwkpte.js.map +0 -182
  479. package/dist/cli/chunk-qs4q5p4e.js.map +0 -10
  480. package/dist/cli/chunk-s1p84fyh.js.map +0 -10
  481. package/dist/cli/chunk-wgm7m9qk.js.map +0 -36
  482. package/dist/cli/chunk-yt5n7ppj.js.map +0 -10
  483. package/dist/cli/chunk-yw7dm696.js.map +0 -14
  484. /package/dist/cli/{chunk-s6jhgk0q.js.map → chunk-2eytanqx.js.map} +0 -0
  485. /package/dist/cli/{chunk-hdpx1tax.js.map → chunk-2z928egk.js.map} +0 -0
  486. /package/dist/cli/{chunk-ah61y8py.js.map → chunk-364znk6q.js.map} +0 -0
  487. /package/dist/cli/{chunk-vtk4a6dg.js.map → chunk-8ktnccpt.js.map} +0 -0
  488. /package/dist/cli/{chunk-fxypxtvm.js.map → chunk-a58773jm.js.map} +0 -0
  489. /package/dist/cli/{chunk-wm7js3j9.js.map → chunk-b07cmahc.js.map} +0 -0
  490. /package/dist/cli/{chunk-zxcczpyx.js.map → chunk-r20tn01b.js.map} +0 -0
  491. /package/dist/cli/{chunk-5shv93fd.js.map → chunk-tkacnehg.js.map} +0 -0
  492. /package/dist/cli/{chunk-zxh4d9vy.js.map → chunk-tzmab476.js.map} +0 -0
@@ -2,11 +2,11 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/audit/report.ts", "../src/audit/catalog.ts", "../src/audit/agent.ts"],
4
4
  "sourcesContent": [
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 — `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",
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 /** Distinct affected URLs — one page can carry several findings. */\n pages: number;\n severity: DiagnosticSeverity;\n category: AuditCategory;\n title: string;\n findings: Diagnostic[];\n}\n\nconst SEVERITY_ORDER = {\n error: 0,\n info: 2,\n warning: 1,\n} satisfies Record<DiagnosticSeverity, number>;\n\n/**\n * The group's severity: the worst of its findings'. A check can downgrade a\n * finding at runtime (an external link answering 503 is a warning, not the\n * catalog's error), and the group's glyph must agree with the summary counts.\n */\nconst worstSeverity = (findings: Diagnostic[]): DiagnosticSeverity => {\n let worst: DiagnosticSeverity = \"info\";\n for (const finding of findings) {\n if (SEVERITY_ORDER[finding.severity] < SEVERITY_ORDER[worst]) {\n worst = finding.severity;\n }\n }\n return worst;\n};\n\n/** The first finding per affected URL, in report order. */\nconst firstPerPage = (findings: Diagnostic[]): Diagnostic[] => {\n const seen = new Set<string | undefined>();\n return findings.filter((finding) => {\n if (seen.has(finding.url)) {\n return false;\n }\n seen.add(finding.url);\n return true;\n });\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 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, title } = checkMeta(checkId);\n return {\n category,\n count: findings.length,\n findings,\n id: checkId,\n pages: firstPerPage(findings).length,\n severity: worstSeverity(findings),\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 = SEVERITY_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 SEVERITY_ORDER[a.severity] - 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.pages} page${group.pages === 1 ? \"\" : \"s\"}`;\n lines.push(\n ` ${color(`${GLYPH[group.severity]} ${group.title}`)} ${colors.dim(pages)}`\n );\n\n // The preview lists affected pages, each once; --verbose lists every\n // finding, since each one's message names a different specific.\n const shown = options.verbose\n ? group.findings\n : firstPerPage(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 = options.verbose ? 0 : group.pages - shown.length;\n if (hidden > 0) {\n lines.push(` ${colors.dim(`… and ${hidden} more (--verbose)`)}`);\n }\n\n // Findings share the catalog's fix unless one overrode it (a navigation\n // entry, a page generated from an API spec), so each distinct fix is\n // printed once.\n const fixes = new Set(\n group.findings.flatMap((finding) =>\n finding.suggestion ? [finding.suggestion] : []\n )\n );\n for (const fix of fixes) {\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 or sitemap index 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, set `ai.exclude: true` in its front matter.\",\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
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,IAC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,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": "E6F2D36C0552C7F664756E2164756E21",
11
11
  "names": []
12
12
  }
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  AGENTS,
11
11
  launchInstalledAgent
12
- } from "./chunk-qwsrynx5.js";
12
+ } from "./chunk-1d7ve1dm.js";
13
13
 
14
14
  // src/cli/commands/migrate.ts
15
15
  import { defineCommand } from "citty";
@@ -173,4 +173,4 @@ export {
173
173
  };
174
174
 
175
175
  //# debugId=A9196D6CE8B0C0B464756E2164756E21
176
- //# sourceMappingURL=chunk-s6jhgk0q.js.map
176
+ //# sourceMappingURL=chunk-2eytanqx.js.map
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import"./chunk-jts8mvcz.js";
2
+ import"./chunk-3em5wd2y.js";
3
3
  import {
4
4
  resolveRuntimeDir
5
- } from "./chunk-qkqwkpte.js";
5
+ } from "./chunk-pv29h0wf.js";
6
6
  import {
7
7
  refreshBlumeContent,
8
8
  showBlumeErrorOverlay,
9
9
  generateRuntime
10
- } from "./chunk-wgm7m9qk.js";
10
+ } from "./chunk-c8chx29p.js";
11
11
  import {
12
12
  commandMeta,
13
13
  normalizeHost,
@@ -15,32 +15,31 @@ import {
15
15
  logger,
16
16
  reportDiagnostics
17
17
  } from "./index.js";
18
- import"./chunk-6crbhc3x.js";
18
+ import"./chunk-yfyb25rh.js";
19
19
  import {
20
20
  scanProject
21
- } from "./chunk-fs23ddbb.js";
22
- import"./chunk-vtk4a6dg.js";
21
+ } from "./chunk-j85vccga.js";
22
+ import"./chunk-8ktnccpt.js";
23
23
  import"./chunk-jq5n4avg.js";
24
- import"./chunk-2hn4b8z7.js";
25
- import"./chunk-zxcczpyx.js";
26
- import"./chunk-wm7js3j9.js";
27
- import"./chunk-82bbrxdn.js";
24
+ import"./chunk-5m5nmvyq.js";
25
+ import"./chunk-r20tn01b.js";
26
+ import"./chunk-b07cmahc.js";
27
+ import {
28
+ parsePort
29
+ } from "./chunk-e04dxsz1.js";
28
30
  import {
29
31
  DevLockHeldError,
30
32
  acquireDevLock,
31
33
  updateDevLockPort,
32
34
  describeDevLock
33
- } from "./chunk-27g6wdth.js";
35
+ } from "./chunk-akbpwfxc.js";
34
36
  import {
35
37
  refuseIfEjected
36
- } from "./chunk-yt5n7ppj.js";
38
+ } from "./chunk-ey84smr6.js";
37
39
  import {
38
40
  prepareProject
39
- } from "./chunk-zxh4d9vy.js";
40
- import {
41
- parsePort
42
- } from "./chunk-ce574jw2.js";
43
- import"./chunk-ah61y8py.js";
41
+ } from "./chunk-tzmab476.js";
42
+ import"./chunk-364znk6q.js";
44
43
 
45
44
  // src/cli/commands/dev.ts
46
45
  import { dev } from "astro";
@@ -184,5 +183,5 @@ export {
184
183
  devCommand
185
184
  };
186
185
 
187
- //# debugId=DAFEE5DB6B0E8A0164756E2164756E21
188
- //# sourceMappingURL=chunk-kdp5q7ke.js.map
186
+ //# debugId=D6B031299DB2BB0564756E2164756E21
187
+ //# sourceMappingURL=chunk-2hsdwb9n.js.map
@@ -4,7 +4,7 @@
4
4
  "sourcesContent": [
5
5
  "import { dev } from \"astro\";\nimport { watch } from \"chokidar\";\nimport { defineCommand } from \"citty\";\nimport { debounce } from \"perfect-debounce\";\n\nimport { generateRuntime } from \"../../astro/generate.ts\";\nimport {\n refreshBlumeContent,\n showBlumeErrorOverlay,\n} from \"../../astro/integration.ts\";\nimport { BlumeError } from \"../../core/diagnostics.ts\";\nimport { scanProject } from \"../../core/project-graph.ts\";\nimport { resolveRuntimeDir } from \"../../core/project.ts\";\nimport { parsePort } from \"../args.ts\";\nimport { commandMeta } from \"../command-meta.ts\";\nimport {\n acquireDevLock,\n describeDevLock,\n DevLockHeldError,\n updateDevLockPort,\n} from \"../dev-lock.ts\";\nimport { refuseIfEjected } from \"../eject-scripts.ts\";\nimport { normalizeHost } from \"../host-args.ts\";\nimport { logger, reportDiagnostics } from \"../log.ts\";\nimport { prepareProject } from \"../prepare.ts\";\n\n/**\n * A fingerprint of the route set: the sorted `path entryId` pairs. It changes\n * when a page is added, removed, or renamed (a folder rename shifts many at\n * once) but stays equal across pure body edits — so the dev loop can tell a\n * \"structural\" change (needs a content re-sync) from a hot-reloadable one.\n */\nconst routeSignature = (\n routes: readonly { entryId: string; path: string }[]\n): string =>\n routes\n .map((route) => `${route.path} ${route.entryId}`)\n .toSorted()\n .join(\"\\n\");\n\n/**\n * The port the dev server actually bound. Astro snapshots `address` when the\n * server first listens, but a config restart that lands during startup leaves\n * that snapshot null: the `astro.config.mjs` written just before the server\n * started can reach Astro's watcher late, and Astro restarts in place before\n * it ever listens. The live resolved URLs follow the restarted server, so read\n * the port from those, then fall back to the one that was asked for.\n */\nconst boundPortOf = (\n server: Awaited<ReturnType<typeof dev>>,\n requested: number\n): number => {\n // SAFETY: Astro types `address` as always set, but it is null at runtime\n // when a restart replaced the server before its first listen (see above).\n const address = server.address as typeof server.address | null;\n if (address) {\n return address.port;\n }\n for (const url of server.resolvedUrls.local) {\n const port = Number(new URL(url).port);\n if (port > 0) {\n return port;\n }\n }\n return requested;\n};\n\nexport const devCommand = defineCommand({\n args: {\n \"content-dir\": {\n description: \"Content folder to scan, overriding config (content.root).\",\n type: \"string\",\n },\n debug: {\n description: \"Verbose Astro/Vite logging for troubleshooting.\",\n type: \"boolean\",\n },\n host: { description: \"Network host to bind.\", type: \"string\" },\n open: { description: \"Open the browser on start.\", type: \"boolean\" },\n port: { description: \"Port to listen on.\", type: \"string\" },\n preview: {\n description: \"Include drafts and unpublished CMS content.\",\n type: \"boolean\",\n },\n strict: { description: \"Fail on diagnostics.\", type: \"boolean\" },\n },\n meta: commandMeta.dev,\n async run({ args }) {\n const root = process.cwd();\n await refuseIfEjected(root, \"dev\");\n const preview = args.preview ?? false;\n const overrides = args[\"content-dir\"]\n ? { contentRoot: args[\"content-dir\"] }\n : undefined;\n // Astro's dev server defaults to 4321 when no port is passed. Feeding the\n // resolved URL in as the `deployment.site` fallback lets site-gated features\n // (OG images, canonicals, sitemap) work locally without configuring a site.\n const explicitPort = parsePort(args.port);\n const port = explicitPort ?? 4321;\n let devServerUrl = `http://localhost:${port}`;\n\n // Claim the shared `.blume` dir BEFORE preparing: `prepareProject`\n // regenerates the runtime, so even a refused second dev server would\n // otherwise clobber the running one's generated tree (with this\n // invocation's port baked in) on its way out. The claim is atomic, so two\n // simultaneous starts can't both win. Dev never relocates the runtime dir,\n // so the lock always lives at `<root>/.blume`.\n const outDir = resolveRuntimeDir(root);\n let releaseLock: () => void;\n try {\n releaseLock = acquireDevLock(outDir, port);\n } catch (error) {\n if (error instanceof DevLockHeldError) {\n logger.error(\n `A \\`blume dev\\` server is already running${describeDevLock(error.lock)} in this project. Reuse that server instead of starting a second one — two dev servers would corrupt the shared .blume dir. If it crashed, delete .blume/dev.lock.`\n );\n process.exit(1);\n }\n throw error;\n }\n process.on(\"exit\", releaseLock);\n\n const project = await prepareProject({\n devServerUrl,\n mode: \"dev\",\n overrides,\n preview,\n root,\n strict: args.strict,\n });\n\n // A factory so the regenerate loop can recreate the server when a\n // structural (route-set) change can't be re-synced in place (see below).\n // `open` is honored on first boot only — a restart must not reopen the\n // browser.\n const createServer = (listenPort: number | undefined, open: boolean) =>\n dev({\n logLevel: args.debug ? \"debug\" : \"info\",\n root: project.context.outDir,\n server: { host: normalizeHost(args.host), open, port: listenPort },\n });\n\n let server = await createServer(explicitPort, args.open ?? false);\n\n // Vite bumps to the next free port when the default is taken, so record\n // the port the server actually bound — the lock's URL is what a refused\n // second invocation tells its caller to reuse. The site fallback baked\n // into the runtime also carries the port, so it must follow suit (below,\n // once the regeneration closure exists).\n const boundPort = boundPortOf(server, port);\n if (boundPort !== port) {\n updateDevLockPort(outDir, boundPort);\n devServerUrl = `http://localhost:${boundPort}`;\n }\n\n // Mirror any initial diagnostics into the browser overlay now the server\n // (and its HMR channel) is up.\n showBlumeErrorOverlay(project.diagnostics);\n\n let lastSignature = routeSignature(project.manifest.routes);\n\n // Watch user inputs and regenerate the runtime data on change. A body edit\n // hot-reloads via Vite (fast path). A route-set change also needs Astro's\n // content store re-synced: its glob watcher misses directory renames, so a\n // renamed page would 404 (`getEntry` reads a stale store). Astro hands the\n // integration `refreshContent` for exactly that — a full loader run\n // against the live server, after which Astro's own store watcher clears\n // the route cache and reloads the browser. Only a server that registered\n // no refresh (none since Astro 5) falls back to a cold restart: stop,\n // then bring up a fresh container whose cold sync re-globs everything.\n // perfect-debounce both debounces the watch burst (80ms) and\n // single-flights the scan: a\n // trigger during a run never starts a second run, only marks one trailing\n // rerun after the current settles. Both halves are load-bearing — a plain\n // debounce once let bursts stack overlapping scans until the heap was\n // exhausted (observed as an OOM after minutes of looping). The contract is\n // pinned by test/dev-debounce.test.ts. The task must not reject (the\n // library re-invokes it from an unhandled .finally), so the body catches\n // its own errors and always resolves.\n const regenerate = debounce(async () => {\n try {\n const next = await scanProject(root, {\n devServerUrl,\n mode: \"dev\",\n overrides,\n preview,\n });\n const nextSignature = routeSignature(next.manifest.routes);\n const structural = nextSignature !== lastSignature;\n // Generate first: the new runtime data (and any staged remote content)\n // is on disk and published before the store re-syncs against it.\n await generateRuntime(next);\n if (structural && !(await refreshBlumeContent())) {\n await server.stop();\n server = await createServer(boundPort, false);\n }\n // Commit the signature only after the (re)generation succeeded. If the\n // re-sync or restart above throws mid-sequence, the signature stays\n // stale so the next watch event retries the structural path.\n lastSignature = nextSignature;\n // Surface any content/config errors in the terminal AND the browser\n // overlay. The terminal report is not redundant: the overlay only\n // shows once the browser has connected, and it clears on the next HMR\n // update.\n reportDiagnostics(next.diagnostics, root);\n showBlumeErrorOverlay(next.diagnostics);\n } catch (error) {\n // A config error the generator raised (an unplannable `components.ts`\n // override, a missing font file) is a diagnostic: report it in the\n // terminal and the browser overlay like a scan-time error, so the fix\n // is visible where the edit happened.\n if (error instanceof BlumeError) {\n reportDiagnostics([error.diagnostic], root);\n showBlumeErrorOverlay([error.diagnostic]);\n return;\n }\n // SAFETY: regeneration failures come from the generator and Astro's\n // server API, which raise Error instances; only the message is shown.\n logger.error(`Regeneration failed: ${(error as Error).message}`);\n }\n }, 80);\n\n // The runtime prepared above baked the *requested* port into the site\n // fallback; if Vite bumped it, regenerate so OG images, canonicals, and\n // other site-gated URLs point at the port actually serving.\n if (boundPort !== port) {\n void regenerate();\n }\n\n // Content is watched per source (filesystem uses fs.watch; remote sources\n // are frozen for the session). The remaining project inputs — user pages,\n // config, theme, and component overrides — are watched directly.\n const dirTargets = [project.context.pagesRoot].filter(\n (target) => target !== null\n );\n const fileTargets = [\n project.context.configFile,\n project.context.themeFile,\n project.context.componentsFile,\n ].filter((target) => target !== null);\n\n // chokidar handles what raw fs.watch made us hand-roll: recursive\n // directory watching on every platform, and single files surviving a\n // rename-replace save (vim and most \"atomic save\" editors), which orphans\n // an inode-tracking fs.watch watcher after the first write.\n const projectWatcher = watch([...dirTargets, ...fileTargets], {\n ignoreInitial: true,\n }).on(\"all\", regenerate);\n const disposers = [\n ...project.sources.map((source) => source.watch?.(regenerate)),\n () => {\n void projectWatcher.close();\n },\n ].filter((dispose) => dispose !== undefined);\n\n const shutdown = async () => {\n for (const dispose of disposers) {\n dispose();\n }\n releaseLock();\n await server.stop();\n process.exit(0);\n };\n\n process.on(\"SIGINT\", shutdown);\n process.on(\"SIGTERM\", shutdown);\n },\n});\n"
6
6
  ],
7
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AA6BA,IAAM,iBAAiB,CACrB,WAEA,OACG,IAAI,CAAC,UAAU,GAAG,MAAM,QAAQ,MAAM,SAAS,EAC/C,SAAS,EACT,KAAK;AAAA,CAAI;AAUd,IAAM,cAAc,CAClB,QACA,cACW;AAAA,EAGX,MAAM,UAAU,OAAO;AAAA,EACvB,IAAI,SAAS;AAAA,IACX,OAAO,QAAQ;AAAA,EACjB;AAAA,EACA,WAAW,OAAO,OAAO,aAAa,OAAO;AAAA,IAC3C,MAAM,OAAO,OAAO,IAAI,IAAI,GAAG,EAAE,IAAI;AAAA,IACrC,IAAI,OAAO,GAAG;AAAA,MACZ,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,OAAO;AAAA;AAGF,IAAM,aAAa,cAAc;AAAA,EACtC,MAAM;AAAA,IACJ,eAAe;AAAA,MACb,aAAa;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,aAAa;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACA,MAAM,EAAE,aAAa,yBAAyB,MAAM,SAAS;AAAA,IAC7D,MAAM,EAAE,aAAa,8BAA8B,MAAM,UAAU;AAAA,IACnE,MAAM,EAAE,aAAa,sBAAsB,MAAM,SAAS;AAAA,IAC1D,SAAS;AAAA,MACP,aAAa;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACA,QAAQ,EAAE,aAAa,wBAAwB,MAAM,UAAU;AAAA,EACjE;AAAA,EACA,MAAM,YAAY;AAAA,OACZ,IAAG,GAAG,QAAQ;AAAA,IAClB,MAAM,OAAO,QAAQ,IAAI;AAAA,IACzB,MAAM,gBAAgB,MAAM,KA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,QAAQ;AAAA,MAChB,QAAQ,QAAQ;AAAA,IAClB,EAAE,OAAO,CAAC,WAAW,WAAW,IAAI;AAAA,IAMpC,MAAM,iBAAiB,MAAM,CAAC,GAAG,YAAY,GAAG,WAAW,GAAG;AAAA,MAC5D,eAAe;AAAA,IACjB,CAAC,EAAE,GAAG,OAAO,UAAU;AAAA,IACvB,MAAM,YAAY;AAAA,MAChB,GAAG,QAAQ,QAAQ,IAAI,CAAC,WAAW,OAAO,QAAQ,UAAU,CAAC;AAAA,MAC7D,MAAM;AAAA,QACC,eAAe,MAAM;AAAA;AAAA,IAE9B,EAAE,OAAO,CAAC,YAAY,YAAY,SAAS;AAAA,IAE3C,MAAM,WAAW,YAAY;AAAA,MAC3B,WAAW,WAAW,WAAW;AAAA,QAC/B,QAAQ;AAAA,MACV;AAAA,MACA,YAAY;AAAA,MACZ,MAAM,OAAO,KAAK;AAAA,MAClB,QAAQ,KAAK,CAAC;AAAA;AAAA,IAGhB,QAAQ,GAAG,UAAU,QAAQ;AAAA,IAC7B,QAAQ,GAAG,WAAW,QAAQ;AAAA;AAElC,CAAC;",
8
+ "debugId": "D6B031299DB2BB0564756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  loadConfig
4
- } from "./chunk-qkqwkpte.js";
5
- import"./chunk-jts8mvcz.js";
4
+ } from "./chunk-pv29h0wf.js";
5
+ import"./chunk-3em5wd2y.js";
6
6
  import {
7
7
  commandMeta,
8
8
  reportInternalError,
@@ -11,11 +11,11 @@ import {
11
11
  reportDiagnostics
12
12
  } from "./index.js";
13
13
  import"./chunk-jq5n4avg.js";
14
- import"./chunk-fs23ddbb.js";
14
+ import"./chunk-j85vccga.js";
15
15
  import {
16
16
  CutError,
17
17
  cutVersion
18
- } from "./chunk-qs4q5p4e.js";
18
+ } from "./chunk-crgn1q09.js";
19
19
 
20
20
  // src/cli/commands/version.ts
21
21
  import { defineCommand } from "citty";
@@ -88,4 +88,4 @@ export {
88
88
  };
89
89
 
90
90
  //# debugId=86F69482E9E3E55264756E2164756E21
91
- //# sourceMappingURL=chunk-hdpx1tax.js.map
91
+ //# sourceMappingURL=chunk-2z928egk.js.map
@@ -11,17 +11,17 @@ import {
11
11
  import {
12
12
  AGENTS,
13
13
  launchAgent
14
- } from "./chunk-qwsrynx5.js";
14
+ } from "./chunk-1d7ve1dm.js";
15
15
  import {
16
16
  YAML_SCHEMA
17
- } from "./chunk-qkqwkpte.js";
18
- import"./chunk-jts8mvcz.js";
17
+ } from "./chunk-pv29h0wf.js";
18
+ import"./chunk-3em5wd2y.js";
19
19
  import {
20
20
  scanProject
21
- } from "./chunk-fs23ddbb.js";
21
+ } from "./chunk-j85vccga.js";
22
22
  import {
23
23
  buildMcpData
24
- } from "./chunk-6crbhc3x.js";
24
+ } from "./chunk-yfyb25rh.js";
25
25
  import {
26
26
  seconds,
27
27
  money,
@@ -31,12 +31,15 @@ import {
31
31
  agentArgs,
32
32
  readAgentOutput,
33
33
  parseVerdict
34
- } from "./chunk-fa25z98p.js";
34
+ } from "./chunk-ga0pf4aj.js";
35
+ import {
36
+ parseTimeoutSeconds
37
+ } from "./chunk-e04dxsz1.js";
35
38
 
36
39
  // src/cli/commands/eval.ts
37
40
  import { existsSync } from "node:fs";
38
41
  import { defineCommand } from "citty";
39
- import { join as join3 } from "pathe";
42
+ import { resolve } from "pathe";
40
43
 
41
44
  // src/eval/prompts.ts
42
45
  var readerPrompt = (question) => `You are evaluating whether a product's documentation can answer a user's question.
@@ -398,6 +401,18 @@ var runQuestion = async (question, index, context) => {
398
401
  status: verdict.pass ? "pass" : "fail"
399
402
  };
400
403
  };
404
+ var MISS_CODES = new Set([
405
+ "BLUME_EVAL_QUESTION_ERROR",
406
+ "BLUME_EVAL_QUESTION_FAILED"
407
+ ]);
408
+ var passFraction = (result) => {
409
+ const ran = result.results.length - result.counts.skip;
410
+ if (ran === 0) {
411
+ return 1;
412
+ }
413
+ const misses = result.diagnostics.filter((diagnostic) => MISS_CODES.has(diagnostic.code) && diagnostic.severity === "error").length;
414
+ return (ran - misses) / ran;
415
+ };
401
416
  var runEval = async (options) => {
402
417
  const started = performance.now();
403
418
  const kind = options.agent;
@@ -494,10 +509,6 @@ var launchAgentCode = async (agent, prompt) => {
494
509
  return notInstalled(agent);
495
510
  }
496
511
  };
497
- var passFraction = (result) => {
498
- const ran = result.results.length - result.counts.skip;
499
- return ran === 0 ? 1 : result.counts.pass / ran;
500
- };
501
512
  var parseFlags = (args) => {
502
513
  if (!isAgentKind(args.agent)) {
503
514
  logger.error(`Invalid --agent "${args.agent}" (use codex | claude).`);
@@ -512,15 +523,11 @@ var parseFlags = (args) => {
512
523
  process.exit(1);
513
524
  }
514
525
  const threshold = args.threshold === undefined ? 1 : Number(args.threshold);
515
- if (!Number.isFinite(threshold) || threshold < 0 || threshold > 1) {
526
+ if (args.threshold?.trim() === "" || !Number.isFinite(threshold) || threshold < 0 || threshold > 1) {
516
527
  logger.error(`Invalid --threshold "${args.threshold}" (use 0..1).`);
517
528
  process.exit(1);
518
529
  }
519
- const timeoutS = args.timeout === undefined ? DEFAULT_TIMEOUT_S : Number(args.timeout);
520
- if (!Number.isInteger(timeoutS) || timeoutS <= 0) {
521
- logger.error(`Invalid --timeout "${args.timeout}" (whole seconds).`);
522
- process.exit(1);
523
- }
530
+ const timeoutS = parseTimeoutSeconds(args.timeout, DEFAULT_TIMEOUT_S);
524
531
  return { agent: args.agent, threshold, timeoutS };
525
532
  };
526
533
  var runFixHandoff = async (agent, result, root, threshold) => {
@@ -539,7 +546,7 @@ var runFixHandoff = async (agent, result, root, threshold) => {
539
546
  }
540
547
  };
541
548
  var runInit = async (agent, file) => {
542
- const path = join3(process.cwd(), file);
549
+ const path = resolve(process.cwd(), file);
543
550
  if (existsSync(path)) {
544
551
  logger.error(`${file} already exists — edit it directly, or pass --file to draft elsewhere.`);
545
552
  process.exit(1);
@@ -598,7 +605,7 @@ var evalCommand = defineCommand({
598
605
  let result;
599
606
  try {
600
607
  const project = await scanProject(root, { mode: "build" });
601
- const evalsPath = join3(root, args.file);
608
+ const evalsPath = resolve(root, args.file);
602
609
  const { evals, raw } = await loadEvalsFile(evalsPath);
603
610
  process.stderr.write(`${headerLine(evals.questions.length, agent)}
604
611
 
@@ -664,14 +671,13 @@ var evalCommand = defineCommand({
664
671
  return;
665
672
  }
666
673
  if (failed) {
667
- process.exit(1);
674
+ process.exitCode = 1;
668
675
  }
669
676
  }
670
677
  });
671
678
  export {
672
- evalCommand,
673
- passFraction
679
+ evalCommand
674
680
  };
675
681
 
676
- //# debugId=7175171294EC3BBC64756E2164756E21
677
- //# sourceMappingURL=chunk-jwyddg7y.js.map
682
+ //# debugId=C123F57ABFFCB50F64756E2164756E21
683
+ //# sourceMappingURL=chunk-35d4wj9f.js.map