blume 2.0.0 → 2.0.2
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.
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +110 -0
- package/README.md +2 -2
- package/dist/cli/{chunk-f2972sbt.js → chunk-00gs3wqs.js} +1 -1
- package/dist/cli/{chunk-fa25z98p.js → chunk-273ygyr4.js} +4 -3
- package/dist/cli/chunk-273ygyr4.js.map +11 -0
- package/dist/cli/{chunk-pat2zzwc.js → chunk-3yce002v.js} +21 -8
- package/dist/cli/{chunk-pat2zzwc.js.map → chunk-3yce002v.js.map} +4 -4
- package/dist/cli/{chunk-d1tadaw7.js → chunk-4e9b9ra6.js} +17 -7
- package/dist/cli/chunk-4e9b9ra6.js.map +10 -0
- package/dist/cli/{chunk-zg2gtj10.js → chunk-5r8g91qn.js} +352 -676
- package/dist/cli/chunk-5r8g91qn.js.map +34 -0
- package/dist/cli/{chunk-11j0384y.js → chunk-6dtt0zfn.js} +14 -14
- package/dist/cli/{chunk-11j0384y.js.map → chunk-6dtt0zfn.js.map} +3 -3
- package/dist/cli/{chunk-bw22s759.js → chunk-6k4ftwze.js} +38 -19
- package/dist/cli/{chunk-bw22s759.js.map → chunk-6k4ftwze.js.map} +4 -4
- package/dist/cli/{chunk-sqn5t4q0.js → chunk-7mbqtmgb.js} +16 -7
- package/dist/cli/chunk-7mbqtmgb.js.map +10 -0
- package/dist/cli/{chunk-79njf86q.js → chunk-7vtckvaw.js} +21 -19
- package/dist/cli/chunk-7vtckvaw.js.map +11 -0
- package/dist/cli/{chunk-fh5hj5jt.js → chunk-8g8ytmgx.js} +17 -18
- package/dist/cli/{chunk-fh5hj5jt.js.map → chunk-8g8ytmgx.js.map} +2 -2
- package/dist/cli/{chunk-1w8dp3qb.js → chunk-91ws1n6j.js} +18 -15
- package/dist/cli/chunk-91ws1n6j.js.map +10 -0
- package/dist/cli/{chunk-7ez8ny0t.js → chunk-bbnwccaz.js} +2 -2
- package/dist/cli/{chunk-5a2z0198.js → chunk-bfwp9vp6.js} +18 -10
- package/dist/cli/chunk-bfwp9vp6.js.map +10 -0
- package/dist/cli/{chunk-ernrthtr.js → chunk-d1v5rhy0.js} +14 -15
- package/dist/cli/{chunk-ernrthtr.js.map → chunk-d1v5rhy0.js.map} +2 -2
- package/dist/cli/{chunk-a9kptbw5.js → chunk-ddndchfr.js} +21 -6
- package/dist/cli/chunk-ddndchfr.js.map +14 -0
- package/dist/cli/{chunk-zxccj738.js → chunk-esh98wmb.js} +1 -1
- package/dist/cli/{chunk-88cpgt6h.js → chunk-fsmrqk8a.js} +1 -1
- package/dist/cli/{chunk-b5aj94ah.js → chunk-g698a744.js} +5 -5
- package/dist/cli/{chunk-jts8mvcz.js → chunk-gs7r695n.js} +9 -3
- package/dist/cli/{chunk-jts8mvcz.js.map → chunk-gs7r695n.js.map} +3 -3
- package/dist/cli/{chunk-41za066z.js → chunk-h2ez8dzb.js} +4 -4
- package/dist/cli/{chunk-by2290sx.js → chunk-h7k3nq3v.js} +2 -2
- package/dist/cli/{chunk-j8mw0za6.js → chunk-hqp2ajnh.js} +252 -123
- package/dist/cli/chunk-hqp2ajnh.js.map +35 -0
- package/dist/cli/{chunk-mnqj32sj.js → chunk-hr8ne106.js} +119 -50
- package/dist/cli/chunk-hr8ne106.js.map +13 -0
- package/dist/cli/{chunk-mwt1k8n7.js → chunk-j85scx15.js} +74 -30
- package/dist/cli/chunk-j85scx15.js.map +10 -0
- package/dist/cli/{chunk-z01ze5c1.js → chunk-k7pj68a8.js} +63 -22
- package/dist/cli/chunk-k7pj68a8.js.map +11 -0
- package/dist/cli/{chunk-2q1dwty4.js → chunk-mqc662a6.js} +8 -8
- package/dist/cli/{chunk-2q1dwty4.js.map → chunk-mqc662a6.js.map} +4 -4
- package/dist/cli/{chunk-y3e45rc8.js → chunk-n1yg3tj3.js} +4 -4
- package/dist/cli/{chunk-bctazmbk.js → chunk-nfcyttvj.js} +17 -6
- package/dist/cli/chunk-nfcyttvj.js.map +10 -0
- package/dist/cli/{chunk-6k8vp3ta.js → chunk-pbg5a4s3.js} +60 -28
- package/dist/cli/chunk-pbg5a4s3.js.map +19 -0
- package/dist/cli/{chunk-d80hr03s.js → chunk-ppzjqwx2.js} +24 -17
- package/dist/cli/{chunk-d80hr03s.js.map → chunk-ppzjqwx2.js.map} +4 -4
- package/dist/cli/{chunk-beat36xx.js → chunk-qkb5a8sa.js} +25 -10
- package/dist/cli/chunk-qkb5a8sa.js.map +10 -0
- package/dist/cli/{chunk-bnbmcwfb.js → chunk-sqw4ekg1.js} +5 -5
- package/dist/cli/{chunk-bnbmcwfb.js.map → chunk-sqw4ekg1.js.map} +3 -3
- package/dist/cli/{chunk-xaz13gwg.js → chunk-v6ya5kcb.js} +3268 -1150
- package/dist/cli/chunk-v6ya5kcb.js.map +189 -0
- package/dist/cli/{chunk-tzne8qfq.js → chunk-w4bxdvsa.js} +18 -15
- package/dist/cli/chunk-w4bxdvsa.js.map +10 -0
- package/dist/cli/{chunk-f7t03s3g.js → chunk-wdrt2k2v.js} +2 -2
- package/dist/cli/{chunk-z1f5arsg.js → chunk-xh43dwgw.js} +170 -55
- package/dist/cli/chunk-xh43dwgw.js.map +36 -0
- package/dist/cli/{chunk-pnnvybbk.js → chunk-zp79m0ts.js} +5 -5
- package/dist/cli/{chunk-pnnvybbk.js.map → chunk-zp79m0ts.js.map} +2 -2
- package/dist/cli/index.js +160 -35
- package/dist/cli/index.js.map +4 -4
- package/dist/types/ai/agent-readability.d.ts +1 -1
- package/dist/types/ai/agent-surface.d.ts +32 -0
- package/dist/types/ai/api/paths.d.ts +1 -1
- package/dist/types/ai/api-catalog.d.ts +7 -1
- package/dist/types/ai/ask-context.d.ts +14 -7
- package/dist/types/ai/ask.d.ts +43 -43
- package/dist/types/ai/component-markdown.d.ts +4 -4
- package/dist/types/ai/index.d.ts +3 -3
- package/dist/types/ai/openapi-components.d.ts +1 -1
- package/dist/types/ai/relative-links.d.ts +9 -4
- package/dist/types/ai/serializers.d.ts +1 -1
- package/dist/types/ai/static-expression.d.ts +28 -0
- package/dist/types/ai/visibility.d.ts +1 -1
- package/dist/types/analytics/databuddy.d.ts +43 -0
- package/dist/types/analytics/index.d.ts +2 -0
- package/dist/types/analytics/schema.d.ts +14 -0
- package/dist/types/cli/env.d.ts +5 -0
- package/dist/types/cli/init/scaffold.d.ts +19 -3
- package/dist/types/cli/init/starter-spec.d.ts +11 -0
- package/dist/types/core/base-path.d.ts +9 -0
- package/dist/types/core/config-input.d.ts +21 -21
- package/dist/types/core/config.d.ts +5 -5
- package/dist/types/core/data.d.ts +3 -3
- package/dist/types/core/graph.d.ts +2 -0
- package/dist/types/core/i18n-ui.d.ts +37 -8
- package/dist/types/core/i18n.d.ts +7 -1
- package/dist/types/core/links.d.ts +3 -1
- package/dist/types/core/load-module.d.ts +10 -0
- package/dist/types/core/locale-links.d.ts +12 -2
- package/dist/types/core/meta.d.ts +5 -1
- package/dist/types/core/nav-diagnostics.d.ts +10 -0
- package/dist/types/core/navigation.d.ts +38 -0
- package/dist/types/core/ordering-prefix.d.ts +4 -0
- package/dist/types/core/safe-links.d.ts +3 -1
- package/dist/types/core/schema.d.ts +57 -18
- package/dist/types/core/sources/github-releases.d.ts +5 -0
- package/dist/types/core/sources/lower.d.ts +14 -2
- package/dist/types/core/sources/normalize.d.ts +10 -1
- package/dist/types/core/sources/remote.d.ts +11 -1
- package/dist/types/core/sources/resolve.d.ts +12 -0
- package/dist/types/core/sources/types.d.ts +31 -0
- package/dist/types/core/types.d.ts +9 -0
- package/dist/types/core/unrecognized-keys.d.ts +1 -1
- package/dist/types/deploy/adapters/node.d.ts +5 -2
- package/dist/types/deploy/adapters/types.d.ts +7 -0
- package/dist/types/deploy/cloudflare-negotiation.d.ts +3 -2
- package/dist/types/deploy/headers.d.ts +31 -7
- package/dist/types/deploy/node-headers.d.ts +43 -8
- package/dist/types/deploy/platforms/netlify.d.ts +27 -2
- package/dist/types/deploy/platforms/node.d.ts +6 -5
- package/dist/types/deploy/platforms/types.d.ts +7 -0
- package/dist/types/deploy/platforms/vercel.d.ts +3 -2
- package/dist/types/deploy/redirects.d.ts +7 -2
- package/dist/types/deploy/vercel-negotiation.d.ts +3 -2
- package/dist/types/openapi/model.d.ts +20 -6
- package/dist/types/search/documents.d.ts +1 -1
- package/dist/types/search/orama-index.d.ts +1 -1
- package/dist/types/search/sync/algolia.d.ts +3 -1
- package/docs/01-quickstart.mdx +3 -2
- package/docs/02-deployment.mdx +21 -12
- package/docs/03-upgrading.mdx +22 -9
- package/docs/04-migrating.mdx +4 -4
- package/docs/08-faq.mdx +12 -5
- package/docs/advanced/changelog.mdx +1 -1
- package/docs/advanced/custom-pages.mdx +5 -3
- package/docs/advanced/skills.mdx +1 -1
- package/docs/cli/audit.mdx +5 -5
- package/docs/cli/doctor.mdx +4 -4
- package/docs/cli/evals.mdx +9 -9
- package/docs/cli/index.mdx +6 -3
- package/docs/cli/translate.mdx +8 -8
- package/docs/configuration/analytics.mdx +23 -2
- package/docs/configuration/{ask-ai.mdx → assistant.mdx} +20 -20
- package/docs/configuration/customization.mdx +5 -4
- package/docs/configuration/index.mdx +7 -5
- package/docs/configuration/meta.ts +1 -1
- package/docs/configuration/search.mdx +2 -2
- package/docs/content/components.mdx +1 -1
- package/docs/content/frontmatter.mdx +5 -1
- package/docs/content/i18n.mdx +3 -3
- package/docs/content/index.mdx +4 -2
- package/docs/content/islands.mdx +1 -1
- package/docs/content/meta.mdx +5 -3
- package/docs/content/navigation.mdx +29 -4
- package/docs/content/sources.mdx +18 -12
- package/docs/content/versioning.mdx +1 -0
- package/docs/discoverability/agent-discovery.mdx +22 -8
- package/docs/discoverability/index.mdx +3 -3
- package/docs/discoverability/llms-txt.mdx +2 -5
- package/docs/discoverability/markdown.mdx +5 -3
- package/docs/discoverability/mcp.mdx +4 -0
- package/docs/discoverability/metadata.mdx +3 -2
- package/docs/discoverability/open-graph.mdx +6 -4
- package/docs/discoverability/rss.mdx +3 -1
- package/docs/index.mdx +2 -2
- package/docs/references/asyncapi.mdx +1 -1
- package/docs/references/graphql.mdx +2 -2
- package/docs/references/openapi.mdx +3 -3
- package/package.json +1 -1
- package/skills/blume/SKILL.md +5 -5
- package/skills/blume-migrate/SKILL.md +6 -6
- package/skills/blume-migrate/references/docusaurus.md +6 -6
- package/skills/blume-migrate/references/mintlify.md +3 -3
- package/skills/blume-migrate/references/monorepo.md +1 -1
- package/skills/blume-migrate/references/nextra.md +1 -1
- package/skills/blume-migrate/references/starlight.md +5 -5
- package/skills/blume-migrate/scripts/mintlify-codemod.mjs +2 -2
- package/skills/blume-update-docs/references/audit-checklist.md +1 -1
- package/src/ai/agent-readability.ts +4 -4
- package/src/ai/agent-surface.ts +56 -0
- package/src/ai/api/paths.ts +1 -1
- package/src/ai/api/spec.ts +15 -2
- package/src/ai/api-catalog.ts +7 -1
- package/src/ai/ask-context.ts +21 -9
- package/src/ai/ask-data.ts +28 -14
- package/src/ai/ask.ts +84 -71
- package/src/ai/component-markdown.ts +43 -37
- package/src/ai/cors.ts +3 -3
- package/src/ai/index.ts +16 -16
- package/src/ai/link-headers.ts +8 -3
- package/src/ai/llms.ts +4 -3
- package/src/ai/markdown.ts +23 -11
- package/src/ai/mcp/server.ts +78 -7
- package/src/ai/openapi-components.ts +1 -1
- package/src/ai/relative-links.ts +78 -10
- package/src/ai/serializers.ts +1 -1
- package/src/ai/static-expression.ts +416 -0
- package/src/ai/visibility.ts +46 -15
- package/src/analytics/databuddy.ts +67 -0
- package/src/analytics/head.ts +4 -0
- package/src/analytics/index.ts +2 -0
- package/src/analytics/posthog.ts +21 -3
- package/src/analytics/schema.ts +2 -0
- package/src/astro/generate.ts +90 -45
- package/src/astro/module-types.ts +1 -1
- package/src/astro/runtime-deps.ts +6 -6
- package/src/astro/templates.ts +87 -49
- package/src/audit/catalog.ts +2 -2
- package/src/audit/checks/assets.ts +25 -5
- package/src/audit/checks/content.ts +20 -2
- package/src/audit/checks/i18n.ts +46 -8
- package/src/audit/checks/indexability.ts +39 -19
- package/src/audit/checks/links.ts +14 -0
- package/src/audit/checks/llms.ts +6 -3
- package/src/audit/checks/network.ts +3 -1
- package/src/audit/checks/og-image.ts +10 -0
- package/src/audit/checks/robots.ts +6 -1
- package/src/audit/checks/sitemap.ts +56 -31
- package/src/audit/checks/social.ts +21 -2
- package/src/audit/crawl.ts +88 -15
- package/src/audit/report.ts +54 -17
- package/src/audit/run.ts +1 -0
- package/src/audit/types.ts +18 -0
- package/src/audit/url.ts +37 -6
- package/src/blume-modules.d.ts +2 -2
- package/src/cli/build-failure.ts +50 -0
- package/src/cli/commands/audit.ts +8 -1
- package/src/cli/commands/build.ts +19 -5
- package/src/cli/commands/check.ts +2 -0
- package/src/cli/commands/doctor.ts +7 -5
- package/src/cli/commands/eval.ts +4 -10
- package/src/cli/commands/init.ts +15 -5
- package/src/cli/commands/migrate.ts +2 -2
- package/src/cli/commands/preview.ts +15 -0
- package/src/cli/commands/sync.ts +2 -0
- package/src/cli/commands/translate.ts +12 -9
- package/src/cli/commands/upgrade.ts +13 -2
- package/src/cli/eject-scripts.ts +32 -7
- package/src/cli/env.ts +12 -1
- package/src/cli/init/scaffold.ts +117 -11
- package/src/cli/init/starter-spec.ts +235 -0
- package/src/cli/required-secrets.ts +3 -3
- package/src/components/content/AccordionItem.astro +26 -22
- package/src/components/content/Badge.astro +2 -9
- package/src/components/content/Card.astro +2 -2
- package/src/components/content/Component.astro +9 -3
- package/src/components/content/Expandable.astro +5 -1
- package/src/components/content/Frame.astro +2 -7
- package/src/components/content/GithubInfo.astro +12 -2
- package/src/components/content/Prompt.astro +2 -7
- package/src/components/content/Tabs.astro +54 -5
- package/src/components/content/Tile.astro +1 -1
- package/src/components/content/Tooltip.astro +69 -7
- package/src/components/content/Tree.astro +7 -2
- package/src/components/content/TypeTable.astro +10 -5
- package/src/components/content/Update.astro +8 -2
- package/src/components/content/auto-type-table.ts +4 -1
- package/src/components/content/badge-color.ts +17 -0
- package/src/components/content/base-href.ts +18 -3
- package/src/components/content/inline-markdown.ts +27 -7
- package/src/components/copy-feedback.ts +36 -9
- package/src/components/islands/{AskAI.astro → Assistant.astro} +10 -10
- package/src/components/islands/{ask-ai.tsx → assistant.tsx} +39 -25
- package/src/components/islands/hooks.ts +21 -14
- package/src/components/islands/webmcp.ts +12 -8
- package/src/components/layout/Banner.astro +23 -4
- package/src/components/layout/Header.astro +32 -19
- package/src/components/layout/Logo.astro +5 -0
- package/src/components/layout/NavSelector.astro +6 -1
- package/src/components/layout/NavTabMenu.astro +133 -0
- package/src/components/layout/NavTree.astro +15 -6
- package/src/components/layout/NavTreeCache.astro +5 -2
- package/src/components/layout/NavTreeScript.astro +45 -5
- package/src/components/layout/PageLayout.astro +28 -14
- package/src/components/layout/Pagination.astro +7 -7
- package/src/components/layout/ReferenceLayout.astro +5 -2
- package/src/components/layout/RootLayout.astro +27 -14
- package/src/components/layout/Search.astro +18 -14
- package/src/components/layout/analytics-client.ts +3 -1
- package/src/components/layout/drawer-inert.ts +1 -1
- package/src/components/openapi/GraphqlType.astro +11 -3
- package/src/components/openapi/MessageComposer.astro +1 -1
- package/src/components/openapi/Operation.astro +21 -5
- package/src/components/openapi/PanelTabs.astro +4 -1
- package/src/components/openapi/Playground.astro +8 -2
- package/src/components/openapi/RequestPanel.astro +9 -5
- package/src/components/openapi/SchemaProperty.astro +11 -33
- package/src/components/openapi/SchemaTable.astro +27 -52
- package/src/components/openapi/description.ts +2 -2
- package/src/components/openapi/helpers.ts +90 -12
- package/src/components/openapi/message-composer.ts +8 -0
- package/src/components/openapi/message-model.ts +12 -2
- package/src/components/openapi/message.ts +4 -1
- package/src/components/openapi/operation-model.ts +40 -8
- package/src/components/openapi/panel.ts +29 -5
- package/src/components/openapi/playground-client.ts +37 -7
- package/src/components/openapi/playground-schema.ts +25 -6
- package/src/components/openapi/request.ts +2 -0
- package/src/components/openapi/schema-tree.ts +203 -0
- package/src/components/openapi/snippets.ts +30 -15
- package/src/components/openapi/validate-json.ts +1 -1
- package/src/core/base-path.ts +15 -0
- package/src/core/code-fences.ts +1 -1
- package/src/core/config-input.ts +23 -23
- package/src/core/config.ts +21 -7
- package/src/core/data.ts +3 -3
- package/src/core/diagnostics.ts +217 -30
- package/src/core/graph.ts +120 -11
- package/src/core/i18n-ui.ts +74 -11
- package/src/core/i18n.ts +13 -2
- package/src/core/links.ts +7 -4
- package/src/core/load-module.ts +20 -0
- package/src/core/locale-links.ts +17 -17
- package/src/core/manifest.ts +3 -2
- package/src/core/meta.ts +69 -6
- package/src/core/nav-diagnostics.ts +56 -1
- package/src/core/navigation.ts +245 -76
- package/src/core/ordering-prefix.ts +27 -0
- package/src/core/project-graph.ts +23 -1
- package/src/core/request-body.ts +1 -1
- package/src/core/safe-href.ts +53 -1
- package/src/core/safe-links.ts +11 -2
- package/src/core/schema.ts +95 -34
- package/src/core/server-features.ts +2 -2
- package/src/core/sources/assets.ts +83 -41
- package/src/core/sources/contentful-rich-text.ts +3 -2
- package/src/core/sources/contentful.ts +25 -12
- package/src/core/sources/filesystem.ts +5 -1
- package/src/core/sources/github-releases.ts +106 -5
- package/src/core/sources/lexical.ts +9 -4
- package/src/core/sources/lower.ts +79 -26
- package/src/core/sources/mdx-remote.ts +1 -0
- package/src/core/sources/normalize.ts +132 -30
- package/src/core/sources/notion.ts +26 -10
- package/src/core/sources/obsidian.ts +17 -3
- package/src/core/sources/payload.ts +1 -0
- package/src/core/sources/portable-text.ts +63 -44
- package/src/core/sources/remote.ts +18 -2
- package/src/core/sources/resolve.ts +52 -33
- package/src/core/sources/sanity.ts +1 -0
- package/src/core/sources/strapi-blocks.ts +9 -4
- package/src/core/sources/strapi.ts +1 -0
- package/src/core/sources/types.ts +31 -0
- package/src/core/types.ts +9 -0
- package/src/core/ui-packs/ar.ts +17 -5
- package/src/core/ui-packs/bg.ts +17 -5
- package/src/core/ui-packs/bn.ts +17 -5
- package/src/core/ui-packs/ca.ts +17 -5
- package/src/core/ui-packs/cs.ts +17 -5
- package/src/core/ui-packs/da.ts +17 -5
- package/src/core/ui-packs/de.ts +17 -5
- package/src/core/ui-packs/el.ts +17 -5
- package/src/core/ui-packs/es.ts +17 -5
- package/src/core/ui-packs/fa.ts +17 -5
- package/src/core/ui-packs/fi.ts +17 -5
- package/src/core/ui-packs/fr.ts +17 -5
- package/src/core/ui-packs/he.ts +17 -5
- package/src/core/ui-packs/hi.ts +17 -5
- package/src/core/ui-packs/hr.ts +17 -5
- package/src/core/ui-packs/hu.ts +17 -5
- package/src/core/ui-packs/id.ts +17 -5
- package/src/core/ui-packs/it.ts +17 -5
- package/src/core/ui-packs/ja.ts +17 -5
- package/src/core/ui-packs/ko.ts +17 -5
- package/src/core/ui-packs/nl.ts +17 -5
- package/src/core/ui-packs/no.ts +17 -5
- package/src/core/ui-packs/pl.ts +17 -5
- package/src/core/ui-packs/pt-br.ts +17 -5
- package/src/core/ui-packs/pt.ts +17 -5
- package/src/core/ui-packs/ro.ts +17 -5
- package/src/core/ui-packs/ru.ts +17 -5
- package/src/core/ui-packs/sk.ts +17 -5
- package/src/core/ui-packs/sr.ts +17 -5
- package/src/core/ui-packs/sv.ts +17 -5
- package/src/core/ui-packs/th.ts +17 -5
- package/src/core/ui-packs/tr.ts +17 -5
- package/src/core/ui-packs/uk.ts +17 -5
- package/src/core/ui-packs/vi.ts +17 -5
- package/src/core/ui-packs/zh-tw.ts +17 -5
- package/src/core/ui-packs/zh.ts +17 -5
- package/src/core/unrecognized-keys.ts +1 -1
- package/src/core/version-cut.ts +17 -2
- package/src/core/versions.ts +4 -1
- package/src/deploy/adapters/node.ts +5 -2
- package/src/deploy/adapters/registry.ts +2 -1
- package/src/deploy/adapters/types.ts +13 -1
- package/src/deploy/artifacts.ts +25 -5
- package/src/deploy/cloudflare-negotiation.ts +23 -4
- package/src/deploy/headers.ts +67 -51
- package/src/deploy/node-headers.ts +148 -27
- package/src/deploy/platforms/cloudflare.ts +1 -0
- package/src/deploy/platforms/netlify.ts +82 -5
- package/src/deploy/platforms/node.ts +7 -5
- package/src/deploy/platforms/static.ts +1 -0
- package/src/deploy/platforms/types.ts +7 -0
- package/src/deploy/platforms/vercel.ts +9 -3
- package/src/deploy/redirects.ts +14 -3
- package/src/deploy/vercel-negotiation.ts +35 -3
- package/src/eval/agents.ts +10 -2
- package/src/eval/run.ts +25 -0
- package/src/markdown/base-links.ts +55 -8
- package/src/markdown/index.ts +6 -3
- package/src/markdown/relative-links.ts +3 -23
- package/src/markdown/route-snapshot.ts +37 -0
- package/src/og/card.ts +20 -4
- package/src/og/derive.ts +145 -4
- package/src/openapi/graphql-build.ts +28 -2
- package/src/openapi/model.ts +77 -13
- package/src/openapi/render-mdx.ts +10 -1
- package/src/registry/eject.ts +135 -37
- package/src/search/documents.ts +24 -3
- package/src/search/orama-index.ts +1 -1
- package/src/search/sync/algolia.ts +36 -2
- package/src/sources/registry.ts +5 -0
- package/src/theme/entry.ts +11 -4
- package/src/translate/agents.ts +6 -1
- package/src/translate/ledger.ts +26 -3
- package/src/translate/meta.ts +11 -3
- package/src/translate/report.ts +1 -1
- package/src/translate/run.ts +11 -5
- package/src/translate/validate.ts +10 -1
- package/src/translate/work-list.ts +36 -3
- package/src/upgrade/upgrade.ts +37 -5
- package/dist/cli/chunk-1w8dp3qb.js.map +0 -10
- package/dist/cli/chunk-5a2z0198.js.map +0 -10
- package/dist/cli/chunk-6k8vp3ta.js.map +0 -19
- package/dist/cli/chunk-79njf86q.js.map +0 -11
- package/dist/cli/chunk-a9kptbw5.js.map +0 -14
- package/dist/cli/chunk-abh8yjkn.js +0 -31
- package/dist/cli/chunk-abh8yjkn.js.map +0 -10
- package/dist/cli/chunk-bctazmbk.js.map +0 -10
- package/dist/cli/chunk-beat36xx.js.map +0 -10
- package/dist/cli/chunk-d1tadaw7.js.map +0 -10
- package/dist/cli/chunk-fa25z98p.js.map +0 -11
- package/dist/cli/chunk-j8mw0za6.js.map +0 -35
- package/dist/cli/chunk-mnqj32sj.js.map +0 -12
- package/dist/cli/chunk-mwt1k8n7.js.map +0 -10
- package/dist/cli/chunk-nk3ts2xk.js +0 -51
- package/dist/cli/chunk-nk3ts2xk.js.map +0 -10
- package/dist/cli/chunk-sqn5t4q0.js.map +0 -10
- package/dist/cli/chunk-tzne8qfq.js.map +0 -10
- package/dist/cli/chunk-xaz13gwg.js.map +0 -182
- package/dist/cli/chunk-z01ze5c1.js.map +0 -10
- package/dist/cli/chunk-z1f5arsg.js.map +0 -36
- package/dist/cli/chunk-zg2gtj10.js.map +0 -35
- /package/dist/cli/{chunk-f2972sbt.js.map → chunk-00gs3wqs.js.map} +0 -0
- /package/dist/cli/{chunk-7ez8ny0t.js.map → chunk-bbnwccaz.js.map} +0 -0
- /package/dist/cli/{chunk-zxccj738.js.map → chunk-esh98wmb.js.map} +0 -0
- /package/dist/cli/{chunk-88cpgt6h.js.map → chunk-fsmrqk8a.js.map} +0 -0
- /package/dist/cli/{chunk-b5aj94ah.js.map → chunk-g698a744.js.map} +0 -0
- /package/dist/cli/{chunk-41za066z.js.map → chunk-h2ez8dzb.js.map} +0 -0
- /package/dist/cli/{chunk-by2290sx.js.map → chunk-h7k3nq3v.js.map} +0 -0
- /package/dist/cli/{chunk-y3e45rc8.js.map → chunk-n1yg3tj3.js.map} +0 -0
- /package/dist/cli/{chunk-f7t03s3g.js.map → chunk-wdrt2k2v.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OramaDoc } from "../search/orama-index.ts";
|
|
2
|
-
/** A chat message as posted by the
|
|
2
|
+
/** A chat message as posted by the assistant island (`{ role, content }`). */
|
|
3
3
|
export interface AskMessage {
|
|
4
4
|
content: string;
|
|
5
5
|
role: string;
|
|
@@ -9,7 +9,7 @@ export interface AskPage {
|
|
|
9
9
|
path?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* The self-contained snapshot the grounded
|
|
12
|
+
* The self-contained snapshot the assistant's grounded endpoint imports. Bundles the
|
|
13
13
|
* search documents so retrieval works regardless of the configured search
|
|
14
14
|
* provider and needs no filesystem access at request time. Serialized to
|
|
15
15
|
* `generated/ask-data.json` and built by {@link buildAskData}.
|
|
@@ -23,9 +23,16 @@ export interface AskData {
|
|
|
23
23
|
defaultLocale?: string;
|
|
24
24
|
documents: OramaDoc[];
|
|
25
25
|
site: string | null;
|
|
26
|
+
/**
|
|
27
|
+
* Present on a versioned site, whose documents then carry their `version`
|
|
28
|
+
* (`""` for the current docs): retrieval keeps to the version the reader
|
|
29
|
+
* is viewing — the current docs unless they're on an archived page — as
|
|
30
|
+
* the search dialog does.
|
|
31
|
+
*/
|
|
32
|
+
versioned?: boolean;
|
|
26
33
|
}
|
|
27
34
|
/**
|
|
28
|
-
* How much retrieved documentation a question carries (the `ai.
|
|
35
|
+
* How much retrieved documentation a question carries (the `ai.assistant.retrieval`
|
|
29
36
|
* config). Every field falls back to the built-in default, so a partial object
|
|
30
37
|
* only changes what it names. Injected characters dominate time-to-first-token
|
|
31
38
|
* on a self-hosted backend, and the three knobs aren't interchangeable: the
|
|
@@ -49,7 +56,7 @@ export interface AskRetrievalOptions {
|
|
|
49
56
|
*
|
|
50
57
|
* Pages are indexed whole (one document each), so a naive head slice of a long
|
|
51
58
|
* page returns its intro and misses sections below the fold — the exact failure
|
|
52
|
-
* where "How does
|
|
59
|
+
* where "How does the assistant work?" retrieves the right page but only sees its
|
|
53
60
|
* opening paragraph. This centers the window on the densest cluster of query
|
|
54
61
|
* terms so the injected text is the part that actually answers the question.
|
|
55
62
|
* Exported for testing; {@link createAskContext} is the runtime entry point.
|
|
@@ -81,7 +88,7 @@ export declare const parsePage: (content: string) => ParsedPage;
|
|
|
81
88
|
/** {@link excerptPage} over a page parsed on the spot. Exported for testing. */
|
|
82
89
|
export declare const sectionExcerpt: (content: string, query: string, max: number) => string;
|
|
83
90
|
/**
|
|
84
|
-
* Build the request-time grounding function for the
|
|
91
|
+
* Build the request-time grounding function for the assistant endpoint.
|
|
85
92
|
*
|
|
86
93
|
* Lexical retrieval over Orama (the same index/ranking the search dialog and MCP
|
|
87
94
|
* server use). The index is built once and memoized across requests. Returns a
|
|
@@ -89,12 +96,12 @@ export declare const sectionExcerpt: (content: string, query: string, max: numbe
|
|
|
89
96
|
* viewing — or `undefined` when there is nothing to ground on, so the endpoint
|
|
90
97
|
* can fall back to its plain prompt.
|
|
91
98
|
*
|
|
92
|
-
* `options.instructions` (the `ai.
|
|
99
|
+
* `options.instructions` (the `ai.assistant.instructions` config) is appended after
|
|
93
100
|
* the base instruction rather than replacing it: the base carries the
|
|
94
101
|
* functional contract (answer only from the excerpts, cite pages as Markdown
|
|
95
102
|
* links) that the panel's citation rendering depends on.
|
|
96
103
|
*
|
|
97
|
-
* `options.retrieval` (the `ai.
|
|
104
|
+
* `options.retrieval` (the `ai.assistant.retrieval` config) sizes how much
|
|
98
105
|
* documentation each question carries; omitted fields keep today's defaults.
|
|
99
106
|
*/
|
|
100
107
|
export declare const createAskContext: (data: AskData, options?: {
|
package/dist/types/ai/ask.d.ts
CHANGED
|
@@ -5,17 +5,17 @@ import type { AdapterDescriptor, JsonValue } from "../core/adapter.ts";
|
|
|
5
5
|
* `reasoning` values minus `provider-default`, which is what omitting the
|
|
6
6
|
* option means.
|
|
7
7
|
*/
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const assistantReasoningLevels: readonly ["none", "minimal", "low", "medium", "high", "xhigh"];
|
|
9
9
|
/** How much the model reasons before answering (an adapter's `reasoning`). */
|
|
10
|
-
export type
|
|
10
|
+
export type AssistantReasoning = (typeof assistantReasoningLevels)[number];
|
|
11
11
|
/**
|
|
12
12
|
* The AI SDK's `providerOptions` shape, forwarded to `streamText` verbatim:
|
|
13
13
|
* `{ [provider]: { [option]: value } }`. The escape hatch for model controls
|
|
14
14
|
* Blume doesn't name, so a new provider knob never needs a Blume field.
|
|
15
15
|
*/
|
|
16
|
-
export type
|
|
17
|
-
/** The options every
|
|
18
|
-
export interface
|
|
16
|
+
export type AssistantProviderOptions = Record<string, Record<string, JsonValue>>;
|
|
17
|
+
/** The options every assistant adapter accepts. */
|
|
18
|
+
export interface AssistantAdapterOptions {
|
|
19
19
|
/**
|
|
20
20
|
* Name of the env var holding the provider's API key. Each adapter has its
|
|
21
21
|
* own default; set this only to point at a different variable.
|
|
@@ -32,10 +32,10 @@ export interface AskAdapterOptions {
|
|
|
32
32
|
* Options passed to `streamText` as its `providerOptions`, untouched, in the
|
|
33
33
|
* AI SDK's own shape (`{ openai: { textVerbosity: "low" } }`, say).
|
|
34
34
|
*/
|
|
35
|
-
providerOptions?:
|
|
35
|
+
providerOptions?: AssistantProviderOptions;
|
|
36
36
|
}
|
|
37
37
|
/** Options for {@link gateway}. */
|
|
38
|
-
export interface
|
|
38
|
+
export interface AssistantGatewayOptions extends AssistantAdapterOptions {
|
|
39
39
|
/** A `provider/model` id routed by the gateway. Defaults to `openai/gpt-5.5`. */
|
|
40
40
|
model?: string;
|
|
41
41
|
/**
|
|
@@ -44,9 +44,9 @@ export interface AskGatewayOptions extends AskAdapterOptions {
|
|
|
44
44
|
* control (OpenAI's `reasoning_effort`, for example); the model has to
|
|
45
45
|
* offer the level you pick. Omitted keeps the model's default.
|
|
46
46
|
*/
|
|
47
|
-
reasoning?:
|
|
47
|
+
reasoning?: AssistantReasoning;
|
|
48
48
|
}
|
|
49
|
-
export type
|
|
49
|
+
export type AssistantGatewayAdapter = AdapterDescriptor<"gateway", AssistantGatewayOptions>;
|
|
50
50
|
export declare const gatewayAdapterSchema: z.ZodObject<{
|
|
51
51
|
kind: z.ZodLiteral<"gateway">;
|
|
52
52
|
options: z.ZodObject<{
|
|
@@ -67,14 +67,14 @@ export declare const gatewayAdapterSchema: z.ZodObject<{
|
|
|
67
67
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
68
68
|
}, z.core.$strict>;
|
|
69
69
|
/**
|
|
70
|
-
* Route
|
|
70
|
+
* Route the assistant through the Vercel AI Gateway (the default). `model` is a
|
|
71
71
|
* `provider/model` string; the key is `AI_GATEWAY_API_KEY`, or Vercel's OIDC
|
|
72
72
|
* token when deployed there. Needs no provider SDK beyond the `ai` package
|
|
73
73
|
* Blume ships.
|
|
74
74
|
*/
|
|
75
|
-
export declare const gateway: (options?:
|
|
75
|
+
export declare const gateway: (options?: AssistantGatewayOptions) => AssistantGatewayAdapter;
|
|
76
76
|
/** Options for {@link openrouter}. */
|
|
77
|
-
export interface
|
|
77
|
+
export interface AssistantOpenRouterOptions extends AssistantAdapterOptions {
|
|
78
78
|
/** The OpenRouter model id (`anthropic/claude-sonnet-4-5`). */
|
|
79
79
|
model: string;
|
|
80
80
|
/**
|
|
@@ -82,9 +82,9 @@ export interface AskOpenRouterOptions extends AskAdapterOptions {
|
|
|
82
82
|
* OpenRouter's `reasoning.effort`, because its provider ignores the AI
|
|
83
83
|
* SDK's call-level option. Omitted keeps the model's default.
|
|
84
84
|
*/
|
|
85
|
-
reasoning?:
|
|
85
|
+
reasoning?: AssistantReasoning;
|
|
86
86
|
}
|
|
87
|
-
export type
|
|
87
|
+
export type AssistantOpenRouterAdapter = AdapterDescriptor<"openrouter", AssistantOpenRouterOptions>;
|
|
88
88
|
export declare const openrouterAdapterSchema: z.ZodObject<{
|
|
89
89
|
kind: z.ZodLiteral<"openrouter">;
|
|
90
90
|
options: z.ZodObject<{
|
|
@@ -105,12 +105,12 @@ export declare const openrouterAdapterSchema: z.ZodObject<{
|
|
|
105
105
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
106
106
|
}, z.core.$strict>;
|
|
107
107
|
/**
|
|
108
|
-
* Route
|
|
108
|
+
* Route the assistant through OpenRouter. Reads `OPENROUTER_API_KEY` and needs
|
|
109
109
|
* `@openrouter/ai-sdk-provider` installed in the project.
|
|
110
110
|
*/
|
|
111
|
-
export declare const openrouter: (options:
|
|
111
|
+
export declare const openrouter: (options: AssistantOpenRouterOptions) => AssistantOpenRouterAdapter;
|
|
112
112
|
/** Options for {@link llmgateway}. */
|
|
113
|
-
export interface
|
|
113
|
+
export interface AssistantLlmGatewayOptions extends AssistantAdapterOptions {
|
|
114
114
|
/** Overrides the preset endpoint (`https://api.llmgateway.io/v1`). */
|
|
115
115
|
baseUrl?: string;
|
|
116
116
|
/** The model id LLMGateway serves. */
|
|
@@ -119,9 +119,9 @@ export interface AskLlmGatewayOptions extends AskAdapterOptions {
|
|
|
119
119
|
* How much the model reasons before answering, sent in the request as
|
|
120
120
|
* `reasoning_effort`. Omitted keeps the model's default.
|
|
121
121
|
*/
|
|
122
|
-
reasoning?:
|
|
122
|
+
reasoning?: AssistantReasoning;
|
|
123
123
|
}
|
|
124
|
-
export type
|
|
124
|
+
export type AssistantLlmGatewayAdapter = AdapterDescriptor<"llmgateway", AssistantLlmGatewayOptions>;
|
|
125
125
|
export declare const llmgatewayAdapterSchema: z.ZodObject<{
|
|
126
126
|
kind: z.ZodLiteral<"llmgateway">;
|
|
127
127
|
options: z.ZodObject<{
|
|
@@ -143,21 +143,21 @@ export declare const llmgatewayAdapterSchema: z.ZodObject<{
|
|
|
143
143
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
144
144
|
}, z.core.$strict>;
|
|
145
145
|
/**
|
|
146
|
-
* Route
|
|
146
|
+
* Route the assistant through LLMGateway's OpenAI-compatible endpoint. Reads
|
|
147
147
|
* `LLMGATEWAY_API_KEY` and needs `@ai-sdk/openai-compatible` installed.
|
|
148
148
|
*/
|
|
149
|
-
export declare const llmgateway: (options:
|
|
149
|
+
export declare const llmgateway: (options: AssistantLlmGatewayOptions) => AssistantLlmGatewayAdapter;
|
|
150
150
|
/**
|
|
151
151
|
* Options for {@link inkeep}. No `reasoning`: Inkeep runs its own QA pipeline
|
|
152
152
|
* behind an OpenAI-compatible endpoint with no reasoning control.
|
|
153
153
|
*/
|
|
154
|
-
export interface
|
|
154
|
+
export interface AssistantInkeepOptions extends AssistantAdapterOptions {
|
|
155
155
|
/** Overrides the preset endpoint (`https://api.inkeep.com/v1`). */
|
|
156
156
|
baseUrl?: string;
|
|
157
157
|
/** The Inkeep QA model id. */
|
|
158
158
|
model: string;
|
|
159
159
|
}
|
|
160
|
-
export type
|
|
160
|
+
export type AssistantInkeepAdapter = AdapterDescriptor<"inkeep", AssistantInkeepOptions>;
|
|
161
161
|
export declare const inkeepAdapterSchema: z.ZodObject<{
|
|
162
162
|
kind: z.ZodLiteral<"inkeep">;
|
|
163
163
|
options: z.ZodObject<{
|
|
@@ -175,9 +175,9 @@ export declare const inkeepAdapterSchema: z.ZodObject<{
|
|
|
175
175
|
* dashboard, so Blume leaves it ungrounded and it takes no `reasoning`.
|
|
176
176
|
* Reads `INKEEP_API_KEY` and needs `@ai-sdk/openai-compatible` installed.
|
|
177
177
|
*/
|
|
178
|
-
export declare const inkeep: (options:
|
|
178
|
+
export declare const inkeep: (options: AssistantInkeepOptions) => AssistantInkeepAdapter;
|
|
179
179
|
/** Options for {@link openaiCompatible}. */
|
|
180
|
-
export interface
|
|
180
|
+
export interface AssistantOpenAICompatibleOptions extends AssistantAdapterOptions {
|
|
181
181
|
/** Name of the env var holding the endpoint's API key. */
|
|
182
182
|
apiKeyEnv: string;
|
|
183
183
|
/** The endpoint's base URL (`https://my-gateway.example.com/v1`). */
|
|
@@ -191,9 +191,9 @@ export interface AskOpenAICompatibleOptions extends AskAdapterOptions {
|
|
|
191
191
|
* `reasoning_effort`, so the endpoint has to accept that parameter.
|
|
192
192
|
* Omitted keeps the model's default.
|
|
193
193
|
*/
|
|
194
|
-
reasoning?:
|
|
194
|
+
reasoning?: AssistantReasoning;
|
|
195
195
|
}
|
|
196
|
-
export type
|
|
196
|
+
export type AssistantOpenAICompatibleAdapter = AdapterDescriptor<"openai-compatible", AssistantOpenAICompatibleOptions>;
|
|
197
197
|
export declare const openaiCompatibleAdapterSchema: z.ZodObject<{
|
|
198
198
|
kind: z.ZodLiteral<"openai-compatible">;
|
|
199
199
|
options: z.ZodObject<{
|
|
@@ -216,28 +216,28 @@ export declare const openaiCompatibleAdapterSchema: z.ZodObject<{
|
|
|
216
216
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
217
217
|
}, z.core.$strict>;
|
|
218
218
|
/**
|
|
219
|
-
* Route
|
|
219
|
+
* Route the assistant through any OpenAI-compatible endpoint: supply its `baseUrl`,
|
|
220
220
|
* the `model` it serves, and the env var holding its key. Needs
|
|
221
221
|
* `@ai-sdk/openai-compatible` installed.
|
|
222
222
|
*/
|
|
223
|
-
export declare const openaiCompatible: (options:
|
|
224
|
-
/** Which backend answers
|
|
225
|
-
export type
|
|
223
|
+
export declare const openaiCompatible: (options: AssistantOpenAICompatibleOptions) => AssistantOpenAICompatibleAdapter;
|
|
224
|
+
/** Which backend answers the assistant: the value of `gateway()`, `openrouter()`, … */
|
|
225
|
+
export type AssistantAdapter = AssistantGatewayAdapter | AssistantOpenRouterAdapter | AssistantLlmGatewayAdapter | AssistantInkeepAdapter | AssistantOpenAICompatibleAdapter;
|
|
226
226
|
/**
|
|
227
|
-
* Error params for `ai.
|
|
227
|
+
* Error params for `ai.assistant`: a 1.x flat provider field (`model`, `apiKeyEnv`,
|
|
228
228
|
* `baseUrl`, `headers`, `reasoning`) names the adapter call it moves into —
|
|
229
229
|
* the one the object's `provider` picks, 1.x string or descriptor — instead
|
|
230
230
|
* of Zod's bare "Unrecognized key"; any other unknown key keeps its wording.
|
|
231
231
|
*/
|
|
232
|
-
export declare const
|
|
232
|
+
export declare const assistantMovedFieldsHint: {
|
|
233
233
|
error: (issue: z.core.$ZodRawIssue) => string | undefined;
|
|
234
234
|
};
|
|
235
235
|
/**
|
|
236
|
-
* `ai.
|
|
236
|
+
* `ai.assistant.provider`: the descriptor an adapter factory returned, validated
|
|
237
237
|
* against that adapter's own option schema. A value that isn't a descriptor
|
|
238
238
|
* at all (a 1.x provider name) names the factory that replaced it.
|
|
239
239
|
*/
|
|
240
|
-
export declare const
|
|
240
|
+
export declare const assistantAdapterSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
241
241
|
kind: z.ZodLiteral<"gateway">;
|
|
242
242
|
options: z.ZodObject<{
|
|
243
243
|
model: z.ZodDefault<z.ZodString>;
|
|
@@ -324,11 +324,11 @@ export declare const askAdapterSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
324
324
|
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
325
325
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
326
326
|
}, z.core.$strict>], "kind">;
|
|
327
|
-
/** A resolved (post-defaults) `ai.
|
|
328
|
-
export type
|
|
329
|
-
export type
|
|
330
|
-
/** The provider when `ai.
|
|
331
|
-
export declare const
|
|
327
|
+
/** A resolved (post-defaults) `ai.assistant.provider` descriptor. */
|
|
328
|
+
export type AssistantAdapterConfig = z.output<typeof assistantAdapterSchema>;
|
|
329
|
+
export type AssistantAdapterKind = AssistantAdapterConfig["kind"];
|
|
330
|
+
/** The provider when `ai.assistant.provider` is unset: the gateway with its defaults. */
|
|
331
|
+
export declare const DEFAULT_ASSISTANT_PROVIDER: AssistantAdapter;
|
|
332
332
|
/** The route fragments an adapter contributes to `askEndpointTemplate`. */
|
|
333
333
|
export interface AskBackendTemplate {
|
|
334
334
|
/**
|
|
@@ -357,12 +357,12 @@ export interface AskBackendTemplate {
|
|
|
357
357
|
export interface AskBackend {
|
|
358
358
|
/** Whether Blume grounds answers in the docs (Inkeep retrieves itself). */
|
|
359
359
|
grounded: boolean;
|
|
360
|
-
kind:
|
|
360
|
+
kind: AssistantAdapterKind;
|
|
361
361
|
/** Human-readable adapter name for diagnostics ("AI Gateway"). */
|
|
362
362
|
label: string;
|
|
363
363
|
/** Appended to the missing-secret warning (an alternative credential, say). */
|
|
364
364
|
secretNote?: string;
|
|
365
365
|
template: AskBackendTemplate;
|
|
366
366
|
}
|
|
367
|
-
/** Resolve a parsed `ai.
|
|
368
|
-
export declare const resolveAskBackend: (provider?:
|
|
367
|
+
/** Resolve a parsed `ai.assistant.provider` descriptor into its backend. */
|
|
368
|
+
export declare const resolveAskBackend: (provider?: AssistantAdapterConfig) => AskBackend;
|
|
@@ -149,10 +149,10 @@ export declare const downlevelComponentNode: (node: MdastNode, walk: DownlevelWa
|
|
|
149
149
|
* over the built-ins: a same-name entry replaces the built-in serializer, and
|
|
150
150
|
* one that always returns `null` effectively opts that component out.
|
|
151
151
|
*
|
|
152
|
-
* `frontmatter` is the page's parsed front-matter data.
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
152
|
+
* `frontmatter` is the page's parsed front-matter data. Attribute
|
|
153
|
+
* expressions that reference it — `prop={frontmatter.status}` — resolve the
|
|
154
|
+
* way they do when Astro renders the page, and it is handed to serializers on
|
|
155
|
+
* their context. Expressions are read as literal data, never executed.
|
|
156
156
|
*/
|
|
157
157
|
export declare const downlevelComponents: (source: string, components?: Record<string, ComponentMarkdown>, frontmatter?: Record<string, EvaluatedValue>) => string;
|
|
158
158
|
export {};
|
package/dist/types/ai/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Assistant provider adapters for `blume.config.ts`:
|
|
3
3
|
*
|
|
4
4
|
* ```ts
|
|
5
5
|
* import { defineConfig } from "blume";
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* export default defineConfig({
|
|
9
9
|
* ai: {
|
|
10
|
-
*
|
|
10
|
+
* assistant: {
|
|
11
11
|
* enabled: true,
|
|
12
12
|
* provider: openrouter({ model: "anthropic/claude-sonnet-4-5" }),
|
|
13
13
|
* },
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
* nothing here runs at request time.
|
|
21
21
|
*/
|
|
22
22
|
export { gateway, inkeep, llmgateway, openaiCompatible, openrouter, } from "./ask.ts";
|
|
23
|
-
export type {
|
|
23
|
+
export type { AssistantAdapter, AssistantAdapterOptions, AssistantGatewayAdapter, AssistantGatewayOptions, AssistantInkeepAdapter, AssistantInkeepOptions, AssistantLlmGatewayAdapter, AssistantLlmGatewayOptions, AssistantOpenAICompatibleAdapter, AssistantOpenAICompatibleOptions, AssistantOpenRouterAdapter, AssistantOpenRouterOptions, AssistantProviderOptions, AssistantReasoning, } from "./ask.ts";
|
|
24
24
|
export type { AdapterDescriptor } from "../core/adapter.ts";
|
|
@@ -7,7 +7,7 @@ import type { OpenApiData } from "../openapi/model.ts";
|
|
|
7
7
|
* the body plus one of these components, deliberately: the structured UI is the
|
|
8
8
|
* component's job, and the prose stays Markdown so it indexes. That split is
|
|
9
9
|
* right for the rendered page and lossy everywhere else — `<route>.md`,
|
|
10
|
-
* llms-full.txt, MCP `get_page` and the
|
|
10
|
+
* llms-full.txt, MCP `get_page` and the assistant corpus all downlevel components
|
|
11
11
|
* to Markdown, and these three had no serializer, so an operation page reached
|
|
12
12
|
* an agent as its description followed by a bare tag. On a site whose reference
|
|
13
13
|
* is most of the corpus, that is most of the corpus: measured on one 449-page
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import type { BlumeProject } from "../core/project-graph.ts";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Page links on the agent surfaces — the `.md`/`.mdx` mirrors,
|
|
4
4
|
* llms-full.txt, MCP `get_page` and `resources/read`. An agent resolves
|
|
5
5
|
* `[Install](./install)` against the URL it fetched (`/guides.md`), so the
|
|
6
6
|
* link lands on `/install`; the rendered page rewrites it to the route it
|
|
7
7
|
* means (`markdown/relative-links.ts`), and the Markdown an agent reads gets
|
|
8
8
|
* the same rewrite from the same resolver (`resolveRelativeHref`), so both
|
|
9
|
-
* point at one page.
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* point at one page. Root-relative page links (`[x](/guide)`,
|
|
10
|
+
* `<Card href="/guide">`) get what the rendered page gives them too: the
|
|
11
|
+
* `deployment.base` + `basePath` prefix (`markdown/base-links.ts`,
|
|
12
|
+
* `components/content/base-href.ts`) and, on a page in a prefixed locale,
|
|
13
|
+
* that locale's copy of the route when it is served
|
|
14
|
+
* (`components/layout/LocaleLinks.astro`). Inline links, component `href`s,
|
|
15
|
+
* and reference definitions are rewritten; fenced and inline code, images,
|
|
16
|
+
* asset links, and external URLs are left as written.
|
|
12
17
|
*/
|
|
13
18
|
/** The page a Markdown text was written for. */
|
|
14
19
|
export interface LinkedPage {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BlumeProject } from "../core/project-graph.ts";
|
|
2
2
|
/**
|
|
3
3
|
* Every serializer a project brings to a downlevel pass, layered once for all
|
|
4
|
-
* the agent surfaces (`<route>.md`, llms-full.txt, the search and
|
|
4
|
+
* the agent surfaces (`<route>.md`, llms-full.txt, the search and assistant
|
|
5
5
|
* corpora): the built-in families that read project data — examples, then the
|
|
6
6
|
* API reference — under the user's `agents.markdownComponents`, which is spread
|
|
7
7
|
* last so an entry of the same name still wins. One layering, so a new family
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { EvaluatedValue } from "./component-markdown.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Read an MDX attribute expression (`prop={...}`) as literal data, without
|
|
4
|
+
* running it. The agent Markdown downleveler converts components on every
|
|
5
|
+
* page it is handed — plain `.md` pages Astro never executes, and content a
|
|
6
|
+
* CMS or a release feed supplies — so an expression is parsed, never
|
|
7
|
+
* evaluated: only data a reader could see by looking at it is recovered.
|
|
8
|
+
*
|
|
9
|
+
* Accepted: string, number, boolean, `null`, and `undefined` literals; array
|
|
10
|
+
* and object literals, nested; unary minus on a number; template literals
|
|
11
|
+
* whose substitutions are themselves accepted; and `frontmatter.<path>`
|
|
12
|
+
* member access (dot steps, or bracketed string and number literals),
|
|
13
|
+
* resolved against the page's front matter the way `prop={frontmatter.status}`
|
|
14
|
+
* resolves when Astro renders the page. Comments are skipped. Anything else —
|
|
15
|
+
* a call, an operator, a spread, a shorthand property, any other name — is
|
|
16
|
+
* not static, and the caller keeps the component's JSX as written.
|
|
17
|
+
*/
|
|
18
|
+
/** The outcome of reading an expression: its value, or `ok: false`. */
|
|
19
|
+
export interface StaticExpressionResult {
|
|
20
|
+
ok: boolean;
|
|
21
|
+
value: EvaluatedValue;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Read `raw` — an attribute expression's source — as static data, with
|
|
25
|
+
* `frontmatter` (the page's front matter, when the caller has it) behind
|
|
26
|
+
* `frontmatter.<path>` references. Never executes anything.
|
|
27
|
+
*/
|
|
28
|
+
export declare const readStaticExpression: (raw: string, frontmatter?: Record<string, EvaluatedValue>) => StaticExpressionResult;
|
|
@@ -11,7 +11,7 @@ export type VisibilityAudience = "agents" | "web";
|
|
|
11
11
|
export declare const applyAudienceVisibility: (markdown: string, audience: VisibilityAudience) => string;
|
|
12
12
|
/**
|
|
13
13
|
* Resolve `<Visibility>` blocks for agent-facing Markdown (llms-full.txt, the
|
|
14
|
-
* `.md`/`.mdx` mirrors, MCP tools,
|
|
14
|
+
* `.md`/`.mdx` mirrors, MCP tools, assistant grounding): `for="web"` content is
|
|
15
15
|
* removed and `for="agents"` content is unwrapped.
|
|
16
16
|
*/
|
|
17
17
|
export declare const applyAgentVisibility: (markdown: string) => string;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { AdapterDescriptor } from "../core/adapter.ts";
|
|
3
|
+
import type { HeadScript } from "./head.ts";
|
|
4
|
+
/** The script Databuddy's install snippet loads. */
|
|
5
|
+
export declare const DATABUDDY_SCRIPT_SRC = "https://cdn.databuddy.cc/databuddy.js";
|
|
6
|
+
/** The options {@link databuddy} maps itself. */
|
|
7
|
+
export interface DatabuddyNamedOptions {
|
|
8
|
+
/** Client ID, from the website's settings in the Databuddy dashboard. */
|
|
9
|
+
clientId: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Options for {@link databuddy}: the client ID plus any other tracker setting,
|
|
13
|
+
* forwarded as a `data-` attribute on the tag (`"track-web-vitals"` →
|
|
14
|
+
* `data-track-web-vitals`, `"track-errors"`, `"track-outgoing-links"`,
|
|
15
|
+
* `"api-url"`, …).
|
|
16
|
+
*/
|
|
17
|
+
export type DatabuddyOptions = DatabuddyNamedOptions & {
|
|
18
|
+
[setting: string]: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const databuddyOptionsSchema: z.ZodObject<{
|
|
21
|
+
clientId: z.ZodString;
|
|
22
|
+
}, z.core.$catchall<z.ZodString>>;
|
|
23
|
+
export type DatabuddyAdapter = AdapterDescriptor<"databuddy", DatabuddyOptions>;
|
|
24
|
+
export declare const databuddyAdapterSchema: z.ZodObject<{
|
|
25
|
+
kind: z.ZodLiteral<"databuddy">;
|
|
26
|
+
options: z.ZodObject<{
|
|
27
|
+
clientId: z.ZodString;
|
|
28
|
+
}, z.core.$catchall<z.ZodString>>;
|
|
29
|
+
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
30
|
+
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
/**
|
|
33
|
+
* Databuddy. The client ID is public — it's in the tag on every page.
|
|
34
|
+
*/
|
|
35
|
+
export declare const databuddy: (options: DatabuddyOptions) => DatabuddyAdapter;
|
|
36
|
+
/**
|
|
37
|
+
* The async tag from the install instructions, with `clientId` as
|
|
38
|
+
* `data-client-id` and every other option as its own `data-` attribute. The
|
|
39
|
+
* tracker skips setup when `window.databuddy` already exists, so there is no
|
|
40
|
+
* queue stub. Databuddy's script tracks history changes on its own, so
|
|
41
|
+
* client-router navigations need no extra hook.
|
|
42
|
+
*/
|
|
43
|
+
export declare const databuddyHead: (options: DatabuddyOptions) => HeadScript[];
|
|
@@ -30,6 +30,8 @@ export { clearbit } from "./clearbit.ts";
|
|
|
30
30
|
export type { ClearbitAdapter, ClearbitOptions } from "./clearbit.ts";
|
|
31
31
|
export { cloudflare } from "./cloudflare.ts";
|
|
32
32
|
export type { CloudflareAdapter, CloudflareOptions } from "./cloudflare.ts";
|
|
33
|
+
export { databuddy } from "./databuddy.ts";
|
|
34
|
+
export type { DatabuddyAdapter, DatabuddyOptions } from "./databuddy.ts";
|
|
33
35
|
export { fathom } from "./fathom.ts";
|
|
34
36
|
export type { FathomAdapter, FathomOptions } from "./fathom.ts";
|
|
35
37
|
export { googleAnalytics } from "./google-analytics.ts";
|
|
@@ -35,6 +35,13 @@ export declare const analyticsAdapterSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
35
35
|
}, z.core.$catchall<z.ZodJSONSchema>>;
|
|
36
36
|
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
37
37
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
38
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
39
|
+
kind: z.ZodLiteral<"databuddy">;
|
|
40
|
+
options: z.ZodObject<{
|
|
41
|
+
clientId: z.ZodString;
|
|
42
|
+
}, z.core.$catchall<z.ZodString>>;
|
|
43
|
+
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
44
|
+
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
38
45
|
}, z.core.$strict>, z.ZodObject<{
|
|
39
46
|
kind: z.ZodLiteral<"fathom">;
|
|
40
47
|
options: z.ZodObject<{
|
|
@@ -197,6 +204,13 @@ export declare const analyticsConfigSchema: z.ZodDefault<z.ZodArray<z.ZodDiscrim
|
|
|
197
204
|
}, z.core.$catchall<z.ZodJSONSchema>>;
|
|
198
205
|
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
199
206
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
207
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
208
|
+
kind: z.ZodLiteral<"databuddy">;
|
|
209
|
+
options: z.ZodObject<{
|
|
210
|
+
clientId: z.ZodString;
|
|
211
|
+
}, z.core.$catchall<z.ZodString>>;
|
|
212
|
+
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
213
|
+
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
200
214
|
}, z.core.$strict>, z.ZodObject<{
|
|
201
215
|
kind: z.ZodLiteral<"fathom">;
|
|
202
216
|
options: z.ZodObject<{
|
package/dist/types/cli/env.d.ts
CHANGED
|
@@ -8,5 +8,10 @@
|
|
|
8
8
|
* these files at build time, so a value means the same thing to the pre-boot
|
|
9
9
|
* content scan and the built site — including multi-line double-quoted values
|
|
10
10
|
* (PEM keys), which a line-based parser silently truncates.
|
|
11
|
+
*
|
|
12
|
+
* `NODE_ENV` is never taken from these files: it picks the mode Vite and Astro
|
|
13
|
+
* run in, so a monorepo root `.env` that sets it for another app would turn
|
|
14
|
+
* every `blume build` into a development build (or `blume dev` into a
|
|
15
|
+
* production one).
|
|
11
16
|
*/
|
|
12
17
|
export declare const loadEnvFiles: (startDir: string) => void;
|
|
@@ -33,6 +33,10 @@ export declare const STARTERS: {
|
|
|
33
33
|
content: string;
|
|
34
34
|
path: string;
|
|
35
35
|
}[];
|
|
36
|
+
projectFiles: {
|
|
37
|
+
content: string;
|
|
38
|
+
path: string;
|
|
39
|
+
}[];
|
|
36
40
|
};
|
|
37
41
|
changelog: {
|
|
38
42
|
configExtra: string;
|
|
@@ -71,6 +75,11 @@ export declare const commandsFor: (pm: PackageManager) => {
|
|
|
71
75
|
exec: string;
|
|
72
76
|
install: string;
|
|
73
77
|
};
|
|
78
|
+
/**
|
|
79
|
+
* The `cd` into the new project, quoting a directory a shell would split or
|
|
80
|
+
* expand: `blume init "my docs"` prints `cd "my docs"`, not `cd my docs`.
|
|
81
|
+
*/
|
|
82
|
+
export declare const cdCommand: (directory: string) => string;
|
|
74
83
|
/**
|
|
75
84
|
* Derive the package manager from an npm user-agent string (the first
|
|
76
85
|
* `name/version` token of `npm_config_user_agent`), falling back to npm.
|
|
@@ -97,6 +106,12 @@ export declare const validateContentDir: (root: string, dir: string) => string |
|
|
|
97
106
|
export declare const titleize: (raw: string) => string;
|
|
98
107
|
/** The full `blume.config.ts` text for the chosen answers. */
|
|
99
108
|
export declare const buildConfig: (answers: InitAnswers) => string;
|
|
109
|
+
/**
|
|
110
|
+
* Whether `init` installs with pnpm into a folder that sits inside a pnpm
|
|
111
|
+
* workspace without being one of its packages. pnpm would install that
|
|
112
|
+
* workspace's own packages from there and exit 0, leaving `blume` uninstalled.
|
|
113
|
+
*/
|
|
114
|
+
export declare const outsidePnpmWorkspace: (root: string, answers: InitAnswers) => boolean;
|
|
100
115
|
/**
|
|
101
116
|
* The major version of the Yarn that ran `init`, read off the npm user agent
|
|
102
117
|
* (`yarn/4.5.1 npm/? node/v22…`), or undefined when something else ran it.
|
|
@@ -108,9 +123,10 @@ export interface PlanEnvironment {
|
|
|
108
123
|
userAgent?: string;
|
|
109
124
|
}
|
|
110
125
|
/**
|
|
111
|
-
* What the project still needs from a workspace it
|
|
112
|
-
* that workspace's config alone:
|
|
113
|
-
* (pnpm
|
|
126
|
+
* What the project still needs from a workspace it sits in, when `init` left
|
|
127
|
+
* that workspace's config alone: a place in a pnpm workspace's `packages`
|
|
128
|
+
* (pnpm skips a folder it doesn't list), pnpm's approval for esbuild's build
|
|
129
|
+
* script (pnpm 10 and later fail the install without it), or Yarn Berry's
|
|
114
130
|
* `node_modules` linker. Undefined when the workspace already has it, or the
|
|
115
131
|
* project doesn't sit in one.
|
|
116
132
|
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The OpenAPI document the `api` starter writes beside `blume.config.ts`, so a
|
|
3
|
+
* new project's first build reads a local file instead of depending on a
|
|
4
|
+
* third-party server. Small, but it exercises what a real reference renders:
|
|
5
|
+
* path and query parameters, request bodies, shared schemas, error responses,
|
|
6
|
+
* and bearer auth. Each operation's description is sized so its page's meta
|
|
7
|
+
* description, with the endpoint sentence Blume appends, fits the range
|
|
8
|
+
* `blume audit` checks.
|
|
9
|
+
*/
|
|
10
|
+
/** The starter spec as the `openapi.json` text `init` writes. */
|
|
11
|
+
export declare const STARTER_OPENAPI_JSON: string;
|
|
@@ -51,6 +51,15 @@ export declare const isExternalUrl: (target: string) => boolean;
|
|
|
51
51
|
* the base by hand (`/docs/x`) aren't double-prefixed to `/docs/docs/x`.
|
|
52
52
|
*/
|
|
53
53
|
export declare const withBasePath: (basePath: string, route: string) => string;
|
|
54
|
+
/**
|
|
55
|
+
* Mount a route Blume generates from content under `basePath`,
|
|
56
|
+
* unconditionally. {@link withBasePath} leaves a route that already starts
|
|
57
|
+
* with the base alone, which is right for a link an author based by hand but
|
|
58
|
+
* wrong for a content route: with `basePath: "/docs"`, `docs/guide.md` routes
|
|
59
|
+
* to `/docs/guide` before the base and publishes at `/docs/docs/guide`, not on
|
|
60
|
+
* top of the root `guide.md`.
|
|
61
|
+
*/
|
|
62
|
+
export declare const mountBasePath: (basePath: string, route: string) => string;
|
|
54
63
|
/**
|
|
55
64
|
* {@link withBasePath} for the composed `deployment.base` + `basePath` stack
|
|
56
65
|
* (`/base` + `/docs` serves pages at `/base/docs/x`). The hand-written-base
|