From ee0b6075282aa045581a5d1ac6d6164aed022e85 Mon Sep 17 00:00:00 2001 From: Aleksandr Shevchuk Date: Tue, 24 Nov 2026 15:44:19 +0200 Subject: [PATCH 1/3] feat(mcp): the app server as a Cloudflare Worker at an address of ours, and its handler as the package's ./app (#272) --- .gitignore | 5 + AGENTS.md | 4 +- apps/mcp-worker/package.json | 23 + apps/mcp-worker/scripts/stage.mjs | 32 + apps/mcp-worker/src/worker.mjs | 46 ++ apps/mcp-worker/tests/worker.test.ts | 104 ++++ apps/mcp-worker/tsconfig.json | 18 + apps/mcp-worker/vitest.config.ts | 12 + apps/mcp-worker/wrangler.jsonc | 23 + design/commands.md | 2 + design/layout.md | 5 +- design/mcp.md | 38 +- design/testing.md | 4 +- packages/mcp/README.md | 14 + packages/mcp/bin/h5p-mcp.mjs | 0 packages/mcp/lib/answers.mjs | 10 +- packages/mcp/lib/app.mjs | 12 +- packages/mcp/package.json | 1 + packages/mcp/tests/app.test.ts | 35 +- pnpm-lock.yaml | 836 ++++++++++++++++++++++++++- pnpm-workspace.yaml | 6 +- 21 files changed, 1194 insertions(+), 36 deletions(-) create mode 100644 apps/mcp-worker/package.json create mode 100644 apps/mcp-worker/scripts/stage.mjs create mode 100644 apps/mcp-worker/src/worker.mjs create mode 100644 apps/mcp-worker/tests/worker.test.ts create mode 100644 apps/mcp-worker/tsconfig.json create mode 100644 apps/mcp-worker/vitest.config.ts create mode 100644 apps/mcp-worker/wrangler.jsonc mode change 100644 => 100755 packages/mcp/bin/h5p-mcp.mjs diff --git a/.gitignore b/.gitignore index 4abe8294..d928a83e 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,11 @@ packages/vscode/NOTICE.txt # h5p-verify writes its report and screenshot to .verify/ beside the package by default. *.verify/ +# The app server's Worker: what it carries, gathered by its `stage` script, and wrangler's own +# state on this computer. +apps/mcp-worker/staged/ +.wrangler/ + # Incremental build state *.tsbuildinfo diff --git a/AGENTS.md b/AGENTS.md index d703dc37..2ea2887c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -40,7 +40,7 @@ by assumption, and asks a page for what only a page can do through the frame: ## Where things are, and whose rules -A pnpm workspace of ten packages and two apps. [`design/layout.md`](design/layout.md) maps the +A pnpm workspace of ten packages and three apps. [`design/layout.md`](design/layout.md) maps the folders; in `design/`, `src/…` and `scripts/…` mean the player's unless a file says otherwise. | Part | What it is | Rules | @@ -51,7 +51,7 @@ folders; in `design/`, `src/…` and `scripts/…` mean the player's unless a fi | `packages/normalize/` | rewrites a package so it streams | [normalize](design/normalize.md) | | `packages/verify/` | plays a package headless and reports | [verify](design/verify.md) | | `packages/author/`, `skills/h5p-author/` | a playable package of any content type from a short source, and a package back to one | [author](design/author.md) | -| `packages/mcp/` | the local MCP server: builds, reads, checks and previews in an app with no shell; and the app server, which plays an activity in a chat app's reply | [mcp](design/mcp.md) | +| `packages/mcp/`, `apps/mcp-worker/` | the local MCP server: builds, reads, checks and previews in an app with no shell; and the app server, which plays an activity in a chat app's reply, with the Cloudflare Worker that hosts it | [mcp](design/mcp.md) | | `packages/cmi5/` | the element as a cmi5 assignable unit | [cmi5](design/cmi5.md) | | `packages/embed/`, `skills/h5p-to-scorm/` | the embed site for a player domain, and a package as a SCORM zip | [embed](design/embed.md), [scorm](design/scorm.md) | | `packages/vscode/` | H5P Preview, the VS Code extension | [vscode](design/vscode.md) | diff --git a/apps/mcp-worker/package.json b/apps/mcp-worker/package.json new file mode 100644 index 00000000..25cf92c3 --- /dev/null +++ b/apps/mcp-worker/package.json @@ -0,0 +1,23 @@ +{ + "name": "@missing-elements/h5p-mcp-worker", + "private": true, + "type": "module", + "scripts": { + "stage": "pnpm --filter @missing-elements/h5p-offline-player build:plan && pnpm --filter @missing-elements/h5p-author exec node scripts/copy-skill.mjs && node scripts/stage.mjs", + "dev": "pnpm stage && wrangler dev", + "deploy:worker": "pnpm stage && wrangler deploy", + "test": "pnpm stage && vitest run", + "typecheck": "pnpm --filter @missing-elements/h5p-author run types && tsc -p tsconfig.json" + }, + "dependencies": { + "@missing-elements/h5p-author": "workspace:*", + "@missing-elements/h5p-libraries": "workspace:*", + "@missing-elements/h5p-mcp": "workspace:*" + }, + "devDependencies": { + "@types/node": "^26.6.6", + "typescript": "^7.0.2", + "vitest": "^5.1.0", + "wrangler": "^4.167.0" + } +} diff --git a/apps/mcp-worker/scripts/stage.mjs b/apps/mcp-worker/scripts/stage.mjs new file mode 100644 index 00000000..263dda79 --- /dev/null +++ b/apps/mcp-worker/scripts/stage.mjs @@ -0,0 +1,32 @@ +// Gathers what the Worker carries beside its code into staged/, which wrangler.jsonc attaches +// to it as modules: the library pack's parts, the author package's brief and type files (copied +// into that package from the skill first, by this package's `stage` script), and the card. Only +// what the server reads; the folder is written anew each time and is not in git. +import { cp, mkdir, readdir, rm, stat } from 'node:fs/promises' +import { dirname, join } from 'node:path' +import { fileURLToPath } from 'node:url' + +const staged = fileURLToPath(new URL('../staged/', import.meta.url)) +/** Where an installed package's file is. @param {string} specifier */ +const at = (specifier) => fileURLToPath(import.meta.resolve(specifier)) + +const parts = dirname(at('@missing-elements/h5p-libraries/parts/index.json')) +const references = dirname(at('@missing-elements/h5p-author/references/authoring.md')) +const card = join(dirname(at('@missing-elements/h5p-mcp/package.json')), 'lib', 'card.html') + +await rm(staged, { recursive: true, force: true }) +await mkdir(join(staged, 'references'), { recursive: true }) +await cp(parts, join(staged, 'parts'), { recursive: true }) +await cp(join(references, 'authoring.md'), join(staged, 'references', 'authoring.md')) +await cp(join(references, 'types'), join(staged, 'references', 'types'), { recursive: true }) +await cp(card, join(staged, 'card.html')) + +const names = async (/** @type {string} */ folder, /** @type {string} */ ending) => (await readdir(join(staged, folder))).filter((name) => name.endsWith(ending)) +const [libraries, types] = [await names('parts', '.h5p'), await names(join('references', 'types'), '.md')] +if (!libraries.length || !types.length) throw new Error(`Nothing to carry: ${libraries.length} parts and ${types.length} type files in ${staged}`) +let bytes = 0 +for (const name of await readdir(staged, { recursive: true })) { + const file = await stat(join(staged, name)) + if (file.isFile()) bytes += file.size +} +console.log(`Staged ${libraries.length} parts, ${types.length} type files, the brief and the card: ${(bytes / 1048576).toFixed(1)} MB`) diff --git a/apps/mcp-worker/src/worker.mjs b/apps/mcp-worker/src/worker.mjs new file mode 100644 index 00000000..8dc65a07 --- /dev/null +++ b/apps/mcp-worker/src/worker.mjs @@ -0,0 +1,46 @@ +import { readFileSync } from 'node:fs' +import { createApp } from '@missing-elements/h5p-mcp/app' +import mcp from '@missing-elements/h5p-mcp/package.json' with { type: 'json' } + +/** + * The app server (`h5p-mcp-app`, design/mcp.md) as a Cloudflare Worker: the same handler, in a + * runtime with no package folders. What the server reads as it runs rides in the Worker and + * shows in its file system under `/bundle` (`wrangler.jsonc`, `scripts/stage.mjs`): the library + * pack's parts, the author package's type files and brief, and the card. + * + * It receives a chat's tool calls, an activity's source among them, and never a file. The server + * stores and logs nothing of a call, this file adds nothing, and the Worker's own logs are off + * in its config. + */ + +/** Where a Worker's modules are files. */ +const CARRIED = '/bundle' + +/** @type {ReturnType | undefined} */ +let app + +export default { + /** + * @param {Request} request + * @returns {Promise} + */ + async fetch(request) { + let server + try { + // Started by the first call and kept while the Worker lives. One that failed to start is + // started again by the next call. + app ??= createApp({ + version: mcp.version, + card: readFileSync(`${CARRIED}/card.html`, 'utf8'), + libraries: `${CARRIED}/parts`, + references: `${CARRIED}/references` + }) + server = await app + } catch { + app = undefined + // Said plainly and with nothing of the failure in it: it is the Worker's, not the caller's. + return new Response('The server could not start\n', { status: 500, headers: { 'content-type': 'text/plain; charset=utf-8' } }) + } + return server.fetch(request) + } +} diff --git a/apps/mcp-worker/tests/worker.test.ts b/apps/mcp-worker/tests/worker.test.ts new file mode 100644 index 00000000..5ae865e6 --- /dev/null +++ b/apps/mcp-worker/tests/worker.test.ts @@ -0,0 +1,104 @@ +import { resolve } from 'node:path' +import { afterAll, beforeAll, describe, expect, it } from 'vitest' +import { unstable_readConfig, unstable_startWorker } from 'wrangler' +import { createApp } from '@missing-elements/h5p-mcp/app' + +/** + * The Worker as Cloudflare runs it: bundled by wrangler with what it carries, started in the + * Workers runtime on this computer, and asked over HTTP. The server's own rules are tested in + * the MCP package; these hold the Worker to answering as the server on a computer does, word for + * word, from files it reads in another runtime's file system, and its config to keeping nothing. + */ + +const CONFIG = resolve(import.meta.dirname, '../wrangler.jsonc') +const META = { language: 'en', license: 'U', authors: [{ name: 'Unknown', role: 'Author' }] } +const QUIZ = { ...META, type: 'H5P.TrueFalse', title: 'Boiling point', params: { question: '

Water boils at 100 °C at sea level.

', correct: 'true' } } + +type Asked = (request: Request) => Promise + +let worker: Awaited> +/** The Worker, and the server as Node runs it, each asked the same way. */ +let hosted: Asked +let local: Asked +let server: Awaited> + +/** One call of the protocol's, answered: its result, or the error it came back with. */ +async function ask(asked: Asked, method: string, params: unknown = {}) { + const response = await asked(new Request('https://host.example/mcp', { + method: 'POST', + headers: { 'content-type': 'application/json', accept: 'application/json, text/event-stream' }, + body: JSON.stringify({ jsonrpc: '2.0', id: 1, method, params }) + })) + const text = await response.text() + return JSON.parse(text.split('\n').find((line) => line.startsWith('data: '))?.slice(6) ?? text).result +} + +beforeAll(async () => { + worker = await unstable_startWorker({ config: CONFIG, dev: { server: { hostname: '127.0.0.1', port: 0 }, inspector: false, logLevel: 'error', watch: false } }) + await worker.ready + const origin = await worker.url + hosted = (request) => fetch(new Request(new URL(new URL(request.url).pathname, origin), request)) + server = await createApp() + local = (request) => server.fetch(request) +}) + +afterAll(async () => { + await worker?.dispose() + await server?.close() +}) + +describe('the app server as a Worker', () => { + it('names itself and its tools as the server on a computer does', async () => { + const hello = { protocolVersion: '2025-06-18', capabilities: {}, clientInfo: { name: 'test', version: '0' } } + expect(await ask(hosted, 'initialize', hello)).toEqual(await ask(local, 'initialize', hello)) + const { tools } = await ask(hosted, 'tools/list') + expect(tools.map((tool: { name: string }) => tool.name)).toEqual(['h5p_types', 'h5p_play']) + expect(tools).toEqual((await ask(local, 'tools/list')).tools) + }) + + it('reads the pack, the type files and the brief it carries', async () => { + // The list opens every content type's part, and carries the brief; a type with a file + // answers from it, and one without from the fields in its part. + for (const args of [{}, { type: 'H5P.TrueFalse' }, { type: 'H5P.Crossword' }]) { + const answer = await ask(hosted, 'tools/call', { name: 'h5p_types', arguments: args }) + expect(answer.isError).toBeUndefined() + expect(answer).toEqual(await ask(local, 'tools/call', { name: 'h5p_types', arguments: args })) + } + }) + + it('checks a source, and refuses one, in the same words', async () => { + for (const source of [QUIZ, { type: 'H5P.TrueFalse' }]) { + const answer = await ask(hosted, 'tools/call', { name: 'h5p_play', arguments: { source } }) + expect(answer).toEqual(await ask(local, 'tools/call', { name: 'h5p_play', arguments: { source } })) + } + expect((await ask(hosted, 'tools/call', { name: 'h5p_play', arguments: { source: QUIZ } })).content[0].text).toContain('The activity is checked and plays in the card: H5P.TrueFalse') + }) + + it('serves the same card at the same address, so a chat keeps one', async () => { + const { resources } = await ask(hosted, 'resources/list') + expect(resources[0].uri).toBe(server.cardUri) + expect(await ask(hosted, 'resources/read', { uri: server.cardUri })).toEqual(await ask(local, 'resources/read', { uri: server.cardUri })) + }) + + it('answers the endpoint and nothing else, and no body over 1 MB', async () => { + const at = (path: string, init?: RequestInit) => hosted(new Request(`https://host.example${path}`, init)) + expect((await at('/')).status).toBe(200) + // What it carries is not served: the files are the Worker's own. + for (const path of ['/card.html', '/parts/index.json', '/bundle/card.html', '/references/authoring.md']) expect((await at(path)).status).toBe(404) + const big = JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'tools/call', params: { name: 'h5p_play', arguments: { source: { pad: 'x'.repeat(1100_000) } } } }) + expect((await at('/mcp', { method: 'POST', headers: { 'content-type': 'application/json' }, body: big })).status).toBe(413) + }) + + it('is configured to keep nothing of a call, at one address', () => { + const config = unstable_readConfig({ config: CONFIG }) + expect(config.observability).toMatchObject({ enabled: false }) + expect(config.workers_dev).toBe(false) + expect(config.preview_urls).toBe(false) + expect(config.routes).toEqual([{ pattern: 'mcp.embed-my.org', custom_domain: true }]) + // No store is bound to it: nothing it could keep a call in. + for (const store of ['kv_namespaces', 'r2_buckets', 'd1_databases', 'queues', 'durable_objects', 'analytics_engine_datasets', 'tail_consumers'] as const) { + const bound = (config as unknown as Record)[store] + expect(Array.isArray(bound) ? bound : Object.values((bound ?? {}) as object).flat(), store).toHaveLength(0) + } + }) +}) diff --git a/apps/mcp-worker/tsconfig.json b/apps/mcp-worker/tsconfig.json new file mode 100644 index 00000000..2a81827a --- /dev/null +++ b/apps/mcp-worker/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "Bundler", + "lib": ["ES2022"], + "types": ["node"], + "strict": true, + "noEmit": true, + "allowJs": true, + "checkJs": true, + "isolatedModules": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "skipLibCheck": true + }, + "include": ["src/**/*.mjs", "scripts/**/*.mjs", "tests/**/*.ts", "vitest.config.ts"] +} diff --git a/apps/mcp-worker/vitest.config.ts b/apps/mcp-worker/vitest.config.ts new file mode 100644 index 00000000..9838f5ed --- /dev/null +++ b/apps/mcp-worker/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineConfig } from 'vitest/config' + +// The Worker runs as Cloudflare runs it, in its runtime on this computer, which wrangler starts: +// a bundle of the server and the 15 MB it carries, built once for the file's tests. +export default defineConfig({ + test: { + environment: 'node', + include: ['tests/**/*.test.ts'], + testTimeout: 120_000, + hookTimeout: 120_000 + } +}) diff --git a/apps/mcp-worker/wrangler.jsonc b/apps/mcp-worker/wrangler.jsonc new file mode 100644 index 00000000..fe45cd79 --- /dev/null +++ b/apps/mcp-worker/wrangler.jsonc @@ -0,0 +1,23 @@ +{ + "$schema": "node_modules/wrangler/config-schema.json", + "name": "h5p-mcp", + "main": "src/worker.mjs", + "compatibility_date": "2026-11-01", + // The server's entry is Node's: it reads the files below with node:fs. + "compatibility_flags": ["nodejs_compat"], + // What the server reads as it runs rides in the Worker as modules, which its file system + // shows under /bundle: scripts/stage.mjs gathers them into staged/. + "find_additional_modules": true, + "base_dir": "staged", + "rules": [ + { "type": "Data", "globs": ["parts/*.h5p"], "fallthrough": true }, + { "type": "Text", "globs": ["parts/index.json", "references/**/*.md"], "fallthrough": true } + ], + // Nothing of a call is kept: no invocation log, no trace. The test holds the file to it. + "observability": { "enabled": false }, + "send_metrics": false, + // One address, ours: no workers.dev name beside it, and no preview addresses. + "workers_dev": false, + "preview_urls": false, + "routes": [{ "pattern": "mcp.embed-my.org", "custom_domain": true }] +} diff --git a/design/commands.md b/design/commands.md index cf60f799..598933f1 100644 --- a/design/commands.md +++ b/design/commands.md @@ -25,6 +25,8 @@ pnpm --filter @missing-elements/h5p-author sync:skill # the h5p-author skill's pnpm --filter h5p-preview package # the VS Code extension's .vsix, from the player as pnpm build left it pnpm --filter h5p-preview test:vscode # its suite in a VS Code it downloads; under xvfb-run on Linux pnpm --filter h5p-preview screenshot # its listing's screenshot, images/preview.png, in that VS Code +pnpm --filter @missing-elements/h5p-mcp-worker dev # the app server's Worker in the Workers runtime, on this computer +pnpm --filter @missing-elements/h5p-mcp-worker deploy:worker # deploys it; after `pnpm --filter @missing-elements/h5p-mcp-worker exec wrangler login` pnpm build:demo # the hosted demo into apps/demo/dist-demo/, what Vercel runs pnpm demo:content # rebuild apps/demo/demo/content/*.h5p from their sources; needs the H5P hub pnpm demo:og # re-render the social card, apps/demo/demo/og-image.png diff --git a/design/layout.md b/design/layout.md index 268210c9..8a2814c3 100644 --- a/design/layout.md +++ b/design/layout.md @@ -36,7 +36,8 @@ packages/author/ a playable .h5p from a short source: lib/build.mjs both b scripts/ the skill's sync and copy, and build-tool.mjs the command line as one file (dist/) packages/mcp/ the local MCP server: bin/h5p-mcp.mjs the command, lib/server.mjs its four - tools, lib/folders.mjs the folders it may use + tools, lib/folders.mjs the folders it may use; and the app server: + bin/h5p-mcp-app.mjs, lib/app.mjs the handler, lib/card.html its card packages/cmi5/ the element as a cmi5 AU: src/index.ts startCmi5, src/client.ts the protocol packages/embed/ site/ the embed page and the SCORM page; lib/build.mjs the site, lib/scorm*.mjs the SCORM zip in Node and in a page; scorm/ its launch page @@ -47,6 +48,8 @@ apps/demo/ the dev server and the hosted site: index.html the player partials/ the shared markup, scripts/ the builds and the sweep, sweep/ its files apps/skills/ the skills' test project: author-verify, author-playback, to-scorm, front-matter +apps/mcp-worker/ the app server as a Cloudflare Worker: src/worker.mjs, wrangler.jsonc its + config, scripts/stage.mjs what it carries, gathered into staged/ skills/ the agent skills, at the root, where `npx skills add` looks docs/ the README's longer sections, for integrators scripts/ published.mjs, the check before a package is published that npm serves the diff --git a/design/mcp.md b/design/mcp.md index 8196e480..f23aa278 100644 --- a/design/mcp.md +++ b/design/mcp.md @@ -82,9 +82,9 @@ Not built yet: the MCP registry's `server.json` and Claude Desktop's one-click b `h5p-mcp-app` (`lib/app.mjs`, #210, #270) is an MCP server over HTTP for a chat app that shows a card in its reply, ChatGPT first: the person asks for an activity, the reply plays it, and its -`.h5p` is saved from there. `createApp()` is a web-standard handler, `fetch(request)`, so a host -that runs Node, or one that takes such a handler, serves it; the command is that handler on a -port. Its endpoint is `/mcp`. +`.h5p` is saved from there. `createApp()`, the package's `./app`, is a web-standard handler, +`fetch(request)`, so a host that runs Node, or one that takes such a handler, serves it; the +command is that handler on a port. Its endpoint is `/mcp`. - **No server of ours processes a person's file** (the owner's rule, 2026-11-24, and a goal of the whole toolkit). The chat sends the tool a reference to an attached file, an address and an id, @@ -136,4 +136,34 @@ port. Its endpoint is `/mcp`. checked by hand in a page that stands in for a chat, its frame sandboxed as ChatGPT's was found to be; in ChatGPT itself ran the probe's card, which this one is without its test parts. -Not built yet: where the server is hosted, the app's privacy policy and its listing (#210). +- **It is hosted as a Cloudflare Worker, at an address of ours** (`apps/mcp-worker`, #272): + `mcp.embed-my.org`, one line of its config, since the domain's zone is on the same account. A + Worker fails alone: the free plan gives 100,000 requests a day and bills nothing, and over the + limit the Worker answers an error until midnight UTC. A function of the demo's Vercel project + was built and dropped: on its plan one account shares 4 CPU-hours a month, and over the limit + the whole account is paused until someone acts, the demo and `/embed` with it, which an + endpoint with no sign-in lets anyone bring about. +- **The Worker is the same handler, and carries what the server reads.** `createApp()`, the + package's `./app`, takes as options what `import.meta` cannot find in a bundle: `version`, + `card`, `references`. The library pack's parts, the brief with the type files and the card are + gathered into `staged/` by `scripts/stage.mjs` and ride in the Worker as modules + (`find_additional_modules`), which its file system shows under `/bundle`: the server's Node + entry reads them there as on a computer (`nodejs_compat`). 17 MB of the 64 MiB a Worker may be. + Modules, not static assets: nothing of them is served. +- **The Worker keeps nothing either.** `observability.enabled` is `false`, so Cloudflare writes + no log and no trace of a call; no store is bound to it; it has one address, no `workers.dev` + name and no preview addresses. No token of the account is in the repository or in GitHub: it + is deployed by someone signed in to the account (`deploy:worker`), or by Cloudflare's own build + of the repository. +- **Tested in the Workers runtime.** `tests/worker.test.ts` has wrangler bundle the Worker and + start it on this computer, and holds each answer to the server's on Node, word for word: the + tools, the list of types, a type's file, a type's fields from its part, a source checked, one + refused, the card and its address. It holds the config to keeping nothing. +- **Not known until it is deployed** (2026-11-24). The free plan allows 10 ms of CPU a request, + with leeway for an overrun now and then; a check took 14 to 22 ms a call on a laptop in the + local runtime, and the first list of types 250 ms. A Worker may take 1 s to start, and this + one is 17 MB. If the free plan does not hold: the paid plan (30 s a request), or the parts as + static assets, read by the author package's entry for a page. A Worker runs near its caller + and cannot be held to a region below the Enterprise plan. + +Not built yet: the app's privacy policy and its listing (#210). diff --git a/design/testing.md b/design/testing.md index b30dcf7d..96e2451f 100644 --- a/design/testing.md +++ b/design/testing.md @@ -26,7 +26,7 @@ green. limit stops a hang; it does not time a test. The author's Node tests ran on vitest's 5 s a test, and a CI runner builds packages and writes bundles two to four times slower than a laptop: three tests failed there in three days, each at 5.0 s, each after the one before it got a number of its -own. So embed, mcp, the demo, the skills project, the author's Node project and the verifier each +own. So embed, mcp, its Worker, the demo, the skills project, the author's Node project and the verifier each set `testTimeout` and `hookTimeout` to 120 s in their config, and the author's browser project sets both to 180 s, for a build in Chromium and a play in the verifier. A test names its own only to ask for more, or where the time is what it tests. A package whose tests run in milliseconds keeps the @@ -53,6 +53,8 @@ cmi5 page also against CATAPULT (`pnpm cmi5:catapult`). Where a page's test was package's behaviour, the test lives in the package: the embed page asking before it plays a package that needs its own code, and `resizer.js` answering a frame that loaded before it, are in `packages/embed/tests/site.test.ts`; the cmi5 page's are in `packages/cmi5/tests/`. +The app server's Worker (`apps/mcp-worker`) is tested as well, in the Workers runtime: it answers +for a listed app, from files read in another runtime's file system ([mcp](mcp.md)). The skills are source too, tested from `apps/skills`, a project of their own: what they tell an agent to write builds and plays. For h5p-to-scorm that is its commands, run as it writes them, and their zips, played as a learner under a stand-in LMS with real content. h5p-author's own code is diff --git a/packages/mcp/README.md b/packages/mcp/README.md index dd943729..a5c358c2 100644 --- a/packages/mcp/README.md +++ b/packages/mcp/README.md @@ -92,6 +92,20 @@ What the server receives, and what it keeps: - A package up to about 8 MB is saved through the chat. A bigger one, with a video in it, is saved by a tab of the play page, which fetches the video from the chat and builds the package again. +A host that takes a web-standard handler serves the same server without the command: + +```js +import { createApp } from '@missing-elements/h5p-mcp/app' + +const app = await createApp() +export default { fetch: (request) => app.fetch(request) } +``` + +`createApp({ site, libraries, references, card, version })` takes the origin whose play page the +card frames, and a pack's `parts/` folder. A bundle has no package folder beside its code, so it +names what it carries: `references`, the author package's `references/` folder, `card`, the text +of this package's `lib/card.html`, and `version`. + ## Licence MIT. The H5P libraries a package carries are under their own licences, listed in it. diff --git a/packages/mcp/bin/h5p-mcp.mjs b/packages/mcp/bin/h5p-mcp.mjs old mode 100644 new mode 100755 diff --git a/packages/mcp/lib/answers.mjs b/packages/mcp/lib/answers.mjs index 232cf7d8..87f42c36 100644 --- a/packages/mcp/lib/answers.mjs +++ b/packages/mcp/lib/answers.mjs @@ -48,11 +48,13 @@ export function heldLines(result) { /** * What `h5p_types` answers, for a server: the list with the skill's brief, and a type's file, or * its fields where it has none. - * @param {{ libraries?: string }} [options] `libraries`, the pack's `parts/` folder; the installed pack by default + * @param {{ libraries?: string, references?: string }} [options] `libraries`, the pack's `parts/` + * folder, the installed pack by default; `references`, the author package's `references/` folder, + * the installed package's by default: a bundle has no package to find, and names its copy */ export function typeAnswers(options = {}) { - const author = dirname(fileURLToPath(import.meta.resolve('@missing-elements/h5p-author/package.json'))) - const typeFiles = join(author, 'references', 'types') + const references = options.references ?? join(dirname(fileURLToPath(import.meta.resolve('@missing-elements/h5p-author/package.json'))), 'references') + const typeFiles = join(references, 'types') /** @type {Promise<{ name: string, title: string }[]> | undefined} */ let typeList /** The pack's content types, read once: each needs its part opened. */ @@ -82,7 +84,7 @@ export function typeAnswers(options = {}) { async list(between = []) { const [list, files] = await Promise.all([types(), filed()]) const lines = list.map(({ name, title }) => `${files.has(name) ? '*' : '-'} ${name}: ${title}`) - const brief = await readFile(join(author, 'references', 'authoring.md'), 'utf8').catch(() => '') + const brief = await readFile(join(references, 'authoring.md'), 'utf8').catch(() => '') return [LIST_HEAD, ...lines, ...(between.length ? ['', ...between] : []), ...(brief ? ['', brief] : [])].join('\n') }, /** diff --git a/packages/mcp/lib/app.mjs b/packages/mcp/lib/app.mjs index 288bb26a..d78e98d9 100644 --- a/packages/mcp/lib/app.mjs +++ b/packages/mcp/lib/app.mjs @@ -20,6 +20,12 @@ import { SOURCE_PROPERTIES, TYPES, answer, heldLines, refusal, typeAnswers } fro * @typedef {object} AppOptions * @property {string} [site] the origin of the site whose play page the card frames; `https://missing-elements.github.io` by default * @property {string} [libraries] the pack's `parts/` folder to check with; the installed pack by default + * @property {string} [references] the folder of the author package's type files and brief, its `references/`; the installed package's by default + * @property {string} [card] the card's text, `lib/card.html`; read from beside this file by default + * @property {string} [version] the version the server names itself with; this package's by default + * + * The last three are for a host with no package folder beside the code, as a bundle is: there + * `import.meta` finds nothing, so the host names what it carries (a Cloudflare Worker, #272). */ const SITE = 'https://missing-elements.github.io' @@ -76,11 +82,11 @@ function attached(file) { */ export async function createApp(options = {}) { const site = new URL(options.site ?? SITE).origin - const { version } = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8')) - const card = (await readFile(new URL('./card.html', import.meta.url), 'utf8')).replaceAll('__SITE__', site) + const version = options.version ?? JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8')).version + const card = (options.card ?? await readFile(new URL('./card.html', import.meta.url), 'utf8')).replaceAll('__SITE__', site) // A chat keeps a card by its address, so a card that changed has another. const cardUri = `ui://h5p-play/card-${createHash('sha256').update(card).digest('hex').slice(0, 12)}.html` - const about = typeAnswers({ libraries: options.libraries }) + const about = typeAnswers({ libraries: options.libraries, references: options.references }) // The card's policy: the one site it frames, and the chat's file store, which it asks for the // attached file. Written twice, as the MCP Apps specification places it and as ChatGPT reads it. const cardMeta = { diff --git a/packages/mcp/package.json b/packages/mcp/package.json index 3068a4b8..49eb1502 100644 --- a/packages/mcp/package.json +++ b/packages/mcp/package.json @@ -21,6 +21,7 @@ "h5p-mcp-app": "./bin/h5p-mcp-app.mjs" }, "exports": { + "./app": "./lib/app.mjs", "./package.json": "./package.json" }, "files": [ diff --git a/packages/mcp/tests/app.test.ts b/packages/mcp/tests/app.test.ts index a3e46ff0..537461b6 100644 --- a/packages/mcp/tests/app.test.ts +++ b/packages/mcp/tests/app.test.ts @@ -1,6 +1,8 @@ import { spawn, type ChildProcess } from 'node:child_process' +import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises' import { createServer, type AddressInfo, type Server } from 'node:net' -import { resolve } from 'node:path' +import { tmpdir } from 'node:os' +import { join, resolve } from 'node:path' import { Client } from '@modelcontextprotocol/client' import { StreamableHTTPClientTransport } from '@modelcontextprotocol/client' import { afterAll, beforeAll, describe, expect, it } from 'vitest' @@ -209,6 +211,37 @@ describe('the app server', () => { expect((await fetch(`${origin}/mcp`, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'tools/call', params: { name: 'h5p_play', arguments: { source: { ...QUIZ, title: 'x'.repeat(1024 * 1024) } } } }) })).status).toBe(413) }) + it('takes its card, its version and its type files from a host that carries them', async () => { + // A bundle has no package folder beside the code, so its host names what it carries (#272). + const references = await mkdtemp(join(tmpdir(), 'h5p-mcp-references-')) + try { + await mkdir(join(references, 'types')) + await writeFile(join(references, 'types', 'H5P.TrueFalse.md'), "# The host's own notes on a statement\n") + await writeFile(join(references, 'authoring.md'), "The host's own brief.\n") + const app = await createApp({ version: '9.9.9', card: "

A host's card for __SITE__

", references }) + const ask = async (method: string, params: unknown) => { + const response = await app.fetch(new Request('https://host.example/mcp', { + method: 'POST', + headers: { 'content-type': 'application/json', accept: 'application/json, text/event-stream' }, + body: JSON.stringify({ jsonrpc: '2.0', id: 1, method, params }) + })) + const text = await response.text() + return JSON.parse(text.split('\n').find((line) => line.startsWith('data: '))?.slice(6) ?? text).result + } + expect((await ask('initialize', { protocolVersion: '2025-06-18', capabilities: {}, clientInfo: { name: 'test', version: '0' } })).serverInfo.version).toBe('9.9.9') + expect((await ask('resources/read', { uri: app.cardUri })).contents[0].text).toBe("

A host's card for https://missing-elements.github.io

") + expect((await ask('tools/call', { name: 'h5p_types', arguments: { type: 'H5P.TrueFalse' } })).content[0].text).toContain("The host's own notes on a statement") + // The list marks the types that have a file, and the host's folder has the one. + const list: string = (await ask('tools/call', { name: 'h5p_types', arguments: {} })).content[0].text + expect(list).toContain("The host's own brief.") + expect(list).toMatch(/^\* H5P\.TrueFalse\b/m) + expect(list).not.toMatch(/^\* H5P\.MultiChoice\b/m) + await app.close() + } finally { + await rm(references, { recursive: true, force: true }) + } + }) + it('writes down nothing of what it was asked', () => { // Every call above was made: all the command ever wrote is where it listens. expect(written.trim().split('\n')).toHaveLength(1) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a5aef166..89e99e63 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -58,6 +58,31 @@ importers: specifier: ^5.1.0 version: 5.1.0(@types/node@26.6.6)(@vitest/browser-playwright@5.1.0)(@vitest/ui@5.1.0)(vite@8.3.8(@types/node@26.6.6)(esbuild@0.28.2)) + apps/mcp-worker: + dependencies: + '@missing-elements/h5p-author': + specifier: workspace:* + version: link:../../packages/author + '@missing-elements/h5p-libraries': + specifier: workspace:* + version: link:../../packages/libraries + '@missing-elements/h5p-mcp': + specifier: workspace:* + version: link:../../packages/mcp + devDependencies: + '@types/node': + specifier: ^26.6.6 + version: 26.6.6 + typescript: + specifier: ^7.0.2 + version: 7.0.2 + vitest: + specifier: ^5.1.0 + version: 5.1.0(@types/node@26.6.6)(@vitest/browser-playwright@5.1.0)(@vitest/ui@5.1.0)(vite@8.3.8(@types/node@26.6.6)(esbuild@0.28.2)) + wrangler: + specifier: ^4.167.0 + version: 4.167.0(@types/node@26.6.6)(vitest@5.1.0) + apps/skills: devDependencies: '@missing-elements/h5p-author': @@ -403,12 +428,70 @@ packages: '@blazediff/core@1.10.0': resolution: {integrity: sha512-AOQff0zgR7cGsZL+4E7hVkmujoPUpm0J9xzWGWZj5wCjd3gmxESXAPfKyuzs93VdpQNFhHlBhfOjrcZ+XTERtQ==} + '@cloudflare/kv-asset-handler@0.5.1': + resolution: {integrity: sha512-48OysfSW3MkQY1XjkhkpPkgrEkOvgfoyHzA2eyX5wpzFpijC02uWigv3hkNdJdT3C7ybW/U17yYHXeR68pLeww==} + 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.20261123.1': + resolution: {integrity: sha512-eHJEySbW8swWiAYYaOn4LdtHQEPfug9oetPATkaXbsYxjsMX+nfyJ16//2ghXws8npxA+ZJkt5RYpimFfVdgkQ==} + engines: {node: '>=16'} + cpu: [x64] + os: [darwin] + + '@cloudflare/workerd-darwin-arm64@1.20261123.1': + resolution: {integrity: sha512-rDj5iScvzFD/6/pk01GqyIWa78DOGYLf18WCNG4bzfw1Z+VE/pG8msAllduLh0F/1WGD/PYxXJn03CCeSQPOUw==} + engines: {node: '>=16'} + cpu: [arm64] + os: [darwin] + + '@cloudflare/workerd-linux-64@1.20261123.1': + resolution: {integrity: sha512-hQs6svgH3YxdgKw7K0IVZ/gmeW49/z4UEHcxpsQHEa6Y2ZabUQef7YCI/BVcaCoHHp8p3cE/cziU3qh9ALIICw==} + engines: {node: '>=16'} + cpu: [x64] + os: [linux] + + '@cloudflare/workerd-linux-arm64@1.20261123.1': + resolution: {integrity: sha512-LLsuu+ZIcppjDNU4A9QGIbotqkiSXP2QF3HD9kCaateQUxB5GOJ6GRx+qKIu/1A+UBDKR3JutXpT9kKWe5PzEA==} + engines: {node: '>=16'} + cpu: [arm64] + os: [linux] + + '@cloudflare/workerd-windows-64@1.20261123.1': + resolution: {integrity: sha512-/zl++/e/0JLMttdz4lUsCo58NaLKQZKancI2YPciaLH9iLHq6UOP2BQZt+dejGRrV9UxdpPYPHUYU9Km5PcALA==} + engines: {node: '>=16'} + cpu: [x64] + os: [win32] + + '@cloudflare/workers-utils@0.57.0': + resolution: {integrity: sha512-6NulTDuddhxZUvCmDeyIVtn54Wo0rTV58YztF46V8NKBpH+PISm3aiudkCn0vLlRWeyYReNu5XmdE7hyvTwoLg==} + peerDependencies: + vitest: ^4.1.0 || ^5.0.0 + peerDependenciesMeta: + vitest: + optional: true + '@cmi5/requirements@1.0.0': resolution: {integrity: sha512-zma/xICz33dNVgpDYFeEhVtX9jsPXw8c8GhX4eZdHLMyfqCowyZN16ESYSv/zQp8orOfWHVPdm2bojv4TYUY/w==} + '@cspotcode/source-map-support@0.8.1': + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + '@emnapi/core@2.0.0-beta.2': resolution: {integrity: sha512-MzCVoWtcg4Pm2B3je5mMvYMvj3MmBKw+fU7vbsJc9/iT8ip6/eYIHo/Dsm/mr+wsHB6SEyJDuxB09Yy6r/8+4A==} + '@emnapi/runtime@1.11.3': + resolution: {integrity: sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==} + '@emnapi/runtime@2.0.0-beta.2': resolution: {integrity: sha512-JcrSPzPvZuNZvJqPTF9Fw25LbOJ8avzFVlaf2grmH4Cku0oGP47tRgqPZadcfj3YoZMHkFVnCYFbQM8I+i5QEw==} @@ -571,6 +654,152 @@ packages: cpu: [x64] os: [win32] + '@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] + '@inquirer/ansi@1.0.2': resolution: {integrity: sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==} engines: {node: '>=18'} @@ -718,6 +947,9 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@jridgewell/trace-mapping@0.3.9': + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@missing-elements/h5p-offline-player@0.1.10': resolution: {integrity: sha512-8/12nvkR9dlOZIrTKJhqFs0NLTZkJlQrA9hNP68mUmJwuVKJ1DicTDhW3S50OqefpYGFts/GhFpURbwllmEhvw==} engines: {node: '>=20'} @@ -763,35 +995,30 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [glibc] '@napi-rs/keyring-linux-arm64-musl@1.3.0': resolution: {integrity: sha512-iIK6JWHXAJqDrEyLY3TmswwloVyt2vj+04TZnew+uSJ9gnDO8EwRbp3/iw3LpWaXiDO7VomGO6y8I0Id8uBZSw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [musl] '@napi-rs/keyring-linux-riscv64-gnu@1.3.0': resolution: {integrity: sha512-/PGqrwn6EwgtK6vccASSXJRfOSP4vN1F4ASsIQ+7MdrK6hNvAJ1FZPrIuD5gGGdxezo3F++To2Wq7DbuGIeuNQ==} engines: {node: '>= 10'} cpu: [riscv64] os: [linux] - libc: [glibc] '@napi-rs/keyring-linux-x64-gnu@1.3.0': resolution: {integrity: sha512-2PDK1WKWTu9lBGq9VvNEkSlQD3O7YwVpmnyN2M3cy4v7NJ/8gDMd9GXv3G+FVXN13uhp4gnnPBS+ScefmEeD2A==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [glibc] '@napi-rs/keyring-linux-x64-musl@1.3.0': resolution: {integrity: sha512-oJ2HkX8YUo46QBkn0pG+HuIKQNqr523q6vBobCn+P95s4C4K6/kLBqHY/1bg5J4ap31DzsznhnFKcfBNBsjCnw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [musl] '@napi-rs/keyring-win32-arm64-msvc@1.3.0': resolution: {integrity: sha512-tOd3c/uAaeoE4ycVlmAdSvygz0Zt3zdca6Y7gokBeIbaRDWpjDIUOpU3MvML59XAaqyuKGsVVu0F/DZb1lHPmw==} @@ -863,28 +1090,24 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [glibc] '@node-rs/crc32-linux-arm64-musl@1.10.8': resolution: {integrity: sha512-eS8YXANJLBqdOzf5jCNVEXiDI4wjXVqQybaJextJJINvHhnhhOXPar8402GMagewOxGxYsy4C69G8rBIzqL4cg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [musl] '@node-rs/crc32-linux-x64-gnu@1.10.8': resolution: {integrity: sha512-DFd0eV47MAykz4PQDcBSlEvY3CtXqPt2gkBpvPngCpOUoIJgEk9tKtPjEgUwLatMkvsy4fEvAg7gckGickOyEw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [glibc] '@node-rs/crc32-linux-x64-musl@1.10.8': resolution: {integrity: sha512-U7fP8FjDQuOb61YoT8EoWDIJ9x40ZrCzM6OcAH1wqYiu9Z94U14S+i8KwTC7YorotGtICdYZ/APn1eI8vNne5w==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [musl] '@node-rs/crc32-win32-arm64-msvc@1.10.8': resolution: {integrity: sha512-VJezyT9OWnMPnArDR5ok0ARLemiL83LLNYh4MC++oHoLegqzyBllqNlO8fVp2PmczGkn+rfKkZbtG4w3MQ6BbQ==} @@ -914,6 +1137,15 @@ packages: '@polka/url@1.0.0-next.29': resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} + '@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/binding-android-arm-eabi@1.2.19': resolution: {integrity: sha512-e+Ebe0WT+9tbXmNKPIiC8YrWAHYwug3m6i4p3rZGGulfZri1jtI4HslT+OZnFf/OIHowWF71DTlHwXBP2SiA7A==} engines: {node: ^20.19.0 || >=22.12.0} @@ -955,42 +1187,36 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - libc: [glibc] '@rolldown/binding-linux-arm64-musl@1.2.19': resolution: {integrity: sha512-K1SmQp3FFichn8oqrNIwvFoZ5wcvjC7goBzpaMNvLf9FZc+QB/QvLmnpJZgAAGHiD980tP8FZZnXk2K94rvlxg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - libc: [musl] '@rolldown/binding-linux-ppc64-gnu@1.2.19': resolution: {integrity: sha512-I0xwD57jP/3A7+5UPZin2w8Y7XHEmEM5zqpYZOcQ45MlNW6tUJUziymV3yRr7rL4vwyfEcRsRksC4a7Kc08p5Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] - libc: [glibc] '@rolldown/binding-linux-s390x-gnu@1.2.19': resolution: {integrity: sha512-BrtEHT24SNXj9HiXqy+s/kXiSiQGt6EKCPUlRirAoIioVxKGnbXBUEkbZASAei7iZJB0/Ynm+0JP00Ipx7AnSw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] - libc: [glibc] '@rolldown/binding-linux-x64-gnu@1.2.19': resolution: {integrity: sha512-rm75/9DkHKeU2WnA8w4X94WGYgLlDCFCfkQC+4bguVJmC/jvDRv2B+2wLOYhyE0fVuv7//Ckk39OoOufyCu76Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - libc: [glibc] '@rolldown/binding-linux-x64-musl@1.2.19': resolution: {integrity: sha512-irh/4+iYFM4GAzpluDErgjz89bj6NDtqqMAG/6O1LG38Ed3NpyebzCpcVNkFW8uhy+/3/BocUvnXDR33CXWe9A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - libc: [musl] '@rolldown/binding-openharmony-arm64@1.2.19': resolution: {integrity: sha512-+KWTWNoPt+CfSq94CiceWu3yPE+QzkaG+phPyz9G60tmZLwfQkcA4AeksafzvJAw4pvg1mcd5a1TkUqVv0s4JA==} @@ -1073,6 +1299,13 @@ packages: '@shikijs/vscode-textmate@10.1.0': resolution: {integrity: sha512-cVBuhDQjBZaNMTwBquYfPydrUP+E3hE6oYGasx8h6ZrODIM7/r+gxLDXdd66oszbrggZHEntdE6j+5gYIVyMWQ==} + '@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==} + '@tybys/wasm-util@0.10.4': resolution: {integrity: sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A==} @@ -1091,6 +1324,12 @@ packages: '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} + '@types/node-fetch@2.6.13': + resolution: {integrity: sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw==} + + '@types/node@18.19.130': + resolution: {integrity: sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==} + '@types/node@26.6.6': resolution: {integrity: sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==} @@ -1100,6 +1339,12 @@ packages: '@types/vscode@1.90.0': resolution: {integrity: sha512-oT+ZJL7qHS9Z8bs0+WKf/kQ27qWYR3trsXpq46YDjFqBsMLG4ygGGjPaJ2tyrH0wJzjOEmDyg9PDJBBhWg9pkQ==} + '@types/yargs-parser@21.0.3': + resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} + + '@types/yargs@17.0.24': + resolution: {integrity: sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==} + '@typescript/typescript-aix-ppc64@7.0.2': resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} engines: {node: '>=16.20.0'} @@ -1358,6 +1603,10 @@ packages: resolution: {integrity: sha512-oNRqUuU1XFu6G5d7Z0jufJ9dS9WteO0xiU/PNxsUrb4itZCsSbn191jpJzU00Gmc6S680X3DPZeF5EV4zAEMAg==} engines: {bun: '>=0.7.0', deno: '>=1.0.0', node: '>=18.0.0'} + abort-controller@3.0.0: + resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} + engines: {node: '>=6.5'} + agent-base@7.1.4: resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} engines: {node: '>= 14'} @@ -1366,6 +1615,10 @@ packages: resolution: {integrity: sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA==} engines: {node: '>= 20'} + agentkeepalive@4.6.0: + resolution: {integrity: sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==} + engines: {node: '>= 8.0.0'} + ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -1382,6 +1635,9 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + azure-devops-node-api@12.5.0: resolution: {integrity: sha512-R5eFskGvOm3U/GzeAuxRkUsAl0hrAwGgWn6zAd2KrZmrEhWZVqLew4OOupbQlXUuojUzpGtq62SmdhJ06N88og==} @@ -1425,6 +1681,10 @@ packages: resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} engines: {node: '>=18'} + chalk@5.3.0: + resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + chalk@5.6.2: resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} @@ -1454,6 +1714,9 @@ packages: resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} engines: {node: '>= 12'} + cloudflare@5.2.0: + resolution: {integrity: sha512-dVzqDpPFYR9ApEC9e+JJshFJZXcw4HzM8W+3DHzO5oy9+8rLC53G7x6fEf9A7/gSuSCxuvndzui5qJKftfIM9A==} + cockatiel@3.2.1: resolution: {integrity: sha512-gfrHV6ZPkquExvMh9IOkKsBzNDk6sDuZ6DdBGUBkvFnTCqCxzpuq48RySgP0AnaqQkw2zynOFj9yly6T1Q2G5Q==} engines: {node: '>=16'} @@ -1465,6 +1728,10 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} @@ -1479,6 +1746,10 @@ packages: 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'} + core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} @@ -1520,6 +1791,10 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} @@ -1531,6 +1806,13 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + devtools-protocol@0.0.1182435: + resolution: {integrity: sha512-EmlkWb62wSbQNE1gRZZsi4KZYRaF5Skpp183LhRU7+sadKR06O1dHCjZmFSEG6Kv7P6S/UYLxcY3NlYwqKM99w==} + + dotenv@16.3.1: + resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==} + engines: {node: '>=12'} + dunder-proto@1.0.1: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} @@ -1552,6 +1834,9 @@ packages: resolution: {integrity: sha512-oJFNDJg3kTPwAD1cNn2+WmUq4wFoo09npc3Ydf1D7ED4smRiWrsKnaLxykrTWgyGEcusc87P5dxlAleol9kpkg==} engines: {node: '>=20.19.0'} + error-stack-parser-es@1.0.5: + resolution: {integrity: sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA==} + es-define-property@1.0.1: resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} engines: {node: '>= 0.4'} @@ -1567,6 +1852,10 @@ packages: resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} engines: {node: '>= 0.4'} + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + esbuild@0.28.2: resolution: {integrity: sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==} engines: {node: '>=18'} @@ -1575,6 +1864,10 @@ packages: estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + event-target-shim@5.0.1: + resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} + engines: {node: '>=6'} + eventsource-parser@3.1.1: resolution: {integrity: sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ==} engines: {node: '>=18.0.0'} @@ -1602,6 +1895,17 @@ packages: flatted@3.4.4: resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==} + form-data-encoder@1.7.2: + resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==} + + form-data@4.0.6: + resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} + engines: {node: '>= 6'} + + formdata-node@4.4.1: + resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==} + engines: {node: '>= 12.20'} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1643,6 +1947,10 @@ packages: resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} engines: {node: '>= 0.4'} + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + hasown@2.0.4: resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} engines: {node: '>= 0.4'} @@ -1676,6 +1984,9 @@ packages: resolution: {integrity: sha512-ag87y7cJJ9/3+GxFr8Oy4O5faDsGRGnBGsJj/YjOSsSx/5eadKLYTMPlzuR6obgoCDDm0abAAZitXXQkMOPSpA==} engines: {node: '>= 20'} + humanize-ms@1.2.1: + resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} + iconv-lite@0.7.3: resolution: {integrity: sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==} engines: {node: '>=0.10.0'} @@ -1753,6 +2064,10 @@ packages: jws@4.0.1: resolution: {integrity: sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==} + kleur@4.1.5: + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} + lie@3.3.0: resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==} @@ -1791,28 +2106,24 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [glibc] lightningcss-linux-arm64-musl@1.33.0: resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [musl] lightningcss-linux-x64-gnu@1.33.0: resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [glibc] lightningcss-linux-x64-musl@1.33.0: resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [musl] lightningcss-win32-arm64-msvc@1.33.0: resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} @@ -1893,6 +2204,14 @@ packages: micromark-util-types@2.0.3: resolution: {integrity: sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg==} + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + mime@1.6.0: resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} engines: {node: '>=4'} @@ -1902,6 +2221,15 @@ packages: resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} engines: {node: '>=18'} + miniflare@5.20261123.0-beta: + resolution: {integrity: sha512-ObCOK12WQjUw2yWJH8olMzDSkXaj8xlmZkfJp0MU7y/gnvfv9cBGj9o075ywFeBCBoKopRy8J9Ci3Sh4cquoxg==} + engines: {node: '>=22.12.0'} + peerDependencies: + kerberos: ^2.0.0 + peerDependenciesMeta: + kerberos: + optional: true + minimatch@11.0.8: resolution: {integrity: sha512-nFQuYSTVrGvysVBps5Ih+0BdnYFN/Cj3C816r6+p7yK+FHrVLGE4O4N9AFwykrlNlvM2HYt+Rad1Uiro6h88Ig==} engines: {node: 20 || >=22} @@ -1925,6 +2253,20 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + node-domexception@1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} + deprecated: Use your platform's native DOMException instead + + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + object-inspect@1.13.4: resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} engines: {node: '>= 0.4'} @@ -1970,6 +2312,9 @@ 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==} @@ -2090,6 +2435,15 @@ packages: setimmediate@1.0.5: resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} + 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'} @@ -2172,6 +2526,10 @@ packages: structured-source@4.0.0: resolution: {integrity: sha512-qGzRFNJDjFieQkl/sVOI2dUjHKRyL9dAJi2gCPGJLbJHBIkyOHxjuocpIEfbLioX+qSJpvbYdT49/YCdMznKxA==} + supports-color@10.2.2: + resolution: {integrity: sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==} + engines: {node: '>=18'} + textextensions@6.11.0: resolution: {integrity: sha512-tXJwSr9355kFJI3lbCkPpUH5cP8/M0GGy2xLO34aZCjMXBaK3SoPnZwr/oWmo1FdCnELcs4npdCIOFtq9W3ruQ==} engines: {node: '>=4'} @@ -2196,6 +2554,9 @@ packages: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} @@ -2217,9 +2578,19 @@ packages: underscore@1.13.8: resolution: {integrity: sha512-DXtD3ZtEQzc7M8m4cXotyHR+FAS18C64asBYY5vqZexfYryNNnDc02W4hKg3rdQuqOYas1jkseX0+nZXjTXnvQ==} + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@8.9.0: resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==} + undici@7.30.2: + resolution: {integrity: sha512-mLyPQnHwUxaM/rideoK/+KL8DaAJLRl4aBCfmX444aCSLnIaomqPLtNRe2jdCYcsk5wZzXrDIQC8ZeYNRAYyIA==} + engines: {node: '>=20.18.1'} + + unenv@2.0.0-rc.24: + resolution: {integrity: sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==} + unist-util-is@6.0.1: resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==} @@ -2335,6 +2706,16 @@ packages: jsdom: optional: true + web-streams-polyfill@4.0.0-beta.3: + resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==} + engines: {node: '>= 14'} + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -2345,10 +2726,37 @@ packages: engines: {node: '>=20.11'} hasBin: true + workerd@1.20261123.1: + resolution: {integrity: sha512-2FifnvyeJeCgL9G9QbFqldSrkwMkiWt7VqXjA025H8I4vjMsSHUKTmZ6+72VbB8CJZct/gzm2u8o7ltuRaPOmw==} + engines: {node: '>=16'} + hasBin: true + + wrangler@4.167.0: + resolution: {integrity: sha512-9P1rSUpjH96RSIEntUjkycglR5m3WcwwYRjPqbf9VN83Wizhk5s7J+Q3g5eUZGGTgtPhv763KZ4hw3jFnUjlTg==} + engines: {node: '>=22.12.0'} + hasBin: true + peerDependencies: + '@cloudflare/workers-types': ^5.20261123.1 + peerDependenciesMeta: + '@cloudflare/workers-types': + optional: true + wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} + 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 + ws@8.22.2: resolution: {integrity: sha512-/rEZ2ejown2N5gxVTHUu9bVVC7ttu0/Tgzf5hbTOixR3Fs7mbbXgn2DbdbcKgJOmpQMtrIUWivtYuVMnp/W/yA==} engines: {node: '>=10.0.0'} @@ -2391,6 +2799,12 @@ packages: resolution: {integrity: sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==} engines: {node: '>=18'} + youch-core@0.3.3: + resolution: {integrity: sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA==} + + youch@4.1.0-beta.10: + resolution: {integrity: sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ==} + zod@4.6.7: resolution: {integrity: sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==} @@ -2489,14 +2903,55 @@ snapshots: '@blazediff/core@1.10.0': {} + '@cloudflare/kv-asset-handler@0.5.1': {} + + '@cloudflare/unenv-preset@2.16.2(unenv@2.0.0-rc.24)(workerd@1.20261123.1)': + dependencies: + unenv: 2.0.0-rc.24 + optionalDependencies: + workerd: 1.20261123.1 + + '@cloudflare/workerd-darwin-64@1.20261123.1': + optional: true + + '@cloudflare/workerd-darwin-arm64@1.20261123.1': + optional: true + + '@cloudflare/workerd-linux-64@1.20261123.1': + optional: true + + '@cloudflare/workerd-linux-arm64@1.20261123.1': + optional: true + + '@cloudflare/workerd-windows-64@1.20261123.1': + optional: true + + '@cloudflare/workers-utils@0.57.0(vitest@5.1.0)': + dependencies: + '@cspotcode/source-map-support': 0.8.1 + chalk: 5.3.0 + dotenv: 16.3.1 + undici: 7.30.2 + optionalDependencies: + vitest: 5.1.0(@types/node@26.6.6)(@vitest/browser-playwright@5.1.0)(@vitest/ui@5.1.0)(vite@8.3.8(@types/node@26.6.6)(esbuild@0.28.2)) + '@cmi5/requirements@1.0.0': {} + '@cspotcode/source-map-support@0.8.1': + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + '@emnapi/core@2.0.0-beta.2': dependencies: '@emnapi/wasi-threads': 2.2.0 tslib: 2.9.1 optional: true + '@emnapi/runtime@1.11.3': + dependencies: + tslib: 2.9.1 + optional: true + '@emnapi/runtime@2.0.0-beta.2': dependencies: tslib: 2.9.1 @@ -2585,6 +3040,112 @@ snapshots: '@esbuild/win32-x64@0.28.2': optional: true + '@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 + '@inquirer/ansi@1.0.2': {} '@inquirer/checkbox@4.3.2(@types/node@26.6.6)': @@ -2721,6 +3282,11 @@ snapshots: '@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 + '@missing-elements/h5p-offline-player@0.1.10': dependencies: '@zip.js/zip.js': 2.25.0 @@ -2862,6 +3428,18 @@ snapshots: '@polka/url@1.0.0-next.29': {} + '@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/binding-android-arm-eabi@1.2.19': optional: true @@ -2980,6 +3558,10 @@ snapshots: '@shikijs/vscode-textmate@10.1.0': {} + '@sindresorhus/is@7.2.0': {} + + '@speed-highlight/core@1.2.24': {} + '@tybys/wasm-util@0.10.4': dependencies: tslib: 2.9.1 @@ -3002,6 +3584,15 @@ snapshots: dependencies: '@types/unist': 3.0.3 + '@types/node-fetch@2.6.13': + dependencies: + '@types/node': 26.6.6 + form-data: 4.0.6 + + '@types/node@18.19.130': + dependencies: + undici-types: 5.26.5 + '@types/node@26.6.6': dependencies: undici-types: 8.9.0 @@ -3010,6 +3601,12 @@ snapshots: '@types/vscode@1.90.0': {} + '@types/yargs-parser@21.0.3': {} + + '@types/yargs@17.0.24': + dependencies: + '@types/yargs-parser': 21.0.3 + '@typescript/typescript-aix-ppc64@7.0.2': optional: true @@ -3236,10 +3833,18 @@ snapshots: '@zip.js/zip.js@2.25.0': {} + abort-controller@3.0.0: + dependencies: + event-target-shim: 5.0.1 + agent-base@7.1.4: {} agent-base@9.0.0: {} + agentkeepalive@4.6.0: + dependencies: + humanize-ms: 1.2.1 + ansi-regex@5.0.1: {} ansi-regex@6.4.0: {} @@ -3250,6 +3855,8 @@ snapshots: assertion-error@2.0.1: {} + asynckit@0.4.0: {} + azure-devops-node-api@12.5.0: dependencies: tunnel: 0.0.6 @@ -3289,6 +3896,8 @@ snapshots: chai@6.3.0: {} + chalk@5.3.0: {} + chalk@5.6.2: {} character-entities-html4@2.1.0: {} @@ -3307,6 +3916,18 @@ snapshots: cli-width@4.1.0: {} + cloudflare@5.2.0: + dependencies: + '@types/node': 18.19.130 + '@types/node-fetch': 2.6.13 + abort-controller: 3.0.0 + agentkeepalive: 4.6.0 + form-data-encoder: 1.7.2 + formdata-node: 4.4.1 + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + cockatiel@3.2.1: {} color-convert@2.0.1: @@ -3315,6 +3936,10 @@ snapshots: color-name@1.1.4: {} + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + comma-separated-tokens@2.0.3: {} commander@12.1.0: {} @@ -3323,6 +3948,8 @@ snapshots: convert-source-map@2.0.0: {} + cookie@1.1.1: {} + core-util-is@1.0.3: {} cross-keychain@1.1.0(@types/node@26.6.6): @@ -3365,6 +3992,8 @@ snapshots: has-property-descriptors: 1.0.2 object-keys: 1.1.1 + delayed-stream@1.0.0: {} + dequal@2.0.3: {} detect-libc@2.1.2: {} @@ -3373,6 +4002,10 @@ snapshots: dependencies: dequal: 2.0.3 + devtools-protocol@0.0.1182435: {} + + dotenv@16.3.1: {} + dunder-proto@1.0.1: dependencies: call-bind-apply-helpers: 1.0.2 @@ -3393,6 +4026,8 @@ snapshots: entities@9.0.0: {} + error-stack-parser-es@1.0.5: {} + es-define-property@1.0.1: {} es-errors@1.3.0: {} @@ -3403,6 +4038,13 @@ snapshots: dependencies: es-errors: 1.3.0 + es-set-tostringtag@2.1.0: + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.4 + esbuild@0.28.2: optionalDependencies: '@esbuild/aix-ppc64': 0.28.2 @@ -3436,6 +4078,8 @@ snapshots: dependencies: '@types/estree': 1.0.10 + event-target-shim@5.0.1: {} + eventsource-parser@3.1.1: {} eventsource@3.0.7: @@ -3452,6 +4096,21 @@ snapshots: flatted@3.4.4: {} + form-data-encoder@1.7.2: {} + + form-data@4.0.6: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + hasown: 2.0.4 + mime-types: 2.1.35 + + formdata-node@4.4.1: + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 4.0.0-beta.3 + fsevents@2.3.3: optional: true @@ -3494,6 +4153,10 @@ snapshots: has-symbols@1.1.0: {} + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.1.0 + hasown@2.0.4: dependencies: function-bind: 1.1.2 @@ -3554,6 +4217,10 @@ snapshots: - kerberos - supports-color + humanize-ms@1.2.1: + dependencies: + ms: 2.1.3 + iconv-lite@0.7.3: dependencies: safer-buffer: 2.1.2 @@ -3631,6 +4298,8 @@ snapshots: jwa: 2.0.1 safe-buffer: 5.2.1 + kleur@4.1.5: {} + lie@3.3.0: dependencies: immediate: 3.0.6 @@ -3746,10 +4415,29 @@ snapshots: micromark-util-types@2.0.3: {} + mime-db@1.52.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + mime@1.6.0: {} mimic-function@5.0.1: {} + miniflare@5.20261123.0-beta(@types/node@26.6.6): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + sharp: 0.35.5(@types/node@26.6.6) + undici: 7.30.2 + workerd: 1.20261123.1 + ws: 8.21.0 + youch: 4.1.0-beta.10 + transitivePeerDependencies: + - '@types/node' + - bufferutil + - utf-8-validate + minimatch@11.0.8: dependencies: '@isaacs/nonrecursive-glob-match': 1.1.0 @@ -3765,6 +4453,12 @@ snapshots: nanoid@3.3.20: {} + node-domexception@1.0.0: {} + + node-fetch@2.7.0: + dependencies: + whatwg-url: 5.0.0 + object-inspect@1.13.4: {} object-keys@1.1.1: {} @@ -3826,6 +4520,8 @@ snapshots: path-key@3.1.1: {} + path-to-regexp@6.3.0: {} + pathe@2.0.3: {} pend@1.2.0: {} @@ -3938,6 +4634,39 @@ snapshots: setimmediate@1.0.5: {} + sharp@0.35.5(@types/node@26.6.6): + dependencies: + '@img/colour': 1.1.0 + detect-libc: 2.1.2 + semver: 7.8.6 + 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': 26.6.6 + shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 @@ -4036,6 +4765,8 @@ snapshots: dependencies: boundary: 2.0.0 + supports-color@10.2.2: {} + textextensions@6.11.0: dependencies: editions: 6.22.0 @@ -4053,6 +4784,8 @@ snapshots: totalist@3.0.1: {} + tr46@0.0.3: {} + trim-lines@3.0.1: {} tslib@2.9.1: {} @@ -4090,8 +4823,16 @@ snapshots: underscore@1.13.8: {} + undici-types@5.26.5: {} + undici-types@8.9.0: {} + undici@7.30.2: {} + + unenv@2.0.0-rc.24: + dependencies: + pathe: 2.0.3 + unist-util-is@6.0.1: dependencies: '@types/unist': 3.0.3 @@ -4166,18 +4907,62 @@ snapshots: transitivePeerDependencies: - msw + web-streams-polyfill@4.0.0-beta.3: {} + + webidl-conversions@3.0.1: {} + + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + which@2.0.2: dependencies: isexe: 2.0.0 why-is-node-running@3.2.1: {} + workerd@1.20261123.1: + optionalDependencies: + '@cloudflare/workerd-darwin-64': 1.20261123.1 + '@cloudflare/workerd-darwin-arm64': 1.20261123.1 + '@cloudflare/workerd-linux-64': 1.20261123.1 + '@cloudflare/workerd-linux-arm64': 1.20261123.1 + '@cloudflare/workerd-windows-64': 1.20261123.1 + + wrangler@4.167.0(@types/node@26.6.6)(vitest@5.1.0): + dependencies: + '@cloudflare/kv-asset-handler': 0.5.1 + '@cloudflare/unenv-preset': 2.16.2(unenv@2.0.0-rc.24)(workerd@1.20261123.1) + '@cloudflare/workers-utils': 0.57.0(vitest@5.1.0) + '@cspotcode/source-map-support': 0.8.1 + '@types/yargs': 17.0.24 + cloudflare: 5.2.0 + devtools-protocol: 0.0.1182435 + esbuild: 0.28.2 + miniflare: 5.20261123.0-beta(@types/node@26.6.6) + path-to-regexp: 6.3.0 + undici: 7.30.2 + unenv: 2.0.0-rc.24 + workerd: 1.20261123.1 + optionalDependencies: + fsevents: 2.3.3 + transitivePeerDependencies: + - '@types/node' + - bufferutil + - encoding + - kerberos + - utf-8-validate + - vitest + wrap-ansi@6.2.0: dependencies: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 + ws@8.21.0: {} + ws@8.22.2: {} wsl-utils@1.0.1: @@ -4210,6 +4995,19 @@ snapshots: yoctocolors-cjs@2.1.3: {} + 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 + zod@4.6.7: {} zwitch@2.0.4: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 62e09ce7..d91a5482 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -12,9 +12,13 @@ onlyBuiltDependencies: - '@vscode/vsce-sign' - esbuild -# Named so the install says nothing about it: its only script is the yarn guard above. +# Named so the install says nothing about them. h5p-standalone's only script is the yarn guard +# above. workerd, the Workers runtime wrangler starts for the app server's Worker +# (apps/mcp-worker), only checks its binary in its script: the binary comes as this platform's +# optional dependency, and the Worker's test starts it without the script having run. ignoredBuiltDependencies: - h5p-standalone + - workerd # @vscode/vsce reaches @azure/msal-node through @azure/identity, whose range, ^6, has no release # that fixes GHSA-xcx6-jx8p-x3h5 (high, Dependabot alert #3, opened when the VS Code extension From dad4a36c4ca33395098dd9e46d28e2fa8b0165ec Mon Sep 17 00:00:00 2001 From: Aleksandr Shevchuk Date: Tue, 24 Nov 2026 15:53:04 +0200 Subject: [PATCH 2/3] fix(mcp): a references folder that is not the author package's is refused at the start, and the notes say what the Worker's log setting and the free plan's limit cover (#272) --- apps/mcp-worker/tests/worker.test.ts | 4 ++-- apps/mcp-worker/wrangler.jsonc | 3 ++- design/layout.md | 2 +- design/mcp.md | 18 +++++++++++------- packages/mcp/README.md | 8 ++++---- packages/mcp/lib/answers.mjs | 14 ++++++++++++++ packages/mcp/lib/app.mjs | 7 +++++-- packages/mcp/tests/app.test.ts | 2 ++ 8 files changed, 41 insertions(+), 17 deletions(-) diff --git a/apps/mcp-worker/tests/worker.test.ts b/apps/mcp-worker/tests/worker.test.ts index 5ae865e6..dd0d4b2a 100644 --- a/apps/mcp-worker/tests/worker.test.ts +++ b/apps/mcp-worker/tests/worker.test.ts @@ -7,7 +7,7 @@ import { createApp } from '@missing-elements/h5p-mcp/app' * The Worker as Cloudflare runs it: bundled by wrangler with what it carries, started in the * Workers runtime on this computer, and asked over HTTP. The server's own rules are tested in * the MCP package; these hold the Worker to answering as the server on a computer does, word for - * word, from files it reads in another runtime's file system, and its config to keeping nothing. + * word, from files it reads in another runtime's file system, and its config to its logs off. */ const CONFIG = resolve(import.meta.dirname, '../wrangler.jsonc') @@ -89,7 +89,7 @@ describe('the app server as a Worker', () => { expect((await at('/mcp', { method: 'POST', headers: { 'content-type': 'application/json' }, body: big })).status).toBe(413) }) - it('is configured to keep nothing of a call, at one address', () => { + it('is configured to write no log of a call, with no store and one address', () => { const config = unstable_readConfig({ config: CONFIG }) expect(config.observability).toMatchObject({ enabled: false }) expect(config.workers_dev).toBe(false) diff --git a/apps/mcp-worker/wrangler.jsonc b/apps/mcp-worker/wrangler.jsonc index fe45cd79..79ce3898 100644 --- a/apps/mcp-worker/wrangler.jsonc +++ b/apps/mcp-worker/wrangler.jsonc @@ -13,7 +13,8 @@ { "type": "Data", "globs": ["parts/*.h5p"], "fallthrough": true }, { "type": "Text", "globs": ["parts/index.json", "references/**/*.md"], "fallthrough": true } ], - // Nothing of a call is kept: no invocation log, no trace. The test holds the file to it. + // Workers Logs off: no invocation log and no trace of a call is stored. The test holds the + // file to it. What Cloudflare counts for any Worker is not this setting's (design/mcp.md). "observability": { "enabled": false }, "send_metrics": false, // One address, ours: no workers.dev name beside it, and no preview addresses. diff --git a/design/layout.md b/design/layout.md index 8a2814c3..8499bbd4 100644 --- a/design/layout.md +++ b/design/layout.md @@ -1,6 +1,6 @@ # Layout -A pnpm workspace of ten packages and two apps. Nine packages are published to npm; the VS Code +A pnpm workspace of ten packages and three apps. Nine packages are published to npm; the VS Code extension is a `.vsix`. Paths in `design/` are relative to their part: `src/…` and `scripts/…` mean the player's unless a file says otherwise. `dist/`, `types/`, the player's `public/` and the runtime's `index.js` are generated and not in git. diff --git a/design/mcp.md b/design/mcp.md index f23aa278..7c6ba07a 100644 --- a/design/mcp.md +++ b/design/mcp.md @@ -137,9 +137,10 @@ command is that handler on a port. Its endpoint is `/mcp`. to be; in ChatGPT itself ran the probe's card, which this one is without its test parts. - **It is hosted as a Cloudflare Worker, at an address of ours** (`apps/mcp-worker`, #272): - `mcp.embed-my.org`, one line of its config, since the domain's zone is on the same account. A - Worker fails alone: the free plan gives 100,000 requests a day and bills nothing, and over the - limit the Worker answers an error until midnight UTC. A function of the demo's Vercel project + `mcp.embed-my.org`, one line of its config, since the domain's zone is on the same account. + The free plan gives 100,000 requests a day and bills nothing. The limit is the account's: over + it, every Worker of the account answers an error until midnight UTC, and nothing on another + host is touched, the demo and the organisation's site among them. A function of the demo's Vercel project was built and dropped: on its plan one account shares 4 CPU-hours a month, and over the limit the whole account is paused until someone acts, the demo and `/embed` with it, which an endpoint with no sign-in lets anyone bring about. @@ -150,15 +151,18 @@ command is that handler on a port. Its endpoint is `/mcp`. (`find_additional_modules`), which its file system shows under `/bundle`: the server's Node entry reads them there as on a computer (`nodejs_compat`). 17 MB of the 64 MiB a Worker may be. Modules, not static assets: nothing of them is served. -- **The Worker keeps nothing either.** `observability.enabled` is `false`, so Cloudflare writes - no log and no trace of a call; no store is bound to it; it has one address, no `workers.dev` - name and no preview addresses. No token of the account is in the repository or in GitHub: it +- **The Worker writes no log of a call and has nowhere to keep one.** `observability.enabled` + is `false`, which switches off Workers Logs: no invocation log and no trace is stored. No + store is bound to it, and it has one address, no `workers.dev` name and no preview addresses. + That setting is the Worker's alone. What Cloudflare counts for any Worker and any domain it + serves, the requests, their statuses, the CPU time, is outside it: the privacy policy names + that from Cloudflare's own documents, and does not say "nothing". No token of the account is in the repository or in GitHub: it is deployed by someone signed in to the account (`deploy:worker`), or by Cloudflare's own build of the repository. - **Tested in the Workers runtime.** `tests/worker.test.ts` has wrangler bundle the Worker and start it on this computer, and holds each answer to the server's on Node, word for word: the tools, the list of types, a type's file, a type's fields from its part, a source checked, one - refused, the card and its address. It holds the config to keeping nothing. + refused, the card and its address. It holds the config to its logs off, no store and one address. - **Not known until it is deployed** (2026-11-24). The free plan allows 10 ms of CPU a request, with leeway for an overrun now and then; a check took 14 to 22 ms a call on a laptop in the local runtime, and the first list of types 250 ms. A Worker may take 1 s to start, and this diff --git a/packages/mcp/README.md b/packages/mcp/README.md index a5c358c2..dbb2ebdf 100644 --- a/packages/mcp/README.md +++ b/packages/mcp/README.md @@ -101,10 +101,10 @@ const app = await createApp() export default { fetch: (request) => app.fetch(request) } ``` -`createApp({ site, libraries, references, card, version })` takes the origin whose play page the -card frames, and a pack's `parts/` folder. A bundle has no package folder beside its code, so it -names what it carries: `references`, the author package's `references/` folder, `card`, the text -of this package's `lib/card.html`, and `version`. +`createApp({ site, libraries, references, card, version })`: `site` is the origin whose play page +the card frames. A bundle has no package folder beside its code, so it names all it carries: +`libraries`, the library pack's `parts/` folder, `references`, the author package's `references/` +folder, `card`, the text of this package's `lib/card.html`, and `version`. ## Licence diff --git a/packages/mcp/lib/answers.mjs b/packages/mcp/lib/answers.mjs index 87f42c36..af7d3c50 100644 --- a/packages/mcp/lib/answers.mjs +++ b/packages/mcp/lib/answers.mjs @@ -77,6 +77,20 @@ export function typeAnswers(options = {}) { return new Set(names.filter((name) => name.endsWith('.md')).map((name) => name.slice(0, -3))) } return { + /** + * Holds a folder a host named to being the author package's `references/`. A wrong path + * would answer every type with its fields and leave the brief out, and say nothing of it. + * The installed package's own is taken as it is found: in this repository its type files + * are copied in by a build step, and the fields stand in until then. + */ + async held() { + if (options.references === undefined) return + const names = await readdir(typeFiles).catch(() => []) + const brief = await readFile(join(references, 'authoring.md'), 'utf8').catch(() => '') + if (!brief || !names.some((name) => name.endsWith('.md'))) { + throw new Error(`${references} is not the author package's references/ folder: it has no authoring.md, or no type file in types/`) + } + }, /** * The list, and how to write good content, with a server's own lines between them. * @param {string[]} [between] diff --git a/packages/mcp/lib/app.mjs b/packages/mcp/lib/app.mjs index d78e98d9..884ff453 100644 --- a/packages/mcp/lib/app.mjs +++ b/packages/mcp/lib/app.mjs @@ -24,8 +24,9 @@ import { SOURCE_PROPERTIES, TYPES, answer, heldLines, refusal, typeAnswers } fro * @property {string} [card] the card's text, `lib/card.html`; read from beside this file by default * @property {string} [version] the version the server names itself with; this package's by default * - * The last three are for a host with no package folder beside the code, as a bundle is: there - * `import.meta` finds nothing, so the host names what it carries (a Cloudflare Worker, #272). + * A host with no package folder beside the code, as a bundle is, names all it carries, the pack + * and the last three: there `import.meta` finds nothing (a Cloudflare Worker, #272). A + * `references` folder that is not the author package's is refused as the server starts. */ const SITE = 'https://missing-elements.github.io' @@ -87,6 +88,8 @@ export async function createApp(options = {}) { // A chat keeps a card by its address, so a card that changed has another. const cardUri = `ui://h5p-play/card-${createHash('sha256').update(card).digest('hex').slice(0, 12)}.html` const about = typeAnswers({ libraries: options.libraries, references: options.references }) + // Said as the server starts, not found out by whoever reads its answers. + await about.held() // The card's policy: the one site it frames, and the chat's file store, which it asks for the // attached file. Written twice, as the MCP Apps specification places it and as ChatGPT reads it. const cardMeta = { diff --git a/packages/mcp/tests/app.test.ts b/packages/mcp/tests/app.test.ts index 537461b6..6e3f77fa 100644 --- a/packages/mcp/tests/app.test.ts +++ b/packages/mcp/tests/app.test.ts @@ -237,6 +237,8 @@ describe('the app server', () => { expect(list).toMatch(/^\* H5P\.TrueFalse\b/m) expect(list).not.toMatch(/^\* H5P\.MultiChoice\b/m) await app.close() + // A folder that is not the author package's is said at the start, not by thinner answers. + await expect(createApp({ references: join(references, 'types') })).rejects.toThrow(/is not the author package's references\/ folder/) } finally { await rm(references, { recursive: true, force: true }) } From e0cd5be4b99e0d7ff7746745220e7bac2cc5f5a6 Mon Sep 17 00:00:00 2001 From: Aleksandr Shevchuk Date: Tue, 24 Nov 2026 16:01:28 +0200 Subject: [PATCH 3/3] docs(mcp): what a route's fail mode does over the free plan's limit, and why the Worker's address gets no answer either way (#272) --- design/mcp.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/design/mcp.md b/design/mcp.md index 7c6ba07a..f2f409eb 100644 --- a/design/mcp.md +++ b/design/mcp.md @@ -138,9 +138,11 @@ command is that handler on a port. Its endpoint is `/mcp`. - **It is hosted as a Cloudflare Worker, at an address of ours** (`apps/mcp-worker`, #272): `mcp.embed-my.org`, one line of its config, since the domain's zone is on the same account. - The free plan gives 100,000 requests a day and bills nothing. The limit is the account's: over - it, every Worker of the account answers an error until midnight UTC, and nothing on another - host is touched, the demo and the organisation's site among them. A function of the demo's Vercel project + The free plan gives 100,000 requests a day and bills nothing. The limit is the account's, until + midnight UTC: over it, a route set to fail closed answers Cloudflare's error 1027, and one set + to fail open passes its requests on as if there were no Worker. This Worker is a Custom + Domain, with no origin behind it, so either way a call gets no answer from the server. Nothing + on another host is touched, the demo and the organisation's site among them. A function of the demo's Vercel project was built and dropped: on its plan one account shares 4 CPU-hours a month, and over the limit the whole account is paused until someone acts, the demo and `/embed` with it, which an endpoint with no sign-in lets anyone bring about.