Vite plugin for Cloudflare Workers development. Exports cloudflare() plugin factory from src/index.ts. ESM-only output. bin/cf-vite is an experimental, internal delegate binary spawned by Cloudflare's "cf-dev" parent process — NOT part of the plugin's public API and not meant for direct end-user invocation. It is the sibling of wrangler's cf-wrangler binary, and the two MUST keep a shared spawn contract so the parent can drive either impl interchangeably. - Verb dispatch. cf-vite <verb> [flags]. dev and build are the verbs today;…
Custom Vitest pool for running Worker tests inside the actual workerd runtime. Do NOT repeat root AGENTS.md content (pnpm, changesets, code style, etc.). - Runs in Node.js, part of the pool bundle (no separate package export) - Validates pool options (WorkersPoolOptionsSchema) and resolves the project's Worker configuration into Miniflare options - src/pool/plugin.ts provides the cloudflareTest() Vite plugin, which injects cloudflare:test resolution and sets resolve conditions (workerd, worker, browser) parseCustomPoolOptions() in src/pool/config.ts resolves at most one configuration file into a normalised…
OAuth-2.0-with-PKCE flow against Cloudflare's dash.cloudflare.com (or staging / custom-overridden) endpoints. Used by wrangler and (in future) other Cloudflare CLIs. Internal-only — published as prerelease: true. Pluggable credential persistence layer that
Wrangler-specific context only. See root AGENTS.md for monorepo conventions. Main CLI for Cloudflare Workers. ~2k-line yargs command tree in src/index.ts. Entry point is src/cli.ts (NOT src/index.ts). - No console.* — use logger singleton - No _dirname / _filename — use getBasePath() - No global fetch — use undici's fetch - Route Cloudflare v4 API calls through the existing cfetch helpers such as fetchResult, fetchListResult, and fetchPagedListResult when possible; do not use global or undici fetch directly. Prefer these helpers over…
Astro, with Nimbus (@cloudflare/nimbus-docs) as the docs framework. The package handles content schemas, sidebar/TOC, MDX to markdown, search, OG cards, llms.txt, build hooks, and the nimbus-docs CLI. Everything in src/ is a real file in this repo and yours to edit, including the files the scaffold wrote. README.md next to this file explains why the site looks and works the way it does: the palette, the page shell, the WebGL hero, the example playgrounds, the traps. Read it before changing…
TypeScript scripts + shell scripts for validation, reporting, versioning, and deployment. 6 GitHub Actions workflows in .github/workflows/. Parent: See root AGENTS.md for monorepo context. Jobs communicate via filesystem: each writes JSON to ci/reports/{id}.json, final job reads all. getGitRefs() ad
Generated: 2026-09-03 | Commit: 9b4eb70 | Branch: rozenmd/test-preview Astro documentation site for @cloudflare/kumo. Static output uses React islands, MDX reference pages, Tailwind v4, and Cloudflare Workers static assets. Parent: See root AGENTS.md for monorepo-wide rules. vp run build:docs builds @cloudflare/kumo first. Production Astro builds use the package output, while development aliases Kumo imports to source for HMR. - Use ~/* for package-local imports; it maps to src/*. - Standard component pages use MdxDocLayout, then present the primary demo, installation, usage,…
Executable Kumo examples used by documentation pages, the homepage showcase, visual regression, and component registry generation. - Registry files must use {Component}Demo.tsx names. - Registry exports must end in Demo. Both exported function declarations and exported arrow functions are supported. - Add JSDoc to exported function declarations when registry consumers need a description. The extractor does not collect arrow-function JSDoc. - Keep returned JSX self-contained and suitable for copying. The extractor reads the top-level return expression, not arbitrary runtime behavior.…
Generates production-quality Figma components from component-registry.json. Destructive sync: purges and recreates all components per run. Parent: See root AGENTS.md for monorepo context.
37 component generators creating Figma components from component-registry.json. Registry is source of truth. Parent: See packages/kumo-figma/AGENTS.md for plugin context. Every generator follows this structure: ALL magic numbers and constants MUST live here: Key utilities:
Cloudflare Worker that uses Puppeteer + Browser Rendering to capture screenshots of Kumo docs pages. Used for visual regression testing. Parent: See root AGENTS.md for monorepo context. Never commit secret values. .dev.vars is gitignored at the root level. All requests require X-API-Key: <API_KEY> header. Returns { results: ScreenshotResult[] } where each result has a base64-encoded image or an error string. Limits: max 50 pages per batch, max 64 KB per css action payload. When captureSections: true, the worker looks for…
39 UI components. Base UI primitives + Tailwind v4 styling. Compound component pattern throughout. Parent: See packages/kumo/AGENTS.md for library context. Each component follows: {name}/{name}.tsx + optional {name}.test.tsx, {name}.browser.test.tsx Every component file MUST export (lint-enforced by enforce-variant-standard): 13 components use this pattern: Input, Select, Combobox auto-wrap with Field when label prop provided:
This guide helps AI agents review, maintain, and contribute to Cloudflare Worker templates. It documents patterns, common issues, and testing strategies learned from real PR reviews. When reviewing a template PR, verify these items in order: Symptom: Template linter fails with missing description error. Fix: Add a one-line description to package.json: Symptom: Dashboard won't display template details correctly. Fix: Add markers around the content that should appear in Cloudflare Dashboard: Important: The Deploy to Cloudflare button should be at the…
Notes for AI agents working on this template. One enriched content store (Resource[]) projected onto many agent-discovery surfaces. The data is enriched once by Workers AI and cached in KV; every surface (/llms.txt, /index.json, /<slug>.md, /robots.txt, JSON-LD) is just a different rendering of that same store. - surfaces.ts is pure. Render functions take RenderCtx and return strings/objects. No I/O. This keeps surfaces easy to test and add to. - Enrichment must never hard-fail. enrichResource falls back to fallbackEnrichment on any…
A Worker template that tests whether AI models (GPT-5.4, Claude Sonnet 4, Gemini 3 Flash, Llama 4, Mistral) mention your brand when answering relevant queries. All models run through Cloudflare AI Gateway — no external API keys needed.
Context for AI coding agents to help users set up x402-proxy for payment-gated content. A Cloudflare Worker that adds payment gating to any origin using the x402 protocol. Users pay to access protected routes, then get a JWT cookie valid for 1 hour. With Bot Management Filtering: Requires Bot Management for Enterprise to enable bot filtering. With it enabled, x402-proxy can implement "default closed" - humans pass through free, only bots must pay. This is optional and enhances the base…
@cloudflare/workers-oauth-provider is a production-grade OAuth 2.1 provider library for Cloudflare Workers. It implements authorization code flow with PKCE, OAuth discovery, client registration, token exchange, audience validation, and encryption of sensitive data stored in KV. Primary use case: This library powers authorization for MCP (Model Context Protocol) servers. MCP servers are OAuth Resource Servers, and this library provides both protected-resource middleware and the authorization server functionality needed to secure them. This library was largely written with Claude AI assistance, with all…