feat(landing): publish agent markdown bundles#274
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
onequery-landing | eb86959 | Commit Preview URL Branch Preview URL |
Jun 04 2026, 07:35 AM |
lentil32
added a commit
that referenced
this pull request
Jun 4, 2026
## One-Line Summary Prevent Astro dev from hitting a Vite SSR optimizer reload crash after the agent Markdown middleware loads YAML. ## User-Facing Changes - Keeps `yaml` out of the server-side Vite dep optimizer for `@onequery/astro-agent-markdown` dev middleware. - Avoids the dev-server failure where Vite reports a missing `.vite/deps_ssr/chunk-*.js` file after optimized dependencies reload. ## Why This Changed PR #274 added build-time agent Markdown bundles and attempted to pre-optimize `yaml` during dev SSR. In the Cloudflare dev runner, that can cause Vite to rewrite the SSR optimized dependency cache during a full reload while workerd is still resolving the previous chunk path. The result is a local dev crash like: `The file does not exist at ".../node_modules/.vite/deps_ssr/chunk-*.js" which is in the optimize deps directory.` ## How It Changed - Switches the integration's dev-only Vite environment plugin from `optimizeDeps.include` to `optimizeDeps.exclude` for `yaml`. - Keeps the exclusion scoped to non-client environments, so client dependency optimization remains unchanged. - Renames the plugin from a pre-optimization-specific name to a more general dev dependency optimizer name. ## Bug Fixes - Under `astro dev` with the Cloudflare adapter, loading the agent Markdown middleware could trigger a full reload after `yaml` optimization and leave the worker resolving a stale `deps_ssr` chunk. This change keeps `yaml` as source in server environments to avoid that optimizer invalidation path. ## Extra Context / Decisions (Optional) The generated agent Markdown bundle behavior from PR #274 is unchanged. This only adjusts dev-server dependency handling. ## Verification - `rtk git merge origin/main` - `rtk mise exec -- bun run format` - `rtk mise exec -- bunx turbo test --json --filter=@onequery/astro-agent-markdown` - `rtk mise exec -- bunx turbo typecheck --json --filter=@onequery/astro-agent-markdown` - Pre-push hook: `turbo lint` with type-aware lint completed with 0 warnings and 0 errors. Dev-server smoke validation was not completed in this pass after the workflow was redirected to merge/push/PR. ## Video / Screenshot (Optional) - N/A
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One-Line Summary
Publish agent-readable OneQuery Markdown bundles so agents can ingest focused or full public site context without crawling page chrome.
User-Facing Changes
/llms.txtas an index for OneQuery agent-readable Markdown exports./llms-small.txtfor focused product, setup, source API, and safety context./llms-full.txtfor broader marketing, connector, comparison, blog, and documentation context.Why This Changed
The existing agent Markdown integration could expose individual content and HTML-derived page sidecars, but it did not produce canonical bundle files for LLM ingestion. That made agent context depend on discovering many separate URLs and could include page chrome instead of the primary page content.
The landing home route also needs a curated Markdown source for bundle generation because the Cloudflare build currently emits a shell-only HTML asset for that route.
How It Changed
exportAgentMarkdownBundlesto collect generated Markdown route files, filter pages by document set, apply promote/demote ordering, validate output URLs, and emit bundle documents plus an optional index.agentMarkdownAstro integration withbundleoptions, dev placeholder routes, build-time bundle export logging, and dev server dependency pre-optimization for YAML.index.mdroute for the landing home page so bundle output has stable product context.<main>content over page chrome and drop unreadable links.@onequery/astro-agent-markdown.Bug Fixes
<main>.<Code />usage did not inherit the global Markdown Shiki config, so home page snippets now pass the imported Tokyo Night theme object directly.Performance Notes (Optional)
Bundle generation runs once at build completion and reuses the Markdown sidecar files already emitted for public routes. The generated bundle routes in dev are lightweight placeholders instead of rebuilding full bundle content per request.
Extra Context / Decisions (Optional)
The small bundle is intentionally focused on setup, connector, source API, and safety pages for shorter agent contexts. The full bundle keeps broader public pages for retrieval and long-context ingestion.
Verification
rtk mise exec -- bun run formatrtk mise exec -- bunx turbo test --json --filter=@onequery/astro-agent-markdown --filter=@onequery/landingrtk mise exec -- bunx turbo typecheck --json --filter=@onequery/astro-agent-markdown --filter=@onequery/landingrtk mise exec -- bunx turbo build --json --filter=@onequery/landingturbo lintwith type-aware lint completed with 0 warnings and 0 errors.Bundle tests added in
packages/astro-agent-markdown/src/bundle.test.tscover route path normalization, generated bundle/index output, page ordering/excludes, and missing-match warnings. HTML conversion coverage now includes preferring main content over page chrome.Video / Screenshot (Optional)