diff --git a/apps/web/.dev.vars.example b/apps/web/.dev.vars.example new file mode 100644 index 0000000..dffe3d9 --- /dev/null +++ b/apps/web/.dev.vars.example @@ -0,0 +1,7 @@ +# Copy to .dev.vars for `pnpm dev` / `pnpm preview` (never committed). +# OPTIONAL. Without it POST /api/resources and POST /api/refresh answer 401, +# as upstream ships; with it, a request carrying +# `Authorization: Bearer ` may add or replace a page and clear +# the enriched cache. On a deployed environment it is the Orun secret of the +# same name, pushed to the Worker as a Worker secret on deploy. +ADMIN_TOKEN= diff --git a/apps/web/LICENSE b/apps/web/LICENSE new file mode 100644 index 0000000..93df500 --- /dev/null +++ b/apps/web/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018, Cloudflare, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/apps/web/README.md b/apps/web/README.md new file mode 100644 index 0000000..8416885 --- /dev/null +++ b/apps/web/README.md @@ -0,0 +1,30 @@ +# apps/web — the site + +Cloudflare's [Agent Visibility template](https://github.com/cloudflare/templates/tree/main/agent-visibility-template) +(MIT, `LICENSE`): one Hono Worker serving a content store to AI agents on +every surface they read, and a React dashboard previewing them, deployed as +one Worker with Static Assets. + +| Path | What it is | +|---|---| +| `src/worker/index.ts` | upstream's Worker: `/llms.txt`, `/llms-full.txt`, `/index.json`, `/:slug.md`, `/:slug.jsonld`, `/jsonld`, `/robots.txt`, the dashboard's `/api/*`, the optional Web Bot Auth surface | +| `src/worker/health.ts` | not upstream's: `/api/health`, the store check the deploy smoke reads (never the model) | +| `src/enrichment/` | upstream's Workers AI enrichment and its deterministic fallback; the surfaces' renderers | +| `src/lib/` | upstream's KV store, sample content (`content.ts`), types and Web Bot Auth module | +| `src/react-app/`, `index.html` | upstream's dashboard, built by Vite into `dist/client` | +| `wrangler.template.jsonc` | the config's source; `wrangler.jsonc` is its render (`pnpm run wire:fixture`) | +| `component.yaml` | the Orun component: render, build, push the admin token, deploy, smoke | + +## Scripts + +| Command | What it does | +|---|---| +| `pnpm dev` | builds the dashboard, then `wrangler dev --local`: a local KV store, remote bindings off, so the model is not called and each page is enriched by upstream's fallback | +| `pnpm dev:remote` | the same with the signed-in account's Workers AI (`wrangler login` first; it may incur usage) | +| `pnpm build` | the dashboard into `dist/client` | +| `pnpm typecheck`, `pnpm lint` | the Worker and the dashboard | +| `pnpm run wire:fixture` | re-renders `wrangler.jsonc` from the template and `wiring.fixture.json` | + +Writes (`POST /api/resources`, `POST /api/refresh`) need `ADMIN_TOKEN`: +copy `.dev.vars.example` to `.dev.vars` locally; deployed, it is the Orun +secret of the same name, pushed to the Worker as a Worker secret. diff --git a/apps/web/component.yaml b/apps/web/component.yaml new file mode 100644 index 0000000..1b100c8 --- /dev/null +++ b/apps/web/component.yaml @@ -0,0 +1,113 @@ +apiVersion: sourceplane.io/v1 +kind: Component +metadata: + name: web + description: The site — every agent surface and the dashboard, upstream's Worker on Cloudflare Workers + Static Assets, over the KV store and Workers AI, per environment +spec: + type: cloudflare-workers-assets-turbo + lifecycle: production + owner: platform + # `app`, not `web`: a domain and a component share one name space in the + # catalog, and a domain called `web` hid this component from it. + domain: app + path: apps/web + # Its own lane per environment, so each environment's deploy waits on its + # own namespace and nothing else. + lane: isolated + # INFRA BEFORE APP. The Worker binds the KV namespace by id, and the id is + # rendered into its config during the build from the wiring document the + # cloudflare-kv root lease-publishes after its apply. A job resolves its + # secrets when it STARTS, so on a merge to main this deploy waits for that + # environment's apply (enforced) and the document is there; a pull request + # deploys nothing, so nothing on one waits (advisory). + dependsOn: + - component: cloudflare-kv + mode: enforced + modeRules: + - mode: advisory + when: + triggerRef: github-pull-request + secretEnv: + WIRING_CLOUDFLARE_KV_STAGE: "secret://agent-visibility/agent-visibility/stage/WIRING_CLOUDFLARE_KV" + WIRING_CLOUDFLARE_KV_PROD: "secret://agent-visibility/agent-visibility/prod/WIRING_CLOUDFLARE_KV" + # The admin token, stored per environment as the product's secret + # ADMIN_TOKEN (README → "Adding your pages"). The Worker reads it at request + # time, so the build hands it to the Worker as a Worker SECRET and no bundle + # contains it (buildCommand below). BEST-EFFORT, wire-now-seed-later: a key + # nobody has stored yet is skipped when the job resolves its secrets (no env + # var, no failure), and the Worker without it refuses every write (401), as + # upstream ships — so a fresh product deploys and serves its surfaces before + # its owner has chosen a token at all. + optionalSecretEnv: + ADMIN_TOKEN: "secret://agent-visibility/agent-visibility/{{ .environment }}/ADMIN_TOKEN" + subscribe: + environments: + - name: dev + profile: verify + - name: stage + profile: verify + profileRules: + - profile: deploy + when: + triggerRef: github-push-main + - name: prod + profile: verify + profileRules: + - profile: deploy + when: + triggerRef: github-push-main + parameters: + nodeVersion: "22" + pnpmVersion: "10.12.1" + + workspaceDir: ../.. + appDir: . + + turboFilter: "@app/web" + wranglerConfig: wrangler.jsonc + + # The Worker's entry is its source: `wrangler deploy` bundles it (Hono and + # upstream's surfaces) in the same command that uploads the dashboard, + # bound as ASSETS. The build only builds the dashboard. + workerEntrypoint: src/worker/index.ts + assetsDir: dist/client + + # Per-env worker name: agent-visibility-web-{dev,stage,prod}. + workerName: agent-visibility-web + environmentAwareWorkerName: true + + # The account's workers.dev subdomain; exported to the smoke step as + # ${WORKERS_DEV_SUBDOMAIN} and used to build ${DEPLOYED_URL}. + workersDevSubdomain: your-workers-subdomain + + installCommand: pnpm install --frozen-lockfile + # Render this environment's wrangler config, then build. stage and prod + # render from the wiring document their cloudflare-kv apply published + # (secretEnv above, resolved before the job's first step); dev, which no + # root applies to and which only verifies, renders from the committed + # fixture. The committed wrangler.jsonc (the fixture render) is what the + # composition's verify-app-structure step finds before this runs. The + # admin token never reaches the build (`env -u`); then, when the + # environment has it, it goes to the Worker as a SECRET + # (tooling/wire/worker-secrets.mjs: `wrangler secret bulk`, the value over + # stdin) before the composition deploys it. Only the deploy lane holds a + # Cloudflare credential, so a verify lane builds the same and pushes + # nothing. + buildCommand: node ../../tooling/wire/live.mjs --template wrangler.template.jsonc --out wrangler.jsonc --components cloudflare-kv --env "${ORUN_ENVIRONMENT}" --fixture wiring.fixture.json --fixture-envs dev && env -u ADMIN_TOKEN pnpm exec turbo run build --filter=@app/web && node ../../tooling/wire/worker-secrets.mjs --secret ADMIN_TOKEN --worker "agent-visibility-web-${ORUN_ENVIRONMENT}" --config wrangler.jsonc + + # Smoke, read-only: /api/health — answered by the Worker ahead of the + # assets (run_worker_first) — reads the store through the KV binding and + # answers `"ok":true` (an unbound or unreachable namespace is a 503). It + # never calls the model, so a deploy neither warms the cache nor spends + # Workers AI: the surfaces (/llms.txt and the rest) all read the store, and + # on a cold one the first of them enriches every page. Then the + # dashboard's page is served from Static Assets (`id="root"`, its mount + # point). Not the site's name: that is the owner's to change. Nothing is + # written. Responses are buffered before grep so an early match cannot + # SIGPIPE curl. + smokeCommand: "health=$(curl -sf \"${DEPLOYED_URL}/api/health\") && echo \"${health}\" | grep -q '\"ok\":true' && html=$(curl -sfL \"${DEPLOYED_URL}/\") && echo \"${html}\" | grep -q 'id=\"root\"'" + labels: + team: platform + layer: delivery + surface: web + runtime: cloudflare diff --git a/apps/web/eslint.config.mjs b/apps/web/eslint.config.mjs new file mode 100644 index 0000000..afafee0 --- /dev/null +++ b/apps/web/eslint.config.mjs @@ -0,0 +1,3 @@ +import base from "../../tooling/eslint/index.js"; + +export default [...base, { ignores: ["dist/**", ".wrangler/**"] }]; diff --git a/apps/web/index.html b/apps/web/index.html new file mode 100644 index 0000000..7969c01 --- /dev/null +++ b/apps/web/index.html @@ -0,0 +1,16 @@ + + + + + + AI Agent Visibility — be readable on every agent surface + + + +
+ + + diff --git a/apps/web/package.json b/apps/web/package.json new file mode 100644 index 0000000..4ed4317 --- /dev/null +++ b/apps/web/package.json @@ -0,0 +1,32 @@ +{ + "name": "@app/web", + "version": "0.0.0", + "private": true, + "type": "module", + "scripts": { + "build": "vite build", + "dev": "vite build && wrangler dev --local", + "dev:remote": "vite build && wrangler dev", + "preview": "vite build && wrangler dev --local", + "typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.app.json", + "lint": "eslint .", + "wire:fixture": "node ../../tooling/wire/render.mjs --template wrangler.template.jsonc --out wrangler.jsonc --map wiring.fixture.json --env stage" + }, + "dependencies": { + "hono": "4.11.1", + "react": "19.2.1", + "react-dom": "19.2.1" + }, + "devDependencies": { + "@app/eslint-config": "workspace:*", + "@app/tsconfig": "workspace:*", + "@cloudflare/workers-types": "^4.20260702.1", + "@types/react": "19.2.7", + "@types/react-dom": "19.2.3", + "@vitejs/plugin-react": "5.1.1", + "eslint": "^9.27.0", + "typescript": "5.9.3", + "vite": "^7.0.0", + "wrangler": "^4.151.0" + } +} diff --git a/apps/web/src/enrichment/index.ts b/apps/web/src/enrichment/index.ts new file mode 100644 index 0000000..c6d40b1 --- /dev/null +++ b/apps/web/src/enrichment/index.ts @@ -0,0 +1,175 @@ +/** + * Workers AI enrichment. + * + * Turns a raw page (HTML or Markdown/plain text) into a structured `Resource`: + * a clean title, an agent-friendly summary, key points, topic tags, and a + * tidy Markdown body. This structured record is what every agent surface is + * rendered from. + */ +import type { RawResource, Resource } from "../lib/types"; + +const MAX_INPUT_BYTES = 60_000; + +/** + * Trim source content to a model-feedable window. Strips script/style/svg and + * HTML comments, collapses whitespace, and truncates as a last resort. + */ +export function trimContent(input: string): string { + let s = input; + s = s.replace(//gi, ""); + s = s.replace(//gi, ""); + s = s.replace(//gi, ""); + s = s.replace(//g, ""); + s = s.replace(/<[^>]+>/g, " "); // drop remaining tags but keep text + s = s.replace(/\s+/g, " ").trim(); + if (s.length > MAX_INPUT_BYTES) s = s.slice(0, MAX_INPUT_BYTES); + return s; +} + +const SYSTEM_PROMPT = `You prepare web content to be read by AI agents and assistants. The user pastes the raw text of one page. Return STRICT JSON only — no prose, no Markdown fences. + +Schema: +{ + "title": string, // concise page title + "summary": string, // 2-4 sentences, plain language, what the page is about and who it's for + "keyPoints": string[], // 3-6 short bullet phrases capturing the most important facts + "topics": string[], // up to 8 lowercase topic/keyword tags + "category": string | null, // one best-fit category label (e.g. "documentation", "pricing", "policy") + "content": string // a clean Markdown rewrite of the page body, faithful to the source, no invented facts +} + +Rules: +- Use only information present in the input. Never invent facts, prices, or features. +- Keep "content" faithful and well-structured (headings, bullets) but trimmed of navigation/boilerplate. +- Output ONLY the JSON object.`; + +interface AiResult { + response?: unknown; +} + +function asString(v: unknown): string { + if (typeof v === "string") return v; + if (v == null) return ""; + try { + return JSON.stringify(v); + } catch { + return String(v); + } +} + +function parseJsonLoose(s: string): Record { + try { + return JSON.parse(s) as Record; + } catch { + const start = s.indexOf("{"); + const end = s.lastIndexOf("}"); + if (start === -1 || end === -1 || end <= start) return {}; + try { + return JSON.parse(s.slice(start, end + 1)) as Record; + } catch { + return {}; + } + } +} + +function stringArray(v: unknown, max: number): string[] { + if (!Array.isArray(v)) return []; + return v.filter((x): x is string => typeof x === "string").slice(0, max); +} + +/** + * Enrich a single raw resource into a structured `Resource`. + * + * On any model/parse failure, falls back to a deterministic enrichment built + * from the raw text so the template never serves an empty surface. + */ +export async function enrichResource( + ai: Ai, + model: string, + raw: RawResource, +): Promise { + const trimmed = trimContent(raw.body); + + try { + const res = (await ai.run(model as keyof AiModels, { + messages: [ + { role: "system", content: SYSTEM_PROMPT }, + { role: "user", content: trimmed }, + ], + max_tokens: 1200, + })) as AiResult; + + const parsed = + res?.response && typeof res.response === "object" + ? (res.response as Record) + : parseJsonLoose(asString(res?.response).trim()); + + const title = + (typeof parsed.title === "string" && parsed.title.trim()) || + raw.title || + deriveTitle(trimmed, raw.slug); + + return { + slug: raw.slug, + url: raw.url, + title, + summary: + (typeof parsed.summary === "string" && parsed.summary.trim()) || + firstSentences(trimmed, 2), + keyPoints: stringArray(parsed.keyPoints, 6), + topics: stringArray(parsed.topics, 8).map((t) => t.toLowerCase()), + category: typeof parsed.category === "string" ? parsed.category : null, + content: + (typeof parsed.content === "string" && parsed.content.trim()) || + trimmed, + updatedAt: new Date().toISOString(), + model, + }; + } catch { + return fallbackEnrichment(raw, model); + } +} + +/** Enrich many resources, tolerating individual failures. */ +export async function enrichAll( + ai: Ai, + model: string, + raws: RawResource[], +): Promise { + const out: Resource[] = []; + for (const raw of raws) { + out.push(await enrichResource(ai, model, raw)); + } + return out; +} + +/** Deterministic enrichment used when the model is unavailable. */ +export function fallbackEnrichment(raw: RawResource, model: string): Resource { + const trimmed = trimContent(raw.body); + return { + slug: raw.slug, + url: raw.url, + title: raw.title || deriveTitle(trimmed, raw.slug), + summary: firstSentences(trimmed, 2), + keyPoints: [], + topics: [], + category: null, + content: trimmed, + updatedAt: new Date().toISOString(), + model: `${model} (fallback)`, + }; +} + +function deriveTitle(text: string, slug: string): string { + const firstLine = text.split(/[.\n]/)[0]?.trim(); + if (firstLine && firstLine.length <= 80) return firstLine; + return slug + .split(/[-_]/) + .map((w) => w.charAt(0).toUpperCase() + w.slice(1)) + .join(" "); +} + +function firstSentences(text: string, n: number): string { + const sentences = text.split(/(?<=[.!?])\s+/).slice(0, n); + return sentences.join(" ").trim(); +} diff --git a/apps/web/src/enrichment/surfaces.ts b/apps/web/src/enrichment/surfaces.ts new file mode 100644 index 0000000..f0543f4 --- /dev/null +++ b/apps/web/src/enrichment/surfaces.ts @@ -0,0 +1,247 @@ +/** + * Project the one enriched `Resource[]` store onto every agent-discovery + * surface. The whole point of the template lives here: the underlying data is + * identical; each function just renders it in the convention a given agent or + * crawler prefers. + * + * renderLlmsTxt -> /llms.txt (llms.txt index convention) + * renderLlmsFullTxt -> /llms-full.txt (full inlined content) + * renderIndexJson -> /index.json (typed JSON index) + * renderResourceMd -> /.md (per-page groundable Markdown) + * renderRobotsTxt -> /robots.txt (explicit AI-bot directives) + * renderWebsiteJsonLd -> JSON-LD (schema.org, embedded in HTML) + * renderResourceJsonLd -> JSON-LD (schema.org per page) + */ +import type { Resource, SiteConfig } from "../lib/types"; + +export interface RenderCtx { + site: SiteConfig; + resources: Resource[]; + /** Content-Signal policy value, e.g. "ai-input=yes, search=yes, ai-train=no". */ + contentSignal?: string; +} + +export const INDEX_PROTOCOL = "agent-visibility/0.1"; + +/** AI crawlers we explicitly welcome in robots.txt. */ +export const KNOWN_AI_AGENTS = [ + "GPTBot", + "OAI-SearchBot", + "ChatGPT-User", + "ClaudeBot", + "Claude-User", + "PerplexityBot", + "Google-Extended", + "Applebot-Extended", + "Bytespider", + "CCBot", +]; + +function mdLink(text: string, href: string): string { + return `[${text}](${href})`; +} + +// --------------------------------------------------------------------------- +// /llms.txt — short Markdown index per the llms.txt convention. +// --------------------------------------------------------------------------- +export function renderLlmsTxt(ctx: RenderCtx): string { + const { site, resources } = ctx; + const lines: string[] = []; + lines.push(`# ${site.name}`); + lines.push(""); + lines.push(`> ${site.description}`); + lines.push(""); + lines.push("Other machine-readable surfaces for this site:"); + lines.push(`- ${mdLink("Full content", `${site.origin}/llms-full.txt`)}`); + lines.push(`- ${mdLink("Typed JSON index", `${site.origin}/index.json`)}`); + lines.push(""); + lines.push("## Pages"); + lines.push(""); + for (const r of resources) { + const summary = r.summary ? ` — ${firstSentence(r.summary)}` : ""; + lines.push(`- ${mdLink(r.title, `${site.origin}/${r.slug}.md`)}${summary}`); + } + lines.push(""); + return lines.join("\n"); +} + +// --------------------------------------------------------------------------- +// /llms-full.txt — every page's full Markdown inlined. +// --------------------------------------------------------------------------- +export function renderLlmsFullTxt(ctx: RenderCtx): string { + const { site, resources } = ctx; + const lines: string[] = []; + lines.push(`# ${site.name}`); + lines.push(""); + lines.push(`> ${site.description}`); + lines.push(""); + for (const r of resources) { + lines.push(renderResourceMd({ resource: r, site })); + lines.push(""); + lines.push("---"); + lines.push(""); + } + return lines.join("\n"); +} + +// --------------------------------------------------------------------------- +// /index.json — typed JSON index, the structured-agent surface. +// --------------------------------------------------------------------------- +export function renderIndexJson(ctx: RenderCtx) { + const { site, resources } = ctx; + return { + protocol: INDEX_PROTOCOL, + site: { name: site.name, description: site.description }, + // Derived from the latest content update (not wall-clock) so identical + // content yields identical output — ETag/cache friendly. + generatedAt: latestUpdatedAt(resources), + surfaces: { + llmsTxt: `${site.origin}/llms.txt`, + llmsFullTxt: `${site.origin}/llms-full.txt`, + json: `${site.origin}/index.json`, + pageMarkdown: `${site.origin}/{slug}.md`, + robots: `${site.origin}/robots.txt`, + }, + pages: resources.map((r) => ({ + slug: r.slug, + url: r.url, + title: r.title, + summary: r.summary, + keyPoints: r.keyPoints, + topics: r.topics, + category: r.category, + updatedAt: r.updatedAt, + sources: { + markdown: `${site.origin}/${r.slug}.md`, + canonical: r.url, + }, + })), + }; +} + +// --------------------------------------------------------------------------- +// /.md — per-page Markdown, ideal for grounding/citation. +// --------------------------------------------------------------------------- +export function renderResourceMd(args: { + resource: Resource; + site: SiteConfig; +}): string { + const r = args.resource; + const lines: string[] = []; + lines.push(`# ${r.title}`); + lines.push(""); + if (r.category) lines.push(`*Category: ${r.category}*`); + if (r.topics.length) lines.push(`*Topics: ${r.topics.join(", ")}*`); + if (r.category || r.topics.length) lines.push(""); + if (r.summary) { + lines.push(r.summary); + lines.push(""); + } + if (r.keyPoints.length) { + lines.push("## Key points"); + lines.push(""); + for (const k of r.keyPoints) lines.push(`- ${k}`); + lines.push(""); + } + if (r.content) { + lines.push("## Content"); + lines.push(""); + lines.push(r.content); + lines.push(""); + } + lines.push("## Source"); + lines.push(""); + lines.push(`- Canonical URL: ${r.url}`); + lines.push(`- Typed record: ${args.site.origin}/index.json`); + lines.push(""); + return lines.join("\n"); +} + +// --------------------------------------------------------------------------- +// /robots.txt — explicitly welcome AI agents and point them at llms.txt. +// --------------------------------------------------------------------------- +export function renderRobotsTxt(ctx: RenderCtx): string { + const { site } = ctx; + // Content Signals are expressed as a `Content-Signal:` directive inside a + // robots.txt User-agent group (see https://contentsignals.org). We emit it + // per group so the canonical place a crawler looks carries the policy. + const signal = ctx.contentSignal; + const lines: string[] = []; + lines.push("# Robots directives for AI agents and crawlers."); + lines.push("# This site intentionally welcomes AI agents — see /llms.txt."); + lines.push(""); + for (const agent of KNOWN_AI_AGENTS) { + lines.push(`User-agent: ${agent}`); + lines.push("Allow: /"); + if (signal) lines.push(`Content-Signal: ${signal}`); + lines.push(""); + } + lines.push("User-agent: *"); + lines.push("Allow: /"); + if (signal) lines.push(`Content-Signal: ${signal}`); + lines.push(""); + lines.push("# Machine-readable indexes for agents:"); + lines.push(`# - ${site.origin}/llms.txt`); + lines.push(`# - ${site.origin}/index.json`); + lines.push(""); + return lines.join("\n"); +} + +// --------------------------------------------------------------------------- +// JSON-LD (schema.org) — what classic + AI crawlers parse from HTML pages. +// --------------------------------------------------------------------------- +export function renderWebsiteJsonLd(ctx: RenderCtx): object { + const { site, resources } = ctx; + return { + "@context": "https://schema.org", + "@type": "WebSite", + name: site.name, + description: site.description, + url: site.origin, + mainEntity: { + "@type": "ItemList", + itemListElement: resources.map((r, i) => ({ + "@type": "ListItem", + position: i + 1, + url: `${site.origin}/${r.slug}.md`, + name: r.title, + })), + }, + }; +} + +export function renderResourceJsonLd(args: { + resource: Resource; + site: SiteConfig; +}): object { + const r = args.resource; + return { + "@context": "https://schema.org", + "@type": "Article", + headline: r.title, + abstract: r.summary, + keywords: r.topics.join(", "), + articleSection: r.category ?? undefined, + url: r.url, + dateModified: r.updatedAt, + isPartOf: { + "@type": "WebSite", + name: args.site.name, + url: args.site.origin, + }, + }; +} + +function firstSentence(text: string): string { + return text.split(/(?<=[.!?])\s+/)[0]?.trim() ?? text; +} + +/** Most recent `updatedAt` across resources (epoch start if empty). */ +function latestUpdatedAt(resources: Resource[]): string { + let latest = 0; + for (const r of resources) { + const t = Date.parse(r.updatedAt); + if (Number.isFinite(t) && t > latest) latest = t; + } + return new Date(latest).toISOString(); +} diff --git a/apps/web/src/lib/content.ts b/apps/web/src/lib/content.ts new file mode 100644 index 0000000..4de536e --- /dev/null +++ b/apps/web/src/lib/content.ts @@ -0,0 +1,96 @@ +/** + * Sample content so the template works the moment it's deployed — no data + * source to configure. Replace `SAMPLE_RESOURCES` with your own pages, or + * POST raw HTML/Markdown to `/api/resources` to enrich your real content. + * + * Each entry is intentionally a little messy (headings, lists, prose) so the + * Workers AI enrichment pass has something realistic to summarize. + */ +import type { RawResource } from "./types"; + +export const SAMPLE_RESOURCES: RawResource[] = [ + { + slug: "getting-started", + url: "https://example.com/docs/getting-started", + title: "Getting Started with Acme", + body: `# Getting Started with Acme + +Acme is a workflow automation platform. This guide walks you through creating +your first workflow in under five minutes. + +## Install the CLI +Run \`npm install -g @acme/cli\` and authenticate with \`acme login\`. The CLI +stores a token in ~/.acme/config. + +## Create a workflow +Workflows are YAML files. A minimal workflow has a trigger and one step: + +- triggers: schedule, webhook, or manual +- steps: run a script, call an HTTP endpoint, or branch on a condition + +Deploy with \`acme deploy workflow.yaml\`. Free accounts can run up to 1,000 +workflow executions per month.`, + }, + { + slug: "pricing", + url: "https://example.com/pricing", + title: "Pricing", + body: `# Pricing + +Acme has three plans. + +Free — $0/month. 1,000 executions, community support, 1 project. +Pro — $20/month. 50,000 executions, email support, unlimited projects, and +audit logs. +Enterprise — custom pricing. SSO, SLA, dedicated support, and on-prem options. + +All plans include the visual workflow editor and the CLI. Annual billing saves +20%. There is no charge for failed executions.`, + }, + { + slug: "integrations", + url: "https://example.com/docs/integrations", + title: "Integrations", + body: `# Integrations + +Acme connects to the tools you already use. Built-in integrations include +Slack, GitHub, Stripe, Salesforce, and Google Sheets. Each integration is +configured once under Settings → Integrations and can then be referenced from +any workflow step. + +For anything without a built-in connector, use the generic HTTP step to call +any REST API, or the Webhook trigger to start a workflow from an external +event. OAuth credentials are encrypted at rest.`, + }, + { + slug: "security", + url: "https://example.com/security", + title: "Security & Compliance", + body: `# Security & Compliance + +Acme is SOC 2 Type II certified and GDPR compliant. All data is encrypted in +transit (TLS 1.3) and at rest (AES-256). Secrets used in workflows are stored +in an isolated vault and never logged. + +Enterprise customers can enable SAML single sign-on, scoped API tokens, and IP +allowlisting. We undergo annual third-party penetration testing and publish a +status page at status.example.com.`, + }, + { + slug: "faq", + url: "https://example.com/faq", + title: "Frequently Asked Questions", + body: `# FAQ + +Can I self-host Acme? Yes — Enterprise plans include an on-prem deployment +option packaged as a container. + +Do you have an API? Yes, everything in the dashboard is available through the +REST API and the CLI. + +What languages do workflow scripts support? JavaScript and Python today. + +How do I cancel? From Settings → Billing. Cancellation takes effect at the end +of the current billing period; we don't offer prorated refunds.`, + }, +]; diff --git a/apps/web/src/lib/store.ts b/apps/web/src/lib/store.ts new file mode 100644 index 0000000..6ee952e --- /dev/null +++ b/apps/web/src/lib/store.ts @@ -0,0 +1,113 @@ +/** + * The enriched-resource store, backed by Workers KV. + * + * On first request we enrich the sample content (or whatever has been POSTed + * to /api/resources) with Workers AI and cache the result. Subsequent reads + * are served straight from KV until the TTL expires or the cache is cleared. + */ +import { enrichAll, enrichResource } from "../enrichment"; +import { SAMPLE_RESOURCES } from "./content"; +import type { Env, RawResource, Resource, SiteConfig } from "./types"; + +/** KV key holding the enriched `Resource[]`. Exported so tests can seed it. */ +export const ENRICHED_KEY = "resources:enriched"; +/** KV key holding the configured raw resources. */ +export const RAW_KEY = "resources:raw"; + +export function siteConfig(env: Env, origin: string): SiteConfig { + return { + name: env.SITE_NAME || "My Site", + description: env.SITE_DESCRIPTION || "Content made visible to AI agents.", + origin, + }; +} + +function ttlSeconds(env: Env): number { + const n = Number(env.ENRICHMENT_CACHE_TTL); + return Number.isFinite(n) && n > 0 ? n : 3600; +} + +/** Short TTL used when results are degraded so a transient outage can't poison surfaces for the full TTL. */ +const DEGRADED_TTL = 60; + +/** True when any resource fell back to deterministic enrichment. */ +function isDegraded(resources: Resource[]): boolean { + return resources.some((r) => r.model.endsWith("(fallback)")); +} + +function cacheTtl(env: Env, resources: Resource[]): number { + return isDegraded(resources) ? DEGRADED_TTL : ttlSeconds(env); +} + +/** Raw resources the site owner has configured (defaults to the samples). */ +async function getRawResources(env: Env): Promise { + const stored = await env.VISIBILITY_CACHE.get(RAW_KEY, "json"); + if (Array.isArray(stored) && stored.length) { + return stored as RawResource[]; + } + return SAMPLE_RESOURCES; +} + +/** + * Get the enriched resource store, enriching + caching on a cold cache. + */ +export async function getResources(env: Env): Promise { + const cached = await env.VISIBILITY_CACHE.get(ENRICHED_KEY, "json"); + if (Array.isArray(cached) && cached.length) { + return cached as Resource[]; + } + + const raws = await getRawResources(env); + const enriched = await enrichAll(env.AI, env.AI_MODEL, raws); + await env.VISIBILITY_CACHE.put(ENRICHED_KEY, JSON.stringify(enriched), { + expirationTtl: cacheTtl(env, enriched), + }); + return enriched; +} + +/** + * Add (or replace) a single raw resource, enrich just that resource, and + * update the store. Enforces `maxResources` to bound KV growth. + * + * Throws `Error("RESOURCE_LIMIT")` if adding a *new* slug would exceed the cap. + */ +export async function upsertResource( + env: Env, + raw: RawResource, + maxResources = 100, +): Promise { + const raws = await getRawResources(env); + const isNew = !raws.some((r) => r.slug === raw.slug); + if (isNew && raws.length >= maxResources) { + throw new Error("RESOURCE_LIMIT"); + } + + const nextRaws = [...raws.filter((r) => r.slug !== raw.slug), raw]; + await env.VISIBILITY_CACHE.put(RAW_KEY, JSON.stringify(nextRaws)); + + // Enrich only the new/changed resource. + const enriched = await enrichResource(env.AI, env.AI_MODEL, raw); + + // Reuse the warm enriched cache if present; only fall back to enriching the + // other resources when the cache is cold (avoids re-enriching everything, + // and avoids enriching `raw` twice). + const cached = await env.VISIBILITY_CACHE.get(ENRICHED_KEY, "json"); + let others: Resource[]; + if (Array.isArray(cached) && cached.length) { + others = (cached as Resource[]).filter((r) => r.slug !== raw.slug); + } else { + const otherRaws = nextRaws.filter((r) => r.slug !== raw.slug); + others = await enrichAll(env.AI, env.AI_MODEL, otherRaws); + } + + const next = [...others, enriched]; + await env.VISIBILITY_CACHE.put(ENRICHED_KEY, JSON.stringify(next), { + expirationTtl: cacheTtl(env, next), + }); + return enriched; +} + +/** Clear the enriched cache so the next read re-enriches from raw. */ +export async function clearCache(env: Env): Promise { + await env.VISIBILITY_CACHE.delete(ENRICHED_KEY); +} diff --git a/apps/web/src/lib/types.ts b/apps/web/src/lib/types.ts new file mode 100644 index 0000000..56dbabd --- /dev/null +++ b/apps/web/src/lib/types.ts @@ -0,0 +1,73 @@ +/** + * Shared types for the Agent Visibility template. + * + * The whole template is built around one idea: a single store of enriched + * "resources" (pages, articles, docs — anything an AI agent might want to + * read) that gets projected onto many agent-discovery surfaces. Everything + * downstream (llms.txt, /index.json, per-page Markdown, JSON-LD, ...) is just + * a different rendering of the `Resource[]` below. + */ + +/** A piece of source content before enrichment. */ +export interface RawResource { + /** URL-safe identifier, unique within the site (e.g. "getting-started"). */ + slug: string; + /** Canonical URL where a human would read this content. */ + url: string; + /** Optional human title; if omitted, enrichment will derive one. */ + title?: string; + /** + * Raw content. Either HTML (e.g. fetched from a live page) or plain text / + * Markdown. Enrichment trims and summarizes it. + */ + body: string; +} + +/** A resource after Workers AI enrichment — the canonical record we store. */ +export interface Resource { + slug: string; + url: string; + /** Short, human-readable title. */ + title: string; + /** 2–4 sentence, agent-friendly summary of the content. */ + summary: string; + /** 3–6 short bullet points capturing the key facts. */ + keyPoints: string[]; + /** Up to 8 topic / keyword tags for discovery. */ + topics: string[]; + /** A single best-fit category label, or null. */ + category: string | null; + /** Clean Markdown body suitable for grounding / citation. */ + content: string; + /** ISO timestamp of when enrichment last ran. */ + updatedAt: string; + /** Workers AI model used for enrichment. */ + model: string; +} + +/** Site-level configuration, read from Worker `vars`. */ +export interface SiteConfig { + name: string; + description: string; + /** Absolute origin, e.g. "https://example.com" — derived from the request. */ + origin: string; +} + +/** Bindings available to the Worker. Mirrors wrangler.jsonc. */ +export interface Env { + AI: Ai; + VISIBILITY_CACHE: KVNamespace; + SITE_NAME: string; + SITE_DESCRIPTION: string; + AI_MODEL: string; + ENRICHMENT_CACHE_TTL: string; + CONTENT_SIGNAL: string; + ENABLE_WEB_BOT_AUTH: string; + /** + * Secret bearer token required for the mutating API routes + * (POST /api/resources, POST /api/refresh). Set with: + * npx wrangler secret put ADMIN_TOKEN + * When unset, those routes are disabled (return 401). + */ + ADMIN_TOKEN?: string; +} diff --git a/apps/web/src/lib/web-bot-auth.ts b/apps/web/src/lib/web-bot-auth.ts new file mode 100644 index 0000000..2d5b59a --- /dev/null +++ b/apps/web/src/lib/web-bot-auth.ts @@ -0,0 +1,203 @@ +/** + * OPTIONAL — Web Bot Auth (agent identity). + * + * Everything else in this template is about making content *readable* by + * agents. This module is a different axis: letting a well-behaved agent prove + * *who it is* using Web Bot Auth (HTTP Message Signatures, RFC 9421, with + * Ed25519 keys). It is disabled by default (`ENABLE_WEB_BOT_AUTH=false`) and + * is wired up separately so it never muddies the core "readable surfaces" + * story. + * + * What this provides: + * - GET /.well-known/web-bot-auth/directory — the keys this site trusts + * - verifyAgentIdentity(request) — verify a signed request + * + * This is a minimal, dependency-free starting point. It verifies an Ed25519 + * signature over a signature base built from the components named in + * `Signature-Input`. For production use, review the latest Web Bot Auth / + * RFC 9421 drafts and harden component coverage, key rotation, and replay + * protection (the `created`/`expires`/`nonce` params). + */ + +/** An accepted agent public key (Ed25519, JWK form). */ +export interface AgentKey { + keyid: string; + /** Base64url Ed25519 public key (the `x` field of an OKP JWK). */ + publicKey: string; + /** Friendly label, e.g. "ExampleAI crawler". */ + label?: string; +} + +/** + * Sample directory. Replace with the keys of agents you actually trust. The + * sample key is illustrative only and will not verify real traffic. + */ +export const SAMPLE_AGENT_KEYS: AgentKey[] = [ + { + keyid: "sample-agent-2026", + publicKey: "11qYAYKxCrfVS_7TyWQHOg7hcvPapiMlrwIaaPcHURo", + label: "Sample agent (replace me)", + }, +]; + +export interface VerificationResult { + /** Whether the request carried Web Bot Auth signature headers at all. */ + signed: boolean; + /** Whether the signature verified against a trusted key. */ + verified: boolean; + /** The keyid the agent claimed, if any. */ + keyid?: string; + /** Human-readable reason when not verified. */ + reason?: string; +} + +function b64urlToBytes(s: string): Uint8Array { + const pad = s.length % 4 === 0 ? "" : "=".repeat(4 - (s.length % 4)); + const b64 = s.replace(/-/g, "+").replace(/_/g, "/") + pad; + const bin = atob(b64); + const out = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; i++) out[i] = bin.charCodeAt(i); + return out; +} + +/** Parse a Signature-Input value like: sig1=("@authority" "@path");keyid="k". */ +function parseSignatureInput( + value: string, +): { label: string; components: string[]; keyid?: string } | null { + const eq = value.indexOf("="); + if (eq === -1) return null; + const label = value.slice(0, eq).trim(); + const rest = value.slice(eq + 1); + const compMatch = rest.match(/\(([^)]*)\)/); + if (!compMatch) return null; + const components = (compMatch[1].match(/"([^"]+)"/g) ?? []).map((c) => + c.replace(/"/g, ""), + ); + const keyidMatch = rest.match(/keyid="([^"]+)"/); + return { label, components, keyid: keyidMatch?.[1] }; +} + +/** Build the signature base string from the covered components. */ +function buildSignatureBase( + request: Request, + components: string[], + signatureParams: string, +): string { + const url = new URL(request.url); + const lines: string[] = []; + for (const comp of components) { + let val = ""; + if (comp === "@authority") val = url.host; + else if (comp === "@path") val = url.pathname; + else if (comp === "@method") val = request.method; + else if (comp === "@target-uri") val = request.url; + else val = request.headers.get(comp) ?? ""; + lines.push(`"${comp}": ${val}`); + } + lines.push(`"@signature-params": ${signatureParams}`); + return lines.join("\n"); +} + +/** + * Verify the Web Bot Auth signature on an incoming request. + * + * Returns `{ signed: false }` for unsigned requests (the common case) so the + * caller can decide what to do — this template just surfaces the result. + */ +export async function verifyAgentIdentity( + request: Request, + keys: AgentKey[], +): Promise { + const sigInput = request.headers.get("Signature-Input"); + const sigHeader = request.headers.get("Signature"); + if (!sigInput || !sigHeader) return { signed: false, verified: false }; + + const parsed = parseSignatureInput(sigInput); + if (!parsed) { + return { + signed: true, + verified: false, + reason: "Malformed Signature-Input", + }; + } + + // The label is attacker-controlled; only allow the RFC 8941 key charset so + // it can't inject regex metacharacters (ReDoS / RegExp throw). + if (!/^[A-Za-z0-9_-]+$/.test(parsed.label)) { + return { signed: true, verified: false, reason: "Invalid signature label" }; + } + + const key = keys.find((k) => k.keyid === parsed.keyid); + if (!key) { + return { + signed: true, + verified: false, + keyid: parsed.keyid, + reason: "Unknown keyid", + }; + } + + try { + // Extract the raw signature bytes for this label. + const sigMatch = sigHeader.match(new RegExp(`${parsed.label}=:([^:]+):`)); + if (!sigMatch) { + return { + signed: true, + verified: false, + keyid: parsed.keyid, + reason: "Missing signature value", + }; + } + + const paramsMatch = sigInput.match(/=(\(.*)$/); + const signatureParams = paramsMatch ? paramsMatch[1] : "()"; + const base = buildSignatureBase( + request, + parsed.components, + signatureParams, + ); + + const cryptoKey = await crypto.subtle.importKey( + "raw", + b64urlToBytes(key.publicKey), + { name: "Ed25519" }, + false, + ["verify"], + ); + const ok = await crypto.subtle.verify( + "Ed25519", + cryptoKey, + b64urlToBytes(sigMatch[1]), + new TextEncoder().encode(base), + ); + return { + signed: true, + verified: ok, + keyid: parsed.keyid, + reason: ok ? undefined : "Signature did not verify", + }; + } catch (err) { + return { + signed: true, + verified: false, + keyid: parsed.keyid, + reason: `Verification error: ${(err as Error).message}`, + }; + } +} + +/** The directory document served at /.well-known/web-bot-auth/directory. */ +export function directoryDocument(keys: AgentKey[]) { + return { + purpose: "web-bot-auth", + description: + "Public keys this site trusts for Web Bot Auth (RFC 9421, Ed25519).", + keys: keys.map((k) => ({ + keyid: k.keyid, + kty: "OKP", + crv: "Ed25519", + x: k.publicKey, + label: k.label, + })), + }; +} diff --git a/apps/web/src/react-app/App.css b/apps/web/src/react-app/App.css new file mode 100644 index 0000000..f187d65 --- /dev/null +++ b/apps/web/src/react-app/App.css @@ -0,0 +1,191 @@ +.container { + max-width: 920px; + margin: 0 auto; + padding: 3rem 1.25rem 5rem; +} + +header { + margin-bottom: 2.5rem; +} + +.kicker { + text-transform: uppercase; + letter-spacing: 0.08em; + font-size: 0.75rem; + font-weight: 600; + color: #f6821f; + margin: 0 0 0.5rem; +} + +h1 { + font-size: 2.25rem; + margin: 0 0 0.5rem; +} + +h2 { + font-size: 1.35rem; + margin: 2.5rem 0 0.25rem; +} + +.lede { + font-size: 1.15rem; + margin: 0 0 0.75rem; +} + +.muted { + color: #8a8377; + font-size: 0.95rem; +} + +.error { + border: 1px solid rgba(190, 18, 60, 0.35); + border-radius: 10px; + background: rgba(190, 18, 60, 0.08); + color: #9f1239; + padding: 0.9rem 1rem; +} + +.error p { + margin: 0.35rem 0 0; +} + +@media (prefers-color-scheme: dark) { + .error { + background: rgba(251, 113, 133, 0.12); + color: #fda4af; + } +} + +.surfaces { + display: flex; + flex-direction: column; + gap: 0.75rem; + margin-top: 1rem; +} + +.surface { + border: 1px solid rgba(128, 128, 128, 0.25); + border-radius: 10px; + overflow: hidden; + background: rgba(255, 255, 255, 0.5); +} + +@media (prefers-color-scheme: dark) { + .surface { + background: rgba(255, 255, 255, 0.03); + } +} + +.surface-head { + display: flex; + align-items: center; + justify-content: space-between; + padding: 0.75rem 1rem; + gap: 1rem; +} + +.surface-label { + font-weight: 600; + margin-right: 0.5rem; +} + +.surface-path { + font-size: 0.85rem; + color: #8a8377; +} + +.surface-actions { + display: flex; + align-items: center; + gap: 0.5rem; +} + +button { + font: inherit; + cursor: pointer; + border: 1px solid rgba(128, 128, 128, 0.4); + background: transparent; + color: inherit; + border-radius: 6px; + padding: 0.35rem 0.75rem; +} + +button:hover { + border-color: #f6821f; +} + +.surface-body { + position: relative; + border-top: 1px solid rgba(128, 128, 128, 0.25); + padding: 0.5rem 1rem 1rem; +} + +.surface-body pre { + overflow: auto; + max-height: 320px; + font-size: 0.8rem; + background: rgba(0, 0, 0, 0.04); + padding: 0.75rem; + border-radius: 6px; + margin: 0; +} + +@media (prefers-color-scheme: dark) { + .surface-body pre { + background: rgba(255, 255, 255, 0.05); + } +} + +.copy { + position: absolute; + right: 1.5rem; + top: 0.9rem; + font-size: 0.75rem; + padding: 0.2rem 0.5rem; +} + +.cards { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); + gap: 1rem; + margin-top: 1rem; +} + +.card { + border: 1px solid rgba(128, 128, 128, 0.25); + border-radius: 10px; + padding: 1rem; +} + +.card h3 { + margin: 0 0 0.5rem; + font-size: 1.05rem; +} + +.tag { + display: inline-block; + font-size: 0.7rem; + text-transform: uppercase; + letter-spacing: 0.05em; + color: #f6821f; + border: 1px solid rgba(246, 130, 31, 0.4); + border-radius: 999px; + padding: 0.1rem 0.5rem; + margin-bottom: 0.5rem; +} + +.card p { + margin: 0.25rem 0; + font-size: 0.9rem; +} + +.topics { + color: #8a8377; + font-size: 0.8rem !important; +} + +footer { + margin-top: 3rem; + padding-top: 1.5rem; + border-top: 1px solid rgba(128, 128, 128, 0.25); +} diff --git a/apps/web/src/react-app/App.tsx b/apps/web/src/react-app/App.tsx new file mode 100644 index 0000000..a4d0943 --- /dev/null +++ b/apps/web/src/react-app/App.tsx @@ -0,0 +1,275 @@ +import { useEffect, useState } from "react"; +import "./App.css"; + +interface Surface { + id: string; + label: string; + path: string; + kind: "text" | "json"; +} + +interface SiteInfo { + site: { name: string; description: string; origin: string }; + webBotAuthEnabled: boolean; + surfaces: Surface[]; +} + +interface Resource { + slug: string; + title: string; + summary: string; + topics: string[]; + category: string | null; +} + +function useSiteInfo() { + const [info, setInfo] = useState(null); + const [error, setError] = useState(null); + const [loading, setLoading] = useState(true); + useEffect(() => { + async function loadSiteInfo() { + try { + const response = await fetch("/api/site"); + if (!response.ok) { + throw new Error( + `/api/site returned ${response.status} ${response.statusText}`.trim(), + ); + } + setInfo(await response.json()); + setError(null); + } catch (error) { + setInfo(null); + setError( + error instanceof Error ? error.message : "Could not load /api/site.", + ); + } finally { + setLoading(false); + } + } + + void loadSiteInfo(); + }, []); + return { info, loading, error }; +} + +function SurfacePreview({ surface }: { surface: Surface }) { + const [open, setOpen] = useState(false); + const [body, setBody] = useState(""); + const [error, setError] = useState(null); + const [loading, setLoading] = useState(false); + const [copied, setCopied] = useState(false); + + async function load() { + setLoading(true); + setError(null); + try { + const res = await fetch(surface.path); + if (!res.ok) { + throw new Error( + `${surface.path} returned ${res.status} ${res.statusText}`.trim(), + ); + } + const text = await res.text(); + if (surface.kind === "json") { + try { + setBody(JSON.stringify(JSON.parse(text), null, 2)); + } catch (error) { + throw new Error( + `${surface.path} returned invalid JSON${ + error instanceof Error ? `: ${error.message}` : "." + }`, + ); + } + } else { + setBody(text); + } + } catch (error) { + setBody(""); + setError( + error instanceof Error + ? error.message + : `Could not load ${surface.path}.`, + ); + } finally { + setLoading(false); + } + } + + function toggle() { + const next = !open; + setOpen(next); + if (next && !body) load(); + } + + async function copy() { + if (!body) return; + await navigator.clipboard.writeText(body); + setCopied(true); + setTimeout(() => setCopied(false), 1500); + } + + return ( +
+
+
+ {surface.label} + {surface.path} +
+
+ + Open ↗ + + +
+
+ {open && ( +
+ {loading ? ( +

Loading…

+ ) : error ? ( +
+ Preview unavailable. +

{error}

+

Open the surface directly or check the Worker logs.

+
+ ) : ( + <> + +
{body}
+ + )} +
+ )} +
+ ); +} + +export default function App() { + const { info, loading: siteLoading, error: siteError } = useSiteInfo(); + const [resources, setResources] = useState([]); + const [resourcesLoading, setResourcesLoading] = useState(true); + const [resourcesError, setResourcesError] = useState(null); + + useEffect(() => { + async function loadResources() { + try { + const response = await fetch("/api/resources"); + if (!response.ok) { + throw new Error( + `/api/resources returned ${response.status} ${response.statusText}`.trim(), + ); + } + const data = await response.json(); + setResources(data.resources ?? []); + setResourcesError(null); + } catch (error) { + setResources([]); + setResourcesError( + error instanceof Error + ? error.message + : "Could not load /api/resources.", + ); + } finally { + setResourcesLoading(false); + } + } + + void loadResources(); + }, []); + + if (siteLoading) { + return ( +
+

Loading…

+
+ ); + } + + if (!info) { + return ( +
+
+ Could not load site metadata. +

{siteError ?? "The /api/site response was empty."}

+

Refresh the page or check the Worker logs for /api/site.

+
+
+ ); + } + + return ( +
+
+

AI Agent Visibility

+

{info.site.name}

+

{info.site.description}

+

+ One enriched content store, served to AI agents through every + discovery surface below — generated by Workers AI, cached in KV. +

+
+ +
+

Agent surfaces

+

+ The same content, in whichever convention an agent prefers. +

+
+ {info.surfaces.map((s) => ( + + ))} +
+ {info.webBotAuthEnabled && ( +

+ Web Bot Auth identity surface is enabled at{" "} + /.well-known/web-bot-auth/directory. +

+ )} +
+ +
+

Indexed pages ({resources.length})

+ {resourcesLoading ? ( +

Loading indexed pages…

+ ) : resourcesError ? ( +
+ Could not load indexed pages. +

{resourcesError}

+

Check /api/resources or the Worker logs, then refresh.

+
+ ) : resources.length === 0 ? ( +

+ No indexed pages returned from /api/resources. +

+ ) : ( +
+ {resources.map((r) => ( +
+

+ + {r.title} + +

+ {r.category && {r.category}} +

{r.summary}

+ {r.topics.length > 0 && ( +

{r.topics.join(" · ")}

+ )} +
+ ))} +
+ )} +
+ +
+

+ Built on Cloudflare Workers + Workers AI + KV. Replace the sample + content in src/lib/content.ts or POST your own pages to{" "} + /api/resources. +

+
+
+ ); +} diff --git a/apps/web/src/react-app/index.css b/apps/web/src/react-app/index.css new file mode 100644 index 0000000..5585c00 --- /dev/null +++ b/apps/web/src/react-app/index.css @@ -0,0 +1,45 @@ +:root { + font-family: + system-ui, + -apple-system, + "Segoe UI", + Roboto, + Ubuntu, + Cantarell, + "Helvetica Neue", + sans-serif; + line-height: 1.55; + font-weight: 400; + color-scheme: light dark; + color: #1f2733; + background: #f8f7f4; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +* { + box-sizing: border-box; +} + +body { + margin: 0; +} + +a { + color: #f6821f; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +@media (prefers-color-scheme: dark) { + :root { + color: #e8e6e3; + background: #14110e; + } +} diff --git a/apps/web/src/react-app/main.tsx b/apps/web/src/react-app/main.tsx new file mode 100644 index 0000000..9cd1cc6 --- /dev/null +++ b/apps/web/src/react-app/main.tsx @@ -0,0 +1,10 @@ +import { StrictMode } from "react"; +import { createRoot } from "react-dom/client"; +import "./index.css"; +import App from "./App.tsx"; + +createRoot(document.getElementById("root")!).render( + + + , +); diff --git a/apps/web/src/react-app/vite-env.d.ts b/apps/web/src/react-app/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/apps/web/src/react-app/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/apps/web/src/worker/health.ts b/apps/web/src/worker/health.ts new file mode 100644 index 0000000..8907c4b --- /dev/null +++ b/apps/web/src/worker/health.ts @@ -0,0 +1,35 @@ +/** + * GET /api/health — not upstream's. The deploy smoke's and the probes' check + * that the Worker is bound to its store. + * + * It reads the enriched store's key from KV and NEVER calls the model: a + * smoke that fetched /llms.txt on a cold store would run Workers AI over + * every page on every deploy. `ok` is false (and the route answers 503) only + * when KV fails — an unbound or unreachable namespace. A cold store is + * healthy: it is enriched by the first surface a visitor asks for. + */ +import { ENRICHED_KEY } from "../lib/store"; +import type { Env } from "../lib/types"; + +export interface Health { + ok: boolean; + /** KV answered the read. */ + kv: boolean; + /** The Workers AI binding is bound (it is not called). */ + ai: boolean; + /** An enriched store is cached. */ + cached: boolean; + /** How many enriched pages the cached store holds. */ + pages: number; +} + +export async function health(env: Env): Promise { + const ai = typeof env.AI?.run === "function"; + try { + const stored = await env.VISIBILITY_CACHE.get(ENRICHED_KEY, "json"); + const pages = Array.isArray(stored) ? stored.length : 0; + return { ok: true, kv: true, ai, cached: pages > 0, pages }; + } catch { + return { ok: false, kv: false, ai, cached: false, pages: 0 }; + } +} diff --git a/apps/web/src/worker/index.ts b/apps/web/src/worker/index.ts new file mode 100644 index 0000000..c84007e --- /dev/null +++ b/apps/web/src/worker/index.ts @@ -0,0 +1,310 @@ +/** + * Agent Visibility Worker + * + * Serves one enriched content store through every agent-discovery surface: + * + * GET /llms.txt — llms.txt index (Markdown) + * GET /llms-full.txt — full content inlined (Markdown) + * GET /index.json — typed JSON index + * GET /:slug.md — per-page Markdown (groundable) + * GET /:slug.jsonld — per-page schema.org JSON-LD + * GET /jsonld — site-level schema.org JSON-LD + * GET /robots.txt — explicit AI-bot directives + * + * Plus a small JSON API the bundled UI uses, and an OPTIONAL Web Bot Auth + * identity surface (disabled unless ENABLE_WEB_BOT_AUTH=true). + * + * Every text surface sends a `Content-Signal` header declaring how agents may + * use the content (see https://contentsignals.org / the Content-Signals + * proposal). The React SPA at `/` is served from static assets. + */ +import { Hono } from "hono"; +import { cors } from "hono/cors"; +import { + renderIndexJson, + renderLlmsFullTxt, + renderLlmsTxt, + renderResourceJsonLd, + renderResourceMd, + renderRobotsTxt, + renderWebsiteJsonLd, +} from "../enrichment/surfaces"; +import { + clearCache, + getResources, + siteConfig, + upsertResource, +} from "../lib/store"; +import type { Env, RawResource } from "../lib/types"; +import { health } from "./health"; +import { + directoryDocument, + SAMPLE_AGENT_KEYS, + verifyAgentIdentity, +} from "../lib/web-bot-auth"; + +const app = new Hono<{ Bindings: Env }>(); + +app.onError((err, c) => { + console.error(`[Error] ${c.req.method} ${c.req.path}: ${err.message}`); + // Match the response type to the surface: text surfaces shouldn't get a + // JSON error body. + if (/\.(md|txt)$/.test(c.req.path)) { + return c.text("Internal server error", 500); + } + return c.json({ error: "Internal server error" }, 500); +}); + +function originOf(url: string): string { + return new URL(url).origin; +} + +// --- Validation limits for user-supplied content --------------------------- +const MAX_BODY_BYTES = 100_000; // raw content we'll persist per resource +const MAX_RESOURCES = 100; // cap total resources to bound KV growth +const SLUG_RE = /^[a-z0-9](?:[a-z0-9-]{0,62})$/; + +/** Constant-time-ish bearer check for the mutating routes. */ +function isAuthorized(c: { + env: Env; + req: { header: (k: string) => string | undefined }; +}): boolean { + const configured = c.env.ADMIN_TOKEN; + if (!configured) return false; + const header = c.req.header("authorization") ?? ""; + const token = header.replace(/^Bearer\s+/i, ""); + return token.length > 0 && token === configured; +} + +/** Apply the Content-Signal header declaring agent usage intent. */ +function contentSignal(c: { env: Env }): Record { + return { + "Content-Signal": + c.env.CONTENT_SIGNAL || "ai-input=yes, search=yes, ai-train=no", + }; +} + +// CORS so agents can fetch the machine-readable surfaces from anywhere. +app.use("/llms.txt", cors()); +app.use("/llms-full.txt", cors()); +app.use("/index.json", cors()); +app.use("/jsonld", cors()); +// NB: Hono's "*" wildcard does not match a literal ".md"/".jsonld" suffix, so +// the per-page surfaces need the same regex matcher their routes use. +app.use("/:file{.+\\.md}", cors()); +app.use("/:file{.+\\.jsonld}", cors()); + +// --------------------------------------------------------------------------- +// Machine-readable surfaces +// --------------------------------------------------------------------------- + +app.get("/llms.txt", async (c) => { + const site = siteConfig(c.env, originOf(c.req.url)); + const resources = await getResources(c.env); + return c.text(renderLlmsTxt({ site, resources }), 200, { + "Content-Type": "text/plain; charset=utf-8", + ...contentSignal(c), + }); +}); + +app.get("/llms-full.txt", async (c) => { + const site = siteConfig(c.env, originOf(c.req.url)); + const resources = await getResources(c.env); + return c.text(renderLlmsFullTxt({ site, resources }), 200, { + "Content-Type": "text/plain; charset=utf-8", + ...contentSignal(c), + }); +}); + +app.get("/index.json", async (c) => { + const site = siteConfig(c.env, originOf(c.req.url)); + const resources = await getResources(c.env); + c.header("Content-Signal", contentSignal(c)["Content-Signal"]); + return c.json(renderIndexJson({ site, resources })); +}); + +app.get("/robots.txt", async (c) => { + const site = siteConfig(c.env, originOf(c.req.url)); + const resources = await getResources(c.env); + return c.text( + renderRobotsTxt({ + site, + resources, + contentSignal: contentSignal(c)["Content-Signal"], + }), + 200, + { + "Content-Type": "text/plain; charset=utf-8", + ...contentSignal(c), + }, + ); +}); + +app.get("/jsonld", async (c) => { + const site = siteConfig(c.env, originOf(c.req.url)); + const resources = await getResources(c.env); + return c.json(renderWebsiteJsonLd({ site, resources }), 200, { + "Content-Type": "application/ld+json; charset=utf-8", + ...contentSignal(c), + }); +}); + +// Per-page Markdown: /:slug.md +app.get("/:file{.+\\.md}", async (c) => { + const slug = c.req.param("file").replace(/\.md$/, ""); + const site = siteConfig(c.env, originOf(c.req.url)); + const resources = await getResources(c.env); + const resource = resources.find((r) => r.slug === slug); + if (!resource) return c.notFound(); + return c.text(renderResourceMd({ resource, site }), 200, { + "Content-Type": "text/markdown; charset=utf-8", + ...contentSignal(c), + }); +}); + +// Per-page JSON-LD: /:slug.jsonld +app.get("/:file{.+\\.jsonld}", async (c) => { + const slug = c.req.param("file").replace(/\.jsonld$/, ""); + const site = siteConfig(c.env, originOf(c.req.url)); + const resources = await getResources(c.env); + const resource = resources.find((r) => r.slug === slug); + if (!resource) return c.notFound(); + return c.json(renderResourceJsonLd({ resource, site }), 200, { + "Content-Type": "application/ld+json; charset=utf-8", + ...contentSignal(c), + }); +}); + +// --------------------------------------------------------------------------- +// JSON API for the bundled UI +// --------------------------------------------------------------------------- + +// Not upstream's: the deploy smoke's and the probes' check (src/worker/health.ts). +// It reads the store from KV and never calls the model. +app.get("/api/health", async (c) => { + const result = await health(c.env); + return c.json(result, result.ok ? 200 : 503); +}); + +app.get("/api/site", async (c) => { + const site = siteConfig(c.env, originOf(c.req.url)); + return c.json({ + site, + webBotAuthEnabled: c.env.ENABLE_WEB_BOT_AUTH === "true", + surfaces: [ + { id: "llms-txt", label: "llms.txt", path: "/llms.txt", kind: "text" }, + { + id: "llms-full", + label: "llms-full.txt", + path: "/llms-full.txt", + kind: "text", + }, + { + id: "index-json", + label: "index.json", + path: "/index.json", + kind: "json", + }, + { id: "robots", label: "robots.txt", path: "/robots.txt", kind: "text" }, + { id: "jsonld", label: "JSON-LD", path: "/jsonld", kind: "json" }, + ], + }); +}); + +app.get("/api/resources", async (c) => { + const resources = await getResources(c.env); + return c.json({ count: resources.length, resources }); +}); + +app.get("/api/resources/:slug", async (c) => { + const resources = await getResources(c.env); + const resource = resources.find((r) => r.slug === c.req.param("slug")); + if (!resource) return c.json({ error: "Not found" }, 404); + return c.json(resource); +}); + +app.post("/api/resources", async (c) => { + if (!isAuthorized(c)) { + return c.json({ error: "Unauthorized. Set the ADMIN_TOKEN secret." }, 401); + } + const body = await c.req.json>().catch(() => null); + if (!body?.slug || !body?.body) { + return c.json({ error: "Missing required fields: slug, body" }, 400); + } + + const slug = String(body.slug); + if (!SLUG_RE.test(slug)) { + return c.json({ error: "Invalid slug: use 1–63 chars of [a-z0-9-]." }, 400); + } + + const rawBody = String(body.body); + if (new TextEncoder().encode(rawBody).length > MAX_BODY_BYTES) { + return c.json( + { error: `Body too large (max ${MAX_BODY_BYTES} bytes).` }, + 400, + ); + } + + let url = `${originOf(c.req.url)}/${slug}`; + if (body.url) { + try { + const parsed = new URL(String(body.url)); + if (parsed.protocol !== "http:" && parsed.protocol !== "https:") { + return c.json({ error: "url must be http(s)." }, 400); + } + url = parsed.toString(); + } catch { + return c.json({ error: "url is not a valid URL." }, 400); + } + } + + const raw: RawResource = { + slug, + url, + title: body.title ? String(body.title).slice(0, 200) : undefined, + body: rawBody, + }; + + try { + const enriched = await upsertResource(c.env, raw, MAX_RESOURCES); + return c.json(enriched, 201); + } catch (err) { + if ((err as Error).message === "RESOURCE_LIMIT") { + return c.json( + { error: `Resource limit reached (max ${MAX_RESOURCES}).` }, + 409, + ); + } + throw err; + } +}); + +app.post("/api/refresh", async (c) => { + if (!isAuthorized(c)) { + return c.json({ error: "Unauthorized. Set the ADMIN_TOKEN secret." }, 401); + } + await clearCache(c.env); + return c.json({ + ok: true, + message: "Cache cleared; surfaces will re-enrich.", + }); +}); + +// --------------------------------------------------------------------------- +// OPTIONAL — Web Bot Auth identity surface (off by default) +// --------------------------------------------------------------------------- + +app.get("/.well-known/web-bot-auth/directory", (c) => { + if (c.env.ENABLE_WEB_BOT_AUTH !== "true") return c.notFound(); + return c.json(directoryDocument(SAMPLE_AGENT_KEYS)); +}); + +app.all("/api/identity", async (c) => { + if (c.env.ENABLE_WEB_BOT_AUTH !== "true") { + return c.json({ error: "Web Bot Auth is disabled" }, 404); + } + const result = await verifyAgentIdentity(c.req.raw, SAMPLE_AGENT_KEYS); + return c.json(result); +}); + +export default app; diff --git a/apps/web/tsconfig.app.json b/apps/web/tsconfig.app.json new file mode 100644 index 0000000..f6527a7 --- /dev/null +++ b/apps/web/tsconfig.app.json @@ -0,0 +1,20 @@ +{ + // The dashboard: upstream's src/react-app, as its tsconfig.app.json reads it. + "extends": "../../tooling/tsconfig/web.json", + "compilerOptions": { + "composite": false, + "declaration": false, + "declarationMap": false, + "incremental": false, + "noEmit": true, + // As upstream's tsconfig.app.json: no unchecked-index rule. + "noUncheckedIndexedAccess": false, + "noUnusedLocals": true, + "noUnusedParameters": true, + "jsx": "react-jsx", + "allowImportingTsExtensions": true, + "moduleDetection": "force", + "useDefineForClassFields": true + }, + "include": ["src/react-app/**/*.ts", "src/react-app/**/*.tsx", "vite.config.ts"] +} diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json new file mode 100644 index 0000000..6feb26e --- /dev/null +++ b/apps/web/tsconfig.json @@ -0,0 +1,20 @@ +{ + // The Worker: upstream's src/worker, src/enrichment and src/lib. + "extends": "../../tooling/tsconfig/worker.json", + "compilerOptions": { + "composite": false, + "declaration": false, + "declarationMap": false, + "incremental": false, + "noEmit": true, + // Upstream's compiler settings for this code (its tsconfig.node.json and + // tsconfig.worker.json): the Workers runtime's types alone, not the + // WebWorker lib, whose stricter WebCrypto signatures reject upstream's + // Web Bot Auth module, and no unchecked-index rule upstream never had. + "lib": ["ES2023"], + "noUncheckedIndexedAccess": false, + "noUnusedLocals": true, + "noUnusedParameters": true + }, + "include": ["src/worker/**/*.ts", "src/enrichment/**/*.ts", "src/lib/**/*.ts"] +} diff --git a/apps/web/turbo.json b/apps/web/turbo.json new file mode 100644 index 0000000..b934a96 --- /dev/null +++ b/apps/web/turbo.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://turbo.build/schema.json", + "extends": ["//"], + "tasks": { + "build": { + "dependsOn": ["^build"], + "inputs": ["index.html", "src/react-app/**", "vite.config.ts", "package.json"], + "outputs": ["dist/**"] + } + } +} diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts new file mode 100644 index 0000000..e4849e5 --- /dev/null +++ b/apps/web/vite.config.ts @@ -0,0 +1,14 @@ +// The dashboard's build: Vite and the React plugin, upstream's client build +// without @cloudflare/vite-plugin. The Worker is not built here — wrangler +// bundles src/worker/index.ts on deploy (and under `wrangler dev`) and serves +// this output as its Static Assets (wrangler.jsonc → assets.directory). +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; + +export default defineConfig({ + plugins: [react()], + build: { + outDir: "dist/client", + emptyOutDir: true, + }, +}); diff --git a/apps/web/wiring.fixture.json b/apps/web/wiring.fixture.json new file mode 100644 index 0000000..f2ed59e --- /dev/null +++ b/apps/web/wiring.fixture.json @@ -0,0 +1,14 @@ +{ + "cloudflare-kv/dev": { + "app_kv_id": "00000000000000000000000000000001", + "app_kv_title": "dev-agent-visibility-app-kv-dev" + }, + "cloudflare-kv/stage": { + "app_kv_id": "00000000000000000000000000000002", + "app_kv_title": "stg-agent-visibility-app-kv-stage" + }, + "cloudflare-kv/prod": { + "app_kv_id": "00000000000000000000000000000003", + "app_kv_title": "prod-agent-visibility-app-kv-prod" + } +} diff --git a/apps/web/wrangler.jsonc b/apps/web/wrangler.jsonc new file mode 100644 index 0000000..259f858 --- /dev/null +++ b/apps/web/wrangler.jsonc @@ -0,0 +1,61 @@ +// GENERATED from wrangler.template.jsonc by tooling/wire — edit the +// template, not this file. The committed copy is the fixture render +// (`pnpm run wire:fixture`); every Orun lane renders its own environment. +{ + "$schema": "node_modules/wrangler/config-schema.json", + "name": "agent-visibility-web", + // Upstream's Worker: every agent surface and the dashboard's JSON API. + // wrangler bundles it; the build only builds the dashboard. + "main": "src/worker/index.ts", + "compatibility_date": "2025-10-08", + "upload_source_maps": true, + "observability": { "enabled": true }, + // The dashboard, built by Vite into dist/client. Upstream's asset settings, + // unchanged: the surfaces and the API reach the Worker first, every other + // path without a file is the single-page app's. + "assets": { + "directory": "dist/client", + "binding": "ASSETS", + "not_found_handling": "single-page-application", + "run_worker_first": [ + "/.well-known/web-bot-auth/*", + "/api", + "/api/*", + "/index.json", + "/jsonld", + "/llms-full.txt", + "/llms.txt", + "/robots.txt", + "/*.jsonld", + "/*.md" + ] + }, + // Workers AI, keyless: the account's. It enriches each page once; the + // result is cached in VISIBILITY_CACHE. It has no local mode: `pnpm dev` + // runs `wrangler dev --local` (remote bindings off, as upstream's Vite + // config sets `remoteBindings: false`), where every model call fails and + // upstream's deterministic fallback enriches each page from its own text; + // `pnpm dev:remote` reaches the signed-in account's model (`wrangler login` + // first). + "ai": { "binding": "AI" }, + // The store: the raw pages and their enrichment. + "kv_namespaces": [ + { + "binding": "VISIBILITY_CACHE", + "id": "00000000000000000000000000000002" + } + ], + // Upstream's vars. SITE_NAME and SITE_DESCRIPTION name the site on every + // surface: the product's. The sample pages (src/lib/content.ts) stay + // upstream's until their owner posts their own. ADMIN_TOKEN is a secret, + // never a var (.dev.vars locally; an Orun secret, pushed as a Worker secret, + // deployed). + "vars": { + "SITE_NAME": "AI Agent Visibility", + "SITE_DESCRIPTION": "Content made readable by AI agents on every surface they look at.", + "AI_MODEL": "@cf/meta/llama-3.3-70b-instruct-fp8-fast", + "ENRICHMENT_CACHE_TTL": "3600", + "CONTENT_SIGNAL": "ai-input=yes, search=yes, ai-train=no", + "ENABLE_WEB_BOT_AUTH": "false" + } +} diff --git a/apps/web/wrangler.template.jsonc b/apps/web/wrangler.template.jsonc new file mode 100644 index 0000000..81fd649 --- /dev/null +++ b/apps/web/wrangler.template.jsonc @@ -0,0 +1,66 @@ +// The source of wrangler.jsonc, which tooling/wire renders from it: from +// wiring.fixture.json for local work (`pnpm run wire:fixture`, committed as +// that render), and on every Orun lane from the wiring document the +// `cloudflare-kv` Terraform root lease-publishes (WIRING_CLOUDFLARE_KV_) +// — dev, which no root applies to, from the fixture (component.yaml's +// buildCommand). Edit this file, never wrangler.jsonc. The workers-assets +// composition deploys one environment per job with no wrangler `--env`, so +// `__ENV__` names the environment this is rendered for. +{ + "$schema": "node_modules/wrangler/config-schema.json", + "name": "agent-visibility-web", + // Upstream's Worker: every agent surface and the dashboard's JSON API. + // wrangler bundles it; the build only builds the dashboard. + "main": "src/worker/index.ts", + "compatibility_date": "2025-10-08", + "upload_source_maps": true, + "observability": { "enabled": true }, + // The dashboard, built by Vite into dist/client. Upstream's asset settings, + // unchanged: the surfaces and the API reach the Worker first, every other + // path without a file is the single-page app's. + "assets": { + "directory": "dist/client", + "binding": "ASSETS", + "not_found_handling": "single-page-application", + "run_worker_first": [ + "/.well-known/web-bot-auth/*", + "/api", + "/api/*", + "/index.json", + "/jsonld", + "/llms-full.txt", + "/llms.txt", + "/robots.txt", + "/*.jsonld", + "/*.md" + ] + }, + // Workers AI, keyless: the account's. It enriches each page once; the + // result is cached in VISIBILITY_CACHE. It has no local mode: `pnpm dev` + // runs `wrangler dev --local` (remote bindings off, as upstream's Vite + // config sets `remoteBindings: false`), where every model call fails and + // upstream's deterministic fallback enriches each page from its own text; + // `pnpm dev:remote` reaches the signed-in account's model (`wrangler login` + // first). + "ai": { "binding": "AI" }, + // The store: the raw pages and their enrichment. + "kv_namespaces": [ + { + "binding": "VISIBILITY_CACHE", + "id": "@@wiring(cloudflare-kv/__ENV__:app_kv_id)@@" + } + ], + // Upstream's vars. SITE_NAME and SITE_DESCRIPTION name the site on every + // surface: the product's. The sample pages (src/lib/content.ts) stay + // upstream's until their owner posts their own. ADMIN_TOKEN is a secret, + // never a var (.dev.vars locally; an Orun secret, pushed as a Worker secret, + // deployed). + "vars": { + "SITE_NAME": "AI Agent Visibility", + "SITE_DESCRIPTION": "Content made readable by AI agents on every surface they look at.", + "AI_MODEL": "@cf/meta/llama-3.3-70b-instruct-fp8-fast", + "ENRICHMENT_CACHE_TTL": "3600", + "CONTENT_SIGNAL": "ai-input=yes, search=yes, ai-train=no", + "ENABLE_WEB_BOT_AUTH": "false" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 556857a..6461461 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,6 +24,73 @@ importers: specifier: ^5.8.3 version: 5.9.3 + apps/web: + dependencies: + hono: + specifier: 4.11.1 + version: 4.11.1 + react: + specifier: 19.2.1 + version: 19.2.1 + react-dom: + specifier: 19.2.1 + version: 19.2.1(react@19.2.1) + devDependencies: + '@app/eslint-config': + specifier: workspace:* + version: link:../../tooling/eslint + '@app/tsconfig': + specifier: workspace:* + version: link:../../tooling/tsconfig + '@cloudflare/workers-types': + specifier: ^4.20260702.1 + version: 4.20260702.1 + '@types/react': + specifier: 19.2.7 + version: 19.2.7 + '@types/react-dom': + specifier: 19.2.3 + version: 19.2.3(@types/react@19.2.7) + '@vitejs/plugin-react': + specifier: 5.1.1 + version: 5.1.1(vite@7.3.7(@types/node@22.20.5)) + eslint: + specifier: ^9.27.0 + version: 9.39.5 + typescript: + specifier: 5.9.3 + version: 5.9.3 + vite: + specifier: ^7.0.0 + version: 7.3.7(@types/node@22.20.5) + wrangler: + specifier: ^4.151.0 + version: 4.155.0(@cloudflare/workers-types@4.20260702.1)(@types/node@22.20.5) + + tests/web: + devDependencies: + '@app/eslint-config': + specifier: workspace:* + version: link:../../tooling/eslint + '@app/tsconfig': + specifier: workspace:* + version: link:../../tooling/tsconfig + '@cloudflare/workers-types': + specifier: ^4.20260702.1 + version: 4.20260702.1 + '@types/node': + specifier: ^22.9.0 + version: 22.20.5 + jsonc-parser: + specifier: ^3.3.1 + version: 3.3.1 + typescript: + specifier: 5.9.3 + version: 5.9.3 + vitest: + specifier: ^3.2.4 + version: 3.2.7(@types/node@22.20.5) + tooling/eslint: devDependencies: '@typescript-eslint/eslint-plugin': @@ -40,6 +107,298 @@ importers: packages: + '@babel/code-frame@7.29.7': + resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.29.7': + resolution: {integrity: sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.29.7': + resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.29.8': + resolution: {integrity: sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.29.7': + resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-globals@7.29.7': + resolution: {integrity: sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.29.7': + resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.29.7': + resolution: {integrity: sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-plugin-utils@7.29.7': + resolution: {integrity: sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.29.11': + resolution: {integrity: sha512-snZbO7MEDOof+hvNa97EjEY7qD7h2kwvQr5AJC3ZhQudKW5dnej6k3kP9NQV88hJwaS8vDqRLFo9rivLEhle2g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.29.7': + resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.29.10': + resolution: {integrity: sha512-EMCx3AGZ3WfAl6ht7AyQoPm2Lh+BGYEMdc4Q6Hf7uSCDOZFuLq44qNwL+iaim8VlyYhRAo4X43+weadK8ZB4Yg==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.29.11': + resolution: {integrity: sha512-OZ6+oaK7GMyg3IfCpj8JOmn8n+w2rJbDT0LLfVDTLb1ZFeKDh3AiNELgCMUw175IJHSkLl74hG0M0VLsvx+gag==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-transform-react-jsx-self@7.29.7': + resolution: {integrity: sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-source@7.29.7': + resolution: {integrity: sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/template@7.29.7': + resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.29.10': + resolution: {integrity: sha512-B3lYAs2nkKskbgQ1nfy8Ma9ao9Q1rntTAQHrzzyDuj+TSO+X3le6PfWwqDvodsb+OumE10eMFfuMCTQSQ5iuIQ==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.29.11': + resolution: {integrity: sha512-WCsemW40Cpc6gouC1SrY6PBaZ+oLRlEVY9XBvZBI7il/HyUrb2nJ505wE1MHEFyDZNnrWDEuy4jL50WVHfTTSQ==} + engines: {node: '>=6.9.0'} + + '@cloudflare/kv-asset-handler@0.5.0': + resolution: {integrity: sha512-jxQYkj8dSIzc0cD6cMMNdOc1UVjqSqu8BZdor5s8cGjW2I8BjODt/kWPVdY+u9zj3ms75Q5qaZgnxUad83+eAg==} + engines: {node: '>=22.0.0'} + + '@cloudflare/unenv-preset@2.16.2': + resolution: {integrity: sha512-JBP1+Z7ZSNG/d4mRP+y8VC5dka3tZVMLEZRvS+rzQ4DGV1EoxRFQckcJTTkXbHSQiTj0DtNI01Zwb/V2fX0mvQ==} + peerDependencies: + unenv: 2.0.0-rc.24 + workerd: '>1.20260305.0 <2.0.0-0' + peerDependenciesMeta: + workerd: + optional: true + + '@cloudflare/workerd-darwin-64@1.20261023.1': + resolution: {integrity: sha512-lsEx0i7nR0PNG/erUFFHmQmiidEhLfDE5uQmAL9421/y4/ycuxDDOSaxu3VGGYFFPK5sduyUeMmjIlX4CwOBFg==} + engines: {node: '>=16'} + cpu: [x64] + os: [darwin] + + '@cloudflare/workerd-darwin-arm64@1.20261023.1': + resolution: {integrity: sha512-5e79fHgabdDD8EgmjOhJ1S+xMsf6DbC7fL7IgTBizMnzOp0P2isDn7pYmUxI9AJZE9FVQ4RUilH/I36YNg+GQQ==} + engines: {node: '>=16'} + cpu: [arm64] + os: [darwin] + + '@cloudflare/workerd-linux-64@1.20261023.1': + resolution: {integrity: sha512-VHQ6jKFSihjR2+x1buby8XTdBLLJztVnYiB7OLOTYO8aDXB+c1Rd2410PdgFuFYc4AgFEk6PCJLyCLL5L1KBnw==} + engines: {node: '>=16'} + cpu: [x64] + os: [linux] + + '@cloudflare/workerd-linux-arm64@1.20261023.1': + resolution: {integrity: sha512-ilpRHzfDN8YFRM5CLRKuFw40x/LJBS89yVdhdQmxehlVDuBqjKpJB++zPFbTgKRRFaNupgnXc8RHktXAIhgCmQ==} + engines: {node: '>=16'} + cpu: [arm64] + os: [linux] + + '@cloudflare/workerd-windows-64@1.20261023.1': + resolution: {integrity: sha512-279WLVjNsMycAwr0EZNiNEf0l2SY6NUtsN80NwZzbTHzakmiN+WSx4w38muxPm+PAU0oSPPAPXKVD+H6Hya8xw==} + engines: {node: '>=16'} + cpu: [x64] + os: [win32] + + '@cloudflare/workers-types@4.20260702.1': + resolution: {integrity: sha512-mOhf5TUEB1m2vPrxtqoIGfz0fUC9xyxRDx5gWHy5s+OCo6dcV+g7wI1R7gYCMFohhqF/2y2xeKVwMwCJjfn/WA==} + + '@cspotcode/source-map-support@0.8.1': + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + + '@emnapi/runtime@1.11.3': + resolution: {integrity: sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==} + + '@esbuild/aix-ppc64@0.28.2': + resolution: {integrity: sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.28.2': + resolution: {integrity: sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.28.2': + resolution: {integrity: sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.28.2': + resolution: {integrity: sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.28.2': + resolution: {integrity: sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.28.2': + resolution: {integrity: sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.28.2': + resolution: {integrity: sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.28.2': + resolution: {integrity: sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.28.2': + resolution: {integrity: sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.28.2': + resolution: {integrity: sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.28.2': + resolution: {integrity: sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.28.2': + resolution: {integrity: sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.28.2': + resolution: {integrity: sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.28.2': + resolution: {integrity: sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.28.2': + resolution: {integrity: sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.28.2': + resolution: {integrity: sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.28.2': + resolution: {integrity: sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.28.2': + resolution: {integrity: sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.28.2': + resolution: {integrity: sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.28.2': + resolution: {integrity: sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.28.2': + resolution: {integrity: sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.28.2': + resolution: {integrity: sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.28.2': + resolution: {integrity: sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.28.2': + resolution: {integrity: sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.28.2': + resolution: {integrity: sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.28.2': + resolution: {integrity: sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.10.1': resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -98,6 +457,321 @@ packages: resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} + '@img/colour@1.1.0': + resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==} + engines: {node: '>=18'} + + '@img/sharp-darwin-arm64@0.35.5': + resolution: {integrity: sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [darwin] + + '@img/sharp-darwin-x64@0.35.5': + resolution: {integrity: sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [darwin] + + '@img/sharp-freebsd-wasm32@0.35.5': + resolution: {integrity: sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw==} + engines: {node: '>=20.9.0'} + os: [freebsd] + + '@img/sharp-libvips-darwin-arm64@1.3.4': + resolution: {integrity: sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw==} + cpu: [arm64] + os: [darwin] + + '@img/sharp-libvips-darwin-x64@1.3.4': + resolution: {integrity: sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ==} + cpu: [x64] + os: [darwin] + + '@img/sharp-libvips-linux-arm64@1.3.4': + resolution: {integrity: sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linux-arm@1.3.4': + resolution: {integrity: sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw==} + cpu: [arm] + os: [linux] + + '@img/sharp-libvips-linux-ppc64@1.3.4': + resolution: {integrity: sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ==} + cpu: [ppc64] + os: [linux] + + '@img/sharp-libvips-linux-riscv64@1.3.4': + resolution: {integrity: sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q==} + cpu: [riscv64] + os: [linux] + + '@img/sharp-libvips-linux-s390x@1.3.4': + resolution: {integrity: sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ==} + cpu: [s390x] + os: [linux] + + '@img/sharp-libvips-linux-x64@1.3.4': + resolution: {integrity: sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw==} + cpu: [x64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-arm64@1.3.4': + resolution: {integrity: sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-x64@1.3.4': + resolution: {integrity: sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg==} + cpu: [x64] + os: [linux] + + '@img/sharp-linux-arm64@0.35.5': + resolution: {integrity: sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [linux] + + '@img/sharp-linux-arm@0.35.5': + resolution: {integrity: sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ==} + engines: {node: '>=20.9.0'} + cpu: [arm] + os: [linux] + + '@img/sharp-linux-ppc64@0.35.5': + resolution: {integrity: sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA==} + engines: {node: '>=20.9.0'} + cpu: [ppc64] + os: [linux] + + '@img/sharp-linux-riscv64@0.35.5': + resolution: {integrity: sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ==} + engines: {node: '>=20.9.0'} + cpu: [riscv64] + os: [linux] + + '@img/sharp-linux-s390x@0.35.5': + resolution: {integrity: sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA==} + engines: {node: '>=20.9.0'} + cpu: [s390x] + os: [linux] + + '@img/sharp-linux-x64@0.35.5': + resolution: {integrity: sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [linux] + + '@img/sharp-linuxmusl-arm64@0.35.5': + resolution: {integrity: sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [linux] + + '@img/sharp-linuxmusl-x64@0.35.5': + resolution: {integrity: sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [linux] + + '@img/sharp-wasm32@0.35.5': + resolution: {integrity: sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ==} + engines: {node: '>=20.9.0'} + + '@img/sharp-webcontainers-wasm32@0.35.5': + resolution: {integrity: sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA==} + engines: {node: '>=20.9.0'} + cpu: [wasm32] + + '@img/sharp-win32-arm64@0.35.5': + resolution: {integrity: sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [win32] + + '@img/sharp-win32-ia32@0.35.5': + resolution: {integrity: sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A==} + engines: {node: ^20.9.0} + cpu: [ia32] + os: [win32] + + '@img/sharp-win32-x64@0.35.5': + resolution: {integrity: sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [win32] + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@jridgewell/trace-mapping@0.3.9': + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + resolution: {integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==} + engines: {node: ^22.20 || ^24.12 || >=25} + cpu: [x64] + os: [linux] + + '@poppinss/colors@4.1.6': + resolution: {integrity: sha512-H9xkIdFswbS8n1d6vmRd8+c10t2Qe+rZITbbDHHkQixH5+2x1FDGmi/0K+WgWiqQFKPSlIYB7jlH6Kpfn6Fleg==} + + '@poppinss/dumper@0.6.5': + resolution: {integrity: sha512-NBdYIb90J7LfOI32dOewKI1r7wnkiH6m920puQ3qHUeZkxNkQiFnXVWoE6YtFSv6QOiPPf7ys6i+HWWecDz7sw==} + + '@poppinss/exception@1.2.3': + resolution: {integrity: sha512-dCED+QRChTVatE9ibtoaxc+WkdzOSjYTKi/+uacHWIsfodVfpsueo3+DKpgU5Px8qXjgmXkSvhXvSCz3fnP9lw==} + + '@rolldown/pluginutils@1.0.0-beta.47': + resolution: {integrity: sha512-8QagwMH3kNCuzD8EWL8R2YPW5e4OrHNSAHRFDdmFqEwEaD/KcNKjVoumo+gP2vW5eKB2UPbM6vTYiGZX0ixLnw==} + + '@rollup/rollup-android-arm-eabi@4.66.0': + resolution: {integrity: sha512-7y4XeoUHPecjfUDRmap8U0q6bjfLAPn7uOGT8BKyqy8uNDOjsGS8rlBhOx6sZLVwwjN6hapvGl2mW9/IS6UNww==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.66.0': + resolution: {integrity: sha512-e8WugYZXpgqrlMXLCudYVRAxAcK7AIY36JxRDwFRD38L9q62G1VsEUW6ijXxzjxYjNB8i1zo3B/ycIQ/qjLC/Q==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.66.0': + resolution: {integrity: sha512-6vkDCfyDjNLokh+Rt1D2KtNgFFMEPdkWha/mbtP4cSjh9xiN8T/JBS/A7nDYKjmMAXHrvR9J3AzUk2LtFbIBLg==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.66.0': + resolution: {integrity: sha512-/mzZAX0+Q6eXxvkR0HB0RZCCrsbmFD8DpsvCQoMYABDfq/DjqkbfytuJ7GvZ4AhR/Mgis2fXbZrGqfbcK2Z5fA==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.66.0': + resolution: {integrity: sha512-JQJx9E8tUjGqed1RevDmoHaS3V30ODdV8uyvGxlwd4K5se6bkPrMeltSybqAtpJ+ltDRfo7FORQaJG2Hd5nGog==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.66.0': + resolution: {integrity: sha512-GEaUQQjMaG7X1304qMgqLjzCKv6CdDirzJSS+UqUs3xhJ9X2Kjzu0JDbLoUU42FWxwmZqz+SsgU1SlQv9GNRVA==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.66.0': + resolution: {integrity: sha512-DgmAU9N0NhDQDzHgFUocDio7zRO8jR/nY/obDGvCR8zbJ6J77Fg6X49yPuExJUpYPbC82EOaRhG969pWzUSnHQ==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.66.0': + resolution: {integrity: sha512-zG09YZ+sk/HoHq+P9gYB0EseQ3M20RbDuKGWey6fbiMDV1LxfXvhgSW9jDaCcvFPMgfLXpimzXY+UYvA8R2mLQ==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.66.0': + resolution: {integrity: sha512-vlArhgyXbcVc1D4WZPoiYuqJIaMiSHBj6etRXua0KlfjlZeuiQyVAPYi0/N49O4mSp3u1iGUBLEjNa8ec81XZg==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.66.0': + resolution: {integrity: sha512-RxJZtk0G87YPotDaRDvRqStV8cbqLSC5TroHvQHHKsqBg0ok64RxKgtXeFsa7FBcy7mb4crBrG3xK8USWIqWNA==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loong64-gnu@4.66.0': + resolution: {integrity: sha512-qlGcw959PrLLkZhiBxF3OZ6SQvj+OKY85mCqGNgSRs4LZlDJ6ICqmz6UdxtINdhcXYwNIbZoapQVBAmZlD2hUQ==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-loong64-musl@4.66.0': + resolution: {integrity: sha512-TvTI/7Cy0WvRA1SXgwzu6bwXBnMpmeT/ln5q7WvSpqmXy1VbmEnY8HVIDQNBiaHJvoWqRr0M4FNo7qiqtyMaFw==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-ppc64-gnu@4.66.0': + resolution: {integrity: sha512-UZEDkSoDRZ50NyLj70nO6mpIK3dvs2cPTTvQb1bA/PBDmr9fvn5KiESuGfh6srd7Zi6Lt9Sv2sVrFr1QoHLvPQ==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-ppc64-musl@4.66.0': + resolution: {integrity: sha512-VRbxTvagLh3HRcysx1CNq+HHcvJbSebNI6fCbk7jwmmWHkXjrSIV3igXBpRHUTFdg0pagWGu50xoSZXnrZHjVQ==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.66.0': + resolution: {integrity: sha512-uWdJpvYqh0LE/i+YBL3sMX0a2kUkICENjmrPmyBmMOFc3jMrs6MSQH/pMD+VIpGEoUcr3XkHGLLfymzIqPSRRg==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-riscv64-musl@4.66.0': + resolution: {integrity: sha512-3FUd88pxgWAjK60OgCrika1AcNG+u8zaCdWjg4TlcZTDkt5TGyci8ZU64l3OJ9ax0MEjw3P80B/3PoSQDCLwJQ==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.66.0': + resolution: {integrity: sha512-qT2rMmgyej62g5AdwktK+Bt2lBu497pzWZe12TTQ5JmZjOYPnEwcPEAOSLTBxBV+6gIES75rXm219v/QkT397A==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.66.0': + resolution: {integrity: sha512-E46rnZgp7J84Qwe8RMlF+rgimnDo/9fuiGbUArGB0ZkMWf97O7yeSCfKls5x/YJOF0RcuSe9RctuKe1hlxICiA==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.66.0': + resolution: {integrity: sha512-Uz1HiZe+qBzqgdPsON+z0wRx3WdATuyzwvGT6cr2VZVrqqko0ZJVfkrQJtwDMuDcAfXYdo7XucaxJ7lTLjEcgg==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-openbsd-x64@4.66.0': + resolution: {integrity: sha512-Ph7TX3Ex5qdfcb7Tc6eEPugVkRfJ501eTovO4T5029YObfpZ7dzn3RiwpFvGp50nk2QUhvBMZ0PFGlEj6pOYTg==} + cpu: [x64] + os: [openbsd] + + '@rollup/rollup-openharmony-arm64@4.66.0': + resolution: {integrity: sha512-nZYPEya7ZkeNxUEiF7qmNZbyLTyRN3MK5cO22KqsaoneUzXJuzBIQRw+7BEQy9LGj2O5vrCE9V3EpK06FYo1tQ==} + cpu: [arm64] + os: [openharmony] + + '@rollup/rollup-win32-arm64-msvc@4.66.0': + resolution: {integrity: sha512-u7aTfS3R6C4hRsqXSzaO6qLZYLVuMkHMvcWlux4IM8IJif1VCl2cgPBSo5gSNoFoStQypQP+qwq8W1IyFBf1QQ==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.66.0': + resolution: {integrity: sha512-e+i9ueHrH1Bafb0cf0woAIVJbYcoC8vRaD+vz+Xi8w6jz9cYJSV3vyKO6ELGSZ6g4W4MJOm2WPLN4/nQf77h7w==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-gnu@4.66.0': + resolution: {integrity: sha512-KfTCbrtr2zXTqH2E1F+uYlFTrYibxHKqPAHobpd8Kfg49cEHmuHebOidCTDRgqG1suaPFX7oejFQeGE71zWKfA==} + cpu: [x64] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.66.0': + resolution: {integrity: sha512-xA+neBh1bqkqaS3b48T2UHZnDsTIpb9B0h+TdBzynjF/ymCpYndhfY10RqW0qSKB1HqqQA83mINVhAdwA+mETg==} + cpu: [x64] + os: [win32] + + '@sindresorhus/is@7.2.0': + resolution: {integrity: sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw==} + engines: {node: '>=18'} + + '@speed-highlight/core@1.2.24': + resolution: {integrity: sha512-qeW2e1l78afw8VhRPfPQ1Gjj+KU5XFQ/OFV5ti6eTa9bruO7mJyZtA4vw0ofqmA3tKCkROE9xLk3VZoeRc98nw==} + '@turbo/darwin-64@2.11.10': resolution: {integrity: sha512-By4idRap5+nLnMuRzLB4qkOPRlvNdyY1ne4VJYDyUoUB11H94k7uif9mbe3JT8JSNXs1D68uMcBj6hJ/jMQRvA==} cpu: [x64] @@ -128,12 +802,41 @@ packages: cpu: [arm64] os: [win32] + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.27.0': + resolution: {integrity: sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.28.0': + resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==} + + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/estree@1.0.9': resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@types/node@22.20.5': + resolution: {integrity: sha512-U2+DNr+wSjpsTS/wZGYHq7GcwfuSmKiKvoPvK22zwTlRhU91yOniN4qRR5KhIjvif7ysw/dz/hKmfDH0Ris4aA==} + + '@types/react-dom@19.2.3': + resolution: {integrity: sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==} + peerDependencies: + '@types/react': ^19.2.0 + + '@types/react@19.2.7': + resolution: {integrity: sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==} + '@typescript-eslint/eslint-plugin@8.72.1': resolution: {integrity: sha512-5CokTWXpmbylfFabsbvHC0CAw3XLaGnoa+nFJX5FR592h/LoZsENUE6p/rg5xvkKrFEXz6pYmgI29AgXc2N3BQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -193,6 +896,41 @@ packages: resolution: {integrity: sha512-SB8xqipSzZHUePCCLNeYxqnxq83X61/qzNhjQGbTfjxGZIeOEP7tBgWYX05Tcd6CgE02WdTJnh5b8kMZJ/+bnQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@vitejs/plugin-react@5.1.1': + resolution: {integrity: sha512-WQfkSw0QbQ5aJ2CHYw23ZGkqnRwqKHD/KYsMeTkZzPT4Jcf0DcBxBtwMJxnu6E7oxw5+JC6ZAiePgh28uJ1HBA==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 + + '@vitest/expect@3.2.7': + resolution: {integrity: sha512-E8eBXaKibuvH2pSZErOjdVb5vF4PbKYcrnluBTYxEk1l/VhhwZg1kZQsdtjq+CsF5CFydf2Rdkz7jDHKSisi3w==} + + '@vitest/mocker@3.2.7': + resolution: {integrity: sha512-Trr0hYO9CM3Wj6ksWHRhK9IZpIY6wTMO5u/MqXurMxT57sWBaOPEtP3Oq60ihZuh5JsiagKfz95OcxdEP6dBrA==} + peerDependencies: + msw: ^2.4.9 + vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@3.2.7': + resolution: {integrity: sha512-KUHlwqVu0sRlhCdyPdQ/wBoTfRahjUky1MubOmYw9fWfIZy1gNoHpuaaQBPAaMaVYdQYHJLurzj8ECCj5OwTqA==} + + '@vitest/runner@3.2.7': + resolution: {integrity: sha512-sB9y4ovltoQP+WaUPwmSxO9WIg9Ig694Di5PalVPsYHklAdE027mehpWF2SQSVq+k6sFgaivbTjTJwZLSHbedA==} + + '@vitest/snapshot@3.2.7': + resolution: {integrity: sha512-7C+MwShwtBSI5Buwoyg3s/iY1eHL9PKAf+O1wVh/TdnjXUtkoL/9YQtre90i4MtNXM6edP1wJ2zOBpfCyhIS7g==} + + '@vitest/spy@3.2.7': + resolution: {integrity: sha512-Q2eQGI6d2L/hBtZ0qNuKcAGid68XK6cv1xsoaIma6PaJhHPoqcEJhYpXZ/5myCMqkNgtP6UKuBhbc0nHKnrkuQ==} + + '@vitest/utils@3.2.7': + resolution: {integrity: sha512-x6BDOd7dyo3PFLY3I9/HJ25X/6OurhGXk2/B9gOZNPF7XDVjeBK4k01lQE5uvDpbuheErh91qYuE1E2OEjK3Rw==} + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -213,6 +951,10 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -220,6 +962,14 @@ packages: resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} engines: {node: 18 || 20 || >=22} + baseline-browser-mapping@2.11.34: + resolution: {integrity: sha512-Aqr8mA1kIvyJ3UY5YAY7ib8LSo1DmDMbMnVqGPtsKW1LxaFQFwn9Eb3yvq2fUKJsRvaXjnAV7R5osqETapzNiA==} + engines: {node: '>=6.0.0'} + hasBin: true + + blake3-wasm@2.1.5: + resolution: {integrity: sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==} + brace-expansion@1.1.21: resolution: {integrity: sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==} @@ -227,14 +977,34 @@ packages: resolution: {integrity: sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==} engines: {node: 20 || >=22} - callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} + browserslist@4.29.5: + resolution: {integrity: sha512-khTmKu5NGYTotqcYo8Bew2k4RAE9PuXRSFRXG2lQBrCEQHyeQ/vX6gKMxfokwywBsLiXZMnHsmWMG1pnO8J7uQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + caniuse-lite@1.0.30001819: + resolution: {integrity: sha512-LFUqIIAwpzsIuevnKnsR9qnStBcgzPShTX61lBwN9uFkkf8o8zLiebEjbW8AYtZiF+1YKDWfdt/pWDtMuG8Xwg==} + + chai@5.3.3: + resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==} + engines: {node: '>=18'} chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} + check-error@2.1.3: + resolution: {integrity: sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==} + engines: {node: '>= 16'} + color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} @@ -245,10 +1015,20 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + cookie@1.1.1: + resolution: {integrity: sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==} + engines: {node: '>=18'} + cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + debug@4.4.3: resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} engines: {node: '>=6.0'} @@ -258,9 +1038,35 @@ packages: supports-color: optional: true + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + electron-to-chromium@1.5.467: + resolution: {integrity: sha512-Nw9X371rtZmYcBSnEijnCDONILjs93biCZO34juC7MBOmK8E+GFnyD4T/WvyrlJkppul7oxg6TwvtKst9SODTw==} + + error-stack-parser-es@1.0.5: + resolution: {integrity: sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA==} + + es-module-lexer@1.7.0: + resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} + + esbuild@0.28.2: + resolution: {integrity: sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==} + engines: {node: '>=18'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -308,10 +1114,17 @@ packages: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -345,6 +1158,15 @@ packages: flatted@3.4.4: resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==} + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + glob-parent@6.0.2: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} @@ -357,6 +1179,10 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} + hono@4.11.1: + resolution: {integrity: sha512-KsFcH0xxHes0J4zaQgWbYwmz3UPOOskdqZmItstUG93+Wk1ePBLkLGwbP9zlmh1BFUiL8Qp+Xfu9P7feJWpGNg==} + engines: {node: '>=16.9.0'} + ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -384,10 +1210,21 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + js-yaml@4.3.2: resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} hasBin: true + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} @@ -397,9 +1234,21 @@ packages: json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + kleur@4.1.5: + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} + levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -411,6 +1260,19 @@ packages: lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + loupe@3.2.1: + resolution: {integrity: sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==} + + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + + miniflare@5.20261023.2-beta: + resolution: {integrity: sha512-sXpZloQnIUe4raXXdwwqd2ioRHox9a/1B4nB2/p4JWKDwGuVgEK4DugCNgIeQf0iVuSgBItdYpodJe4iwY6SrQ==} + engines: {node: '>=22.0.0'} + minimatch@10.2.6: resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==} engines: {node: 18 || 20 || >=22} @@ -421,9 +1283,18 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + nanoid@3.3.20: + resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + node-releases@2.0.60: + resolution: {integrity: sha512-OmO8+GM1JUZqXET720VrJCwkjUCXmCMQm0Z3UDDRbfNLHS4NEAvY60j5jiFv0tkKw2PNNlqOLhahVmwJIOLDIQ==} + engines: {node: '>=18'} + optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -448,10 +1319,27 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} + path-to-regexp@6.3.0: + resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} + + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + pathval@2.0.1: + resolution: {integrity: sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==} + engines: {node: '>= 14.16'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + picomatch@4.0.7: resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} engines: {node: '>=12'} + postcss@8.5.32: + resolution: {integrity: sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==} + engines: {node: ^10 || ^12 || >=14} + prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -460,15 +1348,49 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + react-dom@19.2.1: + resolution: {integrity: sha512-ibrK8llX2a4eOskq1mXKu/TGZj9qzomO+sNfO98M6d9zIPOEhlBkMkBUBLd1vgS0gQsLDBzA+8jJBVXDnfHmJg==} + peerDependencies: + react: ^19.2.1 + + react-refresh@0.18.0: + resolution: {integrity: sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==} + engines: {node: '>=0.10.0'} + + react@19.2.1: + resolution: {integrity: sha512-DGrYcCWK7tvYMnWh79yrPHt+vdx9tY+1gPZa7nJQtO/p8bLTDaHp4dzwEhQB7pZ4Xe3ok4XKuEPrVuc+wlpkmw==} + engines: {node: '>=0.10.0'} + resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} + rollup@4.66.0: + resolution: {integrity: sha512-Onq6/qO4ARhxIs+jYiHE0pYehadLyMECAiGEqQ+0/aWND3+2PmifJIIqBLYtuBODqHTlOUEQFtIVPyCy0Lck7A==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + scheduler@0.27.0: + resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==} + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + semver@7.8.5: resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} engines: {node: '>=10'} hasBin: true + sharp@0.35.5: + resolution: {integrity: sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g==} + engines: {node: '>=20.9.0'} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -477,116 +1399,737 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + + source-map-js@1.2.2: + resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} + engines: {node: '>=0.10.0'} + + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + std-env@3.10.0: + resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} + strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} + strip-literal@3.1.0: + resolution: {integrity: sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==} + + supports-color@10.2.2: + resolution: {integrity: sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==} + engines: {node: '>=18'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + tinypool@1.1.1: + resolution: {integrity: sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@2.0.0: + resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} + engines: {node: '>=14.0.0'} + + tinyspy@4.0.6: + resolution: {integrity: sha512-u8KszXvGfU68hVcZpRHKG28T0krMuv2G5nDhiHaMLen/gIuFEgIJhaJuO69qjnXg5paSrbPMFfx3brNuN8eVSg==} + engines: {node: '>=14.0.0'} + + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + turbo@2.11.10: + resolution: {integrity: sha512-3GJYwig8ygEI89oaOZdduJX8/aw6O9eRPYHoIt6T3FZl9hkKjiyIspufJoVgqXihPoJu8M5CSV0DlZvzfohBCw==} + hasBin: true + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + typescript@5.9.3: + resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + + undici@7.30.1: + resolution: {integrity: sha512-03KrMbjIFDWQR5RNPrSw3bd1r12JpyFQl9/yxjUbJtqkjmllqC5lFjZh6ujeuJCKr8EOQvRW872Oy/az+nLYxg==} + engines: {node: '>=20.18.1'} + + unenv@2.0.0-rc.24: + resolution: {integrity: sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==} + + update-browserslist-db@1.3.4: + resolution: {integrity: sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + vite-node@3.2.4: + resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + + vite@7.3.7: + resolution: {integrity: sha512-AHEzTORMbi7/7aXp7w7KZ5+DCUdSeLsJz0grY8xHpc9DHdYb0vQu6DqJfm2tOw3gDExNgPgnJTXxM6syYFHaCA==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + jiti: '>=1.21.0' + less: ^4.0.0 + lightningcss: ^1.21.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@3.2.7: + resolution: {integrity: sha512-KrxIJ62Fd89gfysR4WotlgZABiz2dqFPgqGzX7s+CwsqLFomRH7777ZcrOD6+WVAh7khPQP41A+BKbpcJFrdEg==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/debug': ^4.1.12 + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + '@vitest/browser': 3.2.7 + '@vitest/ui': 3.2.7 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/debug': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + workerd@1.20261023.1: + resolution: {integrity: sha512-NeofJFyaYNpqKpFRJW3ApuonaerPd6/JWlfTtLDYf2A6ygqrDEFnYgEXmc0hhOxqnJsSM+kXJN6VebPojzRrsg==} + engines: {node: '>=16'} + hasBin: true + + wrangler@4.155.0: + resolution: {integrity: sha512-gBKtAg2e0abQDvXPRQu611YMTd/cfAaJTOLAs/89tTxFxEeUyC260MRJRK+m3gLmQjDYWFwJv+ErwuJ/GuALpA==} + engines: {node: '>=22.0.0'} + hasBin: true + peerDependencies: + '@cloudflare/workers-types': ^5.20261023.1 + peerDependenciesMeta: + '@cloudflare/workers-types': + optional: true + + ws@8.21.0: + resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + + youch-core@0.3.3: + resolution: {integrity: sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA==} + + youch@4.1.0-beta.10: + resolution: {integrity: sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ==} + +snapshots: + + '@babel/code-frame@7.29.7': + dependencies: + '@babel/helper-validator-identifier': 7.29.7 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.29.7': {} + + '@babel/core@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.8 + '@babel/helper-compilation-targets': 7.29.7 + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/helpers': 7.29.10 + '@babel/parser': 7.29.11 + '@babel/template': 7.29.7 + '@babel/traverse': 7.29.10 + '@babel/types': 7.29.11 + '@jridgewell/remapping': 2.3.5 + convert-source-map: 2.0.0 + debug: 4.4.3 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.29.8': + dependencies: + '@babel/parser': 7.29.11 + '@babel/types': 7.29.11 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + jsesc: 3.1.0 + + '@babel/helper-compilation-targets@7.29.7': + dependencies: + '@babel/compat-data': 7.29.7 + '@babel/helper-validator-option': 7.29.7 + browserslist: 4.29.5 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-globals@7.29.7': {} + + '@babel/helper-module-imports@7.29.7': + dependencies: + '@babel/traverse': 7.29.10 + '@babel/types': 7.29.11 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-module-imports': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + '@babel/traverse': 7.29.10 + transitivePeerDependencies: + - supports-color + + '@babel/helper-plugin-utils@7.29.7': {} + + '@babel/helper-string-parser@7.29.11': {} + + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/helper-validator-option@7.29.7': {} + + '@babel/helpers@7.29.10': + dependencies: + '@babel/template': 7.29.7 + '@babel/types': 7.29.11 + + '@babel/parser@7.29.11': + dependencies: + '@babel/types': 7.29.11 + + '@babel/plugin-transform-react-jsx-self@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-transform-react-jsx-source@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/template@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/parser': 7.29.11 + '@babel/types': 7.29.11 + + '@babel/traverse@7.29.10': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.8 + '@babel/helper-globals': 7.29.7 + '@babel/parser': 7.29.11 + '@babel/template': 7.29.7 + '@babel/types': 7.29.11 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.29.11': + dependencies: + '@babel/helper-string-parser': 7.29.11 + '@babel/helper-validator-identifier': 7.29.7 + + '@cloudflare/kv-asset-handler@0.5.0': {} + + '@cloudflare/unenv-preset@2.16.2(unenv@2.0.0-rc.24)(workerd@1.20261023.1)': + dependencies: + unenv: 2.0.0-rc.24 + optionalDependencies: + workerd: 1.20261023.1 + + '@cloudflare/workerd-darwin-64@1.20261023.1': + optional: true + + '@cloudflare/workerd-darwin-arm64@1.20261023.1': + optional: true + + '@cloudflare/workerd-linux-64@1.20261023.1': + optional: true + + '@cloudflare/workerd-linux-arm64@1.20261023.1': + optional: true + + '@cloudflare/workerd-windows-64@1.20261023.1': + optional: true + + '@cloudflare/workers-types@4.20260702.1': {} + + '@cspotcode/source-map-support@0.8.1': + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + + '@emnapi/runtime@1.11.3': + dependencies: + tslib: 2.8.1 + optional: true + + '@esbuild/aix-ppc64@0.28.2': + optional: true + + '@esbuild/android-arm64@0.28.2': + optional: true + + '@esbuild/android-arm@0.28.2': + optional: true + + '@esbuild/android-x64@0.28.2': + optional: true + + '@esbuild/darwin-arm64@0.28.2': + optional: true + + '@esbuild/darwin-x64@0.28.2': + optional: true + + '@esbuild/freebsd-arm64@0.28.2': + optional: true + + '@esbuild/freebsd-x64@0.28.2': + optional: true + + '@esbuild/linux-arm64@0.28.2': + optional: true + + '@esbuild/linux-arm@0.28.2': + optional: true + + '@esbuild/linux-ia32@0.28.2': + optional: true + + '@esbuild/linux-loong64@0.28.2': + optional: true + + '@esbuild/linux-mips64el@0.28.2': + optional: true + + '@esbuild/linux-ppc64@0.28.2': + optional: true + + '@esbuild/linux-riscv64@0.28.2': + optional: true + + '@esbuild/linux-s390x@0.28.2': + optional: true + + '@esbuild/linux-x64@0.28.2': + optional: true + + '@esbuild/netbsd-arm64@0.28.2': + optional: true + + '@esbuild/netbsd-x64@0.28.2': + optional: true + + '@esbuild/openbsd-arm64@0.28.2': + optional: true + + '@esbuild/openbsd-x64@0.28.2': + optional: true + + '@esbuild/openharmony-arm64@0.28.2': + optional: true + + '@esbuild/sunos-x64@0.28.2': + optional: true + + '@esbuild/win32-arm64@0.28.2': + optional: true + + '@esbuild/win32-ia32@0.28.2': + optional: true + + '@esbuild/win32-x64@0.28.2': + optional: true + + '@eslint-community/eslint-utils@4.10.1(eslint@9.39.5)': + dependencies: + eslint: 9.39.5 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.2': {} + + '@eslint/config-array@0.21.2': + dependencies: + '@eslint/object-schema': 2.1.7 + debug: 4.4.3 + minimatch: 3.1.5 + transitivePeerDependencies: + - supports-color + + '@eslint/config-helpers@0.4.2': + dependencies: + '@eslint/core': 0.17.0 + + '@eslint/core@0.17.0': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/eslintrc@3.3.7': + dependencies: + ajv: 6.15.0 + debug: 4.4.3 + espree: 10.4.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.1 + js-yaml: 4.3.2 + minimatch: 3.1.5 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@9.39.5': {} + + '@eslint/object-schema@2.1.7': {} + + '@eslint/plugin-kit@0.4.1': + dependencies: + '@eslint/core': 0.17.0 + levn: 0.4.1 + + '@humanfs/core@0.19.2': + dependencies: + '@humanfs/types': 0.15.0 + + '@humanfs/node@0.16.8': + dependencies: + '@humanfs/core': 0.19.2 + '@humanfs/types': 0.15.0 + '@humanwhocodes/retry': 0.4.3 + + '@humanfs/types@0.15.0': {} + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.4.3': {} + + '@img/colour@1.1.0': {} + + '@img/sharp-darwin-arm64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-darwin-arm64': 1.3.4 + optional: true + + '@img/sharp-darwin-x64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-darwin-x64': 1.3.4 + optional: true + + '@img/sharp-freebsd-wasm32@0.35.5': + dependencies: + '@img/sharp-wasm32': 0.35.5 + optional: true + + '@img/sharp-libvips-darwin-arm64@1.3.4': + optional: true + + '@img/sharp-libvips-darwin-x64@1.3.4': + optional: true + + '@img/sharp-libvips-linux-arm64@1.3.4': + optional: true + + '@img/sharp-libvips-linux-arm@1.3.4': + optional: true + + '@img/sharp-libvips-linux-ppc64@1.3.4': + optional: true + + '@img/sharp-libvips-linux-riscv64@1.3.4': + optional: true + + '@img/sharp-libvips-linux-s390x@1.3.4': + optional: true + + '@img/sharp-libvips-linux-x64@1.3.4': + optional: true + + '@img/sharp-libvips-linuxmusl-arm64@1.3.4': + optional: true + + '@img/sharp-libvips-linuxmusl-x64@1.3.4': + optional: true + + '@img/sharp-linux-arm64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm64': 1.3.4 + optional: true + + '@img/sharp-linux-arm@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm': 1.3.4 + optional: true + + '@img/sharp-linux-ppc64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linux-ppc64': 1.3.4 + optional: true + + '@img/sharp-linux-riscv64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linux-riscv64': 1.3.4 + optional: true + + '@img/sharp-linux-s390x@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linux-s390x': 1.3.4 + optional: true + + '@img/sharp-linux-x64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linux-x64': 1.3.4 + optional: true + + '@img/sharp-linuxmusl-arm64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-arm64': 1.3.4 + optional: true + + '@img/sharp-linuxmusl-x64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-x64': 1.3.4 + optional: true + + '@img/sharp-wasm32@0.35.5': + dependencies: + '@emnapi/runtime': 1.11.3 + optional: true + + '@img/sharp-webcontainers-wasm32@0.35.5': + dependencies: + '@img/sharp-wasm32': 0.35.5 + optional: true + + '@img/sharp-win32-arm64@0.35.5': + optional: true + + '@img/sharp-win32-ia32@0.35.5': + optional: true + + '@img/sharp-win32-x64@0.35.5': + optional: true + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/sourcemap-codec@1.6.0': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.6.0 + + '@jridgewell/trace-mapping@0.3.9': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.6.0 + + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + optional: true + + '@poppinss/colors@4.1.6': + dependencies: + kleur: 4.1.5 + + '@poppinss/dumper@0.6.5': + dependencies: + '@poppinss/colors': 4.1.6 + '@sindresorhus/is': 7.2.0 + supports-color: 10.2.2 + + '@poppinss/exception@1.2.3': {} + + '@rolldown/pluginutils@1.0.0-beta.47': {} + + '@rollup/rollup-android-arm-eabi@4.66.0': + optional: true + + '@rollup/rollup-android-arm64@4.66.0': + optional: true + + '@rollup/rollup-darwin-arm64@4.66.0': + optional: true - tinyglobby@0.2.17: - resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} - engines: {node: '>=12.0.0'} + '@rollup/rollup-darwin-x64@4.66.0': + optional: true - ts-api-utils@2.5.0: - resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} - engines: {node: '>=18.12'} - peerDependencies: - typescript: '>=4.8.4' + '@rollup/rollup-freebsd-arm64@4.66.0': + optional: true - turbo@2.11.10: - resolution: {integrity: sha512-3GJYwig8ygEI89oaOZdduJX8/aw6O9eRPYHoIt6T3FZl9hkKjiyIspufJoVgqXihPoJu8M5CSV0DlZvzfohBCw==} - hasBin: true + '@rollup/rollup-freebsd-x64@4.66.0': + optional: true - type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} + '@rollup/rollup-linux-arm-gnueabihf@4.66.0': + optional: true - typescript@5.9.3: - resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} - engines: {node: '>=14.17'} - hasBin: true + '@rollup/rollup-linux-arm-musleabihf@4.66.0': + optional: true - uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + '@rollup/rollup-linux-arm64-gnu@4.66.0': + optional: true - which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true + '@rollup/rollup-linux-arm64-musl@4.66.0': + optional: true - word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} + '@rollup/rollup-linux-loong64-gnu@4.66.0': + optional: true - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} + '@rollup/rollup-linux-loong64-musl@4.66.0': + optional: true -snapshots: + '@rollup/rollup-linux-ppc64-gnu@4.66.0': + optional: true - '@eslint-community/eslint-utils@4.10.1(eslint@9.39.5)': - dependencies: - eslint: 9.39.5 - eslint-visitor-keys: 3.4.3 + '@rollup/rollup-linux-ppc64-musl@4.66.0': + optional: true - '@eslint-community/regexpp@4.12.2': {} + '@rollup/rollup-linux-riscv64-gnu@4.66.0': + optional: true - '@eslint/config-array@0.21.2': - dependencies: - '@eslint/object-schema': 2.1.7 - debug: 4.4.3 - minimatch: 3.1.5 - transitivePeerDependencies: - - supports-color + '@rollup/rollup-linux-riscv64-musl@4.66.0': + optional: true - '@eslint/config-helpers@0.4.2': - dependencies: - '@eslint/core': 0.17.0 + '@rollup/rollup-linux-s390x-gnu@4.66.0': + optional: true - '@eslint/core@0.17.0': - dependencies: - '@types/json-schema': 7.0.15 + '@rollup/rollup-linux-x64-gnu@4.66.0': + optional: true - '@eslint/eslintrc@3.3.7': - dependencies: - ajv: 6.15.0 - debug: 4.4.3 - espree: 10.4.0 - globals: 14.0.0 - ignore: 5.3.2 - import-fresh: 3.3.1 - js-yaml: 4.3.2 - minimatch: 3.1.5 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color + '@rollup/rollup-linux-x64-musl@4.66.0': + optional: true - '@eslint/js@9.39.5': {} + '@rollup/rollup-openbsd-x64@4.66.0': + optional: true - '@eslint/object-schema@2.1.7': {} + '@rollup/rollup-openharmony-arm64@4.66.0': + optional: true - '@eslint/plugin-kit@0.4.1': - dependencies: - '@eslint/core': 0.17.0 - levn: 0.4.1 + '@rollup/rollup-win32-arm64-msvc@4.66.0': + optional: true - '@humanfs/core@0.19.2': - dependencies: - '@humanfs/types': 0.15.0 + '@rollup/rollup-win32-ia32-msvc@4.66.0': + optional: true - '@humanfs/node@0.16.8': - dependencies: - '@humanfs/core': 0.19.2 - '@humanfs/types': 0.15.0 - '@humanwhocodes/retry': 0.4.3 + '@rollup/rollup-win32-x64-gnu@4.66.0': + optional: true - '@humanfs/types@0.15.0': {} + '@rollup/rollup-win32-x64-msvc@4.66.0': + optional: true - '@humanwhocodes/module-importer@1.0.1': {} + '@sindresorhus/is@7.2.0': {} - '@humanwhocodes/retry@0.4.3': {} + '@speed-highlight/core@1.2.24': {} '@turbo/darwin-64@2.11.10': optional: true @@ -606,10 +2149,50 @@ snapshots: '@turbo/windows-arm64@2.11.10': optional: true + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.29.11 + '@babel/types': 7.29.11 + '@types/babel__generator': 7.27.0 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.28.0 + + '@types/babel__generator@7.27.0': + dependencies: + '@babel/types': 7.29.11 + + '@types/babel__template@7.4.4': + dependencies: + '@babel/parser': 7.29.11 + '@babel/types': 7.29.11 + + '@types/babel__traverse@7.28.0': + dependencies: + '@babel/types': 7.29.11 + + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + '@types/estree@1.0.9': {} '@types/json-schema@7.0.15': {} + '@types/node@22.20.5': + dependencies: + undici-types: 6.21.0 + + '@types/react-dom@19.2.3(@types/react@19.2.7)': + dependencies: + '@types/react': 19.2.7 + + '@types/react@19.2.7': + dependencies: + csstype: 3.2.3 + '@typescript-eslint/eslint-plugin@8.72.1(@typescript-eslint/parser@8.72.1(eslint@9.39.5)(typescript@5.9.3))(eslint@9.39.5)(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 @@ -701,6 +2284,60 @@ snapshots: '@typescript-eslint/types': 8.72.1 eslint-visitor-keys: 5.0.1 + '@vitejs/plugin-react@5.1.1(vite@7.3.7(@types/node@22.20.5))': + dependencies: + '@babel/core': 7.29.7 + '@babel/plugin-transform-react-jsx-self': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-react-jsx-source': 7.29.7(@babel/core@7.29.7) + '@rolldown/pluginutils': 1.0.0-beta.47 + '@types/babel__core': 7.20.5 + react-refresh: 0.18.0 + vite: 7.3.7(@types/node@22.20.5) + transitivePeerDependencies: + - supports-color + + '@vitest/expect@3.2.7': + dependencies: + '@types/chai': 5.2.3 + '@vitest/spy': 3.2.7 + '@vitest/utils': 3.2.7 + chai: 5.3.3 + tinyrainbow: 2.0.0 + + '@vitest/mocker@3.2.7(vite@7.3.7(@types/node@22.20.5))': + dependencies: + '@vitest/spy': 3.2.7 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: 7.3.7(@types/node@22.20.5) + + '@vitest/pretty-format@3.2.7': + dependencies: + tinyrainbow: 2.0.0 + + '@vitest/runner@3.2.7': + dependencies: + '@vitest/utils': 3.2.7 + pathe: 2.0.3 + strip-literal: 3.1.0 + + '@vitest/snapshot@3.2.7': + dependencies: + '@vitest/pretty-format': 3.2.7 + magic-string: 0.30.21 + pathe: 2.0.3 + + '@vitest/spy@3.2.7': + dependencies: + tinyspy: 4.0.6 + + '@vitest/utils@3.2.7': + dependencies: + '@vitest/pretty-format': 3.2.7 + loupe: 3.2.1 + tinyrainbow: 2.0.0 + acorn-jsx@5.3.2(acorn@8.19.0): dependencies: acorn: 8.19.0 @@ -720,10 +2357,16 @@ snapshots: argparse@2.0.1: {} + assertion-error@2.0.1: {} + balanced-match@1.0.2: {} balanced-match@4.0.4: {} + baseline-browser-mapping@2.11.34: {} + + blake3-wasm@2.1.5: {} + brace-expansion@1.1.21: dependencies: balanced-match: 1.0.2 @@ -733,13 +2376,35 @@ snapshots: dependencies: balanced-match: 4.0.4 + browserslist@4.29.5: + dependencies: + baseline-browser-mapping: 2.11.34 + caniuse-lite: 1.0.30001819 + electron-to-chromium: 1.5.467 + node-releases: 2.0.60 + update-browserslist-db: 1.3.4(browserslist@4.29.5) + + cac@6.7.14: {} + callsites@3.1.0: {} + caniuse-lite@1.0.30001819: {} + + chai@5.3.3: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.3 + deep-eql: 5.0.2 + loupe: 3.2.1 + pathval: 2.0.1 + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 + check-error@2.1.3: {} + color-convert@2.0.1: dependencies: color-name: 1.1.4 @@ -748,18 +2413,65 @@ snapshots: concat-map@0.0.1: {} + convert-source-map@2.0.0: {} + + cookie@1.1.1: {} + cross-spawn@7.0.6: dependencies: path-key: 3.1.1 shebang-command: 2.0.0 which: 2.0.2 + csstype@3.2.3: {} + debug@4.4.3: dependencies: ms: 2.1.3 + deep-eql@5.0.2: {} + deep-is@0.1.4: {} + detect-libc@2.1.2: {} + + electron-to-chromium@1.5.467: {} + + error-stack-parser-es@1.0.5: {} + + es-module-lexer@1.7.0: {} + + esbuild@0.28.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.28.2 + '@esbuild/android-arm': 0.28.2 + '@esbuild/android-arm64': 0.28.2 + '@esbuild/android-x64': 0.28.2 + '@esbuild/darwin-arm64': 0.28.2 + '@esbuild/darwin-x64': 0.28.2 + '@esbuild/freebsd-arm64': 0.28.2 + '@esbuild/freebsd-x64': 0.28.2 + '@esbuild/linux-arm': 0.28.2 + '@esbuild/linux-arm64': 0.28.2 + '@esbuild/linux-ia32': 0.28.2 + '@esbuild/linux-loong64': 0.28.2 + '@esbuild/linux-mips64el': 0.28.2 + '@esbuild/linux-ppc64': 0.28.2 + '@esbuild/linux-riscv64': 0.28.2 + '@esbuild/linux-s390x': 0.28.2 + '@esbuild/linux-x64': 0.28.2 + '@esbuild/netbsd-arm64': 0.28.2 + '@esbuild/netbsd-x64': 0.28.2 + '@esbuild/openbsd-arm64': 0.28.2 + '@esbuild/openbsd-x64': 0.28.2 + '@esbuild/openharmony-arm64': 0.28.2 + '@esbuild/sunos-x64': 0.28.2 + '@esbuild/win32-arm64': 0.28.2 + '@esbuild/win32-ia32': 0.28.2 + '@esbuild/win32-x64': 0.28.2 + + escalade@3.2.0: {} + escape-string-regexp@4.0.0: {} eslint-scope@8.4.0: @@ -828,8 +2540,14 @@ snapshots: estraverse@5.3.0: {} + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.9 + esutils@2.0.3: {} + expect-type@1.4.0: {} + fast-deep-equal@3.1.3: {} fast-json-stable-stringify@2.1.0: {} @@ -856,6 +2574,11 @@ snapshots: flatted@3.4.4: {} + fsevents@2.3.3: + optional: true + + gensync@1.0.0-beta.2: {} + glob-parent@6.0.2: dependencies: is-glob: 4.0.3 @@ -864,6 +2587,8 @@ snapshots: has-flag@4.0.0: {} + hono@4.11.1: {} + ignore@5.3.2: {} ignore@7.0.14: {} @@ -883,20 +2608,32 @@ snapshots: isexe@2.0.0: {} + js-tokens@4.0.0: {} + + js-tokens@9.0.1: {} + js-yaml@4.3.2: dependencies: argparse: 2.0.1 + jsesc@3.1.0: {} + json-buffer@3.0.1: {} json-schema-traverse@0.4.1: {} json-stable-stringify-without-jsonify@1.0.1: {} + json5@2.2.3: {} + + jsonc-parser@3.3.1: {} + keyv@4.5.4: dependencies: json-buffer: 3.0.1 + kleur@4.1.5: {} + levn@0.4.1: dependencies: prelude-ls: 1.2.1 @@ -908,6 +2645,29 @@ snapshots: lodash.merge@4.6.2: {} + loupe@3.2.1: {} + + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + + miniflare@5.20261023.2-beta(@types/node@22.20.5): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + sharp: 0.35.5(@types/node@22.20.5) + undici: 7.30.1 + workerd: 1.20261023.1 + ws: 8.21.0 + youch: 4.1.0-beta.10 + transitivePeerDependencies: + - '@types/node' + - bufferutil + - utf-8-validate + minimatch@10.2.6: dependencies: brace-expansion: 5.0.12 @@ -918,8 +2678,12 @@ snapshots: ms@2.1.3: {} + nanoid@3.3.20: {} + natural-compare@1.4.0: {} + node-releases@2.0.60: {} + optionator@0.9.4: dependencies: deep-is: 0.1.4 @@ -945,37 +2709,156 @@ snapshots: path-key@3.1.1: {} + path-to-regexp@6.3.0: {} + + pathe@2.0.3: {} + + pathval@2.0.1: {} + + picocolors@1.1.1: {} + picomatch@4.0.7: {} + postcss@8.5.32: + dependencies: + nanoid: 3.3.20 + picocolors: 1.1.1 + source-map-js: 1.2.2 + prelude-ls@1.2.1: {} punycode@2.3.1: {} + react-dom@19.2.1(react@19.2.1): + dependencies: + react: 19.2.1 + scheduler: 0.27.0 + + react-refresh@0.18.0: {} + + react@19.2.1: {} + resolve-from@4.0.0: {} + rollup@4.66.0: + dependencies: + '@types/estree': 1.0.9 + optionalDependencies: + '@napi-rs/lzma-linux-x64-gnu': 1.5.1 + '@rollup/rollup-android-arm-eabi': 4.66.0 + '@rollup/rollup-android-arm64': 4.66.0 + '@rollup/rollup-darwin-arm64': 4.66.0 + '@rollup/rollup-darwin-x64': 4.66.0 + '@rollup/rollup-freebsd-arm64': 4.66.0 + '@rollup/rollup-freebsd-x64': 4.66.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.66.0 + '@rollup/rollup-linux-arm-musleabihf': 4.66.0 + '@rollup/rollup-linux-arm64-gnu': 4.66.0 + '@rollup/rollup-linux-arm64-musl': 4.66.0 + '@rollup/rollup-linux-loong64-gnu': 4.66.0 + '@rollup/rollup-linux-loong64-musl': 4.66.0 + '@rollup/rollup-linux-ppc64-gnu': 4.66.0 + '@rollup/rollup-linux-ppc64-musl': 4.66.0 + '@rollup/rollup-linux-riscv64-gnu': 4.66.0 + '@rollup/rollup-linux-riscv64-musl': 4.66.0 + '@rollup/rollup-linux-s390x-gnu': 4.66.0 + '@rollup/rollup-linux-x64-gnu': 4.66.0 + '@rollup/rollup-linux-x64-musl': 4.66.0 + '@rollup/rollup-openbsd-x64': 4.66.0 + '@rollup/rollup-openharmony-arm64': 4.66.0 + '@rollup/rollup-win32-arm64-msvc': 4.66.0 + '@rollup/rollup-win32-ia32-msvc': 4.66.0 + '@rollup/rollup-win32-x64-gnu': 4.66.0 + '@rollup/rollup-win32-x64-msvc': 4.66.0 + fsevents: 2.3.3 + + scheduler@0.27.0: {} + + semver@6.3.1: {} + semver@7.8.5: {} + sharp@0.35.5(@types/node@22.20.5): + dependencies: + '@img/colour': 1.1.0 + detect-libc: 2.1.2 + semver: 7.8.5 + optionalDependencies: + '@img/sharp-darwin-arm64': 0.35.5 + '@img/sharp-darwin-x64': 0.35.5 + '@img/sharp-freebsd-wasm32': 0.35.5 + '@img/sharp-libvips-darwin-arm64': 1.3.4 + '@img/sharp-libvips-darwin-x64': 1.3.4 + '@img/sharp-libvips-linux-arm': 1.3.4 + '@img/sharp-libvips-linux-arm64': 1.3.4 + '@img/sharp-libvips-linux-ppc64': 1.3.4 + '@img/sharp-libvips-linux-riscv64': 1.3.4 + '@img/sharp-libvips-linux-s390x': 1.3.4 + '@img/sharp-libvips-linux-x64': 1.3.4 + '@img/sharp-libvips-linuxmusl-arm64': 1.3.4 + '@img/sharp-libvips-linuxmusl-x64': 1.3.4 + '@img/sharp-linux-arm': 0.35.5 + '@img/sharp-linux-arm64': 0.35.5 + '@img/sharp-linux-ppc64': 0.35.5 + '@img/sharp-linux-riscv64': 0.35.5 + '@img/sharp-linux-s390x': 0.35.5 + '@img/sharp-linux-x64': 0.35.5 + '@img/sharp-linuxmusl-arm64': 0.35.5 + '@img/sharp-linuxmusl-x64': 0.35.5 + '@img/sharp-webcontainers-wasm32': 0.35.5 + '@img/sharp-win32-arm64': 0.35.5 + '@img/sharp-win32-ia32': 0.35.5 + '@img/sharp-win32-x64': 0.35.5 + '@types/node': 22.20.5 + shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 shebang-regex@3.0.0: {} + siginfo@2.0.0: {} + + source-map-js@1.2.2: {} + + stackback@0.0.2: {} + + std-env@3.10.0: {} + strip-json-comments@3.1.1: {} + strip-literal@3.1.0: + dependencies: + js-tokens: 9.0.1 + + supports-color@10.2.2: {} + supports-color@7.2.0: dependencies: has-flag: 4.0.0 + tinybench@2.9.0: {} + + tinyexec@0.3.2: {} + tinyglobby@0.2.17: dependencies: fdir: 6.5.0(picomatch@4.0.7) picomatch: 4.0.7 + tinypool@1.1.1: {} + + tinyrainbow@2.0.0: {} + + tinyspy@4.0.6: {} + ts-api-utils@2.5.0(typescript@5.9.3): dependencies: typescript: 5.9.3 + tslib@2.8.1: + optional: true + turbo@2.11.10: optionalDependencies: '@turbo/darwin-64': 2.11.10 @@ -991,14 +2874,150 @@ snapshots: typescript@5.9.3: {} + undici-types@6.21.0: {} + + undici@7.30.1: {} + + unenv@2.0.0-rc.24: + dependencies: + pathe: 2.0.3 + + update-browserslist-db@1.3.4(browserslist@4.29.5): + dependencies: + browserslist: 4.29.5 + escalade: 3.2.0 + picocolors: 1.1.1 + uri-js@4.4.1: dependencies: punycode: 2.3.1 + vite-node@3.2.4(@types/node@22.20.5): + dependencies: + cac: 6.7.14 + debug: 4.4.3 + es-module-lexer: 1.7.0 + pathe: 2.0.3 + vite: 7.3.7(@types/node@22.20.5) + transitivePeerDependencies: + - '@types/node' + - jiti + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + + vite@7.3.7(@types/node@22.20.5): + dependencies: + esbuild: 0.28.2 + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 + postcss: 8.5.32 + rollup: 4.66.0 + tinyglobby: 0.2.17 + optionalDependencies: + '@types/node': 22.20.5 + fsevents: 2.3.3 + + vitest@3.2.7(@types/node@22.20.5): + dependencies: + '@types/chai': 5.2.3 + '@vitest/expect': 3.2.7 + '@vitest/mocker': 3.2.7(vite@7.3.7(@types/node@22.20.5)) + '@vitest/pretty-format': 3.2.7 + '@vitest/runner': 3.2.7 + '@vitest/snapshot': 3.2.7 + '@vitest/spy': 3.2.7 + '@vitest/utils': 3.2.7 + chai: 5.3.3 + debug: 4.4.3 + expect-type: 1.4.0 + magic-string: 0.30.21 + pathe: 2.0.3 + picomatch: 4.0.7 + std-env: 3.10.0 + tinybench: 2.9.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.17 + tinypool: 1.1.1 + tinyrainbow: 2.0.0 + vite: 7.3.7(@types/node@22.20.5) + vite-node: 3.2.4(@types/node@22.20.5) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 22.20.5 + transitivePeerDependencies: + - jiti + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + which@2.0.2: dependencies: isexe: 2.0.0 + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + word-wrap@1.2.5: {} + workerd@1.20261023.1: + optionalDependencies: + '@cloudflare/workerd-darwin-64': 1.20261023.1 + '@cloudflare/workerd-darwin-arm64': 1.20261023.1 + '@cloudflare/workerd-linux-64': 1.20261023.1 + '@cloudflare/workerd-linux-arm64': 1.20261023.1 + '@cloudflare/workerd-windows-64': 1.20261023.1 + + wrangler@4.155.0(@cloudflare/workers-types@4.20260702.1)(@types/node@22.20.5): + dependencies: + '@cloudflare/kv-asset-handler': 0.5.0 + '@cloudflare/unenv-preset': 2.16.2(unenv@2.0.0-rc.24)(workerd@1.20261023.1) + blake3-wasm: 2.1.5 + esbuild: 0.28.2 + miniflare: 5.20261023.2-beta(@types/node@22.20.5) + path-to-regexp: 6.3.0 + unenv: 2.0.0-rc.24 + workerd: 1.20261023.1 + optionalDependencies: + '@cloudflare/workers-types': 4.20260702.1 + fsevents: 2.3.3 + transitivePeerDependencies: + - '@types/node' + - bufferutil + - utf-8-validate + + ws@8.21.0: {} + + yallist@3.1.1: {} + yocto-queue@0.1.0: {} + + youch-core@0.3.3: + dependencies: + '@poppinss/exception': 1.2.3 + error-stack-parser-es: 1.0.5 + + youch@4.1.0-beta.10: + dependencies: + '@poppinss/colors': 4.1.6 + '@poppinss/dumper': 0.6.5 + '@speed-highlight/core': 1.2.24 + cookie: 1.1.1 + youch-core: 0.3.3 diff --git a/specs/epics/agent-visibility/design.md b/specs/epics/agent-visibility/design.md index f7323e0..1d3c8de 100644 --- a/specs/epics/agent-visibility/design.md +++ b/specs/epics/agent-visibility/design.md @@ -40,6 +40,7 @@ as a single-page app. |---|---| | `src/worker`, `src/enrichment`, `src/lib`, `src/react-app`, `index.html` | `apps/web/` — the same files, unchanged but for `/api/health` (§5) | | `vite` + `@cloudflare/vite-plugin` building the Worker and the client together | Vite with `@vitejs/plugin-react` alone builds the dashboard into `dist/client`; wrangler bundles `src/worker/index.ts` as the Worker (the composition's `workerEntrypoint`), with the same assets directory and the same `run_worker_first` list | +| `npm run dev` (Vite's dev server, `remoteBindings: false`) | `pnpm dev`: the dashboard built, then `wrangler dev --local` — remote bindings off, as upstream's; `pnpm dev:remote` with the account's model (§4) | | `"kv_namespaces": [{ "binding": "VISIBILITY_CACHE" }]` (provisioned by Deploy to Cloudflare) | `"id": "@@wiring(cloudflare-kv/__ENV__:app_kv_id)@@"`, rendered per environment (§4); `wrangler dev` uses a local store | | `"ai": { "binding": "AI" }` | unchanged — keyless, the account's Workers AI (§4) | | `SITE_NAME` "Acme Docs", `SITE_DESCRIPTION` | the product's name and a line about it, which a product's rename rewrites; the sample pages stay upstream's | @@ -90,15 +91,18 @@ renders `wrangler.jsonc` from it — from `wiring.fixture.json` for `dev` its apply. The committed `wrangler.jsonc` is the fixture's render, so a fresh clone runs `wrangler dev` with no Orun at all. -Workers AI has no local mode: under `wrangler dev` the `AI` binding reaches -the account the developer is signed in to, and with none every call fails -— which upstream's enrichment already answers with its deterministic -fallback, so the surfaces still serve (§7). +Workers AI has no local mode, and `wrangler dev` with the `AI` binding +opens a remote session to the signed-in account (and does not start with +none). `pnpm dev` runs `wrangler dev --local` instead — remote bindings +off, as upstream's Vite config sets `remoteBindings: false` — where every +model call fails and upstream's enrichment answers with its deterministic +fallback, so the surfaces still serve; `pnpm dev:remote` uses the real +model (§7). ## 5. `/api/health` -Added: `GET /api/health` reads the store's two keys from KV — never the -model — and answers `{ ok, kv, ai, cached, pages }`: whether KV answered, +Added: `GET /api/health` reads the enriched store's key from KV — never +the model — and answers `{ ok, kv, ai, cached, pages }`: whether KV answered, whether the `AI` binding is bound, whether an enriched store is cached and how many pages it holds. `ok` is `false` (and the status `503`) only when KV fails. It is the deploy smoke's check and the probes': a smoke that @@ -124,5 +128,5 @@ kept, seeds the enriched store as upstream's does; added cases cover `/api/health`, writes with no token configured, the enrichment of a posted page by the stand-in model, and the fallback when the model throws. From AV4 the end-to-end tier serves the built Worker under `wrangler dev` -over a local store: every surface, the dashboard, writes refused, then -admitted with a token from `.dev.vars`. +over a local store, its model a stand-in or absent: every surface, the +dashboard, writes refused, then admitted with a token from `.dev.vars`. diff --git a/specs/epics/agent-visibility/risks-and-open-questions.md b/specs/epics/agent-visibility/risks-and-open-questions.md index ddcb9e8..dee4496 100644 --- a/specs/epics/agent-visibility/risks-and-open-questions.md +++ b/specs/epics/agent-visibility/risks-and-open-questions.md @@ -33,11 +33,13 @@ owner who wants it replaces `SAMPLE_AGENT_KEYS` and sets the var. ## AV-E — Workers AI in local development (ACCEPTED) -Workers AI has no local mode. Under `wrangler dev` with no Cloudflare -sign-in every model call fails and upstream's fallback enriches each page -from its own text; the surfaces serve, their `model` field reading -`… (fallback)`, cached for 60 s. The end-to-end tier relies on exactly -that, and proves it. +Workers AI has no local mode, and `wrangler dev` with the binding opens a +remote session (it does not start with no Cloudflare sign-in). `pnpm dev` +runs it `--local`, as upstream's dev server does (`remoteBindings: false`): +every model call fails and upstream's fallback enriches each page from its +own text; the surfaces serve, their `model` field reading `… (fallback)`, +cached for 60 s. `pnpm dev:remote` uses the signed-in account's model and +may spend on it. ## AV-F — The store's limits (ACCEPTED) diff --git a/tests/web/component.yaml b/tests/web/component.yaml new file mode 100644 index 0000000..f9b9705 --- /dev/null +++ b/tests/web/component.yaml @@ -0,0 +1,23 @@ +apiVersion: sourceplane.io/v1 +kind: Component +metadata: + name: web-tests + description: The site's vitest suite — upstream's surface and API tests over an in-memory KV store and a stand-in model, the health route, the enrichment and its fallback, and the wrangler config's routes and bindings +spec: + type: turbo-package + lifecycle: production + owner: platform + domain: tests + subscribe: + environments: + - name: dev + profile: quick-check + parameters: + nodeVersion: "22" + pnpmVersion: "10.12.1" + buildCommand: pnpm exec turbo run build --filter=./ + typecheckCommand: pnpm exec turbo run typecheck --filter=./ + preBuildCommand: pnpm exec turbo run test --filter=./ + labels: + team: platform + layer: test diff --git a/tests/web/eslint.config.js b/tests/web/eslint.config.js new file mode 100644 index 0000000..2e905dc --- /dev/null +++ b/tests/web/eslint.config.js @@ -0,0 +1,2 @@ +import config from "../../tooling/eslint/index.js"; +export default config; diff --git a/tests/web/package.json b/tests/web/package.json new file mode 100644 index 0000000..94a7a58 --- /dev/null +++ b/tests/web/package.json @@ -0,0 +1,21 @@ +{ + "name": "@app/web-tests", + "version": "0.0.0", + "private": true, + "type": "module", + "scripts": { + "build": "tsc --noEmit", + "typecheck": "tsc --noEmit", + "test": "vitest run", + "lint": "eslint src" + }, + "devDependencies": { + "@app/eslint-config": "workspace:*", + "@app/tsconfig": "workspace:*", + "@cloudflare/workers-types": "^4.20260702.1", + "@types/node": "^22.9.0", + "jsonc-parser": "^3.3.1", + "typescript": "5.9.3", + "vitest": "^3.2.4" + } +} diff --git a/tests/web/src/config.test.ts b/tests/web/src/config.test.ts new file mode 100644 index 0000000..0e0c8a9 --- /dev/null +++ b/tests/web/src/config.test.ts @@ -0,0 +1,68 @@ +// The committed wrangler config — the fixture render of wrangler.template.jsonc +// — keeps upstream's routes and bindings: the surfaces and the API reach the +// Worker before the assets, the dashboard is a single-page app, and the +// Worker is bound to Workers AI and its KV store. +import { readFileSync } from "node:fs"; +import * as path from "node:path"; +import { parse } from "jsonc-parser"; +import { describe, expect, it } from "vitest"; + +const app = path.resolve(__dirname, "../../../apps/web"); +interface WranglerConfig { + main: string; + assets: { directory: string; not_found_handling: string; run_worker_first: string[] }; + ai: { binding: string }; + kv_namespaces: Array<{ binding: string; id: string }>; + vars: Record; +} +const read = (file: string) => parse(readFileSync(path.join(app, file), "utf8")) as T; + +const UPSTREAM_WORKER_FIRST = [ + "/.well-known/web-bot-auth/*", + "/api", + "/api/*", + "/index.json", + "/jsonld", + "/llms-full.txt", + "/llms.txt", + "/robots.txt", + "/*.jsonld", + "/*.md", +]; + +describe.each(["wrangler.jsonc", "wrangler.template.jsonc"])("%s", (file) => { + const config = read(file); + + it("runs upstream's Worker over the dashboard's assets", () => { + expect(config.main).toBe("src/worker/index.ts"); + expect(config.assets.directory).toBe("dist/client"); + expect(config.assets.not_found_handling).toBe("single-page-application"); + expect(config.assets.run_worker_first).toEqual(UPSTREAM_WORKER_FIRST); + }); + + it("binds Workers AI and the KV store", () => { + expect(config.ai).toEqual({ binding: "AI" }); + expect(config.kv_namespaces).toHaveLength(1); + expect(config.kv_namespaces[0]?.binding).toBe("VISIBILITY_CACHE"); + }); + + it("keeps upstream's vars, with Web Bot Auth off and no secret among them", () => { + expect(Object.keys(config.vars).sort()).toEqual( + ["AI_MODEL", "CONTENT_SIGNAL", "ENABLE_WEB_BOT_AUTH", "ENRICHMENT_CACHE_TTL", "SITE_DESCRIPTION", "SITE_NAME"], + ); + expect(config.vars.ENABLE_WEB_BOT_AUTH).toBe("false"); + expect(config.vars.CONTENT_SIGNAL).toBe("ai-input=yes, search=yes, ai-train=no"); + expect(config.vars.AI_MODEL).toBe("@cf/meta/llama-3.3-70b-instruct-fp8-fast"); + }); +}); + +describe("the wiring", () => { + it("takes the namespace id from the cloudflare-kv root's document", () => { + expect(read("wrangler.template.jsonc").kv_namespaces[0]?.id).toBe("@@wiring(cloudflare-kv/__ENV__:app_kv_id)@@"); + }); + + it("commits the fixture's stage render", () => { + const fixture = read>("wiring.fixture.json"); + expect(read("wrangler.jsonc").kv_namespaces[0]?.id).toBe(fixture["cloudflare-kv/stage"]?.app_kv_id); + }); +}); diff --git a/tests/web/src/enrichment.test.ts b/tests/web/src/enrichment.test.ts new file mode 100644 index 0000000..bce95cc --- /dev/null +++ b/tests/web/src/enrichment.test.ts @@ -0,0 +1,122 @@ +// The store's enrichment through the AI binding, and upstream's deterministic +// fallback when the model fails — the path the end-to-end tier and a +// `wrangler dev` with no Cloudflare sign-in take. +import { describe, expect, it } from "vitest"; +import { ENRICHED_KEY, RAW_KEY } from "@/src/lib/store"; +import { SAMPLE_RESOURCES } from "@/src/lib/content"; +import type { Resource } from "@/src/lib/types"; +import { FakeAI, makeEnv, workerFetch } from "./fake-env"; + +const BASE = "https://example.com"; + +const modelAnswer = (call: { input: { messages: Array<{ content: string }> } }) => ({ + title: "Enriched title", + summary: "An enriched summary.", + keyPoints: ["one", "two", "three"], + topics: ["Docs", "Agents"], + category: "documentation", + content: `# Enriched\n\n${call.input.messages[1]?.content.slice(0, 40) ?? ""}`, +}); + +describe("enrichment", () => { + it("enriches every sample page once on a cold store and caches it for the TTL", async () => { + const ai = new FakeAI(modelAnswer); + const { env, kv } = makeEnv({ ai }); + const res = await workerFetch(env, `${BASE}/llms.txt`); + expect(res.status).toBe(200); + expect(ai.calls).toHaveLength(SAMPLE_RESOURCES.length); + expect(ai.calls[0]?.model).toBe("@cf/test/model"); + expect(kv.ttls.get(ENRICHED_KEY)).toBe(3600); + + const stored = JSON.parse(kv.values.get(ENRICHED_KEY) ?? "[]") as Resource[]; + expect(stored).toHaveLength(SAMPLE_RESOURCES.length); + expect(stored[0]?.topics).toEqual(["docs", "agents"]); + + // A warm store serves without the model. + await workerFetch(env, `${BASE}/index.json`); + expect(ai.calls).toHaveLength(SAMPLE_RESOURCES.length); + }); + + it("falls back to each page's own text when the model fails, cached for 60 s", async () => { + const { env, kv, ai } = makeEnv(); + const res = await workerFetch(env, `${BASE}/api/resources`); + const body = (await res.json()) as { count: number; resources: Resource[] }; + expect(body.count).toBe(SAMPLE_RESOURCES.length); + expect(ai.calls).toHaveLength(SAMPLE_RESOURCES.length); + for (const resource of body.resources) { + expect(resource.model).toBe("@cf/test/model (fallback)"); + expect(resource.summary.length).toBeGreaterThan(0); + } + expect(kv.ttls.get(ENRICHED_KEY)).toBe(60); + + const md = await workerFetch(env, `${BASE}/${SAMPLE_RESOURCES[0]?.slug}.md`); + expect(md.status).toBe(200); + }); + + it("enriches a posted page through the model and stores its raw text", async () => { + const ai = new FakeAI(modelAnswer); + const { env, kv } = makeEnv({ ai, adminToken: "s3cret" }); + const res = await workerFetch(env, `${BASE}/api/resources`, { + method: "POST", + headers: { "content-type": "application/json", authorization: "Bearer s3cret" }, + body: JSON.stringify({ slug: "release-notes", title: "Release notes", body: "# Notes\n\nv3 ships." }), + }); + expect(res.status).toBe(201); + const created = (await res.json()) as Resource; + expect(created.title).toBe("Enriched title"); + expect(created.url).toBe(`${BASE}/release-notes`); + + const raws = JSON.parse(kv.values.get(RAW_KEY) ?? "[]") as Array<{ slug: string }>; + expect(raws.map((r) => r.slug)).toContain("release-notes"); + + const llms = await (await workerFetch(env, `${BASE}/llms.txt`)).text(); + expect(llms).toContain("/release-notes.md"); + }); +}); + +describe("writes with no ADMIN_TOKEN stored", () => { + it("refuses every bearer, as upstream ships", async () => { + const { env, kv } = makeEnv(); + for (const authorization of ["Bearer anything", "Bearer ", ""]) { + const post = await workerFetch(env, `${BASE}/api/resources`, { + method: "POST", + headers: { "content-type": "application/json", authorization }, + body: JSON.stringify({ slug: "x", body: "hi" }), + }); + expect(post.status).toBe(401); + const refresh = await workerFetch(env, `${BASE}/api/refresh`, { + method: "POST", + headers: { authorization }, + }); + expect(refresh.status).toBe(401); + } + expect(kv.values.has(RAW_KEY)).toBe(false); + }); + + it("refuses a wrong token when one is stored", async () => { + const { env } = makeEnv({ adminToken: "right" }); + const res = await workerFetch(env, `${BASE}/api/refresh`, { + method: "POST", + headers: { authorization: "Bearer wrong" }, + }); + expect(res.status).toBe(401); + }); +}); + +describe("the site's identity", () => { + it("names the site from SITE_NAME and SITE_DESCRIPTION on its surfaces", async () => { + const { env } = makeEnv(); + const site = (await (await workerFetch(env, `${BASE}/api/site`)).json()) as { + site: { name: string; description: string; origin: string }; + webBotAuthEnabled: boolean; + }; + expect(site.site).toEqual({ + name: env.SITE_NAME, + description: env.SITE_DESCRIPTION, + origin: BASE, + }); + expect(site.webBotAuthEnabled).toBe(false); + const llms = await (await workerFetch(env, `${BASE}/llms.txt`)).text(); + expect(llms).toContain(`# ${env.SITE_NAME}`); + }); +}); diff --git a/tests/web/src/fake-env.ts b/tests/web/src/fake-env.ts new file mode 100644 index 0000000..15fa962 --- /dev/null +++ b/tests/web/src/fake-env.ts @@ -0,0 +1,86 @@ +// The Worker's bindings, in memory: a KV namespace with the three calls +// upstream's store makes (get as JSON, put with an expiry, delete) and a +// stand-in for the Workers AI binding that answers — or fails — as a test +// tells it to. Upstream's suite ran under @cloudflare/vitest-pool-workers +// against miniflare's KV; this runs the same Worker in node. +import worker from "@/src/worker/index"; +import type { Env } from "@/src/lib/types"; + +export class FakeKV { + readonly values = new Map(); + readonly ttls = new Map(); + /** Every call fails, as an unbound or unreachable namespace would. */ + failing = false; + + async get(key: string, type?: "text" | "json"): Promise { + if (this.failing) throw new Error("KV unavailable"); + const value = this.values.get(key); + if (value === undefined) return null; + return type === "json" ? JSON.parse(value) : value; + } + + async put(key: string, value: string, options?: { expirationTtl?: number }): Promise { + if (this.failing) throw new Error("KV unavailable"); + this.values.set(key, value); + this.ttls.set(key, options?.expirationTtl); + } + + async delete(key: string): Promise { + if (this.failing) throw new Error("KV unavailable"); + this.values.delete(key); + this.ttls.delete(key); + } +} + +export interface AiCall { + model: string; + input: { messages: Array<{ role: string; content: string }> }; +} + +/** Answers each run with `answer(input)`; an Error is thrown instead. */ +export class FakeAI { + readonly calls: AiCall[] = []; + constructor(private readonly answer: (call: AiCall) => unknown = () => new Error("no model")) {} + + async run(model: string, input: AiCall["input"]): Promise<{ response: unknown }> { + const call = { model, input }; + this.calls.push(call); + const result = this.answer(call); + if (result instanceof Error) throw result; + return { response: result }; + } +} + +export interface TestEnv { + env: Env; + kv: FakeKV; + ai: FakeAI; +} + +export function makeEnv(options: { adminToken?: string; ai?: FakeAI } = {}): TestEnv { + const kv = new FakeKV(); + const ai = options.ai ?? new FakeAI(); + const env: Env = { + AI: ai as unknown as Ai, + VISIBILITY_CACHE: kv as unknown as KVNamespace, + SITE_NAME: "Test Docs", + SITE_DESCRIPTION: "Documentation for the test suite.", + AI_MODEL: "@cf/test/model", + ENRICHMENT_CACHE_TTL: "3600", + CONTENT_SIGNAL: "ai-input=yes, search=yes, ai-train=no", + ENABLE_WEB_BOT_AUTH: "false", + ...(options.adminToken === undefined ? {} : { ADMIN_TOKEN: options.adminToken }), + }; + return { env, kv, ai }; +} + +const ctx = { + waitUntil: () => {}, + passThroughOnException: () => {}, + props: {}, +} as unknown as ExecutionContext; + +/** The Worker's own fetch, as the runtime calls it. */ +export function workerFetch(env: Env, url: string, init?: RequestInit): Promise { + return Promise.resolve(worker.fetch(new Request(url, init), env, ctx)); +} diff --git a/tests/web/src/health.test.ts b/tests/web/src/health.test.ts new file mode 100644 index 0000000..1855aa3 --- /dev/null +++ b/tests/web/src/health.test.ts @@ -0,0 +1,42 @@ +// /api/health — not upstream's: the deploy smoke's check. It reads the store +// through the KV binding and never calls the model. +import { describe, expect, it } from "vitest"; +import { ENRICHED_KEY } from "@/src/lib/store"; +import { FakeAI, makeEnv, workerFetch } from "./fake-env"; + +const BASE = "https://example.com"; + +describe("/api/health", () => { + it("is ok on a cold store, and does not enrich it", async () => { + const ai = new FakeAI(() => ({ title: "never" })); + const { env, kv } = makeEnv({ ai }); + const res = await workerFetch(env, `${BASE}/api/health`); + expect(res.status).toBe(200); + expect(await res.json()).toEqual({ ok: true, kv: true, ai: true, cached: false, pages: 0 }); + expect(ai.calls).toHaveLength(0); + expect(kv.values.has(ENRICHED_KEY)).toBe(false); + }); + + it("counts the pages of a warm store", async () => { + const { env, kv } = makeEnv(); + kv.values.set(ENRICHED_KEY, JSON.stringify([{ slug: "a" }, { slug: "b" }])); + const res = await workerFetch(env, `${BASE}/api/health`); + expect(await res.json()).toMatchObject({ ok: true, cached: true, pages: 2 }); + }); + + it("answers 503 when KV fails", async () => { + const { env, kv } = makeEnv(); + kv.failing = true; + const res = await workerFetch(env, `${BASE}/api/health`); + expect(res.status).toBe(503); + expect(await res.json()).toMatchObject({ ok: false, kv: false }); + }); + + it("reports a missing AI binding without failing", async () => { + const { env } = makeEnv(); + const unbound = { ...env, AI: undefined as unknown as Ai }; + const res = await workerFetch(unbound, `${BASE}/api/health`); + expect(res.status).toBe(200); + expect(await res.json()).toMatchObject({ ok: true, ai: false }); + }); +}); diff --git a/tests/web/src/worker.test.ts b/tests/web/src/worker.test.ts new file mode 100644 index 0000000..b139997 --- /dev/null +++ b/tests/web/src/worker.test.ts @@ -0,0 +1,212 @@ +// Upstream's suite (test/index.test.ts), every case and assertion kept: the +// Worker's own fetch over an in-memory KV store (fake-env.ts) instead of +// @cloudflare/vitest-pool-workers' SELF and miniflare, with ADMIN_TOKEN +// "test-token" as upstream's vitest config binds it. Upstream's model under +// miniflare (remoteBindings: false) fails every call; so does this one. +import { beforeAll, describe, it, expect } from "vitest"; +import { ENRICHED_KEY } from "@/src/lib/store"; +import type { Resource } from "@/src/lib/types"; +import { makeEnv, workerFetch } from "./fake-env"; + +const { env } = makeEnv({ adminToken: "test-token" }); +const SELF = { fetch: (url: string, init?: RequestInit) => workerFetch(env, url, init) }; + +const BASE = "https://example.com"; + +// Seed the enriched cache so the surfaces serve from KV instead of calling +// Workers AI on every request. This keeps the suite fast and avoids incurring +// AI usage charges during tests. (Per review feedback on #968.) +const SEEDED: Resource[] = [ + { + slug: "getting-started", + url: "https://example.com/docs/getting-started", + title: "Getting Started with Acme", + summary: "How to create your first workflow with Acme in five minutes.", + keyPoints: ["Install the CLI", "Workflows are YAML"], + topics: ["onboarding", "cli"], + category: "documentation", + content: "# Getting Started\n\nInstall the CLI and deploy a workflow.", + updatedAt: "2026-01-01T00:00:00.000Z", + model: "seed", + }, + { + slug: "pricing", + url: "https://example.com/pricing", + title: "Pricing", + summary: "Acme has Free, Pro, and Enterprise plans.", + keyPoints: ["Free $0", "Pro $20/mo"], + topics: ["pricing", "plans"], + category: "pricing", + content: "# Pricing\n\nFree, Pro, and Enterprise.", + updatedAt: "2026-01-01T00:00:00.000Z", + model: "seed", + }, +]; + +beforeAll(async () => { + await env.VISIBILITY_CACHE.put(ENRICHED_KEY, JSON.stringify(SEEDED)); +}); + +describe("Agent Visibility template", () => { + it("serves /llms.txt as plain text with a Content-Signal header", async () => { + const res = await SELF.fetch(`${BASE}/llms.txt`); + expect(res.status).toBe(200); + expect(res.headers.get("content-type")).toContain("text/plain"); + expect(res.headers.get("content-signal")).toContain("ai-input=yes"); + const text = await res.text(); + expect(text).toContain("# "); + expect(text).toContain("## Pages"); + // Links point at the per-page Markdown surface. + expect(text).toContain(".md)"); + }); + + it("serves /llms-full.txt with inlined page content", async () => { + const res = await SELF.fetch(`${BASE}/llms-full.txt`); + expect(res.status).toBe(200); + const text = await res.text(); + expect(text).toContain("## Content"); + expect(text).toContain("## Source"); + }); + + it("serves /index.json as a typed index over the same store", async () => { + const res = await SELF.fetch(`${BASE}/index.json`); + expect(res.status).toBe(200); + const json = (await res.json()) as { + protocol: string; + surfaces: Record; + pages: Array<{ slug: string; title: string; sources: unknown }>; + }; + expect(json.protocol).toContain("agent-visibility"); + expect(json.surfaces).toHaveProperty("llmsTxt"); + expect(json.pages.length).toBeGreaterThan(0); + expect(json.pages[0]).toHaveProperty("sources"); + }); + + it("serves a per-page Markdown surface at /:slug.md", async () => { + const res = await SELF.fetch(`${BASE}/getting-started.md`); + expect(res.status).toBe(200); + expect(res.headers.get("content-type")).toContain("text/markdown"); + const text = await res.text(); + expect(text).toContain("# "); + expect(text).toContain("## Source"); + }); + + it("404s for an unknown page Markdown slug", async () => { + const res = await SELF.fetch(`${BASE}/does-not-exist.md`); + expect(res.status).toBe(404); + }); + + it("serves robots.txt that welcomes known AI agents with a Content-Signal", async () => { + const res = await SELF.fetch(`${BASE}/robots.txt`); + expect(res.status).toBe(200); + expect(res.headers.get("content-signal")).toContain("ai-input=yes"); + const text = await res.text(); + expect(text).toContain("User-agent: GPTBot"); + expect(text).toContain("llms.txt"); + // Content-Signal must live inside robots.txt (the canonical location), + // not only in an HTTP header. + expect(text).toContain("Content-Signal: ai-input=yes"); + }); + + it("sets CORS headers on the per-page Markdown surface", async () => { + const res = await SELF.fetch(`${BASE}/getting-started.md`); + expect(res.headers.get("access-control-allow-origin")).toBe("*"); + }); + + it("serves site-level JSON-LD at /jsonld", async () => { + const res = await SELF.fetch(`${BASE}/jsonld`); + expect(res.status).toBe(200); + expect(res.headers.get("content-type")).toContain("application/ld+json"); + const json = (await res.json()) as Record; + expect(json["@context"]).toBe("https://schema.org"); + expect(json["@type"]).toBe("WebSite"); + }); + + it("serves per-page JSON-LD at /:slug.jsonld", async () => { + const res = await SELF.fetch(`${BASE}/pricing.jsonld`); + expect(res.status).toBe(200); + expect(res.headers.get("content-type")).toContain("application/ld+json"); + const json = (await res.json()) as Record; + expect(json["@type"]).toBe("Article"); + }); + + it("lists surfaces and resources through the API", async () => { + const site = await SELF.fetch(`${BASE}/api/site`); + expect(site.status).toBe(200); + const siteJson = (await site.json()) as { surfaces: unknown[] }; + expect(siteJson.surfaces.length).toBeGreaterThanOrEqual(5); + + const list = await SELF.fetch(`${BASE}/api/resources`); + const listJson = (await list.json()) as { count: number }; + expect(listJson.count).toBeGreaterThan(0); + }); + + it("rejects unauthenticated writes to /api/resources", async () => { + const res = await SELF.fetch(`${BASE}/api/resources`, { + method: "POST", + headers: { "content-type": "application/json" }, + body: JSON.stringify({ slug: "x", body: "hi" }), + }); + expect(res.status).toBe(401); + }); + + it("rejects unauthenticated refresh requests", async () => { + const res = await SELF.fetch(`${BASE}/api/refresh`, { method: "POST" }); + expect(res.status).toBe(401); + const json = (await res.json()) as { error: string }; + expect(json.error).toContain("Unauthorized"); + }); + + it("rejects an invalid slug even when authenticated", async () => { + const res = await SELF.fetch(`${BASE}/api/resources`, { + method: "POST", + headers: { + "content-type": "application/json", + authorization: "Bearer test-token", + }, + body: JSON.stringify({ slug: "Not A Slug!", body: "hi" }), + }); + expect(res.status).toBe(400); + }); + + it("accepts an authenticated POST and exposes it on surfaces", async () => { + const res = await SELF.fetch(`${BASE}/api/resources`, { + method: "POST", + headers: { + "content-type": "application/json", + authorization: "Bearer test-token", + }, + body: JSON.stringify({ + slug: "changelog", + url: "https://example.com/changelog", + title: "Changelog", + body: "# Changelog\n\nv2.0 adds workflow templates and a public API.", + }), + }); + expect(res.status).toBe(201); + const created = (await res.json()) as { slug: string }; + expect(created.slug).toBe("changelog"); + + const md = await SELF.fetch(`${BASE}/changelog.md`); + expect(md.status).toBe(200); + }); + + it("accepts authenticated refresh requests and clears the enriched cache", async () => { + await env.VISIBILITY_CACHE.put(ENRICHED_KEY, JSON.stringify(SEEDED)); + + const res = await SELF.fetch(`${BASE}/api/refresh`, { + method: "POST", + headers: { authorization: "Bearer test-token" }, + }); + expect(res.status).toBe(200); + const json = (await res.json()) as { ok: boolean; message: string }; + expect(json.ok).toBe(true); + expect(json.message).toContain("Cache cleared"); + expect(await env.VISIBILITY_CACHE.get(ENRICHED_KEY)).toBeNull(); + }); + + it("keeps the Web Bot Auth identity surface disabled by default", async () => { + const dir = await SELF.fetch(`${BASE}/.well-known/web-bot-auth/directory`); + expect(dir.status).toBe(404); + }); +}); diff --git a/tests/web/tsconfig.json b/tests/web/tsconfig.json new file mode 100644 index 0000000..62eac92 --- /dev/null +++ b/tests/web/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../../tooling/tsconfig/worker.json", + "compilerOptions": { + "composite": false, + "declaration": false, + "declarationMap": false, + "incremental": false, + "noEmit": true, + // The Worker's sources are checked again through the tests' imports, so + // under the Worker's settings (apps/web/tsconfig.json). + "lib": ["ES2023"], + "noUncheckedIndexedAccess": false, + "allowJs": false, + "types": ["node", "@cloudflare/workers-types"], + "paths": { + "@/*": ["../../apps/web/*"] + } + }, + "include": ["src/**/*.ts"] +} diff --git a/tests/web/vitest.config.ts b/tests/web/vitest.config.ts new file mode 100644 index 0000000..07e9240 --- /dev/null +++ b/tests/web/vitest.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from "vitest/config"; +import * as path from "node:path"; + +export default defineConfig({ + resolve: { + alias: { + "@": path.resolve(__dirname, "../../apps/web/"), + }, + }, + test: { + include: ["src/**/*.test.ts"], + environment: "node", + }, +}); diff --git a/tooling/wire/worker-secrets.mjs b/tooling/wire/worker-secrets.mjs new file mode 100644 index 0000000..4799ebd --- /dev/null +++ b/tooling/wire/worker-secrets.mjs @@ -0,0 +1,97 @@ +#!/usr/bin/env node +// Worker SECRETS from the job's environment (zero-dependency). +// +// Some values a build is given must reach the Worker at request time and never +// a bundle: the E2B API key and the model providers' keys. The deploy lane has +// them in its environment (Orun secrets the component's `optionalSecretEnv` +// resolves), and this hands +// the named variables that are set to `wrangler secret bulk` as JSON over +// stdin, so no value is ever on a command line or in a log. +// +// node worker-secrets.mjs --worker [--config wrangler.jsonc] \ +// --secret E2B_API_KEY [--secret …] +// +// --dev-vars write the same secrets as KEY=value lines instead +// (wrangler dev reads .dev.vars as the Worker's secrets) +// +// The secrets are OPTIONAL, like the Orun secrets they come from: a variable +// that is not set is skipped, named, and the site reads its absence at request +// time (apps/web/lib/secrets.ts: "connect E2B", or a provider left out of the +// model picker). Only a job that can +// deploy holds a Cloudflare credential (the composition's deploy profile +// binds CLOUDFLARE_API_TOKEN; its verify profiles bind nothing), so without +// one this says so and exits 0: a verify lane builds exactly what the deploy +// lane does and pushes nothing. +import * as fs from "node:fs"; +import { spawnSync } from "node:child_process"; + +function arg(name) { + const i = process.argv.indexOf(`--${name}`); + return i >= 0 ? process.argv[i + 1] : undefined; +} +function args(name) { + const out = []; + process.argv.forEach((a, i) => { + if (a === `--${name}` && process.argv[i + 1] !== undefined) out.push(process.argv[i + 1]); + }); + return out; +} + +const worker = arg("worker"); +const config = arg("config"); +const devVars = arg("dev-vars"); +const names = args("secret"); +if (names.length === 0 || (!worker && !devVars)) { + console.error( + "usage: worker-secrets.mjs --secret NAME [--secret …] (--worker [--config ] | --dev-vars )", + ); + process.exit(2); +} +for (const name of names) { + if (!/^[A-Z][A-Z0-9_]*$/.test(name)) { + console.error(`worker-secrets: --secret ${name} is not an environment variable name`); + process.exit(2); + } +} + +const secrets = {}; +const unset = []; +for (const name of names) { + const value = process.env[name]; + if (typeof value === "string" && value.length > 0) secrets[name] = value; + else unset.push(name); +} +if (unset.length > 0) console.log(`worker-secrets: not set, skipped: ${unset.join(", ")}`); +const set = Object.keys(secrets); +if (set.length === 0) { + console.log("worker-secrets: nothing to set"); + process.exit(0); +} +const list = set.join(", "); + +if (devVars) { + // KEY=value, one per line, double-quoted (dotenv's syntax, which wrangler + // reads): a JSON string is a valid dotenv double-quoted value. + const body = Object.entries(secrets) + .map(([k, v]) => `${k}=${JSON.stringify(v)}`) + .join("\n"); + fs.writeFileSync(devVars, `${body}\n`, { mode: 0o600 }); + console.log(`worker-secrets: wrote ${list} to ${devVars}`); + process.exit(0); +} + +if (!process.env.CLOUDFLARE_API_TOKEN) { + console.log(`worker-secrets: no Cloudflare credential in this job (a verify lane) — ${list} reach ${worker} from the deploy lane`); + process.exit(0); +} + +const result = spawnSync( + "pnpm", + ["exec", "wrangler", "secret", "bulk", "--name", worker, ...(config ? ["--config", config] : [])], + { input: JSON.stringify(secrets), stdio: ["pipe", "inherit", "inherit"] }, +); +if (result.status !== 0) { + console.error(`worker-secrets: wrangler secret bulk failed for ${worker}`); + process.exit(result.status ?? 1); +} +console.log(`worker-secrets: ${list} set on ${worker}`);