blume 1.6.5 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/bin/blume.mjs +3 -2
  3. package/dist/cli/chunk-0qhq7b8q.js +111 -0
  4. package/dist/cli/chunk-0qhq7b8q.js.map +11 -0
  5. package/dist/cli/chunk-18tjv4f7.js +96 -0
  6. package/dist/cli/chunk-18tjv4f7.js.map +10 -0
  7. package/dist/cli/chunk-27gtm2ym.js +69 -0
  8. package/dist/cli/chunk-27gtm2ym.js.map +11 -0
  9. package/dist/cli/chunk-2aj8ddew.js +72 -0
  10. package/dist/cli/chunk-2aj8ddew.js.map +10 -0
  11. package/dist/cli/chunk-3r94j3tc.js +221 -0
  12. package/dist/cli/chunk-3r94j3tc.js.map +10 -0
  13. package/dist/cli/chunk-4trphnvy.js +102 -0
  14. package/dist/cli/chunk-4trphnvy.js.map +11 -0
  15. package/dist/cli/chunk-4xyggvgf.js +21 -0
  16. package/dist/cli/chunk-4xyggvgf.js.map +10 -0
  17. package/dist/cli/chunk-5d4q7121.js +4064 -0
  18. package/dist/cli/chunk-5d4q7121.js.map +40 -0
  19. package/dist/cli/chunk-5hs6gb7n.js +32 -0
  20. package/dist/cli/chunk-5hs6gb7n.js.map +10 -0
  21. package/dist/cli/chunk-6kzzpsx8.js +26 -0
  22. package/dist/cli/chunk-6kzzpsx8.js.map +10 -0
  23. package/dist/cli/chunk-8gnpdsn1.js +952 -0
  24. package/dist/cli/chunk-8gnpdsn1.js.map +12 -0
  25. package/dist/cli/chunk-9qs6acpw.js +176 -0
  26. package/dist/cli/chunk-9qs6acpw.js.map +10 -0
  27. package/dist/cli/chunk-agy5rzxy.js +2453 -0
  28. package/dist/cli/chunk-agy5rzxy.js.map +15 -0
  29. package/dist/cli/chunk-bcy492zc.js +16 -0
  30. package/dist/cli/chunk-bcy492zc.js.map +10 -0
  31. package/dist/cli/chunk-btfr9yvw.js +41 -0
  32. package/dist/cli/chunk-btfr9yvw.js.map +10 -0
  33. package/dist/cli/chunk-cbjnx4s8.js +73 -0
  34. package/dist/cli/chunk-cbjnx4s8.js.map +10 -0
  35. package/dist/cli/chunk-cfw6x4rm.js +1967 -0
  36. package/dist/cli/chunk-cfw6x4rm.js.map +34 -0
  37. package/dist/cli/chunk-ckh3a410.js +277 -0
  38. package/dist/cli/chunk-ckh3a410.js.map +11 -0
  39. package/dist/cli/chunk-drke6t0h.js +259 -0
  40. package/dist/cli/chunk-drke6t0h.js.map +11 -0
  41. package/dist/cli/chunk-ev67ycx0.js +15 -0
  42. package/dist/cli/chunk-ev67ycx0.js.map +10 -0
  43. package/dist/cli/chunk-ey89bjj1.js +209 -0
  44. package/dist/cli/chunk-ey89bjj1.js.map +11 -0
  45. package/dist/cli/chunk-j6pxe0dt.js +69 -0
  46. package/dist/cli/chunk-j6pxe0dt.js.map +11 -0
  47. package/dist/cli/chunk-jk1zwka1.js +387 -0
  48. package/dist/cli/chunk-jk1zwka1.js.map +12 -0
  49. package/dist/cli/chunk-jtb45atp.js +467 -0
  50. package/dist/cli/chunk-jtb45atp.js.map +14 -0
  51. package/dist/cli/chunk-jxkxjsc1.js +76 -0
  52. package/dist/cli/chunk-jxkxjsc1.js.map +10 -0
  53. package/dist/cli/chunk-kwx90v78.js +81 -0
  54. package/dist/cli/chunk-kwx90v78.js.map +10 -0
  55. package/dist/cli/chunk-n0nyat6g.js +30 -0
  56. package/dist/cli/chunk-n0nyat6g.js.map +10 -0
  57. package/dist/cli/chunk-pxj10x8y.js +35 -0
  58. package/dist/cli/chunk-pxj10x8y.js.map +10 -0
  59. package/dist/cli/chunk-qq9nm3qd.js +1141 -0
  60. package/dist/cli/chunk-qq9nm3qd.js.map +19 -0
  61. package/dist/cli/chunk-s102bysw.js +5170 -0
  62. package/dist/cli/chunk-s102bysw.js.map +47 -0
  63. package/dist/cli/chunk-s5dsk8bj.js +769 -0
  64. package/dist/cli/chunk-s5dsk8bj.js.map +13 -0
  65. package/dist/cli/chunk-s5e5jt53.js +227 -0
  66. package/dist/cli/chunk-s5e5jt53.js.map +11 -0
  67. package/dist/cli/chunk-sbdqrjbb.js +81 -0
  68. package/dist/cli/chunk-sbdqrjbb.js.map +10 -0
  69. package/dist/cli/chunk-tnskyrej.js +117 -0
  70. package/dist/cli/chunk-tnskyrej.js.map +10 -0
  71. package/dist/cli/chunk-v2ymm99c.js +1016 -0
  72. package/dist/cli/chunk-v2ymm99c.js.map +13 -0
  73. package/dist/cli/chunk-v5mm027v.js +185 -0
  74. package/dist/cli/chunk-v5mm027v.js.map +11 -0
  75. package/dist/cli/chunk-vt8fgygt.js +23 -0
  76. package/dist/cli/chunk-vt8fgygt.js.map +10 -0
  77. package/dist/cli/chunk-vxv4x1n8.js +17 -0
  78. package/dist/cli/chunk-vxv4x1n8.js.map +10 -0
  79. package/dist/cli/chunk-wd27zjcz.js +60 -0
  80. package/dist/cli/chunk-wd27zjcz.js.map +10 -0
  81. package/dist/cli/chunk-x66c5yjn.js +23 -0
  82. package/dist/cli/chunk-x66c5yjn.js.map +10 -0
  83. package/dist/cli/chunk-xv91q4nm.js +5314 -0
  84. package/dist/cli/chunk-xv91q4nm.js.map +58 -0
  85. package/dist/cli/chunk-y3g15rvv.js +679 -0
  86. package/dist/cli/chunk-y3g15rvv.js.map +15 -0
  87. package/dist/cli/chunk-ye9zdkgv.js +136 -0
  88. package/dist/cli/chunk-ye9zdkgv.js.map +10 -0
  89. package/dist/cli/chunk-ynacq3ev.js +1062 -0
  90. package/dist/cli/chunk-ynacq3ev.js.map +25 -0
  91. package/dist/cli/chunk-zr3ygrq3.js +54 -0
  92. package/dist/cli/chunk-zr3ygrq3.js.map +10 -0
  93. package/dist/cli/index.js +55 -27597
  94. package/dist/cli/index.js.map +5 -243
  95. package/dist/types/ai/ask-context.d.ts +26 -0
  96. package/dist/types/components/layout/nav-utils.d.ts +33 -1
  97. package/dist/types/core/code-fences.d.ts +11 -0
  98. package/dist/types/core/package-root.d.ts +1 -1
  99. package/dist/types/core/schema.d.ts +70 -0
  100. package/dist/types/theme/fonts.d.ts +22 -22
  101. package/docs/02-deployment.mdx +22 -1
  102. package/docs/configuration/ask-ai.mdx +1 -1
  103. package/docs/configuration/customization.mdx +2 -9
  104. package/docs/content/navigation.mdx +2 -0
  105. package/docs/content/syntax.mdx +1 -1
  106. package/docs/discoverability/open-graph.mdx +4 -0
  107. package/docs/reference/cli.mdx +1 -1
  108. package/package.json +4 -2
  109. package/src/ai/api/handlers.ts +4 -7
  110. package/src/ai/api/paths.ts +8 -0
  111. package/src/ai/api/spec.ts +2 -1
  112. package/src/ai/ask-context.ts +378 -22
  113. package/src/astro/generate.ts +161 -28
  114. package/src/astro/include-hmr.ts +10 -13
  115. package/src/astro/include-refresh.ts +0 -0
  116. package/src/astro/index.ts +6 -1
  117. package/src/astro/integration.ts +280 -53
  118. package/src/astro/module-types.ts +83 -0
  119. package/src/astro/templates.ts +256 -108
  120. package/src/audit/image-size.ts +10 -8
  121. package/src/cli/command-meta.ts +77 -0
  122. package/src/cli/commands/add.ts +2 -4
  123. package/src/cli/commands/audit.ts +2 -4
  124. package/src/cli/commands/build.ts +70 -346
  125. package/src/cli/commands/check.ts +2 -4
  126. package/src/cli/commands/dev.ts +31 -42
  127. package/src/cli/commands/doctor.ts +2 -4
  128. package/src/cli/commands/eject.ts +3 -41
  129. package/src/cli/commands/eval.ts +2 -5
  130. package/src/cli/commands/init.ts +2 -4
  131. package/src/cli/commands/mcp-stdio.ts +2 -5
  132. package/src/cli/commands/preview.ts +3 -5
  133. package/src/cli/commands/sync.ts +2 -4
  134. package/src/cli/commands/translate.ts +2 -5
  135. package/src/cli/commands/validate.ts +2 -4
  136. package/src/cli/commands/version.ts +2 -4
  137. package/src/cli/eject-scripts.ts +0 -45
  138. package/src/cli/host-args.ts +16 -0
  139. package/src/cli/index.ts +84 -35
  140. package/src/cli/lazy-command.ts +47 -0
  141. package/src/components/Icon.astro +24 -0
  142. package/src/components/content/GithubInfo.astro +4 -1
  143. package/src/components/icon-sprite-middleware.ts +41 -0
  144. package/src/components/icon-sprite.ts +93 -0
  145. package/src/components/layout/IconSprite.astro +11 -0
  146. package/src/components/layout/NavTree.astro +156 -188
  147. package/src/components/layout/NavTreeCache.astro +45 -0
  148. package/src/components/layout/NavTreeScript.astro +256 -0
  149. package/src/components/layout/PageActions.astro +11 -5
  150. package/src/components/layout/PageLayout.astro +21 -3
  151. package/src/components/layout/ReferenceLayout.astro +21 -4
  152. package/src/components/layout/RootLayout.astro +44 -6
  153. package/src/components/layout/nav-cache.ts +49 -0
  154. package/src/components/layout/nav-utils.ts +69 -1
  155. package/src/components/layout/page-locale.ts +29 -0
  156. package/src/core/api-name.ts +18 -0
  157. package/src/core/code-fences.ts +48 -0
  158. package/src/core/content-assets.ts +3 -7
  159. package/src/core/includes.ts +3 -7
  160. package/src/core/package-root.ts +1 -1
  161. package/src/core/schema.ts +19 -0
  162. package/src/core/sources/normalize.ts +2 -37
  163. package/src/core/sources/obsidian.ts +3 -2
  164. package/src/core/svg-dimensions.ts +97 -0
  165. package/src/core/version-cut.ts +2 -2
  166. package/src/deploy/artifacts.ts +370 -0
  167. package/src/deploy/cloudflare-negotiation.ts +97 -32
  168. package/src/deploy/function-bundle.ts +66 -20
  169. package/src/deploy/sitemap.ts +6 -0
  170. package/src/deploy/vercel-negotiation.ts +8 -30
  171. package/src/markdown/language-icon.ts +64 -20
  172. package/src/markdown/mermaid.ts +11 -0
  173. package/src/og/cache.ts +236 -0
  174. package/src/og/card.ts +18 -16
  175. package/src/og/index.ts +8 -1
  176. package/src/openapi/render-mdx.ts +9 -5
  177. package/src/registry/eject.ts +23 -10
  178. package/src/theme/entry.ts +41 -7
  179. package/src/theme/fonts.ts +30 -23
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ commandsFor,
4
+ detectProjectPackageManager,
5
+ eject,
6
+ updatePackageScripts
7
+ } from "./chunk-s5dsk8bj.js";
8
+ import {
9
+ refuseIfDevRunning
10
+ } from "./chunk-ye9zdkgv.js";
11
+ import"./chunk-5d4q7121.js";
12
+ import"./chunk-ynacq3ev.js";
13
+ import"./chunk-pxj10x8y.js";
14
+ import"./chunk-sbdqrjbb.js";
15
+ import"./chunk-v5mm027v.js";
16
+ import"./chunk-ev67ycx0.js";
17
+ import"./chunk-vt8fgygt.js";
18
+ import"./chunk-3r94j3tc.js";
19
+ import"./chunk-agy5rzxy.js";
20
+ import"./chunk-j6pxe0dt.js";
21
+ import"./chunk-vxv4x1n8.js";
22
+ import"./chunk-wd27zjcz.js";
23
+ import"./chunk-s102bysw.js";
24
+ import"./chunk-xv91q4nm.js";
25
+ import"./chunk-27gtm2ym.js";
26
+ import"./chunk-4xyggvgf.js";
27
+ import"./chunk-6kzzpsx8.js";
28
+ import {
29
+ logger
30
+ } from "./chunk-ey89bjj1.js";
31
+ import {
32
+ commandMeta
33
+ } from "./chunk-2aj8ddew.js";
34
+
35
+ // src/cli/commands/eject.ts
36
+ import { defineCommand } from "citty";
37
+ import { relative } from "pathe";
38
+ var ejectCommand = defineCommand({
39
+ args: {
40
+ yes: { description: "Skip the confirmation prompt.", type: "boolean" }
41
+ },
42
+ meta: commandMeta.eject,
43
+ async run({ args }) {
44
+ const root = process.cwd();
45
+ refuseIfDevRunning(root, "ejecting");
46
+ if (!args.yes) {
47
+ logger.warn("Eject is one-way: it writes astro.config.mjs, src/, and (if absent) tsconfig.json, rewrites your package.json scripts, and removes .blume. An existing tsconfig.json is left untouched.");
48
+ logger.info("Re-run with --yes to proceed.");
49
+ return;
50
+ }
51
+ const { files, warnings } = await eject(root);
52
+ await updatePackageScripts(root);
53
+ for (const warning of warnings) {
54
+ logger.warn(warning);
55
+ }
56
+ logger.success(`Ejected ${files.length} file(s):`);
57
+ for (const file of files) {
58
+ process.stdout.write(` ${relative(root, file)}
59
+ `);
60
+ }
61
+ const pm = await detectProjectPackageManager(root);
62
+ const { build, dev } = commandsFor(pm);
63
+ logger.box(`Your project is now a standalone Astro app.
64
+
65
+ ${dev}
66
+ ${build}
67
+
68
+ The blume package remains importable.`);
69
+ }
70
+ });
71
+ export {
72
+ ejectCommand
73
+ };
74
+
75
+ //# debugId=7089C2D59766320964756E2164756E21
76
+ //# sourceMappingURL=chunk-jxkxjsc1.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/cli/commands/eject.ts"],
4
+ "sourcesContent": [
5
+ "import { defineCommand } from \"citty\";\nimport { relative } from \"pathe\";\n\nimport { eject } from \"../../registry/eject.ts\";\nimport { commandMeta } from \"../command-meta.ts\";\nimport { refuseIfDevRunning } from \"../dev-lock.ts\";\nimport { updatePackageScripts } from \"../eject-scripts.ts\";\nimport { commandsFor, detectProjectPackageManager } from \"../init/scaffold.ts\";\nimport { logger } from \"../log.ts\";\n\nexport const ejectCommand = defineCommand({\n args: {\n yes: { description: \"Skip the confirmation prompt.\", type: \"boolean\" },\n },\n meta: commandMeta.eject,\n async run({ args }) {\n const root = process.cwd();\n refuseIfDevRunning(root, \"ejecting\");\n\n if (!args.yes) {\n logger.warn(\n \"Eject is one-way: it writes astro.config.mjs, src/, and (if absent) tsconfig.json, rewrites your package.json scripts, and removes .blume. An existing tsconfig.json is left untouched.\"\n );\n logger.info(\"Re-run with --yes to proceed.\");\n return;\n }\n\n const { files, warnings } = await eject(root);\n await updatePackageScripts(root);\n\n // The same surface as the generated-runtime path (prepare.ts): one warn\n // per generation warning, e.g. a Scalar reference spec that wasn't found.\n for (const warning of warnings) {\n logger.warn(warning);\n }\n\n logger.success(`Ejected ${files.length} file(s):`);\n for (const file of files) {\n process.stdout.write(` ${relative(root, file)}\\n`);\n }\n // Print run commands matching the project's package manager (lockfile\n // detection, since eject runs inside an existing project).\n const pm = await detectProjectPackageManager(root);\n const { build, dev } = commandsFor(pm);\n logger.box(\n `Your project is now a standalone Astro app.\\n\\n ${dev}\\n ${build}\\n\\nThe blume package remains importable.`\n );\n },\n});\n"
6
+ ],
7
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AASO,IAAM,eAAe,cAAc;AAAA,EACxC,MAAM;AAAA,IACJ,KAAK,EAAE,aAAa,iCAAiC,MAAM,UAAU;AAAA,EACvE;AAAA,EACA,MAAM,YAAY;AAAA,OACZ,IAAG,GAAG,QAAQ;AAAA,IAClB,MAAM,OAAO,QAAQ,IAAI;AAAA,IACzB,mBAAmB,MAAM,UAAU;AAAA,IAEnC,IAAI,CAAC,KAAK,KAAK;AAAA,MACb,OAAO,KACL,yLACF;AAAA,MACA,OAAO,KAAK,+BAA+B;AAAA,MAC3C;AAAA,IACF;AAAA,IAEA,QAAQ,OAAO,aAAa,MAAM,MAAM,IAAI;AAAA,IAC5C,MAAM,qBAAqB,IAAI;AAAA,IAI/B,WAAW,WAAW,UAAU;AAAA,MAC9B,OAAO,KAAK,OAAO;AAAA,IACrB;AAAA,IAEA,OAAO,QAAQ,WAAW,MAAM,iBAAiB;AAAA,IACjD,WAAW,QAAQ,OAAO;AAAA,MACxB,QAAQ,OAAO,MAAM,KAAK,SAAS,MAAM,IAAI;AAAA,CAAK;AAAA,IACpD;AAAA,IAGA,MAAM,KAAK,MAAM,4BAA4B,IAAI;AAAA,IACjD,QAAQ,OAAO,QAAQ,YAAY,EAAE;AAAA,IACrC,OAAO,IACL;AAAA;AAAA,IAAoD;AAAA,IAAU;AAAA;AAAA,sCAChE;AAAA;AAEJ,CAAC;",
8
+ "debugId": "7089C2D59766320964756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ prepareProject
4
+ } from "./chunk-0qhq7b8q.js";
5
+ import"./chunk-n0nyat6g.js";
6
+ import"./chunk-btfr9yvw.js";
7
+ import {
8
+ readDevLock
9
+ } from "./chunk-ye9zdkgv.js";
10
+ import"./chunk-5d4q7121.js";
11
+ import"./chunk-ynacq3ev.js";
12
+ import"./chunk-pxj10x8y.js";
13
+ import"./chunk-sbdqrjbb.js";
14
+ import"./chunk-v5mm027v.js";
15
+ import"./chunk-ev67ycx0.js";
16
+ import"./chunk-vt8fgygt.js";
17
+ import"./chunk-3r94j3tc.js";
18
+ import"./chunk-agy5rzxy.js";
19
+ import"./chunk-j6pxe0dt.js";
20
+ import"./chunk-vxv4x1n8.js";
21
+ import"./chunk-wd27zjcz.js";
22
+ import"./chunk-s102bysw.js";
23
+ import {
24
+ loadConfig,
25
+ resolveProjectContext,
26
+ resolveRuntimeDir
27
+ } from "./chunk-xv91q4nm.js";
28
+ import"./chunk-27gtm2ym.js";
29
+ import"./chunk-4xyggvgf.js";
30
+ import"./chunk-6kzzpsx8.js";
31
+ import {
32
+ logger
33
+ } from "./chunk-ey89bjj1.js";
34
+ import {
35
+ commandMeta
36
+ } from "./chunk-2aj8ddew.js";
37
+
38
+ // src/cli/commands/sync.ts
39
+ import { rm } from "node:fs/promises";
40
+ import { defineCommand } from "citty";
41
+ import { join } from "pathe";
42
+ var syncCommand = defineCommand({
43
+ args: {
44
+ force: {
45
+ description: "Clear the source cache before refetching.",
46
+ type: "boolean"
47
+ },
48
+ preview: {
49
+ description: "Include drafts and unpublished CMS content.",
50
+ type: "boolean"
51
+ },
52
+ strict: { description: "Fail on diagnostics.", type: "boolean" }
53
+ },
54
+ meta: commandMeta.sync,
55
+ async run({ args }) {
56
+ const root = process.cwd();
57
+ if (args.force) {
58
+ const { config } = await loadConfig(root);
59
+ const context = resolveProjectContext(root, config);
60
+ await rm(join(context.outDir, "cache"), { force: true, recursive: true });
61
+ logger.info("Cleared source cache.");
62
+ }
63
+ const lock = readDevLock(resolveRuntimeDir(root));
64
+ const devServerUrl = lock?.port ? `http://localhost:${lock.port}` : undefined;
65
+ await prepareProject({
66
+ devServerUrl,
67
+ mode: "dev",
68
+ preview: args.preview,
69
+ refresh: true,
70
+ root,
71
+ strict: args.strict
72
+ });
73
+ logger.success("Synced content sources.");
74
+ }
75
+ });
76
+ export {
77
+ syncCommand
78
+ };
79
+
80
+ //# debugId=CD2123C1322DDD3C64756E2164756E21
81
+ //# sourceMappingURL=chunk-kwx90v78.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/cli/commands/sync.ts"],
4
+ "sourcesContent": [
5
+ "import { rm } from \"node:fs/promises\";\n\nimport { defineCommand } from \"citty\";\nimport { join } from \"pathe\";\n\nimport { loadConfig } from \"../../core/config.ts\";\nimport {\n resolveProjectContext,\n resolveRuntimeDir,\n} from \"../../core/project.ts\";\nimport { commandMeta } from \"../command-meta.ts\";\nimport { readDevLock } from \"../dev-lock.ts\";\nimport { logger } from \"../log.ts\";\nimport { prepareProject } from \"../prepare.ts\";\n\nexport const syncCommand = defineCommand({\n args: {\n force: {\n description: \"Clear the source cache before refetching.\",\n type: \"boolean\",\n },\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.sync,\n async run({ args }) {\n const root = process.cwd();\n\n // `--force` drops the snapshots so a stale or corrupt cache can't be served;\n // scoped to `.blume/cache`, so a running dev server's runtime is untouched.\n if (args.force) {\n const { config } = await loadConfig(root);\n const context = resolveProjectContext(root, config);\n await rm(join(context.outDir, \"cache\"), { force: true, recursive: true });\n logger.info(\"Cleared source cache.\");\n }\n\n // Dev mode keeps drafts and skips the static-build gate; `refresh` forces\n // remote sources to re-fetch rather than serve their cached snapshot. A\n // running dev server hot-reloads from the regenerated runtime — so when one\n // is live, regenerate with the same site fallback (its URL) it used, else\n // its astro.config loses `site` (dropping OG and canonicals) and Astro\n // restarts cold.\n const lock = readDevLock(resolveRuntimeDir(root));\n const devServerUrl = lock?.port\n ? `http://localhost:${lock.port}`\n : undefined;\n await prepareProject({\n devServerUrl,\n mode: \"dev\",\n preview: args.preview,\n refresh: true,\n root,\n strict: args.strict,\n });\n\n logger.success(\"Synced content sources.\");\n },\n});\n"
6
+ ],
7
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAEA;AACA;AAYO,IAAM,cAAc,cAAc;AAAA,EACvC,MAAM;AAAA,IACJ,OAAO;AAAA,MACL,aAAa;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACA,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,IAIzB,IAAI,KAAK,OAAO;AAAA,MACd,QAAQ,WAAW,MAAM,WAAW,IAAI;AAAA,MACxC,MAAM,UAAU,sBAAsB,MAAM,MAAM;AAAA,MAClD,MAAM,GAAG,KAAK,QAAQ,QAAQ,OAAO,GAAG,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAAA,MACxE,OAAO,KAAK,uBAAuB;AAAA,IACrC;AAAA,IAQA,MAAM,OAAO,YAAY,kBAAkB,IAAI,CAAC;AAAA,IAChD,MAAM,eAAe,MAAM,OACvB,oBAAoB,KAAK,SACzB;AAAA,IACJ,MAAM,eAAe;AAAA,MACnB;AAAA,MACA,MAAM;AAAA,MACN,SAAS,KAAK;AAAA,MACd,SAAS;AAAA,MACT;AAAA,MACA,QAAQ,KAAK;AAAA,IACf,CAAC;AAAA,IAED,OAAO,QAAQ,yBAAyB;AAAA;AAE5C,CAAC;",
8
+ "debugId": "CD2123C1322DDD3C64756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ searchProviderMeta
4
+ } from "./chunk-wd27zjcz.js";
5
+ import {
6
+ needsPlaygroundProxy
7
+ } from "./chunk-xv91q4nm.js";
8
+
9
+ // src/core/server-features.ts
10
+ var serverFeatures = (config) => {
11
+ const features = [];
12
+ if (config.ai.ask?.enabled && !config.ai.ask.endpoint) {
13
+ features.push("Ask AI");
14
+ }
15
+ if (config.ai.mcp.enabled) {
16
+ features.push("MCP server");
17
+ }
18
+ if (needsPlaygroundProxy(config)) {
19
+ features.push("API playground proxy");
20
+ }
21
+ if (searchProviderMeta(config.search.provider).requiresServer) {
22
+ features.push(`Search (${config.search.provider})`);
23
+ }
24
+ return features;
25
+ };
26
+
27
+ export { serverFeatures };
28
+
29
+ //# debugId=0DFA9D31AEDBECCC64756E2164756E21
30
+ //# sourceMappingURL=chunk-n0nyat6g.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/core/server-features.ts"],
4
+ "sourcesContent": [
5
+ "import { needsPlaygroundProxy } from \"../openapi/references.ts\";\nimport { searchProviderMeta } from \"../search/providers.ts\";\nimport type { ResolvedConfig } from \"./schema.ts\";\n\n/**\n * List the enabled features that require Astro server output. Static builds\n * fail clearly when any of these are enabled.\n */\nexport const serverFeatures = (config: ResolvedConfig): string[] => {\n const features: string[] = [];\n if (config.ai.ask?.enabled && !config.ai.ask.endpoint) {\n features.push(\"Ask AI\");\n }\n // The hosted MCP server is a live JSON-RPC endpoint, so it needs a runtime.\n if (config.ai.mcp.enabled) {\n features.push(\"MCP server\");\n }\n // The built-in playground proxy (`playground.proxy: true` on the OpenAPI or\n // GraphQL block) is a live fetch endpoint at `/_api-proxy`; an external\n // proxy URL (string) or a proxy-less playground stays fully static.\n if (needsPlaygroundProxy(config)) {\n features.push(\"API playground proxy\");\n }\n // Mixedbread (and any future provider) that proxies queries through a secret\n // server endpoint can't run on a static build.\n if (searchProviderMeta(config.search.provider).requiresServer) {\n features.push(`Search (${config.search.provider})`);\n }\n return features;\n};\n"
6
+ ],
7
+ "mappings": ";;;;;;;;;AAQO,IAAM,iBAAiB,CAAC,WAAqC;AAAA,EAClE,MAAM,WAAqB,CAAC;AAAA,EAC5B,IAAI,OAAO,GAAG,KAAK,WAAW,CAAC,OAAO,GAAG,IAAI,UAAU;AAAA,IACrD,SAAS,KAAK,QAAQ;AAAA,EACxB;AAAA,EAEA,IAAI,OAAO,GAAG,IAAI,SAAS;AAAA,IACzB,SAAS,KAAK,YAAY;AAAA,EAC5B;AAAA,EAIA,IAAI,qBAAqB,MAAM,GAAG;AAAA,IAChC,SAAS,KAAK,sBAAsB;AAAA,EACtC;AAAA,EAGA,IAAI,mBAAmB,OAAO,OAAO,QAAQ,EAAE,gBAAgB;AAAA,IAC7D,SAAS,KAAK,WAAW,OAAO,OAAO,WAAW;AAAA,EACpD;AAAA,EACA,OAAO;AAAA;",
8
+ "debugId": "0DFA9D31AEDBECCC64756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/ai/mcp/tools.ts
4
+ var READ_ONLY = { openWorldHint: false, readOnlyHint: true };
5
+ var MCP_TOOLS = [
6
+ {
7
+ annotations: READ_ONLY,
8
+ description: 'Full-text search across the documentation. Returns matching pages with their title, route, content type, and a short excerpt; pass `contentTypes` to search only pages of certain types (e.g. `rfc`, `changelog`), `filters` to require facet values the site declares per type (e.g. `{"status": "enforced"}`), and `locale` to search one language. On a versioned site results default to the current docs — pass `version` to search an archived version (e.g. `"v1.0"`) or `"all"` for every version. Use this first to discover relevant pages, then `get_page` to read one in full.',
9
+ name: "search_docs",
10
+ title: "Search documentation"
11
+ },
12
+ {
13
+ annotations: READ_ONLY,
14
+ description: "Fetch a single documentation page as agent-optimized Markdown (frontmatter included, components downleveled to plain Markdown). Pass a route from `search_docs` or `list_pages`, e.g. `/guides/install`.",
15
+ name: "get_page",
16
+ title: "Get page Markdown"
17
+ },
18
+ {
19
+ annotations: READ_ONLY,
20
+ description: 'List every documentation page with its route, title, description, content type, and any declared facet values; pass `contentTypes`, `filters`, and/or `locale` to narrow the list. On a versioned site the list defaults to the current docs — pass `version` for an archived version or `"all"`. Useful for enumerating the docs, discovering the types and facets in use, or finding a page when search is too narrow.',
21
+ name: "list_pages",
22
+ title: "List pages"
23
+ },
24
+ {
25
+ annotations: READ_ONLY,
26
+ description: "Return the documentation navigation tree (header tabs and the sidebar hierarchy), reflecting how the docs are organized for readers. Pass `locale` for a language's tree and, on a versioned site, `version` for an archived snapshot's tree.",
27
+ name: "get_navigation",
28
+ title: "Get navigation"
29
+ }
30
+ ];
31
+
32
+ export { MCP_TOOLS };
33
+
34
+ //# debugId=56B52393DC55784564756E2164756E21
35
+ //# sourceMappingURL=chunk-pxj10x8y.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/ai/mcp/tools.ts"],
4
+ "sourcesContent": [
5
+ "/**\n * Static metadata for the MCP tools Blume exposes. Shared by the server (which\n * pairs each entry with a Zod input schema and handler) and the `.well-known`\n * discovery documents, so tool names and descriptions never drift between the\n * live server and its advertised capabilities.\n */\n\n/** A read-only, non-mutating tool hint set (every Blume tool is read-only). */\nconst READ_ONLY = { openWorldHint: false, readOnlyHint: true } as const;\n\nexport interface McpToolMeta {\n annotations: { openWorldHint: boolean; readOnlyHint: boolean };\n description: string;\n name: string;\n title: string;\n}\n\nexport const MCP_TOOLS: McpToolMeta[] = [\n {\n annotations: READ_ONLY,\n description:\n 'Full-text search across the documentation. Returns matching pages with their title, route, content type, and a short excerpt; pass `contentTypes` to search only pages of certain types (e.g. `rfc`, `changelog`), `filters` to require facet values the site declares per type (e.g. `{\"status\": \"enforced\"}`), and `locale` to search one language. On a versioned site results default to the current docs — pass `version` to search an archived version (e.g. `\"v1.0\"`) or `\"all\"` for every version. Use this first to discover relevant pages, then `get_page` to read one in full.',\n name: \"search_docs\",\n title: \"Search documentation\",\n },\n {\n annotations: READ_ONLY,\n description:\n \"Fetch a single documentation page as agent-optimized Markdown (frontmatter included, components downleveled to plain Markdown). Pass a route from `search_docs` or `list_pages`, e.g. `/guides/install`.\",\n name: \"get_page\",\n title: \"Get page Markdown\",\n },\n {\n annotations: READ_ONLY,\n description:\n 'List every documentation page with its route, title, description, content type, and any declared facet values; pass `contentTypes`, `filters`, and/or `locale` to narrow the list. On a versioned site the list defaults to the current docs — pass `version` for an archived version or `\"all\"`. Useful for enumerating the docs, discovering the types and facets in use, or finding a page when search is too narrow.',\n name: \"list_pages\",\n title: \"List pages\",\n },\n {\n annotations: READ_ONLY,\n description:\n \"Return the documentation navigation tree (header tabs and the sidebar hierarchy), reflecting how the docs are organized for readers. Pass `locale` for a language's tree and, on a versioned site, `version` for an archived snapshot's tree.\",\n name: \"get_navigation\",\n title: \"Get navigation\",\n },\n];\n"
6
+ ],
7
+ "mappings": ";;;AAQA,IAAM,YAAY,EAAE,eAAe,OAAO,cAAc,KAAK;AAStD,IAAM,YAA2B;AAAA,EACtC;AAAA,IACE,aAAa;AAAA,IACb,aACE;AAAA,IACF,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,aACE;AAAA,IACF,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,aACE;AAAA,IACF,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,aACE;AAAA,IACF,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AACF;",
8
+ "debugId": "56B52393DC55784564756E2164756E21",
9
+ "names": []
10
+ }