Repository navigation
Conversation
apps/web is Cloudflare's Agent Visibility template: its Hono Worker serving llms.txt, llms-full.txt, index.json, per-page Markdown and JSON-LD, robots.txt and Content-Signal headers from the VISIBILITY_CACHE KV store enriched through the AI binding, and its React dashboard built by Vite into the Worker's Static Assets, with upstream's run_worker_first routes. Added: /api/health, which reads the store and never calls the model, for the deploy smoke. The wrangler config renders per environment from the cloudflare-kv root's wiring document; the committed wrangler.jsonc is the fixture render. Writes stay refused until ADMIN_TOKEN is stored: an optional Orun secret, pushed to the Worker as a Worker secret (tooling/wire/worker-secrets.mjs) with the build running without it. tests/web runs upstream's suite, every assertion kept, over an in-memory KV store and a stand-in model, plus the health route, the enrichment and its fallback, writes with no token, and the config's routes and bindings. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019PcpNVpFBcbeiX3EHdXfmn
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.
What (AV-2)
apps/web: Cloudflare's Agent Visibility template (MIT,apps/web/LICENSE):/llms.txt,/llms-full.txt,/index.json,/:slug.md,/:slug.jsonld,/jsonldand/robots.txt, all withContent-Signalheaders, from theVISIBILITY_CACHEKV store. Pages are enriched through the keylessAIbinding, with upstream's deterministic fallback.dist/clientas Static Assets. Upstream'srun_worker_firstlist is unchanged./api/health. It reads the store from KV and never calls the model; the deploy smoke checks it.wrangler.template.jsoncrenders per environment from thecloudflare-kvwiring document. The committedwrangler.jsoncis the fixture render.ADMIN_TOKENis an optional Orun secret, pushed to the Worker as a Worker secret (tooling/wire/worker-secrets.mjs). The build runs with it unset, and writes answer401while it is missing, as upstream ships.pnpm devrunswrangler dev --local, matching upstream'sremoteBindings: false.pnpm dev:remoteuses the account's Workers AI.tests/webruns upstream's suite with every assertion kept, over an in-memory KV store and a stand-in model. It also covers the health route, the enrichment and its fallback, writes with no token, and the config's routes and bindings.Verified locally
pnpm typecheck,pnpm lint,pnpm test(34 tests) andpnpm buildpass.wrangler deploy --dry-runbindsenv.VISIBILITY_CACHE,env.AIandenv.ASSETS.wrangler dev --local, every surface and the dashboard serve, and SPA fallback works. Writes get401with no token and with a wrong one. WithADMIN_TOKENin.dev.vars, a posted page is enriched, listed inllms.txtand served as Markdown, and/api/refreshclears the cache.Generated by Claude Code