diff --git a/.github/workflows/check-library-index.yml b/.github/workflows/check-library-index.yml
new file mode 100644
index 0000000..fea7f68
--- /dev/null
+++ b/.github/workflows/check-library-index.yml
@@ -0,0 +1,23 @@
+name: Check design library index
+
+# Keeps the pinned offline index (skills/design-library/library-index.md) in
+# sync with the upstream VoltAgent/awesome-design-md library. Runs weekly to
+# catch upstream additions/removals, and on any PR that touches the skill.
+
+on:
+ schedule:
+ - cron: "0 6 * * 1" # every Monday 06:00 UTC
+ workflow_dispatch: {}
+ pull_request:
+ paths:
+ - "skills/design-library/**"
+ - "scripts/check-library-index.sh"
+ - ".github/workflows/check-library-index.yml"
+
+jobs:
+ check-index:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Validate pinned library index against upstream
+ run: bash scripts/check-library-index.sh
diff --git a/README.md b/README.md
index ad32145..ae02b59 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ Designpowers is an open, model-agnostic design workflow that gives you a team of
| **design-critic** | Reviews against brief, plan, principles; loops back with gaps |
| **heuristic-evaluator** | Nielsen's 10 heuristics, cognitive walkthroughs, usability |
-**31 skills** that enforce a complete design workflow — from discovery through retrospective.
+**36 skills** that enforce a complete design workflow — from discovery through retrospective.
**2 lanes** — Build (design something new through the full pipeline) and Review (audit something you already have — a screenshot, URL, or code — through the reviewers, without the full build process).
diff --git a/examples/traced-run/README.md b/examples/traced-run/README.md
new file mode 100644
index 0000000..63fcf07
--- /dev/null
+++ b/examples/traced-run/README.md
@@ -0,0 +1,48 @@
+# Traced run — Aurora cookie consent banner
+
+A worked, end-to-end example of a Designpowers pipeline producing a real,
+verified artifact. It exists so the orchestration is **demonstrated**, not just
+described — for a system whose creed is "evidence over claims," there should be
+at least one trace you can read and a build you can open.
+
+## What's here
+
+| File | What it is |
+|------|-----------|
+| `design-state.md` | The spine of the run — brief, personas, strategy, the full handoff babble chain, parallel reviews, reconciliation, synthetic testing, verification, debt, and the pipeline tally. This is what every agent reads and updates. |
+| `artifact/consent-banner.html` | The actual build. Open it in a browser. |
+| `artifact/consent-banner.png` | The build rendered with headless Chromium (the screenshot-checkpoint output). |
+| `artifact/accessibility-evidence.txt` | WCAG AA contrast **computed** (not eyeballed) for every text/UI pair, plus structural checks. All pass. |
+
+## Why a cookie banner
+
+It's small enough to read in one sitting but deliberately rich in the tensions
+the pipeline is meant to resolve: an **ethics/legal** constraint (reject must be
+as easy as accept — no dark patterns), an **accessibility** constraint (focus
+management, screen-reader announcement, contrast, targets), a **content**
+constraint (plain language about what you're agreeing to), and a **usability**
+constraint (one-click refusal). The reconciliation step has something real to
+reconcile.
+
+## What is and isn't automated here
+
+Honest scope: this trace was produced by driving the workflow's stages and
+genuinely creating each stage's output — the artifact is real, it renders, and
+its accessibility numbers are **computed by tooling**, not asserted. What it is
+*not* is a capture of ten separately-dispatched subagent processes; the agent
+voices in the handoff chain are the workflow executed as written, recorded in
+the shared state the way a live run records them.
+
+Two follow-through items are noted in `design-state.md` as app-integration
+dependencies (sending focus to the dialog on load; wiring the "Choose
+individually" settings screen) — they're documented as intent in the markup and
+flagged in review, not hidden.
+
+## Regenerating the evidence
+
+```bash
+# render (needs playwright chromium)
+node scripts/shoot.js examples/traced-run/artifact/consent-banner.html \
+ examples/traced-run/artifact/consent-banner.png
+# contrast + structural checks are in artifact/accessibility-evidence.txt
+```
diff --git a/examples/traced-run/artifact/accessibility-evidence.txt b/examples/traced-run/artifact/accessibility-evidence.txt
new file mode 100644
index 0000000..09a9287
--- /dev/null
+++ b/examples/traced-run/artifact/accessibility-evidence.txt
@@ -0,0 +1,18 @@
+WCAG 2.2 AA contrast evidence (computed, not eyeballed)
+threshold: 4.5 normal text, 3.0 large/UI
+
+ Banner title #1b2030 on #ffffff 16.21 PASS
+ Banner body #41485c on #ffffff 9.11 PASS
+ Accept btn #ffffff on #2b5cd9 5.78 PASS
+ Reject btn #1b2030 on #ffffff 16.21 PASS
+ Link/settings #2b5cd9 on #ffffff 5.78 PASS
+
+Structural (from markup):
+ Accept and Reject have equal visual weight (no dark pattern): PASS
+ All controls min-height 44px touch target: PASS
+ Visible focus ring (:focus-visible 3px): PASS
+ role=dialog + aria-labelledby + aria-describedby: PASS
+ prefers-reduced-motion honoured: PASS
+ lang=en set: PASS
+
+VERDICT: ALL PASS
diff --git a/examples/traced-run/artifact/consent-banner.html b/examples/traced-run/artifact/consent-banner.html
new file mode 100644
index 0000000..03b978a
--- /dev/null
+++ b/examples/traced-run/artifact/consent-banner.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+Aurora — cookie consent
+
+
+
+
+
Aurora dashboard
+
Your background content sits here. The consent banner below does not block it visually, but focus moves to the banner so keyboard and screen-reader users handle it first.
+
+
+
+
+
Cookies on Aurora
+
We use essential cookies to run Aurora. With your OK, we’d also use analytics cookies to see what’s slow and fix it. You can change this anytime in Privacy settings.
+
+
+
+
+
+
+
+
diff --git a/examples/traced-run/artifact/consent-banner.png b/examples/traced-run/artifact/consent-banner.png
new file mode 100644
index 0000000..14a1d5f
Binary files /dev/null and b/examples/traced-run/artifact/consent-banner.png differ
diff --git a/examples/traced-run/design-state.md b/examples/traced-run/design-state.md
new file mode 100644
index 0000000..47e1da4
--- /dev/null
+++ b/examples/traced-run/design-state.md
@@ -0,0 +1,124 @@
+# Design State — Aurora Cookie Consent Banner
+
+> Shared living document for this project. Every agent reads it before starting and updates it on completion. This is the spine of the run — the handoff chain, decisions, reviews, and evidence all accumulate here.
+
+**Project:** A cookie-consent banner for the Aurora dashboard.
+**Mode:** Direct (handoffs shown; approvals recorded below).
+**Started:** 2026-05-30
+**Taste layers:** No client `DESIGN.md` supplied → built from a lightweight project taste calibration (below). Personal taste profile: none loaded (first project for this user). Nothing here was promoted to a personal profile.
+
+---
+
+## Brief (from design-discovery)
+
+- **Problem:** Aurora needs lawful, honest cookie consent. Users must be able to refuse analytics as easily as accept — and not be tricked into accepting.
+- **Primary task:** Decide on analytics cookies (accept / reject / choose) and get back to the dashboard.
+- **Users / ability spectrum:** Dashboard users on desktop and mobile; includes keyboard-only users, screen-reader users, low-vision users (zoom), and users with motion sensitivity. Situational: people in a hurry who just want to dismiss it correctly.
+- **Constraints:** GDPR/ePrivacy posture — reject must be as easy as accept; no pre-ticked analytics; essential cookies need no consent. Web, ships in the existing app shell.
+- **Quality bar:** Production.
+- **Success:** A user can refuse analytics in one click, understand what they’re agreeing to, and do it by keyboard or screen reader without getting stuck.
+
+## Personas (from inclusive-personas) — abridged
+
+| Persona | Key need | Worst-case condition |
+|---------|----------|----------------------|
+| Priya — keyboard-only (RSI) | Reach and operate every control without a mouse | Focus must move to the banner and never trap |
+| Marcus — screen-reader user | Know what the dialog is and what each button does | Banner must be announced; buttons self-describing |
+| Lena — low vision, 200% zoom | Read the text and tell the buttons apart | Contrast + layout that survives zoom/reflow |
+| Sam — in a hurry | Dismiss correctly in one action | Reject must be one obvious click, not buried |
+
+## Strategy & principles (from design-strategy)
+
+1. **Honest by default** — accept and reject carry equal visual weight. Refusing is never harder than agreeing.
+2. **Plain, specific copy** — say what analytics cookies do and why, at a low reading level.
+3. **Non-blocking but focus-first** — don’t hijack the whole screen, but move focus to the banner so assistive-tech users deal with it first.
+
+## Project taste calibration (stands in for a DESIGN.md)
+
+- Calm, trustworthy, neutral. Single blue accent (`#2b5cd9`). Warm-neutral ink, soft 12px radius, one soft shadow. No alarming reds, no playful tone — this is a consent surface, it should feel straight.
+- Recorded as the **project** taste layer only.
+
+---
+
+## Handoff Chain (babble — shown to the user during the run)
+
+1. **design-strategist → content-writer:**
+ "Core constraint is legal + ethical symmetry: reject must be as easy as accept, no pre-ticked boxes. I framed it as ‘honest by default.’ Copy needs to name analytics cookies plainly and give a why — keep it low reading level."
+
+2. **content-writer → design-lead:**
+ "Wrote three button labels with equal commitment: ‘Accept analytics’ / ‘Reject analytics’ / ‘Choose individually’. Body says what analytics does (‘see what’s slow and fix it’) and points to Privacy settings for later changes. Grade ~6. Don’t restyle reject to look weaker — that would undo the symmetry."
+
+3. **design-lead → motion-designer:**
+ "Single blue accent on Accept; Reject is an equal-size outline button, not a faint link — symmetry holds. ‘Choose individually’ is the genuinely tertiary action as an underlined button. 44px targets, 12px radius, one soft shadow. Banner is a labelled dialog pinned bottom, non-blocking."
+
+4. **motion-designer → design-builder:**
+ "Keep it quiet — a consent surface shouldn’t bounce. At most a 150ms fade-in, and it’s fully removed under prefers-reduced-motion. No looping or attention-grabbing motion. Don’t animate focus movement."
+
+5. **design-builder → reviewers:**
+ "Built `artifact/consent-banner.html` using the content-writer’s exact strings. role=dialog + aria-labelledby/describedby, focusable container (focus sent here on load in the real app), 44px targets, :focus-visible ring, reduced-motion handled. Equal-weight Accept/Reject as specified. One thing to check: aria-modal is false (non-blocking) — confirm that’s the right call for screen-reader flow."
+
+## Reviews (parallel: critic ∥ accessibility-reviewer ∥ heuristic-evaluator)
+
+**design-critic — proceed with fixes.** Matches the ‘honest by default’ brief; symmetry intact. Minor: body copy could name the retention/no-3rd-party point, but that’s scope for the privacy page, not the banner. Logged to debt, not fixed now.
+
+**accessibility-reviewer — pass with one finding.** Contrast all AA (see evidence). role/labelling correct, targets ≥44px, focus ring visible, reduced-motion honoured. Finding (Major): `aria-modal="false"` is correct for a non-blocking banner, *but* the build must actually move focus to the dialog on load or screen-reader users may never reach it — flagged to builder to confirm the focus-on-load behaviour in the real app (the static fixture documents the intent via `tabindex="-1"`).
+
+**heuristic-evaluator — 9/10, one H-note.** H2/H4/H6 strong (plain language, consistent, recognition over recall). H3 (user control): good — both choices are one click and reversible via settings. Note: ‘Choose individually’ must lead somewhere real; in the fixture it’s a stub — confirm wiring before ship.
+
+## Reconciliation
+
+- **Aligned:** critic + a11y + heuristic all endorse the equal-weight buttons → keep, do not weaken Reject.
+- **Complementary:** a11y focus-on-load finding + heuristic ‘settings must be wired’ note → both go to the fix list.
+- **Conflicting:** none.
+- **Resolution rules applied:** none needed beyond compiling the fix list (no accessibility-vs-aesthetics conflict arose).
+
+**Fix list (prioritised):**
+1. (Major, a11y) Ensure focus moves to the banner dialog on load; verify SR announces it. *Documented in markup intent; behaviour to confirm in app integration.*
+2. (Minor, heuristic) Wire ‘Choose individually’ to the real per-category settings.
+3. (Note, critic) Consider adding retention/no-3rd-party line on the Privacy page. → **design debt.**
+
+## Synthetic user testing (persona walkthroughs)
+
+| Task: refuse analytics and return | Priya (kbd) | Marcus (SR) | Lena (200%) | Sam (hurry) |
+|-----------------------------------|-------------|-------------|-------------|-------------|
+| Reach the controls | ✓ (focus order logical) | ✓ (dialog announced via role+label) | ✓ (reflows, no clipping) | ✓ |
+| Tell Accept from Reject | ✓ | ✓ (labels self-describe) | ✓ (both buttons, equal weight) | ✓ |
+| Refuse in one action | ✓ | ✓ | ✓ | ✓ (Reject is one obvious click) |
+
+No persona is blocked. The one dependency is the focus-on-load behaviour (fix #1) — passing assumes it’s implemented as documented.
+
+## Verification (before shipping) — evidence, not claims
+
+- **Accessibility:** see `artifact/accessibility-evidence.txt` — all text/UI pairings computed at WCAG AA, all PASS; structural checks (targets, focus, roles, reduced-motion) PASS.
+- **Build renders:** `artifact/consent-banner.png` (rendered with headless Chromium).
+- **Brief met:** reject is one click and equal in weight to accept; copy is plain and names the purpose; banner is a labelled dialog.
+- **Open dependencies before real ship:** fix #1 (focus-on-load) and fix #2 (wire settings) — both noted, neither is a fixture defect.
+
+## Design debt register (deferred, tracked — not dropped)
+
+| Item | Severity | Who it affects | Why deferred |
+|------|----------|----------------|--------------|
+| Add retention / no-third-party line on Privacy page | Note | all users wanting detail | Belongs on the privacy page, out of banner scope |
+
+## Decisions log
+
+- Equal-weight Accept/Reject buttons — *rationale: brief + ethics; endorsed by all three reviewers.*
+- Non-blocking dialog (`aria-modal=false`) with focus-on-load — *rationale: don’t hijack the screen, but ensure AT users handle it first.*
+- Quiet motion, removed under reduced-motion — *rationale: a consent surface shouldn’t demand attention through movement.*
+
+## Pipeline
+
+| Agent | Status |
+|-------|--------|
+| design-strategist | ✅ |
+| design-scout | ⏭️ skipped (well-understood pattern; legal symmetry is the real constraint, not market research) |
+| inspiration-scout | ⏭️ skipped (small surface) |
+| content-writer | ✅ |
+| design-lead | ✅ |
+| motion-designer | ✅ |
+| design-builder | ✅ |
+| design-critic | ✅ |
+| accessibility-reviewer | ✅ |
+| heuristic-evaluator | ✅ |
+
+**Agents used: 8 of 10** · **Fix rounds: 1** · **Mode: direct**
diff --git a/mcp-tools/accessibility/node_modules/.bin/node-which b/mcp-tools/accessibility/node_modules/.bin/node-which
new file mode 120000
index 0000000..6f8415e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/.bin/node-which
@@ -0,0 +1 @@
+../which/bin/node-which
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/.package-lock.json b/mcp-tools/accessibility/node_modules/.package-lock.json
new file mode 100644
index 0000000..102c261
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/.package-lock.json
@@ -0,0 +1,1148 @@
+{
+ "name": "accessibility",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "node_modules/@hono/node-server": {
+ "version": "1.19.14",
+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.14.tgz",
+ "integrity": "sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.14.1"
+ },
+ "peerDependencies": {
+ "hono": "^4"
+ }
+ },
+ "node_modules/@modelcontextprotocol/sdk": {
+ "version": "1.29.0",
+ "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.29.0.tgz",
+ "integrity": "sha512-zo37mZA9hJWpULgkRpowewez1y6ML5GsXJPY8FI0tBBCd77HEvza4jDqRKOXgHNn867PVGCyTdzqpz0izu5ZjQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@hono/node-server": "^1.19.9",
+ "ajv": "^8.17.1",
+ "ajv-formats": "^3.0.1",
+ "content-type": "^1.0.5",
+ "cors": "^2.8.5",
+ "cross-spawn": "^7.0.5",
+ "eventsource": "^3.0.2",
+ "eventsource-parser": "^3.0.0",
+ "express": "^5.2.1",
+ "express-rate-limit": "^8.2.1",
+ "hono": "^4.11.4",
+ "jose": "^6.1.3",
+ "json-schema-typed": "^8.0.2",
+ "pkce-challenge": "^5.0.0",
+ "raw-body": "^3.0.0",
+ "zod": "^3.25 || ^4.0",
+ "zod-to-json-schema": "^3.25.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@cfworker/json-schema": "^4.1.1",
+ "zod": "^3.25 || ^4.0"
+ },
+ "peerDependenciesMeta": {
+ "@cfworker/json-schema": {
+ "optional": true
+ },
+ "zod": {
+ "optional": false
+ }
+ }
+ },
+ "node_modules/accepts": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
+ "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-types": "^3.0.0",
+ "negotiator": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/ajv": {
+ "version": "8.20.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz",
+ "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==",
+ "license": "MIT",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3",
+ "fast-uri": "^3.0.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/ajv-formats": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz",
+ "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "ajv": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/body-parser": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz",
+ "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "^3.1.2",
+ "content-type": "^1.0.5",
+ "debug": "^4.4.3",
+ "http-errors": "^2.0.0",
+ "iconv-lite": "^0.7.0",
+ "on-finished": "^2.4.1",
+ "qs": "^6.14.1",
+ "raw-body": "^3.0.1",
+ "type-is": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/call-bound": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "get-intrinsic": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/content-disposition": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz",
+ "integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
+ "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.6.0"
+ }
+ },
+ "node_modules/cors": {
+ "version": "2.8.6",
+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz",
+ "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==",
+ "license": "MIT",
+ "dependencies": {
+ "object-assign": "^4",
+ "vary": "^1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "license": "MIT"
+ },
+ "node_modules/encodeurl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/es-define-property": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz",
+ "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "license": "MIT"
+ },
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/eventsource": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz",
+ "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==",
+ "license": "MIT",
+ "dependencies": {
+ "eventsource-parser": "^3.0.1"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/eventsource-parser": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.1.0.tgz",
+ "integrity": "sha512-kJezFj9YFAMLeORyi7aCLxLbD5/qWMQnoMVlVPyHIll7lgRJCc3JVln9Vgl9nwQi0YkMnhdGTMNn7CkRRAptMg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/express": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
+ "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
+ "license": "MIT",
+ "dependencies": {
+ "accepts": "^2.0.0",
+ "body-parser": "^2.2.1",
+ "content-disposition": "^1.0.0",
+ "content-type": "^1.0.5",
+ "cookie": "^0.7.1",
+ "cookie-signature": "^1.2.1",
+ "debug": "^4.4.0",
+ "depd": "^2.0.0",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "etag": "^1.8.1",
+ "finalhandler": "^2.1.0",
+ "fresh": "^2.0.0",
+ "http-errors": "^2.0.0",
+ "merge-descriptors": "^2.0.0",
+ "mime-types": "^3.0.0",
+ "on-finished": "^2.4.1",
+ "once": "^1.4.0",
+ "parseurl": "^1.3.3",
+ "proxy-addr": "^2.0.7",
+ "qs": "^6.14.0",
+ "range-parser": "^1.2.1",
+ "router": "^2.2.0",
+ "send": "^1.1.0",
+ "serve-static": "^2.2.0",
+ "statuses": "^2.0.1",
+ "type-is": "^2.0.1",
+ "vary": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/express-rate-limit": {
+ "version": "8.5.2",
+ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.5.2.tgz",
+ "integrity": "sha512-5Kb34ipNX694DH48vN9irak1Qx30nb0PLYHXfJgw4YEjiC3ZEmZJhwOp+VfiCYwFzvFTdB9QkArYS5kXa2cx2A==",
+ "license": "MIT",
+ "dependencies": {
+ "ip-address": "^10.2.0"
+ },
+ "engines": {
+ "node": ">= 16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/express-rate-limit"
+ },
+ "peerDependencies": {
+ "express": ">= 4.11"
+ }
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "license": "MIT"
+ },
+ "node_modules/fast-uri": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz",
+ "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fastify"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/fastify"
+ }
+ ],
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/finalhandler": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",
+ "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.0",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "on-finished": "^2.4.1",
+ "parseurl": "^1.3.3",
+ "statuses": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
+ "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "function-bind": "^1.1.2",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/gopd": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
+ "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
+ "license": "MIT",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/hono": {
+ "version": "4.12.23",
+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.23.tgz",
+ "integrity": "sha512-eIaZ9qDgu7XV0pxOCrg7/WhnQ6Ivm22UcxhXx/A3dcbqbbYgBEkc6e/J/s7j2tS96zoB0S9VBdLwQNCWwUo4LA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16.9.0"
+ }
+ },
+ "node_modules/http-errors": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
+ "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
+ "license": "MIT",
+ "dependencies": {
+ "depd": "~2.0.0",
+ "inherits": "~2.0.4",
+ "setprototypeof": "~1.2.0",
+ "statuses": "~2.0.2",
+ "toidentifier": "~1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",
+ "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "license": "ISC"
+ },
+ "node_modules/ip-address": {
+ "version": "10.2.0",
+ "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.2.0.tgz",
+ "integrity": "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 12"
+ }
+ },
+ "node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/is-promise": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
+ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
+ "license": "MIT"
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "license": "ISC"
+ },
+ "node_modules/jose": {
+ "version": "6.2.3",
+ "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.3.tgz",
+ "integrity": "sha512-YYVDInQKFJfR/xa3ojUTl8c2KoTwiL1R5Wg9YCydwH0x0B9grbzlg5HC7mMjCtUJjbQ/YnGEZIhI5tCgfTb4Hw==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/panva"
+ }
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "license": "MIT"
+ },
+ "node_modules/json-schema-typed": {
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.2.tgz",
+ "integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==",
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/media-typer": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
+ "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/merge-descriptors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
+ "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.54.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
+ "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
+ "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "^1.54.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/negotiator": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
+ "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/object-inspect": {
+ "version": "1.13.4",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
+ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "license": "MIT",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "license": "ISC",
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-to-regexp": {
+ "version": "8.4.2",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz",
+ "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/pkce-challenge": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz",
+ "integrity": "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "license": "MIT",
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/qs": {
+ "version": "6.15.2",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.2.tgz",
+ "integrity": "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "side-channel": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",
+ "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "~3.1.2",
+ "http-errors": "~2.0.1",
+ "iconv-lite": "~0.7.0",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/router": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
+ "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.0",
+ "depd": "^2.0.0",
+ "is-promise": "^4.0.0",
+ "parseurl": "^1.3.3",
+ "path-to-regexp": "^8.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "license": "MIT"
+ },
+ "node_modules/send": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz",
+ "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.3",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "etag": "^1.8.1",
+ "fresh": "^2.0.0",
+ "http-errors": "^2.0.1",
+ "mime-types": "^3.0.2",
+ "ms": "^2.1.3",
+ "on-finished": "^2.4.1",
+ "range-parser": "^1.2.1",
+ "statuses": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/serve-static": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz",
+ "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",
+ "license": "MIT",
+ "dependencies": {
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "parseurl": "^1.3.3",
+ "send": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "license": "ISC"
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "license": "MIT",
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/side-channel": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
+ "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3",
+ "side-channel-list": "^1.0.0",
+ "side-channel-map": "^1.0.1",
+ "side-channel-weakmap": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-list": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",
+ "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-map": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
+ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-weakmap": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
+ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3",
+ "side-channel-map": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/statuses": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
+ "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/type-is": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.1.0.tgz",
+ "integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==",
+ "license": "MIT",
+ "dependencies": {
+ "content-type": "^2.0.0",
+ "media-typer": "^1.1.0",
+ "mime-types": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/type-is/node_modules/content-type": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz",
+ "integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "license": "ISC",
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "license": "ISC"
+ },
+ "node_modules/zod": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz",
+ "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ },
+ "node_modules/zod-to-json-schema": {
+ "version": "3.25.2",
+ "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.2.tgz",
+ "integrity": "sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA==",
+ "license": "ISC",
+ "peerDependencies": {
+ "zod": "^3.25.28 || ^4"
+ }
+ }
+ }
+}
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/LICENSE b/mcp-tools/accessibility/node_modules/@hono/node-server/LICENSE
new file mode 100644
index 0000000..5f84afa
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 - present, Yusuke Wada and Hono contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/README.md b/mcp-tools/accessibility/node_modules/@hono/node-server/README.md
new file mode 100644
index 0000000..af0e931
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/README.md
@@ -0,0 +1,358 @@
+# Node.js Adapter for Hono
+
+This adapter `@hono/node-server` allows you to run your Hono application on Node.js.
+Initially, Hono wasn't designed for Node.js, but with this adapter, you can now use Hono on Node.js.
+It utilizes web standard APIs implemented in Node.js version 18 or higher.
+
+## Benchmarks
+
+Hono is 3.5 times faster than Express.
+
+Express:
+
+```txt
+$ bombardier -d 10s --fasthttp http://localhost:3000/
+
+Statistics Avg Stdev Max
+ Reqs/sec 16438.94 1603.39 19155.47
+ Latency 7.60ms 7.51ms 559.89ms
+ HTTP codes:
+ 1xx - 0, 2xx - 164494, 3xx - 0, 4xx - 0, 5xx - 0
+ others - 0
+ Throughput: 4.55MB/s
+```
+
+Hono + `@hono/node-server`:
+
+```txt
+$ bombardier -d 10s --fasthttp http://localhost:3000/
+
+Statistics Avg Stdev Max
+ Reqs/sec 58296.56 5512.74 74403.56
+ Latency 2.14ms 1.46ms 190.92ms
+ HTTP codes:
+ 1xx - 0, 2xx - 583059, 3xx - 0, 4xx - 0, 5xx - 0
+ others - 0
+ Throughput: 12.56MB/s
+```
+
+## Requirements
+
+It works on Node.js versions greater than 18.x. The specific required Node.js versions are as follows:
+
+- 18.x => 18.14.1+
+- 19.x => 19.7.0+
+- 20.x => 20.0.0+
+
+Essentially, you can simply use the latest version of each major release.
+
+## Installation
+
+You can install it from the npm registry with `npm` command:
+
+```sh
+npm install @hono/node-server
+```
+
+Or use `yarn`:
+
+```sh
+yarn add @hono/node-server
+```
+
+## Usage
+
+Just import `@hono/node-server` at the top and write the code as usual.
+The same code that runs on Cloudflare Workers, Deno, and Bun will work.
+
+```ts
+import { serve } from '@hono/node-server'
+import { Hono } from 'hono'
+
+const app = new Hono()
+app.get('/', (c) => c.text('Hono meets Node.js'))
+
+serve(app, (info) => {
+ console.log(`Listening on http://localhost:${info.port}`) // Listening on http://localhost:3000
+})
+```
+
+For example, run it using `ts-node`. Then an HTTP server will be launched. The default port is `3000`.
+
+```sh
+ts-node ./index.ts
+```
+
+Open `http://localhost:3000` with your browser.
+
+## Options
+
+### `port`
+
+```ts
+serve({
+ fetch: app.fetch,
+ port: 8787, // Port number, default is 3000
+})
+```
+
+### `createServer`
+
+```ts
+import { createServer } from 'node:https'
+import fs from 'node:fs'
+
+//...
+
+serve({
+ fetch: app.fetch,
+ createServer: createServer,
+ serverOptions: {
+ key: fs.readFileSync('test/fixtures/keys/agent1-key.pem'),
+ cert: fs.readFileSync('test/fixtures/keys/agent1-cert.pem'),
+ },
+})
+```
+
+### `overrideGlobalObjects`
+
+The default value is `true`. The Node.js Adapter rewrites the global Request/Response and uses a lightweight Request/Response to improve performance. If you don't want to do that, set `false`.
+
+```ts
+serve({
+ fetch: app.fetch,
+ overrideGlobalObjects: false,
+})
+```
+
+### `autoCleanupIncoming`
+
+The default value is `true`. The Node.js Adapter automatically cleans up (explicitly call `destroy()` method) if application is not finished to consume the incoming request. If you don't want to do that, set `false`.
+
+If the application accepts connections from arbitrary clients, this cleanup must be done otherwise incomplete requests from clients may cause the application to stop responding. If your application only accepts connections from trusted clients, such as in a reverse proxy environment and there is no process that returns a response without reading the body of the POST request all the way through, you can improve performance by setting it to `false`.
+
+```ts
+serve({
+ fetch: app.fetch,
+ autoCleanupIncoming: false,
+})
+```
+
+## Middleware
+
+Most built-in middleware also works with Node.js.
+Read [the documentation](https://hono.dev/middleware/builtin/basic-auth) and use the Middleware of your liking.
+
+```ts
+import { serve } from '@hono/node-server'
+import { Hono } from 'hono'
+import { prettyJSON } from 'hono/pretty-json'
+
+const app = new Hono()
+
+app.get('*', prettyJSON())
+app.get('/', (c) => c.json({ 'Hono meets': 'Node.js' }))
+
+serve(app)
+```
+
+## Serve Static Middleware
+
+Use Serve Static Middleware that has been created for Node.js.
+
+```ts
+import { serveStatic } from '@hono/node-server/serve-static'
+
+//...
+
+app.use('/static/*', serveStatic({ root: './' }))
+```
+
+If using a relative path, `root` will be relative to the current working directory from which the app was started.
+
+This can cause confusion when running your application locally.
+
+Imagine your project structure is:
+
+```
+my-hono-project/
+ src/
+ index.ts
+ static/
+ index.html
+```
+
+Typically, you would run your app from the project's root directory (`my-hono-project`),
+so you would need the following code to serve the `static` folder:
+
+```ts
+app.use('/static/*', serveStatic({ root: './static' }))
+```
+
+Notice that `root` here is not relative to `src/index.ts`, rather to `my-hono-project`.
+
+### Options
+
+#### `rewriteRequestPath`
+
+If you want to serve files in `./.foojs` with the request path `/__foo/*`, you can write like the following.
+
+```ts
+app.use(
+ '/__foo/*',
+ serveStatic({
+ root: './.foojs/',
+ rewriteRequestPath: (path: string) => path.replace(/^\/__foo/, ''),
+ })
+)
+```
+
+#### `onFound`
+
+You can specify handling when the requested file is found with `onFound`.
+
+```ts
+app.use(
+ '/static/*',
+ serveStatic({
+ // ...
+ onFound: (_path, c) => {
+ c.header('Cache-Control', `public, immutable, max-age=31536000`)
+ },
+ })
+)
+```
+
+#### `onNotFound`
+
+The `onNotFound` is useful for debugging. You can write a handle for when a file is not found.
+
+```ts
+app.use(
+ '/static/*',
+ serveStatic({
+ root: './non-existent-dir',
+ onNotFound: (path, c) => {
+ console.log(`${path} is not found, request to ${c.req.path}`)
+ },
+ })
+)
+```
+
+#### `precompressed`
+
+The `precompressed` option checks if files with extensions like `.br` or `.gz` are available and serves them based on the `Accept-Encoding` header. It prioritizes Brotli, then Zstd, and Gzip. If none are available, it serves the original file.
+
+```ts
+app.use(
+ '/static/*',
+ serveStatic({
+ precompressed: true,
+ })
+)
+```
+
+## ConnInfo Helper
+
+You can use the [ConnInfo Helper](https://hono.dev/docs/helpers/conninfo) by importing `getConnInfo` from `@hono/node-server/conninfo`.
+
+```ts
+import { getConnInfo } from '@hono/node-server/conninfo'
+
+app.get('/', (c) => {
+ const info = getConnInfo(c) // info is `ConnInfo`
+ return c.text(`Your remote address is ${info.remote.address}`)
+})
+```
+
+## Accessing Node.js API
+
+You can access the Node.js API from `c.env` in Node.js. For example, if you want to specify a type, you can write the following.
+
+```ts
+import { serve } from '@hono/node-server'
+import type { HttpBindings } from '@hono/node-server'
+import { Hono } from 'hono'
+
+const app = new Hono<{ Bindings: HttpBindings }>()
+
+app.get('/', (c) => {
+ return c.json({
+ remoteAddress: c.env.incoming.socket.remoteAddress,
+ })
+})
+
+serve(app)
+```
+
+The APIs that you can get from `c.env` are as follows.
+
+```ts
+type HttpBindings = {
+ incoming: IncomingMessage
+ outgoing: ServerResponse
+}
+
+type Http2Bindings = {
+ incoming: Http2ServerRequest
+ outgoing: Http2ServerResponse
+}
+```
+
+## Direct response from Node.js API
+
+You can directly respond to the client from the Node.js API.
+In that case, the response from Hono should be ignored, so return `RESPONSE_ALREADY_SENT`.
+
+> [!NOTE]
+> This feature can be used when migrating existing Node.js applications to Hono, but we recommend using Hono's API for new applications.
+
+```ts
+import { serve } from '@hono/node-server'
+import type { HttpBindings } from '@hono/node-server'
+import { RESPONSE_ALREADY_SENT } from '@hono/node-server/utils/response'
+import { Hono } from 'hono'
+
+const app = new Hono<{ Bindings: HttpBindings }>()
+
+app.get('/', (c) => {
+ const { outgoing } = c.env
+ outgoing.writeHead(200, { 'Content-Type': 'text/plain' })
+ outgoing.end('Hello World\n')
+
+ return RESPONSE_ALREADY_SENT
+})
+
+serve(app)
+```
+
+## Listen to a UNIX domain socket
+
+You can configure the HTTP server to listen to a UNIX domain socket instead of a TCP port.
+
+```ts
+import { createAdaptorServer } from '@hono/node-server'
+
+// ...
+
+const socketPath = '/tmp/example.sock'
+
+const server = createAdaptorServer(app)
+server.listen(socketPath, () => {
+ console.log(`Listening on ${socketPath}`)
+})
+```
+
+## Related projects
+
+- Hono -
+- Hono GitHub repository -
+
+## Authors
+
+- Yusuke Wada
+- Taku Amano
+
+## License
+
+MIT
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/conninfo.d.mts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/conninfo.d.mts
new file mode 100644
index 0000000..4c756d1
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/conninfo.d.mts
@@ -0,0 +1,10 @@
+import { GetConnInfo } from 'hono/conninfo';
+
+/**
+ * ConnInfo Helper for Node.js
+ * @param c Context
+ * @returns ConnInfo
+ */
+declare const getConnInfo: GetConnInfo;
+
+export { getConnInfo };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/conninfo.d.ts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/conninfo.d.ts
new file mode 100644
index 0000000..4c756d1
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/conninfo.d.ts
@@ -0,0 +1,10 @@
+import { GetConnInfo } from 'hono/conninfo';
+
+/**
+ * ConnInfo Helper for Node.js
+ * @param c Context
+ * @returns ConnInfo
+ */
+declare const getConnInfo: GetConnInfo;
+
+export { getConnInfo };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/conninfo.js b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/conninfo.js
new file mode 100644
index 0000000..131934d
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/conninfo.js
@@ -0,0 +1,42 @@
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/conninfo.ts
+var conninfo_exports = {};
+__export(conninfo_exports, {
+ getConnInfo: () => getConnInfo
+});
+module.exports = __toCommonJS(conninfo_exports);
+var getConnInfo = (c) => {
+ const bindings = c.env.server ? c.env.server : c.env;
+ const address = bindings.incoming.socket.remoteAddress;
+ const port = bindings.incoming.socket.remotePort;
+ const family = bindings.incoming.socket.remoteFamily;
+ return {
+ remote: {
+ address,
+ port,
+ addressType: family === "IPv4" ? "IPv4" : family === "IPv6" ? "IPv6" : void 0
+ }
+ };
+};
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ getConnInfo
+});
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/conninfo.mjs b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/conninfo.mjs
new file mode 100644
index 0000000..ab3cc95
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/conninfo.mjs
@@ -0,0 +1,17 @@
+// src/conninfo.ts
+var getConnInfo = (c) => {
+ const bindings = c.env.server ? c.env.server : c.env;
+ const address = bindings.incoming.socket.remoteAddress;
+ const port = bindings.incoming.socket.remotePort;
+ const family = bindings.incoming.socket.remoteFamily;
+ return {
+ remote: {
+ address,
+ port,
+ addressType: family === "IPv4" ? "IPv4" : family === "IPv6" ? "IPv6" : void 0
+ }
+ };
+};
+export {
+ getConnInfo
+};
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/globals.d.mts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/globals.d.mts
new file mode 100644
index 0000000..223e65e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/globals.d.mts
@@ -0,0 +1,2 @@
+
+export { }
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/globals.d.ts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/globals.d.ts
new file mode 100644
index 0000000..223e65e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/globals.d.ts
@@ -0,0 +1,2 @@
+
+export { }
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/globals.js b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/globals.js
new file mode 100644
index 0000000..4704d2c
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/globals.js
@@ -0,0 +1,29 @@
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+));
+
+// src/globals.ts
+var import_node_crypto = __toESM(require("crypto"));
+if (typeof global.crypto === "undefined") {
+ global.crypto = import_node_crypto.default;
+}
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/globals.mjs b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/globals.mjs
new file mode 100644
index 0000000..45daa06
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/globals.mjs
@@ -0,0 +1,5 @@
+// src/globals.ts
+import crypto from "crypto";
+if (typeof global.crypto === "undefined") {
+ global.crypto = crypto;
+}
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/index.d.mts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/index.d.mts
new file mode 100644
index 0000000..b9f383b
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/index.d.mts
@@ -0,0 +1,8 @@
+export { createAdaptorServer, serve } from './server.mjs';
+export { getRequestListener } from './listener.mjs';
+export { RequestError } from './request.mjs';
+export { Http2Bindings, HttpBindings, ServerType } from './types.mjs';
+import 'node:net';
+import 'node:http';
+import 'node:http2';
+import 'node:https';
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/index.d.ts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/index.d.ts
new file mode 100644
index 0000000..7a03b52
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/index.d.ts
@@ -0,0 +1,8 @@
+export { createAdaptorServer, serve } from './server.js';
+export { getRequestListener } from './listener.js';
+export { RequestError } from './request.js';
+export { Http2Bindings, HttpBindings, ServerType } from './types.js';
+import 'node:net';
+import 'node:http';
+import 'node:http2';
+import 'node:https';
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/index.js b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/index.js
new file mode 100644
index 0000000..35f72a9
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/index.js
@@ -0,0 +1,702 @@
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/index.ts
+var src_exports = {};
+__export(src_exports, {
+ RequestError: () => RequestError,
+ createAdaptorServer: () => createAdaptorServer,
+ getRequestListener: () => getRequestListener,
+ serve: () => serve
+});
+module.exports = __toCommonJS(src_exports);
+
+// src/server.ts
+var import_node_http = require("http");
+
+// src/listener.ts
+var import_node_http22 = require("http2");
+
+// src/request.ts
+var import_node_http2 = require("http2");
+var import_node_stream = require("stream");
+var RequestError = class extends Error {
+ constructor(message, options) {
+ super(message, options);
+ this.name = "RequestError";
+ }
+};
+var toRequestError = (e) => {
+ if (e instanceof RequestError) {
+ return e;
+ }
+ return new RequestError(e.message, { cause: e });
+};
+var GlobalRequest = global.Request;
+var Request = class extends GlobalRequest {
+ constructor(input, options) {
+ if (typeof input === "object" && getRequestCache in input) {
+ input = input[getRequestCache]();
+ }
+ if (typeof options?.body?.getReader !== "undefined") {
+ ;
+ options.duplex ??= "half";
+ }
+ super(input, options);
+ }
+};
+var newHeadersFromIncoming = (incoming) => {
+ const headerRecord = [];
+ const rawHeaders = incoming.rawHeaders;
+ for (let i = 0; i < rawHeaders.length; i += 2) {
+ const { [i]: key, [i + 1]: value } = rawHeaders;
+ if (key.charCodeAt(0) !== /*:*/
+ 58) {
+ headerRecord.push([key, value]);
+ }
+ }
+ return new Headers(headerRecord);
+};
+var wrapBodyStream = Symbol("wrapBodyStream");
+var newRequestFromIncoming = (method, url, headers, incoming, abortController) => {
+ const init = {
+ method,
+ headers,
+ signal: abortController.signal
+ };
+ if (method === "TRACE") {
+ init.method = "GET";
+ const req = new Request(url, init);
+ Object.defineProperty(req, "method", {
+ get() {
+ return "TRACE";
+ }
+ });
+ return req;
+ }
+ if (!(method === "GET" || method === "HEAD")) {
+ if ("rawBody" in incoming && incoming.rawBody instanceof Buffer) {
+ init.body = new ReadableStream({
+ start(controller) {
+ controller.enqueue(incoming.rawBody);
+ controller.close();
+ }
+ });
+ } else if (incoming[wrapBodyStream]) {
+ let reader;
+ init.body = new ReadableStream({
+ async pull(controller) {
+ try {
+ reader ||= import_node_stream.Readable.toWeb(incoming).getReader();
+ const { done, value } = await reader.read();
+ if (done) {
+ controller.close();
+ } else {
+ controller.enqueue(value);
+ }
+ } catch (error) {
+ controller.error(error);
+ }
+ }
+ });
+ } else {
+ init.body = import_node_stream.Readable.toWeb(incoming);
+ }
+ }
+ return new Request(url, init);
+};
+var getRequestCache = Symbol("getRequestCache");
+var requestCache = Symbol("requestCache");
+var incomingKey = Symbol("incomingKey");
+var urlKey = Symbol("urlKey");
+var headersKey = Symbol("headersKey");
+var abortControllerKey = Symbol("abortControllerKey");
+var getAbortController = Symbol("getAbortController");
+var requestPrototype = {
+ get method() {
+ return this[incomingKey].method || "GET";
+ },
+ get url() {
+ return this[urlKey];
+ },
+ get headers() {
+ return this[headersKey] ||= newHeadersFromIncoming(this[incomingKey]);
+ },
+ [getAbortController]() {
+ this[getRequestCache]();
+ return this[abortControllerKey];
+ },
+ [getRequestCache]() {
+ this[abortControllerKey] ||= new AbortController();
+ return this[requestCache] ||= newRequestFromIncoming(
+ this.method,
+ this[urlKey],
+ this.headers,
+ this[incomingKey],
+ this[abortControllerKey]
+ );
+ }
+};
+[
+ "body",
+ "bodyUsed",
+ "cache",
+ "credentials",
+ "destination",
+ "integrity",
+ "mode",
+ "redirect",
+ "referrer",
+ "referrerPolicy",
+ "signal",
+ "keepalive"
+].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ get() {
+ return this[getRequestCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ value: function() {
+ return this[getRequestCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ method: this.method,
+ url: this.url,
+ headers: this.headers,
+ nativeRequest: this[requestCache]
+ };
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(requestPrototype, Request.prototype);
+var newRequest = (incoming, defaultHostname) => {
+ const req = Object.create(requestPrototype);
+ req[incomingKey] = incoming;
+ const incomingUrl = incoming.url || "";
+ if (incomingUrl[0] !== "/" && // short-circuit for performance. most requests are relative URL.
+ (incomingUrl.startsWith("http://") || incomingUrl.startsWith("https://"))) {
+ if (incoming instanceof import_node_http2.Http2ServerRequest) {
+ throw new RequestError("Absolute URL for :path is not allowed in HTTP/2");
+ }
+ try {
+ const url2 = new URL(incomingUrl);
+ req[urlKey] = url2.href;
+ } catch (e) {
+ throw new RequestError("Invalid absolute URL", { cause: e });
+ }
+ return req;
+ }
+ const host = (incoming instanceof import_node_http2.Http2ServerRequest ? incoming.authority : incoming.headers.host) || defaultHostname;
+ if (!host) {
+ throw new RequestError("Missing host header");
+ }
+ let scheme;
+ if (incoming instanceof import_node_http2.Http2ServerRequest) {
+ scheme = incoming.scheme;
+ if (!(scheme === "http" || scheme === "https")) {
+ throw new RequestError("Unsupported scheme");
+ }
+ } else {
+ scheme = incoming.socket && incoming.socket.encrypted ? "https" : "http";
+ }
+ const url = new URL(`${scheme}://${host}${incomingUrl}`);
+ if (url.hostname.length !== host.length && url.hostname !== host.replace(/:\d+$/, "")) {
+ throw new RequestError("Invalid host header");
+ }
+ req[urlKey] = url.href;
+ return req;
+};
+
+// src/response.ts
+var responseCache = Symbol("responseCache");
+var getResponseCache = Symbol("getResponseCache");
+var cacheKey = Symbol("cache");
+var GlobalResponse = global.Response;
+var Response2 = class _Response {
+ #body;
+ #init;
+ [getResponseCache]() {
+ delete this[cacheKey];
+ return this[responseCache] ||= new GlobalResponse(this.#body, this.#init);
+ }
+ constructor(body, init) {
+ let headers;
+ this.#body = body;
+ if (init instanceof _Response) {
+ const cachedGlobalResponse = init[responseCache];
+ if (cachedGlobalResponse) {
+ this.#init = cachedGlobalResponse;
+ this[getResponseCache]();
+ return;
+ } else {
+ this.#init = init.#init;
+ headers = new Headers(init.#init.headers);
+ }
+ } else {
+ this.#init = init;
+ }
+ if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
+ ;
+ this[cacheKey] = [init?.status || 200, body, headers || init?.headers];
+ }
+ }
+ get headers() {
+ const cache = this[cacheKey];
+ if (cache) {
+ if (!(cache[2] instanceof Headers)) {
+ cache[2] = new Headers(
+ cache[2] || { "content-type": "text/plain; charset=UTF-8" }
+ );
+ }
+ return cache[2];
+ }
+ return this[getResponseCache]().headers;
+ }
+ get status() {
+ return this[cacheKey]?.[0] ?? this[getResponseCache]().status;
+ }
+ get ok() {
+ const status = this.status;
+ return status >= 200 && status < 300;
+ }
+};
+["body", "bodyUsed", "redirected", "statusText", "trailers", "type", "url"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ get() {
+ return this[getResponseCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ value: function() {
+ return this[getResponseCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ status: this.status,
+ headers: this.headers,
+ ok: this.ok,
+ nativeResponse: this[responseCache]
+ };
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(Response2, GlobalResponse);
+Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
+
+// src/utils.ts
+async function readWithoutBlocking(readPromise) {
+ return Promise.race([readPromise, Promise.resolve().then(() => Promise.resolve(void 0))]);
+}
+function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) {
+ const cancel = (error) => {
+ reader.cancel(error).catch(() => {
+ });
+ };
+ writable.on("close", cancel);
+ writable.on("error", cancel);
+ (currentReadPromise ?? reader.read()).then(flow, handleStreamError);
+ return reader.closed.finally(() => {
+ writable.off("close", cancel);
+ writable.off("error", cancel);
+ });
+ function handleStreamError(error) {
+ if (error) {
+ writable.destroy(error);
+ }
+ }
+ function onDrain() {
+ reader.read().then(flow, handleStreamError);
+ }
+ function flow({ done, value }) {
+ try {
+ if (done) {
+ writable.end();
+ } else if (!writable.write(value)) {
+ writable.once("drain", onDrain);
+ } else {
+ return reader.read().then(flow, handleStreamError);
+ }
+ } catch (e) {
+ handleStreamError(e);
+ }
+ }
+}
+function writeFromReadableStream(stream, writable) {
+ if (stream.locked) {
+ throw new TypeError("ReadableStream is locked.");
+ } else if (writable.destroyed) {
+ return;
+ }
+ return writeFromReadableStreamDefaultReader(stream.getReader(), writable);
+}
+var buildOutgoingHttpHeaders = (headers) => {
+ const res = {};
+ if (!(headers instanceof Headers)) {
+ headers = new Headers(headers ?? void 0);
+ }
+ const cookies = [];
+ for (const [k, v] of headers) {
+ if (k === "set-cookie") {
+ cookies.push(v);
+ } else {
+ res[k] = v;
+ }
+ }
+ if (cookies.length > 0) {
+ res["set-cookie"] = cookies;
+ }
+ res["content-type"] ??= "text/plain; charset=UTF-8";
+ return res;
+};
+
+// src/utils/response/constants.ts
+var X_ALREADY_SENT = "x-hono-already-sent";
+
+// src/globals.ts
+var import_node_crypto = __toESM(require("crypto"));
+if (typeof global.crypto === "undefined") {
+ global.crypto = import_node_crypto.default;
+}
+
+// src/listener.ts
+var outgoingEnded = Symbol("outgoingEnded");
+var incomingDraining = Symbol("incomingDraining");
+var DRAIN_TIMEOUT_MS = 500;
+var MAX_DRAIN_BYTES = 64 * 1024 * 1024;
+var drainIncoming = (incoming) => {
+ const incomingWithDrainState = incoming;
+ if (incoming.destroyed || incomingWithDrainState[incomingDraining]) {
+ return;
+ }
+ incomingWithDrainState[incomingDraining] = true;
+ if (incoming instanceof import_node_http22.Http2ServerRequest) {
+ try {
+ ;
+ incoming.stream?.close?.(import_node_http22.constants.NGHTTP2_NO_ERROR);
+ } catch {
+ }
+ return;
+ }
+ let bytesRead = 0;
+ const cleanup = () => {
+ clearTimeout(timer);
+ incoming.off("data", onData);
+ incoming.off("end", cleanup);
+ incoming.off("error", cleanup);
+ };
+ const forceClose = () => {
+ cleanup();
+ const socket = incoming.socket;
+ if (socket && !socket.destroyed) {
+ socket.destroySoon();
+ }
+ };
+ const timer = setTimeout(forceClose, DRAIN_TIMEOUT_MS);
+ timer.unref?.();
+ const onData = (chunk) => {
+ bytesRead += chunk.length;
+ if (bytesRead > MAX_DRAIN_BYTES) {
+ forceClose();
+ }
+ };
+ incoming.on("data", onData);
+ incoming.on("end", cleanup);
+ incoming.on("error", cleanup);
+ incoming.resume();
+};
+var handleRequestError = () => new Response(null, {
+ status: 400
+});
+var handleFetchError = (e) => new Response(null, {
+ status: e instanceof Error && (e.name === "TimeoutError" || e.constructor.name === "TimeoutError") ? 504 : 500
+});
+var handleResponseError = (e, outgoing) => {
+ const err = e instanceof Error ? e : new Error("unknown error", { cause: e });
+ if (err.code === "ERR_STREAM_PREMATURE_CLOSE") {
+ console.info("The user aborted a request.");
+ } else {
+ console.error(e);
+ if (!outgoing.headersSent) {
+ outgoing.writeHead(500, { "Content-Type": "text/plain" });
+ }
+ outgoing.end(`Error: ${err.message}`);
+ outgoing.destroy(err);
+ }
+};
+var flushHeaders = (outgoing) => {
+ if ("flushHeaders" in outgoing && outgoing.writable) {
+ outgoing.flushHeaders();
+ }
+};
+var responseViaCache = async (res, outgoing) => {
+ let [status, body, header] = res[cacheKey];
+ let hasContentLength = false;
+ if (!header) {
+ header = { "content-type": "text/plain; charset=UTF-8" };
+ } else if (header instanceof Headers) {
+ hasContentLength = header.has("content-length");
+ header = buildOutgoingHttpHeaders(header);
+ } else if (Array.isArray(header)) {
+ const headerObj = new Headers(header);
+ hasContentLength = headerObj.has("content-length");
+ header = buildOutgoingHttpHeaders(headerObj);
+ } else {
+ for (const key in header) {
+ if (key.length === 14 && key.toLowerCase() === "content-length") {
+ hasContentLength = true;
+ break;
+ }
+ }
+ }
+ if (!hasContentLength) {
+ if (typeof body === "string") {
+ header["Content-Length"] = Buffer.byteLength(body);
+ } else if (body instanceof Uint8Array) {
+ header["Content-Length"] = body.byteLength;
+ } else if (body instanceof Blob) {
+ header["Content-Length"] = body.size;
+ }
+ }
+ outgoing.writeHead(status, header);
+ if (typeof body === "string" || body instanceof Uint8Array) {
+ outgoing.end(body);
+ } else if (body instanceof Blob) {
+ outgoing.end(new Uint8Array(await body.arrayBuffer()));
+ } else {
+ flushHeaders(outgoing);
+ await writeFromReadableStream(body, outgoing)?.catch(
+ (e) => handleResponseError(e, outgoing)
+ );
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var isPromise = (res) => typeof res.then === "function";
+var responseViaResponseObject = async (res, outgoing, options = {}) => {
+ if (isPromise(res)) {
+ if (options.errorHandler) {
+ try {
+ res = await res;
+ } catch (err) {
+ const errRes = await options.errorHandler(err);
+ if (!errRes) {
+ return;
+ }
+ res = errRes;
+ }
+ } else {
+ res = await res.catch(handleFetchError);
+ }
+ }
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ const resHeaderRecord = buildOutgoingHttpHeaders(res.headers);
+ if (res.body) {
+ const reader = res.body.getReader();
+ const values = [];
+ let done = false;
+ let currentReadPromise = void 0;
+ if (resHeaderRecord["transfer-encoding"] !== "chunked") {
+ let maxReadCount = 2;
+ for (let i = 0; i < maxReadCount; i++) {
+ currentReadPromise ||= reader.read();
+ const chunk = await readWithoutBlocking(currentReadPromise).catch((e) => {
+ console.error(e);
+ done = true;
+ });
+ if (!chunk) {
+ if (i === 1) {
+ await new Promise((resolve) => setTimeout(resolve));
+ maxReadCount = 3;
+ continue;
+ }
+ break;
+ }
+ currentReadPromise = void 0;
+ if (chunk.value) {
+ values.push(chunk.value);
+ }
+ if (chunk.done) {
+ done = true;
+ break;
+ }
+ }
+ if (done && !("content-length" in resHeaderRecord)) {
+ resHeaderRecord["content-length"] = values.reduce((acc, value) => acc + value.length, 0);
+ }
+ }
+ outgoing.writeHead(res.status, resHeaderRecord);
+ values.forEach((value) => {
+ ;
+ outgoing.write(value);
+ });
+ if (done) {
+ outgoing.end();
+ } else {
+ if (values.length === 0) {
+ flushHeaders(outgoing);
+ }
+ await writeFromReadableStreamDefaultReader(reader, outgoing, currentReadPromise);
+ }
+ } else if (resHeaderRecord[X_ALREADY_SENT]) {
+ } else {
+ outgoing.writeHead(res.status, resHeaderRecord);
+ outgoing.end();
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var getRequestListener = (fetchCallback, options = {}) => {
+ const autoCleanupIncoming = options.autoCleanupIncoming ?? true;
+ if (options.overrideGlobalObjects !== false && global.Request !== Request) {
+ Object.defineProperty(global, "Request", {
+ value: Request
+ });
+ Object.defineProperty(global, "Response", {
+ value: Response2
+ });
+ }
+ return async (incoming, outgoing) => {
+ let res, req;
+ try {
+ req = newRequest(incoming, options.hostname);
+ let incomingEnded = !autoCleanupIncoming || incoming.method === "GET" || incoming.method === "HEAD";
+ if (!incomingEnded) {
+ ;
+ incoming[wrapBodyStream] = true;
+ incoming.on("end", () => {
+ incomingEnded = true;
+ });
+ if (incoming instanceof import_node_http22.Http2ServerRequest) {
+ ;
+ outgoing[outgoingEnded] = () => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ };
+ }
+ outgoing.on("finish", () => {
+ if (!incomingEnded) {
+ drainIncoming(incoming);
+ }
+ });
+ }
+ outgoing.on("close", () => {
+ const abortController = req[abortControllerKey];
+ if (abortController) {
+ if (incoming.errored) {
+ req[abortControllerKey].abort(incoming.errored.toString());
+ } else if (!outgoing.writableFinished) {
+ req[abortControllerKey].abort("Client connection prematurely closed.");
+ }
+ }
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ });
+ res = fetchCallback(req, { incoming, outgoing });
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ } catch (e) {
+ if (!res) {
+ if (options.errorHandler) {
+ res = await options.errorHandler(req ? e : toRequestError(e));
+ if (!res) {
+ return;
+ }
+ } else if (!req) {
+ res = handleRequestError();
+ } else {
+ res = handleFetchError(e);
+ }
+ } else {
+ return handleResponseError(e, outgoing);
+ }
+ }
+ try {
+ return await responseViaResponseObject(res, outgoing, options);
+ } catch (e) {
+ return handleResponseError(e, outgoing);
+ }
+ };
+};
+
+// src/server.ts
+var createAdaptorServer = (options) => {
+ const fetchCallback = options.fetch;
+ const requestListener = getRequestListener(fetchCallback, {
+ hostname: options.hostname,
+ overrideGlobalObjects: options.overrideGlobalObjects,
+ autoCleanupIncoming: options.autoCleanupIncoming
+ });
+ const createServer = options.createServer || import_node_http.createServer;
+ const server = createServer(options.serverOptions || {}, requestListener);
+ return server;
+};
+var serve = (options, listeningListener) => {
+ const server = createAdaptorServer(options);
+ server.listen(options?.port ?? 3e3, options.hostname, () => {
+ const serverInfo = server.address();
+ listeningListener && listeningListener(serverInfo);
+ });
+ return server;
+};
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ RequestError,
+ createAdaptorServer,
+ getRequestListener,
+ serve
+});
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/index.mjs b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/index.mjs
new file mode 100644
index 0000000..4a699b7
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/index.mjs
@@ -0,0 +1,662 @@
+// src/server.ts
+import { createServer as createServerHTTP } from "http";
+
+// src/listener.ts
+import { Http2ServerRequest as Http2ServerRequest2, constants as h2constants } from "http2";
+
+// src/request.ts
+import { Http2ServerRequest } from "http2";
+import { Readable } from "stream";
+var RequestError = class extends Error {
+ constructor(message, options) {
+ super(message, options);
+ this.name = "RequestError";
+ }
+};
+var toRequestError = (e) => {
+ if (e instanceof RequestError) {
+ return e;
+ }
+ return new RequestError(e.message, { cause: e });
+};
+var GlobalRequest = global.Request;
+var Request = class extends GlobalRequest {
+ constructor(input, options) {
+ if (typeof input === "object" && getRequestCache in input) {
+ input = input[getRequestCache]();
+ }
+ if (typeof options?.body?.getReader !== "undefined") {
+ ;
+ options.duplex ??= "half";
+ }
+ super(input, options);
+ }
+};
+var newHeadersFromIncoming = (incoming) => {
+ const headerRecord = [];
+ const rawHeaders = incoming.rawHeaders;
+ for (let i = 0; i < rawHeaders.length; i += 2) {
+ const { [i]: key, [i + 1]: value } = rawHeaders;
+ if (key.charCodeAt(0) !== /*:*/
+ 58) {
+ headerRecord.push([key, value]);
+ }
+ }
+ return new Headers(headerRecord);
+};
+var wrapBodyStream = Symbol("wrapBodyStream");
+var newRequestFromIncoming = (method, url, headers, incoming, abortController) => {
+ const init = {
+ method,
+ headers,
+ signal: abortController.signal
+ };
+ if (method === "TRACE") {
+ init.method = "GET";
+ const req = new Request(url, init);
+ Object.defineProperty(req, "method", {
+ get() {
+ return "TRACE";
+ }
+ });
+ return req;
+ }
+ if (!(method === "GET" || method === "HEAD")) {
+ if ("rawBody" in incoming && incoming.rawBody instanceof Buffer) {
+ init.body = new ReadableStream({
+ start(controller) {
+ controller.enqueue(incoming.rawBody);
+ controller.close();
+ }
+ });
+ } else if (incoming[wrapBodyStream]) {
+ let reader;
+ init.body = new ReadableStream({
+ async pull(controller) {
+ try {
+ reader ||= Readable.toWeb(incoming).getReader();
+ const { done, value } = await reader.read();
+ if (done) {
+ controller.close();
+ } else {
+ controller.enqueue(value);
+ }
+ } catch (error) {
+ controller.error(error);
+ }
+ }
+ });
+ } else {
+ init.body = Readable.toWeb(incoming);
+ }
+ }
+ return new Request(url, init);
+};
+var getRequestCache = Symbol("getRequestCache");
+var requestCache = Symbol("requestCache");
+var incomingKey = Symbol("incomingKey");
+var urlKey = Symbol("urlKey");
+var headersKey = Symbol("headersKey");
+var abortControllerKey = Symbol("abortControllerKey");
+var getAbortController = Symbol("getAbortController");
+var requestPrototype = {
+ get method() {
+ return this[incomingKey].method || "GET";
+ },
+ get url() {
+ return this[urlKey];
+ },
+ get headers() {
+ return this[headersKey] ||= newHeadersFromIncoming(this[incomingKey]);
+ },
+ [getAbortController]() {
+ this[getRequestCache]();
+ return this[abortControllerKey];
+ },
+ [getRequestCache]() {
+ this[abortControllerKey] ||= new AbortController();
+ return this[requestCache] ||= newRequestFromIncoming(
+ this.method,
+ this[urlKey],
+ this.headers,
+ this[incomingKey],
+ this[abortControllerKey]
+ );
+ }
+};
+[
+ "body",
+ "bodyUsed",
+ "cache",
+ "credentials",
+ "destination",
+ "integrity",
+ "mode",
+ "redirect",
+ "referrer",
+ "referrerPolicy",
+ "signal",
+ "keepalive"
+].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ get() {
+ return this[getRequestCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ value: function() {
+ return this[getRequestCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ method: this.method,
+ url: this.url,
+ headers: this.headers,
+ nativeRequest: this[requestCache]
+ };
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(requestPrototype, Request.prototype);
+var newRequest = (incoming, defaultHostname) => {
+ const req = Object.create(requestPrototype);
+ req[incomingKey] = incoming;
+ const incomingUrl = incoming.url || "";
+ if (incomingUrl[0] !== "/" && // short-circuit for performance. most requests are relative URL.
+ (incomingUrl.startsWith("http://") || incomingUrl.startsWith("https://"))) {
+ if (incoming instanceof Http2ServerRequest) {
+ throw new RequestError("Absolute URL for :path is not allowed in HTTP/2");
+ }
+ try {
+ const url2 = new URL(incomingUrl);
+ req[urlKey] = url2.href;
+ } catch (e) {
+ throw new RequestError("Invalid absolute URL", { cause: e });
+ }
+ return req;
+ }
+ const host = (incoming instanceof Http2ServerRequest ? incoming.authority : incoming.headers.host) || defaultHostname;
+ if (!host) {
+ throw new RequestError("Missing host header");
+ }
+ let scheme;
+ if (incoming instanceof Http2ServerRequest) {
+ scheme = incoming.scheme;
+ if (!(scheme === "http" || scheme === "https")) {
+ throw new RequestError("Unsupported scheme");
+ }
+ } else {
+ scheme = incoming.socket && incoming.socket.encrypted ? "https" : "http";
+ }
+ const url = new URL(`${scheme}://${host}${incomingUrl}`);
+ if (url.hostname.length !== host.length && url.hostname !== host.replace(/:\d+$/, "")) {
+ throw new RequestError("Invalid host header");
+ }
+ req[urlKey] = url.href;
+ return req;
+};
+
+// src/response.ts
+var responseCache = Symbol("responseCache");
+var getResponseCache = Symbol("getResponseCache");
+var cacheKey = Symbol("cache");
+var GlobalResponse = global.Response;
+var Response2 = class _Response {
+ #body;
+ #init;
+ [getResponseCache]() {
+ delete this[cacheKey];
+ return this[responseCache] ||= new GlobalResponse(this.#body, this.#init);
+ }
+ constructor(body, init) {
+ let headers;
+ this.#body = body;
+ if (init instanceof _Response) {
+ const cachedGlobalResponse = init[responseCache];
+ if (cachedGlobalResponse) {
+ this.#init = cachedGlobalResponse;
+ this[getResponseCache]();
+ return;
+ } else {
+ this.#init = init.#init;
+ headers = new Headers(init.#init.headers);
+ }
+ } else {
+ this.#init = init;
+ }
+ if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
+ ;
+ this[cacheKey] = [init?.status || 200, body, headers || init?.headers];
+ }
+ }
+ get headers() {
+ const cache = this[cacheKey];
+ if (cache) {
+ if (!(cache[2] instanceof Headers)) {
+ cache[2] = new Headers(
+ cache[2] || { "content-type": "text/plain; charset=UTF-8" }
+ );
+ }
+ return cache[2];
+ }
+ return this[getResponseCache]().headers;
+ }
+ get status() {
+ return this[cacheKey]?.[0] ?? this[getResponseCache]().status;
+ }
+ get ok() {
+ const status = this.status;
+ return status >= 200 && status < 300;
+ }
+};
+["body", "bodyUsed", "redirected", "statusText", "trailers", "type", "url"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ get() {
+ return this[getResponseCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ value: function() {
+ return this[getResponseCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ status: this.status,
+ headers: this.headers,
+ ok: this.ok,
+ nativeResponse: this[responseCache]
+ };
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(Response2, GlobalResponse);
+Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
+
+// src/utils.ts
+async function readWithoutBlocking(readPromise) {
+ return Promise.race([readPromise, Promise.resolve().then(() => Promise.resolve(void 0))]);
+}
+function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) {
+ const cancel = (error) => {
+ reader.cancel(error).catch(() => {
+ });
+ };
+ writable.on("close", cancel);
+ writable.on("error", cancel);
+ (currentReadPromise ?? reader.read()).then(flow, handleStreamError);
+ return reader.closed.finally(() => {
+ writable.off("close", cancel);
+ writable.off("error", cancel);
+ });
+ function handleStreamError(error) {
+ if (error) {
+ writable.destroy(error);
+ }
+ }
+ function onDrain() {
+ reader.read().then(flow, handleStreamError);
+ }
+ function flow({ done, value }) {
+ try {
+ if (done) {
+ writable.end();
+ } else if (!writable.write(value)) {
+ writable.once("drain", onDrain);
+ } else {
+ return reader.read().then(flow, handleStreamError);
+ }
+ } catch (e) {
+ handleStreamError(e);
+ }
+ }
+}
+function writeFromReadableStream(stream, writable) {
+ if (stream.locked) {
+ throw new TypeError("ReadableStream is locked.");
+ } else if (writable.destroyed) {
+ return;
+ }
+ return writeFromReadableStreamDefaultReader(stream.getReader(), writable);
+}
+var buildOutgoingHttpHeaders = (headers) => {
+ const res = {};
+ if (!(headers instanceof Headers)) {
+ headers = new Headers(headers ?? void 0);
+ }
+ const cookies = [];
+ for (const [k, v] of headers) {
+ if (k === "set-cookie") {
+ cookies.push(v);
+ } else {
+ res[k] = v;
+ }
+ }
+ if (cookies.length > 0) {
+ res["set-cookie"] = cookies;
+ }
+ res["content-type"] ??= "text/plain; charset=UTF-8";
+ return res;
+};
+
+// src/utils/response/constants.ts
+var X_ALREADY_SENT = "x-hono-already-sent";
+
+// src/globals.ts
+import crypto from "crypto";
+if (typeof global.crypto === "undefined") {
+ global.crypto = crypto;
+}
+
+// src/listener.ts
+var outgoingEnded = Symbol("outgoingEnded");
+var incomingDraining = Symbol("incomingDraining");
+var DRAIN_TIMEOUT_MS = 500;
+var MAX_DRAIN_BYTES = 64 * 1024 * 1024;
+var drainIncoming = (incoming) => {
+ const incomingWithDrainState = incoming;
+ if (incoming.destroyed || incomingWithDrainState[incomingDraining]) {
+ return;
+ }
+ incomingWithDrainState[incomingDraining] = true;
+ if (incoming instanceof Http2ServerRequest2) {
+ try {
+ ;
+ incoming.stream?.close?.(h2constants.NGHTTP2_NO_ERROR);
+ } catch {
+ }
+ return;
+ }
+ let bytesRead = 0;
+ const cleanup = () => {
+ clearTimeout(timer);
+ incoming.off("data", onData);
+ incoming.off("end", cleanup);
+ incoming.off("error", cleanup);
+ };
+ const forceClose = () => {
+ cleanup();
+ const socket = incoming.socket;
+ if (socket && !socket.destroyed) {
+ socket.destroySoon();
+ }
+ };
+ const timer = setTimeout(forceClose, DRAIN_TIMEOUT_MS);
+ timer.unref?.();
+ const onData = (chunk) => {
+ bytesRead += chunk.length;
+ if (bytesRead > MAX_DRAIN_BYTES) {
+ forceClose();
+ }
+ };
+ incoming.on("data", onData);
+ incoming.on("end", cleanup);
+ incoming.on("error", cleanup);
+ incoming.resume();
+};
+var handleRequestError = () => new Response(null, {
+ status: 400
+});
+var handleFetchError = (e) => new Response(null, {
+ status: e instanceof Error && (e.name === "TimeoutError" || e.constructor.name === "TimeoutError") ? 504 : 500
+});
+var handleResponseError = (e, outgoing) => {
+ const err = e instanceof Error ? e : new Error("unknown error", { cause: e });
+ if (err.code === "ERR_STREAM_PREMATURE_CLOSE") {
+ console.info("The user aborted a request.");
+ } else {
+ console.error(e);
+ if (!outgoing.headersSent) {
+ outgoing.writeHead(500, { "Content-Type": "text/plain" });
+ }
+ outgoing.end(`Error: ${err.message}`);
+ outgoing.destroy(err);
+ }
+};
+var flushHeaders = (outgoing) => {
+ if ("flushHeaders" in outgoing && outgoing.writable) {
+ outgoing.flushHeaders();
+ }
+};
+var responseViaCache = async (res, outgoing) => {
+ let [status, body, header] = res[cacheKey];
+ let hasContentLength = false;
+ if (!header) {
+ header = { "content-type": "text/plain; charset=UTF-8" };
+ } else if (header instanceof Headers) {
+ hasContentLength = header.has("content-length");
+ header = buildOutgoingHttpHeaders(header);
+ } else if (Array.isArray(header)) {
+ const headerObj = new Headers(header);
+ hasContentLength = headerObj.has("content-length");
+ header = buildOutgoingHttpHeaders(headerObj);
+ } else {
+ for (const key in header) {
+ if (key.length === 14 && key.toLowerCase() === "content-length") {
+ hasContentLength = true;
+ break;
+ }
+ }
+ }
+ if (!hasContentLength) {
+ if (typeof body === "string") {
+ header["Content-Length"] = Buffer.byteLength(body);
+ } else if (body instanceof Uint8Array) {
+ header["Content-Length"] = body.byteLength;
+ } else if (body instanceof Blob) {
+ header["Content-Length"] = body.size;
+ }
+ }
+ outgoing.writeHead(status, header);
+ if (typeof body === "string" || body instanceof Uint8Array) {
+ outgoing.end(body);
+ } else if (body instanceof Blob) {
+ outgoing.end(new Uint8Array(await body.arrayBuffer()));
+ } else {
+ flushHeaders(outgoing);
+ await writeFromReadableStream(body, outgoing)?.catch(
+ (e) => handleResponseError(e, outgoing)
+ );
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var isPromise = (res) => typeof res.then === "function";
+var responseViaResponseObject = async (res, outgoing, options = {}) => {
+ if (isPromise(res)) {
+ if (options.errorHandler) {
+ try {
+ res = await res;
+ } catch (err) {
+ const errRes = await options.errorHandler(err);
+ if (!errRes) {
+ return;
+ }
+ res = errRes;
+ }
+ } else {
+ res = await res.catch(handleFetchError);
+ }
+ }
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ const resHeaderRecord = buildOutgoingHttpHeaders(res.headers);
+ if (res.body) {
+ const reader = res.body.getReader();
+ const values = [];
+ let done = false;
+ let currentReadPromise = void 0;
+ if (resHeaderRecord["transfer-encoding"] !== "chunked") {
+ let maxReadCount = 2;
+ for (let i = 0; i < maxReadCount; i++) {
+ currentReadPromise ||= reader.read();
+ const chunk = await readWithoutBlocking(currentReadPromise).catch((e) => {
+ console.error(e);
+ done = true;
+ });
+ if (!chunk) {
+ if (i === 1) {
+ await new Promise((resolve) => setTimeout(resolve));
+ maxReadCount = 3;
+ continue;
+ }
+ break;
+ }
+ currentReadPromise = void 0;
+ if (chunk.value) {
+ values.push(chunk.value);
+ }
+ if (chunk.done) {
+ done = true;
+ break;
+ }
+ }
+ if (done && !("content-length" in resHeaderRecord)) {
+ resHeaderRecord["content-length"] = values.reduce((acc, value) => acc + value.length, 0);
+ }
+ }
+ outgoing.writeHead(res.status, resHeaderRecord);
+ values.forEach((value) => {
+ ;
+ outgoing.write(value);
+ });
+ if (done) {
+ outgoing.end();
+ } else {
+ if (values.length === 0) {
+ flushHeaders(outgoing);
+ }
+ await writeFromReadableStreamDefaultReader(reader, outgoing, currentReadPromise);
+ }
+ } else if (resHeaderRecord[X_ALREADY_SENT]) {
+ } else {
+ outgoing.writeHead(res.status, resHeaderRecord);
+ outgoing.end();
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var getRequestListener = (fetchCallback, options = {}) => {
+ const autoCleanupIncoming = options.autoCleanupIncoming ?? true;
+ if (options.overrideGlobalObjects !== false && global.Request !== Request) {
+ Object.defineProperty(global, "Request", {
+ value: Request
+ });
+ Object.defineProperty(global, "Response", {
+ value: Response2
+ });
+ }
+ return async (incoming, outgoing) => {
+ let res, req;
+ try {
+ req = newRequest(incoming, options.hostname);
+ let incomingEnded = !autoCleanupIncoming || incoming.method === "GET" || incoming.method === "HEAD";
+ if (!incomingEnded) {
+ ;
+ incoming[wrapBodyStream] = true;
+ incoming.on("end", () => {
+ incomingEnded = true;
+ });
+ if (incoming instanceof Http2ServerRequest2) {
+ ;
+ outgoing[outgoingEnded] = () => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ };
+ }
+ outgoing.on("finish", () => {
+ if (!incomingEnded) {
+ drainIncoming(incoming);
+ }
+ });
+ }
+ outgoing.on("close", () => {
+ const abortController = req[abortControllerKey];
+ if (abortController) {
+ if (incoming.errored) {
+ req[abortControllerKey].abort(incoming.errored.toString());
+ } else if (!outgoing.writableFinished) {
+ req[abortControllerKey].abort("Client connection prematurely closed.");
+ }
+ }
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ });
+ res = fetchCallback(req, { incoming, outgoing });
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ } catch (e) {
+ if (!res) {
+ if (options.errorHandler) {
+ res = await options.errorHandler(req ? e : toRequestError(e));
+ if (!res) {
+ return;
+ }
+ } else if (!req) {
+ res = handleRequestError();
+ } else {
+ res = handleFetchError(e);
+ }
+ } else {
+ return handleResponseError(e, outgoing);
+ }
+ }
+ try {
+ return await responseViaResponseObject(res, outgoing, options);
+ } catch (e) {
+ return handleResponseError(e, outgoing);
+ }
+ };
+};
+
+// src/server.ts
+var createAdaptorServer = (options) => {
+ const fetchCallback = options.fetch;
+ const requestListener = getRequestListener(fetchCallback, {
+ hostname: options.hostname,
+ overrideGlobalObjects: options.overrideGlobalObjects,
+ autoCleanupIncoming: options.autoCleanupIncoming
+ });
+ const createServer = options.createServer || createServerHTTP;
+ const server = createServer(options.serverOptions || {}, requestListener);
+ return server;
+};
+var serve = (options, listeningListener) => {
+ const server = createAdaptorServer(options);
+ server.listen(options?.port ?? 3e3, options.hostname, () => {
+ const serverInfo = server.address();
+ listeningListener && listeningListener(serverInfo);
+ });
+ return server;
+};
+export {
+ RequestError,
+ createAdaptorServer,
+ getRequestListener,
+ serve
+};
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/listener.d.mts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/listener.d.mts
new file mode 100644
index 0000000..a48eaff
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/listener.d.mts
@@ -0,0 +1,13 @@
+import { IncomingMessage, ServerResponse } from 'node:http';
+import { Http2ServerRequest, Http2ServerResponse } from 'node:http2';
+import { FetchCallback, CustomErrorHandler } from './types.mjs';
+import 'node:https';
+
+declare const getRequestListener: (fetchCallback: FetchCallback, options?: {
+ hostname?: string;
+ errorHandler?: CustomErrorHandler;
+ overrideGlobalObjects?: boolean;
+ autoCleanupIncoming?: boolean;
+}) => (incoming: IncomingMessage | Http2ServerRequest, outgoing: ServerResponse | Http2ServerResponse) => Promise;
+
+export { getRequestListener };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/listener.d.ts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/listener.d.ts
new file mode 100644
index 0000000..2bb0b8f
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/listener.d.ts
@@ -0,0 +1,13 @@
+import { IncomingMessage, ServerResponse } from 'node:http';
+import { Http2ServerRequest, Http2ServerResponse } from 'node:http2';
+import { FetchCallback, CustomErrorHandler } from './types.js';
+import 'node:https';
+
+declare const getRequestListener: (fetchCallback: FetchCallback, options?: {
+ hostname?: string;
+ errorHandler?: CustomErrorHandler;
+ overrideGlobalObjects?: boolean;
+ autoCleanupIncoming?: boolean;
+}) => (incoming: IncomingMessage | Http2ServerRequest, outgoing: ServerResponse | Http2ServerResponse) => Promise;
+
+export { getRequestListener };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/listener.js b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/listener.js
new file mode 100644
index 0000000..ca27851
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/listener.js
@@ -0,0 +1,670 @@
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/listener.ts
+var listener_exports = {};
+__export(listener_exports, {
+ getRequestListener: () => getRequestListener
+});
+module.exports = __toCommonJS(listener_exports);
+var import_node_http22 = require("http2");
+
+// src/request.ts
+var import_node_http2 = require("http2");
+var import_node_stream = require("stream");
+var RequestError = class extends Error {
+ constructor(message, options) {
+ super(message, options);
+ this.name = "RequestError";
+ }
+};
+var toRequestError = (e) => {
+ if (e instanceof RequestError) {
+ return e;
+ }
+ return new RequestError(e.message, { cause: e });
+};
+var GlobalRequest = global.Request;
+var Request = class extends GlobalRequest {
+ constructor(input, options) {
+ if (typeof input === "object" && getRequestCache in input) {
+ input = input[getRequestCache]();
+ }
+ if (typeof options?.body?.getReader !== "undefined") {
+ ;
+ options.duplex ??= "half";
+ }
+ super(input, options);
+ }
+};
+var newHeadersFromIncoming = (incoming) => {
+ const headerRecord = [];
+ const rawHeaders = incoming.rawHeaders;
+ for (let i = 0; i < rawHeaders.length; i += 2) {
+ const { [i]: key, [i + 1]: value } = rawHeaders;
+ if (key.charCodeAt(0) !== /*:*/
+ 58) {
+ headerRecord.push([key, value]);
+ }
+ }
+ return new Headers(headerRecord);
+};
+var wrapBodyStream = Symbol("wrapBodyStream");
+var newRequestFromIncoming = (method, url, headers, incoming, abortController) => {
+ const init = {
+ method,
+ headers,
+ signal: abortController.signal
+ };
+ if (method === "TRACE") {
+ init.method = "GET";
+ const req = new Request(url, init);
+ Object.defineProperty(req, "method", {
+ get() {
+ return "TRACE";
+ }
+ });
+ return req;
+ }
+ if (!(method === "GET" || method === "HEAD")) {
+ if ("rawBody" in incoming && incoming.rawBody instanceof Buffer) {
+ init.body = new ReadableStream({
+ start(controller) {
+ controller.enqueue(incoming.rawBody);
+ controller.close();
+ }
+ });
+ } else if (incoming[wrapBodyStream]) {
+ let reader;
+ init.body = new ReadableStream({
+ async pull(controller) {
+ try {
+ reader ||= import_node_stream.Readable.toWeb(incoming).getReader();
+ const { done, value } = await reader.read();
+ if (done) {
+ controller.close();
+ } else {
+ controller.enqueue(value);
+ }
+ } catch (error) {
+ controller.error(error);
+ }
+ }
+ });
+ } else {
+ init.body = import_node_stream.Readable.toWeb(incoming);
+ }
+ }
+ return new Request(url, init);
+};
+var getRequestCache = Symbol("getRequestCache");
+var requestCache = Symbol("requestCache");
+var incomingKey = Symbol("incomingKey");
+var urlKey = Symbol("urlKey");
+var headersKey = Symbol("headersKey");
+var abortControllerKey = Symbol("abortControllerKey");
+var getAbortController = Symbol("getAbortController");
+var requestPrototype = {
+ get method() {
+ return this[incomingKey].method || "GET";
+ },
+ get url() {
+ return this[urlKey];
+ },
+ get headers() {
+ return this[headersKey] ||= newHeadersFromIncoming(this[incomingKey]);
+ },
+ [getAbortController]() {
+ this[getRequestCache]();
+ return this[abortControllerKey];
+ },
+ [getRequestCache]() {
+ this[abortControllerKey] ||= new AbortController();
+ return this[requestCache] ||= newRequestFromIncoming(
+ this.method,
+ this[urlKey],
+ this.headers,
+ this[incomingKey],
+ this[abortControllerKey]
+ );
+ }
+};
+[
+ "body",
+ "bodyUsed",
+ "cache",
+ "credentials",
+ "destination",
+ "integrity",
+ "mode",
+ "redirect",
+ "referrer",
+ "referrerPolicy",
+ "signal",
+ "keepalive"
+].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ get() {
+ return this[getRequestCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ value: function() {
+ return this[getRequestCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ method: this.method,
+ url: this.url,
+ headers: this.headers,
+ nativeRequest: this[requestCache]
+ };
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(requestPrototype, Request.prototype);
+var newRequest = (incoming, defaultHostname) => {
+ const req = Object.create(requestPrototype);
+ req[incomingKey] = incoming;
+ const incomingUrl = incoming.url || "";
+ if (incomingUrl[0] !== "/" && // short-circuit for performance. most requests are relative URL.
+ (incomingUrl.startsWith("http://") || incomingUrl.startsWith("https://"))) {
+ if (incoming instanceof import_node_http2.Http2ServerRequest) {
+ throw new RequestError("Absolute URL for :path is not allowed in HTTP/2");
+ }
+ try {
+ const url2 = new URL(incomingUrl);
+ req[urlKey] = url2.href;
+ } catch (e) {
+ throw new RequestError("Invalid absolute URL", { cause: e });
+ }
+ return req;
+ }
+ const host = (incoming instanceof import_node_http2.Http2ServerRequest ? incoming.authority : incoming.headers.host) || defaultHostname;
+ if (!host) {
+ throw new RequestError("Missing host header");
+ }
+ let scheme;
+ if (incoming instanceof import_node_http2.Http2ServerRequest) {
+ scheme = incoming.scheme;
+ if (!(scheme === "http" || scheme === "https")) {
+ throw new RequestError("Unsupported scheme");
+ }
+ } else {
+ scheme = incoming.socket && incoming.socket.encrypted ? "https" : "http";
+ }
+ const url = new URL(`${scheme}://${host}${incomingUrl}`);
+ if (url.hostname.length !== host.length && url.hostname !== host.replace(/:\d+$/, "")) {
+ throw new RequestError("Invalid host header");
+ }
+ req[urlKey] = url.href;
+ return req;
+};
+
+// src/response.ts
+var responseCache = Symbol("responseCache");
+var getResponseCache = Symbol("getResponseCache");
+var cacheKey = Symbol("cache");
+var GlobalResponse = global.Response;
+var Response2 = class _Response {
+ #body;
+ #init;
+ [getResponseCache]() {
+ delete this[cacheKey];
+ return this[responseCache] ||= new GlobalResponse(this.#body, this.#init);
+ }
+ constructor(body, init) {
+ let headers;
+ this.#body = body;
+ if (init instanceof _Response) {
+ const cachedGlobalResponse = init[responseCache];
+ if (cachedGlobalResponse) {
+ this.#init = cachedGlobalResponse;
+ this[getResponseCache]();
+ return;
+ } else {
+ this.#init = init.#init;
+ headers = new Headers(init.#init.headers);
+ }
+ } else {
+ this.#init = init;
+ }
+ if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
+ ;
+ this[cacheKey] = [init?.status || 200, body, headers || init?.headers];
+ }
+ }
+ get headers() {
+ const cache = this[cacheKey];
+ if (cache) {
+ if (!(cache[2] instanceof Headers)) {
+ cache[2] = new Headers(
+ cache[2] || { "content-type": "text/plain; charset=UTF-8" }
+ );
+ }
+ return cache[2];
+ }
+ return this[getResponseCache]().headers;
+ }
+ get status() {
+ return this[cacheKey]?.[0] ?? this[getResponseCache]().status;
+ }
+ get ok() {
+ const status = this.status;
+ return status >= 200 && status < 300;
+ }
+};
+["body", "bodyUsed", "redirected", "statusText", "trailers", "type", "url"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ get() {
+ return this[getResponseCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ value: function() {
+ return this[getResponseCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ status: this.status,
+ headers: this.headers,
+ ok: this.ok,
+ nativeResponse: this[responseCache]
+ };
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(Response2, GlobalResponse);
+Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
+
+// src/utils.ts
+async function readWithoutBlocking(readPromise) {
+ return Promise.race([readPromise, Promise.resolve().then(() => Promise.resolve(void 0))]);
+}
+function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) {
+ const cancel = (error) => {
+ reader.cancel(error).catch(() => {
+ });
+ };
+ writable.on("close", cancel);
+ writable.on("error", cancel);
+ (currentReadPromise ?? reader.read()).then(flow, handleStreamError);
+ return reader.closed.finally(() => {
+ writable.off("close", cancel);
+ writable.off("error", cancel);
+ });
+ function handleStreamError(error) {
+ if (error) {
+ writable.destroy(error);
+ }
+ }
+ function onDrain() {
+ reader.read().then(flow, handleStreamError);
+ }
+ function flow({ done, value }) {
+ try {
+ if (done) {
+ writable.end();
+ } else if (!writable.write(value)) {
+ writable.once("drain", onDrain);
+ } else {
+ return reader.read().then(flow, handleStreamError);
+ }
+ } catch (e) {
+ handleStreamError(e);
+ }
+ }
+}
+function writeFromReadableStream(stream, writable) {
+ if (stream.locked) {
+ throw new TypeError("ReadableStream is locked.");
+ } else if (writable.destroyed) {
+ return;
+ }
+ return writeFromReadableStreamDefaultReader(stream.getReader(), writable);
+}
+var buildOutgoingHttpHeaders = (headers) => {
+ const res = {};
+ if (!(headers instanceof Headers)) {
+ headers = new Headers(headers ?? void 0);
+ }
+ const cookies = [];
+ for (const [k, v] of headers) {
+ if (k === "set-cookie") {
+ cookies.push(v);
+ } else {
+ res[k] = v;
+ }
+ }
+ if (cookies.length > 0) {
+ res["set-cookie"] = cookies;
+ }
+ res["content-type"] ??= "text/plain; charset=UTF-8";
+ return res;
+};
+
+// src/utils/response/constants.ts
+var X_ALREADY_SENT = "x-hono-already-sent";
+
+// src/globals.ts
+var import_node_crypto = __toESM(require("crypto"));
+if (typeof global.crypto === "undefined") {
+ global.crypto = import_node_crypto.default;
+}
+
+// src/listener.ts
+var outgoingEnded = Symbol("outgoingEnded");
+var incomingDraining = Symbol("incomingDraining");
+var DRAIN_TIMEOUT_MS = 500;
+var MAX_DRAIN_BYTES = 64 * 1024 * 1024;
+var drainIncoming = (incoming) => {
+ const incomingWithDrainState = incoming;
+ if (incoming.destroyed || incomingWithDrainState[incomingDraining]) {
+ return;
+ }
+ incomingWithDrainState[incomingDraining] = true;
+ if (incoming instanceof import_node_http22.Http2ServerRequest) {
+ try {
+ ;
+ incoming.stream?.close?.(import_node_http22.constants.NGHTTP2_NO_ERROR);
+ } catch {
+ }
+ return;
+ }
+ let bytesRead = 0;
+ const cleanup = () => {
+ clearTimeout(timer);
+ incoming.off("data", onData);
+ incoming.off("end", cleanup);
+ incoming.off("error", cleanup);
+ };
+ const forceClose = () => {
+ cleanup();
+ const socket = incoming.socket;
+ if (socket && !socket.destroyed) {
+ socket.destroySoon();
+ }
+ };
+ const timer = setTimeout(forceClose, DRAIN_TIMEOUT_MS);
+ timer.unref?.();
+ const onData = (chunk) => {
+ bytesRead += chunk.length;
+ if (bytesRead > MAX_DRAIN_BYTES) {
+ forceClose();
+ }
+ };
+ incoming.on("data", onData);
+ incoming.on("end", cleanup);
+ incoming.on("error", cleanup);
+ incoming.resume();
+};
+var handleRequestError = () => new Response(null, {
+ status: 400
+});
+var handleFetchError = (e) => new Response(null, {
+ status: e instanceof Error && (e.name === "TimeoutError" || e.constructor.name === "TimeoutError") ? 504 : 500
+});
+var handleResponseError = (e, outgoing) => {
+ const err = e instanceof Error ? e : new Error("unknown error", { cause: e });
+ if (err.code === "ERR_STREAM_PREMATURE_CLOSE") {
+ console.info("The user aborted a request.");
+ } else {
+ console.error(e);
+ if (!outgoing.headersSent) {
+ outgoing.writeHead(500, { "Content-Type": "text/plain" });
+ }
+ outgoing.end(`Error: ${err.message}`);
+ outgoing.destroy(err);
+ }
+};
+var flushHeaders = (outgoing) => {
+ if ("flushHeaders" in outgoing && outgoing.writable) {
+ outgoing.flushHeaders();
+ }
+};
+var responseViaCache = async (res, outgoing) => {
+ let [status, body, header] = res[cacheKey];
+ let hasContentLength = false;
+ if (!header) {
+ header = { "content-type": "text/plain; charset=UTF-8" };
+ } else if (header instanceof Headers) {
+ hasContentLength = header.has("content-length");
+ header = buildOutgoingHttpHeaders(header);
+ } else if (Array.isArray(header)) {
+ const headerObj = new Headers(header);
+ hasContentLength = headerObj.has("content-length");
+ header = buildOutgoingHttpHeaders(headerObj);
+ } else {
+ for (const key in header) {
+ if (key.length === 14 && key.toLowerCase() === "content-length") {
+ hasContentLength = true;
+ break;
+ }
+ }
+ }
+ if (!hasContentLength) {
+ if (typeof body === "string") {
+ header["Content-Length"] = Buffer.byteLength(body);
+ } else if (body instanceof Uint8Array) {
+ header["Content-Length"] = body.byteLength;
+ } else if (body instanceof Blob) {
+ header["Content-Length"] = body.size;
+ }
+ }
+ outgoing.writeHead(status, header);
+ if (typeof body === "string" || body instanceof Uint8Array) {
+ outgoing.end(body);
+ } else if (body instanceof Blob) {
+ outgoing.end(new Uint8Array(await body.arrayBuffer()));
+ } else {
+ flushHeaders(outgoing);
+ await writeFromReadableStream(body, outgoing)?.catch(
+ (e) => handleResponseError(e, outgoing)
+ );
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var isPromise = (res) => typeof res.then === "function";
+var responseViaResponseObject = async (res, outgoing, options = {}) => {
+ if (isPromise(res)) {
+ if (options.errorHandler) {
+ try {
+ res = await res;
+ } catch (err) {
+ const errRes = await options.errorHandler(err);
+ if (!errRes) {
+ return;
+ }
+ res = errRes;
+ }
+ } else {
+ res = await res.catch(handleFetchError);
+ }
+ }
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ const resHeaderRecord = buildOutgoingHttpHeaders(res.headers);
+ if (res.body) {
+ const reader = res.body.getReader();
+ const values = [];
+ let done = false;
+ let currentReadPromise = void 0;
+ if (resHeaderRecord["transfer-encoding"] !== "chunked") {
+ let maxReadCount = 2;
+ for (let i = 0; i < maxReadCount; i++) {
+ currentReadPromise ||= reader.read();
+ const chunk = await readWithoutBlocking(currentReadPromise).catch((e) => {
+ console.error(e);
+ done = true;
+ });
+ if (!chunk) {
+ if (i === 1) {
+ await new Promise((resolve) => setTimeout(resolve));
+ maxReadCount = 3;
+ continue;
+ }
+ break;
+ }
+ currentReadPromise = void 0;
+ if (chunk.value) {
+ values.push(chunk.value);
+ }
+ if (chunk.done) {
+ done = true;
+ break;
+ }
+ }
+ if (done && !("content-length" in resHeaderRecord)) {
+ resHeaderRecord["content-length"] = values.reduce((acc, value) => acc + value.length, 0);
+ }
+ }
+ outgoing.writeHead(res.status, resHeaderRecord);
+ values.forEach((value) => {
+ ;
+ outgoing.write(value);
+ });
+ if (done) {
+ outgoing.end();
+ } else {
+ if (values.length === 0) {
+ flushHeaders(outgoing);
+ }
+ await writeFromReadableStreamDefaultReader(reader, outgoing, currentReadPromise);
+ }
+ } else if (resHeaderRecord[X_ALREADY_SENT]) {
+ } else {
+ outgoing.writeHead(res.status, resHeaderRecord);
+ outgoing.end();
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var getRequestListener = (fetchCallback, options = {}) => {
+ const autoCleanupIncoming = options.autoCleanupIncoming ?? true;
+ if (options.overrideGlobalObjects !== false && global.Request !== Request) {
+ Object.defineProperty(global, "Request", {
+ value: Request
+ });
+ Object.defineProperty(global, "Response", {
+ value: Response2
+ });
+ }
+ return async (incoming, outgoing) => {
+ let res, req;
+ try {
+ req = newRequest(incoming, options.hostname);
+ let incomingEnded = !autoCleanupIncoming || incoming.method === "GET" || incoming.method === "HEAD";
+ if (!incomingEnded) {
+ ;
+ incoming[wrapBodyStream] = true;
+ incoming.on("end", () => {
+ incomingEnded = true;
+ });
+ if (incoming instanceof import_node_http22.Http2ServerRequest) {
+ ;
+ outgoing[outgoingEnded] = () => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ };
+ }
+ outgoing.on("finish", () => {
+ if (!incomingEnded) {
+ drainIncoming(incoming);
+ }
+ });
+ }
+ outgoing.on("close", () => {
+ const abortController = req[abortControllerKey];
+ if (abortController) {
+ if (incoming.errored) {
+ req[abortControllerKey].abort(incoming.errored.toString());
+ } else if (!outgoing.writableFinished) {
+ req[abortControllerKey].abort("Client connection prematurely closed.");
+ }
+ }
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ });
+ res = fetchCallback(req, { incoming, outgoing });
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ } catch (e) {
+ if (!res) {
+ if (options.errorHandler) {
+ res = await options.errorHandler(req ? e : toRequestError(e));
+ if (!res) {
+ return;
+ }
+ } else if (!req) {
+ res = handleRequestError();
+ } else {
+ res = handleFetchError(e);
+ }
+ } else {
+ return handleResponseError(e, outgoing);
+ }
+ }
+ try {
+ return await responseViaResponseObject(res, outgoing, options);
+ } catch (e) {
+ return handleResponseError(e, outgoing);
+ }
+ };
+};
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ getRequestListener
+});
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/listener.mjs b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/listener.mjs
new file mode 100644
index 0000000..e9c75a9
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/listener.mjs
@@ -0,0 +1,635 @@
+// src/listener.ts
+import { Http2ServerRequest as Http2ServerRequest2, constants as h2constants } from "http2";
+
+// src/request.ts
+import { Http2ServerRequest } from "http2";
+import { Readable } from "stream";
+var RequestError = class extends Error {
+ constructor(message, options) {
+ super(message, options);
+ this.name = "RequestError";
+ }
+};
+var toRequestError = (e) => {
+ if (e instanceof RequestError) {
+ return e;
+ }
+ return new RequestError(e.message, { cause: e });
+};
+var GlobalRequest = global.Request;
+var Request = class extends GlobalRequest {
+ constructor(input, options) {
+ if (typeof input === "object" && getRequestCache in input) {
+ input = input[getRequestCache]();
+ }
+ if (typeof options?.body?.getReader !== "undefined") {
+ ;
+ options.duplex ??= "half";
+ }
+ super(input, options);
+ }
+};
+var newHeadersFromIncoming = (incoming) => {
+ const headerRecord = [];
+ const rawHeaders = incoming.rawHeaders;
+ for (let i = 0; i < rawHeaders.length; i += 2) {
+ const { [i]: key, [i + 1]: value } = rawHeaders;
+ if (key.charCodeAt(0) !== /*:*/
+ 58) {
+ headerRecord.push([key, value]);
+ }
+ }
+ return new Headers(headerRecord);
+};
+var wrapBodyStream = Symbol("wrapBodyStream");
+var newRequestFromIncoming = (method, url, headers, incoming, abortController) => {
+ const init = {
+ method,
+ headers,
+ signal: abortController.signal
+ };
+ if (method === "TRACE") {
+ init.method = "GET";
+ const req = new Request(url, init);
+ Object.defineProperty(req, "method", {
+ get() {
+ return "TRACE";
+ }
+ });
+ return req;
+ }
+ if (!(method === "GET" || method === "HEAD")) {
+ if ("rawBody" in incoming && incoming.rawBody instanceof Buffer) {
+ init.body = new ReadableStream({
+ start(controller) {
+ controller.enqueue(incoming.rawBody);
+ controller.close();
+ }
+ });
+ } else if (incoming[wrapBodyStream]) {
+ let reader;
+ init.body = new ReadableStream({
+ async pull(controller) {
+ try {
+ reader ||= Readable.toWeb(incoming).getReader();
+ const { done, value } = await reader.read();
+ if (done) {
+ controller.close();
+ } else {
+ controller.enqueue(value);
+ }
+ } catch (error) {
+ controller.error(error);
+ }
+ }
+ });
+ } else {
+ init.body = Readable.toWeb(incoming);
+ }
+ }
+ return new Request(url, init);
+};
+var getRequestCache = Symbol("getRequestCache");
+var requestCache = Symbol("requestCache");
+var incomingKey = Symbol("incomingKey");
+var urlKey = Symbol("urlKey");
+var headersKey = Symbol("headersKey");
+var abortControllerKey = Symbol("abortControllerKey");
+var getAbortController = Symbol("getAbortController");
+var requestPrototype = {
+ get method() {
+ return this[incomingKey].method || "GET";
+ },
+ get url() {
+ return this[urlKey];
+ },
+ get headers() {
+ return this[headersKey] ||= newHeadersFromIncoming(this[incomingKey]);
+ },
+ [getAbortController]() {
+ this[getRequestCache]();
+ return this[abortControllerKey];
+ },
+ [getRequestCache]() {
+ this[abortControllerKey] ||= new AbortController();
+ return this[requestCache] ||= newRequestFromIncoming(
+ this.method,
+ this[urlKey],
+ this.headers,
+ this[incomingKey],
+ this[abortControllerKey]
+ );
+ }
+};
+[
+ "body",
+ "bodyUsed",
+ "cache",
+ "credentials",
+ "destination",
+ "integrity",
+ "mode",
+ "redirect",
+ "referrer",
+ "referrerPolicy",
+ "signal",
+ "keepalive"
+].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ get() {
+ return this[getRequestCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ value: function() {
+ return this[getRequestCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ method: this.method,
+ url: this.url,
+ headers: this.headers,
+ nativeRequest: this[requestCache]
+ };
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(requestPrototype, Request.prototype);
+var newRequest = (incoming, defaultHostname) => {
+ const req = Object.create(requestPrototype);
+ req[incomingKey] = incoming;
+ const incomingUrl = incoming.url || "";
+ if (incomingUrl[0] !== "/" && // short-circuit for performance. most requests are relative URL.
+ (incomingUrl.startsWith("http://") || incomingUrl.startsWith("https://"))) {
+ if (incoming instanceof Http2ServerRequest) {
+ throw new RequestError("Absolute URL for :path is not allowed in HTTP/2");
+ }
+ try {
+ const url2 = new URL(incomingUrl);
+ req[urlKey] = url2.href;
+ } catch (e) {
+ throw new RequestError("Invalid absolute URL", { cause: e });
+ }
+ return req;
+ }
+ const host = (incoming instanceof Http2ServerRequest ? incoming.authority : incoming.headers.host) || defaultHostname;
+ if (!host) {
+ throw new RequestError("Missing host header");
+ }
+ let scheme;
+ if (incoming instanceof Http2ServerRequest) {
+ scheme = incoming.scheme;
+ if (!(scheme === "http" || scheme === "https")) {
+ throw new RequestError("Unsupported scheme");
+ }
+ } else {
+ scheme = incoming.socket && incoming.socket.encrypted ? "https" : "http";
+ }
+ const url = new URL(`${scheme}://${host}${incomingUrl}`);
+ if (url.hostname.length !== host.length && url.hostname !== host.replace(/:\d+$/, "")) {
+ throw new RequestError("Invalid host header");
+ }
+ req[urlKey] = url.href;
+ return req;
+};
+
+// src/response.ts
+var responseCache = Symbol("responseCache");
+var getResponseCache = Symbol("getResponseCache");
+var cacheKey = Symbol("cache");
+var GlobalResponse = global.Response;
+var Response2 = class _Response {
+ #body;
+ #init;
+ [getResponseCache]() {
+ delete this[cacheKey];
+ return this[responseCache] ||= new GlobalResponse(this.#body, this.#init);
+ }
+ constructor(body, init) {
+ let headers;
+ this.#body = body;
+ if (init instanceof _Response) {
+ const cachedGlobalResponse = init[responseCache];
+ if (cachedGlobalResponse) {
+ this.#init = cachedGlobalResponse;
+ this[getResponseCache]();
+ return;
+ } else {
+ this.#init = init.#init;
+ headers = new Headers(init.#init.headers);
+ }
+ } else {
+ this.#init = init;
+ }
+ if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
+ ;
+ this[cacheKey] = [init?.status || 200, body, headers || init?.headers];
+ }
+ }
+ get headers() {
+ const cache = this[cacheKey];
+ if (cache) {
+ if (!(cache[2] instanceof Headers)) {
+ cache[2] = new Headers(
+ cache[2] || { "content-type": "text/plain; charset=UTF-8" }
+ );
+ }
+ return cache[2];
+ }
+ return this[getResponseCache]().headers;
+ }
+ get status() {
+ return this[cacheKey]?.[0] ?? this[getResponseCache]().status;
+ }
+ get ok() {
+ const status = this.status;
+ return status >= 200 && status < 300;
+ }
+};
+["body", "bodyUsed", "redirected", "statusText", "trailers", "type", "url"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ get() {
+ return this[getResponseCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ value: function() {
+ return this[getResponseCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ status: this.status,
+ headers: this.headers,
+ ok: this.ok,
+ nativeResponse: this[responseCache]
+ };
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(Response2, GlobalResponse);
+Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
+
+// src/utils.ts
+async function readWithoutBlocking(readPromise) {
+ return Promise.race([readPromise, Promise.resolve().then(() => Promise.resolve(void 0))]);
+}
+function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) {
+ const cancel = (error) => {
+ reader.cancel(error).catch(() => {
+ });
+ };
+ writable.on("close", cancel);
+ writable.on("error", cancel);
+ (currentReadPromise ?? reader.read()).then(flow, handleStreamError);
+ return reader.closed.finally(() => {
+ writable.off("close", cancel);
+ writable.off("error", cancel);
+ });
+ function handleStreamError(error) {
+ if (error) {
+ writable.destroy(error);
+ }
+ }
+ function onDrain() {
+ reader.read().then(flow, handleStreamError);
+ }
+ function flow({ done, value }) {
+ try {
+ if (done) {
+ writable.end();
+ } else if (!writable.write(value)) {
+ writable.once("drain", onDrain);
+ } else {
+ return reader.read().then(flow, handleStreamError);
+ }
+ } catch (e) {
+ handleStreamError(e);
+ }
+ }
+}
+function writeFromReadableStream(stream, writable) {
+ if (stream.locked) {
+ throw new TypeError("ReadableStream is locked.");
+ } else if (writable.destroyed) {
+ return;
+ }
+ return writeFromReadableStreamDefaultReader(stream.getReader(), writable);
+}
+var buildOutgoingHttpHeaders = (headers) => {
+ const res = {};
+ if (!(headers instanceof Headers)) {
+ headers = new Headers(headers ?? void 0);
+ }
+ const cookies = [];
+ for (const [k, v] of headers) {
+ if (k === "set-cookie") {
+ cookies.push(v);
+ } else {
+ res[k] = v;
+ }
+ }
+ if (cookies.length > 0) {
+ res["set-cookie"] = cookies;
+ }
+ res["content-type"] ??= "text/plain; charset=UTF-8";
+ return res;
+};
+
+// src/utils/response/constants.ts
+var X_ALREADY_SENT = "x-hono-already-sent";
+
+// src/globals.ts
+import crypto from "crypto";
+if (typeof global.crypto === "undefined") {
+ global.crypto = crypto;
+}
+
+// src/listener.ts
+var outgoingEnded = Symbol("outgoingEnded");
+var incomingDraining = Symbol("incomingDraining");
+var DRAIN_TIMEOUT_MS = 500;
+var MAX_DRAIN_BYTES = 64 * 1024 * 1024;
+var drainIncoming = (incoming) => {
+ const incomingWithDrainState = incoming;
+ if (incoming.destroyed || incomingWithDrainState[incomingDraining]) {
+ return;
+ }
+ incomingWithDrainState[incomingDraining] = true;
+ if (incoming instanceof Http2ServerRequest2) {
+ try {
+ ;
+ incoming.stream?.close?.(h2constants.NGHTTP2_NO_ERROR);
+ } catch {
+ }
+ return;
+ }
+ let bytesRead = 0;
+ const cleanup = () => {
+ clearTimeout(timer);
+ incoming.off("data", onData);
+ incoming.off("end", cleanup);
+ incoming.off("error", cleanup);
+ };
+ const forceClose = () => {
+ cleanup();
+ const socket = incoming.socket;
+ if (socket && !socket.destroyed) {
+ socket.destroySoon();
+ }
+ };
+ const timer = setTimeout(forceClose, DRAIN_TIMEOUT_MS);
+ timer.unref?.();
+ const onData = (chunk) => {
+ bytesRead += chunk.length;
+ if (bytesRead > MAX_DRAIN_BYTES) {
+ forceClose();
+ }
+ };
+ incoming.on("data", onData);
+ incoming.on("end", cleanup);
+ incoming.on("error", cleanup);
+ incoming.resume();
+};
+var handleRequestError = () => new Response(null, {
+ status: 400
+});
+var handleFetchError = (e) => new Response(null, {
+ status: e instanceof Error && (e.name === "TimeoutError" || e.constructor.name === "TimeoutError") ? 504 : 500
+});
+var handleResponseError = (e, outgoing) => {
+ const err = e instanceof Error ? e : new Error("unknown error", { cause: e });
+ if (err.code === "ERR_STREAM_PREMATURE_CLOSE") {
+ console.info("The user aborted a request.");
+ } else {
+ console.error(e);
+ if (!outgoing.headersSent) {
+ outgoing.writeHead(500, { "Content-Type": "text/plain" });
+ }
+ outgoing.end(`Error: ${err.message}`);
+ outgoing.destroy(err);
+ }
+};
+var flushHeaders = (outgoing) => {
+ if ("flushHeaders" in outgoing && outgoing.writable) {
+ outgoing.flushHeaders();
+ }
+};
+var responseViaCache = async (res, outgoing) => {
+ let [status, body, header] = res[cacheKey];
+ let hasContentLength = false;
+ if (!header) {
+ header = { "content-type": "text/plain; charset=UTF-8" };
+ } else if (header instanceof Headers) {
+ hasContentLength = header.has("content-length");
+ header = buildOutgoingHttpHeaders(header);
+ } else if (Array.isArray(header)) {
+ const headerObj = new Headers(header);
+ hasContentLength = headerObj.has("content-length");
+ header = buildOutgoingHttpHeaders(headerObj);
+ } else {
+ for (const key in header) {
+ if (key.length === 14 && key.toLowerCase() === "content-length") {
+ hasContentLength = true;
+ break;
+ }
+ }
+ }
+ if (!hasContentLength) {
+ if (typeof body === "string") {
+ header["Content-Length"] = Buffer.byteLength(body);
+ } else if (body instanceof Uint8Array) {
+ header["Content-Length"] = body.byteLength;
+ } else if (body instanceof Blob) {
+ header["Content-Length"] = body.size;
+ }
+ }
+ outgoing.writeHead(status, header);
+ if (typeof body === "string" || body instanceof Uint8Array) {
+ outgoing.end(body);
+ } else if (body instanceof Blob) {
+ outgoing.end(new Uint8Array(await body.arrayBuffer()));
+ } else {
+ flushHeaders(outgoing);
+ await writeFromReadableStream(body, outgoing)?.catch(
+ (e) => handleResponseError(e, outgoing)
+ );
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var isPromise = (res) => typeof res.then === "function";
+var responseViaResponseObject = async (res, outgoing, options = {}) => {
+ if (isPromise(res)) {
+ if (options.errorHandler) {
+ try {
+ res = await res;
+ } catch (err) {
+ const errRes = await options.errorHandler(err);
+ if (!errRes) {
+ return;
+ }
+ res = errRes;
+ }
+ } else {
+ res = await res.catch(handleFetchError);
+ }
+ }
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ const resHeaderRecord = buildOutgoingHttpHeaders(res.headers);
+ if (res.body) {
+ const reader = res.body.getReader();
+ const values = [];
+ let done = false;
+ let currentReadPromise = void 0;
+ if (resHeaderRecord["transfer-encoding"] !== "chunked") {
+ let maxReadCount = 2;
+ for (let i = 0; i < maxReadCount; i++) {
+ currentReadPromise ||= reader.read();
+ const chunk = await readWithoutBlocking(currentReadPromise).catch((e) => {
+ console.error(e);
+ done = true;
+ });
+ if (!chunk) {
+ if (i === 1) {
+ await new Promise((resolve) => setTimeout(resolve));
+ maxReadCount = 3;
+ continue;
+ }
+ break;
+ }
+ currentReadPromise = void 0;
+ if (chunk.value) {
+ values.push(chunk.value);
+ }
+ if (chunk.done) {
+ done = true;
+ break;
+ }
+ }
+ if (done && !("content-length" in resHeaderRecord)) {
+ resHeaderRecord["content-length"] = values.reduce((acc, value) => acc + value.length, 0);
+ }
+ }
+ outgoing.writeHead(res.status, resHeaderRecord);
+ values.forEach((value) => {
+ ;
+ outgoing.write(value);
+ });
+ if (done) {
+ outgoing.end();
+ } else {
+ if (values.length === 0) {
+ flushHeaders(outgoing);
+ }
+ await writeFromReadableStreamDefaultReader(reader, outgoing, currentReadPromise);
+ }
+ } else if (resHeaderRecord[X_ALREADY_SENT]) {
+ } else {
+ outgoing.writeHead(res.status, resHeaderRecord);
+ outgoing.end();
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var getRequestListener = (fetchCallback, options = {}) => {
+ const autoCleanupIncoming = options.autoCleanupIncoming ?? true;
+ if (options.overrideGlobalObjects !== false && global.Request !== Request) {
+ Object.defineProperty(global, "Request", {
+ value: Request
+ });
+ Object.defineProperty(global, "Response", {
+ value: Response2
+ });
+ }
+ return async (incoming, outgoing) => {
+ let res, req;
+ try {
+ req = newRequest(incoming, options.hostname);
+ let incomingEnded = !autoCleanupIncoming || incoming.method === "GET" || incoming.method === "HEAD";
+ if (!incomingEnded) {
+ ;
+ incoming[wrapBodyStream] = true;
+ incoming.on("end", () => {
+ incomingEnded = true;
+ });
+ if (incoming instanceof Http2ServerRequest2) {
+ ;
+ outgoing[outgoingEnded] = () => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ };
+ }
+ outgoing.on("finish", () => {
+ if (!incomingEnded) {
+ drainIncoming(incoming);
+ }
+ });
+ }
+ outgoing.on("close", () => {
+ const abortController = req[abortControllerKey];
+ if (abortController) {
+ if (incoming.errored) {
+ req[abortControllerKey].abort(incoming.errored.toString());
+ } else if (!outgoing.writableFinished) {
+ req[abortControllerKey].abort("Client connection prematurely closed.");
+ }
+ }
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ });
+ res = fetchCallback(req, { incoming, outgoing });
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ } catch (e) {
+ if (!res) {
+ if (options.errorHandler) {
+ res = await options.errorHandler(req ? e : toRequestError(e));
+ if (!res) {
+ return;
+ }
+ } else if (!req) {
+ res = handleRequestError();
+ } else {
+ res = handleFetchError(e);
+ }
+ } else {
+ return handleResponseError(e, outgoing);
+ }
+ }
+ try {
+ return await responseViaResponseObject(res, outgoing, options);
+ } catch (e) {
+ return handleResponseError(e, outgoing);
+ }
+ };
+};
+export {
+ getRequestListener
+};
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/request.d.mts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/request.d.mts
new file mode 100644
index 0000000..e3045cc
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/request.d.mts
@@ -0,0 +1,25 @@
+import { IncomingMessage } from 'node:http';
+import { Http2ServerRequest } from 'node:http2';
+
+declare class RequestError extends Error {
+ constructor(message: string, options?: {
+ cause?: unknown;
+ });
+}
+declare const toRequestError: (e: unknown) => RequestError;
+declare const GlobalRequest: {
+ new (input: RequestInfo | URL, init?: RequestInit): globalThis.Request;
+ prototype: globalThis.Request;
+};
+declare class Request extends GlobalRequest {
+ constructor(input: string | Request, options?: RequestInit);
+}
+type IncomingMessageWithWrapBodyStream = IncomingMessage & {
+ [wrapBodyStream]: boolean;
+};
+declare const wrapBodyStream: unique symbol;
+declare const abortControllerKey: unique symbol;
+declare const getAbortController: unique symbol;
+declare const newRequest: (incoming: IncomingMessage | Http2ServerRequest, defaultHostname?: string) => any;
+
+export { GlobalRequest, type IncomingMessageWithWrapBodyStream, Request, RequestError, abortControllerKey, getAbortController, newRequest, toRequestError, wrapBodyStream };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/request.d.ts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/request.d.ts
new file mode 100644
index 0000000..e3045cc
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/request.d.ts
@@ -0,0 +1,25 @@
+import { IncomingMessage } from 'node:http';
+import { Http2ServerRequest } from 'node:http2';
+
+declare class RequestError extends Error {
+ constructor(message: string, options?: {
+ cause?: unknown;
+ });
+}
+declare const toRequestError: (e: unknown) => RequestError;
+declare const GlobalRequest: {
+ new (input: RequestInfo | URL, init?: RequestInit): globalThis.Request;
+ prototype: globalThis.Request;
+};
+declare class Request extends GlobalRequest {
+ constructor(input: string | Request, options?: RequestInit);
+}
+type IncomingMessageWithWrapBodyStream = IncomingMessage & {
+ [wrapBodyStream]: boolean;
+};
+declare const wrapBodyStream: unique symbol;
+declare const abortControllerKey: unique symbol;
+declare const getAbortController: unique symbol;
+declare const newRequest: (incoming: IncomingMessage | Http2ServerRequest, defaultHostname?: string) => any;
+
+export { GlobalRequest, type IncomingMessageWithWrapBodyStream, Request, RequestError, abortControllerKey, getAbortController, newRequest, toRequestError, wrapBodyStream };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/request.js b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/request.js
new file mode 100644
index 0000000..d6d6740
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/request.js
@@ -0,0 +1,238 @@
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/request.ts
+var request_exports = {};
+__export(request_exports, {
+ GlobalRequest: () => GlobalRequest,
+ Request: () => Request,
+ RequestError: () => RequestError,
+ abortControllerKey: () => abortControllerKey,
+ getAbortController: () => getAbortController,
+ newRequest: () => newRequest,
+ toRequestError: () => toRequestError,
+ wrapBodyStream: () => wrapBodyStream
+});
+module.exports = __toCommonJS(request_exports);
+var import_node_http2 = require("http2");
+var import_node_stream = require("stream");
+var RequestError = class extends Error {
+ constructor(message, options) {
+ super(message, options);
+ this.name = "RequestError";
+ }
+};
+var toRequestError = (e) => {
+ if (e instanceof RequestError) {
+ return e;
+ }
+ return new RequestError(e.message, { cause: e });
+};
+var GlobalRequest = global.Request;
+var Request = class extends GlobalRequest {
+ constructor(input, options) {
+ if (typeof input === "object" && getRequestCache in input) {
+ input = input[getRequestCache]();
+ }
+ if (typeof options?.body?.getReader !== "undefined") {
+ ;
+ options.duplex ??= "half";
+ }
+ super(input, options);
+ }
+};
+var newHeadersFromIncoming = (incoming) => {
+ const headerRecord = [];
+ const rawHeaders = incoming.rawHeaders;
+ for (let i = 0; i < rawHeaders.length; i += 2) {
+ const { [i]: key, [i + 1]: value } = rawHeaders;
+ if (key.charCodeAt(0) !== /*:*/
+ 58) {
+ headerRecord.push([key, value]);
+ }
+ }
+ return new Headers(headerRecord);
+};
+var wrapBodyStream = Symbol("wrapBodyStream");
+var newRequestFromIncoming = (method, url, headers, incoming, abortController) => {
+ const init = {
+ method,
+ headers,
+ signal: abortController.signal
+ };
+ if (method === "TRACE") {
+ init.method = "GET";
+ const req = new Request(url, init);
+ Object.defineProperty(req, "method", {
+ get() {
+ return "TRACE";
+ }
+ });
+ return req;
+ }
+ if (!(method === "GET" || method === "HEAD")) {
+ if ("rawBody" in incoming && incoming.rawBody instanceof Buffer) {
+ init.body = new ReadableStream({
+ start(controller) {
+ controller.enqueue(incoming.rawBody);
+ controller.close();
+ }
+ });
+ } else if (incoming[wrapBodyStream]) {
+ let reader;
+ init.body = new ReadableStream({
+ async pull(controller) {
+ try {
+ reader ||= import_node_stream.Readable.toWeb(incoming).getReader();
+ const { done, value } = await reader.read();
+ if (done) {
+ controller.close();
+ } else {
+ controller.enqueue(value);
+ }
+ } catch (error) {
+ controller.error(error);
+ }
+ }
+ });
+ } else {
+ init.body = import_node_stream.Readable.toWeb(incoming);
+ }
+ }
+ return new Request(url, init);
+};
+var getRequestCache = Symbol("getRequestCache");
+var requestCache = Symbol("requestCache");
+var incomingKey = Symbol("incomingKey");
+var urlKey = Symbol("urlKey");
+var headersKey = Symbol("headersKey");
+var abortControllerKey = Symbol("abortControllerKey");
+var getAbortController = Symbol("getAbortController");
+var requestPrototype = {
+ get method() {
+ return this[incomingKey].method || "GET";
+ },
+ get url() {
+ return this[urlKey];
+ },
+ get headers() {
+ return this[headersKey] ||= newHeadersFromIncoming(this[incomingKey]);
+ },
+ [getAbortController]() {
+ this[getRequestCache]();
+ return this[abortControllerKey];
+ },
+ [getRequestCache]() {
+ this[abortControllerKey] ||= new AbortController();
+ return this[requestCache] ||= newRequestFromIncoming(
+ this.method,
+ this[urlKey],
+ this.headers,
+ this[incomingKey],
+ this[abortControllerKey]
+ );
+ }
+};
+[
+ "body",
+ "bodyUsed",
+ "cache",
+ "credentials",
+ "destination",
+ "integrity",
+ "mode",
+ "redirect",
+ "referrer",
+ "referrerPolicy",
+ "signal",
+ "keepalive"
+].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ get() {
+ return this[getRequestCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ value: function() {
+ return this[getRequestCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ method: this.method,
+ url: this.url,
+ headers: this.headers,
+ nativeRequest: this[requestCache]
+ };
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(requestPrototype, Request.prototype);
+var newRequest = (incoming, defaultHostname) => {
+ const req = Object.create(requestPrototype);
+ req[incomingKey] = incoming;
+ const incomingUrl = incoming.url || "";
+ if (incomingUrl[0] !== "/" && // short-circuit for performance. most requests are relative URL.
+ (incomingUrl.startsWith("http://") || incomingUrl.startsWith("https://"))) {
+ if (incoming instanceof import_node_http2.Http2ServerRequest) {
+ throw new RequestError("Absolute URL for :path is not allowed in HTTP/2");
+ }
+ try {
+ const url2 = new URL(incomingUrl);
+ req[urlKey] = url2.href;
+ } catch (e) {
+ throw new RequestError("Invalid absolute URL", { cause: e });
+ }
+ return req;
+ }
+ const host = (incoming instanceof import_node_http2.Http2ServerRequest ? incoming.authority : incoming.headers.host) || defaultHostname;
+ if (!host) {
+ throw new RequestError("Missing host header");
+ }
+ let scheme;
+ if (incoming instanceof import_node_http2.Http2ServerRequest) {
+ scheme = incoming.scheme;
+ if (!(scheme === "http" || scheme === "https")) {
+ throw new RequestError("Unsupported scheme");
+ }
+ } else {
+ scheme = incoming.socket && incoming.socket.encrypted ? "https" : "http";
+ }
+ const url = new URL(`${scheme}://${host}${incomingUrl}`);
+ if (url.hostname.length !== host.length && url.hostname !== host.replace(/:\d+$/, "")) {
+ throw new RequestError("Invalid host header");
+ }
+ req[urlKey] = url.href;
+ return req;
+};
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ GlobalRequest,
+ Request,
+ RequestError,
+ abortControllerKey,
+ getAbortController,
+ newRequest,
+ toRequestError,
+ wrapBodyStream
+});
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/request.mjs b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/request.mjs
new file mode 100644
index 0000000..8f57cd4
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/request.mjs
@@ -0,0 +1,206 @@
+// src/request.ts
+import { Http2ServerRequest } from "http2";
+import { Readable } from "stream";
+var RequestError = class extends Error {
+ constructor(message, options) {
+ super(message, options);
+ this.name = "RequestError";
+ }
+};
+var toRequestError = (e) => {
+ if (e instanceof RequestError) {
+ return e;
+ }
+ return new RequestError(e.message, { cause: e });
+};
+var GlobalRequest = global.Request;
+var Request = class extends GlobalRequest {
+ constructor(input, options) {
+ if (typeof input === "object" && getRequestCache in input) {
+ input = input[getRequestCache]();
+ }
+ if (typeof options?.body?.getReader !== "undefined") {
+ ;
+ options.duplex ??= "half";
+ }
+ super(input, options);
+ }
+};
+var newHeadersFromIncoming = (incoming) => {
+ const headerRecord = [];
+ const rawHeaders = incoming.rawHeaders;
+ for (let i = 0; i < rawHeaders.length; i += 2) {
+ const { [i]: key, [i + 1]: value } = rawHeaders;
+ if (key.charCodeAt(0) !== /*:*/
+ 58) {
+ headerRecord.push([key, value]);
+ }
+ }
+ return new Headers(headerRecord);
+};
+var wrapBodyStream = Symbol("wrapBodyStream");
+var newRequestFromIncoming = (method, url, headers, incoming, abortController) => {
+ const init = {
+ method,
+ headers,
+ signal: abortController.signal
+ };
+ if (method === "TRACE") {
+ init.method = "GET";
+ const req = new Request(url, init);
+ Object.defineProperty(req, "method", {
+ get() {
+ return "TRACE";
+ }
+ });
+ return req;
+ }
+ if (!(method === "GET" || method === "HEAD")) {
+ if ("rawBody" in incoming && incoming.rawBody instanceof Buffer) {
+ init.body = new ReadableStream({
+ start(controller) {
+ controller.enqueue(incoming.rawBody);
+ controller.close();
+ }
+ });
+ } else if (incoming[wrapBodyStream]) {
+ let reader;
+ init.body = new ReadableStream({
+ async pull(controller) {
+ try {
+ reader ||= Readable.toWeb(incoming).getReader();
+ const { done, value } = await reader.read();
+ if (done) {
+ controller.close();
+ } else {
+ controller.enqueue(value);
+ }
+ } catch (error) {
+ controller.error(error);
+ }
+ }
+ });
+ } else {
+ init.body = Readable.toWeb(incoming);
+ }
+ }
+ return new Request(url, init);
+};
+var getRequestCache = Symbol("getRequestCache");
+var requestCache = Symbol("requestCache");
+var incomingKey = Symbol("incomingKey");
+var urlKey = Symbol("urlKey");
+var headersKey = Symbol("headersKey");
+var abortControllerKey = Symbol("abortControllerKey");
+var getAbortController = Symbol("getAbortController");
+var requestPrototype = {
+ get method() {
+ return this[incomingKey].method || "GET";
+ },
+ get url() {
+ return this[urlKey];
+ },
+ get headers() {
+ return this[headersKey] ||= newHeadersFromIncoming(this[incomingKey]);
+ },
+ [getAbortController]() {
+ this[getRequestCache]();
+ return this[abortControllerKey];
+ },
+ [getRequestCache]() {
+ this[abortControllerKey] ||= new AbortController();
+ return this[requestCache] ||= newRequestFromIncoming(
+ this.method,
+ this[urlKey],
+ this.headers,
+ this[incomingKey],
+ this[abortControllerKey]
+ );
+ }
+};
+[
+ "body",
+ "bodyUsed",
+ "cache",
+ "credentials",
+ "destination",
+ "integrity",
+ "mode",
+ "redirect",
+ "referrer",
+ "referrerPolicy",
+ "signal",
+ "keepalive"
+].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ get() {
+ return this[getRequestCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ value: function() {
+ return this[getRequestCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ method: this.method,
+ url: this.url,
+ headers: this.headers,
+ nativeRequest: this[requestCache]
+ };
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(requestPrototype, Request.prototype);
+var newRequest = (incoming, defaultHostname) => {
+ const req = Object.create(requestPrototype);
+ req[incomingKey] = incoming;
+ const incomingUrl = incoming.url || "";
+ if (incomingUrl[0] !== "/" && // short-circuit for performance. most requests are relative URL.
+ (incomingUrl.startsWith("http://") || incomingUrl.startsWith("https://"))) {
+ if (incoming instanceof Http2ServerRequest) {
+ throw new RequestError("Absolute URL for :path is not allowed in HTTP/2");
+ }
+ try {
+ const url2 = new URL(incomingUrl);
+ req[urlKey] = url2.href;
+ } catch (e) {
+ throw new RequestError("Invalid absolute URL", { cause: e });
+ }
+ return req;
+ }
+ const host = (incoming instanceof Http2ServerRequest ? incoming.authority : incoming.headers.host) || defaultHostname;
+ if (!host) {
+ throw new RequestError("Missing host header");
+ }
+ let scheme;
+ if (incoming instanceof Http2ServerRequest) {
+ scheme = incoming.scheme;
+ if (!(scheme === "http" || scheme === "https")) {
+ throw new RequestError("Unsupported scheme");
+ }
+ } else {
+ scheme = incoming.socket && incoming.socket.encrypted ? "https" : "http";
+ }
+ const url = new URL(`${scheme}://${host}${incomingUrl}`);
+ if (url.hostname.length !== host.length && url.hostname !== host.replace(/:\d+$/, "")) {
+ throw new RequestError("Invalid host header");
+ }
+ req[urlKey] = url.href;
+ return req;
+};
+export {
+ GlobalRequest,
+ Request,
+ RequestError,
+ abortControllerKey,
+ getAbortController,
+ newRequest,
+ toRequestError,
+ wrapBodyStream
+};
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/response.d.mts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/response.d.mts
new file mode 100644
index 0000000..57775ed
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/response.d.mts
@@ -0,0 +1,26 @@
+import { OutgoingHttpHeaders } from 'node:http';
+
+declare const getResponseCache: unique symbol;
+declare const cacheKey: unique symbol;
+type InternalCache = [
+ number,
+ string | ReadableStream,
+ Record | [string, string][] | Headers | OutgoingHttpHeaders | undefined
+];
+declare const GlobalResponse: {
+ new (body?: BodyInit | null, init?: ResponseInit): globalThis.Response;
+ prototype: globalThis.Response;
+ error(): globalThis.Response;
+ json(data: any, init?: ResponseInit): globalThis.Response;
+ redirect(url: string | URL, status?: number): globalThis.Response;
+};
+declare class Response {
+ #private;
+ [getResponseCache](): globalThis.Response;
+ constructor(body?: BodyInit | null, init?: ResponseInit);
+ get headers(): Headers;
+ get status(): number;
+ get ok(): boolean;
+}
+
+export { GlobalResponse, type InternalCache, Response, cacheKey };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/response.d.ts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/response.d.ts
new file mode 100644
index 0000000..57775ed
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/response.d.ts
@@ -0,0 +1,26 @@
+import { OutgoingHttpHeaders } from 'node:http';
+
+declare const getResponseCache: unique symbol;
+declare const cacheKey: unique symbol;
+type InternalCache = [
+ number,
+ string | ReadableStream,
+ Record | [string, string][] | Headers | OutgoingHttpHeaders | undefined
+];
+declare const GlobalResponse: {
+ new (body?: BodyInit | null, init?: ResponseInit): globalThis.Response;
+ prototype: globalThis.Response;
+ error(): globalThis.Response;
+ json(data: any, init?: ResponseInit): globalThis.Response;
+ redirect(url: string | URL, status?: number): globalThis.Response;
+};
+declare class Response {
+ #private;
+ [getResponseCache](): globalThis.Response;
+ constructor(body?: BodyInit | null, init?: ResponseInit);
+ get headers(): Headers;
+ get status(): number;
+ get ok(): boolean;
+}
+
+export { GlobalResponse, type InternalCache, Response, cacheKey };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/response.js b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/response.js
new file mode 100644
index 0000000..7661dda
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/response.js
@@ -0,0 +1,112 @@
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/response.ts
+var response_exports = {};
+__export(response_exports, {
+ GlobalResponse: () => GlobalResponse,
+ Response: () => Response,
+ cacheKey: () => cacheKey
+});
+module.exports = __toCommonJS(response_exports);
+var responseCache = Symbol("responseCache");
+var getResponseCache = Symbol("getResponseCache");
+var cacheKey = Symbol("cache");
+var GlobalResponse = global.Response;
+var Response = class _Response {
+ #body;
+ #init;
+ [getResponseCache]() {
+ delete this[cacheKey];
+ return this[responseCache] ||= new GlobalResponse(this.#body, this.#init);
+ }
+ constructor(body, init) {
+ let headers;
+ this.#body = body;
+ if (init instanceof _Response) {
+ const cachedGlobalResponse = init[responseCache];
+ if (cachedGlobalResponse) {
+ this.#init = cachedGlobalResponse;
+ this[getResponseCache]();
+ return;
+ } else {
+ this.#init = init.#init;
+ headers = new Headers(init.#init.headers);
+ }
+ } else {
+ this.#init = init;
+ }
+ if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
+ ;
+ this[cacheKey] = [init?.status || 200, body, headers || init?.headers];
+ }
+ }
+ get headers() {
+ const cache = this[cacheKey];
+ if (cache) {
+ if (!(cache[2] instanceof Headers)) {
+ cache[2] = new Headers(
+ cache[2] || { "content-type": "text/plain; charset=UTF-8" }
+ );
+ }
+ return cache[2];
+ }
+ return this[getResponseCache]().headers;
+ }
+ get status() {
+ return this[cacheKey]?.[0] ?? this[getResponseCache]().status;
+ }
+ get ok() {
+ const status = this.status;
+ return status >= 200 && status < 300;
+ }
+};
+["body", "bodyUsed", "redirected", "statusText", "trailers", "type", "url"].forEach((k) => {
+ Object.defineProperty(Response.prototype, k, {
+ get() {
+ return this[getResponseCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(Response.prototype, k, {
+ value: function() {
+ return this[getResponseCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(Response.prototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ status: this.status,
+ headers: this.headers,
+ ok: this.ok,
+ nativeResponse: this[responseCache]
+ };
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(Response, GlobalResponse);
+Object.setPrototypeOf(Response.prototype, GlobalResponse.prototype);
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ GlobalResponse,
+ Response,
+ cacheKey
+});
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/response.mjs b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/response.mjs
new file mode 100644
index 0000000..2855e1c
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/response.mjs
@@ -0,0 +1,85 @@
+// src/response.ts
+var responseCache = Symbol("responseCache");
+var getResponseCache = Symbol("getResponseCache");
+var cacheKey = Symbol("cache");
+var GlobalResponse = global.Response;
+var Response = class _Response {
+ #body;
+ #init;
+ [getResponseCache]() {
+ delete this[cacheKey];
+ return this[responseCache] ||= new GlobalResponse(this.#body, this.#init);
+ }
+ constructor(body, init) {
+ let headers;
+ this.#body = body;
+ if (init instanceof _Response) {
+ const cachedGlobalResponse = init[responseCache];
+ if (cachedGlobalResponse) {
+ this.#init = cachedGlobalResponse;
+ this[getResponseCache]();
+ return;
+ } else {
+ this.#init = init.#init;
+ headers = new Headers(init.#init.headers);
+ }
+ } else {
+ this.#init = init;
+ }
+ if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
+ ;
+ this[cacheKey] = [init?.status || 200, body, headers || init?.headers];
+ }
+ }
+ get headers() {
+ const cache = this[cacheKey];
+ if (cache) {
+ if (!(cache[2] instanceof Headers)) {
+ cache[2] = new Headers(
+ cache[2] || { "content-type": "text/plain; charset=UTF-8" }
+ );
+ }
+ return cache[2];
+ }
+ return this[getResponseCache]().headers;
+ }
+ get status() {
+ return this[cacheKey]?.[0] ?? this[getResponseCache]().status;
+ }
+ get ok() {
+ const status = this.status;
+ return status >= 200 && status < 300;
+ }
+};
+["body", "bodyUsed", "redirected", "statusText", "trailers", "type", "url"].forEach((k) => {
+ Object.defineProperty(Response.prototype, k, {
+ get() {
+ return this[getResponseCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(Response.prototype, k, {
+ value: function() {
+ return this[getResponseCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(Response.prototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ status: this.status,
+ headers: this.headers,
+ ok: this.ok,
+ nativeResponse: this[responseCache]
+ };
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(Response, GlobalResponse);
+Object.setPrototypeOf(Response.prototype, GlobalResponse.prototype);
+export {
+ GlobalResponse,
+ Response,
+ cacheKey
+};
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/serve-static.d.mts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/serve-static.d.mts
new file mode 100644
index 0000000..9a1c83d
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/serve-static.d.mts
@@ -0,0 +1,17 @@
+import { Env, Context, MiddlewareHandler } from 'hono';
+
+type ServeStaticOptions = {
+ /**
+ * Root path, relative to current working directory from which the app was started. Absolute paths are not supported.
+ */
+ root?: string;
+ path?: string;
+ index?: string;
+ precompressed?: boolean;
+ rewriteRequestPath?: (path: string, c: Context) => string;
+ onFound?: (path: string, c: Context) => void | Promise;
+ onNotFound?: (path: string, c: Context) => void | Promise;
+};
+declare const serveStatic: (options?: ServeStaticOptions) => MiddlewareHandler;
+
+export { type ServeStaticOptions, serveStatic };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/serve-static.d.ts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/serve-static.d.ts
new file mode 100644
index 0000000..9a1c83d
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/serve-static.d.ts
@@ -0,0 +1,17 @@
+import { Env, Context, MiddlewareHandler } from 'hono';
+
+type ServeStaticOptions = {
+ /**
+ * Root path, relative to current working directory from which the app was started. Absolute paths are not supported.
+ */
+ root?: string;
+ path?: string;
+ index?: string;
+ precompressed?: boolean;
+ rewriteRequestPath?: (path: string, c: Context) => string;
+ onFound?: (path: string, c: Context) => void | Promise;
+ onNotFound?: (path: string, c: Context) => void | Promise;
+};
+declare const serveStatic: (options?: ServeStaticOptions) => MiddlewareHandler;
+
+export { type ServeStaticOptions, serveStatic };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/serve-static.js b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/serve-static.js
new file mode 100644
index 0000000..b89e331
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/serve-static.js
@@ -0,0 +1,177 @@
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/serve-static.ts
+var serve_static_exports = {};
+__export(serve_static_exports, {
+ serveStatic: () => serveStatic
+});
+module.exports = __toCommonJS(serve_static_exports);
+var import_mime = require("hono/utils/mime");
+var import_node_fs = require("fs");
+var import_node_path = require("path");
+var import_node_process = require("process");
+var import_node_stream = require("stream");
+var COMPRESSIBLE_CONTENT_TYPE_REGEX = /^\s*(?:text\/[^;\s]+|application\/(?:javascript|json|xml|xml-dtd|ecmascript|dart|postscript|rtf|tar|toml|vnd\.dart|vnd\.ms-fontobject|vnd\.ms-opentype|wasm|x-httpd-php|x-javascript|x-ns-proxy-autoconfig|x-sh|x-tar|x-virtualbox-hdd|x-virtualbox-ova|x-virtualbox-ovf|x-virtualbox-vbox|x-virtualbox-vdi|x-virtualbox-vhd|x-virtualbox-vmdk|x-www-form-urlencoded)|font\/(?:otf|ttf)|image\/(?:bmp|vnd\.adobe\.photoshop|vnd\.microsoft\.icon|vnd\.ms-dds|x-icon|x-ms-bmp)|message\/rfc822|model\/gltf-binary|x-shader\/x-fragment|x-shader\/x-vertex|[^;\s]+?\+(?:json|text|xml|yaml))(?:[;\s]|$)/i;
+var ENCODINGS = {
+ br: ".br",
+ zstd: ".zst",
+ gzip: ".gz"
+};
+var ENCODINGS_ORDERED_KEYS = Object.keys(ENCODINGS);
+var pr54206Applied = () => {
+ const [major, minor] = import_node_process.versions.node.split(".").map((component) => parseInt(component));
+ return major >= 23 || major === 22 && minor >= 7 || major === 20 && minor >= 18;
+};
+var useReadableToWeb = pr54206Applied();
+var createStreamBody = (stream) => {
+ if (useReadableToWeb) {
+ return import_node_stream.Readable.toWeb(stream);
+ }
+ const body = new ReadableStream({
+ start(controller) {
+ stream.on("data", (chunk) => {
+ controller.enqueue(chunk);
+ });
+ stream.on("error", (err) => {
+ controller.error(err);
+ });
+ stream.on("end", () => {
+ controller.close();
+ });
+ },
+ cancel() {
+ stream.destroy();
+ }
+ });
+ return body;
+};
+var getStats = (path) => {
+ let stats;
+ try {
+ stats = (0, import_node_fs.statSync)(path);
+ } catch {
+ }
+ return stats;
+};
+var tryDecode = (str, decoder) => {
+ try {
+ return decoder(str);
+ } catch {
+ return str.replace(/(?:%[0-9A-Fa-f]{2})+/g, (match) => {
+ try {
+ return decoder(match);
+ } catch {
+ return match;
+ }
+ });
+ }
+};
+var tryDecodeURI = (str) => tryDecode(str, decodeURI);
+var serveStatic = (options = { root: "" }) => {
+ const root = options.root || "";
+ const optionPath = options.path;
+ if (root !== "" && !(0, import_node_fs.existsSync)(root)) {
+ console.error(`serveStatic: root path '${root}' is not found, are you sure it's correct?`);
+ }
+ return async (c, next) => {
+ if (c.finalized) {
+ return next();
+ }
+ let filename;
+ if (optionPath) {
+ filename = optionPath;
+ } else {
+ try {
+ filename = tryDecodeURI(c.req.path);
+ if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}/.test(filename)) {
+ throw new Error();
+ }
+ } catch {
+ await options.onNotFound?.(c.req.path, c);
+ return next();
+ }
+ }
+ let path = (0, import_node_path.join)(
+ root,
+ !optionPath && options.rewriteRequestPath ? options.rewriteRequestPath(filename, c) : filename
+ );
+ let stats = getStats(path);
+ if (stats && stats.isDirectory()) {
+ const indexFile = options.index ?? "index.html";
+ path = (0, import_node_path.join)(path, indexFile);
+ stats = getStats(path);
+ }
+ if (!stats) {
+ await options.onNotFound?.(path, c);
+ return next();
+ }
+ const mimeType = (0, import_mime.getMimeType)(path);
+ c.header("Content-Type", mimeType || "application/octet-stream");
+ if (options.precompressed && (!mimeType || COMPRESSIBLE_CONTENT_TYPE_REGEX.test(mimeType))) {
+ const acceptEncodingSet = new Set(
+ c.req.header("Accept-Encoding")?.split(",").map((encoding) => encoding.trim())
+ );
+ for (const encoding of ENCODINGS_ORDERED_KEYS) {
+ if (!acceptEncodingSet.has(encoding)) {
+ continue;
+ }
+ const precompressedStats = getStats(path + ENCODINGS[encoding]);
+ if (precompressedStats) {
+ c.header("Content-Encoding", encoding);
+ c.header("Vary", "Accept-Encoding", { append: true });
+ stats = precompressedStats;
+ path = path + ENCODINGS[encoding];
+ break;
+ }
+ }
+ }
+ let result;
+ const size = stats.size;
+ const range = c.req.header("range") || "";
+ if (c.req.method == "HEAD" || c.req.method == "OPTIONS") {
+ c.header("Content-Length", size.toString());
+ c.status(200);
+ result = c.body(null);
+ } else if (!range) {
+ c.header("Content-Length", size.toString());
+ result = c.body(createStreamBody((0, import_node_fs.createReadStream)(path)), 200);
+ } else {
+ c.header("Accept-Ranges", "bytes");
+ c.header("Date", stats.birthtime.toUTCString());
+ const parts = range.replace(/bytes=/, "").split("-", 2);
+ const start = parseInt(parts[0], 10) || 0;
+ let end = parseInt(parts[1], 10) || size - 1;
+ if (size < end - start + 1) {
+ end = size - 1;
+ }
+ const chunksize = end - start + 1;
+ const stream = (0, import_node_fs.createReadStream)(path, { start, end });
+ c.header("Content-Length", chunksize.toString());
+ c.header("Content-Range", `bytes ${start}-${end}/${stats.size}`);
+ result = c.body(createStreamBody(stream), 206);
+ }
+ await options.onFound?.(path, c);
+ return result;
+ };
+};
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ serveStatic
+});
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/serve-static.mjs b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/serve-static.mjs
new file mode 100644
index 0000000..5ac3b55
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/serve-static.mjs
@@ -0,0 +1,152 @@
+// src/serve-static.ts
+import { getMimeType } from "hono/utils/mime";
+import { createReadStream, statSync, existsSync } from "fs";
+import { join } from "path";
+import { versions } from "process";
+import { Readable } from "stream";
+var COMPRESSIBLE_CONTENT_TYPE_REGEX = /^\s*(?:text\/[^;\s]+|application\/(?:javascript|json|xml|xml-dtd|ecmascript|dart|postscript|rtf|tar|toml|vnd\.dart|vnd\.ms-fontobject|vnd\.ms-opentype|wasm|x-httpd-php|x-javascript|x-ns-proxy-autoconfig|x-sh|x-tar|x-virtualbox-hdd|x-virtualbox-ova|x-virtualbox-ovf|x-virtualbox-vbox|x-virtualbox-vdi|x-virtualbox-vhd|x-virtualbox-vmdk|x-www-form-urlencoded)|font\/(?:otf|ttf)|image\/(?:bmp|vnd\.adobe\.photoshop|vnd\.microsoft\.icon|vnd\.ms-dds|x-icon|x-ms-bmp)|message\/rfc822|model\/gltf-binary|x-shader\/x-fragment|x-shader\/x-vertex|[^;\s]+?\+(?:json|text|xml|yaml))(?:[;\s]|$)/i;
+var ENCODINGS = {
+ br: ".br",
+ zstd: ".zst",
+ gzip: ".gz"
+};
+var ENCODINGS_ORDERED_KEYS = Object.keys(ENCODINGS);
+var pr54206Applied = () => {
+ const [major, minor] = versions.node.split(".").map((component) => parseInt(component));
+ return major >= 23 || major === 22 && minor >= 7 || major === 20 && minor >= 18;
+};
+var useReadableToWeb = pr54206Applied();
+var createStreamBody = (stream) => {
+ if (useReadableToWeb) {
+ return Readable.toWeb(stream);
+ }
+ const body = new ReadableStream({
+ start(controller) {
+ stream.on("data", (chunk) => {
+ controller.enqueue(chunk);
+ });
+ stream.on("error", (err) => {
+ controller.error(err);
+ });
+ stream.on("end", () => {
+ controller.close();
+ });
+ },
+ cancel() {
+ stream.destroy();
+ }
+ });
+ return body;
+};
+var getStats = (path) => {
+ let stats;
+ try {
+ stats = statSync(path);
+ } catch {
+ }
+ return stats;
+};
+var tryDecode = (str, decoder) => {
+ try {
+ return decoder(str);
+ } catch {
+ return str.replace(/(?:%[0-9A-Fa-f]{2})+/g, (match) => {
+ try {
+ return decoder(match);
+ } catch {
+ return match;
+ }
+ });
+ }
+};
+var tryDecodeURI = (str) => tryDecode(str, decodeURI);
+var serveStatic = (options = { root: "" }) => {
+ const root = options.root || "";
+ const optionPath = options.path;
+ if (root !== "" && !existsSync(root)) {
+ console.error(`serveStatic: root path '${root}' is not found, are you sure it's correct?`);
+ }
+ return async (c, next) => {
+ if (c.finalized) {
+ return next();
+ }
+ let filename;
+ if (optionPath) {
+ filename = optionPath;
+ } else {
+ try {
+ filename = tryDecodeURI(c.req.path);
+ if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}/.test(filename)) {
+ throw new Error();
+ }
+ } catch {
+ await options.onNotFound?.(c.req.path, c);
+ return next();
+ }
+ }
+ let path = join(
+ root,
+ !optionPath && options.rewriteRequestPath ? options.rewriteRequestPath(filename, c) : filename
+ );
+ let stats = getStats(path);
+ if (stats && stats.isDirectory()) {
+ const indexFile = options.index ?? "index.html";
+ path = join(path, indexFile);
+ stats = getStats(path);
+ }
+ if (!stats) {
+ await options.onNotFound?.(path, c);
+ return next();
+ }
+ const mimeType = getMimeType(path);
+ c.header("Content-Type", mimeType || "application/octet-stream");
+ if (options.precompressed && (!mimeType || COMPRESSIBLE_CONTENT_TYPE_REGEX.test(mimeType))) {
+ const acceptEncodingSet = new Set(
+ c.req.header("Accept-Encoding")?.split(",").map((encoding) => encoding.trim())
+ );
+ for (const encoding of ENCODINGS_ORDERED_KEYS) {
+ if (!acceptEncodingSet.has(encoding)) {
+ continue;
+ }
+ const precompressedStats = getStats(path + ENCODINGS[encoding]);
+ if (precompressedStats) {
+ c.header("Content-Encoding", encoding);
+ c.header("Vary", "Accept-Encoding", { append: true });
+ stats = precompressedStats;
+ path = path + ENCODINGS[encoding];
+ break;
+ }
+ }
+ }
+ let result;
+ const size = stats.size;
+ const range = c.req.header("range") || "";
+ if (c.req.method == "HEAD" || c.req.method == "OPTIONS") {
+ c.header("Content-Length", size.toString());
+ c.status(200);
+ result = c.body(null);
+ } else if (!range) {
+ c.header("Content-Length", size.toString());
+ result = c.body(createStreamBody(createReadStream(path)), 200);
+ } else {
+ c.header("Accept-Ranges", "bytes");
+ c.header("Date", stats.birthtime.toUTCString());
+ const parts = range.replace(/bytes=/, "").split("-", 2);
+ const start = parseInt(parts[0], 10) || 0;
+ let end = parseInt(parts[1], 10) || size - 1;
+ if (size < end - start + 1) {
+ end = size - 1;
+ }
+ const chunksize = end - start + 1;
+ const stream = createReadStream(path, { start, end });
+ c.header("Content-Length", chunksize.toString());
+ c.header("Content-Range", `bytes ${start}-${end}/${stats.size}`);
+ result = c.body(createStreamBody(stream), 206);
+ }
+ await options.onFound?.(path, c);
+ return result;
+ };
+};
+export {
+ serveStatic
+};
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/server.d.mts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/server.d.mts
new file mode 100644
index 0000000..a8e9543
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/server.d.mts
@@ -0,0 +1,10 @@
+import { AddressInfo } from 'node:net';
+import { Options, ServerType } from './types.mjs';
+import 'node:http';
+import 'node:http2';
+import 'node:https';
+
+declare const createAdaptorServer: (options: Options) => ServerType;
+declare const serve: (options: Options, listeningListener?: (info: AddressInfo) => void) => ServerType;
+
+export { createAdaptorServer, serve };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/server.d.ts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/server.d.ts
new file mode 100644
index 0000000..b639283
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/server.d.ts
@@ -0,0 +1,10 @@
+import { AddressInfo } from 'node:net';
+import { Options, ServerType } from './types.js';
+import 'node:http';
+import 'node:http2';
+import 'node:https';
+
+declare const createAdaptorServer: (options: Options) => ServerType;
+declare const serve: (options: Options, listeningListener?: (info: AddressInfo) => void) => ServerType;
+
+export { createAdaptorServer, serve };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/server.js b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/server.js
new file mode 100644
index 0000000..2cebe01
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/server.js
@@ -0,0 +1,696 @@
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/server.ts
+var server_exports = {};
+__export(server_exports, {
+ createAdaptorServer: () => createAdaptorServer,
+ serve: () => serve
+});
+module.exports = __toCommonJS(server_exports);
+var import_node_http = require("http");
+
+// src/listener.ts
+var import_node_http22 = require("http2");
+
+// src/request.ts
+var import_node_http2 = require("http2");
+var import_node_stream = require("stream");
+var RequestError = class extends Error {
+ constructor(message, options) {
+ super(message, options);
+ this.name = "RequestError";
+ }
+};
+var toRequestError = (e) => {
+ if (e instanceof RequestError) {
+ return e;
+ }
+ return new RequestError(e.message, { cause: e });
+};
+var GlobalRequest = global.Request;
+var Request = class extends GlobalRequest {
+ constructor(input, options) {
+ if (typeof input === "object" && getRequestCache in input) {
+ input = input[getRequestCache]();
+ }
+ if (typeof options?.body?.getReader !== "undefined") {
+ ;
+ options.duplex ??= "half";
+ }
+ super(input, options);
+ }
+};
+var newHeadersFromIncoming = (incoming) => {
+ const headerRecord = [];
+ const rawHeaders = incoming.rawHeaders;
+ for (let i = 0; i < rawHeaders.length; i += 2) {
+ const { [i]: key, [i + 1]: value } = rawHeaders;
+ if (key.charCodeAt(0) !== /*:*/
+ 58) {
+ headerRecord.push([key, value]);
+ }
+ }
+ return new Headers(headerRecord);
+};
+var wrapBodyStream = Symbol("wrapBodyStream");
+var newRequestFromIncoming = (method, url, headers, incoming, abortController) => {
+ const init = {
+ method,
+ headers,
+ signal: abortController.signal
+ };
+ if (method === "TRACE") {
+ init.method = "GET";
+ const req = new Request(url, init);
+ Object.defineProperty(req, "method", {
+ get() {
+ return "TRACE";
+ }
+ });
+ return req;
+ }
+ if (!(method === "GET" || method === "HEAD")) {
+ if ("rawBody" in incoming && incoming.rawBody instanceof Buffer) {
+ init.body = new ReadableStream({
+ start(controller) {
+ controller.enqueue(incoming.rawBody);
+ controller.close();
+ }
+ });
+ } else if (incoming[wrapBodyStream]) {
+ let reader;
+ init.body = new ReadableStream({
+ async pull(controller) {
+ try {
+ reader ||= import_node_stream.Readable.toWeb(incoming).getReader();
+ const { done, value } = await reader.read();
+ if (done) {
+ controller.close();
+ } else {
+ controller.enqueue(value);
+ }
+ } catch (error) {
+ controller.error(error);
+ }
+ }
+ });
+ } else {
+ init.body = import_node_stream.Readable.toWeb(incoming);
+ }
+ }
+ return new Request(url, init);
+};
+var getRequestCache = Symbol("getRequestCache");
+var requestCache = Symbol("requestCache");
+var incomingKey = Symbol("incomingKey");
+var urlKey = Symbol("urlKey");
+var headersKey = Symbol("headersKey");
+var abortControllerKey = Symbol("abortControllerKey");
+var getAbortController = Symbol("getAbortController");
+var requestPrototype = {
+ get method() {
+ return this[incomingKey].method || "GET";
+ },
+ get url() {
+ return this[urlKey];
+ },
+ get headers() {
+ return this[headersKey] ||= newHeadersFromIncoming(this[incomingKey]);
+ },
+ [getAbortController]() {
+ this[getRequestCache]();
+ return this[abortControllerKey];
+ },
+ [getRequestCache]() {
+ this[abortControllerKey] ||= new AbortController();
+ return this[requestCache] ||= newRequestFromIncoming(
+ this.method,
+ this[urlKey],
+ this.headers,
+ this[incomingKey],
+ this[abortControllerKey]
+ );
+ }
+};
+[
+ "body",
+ "bodyUsed",
+ "cache",
+ "credentials",
+ "destination",
+ "integrity",
+ "mode",
+ "redirect",
+ "referrer",
+ "referrerPolicy",
+ "signal",
+ "keepalive"
+].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ get() {
+ return this[getRequestCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ value: function() {
+ return this[getRequestCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ method: this.method,
+ url: this.url,
+ headers: this.headers,
+ nativeRequest: this[requestCache]
+ };
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(requestPrototype, Request.prototype);
+var newRequest = (incoming, defaultHostname) => {
+ const req = Object.create(requestPrototype);
+ req[incomingKey] = incoming;
+ const incomingUrl = incoming.url || "";
+ if (incomingUrl[0] !== "/" && // short-circuit for performance. most requests are relative URL.
+ (incomingUrl.startsWith("http://") || incomingUrl.startsWith("https://"))) {
+ if (incoming instanceof import_node_http2.Http2ServerRequest) {
+ throw new RequestError("Absolute URL for :path is not allowed in HTTP/2");
+ }
+ try {
+ const url2 = new URL(incomingUrl);
+ req[urlKey] = url2.href;
+ } catch (e) {
+ throw new RequestError("Invalid absolute URL", { cause: e });
+ }
+ return req;
+ }
+ const host = (incoming instanceof import_node_http2.Http2ServerRequest ? incoming.authority : incoming.headers.host) || defaultHostname;
+ if (!host) {
+ throw new RequestError("Missing host header");
+ }
+ let scheme;
+ if (incoming instanceof import_node_http2.Http2ServerRequest) {
+ scheme = incoming.scheme;
+ if (!(scheme === "http" || scheme === "https")) {
+ throw new RequestError("Unsupported scheme");
+ }
+ } else {
+ scheme = incoming.socket && incoming.socket.encrypted ? "https" : "http";
+ }
+ const url = new URL(`${scheme}://${host}${incomingUrl}`);
+ if (url.hostname.length !== host.length && url.hostname !== host.replace(/:\d+$/, "")) {
+ throw new RequestError("Invalid host header");
+ }
+ req[urlKey] = url.href;
+ return req;
+};
+
+// src/response.ts
+var responseCache = Symbol("responseCache");
+var getResponseCache = Symbol("getResponseCache");
+var cacheKey = Symbol("cache");
+var GlobalResponse = global.Response;
+var Response2 = class _Response {
+ #body;
+ #init;
+ [getResponseCache]() {
+ delete this[cacheKey];
+ return this[responseCache] ||= new GlobalResponse(this.#body, this.#init);
+ }
+ constructor(body, init) {
+ let headers;
+ this.#body = body;
+ if (init instanceof _Response) {
+ const cachedGlobalResponse = init[responseCache];
+ if (cachedGlobalResponse) {
+ this.#init = cachedGlobalResponse;
+ this[getResponseCache]();
+ return;
+ } else {
+ this.#init = init.#init;
+ headers = new Headers(init.#init.headers);
+ }
+ } else {
+ this.#init = init;
+ }
+ if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
+ ;
+ this[cacheKey] = [init?.status || 200, body, headers || init?.headers];
+ }
+ }
+ get headers() {
+ const cache = this[cacheKey];
+ if (cache) {
+ if (!(cache[2] instanceof Headers)) {
+ cache[2] = new Headers(
+ cache[2] || { "content-type": "text/plain; charset=UTF-8" }
+ );
+ }
+ return cache[2];
+ }
+ return this[getResponseCache]().headers;
+ }
+ get status() {
+ return this[cacheKey]?.[0] ?? this[getResponseCache]().status;
+ }
+ get ok() {
+ const status = this.status;
+ return status >= 200 && status < 300;
+ }
+};
+["body", "bodyUsed", "redirected", "statusText", "trailers", "type", "url"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ get() {
+ return this[getResponseCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ value: function() {
+ return this[getResponseCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ status: this.status,
+ headers: this.headers,
+ ok: this.ok,
+ nativeResponse: this[responseCache]
+ };
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(Response2, GlobalResponse);
+Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
+
+// src/utils.ts
+async function readWithoutBlocking(readPromise) {
+ return Promise.race([readPromise, Promise.resolve().then(() => Promise.resolve(void 0))]);
+}
+function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) {
+ const cancel = (error) => {
+ reader.cancel(error).catch(() => {
+ });
+ };
+ writable.on("close", cancel);
+ writable.on("error", cancel);
+ (currentReadPromise ?? reader.read()).then(flow, handleStreamError);
+ return reader.closed.finally(() => {
+ writable.off("close", cancel);
+ writable.off("error", cancel);
+ });
+ function handleStreamError(error) {
+ if (error) {
+ writable.destroy(error);
+ }
+ }
+ function onDrain() {
+ reader.read().then(flow, handleStreamError);
+ }
+ function flow({ done, value }) {
+ try {
+ if (done) {
+ writable.end();
+ } else if (!writable.write(value)) {
+ writable.once("drain", onDrain);
+ } else {
+ return reader.read().then(flow, handleStreamError);
+ }
+ } catch (e) {
+ handleStreamError(e);
+ }
+ }
+}
+function writeFromReadableStream(stream, writable) {
+ if (stream.locked) {
+ throw new TypeError("ReadableStream is locked.");
+ } else if (writable.destroyed) {
+ return;
+ }
+ return writeFromReadableStreamDefaultReader(stream.getReader(), writable);
+}
+var buildOutgoingHttpHeaders = (headers) => {
+ const res = {};
+ if (!(headers instanceof Headers)) {
+ headers = new Headers(headers ?? void 0);
+ }
+ const cookies = [];
+ for (const [k, v] of headers) {
+ if (k === "set-cookie") {
+ cookies.push(v);
+ } else {
+ res[k] = v;
+ }
+ }
+ if (cookies.length > 0) {
+ res["set-cookie"] = cookies;
+ }
+ res["content-type"] ??= "text/plain; charset=UTF-8";
+ return res;
+};
+
+// src/utils/response/constants.ts
+var X_ALREADY_SENT = "x-hono-already-sent";
+
+// src/globals.ts
+var import_node_crypto = __toESM(require("crypto"));
+if (typeof global.crypto === "undefined") {
+ global.crypto = import_node_crypto.default;
+}
+
+// src/listener.ts
+var outgoingEnded = Symbol("outgoingEnded");
+var incomingDraining = Symbol("incomingDraining");
+var DRAIN_TIMEOUT_MS = 500;
+var MAX_DRAIN_BYTES = 64 * 1024 * 1024;
+var drainIncoming = (incoming) => {
+ const incomingWithDrainState = incoming;
+ if (incoming.destroyed || incomingWithDrainState[incomingDraining]) {
+ return;
+ }
+ incomingWithDrainState[incomingDraining] = true;
+ if (incoming instanceof import_node_http22.Http2ServerRequest) {
+ try {
+ ;
+ incoming.stream?.close?.(import_node_http22.constants.NGHTTP2_NO_ERROR);
+ } catch {
+ }
+ return;
+ }
+ let bytesRead = 0;
+ const cleanup = () => {
+ clearTimeout(timer);
+ incoming.off("data", onData);
+ incoming.off("end", cleanup);
+ incoming.off("error", cleanup);
+ };
+ const forceClose = () => {
+ cleanup();
+ const socket = incoming.socket;
+ if (socket && !socket.destroyed) {
+ socket.destroySoon();
+ }
+ };
+ const timer = setTimeout(forceClose, DRAIN_TIMEOUT_MS);
+ timer.unref?.();
+ const onData = (chunk) => {
+ bytesRead += chunk.length;
+ if (bytesRead > MAX_DRAIN_BYTES) {
+ forceClose();
+ }
+ };
+ incoming.on("data", onData);
+ incoming.on("end", cleanup);
+ incoming.on("error", cleanup);
+ incoming.resume();
+};
+var handleRequestError = () => new Response(null, {
+ status: 400
+});
+var handleFetchError = (e) => new Response(null, {
+ status: e instanceof Error && (e.name === "TimeoutError" || e.constructor.name === "TimeoutError") ? 504 : 500
+});
+var handleResponseError = (e, outgoing) => {
+ const err = e instanceof Error ? e : new Error("unknown error", { cause: e });
+ if (err.code === "ERR_STREAM_PREMATURE_CLOSE") {
+ console.info("The user aborted a request.");
+ } else {
+ console.error(e);
+ if (!outgoing.headersSent) {
+ outgoing.writeHead(500, { "Content-Type": "text/plain" });
+ }
+ outgoing.end(`Error: ${err.message}`);
+ outgoing.destroy(err);
+ }
+};
+var flushHeaders = (outgoing) => {
+ if ("flushHeaders" in outgoing && outgoing.writable) {
+ outgoing.flushHeaders();
+ }
+};
+var responseViaCache = async (res, outgoing) => {
+ let [status, body, header] = res[cacheKey];
+ let hasContentLength = false;
+ if (!header) {
+ header = { "content-type": "text/plain; charset=UTF-8" };
+ } else if (header instanceof Headers) {
+ hasContentLength = header.has("content-length");
+ header = buildOutgoingHttpHeaders(header);
+ } else if (Array.isArray(header)) {
+ const headerObj = new Headers(header);
+ hasContentLength = headerObj.has("content-length");
+ header = buildOutgoingHttpHeaders(headerObj);
+ } else {
+ for (const key in header) {
+ if (key.length === 14 && key.toLowerCase() === "content-length") {
+ hasContentLength = true;
+ break;
+ }
+ }
+ }
+ if (!hasContentLength) {
+ if (typeof body === "string") {
+ header["Content-Length"] = Buffer.byteLength(body);
+ } else if (body instanceof Uint8Array) {
+ header["Content-Length"] = body.byteLength;
+ } else if (body instanceof Blob) {
+ header["Content-Length"] = body.size;
+ }
+ }
+ outgoing.writeHead(status, header);
+ if (typeof body === "string" || body instanceof Uint8Array) {
+ outgoing.end(body);
+ } else if (body instanceof Blob) {
+ outgoing.end(new Uint8Array(await body.arrayBuffer()));
+ } else {
+ flushHeaders(outgoing);
+ await writeFromReadableStream(body, outgoing)?.catch(
+ (e) => handleResponseError(e, outgoing)
+ );
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var isPromise = (res) => typeof res.then === "function";
+var responseViaResponseObject = async (res, outgoing, options = {}) => {
+ if (isPromise(res)) {
+ if (options.errorHandler) {
+ try {
+ res = await res;
+ } catch (err) {
+ const errRes = await options.errorHandler(err);
+ if (!errRes) {
+ return;
+ }
+ res = errRes;
+ }
+ } else {
+ res = await res.catch(handleFetchError);
+ }
+ }
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ const resHeaderRecord = buildOutgoingHttpHeaders(res.headers);
+ if (res.body) {
+ const reader = res.body.getReader();
+ const values = [];
+ let done = false;
+ let currentReadPromise = void 0;
+ if (resHeaderRecord["transfer-encoding"] !== "chunked") {
+ let maxReadCount = 2;
+ for (let i = 0; i < maxReadCount; i++) {
+ currentReadPromise ||= reader.read();
+ const chunk = await readWithoutBlocking(currentReadPromise).catch((e) => {
+ console.error(e);
+ done = true;
+ });
+ if (!chunk) {
+ if (i === 1) {
+ await new Promise((resolve) => setTimeout(resolve));
+ maxReadCount = 3;
+ continue;
+ }
+ break;
+ }
+ currentReadPromise = void 0;
+ if (chunk.value) {
+ values.push(chunk.value);
+ }
+ if (chunk.done) {
+ done = true;
+ break;
+ }
+ }
+ if (done && !("content-length" in resHeaderRecord)) {
+ resHeaderRecord["content-length"] = values.reduce((acc, value) => acc + value.length, 0);
+ }
+ }
+ outgoing.writeHead(res.status, resHeaderRecord);
+ values.forEach((value) => {
+ ;
+ outgoing.write(value);
+ });
+ if (done) {
+ outgoing.end();
+ } else {
+ if (values.length === 0) {
+ flushHeaders(outgoing);
+ }
+ await writeFromReadableStreamDefaultReader(reader, outgoing, currentReadPromise);
+ }
+ } else if (resHeaderRecord[X_ALREADY_SENT]) {
+ } else {
+ outgoing.writeHead(res.status, resHeaderRecord);
+ outgoing.end();
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var getRequestListener = (fetchCallback, options = {}) => {
+ const autoCleanupIncoming = options.autoCleanupIncoming ?? true;
+ if (options.overrideGlobalObjects !== false && global.Request !== Request) {
+ Object.defineProperty(global, "Request", {
+ value: Request
+ });
+ Object.defineProperty(global, "Response", {
+ value: Response2
+ });
+ }
+ return async (incoming, outgoing) => {
+ let res, req;
+ try {
+ req = newRequest(incoming, options.hostname);
+ let incomingEnded = !autoCleanupIncoming || incoming.method === "GET" || incoming.method === "HEAD";
+ if (!incomingEnded) {
+ ;
+ incoming[wrapBodyStream] = true;
+ incoming.on("end", () => {
+ incomingEnded = true;
+ });
+ if (incoming instanceof import_node_http22.Http2ServerRequest) {
+ ;
+ outgoing[outgoingEnded] = () => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ };
+ }
+ outgoing.on("finish", () => {
+ if (!incomingEnded) {
+ drainIncoming(incoming);
+ }
+ });
+ }
+ outgoing.on("close", () => {
+ const abortController = req[abortControllerKey];
+ if (abortController) {
+ if (incoming.errored) {
+ req[abortControllerKey].abort(incoming.errored.toString());
+ } else if (!outgoing.writableFinished) {
+ req[abortControllerKey].abort("Client connection prematurely closed.");
+ }
+ }
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ });
+ res = fetchCallback(req, { incoming, outgoing });
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ } catch (e) {
+ if (!res) {
+ if (options.errorHandler) {
+ res = await options.errorHandler(req ? e : toRequestError(e));
+ if (!res) {
+ return;
+ }
+ } else if (!req) {
+ res = handleRequestError();
+ } else {
+ res = handleFetchError(e);
+ }
+ } else {
+ return handleResponseError(e, outgoing);
+ }
+ }
+ try {
+ return await responseViaResponseObject(res, outgoing, options);
+ } catch (e) {
+ return handleResponseError(e, outgoing);
+ }
+ };
+};
+
+// src/server.ts
+var createAdaptorServer = (options) => {
+ const fetchCallback = options.fetch;
+ const requestListener = getRequestListener(fetchCallback, {
+ hostname: options.hostname,
+ overrideGlobalObjects: options.overrideGlobalObjects,
+ autoCleanupIncoming: options.autoCleanupIncoming
+ });
+ const createServer = options.createServer || import_node_http.createServer;
+ const server = createServer(options.serverOptions || {}, requestListener);
+ return server;
+};
+var serve = (options, listeningListener) => {
+ const server = createAdaptorServer(options);
+ server.listen(options?.port ?? 3e3, options.hostname, () => {
+ const serverInfo = server.address();
+ listeningListener && listeningListener(serverInfo);
+ });
+ return server;
+};
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ createAdaptorServer,
+ serve
+});
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/server.mjs b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/server.mjs
new file mode 100644
index 0000000..252b2d9
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/server.mjs
@@ -0,0 +1,660 @@
+// src/server.ts
+import { createServer as createServerHTTP } from "http";
+
+// src/listener.ts
+import { Http2ServerRequest as Http2ServerRequest2, constants as h2constants } from "http2";
+
+// src/request.ts
+import { Http2ServerRequest } from "http2";
+import { Readable } from "stream";
+var RequestError = class extends Error {
+ constructor(message, options) {
+ super(message, options);
+ this.name = "RequestError";
+ }
+};
+var toRequestError = (e) => {
+ if (e instanceof RequestError) {
+ return e;
+ }
+ return new RequestError(e.message, { cause: e });
+};
+var GlobalRequest = global.Request;
+var Request = class extends GlobalRequest {
+ constructor(input, options) {
+ if (typeof input === "object" && getRequestCache in input) {
+ input = input[getRequestCache]();
+ }
+ if (typeof options?.body?.getReader !== "undefined") {
+ ;
+ options.duplex ??= "half";
+ }
+ super(input, options);
+ }
+};
+var newHeadersFromIncoming = (incoming) => {
+ const headerRecord = [];
+ const rawHeaders = incoming.rawHeaders;
+ for (let i = 0; i < rawHeaders.length; i += 2) {
+ const { [i]: key, [i + 1]: value } = rawHeaders;
+ if (key.charCodeAt(0) !== /*:*/
+ 58) {
+ headerRecord.push([key, value]);
+ }
+ }
+ return new Headers(headerRecord);
+};
+var wrapBodyStream = Symbol("wrapBodyStream");
+var newRequestFromIncoming = (method, url, headers, incoming, abortController) => {
+ const init = {
+ method,
+ headers,
+ signal: abortController.signal
+ };
+ if (method === "TRACE") {
+ init.method = "GET";
+ const req = new Request(url, init);
+ Object.defineProperty(req, "method", {
+ get() {
+ return "TRACE";
+ }
+ });
+ return req;
+ }
+ if (!(method === "GET" || method === "HEAD")) {
+ if ("rawBody" in incoming && incoming.rawBody instanceof Buffer) {
+ init.body = new ReadableStream({
+ start(controller) {
+ controller.enqueue(incoming.rawBody);
+ controller.close();
+ }
+ });
+ } else if (incoming[wrapBodyStream]) {
+ let reader;
+ init.body = new ReadableStream({
+ async pull(controller) {
+ try {
+ reader ||= Readable.toWeb(incoming).getReader();
+ const { done, value } = await reader.read();
+ if (done) {
+ controller.close();
+ } else {
+ controller.enqueue(value);
+ }
+ } catch (error) {
+ controller.error(error);
+ }
+ }
+ });
+ } else {
+ init.body = Readable.toWeb(incoming);
+ }
+ }
+ return new Request(url, init);
+};
+var getRequestCache = Symbol("getRequestCache");
+var requestCache = Symbol("requestCache");
+var incomingKey = Symbol("incomingKey");
+var urlKey = Symbol("urlKey");
+var headersKey = Symbol("headersKey");
+var abortControllerKey = Symbol("abortControllerKey");
+var getAbortController = Symbol("getAbortController");
+var requestPrototype = {
+ get method() {
+ return this[incomingKey].method || "GET";
+ },
+ get url() {
+ return this[urlKey];
+ },
+ get headers() {
+ return this[headersKey] ||= newHeadersFromIncoming(this[incomingKey]);
+ },
+ [getAbortController]() {
+ this[getRequestCache]();
+ return this[abortControllerKey];
+ },
+ [getRequestCache]() {
+ this[abortControllerKey] ||= new AbortController();
+ return this[requestCache] ||= newRequestFromIncoming(
+ this.method,
+ this[urlKey],
+ this.headers,
+ this[incomingKey],
+ this[abortControllerKey]
+ );
+ }
+};
+[
+ "body",
+ "bodyUsed",
+ "cache",
+ "credentials",
+ "destination",
+ "integrity",
+ "mode",
+ "redirect",
+ "referrer",
+ "referrerPolicy",
+ "signal",
+ "keepalive"
+].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ get() {
+ return this[getRequestCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ value: function() {
+ return this[getRequestCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ method: this.method,
+ url: this.url,
+ headers: this.headers,
+ nativeRequest: this[requestCache]
+ };
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(requestPrototype, Request.prototype);
+var newRequest = (incoming, defaultHostname) => {
+ const req = Object.create(requestPrototype);
+ req[incomingKey] = incoming;
+ const incomingUrl = incoming.url || "";
+ if (incomingUrl[0] !== "/" && // short-circuit for performance. most requests are relative URL.
+ (incomingUrl.startsWith("http://") || incomingUrl.startsWith("https://"))) {
+ if (incoming instanceof Http2ServerRequest) {
+ throw new RequestError("Absolute URL for :path is not allowed in HTTP/2");
+ }
+ try {
+ const url2 = new URL(incomingUrl);
+ req[urlKey] = url2.href;
+ } catch (e) {
+ throw new RequestError("Invalid absolute URL", { cause: e });
+ }
+ return req;
+ }
+ const host = (incoming instanceof Http2ServerRequest ? incoming.authority : incoming.headers.host) || defaultHostname;
+ if (!host) {
+ throw new RequestError("Missing host header");
+ }
+ let scheme;
+ if (incoming instanceof Http2ServerRequest) {
+ scheme = incoming.scheme;
+ if (!(scheme === "http" || scheme === "https")) {
+ throw new RequestError("Unsupported scheme");
+ }
+ } else {
+ scheme = incoming.socket && incoming.socket.encrypted ? "https" : "http";
+ }
+ const url = new URL(`${scheme}://${host}${incomingUrl}`);
+ if (url.hostname.length !== host.length && url.hostname !== host.replace(/:\d+$/, "")) {
+ throw new RequestError("Invalid host header");
+ }
+ req[urlKey] = url.href;
+ return req;
+};
+
+// src/response.ts
+var responseCache = Symbol("responseCache");
+var getResponseCache = Symbol("getResponseCache");
+var cacheKey = Symbol("cache");
+var GlobalResponse = global.Response;
+var Response2 = class _Response {
+ #body;
+ #init;
+ [getResponseCache]() {
+ delete this[cacheKey];
+ return this[responseCache] ||= new GlobalResponse(this.#body, this.#init);
+ }
+ constructor(body, init) {
+ let headers;
+ this.#body = body;
+ if (init instanceof _Response) {
+ const cachedGlobalResponse = init[responseCache];
+ if (cachedGlobalResponse) {
+ this.#init = cachedGlobalResponse;
+ this[getResponseCache]();
+ return;
+ } else {
+ this.#init = init.#init;
+ headers = new Headers(init.#init.headers);
+ }
+ } else {
+ this.#init = init;
+ }
+ if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
+ ;
+ this[cacheKey] = [init?.status || 200, body, headers || init?.headers];
+ }
+ }
+ get headers() {
+ const cache = this[cacheKey];
+ if (cache) {
+ if (!(cache[2] instanceof Headers)) {
+ cache[2] = new Headers(
+ cache[2] || { "content-type": "text/plain; charset=UTF-8" }
+ );
+ }
+ return cache[2];
+ }
+ return this[getResponseCache]().headers;
+ }
+ get status() {
+ return this[cacheKey]?.[0] ?? this[getResponseCache]().status;
+ }
+ get ok() {
+ const status = this.status;
+ return status >= 200 && status < 300;
+ }
+};
+["body", "bodyUsed", "redirected", "statusText", "trailers", "type", "url"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ get() {
+ return this[getResponseCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ value: function() {
+ return this[getResponseCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ status: this.status,
+ headers: this.headers,
+ ok: this.ok,
+ nativeResponse: this[responseCache]
+ };
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(Response2, GlobalResponse);
+Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
+
+// src/utils.ts
+async function readWithoutBlocking(readPromise) {
+ return Promise.race([readPromise, Promise.resolve().then(() => Promise.resolve(void 0))]);
+}
+function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) {
+ const cancel = (error) => {
+ reader.cancel(error).catch(() => {
+ });
+ };
+ writable.on("close", cancel);
+ writable.on("error", cancel);
+ (currentReadPromise ?? reader.read()).then(flow, handleStreamError);
+ return reader.closed.finally(() => {
+ writable.off("close", cancel);
+ writable.off("error", cancel);
+ });
+ function handleStreamError(error) {
+ if (error) {
+ writable.destroy(error);
+ }
+ }
+ function onDrain() {
+ reader.read().then(flow, handleStreamError);
+ }
+ function flow({ done, value }) {
+ try {
+ if (done) {
+ writable.end();
+ } else if (!writable.write(value)) {
+ writable.once("drain", onDrain);
+ } else {
+ return reader.read().then(flow, handleStreamError);
+ }
+ } catch (e) {
+ handleStreamError(e);
+ }
+ }
+}
+function writeFromReadableStream(stream, writable) {
+ if (stream.locked) {
+ throw new TypeError("ReadableStream is locked.");
+ } else if (writable.destroyed) {
+ return;
+ }
+ return writeFromReadableStreamDefaultReader(stream.getReader(), writable);
+}
+var buildOutgoingHttpHeaders = (headers) => {
+ const res = {};
+ if (!(headers instanceof Headers)) {
+ headers = new Headers(headers ?? void 0);
+ }
+ const cookies = [];
+ for (const [k, v] of headers) {
+ if (k === "set-cookie") {
+ cookies.push(v);
+ } else {
+ res[k] = v;
+ }
+ }
+ if (cookies.length > 0) {
+ res["set-cookie"] = cookies;
+ }
+ res["content-type"] ??= "text/plain; charset=UTF-8";
+ return res;
+};
+
+// src/utils/response/constants.ts
+var X_ALREADY_SENT = "x-hono-already-sent";
+
+// src/globals.ts
+import crypto from "crypto";
+if (typeof global.crypto === "undefined") {
+ global.crypto = crypto;
+}
+
+// src/listener.ts
+var outgoingEnded = Symbol("outgoingEnded");
+var incomingDraining = Symbol("incomingDraining");
+var DRAIN_TIMEOUT_MS = 500;
+var MAX_DRAIN_BYTES = 64 * 1024 * 1024;
+var drainIncoming = (incoming) => {
+ const incomingWithDrainState = incoming;
+ if (incoming.destroyed || incomingWithDrainState[incomingDraining]) {
+ return;
+ }
+ incomingWithDrainState[incomingDraining] = true;
+ if (incoming instanceof Http2ServerRequest2) {
+ try {
+ ;
+ incoming.stream?.close?.(h2constants.NGHTTP2_NO_ERROR);
+ } catch {
+ }
+ return;
+ }
+ let bytesRead = 0;
+ const cleanup = () => {
+ clearTimeout(timer);
+ incoming.off("data", onData);
+ incoming.off("end", cleanup);
+ incoming.off("error", cleanup);
+ };
+ const forceClose = () => {
+ cleanup();
+ const socket = incoming.socket;
+ if (socket && !socket.destroyed) {
+ socket.destroySoon();
+ }
+ };
+ const timer = setTimeout(forceClose, DRAIN_TIMEOUT_MS);
+ timer.unref?.();
+ const onData = (chunk) => {
+ bytesRead += chunk.length;
+ if (bytesRead > MAX_DRAIN_BYTES) {
+ forceClose();
+ }
+ };
+ incoming.on("data", onData);
+ incoming.on("end", cleanup);
+ incoming.on("error", cleanup);
+ incoming.resume();
+};
+var handleRequestError = () => new Response(null, {
+ status: 400
+});
+var handleFetchError = (e) => new Response(null, {
+ status: e instanceof Error && (e.name === "TimeoutError" || e.constructor.name === "TimeoutError") ? 504 : 500
+});
+var handleResponseError = (e, outgoing) => {
+ const err = e instanceof Error ? e : new Error("unknown error", { cause: e });
+ if (err.code === "ERR_STREAM_PREMATURE_CLOSE") {
+ console.info("The user aborted a request.");
+ } else {
+ console.error(e);
+ if (!outgoing.headersSent) {
+ outgoing.writeHead(500, { "Content-Type": "text/plain" });
+ }
+ outgoing.end(`Error: ${err.message}`);
+ outgoing.destroy(err);
+ }
+};
+var flushHeaders = (outgoing) => {
+ if ("flushHeaders" in outgoing && outgoing.writable) {
+ outgoing.flushHeaders();
+ }
+};
+var responseViaCache = async (res, outgoing) => {
+ let [status, body, header] = res[cacheKey];
+ let hasContentLength = false;
+ if (!header) {
+ header = { "content-type": "text/plain; charset=UTF-8" };
+ } else if (header instanceof Headers) {
+ hasContentLength = header.has("content-length");
+ header = buildOutgoingHttpHeaders(header);
+ } else if (Array.isArray(header)) {
+ const headerObj = new Headers(header);
+ hasContentLength = headerObj.has("content-length");
+ header = buildOutgoingHttpHeaders(headerObj);
+ } else {
+ for (const key in header) {
+ if (key.length === 14 && key.toLowerCase() === "content-length") {
+ hasContentLength = true;
+ break;
+ }
+ }
+ }
+ if (!hasContentLength) {
+ if (typeof body === "string") {
+ header["Content-Length"] = Buffer.byteLength(body);
+ } else if (body instanceof Uint8Array) {
+ header["Content-Length"] = body.byteLength;
+ } else if (body instanceof Blob) {
+ header["Content-Length"] = body.size;
+ }
+ }
+ outgoing.writeHead(status, header);
+ if (typeof body === "string" || body instanceof Uint8Array) {
+ outgoing.end(body);
+ } else if (body instanceof Blob) {
+ outgoing.end(new Uint8Array(await body.arrayBuffer()));
+ } else {
+ flushHeaders(outgoing);
+ await writeFromReadableStream(body, outgoing)?.catch(
+ (e) => handleResponseError(e, outgoing)
+ );
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var isPromise = (res) => typeof res.then === "function";
+var responseViaResponseObject = async (res, outgoing, options = {}) => {
+ if (isPromise(res)) {
+ if (options.errorHandler) {
+ try {
+ res = await res;
+ } catch (err) {
+ const errRes = await options.errorHandler(err);
+ if (!errRes) {
+ return;
+ }
+ res = errRes;
+ }
+ } else {
+ res = await res.catch(handleFetchError);
+ }
+ }
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ const resHeaderRecord = buildOutgoingHttpHeaders(res.headers);
+ if (res.body) {
+ const reader = res.body.getReader();
+ const values = [];
+ let done = false;
+ let currentReadPromise = void 0;
+ if (resHeaderRecord["transfer-encoding"] !== "chunked") {
+ let maxReadCount = 2;
+ for (let i = 0; i < maxReadCount; i++) {
+ currentReadPromise ||= reader.read();
+ const chunk = await readWithoutBlocking(currentReadPromise).catch((e) => {
+ console.error(e);
+ done = true;
+ });
+ if (!chunk) {
+ if (i === 1) {
+ await new Promise((resolve) => setTimeout(resolve));
+ maxReadCount = 3;
+ continue;
+ }
+ break;
+ }
+ currentReadPromise = void 0;
+ if (chunk.value) {
+ values.push(chunk.value);
+ }
+ if (chunk.done) {
+ done = true;
+ break;
+ }
+ }
+ if (done && !("content-length" in resHeaderRecord)) {
+ resHeaderRecord["content-length"] = values.reduce((acc, value) => acc + value.length, 0);
+ }
+ }
+ outgoing.writeHead(res.status, resHeaderRecord);
+ values.forEach((value) => {
+ ;
+ outgoing.write(value);
+ });
+ if (done) {
+ outgoing.end();
+ } else {
+ if (values.length === 0) {
+ flushHeaders(outgoing);
+ }
+ await writeFromReadableStreamDefaultReader(reader, outgoing, currentReadPromise);
+ }
+ } else if (resHeaderRecord[X_ALREADY_SENT]) {
+ } else {
+ outgoing.writeHead(res.status, resHeaderRecord);
+ outgoing.end();
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var getRequestListener = (fetchCallback, options = {}) => {
+ const autoCleanupIncoming = options.autoCleanupIncoming ?? true;
+ if (options.overrideGlobalObjects !== false && global.Request !== Request) {
+ Object.defineProperty(global, "Request", {
+ value: Request
+ });
+ Object.defineProperty(global, "Response", {
+ value: Response2
+ });
+ }
+ return async (incoming, outgoing) => {
+ let res, req;
+ try {
+ req = newRequest(incoming, options.hostname);
+ let incomingEnded = !autoCleanupIncoming || incoming.method === "GET" || incoming.method === "HEAD";
+ if (!incomingEnded) {
+ ;
+ incoming[wrapBodyStream] = true;
+ incoming.on("end", () => {
+ incomingEnded = true;
+ });
+ if (incoming instanceof Http2ServerRequest2) {
+ ;
+ outgoing[outgoingEnded] = () => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ };
+ }
+ outgoing.on("finish", () => {
+ if (!incomingEnded) {
+ drainIncoming(incoming);
+ }
+ });
+ }
+ outgoing.on("close", () => {
+ const abortController = req[abortControllerKey];
+ if (abortController) {
+ if (incoming.errored) {
+ req[abortControllerKey].abort(incoming.errored.toString());
+ } else if (!outgoing.writableFinished) {
+ req[abortControllerKey].abort("Client connection prematurely closed.");
+ }
+ }
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ });
+ res = fetchCallback(req, { incoming, outgoing });
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ } catch (e) {
+ if (!res) {
+ if (options.errorHandler) {
+ res = await options.errorHandler(req ? e : toRequestError(e));
+ if (!res) {
+ return;
+ }
+ } else if (!req) {
+ res = handleRequestError();
+ } else {
+ res = handleFetchError(e);
+ }
+ } else {
+ return handleResponseError(e, outgoing);
+ }
+ }
+ try {
+ return await responseViaResponseObject(res, outgoing, options);
+ } catch (e) {
+ return handleResponseError(e, outgoing);
+ }
+ };
+};
+
+// src/server.ts
+var createAdaptorServer = (options) => {
+ const fetchCallback = options.fetch;
+ const requestListener = getRequestListener(fetchCallback, {
+ hostname: options.hostname,
+ overrideGlobalObjects: options.overrideGlobalObjects,
+ autoCleanupIncoming: options.autoCleanupIncoming
+ });
+ const createServer = options.createServer || createServerHTTP;
+ const server = createServer(options.serverOptions || {}, requestListener);
+ return server;
+};
+var serve = (options, listeningListener) => {
+ const server = createAdaptorServer(options);
+ server.listen(options?.port ?? 3e3, options.hostname, () => {
+ const serverInfo = server.address();
+ listeningListener && listeningListener(serverInfo);
+ });
+ return server;
+};
+export {
+ createAdaptorServer,
+ serve
+};
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/types.d.mts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/types.d.mts
new file mode 100644
index 0000000..c258f6a
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/types.d.mts
@@ -0,0 +1,44 @@
+import { IncomingMessage, ServerResponse, ServerOptions as ServerOptions$1, createServer, Server } from 'node:http';
+import { Http2ServerRequest, Http2ServerResponse, ServerOptions as ServerOptions$3, createServer as createServer$2, SecureServerOptions, createSecureServer, Http2Server, Http2SecureServer } from 'node:http2';
+import { ServerOptions as ServerOptions$2, createServer as createServer$1 } from 'node:https';
+
+type HttpBindings = {
+ incoming: IncomingMessage;
+ outgoing: ServerResponse;
+};
+type Http2Bindings = {
+ incoming: Http2ServerRequest;
+ outgoing: Http2ServerResponse;
+};
+type FetchCallback = (request: Request, env: HttpBindings | Http2Bindings) => Promise | unknown;
+type NextHandlerOption = {
+ fetch: FetchCallback;
+};
+type ServerType = Server | Http2Server | Http2SecureServer;
+type createHttpOptions = {
+ serverOptions?: ServerOptions$1;
+ createServer?: typeof createServer;
+};
+type createHttpsOptions = {
+ serverOptions?: ServerOptions$2;
+ createServer?: typeof createServer$1;
+};
+type createHttp2Options = {
+ serverOptions?: ServerOptions$3;
+ createServer?: typeof createServer$2;
+};
+type createSecureHttp2Options = {
+ serverOptions?: SecureServerOptions;
+ createServer?: typeof createSecureServer;
+};
+type ServerOptions = createHttpOptions | createHttpsOptions | createHttp2Options | createSecureHttp2Options;
+type Options = {
+ fetch: FetchCallback;
+ overrideGlobalObjects?: boolean;
+ autoCleanupIncoming?: boolean;
+ port?: number;
+ hostname?: string;
+} & ServerOptions;
+type CustomErrorHandler = (err: unknown) => void | Response | Promise;
+
+export type { CustomErrorHandler, FetchCallback, Http2Bindings, HttpBindings, NextHandlerOption, Options, ServerOptions, ServerType };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/types.d.ts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/types.d.ts
new file mode 100644
index 0000000..c258f6a
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/types.d.ts
@@ -0,0 +1,44 @@
+import { IncomingMessage, ServerResponse, ServerOptions as ServerOptions$1, createServer, Server } from 'node:http';
+import { Http2ServerRequest, Http2ServerResponse, ServerOptions as ServerOptions$3, createServer as createServer$2, SecureServerOptions, createSecureServer, Http2Server, Http2SecureServer } from 'node:http2';
+import { ServerOptions as ServerOptions$2, createServer as createServer$1 } from 'node:https';
+
+type HttpBindings = {
+ incoming: IncomingMessage;
+ outgoing: ServerResponse;
+};
+type Http2Bindings = {
+ incoming: Http2ServerRequest;
+ outgoing: Http2ServerResponse;
+};
+type FetchCallback = (request: Request, env: HttpBindings | Http2Bindings) => Promise | unknown;
+type NextHandlerOption = {
+ fetch: FetchCallback;
+};
+type ServerType = Server | Http2Server | Http2SecureServer;
+type createHttpOptions = {
+ serverOptions?: ServerOptions$1;
+ createServer?: typeof createServer;
+};
+type createHttpsOptions = {
+ serverOptions?: ServerOptions$2;
+ createServer?: typeof createServer$1;
+};
+type createHttp2Options = {
+ serverOptions?: ServerOptions$3;
+ createServer?: typeof createServer$2;
+};
+type createSecureHttp2Options = {
+ serverOptions?: SecureServerOptions;
+ createServer?: typeof createSecureServer;
+};
+type ServerOptions = createHttpOptions | createHttpsOptions | createHttp2Options | createSecureHttp2Options;
+type Options = {
+ fetch: FetchCallback;
+ overrideGlobalObjects?: boolean;
+ autoCleanupIncoming?: boolean;
+ port?: number;
+ hostname?: string;
+} & ServerOptions;
+type CustomErrorHandler = (err: unknown) => void | Response | Promise;
+
+export type { CustomErrorHandler, FetchCallback, Http2Bindings, HttpBindings, NextHandlerOption, Options, ServerOptions, ServerType };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/types.js b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/types.js
new file mode 100644
index 0000000..14bbc9e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/types.js
@@ -0,0 +1,18 @@
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/types.ts
+var types_exports = {};
+module.exports = __toCommonJS(types_exports);
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/types.mjs b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/types.mjs
new file mode 100644
index 0000000..e69de29
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils.d.mts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils.d.mts
new file mode 100644
index 0000000..966a2b4
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils.d.mts
@@ -0,0 +1,9 @@
+import { OutgoingHttpHeaders } from 'node:http';
+import { Writable } from 'node:stream';
+
+declare function readWithoutBlocking(readPromise: Promise>): Promise | undefined>;
+declare function writeFromReadableStreamDefaultReader(reader: ReadableStreamDefaultReader, writable: Writable, currentReadPromise?: Promise> | undefined): Promise;
+declare function writeFromReadableStream(stream: ReadableStream, writable: Writable): Promise | undefined;
+declare const buildOutgoingHttpHeaders: (headers: Headers | HeadersInit | null | undefined) => OutgoingHttpHeaders;
+
+export { buildOutgoingHttpHeaders, readWithoutBlocking, writeFromReadableStream, writeFromReadableStreamDefaultReader };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils.d.ts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils.d.ts
new file mode 100644
index 0000000..966a2b4
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils.d.ts
@@ -0,0 +1,9 @@
+import { OutgoingHttpHeaders } from 'node:http';
+import { Writable } from 'node:stream';
+
+declare function readWithoutBlocking(readPromise: Promise>): Promise | undefined>;
+declare function writeFromReadableStreamDefaultReader(reader: ReadableStreamDefaultReader, writable: Writable, currentReadPromise?: Promise> | undefined): Promise;
+declare function writeFromReadableStream(stream: ReadableStream, writable: Writable): Promise | undefined;
+declare const buildOutgoingHttpHeaders: (headers: Headers | HeadersInit | null | undefined) => OutgoingHttpHeaders;
+
+export { buildOutgoingHttpHeaders, readWithoutBlocking, writeFromReadableStream, writeFromReadableStreamDefaultReader };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils.js b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils.js
new file mode 100644
index 0000000..7d416f1
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils.js
@@ -0,0 +1,99 @@
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/utils.ts
+var utils_exports = {};
+__export(utils_exports, {
+ buildOutgoingHttpHeaders: () => buildOutgoingHttpHeaders,
+ readWithoutBlocking: () => readWithoutBlocking,
+ writeFromReadableStream: () => writeFromReadableStream,
+ writeFromReadableStreamDefaultReader: () => writeFromReadableStreamDefaultReader
+});
+module.exports = __toCommonJS(utils_exports);
+async function readWithoutBlocking(readPromise) {
+ return Promise.race([readPromise, Promise.resolve().then(() => Promise.resolve(void 0))]);
+}
+function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) {
+ const cancel = (error) => {
+ reader.cancel(error).catch(() => {
+ });
+ };
+ writable.on("close", cancel);
+ writable.on("error", cancel);
+ (currentReadPromise ?? reader.read()).then(flow, handleStreamError);
+ return reader.closed.finally(() => {
+ writable.off("close", cancel);
+ writable.off("error", cancel);
+ });
+ function handleStreamError(error) {
+ if (error) {
+ writable.destroy(error);
+ }
+ }
+ function onDrain() {
+ reader.read().then(flow, handleStreamError);
+ }
+ function flow({ done, value }) {
+ try {
+ if (done) {
+ writable.end();
+ } else if (!writable.write(value)) {
+ writable.once("drain", onDrain);
+ } else {
+ return reader.read().then(flow, handleStreamError);
+ }
+ } catch (e) {
+ handleStreamError(e);
+ }
+ }
+}
+function writeFromReadableStream(stream, writable) {
+ if (stream.locked) {
+ throw new TypeError("ReadableStream is locked.");
+ } else if (writable.destroyed) {
+ return;
+ }
+ return writeFromReadableStreamDefaultReader(stream.getReader(), writable);
+}
+var buildOutgoingHttpHeaders = (headers) => {
+ const res = {};
+ if (!(headers instanceof Headers)) {
+ headers = new Headers(headers ?? void 0);
+ }
+ const cookies = [];
+ for (const [k, v] of headers) {
+ if (k === "set-cookie") {
+ cookies.push(v);
+ } else {
+ res[k] = v;
+ }
+ }
+ if (cookies.length > 0) {
+ res["set-cookie"] = cookies;
+ }
+ res["content-type"] ??= "text/plain; charset=UTF-8";
+ return res;
+};
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ buildOutgoingHttpHeaders,
+ readWithoutBlocking,
+ writeFromReadableStream,
+ writeFromReadableStreamDefaultReader
+});
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils.mjs b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils.mjs
new file mode 100644
index 0000000..5184acb
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils.mjs
@@ -0,0 +1,71 @@
+// src/utils.ts
+async function readWithoutBlocking(readPromise) {
+ return Promise.race([readPromise, Promise.resolve().then(() => Promise.resolve(void 0))]);
+}
+function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) {
+ const cancel = (error) => {
+ reader.cancel(error).catch(() => {
+ });
+ };
+ writable.on("close", cancel);
+ writable.on("error", cancel);
+ (currentReadPromise ?? reader.read()).then(flow, handleStreamError);
+ return reader.closed.finally(() => {
+ writable.off("close", cancel);
+ writable.off("error", cancel);
+ });
+ function handleStreamError(error) {
+ if (error) {
+ writable.destroy(error);
+ }
+ }
+ function onDrain() {
+ reader.read().then(flow, handleStreamError);
+ }
+ function flow({ done, value }) {
+ try {
+ if (done) {
+ writable.end();
+ } else if (!writable.write(value)) {
+ writable.once("drain", onDrain);
+ } else {
+ return reader.read().then(flow, handleStreamError);
+ }
+ } catch (e) {
+ handleStreamError(e);
+ }
+ }
+}
+function writeFromReadableStream(stream, writable) {
+ if (stream.locked) {
+ throw new TypeError("ReadableStream is locked.");
+ } else if (writable.destroyed) {
+ return;
+ }
+ return writeFromReadableStreamDefaultReader(stream.getReader(), writable);
+}
+var buildOutgoingHttpHeaders = (headers) => {
+ const res = {};
+ if (!(headers instanceof Headers)) {
+ headers = new Headers(headers ?? void 0);
+ }
+ const cookies = [];
+ for (const [k, v] of headers) {
+ if (k === "set-cookie") {
+ cookies.push(v);
+ } else {
+ res[k] = v;
+ }
+ }
+ if (cookies.length > 0) {
+ res["set-cookie"] = cookies;
+ }
+ res["content-type"] ??= "text/plain; charset=UTF-8";
+ return res;
+};
+export {
+ buildOutgoingHttpHeaders,
+ readWithoutBlocking,
+ writeFromReadableStream,
+ writeFromReadableStreamDefaultReader
+};
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response.d.mts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response.d.mts
new file mode 100644
index 0000000..523b753
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response.d.mts
@@ -0,0 +1,3 @@
+declare const RESPONSE_ALREADY_SENT: Response;
+
+export { RESPONSE_ALREADY_SENT };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response.d.ts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response.d.ts
new file mode 100644
index 0000000..523b753
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response.d.ts
@@ -0,0 +1,3 @@
+declare const RESPONSE_ALREADY_SENT: Response;
+
+export { RESPONSE_ALREADY_SENT };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response.js b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response.js
new file mode 100644
index 0000000..6fe007b
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response.js
@@ -0,0 +1,37 @@
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/utils/response.ts
+var response_exports = {};
+__export(response_exports, {
+ RESPONSE_ALREADY_SENT: () => RESPONSE_ALREADY_SENT
+});
+module.exports = __toCommonJS(response_exports);
+
+// src/utils/response/constants.ts
+var X_ALREADY_SENT = "x-hono-already-sent";
+
+// src/utils/response.ts
+var RESPONSE_ALREADY_SENT = new Response(null, {
+ headers: { [X_ALREADY_SENT]: "true" }
+});
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ RESPONSE_ALREADY_SENT
+});
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response.mjs b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response.mjs
new file mode 100644
index 0000000..5d42aaa
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response.mjs
@@ -0,0 +1,10 @@
+// src/utils/response/constants.ts
+var X_ALREADY_SENT = "x-hono-already-sent";
+
+// src/utils/response.ts
+var RESPONSE_ALREADY_SENT = new Response(null, {
+ headers: { [X_ALREADY_SENT]: "true" }
+});
+export {
+ RESPONSE_ALREADY_SENT
+};
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response/constants.d.mts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response/constants.d.mts
new file mode 100644
index 0000000..f09b912
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response/constants.d.mts
@@ -0,0 +1,3 @@
+declare const X_ALREADY_SENT = "x-hono-already-sent";
+
+export { X_ALREADY_SENT };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response/constants.d.ts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response/constants.d.ts
new file mode 100644
index 0000000..f09b912
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response/constants.d.ts
@@ -0,0 +1,3 @@
+declare const X_ALREADY_SENT = "x-hono-already-sent";
+
+export { X_ALREADY_SENT };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response/constants.js b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response/constants.js
new file mode 100644
index 0000000..615e7c5
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response/constants.js
@@ -0,0 +1,30 @@
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/utils/response/constants.ts
+var constants_exports = {};
+__export(constants_exports, {
+ X_ALREADY_SENT: () => X_ALREADY_SENT
+});
+module.exports = __toCommonJS(constants_exports);
+var X_ALREADY_SENT = "x-hono-already-sent";
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ X_ALREADY_SENT
+});
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response/constants.mjs b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response/constants.mjs
new file mode 100644
index 0000000..e6ed45f
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/utils/response/constants.mjs
@@ -0,0 +1,5 @@
+// src/utils/response/constants.ts
+var X_ALREADY_SENT = "x-hono-already-sent";
+export {
+ X_ALREADY_SENT
+};
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/vercel.d.mts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/vercel.d.mts
new file mode 100644
index 0000000..d187c05
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/vercel.d.mts
@@ -0,0 +1,7 @@
+import * as http2 from 'http2';
+import * as http from 'http';
+import { Hono } from 'hono';
+
+declare const handle: (app: Hono) => (incoming: http.IncomingMessage | http2.Http2ServerRequest, outgoing: http.ServerResponse | http2.Http2ServerResponse) => Promise;
+
+export { handle };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/vercel.d.ts b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/vercel.d.ts
new file mode 100644
index 0000000..d187c05
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/vercel.d.ts
@@ -0,0 +1,7 @@
+import * as http2 from 'http2';
+import * as http from 'http';
+import { Hono } from 'hono';
+
+declare const handle: (app: Hono) => (incoming: http.IncomingMessage | http2.Http2ServerRequest, outgoing: http.ServerResponse | http2.Http2ServerResponse) => Promise;
+
+export { handle };
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/vercel.js b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/vercel.js
new file mode 100644
index 0000000..cf8171b
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/vercel.js
@@ -0,0 +1,677 @@
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/vercel.ts
+var vercel_exports = {};
+__export(vercel_exports, {
+ handle: () => handle
+});
+module.exports = __toCommonJS(vercel_exports);
+
+// src/listener.ts
+var import_node_http22 = require("http2");
+
+// src/request.ts
+var import_node_http2 = require("http2");
+var import_node_stream = require("stream");
+var RequestError = class extends Error {
+ constructor(message, options) {
+ super(message, options);
+ this.name = "RequestError";
+ }
+};
+var toRequestError = (e) => {
+ if (e instanceof RequestError) {
+ return e;
+ }
+ return new RequestError(e.message, { cause: e });
+};
+var GlobalRequest = global.Request;
+var Request = class extends GlobalRequest {
+ constructor(input, options) {
+ if (typeof input === "object" && getRequestCache in input) {
+ input = input[getRequestCache]();
+ }
+ if (typeof options?.body?.getReader !== "undefined") {
+ ;
+ options.duplex ??= "half";
+ }
+ super(input, options);
+ }
+};
+var newHeadersFromIncoming = (incoming) => {
+ const headerRecord = [];
+ const rawHeaders = incoming.rawHeaders;
+ for (let i = 0; i < rawHeaders.length; i += 2) {
+ const { [i]: key, [i + 1]: value } = rawHeaders;
+ if (key.charCodeAt(0) !== /*:*/
+ 58) {
+ headerRecord.push([key, value]);
+ }
+ }
+ return new Headers(headerRecord);
+};
+var wrapBodyStream = Symbol("wrapBodyStream");
+var newRequestFromIncoming = (method, url, headers, incoming, abortController) => {
+ const init = {
+ method,
+ headers,
+ signal: abortController.signal
+ };
+ if (method === "TRACE") {
+ init.method = "GET";
+ const req = new Request(url, init);
+ Object.defineProperty(req, "method", {
+ get() {
+ return "TRACE";
+ }
+ });
+ return req;
+ }
+ if (!(method === "GET" || method === "HEAD")) {
+ if ("rawBody" in incoming && incoming.rawBody instanceof Buffer) {
+ init.body = new ReadableStream({
+ start(controller) {
+ controller.enqueue(incoming.rawBody);
+ controller.close();
+ }
+ });
+ } else if (incoming[wrapBodyStream]) {
+ let reader;
+ init.body = new ReadableStream({
+ async pull(controller) {
+ try {
+ reader ||= import_node_stream.Readable.toWeb(incoming).getReader();
+ const { done, value } = await reader.read();
+ if (done) {
+ controller.close();
+ } else {
+ controller.enqueue(value);
+ }
+ } catch (error) {
+ controller.error(error);
+ }
+ }
+ });
+ } else {
+ init.body = import_node_stream.Readable.toWeb(incoming);
+ }
+ }
+ return new Request(url, init);
+};
+var getRequestCache = Symbol("getRequestCache");
+var requestCache = Symbol("requestCache");
+var incomingKey = Symbol("incomingKey");
+var urlKey = Symbol("urlKey");
+var headersKey = Symbol("headersKey");
+var abortControllerKey = Symbol("abortControllerKey");
+var getAbortController = Symbol("getAbortController");
+var requestPrototype = {
+ get method() {
+ return this[incomingKey].method || "GET";
+ },
+ get url() {
+ return this[urlKey];
+ },
+ get headers() {
+ return this[headersKey] ||= newHeadersFromIncoming(this[incomingKey]);
+ },
+ [getAbortController]() {
+ this[getRequestCache]();
+ return this[abortControllerKey];
+ },
+ [getRequestCache]() {
+ this[abortControllerKey] ||= new AbortController();
+ return this[requestCache] ||= newRequestFromIncoming(
+ this.method,
+ this[urlKey],
+ this.headers,
+ this[incomingKey],
+ this[abortControllerKey]
+ );
+ }
+};
+[
+ "body",
+ "bodyUsed",
+ "cache",
+ "credentials",
+ "destination",
+ "integrity",
+ "mode",
+ "redirect",
+ "referrer",
+ "referrerPolicy",
+ "signal",
+ "keepalive"
+].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ get() {
+ return this[getRequestCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ value: function() {
+ return this[getRequestCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ method: this.method,
+ url: this.url,
+ headers: this.headers,
+ nativeRequest: this[requestCache]
+ };
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(requestPrototype, Request.prototype);
+var newRequest = (incoming, defaultHostname) => {
+ const req = Object.create(requestPrototype);
+ req[incomingKey] = incoming;
+ const incomingUrl = incoming.url || "";
+ if (incomingUrl[0] !== "/" && // short-circuit for performance. most requests are relative URL.
+ (incomingUrl.startsWith("http://") || incomingUrl.startsWith("https://"))) {
+ if (incoming instanceof import_node_http2.Http2ServerRequest) {
+ throw new RequestError("Absolute URL for :path is not allowed in HTTP/2");
+ }
+ try {
+ const url2 = new URL(incomingUrl);
+ req[urlKey] = url2.href;
+ } catch (e) {
+ throw new RequestError("Invalid absolute URL", { cause: e });
+ }
+ return req;
+ }
+ const host = (incoming instanceof import_node_http2.Http2ServerRequest ? incoming.authority : incoming.headers.host) || defaultHostname;
+ if (!host) {
+ throw new RequestError("Missing host header");
+ }
+ let scheme;
+ if (incoming instanceof import_node_http2.Http2ServerRequest) {
+ scheme = incoming.scheme;
+ if (!(scheme === "http" || scheme === "https")) {
+ throw new RequestError("Unsupported scheme");
+ }
+ } else {
+ scheme = incoming.socket && incoming.socket.encrypted ? "https" : "http";
+ }
+ const url = new URL(`${scheme}://${host}${incomingUrl}`);
+ if (url.hostname.length !== host.length && url.hostname !== host.replace(/:\d+$/, "")) {
+ throw new RequestError("Invalid host header");
+ }
+ req[urlKey] = url.href;
+ return req;
+};
+
+// src/response.ts
+var responseCache = Symbol("responseCache");
+var getResponseCache = Symbol("getResponseCache");
+var cacheKey = Symbol("cache");
+var GlobalResponse = global.Response;
+var Response2 = class _Response {
+ #body;
+ #init;
+ [getResponseCache]() {
+ delete this[cacheKey];
+ return this[responseCache] ||= new GlobalResponse(this.#body, this.#init);
+ }
+ constructor(body, init) {
+ let headers;
+ this.#body = body;
+ if (init instanceof _Response) {
+ const cachedGlobalResponse = init[responseCache];
+ if (cachedGlobalResponse) {
+ this.#init = cachedGlobalResponse;
+ this[getResponseCache]();
+ return;
+ } else {
+ this.#init = init.#init;
+ headers = new Headers(init.#init.headers);
+ }
+ } else {
+ this.#init = init;
+ }
+ if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
+ ;
+ this[cacheKey] = [init?.status || 200, body, headers || init?.headers];
+ }
+ }
+ get headers() {
+ const cache = this[cacheKey];
+ if (cache) {
+ if (!(cache[2] instanceof Headers)) {
+ cache[2] = new Headers(
+ cache[2] || { "content-type": "text/plain; charset=UTF-8" }
+ );
+ }
+ return cache[2];
+ }
+ return this[getResponseCache]().headers;
+ }
+ get status() {
+ return this[cacheKey]?.[0] ?? this[getResponseCache]().status;
+ }
+ get ok() {
+ const status = this.status;
+ return status >= 200 && status < 300;
+ }
+};
+["body", "bodyUsed", "redirected", "statusText", "trailers", "type", "url"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ get() {
+ return this[getResponseCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ value: function() {
+ return this[getResponseCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ status: this.status,
+ headers: this.headers,
+ ok: this.ok,
+ nativeResponse: this[responseCache]
+ };
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(Response2, GlobalResponse);
+Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
+
+// src/utils.ts
+async function readWithoutBlocking(readPromise) {
+ return Promise.race([readPromise, Promise.resolve().then(() => Promise.resolve(void 0))]);
+}
+function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) {
+ const cancel = (error) => {
+ reader.cancel(error).catch(() => {
+ });
+ };
+ writable.on("close", cancel);
+ writable.on("error", cancel);
+ (currentReadPromise ?? reader.read()).then(flow, handleStreamError);
+ return reader.closed.finally(() => {
+ writable.off("close", cancel);
+ writable.off("error", cancel);
+ });
+ function handleStreamError(error) {
+ if (error) {
+ writable.destroy(error);
+ }
+ }
+ function onDrain() {
+ reader.read().then(flow, handleStreamError);
+ }
+ function flow({ done, value }) {
+ try {
+ if (done) {
+ writable.end();
+ } else if (!writable.write(value)) {
+ writable.once("drain", onDrain);
+ } else {
+ return reader.read().then(flow, handleStreamError);
+ }
+ } catch (e) {
+ handleStreamError(e);
+ }
+ }
+}
+function writeFromReadableStream(stream, writable) {
+ if (stream.locked) {
+ throw new TypeError("ReadableStream is locked.");
+ } else if (writable.destroyed) {
+ return;
+ }
+ return writeFromReadableStreamDefaultReader(stream.getReader(), writable);
+}
+var buildOutgoingHttpHeaders = (headers) => {
+ const res = {};
+ if (!(headers instanceof Headers)) {
+ headers = new Headers(headers ?? void 0);
+ }
+ const cookies = [];
+ for (const [k, v] of headers) {
+ if (k === "set-cookie") {
+ cookies.push(v);
+ } else {
+ res[k] = v;
+ }
+ }
+ if (cookies.length > 0) {
+ res["set-cookie"] = cookies;
+ }
+ res["content-type"] ??= "text/plain; charset=UTF-8";
+ return res;
+};
+
+// src/utils/response/constants.ts
+var X_ALREADY_SENT = "x-hono-already-sent";
+
+// src/globals.ts
+var import_node_crypto = __toESM(require("crypto"));
+if (typeof global.crypto === "undefined") {
+ global.crypto = import_node_crypto.default;
+}
+
+// src/listener.ts
+var outgoingEnded = Symbol("outgoingEnded");
+var incomingDraining = Symbol("incomingDraining");
+var DRAIN_TIMEOUT_MS = 500;
+var MAX_DRAIN_BYTES = 64 * 1024 * 1024;
+var drainIncoming = (incoming) => {
+ const incomingWithDrainState = incoming;
+ if (incoming.destroyed || incomingWithDrainState[incomingDraining]) {
+ return;
+ }
+ incomingWithDrainState[incomingDraining] = true;
+ if (incoming instanceof import_node_http22.Http2ServerRequest) {
+ try {
+ ;
+ incoming.stream?.close?.(import_node_http22.constants.NGHTTP2_NO_ERROR);
+ } catch {
+ }
+ return;
+ }
+ let bytesRead = 0;
+ const cleanup = () => {
+ clearTimeout(timer);
+ incoming.off("data", onData);
+ incoming.off("end", cleanup);
+ incoming.off("error", cleanup);
+ };
+ const forceClose = () => {
+ cleanup();
+ const socket = incoming.socket;
+ if (socket && !socket.destroyed) {
+ socket.destroySoon();
+ }
+ };
+ const timer = setTimeout(forceClose, DRAIN_TIMEOUT_MS);
+ timer.unref?.();
+ const onData = (chunk) => {
+ bytesRead += chunk.length;
+ if (bytesRead > MAX_DRAIN_BYTES) {
+ forceClose();
+ }
+ };
+ incoming.on("data", onData);
+ incoming.on("end", cleanup);
+ incoming.on("error", cleanup);
+ incoming.resume();
+};
+var handleRequestError = () => new Response(null, {
+ status: 400
+});
+var handleFetchError = (e) => new Response(null, {
+ status: e instanceof Error && (e.name === "TimeoutError" || e.constructor.name === "TimeoutError") ? 504 : 500
+});
+var handleResponseError = (e, outgoing) => {
+ const err = e instanceof Error ? e : new Error("unknown error", { cause: e });
+ if (err.code === "ERR_STREAM_PREMATURE_CLOSE") {
+ console.info("The user aborted a request.");
+ } else {
+ console.error(e);
+ if (!outgoing.headersSent) {
+ outgoing.writeHead(500, { "Content-Type": "text/plain" });
+ }
+ outgoing.end(`Error: ${err.message}`);
+ outgoing.destroy(err);
+ }
+};
+var flushHeaders = (outgoing) => {
+ if ("flushHeaders" in outgoing && outgoing.writable) {
+ outgoing.flushHeaders();
+ }
+};
+var responseViaCache = async (res, outgoing) => {
+ let [status, body, header] = res[cacheKey];
+ let hasContentLength = false;
+ if (!header) {
+ header = { "content-type": "text/plain; charset=UTF-8" };
+ } else if (header instanceof Headers) {
+ hasContentLength = header.has("content-length");
+ header = buildOutgoingHttpHeaders(header);
+ } else if (Array.isArray(header)) {
+ const headerObj = new Headers(header);
+ hasContentLength = headerObj.has("content-length");
+ header = buildOutgoingHttpHeaders(headerObj);
+ } else {
+ for (const key in header) {
+ if (key.length === 14 && key.toLowerCase() === "content-length") {
+ hasContentLength = true;
+ break;
+ }
+ }
+ }
+ if (!hasContentLength) {
+ if (typeof body === "string") {
+ header["Content-Length"] = Buffer.byteLength(body);
+ } else if (body instanceof Uint8Array) {
+ header["Content-Length"] = body.byteLength;
+ } else if (body instanceof Blob) {
+ header["Content-Length"] = body.size;
+ }
+ }
+ outgoing.writeHead(status, header);
+ if (typeof body === "string" || body instanceof Uint8Array) {
+ outgoing.end(body);
+ } else if (body instanceof Blob) {
+ outgoing.end(new Uint8Array(await body.arrayBuffer()));
+ } else {
+ flushHeaders(outgoing);
+ await writeFromReadableStream(body, outgoing)?.catch(
+ (e) => handleResponseError(e, outgoing)
+ );
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var isPromise = (res) => typeof res.then === "function";
+var responseViaResponseObject = async (res, outgoing, options = {}) => {
+ if (isPromise(res)) {
+ if (options.errorHandler) {
+ try {
+ res = await res;
+ } catch (err) {
+ const errRes = await options.errorHandler(err);
+ if (!errRes) {
+ return;
+ }
+ res = errRes;
+ }
+ } else {
+ res = await res.catch(handleFetchError);
+ }
+ }
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ const resHeaderRecord = buildOutgoingHttpHeaders(res.headers);
+ if (res.body) {
+ const reader = res.body.getReader();
+ const values = [];
+ let done = false;
+ let currentReadPromise = void 0;
+ if (resHeaderRecord["transfer-encoding"] !== "chunked") {
+ let maxReadCount = 2;
+ for (let i = 0; i < maxReadCount; i++) {
+ currentReadPromise ||= reader.read();
+ const chunk = await readWithoutBlocking(currentReadPromise).catch((e) => {
+ console.error(e);
+ done = true;
+ });
+ if (!chunk) {
+ if (i === 1) {
+ await new Promise((resolve) => setTimeout(resolve));
+ maxReadCount = 3;
+ continue;
+ }
+ break;
+ }
+ currentReadPromise = void 0;
+ if (chunk.value) {
+ values.push(chunk.value);
+ }
+ if (chunk.done) {
+ done = true;
+ break;
+ }
+ }
+ if (done && !("content-length" in resHeaderRecord)) {
+ resHeaderRecord["content-length"] = values.reduce((acc, value) => acc + value.length, 0);
+ }
+ }
+ outgoing.writeHead(res.status, resHeaderRecord);
+ values.forEach((value) => {
+ ;
+ outgoing.write(value);
+ });
+ if (done) {
+ outgoing.end();
+ } else {
+ if (values.length === 0) {
+ flushHeaders(outgoing);
+ }
+ await writeFromReadableStreamDefaultReader(reader, outgoing, currentReadPromise);
+ }
+ } else if (resHeaderRecord[X_ALREADY_SENT]) {
+ } else {
+ outgoing.writeHead(res.status, resHeaderRecord);
+ outgoing.end();
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var getRequestListener = (fetchCallback, options = {}) => {
+ const autoCleanupIncoming = options.autoCleanupIncoming ?? true;
+ if (options.overrideGlobalObjects !== false && global.Request !== Request) {
+ Object.defineProperty(global, "Request", {
+ value: Request
+ });
+ Object.defineProperty(global, "Response", {
+ value: Response2
+ });
+ }
+ return async (incoming, outgoing) => {
+ let res, req;
+ try {
+ req = newRequest(incoming, options.hostname);
+ let incomingEnded = !autoCleanupIncoming || incoming.method === "GET" || incoming.method === "HEAD";
+ if (!incomingEnded) {
+ ;
+ incoming[wrapBodyStream] = true;
+ incoming.on("end", () => {
+ incomingEnded = true;
+ });
+ if (incoming instanceof import_node_http22.Http2ServerRequest) {
+ ;
+ outgoing[outgoingEnded] = () => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ };
+ }
+ outgoing.on("finish", () => {
+ if (!incomingEnded) {
+ drainIncoming(incoming);
+ }
+ });
+ }
+ outgoing.on("close", () => {
+ const abortController = req[abortControllerKey];
+ if (abortController) {
+ if (incoming.errored) {
+ req[abortControllerKey].abort(incoming.errored.toString());
+ } else if (!outgoing.writableFinished) {
+ req[abortControllerKey].abort("Client connection prematurely closed.");
+ }
+ }
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ });
+ res = fetchCallback(req, { incoming, outgoing });
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ } catch (e) {
+ if (!res) {
+ if (options.errorHandler) {
+ res = await options.errorHandler(req ? e : toRequestError(e));
+ if (!res) {
+ return;
+ }
+ } else if (!req) {
+ res = handleRequestError();
+ } else {
+ res = handleFetchError(e);
+ }
+ } else {
+ return handleResponseError(e, outgoing);
+ }
+ }
+ try {
+ return await responseViaResponseObject(res, outgoing, options);
+ } catch (e) {
+ return handleResponseError(e, outgoing);
+ }
+ };
+};
+
+// src/vercel.ts
+var handle = (app) => {
+ return getRequestListener(app.fetch);
+};
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ handle
+});
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/dist/vercel.mjs b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/vercel.mjs
new file mode 100644
index 0000000..aafdd30
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/dist/vercel.mjs
@@ -0,0 +1,640 @@
+// src/listener.ts
+import { Http2ServerRequest as Http2ServerRequest2, constants as h2constants } from "http2";
+
+// src/request.ts
+import { Http2ServerRequest } from "http2";
+import { Readable } from "stream";
+var RequestError = class extends Error {
+ constructor(message, options) {
+ super(message, options);
+ this.name = "RequestError";
+ }
+};
+var toRequestError = (e) => {
+ if (e instanceof RequestError) {
+ return e;
+ }
+ return new RequestError(e.message, { cause: e });
+};
+var GlobalRequest = global.Request;
+var Request = class extends GlobalRequest {
+ constructor(input, options) {
+ if (typeof input === "object" && getRequestCache in input) {
+ input = input[getRequestCache]();
+ }
+ if (typeof options?.body?.getReader !== "undefined") {
+ ;
+ options.duplex ??= "half";
+ }
+ super(input, options);
+ }
+};
+var newHeadersFromIncoming = (incoming) => {
+ const headerRecord = [];
+ const rawHeaders = incoming.rawHeaders;
+ for (let i = 0; i < rawHeaders.length; i += 2) {
+ const { [i]: key, [i + 1]: value } = rawHeaders;
+ if (key.charCodeAt(0) !== /*:*/
+ 58) {
+ headerRecord.push([key, value]);
+ }
+ }
+ return new Headers(headerRecord);
+};
+var wrapBodyStream = Symbol("wrapBodyStream");
+var newRequestFromIncoming = (method, url, headers, incoming, abortController) => {
+ const init = {
+ method,
+ headers,
+ signal: abortController.signal
+ };
+ if (method === "TRACE") {
+ init.method = "GET";
+ const req = new Request(url, init);
+ Object.defineProperty(req, "method", {
+ get() {
+ return "TRACE";
+ }
+ });
+ return req;
+ }
+ if (!(method === "GET" || method === "HEAD")) {
+ if ("rawBody" in incoming && incoming.rawBody instanceof Buffer) {
+ init.body = new ReadableStream({
+ start(controller) {
+ controller.enqueue(incoming.rawBody);
+ controller.close();
+ }
+ });
+ } else if (incoming[wrapBodyStream]) {
+ let reader;
+ init.body = new ReadableStream({
+ async pull(controller) {
+ try {
+ reader ||= Readable.toWeb(incoming).getReader();
+ const { done, value } = await reader.read();
+ if (done) {
+ controller.close();
+ } else {
+ controller.enqueue(value);
+ }
+ } catch (error) {
+ controller.error(error);
+ }
+ }
+ });
+ } else {
+ init.body = Readable.toWeb(incoming);
+ }
+ }
+ return new Request(url, init);
+};
+var getRequestCache = Symbol("getRequestCache");
+var requestCache = Symbol("requestCache");
+var incomingKey = Symbol("incomingKey");
+var urlKey = Symbol("urlKey");
+var headersKey = Symbol("headersKey");
+var abortControllerKey = Symbol("abortControllerKey");
+var getAbortController = Symbol("getAbortController");
+var requestPrototype = {
+ get method() {
+ return this[incomingKey].method || "GET";
+ },
+ get url() {
+ return this[urlKey];
+ },
+ get headers() {
+ return this[headersKey] ||= newHeadersFromIncoming(this[incomingKey]);
+ },
+ [getAbortController]() {
+ this[getRequestCache]();
+ return this[abortControllerKey];
+ },
+ [getRequestCache]() {
+ this[abortControllerKey] ||= new AbortController();
+ return this[requestCache] ||= newRequestFromIncoming(
+ this.method,
+ this[urlKey],
+ this.headers,
+ this[incomingKey],
+ this[abortControllerKey]
+ );
+ }
+};
+[
+ "body",
+ "bodyUsed",
+ "cache",
+ "credentials",
+ "destination",
+ "integrity",
+ "mode",
+ "redirect",
+ "referrer",
+ "referrerPolicy",
+ "signal",
+ "keepalive"
+].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ get() {
+ return this[getRequestCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(requestPrototype, k, {
+ value: function() {
+ return this[getRequestCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ method: this.method,
+ url: this.url,
+ headers: this.headers,
+ nativeRequest: this[requestCache]
+ };
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(requestPrototype, Request.prototype);
+var newRequest = (incoming, defaultHostname) => {
+ const req = Object.create(requestPrototype);
+ req[incomingKey] = incoming;
+ const incomingUrl = incoming.url || "";
+ if (incomingUrl[0] !== "/" && // short-circuit for performance. most requests are relative URL.
+ (incomingUrl.startsWith("http://") || incomingUrl.startsWith("https://"))) {
+ if (incoming instanceof Http2ServerRequest) {
+ throw new RequestError("Absolute URL for :path is not allowed in HTTP/2");
+ }
+ try {
+ const url2 = new URL(incomingUrl);
+ req[urlKey] = url2.href;
+ } catch (e) {
+ throw new RequestError("Invalid absolute URL", { cause: e });
+ }
+ return req;
+ }
+ const host = (incoming instanceof Http2ServerRequest ? incoming.authority : incoming.headers.host) || defaultHostname;
+ if (!host) {
+ throw new RequestError("Missing host header");
+ }
+ let scheme;
+ if (incoming instanceof Http2ServerRequest) {
+ scheme = incoming.scheme;
+ if (!(scheme === "http" || scheme === "https")) {
+ throw new RequestError("Unsupported scheme");
+ }
+ } else {
+ scheme = incoming.socket && incoming.socket.encrypted ? "https" : "http";
+ }
+ const url = new URL(`${scheme}://${host}${incomingUrl}`);
+ if (url.hostname.length !== host.length && url.hostname !== host.replace(/:\d+$/, "")) {
+ throw new RequestError("Invalid host header");
+ }
+ req[urlKey] = url.href;
+ return req;
+};
+
+// src/response.ts
+var responseCache = Symbol("responseCache");
+var getResponseCache = Symbol("getResponseCache");
+var cacheKey = Symbol("cache");
+var GlobalResponse = global.Response;
+var Response2 = class _Response {
+ #body;
+ #init;
+ [getResponseCache]() {
+ delete this[cacheKey];
+ return this[responseCache] ||= new GlobalResponse(this.#body, this.#init);
+ }
+ constructor(body, init) {
+ let headers;
+ this.#body = body;
+ if (init instanceof _Response) {
+ const cachedGlobalResponse = init[responseCache];
+ if (cachedGlobalResponse) {
+ this.#init = cachedGlobalResponse;
+ this[getResponseCache]();
+ return;
+ } else {
+ this.#init = init.#init;
+ headers = new Headers(init.#init.headers);
+ }
+ } else {
+ this.#init = init;
+ }
+ if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
+ ;
+ this[cacheKey] = [init?.status || 200, body, headers || init?.headers];
+ }
+ }
+ get headers() {
+ const cache = this[cacheKey];
+ if (cache) {
+ if (!(cache[2] instanceof Headers)) {
+ cache[2] = new Headers(
+ cache[2] || { "content-type": "text/plain; charset=UTF-8" }
+ );
+ }
+ return cache[2];
+ }
+ return this[getResponseCache]().headers;
+ }
+ get status() {
+ return this[cacheKey]?.[0] ?? this[getResponseCache]().status;
+ }
+ get ok() {
+ const status = this.status;
+ return status >= 200 && status < 300;
+ }
+};
+["body", "bodyUsed", "redirected", "statusText", "trailers", "type", "url"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ get() {
+ return this[getResponseCache]()[k];
+ }
+ });
+});
+["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
+ Object.defineProperty(Response2.prototype, k, {
+ value: function() {
+ return this[getResponseCache]()[k]();
+ }
+ });
+});
+Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
+ value: function(depth, options, inspectFn) {
+ const props = {
+ status: this.status,
+ headers: this.headers,
+ ok: this.ok,
+ nativeResponse: this[responseCache]
+ };
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
+ }
+});
+Object.setPrototypeOf(Response2, GlobalResponse);
+Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
+
+// src/utils.ts
+async function readWithoutBlocking(readPromise) {
+ return Promise.race([readPromise, Promise.resolve().then(() => Promise.resolve(void 0))]);
+}
+function writeFromReadableStreamDefaultReader(reader, writable, currentReadPromise) {
+ const cancel = (error) => {
+ reader.cancel(error).catch(() => {
+ });
+ };
+ writable.on("close", cancel);
+ writable.on("error", cancel);
+ (currentReadPromise ?? reader.read()).then(flow, handleStreamError);
+ return reader.closed.finally(() => {
+ writable.off("close", cancel);
+ writable.off("error", cancel);
+ });
+ function handleStreamError(error) {
+ if (error) {
+ writable.destroy(error);
+ }
+ }
+ function onDrain() {
+ reader.read().then(flow, handleStreamError);
+ }
+ function flow({ done, value }) {
+ try {
+ if (done) {
+ writable.end();
+ } else if (!writable.write(value)) {
+ writable.once("drain", onDrain);
+ } else {
+ return reader.read().then(flow, handleStreamError);
+ }
+ } catch (e) {
+ handleStreamError(e);
+ }
+ }
+}
+function writeFromReadableStream(stream, writable) {
+ if (stream.locked) {
+ throw new TypeError("ReadableStream is locked.");
+ } else if (writable.destroyed) {
+ return;
+ }
+ return writeFromReadableStreamDefaultReader(stream.getReader(), writable);
+}
+var buildOutgoingHttpHeaders = (headers) => {
+ const res = {};
+ if (!(headers instanceof Headers)) {
+ headers = new Headers(headers ?? void 0);
+ }
+ const cookies = [];
+ for (const [k, v] of headers) {
+ if (k === "set-cookie") {
+ cookies.push(v);
+ } else {
+ res[k] = v;
+ }
+ }
+ if (cookies.length > 0) {
+ res["set-cookie"] = cookies;
+ }
+ res["content-type"] ??= "text/plain; charset=UTF-8";
+ return res;
+};
+
+// src/utils/response/constants.ts
+var X_ALREADY_SENT = "x-hono-already-sent";
+
+// src/globals.ts
+import crypto from "crypto";
+if (typeof global.crypto === "undefined") {
+ global.crypto = crypto;
+}
+
+// src/listener.ts
+var outgoingEnded = Symbol("outgoingEnded");
+var incomingDraining = Symbol("incomingDraining");
+var DRAIN_TIMEOUT_MS = 500;
+var MAX_DRAIN_BYTES = 64 * 1024 * 1024;
+var drainIncoming = (incoming) => {
+ const incomingWithDrainState = incoming;
+ if (incoming.destroyed || incomingWithDrainState[incomingDraining]) {
+ return;
+ }
+ incomingWithDrainState[incomingDraining] = true;
+ if (incoming instanceof Http2ServerRequest2) {
+ try {
+ ;
+ incoming.stream?.close?.(h2constants.NGHTTP2_NO_ERROR);
+ } catch {
+ }
+ return;
+ }
+ let bytesRead = 0;
+ const cleanup = () => {
+ clearTimeout(timer);
+ incoming.off("data", onData);
+ incoming.off("end", cleanup);
+ incoming.off("error", cleanup);
+ };
+ const forceClose = () => {
+ cleanup();
+ const socket = incoming.socket;
+ if (socket && !socket.destroyed) {
+ socket.destroySoon();
+ }
+ };
+ const timer = setTimeout(forceClose, DRAIN_TIMEOUT_MS);
+ timer.unref?.();
+ const onData = (chunk) => {
+ bytesRead += chunk.length;
+ if (bytesRead > MAX_DRAIN_BYTES) {
+ forceClose();
+ }
+ };
+ incoming.on("data", onData);
+ incoming.on("end", cleanup);
+ incoming.on("error", cleanup);
+ incoming.resume();
+};
+var handleRequestError = () => new Response(null, {
+ status: 400
+});
+var handleFetchError = (e) => new Response(null, {
+ status: e instanceof Error && (e.name === "TimeoutError" || e.constructor.name === "TimeoutError") ? 504 : 500
+});
+var handleResponseError = (e, outgoing) => {
+ const err = e instanceof Error ? e : new Error("unknown error", { cause: e });
+ if (err.code === "ERR_STREAM_PREMATURE_CLOSE") {
+ console.info("The user aborted a request.");
+ } else {
+ console.error(e);
+ if (!outgoing.headersSent) {
+ outgoing.writeHead(500, { "Content-Type": "text/plain" });
+ }
+ outgoing.end(`Error: ${err.message}`);
+ outgoing.destroy(err);
+ }
+};
+var flushHeaders = (outgoing) => {
+ if ("flushHeaders" in outgoing && outgoing.writable) {
+ outgoing.flushHeaders();
+ }
+};
+var responseViaCache = async (res, outgoing) => {
+ let [status, body, header] = res[cacheKey];
+ let hasContentLength = false;
+ if (!header) {
+ header = { "content-type": "text/plain; charset=UTF-8" };
+ } else if (header instanceof Headers) {
+ hasContentLength = header.has("content-length");
+ header = buildOutgoingHttpHeaders(header);
+ } else if (Array.isArray(header)) {
+ const headerObj = new Headers(header);
+ hasContentLength = headerObj.has("content-length");
+ header = buildOutgoingHttpHeaders(headerObj);
+ } else {
+ for (const key in header) {
+ if (key.length === 14 && key.toLowerCase() === "content-length") {
+ hasContentLength = true;
+ break;
+ }
+ }
+ }
+ if (!hasContentLength) {
+ if (typeof body === "string") {
+ header["Content-Length"] = Buffer.byteLength(body);
+ } else if (body instanceof Uint8Array) {
+ header["Content-Length"] = body.byteLength;
+ } else if (body instanceof Blob) {
+ header["Content-Length"] = body.size;
+ }
+ }
+ outgoing.writeHead(status, header);
+ if (typeof body === "string" || body instanceof Uint8Array) {
+ outgoing.end(body);
+ } else if (body instanceof Blob) {
+ outgoing.end(new Uint8Array(await body.arrayBuffer()));
+ } else {
+ flushHeaders(outgoing);
+ await writeFromReadableStream(body, outgoing)?.catch(
+ (e) => handleResponseError(e, outgoing)
+ );
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var isPromise = (res) => typeof res.then === "function";
+var responseViaResponseObject = async (res, outgoing, options = {}) => {
+ if (isPromise(res)) {
+ if (options.errorHandler) {
+ try {
+ res = await res;
+ } catch (err) {
+ const errRes = await options.errorHandler(err);
+ if (!errRes) {
+ return;
+ }
+ res = errRes;
+ }
+ } else {
+ res = await res.catch(handleFetchError);
+ }
+ }
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ const resHeaderRecord = buildOutgoingHttpHeaders(res.headers);
+ if (res.body) {
+ const reader = res.body.getReader();
+ const values = [];
+ let done = false;
+ let currentReadPromise = void 0;
+ if (resHeaderRecord["transfer-encoding"] !== "chunked") {
+ let maxReadCount = 2;
+ for (let i = 0; i < maxReadCount; i++) {
+ currentReadPromise ||= reader.read();
+ const chunk = await readWithoutBlocking(currentReadPromise).catch((e) => {
+ console.error(e);
+ done = true;
+ });
+ if (!chunk) {
+ if (i === 1) {
+ await new Promise((resolve) => setTimeout(resolve));
+ maxReadCount = 3;
+ continue;
+ }
+ break;
+ }
+ currentReadPromise = void 0;
+ if (chunk.value) {
+ values.push(chunk.value);
+ }
+ if (chunk.done) {
+ done = true;
+ break;
+ }
+ }
+ if (done && !("content-length" in resHeaderRecord)) {
+ resHeaderRecord["content-length"] = values.reduce((acc, value) => acc + value.length, 0);
+ }
+ }
+ outgoing.writeHead(res.status, resHeaderRecord);
+ values.forEach((value) => {
+ ;
+ outgoing.write(value);
+ });
+ if (done) {
+ outgoing.end();
+ } else {
+ if (values.length === 0) {
+ flushHeaders(outgoing);
+ }
+ await writeFromReadableStreamDefaultReader(reader, outgoing, currentReadPromise);
+ }
+ } else if (resHeaderRecord[X_ALREADY_SENT]) {
+ } else {
+ outgoing.writeHead(res.status, resHeaderRecord);
+ outgoing.end();
+ }
+ ;
+ outgoing[outgoingEnded]?.();
+};
+var getRequestListener = (fetchCallback, options = {}) => {
+ const autoCleanupIncoming = options.autoCleanupIncoming ?? true;
+ if (options.overrideGlobalObjects !== false && global.Request !== Request) {
+ Object.defineProperty(global, "Request", {
+ value: Request
+ });
+ Object.defineProperty(global, "Response", {
+ value: Response2
+ });
+ }
+ return async (incoming, outgoing) => {
+ let res, req;
+ try {
+ req = newRequest(incoming, options.hostname);
+ let incomingEnded = !autoCleanupIncoming || incoming.method === "GET" || incoming.method === "HEAD";
+ if (!incomingEnded) {
+ ;
+ incoming[wrapBodyStream] = true;
+ incoming.on("end", () => {
+ incomingEnded = true;
+ });
+ if (incoming instanceof Http2ServerRequest2) {
+ ;
+ outgoing[outgoingEnded] = () => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ };
+ }
+ outgoing.on("finish", () => {
+ if (!incomingEnded) {
+ drainIncoming(incoming);
+ }
+ });
+ }
+ outgoing.on("close", () => {
+ const abortController = req[abortControllerKey];
+ if (abortController) {
+ if (incoming.errored) {
+ req[abortControllerKey].abort(incoming.errored.toString());
+ } else if (!outgoing.writableFinished) {
+ req[abortControllerKey].abort("Client connection prematurely closed.");
+ }
+ }
+ if (!incomingEnded) {
+ setTimeout(() => {
+ if (!incomingEnded) {
+ setTimeout(() => {
+ drainIncoming(incoming);
+ });
+ }
+ });
+ }
+ });
+ res = fetchCallback(req, { incoming, outgoing });
+ if (cacheKey in res) {
+ return responseViaCache(res, outgoing);
+ }
+ } catch (e) {
+ if (!res) {
+ if (options.errorHandler) {
+ res = await options.errorHandler(req ? e : toRequestError(e));
+ if (!res) {
+ return;
+ }
+ } else if (!req) {
+ res = handleRequestError();
+ } else {
+ res = handleFetchError(e);
+ }
+ } else {
+ return handleResponseError(e, outgoing);
+ }
+ }
+ try {
+ return await responseViaResponseObject(res, outgoing, options);
+ } catch (e) {
+ return handleResponseError(e, outgoing);
+ }
+ };
+};
+
+// src/vercel.ts
+var handle = (app) => {
+ return getRequestListener(app.fetch);
+};
+export {
+ handle
+};
diff --git a/mcp-tools/accessibility/node_modules/@hono/node-server/package.json b/mcp-tools/accessibility/node_modules/@hono/node-server/package.json
new file mode 100644
index 0000000..d854461
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@hono/node-server/package.json
@@ -0,0 +1,103 @@
+{
+ "name": "@hono/node-server",
+ "version": "1.19.14",
+ "description": "Node.js Adapter for Hono",
+ "main": "dist/index.js",
+ "types": "dist/index.d.ts",
+ "files": [
+ "dist"
+ ],
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "require": "./dist/index.js",
+ "import": "./dist/index.mjs"
+ },
+ "./serve-static": {
+ "types": "./dist/serve-static.d.ts",
+ "require": "./dist/serve-static.js",
+ "import": "./dist/serve-static.mjs"
+ },
+ "./vercel": {
+ "types": "./dist/vercel.d.ts",
+ "require": "./dist/vercel.js",
+ "import": "./dist/vercel.mjs"
+ },
+ "./utils/*": {
+ "types": "./dist/utils/*.d.ts",
+ "require": "./dist/utils/*.js",
+ "import": "./dist/utils/*.mjs"
+ },
+ "./conninfo": {
+ "types": "./dist/conninfo.d.ts",
+ "require": "./dist/conninfo.js",
+ "import": "./dist/conninfo.mjs"
+ }
+ },
+ "typesVersions": {
+ "*": {
+ ".": [
+ "./dist/index.d.ts"
+ ],
+ "serve-static": [
+ "./dist/serve-static.d.ts"
+ ],
+ "vercel": [
+ "./dist/vercel.d.ts"
+ ],
+ "utils/*": [
+ "./dist/utils/*.d.ts"
+ ],
+ "conninfo": [
+ "./dist/conninfo.d.ts"
+ ]
+ }
+ },
+ "scripts": {
+ "test": "node --expose-gc node_modules/jest/bin/jest.js",
+ "build": "tsup --external hono",
+ "watch": "tsup --watch",
+ "postbuild": "publint",
+ "prerelease": "bun run build && bun run test",
+ "release": "np",
+ "lint": "eslint src test",
+ "lint:fix": "eslint src test --fix",
+ "format": "prettier --check \"src/**/*.{js,ts}\" \"test/**/*.{js,ts}\"",
+ "format:fix": "prettier --write \"src/**/*.{js,ts}\" \"test/**/*.{js,ts}\""
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/honojs/node-server.git"
+ },
+ "homepage": "https://github.com/honojs/node-server",
+ "author": "Yusuke Wada (https://github.com/yusukebe)",
+ "publishConfig": {
+ "registry": "https://registry.npmjs.org",
+ "access": "public"
+ },
+ "engines": {
+ "node": ">=18.14.1"
+ },
+ "devDependencies": {
+ "@hono/eslint-config": "^1.0.1",
+ "@types/jest": "^29.5.3",
+ "@types/node": "^20.10.0",
+ "@types/supertest": "^2.0.12",
+ "@whatwg-node/fetch": "^0.9.14",
+ "eslint": "^9.10.0",
+ "hono": "^4.4.10",
+ "jest": "^29.6.1",
+ "np": "^7.7.0",
+ "prettier": "^3.2.4",
+ "publint": "^0.1.16",
+ "supertest": "^6.3.3",
+ "ts-jest": "^29.1.1",
+ "tsup": "^7.2.0",
+ "typescript": "^5.3.2"
+ },
+ "peerDependencies": {
+ "hono": "^4"
+ },
+ "packageManager": "bun@1.2.20"
+}
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/LICENSE b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/LICENSE
new file mode 100644
index 0000000..3d48435
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2024 Anthropic, PBC
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/README.md b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/README.md
new file mode 100644
index 0000000..2d2f19a
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/README.md
@@ -0,0 +1,172 @@
+# MCP TypeScript SDK [](https://www.npmjs.com/package/@modelcontextprotocol/sdk) [](https://github.com/modelcontextprotocol/typescript-sdk/blob/main/LICENSE)
+
+
+Table of Contents
+
+- [Overview](#overview)
+- [Installation](#installation)
+- [Quick Start](#quick-start)
+- [Core Concepts](#core-concepts)
+- [Examples](#examples)
+- [Documentation](#documentation)
+- [Contributing](#contributing)
+- [License](#license)
+
+
+
+## Overview
+
+The Model Context Protocol allows applications to provide context for LLMs in a standardized way, separating the concerns of providing context from the actual LLM interaction. This TypeScript SDK implements
+[the full MCP specification](https://modelcontextprotocol.io/specification/draft), making it easy to:
+
+- Create MCP servers that expose resources, prompts and tools
+- Build MCP clients that can connect to any MCP server
+- Use standard transports like stdio and Streamable HTTP
+
+## Installation
+
+```bash
+npm install @modelcontextprotocol/sdk zod
+```
+
+This SDK has a **required peer dependency** on `zod` for schema validation. The SDK internally imports from `zod/v4`, but maintains backwards compatibility with projects using Zod v3.25 or later. You can use either API in your code by importing from `zod/v3` or `zod/v4`:
+
+## Quick Start
+
+To see the SDK in action end-to-end, start from the runnable examples in `src/examples`:
+
+1. **Install dependencies** (from the SDK repo root):
+
+ ```bash
+ npm install
+ ```
+
+2. **Run the example Streamable HTTP server**:
+
+ ```bash
+ npx tsx src/examples/server/simpleStreamableHttp.ts
+ ```
+
+3. **Run the interactive client in another terminal**:
+
+ ```bash
+ npx tsx src/examples/client/simpleStreamableHttp.ts
+ ```
+
+This pair of examples demonstrates tools, resources, prompts, sampling, elicitation, tasks and logging. For a guided walkthrough and variations (stateless servers, JSON-only responses, SSE compatibility, OAuth, etc.), see [docs/server.md](docs/server.md) and
+[docs/client.md](docs/client.md).
+
+## Core Concepts
+
+### Servers and transports
+
+An MCP server is typically created with `McpServer` and connected to a transport such as Streamable HTTP or stdio. The SDK supports:
+
+- **Streamable HTTP** for remote servers (recommended).
+- **HTTP + SSE** for backwards compatibility only.
+- **stdio** for local, process-spawned integrations.
+
+Runnable server examples live under `src/examples/server` and are documented in [docs/server.md](docs/server.md).
+
+### Tools, resources, prompts
+
+- **Tools** let LLMs ask your server to take actions (computation, side effects, network calls).
+- **Resources** expose read-only data that clients can surface to users or models.
+- **Prompts** are reusable templates that help users talk to models in a consistent way.
+
+The detailed APIs, including `ResourceTemplate`, completions, and display-name metadata, are covered in [docs/server.md](docs/server.md#tools-resources-and-prompts), with runnable implementations in [`simpleStreamableHttp.ts`](src/examples/server/simpleStreamableHttp.ts).
+
+### Capabilities: sampling, elicitation, and tasks
+
+The SDK includes higher-level capabilities for richer workflows:
+
+- **Sampling**: server-side tools can ask connected clients to run LLM completions.
+- **Form elicitation**: tools can request non-sensitive input via structured forms.
+- **URL elicitation**: servers can ask users to complete secure flows in a browser (e.g., API key entry, payments, OAuth).
+- **Tasks (experimental)**: long-running tool calls can be turned into tasks that you poll or resume later.
+
+Conceptual overviews and links to runnable examples are in:
+
+- [docs/capabilities.md](docs/capabilities.md)
+
+Key example servers include:
+
+- [`toolWithSampleServer.ts`](src/examples/server/toolWithSampleServer.ts)
+- [`elicitationFormExample.ts`](src/examples/server/elicitationFormExample.ts)
+- [`elicitationUrlExample.ts`](src/examples/server/elicitationUrlExample.ts)
+
+### Clients
+
+The high-level `Client` class connects to MCP servers over different transports and exposes helpers like `listTools`, `callTool`, `listResources`, `readResource`, `listPrompts`, and `getPrompt`.
+
+Runnable clients live under `src/examples/client` and are described in [docs/client.md](docs/client.md), including:
+
+- Interactive Streamable HTTP client ([`simpleStreamableHttp.ts`](src/examples/client/simpleStreamableHttp.ts))
+- Streamable HTTP client with SSE fallback ([`streamableHttpWithSseFallbackClient.ts`](src/examples/client/streamableHttpWithSseFallbackClient.ts))
+- OAuth-enabled clients and polling/parallel examples
+
+### Node.js Web Crypto (globalThis.crypto) compatibility
+
+Some parts of the SDK (for example, JWT-based client authentication in `auth-extensions.ts` via `jose`) rely on the Web Crypto API exposed as `globalThis.crypto`.
+
+See [docs/faq.md](docs/faq.md) for details on supported Node.js versions and how to polyfill `globalThis.crypto` when running on older Node.js runtimes.
+
+## Examples
+
+The SDK ships runnable examples under `src/examples`. Use these tables to find the scenario you care about and jump straight to the corresponding code and docs.
+
+### Server examples
+
+| Scenario | Description | Example file(s) | Related docs |
+| --------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
+| Streamable HTTP server (stateful) | Feature-rich server with tools, resources, prompts, logging, tasks, sampling, and optional OAuth. | [`simpleStreamableHttp.ts`](src/examples/server/simpleStreamableHttp.ts) | [`server.md`](docs/server.md), [`capabilities.md`](docs/capabilities.md) |
+| Streamable HTTP server (stateless) | No session tracking; good for simple API-style servers. | [`simpleStatelessStreamableHttp.ts`](src/examples/server/simpleStatelessStreamableHttp.ts) | [`server.md`](docs/server.md) |
+| JSON response mode (no SSE) | Streamable HTTP with JSON responses only and limited notifications. | [`jsonResponseStreamableHttp.ts`](src/examples/server/jsonResponseStreamableHttp.ts) | [`server.md`](docs/server.md) |
+| Server notifications over Streamable HTTP | Demonstrates server-initiated notifications using SSE with Streamable HTTP. | [`standaloneSseWithGetStreamableHttp.ts`](src/examples/server/standaloneSseWithGetStreamableHttp.ts) | [`server.md`](docs/server.md) |
+| Deprecated HTTP+SSE server | Legacy HTTP+SSE transport for backwards-compatibility testing. | [`simpleSseServer.ts`](src/examples/server/simpleSseServer.ts) | [`server.md`](docs/server.md) |
+| Backwards-compatible server (Streamable HTTP + SSE) | Single server that supports both Streamable HTTP and legacy SSE clients. | [`sseAndStreamableHttpCompatibleServer.ts`](src/examples/server/sseAndStreamableHttpCompatibleServer.ts) | [`server.md`](docs/server.md) |
+| Form elicitation server | Uses form elicitation to collect non-sensitive user input. | [`elicitationFormExample.ts`](src/examples/server/elicitationFormExample.ts) | [`capabilities.md`](docs/capabilities.md#elicitation) |
+| URL elicitation server | Demonstrates URL-mode elicitation in an OAuth-protected server. | [`elicitationUrlExample.ts`](src/examples/server/elicitationUrlExample.ts) | [`capabilities.md`](docs/capabilities.md#elicitation) |
+| Sampling and tasks server | Combines tools, logging, sampling, and experimental task-based execution. | [`toolWithSampleServer.ts`](src/examples/server/toolWithSampleServer.ts) | [`capabilities.md`](docs/capabilities.md) |
+| OAuth demo authorization server | In-memory OAuth provider used with the example servers. | [`demoInMemoryOAuthProvider.ts`](src/examples/server/demoInMemoryOAuthProvider.ts) | [`server.md`](docs/server.md) |
+
+### Client examples
+
+| Scenario | Description | Example file(s) | Related docs |
+| --------------------------------------------------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
+| Interactive Streamable HTTP client | CLI client that exercises tools, resources, prompts, elicitation, and tasks. | [`simpleStreamableHttp.ts`](src/examples/client/simpleStreamableHttp.ts) | [`client.md`](docs/client.md) |
+| Backwards-compatible client (Streamable HTTP → SSE) | Tries Streamable HTTP first, then falls back to SSE on 4xx responses. | [`streamableHttpWithSseFallbackClient.ts`](src/examples/client/streamableHttpWithSseFallbackClient.ts) | [`client.md`](docs/client.md), [`server.md`](docs/server.md) |
+| SSE polling client | Polls a legacy SSE server and demonstrates notification handling. | [`ssePollingClient.ts`](src/examples/client/ssePollingClient.ts) | [`client.md`](docs/client.md) |
+| Parallel tool calls client | Shows how to run multiple tool calls in parallel. | [`parallelToolCallsClient.ts`](src/examples/client/parallelToolCallsClient.ts) | [`client.md`](docs/client.md) |
+| Multiple clients in parallel | Demonstrates connecting multiple clients concurrently to the same server. | [`multipleClientsParallel.ts`](src/examples/client/multipleClientsParallel.ts) | [`client.md`](docs/client.md) |
+| OAuth clients | Examples of client_credentials (basic and private_key_jwt) and reusable providers. | [`simpleOAuthClient.ts`](src/examples/client/simpleOAuthClient.ts), [`simpleOAuthClientProvider.ts`](src/examples/client/simpleOAuthClientProvider.ts), [`simpleClientCredentials.ts`](src/examples/client/simpleClientCredentials.ts) | [`client.md`](docs/client.md) |
+| URL elicitation client | Works with the URL elicitation server to drive secure browser flows. | [`elicitationUrlExample.ts`](src/examples/client/elicitationUrlExample.ts) | [`capabilities.md`](docs/capabilities.md#elicitation) |
+
+Shared utilities:
+
+- In-memory event store for resumability: [`inMemoryEventStore.ts`](src/examples/shared/inMemoryEventStore.ts) (see [`server.md`](docs/server.md)).
+
+For more details on how to run these examples (including recommended commands and deployment diagrams), see `src/examples/README.md`.
+
+## Documentation
+
+- Local SDK docs:
+ - [docs/server.md](docs/server.md) – building and running MCP servers, transports, tools/resources/prompts, CORS, DNS rebinding, and multi-node deployment.
+ - [docs/client.md](docs/client.md) – using the high-level client, transports, backwards compatibility, and OAuth helpers.
+ - [docs/capabilities.md](docs/capabilities.md) – sampling, elicitation (form and URL), and experimental task-based execution.
+ - [docs/protocol.md](docs/protocol.md) – protocol features: ping, progress, cancellation, pagination, capability negotiation, and JSON Schema.
+ - [docs/faq.md](docs/faq.md) – environment and troubleshooting FAQs (including Node.js Web Crypto support).
+- External references:
+ - [V1 API reference](https://modelcontextprotocol.github.io/typescript-sdk/)
+ - [V2 API reference](https://modelcontextprotocol.github.io/typescript-sdk/v2/)
+ - [Model Context Protocol documentation](https://modelcontextprotocol.io)
+ - [MCP Specification](https://spec.modelcontextprotocol.io)
+ - [Example Servers](https://github.com/modelcontextprotocol/servers)
+
+## Contributing
+
+Issues and pull requests are welcome on GitHub at .
+
+## License
+
+This project is licensed under the MIT License—see the [LICENSE](LICENSE) file for details.
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.d.ts
new file mode 100644
index 0000000..363697d
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.d.ts
@@ -0,0 +1,190 @@
+/**
+ * OAuth provider extensions for specialized authentication flows.
+ *
+ * This module provides ready-to-use OAuthClientProvider implementations
+ * for common machine-to-machine authentication scenarios.
+ */
+import { OAuthClientInformation, OAuthClientMetadata, OAuthTokens } from '../shared/auth.js';
+import { AddClientAuthentication, OAuthClientProvider } from './auth.js';
+/**
+ * Helper to produce a private_key_jwt client authentication function.
+ *
+ * Usage:
+ * const addClientAuth = createPrivateKeyJwtAuth({ issuer, subject, privateKey, alg, audience? });
+ * // pass addClientAuth as provider.addClientAuthentication implementation
+ */
+export declare function createPrivateKeyJwtAuth(options: {
+ issuer: string;
+ subject: string;
+ privateKey: string | Uint8Array | Record;
+ alg: string;
+ audience?: string | URL;
+ lifetimeSeconds?: number;
+ claims?: Record;
+}): AddClientAuthentication;
+/**
+ * Options for creating a ClientCredentialsProvider.
+ */
+export interface ClientCredentialsProviderOptions {
+ /**
+ * The client_id for this OAuth client.
+ */
+ clientId: string;
+ /**
+ * The client_secret for client_secret_basic authentication.
+ */
+ clientSecret: string;
+ /**
+ * Optional client name for metadata.
+ */
+ clientName?: string;
+ /**
+ * Space-separated scopes values requested by the client.
+ */
+ scope?: string;
+}
+/**
+ * OAuth provider for client_credentials grant with client_secret_basic authentication.
+ *
+ * This provider is designed for machine-to-machine authentication where
+ * the client authenticates using a client_id and client_secret.
+ *
+ * @example
+ * const provider = new ClientCredentialsProvider({
+ * clientId: 'my-client',
+ * clientSecret: 'my-secret'
+ * });
+ *
+ * const transport = new StreamableHTTPClientTransport(serverUrl, {
+ * authProvider: provider
+ * });
+ */
+export declare class ClientCredentialsProvider implements OAuthClientProvider {
+ private _tokens?;
+ private _clientInfo;
+ private _clientMetadata;
+ constructor(options: ClientCredentialsProviderOptions);
+ get redirectUrl(): undefined;
+ get clientMetadata(): OAuthClientMetadata;
+ clientInformation(): OAuthClientInformation;
+ saveClientInformation(info: OAuthClientInformation): void;
+ tokens(): OAuthTokens | undefined;
+ saveTokens(tokens: OAuthTokens): void;
+ redirectToAuthorization(): void;
+ saveCodeVerifier(): void;
+ codeVerifier(): string;
+ prepareTokenRequest(scope?: string): URLSearchParams;
+}
+/**
+ * Options for creating a PrivateKeyJwtProvider.
+ */
+export interface PrivateKeyJwtProviderOptions {
+ /**
+ * The client_id for this OAuth client.
+ */
+ clientId: string;
+ /**
+ * The private key for signing JWT assertions.
+ * Can be a PEM string, Uint8Array, or JWK object.
+ */
+ privateKey: string | Uint8Array | Record;
+ /**
+ * The algorithm to use for signing (e.g., 'RS256', 'ES256').
+ */
+ algorithm: string;
+ /**
+ * Optional client name for metadata.
+ */
+ clientName?: string;
+ /**
+ * Optional JWT lifetime in seconds (default: 300).
+ */
+ jwtLifetimeSeconds?: number;
+ /**
+ * Space-separated scopes values requested by the client.
+ */
+ scope?: string;
+}
+/**
+ * OAuth provider for client_credentials grant with private_key_jwt authentication.
+ *
+ * This provider is designed for machine-to-machine authentication where
+ * the client authenticates using a signed JWT assertion (RFC 7523 Section 2.2).
+ *
+ * @example
+ * const provider = new PrivateKeyJwtProvider({
+ * clientId: 'my-client',
+ * privateKey: pemEncodedPrivateKey,
+ * algorithm: 'RS256'
+ * });
+ *
+ * const transport = new StreamableHTTPClientTransport(serverUrl, {
+ * authProvider: provider
+ * });
+ */
+export declare class PrivateKeyJwtProvider implements OAuthClientProvider {
+ private _tokens?;
+ private _clientInfo;
+ private _clientMetadata;
+ addClientAuthentication: AddClientAuthentication;
+ constructor(options: PrivateKeyJwtProviderOptions);
+ get redirectUrl(): undefined;
+ get clientMetadata(): OAuthClientMetadata;
+ clientInformation(): OAuthClientInformation;
+ saveClientInformation(info: OAuthClientInformation): void;
+ tokens(): OAuthTokens | undefined;
+ saveTokens(tokens: OAuthTokens): void;
+ redirectToAuthorization(): void;
+ saveCodeVerifier(): void;
+ codeVerifier(): string;
+ prepareTokenRequest(scope?: string): URLSearchParams;
+}
+/**
+ * Options for creating a StaticPrivateKeyJwtProvider.
+ */
+export interface StaticPrivateKeyJwtProviderOptions {
+ /**
+ * The client_id for this OAuth client.
+ */
+ clientId: string;
+ /**
+ * A pre-built JWT client assertion to use for authentication.
+ *
+ * This token should already contain the appropriate claims
+ * (iss, sub, aud, exp, etc.) and be signed by the client's key.
+ */
+ jwtBearerAssertion: string;
+ /**
+ * Optional client name for metadata.
+ */
+ clientName?: string;
+ /**
+ * Space-separated scopes values requested by the client.
+ */
+ scope?: string;
+}
+/**
+ * OAuth provider for client_credentials grant with a static private_key_jwt assertion.
+ *
+ * This provider mirrors {@link PrivateKeyJwtProvider} but instead of constructing and
+ * signing a JWT on each request, it accepts a pre-built JWT assertion string and
+ * uses it directly for authentication.
+ */
+export declare class StaticPrivateKeyJwtProvider implements OAuthClientProvider {
+ private _tokens?;
+ private _clientInfo;
+ private _clientMetadata;
+ addClientAuthentication: AddClientAuthentication;
+ constructor(options: StaticPrivateKeyJwtProviderOptions);
+ get redirectUrl(): undefined;
+ get clientMetadata(): OAuthClientMetadata;
+ clientInformation(): OAuthClientInformation;
+ saveClientInformation(info: OAuthClientInformation): void;
+ tokens(): OAuthTokens | undefined;
+ saveTokens(tokens: OAuthTokens): void;
+ redirectToAuthorization(): void;
+ saveCodeVerifier(): void;
+ codeVerifier(): string;
+ prepareTokenRequest(scope?: string): URLSearchParams;
+}
+//# sourceMappingURL=auth-extensions.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.d.ts.map
new file mode 100644
index 0000000..7945c0c
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"auth-extensions.d.ts","sourceRoot":"","sources":["../../../src/client/auth-extensions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEzE;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1D,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,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EAAE,sBAAsB,GAAG,IAAI;IAIzD,MAAM,IAAI,WAAW,GAAG,SAAS;IAIjC,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAIrC,uBAAuB,IAAI,IAAI;IAI/B,gBAAgB,IAAI,IAAI;IAIxB,YAAY,IAAI,MAAM;IAItB,mBAAmB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,eAAe;CAKvD"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.js
new file mode 100644
index 0000000..4677bb9
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.js
@@ -0,0 +1,299 @@
+"use strict";
+/**
+ * OAuth provider extensions for specialized authentication flows.
+ *
+ * This module provides ready-to-use OAuthClientProvider implementations
+ * for common machine-to-machine authentication scenarios.
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.StaticPrivateKeyJwtProvider = exports.PrivateKeyJwtProvider = exports.ClientCredentialsProvider = void 0;
+exports.createPrivateKeyJwtAuth = createPrivateKeyJwtAuth;
+/**
+ * Helper to produce a private_key_jwt client authentication function.
+ *
+ * Usage:
+ * const addClientAuth = createPrivateKeyJwtAuth({ issuer, subject, privateKey, alg, audience? });
+ * // pass addClientAuth as provider.addClientAuthentication implementation
+ */
+function createPrivateKeyJwtAuth(options) {
+ return async (_headers, params, url, metadata) => {
+ // Lazy import to avoid heavy dependency unless used
+ if (typeof globalThis.crypto === 'undefined') {
+ throw new TypeError('crypto is not available, please ensure you add have Web Crypto API support for older Node.js versions (see https://github.com/modelcontextprotocol/typescript-sdk#nodejs-web-crypto-globalthiscrypto-compatibility)');
+ }
+ const jose = await Promise.resolve().then(() => __importStar(require('jose')));
+ const audience = String(options.audience ?? metadata?.issuer ?? url);
+ const lifetimeSeconds = options.lifetimeSeconds ?? 300;
+ const now = Math.floor(Date.now() / 1000);
+ const jti = `${Date.now()}-${Math.random().toString(36).slice(2)}`;
+ const baseClaims = {
+ iss: options.issuer,
+ sub: options.subject,
+ aud: audience,
+ exp: now + lifetimeSeconds,
+ iat: now,
+ jti
+ };
+ const claims = options.claims ? { ...baseClaims, ...options.claims } : baseClaims;
+ // Import key for the requested algorithm
+ const alg = options.alg;
+ let key;
+ if (typeof options.privateKey === 'string') {
+ if (alg.startsWith('RS') || alg.startsWith('ES') || alg.startsWith('PS')) {
+ key = await jose.importPKCS8(options.privateKey, alg);
+ }
+ else if (alg.startsWith('HS')) {
+ key = new TextEncoder().encode(options.privateKey);
+ }
+ else {
+ throw new Error(`Unsupported algorithm ${alg}`);
+ }
+ }
+ else if (options.privateKey instanceof Uint8Array) {
+ if (alg.startsWith('HS')) {
+ key = options.privateKey;
+ }
+ else {
+ // Assume PKCS#8 DER in Uint8Array for asymmetric algorithms
+ key = await jose.importPKCS8(new TextDecoder().decode(options.privateKey), alg);
+ }
+ }
+ else {
+ // Treat as JWK
+ key = await jose.importJWK(options.privateKey, alg);
+ }
+ // Sign JWT
+ const assertion = await new jose.SignJWT(claims)
+ .setProtectedHeader({ alg, typ: 'JWT' })
+ .setIssuer(options.issuer)
+ .setSubject(options.subject)
+ .setAudience(audience)
+ .setIssuedAt(now)
+ .setExpirationTime(now + lifetimeSeconds)
+ .setJti(jti)
+ .sign(key);
+ params.set('client_assertion', assertion);
+ params.set('client_assertion_type', 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer');
+ };
+}
+/**
+ * OAuth provider for client_credentials grant with client_secret_basic authentication.
+ *
+ * This provider is designed for machine-to-machine authentication where
+ * the client authenticates using a client_id and client_secret.
+ *
+ * @example
+ * const provider = new ClientCredentialsProvider({
+ * clientId: 'my-client',
+ * clientSecret: 'my-secret'
+ * });
+ *
+ * const transport = new StreamableHTTPClientTransport(serverUrl, {
+ * authProvider: provider
+ * });
+ */
+class ClientCredentialsProvider {
+ constructor(options) {
+ this._clientInfo = {
+ client_id: options.clientId,
+ client_secret: options.clientSecret
+ };
+ this._clientMetadata = {
+ client_name: options.clientName ?? 'client-credentials-client',
+ redirect_uris: [],
+ grant_types: ['client_credentials'],
+ token_endpoint_auth_method: 'client_secret_basic',
+ scope: options.scope
+ };
+ }
+ get redirectUrl() {
+ return undefined;
+ }
+ get clientMetadata() {
+ return this._clientMetadata;
+ }
+ clientInformation() {
+ return this._clientInfo;
+ }
+ saveClientInformation(info) {
+ this._clientInfo = info;
+ }
+ tokens() {
+ return this._tokens;
+ }
+ saveTokens(tokens) {
+ this._tokens = tokens;
+ }
+ redirectToAuthorization() {
+ throw new Error('redirectToAuthorization is not used for client_credentials flow');
+ }
+ saveCodeVerifier() {
+ // Not used for client_credentials
+ }
+ codeVerifier() {
+ throw new Error('codeVerifier is not used for client_credentials flow');
+ }
+ prepareTokenRequest(scope) {
+ const params = new URLSearchParams({ grant_type: 'client_credentials' });
+ if (scope)
+ params.set('scope', scope);
+ return params;
+ }
+}
+exports.ClientCredentialsProvider = ClientCredentialsProvider;
+/**
+ * OAuth provider for client_credentials grant with private_key_jwt authentication.
+ *
+ * This provider is designed for machine-to-machine authentication where
+ * the client authenticates using a signed JWT assertion (RFC 7523 Section 2.2).
+ *
+ * @example
+ * const provider = new PrivateKeyJwtProvider({
+ * clientId: 'my-client',
+ * privateKey: pemEncodedPrivateKey,
+ * algorithm: 'RS256'
+ * });
+ *
+ * const transport = new StreamableHTTPClientTransport(serverUrl, {
+ * authProvider: provider
+ * });
+ */
+class PrivateKeyJwtProvider {
+ constructor(options) {
+ this._clientInfo = {
+ client_id: options.clientId
+ };
+ this._clientMetadata = {
+ client_name: options.clientName ?? 'private-key-jwt-client',
+ redirect_uris: [],
+ grant_types: ['client_credentials'],
+ token_endpoint_auth_method: 'private_key_jwt',
+ scope: options.scope
+ };
+ this.addClientAuthentication = createPrivateKeyJwtAuth({
+ issuer: options.clientId,
+ subject: options.clientId,
+ privateKey: options.privateKey,
+ alg: options.algorithm,
+ lifetimeSeconds: options.jwtLifetimeSeconds
+ });
+ }
+ get redirectUrl() {
+ return undefined;
+ }
+ get clientMetadata() {
+ return this._clientMetadata;
+ }
+ clientInformation() {
+ return this._clientInfo;
+ }
+ saveClientInformation(info) {
+ this._clientInfo = info;
+ }
+ tokens() {
+ return this._tokens;
+ }
+ saveTokens(tokens) {
+ this._tokens = tokens;
+ }
+ redirectToAuthorization() {
+ throw new Error('redirectToAuthorization is not used for client_credentials flow');
+ }
+ saveCodeVerifier() {
+ // Not used for client_credentials
+ }
+ codeVerifier() {
+ throw new Error('codeVerifier is not used for client_credentials flow');
+ }
+ prepareTokenRequest(scope) {
+ const params = new URLSearchParams({ grant_type: 'client_credentials' });
+ if (scope)
+ params.set('scope', scope);
+ return params;
+ }
+}
+exports.PrivateKeyJwtProvider = PrivateKeyJwtProvider;
+/**
+ * OAuth provider for client_credentials grant with a static private_key_jwt assertion.
+ *
+ * This provider mirrors {@link PrivateKeyJwtProvider} but instead of constructing and
+ * signing a JWT on each request, it accepts a pre-built JWT assertion string and
+ * uses it directly for authentication.
+ */
+class StaticPrivateKeyJwtProvider {
+ constructor(options) {
+ this._clientInfo = {
+ client_id: options.clientId
+ };
+ this._clientMetadata = {
+ client_name: options.clientName ?? 'static-private-key-jwt-client',
+ redirect_uris: [],
+ grant_types: ['client_credentials'],
+ token_endpoint_auth_method: 'private_key_jwt',
+ scope: options.scope
+ };
+ const assertion = options.jwtBearerAssertion;
+ this.addClientAuthentication = async (_headers, params) => {
+ params.set('client_assertion', assertion);
+ params.set('client_assertion_type', 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer');
+ };
+ }
+ get redirectUrl() {
+ return undefined;
+ }
+ get clientMetadata() {
+ return this._clientMetadata;
+ }
+ clientInformation() {
+ return this._clientInfo;
+ }
+ saveClientInformation(info) {
+ this._clientInfo = info;
+ }
+ tokens() {
+ return this._tokens;
+ }
+ saveTokens(tokens) {
+ this._tokens = tokens;
+ }
+ redirectToAuthorization() {
+ throw new Error('redirectToAuthorization is not used for client_credentials flow');
+ }
+ saveCodeVerifier() {
+ // Not used for client_credentials
+ }
+ codeVerifier() {
+ throw new Error('codeVerifier is not used for client_credentials flow');
+ }
+ prepareTokenRequest(scope) {
+ const params = new URLSearchParams({ grant_type: 'client_credentials' });
+ if (scope)
+ params.set('scope', scope);
+ return params;
+ }
+}
+exports.StaticPrivateKeyJwtProvider = StaticPrivateKeyJwtProvider;
+//# sourceMappingURL=auth-extensions.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.js.map
new file mode 100644
index 0000000..01a6636
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"auth-extensions.js","sourceRoot":"","sources":["../../../src/client/auth-extensions.ts"],"names":[],"mappings":";AAAA;;;;;G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AE,wDAAwD,CAAC,CAAC;QAClG,CAAC,CAAC;IACN,CAAC;IAED,IAAI,WAAW;QACX,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,IAAI,cAAc;QACd,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED,iBAAiB;QACb,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,qBAAqB,CAAC,IAA4B;QAC9C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC5B,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,UAAU,CAAC,MAAmB;QAC1B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAED,uBAAuB;QACnB,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;IACvF,CAAC;IAED,gBAAgB;QACZ,kCAAkC;IACtC,CAAC;IAED,YAAY;QACR,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC5E,CAAC;IAED,mBAAmB,CAAC,KAAc;QAC9B,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,EAAE,UAAU,EAAE,oBAAoB,EAAE,CAAC,CAAC;QACzE,IAAI,KAAK;YAAE,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACtC,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAlED,kEAkEC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.d.ts
new file mode 100644
index 0000000..f4363ce
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.d.ts
@@ -0,0 +1,451 @@
+import { OAuthClientMetadata, OAuthClientInformationMixed, OAuthTokens, OAuthMetadata, OAuthClientInformationFull, OAuthProtectedResourceMetadata, AuthorizationServerMetadata } from '../shared/auth.js';
+import { OAuthError } from '../server/auth/errors.js';
+import { FetchLike } from '../shared/transport.js';
+/**
+ * Function type for adding client authentication to token requests.
+ */
+export type AddClientAuthentication = (headers: Headers, params: URLSearchParams, url: string | URL, metadata?: AuthorizationServerMetadata) => void | Promise;
+/**
+ * Implements an end-to-end OAuth client to be used with one MCP server.
+ *
+ * This client relies upon a concept of an authorized "session," the exact
+ * meaning of which is application-defined. Tokens, authorization codes, and
+ * code verifiers should not cross different sessions.
+ */
+export interface OAuthClientProvider {
+ /**
+ * The URL to redirect the user agent to after authorization.
+ * Return undefined for non-interactive flows that don't require user interaction
+ * (e.g., client_credentials, jwt-bearer).
+ */
+ get redirectUrl(): string | URL | undefined;
+ /**
+ * External URL the server should use to fetch client metadata document
+ */
+ clientMetadataUrl?: string;
+ /**
+ * Metadata about this OAuth client.
+ */
+ get clientMetadata(): OAuthClientMetadata;
+ /**
+ * Returns a OAuth2 state parameter.
+ */
+ state?(): string | Promise;
+ /**
+ * Loads information about this OAuth client, as registered already with the
+ * server, or returns `undefined` if the client is not registered with the
+ * server.
+ */
+ clientInformation(): OAuthClientInformationMixed | undefined | Promise;
+ /**
+ * If implemented, this permits the OAuth client to dynamically register with
+ * the server. Client information saved this way should later be read via
+ * `clientInformation()`.
+ *
+ * This method is not required to be implemented if client information is
+ * statically known (e.g., pre-registered).
+ */
+ saveClientInformation?(clientInformation: OAuthClientInformationMixed): void | Promise;
+ /**
+ * Loads any existing OAuth tokens for the current session, or returns
+ * `undefined` if there are no saved tokens.
+ */
+ tokens(): OAuthTokens | undefined | Promise;
+ /**
+ * Stores new OAuth tokens for the current session, after a successful
+ * authorization.
+ */
+ saveTokens(tokens: OAuthTokens): void | Promise;
+ /**
+ * Invoked to redirect the user agent to the given URL to begin the authorization flow.
+ */
+ redirectToAuthorization(authorizationUrl: URL): void | Promise;
+ /**
+ * Saves a PKCE code verifier for the current session, before redirecting to
+ * the authorization flow.
+ */
+ saveCodeVerifier(codeVerifier: string): void | Promise;
+ /**
+ * Loads the PKCE code verifier for the current session, necessary to validate
+ * the authorization result.
+ */
+ codeVerifier(): string | Promise;
+ /**
+ * Adds custom client authentication to OAuth token requests.
+ *
+ * This optional method allows implementations to customize how client credentials
+ * are included in token exchange and refresh requests. When provided, this method
+ * is called instead of the default authentication logic, giving full control over
+ * the authentication mechanism.
+ *
+ * Common use cases include:
+ * - Supporting authentication methods beyond the standard OAuth 2.0 methods
+ * - Adding custom headers for proprietary authentication schemes
+ * - Implementing client assertion-based authentication (e.g., JWT bearer tokens)
+ *
+ * @param headers - The request headers (can be modified to add authentication)
+ * @param params - The request body parameters (can be modified to add credentials)
+ * @param url - The token endpoint URL being called
+ * @param metadata - Optional OAuth metadata for the server, which may include supported authentication methods
+ */
+ addClientAuthentication?: AddClientAuthentication;
+ /**
+ * If defined, overrides the selection and validation of the
+ * RFC 8707 Resource Indicator. If left undefined, default
+ * validation behavior will be used.
+ *
+ * Implementations must verify the returned resource matches the MCP server.
+ */
+ validateResourceURL?(serverUrl: string | URL, resource?: string): Promise;
+ /**
+ * If implemented, provides a way for the client to invalidate (e.g. delete) the specified
+ * credentials, in the case where the server has indicated that they are no longer valid.
+ * This avoids requiring the user to intervene manually.
+ */
+ invalidateCredentials?(scope: 'all' | 'client' | 'tokens' | 'verifier' | 'discovery'): void | Promise;
+ /**
+ * Prepares grant-specific parameters for a token request.
+ *
+ * This optional method allows providers to customize the token request based on
+ * the grant type they support. When implemented, it returns the grant type and
+ * any grant-specific parameters needed for the token exchange.
+ *
+ * If not implemented, the default behavior depends on the flow:
+ * - For authorization code flow: uses code, code_verifier, and redirect_uri
+ * - For client_credentials: detected via grant_types in clientMetadata
+ *
+ * @param scope - Optional scope to request
+ * @returns Grant type and parameters, or undefined to use default behavior
+ *
+ * @example
+ * // For client_credentials grant:
+ * prepareTokenRequest(scope) {
+ * return {
+ * grantType: 'client_credentials',
+ * params: scope ? { scope } : {}
+ * };
+ * }
+ *
+ * @example
+ * // For authorization_code grant (default behavior):
+ * async prepareTokenRequest() {
+ * return {
+ * grantType: 'authorization_code',
+ * params: {
+ * code: this.authorizationCode,
+ * code_verifier: await this.codeVerifier(),
+ * redirect_uri: String(this.redirectUrl)
+ * }
+ * };
+ * }
+ */
+ prepareTokenRequest?(scope?: string): URLSearchParams | Promise | undefined;
+ /**
+ * Saves the OAuth discovery state after RFC 9728 and authorization server metadata
+ * discovery. Providers can persist this state to avoid redundant discovery requests
+ * on subsequent {@linkcode auth} calls.
+ *
+ * This state can also be provided out-of-band (e.g., from a previous session or
+ * external configuration) to bootstrap the OAuth flow without discovery.
+ *
+ * Called by {@linkcode auth} after successful discovery.
+ */
+ saveDiscoveryState?(state: OAuthDiscoveryState): void | Promise;
+ /**
+ * Returns previously saved discovery state, or `undefined` if none is cached.
+ *
+ * When available, {@linkcode auth} restores the discovery state (authorization server
+ * URL, resource metadata, etc.) instead of performing RFC 9728 discovery, reducing
+ * latency on subsequent calls.
+ *
+ * Providers should clear cached discovery state on repeated authentication failures
+ * (via {@linkcode invalidateCredentials} with scope `'discovery'` or `'all'`) to allow
+ * re-discovery in case the authorization server has changed.
+ */
+ discoveryState?(): OAuthDiscoveryState | undefined | Promise;
+}
+/**
+ * Discovery state that can be persisted across sessions by an {@linkcode OAuthClientProvider}.
+ *
+ * Contains the results of RFC 9728 protected resource metadata discovery and
+ * authorization server metadata discovery. Persisting this state avoids
+ * redundant discovery HTTP requests on subsequent {@linkcode auth} calls.
+ */
+export interface OAuthDiscoveryState extends OAuthServerInfo {
+ /** The URL at which the protected resource metadata was found, if available. */
+ resourceMetadataUrl?: string;
+}
+export type AuthResult = 'AUTHORIZED' | 'REDIRECT';
+export declare class UnauthorizedError extends Error {
+ constructor(message?: string);
+}
+type ClientAuthMethod = 'client_secret_basic' | 'client_secret_post' | 'none';
+/**
+ * Determines the best client authentication method to use based on server support and client configuration.
+ *
+ * Priority order (highest to lowest):
+ * 1. client_secret_basic (if client secret is available)
+ * 2. client_secret_post (if client secret is available)
+ * 3. none (for public clients)
+ *
+ * @param clientInformation - OAuth client information containing credentials
+ * @param supportedMethods - Authentication methods supported by the authorization server
+ * @returns The selected authentication method
+ */
+export declare function selectClientAuthMethod(clientInformation: OAuthClientInformationMixed, supportedMethods: string[]): ClientAuthMethod;
+/**
+ * Parses an OAuth error response from a string or Response object.
+ *
+ * If the input is a standard OAuth2.0 error response, it will be parsed according to the spec
+ * and an instance of the appropriate OAuthError subclass will be returned.
+ * If parsing fails, it falls back to a generic ServerError that includes
+ * the response status (if available) and original content.
+ *
+ * @param input - A Response object or string containing the error response
+ * @returns A Promise that resolves to an OAuthError instance
+ */
+export declare function parseErrorResponse(input: Response | string): Promise;
+/**
+ * Orchestrates the full auth flow with a server.
+ *
+ * This can be used as a single entry point for all authorization functionality,
+ * instead of linking together the other lower-level functions in this module.
+ */
+export declare function auth(provider: OAuthClientProvider, options: {
+ serverUrl: string | URL;
+ authorizationCode?: string;
+ scope?: string;
+ resourceMetadataUrl?: URL;
+ fetchFn?: FetchLike;
+}): Promise;
+/**
+ * SEP-991: URL-based Client IDs
+ * Validate that the client_id is a valid URL with https scheme
+ */
+export declare function isHttpsUrl(value?: string): boolean;
+export declare function selectResourceURL(serverUrl: string | URL, provider: OAuthClientProvider, resourceMetadata?: OAuthProtectedResourceMetadata): Promise;
+/**
+ * Extract resource_metadata, scope, and error from WWW-Authenticate header.
+ */
+export declare function extractWWWAuthenticateParams(res: Response): {
+ resourceMetadataUrl?: URL;
+ scope?: string;
+ error?: string;
+};
+/**
+ * Extract resource_metadata from response header.
+ * @deprecated Use `extractWWWAuthenticateParams` instead.
+ */
+export declare function extractResourceMetadataUrl(res: Response): URL | undefined;
+/**
+ * Looks up RFC 9728 OAuth 2.0 Protected Resource Metadata.
+ *
+ * If the server returns a 404 for the well-known endpoint, this function will
+ * return `undefined`. Any other errors will be thrown as exceptions.
+ */
+export declare function discoverOAuthProtectedResourceMetadata(serverUrl: string | URL, opts?: {
+ protocolVersion?: string;
+ resourceMetadataUrl?: string | URL;
+}, fetchFn?: FetchLike): Promise;
+/**
+ * Looks up RFC 8414 OAuth 2.0 Authorization Server Metadata.
+ *
+ * If the server returns a 404 for the well-known endpoint, this function will
+ * return `undefined`. Any other errors will be thrown as exceptions.
+ *
+ * @deprecated This function is deprecated in favor of `discoverAuthorizationServerMetadata`.
+ */
+export declare function discoverOAuthMetadata(issuer: string | URL, { authorizationServerUrl, protocolVersion }?: {
+ authorizationServerUrl?: string | URL;
+ protocolVersion?: string;
+}, fetchFn?: FetchLike): Promise;
+/**
+ * Builds a list of discovery URLs to try for authorization server metadata.
+ * URLs are returned in priority order:
+ * 1. OAuth metadata at the given URL
+ * 2. OIDC metadata endpoints at the given URL
+ */
+export declare function buildDiscoveryUrls(authorizationServerUrl: string | URL): {
+ url: URL;
+ type: 'oauth' | 'oidc';
+}[];
+/**
+ * Discovers authorization server metadata with support for RFC 8414 OAuth 2.0 Authorization Server Metadata
+ * and OpenID Connect Discovery 1.0 specifications.
+ *
+ * This function implements a fallback strategy for authorization server discovery:
+ * 1. Attempts RFC 8414 OAuth metadata discovery first
+ * 2. If OAuth discovery fails, falls back to OpenID Connect Discovery
+ *
+ * @param authorizationServerUrl - The authorization server URL obtained from the MCP Server's
+ * protected resource metadata, or the MCP server's URL if the
+ * metadata was not found.
+ * @param options - Configuration options
+ * @param options.fetchFn - Optional fetch function for making HTTP requests, defaults to global fetch
+ * @param options.protocolVersion - MCP protocol version to use, defaults to LATEST_PROTOCOL_VERSION
+ * @returns Promise resolving to authorization server metadata, or undefined if discovery fails
+ */
+export declare function discoverAuthorizationServerMetadata(authorizationServerUrl: string | URL, { fetchFn, protocolVersion }?: {
+ fetchFn?: FetchLike;
+ protocolVersion?: string;
+}): Promise;
+/**
+ * Result of {@linkcode discoverOAuthServerInfo}.
+ */
+export interface OAuthServerInfo {
+ /**
+ * The authorization server URL, either discovered via RFC 9728
+ * or derived from the MCP server URL as a fallback.
+ */
+ authorizationServerUrl: string;
+ /**
+ * The authorization server metadata (endpoints, capabilities),
+ * or `undefined` if metadata discovery failed.
+ */
+ authorizationServerMetadata?: AuthorizationServerMetadata;
+ /**
+ * The OAuth 2.0 Protected Resource Metadata from RFC 9728,
+ * or `undefined` if the server does not support it.
+ */
+ resourceMetadata?: OAuthProtectedResourceMetadata;
+}
+/**
+ * Discovers the authorization server for an MCP server following
+ * {@link https://datatracker.ietf.org/doc/html/rfc9728 | RFC 9728} (OAuth 2.0 Protected
+ * Resource Metadata), with fallback to treating the server URL as the
+ * authorization server.
+ *
+ * This function combines two discovery steps into one call:
+ * 1. Probes `/.well-known/oauth-protected-resource` on the MCP server to find the
+ * authorization server URL (RFC 9728).
+ * 2. Fetches authorization server metadata from that URL (RFC 8414 / OpenID Connect Discovery).
+ *
+ * Use this when you need the authorization server metadata for operations outside the
+ * {@linkcode auth} orchestrator, such as token refresh or token revocation.
+ *
+ * @param serverUrl - The MCP resource server URL
+ * @param opts - Optional configuration
+ * @param opts.resourceMetadataUrl - Override URL for the protected resource metadata endpoint
+ * @param opts.fetchFn - Custom fetch function for HTTP requests
+ * @returns Authorization server URL, metadata, and resource metadata (if available)
+ */
+export declare function discoverOAuthServerInfo(serverUrl: string | URL, opts?: {
+ resourceMetadataUrl?: URL;
+ fetchFn?: FetchLike;
+}): Promise;
+/**
+ * Begins the authorization flow with the given server, by generating a PKCE challenge and constructing the authorization URL.
+ */
+export declare function startAuthorization(authorizationServerUrl: string | URL, { metadata, clientInformation, redirectUrl, scope, state, resource }: {
+ metadata?: AuthorizationServerMetadata;
+ clientInformation: OAuthClientInformationMixed;
+ redirectUrl: string | URL;
+ scope?: string;
+ state?: string;
+ resource?: URL;
+}): Promise<{
+ authorizationUrl: URL;
+ codeVerifier: string;
+}>;
+/**
+ * Prepares token request parameters for an authorization code exchange.
+ *
+ * This is the default implementation used by fetchToken when the provider
+ * doesn't implement prepareTokenRequest.
+ *
+ * @param authorizationCode - The authorization code received from the authorization endpoint
+ * @param codeVerifier - The PKCE code verifier
+ * @param redirectUri - The redirect URI used in the authorization request
+ * @returns URLSearchParams for the authorization_code grant
+ */
+export declare function prepareAuthorizationCodeRequest(authorizationCode: string, codeVerifier: string, redirectUri: string | URL): URLSearchParams;
+/**
+ * Exchanges an authorization code for an access token with the given server.
+ *
+ * Supports multiple client authentication methods as specified in OAuth 2.1:
+ * - Automatically selects the best authentication method based on server support
+ * - Falls back to appropriate defaults when server metadata is unavailable
+ *
+ * @param authorizationServerUrl - The authorization server's base URL
+ * @param options - Configuration object containing client info, auth code, etc.
+ * @returns Promise resolving to OAuth tokens
+ * @throws {Error} When token exchange fails or authentication is invalid
+ */
+export declare function exchangeAuthorization(authorizationServerUrl: string | URL, { metadata, clientInformation, authorizationCode, codeVerifier, redirectUri, resource, addClientAuthentication, fetchFn }: {
+ metadata?: AuthorizationServerMetadata;
+ clientInformation: OAuthClientInformationMixed;
+ authorizationCode: string;
+ codeVerifier: string;
+ redirectUri: string | URL;
+ resource?: URL;
+ addClientAuthentication?: OAuthClientProvider['addClientAuthentication'];
+ fetchFn?: FetchLike;
+}): Promise;
+/**
+ * Exchange a refresh token for an updated access token.
+ *
+ * Supports multiple client authentication methods as specified in OAuth 2.1:
+ * - Automatically selects the best authentication method based on server support
+ * - Preserves the original refresh token if a new one is not returned
+ *
+ * @param authorizationServerUrl - The authorization server's base URL
+ * @param options - Configuration object containing client info, refresh token, etc.
+ * @returns Promise resolving to OAuth tokens (preserves original refresh_token if not replaced)
+ * @throws {Error} When token refresh fails or authentication is invalid
+ */
+export declare function refreshAuthorization(authorizationServerUrl: string | URL, { metadata, clientInformation, refreshToken, resource, addClientAuthentication, fetchFn }: {
+ metadata?: AuthorizationServerMetadata;
+ clientInformation: OAuthClientInformationMixed;
+ refreshToken: string;
+ resource?: URL;
+ addClientAuthentication?: OAuthClientProvider['addClientAuthentication'];
+ fetchFn?: FetchLike;
+}): Promise;
+/**
+ * Unified token fetching that works with any grant type via provider.prepareTokenRequest().
+ *
+ * This function provides a single entry point for obtaining tokens regardless of the
+ * OAuth grant type. The provider's prepareTokenRequest() method determines which grant
+ * to use and supplies the grant-specific parameters.
+ *
+ * @param provider - OAuth client provider that implements prepareTokenRequest()
+ * @param authorizationServerUrl - The authorization server's base URL
+ * @param options - Configuration for the token request
+ * @returns Promise resolving to OAuth tokens
+ * @throws {Error} When provider doesn't implement prepareTokenRequest or token fetch fails
+ *
+ * @example
+ * // Provider for client_credentials:
+ * class MyProvider implements OAuthClientProvider {
+ * prepareTokenRequest(scope) {
+ * const params = new URLSearchParams({ grant_type: 'client_credentials' });
+ * if (scope) params.set('scope', scope);
+ * return params;
+ * }
+ * // ... other methods
+ * }
+ *
+ * const tokens = await fetchToken(provider, authServerUrl, { metadata });
+ */
+export declare function fetchToken(provider: OAuthClientProvider, authorizationServerUrl: string | URL, { metadata, resource, authorizationCode, fetchFn }?: {
+ metadata?: AuthorizationServerMetadata;
+ resource?: URL;
+ /** Authorization code for the default authorization_code grant flow */
+ authorizationCode?: string;
+ fetchFn?: FetchLike;
+}): Promise;
+/**
+ * Performs OAuth 2.0 Dynamic Client Registration according to RFC 7591.
+ *
+ * If `scope` is provided, it overrides `clientMetadata.scope` in the registration
+ * request body. This allows callers to apply the Scope Selection Strategy (SEP-835)
+ * consistently across both DCR and the subsequent authorization request.
+ */
+export declare function registerClient(authorizationServerUrl: string | URL, { metadata, clientMetadata, scope, fetchFn }: {
+ metadata?: AuthorizationServerMetadata;
+ clientMetadata: OAuthClientMetadata;
+ scope?: string;
+ fetchFn?: FetchLike;
+}): Promise;
+export {};
+//# sourceMappingURL=auth.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.d.ts.map
new file mode 100644
index 0000000..dbf70ba
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.d.ts.map
@@ -0,0 +1 @@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cAAc,EAAE,mBAAmB,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,CAAC;CACvB,GACF,OAAO,CAAC,0BAA0B,CAAC,CA6BrC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.js
new file mode 100644
index 0000000..c2e4fa9
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.js
@@ -0,0 +1,943 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.UnauthorizedError = void 0;
+exports.selectClientAuthMethod = selectClientAuthMethod;
+exports.parseErrorResponse = parseErrorResponse;
+exports.auth = auth;
+exports.isHttpsUrl = isHttpsUrl;
+exports.selectResourceURL = selectResourceURL;
+exports.extractWWWAuthenticateParams = extractWWWAuthenticateParams;
+exports.extractResourceMetadataUrl = extractResourceMetadataUrl;
+exports.discoverOAuthProtectedResourceMetadata = discoverOAuthProtectedResourceMetadata;
+exports.discoverOAuthMetadata = discoverOAuthMetadata;
+exports.buildDiscoveryUrls = buildDiscoveryUrls;
+exports.discoverAuthorizationServerMetadata = discoverAuthorizationServerMetadata;
+exports.discoverOAuthServerInfo = discoverOAuthServerInfo;
+exports.startAuthorization = startAuthorization;
+exports.prepareAuthorizationCodeRequest = prepareAuthorizationCodeRequest;
+exports.exchangeAuthorization = exchangeAuthorization;
+exports.refreshAuthorization = refreshAuthorization;
+exports.fetchToken = fetchToken;
+exports.registerClient = registerClient;
+const pkce_challenge_1 = __importDefault(require("pkce-challenge"));
+const types_js_1 = require("../types.js");
+const auth_js_1 = require("../shared/auth.js");
+const auth_js_2 = require("../shared/auth.js");
+const auth_utils_js_1 = require("../shared/auth-utils.js");
+const errors_js_1 = require("../server/auth/errors.js");
+class UnauthorizedError extends Error {
+ constructor(message) {
+ super(message ?? 'Unauthorized');
+ }
+}
+exports.UnauthorizedError = UnauthorizedError;
+function isClientAuthMethod(method) {
+ return ['client_secret_basic', 'client_secret_post', 'none'].includes(method);
+}
+const AUTHORIZATION_CODE_RESPONSE_TYPE = 'code';
+const AUTHORIZATION_CODE_CHALLENGE_METHOD = 'S256';
+/**
+ * Determines the best client authentication method to use based on server support and client configuration.
+ *
+ * Priority order (highest to lowest):
+ * 1. client_secret_basic (if client secret is available)
+ * 2. client_secret_post (if client secret is available)
+ * 3. none (for public clients)
+ *
+ * @param clientInformation - OAuth client information containing credentials
+ * @param supportedMethods - Authentication methods supported by the authorization server
+ * @returns The selected authentication method
+ */
+function selectClientAuthMethod(clientInformation, supportedMethods) {
+ const hasClientSecret = clientInformation.client_secret !== undefined;
+ // Prefer the method returned by the server during client registration, if valid.
+ // When server metadata is present we also require the method to be listed as supported;
+ // when supportedMethods is empty (metadata omitted the field) the DCR hint stands alone.
+ if ('token_endpoint_auth_method' in clientInformation &&
+ clientInformation.token_endpoint_auth_method &&
+ isClientAuthMethod(clientInformation.token_endpoint_auth_method) &&
+ (supportedMethods.length === 0 || supportedMethods.includes(clientInformation.token_endpoint_auth_method))) {
+ return clientInformation.token_endpoint_auth_method;
+ }
+ // If server metadata omits token_endpoint_auth_methods_supported, RFC 8414 §2 says the
+ // default is client_secret_basic. RFC 6749 §2.3.1 also requires servers to support HTTP
+ // Basic authentication for clients with a secret, making it the safest default.
+ if (supportedMethods.length === 0) {
+ return hasClientSecret ? 'client_secret_basic' : 'none';
+ }
+ // Try methods in priority order (most secure first)
+ if (hasClientSecret && supportedMethods.includes('client_secret_basic')) {
+ return 'client_secret_basic';
+ }
+ if (hasClientSecret && supportedMethods.includes('client_secret_post')) {
+ return 'client_secret_post';
+ }
+ if (supportedMethods.includes('none')) {
+ return 'none';
+ }
+ // Fallback: use what we have
+ return hasClientSecret ? 'client_secret_post' : 'none';
+}
+/**
+ * Applies client authentication to the request based on the specified method.
+ *
+ * Implements OAuth 2.1 client authentication methods:
+ * - client_secret_basic: HTTP Basic authentication (RFC 6749 Section 2.3.1)
+ * - client_secret_post: Credentials in request body (RFC 6749 Section 2.3.1)
+ * - none: Public client authentication (RFC 6749 Section 2.1)
+ *
+ * @param method - The authentication method to use
+ * @param clientInformation - OAuth client information containing credentials
+ * @param headers - HTTP headers object to modify
+ * @param params - URL search parameters to modify
+ * @throws {Error} When required credentials are missing
+ */
+function applyClientAuthentication(method, clientInformation, headers, params) {
+ const { client_id, client_secret } = clientInformation;
+ switch (method) {
+ case 'client_secret_basic':
+ applyBasicAuth(client_id, client_secret, headers);
+ return;
+ case 'client_secret_post':
+ applyPostAuth(client_id, client_secret, params);
+ return;
+ case 'none':
+ applyPublicAuth(client_id, params);
+ return;
+ default:
+ throw new Error(`Unsupported client authentication method: ${method}`);
+ }
+}
+/**
+ * Applies HTTP Basic authentication (RFC 6749 Section 2.3.1)
+ */
+function applyBasicAuth(clientId, clientSecret, headers) {
+ if (!clientSecret) {
+ throw new Error('client_secret_basic authentication requires a client_secret');
+ }
+ const credentials = btoa(`${clientId}:${clientSecret}`);
+ headers.set('Authorization', `Basic ${credentials}`);
+}
+/**
+ * Applies POST body authentication (RFC 6749 Section 2.3.1)
+ */
+function applyPostAuth(clientId, clientSecret, params) {
+ params.set('client_id', clientId);
+ if (clientSecret) {
+ params.set('client_secret', clientSecret);
+ }
+}
+/**
+ * Applies public client authentication (RFC 6749 Section 2.1)
+ */
+function applyPublicAuth(clientId, params) {
+ params.set('client_id', clientId);
+}
+/**
+ * Parses an OAuth error response from a string or Response object.
+ *
+ * If the input is a standard OAuth2.0 error response, it will be parsed according to the spec
+ * and an instance of the appropriate OAuthError subclass will be returned.
+ * If parsing fails, it falls back to a generic ServerError that includes
+ * the response status (if available) and original content.
+ *
+ * @param input - A Response object or string containing the error response
+ * @returns A Promise that resolves to an OAuthError instance
+ */
+async function parseErrorResponse(input) {
+ const statusCode = input instanceof Response ? input.status : undefined;
+ const body = input instanceof Response ? await input.text() : input;
+ try {
+ const result = auth_js_1.OAuthErrorResponseSchema.parse(JSON.parse(body));
+ const { error, error_description, error_uri } = result;
+ const errorClass = errors_js_1.OAUTH_ERRORS[error] || errors_js_1.ServerError;
+ return new errorClass(error_description || '', error_uri);
+ }
+ catch (error) {
+ // Not a valid OAuth error response, but try to inform the user of the raw data anyway
+ const errorMessage = `${statusCode ? `HTTP ${statusCode}: ` : ''}Invalid OAuth error response: ${error}. Raw body: ${body}`;
+ return new errors_js_1.ServerError(errorMessage);
+ }
+}
+/**
+ * Orchestrates the full auth flow with a server.
+ *
+ * This can be used as a single entry point for all authorization functionality,
+ * instead of linking together the other lower-level functions in this module.
+ */
+async function auth(provider, options) {
+ try {
+ return await authInternal(provider, options);
+ }
+ catch (error) {
+ // Handle recoverable error types by invalidating credentials and retrying
+ if (error instanceof errors_js_1.InvalidClientError || error instanceof errors_js_1.UnauthorizedClientError) {
+ await provider.invalidateCredentials?.('all');
+ return await authInternal(provider, options);
+ }
+ else if (error instanceof errors_js_1.InvalidGrantError) {
+ await provider.invalidateCredentials?.('tokens');
+ return await authInternal(provider, options);
+ }
+ // Throw otherwise
+ throw error;
+ }
+}
+async function authInternal(provider, { serverUrl, authorizationCode, scope, resourceMetadataUrl, fetchFn }) {
+ // Check if the provider has cached discovery state to skip discovery
+ const cachedState = await provider.discoveryState?.();
+ let resourceMetadata;
+ let authorizationServerUrl;
+ let metadata;
+ // If resourceMetadataUrl is not provided, try to load it from cached state
+ // This handles browser redirects where the URL was saved before navigation
+ let effectiveResourceMetadataUrl = resourceMetadataUrl;
+ if (!effectiveResourceMetadataUrl && cachedState?.resourceMetadataUrl) {
+ effectiveResourceMetadataUrl = new URL(cachedState.resourceMetadataUrl);
+ }
+ if (cachedState?.authorizationServerUrl) {
+ // Restore discovery state from cache
+ authorizationServerUrl = cachedState.authorizationServerUrl;
+ resourceMetadata = cachedState.resourceMetadata;
+ metadata =
+ cachedState.authorizationServerMetadata ?? (await discoverAuthorizationServerMetadata(authorizationServerUrl, { fetchFn }));
+ // If resource metadata wasn't cached, try to fetch it for selectResourceURL
+ if (!resourceMetadata) {
+ try {
+ resourceMetadata = await discoverOAuthProtectedResourceMetadata(serverUrl, { resourceMetadataUrl: effectiveResourceMetadataUrl }, fetchFn);
+ }
+ catch {
+ // RFC 9728 not available — selectResourceURL will handle undefined
+ }
+ }
+ // Re-save if we enriched the cached state with missing metadata
+ if (metadata !== cachedState.authorizationServerMetadata || resourceMetadata !== cachedState.resourceMetadata) {
+ await provider.saveDiscoveryState?.({
+ authorizationServerUrl: String(authorizationServerUrl),
+ resourceMetadataUrl: effectiveResourceMetadataUrl?.toString(),
+ resourceMetadata,
+ authorizationServerMetadata: metadata
+ });
+ }
+ }
+ else {
+ // Full discovery via RFC 9728
+ const serverInfo = await discoverOAuthServerInfo(serverUrl, { resourceMetadataUrl: effectiveResourceMetadataUrl, fetchFn });
+ authorizationServerUrl = serverInfo.authorizationServerUrl;
+ metadata = serverInfo.authorizationServerMetadata;
+ resourceMetadata = serverInfo.resourceMetadata;
+ // Persist discovery state for future use
+ // TODO: resourceMetadataUrl is only populated when explicitly provided via options
+ // or loaded from cached state. The URL derived internally by
+ // discoverOAuthProtectedResourceMetadata() is not captured back here.
+ await provider.saveDiscoveryState?.({
+ authorizationServerUrl: String(authorizationServerUrl),
+ resourceMetadataUrl: effectiveResourceMetadataUrl?.toString(),
+ resourceMetadata,
+ authorizationServerMetadata: metadata
+ });
+ }
+ const resource = await selectResourceURL(serverUrl, provider, resourceMetadata);
+ // Apply scope selection strategy (SEP-835):
+ // 1. WWW-Authenticate scope (passed via `scope` param)
+ // 2. PRM scopes_supported
+ // 3. Client metadata scope (user-configured fallback)
+ // The resolved scope is used consistently for both DCR and the authorization request.
+ const resolvedScope = scope || resourceMetadata?.scopes_supported?.join(' ') || provider.clientMetadata.scope;
+ // Handle client registration if needed
+ let clientInformation = await Promise.resolve(provider.clientInformation());
+ if (!clientInformation) {
+ if (authorizationCode !== undefined) {
+ throw new Error('Existing OAuth client information is required when exchanging an authorization code');
+ }
+ const supportsUrlBasedClientId = metadata?.client_id_metadata_document_supported === true;
+ const clientMetadataUrl = provider.clientMetadataUrl;
+ if (clientMetadataUrl && !isHttpsUrl(clientMetadataUrl)) {
+ throw new errors_js_1.InvalidClientMetadataError(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${clientMetadataUrl}`);
+ }
+ const shouldUseUrlBasedClientId = supportsUrlBasedClientId && clientMetadataUrl;
+ if (shouldUseUrlBasedClientId) {
+ // SEP-991: URL-based Client IDs
+ clientInformation = {
+ client_id: clientMetadataUrl
+ };
+ await provider.saveClientInformation?.(clientInformation);
+ }
+ else {
+ // Fallback to dynamic registration
+ if (!provider.saveClientInformation) {
+ throw new Error('OAuth client information must be saveable for dynamic registration');
+ }
+ const fullInformation = await registerClient(authorizationServerUrl, {
+ metadata,
+ clientMetadata: provider.clientMetadata,
+ scope: resolvedScope,
+ fetchFn
+ });
+ await provider.saveClientInformation(fullInformation);
+ clientInformation = fullInformation;
+ }
+ }
+ // Non-interactive flows (e.g., client_credentials, jwt-bearer) don't need a redirect URL
+ const nonInteractiveFlow = !provider.redirectUrl;
+ // Exchange authorization code for tokens, or fetch tokens directly for non-interactive flows
+ if (authorizationCode !== undefined || nonInteractiveFlow) {
+ const tokens = await fetchToken(provider, authorizationServerUrl, {
+ metadata,
+ resource,
+ authorizationCode,
+ fetchFn
+ });
+ await provider.saveTokens(tokens);
+ return 'AUTHORIZED';
+ }
+ const tokens = await provider.tokens();
+ // Handle token refresh or new authorization
+ if (tokens?.refresh_token) {
+ try {
+ // Attempt to refresh the token
+ const newTokens = await refreshAuthorization(authorizationServerUrl, {
+ metadata,
+ clientInformation,
+ refreshToken: tokens.refresh_token,
+ resource,
+ addClientAuthentication: provider.addClientAuthentication,
+ fetchFn
+ });
+ await provider.saveTokens(newTokens);
+ return 'AUTHORIZED';
+ }
+ catch (error) {
+ // If this is a ServerError, or an unknown type, log it out and try to continue. Otherwise, escalate so we can fix things and retry.
+ if (!(error instanceof errors_js_1.OAuthError) || error instanceof errors_js_1.ServerError) {
+ // Could not refresh OAuth tokens
+ }
+ else {
+ // Refresh failed for another reason, re-throw
+ throw error;
+ }
+ }
+ }
+ const state = provider.state ? await provider.state() : undefined;
+ // Start new authorization flow
+ const { authorizationUrl, codeVerifier } = await startAuthorization(authorizationServerUrl, {
+ metadata,
+ clientInformation,
+ state,
+ redirectUrl: provider.redirectUrl,
+ scope: resolvedScope,
+ resource
+ });
+ await provider.saveCodeVerifier(codeVerifier);
+ await provider.redirectToAuthorization(authorizationUrl);
+ return 'REDIRECT';
+}
+/**
+ * SEP-991: URL-based Client IDs
+ * Validate that the client_id is a valid URL with https scheme
+ */
+function isHttpsUrl(value) {
+ if (!value)
+ return false;
+ try {
+ const url = new URL(value);
+ return url.protocol === 'https:' && url.pathname !== '/';
+ }
+ catch {
+ return false;
+ }
+}
+async function selectResourceURL(serverUrl, provider, resourceMetadata) {
+ const defaultResource = (0, auth_utils_js_1.resourceUrlFromServerUrl)(serverUrl);
+ // If provider has custom validation, delegate to it
+ if (provider.validateResourceURL) {
+ return await provider.validateResourceURL(defaultResource, resourceMetadata?.resource);
+ }
+ // Only include resource parameter when Protected Resource Metadata is present
+ if (!resourceMetadata) {
+ return undefined;
+ }
+ // Validate that the metadata's resource is compatible with our request
+ if (!(0, auth_utils_js_1.checkResourceAllowed)({ requestedResource: defaultResource, configuredResource: resourceMetadata.resource })) {
+ throw new Error(`Protected resource ${resourceMetadata.resource} does not match expected ${defaultResource} (or origin)`);
+ }
+ // Prefer the resource from metadata since it's what the server is telling us to request
+ return new URL(resourceMetadata.resource);
+}
+/**
+ * Extract resource_metadata, scope, and error from WWW-Authenticate header.
+ */
+function extractWWWAuthenticateParams(res) {
+ const authenticateHeader = res.headers.get('WWW-Authenticate');
+ if (!authenticateHeader) {
+ return {};
+ }
+ const [type, scheme] = authenticateHeader.split(' ');
+ if (type.toLowerCase() !== 'bearer' || !scheme) {
+ return {};
+ }
+ const resourceMetadataMatch = extractFieldFromWwwAuth(res, 'resource_metadata') || undefined;
+ let resourceMetadataUrl;
+ if (resourceMetadataMatch) {
+ try {
+ resourceMetadataUrl = new URL(resourceMetadataMatch);
+ }
+ catch {
+ // Ignore invalid URL
+ }
+ }
+ const scope = extractFieldFromWwwAuth(res, 'scope') || undefined;
+ const error = extractFieldFromWwwAuth(res, 'error') || undefined;
+ return {
+ resourceMetadataUrl,
+ scope,
+ error
+ };
+}
+/**
+ * Extracts a specific field's value from the WWW-Authenticate header string.
+ *
+ * @param response The HTTP response object containing the headers.
+ * @param fieldName The name of the field to extract (e.g., "realm", "nonce").
+ * @returns The field value
+ */
+function extractFieldFromWwwAuth(response, fieldName) {
+ const wwwAuthHeader = response.headers.get('WWW-Authenticate');
+ if (!wwwAuthHeader) {
+ return null;
+ }
+ const pattern = new RegExp(`${fieldName}=(?:"([^"]+)"|([^\\s,]+))`);
+ const match = wwwAuthHeader.match(pattern);
+ if (match) {
+ // Pattern matches: field_name="value" or field_name=value (unquoted)
+ return match[1] || match[2];
+ }
+ return null;
+}
+/**
+ * Extract resource_metadata from response header.
+ * @deprecated Use `extractWWWAuthenticateParams` instead.
+ */
+function extractResourceMetadataUrl(res) {
+ const authenticateHeader = res.headers.get('WWW-Authenticate');
+ if (!authenticateHeader) {
+ return undefined;
+ }
+ const [type, scheme] = authenticateHeader.split(' ');
+ if (type.toLowerCase() !== 'bearer' || !scheme) {
+ return undefined;
+ }
+ const regex = /resource_metadata="([^"]*)"/;
+ const match = regex.exec(authenticateHeader);
+ if (!match) {
+ return undefined;
+ }
+ try {
+ return new URL(match[1]);
+ }
+ catch {
+ return undefined;
+ }
+}
+/**
+ * Looks up RFC 9728 OAuth 2.0 Protected Resource Metadata.
+ *
+ * If the server returns a 404 for the well-known endpoint, this function will
+ * return `undefined`. Any other errors will be thrown as exceptions.
+ */
+async function discoverOAuthProtectedResourceMetadata(serverUrl, opts, fetchFn = fetch) {
+ const response = await discoverMetadataWithFallback(serverUrl, 'oauth-protected-resource', fetchFn, {
+ protocolVersion: opts?.protocolVersion,
+ metadataUrl: opts?.resourceMetadataUrl
+ });
+ if (!response || response.status === 404) {
+ await response?.body?.cancel();
+ throw new Error(`Resource server does not implement OAuth 2.0 Protected Resource Metadata.`);
+ }
+ if (!response.ok) {
+ await response.body?.cancel();
+ throw new Error(`HTTP ${response.status} trying to load well-known OAuth protected resource metadata.`);
+ }
+ return auth_js_2.OAuthProtectedResourceMetadataSchema.parse(await response.json());
+}
+/**
+ * Helper function to handle fetch with CORS retry logic
+ */
+async function fetchWithCorsRetry(url, headers, fetchFn = fetch) {
+ try {
+ return await fetchFn(url, { headers });
+ }
+ catch (error) {
+ if (error instanceof TypeError) {
+ if (headers) {
+ // CORS errors come back as TypeError, retry without headers
+ return fetchWithCorsRetry(url, undefined, fetchFn);
+ }
+ else {
+ // We're getting CORS errors on retry too, return undefined
+ return undefined;
+ }
+ }
+ throw error;
+ }
+}
+/**
+ * Constructs the well-known path for auth-related metadata discovery
+ */
+function buildWellKnownPath(wellKnownPrefix, pathname = '', options = {}) {
+ // Strip trailing slash from pathname to avoid double slashes
+ if (pathname.endsWith('/')) {
+ pathname = pathname.slice(0, -1);
+ }
+ return options.prependPathname ? `${pathname}/.well-known/${wellKnownPrefix}` : `/.well-known/${wellKnownPrefix}${pathname}`;
+}
+/**
+ * Tries to discover OAuth metadata at a specific URL
+ */
+async function tryMetadataDiscovery(url, protocolVersion, fetchFn = fetch) {
+ const headers = {
+ 'MCP-Protocol-Version': protocolVersion
+ };
+ return await fetchWithCorsRetry(url, headers, fetchFn);
+}
+/**
+ * Determines if fallback to root discovery should be attempted
+ */
+function shouldAttemptFallback(response, pathname) {
+ return !response || (response.status >= 400 && response.status < 500 && pathname !== '/');
+}
+/**
+ * Generic function for discovering OAuth metadata with fallback support
+ */
+async function discoverMetadataWithFallback(serverUrl, wellKnownType, fetchFn, opts) {
+ const issuer = new URL(serverUrl);
+ const protocolVersion = opts?.protocolVersion ?? types_js_1.LATEST_PROTOCOL_VERSION;
+ let url;
+ if (opts?.metadataUrl) {
+ url = new URL(opts.metadataUrl);
+ }
+ else {
+ // Try path-aware discovery first
+ const wellKnownPath = buildWellKnownPath(wellKnownType, issuer.pathname);
+ url = new URL(wellKnownPath, opts?.metadataServerUrl ?? issuer);
+ url.search = issuer.search;
+ }
+ let response = await tryMetadataDiscovery(url, protocolVersion, fetchFn);
+ // If path-aware discovery fails with 404 and we're not already at root, try fallback to root discovery
+ if (!opts?.metadataUrl && shouldAttemptFallback(response, issuer.pathname)) {
+ const rootUrl = new URL(`/.well-known/${wellKnownType}`, issuer);
+ response = await tryMetadataDiscovery(rootUrl, protocolVersion, fetchFn);
+ }
+ return response;
+}
+/**
+ * Looks up RFC 8414 OAuth 2.0 Authorization Server Metadata.
+ *
+ * If the server returns a 404 for the well-known endpoint, this function will
+ * return `undefined`. Any other errors will be thrown as exceptions.
+ *
+ * @deprecated This function is deprecated in favor of `discoverAuthorizationServerMetadata`.
+ */
+async function discoverOAuthMetadata(issuer, { authorizationServerUrl, protocolVersion } = {}, fetchFn = fetch) {
+ if (typeof issuer === 'string') {
+ issuer = new URL(issuer);
+ }
+ if (!authorizationServerUrl) {
+ authorizationServerUrl = issuer;
+ }
+ if (typeof authorizationServerUrl === 'string') {
+ authorizationServerUrl = new URL(authorizationServerUrl);
+ }
+ protocolVersion ?? (protocolVersion = types_js_1.LATEST_PROTOCOL_VERSION);
+ const response = await discoverMetadataWithFallback(authorizationServerUrl, 'oauth-authorization-server', fetchFn, {
+ protocolVersion,
+ metadataServerUrl: authorizationServerUrl
+ });
+ if (!response || response.status === 404) {
+ await response?.body?.cancel();
+ return undefined;
+ }
+ if (!response.ok) {
+ await response.body?.cancel();
+ throw new Error(`HTTP ${response.status} trying to load well-known OAuth metadata`);
+ }
+ return auth_js_2.OAuthMetadataSchema.parse(await response.json());
+}
+/**
+ * Builds a list of discovery URLs to try for authorization server metadata.
+ * URLs are returned in priority order:
+ * 1. OAuth metadata at the given URL
+ * 2. OIDC metadata endpoints at the given URL
+ */
+function buildDiscoveryUrls(authorizationServerUrl) {
+ const url = typeof authorizationServerUrl === 'string' ? new URL(authorizationServerUrl) : authorizationServerUrl;
+ const hasPath = url.pathname !== '/';
+ const urlsToTry = [];
+ if (!hasPath) {
+ // Root path: https://example.com/.well-known/oauth-authorization-server
+ urlsToTry.push({
+ url: new URL('/.well-known/oauth-authorization-server', url.origin),
+ type: 'oauth'
+ });
+ // OIDC: https://example.com/.well-known/openid-configuration
+ urlsToTry.push({
+ url: new URL(`/.well-known/openid-configuration`, url.origin),
+ type: 'oidc'
+ });
+ return urlsToTry;
+ }
+ // Strip trailing slash from pathname to avoid double slashes
+ let pathname = url.pathname;
+ if (pathname.endsWith('/')) {
+ pathname = pathname.slice(0, -1);
+ }
+ // 1. OAuth metadata at the given URL
+ // Insert well-known before the path: https://example.com/.well-known/oauth-authorization-server/tenant1
+ urlsToTry.push({
+ url: new URL(`/.well-known/oauth-authorization-server${pathname}`, url.origin),
+ type: 'oauth'
+ });
+ // 2. OIDC metadata endpoints
+ // RFC 8414 style: Insert /.well-known/openid-configuration before the path
+ urlsToTry.push({
+ url: new URL(`/.well-known/openid-configuration${pathname}`, url.origin),
+ type: 'oidc'
+ });
+ // OIDC Discovery 1.0 style: Append /.well-known/openid-configuration after the path
+ urlsToTry.push({
+ url: new URL(`${pathname}/.well-known/openid-configuration`, url.origin),
+ type: 'oidc'
+ });
+ return urlsToTry;
+}
+/**
+ * Discovers authorization server metadata with support for RFC 8414 OAuth 2.0 Authorization Server Metadata
+ * and OpenID Connect Discovery 1.0 specifications.
+ *
+ * This function implements a fallback strategy for authorization server discovery:
+ * 1. Attempts RFC 8414 OAuth metadata discovery first
+ * 2. If OAuth discovery fails, falls back to OpenID Connect Discovery
+ *
+ * @param authorizationServerUrl - The authorization server URL obtained from the MCP Server's
+ * protected resource metadata, or the MCP server's URL if the
+ * metadata was not found.
+ * @param options - Configuration options
+ * @param options.fetchFn - Optional fetch function for making HTTP requests, defaults to global fetch
+ * @param options.protocolVersion - MCP protocol version to use, defaults to LATEST_PROTOCOL_VERSION
+ * @returns Promise resolving to authorization server metadata, or undefined if discovery fails
+ */
+async function discoverAuthorizationServerMetadata(authorizationServerUrl, { fetchFn = fetch, protocolVersion = types_js_1.LATEST_PROTOCOL_VERSION } = {}) {
+ const headers = {
+ 'MCP-Protocol-Version': protocolVersion,
+ Accept: 'application/json'
+ };
+ // Get the list of URLs to try
+ const urlsToTry = buildDiscoveryUrls(authorizationServerUrl);
+ // Try each URL in order
+ for (const { url: endpointUrl, type } of urlsToTry) {
+ const response = await fetchWithCorsRetry(endpointUrl, headers, fetchFn);
+ if (!response) {
+ /**
+ * CORS error occurred - don't throw as the endpoint may not allow CORS,
+ * continue trying other possible endpoints
+ */
+ continue;
+ }
+ if (!response.ok) {
+ await response.body?.cancel();
+ // Continue looking for any 4xx response code.
+ if (response.status >= 400 && response.status < 500) {
+ continue; // Try next URL
+ }
+ throw new Error(`HTTP ${response.status} trying to load ${type === 'oauth' ? 'OAuth' : 'OpenID provider'} metadata from ${endpointUrl}`);
+ }
+ // Parse and validate based on type
+ if (type === 'oauth') {
+ return auth_js_2.OAuthMetadataSchema.parse(await response.json());
+ }
+ else {
+ return auth_js_1.OpenIdProviderDiscoveryMetadataSchema.parse(await response.json());
+ }
+ }
+ return undefined;
+}
+/**
+ * Discovers the authorization server for an MCP server following
+ * {@link https://datatracker.ietf.org/doc/html/rfc9728 | RFC 9728} (OAuth 2.0 Protected
+ * Resource Metadata), with fallback to treating the server URL as the
+ * authorization server.
+ *
+ * This function combines two discovery steps into one call:
+ * 1. Probes `/.well-known/oauth-protected-resource` on the MCP server to find the
+ * authorization server URL (RFC 9728).
+ * 2. Fetches authorization server metadata from that URL (RFC 8414 / OpenID Connect Discovery).
+ *
+ * Use this when you need the authorization server metadata for operations outside the
+ * {@linkcode auth} orchestrator, such as token refresh or token revocation.
+ *
+ * @param serverUrl - The MCP resource server URL
+ * @param opts - Optional configuration
+ * @param opts.resourceMetadataUrl - Override URL for the protected resource metadata endpoint
+ * @param opts.fetchFn - Custom fetch function for HTTP requests
+ * @returns Authorization server URL, metadata, and resource metadata (if available)
+ */
+async function discoverOAuthServerInfo(serverUrl, opts) {
+ let resourceMetadata;
+ let authorizationServerUrl;
+ try {
+ resourceMetadata = await discoverOAuthProtectedResourceMetadata(serverUrl, { resourceMetadataUrl: opts?.resourceMetadataUrl }, opts?.fetchFn);
+ if (resourceMetadata.authorization_servers && resourceMetadata.authorization_servers.length > 0) {
+ authorizationServerUrl = resourceMetadata.authorization_servers[0];
+ }
+ }
+ catch {
+ // RFC 9728 not supported -- fall back to treating the server URL as the authorization server
+ }
+ // If we don't get a valid authorization server from protected resource metadata,
+ // fall back to the legacy MCP spec behavior: MCP server base URL acts as the authorization server
+ if (!authorizationServerUrl) {
+ authorizationServerUrl = String(new URL('/', serverUrl));
+ }
+ const authorizationServerMetadata = await discoverAuthorizationServerMetadata(authorizationServerUrl, { fetchFn: opts?.fetchFn });
+ return {
+ authorizationServerUrl,
+ authorizationServerMetadata,
+ resourceMetadata
+ };
+}
+/**
+ * Begins the authorization flow with the given server, by generating a PKCE challenge and constructing the authorization URL.
+ */
+async function startAuthorization(authorizationServerUrl, { metadata, clientInformation, redirectUrl, scope, state, resource }) {
+ let authorizationUrl;
+ if (metadata) {
+ authorizationUrl = new URL(metadata.authorization_endpoint);
+ if (!metadata.response_types_supported.includes(AUTHORIZATION_CODE_RESPONSE_TYPE)) {
+ throw new Error(`Incompatible auth server: does not support response type ${AUTHORIZATION_CODE_RESPONSE_TYPE}`);
+ }
+ if (metadata.code_challenge_methods_supported &&
+ !metadata.code_challenge_methods_supported.includes(AUTHORIZATION_CODE_CHALLENGE_METHOD)) {
+ throw new Error(`Incompatible auth server: does not support code challenge method ${AUTHORIZATION_CODE_CHALLENGE_METHOD}`);
+ }
+ }
+ else {
+ authorizationUrl = new URL('/authorize', authorizationServerUrl);
+ }
+ // Generate PKCE challenge
+ const challenge = await (0, pkce_challenge_1.default)();
+ const codeVerifier = challenge.code_verifier;
+ const codeChallenge = challenge.code_challenge;
+ authorizationUrl.searchParams.set('response_type', AUTHORIZATION_CODE_RESPONSE_TYPE);
+ authorizationUrl.searchParams.set('client_id', clientInformation.client_id);
+ authorizationUrl.searchParams.set('code_challenge', codeChallenge);
+ authorizationUrl.searchParams.set('code_challenge_method', AUTHORIZATION_CODE_CHALLENGE_METHOD);
+ authorizationUrl.searchParams.set('redirect_uri', String(redirectUrl));
+ if (state) {
+ authorizationUrl.searchParams.set('state', state);
+ }
+ if (scope) {
+ authorizationUrl.searchParams.set('scope', scope);
+ }
+ if (scope?.includes('offline_access')) {
+ // if the request includes the OIDC-only "offline_access" scope,
+ // we need to set the prompt to "consent" to ensure the user is prompted to grant offline access
+ // https://openid.net/specs/openid-connect-core-1_0.html#OfflineAccess
+ authorizationUrl.searchParams.append('prompt', 'consent');
+ }
+ if (resource) {
+ authorizationUrl.searchParams.set('resource', resource.href);
+ }
+ return { authorizationUrl, codeVerifier };
+}
+/**
+ * Prepares token request parameters for an authorization code exchange.
+ *
+ * This is the default implementation used by fetchToken when the provider
+ * doesn't implement prepareTokenRequest.
+ *
+ * @param authorizationCode - The authorization code received from the authorization endpoint
+ * @param codeVerifier - The PKCE code verifier
+ * @param redirectUri - The redirect URI used in the authorization request
+ * @returns URLSearchParams for the authorization_code grant
+ */
+function prepareAuthorizationCodeRequest(authorizationCode, codeVerifier, redirectUri) {
+ return new URLSearchParams({
+ grant_type: 'authorization_code',
+ code: authorizationCode,
+ code_verifier: codeVerifier,
+ redirect_uri: String(redirectUri)
+ });
+}
+/**
+ * Internal helper to execute a token request with the given parameters.
+ * Used by exchangeAuthorization, refreshAuthorization, and fetchToken.
+ */
+async function executeTokenRequest(authorizationServerUrl, { metadata, tokenRequestParams, clientInformation, addClientAuthentication, resource, fetchFn }) {
+ const tokenUrl = metadata?.token_endpoint ? new URL(metadata.token_endpoint) : new URL('/token', authorizationServerUrl);
+ const headers = new Headers({
+ 'Content-Type': 'application/x-www-form-urlencoded',
+ Accept: 'application/json'
+ });
+ if (resource) {
+ tokenRequestParams.set('resource', resource.href);
+ }
+ if (addClientAuthentication) {
+ await addClientAuthentication(headers, tokenRequestParams, tokenUrl, metadata);
+ }
+ else if (clientInformation) {
+ const supportedMethods = metadata?.token_endpoint_auth_methods_supported ?? [];
+ const authMethod = selectClientAuthMethod(clientInformation, supportedMethods);
+ applyClientAuthentication(authMethod, clientInformation, headers, tokenRequestParams);
+ }
+ const response = await (fetchFn ?? fetch)(tokenUrl, {
+ method: 'POST',
+ headers,
+ body: tokenRequestParams
+ });
+ if (!response.ok) {
+ throw await parseErrorResponse(response);
+ }
+ return auth_js_2.OAuthTokensSchema.parse(await response.json());
+}
+/**
+ * Exchanges an authorization code for an access token with the given server.
+ *
+ * Supports multiple client authentication methods as specified in OAuth 2.1:
+ * - Automatically selects the best authentication method based on server support
+ * - Falls back to appropriate defaults when server metadata is unavailable
+ *
+ * @param authorizationServerUrl - The authorization server's base URL
+ * @param options - Configuration object containing client info, auth code, etc.
+ * @returns Promise resolving to OAuth tokens
+ * @throws {Error} When token exchange fails or authentication is invalid
+ */
+async function exchangeAuthorization(authorizationServerUrl, { metadata, clientInformation, authorizationCode, codeVerifier, redirectUri, resource, addClientAuthentication, fetchFn }) {
+ const tokenRequestParams = prepareAuthorizationCodeRequest(authorizationCode, codeVerifier, redirectUri);
+ return executeTokenRequest(authorizationServerUrl, {
+ metadata,
+ tokenRequestParams,
+ clientInformation,
+ addClientAuthentication,
+ resource,
+ fetchFn
+ });
+}
+/**
+ * Exchange a refresh token for an updated access token.
+ *
+ * Supports multiple client authentication methods as specified in OAuth 2.1:
+ * - Automatically selects the best authentication method based on server support
+ * - Preserves the original refresh token if a new one is not returned
+ *
+ * @param authorizationServerUrl - The authorization server's base URL
+ * @param options - Configuration object containing client info, refresh token, etc.
+ * @returns Promise resolving to OAuth tokens (preserves original refresh_token if not replaced)
+ * @throws {Error} When token refresh fails or authentication is invalid
+ */
+async function refreshAuthorization(authorizationServerUrl, { metadata, clientInformation, refreshToken, resource, addClientAuthentication, fetchFn }) {
+ const tokenRequestParams = new URLSearchParams({
+ grant_type: 'refresh_token',
+ refresh_token: refreshToken
+ });
+ const tokens = await executeTokenRequest(authorizationServerUrl, {
+ metadata,
+ tokenRequestParams,
+ clientInformation,
+ addClientAuthentication,
+ resource,
+ fetchFn
+ });
+ // Preserve original refresh token if server didn't return a new one
+ return { refresh_token: refreshToken, ...tokens };
+}
+/**
+ * Unified token fetching that works with any grant type via provider.prepareTokenRequest().
+ *
+ * This function provides a single entry point for obtaining tokens regardless of the
+ * OAuth grant type. The provider's prepareTokenRequest() method determines which grant
+ * to use and supplies the grant-specific parameters.
+ *
+ * @param provider - OAuth client provider that implements prepareTokenRequest()
+ * @param authorizationServerUrl - The authorization server's base URL
+ * @param options - Configuration for the token request
+ * @returns Promise resolving to OAuth tokens
+ * @throws {Error} When provider doesn't implement prepareTokenRequest or token fetch fails
+ *
+ * @example
+ * // Provider for client_credentials:
+ * class MyProvider implements OAuthClientProvider {
+ * prepareTokenRequest(scope) {
+ * const params = new URLSearchParams({ grant_type: 'client_credentials' });
+ * if (scope) params.set('scope', scope);
+ * return params;
+ * }
+ * // ... other methods
+ * }
+ *
+ * const tokens = await fetchToken(provider, authServerUrl, { metadata });
+ */
+async function fetchToken(provider, authorizationServerUrl, { metadata, resource, authorizationCode, fetchFn } = {}) {
+ const scope = provider.clientMetadata.scope;
+ // Use provider's prepareTokenRequest if available, otherwise fall back to authorization_code
+ let tokenRequestParams;
+ if (provider.prepareTokenRequest) {
+ tokenRequestParams = await provider.prepareTokenRequest(scope);
+ }
+ // Default to authorization_code grant if no custom prepareTokenRequest
+ if (!tokenRequestParams) {
+ if (!authorizationCode) {
+ throw new Error('Either provider.prepareTokenRequest() or authorizationCode is required');
+ }
+ if (!provider.redirectUrl) {
+ throw new Error('redirectUrl is required for authorization_code flow');
+ }
+ const codeVerifier = await provider.codeVerifier();
+ tokenRequestParams = prepareAuthorizationCodeRequest(authorizationCode, codeVerifier, provider.redirectUrl);
+ }
+ const clientInformation = await provider.clientInformation();
+ return executeTokenRequest(authorizationServerUrl, {
+ metadata,
+ tokenRequestParams,
+ clientInformation: clientInformation ?? undefined,
+ addClientAuthentication: provider.addClientAuthentication,
+ resource,
+ fetchFn
+ });
+}
+/**
+ * Performs OAuth 2.0 Dynamic Client Registration according to RFC 7591.
+ *
+ * If `scope` is provided, it overrides `clientMetadata.scope` in the registration
+ * request body. This allows callers to apply the Scope Selection Strategy (SEP-835)
+ * consistently across both DCR and the subsequent authorization request.
+ */
+async function registerClient(authorizationServerUrl, { metadata, clientMetadata, scope, fetchFn }) {
+ let registrationUrl;
+ if (metadata) {
+ if (!metadata.registration_endpoint) {
+ throw new Error('Incompatible auth server: does not support dynamic client registration');
+ }
+ registrationUrl = new URL(metadata.registration_endpoint);
+ }
+ else {
+ registrationUrl = new URL('/register', authorizationServerUrl);
+ }
+ const response = await (fetchFn ?? fetch)(registrationUrl, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify({
+ ...clientMetadata,
+ ...(scope !== undefined ? { scope } : {})
+ })
+ });
+ if (!response.ok) {
+ throw await parseErrorResponse(response);
+ }
+ return auth_js_2.OAuthClientInformationFullSchema.parse(await response.json());
+}
+//# sourceMappingURL=auth.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.js.map
new file mode 100644
index 0000000..c592874
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/client/auth.ts"],"names":[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AC,CAAC;IAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACf,MAAM,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,0CAAgC,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AACzE,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.d.ts
new file mode 100644
index 0000000..6f567a1
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.d.ts
@@ -0,0 +1,591 @@
+import { Protocol, type ProtocolOptions, type RequestOptions } from '../shared/protocol.js';
+import type { Transport } from '../shared/transport.js';
+import { type CallToolRequest, CallToolResultSchema, type ClientCapabilities, type ClientNotification, type ClientRequest, type ClientResult, type CompatibilityCallToolResultSchema, type CompleteRequest, type GetPromptRequest, type Implementation, type ListPromptsRequest, type ListResourcesRequest, type ListResourceTemplatesRequest, type ListToolsRequest, type LoggingLevel, type ReadResourceRequest, type ServerCapabilities, type SubscribeRequest, type UnsubscribeRequest, type ListChangedHandlers, type Request, type Notification, type Result } from '../types.js';
+import type { jsonSchemaValidator } from '../validation/types.js';
+import { AnyObjectSchema, SchemaOutput } from '../server/zod-compat.js';
+import type { RequestHandlerExtra } from '../shared/protocol.js';
+import { ExperimentalClientTasks } from '../experimental/tasks/client.js';
+/**
+ * Determines which elicitation modes are supported based on declared client capabilities.
+ *
+ * According to the spec:
+ * - An empty elicitation capability object defaults to form mode support (backwards compatibility)
+ * - URL mode is only supported if explicitly declared
+ *
+ * @param capabilities - The client's elicitation capabilities
+ * @returns An object indicating which modes are supported
+ */
+export declare function getSupportedElicitationModes(capabilities: ClientCapabilities['elicitation']): {
+ supportsFormMode: boolean;
+ supportsUrlMode: boolean;
+};
+export type ClientOptions = ProtocolOptions & {
+ /**
+ * Capabilities to advertise as being supported by this client.
+ */
+ capabilities?: ClientCapabilities;
+ /**
+ * JSON Schema validator for tool output validation.
+ *
+ * The validator is used to validate structured content returned by tools
+ * against their declared output schemas.
+ *
+ * @default AjvJsonSchemaValidator
+ *
+ * @example
+ * ```typescript
+ * // ajv
+ * const client = new Client(
+ * { name: 'my-client', version: '1.0.0' },
+ * {
+ * capabilities: {},
+ * jsonSchemaValidator: new AjvJsonSchemaValidator()
+ * }
+ * );
+ *
+ * // @cfworker/json-schema
+ * const client = new Client(
+ * { name: 'my-client', version: '1.0.0' },
+ * {
+ * capabilities: {},
+ * jsonSchemaValidator: new CfWorkerJsonSchemaValidator()
+ * }
+ * );
+ * ```
+ */
+ jsonSchemaValidator?: jsonSchemaValidator;
+ /**
+ * Configure handlers for list changed notifications (tools, prompts, resources).
+ *
+ * @example
+ * ```typescript
+ * const client = new Client(
+ * { name: 'my-client', version: '1.0.0' },
+ * {
+ * listChanged: {
+ * tools: {
+ * onChanged: (error, tools) => {
+ * if (error) {
+ * console.error('Failed to refresh tools:', error);
+ * return;
+ * }
+ * console.log('Tools updated:', tools);
+ * }
+ * },
+ * prompts: {
+ * onChanged: (error, prompts) => console.log('Prompts updated:', prompts)
+ * }
+ * }
+ * }
+ * );
+ * ```
+ */
+ listChanged?: ListChangedHandlers;
+};
+/**
+ * An MCP client on top of a pluggable transport.
+ *
+ * The client will automatically begin the initialization flow with the server when connect() is called.
+ *
+ * To use with custom types, extend the base Request/Notification/Result types and pass them as type parameters:
+ *
+ * ```typescript
+ * // Custom schemas
+ * const CustomRequestSchema = RequestSchema.extend({...})
+ * const CustomNotificationSchema = NotificationSchema.extend({...})
+ * const CustomResultSchema = ResultSchema.extend({...})
+ *
+ * // Type aliases
+ * type CustomRequest = z.infer
+ * type CustomNotification = z.infer
+ * type CustomResult = z.infer
+ *
+ * // Create typed client
+ * const client = new Client({
+ * name: "CustomClient",
+ * version: "1.0.0"
+ * })
+ * ```
+ */
+export declare class Client extends Protocol {
+ private _clientInfo;
+ private _serverCapabilities?;
+ private _serverVersion?;
+ private _capabilities;
+ private _instructions?;
+ private _jsonSchemaValidator;
+ private _cachedToolOutputValidators;
+ private _cachedKnownTaskTools;
+ private _cachedRequiredTaskTools;
+ private _experimental?;
+ private _listChangedDebounceTimers;
+ private _pendingListChangedConfig?;
+ /**
+ * Initializes this client with the given name and version information.
+ */
+ constructor(_clientInfo: Implementation, options?: ClientOptions);
+ /**
+ * Set up handlers for list changed notifications based on config and server capabilities.
+ * This should only be called after initialization when server capabilities are known.
+ * Handlers are silently skipped if the server doesn't advertise the corresponding listChanged capability.
+ * @internal
+ */
+ private _setupListChangedHandlers;
+ /**
+ * Access experimental features.
+ *
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+ get experimental(): {
+ tasks: ExperimentalClientTasks;
+ };
+ /**
+ * Registers new capabilities. This can only be called before connecting to a transport.
+ *
+ * The new capabilities will be merged with any existing capabilities previously given (e.g., at initialization).
+ */
+ registerCapabilities(capabilities: ClientCapabilities): void;
+ /**
+ * Override request handler registration to enforce client-side validation for elicitation.
+ */
+ setRequestHandler(requestSchema: T, handler: (request: SchemaOutput, extra: RequestHandlerExtra) => ClientResult | ResultT | Promise): void;
+ protected assertCapability(capability: keyof ServerCapabilities, method: string): void;
+ connect(transport: Transport, options?: RequestOptions): Promise;
+ /**
+ * After initialization has completed, this will be populated with the server's reported capabilities.
+ */
+ getServerCapabilities(): ServerCapabilities | undefined;
+ /**
+ * After initialization has completed, this will be populated with information about the server's name and version.
+ */
+ getServerVersion(): Implementation | undefined;
+ /**
+ * After initialization has completed, this may be populated with information about the server's instructions.
+ */
+ getInstructions(): string | undefined;
+ protected assertCapabilityForMethod(method: RequestT['method']): void;
+ protected assertNotificationCapability(method: NotificationT['method']): void;
+ protected assertRequestHandlerCapability(method: string): void;
+ protected assertTaskCapability(method: string): void;
+ protected assertTaskHandlerCapability(method: string): void;
+ ping(options?: RequestOptions): Promise<{
+ _meta?: {
+ [x: string]: unknown;
+ progressToken?: string | number | undefined;
+ "io.modelcontextprotocol/related-task"?: {
+ taskId: string;
+ } | undefined;
+ } | undefined;
+ }>;
+ complete(params: CompleteRequest['params'], options?: RequestOptions): Promise<{
+ [x: string]: unknown;
+ completion: {
+ [x: string]: unknown;
+ values: string[];
+ total?: number | undefined;
+ hasMore?: boolean | undefined;
+ };
+ _meta?: {
+ [x: string]: unknown;
+ progressToken?: string | number | undefined;
+ "io.modelcontextprotocol/related-task"?: {
+ taskId: string;
+ } | undefined;
+ } | undefined;
+ }>;
+ setLoggingLevel(level: LoggingLevel, options?: RequestOptions): Promise<{
+ _meta?: {
+ [x: string]: unknown;
+ progressToken?: string | number | undefined;
+ "io.modelcontextprotocol/related-task"?: {
+ taskId: string;
+ } | undefined;
+ } | undefined;
+ }>;
+ getPrompt(params: GetPromptRequest['params'], options?: RequestOptions): Promise<{
+ [x: string]: unknown;
+ messages: {
+ role: "user" | "assistant";
+ content: {
+ type: "text";
+ text: string;
+ annotations?: {
+ audience?: ("user" | "assistant")[] | undefined;
+ priority?: number | undefined;
+ lastModified?: string | undefined;
+ } | undefined;
+ _meta?: Record | undefined;
+ } | {
+ type: "image";
+ data: string;
+ mimeType: string;
+ annotations?: {
+ audience?: ("user" | "assistant")[] | undefined;
+ priority?: number | undefined;
+ lastModified?: string | undefined;
+ } | undefined;
+ _meta?: Record | undefined;
+ } | {
+ type: "audio";
+ data: string;
+ mimeType: string;
+ annotations?: {
+ audience?: ("user" | "assistant")[] | undefined;
+ priority?: number | undefined;
+ lastModified?: string | undefined;
+ } | undefined;
+ _meta?: Record | undefined;
+ } | {
+ type: "resource";
+ resource: {
+ uri: string;
+ text: string;
+ mimeType?: string | undefined;
+ _meta?: Record | undefined;
+ } | {
+ uri: string;
+ blob: string;
+ mimeType?: string | undefined;
+ _meta?: Record | undefined;
+ };
+ annotations?: {
+ audience?: ("user" | "assistant")[] | undefined;
+ priority?: number | undefined;
+ lastModified?: string | undefined;
+ } | undefined;
+ _meta?: Record | undefined;
+ } | {
+ uri: string;
+ name: string;
+ type: "resource_link";
+ description?: string | undefined;
+ mimeType?: string | undefined;
+ size?: number | undefined;
+ annotations?: {
+ audience?: ("user" | "assistant")[] | undefined;
+ priority?: number | undefined;
+ lastModified?: string | undefined;
+ } | undefined;
+ _meta?: {
+ [x: string]: unknown;
+ } | undefined;
+ icons?: {
+ src: string;
+ mimeType?: string | undefined;
+ sizes?: string[] | undefined;
+ theme?: "light" | "dark" | undefined;
+ }[] | undefined;
+ title?: string | undefined;
+ };
+ }[];
+ _meta?: {
+ [x: string]: unknown;
+ progressToken?: string | number | undefined;
+ "io.modelcontextprotocol/related-task"?: {
+ taskId: string;
+ } | undefined;
+ } | undefined;
+ description?: string | undefined;
+ }>;
+ listPrompts(params?: ListPromptsRequest['params'], options?: RequestOptions): Promise<{
+ [x: string]: unknown;
+ prompts: {
+ name: string;
+ description?: string | undefined;
+ arguments?: {
+ name: string;
+ description?: string | undefined;
+ required?: boolean | undefined;
+ }[] | undefined;
+ _meta?: {
+ [x: string]: unknown;
+ } | undefined;
+ icons?: {
+ src: string;
+ mimeType?: string | undefined;
+ sizes?: string[] | undefined;
+ theme?: "light" | "dark" | undefined;
+ }[] | undefined;
+ title?: string | undefined;
+ }[];
+ _meta?: {
+ [x: string]: unknown;
+ progressToken?: string | number | undefined;
+ "io.modelcontextprotocol/related-task"?: {
+ taskId: string;
+ } | undefined;
+ } | undefined;
+ nextCursor?: string | undefined;
+ }>;
+ listResources(params?: ListResourcesRequest['params'], options?: RequestOptions): Promise<{
+ [x: string]: unknown;
+ resources: {
+ uri: string;
+ name: string;
+ description?: string | undefined;
+ mimeType?: string | undefined;
+ size?: number | undefined;
+ annotations?: {
+ audience?: ("user" | "assistant")[] | undefined;
+ priority?: number | undefined;
+ lastModified?: string | undefined;
+ } | undefined;
+ _meta?: {
+ [x: string]: unknown;
+ } | undefined;
+ icons?: {
+ src: string;
+ mimeType?: string | undefined;
+ sizes?: string[] | undefined;
+ theme?: "light" | "dark" | undefined;
+ }[] | undefined;
+ title?: string | undefined;
+ }[];
+ _meta?: {
+ [x: string]: unknown;
+ progressToken?: string | number | undefined;
+ "io.modelcontextprotocol/related-task"?: {
+ taskId: string;
+ } | undefined;
+ } | undefined;
+ nextCursor?: string | undefined;
+ }>;
+ listResourceTemplates(params?: ListResourceTemplatesRequest['params'], options?: RequestOptions): Promise<{
+ [x: string]: unknown;
+ resourceTemplates: {
+ uriTemplate: string;
+ name: string;
+ description?: string | undefined;
+ mimeType?: string | undefined;
+ annotations?: {
+ audience?: ("user" | "assistant")[] | undefined;
+ priority?: number | undefined;
+ lastModified?: string | undefined;
+ } | undefined;
+ _meta?: {
+ [x: string]: unknown;
+ } | undefined;
+ icons?: {
+ src: string;
+ mimeType?: string | undefined;
+ sizes?: string[] | undefined;
+ theme?: "light" | "dark" | undefined;
+ }[] | undefined;
+ title?: string | undefined;
+ }[];
+ _meta?: {
+ [x: string]: unknown;
+ progressToken?: string | number | undefined;
+ "io.modelcontextprotocol/related-task"?: {
+ taskId: string;
+ } | undefined;
+ } | undefined;
+ nextCursor?: string | undefined;
+ }>;
+ readResource(params: ReadResourceRequest['params'], options?: RequestOptions): Promise<{
+ [x: string]: unknown;
+ contents: ({
+ uri: string;
+ text: string;
+ mimeType?: string | undefined;
+ _meta?: Record | undefined;
+ } | {
+ uri: string;
+ blob: string;
+ mimeType?: string | undefined;
+ _meta?: Record | undefined;
+ })[];
+ _meta?: {
+ [x: string]: unknown;
+ progressToken?: string | number | undefined;
+ "io.modelcontextprotocol/related-task"?: {
+ taskId: string;
+ } | undefined;
+ } | undefined;
+ }>;
+ subscribeResource(params: SubscribeRequest['params'], options?: RequestOptions): Promise<{
+ _meta?: {
+ [x: string]: unknown;
+ progressToken?: string | number | undefined;
+ "io.modelcontextprotocol/related-task"?: {
+ taskId: string;
+ } | undefined;
+ } | undefined;
+ }>;
+ unsubscribeResource(params: UnsubscribeRequest['params'], options?: RequestOptions): Promise<{
+ _meta?: {
+ [x: string]: unknown;
+ progressToken?: string | number | undefined;
+ "io.modelcontextprotocol/related-task"?: {
+ taskId: string;
+ } | undefined;
+ } | undefined;
+ }>;
+ /**
+ * Calls a tool and waits for the result. Automatically validates structured output if the tool has an outputSchema.
+ *
+ * For task-based execution with streaming behavior, use client.experimental.tasks.callToolStream() instead.
+ */
+ callTool(params: CallToolRequest['params'], resultSchema?: typeof CallToolResultSchema | typeof CompatibilityCallToolResultSchema, options?: RequestOptions): Promise<{
+ [x: string]: unknown;
+ content: ({
+ type: "text";
+ text: string;
+ annotations?: {
+ audience?: ("user" | "assistant")[] | undefined;
+ priority?: number | undefined;
+ lastModified?: string | undefined;
+ } | undefined;
+ _meta?: Record | undefined;
+ } | {
+ type: "image";
+ data: string;
+ mimeType: string;
+ annotations?: {
+ audience?: ("user" | "assistant")[] | undefined;
+ priority?: number | undefined;
+ lastModified?: string | undefined;
+ } | undefined;
+ _meta?: Record | undefined;
+ } | {
+ type: "audio";
+ data: string;
+ mimeType: string;
+ annotations?: {
+ audience?: ("user" | "assistant")[] | undefined;
+ priority?: number | undefined;
+ lastModified?: string | undefined;
+ } | undefined;
+ _meta?: Record | undefined;
+ } | {
+ type: "resource";
+ resource: {
+ uri: string;
+ text: string;
+ mimeType?: string | undefined;
+ _meta?: Record | undefined;
+ } | {
+ uri: string;
+ blob: string;
+ mimeType?: string | undefined;
+ _meta?: Record | undefined;
+ };
+ annotations?: {
+ audience?: ("user" | "assistant")[] | undefined;
+ priority?: number | undefined;
+ lastModified?: string | undefined;
+ } | undefined;
+ _meta?: Record | undefined;
+ } | {
+ uri: string;
+ name: string;
+ type: "resource_link";
+ description?: string | undefined;
+ mimeType?: string | undefined;
+ size?: number | undefined;
+ annotations?: {
+ audience?: ("user" | "assistant")[] | undefined;
+ priority?: number | undefined;
+ lastModified?: string | undefined;
+ } | undefined;
+ _meta?: {
+ [x: string]: unknown;
+ } | undefined;
+ icons?: {
+ src: string;
+ mimeType?: string | undefined;
+ sizes?: string[] | undefined;
+ theme?: "light" | "dark" | undefined;
+ }[] | undefined;
+ title?: string | undefined;
+ })[];
+ _meta?: {
+ [x: string]: unknown;
+ progressToken?: string | number | undefined;
+ "io.modelcontextprotocol/related-task"?: {
+ taskId: string;
+ } | undefined;
+ } | undefined;
+ structuredContent?: Record | undefined;
+ isError?: boolean | undefined;
+ } | {
+ [x: string]: unknown;
+ toolResult: unknown;
+ _meta?: {
+ [x: string]: unknown;
+ progressToken?: string | number | undefined;
+ "io.modelcontextprotocol/related-task"?: {
+ taskId: string;
+ } | undefined;
+ } | undefined;
+ }>;
+ private isToolTask;
+ /**
+ * Check if a tool requires task-based execution.
+ * Unlike isToolTask which includes 'optional' tools, this only checks for 'required'.
+ */
+ private isToolTaskRequired;
+ /**
+ * Cache validators for tool output schemas.
+ * Called after listTools() to pre-compile validators for better performance.
+ */
+ private cacheToolMetadata;
+ /**
+ * Get cached validator for a tool
+ */
+ private getToolOutputValidator;
+ listTools(params?: ListToolsRequest['params'], options?: RequestOptions): Promise<{
+ [x: string]: unknown;
+ tools: {
+ inputSchema: {
+ [x: string]: unknown;
+ type: "object";
+ properties?: Record | undefined;
+ required?: string[] | undefined;
+ };
+ name: string;
+ description?: string | undefined;
+ outputSchema?: {
+ [x: string]: unknown;
+ type: "object";
+ properties?: Record | undefined;
+ required?: string[] | undefined;
+ } | undefined;
+ annotations?: {
+ title?: string | undefined;
+ readOnlyHint?: boolean | undefined;
+ destructiveHint?: boolean | undefined;
+ idempotentHint?: boolean | undefined;
+ openWorldHint?: boolean | undefined;
+ } | undefined;
+ execution?: {
+ taskSupport?: "optional" | "required" | "forbidden" | undefined;
+ } | undefined;
+ _meta?: Record | undefined;
+ icons?: {
+ src: string;
+ mimeType?: string | undefined;
+ sizes?: string[] | undefined;
+ theme?: "light" | "dark" | undefined;
+ }[] | undefined;
+ title?: string | undefined;
+ }[];
+ _meta?: {
+ [x: string]: unknown;
+ progressToken?: string | number | undefined;
+ "io.modelcontextprotocol/related-task"?: {
+ taskId: string;
+ } | undefined;
+ } | undefined;
+ nextCursor?: string | undefined;
+ }>;
+ /**
+ * Set up a single list changed handler.
+ * @internal
+ */
+ private _setupListChangedHandler;
+ sendRootsListChanged(): Promise;
+}
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.d.ts.map
new file mode 100644
index 0000000..cebbf28
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,QAAQ,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC/G,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EACH,KAAK,eAAe,EACpB,oBAAoB,EACpB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,iCAAiC,EACtC,KAAK,eAAe,EAIpB,KAAK,gBAAgB,EAErB,KAAK,cAAc,EAGnB,KAAK,kBAAkB,EAEvB,KAAK,oBAAoB,EAEzB,KAAK,4BAA4B,EAEjC,KAAK,gBAAgB,EAErB,KAAK,YAAY,EAEjB,KAAK,mBAAmB,EAExB,KAAK,kBAAkB,EAEvB,KAAK,gBAAgB,EAErB,KAAK,kBAAkB,EAYvB,KAAK,mBAAmB,EACxB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,MAAM,EACd,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAuC,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AACvG,OAAO,EACH,eAAe,EACf,YAAY,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EAAE,OAAO,CAAC,EAAE,cAAc;;;;;;;;;IAIxF;;;;OAIG;IACG,QAAQ,CACV,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,EACjC,YAAY,GAAE,OAAO,oBAAoB,GAAG,OAAO,iCAAwD,EAC3G,OAAO,CAAC,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkD5B,OAAO,CAAC,UAAU;IAQlB;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAI1B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAuBzB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAIxB,SAAS,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAS7E;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAwD1B,oBAAoB;CAG7B"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js
new file mode 100644
index 0000000..6ac1da1
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js
@@ -0,0 +1,629 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Client = void 0;
+exports.getSupportedElicitationModes = getSupportedElicitationModes;
+const protocol_js_1 = require("../shared/protocol.js");
+const types_js_1 = require("../types.js");
+const ajv_provider_js_1 = require("../validation/ajv-provider.js");
+const zod_compat_js_1 = require("../server/zod-compat.js");
+const client_js_1 = require("../experimental/tasks/client.js");
+const helpers_js_1 = require("../experimental/tasks/helpers.js");
+/**
+ * Elicitation default application helper. Applies defaults to the data based on the schema.
+ *
+ * @param schema - The schema to apply defaults to.
+ * @param data - The data to apply defaults to.
+ */
+function applyElicitationDefaults(schema, data) {
+ if (!schema || data === null || typeof data !== 'object')
+ return;
+ // Handle object properties
+ if (schema.type === 'object' && schema.properties && typeof schema.properties === 'object') {
+ const obj = data;
+ const props = schema.properties;
+ for (const key of Object.keys(props)) {
+ const propSchema = props[key];
+ // If missing or explicitly undefined, apply default if present
+ if (obj[key] === undefined && Object.prototype.hasOwnProperty.call(propSchema, 'default')) {
+ obj[key] = propSchema.default;
+ }
+ // Recurse into existing nested objects/arrays
+ if (obj[key] !== undefined) {
+ applyElicitationDefaults(propSchema, obj[key]);
+ }
+ }
+ }
+ if (Array.isArray(schema.anyOf)) {
+ for (const sub of schema.anyOf) {
+ // Skip boolean schemas (true/false are valid JSON Schemas but have no defaults)
+ if (typeof sub !== 'boolean') {
+ applyElicitationDefaults(sub, data);
+ }
+ }
+ }
+ // Combine schemas
+ if (Array.isArray(schema.oneOf)) {
+ for (const sub of schema.oneOf) {
+ // Skip boolean schemas (true/false are valid JSON Schemas but have no defaults)
+ if (typeof sub !== 'boolean') {
+ applyElicitationDefaults(sub, data);
+ }
+ }
+ }
+}
+/**
+ * Determines which elicitation modes are supported based on declared client capabilities.
+ *
+ * According to the spec:
+ * - An empty elicitation capability object defaults to form mode support (backwards compatibility)
+ * - URL mode is only supported if explicitly declared
+ *
+ * @param capabilities - The client's elicitation capabilities
+ * @returns An object indicating which modes are supported
+ */
+function getSupportedElicitationModes(capabilities) {
+ if (!capabilities) {
+ return { supportsFormMode: false, supportsUrlMode: false };
+ }
+ const hasFormCapability = capabilities.form !== undefined;
+ const hasUrlCapability = capabilities.url !== undefined;
+ // If neither form nor url are explicitly declared, form mode is supported (backwards compatibility)
+ const supportsFormMode = hasFormCapability || (!hasFormCapability && !hasUrlCapability);
+ const supportsUrlMode = hasUrlCapability;
+ return { supportsFormMode, supportsUrlMode };
+}
+/**
+ * An MCP client on top of a pluggable transport.
+ *
+ * The client will automatically begin the initialization flow with the server when connect() is called.
+ *
+ * To use with custom types, extend the base Request/Notification/Result types and pass them as type parameters:
+ *
+ * ```typescript
+ * // Custom schemas
+ * const CustomRequestSchema = RequestSchema.extend({...})
+ * const CustomNotificationSchema = NotificationSchema.extend({...})
+ * const CustomResultSchema = ResultSchema.extend({...})
+ *
+ * // Type aliases
+ * type CustomRequest = z.infer
+ * type CustomNotification = z.infer
+ * type CustomResult = z.infer
+ *
+ * // Create typed client
+ * const client = new Client({
+ * name: "CustomClient",
+ * version: "1.0.0"
+ * })
+ * ```
+ */
+class Client extends protocol_js_1.Protocol {
+ /**
+ * Initializes this client with the given name and version information.
+ */
+ constructor(_clientInfo, options) {
+ super(options);
+ this._clientInfo = _clientInfo;
+ this._cachedToolOutputValidators = new Map();
+ this._cachedKnownTaskTools = new Set();
+ this._cachedRequiredTaskTools = new Set();
+ this._listChangedDebounceTimers = new Map();
+ this._capabilities = options?.capabilities ?? {};
+ this._jsonSchemaValidator = options?.jsonSchemaValidator ?? new ajv_provider_js_1.AjvJsonSchemaValidator();
+ // Store list changed config for setup after connection (when we know server capabilities)
+ if (options?.listChanged) {
+ this._pendingListChangedConfig = options.listChanged;
+ }
+ }
+ /**
+ * Set up handlers for list changed notifications based on config and server capabilities.
+ * This should only be called after initialization when server capabilities are known.
+ * Handlers are silently skipped if the server doesn't advertise the corresponding listChanged capability.
+ * @internal
+ */
+ _setupListChangedHandlers(config) {
+ if (config.tools && this._serverCapabilities?.tools?.listChanged) {
+ this._setupListChangedHandler('tools', types_js_1.ToolListChangedNotificationSchema, config.tools, async () => {
+ const result = await this.listTools();
+ return result.tools;
+ });
+ }
+ if (config.prompts && this._serverCapabilities?.prompts?.listChanged) {
+ this._setupListChangedHandler('prompts', types_js_1.PromptListChangedNotificationSchema, config.prompts, async () => {
+ const result = await this.listPrompts();
+ return result.prompts;
+ });
+ }
+ if (config.resources && this._serverCapabilities?.resources?.listChanged) {
+ this._setupListChangedHandler('resources', types_js_1.ResourceListChangedNotificationSchema, config.resources, async () => {
+ const result = await this.listResources();
+ return result.resources;
+ });
+ }
+ }
+ /**
+ * Access experimental features.
+ *
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+ get experimental() {
+ if (!this._experimental) {
+ this._experimental = {
+ tasks: new client_js_1.ExperimentalClientTasks(this)
+ };
+ }
+ return this._experimental;
+ }
+ /**
+ * Registers new capabilities. This can only be called before connecting to a transport.
+ *
+ * The new capabilities will be merged with any existing capabilities previously given (e.g., at initialization).
+ */
+ registerCapabilities(capabilities) {
+ if (this.transport) {
+ throw new Error('Cannot register capabilities after connecting to transport');
+ }
+ this._capabilities = (0, protocol_js_1.mergeCapabilities)(this._capabilities, capabilities);
+ }
+ /**
+ * Override request handler registration to enforce client-side validation for elicitation.
+ */
+ setRequestHandler(requestSchema, handler) {
+ const shape = (0, zod_compat_js_1.getObjectShape)(requestSchema);
+ const methodSchema = shape?.method;
+ if (!methodSchema) {
+ throw new Error('Schema is missing a method literal');
+ }
+ // Extract literal value using type-safe property access
+ let methodValue;
+ if ((0, zod_compat_js_1.isZ4Schema)(methodSchema)) {
+ const v4Schema = methodSchema;
+ const v4Def = v4Schema._zod?.def;
+ methodValue = v4Def?.value ?? v4Schema.value;
+ }
+ else {
+ const v3Schema = methodSchema;
+ const legacyDef = v3Schema._def;
+ methodValue = legacyDef?.value ?? v3Schema.value;
+ }
+ if (typeof methodValue !== 'string') {
+ throw new Error('Schema method literal must be a string');
+ }
+ const method = methodValue;
+ if (method === 'elicitation/create') {
+ const wrappedHandler = async (request, extra) => {
+ const validatedRequest = (0, zod_compat_js_1.safeParse)(types_js_1.ElicitRequestSchema, request);
+ if (!validatedRequest.success) {
+ // Type guard: if success is false, error is guaranteed to exist
+ const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error);
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Invalid elicitation request: ${errorMessage}`);
+ }
+ const { params } = validatedRequest.data;
+ params.mode = params.mode ?? 'form';
+ const { supportsFormMode, supportsUrlMode } = getSupportedElicitationModes(this._capabilities.elicitation);
+ if (params.mode === 'form' && !supportsFormMode) {
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, 'Client does not support form-mode elicitation requests');
+ }
+ if (params.mode === 'url' && !supportsUrlMode) {
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, 'Client does not support URL-mode elicitation requests');
+ }
+ const result = await Promise.resolve(handler(request, extra));
+ // When task creation is requested, validate and return CreateTaskResult
+ if (params.task) {
+ const taskValidationResult = (0, zod_compat_js_1.safeParse)(types_js_1.CreateTaskResultSchema, result);
+ if (!taskValidationResult.success) {
+ const errorMessage = taskValidationResult.error instanceof Error
+ ? taskValidationResult.error.message
+ : String(taskValidationResult.error);
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Invalid task creation result: ${errorMessage}`);
+ }
+ return taskValidationResult.data;
+ }
+ // For non-task requests, validate against ElicitResultSchema
+ const validationResult = (0, zod_compat_js_1.safeParse)(types_js_1.ElicitResultSchema, result);
+ if (!validationResult.success) {
+ // Type guard: if success is false, error is guaranteed to exist
+ const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Invalid elicitation result: ${errorMessage}`);
+ }
+ const validatedResult = validationResult.data;
+ const requestedSchema = params.mode === 'form' ? params.requestedSchema : undefined;
+ if (params.mode === 'form' && validatedResult.action === 'accept' && validatedResult.content && requestedSchema) {
+ if (this._capabilities.elicitation?.form?.applyDefaults) {
+ try {
+ applyElicitationDefaults(requestedSchema, validatedResult.content);
+ }
+ catch {
+ // gracefully ignore errors in default application
+ }
+ }
+ }
+ return validatedResult;
+ };
+ // Install the wrapped handler
+ return super.setRequestHandler(requestSchema, wrappedHandler);
+ }
+ if (method === 'sampling/createMessage') {
+ const wrappedHandler = async (request, extra) => {
+ const validatedRequest = (0, zod_compat_js_1.safeParse)(types_js_1.CreateMessageRequestSchema, request);
+ if (!validatedRequest.success) {
+ const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error);
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Invalid sampling request: ${errorMessage}`);
+ }
+ const { params } = validatedRequest.data;
+ const result = await Promise.resolve(handler(request, extra));
+ // When task creation is requested, validate and return CreateTaskResult
+ if (params.task) {
+ const taskValidationResult = (0, zod_compat_js_1.safeParse)(types_js_1.CreateTaskResultSchema, result);
+ if (!taskValidationResult.success) {
+ const errorMessage = taskValidationResult.error instanceof Error
+ ? taskValidationResult.error.message
+ : String(taskValidationResult.error);
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Invalid task creation result: ${errorMessage}`);
+ }
+ return taskValidationResult.data;
+ }
+ // For non-task requests, validate against appropriate schema based on tools presence
+ const hasTools = params.tools || params.toolChoice;
+ const resultSchema = hasTools ? types_js_1.CreateMessageResultWithToolsSchema : types_js_1.CreateMessageResultSchema;
+ const validationResult = (0, zod_compat_js_1.safeParse)(resultSchema, result);
+ if (!validationResult.success) {
+ const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Invalid sampling result: ${errorMessage}`);
+ }
+ return validationResult.data;
+ };
+ // Install the wrapped handler
+ return super.setRequestHandler(requestSchema, wrappedHandler);
+ }
+ // Other handlers use default behavior
+ return super.setRequestHandler(requestSchema, handler);
+ }
+ assertCapability(capability, method) {
+ if (!this._serverCapabilities?.[capability]) {
+ throw new Error(`Server does not support ${capability} (required for ${method})`);
+ }
+ }
+ async connect(transport, options) {
+ await super.connect(transport);
+ // When transport sessionId is already set this means we are trying to reconnect.
+ // In this case we don't need to initialize again.
+ if (transport.sessionId !== undefined) {
+ return;
+ }
+ try {
+ const result = await this.request({
+ method: 'initialize',
+ params: {
+ protocolVersion: types_js_1.LATEST_PROTOCOL_VERSION,
+ capabilities: this._capabilities,
+ clientInfo: this._clientInfo
+ }
+ }, types_js_1.InitializeResultSchema, options);
+ if (result === undefined) {
+ throw new Error(`Server sent invalid initialize result: ${result}`);
+ }
+ if (!types_js_1.SUPPORTED_PROTOCOL_VERSIONS.includes(result.protocolVersion)) {
+ throw new Error(`Server's protocol version is not supported: ${result.protocolVersion}`);
+ }
+ this._serverCapabilities = result.capabilities;
+ this._serverVersion = result.serverInfo;
+ // HTTP transports must set the protocol version in each header after initialization.
+ if (transport.setProtocolVersion) {
+ transport.setProtocolVersion(result.protocolVersion);
+ }
+ this._instructions = result.instructions;
+ await this.notification({
+ method: 'notifications/initialized'
+ });
+ // Set up list changed handlers now that we know server capabilities
+ if (this._pendingListChangedConfig) {
+ this._setupListChangedHandlers(this._pendingListChangedConfig);
+ this._pendingListChangedConfig = undefined;
+ }
+ }
+ catch (error) {
+ // Disconnect if initialization fails.
+ void this.close();
+ throw error;
+ }
+ }
+ /**
+ * After initialization has completed, this will be populated with the server's reported capabilities.
+ */
+ getServerCapabilities() {
+ return this._serverCapabilities;
+ }
+ /**
+ * After initialization has completed, this will be populated with information about the server's name and version.
+ */
+ getServerVersion() {
+ return this._serverVersion;
+ }
+ /**
+ * After initialization has completed, this may be populated with information about the server's instructions.
+ */
+ getInstructions() {
+ return this._instructions;
+ }
+ assertCapabilityForMethod(method) {
+ switch (method) {
+ case 'logging/setLevel':
+ if (!this._serverCapabilities?.logging) {
+ throw new Error(`Server does not support logging (required for ${method})`);
+ }
+ break;
+ case 'prompts/get':
+ case 'prompts/list':
+ if (!this._serverCapabilities?.prompts) {
+ throw new Error(`Server does not support prompts (required for ${method})`);
+ }
+ break;
+ case 'resources/list':
+ case 'resources/templates/list':
+ case 'resources/read':
+ case 'resources/subscribe':
+ case 'resources/unsubscribe':
+ if (!this._serverCapabilities?.resources) {
+ throw new Error(`Server does not support resources (required for ${method})`);
+ }
+ if (method === 'resources/subscribe' && !this._serverCapabilities.resources.subscribe) {
+ throw new Error(`Server does not support resource subscriptions (required for ${method})`);
+ }
+ break;
+ case 'tools/call':
+ case 'tools/list':
+ if (!this._serverCapabilities?.tools) {
+ throw new Error(`Server does not support tools (required for ${method})`);
+ }
+ break;
+ case 'completion/complete':
+ if (!this._serverCapabilities?.completions) {
+ throw new Error(`Server does not support completions (required for ${method})`);
+ }
+ break;
+ case 'initialize':
+ // No specific capability required for initialize
+ break;
+ case 'ping':
+ // No specific capability required for ping
+ break;
+ }
+ }
+ assertNotificationCapability(method) {
+ switch (method) {
+ case 'notifications/roots/list_changed':
+ if (!this._capabilities.roots?.listChanged) {
+ throw new Error(`Client does not support roots list changed notifications (required for ${method})`);
+ }
+ break;
+ case 'notifications/initialized':
+ // No specific capability required for initialized
+ break;
+ case 'notifications/cancelled':
+ // Cancellation notifications are always allowed
+ break;
+ case 'notifications/progress':
+ // Progress notifications are always allowed
+ break;
+ }
+ }
+ assertRequestHandlerCapability(method) {
+ // Task handlers are registered in Protocol constructor before _capabilities is initialized
+ // Skip capability check for task methods during initialization
+ if (!this._capabilities) {
+ return;
+ }
+ switch (method) {
+ case 'sampling/createMessage':
+ if (!this._capabilities.sampling) {
+ throw new Error(`Client does not support sampling capability (required for ${method})`);
+ }
+ break;
+ case 'elicitation/create':
+ if (!this._capabilities.elicitation) {
+ throw new Error(`Client does not support elicitation capability (required for ${method})`);
+ }
+ break;
+ case 'roots/list':
+ if (!this._capabilities.roots) {
+ throw new Error(`Client does not support roots capability (required for ${method})`);
+ }
+ break;
+ case 'tasks/get':
+ case 'tasks/list':
+ case 'tasks/result':
+ case 'tasks/cancel':
+ if (!this._capabilities.tasks) {
+ throw new Error(`Client does not support tasks capability (required for ${method})`);
+ }
+ break;
+ case 'ping':
+ // No specific capability required for ping
+ break;
+ }
+ }
+ assertTaskCapability(method) {
+ (0, helpers_js_1.assertToolsCallTaskCapability)(this._serverCapabilities?.tasks?.requests, method, 'Server');
+ }
+ assertTaskHandlerCapability(method) {
+ // Task handlers are registered in Protocol constructor before _capabilities is initialized
+ // Skip capability check for task methods during initialization
+ if (!this._capabilities) {
+ return;
+ }
+ (0, helpers_js_1.assertClientRequestTaskCapability)(this._capabilities.tasks?.requests, method, 'Client');
+ }
+ async ping(options) {
+ return this.request({ method: 'ping' }, types_js_1.EmptyResultSchema, options);
+ }
+ async complete(params, options) {
+ return this.request({ method: 'completion/complete', params }, types_js_1.CompleteResultSchema, options);
+ }
+ async setLoggingLevel(level, options) {
+ return this.request({ method: 'logging/setLevel', params: { level } }, types_js_1.EmptyResultSchema, options);
+ }
+ async getPrompt(params, options) {
+ return this.request({ method: 'prompts/get', params }, types_js_1.GetPromptResultSchema, options);
+ }
+ async listPrompts(params, options) {
+ return this.request({ method: 'prompts/list', params }, types_js_1.ListPromptsResultSchema, options);
+ }
+ async listResources(params, options) {
+ return this.request({ method: 'resources/list', params }, types_js_1.ListResourcesResultSchema, options);
+ }
+ async listResourceTemplates(params, options) {
+ return this.request({ method: 'resources/templates/list', params }, types_js_1.ListResourceTemplatesResultSchema, options);
+ }
+ async readResource(params, options) {
+ return this.request({ method: 'resources/read', params }, types_js_1.ReadResourceResultSchema, options);
+ }
+ async subscribeResource(params, options) {
+ return this.request({ method: 'resources/subscribe', params }, types_js_1.EmptyResultSchema, options);
+ }
+ async unsubscribeResource(params, options) {
+ return this.request({ method: 'resources/unsubscribe', params }, types_js_1.EmptyResultSchema, options);
+ }
+ /**
+ * Calls a tool and waits for the result. Automatically validates structured output if the tool has an outputSchema.
+ *
+ * For task-based execution with streaming behavior, use client.experimental.tasks.callToolStream() instead.
+ */
+ async callTool(params, resultSchema = types_js_1.CallToolResultSchema, options) {
+ // Guard: required-task tools need experimental API
+ if (this.isToolTaskRequired(params.name)) {
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidRequest, `Tool "${params.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);
+ }
+ const result = await this.request({ method: 'tools/call', params }, resultSchema, options);
+ // Check if the tool has an outputSchema
+ const validator = this.getToolOutputValidator(params.name);
+ if (validator) {
+ // If tool has outputSchema, it MUST return structuredContent (unless it's an error)
+ if (!result.structuredContent && !result.isError) {
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidRequest, `Tool ${params.name} has an output schema but did not return structured content`);
+ }
+ // Only validate structured content if present (not when there's an error)
+ if (result.structuredContent) {
+ try {
+ // Validate the structured content against the schema
+ const validationResult = validator(result.structuredContent);
+ if (!validationResult.valid) {
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Structured content does not match the tool's output schema: ${validationResult.errorMessage}`);
+ }
+ }
+ catch (error) {
+ if (error instanceof types_js_1.McpError) {
+ throw error;
+ }
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Failed to validate structured content: ${error instanceof Error ? error.message : String(error)}`);
+ }
+ }
+ }
+ return result;
+ }
+ isToolTask(toolName) {
+ if (!this._serverCapabilities?.tasks?.requests?.tools?.call) {
+ return false;
+ }
+ return this._cachedKnownTaskTools.has(toolName);
+ }
+ /**
+ * Check if a tool requires task-based execution.
+ * Unlike isToolTask which includes 'optional' tools, this only checks for 'required'.
+ */
+ isToolTaskRequired(toolName) {
+ return this._cachedRequiredTaskTools.has(toolName);
+ }
+ /**
+ * Cache validators for tool output schemas.
+ * Called after listTools() to pre-compile validators for better performance.
+ */
+ cacheToolMetadata(tools) {
+ this._cachedToolOutputValidators.clear();
+ this._cachedKnownTaskTools.clear();
+ this._cachedRequiredTaskTools.clear();
+ for (const tool of tools) {
+ // If the tool has an outputSchema, create and cache the validator
+ if (tool.outputSchema) {
+ const toolValidator = this._jsonSchemaValidator.getValidator(tool.outputSchema);
+ this._cachedToolOutputValidators.set(tool.name, toolValidator);
+ }
+ // If the tool supports task-based execution, cache that information
+ const taskSupport = tool.execution?.taskSupport;
+ if (taskSupport === 'required' || taskSupport === 'optional') {
+ this._cachedKnownTaskTools.add(tool.name);
+ }
+ if (taskSupport === 'required') {
+ this._cachedRequiredTaskTools.add(tool.name);
+ }
+ }
+ }
+ /**
+ * Get cached validator for a tool
+ */
+ getToolOutputValidator(toolName) {
+ return this._cachedToolOutputValidators.get(toolName);
+ }
+ async listTools(params, options) {
+ const result = await this.request({ method: 'tools/list', params }, types_js_1.ListToolsResultSchema, options);
+ // Cache the tools and their output schemas for future validation
+ this.cacheToolMetadata(result.tools);
+ return result;
+ }
+ /**
+ * Set up a single list changed handler.
+ * @internal
+ */
+ _setupListChangedHandler(listType, notificationSchema, options, fetcher) {
+ // Validate options using Zod schema (validates autoRefresh and debounceMs)
+ const parseResult = types_js_1.ListChangedOptionsBaseSchema.safeParse(options);
+ if (!parseResult.success) {
+ throw new Error(`Invalid ${listType} listChanged options: ${parseResult.error.message}`);
+ }
+ // Validate callback
+ if (typeof options.onChanged !== 'function') {
+ throw new Error(`Invalid ${listType} listChanged options: onChanged must be a function`);
+ }
+ const { autoRefresh, debounceMs } = parseResult.data;
+ const { onChanged } = options;
+ const refresh = async () => {
+ if (!autoRefresh) {
+ onChanged(null, null);
+ return;
+ }
+ try {
+ const items = await fetcher();
+ onChanged(null, items);
+ }
+ catch (e) {
+ const error = e instanceof Error ? e : new Error(String(e));
+ onChanged(error, null);
+ }
+ };
+ const handler = () => {
+ if (debounceMs) {
+ // Clear any pending debounce timer for this list type
+ const existingTimer = this._listChangedDebounceTimers.get(listType);
+ if (existingTimer) {
+ clearTimeout(existingTimer);
+ }
+ // Set up debounced refresh
+ const timer = setTimeout(refresh, debounceMs);
+ this._listChangedDebounceTimers.set(listType, timer);
+ }
+ else {
+ // No debounce, refresh immediately
+ refresh();
+ }
+ };
+ // Register notification handler
+ this.setNotificationHandler(notificationSchema, handler);
+ }
+ async sendRootsListChanged() {
+ return this.notification({ method: 'notifications/roots/list_changed' });
+ }
+}
+exports.Client = Client;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js.map
new file mode 100644
index 0000000..0601a04
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":";;;AA4HA,oEAgBC;AA5ID,uDAA+G;AAG/G,0CAiDqB;AACrB,mEAAuE;AAEvE,2DAQiC;AAEjC,+DAA0E;AAC1E,iEAAoH;AAEpH;;;;;GAKG;AACH,SAAS,wBAAwB,CAAC,MAAkC,EAAE,IAAa;IAC/E,IAAI,CAAC,MAAM,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO;IAEjE,2BAA2B;IAC3B,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,UAAU,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;QACzF,MAAM,GAAG,GAAG,IAA+B,CAAC;QAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,UAAoE,CAAC;QAC1F,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACnC,MAAM,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;YAC9B,+DAA+D;YAC/D,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE,CAAC;gBACxF,GAAG,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC;YAClC,CAAC;YACD,8CAA8C;YAC9C,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC;gBACzB,wBAAwB,CAAC,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;YACnD,CAAC;QACL,CAAC;IACL,CAAC;IAED,IAAI,KAAK,CAAC,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line at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/middleware.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/middleware.d.ts
new file mode 100644
index 0000000..726ac57
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/middleware.d.ts
@@ -0,0 +1,169 @@
+import { OAuthClientProvider } from './auth.js';
+import { FetchLike } from '../shared/transport.js';
+/**
+ * Middleware function that wraps and enhances fetch functionality.
+ * Takes a fetch handler and returns an enhanced fetch handler.
+ */
+export type Middleware = (next: FetchLike) => FetchLike;
+/**
+ * Creates a fetch wrapper that handles OAuth authentication automatically.
+ *
+ * This wrapper will:
+ * - Add Authorization headers with access tokens
+ * - Handle 401 responses by attempting re-authentication
+ * - Retry the original request after successful auth
+ * - Handle OAuth errors appropriately (InvalidClientError, etc.)
+ *
+ * The baseUrl parameter is optional and defaults to using the domain from the request URL.
+ * However, you should explicitly provide baseUrl when:
+ * - Making requests to multiple subdomains (e.g., api.example.com, cdn.example.com)
+ * - Using API paths that differ from OAuth discovery paths (e.g., requesting /api/v1/data but OAuth is at /)
+ * - The OAuth server is on a different domain than your API requests
+ * - You want to ensure consistent OAuth behavior regardless of request URLs
+ *
+ * For MCP transports, set baseUrl to the same URL you pass to the transport constructor.
+ *
+ * Note: This wrapper is designed for general-purpose fetch operations.
+ * MCP transports (SSE and StreamableHTTP) already have built-in OAuth handling
+ * and should not need this wrapper.
+ *
+ * @param provider - OAuth client provider for authentication
+ * @param baseUrl - Base URL for OAuth server discovery (defaults to request URL domain)
+ * @returns A fetch middleware function
+ */
+export declare const withOAuth: (provider: OAuthClientProvider, baseUrl?: string | URL) => Middleware;
+/**
+ * Logger function type for HTTP requests
+ */
+export type RequestLogger = (input: {
+ method: string;
+ url: string | URL;
+ status: number;
+ statusText: string;
+ duration: number;
+ requestHeaders?: Headers;
+ responseHeaders?: Headers;
+ error?: Error;
+}) => void;
+/**
+ * Configuration options for the logging middleware
+ */
+export type LoggingOptions = {
+ /**
+ * Custom logger function, defaults to console logging
+ */
+ logger?: RequestLogger;
+ /**
+ * Whether to include request headers in logs
+ * @default false
+ */
+ includeRequestHeaders?: boolean;
+ /**
+ * Whether to include response headers in logs
+ * @default false
+ */
+ includeResponseHeaders?: boolean;
+ /**
+ * Status level filter - only log requests with status >= this value
+ * Set to 0 to log all requests, 400 to log only errors
+ * @default 0
+ */
+ statusLevel?: number;
+};
+/**
+ * Creates a fetch middleware that logs HTTP requests and responses.
+ *
+ * When called without arguments `withLogging()`, it uses the default logger that:
+ * - Logs successful requests (2xx) to `console.log`
+ * - Logs error responses (4xx/5xx) and network errors to `console.error`
+ * - Logs all requests regardless of status (statusLevel: 0)
+ * - Does not include request or response headers in logs
+ * - Measures and displays request duration in milliseconds
+ *
+ * Important: the default logger uses both `console.log` and `console.error` so it should not be used with
+ * `stdio` transports and applications.
+ *
+ * @param options - Logging configuration options
+ * @returns A fetch middleware function
+ */
+export declare const withLogging: (options?: LoggingOptions) => Middleware;
+/**
+ * Composes multiple fetch middleware functions into a single middleware pipeline.
+ * Middleware are applied in the order they appear, creating a chain of handlers.
+ *
+ * @example
+ * ```typescript
+ * // Create a middleware pipeline that handles both OAuth and logging
+ * const enhancedFetch = applyMiddlewares(
+ * withOAuth(oauthProvider, 'https://api.example.com'),
+ * withLogging({ statusLevel: 400 })
+ * )(fetch);
+ *
+ * // Use the enhanced fetch - it will handle auth and log errors
+ * const response = await enhancedFetch('https://api.example.com/data');
+ * ```
+ *
+ * @param middleware - Array of fetch middleware to compose into a pipeline
+ * @returns A single composed middleware function
+ */
+export declare const applyMiddlewares: (...middleware: Middleware[]) => Middleware;
+/**
+ * Helper function to create custom fetch middleware with cleaner syntax.
+ * Provides the next handler and request details as separate parameters for easier access.
+ *
+ * @example
+ * ```typescript
+ * // Create custom authentication middleware
+ * const customAuthMiddleware = createMiddleware(async (next, input, init) => {
+ * const headers = new Headers(init?.headers);
+ * headers.set('X-Custom-Auth', 'my-token');
+ *
+ * const response = await next(input, { ...init, headers });
+ *
+ * if (response.status === 401) {
+ * console.log('Authentication failed');
+ * }
+ *
+ * return response;
+ * });
+ *
+ * // Create conditional middleware
+ * const conditionalMiddleware = createMiddleware(async (next, input, init) => {
+ * const url = typeof input === 'string' ? input : input.toString();
+ *
+ * // Only add headers for API routes
+ * if (url.includes('/api/')) {
+ * const headers = new Headers(init?.headers);
+ * headers.set('X-API-Version', 'v2');
+ * return next(input, { ...init, headers });
+ * }
+ *
+ * // Pass through for non-API routes
+ * return next(input, init);
+ * });
+ *
+ * // Create caching middleware
+ * const cacheMiddleware = createMiddleware(async (next, input, init) => {
+ * const cacheKey = typeof input === 'string' ? input : input.toString();
+ *
+ * // Check cache first
+ * const cached = await getFromCache(cacheKey);
+ * if (cached) {
+ * return new Response(cached, { status: 200 });
+ * }
+ *
+ * // Make request and cache result
+ * const response = await next(input, init);
+ * if (response.ok) {
+ * await saveToCache(cacheKey, await response.clone().text());
+ * }
+ *
+ * return response;
+ * });
+ * ```
+ *
+ * @param handler - Function that receives the next handler and request parameters
+ * @returns A fetch middleware function
+ */
+export declare const createMiddleware: (handler: (next: FetchLike, input: string | URL, init?: RequestInit) => Promise) => Middleware;
+//# sourceMappingURL=middleware.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/middleware.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/middleware.d.ts.map
new file mode 100644
index 0000000..88ac778
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/middleware.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../../src/client/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,mBAAmB,EAAqB,MAAM,WAAW,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,MAAM,w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AO,CAAC,QAAQ,CAAC,KAAG,UAE3H,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/middleware.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/middleware.js
new file mode 100644
index 0000000..4dae753
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/middleware.js
@@ -0,0 +1,252 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.createMiddleware = exports.applyMiddlewares = exports.withLogging = exports.withOAuth = void 0;
+const auth_js_1 = require("./auth.js");
+/**
+ * Creates a fetch wrapper that handles OAuth authentication automatically.
+ *
+ * This wrapper will:
+ * - Add Authorization headers with access tokens
+ * - Handle 401 responses by attempting re-authentication
+ * - Retry the original request after successful auth
+ * - Handle OAuth errors appropriately (InvalidClientError, etc.)
+ *
+ * The baseUrl parameter is optional and defaults to using the domain from the request URL.
+ * However, you should explicitly provide baseUrl when:
+ * - Making requests to multiple subdomains (e.g., api.example.com, cdn.example.com)
+ * - Using API paths that differ from OAuth discovery paths (e.g., requesting /api/v1/data but OAuth is at /)
+ * - The OAuth server is on a different domain than your API requests
+ * - You want to ensure consistent OAuth behavior regardless of request URLs
+ *
+ * For MCP transports, set baseUrl to the same URL you pass to the transport constructor.
+ *
+ * Note: This wrapper is designed for general-purpose fetch operations.
+ * MCP transports (SSE and StreamableHTTP) already have built-in OAuth handling
+ * and should not need this wrapper.
+ *
+ * @param provider - OAuth client provider for authentication
+ * @param baseUrl - Base URL for OAuth server discovery (defaults to request URL domain)
+ * @returns A fetch middleware function
+ */
+const withOAuth = (provider, baseUrl) => next => {
+ return async (input, init) => {
+ const makeRequest = async () => {
+ const headers = new Headers(init?.headers);
+ // Add authorization header if tokens are available
+ const tokens = await provider.tokens();
+ if (tokens) {
+ headers.set('Authorization', `Bearer ${tokens.access_token}`);
+ }
+ return await next(input, { ...init, headers });
+ };
+ let response = await makeRequest();
+ // Handle 401 responses by attempting re-authentication
+ if (response.status === 401) {
+ try {
+ const { resourceMetadataUrl, scope } = (0, auth_js_1.extractWWWAuthenticateParams)(response);
+ // Use provided baseUrl or extract from request URL
+ const serverUrl = baseUrl || (typeof input === 'string' ? new URL(input).origin : input.origin);
+ const result = await (0, auth_js_1.auth)(provider, {
+ serverUrl,
+ resourceMetadataUrl,
+ scope,
+ fetchFn: next
+ });
+ if (result === 'REDIRECT') {
+ throw new auth_js_1.UnauthorizedError('Authentication requires user authorization - redirect initiated');
+ }
+ if (result !== 'AUTHORIZED') {
+ throw new auth_js_1.UnauthorizedError(`Authentication failed with result: ${result}`);
+ }
+ // Retry the request with fresh tokens
+ response = await makeRequest();
+ }
+ catch (error) {
+ if (error instanceof auth_js_1.UnauthorizedError) {
+ throw error;
+ }
+ throw new auth_js_1.UnauthorizedError(`Failed to re-authenticate: ${error instanceof Error ? error.message : String(error)}`);
+ }
+ }
+ // If we still have a 401 after re-auth attempt, throw an error
+ if (response.status === 401) {
+ const url = typeof input === 'string' ? input : input.toString();
+ throw new auth_js_1.UnauthorizedError(`Authentication failed for ${url}`);
+ }
+ return response;
+ };
+};
+exports.withOAuth = withOAuth;
+/**
+ * Creates a fetch middleware that logs HTTP requests and responses.
+ *
+ * When called without arguments `withLogging()`, it uses the default logger that:
+ * - Logs successful requests (2xx) to `console.log`
+ * - Logs error responses (4xx/5xx) and network errors to `console.error`
+ * - Logs all requests regardless of status (statusLevel: 0)
+ * - Does not include request or response headers in logs
+ * - Measures and displays request duration in milliseconds
+ *
+ * Important: the default logger uses both `console.log` and `console.error` so it should not be used with
+ * `stdio` transports and applications.
+ *
+ * @param options - Logging configuration options
+ * @returns A fetch middleware function
+ */
+const withLogging = (options = {}) => {
+ const { logger, includeRequestHeaders = false, includeResponseHeaders = false, statusLevel = 0 } = options;
+ const defaultLogger = input => {
+ const { method, url, status, statusText, duration, requestHeaders, responseHeaders, error } = input;
+ let message = error
+ ? `HTTP ${method} ${url} failed: ${error.message} (${duration}ms)`
+ : `HTTP ${method} ${url} ${status} ${statusText} (${duration}ms)`;
+ // Add headers to message if requested
+ if (includeRequestHeaders && requestHeaders) {
+ const reqHeaders = Array.from(requestHeaders.entries())
+ .map(([key, value]) => `${key}: ${value}`)
+ .join(', ');
+ message += `\n Request Headers: {${reqHeaders}}`;
+ }
+ if (includeResponseHeaders && responseHeaders) {
+ const resHeaders = Array.from(responseHeaders.entries())
+ .map(([key, value]) => `${key}: ${value}`)
+ .join(', ');
+ message += `\n Response Headers: {${resHeaders}}`;
+ }
+ if (error || status >= 400) {
+ // eslint-disable-next-line no-console
+ console.error(message);
+ }
+ else {
+ // eslint-disable-next-line no-console
+ console.log(message);
+ }
+ };
+ const logFn = logger || defaultLogger;
+ return next => async (input, init) => {
+ const startTime = performance.now();
+ const method = init?.method || 'GET';
+ const url = typeof input === 'string' ? input : input.toString();
+ const requestHeaders = includeRequestHeaders ? new Headers(init?.headers) : undefined;
+ try {
+ const response = await next(input, init);
+ const duration = performance.now() - startTime;
+ // Only log if status meets the log level threshold
+ if (response.status >= statusLevel) {
+ logFn({
+ method,
+ url,
+ status: response.status,
+ statusText: response.statusText,
+ duration,
+ requestHeaders,
+ responseHeaders: includeResponseHeaders ? response.headers : undefined
+ });
+ }
+ return response;
+ }
+ catch (error) {
+ const duration = performance.now() - startTime;
+ // Always log errors regardless of log level
+ logFn({
+ method,
+ url,
+ status: 0,
+ statusText: 'Network Error',
+ duration,
+ requestHeaders,
+ error: error
+ });
+ throw error;
+ }
+ };
+};
+exports.withLogging = withLogging;
+/**
+ * Composes multiple fetch middleware functions into a single middleware pipeline.
+ * Middleware are applied in the order they appear, creating a chain of handlers.
+ *
+ * @example
+ * ```typescript
+ * // Create a middleware pipeline that handles both OAuth and logging
+ * const enhancedFetch = applyMiddlewares(
+ * withOAuth(oauthProvider, 'https://api.example.com'),
+ * withLogging({ statusLevel: 400 })
+ * )(fetch);
+ *
+ * // Use the enhanced fetch - it will handle auth and log errors
+ * const response = await enhancedFetch('https://api.example.com/data');
+ * ```
+ *
+ * @param middleware - Array of fetch middleware to compose into a pipeline
+ * @returns A single composed middleware function
+ */
+const applyMiddlewares = (...middleware) => {
+ return next => {
+ return middleware.reduce((handler, mw) => mw(handler), next);
+ };
+};
+exports.applyMiddlewares = applyMiddlewares;
+/**
+ * Helper function to create custom fetch middleware with cleaner syntax.
+ * Provides the next handler and request details as separate parameters for easier access.
+ *
+ * @example
+ * ```typescript
+ * // Create custom authentication middleware
+ * const customAuthMiddleware = createMiddleware(async (next, input, init) => {
+ * const headers = new Headers(init?.headers);
+ * headers.set('X-Custom-Auth', 'my-token');
+ *
+ * const response = await next(input, { ...init, headers });
+ *
+ * if (response.status === 401) {
+ * console.log('Authentication failed');
+ * }
+ *
+ * return response;
+ * });
+ *
+ * // Create conditional middleware
+ * const conditionalMiddleware = createMiddleware(async (next, input, init) => {
+ * const url = typeof input === 'string' ? input : input.toString();
+ *
+ * // Only add headers for API routes
+ * if (url.includes('/api/')) {
+ * const headers = new Headers(init?.headers);
+ * headers.set('X-API-Version', 'v2');
+ * return next(input, { ...init, headers });
+ * }
+ *
+ * // Pass through for non-API routes
+ * return next(input, init);
+ * });
+ *
+ * // Create caching middleware
+ * const cacheMiddleware = createMiddleware(async (next, input, init) => {
+ * const cacheKey = typeof input === 'string' ? input : input.toString();
+ *
+ * // Check cache first
+ * const cached = await getFromCache(cacheKey);
+ * if (cached) {
+ * return new Response(cached, { status: 200 });
+ * }
+ *
+ * // Make request and cache result
+ * const response = await next(input, init);
+ * if (response.ok) {
+ * await saveToCache(cacheKey, await response.clone().text());
+ * }
+ *
+ * return response;
+ * });
+ * ```
+ *
+ * @param handler - Function that receives the next handler and request parameters
+ * @returns A fetch middleware function
+ */
+const createMiddleware = (handler) => {
+ return next => (input, init) => handler(next, input, init);
+};
+exports.createMiddleware = createMiddleware;
+//# sourceMappingURL=middleware.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/middleware.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/middleware.js.map
new file mode 100644
index 0000000..d28adff
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/middleware.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../../src/client/middleware.ts"],"names":[],"mappings":";;;AAAA,uCAAuG;AASvG;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACI,MAAM,SAAS,GAClB,CAAC,QAA6B,EAAE,OAAsB,EAAc,EAAE,CACtE,IAAI,CAAC,EAAE;IACH,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACzB,MAAM,WAAW,GAAG,KAAK,IAAuB,EAAE;YAC9C,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAE3C,mDAAmD;YACnD,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,MAAM,EAAE,CAAC;YACvC,IAAI,MAAM,EAAE,CAAC;gBACT,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;YAClE,CAAC;YAED,OAAO,MAAM,IAAI,CAAC,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QACnD,CAAC,CAAC;QAEF,IAAI,QAAQ,GAAG,MAAM,WAAW,EAAE,CAAC;QAEnC,uDAAuD;QACvD,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC1B,IAAI,CAAC;gBACD,MAAM,EAAE,mBAAmB,EAAE,KAAK,EAAE,GAAG,IAAA,sCAA4B,EAAC,QAAQ,CAAC,CAAC;gBAE9E,mDAAmD;gBACnD,MAAM,SAAS,GAAG,OAAO,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,I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pB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;YAE/C,4CAA4C;YAC5C,KAAK,CAAC;gBACF,MAAM;gBACN,GAAG;gBACH,MAAM,EAAE,CAAC;gBACT,UAAU,EAAE,eAAe;gBAC3B,QAAQ;gBACR,cAAc;gBACd,KAAK,EAAE,KAAc;aACxB,CAAC,CAAC;YAEH,MAAM,KAAK,CAAC;QAChB,CAAC;IACL,CAAC,CAAC;AACN,CAAC,CAAC;AA7EW,QAAA,WAAW,eA6EtB;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,gBAAgB,GAAG,CAAC,GAAG,UAAwB,EAAc,EAAE;IACxE,OAAO,IAAI,CAAC,EAAE;QACV,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;IACjE,CAAC,CAAC;AACN,CAAC,CAAC;AAJW,QAAA,gBAAgB,oBAI3B;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACI,MAAM,gBAAgB,GAAG,CAAC,OAAwF,EAAc,EAAE;IACrI,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,KAAqB,EAAE,IAAI,CAAC,CAAC;AAC/E,CAAC,CAAC;AAFW,QAAA,gBAAgB,oBAE3B"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.d.ts
new file mode 100644
index 0000000..acf99f1
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.d.ts
@@ -0,0 +1,81 @@
+import { type ErrorEvent, type EventSourceInit } from 'eventsource';
+import { Transport, FetchLike } from '../shared/transport.js';
+import { JSONRPCMessage } from '../types.js';
+import { OAuthClientProvider } from './auth.js';
+export declare class SseError extends Error {
+ readonly code: number | undefined;
+ readonly event: ErrorEvent;
+ constructor(code: number | undefined, message: string | undefined, event: ErrorEvent);
+}
+/**
+ * Configuration options for the `SSEClientTransport`.
+ */
+export type SSEClientTransportOptions = {
+ /**
+ * An OAuth client provider to use for authentication.
+ *
+ * When an `authProvider` is specified and the SSE connection is started:
+ * 1. The connection is attempted with any existing access token from the `authProvider`.
+ * 2. If the access token has expired, the `authProvider` is used to refresh the token.
+ * 3. If token refresh fails or no access token exists, and auth is required, `OAuthClientProvider.redirectToAuthorization` is called, and an `UnauthorizedError` will be thrown from `connect`/`start`.
+ *
+ * After the user has finished authorizing via their user agent, and is redirected back to the MCP client application, call `SSEClientTransport.finishAuth` with the authorization code before retrying the connection.
+ *
+ * If an `authProvider` is not provided, and auth is required, an `UnauthorizedError` will be thrown.
+ *
+ * `UnauthorizedError` might also be thrown when sending any message over the SSE transport, indicating that the session has expired, and needs to be re-authed and reconnected.
+ */
+ authProvider?: OAuthClientProvider;
+ /**
+ * Customizes the initial SSE request to the server (the request that begins the stream).
+ *
+ * NOTE: Setting this property will prevent an `Authorization` header from
+ * being automatically attached to the SSE request, if an `authProvider` is
+ * also given. This can be worked around by setting the `Authorization` header
+ * manually.
+ */
+ eventSourceInit?: EventSourceInit;
+ /**
+ * Customizes recurring POST requests to the server.
+ */
+ requestInit?: RequestInit;
+ /**
+ * Custom fetch implementation used for all network requests.
+ */
+ fetch?: FetchLike;
+};
+/**
+ * Client transport for SSE: this will connect to a server using Server-Sent Events for receiving
+ * messages and make separate POST requests for sending messages.
+ * @deprecated SSEClientTransport is deprecated. Prefer to use StreamableHTTPClientTransport where possible instead. Note that because some servers are still using SSE, clients may need to support both transports during the migration period.
+ */
+export declare class SSEClientTransport implements Transport {
+ private _eventSource?;
+ private _endpoint?;
+ private _abortController?;
+ private _url;
+ private _resourceMetadataUrl?;
+ private _scope?;
+ private _eventSourceInit?;
+ private _requestInit?;
+ private _authProvider?;
+ private _fetch?;
+ private _fetchWithInit;
+ private _protocolVersion?;
+ onclose?: () => void;
+ onerror?: (error: Error) => void;
+ onmessage?: (message: JSONRPCMessage) => void;
+ constructor(url: URL, opts?: SSEClientTransportOptions);
+ private _authThenStart;
+ private _commonHeaders;
+ private _startOrAuth;
+ start(): Promise;
+ /**
+ * Call this method after the user has finished authorizing via their user agent and is redirected back to the MCP client application. This will exchange the authorization code for an access token, enabling the next connection attempt to successfully auth.
+ */
+ finishAuth(authorizationCode: string): Promise;
+ close(): Promise;
+ send(message: JSONRPCMessage): Promise;
+ setProtocolVersion(version: string): void;
+}
+//# sourceMappingURL=sse.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.d.ts.map
new file mode 100644
index 0000000..14ee939
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../../src/client/sse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,SAAS,EAAyC,MAAM,wBAAwB,CAAC;AACrG,OAAO,EAAE,cAAc,EAAwB,MAAM,aAAa,CAAC;AACnE,OAAO,EAAkD,mBAAmB,EAAqB,MAAM,WAAW,CAAC;AAEnH,qBAAa,QAAS,SAAQ,KAAK;aAEX,IAAI,EAAE,MAAM,GAAG,SAAS;aAExB,KAAK,EAAE,UAAU;gBAFjB,IAAI,EAAE,MAAM,GAAG,SAAS,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AAC,IAAI,CAAC;IAMtB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAkDlD,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAG5C"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.js
new file mode 100644
index 0000000..8ca8dad
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.js
@@ -0,0 +1,211 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SSEClientTransport = exports.SseError = void 0;
+const eventsource_1 = require("eventsource");
+const transport_js_1 = require("../shared/transport.js");
+const types_js_1 = require("../types.js");
+const auth_js_1 = require("./auth.js");
+class SseError extends Error {
+ constructor(code, message, event) {
+ super(`SSE error: ${message}`);
+ this.code = code;
+ this.event = event;
+ }
+}
+exports.SseError = SseError;
+/**
+ * Client transport for SSE: this will connect to a server using Server-Sent Events for receiving
+ * messages and make separate POST requests for sending messages.
+ * @deprecated SSEClientTransport is deprecated. Prefer to use StreamableHTTPClientTransport where possible instead. Note that because some servers are still using SSE, clients may need to support both transports during the migration period.
+ */
+class SSEClientTransport {
+ constructor(url, opts) {
+ this._url = url;
+ this._resourceMetadataUrl = undefined;
+ this._scope = undefined;
+ this._eventSourceInit = opts?.eventSourceInit;
+ this._requestInit = opts?.requestInit;
+ this._authProvider = opts?.authProvider;
+ this._fetch = opts?.fetch;
+ this._fetchWithInit = (0, transport_js_1.createFetchWithInit)(opts?.fetch, opts?.requestInit);
+ }
+ async _authThenStart() {
+ if (!this._authProvider) {
+ throw new auth_js_1.UnauthorizedError('No auth provider');
+ }
+ let result;
+ try {
+ result = await (0, auth_js_1.auth)(this._authProvider, {
+ serverUrl: this._url,
+ resourceMetadataUrl: this._resourceMetadataUrl,
+ scope: this._scope,
+ fetchFn: this._fetchWithInit
+ });
+ }
+ catch (error) {
+ this.onerror?.(error);
+ throw error;
+ }
+ if (result !== 'AUTHORIZED') {
+ throw new auth_js_1.UnauthorizedError();
+ }
+ return await this._startOrAuth();
+ }
+ async _commonHeaders() {
+ const headers = {};
+ if (this._authProvider) {
+ const tokens = await this._authProvider.tokens();
+ if (tokens) {
+ headers['Authorization'] = `Bearer ${tokens.access_token}`;
+ }
+ }
+ if (this._protocolVersion) {
+ headers['mcp-protocol-version'] = this._protocolVersion;
+ }
+ const extraHeaders = (0, transport_js_1.normalizeHeaders)(this._requestInit?.headers);
+ return new Headers({
+ ...headers,
+ ...extraHeaders
+ });
+ }
+ _startOrAuth() {
+ const fetchImpl = (this?._eventSourceInit?.fetch ?? this._fetch ?? fetch);
+ return new Promise((resolve, reject) => {
+ this._eventSource = new eventsource_1.EventSource(this._url.href, {
+ ...this._eventSourceInit,
+ fetch: async (url, init) => {
+ const headers = await this._commonHeaders();
+ headers.set('Accept', 'text/event-stream');
+ const response = await fetchImpl(url, {
+ ...init,
+ headers
+ });
+ if (response.status === 401 && response.headers.has('www-authenticate')) {
+ const { resourceMetadataUrl, scope } = (0, auth_js_1.extractWWWAuthenticateParams)(response);
+ this._resourceMetadataUrl = resourceMetadataUrl;
+ this._scope = scope;
+ }
+ return response;
+ }
+ });
+ this._abortController = new AbortController();
+ this._eventSource.onerror = event => {
+ if (event.code === 401 && this._authProvider) {
+ this._authThenStart().then(resolve, reject);
+ return;
+ }
+ const error = new SseError(event.code, event.message, event);
+ reject(error);
+ this.onerror?.(error);
+ };
+ this._eventSource.onopen = () => {
+ // The connection is open, but we need to wait for the endpoint to be received.
+ };
+ this._eventSource.addEventListener('endpoint', (event) => {
+ const messageEvent = event;
+ try {
+ this._endpoint = new URL(messageEvent.data, this._url);
+ if (this._endpoint.origin !== this._url.origin) {
+ throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`);
+ }
+ }
+ catch (error) {
+ reject(error);
+ this.onerror?.(error);
+ void this.close();
+ return;
+ }
+ resolve();
+ });
+ this._eventSource.onmessage = (event) => {
+ const messageEvent = event;
+ let message;
+ try {
+ message = types_js_1.JSONRPCMessageSchema.parse(JSON.parse(messageEvent.data));
+ }
+ catch (error) {
+ this.onerror?.(error);
+ return;
+ }
+ this.onmessage?.(message);
+ };
+ });
+ }
+ async start() {
+ if (this._eventSource) {
+ throw new Error('SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.');
+ }
+ return await this._startOrAuth();
+ }
+ /**
+ * Call this method after the user has finished authorizing via their user agent and is redirected back to the MCP client application. This will exchange the authorization code for an access token, enabling the next connection attempt to successfully auth.
+ */
+ async finishAuth(authorizationCode) {
+ if (!this._authProvider) {
+ throw new auth_js_1.UnauthorizedError('No auth provider');
+ }
+ const result = await (0, auth_js_1.auth)(this._authProvider, {
+ serverUrl: this._url,
+ authorizationCode,
+ resourceMetadataUrl: this._resourceMetadataUrl,
+ scope: this._scope,
+ fetchFn: this._fetchWithInit
+ });
+ if (result !== 'AUTHORIZED') {
+ throw new auth_js_1.UnauthorizedError('Failed to authorize');
+ }
+ }
+ async close() {
+ this._abortController?.abort();
+ this._eventSource?.close();
+ this.onclose?.();
+ }
+ async send(message) {
+ if (!this._endpoint) {
+ throw new Error('Not connected');
+ }
+ try {
+ const headers = await this._commonHeaders();
+ headers.set('content-type', 'application/json');
+ const init = {
+ ...this._requestInit,
+ method: 'POST',
+ headers,
+ body: JSON.stringify(message),
+ signal: this._abortController?.signal
+ };
+ const response = await (this._fetch ?? fetch)(this._endpoint, init);
+ if (!response.ok) {
+ const text = await response.text().catch(() => null);
+ if (response.status === 401 && this._authProvider) {
+ const { resourceMetadataUrl, scope } = (0, auth_js_1.extractWWWAuthenticateParams)(response);
+ this._resourceMetadataUrl = resourceMetadataUrl;
+ this._scope = scope;
+ const result = await (0, auth_js_1.auth)(this._authProvider, {
+ serverUrl: this._url,
+ resourceMetadataUrl: this._resourceMetadataUrl,
+ scope: this._scope,
+ fetchFn: this._fetchWithInit
+ });
+ if (result !== 'AUTHORIZED') {
+ throw new auth_js_1.UnauthorizedError();
+ }
+ // Purposely _not_ awaited, so we don't call onerror twice
+ return this.send(message);
+ }
+ throw new Error(`Error POSTing to endpoint (HTTP ${response.status}): ${text}`);
+ }
+ // Release connection - POST responses don't have content we need
+ await response.body?.cancel();
+ }
+ catch (error) {
+ this.onerror?.(error);
+ throw error;
+ }
+ }
+ setProtocolVersion(version) {
+ this._protocolVersion = version;
+ }
+}
+exports.SSEClientTransport = SSEClientTransport;
+//# sourceMappingURL=sse.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.js.map
new file mode 100644
index 0000000..daa8b98
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"sse.js","sourceRoot":"","sources":["../../../src/client/sse.ts"],"names":[],"mappings":";;;AAAA,6CAAiF;AACjF,yDAAqG;AACrG,0CAAmE;AACnE,uCAAmH;AAEnH,MAAa,QAAS,SAAQ,KAAK;IAC/B,YACoB,IAAwB,EACxC,OAA2B,EACX,KAAiB;QAEjC,KAAK,CAAC,cAAc,OAAO,EAAE,CAAC,CAAC;QAJf,SAAI,GAAJ,IAAI,CAAoB;QAExB,UAAK,GAAL,KAAK,CAAY;IAGrC,CAAC;CACJ;AARD,4BAQC;AA2CD;;;;GAIG;AACH,MAAa,kBAAkB;IAkB3B,YAAY,GAAQ,EAAE,IAAgC;QAClD,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,oBAAoB,GAAG,SAAS,CAAC;QACtC,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QACxB,IAAI,CAAC,gBAAgB,GAAG,IAAI,EAAE,eAAe,CAAC;QAC9C,IAAI,CAAC,Y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AAQ,CAAC,CAAC;oBAC9E,IAAI,CAAC,oBAAoB,GAAG,mBAAmB,CAAC;oBAChD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;oBAEpB,MAAM,MAAM,GAAG,MAAM,IAAA,cAAI,EAAC,IAAI,CAAC,aAAa,EAAE;wBAC1C,SAAS,EAAE,IAAI,CAAC,IAAI;wBACpB,mBAAmB,EAAE,IAAI,CAAC,oBAAoB;wBAC9C,KAAK,EAAE,IAAI,CAAC,MAAM;wBAClB,OAAO,EAAE,IAAI,CAAC,cAAc;qBAC/B,CAAC,CAAC;oBACH,IAAI,MAAM,KAAK,YAAY,EAAE,CAAC;wBAC1B,MAAM,IAAI,2BAAiB,EAAE,CAAC;oBAClC,CAAC;oBAED,0DAA0D;oBAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAC9B,CAAC;gBAED,MAAM,IAAI,KAAK,CAAC,mCAAmC,QAAQ,CAAC,MAAM,MAAM,IAAI,EAAE,CAAC,CAAC;YACpF,CAAC;YAED,iEAAiE;YACjE,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;QAClC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAI,CAAC,OAAO,EAAE,CAAC,KAAc,CAAC,CAAC;YAC/B,MAAM,KAAK,CAAC;QAChB,CAAC;IACL,CAAC;IAED,kBAAkB,CAAC,OAAe;QAC9B,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC;IACpC,CAAC;CACJ;AA1OD,gDA0OC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts
new file mode 100644
index 0000000..a411dba
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts
@@ -0,0 +1,77 @@
+import { IOType } from 'node:child_process';
+import { Stream } from 'node:stream';
+import { Transport } from '../shared/transport.js';
+import { JSONRPCMessage } from '../types.js';
+export type StdioServerParameters = {
+ /**
+ * The executable to run to start the server.
+ */
+ command: string;
+ /**
+ * Command line arguments to pass to the executable.
+ */
+ args?: string[];
+ /**
+ * The environment to use when spawning the process.
+ *
+ * If not specified, the result of getDefaultEnvironment() will be used.
+ */
+ env?: Record;
+ /**
+ * How to handle stderr of the child process. This matches the semantics of Node's `child_process.spawn`.
+ *
+ * The default is "inherit", meaning messages to stderr will be printed to the parent process's stderr.
+ */
+ stderr?: IOType | Stream | number;
+ /**
+ * The working directory to use when spawning the process.
+ *
+ * If not specified, the current working directory will be inherited.
+ */
+ cwd?: string;
+};
+/**
+ * Environment variables to inherit by default, if an environment is not explicitly given.
+ */
+export declare const DEFAULT_INHERITED_ENV_VARS: string[];
+/**
+ * Returns a default environment object including only environment variables deemed safe to inherit.
+ */
+export declare function getDefaultEnvironment(): Record;
+/**
+ * Client transport for stdio: this will connect to a server by spawning a process and communicating with it over stdin/stdout.
+ *
+ * This transport is only available in Node.js environments.
+ */
+export declare class StdioClientTransport implements Transport {
+ private _process?;
+ private _readBuffer;
+ private _serverParams;
+ private _stderrStream;
+ onclose?: () => void;
+ onerror?: (error: Error) => void;
+ onmessage?: (message: JSONRPCMessage) => void;
+ constructor(server: StdioServerParameters);
+ /**
+ * Starts the server process and prepares to communicate with it.
+ */
+ start(): Promise;
+ /**
+ * The stderr stream of the child process, if `StdioServerParameters.stderr` was set to "pipe" or "overlapped".
+ *
+ * If stderr piping was requested, a PassThrough stream is returned _immediately_, allowing callers to
+ * attach listeners before the start method is invoked. This prevents loss of any early
+ * error output emitted by the child process.
+ */
+ get stderr(): Stream | null;
+ /**
+ * The child process pid spawned by this transport.
+ *
+ * This is only available after the transport has been started.
+ */
+ get pid(): number | null;
+ private processReadBuffer;
+ close(): Promise;
+ send(message: JSONRPCMessage): Promise;
+}
+//# sourceMappingURL=stdio.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts.map
new file mode 100644
index 0000000..73b267b
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../../src/client/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,EAAE,MAAM,EAAe,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,qBAAqB,GAAG;IAChC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE7B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAElC;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,UAiBuB,CAAC;AAE/D;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAkB9D;AAED;;;;GAIG;AACH,qBAAa,oBAAqB,YAAW,SAAS;IAClD,OAAO,CAAC,QAAQ,CAAC,CAAe;IAChC,OAAO,CAAC,WAAW,CAAgC;IACnD,OAAO,CAAC,aAAa,CAAwB;IAC7C,OAAO,CAAC,aAAa,CAA4B;IAEjD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;gBAElC,MAAM,EAAE,qBAAqB;IAOzC;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAqD5B;;;;;;OAMG;IACH,IAAI,MAAM,IAAI,MAAM,GAAG,IAAI,CAM1B;IAED;;;;OAIG;IACH,IAAI,GAAG,IAAI,MAAM,GAAG,IAAI,CAEvB;IAED,OAAO,CAAC,iBAAiB;IAenB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAyC5B,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAc/C"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js
new file mode 100644
index 0000000..1dd822e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js
@@ -0,0 +1,196 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.StdioClientTransport = exports.DEFAULT_INHERITED_ENV_VARS = void 0;
+exports.getDefaultEnvironment = getDefaultEnvironment;
+const cross_spawn_1 = __importDefault(require("cross-spawn"));
+const node_process_1 = __importDefault(require("node:process"));
+const node_stream_1 = require("node:stream");
+const stdio_js_1 = require("../shared/stdio.js");
+/**
+ * Environment variables to inherit by default, if an environment is not explicitly given.
+ */
+exports.DEFAULT_INHERITED_ENV_VARS = node_process_1.default.platform === 'win32'
+ ? [
+ 'APPDATA',
+ 'HOMEDRIVE',
+ 'HOMEPATH',
+ 'LOCALAPPDATA',
+ 'PATH',
+ 'PROCESSOR_ARCHITECTURE',
+ 'SYSTEMDRIVE',
+ 'SYSTEMROOT',
+ 'TEMP',
+ 'USERNAME',
+ 'USERPROFILE',
+ 'PROGRAMFILES'
+ ]
+ : /* list inspired by the default env inheritance of sudo */
+ ['HOME', 'LOGNAME', 'PATH', 'SHELL', 'TERM', 'USER'];
+/**
+ * Returns a default environment object including only environment variables deemed safe to inherit.
+ */
+function getDefaultEnvironment() {
+ const env = {};
+ for (const key of exports.DEFAULT_INHERITED_ENV_VARS) {
+ const value = node_process_1.default.env[key];
+ if (value === undefined) {
+ continue;
+ }
+ if (value.startsWith('()')) {
+ // Skip functions, which are a security risk.
+ continue;
+ }
+ env[key] = value;
+ }
+ return env;
+}
+/**
+ * Client transport for stdio: this will connect to a server by spawning a process and communicating with it over stdin/stdout.
+ *
+ * This transport is only available in Node.js environments.
+ */
+class StdioClientTransport {
+ constructor(server) {
+ this._readBuffer = new stdio_js_1.ReadBuffer();
+ this._stderrStream = null;
+ this._serverParams = server;
+ if (server.stderr === 'pipe' || server.stderr === 'overlapped') {
+ this._stderrStream = new node_stream_1.PassThrough();
+ }
+ }
+ /**
+ * Starts the server process and prepares to communicate with it.
+ */
+ async start() {
+ if (this._process) {
+ throw new Error('StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.');
+ }
+ return new Promise((resolve, reject) => {
+ this._process = (0, cross_spawn_1.default)(this._serverParams.command, this._serverParams.args ?? [], {
+ // merge default env with server env because mcp server needs some env vars
+ env: {
+ ...getDefaultEnvironment(),
+ ...this._serverParams.env
+ },
+ stdio: ['pipe', 'pipe', this._serverParams.stderr ?? 'inherit'],
+ shell: false,
+ windowsHide: node_process_1.default.platform === 'win32',
+ cwd: this._serverParams.cwd
+ });
+ this._process.on('error', error => {
+ reject(error);
+ this.onerror?.(error);
+ });
+ this._process.on('spawn', () => {
+ resolve();
+ });
+ this._process.on('close', _code => {
+ this._process = undefined;
+ this.onclose?.();
+ });
+ this._process.stdin?.on('error', error => {
+ this.onerror?.(error);
+ });
+ this._process.stdout?.on('data', chunk => {
+ this._readBuffer.append(chunk);
+ this.processReadBuffer();
+ });
+ this._process.stdout?.on('error', error => {
+ this.onerror?.(error);
+ });
+ if (this._stderrStream && this._process.stderr) {
+ this._process.stderr.pipe(this._stderrStream);
+ }
+ });
+ }
+ /**
+ * The stderr stream of the child process, if `StdioServerParameters.stderr` was set to "pipe" or "overlapped".
+ *
+ * If stderr piping was requested, a PassThrough stream is returned _immediately_, allowing callers to
+ * attach listeners before the start method is invoked. This prevents loss of any early
+ * error output emitted by the child process.
+ */
+ get stderr() {
+ if (this._stderrStream) {
+ return this._stderrStream;
+ }
+ return this._process?.stderr ?? null;
+ }
+ /**
+ * The child process pid spawned by this transport.
+ *
+ * This is only available after the transport has been started.
+ */
+ get pid() {
+ return this._process?.pid ?? null;
+ }
+ processReadBuffer() {
+ while (true) {
+ try {
+ const message = this._readBuffer.readMessage();
+ if (message === null) {
+ break;
+ }
+ this.onmessage?.(message);
+ }
+ catch (error) {
+ this.onerror?.(error);
+ }
+ }
+ }
+ async close() {
+ if (this._process) {
+ const processToClose = this._process;
+ this._process = undefined;
+ const closePromise = new Promise(resolve => {
+ processToClose.once('close', () => {
+ resolve();
+ });
+ });
+ try {
+ processToClose.stdin?.end();
+ }
+ catch {
+ // ignore
+ }
+ await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);
+ if (processToClose.exitCode === null) {
+ try {
+ processToClose.kill('SIGTERM');
+ }
+ catch {
+ // ignore
+ }
+ await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);
+ }
+ if (processToClose.exitCode === null) {
+ try {
+ processToClose.kill('SIGKILL');
+ }
+ catch {
+ // ignore
+ }
+ }
+ }
+ this._readBuffer.clear();
+ }
+ send(message) {
+ return new Promise(resolve => {
+ if (!this._process?.stdin) {
+ throw new Error('Not connected');
+ }
+ const json = (0, stdio_js_1.serializeMessage)(message);
+ if (this._process.stdin.write(json)) {
+ resolve();
+ }
+ else {
+ this._process.stdin.once('drain', resolve);
+ }
+ });
+ }
+}
+exports.StdioClientTransport = StdioClientTransport;
+//# sourceMappingURL=stdio.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js.map
new file mode 100644
index 0000000..2b44e6c
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"stdio.js","sourceRoot":"","sources":["../../../src/client/stdio.ts"],"names":[],"mappings":";;;;;;AAkEA,sDAkBC;AAnFD,8DAAgC;AAChC,gEAAmC;AACnC,6CAAkD;AAClD,iDAAkE;AAqClE;;GAEG;AACU,QAAA,0BAA0B,GACnC,sBAAO,CAAC,QAAQ,KAAK,OAAO;IACxB,CAAC,CAAC;QACI,SAAS;QACT,WAAW;QACX,UAAU;QACV,cAAc;QACd,MAAM;QACN,wBAAwB;QACxB,aAAa;QACb,YAAY;QACZ,MAAM;QACN,UAAU;QACV,aAAa;QACb,cAAc;KACjB;IACH,CAAC,CAAC,0DAA0D;QAC1D,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/D;;GAEG;AACH,SAAgB,qBAAqB;IACjC,MAAM,GAAG,GAA2B,EAAE,CAAC;IAEvC,KAAK,MAAM,GAAG,IAAI,kCAA0B,EAAE,CAAC;QAC3C,MAAM,KAAK,GAAG,sBAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACtB,SAAS;QACb,CAAC;QAED,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,6CAA6C;YAC7C,SAAS;QACb,CAAC;QAED,GAAG,CAAC,G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/dist/cjs/client/streamableHttp.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.d.ts
new file mode 100644
index 0000000..6035b24
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.d.ts
@@ -0,0 +1,171 @@
+import { Transport, FetchLike } from '../shared/transport.js';
+import { JSONRPCMessage } from '../types.js';
+import { OAuthClientProvider } from './auth.js';
+export declare class StreamableHTTPError extends Error {
+ readonly code: number | undefined;
+ constructor(code: number | undefined, message: string | undefined);
+}
+/**
+ * Options for starting or authenticating an SSE connection
+ */
+export interface StartSSEOptions {
+ /**
+ * The resumption token used to continue long-running requests that were interrupted.
+ *
+ * This allows clients to reconnect and continue from where they left off.
+ */
+ resumptionToken?: string;
+ /**
+ * A callback that is invoked when the resumption token changes.
+ *
+ * This allows clients to persist the latest token for potential reconnection.
+ */
+ onresumptiontoken?: (token: string) => void;
+ /**
+ * Override Message ID to associate with the replay message
+ * so that response can be associate with the new resumed request.
+ */
+ replayMessageId?: string | number;
+}
+/**
+ * Configuration options for reconnection behavior of the StreamableHTTPClientTransport.
+ */
+export interface StreamableHTTPReconnectionOptions {
+ /**
+ * Maximum backoff time between reconnection attempts in milliseconds.
+ * Default is 30000 (30 seconds).
+ */
+ maxReconnectionDelay: number;
+ /**
+ * Initial backoff time between reconnection attempts in milliseconds.
+ * Default is 1000 (1 second).
+ */
+ initialReconnectionDelay: number;
+ /**
+ * The factor by which the reconnection delay increases after each attempt.
+ * Default is 1.5.
+ */
+ reconnectionDelayGrowFactor: number;
+ /**
+ * Maximum number of reconnection attempts before giving up.
+ * Default is 2.
+ */
+ maxRetries: number;
+}
+/**
+ * Configuration options for the `StreamableHTTPClientTransport`.
+ */
+export type StreamableHTTPClientTransportOptions = {
+ /**
+ * An OAuth client provider to use for authentication.
+ *
+ * When an `authProvider` is specified and the connection is started:
+ * 1. The connection is attempted with any existing access token from the `authProvider`.
+ * 2. If the access token has expired, the `authProvider` is used to refresh the token.
+ * 3. If token refresh fails or no access token exists, and auth is required, `OAuthClientProvider.redirectToAuthorization` is called, and an `UnauthorizedError` will be thrown from `connect`/`start`.
+ *
+ * After the user has finished authorizing via their user agent, and is redirected back to the MCP client application, call `StreamableHTTPClientTransport.finishAuth` with the authorization code before retrying the connection.
+ *
+ * If an `authProvider` is not provided, and auth is required, an `UnauthorizedError` will be thrown.
+ *
+ * `UnauthorizedError` might also be thrown when sending any message over the transport, indicating that the session has expired, and needs to be re-authed and reconnected.
+ */
+ authProvider?: OAuthClientProvider;
+ /**
+ * Customizes HTTP requests to the server.
+ */
+ requestInit?: RequestInit;
+ /**
+ * Custom fetch implementation used for all network requests.
+ */
+ fetch?: FetchLike;
+ /**
+ * Options to configure the reconnection behavior.
+ */
+ reconnectionOptions?: StreamableHTTPReconnectionOptions;
+ /**
+ * Session ID for the connection. This is used to identify the session on the server.
+ * When not provided and connecting to a server that supports session IDs, the server will generate a new session ID.
+ */
+ sessionId?: string;
+};
+/**
+ * Client transport for Streamable HTTP: this implements the MCP Streamable HTTP transport specification.
+ * It will connect to a server using HTTP POST for sending messages and HTTP GET with Server-Sent Events
+ * for receiving messages.
+ */
+export declare class StreamableHTTPClientTransport implements Transport {
+ private _abortController?;
+ private _url;
+ private _resourceMetadataUrl?;
+ private _scope?;
+ private _requestInit?;
+ private _authProvider?;
+ private _fetch?;
+ private _fetchWithInit;
+ private _sessionId?;
+ private _reconnectionOptions;
+ private _protocolVersion?;
+ private _hasCompletedAuthFlow;
+ private _lastUpscopingHeader?;
+ private _serverRetryMs?;
+ private _reconnectionTimeout?;
+ onclose?: () => void;
+ onerror?: (error: Error) => void;
+ onmessage?: (message: JSONRPCMessage) => void;
+ constructor(url: URL, opts?: StreamableHTTPClientTransportOptions);
+ private _authThenStart;
+ private _commonHeaders;
+ private _startOrAuthSse;
+ /**
+ * Calculates the next reconnection delay using backoff algorithm
+ *
+ * @param attempt Current reconnection attempt count for the specific stream
+ * @returns Time to wait in milliseconds before next reconnection attempt
+ */
+ private _getNextReconnectionDelay;
+ /**
+ * Schedule a reconnection attempt using server-provided retry interval or backoff
+ *
+ * @param lastEventId The ID of the last received event for resumability
+ * @param attemptCount Current reconnection attempt count for this specific stream
+ */
+ private _scheduleReconnection;
+ private _handleSseStream;
+ start(): Promise;
+ /**
+ * Call this method after the user has finished authorizing via their user agent and is redirected back to the MCP client application. This will exchange the authorization code for an access token, enabling the next connection attempt to successfully auth.
+ */
+ finishAuth(authorizationCode: string): Promise;
+ close(): Promise;
+ send(message: JSONRPCMessage | JSONRPCMessage[], options?: {
+ resumptionToken?: string;
+ onresumptiontoken?: (token: string) => void;
+ }): Promise;
+ get sessionId(): string | undefined;
+ /**
+ * Terminates the current session by sending a DELETE request to the server.
+ *
+ * Clients that no longer need a particular session
+ * (e.g., because the user is leaving the client application) SHOULD send an
+ * HTTP DELETE to the MCP endpoint with the Mcp-Session-Id header to explicitly
+ * terminate the session.
+ *
+ * The server MAY respond with HTTP 405 Method Not Allowed, indicating that
+ * the server does not allow clients to terminate sessions.
+ */
+ terminateSession(): Promise;
+ setProtocolVersion(version: string): void;
+ get protocolVersion(): string | undefined;
+ /**
+ * Resume an SSE stream from a previous event ID.
+ * Opens a GET SSE connection with Last-Event-ID header to replay missed events.
+ *
+ * @param lastEventId The event ID to resume from
+ * @param options Optional callback to receive new resumption tokens
+ */
+ resumeStream(lastEventId: string, options?: {
+ onresumptiontoken?: (token: string) => void;
+ }): Promise;
+}
+//# sourceMappingURL=streamableHttp.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.d.ts.map
new file mode 100644
index 0000000..5b6ffb8
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.d.ts.map
@@ -0,0 +1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AAK,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,GACpF,OAAO,CAAC,IAAI,CAAC;IA0JhB,IAAI,SAAS,IAAI,MAAM,GAAG,SAAS,CAElC;IAED;;;;;;;;;;OAUG;IACG,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IA+BvC,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAGzC,IAAI,eAAe,IAAI,MAAM,GAAG,SAAS,CAExC;IAED;;;;;;OAMG;IACG,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAMpH"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js
new file mode 100644
index 0000000..a29a7d3
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js
@@ -0,0 +1,482 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.StreamableHTTPClientTransport = exports.StreamableHTTPError = void 0;
+const transport_js_1 = require("../shared/transport.js");
+const types_js_1 = require("../types.js");
+const auth_js_1 = require("./auth.js");
+const stream_1 = require("eventsource-parser/stream");
+// Default reconnection options for StreamableHTTP connections
+const DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS = {
+ initialReconnectionDelay: 1000,
+ maxReconnectionDelay: 30000,
+ reconnectionDelayGrowFactor: 1.5,
+ maxRetries: 2
+};
+class StreamableHTTPError extends Error {
+ constructor(code, message) {
+ super(`Streamable HTTP error: ${message}`);
+ this.code = code;
+ }
+}
+exports.StreamableHTTPError = StreamableHTTPError;
+/**
+ * Client transport for Streamable HTTP: this implements the MCP Streamable HTTP transport specification.
+ * It will connect to a server using HTTP POST for sending messages and HTTP GET with Server-Sent Events
+ * for receiving messages.
+ */
+class StreamableHTTPClientTransport {
+ constructor(url, opts) {
+ this._hasCompletedAuthFlow = false; // Circuit breaker: detect auth success followed by immediate 401
+ this._url = url;
+ this._resourceMetadataUrl = undefined;
+ this._scope = undefined;
+ this._requestInit = opts?.requestInit;
+ this._authProvider = opts?.authProvider;
+ this._fetch = opts?.fetch;
+ this._fetchWithInit = (0, transport_js_1.createFetchWithInit)(opts?.fetch, opts?.requestInit);
+ this._sessionId = opts?.sessionId;
+ this._reconnectionOptions = opts?.reconnectionOptions ?? DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS;
+ }
+ async _authThenStart() {
+ if (!this._authProvider) {
+ throw new auth_js_1.UnauthorizedError('No auth provider');
+ }
+ let result;
+ try {
+ result = await (0, auth_js_1.auth)(this._authProvider, {
+ serverUrl: this._url,
+ resourceMetadataUrl: this._resourceMetadataUrl,
+ scope: this._scope,
+ fetchFn: this._fetchWithInit
+ });
+ }
+ catch (error) {
+ this.onerror?.(error);
+ throw error;
+ }
+ if (result !== 'AUTHORIZED') {
+ throw new auth_js_1.UnauthorizedError();
+ }
+ return await this._startOrAuthSse({ resumptionToken: undefined });
+ }
+ async _commonHeaders() {
+ const headers = {};
+ if (this._authProvider) {
+ const tokens = await this._authProvider.tokens();
+ if (tokens) {
+ headers['Authorization'] = `Bearer ${tokens.access_token}`;
+ }
+ }
+ if (this._sessionId) {
+ headers['mcp-session-id'] = this._sessionId;
+ }
+ if (this._protocolVersion) {
+ headers['mcp-protocol-version'] = this._protocolVersion;
+ }
+ const extraHeaders = (0, transport_js_1.normalizeHeaders)(this._requestInit?.headers);
+ return new Headers({
+ ...headers,
+ ...extraHeaders
+ });
+ }
+ async _startOrAuthSse(options) {
+ const { resumptionToken } = options;
+ try {
+ // Try to open an initial SSE stream with GET to listen for server messages
+ // This is optional according to the spec - server may not support it
+ const headers = await this._commonHeaders();
+ headers.set('Accept', 'text/event-stream');
+ // Include Last-Event-ID header for resumable streams if provided
+ if (resumptionToken) {
+ headers.set('last-event-id', resumptionToken);
+ }
+ const response = await (this._fetch ?? fetch)(this._url, {
+ method: 'GET',
+ headers,
+ signal: this._abortController?.signal
+ });
+ if (!response.ok) {
+ await response.body?.cancel();
+ if (response.status === 401 && this._authProvider) {
+ // Need to authenticate
+ return await this._authThenStart();
+ }
+ // 405 indicates that the server does not offer an SSE stream at GET endpoint
+ // This is an expected case that should not trigger an error
+ if (response.status === 405) {
+ return;
+ }
+ throw new StreamableHTTPError(response.status, `Failed to open SSE stream: ${response.statusText}`);
+ }
+ this._handleSseStream(response.body, options, true);
+ }
+ catch (error) {
+ this.onerror?.(error);
+ throw error;
+ }
+ }
+ /**
+ * Calculates the next reconnection delay using backoff algorithm
+ *
+ * @param attempt Current reconnection attempt count for the specific stream
+ * @returns Time to wait in milliseconds before next reconnection attempt
+ */
+ _getNextReconnectionDelay(attempt) {
+ // Use server-provided retry value if available
+ if (this._serverRetryMs !== undefined) {
+ return this._serverRetryMs;
+ }
+ // Fall back to exponential backoff
+ const initialDelay = this._reconnectionOptions.initialReconnectionDelay;
+ const growFactor = this._reconnectionOptions.reconnectionDelayGrowFactor;
+ const maxDelay = this._reconnectionOptions.maxReconnectionDelay;
+ // Cap at maximum delay
+ return Math.min(initialDelay * Math.pow(growFactor, attempt), maxDelay);
+ }
+ /**
+ * Schedule a reconnection attempt using server-provided retry interval or backoff
+ *
+ * @param lastEventId The ID of the last received event for resumability
+ * @param attemptCount Current reconnection attempt count for this specific stream
+ */
+ _scheduleReconnection(options, attemptCount = 0) {
+ // Use provided options or default options
+ const maxRetries = this._reconnectionOptions.maxRetries;
+ // Check if we've exceeded maximum retry attempts
+ if (attemptCount >= maxRetries) {
+ this.onerror?.(new Error(`Maximum reconnection attempts (${maxRetries}) exceeded.`));
+ return;
+ }
+ // Calculate next delay based on current attempt count
+ const delay = this._getNextReconnectionDelay(attemptCount);
+ // Schedule the reconnection
+ this._reconnectionTimeout = setTimeout(() => {
+ // Use the last event ID to resume where we left off
+ this._startOrAuthSse(options).catch(error => {
+ this.onerror?.(new Error(`Failed to reconnect SSE stream: ${error instanceof Error ? error.message : String(error)}`));
+ // Schedule another attempt if this one failed, incrementing the attempt counter
+ this._scheduleReconnection(options, attemptCount + 1);
+ });
+ }, delay);
+ }
+ _handleSseStream(stream, options, isReconnectable) {
+ if (!stream) {
+ return;
+ }
+ const { onresumptiontoken, replayMessageId } = options;
+ let lastEventId;
+ // Track whether we've received a priming event (event with ID)
+ // Per spec, server SHOULD send a priming event with ID before closing
+ let hasPrimingEvent = false;
+ // Track whether we've received a response - if so, no need to reconnect
+ // Reconnection is for when server disconnects BEFORE sending response
+ let receivedResponse = false;
+ const processStream = async () => {
+ // this is the closest we can get to trying to catch network errors
+ // if something happens reader will throw
+ try {
+ // Create a pipeline: binary stream -> text decoder -> SSE parser
+ const reader = stream
+ .pipeThrough(new TextDecoderStream())
+ .pipeThrough(new stream_1.EventSourceParserStream({
+ onRetry: (retryMs) => {
+ // Capture server-provided retry value for reconnection timing
+ this._serverRetryMs = retryMs;
+ }
+ }))
+ .getReader();
+ while (true) {
+ const { value: event, done } = await reader.read();
+ if (done) {
+ break;
+ }
+ // Update last event ID if provided
+ if (event.id) {
+ lastEventId = event.id;
+ // Mark that we've received a priming event - stream is now resumable
+ hasPrimingEvent = true;
+ onresumptiontoken?.(event.id);
+ }
+ // Skip events with no data (priming events, keep-alives)
+ if (!event.data) {
+ continue;
+ }
+ if (!event.event || event.event === 'message') {
+ try {
+ const message = types_js_1.JSONRPCMessageSchema.parse(JSON.parse(event.data));
+ if ((0, types_js_1.isJSONRPCResultResponse)(message)) {
+ // Mark that we received a response - no need to reconnect for this request
+ receivedResponse = true;
+ if (replayMessageId !== undefined) {
+ message.id = replayMessageId;
+ }
+ }
+ this.onmessage?.(message);
+ }
+ catch (error) {
+ this.onerror?.(error);
+ }
+ }
+ }
+ // Handle graceful server-side disconnect
+ // Server may close connection after sending event ID and retry field
+ // Reconnect if: already reconnectable (GET stream) OR received a priming event (POST stream with event ID)
+ // BUT don't reconnect if we already received a response - the request is complete
+ const canResume = isReconnectable || hasPrimingEvent;
+ const needsReconnect = canResume && !receivedResponse;
+ if (needsReconnect && this._abortController && !this._abortController.signal.aborted) {
+ this._scheduleReconnection({
+ resumptionToken: lastEventId,
+ onresumptiontoken,
+ replayMessageId
+ }, 0);
+ }
+ }
+ catch (error) {
+ // Handle stream errors - likely a network disconnect
+ this.onerror?.(new Error(`SSE stream disconnected: ${error}`));
+ // Attempt to reconnect if the stream disconnects unexpectedly and we aren't closing
+ // Reconnect if: already reconnectable (GET stream) OR received a priming event (POST stream with event ID)
+ // BUT don't reconnect if we already received a response - the request is complete
+ const canResume = isReconnectable || hasPrimingEvent;
+ const needsReconnect = canResume && !receivedResponse;
+ if (needsReconnect && this._abortController && !this._abortController.signal.aborted) {
+ // Use the exponential backoff reconnection strategy
+ try {
+ this._scheduleReconnection({
+ resumptionToken: lastEventId,
+ onresumptiontoken,
+ replayMessageId
+ }, 0);
+ }
+ catch (error) {
+ this.onerror?.(new Error(`Failed to reconnect: ${error instanceof Error ? error.message : String(error)}`));
+ }
+ }
+ }
+ };
+ processStream();
+ }
+ async start() {
+ if (this._abortController) {
+ throw new Error('StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.');
+ }
+ this._abortController = new AbortController();
+ }
+ /**
+ * Call this method after the user has finished authorizing via their user agent and is redirected back to the MCP client application. This will exchange the authorization code for an access token, enabling the next connection attempt to successfully auth.
+ */
+ async finishAuth(authorizationCode) {
+ if (!this._authProvider) {
+ throw new auth_js_1.UnauthorizedError('No auth provider');
+ }
+ const result = await (0, auth_js_1.auth)(this._authProvider, {
+ serverUrl: this._url,
+ authorizationCode,
+ resourceMetadataUrl: this._resourceMetadataUrl,
+ scope: this._scope,
+ fetchFn: this._fetchWithInit
+ });
+ if (result !== 'AUTHORIZED') {
+ throw new auth_js_1.UnauthorizedError('Failed to authorize');
+ }
+ }
+ async close() {
+ if (this._reconnectionTimeout) {
+ clearTimeout(this._reconnectionTimeout);
+ this._reconnectionTimeout = undefined;
+ }
+ this._abortController?.abort();
+ this.onclose?.();
+ }
+ async send(message, options) {
+ try {
+ const { resumptionToken, onresumptiontoken } = options || {};
+ if (resumptionToken) {
+ // If we have at last event ID, we need to reconnect the SSE stream
+ this._startOrAuthSse({ resumptionToken, replayMessageId: (0, types_js_1.isJSONRPCRequest)(message) ? message.id : undefined }).catch(err => this.onerror?.(err));
+ return;
+ }
+ const headers = await this._commonHeaders();
+ headers.set('content-type', 'application/json');
+ headers.set('accept', 'application/json, text/event-stream');
+ const init = {
+ ...this._requestInit,
+ method: 'POST',
+ headers,
+ body: JSON.stringify(message),
+ signal: this._abortController?.signal
+ };
+ const response = await (this._fetch ?? fetch)(this._url, init);
+ // Handle session ID received during initialization
+ const sessionId = response.headers.get('mcp-session-id');
+ if (sessionId) {
+ this._sessionId = sessionId;
+ }
+ if (!response.ok) {
+ const text = await response.text().catch(() => null);
+ if (response.status === 401 && this._authProvider) {
+ // Prevent infinite recursion when server returns 401 after successful auth
+ if (this._hasCompletedAuthFlow) {
+ throw new StreamableHTTPError(401, 'Server returned 401 after successful authentication');
+ }
+ const { resourceMetadataUrl, scope } = (0, auth_js_1.extractWWWAuthenticateParams)(response);
+ this._resourceMetadataUrl = resourceMetadataUrl;
+ this._scope = scope;
+ const result = await (0, auth_js_1.auth)(this._authProvider, {
+ serverUrl: this._url,
+ resourceMetadataUrl: this._resourceMetadataUrl,
+ scope: this._scope,
+ fetchFn: this._fetchWithInit
+ });
+ if (result !== 'AUTHORIZED') {
+ throw new auth_js_1.UnauthorizedError();
+ }
+ // Mark that we completed auth flow
+ this._hasCompletedAuthFlow = true;
+ // Purposely _not_ awaited, so we don't call onerror twice
+ return this.send(message);
+ }
+ if (response.status === 403 && this._authProvider) {
+ const { resourceMetadataUrl, scope, error } = (0, auth_js_1.extractWWWAuthenticateParams)(response);
+ if (error === 'insufficient_scope') {
+ const wwwAuthHeader = response.headers.get('WWW-Authenticate');
+ // Check if we've already tried upscoping with this header to prevent infinite loops.
+ if (this._lastUpscopingHeader === wwwAuthHeader) {
+ throw new StreamableHTTPError(403, 'Server returned 403 after trying upscoping');
+ }
+ if (scope) {
+ this._scope = scope;
+ }
+ if (resourceMetadataUrl) {
+ this._resourceMetadataUrl = resourceMetadataUrl;
+ }
+ // Mark that upscoping was tried.
+ this._lastUpscopingHeader = wwwAuthHeader ?? undefined;
+ const result = await (0, auth_js_1.auth)(this._authProvider, {
+ serverUrl: this._url,
+ resourceMetadataUrl: this._resourceMetadataUrl,
+ scope: this._scope,
+ fetchFn: this._fetch
+ });
+ if (result !== 'AUTHORIZED') {
+ throw new auth_js_1.UnauthorizedError();
+ }
+ return this.send(message);
+ }
+ }
+ throw new StreamableHTTPError(response.status, `Error POSTing to endpoint: ${text}`);
+ }
+ // Reset auth loop flag on successful response
+ this._hasCompletedAuthFlow = false;
+ this._lastUpscopingHeader = undefined;
+ // If the response is 202 Accepted, there's no body to process
+ if (response.status === 202) {
+ await response.body?.cancel();
+ // if the accepted notification is initialized, we start the SSE stream
+ // if it's supported by the server
+ if ((0, types_js_1.isInitializedNotification)(message)) {
+ // Start without a lastEventId since this is a fresh connection
+ this._startOrAuthSse({ resumptionToken: undefined }).catch(err => this.onerror?.(err));
+ }
+ return;
+ }
+ // Get original message(s) for detecting request IDs
+ const messages = Array.isArray(message) ? message : [message];
+ const hasRequests = messages.filter(msg => 'method' in msg && 'id' in msg && msg.id !== undefined).length > 0;
+ // Check the response type
+ const contentType = response.headers.get('content-type');
+ if (hasRequests) {
+ if (contentType?.includes('text/event-stream')) {
+ // Handle SSE stream responses for requests
+ // We use the same handler as standalone streams, which now supports
+ // reconnection with the last event ID
+ this._handleSseStream(response.body, { onresumptiontoken }, false);
+ }
+ else if (contentType?.includes('application/json')) {
+ // For non-streaming servers, we might get direct JSON responses
+ const data = await response.json();
+ const responseMessages = Array.isArray(data)
+ ? data.map(msg => types_js_1.JSONRPCMessageSchema.parse(msg))
+ : [types_js_1.JSONRPCMessageSchema.parse(data)];
+ for (const msg of responseMessages) {
+ this.onmessage?.(msg);
+ }
+ }
+ else {
+ await response.body?.cancel();
+ throw new StreamableHTTPError(-1, `Unexpected content type: ${contentType}`);
+ }
+ }
+ else {
+ // No requests in message but got 200 OK - still need to release connection
+ await response.body?.cancel();
+ }
+ }
+ catch (error) {
+ this.onerror?.(error);
+ throw error;
+ }
+ }
+ get sessionId() {
+ return this._sessionId;
+ }
+ /**
+ * Terminates the current session by sending a DELETE request to the server.
+ *
+ * Clients that no longer need a particular session
+ * (e.g., because the user is leaving the client application) SHOULD send an
+ * HTTP DELETE to the MCP endpoint with the Mcp-Session-Id header to explicitly
+ * terminate the session.
+ *
+ * The server MAY respond with HTTP 405 Method Not Allowed, indicating that
+ * the server does not allow clients to terminate sessions.
+ */
+ async terminateSession() {
+ if (!this._sessionId) {
+ return; // No session to terminate
+ }
+ try {
+ const headers = await this._commonHeaders();
+ const init = {
+ ...this._requestInit,
+ method: 'DELETE',
+ headers,
+ signal: this._abortController?.signal
+ };
+ const response = await (this._fetch ?? fetch)(this._url, init);
+ await response.body?.cancel();
+ // We specifically handle 405 as a valid response according to the spec,
+ // meaning the server does not support explicit session termination
+ if (!response.ok && response.status !== 405) {
+ throw new StreamableHTTPError(response.status, `Failed to terminate session: ${response.statusText}`);
+ }
+ this._sessionId = undefined;
+ }
+ catch (error) {
+ this.onerror?.(error);
+ throw error;
+ }
+ }
+ setProtocolVersion(version) {
+ this._protocolVersion = version;
+ }
+ get protocolVersion() {
+ return this._protocolVersion;
+ }
+ /**
+ * Resume an SSE stream from a previous event ID.
+ * Opens a GET SSE connection with Last-Event-ID header to replay missed events.
+ *
+ * @param lastEventId The event ID to resume from
+ * @param options Optional callback to receive new resumption tokens
+ */
+ async resumeStream(lastEventId, options) {
+ await this._startOrAuthSse({
+ resumptionToken: lastEventId,
+ onresumptiontoken: options?.onresumptiontoken
+ });
+ }
+}
+exports.StreamableHTTPClientTransport = StreamableHTTPClientTransport;
+//# sourceMappingURL=streamableHttp.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js.map
new file mode 100644
index 0000000..9e12cb7
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"streamableHttp.js","sourceRoot":"","sources":["../../../src/client/streamableHttp.ts"],"names":[],"mappings":";;;AAAA,yDAAqG;AACrG,0CAAyI;AACzI,uCAAmH;AACnH,sDAAoE;AAEpE,8DAA8D;AAC9D,MAAM,4CAA4C,GAAsC;IACpF,wBAAwB,EAAE,IAAI;IAC9B,oBAAoB,EAAE,KAAK;IAC3B,2BAA2B,EAAE,GAAG;IAChC,UAAU,EAAE,CAAC;CAChB,CAAC;AAEF,MAAa,mBAAoB,SAAQ,KAAK;IAC1C,YACoB,IAAwB,EACxC,OAA2B;QAE3B,KAAK,CAAC,0BAA0B,OAAO,EAAE,CAAC,CAAC;QAH3B,SAAI,GAAJ,IAAI,CAAoB;IAI5C,CAAC;CACJ;AAPD,kDAOC;AAkGD;;;;GAIG;AACH,MAAa,6BAA6B;IAqBtC,YAAY,GAAQ,EAAE,IAA2C;QATzD,0BAAqB,GAAG,KAAK,CAAC,CAAC,iEAAiE;QAUpG,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,oBAAoB,GAAG,SAAS,CAAC;QACtC,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,IAAI,EAAE,WAAW,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,IAAI,EAAE,YAAY,CAAC;QACxC,IAAI,CAAC,MAAM,GAAG,IAAI,EAAE,KAAK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IAAI,EAAE,IAAI,CAAC,CAAC;YAC/D,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;YAE9B,wEAAwE;YACxE,mEAAmE;YACnE,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBAC1C,MAAM,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,EAAE,gCAAgC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;YAC1G,CAAC;YAED,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAChC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAI,CAAC,OAAO,EAAE,CAAC,KAAc,CAAC,CAAC;YAC/B,MAAM,KAAK,CAAC;QAChB,CAAC;IACL,CAAC;IAED,kBAAkB,CAAC,OAAe;QAC9B,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC;IACpC,CAAC;IACD,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,YAAY,CAAC,WAAmB,EAAE,OAAyD;QAC7F,MAAM,IAAI,CAAC,eAAe,CAAC;YACvB,eAAe,EAAE,WAAW;YAC5B,iBAAiB,EAAE,OAAO,EAAE,iBAAiB;SAChD,CAAC,CAAC;IACP,CAAC;CACJ;AAtiBD,sEAsiBC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.d.ts
new file mode 100644
index 0000000..78f95de
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.d.ts
@@ -0,0 +1,17 @@
+import { Transport } from '../shared/transport.js';
+import { JSONRPCMessage } from '../types.js';
+/**
+ * Client transport for WebSocket: this will connect to a server over the WebSocket protocol.
+ */
+export declare class WebSocketClientTransport implements Transport {
+ private _socket?;
+ private _url;
+ onclose?: () => void;
+ onerror?: (error: Error) => void;
+ onmessage?: (message: JSONRPCMessage) => void;
+ constructor(url: URL);
+ start(): Promise;
+ close(): Promise;
+ send(message: JSONRPCMessage): Promise;
+}
+//# sourceMappingURL=websocket.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.d.ts.map
new file mode 100644
index 0000000..2882d98
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["../../../src/client/websocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAwB,MAAM,aAAa,CAAC;AAInE;;GAEG;AACH,qBAAa,wBAAyB,YAAW,SAAS;IACtD,OAAO,CAAC,OAAO,CAAC,CAAY;IAC5B,OAAO,CAAC,IAAI,CAAM;IAElB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;gBAElC,GAAG,EAAE,GAAG;IAIpB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAsChB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAW/C"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.js
new file mode 100644
index 0000000..0cadb38
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.js
@@ -0,0 +1,58 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.WebSocketClientTransport = void 0;
+const types_js_1 = require("../types.js");
+const SUBPROTOCOL = 'mcp';
+/**
+ * Client transport for WebSocket: this will connect to a server over the WebSocket protocol.
+ */
+class WebSocketClientTransport {
+ constructor(url) {
+ this._url = url;
+ }
+ start() {
+ if (this._socket) {
+ throw new Error('WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.');
+ }
+ return new Promise((resolve, reject) => {
+ this._socket = new WebSocket(this._url, SUBPROTOCOL);
+ this._socket.onerror = event => {
+ const error = 'error' in event ? event.error : new Error(`WebSocket error: ${JSON.stringify(event)}`);
+ reject(error);
+ this.onerror?.(error);
+ };
+ this._socket.onopen = () => {
+ resolve();
+ };
+ this._socket.onclose = () => {
+ this.onclose?.();
+ };
+ this._socket.onmessage = (event) => {
+ let message;
+ try {
+ message = types_js_1.JSONRPCMessageSchema.parse(JSON.parse(event.data));
+ }
+ catch (error) {
+ this.onerror?.(error);
+ return;
+ }
+ this.onmessage?.(message);
+ };
+ });
+ }
+ async close() {
+ this._socket?.close();
+ }
+ send(message) {
+ return new Promise((resolve, reject) => {
+ if (!this._socket) {
+ reject(new Error('Not connected'));
+ return;
+ }
+ this._socket?.send(JSON.stringify(message));
+ resolve();
+ });
+ }
+}
+exports.WebSocketClientTransport = WebSocketClientTransport;
+//# sourceMappingURL=websocket.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.js.map
new file mode 100644
index 0000000..ff439d9
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websoc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K,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;gBACjE,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACb,IAAI,CAAC,OAAO,EAAE,CAAC,KAAc,CAAC,CAAC;oBAC/B,OAAO;gBACX,CAAC;gBAED,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,CAAC;YAC9B,CAAC,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,KAAK;QACP,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;IAC1B,CAAC;IAED,IAAI,CAAC,OAAuB;QACxB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBAChB,MAAM,CAAC,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;gBACnC,OAAO;YACX,CAAC;YAED,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;YAC5C,OAAO,EAAE,CAAC;QACd,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAjED,4DAiEC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/elicitationUrlExample.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/elicitationUrlExample.d.ts
new file mode 100644
index 0000000..611f6eb
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/elicitationUrlExample.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=elicitationUrlExample.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/elicitationUrlExample.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/elicitationUrlExample.d.ts.map
new file mode 100644
index 0000000..e749adf
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/elicitationUrlExample.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"elicitationUrlExample.d.ts","sourceRoot":"","sources":["../../../../src/examples/client/elicitationUrlExample.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/elicitationUrlExample.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/elicitationUrlExample.js
new file mode 100644
index 0000000..a0ccdb9
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/elicitationUrlExample.js
@@ -0,0 +1,680 @@
+"use strict";
+// Run with: npx tsx src/examples/client/elicitationUrlExample.ts
+//
+// This example demonstrates how to use URL elicitation to securely
+// collect user input in a remote (HTTP) server.
+// URL elicitation allows servers to prompt the end-user to open a URL in their browser
+// to collect sensitive information.
+Object.defineProperty(exports, "__esModule", { value: true });
+const index_js_1 = require("../../client/index.js");
+const streamableHttp_js_1 = require("../../client/streamableHttp.js");
+const node_readline_1 = require("node:readline");
+const types_js_1 = require("../../types.js");
+const metadataUtils_js_1 = require("../../shared/metadataUtils.js");
+const simpleOAuthClientProvider_js_1 = require("./simpleOAuthClientProvider.js");
+const auth_js_1 = require("../../client/auth.js");
+const node_http_1 = require("node:http");
+// Set up OAuth (required for this example)
+const OAUTH_CALLBACK_PORT = 8090; // Use different port than auth server (3001)
+const OAUTH_CALLBACK_URL = `http://localhost:${OAUTH_CALLBACK_PORT}/callback`;
+let oauthProvider = undefined;
+console.log('Getting OAuth token...');
+const clientMetadata = {
+ client_name: 'Elicitation MCP Client',
+ redirect_uris: [OAUTH_CALLBACK_URL],
+ grant_types: ['authorization_code', 'refresh_token'],
+ response_types: ['code'],
+ token_endpoint_auth_method: 'client_secret_post',
+ scope: 'mcp:tools'
+};
+oauthProvider = new simpleOAuthClientProvider_js_1.InMemoryOAuthClientProvider(OAUTH_CALLBACK_URL, clientMetadata, (redirectUrl) => {
+ console.log(`\n🔗 Please open this URL in your browser to authorize:\n ${redirectUrl.toString()}`);
+});
+// Create readline interface for user input
+const readline = (0, node_readline_1.createInterface)({
+ input: process.stdin,
+ output: process.stdout
+});
+let abortCommand = new AbortController();
+// Global client and transport for interactive commands
+let client = null;
+let transport = null;
+let serverUrl = 'http://localhost:3000/mcp';
+let sessionId = undefined;
+let isProcessingCommand = false;
+let isProcessingElicitations = false;
+const elicitationQueue = [];
+let elicitationQueueSignal = null;
+let elicitationsCompleteSignal = null;
+// Map to track pending URL elicitations waiting for completion notifications
+const pendingURLElicitations = new Map();
+async function main() {
+ console.log('MCP Interactive Client');
+ console.log('=====================');
+ // Connect to server immediately with default settings
+ await connect();
+ // Start the elicitation loop in the background
+ elicitationLoop().catch(error => {
+ console.error('Unexpected error in elicitation loop:', error);
+ process.exit(1);
+ });
+ // Short delay allowing the server to send any SSE elicitations on connection
+ await new Promise(resolve => setTimeout(resolve, 200));
+ // Wait until we are done processing any initial elicitations
+ await waitForElicitationsToComplete();
+ // Print help and start the command loop
+ printHelp();
+ await commandLoop();
+}
+async function waitForElicitationsToComplete() {
+ // Wait until the queue is empty and nothing is being processed
+ while (elicitationQueue.length > 0 || isProcessingElicitations) {
+ await new Promise(resolve => setTimeout(resolve, 100));
+ }
+}
+function printHelp() {
+ console.log('\nAvailable commands:');
+ console.log(' connect [url] - Connect to MCP server (default: http://localhost:3000/mcp)');
+ console.log(' disconnect - Disconnect from server');
+ console.log(' terminate-session - Terminate the current session');
+ console.log(' reconnect - Reconnect to the server');
+ console.log(' list-tools - List available tools');
+ console.log(' call-tool [args] - Call a tool with optional JSON arguments');
+ console.log(' payment-confirm - Test URL elicitation via error response with payment-confirm tool');
+ console.log(' third-party-auth - Test tool that requires third-party OAuth credentials');
+ console.log(' help - Show this help');
+ console.log(' quit - Exit the program');
+}
+async function commandLoop() {
+ await new Promise(resolve => {
+ if (!isProcessingElicitations) {
+ resolve();
+ }
+ else {
+ elicitationsCompleteSignal = resolve;
+ }
+ });
+ readline.question('\n> ', { signal: abortCommand.signal }, async (input) => {
+ isProcessingCommand = true;
+ const args = input.trim().split(/\s+/);
+ const command = args[0]?.toLowerCase();
+ try {
+ switch (command) {
+ case 'connect':
+ await connect(args[1]);
+ break;
+ case 'disconnect':
+ await disconnect();
+ break;
+ case 'terminate-session':
+ await terminateSession();
+ break;
+ case 'reconnect':
+ await reconnect();
+ break;
+ case 'list-tools':
+ await listTools();
+ break;
+ case 'call-tool':
+ if (args.length < 2) {
+ console.log('Usage: call-tool [args]');
+ }
+ else {
+ const toolName = args[1];
+ let toolArgs = {};
+ if (args.length > 2) {
+ try {
+ toolArgs = JSON.parse(args.slice(2).join(' '));
+ }
+ catch {
+ console.log('Invalid JSON arguments. Using empty args.');
+ }
+ }
+ await callTool(toolName, toolArgs);
+ }
+ break;
+ case 'payment-confirm':
+ await callPaymentConfirmTool();
+ break;
+ case 'third-party-auth':
+ await callThirdPartyAuthTool();
+ break;
+ case 'help':
+ printHelp();
+ break;
+ case 'quit':
+ case 'exit':
+ await cleanup();
+ return;
+ default:
+ if (command) {
+ console.log(`Unknown command: ${command}`);
+ }
+ break;
+ }
+ }
+ catch (error) {
+ console.error(`Error executing command: ${error}`);
+ }
+ finally {
+ isProcessingCommand = false;
+ }
+ // Process another command after we've processed the this one
+ await commandLoop();
+ });
+}
+async function elicitationLoop() {
+ while (true) {
+ // Wait until we have elicitations to process
+ await new Promise(resolve => {
+ if (elicitationQueue.length > 0) {
+ resolve();
+ }
+ else {
+ elicitationQueueSignal = resolve;
+ }
+ });
+ isProcessingElicitations = true;
+ abortCommand.abort(); // Abort the command loop if it's running
+ // Process all queued elicitations
+ while (elicitationQueue.length > 0) {
+ const queued = elicitationQueue.shift();
+ console.log(`📤 Processing queued elicitation (${elicitationQueue.length} remaining)`);
+ try {
+ const result = await handleElicitationRequest(queued.request);
+ queued.resolve(result);
+ }
+ catch (error) {
+ queued.reject(error instanceof Error ? error : new Error(String(error)));
+ }
+ }
+ console.log('✅ All queued elicitations processed. Resuming command loop...\n');
+ isProcessingElicitations = false;
+ // Reset the abort controller for the next command loop
+ abortCommand = new AbortController();
+ // Resume the command loop
+ if (elicitationsCompleteSignal) {
+ elicitationsCompleteSignal();
+ elicitationsCompleteSignal = null;
+ }
+ }
+}
+/**
+ * Enqueues an elicitation request and returns the result.
+ *
+ * This function is used so that our CLI (which can only handle one input request at a time)
+ * can handle elicitation requests and the command loop.
+ *
+ * @param request - The elicitation request to be handled
+ * @returns The elicitation result
+ */
+async function elicitationRequestHandler(request) {
+ // If we are processing a command, handle this elicitation immediately
+ if (isProcessingCommand) {
+ console.log('📋 Processing elicitation immediately (during command execution)');
+ return await handleElicitationRequest(request);
+ }
+ // Otherwise, queue the request to be handled by the elicitation loop
+ console.log(`📥 Queueing elicitation request (queue size will be: ${elicitationQueue.length + 1})`);
+ return new Promise((resolve, reject) => {
+ elicitationQueue.push({
+ request,
+ resolve,
+ reject
+ });
+ // Signal the elicitation loop that there's work to do
+ if (elicitationQueueSignal) {
+ elicitationQueueSignal();
+ elicitationQueueSignal = null;
+ }
+ });
+}
+/**
+ * Handles an elicitation request.
+ *
+ * This function is used to handle the elicitation request and return the result.
+ *
+ * @param request - The elicitation request to be handled
+ * @returns The elicitation result
+ */
+async function handleElicitationRequest(request) {
+ const mode = request.params.mode;
+ console.log('\n🔔 Elicitation Request Received:');
+ console.log(`Mode: ${mode}`);
+ if (mode === 'url') {
+ return {
+ action: await handleURLElicitation(request.params)
+ };
+ }
+ else {
+ // Should not happen because the client declares its capabilities to the server,
+ // but being defensive is a good practice:
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Unsupported elicitation mode: ${mode}`);
+ }
+}
+/**
+ * Handles a URL elicitation by opening the URL in the browser.
+ *
+ * Note: This is a shared code for both request handlers and error handlers.
+ * As a result of sharing schema, there is no big forking of logic for the client.
+ *
+ * @param params - The URL elicitation request parameters
+ * @returns The action to take (accept, cancel, or decline)
+ */
+async function handleURLElicitation(params) {
+ const url = params.url;
+ const elicitationId = params.elicitationId;
+ const message = params.message;
+ console.log(`🆔 Elicitation ID: ${elicitationId}`); // Print for illustration
+ // Parse URL to show domain for security
+ let domain = 'unknown domain';
+ try {
+ const parsedUrl = new URL(url);
+ domain = parsedUrl.hostname;
+ }
+ catch {
+ console.error('Invalid URL provided by server');
+ return 'decline';
+ }
+ // Example security warning to help prevent phishing attacks
+ console.log('\n⚠️ \x1b[33mSECURITY WARNING\x1b[0m ⚠️');
+ console.log('\x1b[33mThe server is requesting you to open an external URL.\x1b[0m');
+ console.log('\x1b[33mOnly proceed if you trust this server and understand why it needs this.\x1b[0m\n');
+ console.log(`🌐 Target domain: \x1b[36m${domain}\x1b[0m`);
+ console.log(`🔗 Full URL: \x1b[36m${url}\x1b[0m`);
+ console.log(`\nℹ️ Server's reason:\n\n\x1b[36m${message}\x1b[0m\n`);
+ // 1. Ask for user consent to open the URL
+ const consent = await new Promise(resolve => {
+ readline.question('\nDo you want to open this URL in your browser? (y/n): ', input => {
+ resolve(input.trim().toLowerCase());
+ });
+ });
+ // 2. If user did not consent, return appropriate result
+ if (consent === 'no' || consent === 'n') {
+ console.log('❌ URL navigation declined.');
+ return 'decline';
+ }
+ else if (consent !== 'yes' && consent !== 'y') {
+ console.log('🚫 Invalid response. Cancelling elicitation.');
+ return 'cancel';
+ }
+ // 3. Wait for completion notification in the background
+ const completionPromise = new Promise((resolve, reject) => {
+ const timeout = setTimeout(() => {
+ pendingURLElicitations.delete(elicitationId);
+ console.log(`\x1b[31m❌ Elicitation ${elicitationId} timed out waiting for completion.\x1b[0m`);
+ reject(new Error('Elicitation completion timeout'));
+ }, 5 * 60 * 1000); // 5 minute timeout
+ pendingURLElicitations.set(elicitationId, {
+ resolve: () => {
+ clearTimeout(timeout);
+ resolve();
+ },
+ reject,
+ timeout
+ });
+ });
+ completionPromise.catch(error => {
+ console.error('Background completion wait failed:', error);
+ });
+ // 4. Direct user to open the URL in their browser
+ console.log(`\n🔗 Please open this URL in your browser:\n ${url}`);
+ console.log('\n⏳ Waiting for you to complete the interaction in your browser...');
+ console.log(' The server will send a notification once you complete the action.');
+ // 5. Acknowledge the user accepted the elicitation
+ return 'accept';
+}
+/**
+ * Example OAuth callback handler - in production, use a more robust approach
+ * for handling callbacks and storing tokens
+ */
+/**
+ * Starts a temporary HTTP server to receive the OAuth callback
+ */
+async function waitForOAuthCallback() {
+ return new Promise((resolve, reject) => {
+ const server = (0, node_http_1.createServer)((req, res) => {
+ // Ignore favicon requests
+ if (req.url === '/favicon.ico') {
+ res.writeHead(404);
+ res.end();
+ return;
+ }
+ console.log(`📥 Received callback: ${req.url}`);
+ const parsedUrl = new URL(req.url || '', 'http://localhost');
+ const code = parsedUrl.searchParams.get('code');
+ const error = parsedUrl.searchParams.get('error');
+ if (code) {
+ console.log(`✅ Authorization code received: ${code?.substring(0, 10)}...`);
+ res.writeHead(200, { 'Content-Type': 'text/html' });
+ res.end(`
+
+
+
Authorization Successful!
+
This simulates successful authorization of the MCP client, which now has an access token for the MCP server.
+
This window will close automatically in 10 seconds.
+
+
+ `);
+ reject(new Error(`OAuth authorization failed: ${error}`));
+ }
+ else {
+ console.log(`❌ No authorization code or error in callback`);
+ res.writeHead(400);
+ res.end('Bad request');
+ reject(new Error('No authorization code provided'));
+ }
+ });
+ server.listen(CALLBACK_PORT, () => {
+ console.log(`OAuth callback server started on http://localhost:${CALLBACK_PORT}`);
+ });
+ });
+ }
+ async attemptConnection(oauthProvider) {
+ console.log('🚢 Creating transport with OAuth provider...');
+ const baseUrl = new node_url_1.URL(this.serverUrl);
+ const transport = new streamableHttp_js_1.StreamableHTTPClientTransport(baseUrl, {
+ authProvider: oauthProvider
+ });
+ console.log('🚢 Transport created');
+ try {
+ console.log('🔌 Attempting connection (this will trigger OAuth redirect)...');
+ await this.client.connect(transport);
+ console.log('✅ Connected successfully');
+ }
+ catch (error) {
+ if (error instanceof auth_js_1.UnauthorizedError) {
+ console.log('🔐 OAuth required - waiting for authorization...');
+ const callbackPromise = this.waitForOAuthCallback();
+ const authCode = await callbackPromise;
+ await transport.finishAuth(authCode);
+ console.log('🔐 Authorization code received:', authCode);
+ console.log('🔌 Reconnecting with authenticated transport...');
+ await this.attemptConnection(oauthProvider);
+ }
+ else {
+ console.error('❌ Connection failed with non-auth error:', error);
+ throw error;
+ }
+ }
+ }
+ /**
+ * Establishes connection to the MCP server with OAuth authentication
+ */
+ async connect() {
+ console.log(`🔗 Attempting to connect to ${this.serverUrl}...`);
+ const clientMetadata = {
+ client_name: 'Simple OAuth MCP Client',
+ redirect_uris: [CALLBACK_URL],
+ grant_types: ['authorization_code', 'refresh_token'],
+ response_types: ['code'],
+ token_endpoint_auth_method: 'client_secret_post'
+ };
+ console.log('🔐 Creating OAuth provider...');
+ const oauthProvider = new simpleOAuthClientProvider_js_1.InMemoryOAuthClientProvider(CALLBACK_URL, clientMetadata, (redirectUrl) => {
+ console.log(`\n🔗 Please open this URL in your browser to authorize:\n ${redirectUrl.toString()}`);
+ }, this.clientMetadataUrl);
+ console.log('🔐 OAuth provider created');
+ console.log('👤 Creating MCP client...');
+ this.client = new index_js_1.Client({
+ name: 'simple-oauth-client',
+ version: '1.0.0'
+ }, { capabilities: {} });
+ console.log('👤 Client created');
+ console.log('🔐 Starting OAuth flow...');
+ await this.attemptConnection(oauthProvider);
+ // Start interactive loop
+ await this.interactiveLoop();
+ }
+ /**
+ * Main interactive loop for user commands
+ */
+ async interactiveLoop() {
+ console.log('\n🎯 Interactive MCP Client with OAuth');
+ console.log('Commands:');
+ console.log(' list - List available tools');
+ console.log(' call [args] - Call a tool');
+ console.log(' stream [args] - Call a tool with streaming (shows task status)');
+ console.log(' quit - Exit the client');
+ console.log();
+ while (true) {
+ try {
+ const command = await this.question('mcp> ');
+ if (!command.trim()) {
+ continue;
+ }
+ if (command === 'quit') {
+ console.log('\n👋 Goodbye!');
+ this.close();
+ process.exit(0);
+ }
+ else if (command === 'list') {
+ await this.listTools();
+ }
+ else if (command.startsWith('call ')) {
+ await this.handleCallTool(command);
+ }
+ else if (command.startsWith('stream ')) {
+ await this.handleStreamTool(command);
+ }
+ else {
+ console.log("❌ Unknown command. Try 'list', 'call ', 'stream ', or 'quit'");
+ }
+ }
+ catch (error) {
+ if (error instanceof Error && error.message === 'SIGINT') {
+ console.log('\n\n👋 Goodbye!');
+ break;
+ }
+ console.error('❌ Error:', error);
+ }
+ }
+ }
+ async listTools() {
+ if (!this.client) {
+ console.log('❌ Not connected to server');
+ return;
+ }
+ try {
+ const request = {
+ method: 'tools/list',
+ params: {}
+ };
+ const result = await this.client.request(request, types_js_1.ListToolsResultSchema);
+ if (result.tools && result.tools.length > 0) {
+ console.log('\n📋 Available tools:');
+ result.tools.forEach((tool, index) => {
+ console.log(`${index + 1}. ${tool.name}`);
+ if (tool.description) {
+ console.log(` Description: ${tool.description}`);
+ }
+ console.log();
+ });
+ }
+ else {
+ console.log('No tools available');
+ }
+ }
+ catch (error) {
+ console.error('❌ Failed to list tools:', error);
+ }
+ }
+ async handleCallTool(command) {
+ const parts = command.split(/\s+/);
+ const toolName = parts[1];
+ if (!toolName) {
+ console.log('❌ Please specify a tool name');
+ return;
+ }
+ // Parse arguments (simple JSON-like format)
+ let toolArgs = {};
+ if (parts.length > 2) {
+ const argsString = parts.slice(2).join(' ');
+ try {
+ toolArgs = JSON.parse(argsString);
+ }
+ catch {
+ console.log('❌ Invalid arguments format (expected JSON)');
+ return;
+ }
+ }
+ await this.callTool(toolName, toolArgs);
+ }
+ async callTool(toolName, toolArgs) {
+ if (!this.client) {
+ console.log('❌ Not connected to server');
+ return;
+ }
+ try {
+ const request = {
+ method: 'tools/call',
+ params: {
+ name: toolName,
+ arguments: toolArgs
+ }
+ };
+ const result = await this.client.request(request, types_js_1.CallToolResultSchema);
+ console.log(`\n🔧 Tool '${toolName}' result:`);
+ if (result.content) {
+ result.content.forEach(content => {
+ if (content.type === 'text') {
+ console.log(content.text);
+ }
+ else {
+ console.log(content);
+ }
+ });
+ }
+ else {
+ console.log(result);
+ }
+ }
+ catch (error) {
+ console.error(`❌ Failed to call tool '${toolName}':`, error);
+ }
+ }
+ async handleStreamTool(command) {
+ const parts = command.split(/\s+/);
+ const toolName = parts[1];
+ if (!toolName) {
+ console.log('❌ Please specify a tool name');
+ return;
+ }
+ // Parse arguments (simple JSON-like format)
+ let toolArgs = {};
+ if (parts.length > 2) {
+ const argsString = parts.slice(2).join(' ');
+ try {
+ toolArgs = JSON.parse(argsString);
+ }
+ catch {
+ console.log('❌ Invalid arguments format (expected JSON)');
+ return;
+ }
+ }
+ await this.streamTool(toolName, toolArgs);
+ }
+ async streamTool(toolName, toolArgs) {
+ if (!this.client) {
+ console.log('❌ Not connected to server');
+ return;
+ }
+ try {
+ // Using the experimental tasks API - WARNING: may change without notice
+ console.log(`\n🔧 Streaming tool '${toolName}'...`);
+ const stream = this.client.experimental.tasks.callToolStream({
+ name: toolName,
+ arguments: toolArgs
+ }, types_js_1.CallToolResultSchema, {
+ task: {
+ taskId: `task-${Date.now()}`,
+ ttl: 60000
+ }
+ });
+ // Iterate through all messages yielded by the generator
+ for await (const message of stream) {
+ switch (message.type) {
+ case 'taskCreated':
+ console.log(`✓ Task created: ${message.task.taskId}`);
+ break;
+ case 'taskStatus':
+ console.log(`⟳ Status: ${message.task.status}`);
+ if (message.task.statusMessage) {
+ console.log(` ${message.task.statusMessage}`);
+ }
+ break;
+ case 'result':
+ console.log('✓ Completed!');
+ message.result.content.forEach(content => {
+ if (content.type === 'text') {
+ console.log(content.text);
+ }
+ else {
+ console.log(content);
+ }
+ });
+ break;
+ case 'error':
+ console.log('✗ Error:');
+ console.log(` ${message.error.message}`);
+ break;
+ }
+ }
+ }
+ catch (error) {
+ console.error(`❌ Failed to stream tool '${toolName}':`, error);
+ }
+ }
+ close() {
+ this.rl.close();
+ if (this.client) {
+ // Note: Client doesn't have a close method in the current implementation
+ // This would typically close the transport connection
+ }
+ }
+}
+/**
+ * Main entry point
+ */
+async function main() {
+ const args = process.argv.slice(2);
+ const serverUrl = args[0] || DEFAULT_SERVER_URL;
+ const clientMetadataUrl = args[1];
+ console.log('🚀 Simple MCP OAuth Client');
+ console.log(`Connecting to: ${serverUrl}`);
+ if (clientMetadataUrl) {
+ console.log(`Client Metadata URL: ${clientMetadataUrl}`);
+ }
+ console.log();
+ const client = new InteractiveOAuthClient(serverUrl, clientMetadataUrl);
+ // Handle graceful shutdown
+ process.on('SIGINT', () => {
+ console.log('\n\n👋 Goodbye!');
+ client.close();
+ process.exit(0);
+ });
+ try {
+ await client.connect();
+ }
+ catch (error) {
+ console.error('Failed to start client:', error);
+ process.exit(1);
+ }
+ finally {
+ client.close();
+ }
+}
+// Run if this file is executed directly
+main().catch(error => {
+ console.error('Unhandled error:', error);
+ process.exit(1);
+});
+//# sourceMappingURL=simpleOAuthClient.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClient.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClient.js.map
new file mode 100644
index 0000000..4e0af0e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClient.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleOAuthClient.js","sourceRoot":"","sources":["../../../../src/examples/client/simpleOAuthClient.ts"],"names":[],"mappings":";;;AAEA,yCAAyC;AACzC,iDAAgD;AAChD,uCAA+B;AAC/B,oDAA+C;AAC/C,sEAA+E;AAE/E,6CAAgH;AAChH,kDAAyD;AACzD,iFAA6E;AAE7E,gBAAgB;AAChB,MAAM,kBAAkB,GAAG,2BAA2B,CAAC;AACvD,MAAM,aAAa,GAAG,IAAI,CAAC,CAAC,6CAA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AiB,CAAC,CAAC;IAExE,2BAA2B;IAC3B,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QACtB,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QAC/B,MAAM,CAAC,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC;QACD,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;YAAS,CAAC;QACP,MAAM,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC;AACL,CAAC;AAED,wCAAwC;AACxC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;IACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClientProvider.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClientProvider.d.ts
new file mode 100644
index 0000000..092616c
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClientProvider.d.ts
@@ -0,0 +1,26 @@
+import { OAuthClientProvider } from '../../client/auth.js';
+import { OAuthClientInformationMixed, OAuthClientMetadata, OAuthTokens } from '../../shared/auth.js';
+/**
+ * In-memory OAuth client provider for demonstration purposes
+ * In production, you should persist tokens securely
+ */
+export declare class InMemoryOAuthClientProvider implements OAuthClientProvider {
+ private readonly _redirectUrl;
+ private readonly _clientMetadata;
+ readonly clientMetadataUrl?: string | undefined;
+ private _clientInformation?;
+ private _tokens?;
+ private _codeVerifier?;
+ constructor(_redirectUrl: string | URL, _clientMetadata: OAuthClientMetadata, onRedirect?: (url: URL) => void, clientMetadataUrl?: string | undefined);
+ private _onRedirect;
+ get redirectUrl(): string | URL;
+ get clientMetadata(): OAuthClientMetadata;
+ clientInformation(): OAuthClientInformationMixed | undefined;
+ saveClientInformation(clientInformation: OAuthClientInformationMixed): void;
+ tokens(): OAuthTokens | undefined;
+ saveTokens(tokens: OAuthTokens): void;
+ redirectToAuthorization(authorizationUrl: URL): void;
+ saveCodeVerifier(codeVerifier: string): void;
+ codeVerifier(): string;
+}
+//# sourceMappingURL=simpleOAuthClientProvider.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClientProvider.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClientProvider.d.ts.map
new file mode 100644
index 0000000..21efe94
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClientProvider.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleOAuthClientProvider.d.ts","sourceRoot":"","sources":["../../../../src/examples/client/simpleOAuthClientProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAErG;;;GAGG;AACH,qBAAa,2BAA4B,YAAW,mBAAmB;IAM/D,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,eAAe;aAEhB,iBAAiB,CAAC,EAAE,MAAM;IAR9C,OAAO,CAAC,kBAAkB,CAAC,CAA8B;IACzD,OAAO,CAAC,OAAO,CAAC,CAAc;IAC9B,OAAO,CAAC,aAAa,CAAC,CAAS;gBAGV,YAAY,EAAE,MAAM,GAAG,GAAG,EAC1B,eAAe,EAAE,mBAAmB,EACrD,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,EACf,iBAAiB,CAAC,EAAE,MAAM,YAAA;IAS9C,OAAO,CAAC,WAAW,CAAqB;IAExC,IAAI,WAAW,IAAI,MAAM,GAAG,GAAG,CAE9B;IAED,IAAI,cAAc,IAAI,mBAAmB,CAExC;IAED,iBAAiB,IAAI,2BAA2B,GAAG,SAAS;IAI5D,qBAAqB,CAAC,iBAAiB,EAAE,2BAA2B,GAAG,IAAI;IAI3E,MAAM,IAAI,WAAW,GAAG,SAAS;IAIjC,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAIrC,uBAAuB,CAAC,gBAAgB,EAAE,GAAG,GAAG,IAAI;IAIpD,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IAI5C,YAAY,IAAI,MAAM;CAMzB"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClientProvider.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClientProvider.js
new file mode 100644
index 0000000..58959bb
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClientProvider.js
@@ -0,0 +1,51 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InMemoryOAuthClientProvider = void 0;
+/**
+ * In-memory OAuth client provider for demonstration purposes
+ * In production, you should persist tokens securely
+ */
+class InMemoryOAuthClientProvider {
+ constructor(_redirectUrl, _clientMetadata, onRedirect, clientMetadataUrl) {
+ this._redirectUrl = _redirectUrl;
+ this._clientMetadata = _clientMetadata;
+ this.clientMetadataUrl = clientMetadataUrl;
+ this._onRedirect =
+ onRedirect ||
+ (url => {
+ console.log(`Redirect to: ${url.toString()}`);
+ });
+ }
+ get redirectUrl() {
+ return this._redirectUrl;
+ }
+ get clientMetadata() {
+ return this._clientMetadata;
+ }
+ clientInformation() {
+ return this._clientInformation;
+ }
+ saveClientInformation(clientInformation) {
+ this._clientInformation = clientInformation;
+ }
+ tokens() {
+ return this._tokens;
+ }
+ saveTokens(tokens) {
+ this._tokens = tokens;
+ }
+ redirectToAuthorization(authorizationUrl) {
+ this._onRedirect(authorizationUrl);
+ }
+ saveCodeVerifier(codeVerifier) {
+ this._codeVerifier = codeVerifier;
+ }
+ codeVerifier() {
+ if (!this._codeVerifier) {
+ throw new Error('No code verifier saved');
+ }
+ return this._codeVerifier;
+ }
+}
+exports.InMemoryOAuthClientProvider = InMemoryOAuthClientProvider;
+//# sourceMappingURL=simpleOAuthClientProvider.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClientProvider.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClientProvider.js.map
new file mode 100644
index 0000000..10771f8
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClientProvider.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleOAuthClientProvider.js","sourceRoot":"","sources":["../../../../src/examples/client/simpleOAuthClientProvider.ts"],"names":[],"mappings":";;;AAGA;;;GAGG;AACH,MAAa,2BAA2B;IAKpC,YACqB,YAA0B,EAC1B,eAAoC,EACrD,UAA+B,EACf,iBAA0B;QAHzB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,oBAAe,GAAf,eAAe,CAAqB;QAErC,sBAAiB,GAAjB,iBAAiB,CAAS;QAE1C,IAAI,CAAC,WAAW;YACZ,UAAU;gBACV,CAAC,GAAG,CAAC,EAAE;oBACH,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;gBAClD,CAAC,CAAC,CAAC;IACX,CAAC;IAID,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,cAAc;QACd,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED,iBAAiB;QACb,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;IAED,qBAAqB,CAAC,iBAA8C;QAChE,IAAI,CAAC,kBAAkB,GAAG,iBAAiB,CAAC;IAChD,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,UAAU,CAAC,MAAmB;QAC1B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAED,uBAAuB,CAAC,gBAAqB;QACzC,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;IACvC,CAAC;IAED,gBAAgB,CAAC,YAAoB;QACjC,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;IACtC,CAAC;IAED,YAAY;QACR,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC9C,CAAC;QACD,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;CACJ;AA1DD,kEA0DC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleStreamableHttp.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleStreamableHttp.d.ts
new file mode 100644
index 0000000..a20be42
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleStreamableHttp.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=simpleStreamableHttp.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleStreamableHttp.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleStreamableHttp.d.ts.map
new file mode 100644
index 0000000..28406b0
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleStreamableHttp.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleStreamableHttp.d.ts","sourceRoot":"","sources":["../../../../src/examples/client/simpleStreamableHttp.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleStreamableHttp.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleStreamableHttp.js
new file mode 100644
index 0000000..8a9215a
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleStreamableHttp.js
@@ -0,0 +1,857 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const index_js_1 = require("../../client/index.js");
+const streamableHttp_js_1 = require("../../client/streamableHttp.js");
+const node_readline_1 = require("node:readline");
+const types_js_1 = require("../../types.js");
+const in_memory_js_1 = require("../../experimental/tasks/stores/in-memory.js");
+const metadataUtils_js_1 = require("../../shared/metadataUtils.js");
+const ajv_1 = require("ajv");
+// Create readline interface for user input
+const readline = (0, node_readline_1.createInterface)({
+ input: process.stdin,
+ output: process.stdout
+});
+// Track received notifications for debugging resumability
+let notificationCount = 0;
+// Global client and transport for interactive commands
+let client = null;
+let transport = null;
+let serverUrl = 'http://localhost:3000/mcp';
+let notificationsToolLastEventId = undefined;
+let sessionId = undefined;
+async function main() {
+ console.log('MCP Interactive Client');
+ console.log('=====================');
+ // Connect to server immediately with default settings
+ await connect();
+ // Print help and start the command loop
+ printHelp();
+ commandLoop();
+}
+function printHelp() {
+ console.log('\nAvailable commands:');
+ console.log(' connect [url] - Connect to MCP server (default: http://localhost:3000/mcp)');
+ console.log(' disconnect - Disconnect from server');
+ console.log(' terminate-session - Terminate the current session');
+ console.log(' reconnect - Reconnect to the server');
+ console.log(' list-tools - List available tools');
+ console.log(' call-tool [args] - Call a tool with optional JSON arguments');
+ console.log(' call-tool-task [args] - Call a tool with task-based execution (example: call-tool-task delay {"duration":3000})');
+ console.log(' greet [name] - Call the greet tool');
+ console.log(' multi-greet [name] - Call the multi-greet tool with notifications');
+ console.log(' collect-info [type] - Test form elicitation with collect-user-info tool (contact/preferences/feedback)');
+ console.log(' collect-info-task [type] - Test bidirectional task support (server+client tasks) with elicitation');
+ console.log(' start-notifications [interval] [count] - Start periodic notifications');
+ console.log(' run-notifications-tool-with-resumability [interval] [count] - Run notification tool with resumability');
+ console.log(' list-prompts - List available prompts');
+ console.log(' get-prompt [name] [args] - Get a prompt with optional JSON arguments');
+ console.log(' list-resources - List available resources');
+ console.log(' read-resource - Read a specific resource by URI');
+ console.log(' help - Show this help');
+ console.log(' quit - Exit the program');
+}
+function commandLoop() {
+ readline.question('\n> ', async (input) => {
+ const args = input.trim().split(/\s+/);
+ const command = args[0]?.toLowerCase();
+ try {
+ switch (command) {
+ case 'connect':
+ await connect(args[1]);
+ break;
+ case 'disconnect':
+ await disconnect();
+ break;
+ case 'terminate-session':
+ await terminateSession();
+ break;
+ case 'reconnect':
+ await reconnect();
+ break;
+ case 'list-tools':
+ await listTools();
+ break;
+ case 'call-tool':
+ if (args.length < 2) {
+ console.log('Usage: call-tool [args]');
+ }
+ else {
+ const toolName = args[1];
+ let toolArgs = {};
+ if (args.length > 2) {
+ try {
+ toolArgs = JSON.parse(args.slice(2).join(' '));
+ }
+ catch {
+ console.log('Invalid JSON arguments. Using empty args.');
+ }
+ }
+ await callTool(toolName, toolArgs);
+ }
+ break;
+ case 'greet':
+ await callGreetTool(args[1] || 'MCP User');
+ break;
+ case 'multi-greet':
+ await callMultiGreetTool(args[1] || 'MCP User');
+ break;
+ case 'collect-info':
+ await callCollectInfoTool(args[1] || 'contact');
+ break;
+ case 'collect-info-task': {
+ await callCollectInfoWithTask(args[1] || 'contact');
+ break;
+ }
+ case 'start-notifications': {
+ const interval = args[1] ? parseInt(args[1], 10) : 2000;
+ const count = args[2] ? parseInt(args[2], 10) : 10;
+ await startNotifications(interval, count);
+ break;
+ }
+ case 'run-notifications-tool-with-resumability': {
+ const interval = args[1] ? parseInt(args[1], 10) : 2000;
+ const count = args[2] ? parseInt(args[2], 10) : 10;
+ await runNotificationsToolWithResumability(interval, count);
+ break;
+ }
+ case 'call-tool-task':
+ if (args.length < 2) {
+ console.log('Usage: call-tool-task [args]');
+ }
+ else {
+ const toolName = args[1];
+ let toolArgs = {};
+ if (args.length > 2) {
+ try {
+ toolArgs = JSON.parse(args.slice(2).join(' '));
+ }
+ catch {
+ console.log('Invalid JSON arguments. Using empty args.');
+ }
+ }
+ await callToolTask(toolName, toolArgs);
+ }
+ break;
+ case 'list-prompts':
+ await listPrompts();
+ break;
+ case 'get-prompt':
+ if (args.length < 2) {
+ console.log('Usage: get-prompt [args]');
+ }
+ else {
+ const promptName = args[1];
+ let promptArgs = {};
+ if (args.length > 2) {
+ try {
+ promptArgs = JSON.parse(args.slice(2).join(' '));
+ }
+ catch {
+ console.log('Invalid JSON arguments. Using empty args.');
+ }
+ }
+ await getPrompt(promptName, promptArgs);
+ }
+ break;
+ case 'list-resources':
+ await listResources();
+ break;
+ case 'read-resource':
+ if (args.length < 2) {
+ console.log('Usage: read-resource ');
+ }
+ else {
+ await readResource(args[1]);
+ }
+ break;
+ case 'help':
+ printHelp();
+ break;
+ case 'quit':
+ case 'exit':
+ await cleanup();
+ return;
+ default:
+ if (command) {
+ console.log(`Unknown command: ${command}`);
+ }
+ break;
+ }
+ }
+ catch (error) {
+ console.error(`Error executing command: ${error}`);
+ }
+ // Continue the command loop
+ commandLoop();
+ });
+}
+async function connect(url) {
+ if (client) {
+ console.log('Already connected. Disconnect first.');
+ return;
+ }
+ if (url) {
+ serverUrl = url;
+ }
+ console.log(`Connecting to ${serverUrl}...`);
+ try {
+ // Create task store for client-side task support
+ const clientTaskStore = new in_memory_js_1.InMemoryTaskStore();
+ // Create a new client with form elicitation capability and task support
+ client = new index_js_1.Client({
+ name: 'example-client',
+ version: '1.0.0'
+ }, {
+ capabilities: {
+ elicitation: {
+ form: {}
+ },
+ tasks: {
+ requests: {
+ elicitation: {
+ create: {}
+ }
+ }
+ }
+ },
+ taskStore: clientTaskStore
+ });
+ client.onerror = error => {
+ console.error('\x1b[31mClient error:', error, '\x1b[0m');
+ };
+ // Set up elicitation request handler with proper validation and task support
+ client.setRequestHandler(types_js_1.ElicitRequestSchema, async (request, extra) => {
+ if (request.params.mode !== 'form') {
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Unsupported elicitation mode: ${request.params.mode}`);
+ }
+ console.log('\n🔔 Elicitation (form) Request Received:');
+ console.log(`Message: ${request.params.message}`);
+ console.log(`Related Task: ${request.params._meta?.[types_js_1.RELATED_TASK_META_KEY]?.taskId}`);
+ console.log(`Task Creation Requested: ${request.params.task ? 'yes' : 'no'}`);
+ console.log('Requested Schema:');
+ console.log(JSON.stringify(request.params.requestedSchema, null, 2));
+ // Helper to return result, optionally creating a task if requested
+ const returnResult = async (result) => {
+ if (request.params.task && extra.taskStore) {
+ // Create a task and store the result
+ const task = await extra.taskStore.createTask({ ttl: extra.taskRequestedTtl });
+ await extra.taskStore.storeTaskResult(task.taskId, 'completed', result);
+ console.log(`📋 Created client-side task: ${task.taskId}`);
+ return { task };
+ }
+ return result;
+ };
+ const schema = request.params.requestedSchema;
+ const properties = schema.properties;
+ const required = schema.required || [];
+ // Set up AJV validator for the requested schema
+ const ajv = new ajv_1.Ajv();
+ const validate = ajv.compile(schema);
+ let attempts = 0;
+ const maxAttempts = 3;
+ while (attempts < maxAttempts) {
+ attempts++;
+ console.log(`\nPlease provide the following information (attempt ${attempts}/${maxAttempts}):`);
+ const content = {};
+ let inputCancelled = false;
+ // Collect input for each field
+ for (const [fieldName, fieldSchema] of Object.entries(properties)) {
+ const field = fieldSchema;
+ const isRequired = required.includes(fieldName);
+ let prompt = `${field.title || fieldName}`;
+ // Add helpful information to the prompt
+ if (field.description) {
+ prompt += ` (${field.description})`;
+ }
+ if (field.enum) {
+ prompt += ` [options: ${field.enum.join(', ')}]`;
+ }
+ if (field.type === 'number' || field.type === 'integer') {
+ if (field.minimum !== undefined && field.maximum !== undefined) {
+ prompt += ` [${field.minimum}-${field.maximum}]`;
+ }
+ else if (field.minimum !== undefined) {
+ prompt += ` [min: ${field.minimum}]`;
+ }
+ else if (field.maximum !== undefined) {
+ prompt += ` [max: ${field.maximum}]`;
+ }
+ }
+ if (field.type === 'string' && field.format) {
+ prompt += ` [format: ${field.format}]`;
+ }
+ if (isRequired) {
+ prompt += ' *required*';
+ }
+ if (field.default !== undefined) {
+ prompt += ` [default: ${field.default}]`;
+ }
+ prompt += ': ';
+ const answer = await new Promise(resolve => {
+ readline.question(prompt, input => {
+ resolve(input.trim());
+ });
+ });
+ // Check for cancellation
+ if (answer.toLowerCase() === 'cancel' || answer.toLowerCase() === 'c') {
+ inputCancelled = true;
+ break;
+ }
+ // Parse and validate the input
+ try {
+ if (answer === '' && field.default !== undefined) {
+ content[fieldName] = field.default;
+ }
+ else if (answer === '' && !isRequired) {
+ // Skip optional empty fields
+ continue;
+ }
+ else if (answer === '') {
+ throw new Error(`${fieldName} is required`);
+ }
+ else {
+ // Parse the value based on type
+ let parsedValue;
+ if (field.type === 'boolean') {
+ parsedValue = answer.toLowerCase() === 'true' || answer.toLowerCase() === 'yes' || answer === '1';
+ }
+ else if (field.type === 'number') {
+ parsedValue = parseFloat(answer);
+ if (isNaN(parsedValue)) {
+ throw new Error(`${fieldName} must be a valid number`);
+ }
+ }
+ else if (field.type === 'integer') {
+ parsedValue = parseInt(answer, 10);
+ if (isNaN(parsedValue)) {
+ throw new Error(`${fieldName} must be a valid integer`);
+ }
+ }
+ else if (field.enum) {
+ if (!field.enum.includes(answer)) {
+ throw new Error(`${fieldName} must be one of: ${field.enum.join(', ')}`);
+ }
+ parsedValue = answer;
+ }
+ else {
+ parsedValue = answer;
+ }
+ content[fieldName] = parsedValue;
+ }
+ }
+ catch (error) {
+ console.log(`❌ Error: ${error}`);
+ // Continue to next attempt
+ break;
+ }
+ }
+ if (inputCancelled) {
+ return returnResult({ action: 'cancel' });
+ }
+ // If we didn't complete all fields due to an error, try again
+ if (Object.keys(content).length !==
+ Object.keys(properties).filter(name => required.includes(name) || content[name] !== undefined).length) {
+ if (attempts < maxAttempts) {
+ console.log('Please try again...');
+ continue;
+ }
+ else {
+ console.log('Maximum attempts reached. Declining request.');
+ return returnResult({ action: 'decline' });
+ }
+ }
+ // Validate the complete object against the schema
+ const isValid = validate(content);
+ if (!isValid) {
+ console.log('❌ Validation errors:');
+ validate.errors?.forEach(error => {
+ console.log(` - ${error.instancePath || 'root'}: ${error.message}`);
+ });
+ if (attempts < maxAttempts) {
+ console.log('Please correct the errors and try again...');
+ continue;
+ }
+ else {
+ console.log('Maximum attempts reached. Declining request.');
+ return returnResult({ action: 'decline' });
+ }
+ }
+ // Show the collected data and ask for confirmation
+ console.log('\n✅ Collected data:');
+ console.log(JSON.stringify(content, null, 2));
+ const confirmAnswer = await new Promise(resolve => {
+ readline.question('\nSubmit this information? (yes/no/cancel): ', input => {
+ resolve(input.trim().toLowerCase());
+ });
+ });
+ switch (confirmAnswer) {
+ case 'yes':
+ case 'y': {
+ return returnResult({
+ action: 'accept',
+ content: content
+ });
+ }
+ case 'cancel':
+ case 'c': {
+ return returnResult({ action: 'cancel' });
+ }
+ case 'no':
+ case 'n': {
+ if (attempts < maxAttempts) {
+ console.log('Please re-enter the information...');
+ continue;
+ }
+ else {
+ return returnResult({ action: 'decline' });
+ }
+ break;
+ }
+ }
+ }
+ console.log('Maximum attempts reached. Declining request.');
+ return returnResult({ action: 'decline' });
+ });
+ transport = new streamableHttp_js_1.StreamableHTTPClientTransport(new URL(serverUrl), {
+ sessionId: sessionId
+ });
+ // Set up notification handlers
+ client.setNotificationHandler(types_js_1.LoggingMessageNotificationSchema, notification => {
+ notificationCount++;
+ console.log(`\nNotification #${notificationCount}: ${notification.params.level} - ${notification.params.data}`);
+ // Re-display the prompt
+ process.stdout.write('> ');
+ });
+ client.setNotificationHandler(types_js_1.ResourceListChangedNotificationSchema, async (_) => {
+ console.log(`\nResource list changed notification received!`);
+ try {
+ if (!client) {
+ console.log('Client disconnected, cannot fetch resources');
+ return;
+ }
+ const resourcesResult = await client.request({
+ method: 'resources/list',
+ params: {}
+ }, types_js_1.ListResourcesResultSchema);
+ console.log('Available resources count:', resourcesResult.resources.length);
+ }
+ catch {
+ console.log('Failed to list resources after change notification');
+ }
+ // Re-display the prompt
+ process.stdout.write('> ');
+ });
+ // Connect the client
+ await client.connect(transport);
+ sessionId = transport.sessionId;
+ console.log('Transport created with session ID:', sessionId);
+ console.log('Connected to MCP server');
+ }
+ catch (error) {
+ console.error('Failed to connect:', error);
+ client = null;
+ transport = null;
+ }
+}
+async function disconnect() {
+ if (!client || !transport) {
+ console.log('Not connected.');
+ return;
+ }
+ try {
+ await transport.close();
+ console.log('Disconnected from MCP server');
+ client = null;
+ transport = null;
+ }
+ catch (error) {
+ console.error('Error disconnecting:', error);
+ }
+}
+async function terminateSession() {
+ if (!client || !transport) {
+ console.log('Not connected.');
+ return;
+ }
+ try {
+ console.log('Terminating session with ID:', transport.sessionId);
+ await transport.terminateSession();
+ console.log('Session terminated successfully');
+ // Check if sessionId was cleared after termination
+ if (!transport.sessionId) {
+ console.log('Session ID has been cleared');
+ sessionId = undefined;
+ // Also close the transport and clear client objects
+ await transport.close();
+ console.log('Transport closed after session termination');
+ client = null;
+ transport = null;
+ }
+ else {
+ console.log('Server responded with 405 Method Not Allowed (session termination not supported)');
+ console.log('Session ID is still active:', transport.sessionId);
+ }
+ }
+ catch (error) {
+ console.error('Error terminating session:', error);
+ }
+}
+async function reconnect() {
+ if (client) {
+ await disconnect();
+ }
+ await connect();
+}
+async function listTools() {
+ if (!client) {
+ console.log('Not connected to server.');
+ return;
+ }
+ try {
+ const toolsRequest = {
+ method: 'tools/list',
+ params: {}
+ };
+ const toolsResult = await client.request(toolsRequest, types_js_1.ListToolsResultSchema);
+ console.log('Available tools:');
+ if (toolsResult.tools.length === 0) {
+ console.log(' No tools available');
+ }
+ else {
+ for (const tool of toolsResult.tools) {
+ console.log(` - id: ${tool.name}, name: ${(0, metadataUtils_js_1.getDisplayName)(tool)}, description: ${tool.description}`);
+ }
+ }
+ }
+ catch (error) {
+ console.log(`Tools not supported by this server (${error})`);
+ }
+}
+async function callTool(name, args) {
+ if (!client) {
+ console.log('Not connected to server.');
+ return;
+ }
+ try {
+ const request = {
+ method: 'tools/call',
+ params: {
+ name,
+ arguments: args
+ }
+ };
+ console.log(`Calling tool '${name}' with args:`, args);
+ const result = await client.request(request, types_js_1.CallToolResultSchema);
+ console.log('Tool result:');
+ const resourceLinks = [];
+ result.content.forEach(item => {
+ if (item.type === 'text') {
+ console.log(` ${item.text}`);
+ }
+ else if (item.type === 'resource_link') {
+ const resourceLink = item;
+ resourceLinks.push(resourceLink);
+ console.log(` 📁 Resource Link: ${resourceLink.name}`);
+ console.log(` URI: ${resourceLink.uri}`);
+ if (resourceLink.mimeType) {
+ console.log(` Type: ${resourceLink.mimeType}`);
+ }
+ if (resourceLink.description) {
+ console.log(` Description: ${resourceLink.description}`);
+ }
+ }
+ else if (item.type === 'resource') {
+ console.log(` [Embedded Resource: ${item.resource.uri}]`);
+ }
+ else if (item.type === 'image') {
+ console.log(` [Image: ${item.mimeType}]`);
+ }
+ else if (item.type === 'audio') {
+ console.log(` [Audio: ${item.mimeType}]`);
+ }
+ else {
+ console.log(` [Unknown content type]:`, item);
+ }
+ });
+ // Offer to read resource links
+ if (resourceLinks.length > 0) {
+ console.log(`\nFound ${resourceLinks.length} resource link(s). Use 'read-resource ' to read their content.`);
+ }
+ }
+ catch (error) {
+ console.log(`Error calling tool ${name}: ${error}`);
+ }
+}
+async function callGreetTool(name) {
+ await callTool('greet', { name });
+}
+async function callMultiGreetTool(name) {
+ console.log('Calling multi-greet tool with notifications...');
+ await callTool('multi-greet', { name });
+}
+async function callCollectInfoTool(infoType) {
+ console.log(`Testing form elicitation with collect-user-info tool (${infoType})...`);
+ await callTool('collect-user-info', { infoType });
+}
+async function callCollectInfoWithTask(infoType) {
+ console.log(`\n🔄 Testing bidirectional task support with collect-user-info-task tool (${infoType})...`);
+ console.log('This will create a task on the server, which will elicit input and create a task on the client.\n');
+ await callToolTask('collect-user-info-task', { infoType });
+}
+async function startNotifications(interval, count) {
+ console.log(`Starting notification stream: interval=${interval}ms, count=${count || 'unlimited'}`);
+ await callTool('start-notification-stream', { interval, count });
+}
+async function runNotificationsToolWithResumability(interval, count) {
+ if (!client) {
+ console.log('Not connected to server.');
+ return;
+ }
+ try {
+ console.log(`Starting notification stream with resumability: interval=${interval}ms, count=${count || 'unlimited'}`);
+ console.log(`Using resumption token: ${notificationsToolLastEventId || 'none'}`);
+ const request = {
+ method: 'tools/call',
+ params: {
+ name: 'start-notification-stream',
+ arguments: { interval, count }
+ }
+ };
+ const onLastEventIdUpdate = (event) => {
+ notificationsToolLastEventId = event;
+ console.log(`Updated resumption token: ${event}`);
+ };
+ const result = await client.request(request, types_js_1.CallToolResultSchema, {
+ resumptionToken: notificationsToolLastEventId,
+ onresumptiontoken: onLastEventIdUpdate
+ });
+ console.log('Tool result:');
+ result.content.forEach(item => {
+ if (item.type === 'text') {
+ console.log(` ${item.text}`);
+ }
+ else {
+ console.log(` ${item.type} content:`, item);
+ }
+ });
+ }
+ catch (error) {
+ console.log(`Error starting notification stream: ${error}`);
+ }
+}
+async function listPrompts() {
+ if (!client) {
+ console.log('Not connected to server.');
+ return;
+ }
+ try {
+ const promptsRequest = {
+ method: 'prompts/list',
+ params: {}
+ };
+ const promptsResult = await client.request(promptsRequest, types_js_1.ListPromptsResultSchema);
+ console.log('Available prompts:');
+ if (promptsResult.prompts.length === 0) {
+ console.log(' No prompts available');
+ }
+ else {
+ for (const prompt of promptsResult.prompts) {
+ console.log(` - id: ${prompt.name}, name: ${(0, metadataUtils_js_1.getDisplayName)(prompt)}, description: ${prompt.description}`);
+ }
+ }
+ }
+ catch (error) {
+ console.log(`Prompts not supported by this server (${error})`);
+ }
+}
+async function getPrompt(name, args) {
+ if (!client) {
+ console.log('Not connected to server.');
+ return;
+ }
+ try {
+ const promptRequest = {
+ method: 'prompts/get',
+ params: {
+ name,
+ arguments: args
+ }
+ };
+ const promptResult = await client.request(promptRequest, types_js_1.GetPromptResultSchema);
+ console.log('Prompt template:');
+ promptResult.messages.forEach((msg, index) => {
+ console.log(` [${index + 1}] ${msg.role}: ${msg.content.type === 'text' ? msg.content.text : JSON.stringify(msg.content)}`);
+ });
+ }
+ catch (error) {
+ console.log(`Error getting prompt ${name}: ${error}`);
+ }
+}
+async function listResources() {
+ if (!client) {
+ console.log('Not connected to server.');
+ return;
+ }
+ try {
+ const resourcesRequest = {
+ method: 'resources/list',
+ params: {}
+ };
+ const resourcesResult = await client.request(resourcesRequest, types_js_1.ListResourcesResultSchema);
+ console.log('Available resources:');
+ if (resourcesResult.resources.length === 0) {
+ console.log(' No resources available');
+ }
+ else {
+ for (const resource of resourcesResult.resources) {
+ console.log(` - id: ${resource.name}, name: ${(0, metadataUtils_js_1.getDisplayName)(resource)}, description: ${resource.uri}`);
+ }
+ }
+ }
+ catch (error) {
+ console.log(`Resources not supported by this server (${error})`);
+ }
+}
+async function readResource(uri) {
+ if (!client) {
+ console.log('Not connected to server.');
+ return;
+ }
+ try {
+ const request = {
+ method: 'resources/read',
+ params: { uri }
+ };
+ console.log(`Reading resource: ${uri}`);
+ const result = await client.request(request, types_js_1.ReadResourceResultSchema);
+ console.log('Resource contents:');
+ for (const content of result.contents) {
+ console.log(` URI: ${content.uri}`);
+ if (content.mimeType) {
+ console.log(` Type: ${content.mimeType}`);
+ }
+ if ('text' in content && typeof content.text === 'string') {
+ console.log(' Content:');
+ console.log(' ---');
+ console.log(content.text
+ .split('\n')
+ .map((line) => ' ' + line)
+ .join('\n'));
+ console.log(' ---');
+ }
+ else if ('blob' in content && typeof content.blob === 'string') {
+ console.log(` [Binary data: ${content.blob.length} bytes]`);
+ }
+ }
+ }
+ catch (error) {
+ console.log(`Error reading resource ${uri}: ${error}`);
+ }
+}
+async function callToolTask(name, args) {
+ if (!client) {
+ console.log('Not connected to server.');
+ return;
+ }
+ console.log(`Calling tool '${name}' with task-based execution...`);
+ console.log('Arguments:', args);
+ // Use task-based execution - call now, fetch later
+ // Using the experimental tasks API - WARNING: may change without notice
+ console.log('This will return immediately while processing continues in the background...');
+ try {
+ // Call the tool with task metadata using streaming API
+ const stream = client.experimental.tasks.callToolStream({
+ name,
+ arguments: args
+ }, types_js_1.CallToolResultSchema, {
+ task: {
+ ttl: 60000 // Keep results for 60 seconds
+ }
+ });
+ console.log('Waiting for task completion...');
+ let lastStatus = '';
+ for await (const message of stream) {
+ switch (message.type) {
+ case 'taskCreated':
+ console.log('Task created successfully with ID:', message.task.taskId);
+ break;
+ case 'taskStatus':
+ if (lastStatus !== message.task.status) {
+ console.log(` ${message.task.status}${message.task.statusMessage ? ` - ${message.task.statusMessage}` : ''}`);
+ }
+ lastStatus = message.task.status;
+ break;
+ case 'result':
+ console.log('Task completed!');
+ console.log('Tool result:');
+ message.result.content.forEach(item => {
+ if (item.type === 'text') {
+ console.log(` ${item.text}`);
+ }
+ });
+ break;
+ case 'error':
+ throw message.error;
+ }
+ }
+ }
+ catch (error) {
+ console.log(`Error with task-based execution: ${error}`);
+ }
+}
+async function cleanup() {
+ if (client && transport) {
+ try {
+ // First try to terminate the session gracefully
+ if (transport.sessionId) {
+ try {
+ console.log('Terminating session before exit...');
+ await transport.terminateSession();
+ console.log('Session terminated successfully');
+ }
+ catch (error) {
+ console.error('Error terminating session:', error);
+ }
+ }
+ // Then close the transport
+ await transport.close();
+ }
+ catch (error) {
+ console.error('Error closing transport:', error);
+ }
+ }
+ process.stdin.setRawMode(false);
+ readline.close();
+ console.log('\nGoodbye!');
+ process.exit(0);
+}
+// Set up raw mode for keyboard input to capture Escape key
+process.stdin.setRawMode(true);
+process.stdin.on('data', async (data) => {
+ // Check for Escape key (27)
+ if (data.length === 1 && data[0] === 27) {
+ console.log('\nESC key pressed. Disconnecting from server...');
+ // Abort current operation and disconnect from server
+ if (client && transport) {
+ await disconnect();
+ console.log('Disconnected. Press Enter to continue.');
+ }
+ else {
+ console.log('Not connected to server.');
+ }
+ // Re-display the prompt
+ process.stdout.write('> ');
+ }
+});
+// Handle Ctrl+C
+process.on('SIGINT', async () => {
+ console.log('\nReceived SIGINT. Cleaning up...');
+ await cleanup();
+});
+// Start the interactive client
+main().catch((error) => {
+ console.error('Error running MCP client:', error);
+ process.exit(1);
+});
+//# sourceMappingURL=simpleStreamableHttp.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleStreamableHttp.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleStreamableHttp.js.map
new file mode 100644
index 0000000..547e2f6
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleStreamableHttp.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/client/simpleStreamableHttp.ts"],"names":[],"mappings":";;AAAA,oDAA+C;AAC/C,sEAA+E;AAC/E,iDAAgD;AAChD,6CAqBwB;AACxB,+EAAiF;AACjF,oEAA+D;AAC/D,6BAA0B;AAE1B,2CAA2C;AAC3C,MAAM,QAAQ,GAAG,IAAA,+BAAe,EAAC;IAC7B,KAAK,EAAE,OAAO,CAAC,KAAK;IACpB,MAAM,EAAE,OAAO,CAAC,MAAM;CACzB,CAAC,CAAC;AAEH,0DAA0D;AAC1D,IAAI,iBAAiB,G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AC,GAAG,CAAC,iDAAiD,CAAC,CAAC;QAE/D,qDAAqD;QACrD,IAAI,MAAM,IAAI,SAAS,EAAE,CAAC;YACtB,MAAM,UAAU,EAAE,CAAC;YACnB,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;QAC1D,CAAC;aAAM,CAAC;YACJ,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;QAC5C,CAAC;QAED,wBAAwB;QACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,gBAAgB;AAChB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC5B,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;IACjD,MAAM,OAAO,EAAE,CAAC;AACpB,CAAC,CAAC,CAAC;AAEH,+BAA+B;AAC/B,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC5B,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;IAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleTaskInteractiveClient.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleTaskInteractiveClient.d.ts
new file mode 100644
index 0000000..c794066
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleTaskInteractiveClient.d.ts
@@ -0,0 +1,10 @@
+/**
+ * Simple interactive task client demonstrating elicitation and sampling responses.
+ *
+ * This client connects to simpleTaskInteractive.ts server and demonstrates:
+ * - Handling elicitation requests (y/n confirmation)
+ * - Handling sampling requests (returns a hardcoded haiku)
+ * - Using task-based tool execution with streaming
+ */
+export {};
+//# sourceMappingURL=simpleTaskInteractiveClient.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleTaskInteractiveClient.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleTaskInteractiveClient.d.ts.map
new file mode 100644
index 0000000..89b7338
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleTaskInteractiveClient.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleTaskInteractiveClient.d.ts","sourceRoot":"","sources":["../../../../src/examples/client/simpleTaskInteractiveClient.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleTaskInteractiveClient.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleTaskInteractiveClient.js
new file mode 100644
index 0000000..d08970d
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleTaskInteractiveClient.js
@@ -0,0 +1,157 @@
+"use strict";
+/**
+ * Simple interactive task client demonstrating elicitation and sampling responses.
+ *
+ * This client connects to simpleTaskInteractive.ts server and demonstrates:
+ * - Handling elicitation requests (y/n confirmation)
+ * - Handling sampling requests (returns a hardcoded haiku)
+ * - Using task-based tool execution with streaming
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const index_js_1 = require("../../client/index.js");
+const streamableHttp_js_1 = require("../../client/streamableHttp.js");
+const node_readline_1 = require("node:readline");
+const types_js_1 = require("../../types.js");
+// Create readline interface for user input
+const readline = (0, node_readline_1.createInterface)({
+ input: process.stdin,
+ output: process.stdout
+});
+function question(prompt) {
+ return new Promise(resolve => {
+ readline.question(prompt, answer => {
+ resolve(answer.trim());
+ });
+ });
+}
+function getTextContent(result) {
+ const textContent = result.content.find((c) => c.type === 'text');
+ return textContent?.text ?? '(no text)';
+}
+async function elicitationCallback(params) {
+ console.log(`\n[Elicitation] Server asks: ${params.message}`);
+ // Simple terminal prompt for y/n
+ const response = await question('Your response (y/n): ');
+ const confirmed = ['y', 'yes', 'true', '1'].includes(response.toLowerCase());
+ console.log(`[Elicitation] Responding with: confirm=${confirmed}`);
+ return { action: 'accept', content: { confirm: confirmed } };
+}
+async function samplingCallback(params) {
+ // Get the prompt from the first message
+ let prompt = 'unknown';
+ if (params.messages && params.messages.length > 0) {
+ const firstMessage = params.messages[0];
+ const content = firstMessage.content;
+ if (typeof content === 'object' && !Array.isArray(content) && content.type === 'text' && 'text' in content) {
+ prompt = content.text;
+ }
+ else if (Array.isArray(content)) {
+ const textPart = content.find(c => c.type === 'text' && 'text' in c);
+ if (textPart && 'text' in textPart) {
+ prompt = textPart.text;
+ }
+ }
+ }
+ console.log(`\n[Sampling] Server requests LLM completion for: ${prompt}`);
+ // Return a hardcoded haiku (in real use, call your LLM here)
+ const haiku = `Cherry blossoms fall
+Softly on the quiet pond
+Spring whispers goodbye`;
+ console.log('[Sampling] Responding with haiku');
+ return {
+ model: 'mock-haiku-model',
+ role: 'assistant',
+ content: { type: 'text', text: haiku }
+ };
+}
+async function run(url) {
+ console.log('Simple Task Interactive Client');
+ console.log('==============================');
+ console.log(`Connecting to ${url}...`);
+ // Create client with elicitation and sampling capabilities
+ const client = new index_js_1.Client({ name: 'simple-task-interactive-client', version: '1.0.0' }, {
+ capabilities: {
+ elicitation: { form: {} },
+ sampling: {}
+ }
+ });
+ // Set up elicitation request handler
+ client.setRequestHandler(types_js_1.ElicitRequestSchema, async (request) => {
+ if (request.params.mode && request.params.mode !== 'form') {
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Unsupported elicitation mode: ${request.params.mode}`);
+ }
+ return elicitationCallback(request.params);
+ });
+ // Set up sampling request handler
+ client.setRequestHandler(types_js_1.CreateMessageRequestSchema, async (request) => {
+ return samplingCallback(request.params);
+ });
+ // Connect to server
+ const transport = new streamableHttp_js_1.StreamableHTTPClientTransport(new URL(url));
+ await client.connect(transport);
+ console.log('Connected!\n');
+ // List tools
+ const toolsResult = await client.listTools();
+ console.log(`Available tools: ${toolsResult.tools.map(t => t.name).join(', ')}`);
+ // Demo 1: Elicitation (confirm_delete)
+ console.log('\n--- Demo 1: Elicitation ---');
+ console.log('Calling confirm_delete tool...');
+ const confirmStream = client.experimental.tasks.callToolStream({ name: 'confirm_delete', arguments: { filename: 'important.txt' } }, types_js_1.CallToolResultSchema, { task: { ttl: 60000 } });
+ for await (const message of confirmStream) {
+ switch (message.type) {
+ case 'taskCreated':
+ console.log(`Task created: ${message.task.taskId}`);
+ break;
+ case 'taskStatus':
+ console.log(`Task status: ${message.task.status}`);
+ break;
+ case 'result':
+ console.log(`Result: ${getTextContent(message.result)}`);
+ break;
+ case 'error':
+ console.error(`Error: ${message.error}`);
+ break;
+ }
+ }
+ // Demo 2: Sampling (write_haiku)
+ console.log('\n--- Demo 2: Sampling ---');
+ console.log('Calling write_haiku tool...');
+ const haikuStream = client.experimental.tasks.callToolStream({ name: 'write_haiku', arguments: { topic: 'autumn leaves' } }, types_js_1.CallToolResultSchema, {
+ task: { ttl: 60000 }
+ });
+ for await (const message of haikuStream) {
+ switch (message.type) {
+ case 'taskCreated':
+ console.log(`Task created: ${message.task.taskId}`);
+ break;
+ case 'taskStatus':
+ console.log(`Task status: ${message.task.status}`);
+ break;
+ case 'result':
+ console.log(`Result:\n${getTextContent(message.result)}`);
+ break;
+ case 'error':
+ console.error(`Error: ${message.error}`);
+ break;
+ }
+ }
+ // Cleanup
+ console.log('\nDemo complete. Closing connection...');
+ await transport.close();
+ readline.close();
+}
+// Parse command line arguments
+const args = process.argv.slice(2);
+let url = 'http://localhost:8000/mcp';
+for (let i = 0; i < args.length; i++) {
+ if (args[i] === '--url' && args[i + 1]) {
+ url = args[i + 1];
+ i++;
+ }
+}
+// Run the client
+run(url).catch(error => {
+ console.error('Error running client:', error);
+ process.exit(1);
+});
+//# sourceMappingURL=simpleTaskInteractiveClient.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleTaskInteractiveClient.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleTaskInteractiveClient.js.map
new file mode 100644
index 0000000..c766c87
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleTaskInteractiveClient.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleTaskInteractiveClient.js","sourceRoot":"","sources":["../../../../src/examples/client/simpleTaskInteractiveClient.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAEH,oDAA+C;AAC/C,sEAA+E;AAC/E,iDAAgD;AAChD,6CASwB;AAExB,2CAA2C;AAC3C,MAAM,QAAQ,GAAG,IAAA,+BAAe,EAAC;IAC7B,KAAK,EAAE,OAAO,CAAC,KAAK;IACpB,MAAM,EAAE,OAAO,CAAC,MAAM;CACzB,CAAC,CAAC;AAEH,SAAS,QAAQ,CAAC,MAAc;IAC5B,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QACzB,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;YAC/B,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,cAAc,CAAC,MAA2D;IAC/E,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAoB,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;IACpF,OAAO,WAAW,EAAE,IAAI,IAAI,WAAW,CAAC;AAC5C,CAAC;AAED,KAAK,UAAU,mBAAmB,CAAC,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AK,EAAE,CAAC,CAAC;gBACzC,MAAM;QACd,CAAC;IACL,CAAC;IAED,UAAU;IACV,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;IACtD,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,CAAC;AACrB,CAAC;AAED,+BAA+B;AAC/B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,IAAI,GAAG,GAAG,2BAA2B,CAAC;AAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;IACnC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QACrC,GAAG,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAClB,CAAC,EAAE,CAAC;IACR,CAAC;AACL,CAAC;AAED,iBAAiB;AACjB,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;IAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/ssePollingClient.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/ssePollingClient.d.ts
new file mode 100644
index 0000000..134b4b0
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/ssePollingClient.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=ssePollingClient.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/ssePollingClient.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/ssePollingClient.d.ts.map
new file mode 100644
index 0000000..59e4153
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/ssePollingClient.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ssePollingClient.d.ts","sourceRoot":"","sources":["../../../../src/examples/client/ssePollingClient.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/ssePollingClient.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/ssePollingClient.js
new file mode 100644
index 0000000..a529ae5
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/ssePollingClient.js
@@ -0,0 +1,95 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * SSE Polling Example Client (SEP-1699)
+ *
+ * This example demonstrates client-side behavior during server-initiated
+ * SSE stream disconnection and automatic reconnection.
+ *
+ * Key features demonstrated:
+ * - Automatic reconnection when server closes SSE stream
+ * - Event replay via Last-Event-ID header
+ * - Resumption token tracking via onresumptiontoken callback
+ *
+ * Run with: npx tsx src/examples/client/ssePollingClient.ts
+ * Requires: ssePollingExample.ts server running on port 3001
+ */
+const index_js_1 = require("../../client/index.js");
+const streamableHttp_js_1 = require("../../client/streamableHttp.js");
+const types_js_1 = require("../../types.js");
+const SERVER_URL = 'http://localhost:3001/mcp';
+async function main() {
+ console.log('SSE Polling Example Client');
+ console.log('==========================');
+ console.log(`Connecting to ${SERVER_URL}...`);
+ console.log('');
+ // Create transport with reconnection options
+ const transport = new streamableHttp_js_1.StreamableHTTPClientTransport(new URL(SERVER_URL), {
+ // Use default reconnection options - SDK handles automatic reconnection
+ });
+ // Track the last event ID for debugging
+ let lastEventId;
+ // Set up transport error handler to observe disconnections
+ // Filter out expected errors from SSE reconnection
+ transport.onerror = error => {
+ // Skip abort errors during intentional close
+ if (error.message.includes('AbortError'))
+ return;
+ // Show SSE disconnect (expected when server closes stream)
+ if (error.message.includes('Unexpected end of JSON')) {
+ console.log('[Transport] SSE stream disconnected - client will auto-reconnect');
+ return;
+ }
+ console.log(`[Transport] Error: ${error.message}`);
+ };
+ // Set up transport close handler
+ transport.onclose = () => {
+ console.log('[Transport] Connection closed');
+ };
+ // Create and connect client
+ const client = new index_js_1.Client({
+ name: 'sse-polling-client',
+ version: '1.0.0'
+ });
+ // Set up notification handler to receive progress updates
+ client.setNotificationHandler(types_js_1.LoggingMessageNotificationSchema, notification => {
+ const data = notification.params.data;
+ console.log(`[Notification] ${data}`);
+ });
+ try {
+ await client.connect(transport);
+ console.log('[Client] Connected successfully');
+ console.log('');
+ // Call the long-task tool
+ console.log('[Client] Calling long-task tool...');
+ console.log('[Client] Server will disconnect mid-task to demonstrate polling');
+ console.log('');
+ const result = await client.request({
+ method: 'tools/call',
+ params: {
+ name: 'long-task',
+ arguments: {}
+ }
+ }, types_js_1.CallToolResultSchema, {
+ // Track resumption tokens for debugging
+ onresumptiontoken: token => {
+ lastEventId = token;
+ console.log(`[Event ID] ${token}`);
+ }
+ });
+ console.log('');
+ console.log('[Client] Tool completed!');
+ console.log(`[Result] ${JSON.stringify(result.content, null, 2)}`);
+ console.log('');
+ console.log(`[Debug] Final event ID: ${lastEventId}`);
+ }
+ catch (error) {
+ console.error('[Error]', error);
+ }
+ finally {
+ await transport.close();
+ console.log('[Client] Disconnected');
+ }
+}
+main().catch(console.error);
+//# sourceMappingURL=ssePollingClient.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/ssePollingClient.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/ssePollingClient.js.map
new file mode 100644
index 0000000..bcc881d
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/ssePollingClient.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ssePollingClient.js","sourceRoot":"","sources":["../../../../src/examples/client/ssePollingClient.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;GAaG;AACH,oDAA+C;AAC/C,sEAA+E;AAC/E,6CAAwF;AAExF,MAAM,UAAU,GAAG,2BAA2B,CAAC;AAE/C,KAAK,UAAU,IAAI;IACf,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAC1C,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAC1C,OAAO,CAAC,GAAG,CAAC,iBAAiB,UAAU,KAAK,CAAC,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhB,6CAA6C;IAC7C,MAAM,SAAS,GAAG,IAAI,iDAA6B,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,EAAE;IACrE,wEAAwE;KAC3E,CAAC,CAAC;IAEH,wCAAwC;IACxC,IAAI,WAA+B,CAAC;IAEpC,2DAA2D;IAC3D,mDAAmD;IACnD,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;QACxB,6CAA6C;QAC7C,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;YAAE,OAAO;QACjD,2DAA2D;QAC3D,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,EAAE,CAAC;YACnD,OAAO,CAAC,GAAG,CAAC,kEAAkE,CAAC,CAAC;YAChF,OAAO;QACX,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACvD,CAAC,CAAC;IAEF,iCAAiC;IACjC,SAAS,CAAC,OAAO,GAAG,GAAG,EAAE;QACrB,OAAO,CAAC,GAAG,CAAC,+BAA+B,CA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AAC,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACnE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,2BAA2B,WAAW,EAAE,CAAC,CAAC;IAC1D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;YAAS,CAAC;QACP,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;QACxB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;IACzC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/streamableHttpWithSseFallbackClient.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/streamableHttpWithSseFallbackClient.d.ts
new file mode 100644
index 0000000..c2679e6
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/streamableHttpWithSseFallbackClient.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=streamableHttpWithSseFallbackClient.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/streamableHttpWithSseFallbackClient.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/streamableHttpWithSseFallbackClient.d.ts.map
new file mode 100644
index 0000000..b79ae2a
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/streamableHttpWithSseFallbackClient.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"streamableHttpWithSseFallbackClient.d.ts","sourceRoot":"","sources":["../../../../src/examples/client/streamableHttpWithSseFallbackClient.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/streamableHttpWithSseFallbackClient.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/streamableHttpWithSseFallbackClient.js
new file mode 100644
index 0000000..bf3e9a8
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/streamableHttpWithSseFallbackClient.js
@@ -0,0 +1,168 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const index_js_1 = require("../../client/index.js");
+const streamableHttp_js_1 = require("../../client/streamableHttp.js");
+const sse_js_1 = require("../../client/sse.js");
+const types_js_1 = require("../../types.js");
+/**
+ * Simplified Backwards Compatible MCP Client
+ *
+ * This client demonstrates backward compatibility with both:
+ * 1. Modern servers using Streamable HTTP transport (protocol version 2025-03-26)
+ * 2. Older servers using HTTP+SSE transport (protocol version 2024-11-05)
+ *
+ * Following the MCP specification for backwards compatibility:
+ * - Attempts to POST an initialize request to the server URL first (modern transport)
+ * - If that fails with 4xx status, falls back to GET request for SSE stream (older transport)
+ */
+// Command line args processing
+const args = process.argv.slice(2);
+const serverUrl = args[0] || 'http://localhost:3000/mcp';
+async function main() {
+ console.log('MCP Backwards Compatible Client');
+ console.log('===============================');
+ console.log(`Connecting to server at: ${serverUrl}`);
+ let client;
+ let transport;
+ try {
+ // Try connecting with automatic transport detection
+ const connection = await connectWithBackwardsCompatibility(serverUrl);
+ client = connection.client;
+ transport = connection.transport;
+ // Set up notification handler
+ client.setNotificationHandler(types_js_1.LoggingMessageNotificationSchema, notification => {
+ console.log(`Notification: ${notification.params.level} - ${notification.params.data}`);
+ });
+ // DEMO WORKFLOW:
+ // 1. List available tools
+ console.log('\n=== Listing Available Tools ===');
+ await listTools(client);
+ // 2. Call the notification tool
+ console.log('\n=== Starting Notification Stream ===');
+ await startNotificationTool(client);
+ // 3. Wait for all notifications (5 seconds)
+ console.log('\n=== Waiting for all notifications ===');
+ await new Promise(resolve => setTimeout(resolve, 5000));
+ // 4. Disconnect
+ console.log('\n=== Disconnecting ===');
+ await transport.close();
+ console.log('Disconnected from MCP server');
+ }
+ catch (error) {
+ console.error('Error running client:', error);
+ process.exit(1);
+ }
+}
+/**
+ * Connect to an MCP server with backwards compatibility
+ * Following the spec for client backward compatibility
+ */
+async function connectWithBackwardsCompatibility(url) {
+ console.log('1. Trying Streamable HTTP transport first...');
+ // Step 1: Try Streamable HTTP transport first
+ const client = new index_js_1.Client({
+ name: 'backwards-compatible-client',
+ version: '1.0.0'
+ });
+ client.onerror = error => {
+ console.error('Client error:', error);
+ };
+ const baseUrl = new URL(url);
+ try {
+ // Create modern transport
+ const streamableTransport = new streamableHttp_js_1.StreamableHTTPClientTransport(baseUrl);
+ await client.connect(streamableTransport);
+ console.log('Successfully connected using modern Streamable HTTP transport.');
+ return {
+ client,
+ transport: streamableTransport,
+ transportType: 'streamable-http'
+ };
+ }
+ catch (error) {
+ // Step 2: If transport fails, try the older SSE transport
+ console.log(`StreamableHttp transport connection failed: ${error}`);
+ console.log('2. Falling back to deprecated HTTP+SSE transport...');
+ try {
+ // Create SSE transport pointing to /sse endpoint
+ const sseTransport = new sse_js_1.SSEClientTransport(baseUrl);
+ const sseClient = new index_js_1.Client({
+ name: 'backwards-compatible-client',
+ version: '1.0.0'
+ });
+ await sseClient.connect(sseTransport);
+ console.log('Successfully connected using deprecated HTTP+SSE transport.');
+ return {
+ client: sseClient,
+ transport: sseTransport,
+ transportType: 'sse'
+ };
+ }
+ catch (sseError) {
+ console.error(`Failed to connect with either transport method:\n1. Streamable HTTP error: ${error}\n2. SSE error: ${sseError}`);
+ throw new Error('Could not connect to server with any available transport');
+ }
+ }
+}
+/**
+ * List available tools on the server
+ */
+async function listTools(client) {
+ try {
+ const toolsRequest = {
+ method: 'tools/list',
+ params: {}
+ };
+ const toolsResult = await client.request(toolsRequest, types_js_1.ListToolsResultSchema);
+ console.log('Available tools:');
+ if (toolsResult.tools.length === 0) {
+ console.log(' No tools available');
+ }
+ else {
+ for (const tool of toolsResult.tools) {
+ console.log(` - ${tool.name}: ${tool.description}`);
+ }
+ }
+ }
+ catch (error) {
+ console.log(`Tools not supported by this server: ${error}`);
+ }
+}
+/**
+ * Start a notification stream by calling the notification tool
+ */
+async function startNotificationTool(client) {
+ try {
+ // Call the notification tool using reasonable defaults
+ const request = {
+ method: 'tools/call',
+ params: {
+ name: 'start-notification-stream',
+ arguments: {
+ interval: 1000, // 1 second between notifications
+ count: 5 // Send 5 notifications
+ }
+ }
+ };
+ console.log('Calling notification tool...');
+ const result = await client.request(request, types_js_1.CallToolResultSchema);
+ console.log('Tool result:');
+ result.content.forEach(item => {
+ if (item.type === 'text') {
+ console.log(` ${item.text}`);
+ }
+ else {
+ console.log(` ${item.type} content:`, item);
+ }
+ });
+ }
+ catch (error) {
+ console.log(`Error calling notification tool: ${error}`);
+ }
+}
+// Start the client
+main().catch((error) => {
+ console.error('Error running MCP client:', error);
+ process.exit(1);
+});
+//# sourceMappingURL=streamableHttpWithSseFallbackClient.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/streamableHttpWithSseFallbackClient.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/streamableHttpWithSseFallbackClient.js.map
new file mode 100644
index 0000000..f3bec99
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/streamableHttpWithSseFallbackClient.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"streamableHttpWithSseFallbackClient.js","sourceRoot":"","sources":["../../../../src/examples/client/streamableHttpWithSseFallbackClient.ts"],"names":[],"mappings":";;AAAA,oDAA+C;AAC/C,sEAA+E;AAC/E,gDAAyD;AACzD,6CAMwB;AAExB;;;;;;;;;;GAUG;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CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.d.ts
new file mode 100644
index 0000000..218aeac
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.d.ts
@@ -0,0 +1,78 @@
+import { AuthorizationParams, OAuthServerProvider } from '../../server/auth/provider.js';
+import { OAuthRegisteredClientsStore } from '../../server/auth/clients.js';
+import { OAuthClientInformationFull, OAuthMetadata, OAuthTokens } from '../../shared/auth.js';
+import { Response } from 'express';
+import { AuthInfo } from '../../server/auth/types.js';
+export declare class DemoInMemoryClientsStore implements OAuthRegisteredClientsStore {
+ private clients;
+ getClient(clientId: string): Promise<{
+ redirect_uris: string[];
+ client_id: string;
+ token_endpoint_auth_method?: string | undefined;
+ grant_types?: string[] | undefined;
+ response_types?: string[] | undefined;
+ client_name?: string | undefined;
+ client_uri?: string | undefined;
+ logo_uri?: string | undefined;
+ scope?: string | undefined;
+ contacts?: string[] | undefined;
+ tos_uri?: string | undefined;
+ policy_uri?: string | undefined;
+ jwks_uri?: string | undefined;
+ jwks?: any;
+ software_id?: string | undefined;
+ software_version?: string | undefined;
+ software_statement?: string | undefined;
+ client_secret?: string | undefined;
+ client_id_issued_at?: number | undefined;
+ client_secret_expires_at?: number | undefined;
+ } | undefined>;
+ registerClient(clientMetadata: OAuthClientInformationFull): Promise<{
+ redirect_uris: string[];
+ client_id: string;
+ token_endpoint_auth_method?: string | undefined;
+ grant_types?: string[] | undefined;
+ response_types?: string[] | undefined;
+ client_name?: string | undefined;
+ client_uri?: string | undefined;
+ logo_uri?: string | undefined;
+ scope?: string | undefined;
+ contacts?: string[] | undefined;
+ tos_uri?: string | undefined;
+ policy_uri?: string | undefined;
+ jwks_uri?: string | undefined;
+ jwks?: any;
+ software_id?: string | undefined;
+ software_version?: string | undefined;
+ software_statement?: string | undefined;
+ client_secret?: string | undefined;
+ client_id_issued_at?: number | undefined;
+ client_secret_expires_at?: number | undefined;
+ }>;
+}
+/**
+ * 🚨 DEMO ONLY - NOT FOR PRODUCTION
+ *
+ * This example demonstrates MCP OAuth flow but lacks some of the features required for production use,
+ * for example:
+ * - Persistent token storage
+ * - Rate limiting
+ */
+export declare class DemoInMemoryAuthProvider implements OAuthServerProvider {
+ private validateResource?;
+ clientsStore: DemoInMemoryClientsStore;
+ private codes;
+ private tokens;
+ constructor(validateResource?: ((resource?: URL) => boolean) | undefined);
+ authorize(client: OAuthClientInformationFull, params: AuthorizationParams, res: Response): Promise;
+ challengeForAuthorizationCode(client: OAuthClientInformationFull, authorizationCode: string): Promise;
+ exchangeAuthorizationCode(client: OAuthClientInformationFull, authorizationCode: string, _codeVerifier?: string): Promise;
+ exchangeRefreshToken(_client: OAuthClientInformationFull, _refreshToken: string, _scopes?: string[], _resource?: URL): Promise;
+ verifyAccessToken(token: string): Promise;
+}
+export declare const setupAuthServer: ({ authServerUrl, mcpServerUrl, strictResource }: {
+ authServerUrl: URL;
+ mcpServerUrl: URL;
+ strictResource: boolean;
+}) => OAuthMetadata;
+//# sourceMappingURL=demoInMemoryOAuthProvider.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.d.ts.map
new file mode 100644
index 0000000..8a4a43f
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"demoInMemoryOAuthProvider.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/demoInMemoryOAuthProvider.ts"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AAS,CAAC,EAAE,GAAG,GAChB,OAAO,CAAC,WAAW,CAAC;IAIjB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;CAc5D;AAED,eAAO,MAAM,eAAe,oDAIzB;IACC,aAAa,EAAE,GAAG,CAAC;IACnB,YAAY,EAAE,GAAG,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;CAC3B,KAAG,aA+EH,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.js
new file mode 100644
index 0000000..c439a34
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.js
@@ -0,0 +1,205 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.setupAuthServer = exports.DemoInMemoryAuthProvider = exports.DemoInMemoryClientsStore = void 0;
+const node_crypto_1 = require("node:crypto");
+const express_1 = __importDefault(require("express"));
+const router_js_1 = require("../../server/auth/router.js");
+const auth_utils_js_1 = require("../../shared/auth-utils.js");
+const errors_js_1 = require("../../server/auth/errors.js");
+class DemoInMemoryClientsStore {
+ constructor() {
+ this.clients = new Map();
+ }
+ async getClient(clientId) {
+ return this.clients.get(clientId);
+ }
+ async registerClient(clientMetadata) {
+ this.clients.set(clientMetadata.client_id, clientMetadata);
+ return clientMetadata;
+ }
+}
+exports.DemoInMemoryClientsStore = DemoInMemoryClientsStore;
+/**
+ * 🚨 DEMO ONLY - NOT FOR PRODUCTION
+ *
+ * This example demonstrates MCP OAuth flow but lacks some of the features required for production use,
+ * for example:
+ * - Persistent token storage
+ * - Rate limiting
+ */
+class DemoInMemoryAuthProvider {
+ constructor(validateResource) {
+ this.validateResource = validateResource;
+ this.clientsStore = new DemoInMemoryClientsStore();
+ this.codes = new Map();
+ this.tokens = new Map();
+ }
+ async authorize(client, params, res) {
+ const code = (0, node_crypto_1.randomUUID)();
+ const searchParams = new URLSearchParams({
+ code
+ });
+ if (params.state !== undefined) {
+ searchParams.set('state', params.state);
+ }
+ this.codes.set(code, {
+ client,
+ params
+ });
+ // Simulate a user login
+ // Set a secure HTTP-only session cookie with authorization info
+ if (res.cookie) {
+ const authCookieData = {
+ userId: 'demo_user',
+ name: 'Demo User',
+ timestamp: Date.now()
+ };
+ res.cookie('demo_session', JSON.stringify(authCookieData), {
+ httpOnly: true,
+ secure: false, // In production, this should be true
+ sameSite: 'lax',
+ maxAge: 24 * 60 * 60 * 1000, // 24 hours - for demo purposes
+ path: '/' // Available to all routes
+ });
+ }
+ if (!client.redirect_uris.includes(params.redirectUri)) {
+ throw new errors_js_1.InvalidRequestError('Unregistered redirect_uri');
+ }
+ const targetUrl = new URL(params.redirectUri);
+ targetUrl.search = searchParams.toString();
+ res.redirect(targetUrl.toString());
+ }
+ async challengeForAuthorizationCode(client, authorizationCode) {
+ // Store the challenge with the code data
+ const codeData = this.codes.get(authorizationCode);
+ if (!codeData) {
+ throw new Error('Invalid authorization code');
+ }
+ return codeData.params.codeChallenge;
+ }
+ async exchangeAuthorizationCode(client, authorizationCode,
+ // Note: code verifier is checked in token.ts by default
+ // it's unused here for that reason.
+ _codeVerifier) {
+ const codeData = this.codes.get(authorizationCode);
+ if (!codeData) {
+ throw new Error('Invalid authorization code');
+ }
+ if (codeData.client.client_id !== client.client_id) {
+ throw new Error(`Authorization code was not issued to this client, ${codeData.client.client_id} != ${client.client_id}`);
+ }
+ if (this.validateResource && !this.validateResource(codeData.params.resource)) {
+ throw new Error(`Invalid resource: ${codeData.params.resource}`);
+ }
+ this.codes.delete(authorizationCode);
+ const token = (0, node_crypto_1.randomUUID)();
+ const tokenData = {
+ token,
+ clientId: client.client_id,
+ scopes: codeData.params.scopes || [],
+ expiresAt: Date.now() + 3600000, // 1 hour
+ resource: codeData.params.resource,
+ type: 'access'
+ };
+ this.tokens.set(token, tokenData);
+ return {
+ access_token: token,
+ token_type: 'bearer',
+ expires_in: 3600,
+ scope: (codeData.params.scopes || []).join(' ')
+ };
+ }
+ async exchangeRefreshToken(_client, _refreshToken, _scopes, _resource) {
+ throw new Error('Not implemented for example demo');
+ }
+ async verifyAccessToken(token) {
+ const tokenData = this.tokens.get(token);
+ if (!tokenData || !tokenData.expiresAt || tokenData.expiresAt < Date.now()) {
+ throw new Error('Invalid or expired token');
+ }
+ return {
+ token,
+ clientId: tokenData.clientId,
+ scopes: tokenData.scopes,
+ expiresAt: Math.floor(tokenData.expiresAt / 1000),
+ resource: tokenData.resource
+ };
+ }
+}
+exports.DemoInMemoryAuthProvider = DemoInMemoryAuthProvider;
+const setupAuthServer = ({ authServerUrl, mcpServerUrl, strictResource }) => {
+ // Create separate auth server app
+ // NOTE: This is a separate app on a separate port to illustrate
+ // how to separate an OAuth Authorization Server from a Resource
+ // server in the SDK. The SDK is not intended to be provide a standalone
+ // authorization server.
+ const validateResource = strictResource
+ ? (resource) => {
+ if (!resource)
+ return false;
+ const expectedResource = (0, auth_utils_js_1.resourceUrlFromServerUrl)(mcpServerUrl);
+ return resource.toString() === expectedResource.toString();
+ }
+ : undefined;
+ const provider = new DemoInMemoryAuthProvider(validateResource);
+ const authApp = (0, express_1.default)();
+ authApp.use(express_1.default.json());
+ // For introspection requests
+ authApp.use(express_1.default.urlencoded());
+ // Add OAuth routes to the auth server
+ // NOTE: this will also add a protected resource metadata route,
+ // but it won't be used, so leave it.
+ authApp.use((0, router_js_1.mcpAuthRouter)({
+ provider,
+ issuerUrl: authServerUrl,
+ scopesSupported: ['mcp:tools']
+ }));
+ authApp.post('/introspect', async (req, res) => {
+ try {
+ const { token } = req.body;
+ if (!token) {
+ res.status(400).json({ error: 'Token is required' });
+ return;
+ }
+ const tokenInfo = await provider.verifyAccessToken(token);
+ res.json({
+ active: true,
+ client_id: tokenInfo.clientId,
+ scope: tokenInfo.scopes.join(' '),
+ exp: tokenInfo.expiresAt,
+ aud: tokenInfo.resource
+ });
+ return;
+ }
+ catch (error) {
+ res.status(401).json({
+ active: false,
+ error: 'Unauthorized',
+ error_description: `Invalid token: ${error}`
+ });
+ }
+ });
+ const auth_port = authServerUrl.port;
+ // Start the auth server
+ authApp.listen(auth_port, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`OAuth Authorization Server listening on port ${auth_port}`);
+ });
+ // Note: we could fetch this from the server, but then we end up
+ // with some top level async which gets annoying.
+ const oauthMetadata = (0, router_js_1.createOAuthMetadata)({
+ provider,
+ issuerUrl: authServerUrl,
+ scopesSupported: ['mcp:tools']
+ });
+ oauthMetadata.introspection_endpoint = new URL('/introspect', authServerUrl).href;
+ return oauthMetadata;
+};
+exports.setupAuthServer = setupAuthServer;
+//# sourceMappingURL=demoInMemoryOAuthProvider.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.js.map
new file mode 100644
index 0000000..e19a20d
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"demoInMemoryOAuthProvider.js","sourceRoot":"","sources":["../../../../src/examples/server/demoInMemoryOAuthProvider.ts"],"names":[],"mappings":";;;;;;AAAA,6CAAyC;AAIzC,sDAAqD;AAErD,2DAAiF;AACjF,8DAAsE;AACtE,2DAAkE;AAElE,MAAa,wBAAwB;IAArC;QACY,YAAO,GAAG,IAAI,GAAG,EAAsC,CAAC;IAUpE,CAAC;IARG,KAAK,CAAC,SAAS,CAAC,QAAgB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CAAC,EAAE;QAC9B,IAAI,KAAK,EAAE,CAAC;YACR,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;YAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,gDAAgD,SAAS,EAAE,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;IAEH,gEAAgE;IAChE,iDAAiD;IACjD,MAAM,aAAa,GAAkB,IAAA,+BAAmB,EAAC;QACrD,QAAQ;QACR,SAAS,EAAE,aAAa;QACxB,eAAe,EAAE,CAAC,WAAW,CAAC;KACjC,CAAC,CAAC;IAEH,aAAa,CAAC,sBAAsB,GAAG,IAAI,GAAG,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,IAAI,CAAC;IAElF,OAAO,aAAa,CAAC;AACzB,CAAC,CAAC;AAvFW,QAAA,eAAe,mBAuF1B"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.d.ts
new file mode 100644
index 0000000..e4b736e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=elicitationFormExample.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.d.ts.map
new file mode 100644
index 0000000..c569df4
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"elicitationFormExample.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/elicitationFormExample.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js
new file mode 100644
index 0000000..4c2f4e1
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js
@@ -0,0 +1,460 @@
+"use strict";
+// Run with: npx tsx src/examples/server/elicitationFormExample.ts
+//
+// This example demonstrates how to use form elicitation to collect structured user input
+// with JSON Schema validation via a local HTTP server with SSE streaming.
+// Form elicitation allows servers to request *non-sensitive* user input through the client
+// with schema-based validation.
+// Note: See also elicitationUrlExample.ts for an example of using URL elicitation
+// to collect *sensitive* user input via a browser.
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_crypto_1 = require("node:crypto");
+const mcp_js_1 = require("../../server/mcp.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const types_js_1 = require("../../types.js");
+const express_js_1 = require("../../server/express.js");
+// Factory to create a new MCP server per session.
+// Each session needs its own server+transport pair to avoid cross-session contamination.
+const getServer = () => {
+ // Create MCP server - it will automatically use AjvJsonSchemaValidator with sensible defaults
+ // The validator supports format validation (email, date, etc.) if ajv-formats is installed
+ const mcpServer = new mcp_js_1.McpServer({
+ name: 'form-elicitation-example-server',
+ version: '1.0.0'
+ }, {
+ capabilities: {}
+ });
+ /**
+ * Example 1: Simple user registration tool
+ * Collects username, email, and password from the user
+ */
+ mcpServer.registerTool('register_user', {
+ description: 'Register a new user account by collecting their information',
+ inputSchema: {}
+ }, async () => {
+ try {
+ // Request user information through form elicitation
+ const result = await mcpServer.server.elicitInput({
+ mode: 'form',
+ message: 'Please provide your registration information:',
+ requestedSchema: {
+ type: 'object',
+ properties: {
+ username: {
+ type: 'string',
+ title: 'Username',
+ description: 'Your desired username (3-20 characters)',
+ minLength: 3,
+ maxLength: 20
+ },
+ email: {
+ type: 'string',
+ title: 'Email',
+ description: 'Your email address',
+ format: 'email'
+ },
+ password: {
+ type: 'string',
+ title: 'Password',
+ description: 'Your password (min 8 characters)',
+ minLength: 8
+ },
+ newsletter: {
+ type: 'boolean',
+ title: 'Newsletter',
+ description: 'Subscribe to newsletter?',
+ default: false
+ },
+ role: {
+ type: 'string',
+ title: 'Role',
+ description: 'Your primary role',
+ oneOf: [
+ { const: 'developer', title: 'Developer' },
+ { const: 'designer', title: 'Designer' },
+ { const: 'manager', title: 'Manager' },
+ { const: 'other', title: 'Other' }
+ ],
+ default: 'developer'
+ },
+ interests: {
+ type: 'array',
+ title: 'Interests',
+ description: 'Select your areas of interest',
+ items: {
+ type: 'string',
+ enum: ['frontend', 'backend', 'mobile', 'devops', 'ai']
+ },
+ minItems: 1,
+ maxItems: 3
+ }
+ },
+ required: ['username', 'email', 'password']
+ }
+ });
+ // Handle the different possible actions
+ if (result.action === 'accept' && result.content) {
+ const { username, email, newsletter } = result.content;
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Registration successful!\n\nUsername: ${username}\nEmail: ${email}\nNewsletter: ${newsletter ? 'Yes' : 'No'}`
+ }
+ ]
+ };
+ }
+ else if (result.action === 'decline') {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: 'Registration cancelled by user.'
+ }
+ ]
+ };
+ }
+ else {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: 'Registration was cancelled.'
+ }
+ ]
+ };
+ }
+ }
+ catch (error) {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Registration failed: ${error instanceof Error ? error.message : String(error)}`
+ }
+ ],
+ isError: true
+ };
+ }
+ });
+ /**
+ * Example 2: Multi-step workflow with multiple form elicitation requests
+ * Demonstrates how to collect information in multiple steps
+ */
+ mcpServer.registerTool('create_event', {
+ description: 'Create a calendar event by collecting event details',
+ inputSchema: {}
+ }, async () => {
+ try {
+ // Step 1: Collect basic event information
+ const basicInfo = await mcpServer.server.elicitInput({
+ mode: 'form',
+ message: 'Step 1: Enter basic event information',
+ requestedSchema: {
+ type: 'object',
+ properties: {
+ title: {
+ type: 'string',
+ title: 'Event Title',
+ description: 'Name of the event',
+ minLength: 1
+ },
+ description: {
+ type: 'string',
+ title: 'Description',
+ description: 'Event description (optional)'
+ }
+ },
+ required: ['title']
+ }
+ });
+ if (basicInfo.action !== 'accept' || !basicInfo.content) {
+ return {
+ content: [{ type: 'text', text: 'Event creation cancelled.' }]
+ };
+ }
+ // Step 2: Collect date and time
+ const dateTime = await mcpServer.server.elicitInput({
+ mode: 'form',
+ message: 'Step 2: Enter date and time',
+ requestedSchema: {
+ type: 'object',
+ properties: {
+ date: {
+ type: 'string',
+ title: 'Date',
+ description: 'Event date',
+ format: 'date'
+ },
+ startTime: {
+ type: 'string',
+ title: 'Start Time',
+ description: 'Event start time (HH:MM)'
+ },
+ duration: {
+ type: 'integer',
+ title: 'Duration',
+ description: 'Duration in minutes',
+ minimum: 15,
+ maximum: 480
+ }
+ },
+ required: ['date', 'startTime', 'duration']
+ }
+ });
+ if (dateTime.action !== 'accept' || !dateTime.content) {
+ return {
+ content: [{ type: 'text', text: 'Event creation cancelled.' }]
+ };
+ }
+ // Combine all collected information
+ const event = {
+ ...basicInfo.content,
+ ...dateTime.content
+ };
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Event created successfully!\n\n${JSON.stringify(event, null, 2)}`
+ }
+ ]
+ };
+ }
+ catch (error) {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Event creation failed: ${error instanceof Error ? error.message : String(error)}`
+ }
+ ],
+ isError: true
+ };
+ }
+ });
+ /**
+ * Example 3: Collecting address information
+ * Demonstrates validation with patterns and optional fields
+ */
+ mcpServer.registerTool('update_shipping_address', {
+ description: 'Update shipping address with validation',
+ inputSchema: {}
+ }, async () => {
+ try {
+ const result = await mcpServer.server.elicitInput({
+ mode: 'form',
+ message: 'Please provide your shipping address:',
+ requestedSchema: {
+ type: 'object',
+ properties: {
+ name: {
+ type: 'string',
+ title: 'Full Name',
+ description: 'Recipient name',
+ minLength: 1
+ },
+ street: {
+ type: 'string',
+ title: 'Street Address',
+ minLength: 1
+ },
+ city: {
+ type: 'string',
+ title: 'City',
+ minLength: 1
+ },
+ state: {
+ type: 'string',
+ title: 'State/Province',
+ minLength: 2,
+ maxLength: 2
+ },
+ zipCode: {
+ type: 'string',
+ title: 'ZIP/Postal Code',
+ description: '5-digit ZIP code'
+ },
+ phone: {
+ type: 'string',
+ title: 'Phone Number (optional)',
+ description: 'Contact phone number'
+ }
+ },
+ required: ['name', 'street', 'city', 'state', 'zipCode']
+ }
+ });
+ if (result.action === 'accept' && result.content) {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Address updated successfully!\n\n${JSON.stringify(result.content, null, 2)}`
+ }
+ ]
+ };
+ }
+ else if (result.action === 'decline') {
+ return {
+ content: [{ type: 'text', text: 'Address update cancelled by user.' }]
+ };
+ }
+ else {
+ return {
+ content: [{ type: 'text', text: 'Address update was cancelled.' }]
+ };
+ }
+ }
+ catch (error) {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Address update failed: ${error instanceof Error ? error.message : String(error)}`
+ }
+ ],
+ isError: true
+ };
+ }
+ });
+ return mcpServer;
+};
+async function main() {
+ const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 3000;
+ const app = (0, express_js_1.createMcpExpressApp)();
+ // Map to store transports by session ID
+ const transports = {};
+ // MCP POST endpoint
+ const mcpPostHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (sessionId) {
+ console.log(`Received MCP request for session: ${sessionId}`);
+ }
+ try {
+ let transport;
+ if (sessionId && transports[sessionId]) {
+ // Reuse existing transport for this session
+ transport = transports[sessionId];
+ }
+ else if (!sessionId && (0, types_js_1.isInitializeRequest)(req.body)) {
+ // New initialization request - create new transport
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ onsessioninitialized: sessionId => {
+ // Store the transport by session ID when session is initialized
+ console.log(`Session initialized with ID: ${sessionId}`);
+ transports[sessionId] = transport;
+ }
+ });
+ // Set up onclose handler to clean up transport when closed
+ transport.onclose = () => {
+ const sid = transport.sessionId;
+ if (sid && transports[sid]) {
+ console.log(`Transport closed for session ${sid}, removing from transports map`);
+ delete transports[sid];
+ }
+ };
+ // Create a new server per session and connect it to the transport
+ const mcpServer = getServer();
+ await mcpServer.connect(transport);
+ await transport.handleRequest(req, res, req.body);
+ return;
+ }
+ else {
+ // Invalid request - no session ID or not initialization request
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: No valid session ID provided'
+ },
+ id: null
+ });
+ return;
+ }
+ // Handle the request with existing transport
+ await transport.handleRequest(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32603,
+ message: 'Internal server error'
+ },
+ id: null
+ });
+ }
+ }
+ };
+ app.post('/mcp', mcpPostHandler);
+ // Handle GET requests for SSE streams
+ const mcpGetHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ console.log(`Establishing SSE stream for session ${sessionId}`);
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+ };
+ app.get('/mcp', mcpGetHandler);
+ // Handle DELETE requests for session termination
+ const mcpDeleteHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ console.log(`Received session termination request for session ${sessionId}`);
+ try {
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+ }
+ catch (error) {
+ console.error('Error handling session termination:', error);
+ if (!res.headersSent) {
+ res.status(500).send('Error processing session termination');
+ }
+ }
+ };
+ app.delete('/mcp', mcpDeleteHandler);
+ // Start listening
+ app.listen(PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`Form elicitation example server is running on http://localhost:${PORT}/mcp`);
+ console.log('Available tools:');
+ console.log(' - register_user: Collect user registration information');
+ console.log(' - create_event: Multi-step event creation');
+ console.log(' - update_shipping_address: Collect and validate address');
+ console.log('\nConnect your MCP client to this server using the HTTP transport.');
+ });
+ // Handle server shutdown
+ process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ // Close all active transports to properly clean up resources
+ for (const sessionId in transports) {
+ try {
+ console.log(`Closing transport for session ${sessionId}`);
+ await transports[sessionId].close();
+ delete transports[sessionId];
+ }
+ catch (error) {
+ console.error(`Error closing transport for session ${sessionId}:`, error);
+ }
+ }
+ console.log('Server shutdown complete');
+ process.exit(0);
+ });
+}
+main().catch(error => {
+ console.error('Server error:', error);
+ process.exit(1);
+});
+//# sourceMappingURL=elicitationFormExample.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js.map
new file mode 100644
index 0000000..4056a05
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"elicitationFormExample.js","sourceRoot":"","sources":["../../../../src/examples/server/elicitationFormExample.ts"],"names":[],"mappings":";AAAA,kEAAkE;AAClE,EAAE;AACF,yFAAyF;AACzF,0EAA0E;AAC1E,2FAA2F;AAC3F,gCAAgC;AAChC,kFAAkF;AAClF,mDAAmD;;AAEnD,6CAAyC;AAEzC,gDAAgD;AAChD,sEAA+E;AAC/E,6CAAqD;AACrD,wDAA8D;AAE9D,kDAAkD;AAClD,yFAAyF;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CAAuC,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;YAC9E,CAAC;QACL,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;QACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.d.ts
new file mode 100644
index 0000000..611f6eb
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=elicitationUrlExample.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.d.ts.map
new file mode 100644
index 0000000..04acd66
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"elicitationUrlExample.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/elicitationUrlExample.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js
new file mode 100644
index 0000000..53c860b
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js
@@ -0,0 +1,656 @@
+"use strict";
+// Run with: npx tsx src/examples/server/elicitationUrlExample.ts
+//
+// This example demonstrates how to use URL elicitation to securely collect
+// *sensitive* user input in a remote (HTTP) server.
+// URL elicitation allows servers to prompt the end-user to open a URL in their browser
+// to collect sensitive information.
+// Note: See also elicitationFormExample.ts for an example of using form (not URL) elicitation
+// to collect *non-sensitive* user input with a structured schema.
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const express_1 = __importDefault(require("express"));
+const node_crypto_1 = require("node:crypto");
+const zod_1 = require("zod");
+const mcp_js_1 = require("../../server/mcp.js");
+const express_js_1 = require("../../server/express.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const router_js_1 = require("../../server/auth/router.js");
+const bearerAuth_js_1 = require("../../server/auth/middleware/bearerAuth.js");
+const types_js_1 = require("../../types.js");
+const inMemoryEventStore_js_1 = require("../shared/inMemoryEventStore.js");
+const demoInMemoryOAuthProvider_js_1 = require("./demoInMemoryOAuthProvider.js");
+const auth_utils_js_1 = require("../../shared/auth-utils.js");
+const cors_1 = __importDefault(require("cors"));
+// Create an MCP server with implementation details
+const getServer = () => {
+ const mcpServer = new mcp_js_1.McpServer({
+ name: 'url-elicitation-http-server',
+ version: '1.0.0'
+ }, {
+ capabilities: { logging: {} }
+ });
+ mcpServer.registerTool('payment-confirm', {
+ description: 'A tool that confirms a payment directly with a user',
+ inputSchema: {
+ cartId: zod_1.z.string().describe('The ID of the cart to confirm')
+ }
+ }, async ({ cartId }, extra) => {
+ /*
+ In a real world scenario, there would be some logic here to check if the user has the provided cartId.
+ For the purposes of this example, we'll throw an error (-> elicits the client to open a URL to confirm payment)
+ */
+ const sessionId = extra.sessionId;
+ if (!sessionId) {
+ throw new Error('Expected a Session ID');
+ }
+ // Create and track the elicitation
+ const elicitationId = generateTrackedElicitation(sessionId, elicitationId => mcpServer.server.createElicitationCompletionNotifier(elicitationId));
+ throw new types_js_1.UrlElicitationRequiredError([
+ {
+ mode: 'url',
+ message: 'This tool requires a payment confirmation. Open the link to confirm payment!',
+ url: `http://localhost:${MCP_PORT}/confirm-payment?session=${sessionId}&elicitation=${elicitationId}&cartId=${encodeURIComponent(cartId)}`,
+ elicitationId
+ }
+ ]);
+ });
+ mcpServer.registerTool('third-party-auth', {
+ description: 'A demo tool that requires third-party OAuth credentials',
+ inputSchema: {
+ param1: zod_1.z.string().describe('First parameter')
+ }
+ }, async (_, extra) => {
+ /*
+ In a real world scenario, there would be some logic here to check if we already have a valid access token for the user.
+ Auth info (with a subject or `sub` claim) can be typically be found in `extra.authInfo`.
+ If we do, we can just return the result of the tool call.
+ If we don't, we can throw an ElicitationRequiredError to request the user to authenticate.
+ For the purposes of this example, we'll throw an error (-> elicits the client to open a URL to authenticate).
+ */
+ const sessionId = extra.sessionId;
+ if (!sessionId) {
+ throw new Error('Expected a Session ID');
+ }
+ // Create and track the elicitation
+ const elicitationId = generateTrackedElicitation(sessionId, elicitationId => mcpServer.server.createElicitationCompletionNotifier(elicitationId));
+ // Simulate OAuth callback and token exchange after 5 seconds
+ // In a real app, this would be called from your OAuth callback handler
+ setTimeout(() => {
+ console.log(`Simulating OAuth token received for elicitation ${elicitationId}`);
+ completeURLElicitation(elicitationId);
+ }, 5000);
+ throw new types_js_1.UrlElicitationRequiredError([
+ {
+ mode: 'url',
+ message: 'This tool requires access to your example.com account. Open the link to authenticate!',
+ url: 'https://www.example.com/oauth/authorize',
+ elicitationId
+ }
+ ]);
+ });
+ return mcpServer;
+};
+const elicitationsMap = new Map();
+// Clean up old elicitations after 1 hour to prevent memory leaks
+const ELICITATION_TTL_MS = 60 * 60 * 1000; // 1 hour
+const CLEANUP_INTERVAL_MS = 10 * 60 * 1000; // 10 minutes
+function cleanupOldElicitations() {
+ const now = new Date();
+ for (const [id, metadata] of elicitationsMap.entries()) {
+ if (now.getTime() - metadata.createdAt.getTime() > ELICITATION_TTL_MS) {
+ elicitationsMap.delete(id);
+ console.log(`Cleaned up expired elicitation: ${id}`);
+ }
+ }
+}
+setInterval(cleanupOldElicitations, CLEANUP_INTERVAL_MS);
+/**
+ * Elicitation IDs must be unique strings within the MCP session
+ * UUIDs are used in this example for simplicity
+ */
+function generateElicitationId() {
+ return (0, node_crypto_1.randomUUID)();
+}
+/**
+ * Helper function to create and track a new elicitation.
+ */
+function generateTrackedElicitation(sessionId, createCompletionNotifier) {
+ const elicitationId = generateElicitationId();
+ // Create a Promise and its resolver for tracking completion
+ let completeResolver;
+ const completedPromise = new Promise(resolve => {
+ completeResolver = resolve;
+ });
+ const completionNotifier = createCompletionNotifier ? createCompletionNotifier(elicitationId) : undefined;
+ // Store the elicitation in our map
+ elicitationsMap.set(elicitationId, {
+ status: 'pending',
+ completedPromise,
+ completeResolver: completeResolver,
+ createdAt: new Date(),
+ sessionId,
+ completionNotifier
+ });
+ return elicitationId;
+}
+/**
+ * Helper function to complete an elicitation.
+ */
+function completeURLElicitation(elicitationId) {
+ const elicitation = elicitationsMap.get(elicitationId);
+ if (!elicitation) {
+ console.warn(`Attempted to complete unknown elicitation: ${elicitationId}`);
+ return;
+ }
+ if (elicitation.status === 'complete') {
+ console.warn(`Elicitation already complete: ${elicitationId}`);
+ return;
+ }
+ // Update metadata
+ elicitation.status = 'complete';
+ // Send completion notification to the client
+ if (elicitation.completionNotifier) {
+ console.log(`Sending notifications/elicitation/complete notification for elicitation ${elicitationId}`);
+ elicitation.completionNotifier().catch(error => {
+ console.error(`Failed to send completion notification for elicitation ${elicitationId}:`, error);
+ });
+ }
+ // Resolve the promise to unblock any waiting code
+ elicitation.completeResolver();
+}
+const MCP_PORT = process.env.MCP_PORT ? parseInt(process.env.MCP_PORT, 10) : 3000;
+const AUTH_PORT = process.env.MCP_AUTH_PORT ? parseInt(process.env.MCP_AUTH_PORT, 10) : 3001;
+const app = (0, express_js_1.createMcpExpressApp)();
+// Allow CORS all domains, expose the Mcp-Session-Id header
+app.use((0, cors_1.default)({
+ origin: '*', // Allow all origins
+ exposedHeaders: ['Mcp-Session-Id'],
+ credentials: true // Allow cookies to be sent cross-origin
+}));
+// Set up OAuth (required for this example)
+let authMiddleware = null;
+// Create auth middleware for MCP endpoints
+const mcpServerUrl = new URL(`http://localhost:${MCP_PORT}/mcp`);
+const authServerUrl = new URL(`http://localhost:${AUTH_PORT}`);
+const oauthMetadata = (0, demoInMemoryOAuthProvider_js_1.setupAuthServer)({ authServerUrl, mcpServerUrl, strictResource: true });
+const tokenVerifier = {
+ verifyAccessToken: async (token) => {
+ const endpoint = oauthMetadata.introspection_endpoint;
+ if (!endpoint) {
+ throw new Error('No token verification endpoint available in metadata');
+ }
+ const response = await fetch(endpoint, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded'
+ },
+ body: new URLSearchParams({
+ token: token
+ }).toString()
+ });
+ if (!response.ok) {
+ const text = await response.text().catch(() => null);
+ throw new Error(`Invalid or expired token: ${text}`);
+ }
+ const data = await response.json();
+ if (!data.aud) {
+ throw new Error(`Resource Indicator (RFC8707) missing`);
+ }
+ if (!(0, auth_utils_js_1.checkResourceAllowed)({ requestedResource: data.aud, configuredResource: mcpServerUrl })) {
+ throw new Error(`Expected resource indicator ${mcpServerUrl}, got: ${data.aud}`);
+ }
+ // Convert the response to AuthInfo format
+ return {
+ token,
+ clientId: data.client_id,
+ scopes: data.scope ? data.scope.split(' ') : [],
+ expiresAt: data.exp
+ };
+ }
+};
+// Add metadata routes to the main MCP server
+app.use((0, router_js_1.mcpAuthMetadataRouter)({
+ oauthMetadata,
+ resourceServerUrl: mcpServerUrl,
+ scopesSupported: ['mcp:tools'],
+ resourceName: 'MCP Demo Server'
+}));
+authMiddleware = (0, bearerAuth_js_1.requireBearerAuth)({
+ verifier: tokenVerifier,
+ requiredScopes: [],
+ resourceMetadataUrl: (0, router_js_1.getOAuthProtectedResourceMetadataUrl)(mcpServerUrl)
+});
+/**
+ * API Key Form Handling
+ *
+ * Many servers today require an API key to operate, but there's no scalable way to do this dynamically for remote servers within MCP protocol.
+ * URL-mode elicitation enables the server to host a simple form and get the secret data securely from the user without involving the LLM or client.
+ **/
+async function sendApiKeyElicitation(sessionId, sender, createCompletionNotifier) {
+ if (!sessionId) {
+ console.error('No session ID provided');
+ throw new Error('Expected a Session ID to track elicitation');
+ }
+ console.log('🔑 URL elicitation demo: Requesting API key from client...');
+ const elicitationId = generateTrackedElicitation(sessionId, createCompletionNotifier);
+ try {
+ const result = await sender({
+ mode: 'url',
+ message: 'Please provide your API key to authenticate with this server',
+ // Host the form on the same server. In a real app, you might coordinate passing these state variables differently.
+ url: `http://localhost:${MCP_PORT}/api-key-form?session=${sessionId}&elicitation=${elicitationId}`,
+ elicitationId
+ });
+ switch (result.action) {
+ case 'accept':
+ console.log('🔑 URL elicitation demo: Client accepted the API key elicitation (now pending form submission)');
+ // Wait for the API key to be submitted via the form
+ // The form submission will complete the elicitation
+ break;
+ default:
+ console.log('🔑 URL elicitation demo: Client declined to provide an API key');
+ // In a real app, this might close the connection, but for the demo, we'll continue
+ break;
+ }
+ }
+ catch (error) {
+ console.error('Error during API key elicitation:', error);
+ }
+}
+// API Key Form endpoint - serves a simple HTML form
+app.get('/api-key-form', (req, res) => {
+ const mcpSessionId = req.query.session;
+ const elicitationId = req.query.elicitation;
+ if (!mcpSessionId || !elicitationId) {
+ res.status(400).send('
Error
Missing required parameters
');
+ return;
+ }
+ // Check for user session cookie
+ // In production, this is often handled by some user auth middleware to ensure the user has a valid session
+ // This session is different from the MCP session.
+ // This userSession is the cookie that the MCP Server's Authorization Server sets for the user when they log in.
+ const userSession = getUserSessionCookie(req.headers.cookie);
+ if (!userSession) {
+ res.status(401).send('
Error
Unauthorized - please reconnect to login again
');
+ return;
+ }
+ // Serve a simple HTML form
+ res.send(`
+
+
+
+ Submit Your API Key
+
+
+
+
API Key Required
+
✓ Logged in as: ${userSession.name}
+
+
This is a demo showing how a server can securely elicit sensitive data from a user using a URL.
');
+ return;
+ }
+ // Check for user session cookie here too
+ const userSession = getUserSessionCookie(req.headers.cookie);
+ if (!userSession) {
+ res.status(401).send('
Error
Unauthorized - please reconnect to login again
');
+ return;
+ }
+ // A real app might store this API key to be used later for the user.
+ console.log(`🔑 Received API key \x1b[32m${apiKey}\x1b[0m for session ${sessionId}`);
+ // If we have an elicitationId, complete the elicitation
+ completeURLElicitation(elicitationId);
+ // Send a success response
+ res.send(`
+
+
+
+ Success
+
+
+
+
+
Success ✓
+
API key received.
+
+
You can close this window and return to your MCP client.
+
+
+ `);
+});
+// Helper to get the user session from the demo_session cookie
+function getUserSessionCookie(cookieHeader) {
+ if (!cookieHeader)
+ return null;
+ const cookies = cookieHeader.split(';');
+ for (const cookie of cookies) {
+ const [name, value] = cookie.trim().split('=');
+ if (name === 'demo_session' && value) {
+ try {
+ return JSON.parse(decodeURIComponent(value));
+ }
+ catch (error) {
+ console.error('Failed to parse demo_session cookie:', error);
+ return null;
+ }
+ }
+ }
+ return null;
+}
+/**
+ * Payment Confirmation Form Handling
+ *
+ * This demonstrates how a server can use URL-mode elicitation to get user confirmation
+ * for sensitive operations like payment processing.
+ **/
+// Payment Confirmation Form endpoint - serves a simple HTML form
+app.get('/confirm-payment', (req, res) => {
+ const mcpSessionId = req.query.session;
+ const elicitationId = req.query.elicitation;
+ const cartId = req.query.cartId;
+ if (!mcpSessionId || !elicitationId) {
+ res.status(400).send('
Error
Missing required parameters
');
+ return;
+ }
+ // Check for user session cookie
+ // In production, this is often handled by some user auth middleware to ensure the user has a valid session
+ // This session is different from the MCP session.
+ // This userSession is the cookie that the MCP Server's Authorization Server sets for the user when they log in.
+ const userSession = getUserSessionCookie(req.headers.cookie);
+ if (!userSession) {
+ res.status(401).send('
Error
Unauthorized - please reconnect to login again
');
+ return;
+ }
+ // Serve a simple HTML form
+ res.send(`
+
+
+
+ Confirm Payment
+
+
+
+
Confirm Payment
+
✓ Logged in as: ${userSession.name}
+ ${cartId ? `
Cart ID: ${cartId}
` : ''}
+
+ ⚠️ Please review your order before confirming.
+
+
+
This is a demo showing how a server can securely get user confirmation for sensitive operations using URL-mode elicitation.
');
+ return;
+ }
+ // Check for user session cookie here too
+ const userSession = getUserSessionCookie(req.headers.cookie);
+ if (!userSession) {
+ res.status(401).send('
Error
Unauthorized - please reconnect to login again
');
+ return;
+ }
+ if (action === 'confirm') {
+ // A real app would process the payment here
+ console.log(`💳 Payment confirmed for cart ${cartId || 'unknown'} by user ${userSession.name} (session ${sessionId})`);
+ // Complete the elicitation
+ completeURLElicitation(elicitationId);
+ // Send a success response
+ res.send(`
+
+
+
+ Payment Confirmed
+
+
+
+
+
Payment Confirmed ✓
+
Your payment has been successfully processed.
+ ${cartId ? `
Cart ID: ${cartId}
` : ''}
+
+
You can close this window and return to your MCP client.
+
+
+ `);
+ }
+ else if (action === 'cancel') {
+ console.log(`💳 Payment cancelled for cart ${cartId || 'unknown'} by user ${userSession.name} (session ${sessionId})`);
+ // The client will still receive a notifications/elicitation/complete notification,
+ // which indicates that the out-of-band interaction is complete (but not necessarily successful)
+ completeURLElicitation(elicitationId);
+ res.send(`
+
+
+
+ Payment Cancelled
+
+
+
+
+
Payment Cancelled
+
Your payment has been cancelled.
+
+
You can close this window and return to your MCP client.
+
+
+ `);
+ }
+ else {
+ res.status(400).send('
Error
Invalid action
');
+ }
+});
+// Map to store transports by session ID
+const transports = {};
+const sessionsNeedingElicitation = {};
+// MCP POST endpoint
+const mcpPostHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ console.debug(`Received MCP POST for session: ${sessionId || 'unknown'}`);
+ try {
+ let transport;
+ if (sessionId && transports[sessionId]) {
+ // Reuse existing transport
+ transport = transports[sessionId];
+ }
+ else if (!sessionId && (0, types_js_1.isInitializeRequest)(req.body)) {
+ const server = getServer();
+ // New initialization request
+ const eventStore = new inMemoryEventStore_js_1.InMemoryEventStore();
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ eventStore, // Enable resumability
+ onsessioninitialized: sessionId => {
+ // Store the transport by session ID when session is initialized
+ // This avoids race conditions where requests might come in before the session is stored
+ console.log(`Session initialized with ID: ${sessionId}`);
+ transports[sessionId] = transport;
+ sessionsNeedingElicitation[sessionId] = {
+ elicitationSender: params => server.server.elicitInput(params),
+ createCompletionNotifier: elicitationId => server.server.createElicitationCompletionNotifier(elicitationId)
+ };
+ }
+ });
+ // Set up onclose handler to clean up transport when closed
+ transport.onclose = () => {
+ const sid = transport.sessionId;
+ if (sid && transports[sid]) {
+ console.log(`Transport closed for session ${sid}, removing from transports map`);
+ delete transports[sid];
+ delete sessionsNeedingElicitation[sid];
+ }
+ };
+ // Connect the transport to the MCP server BEFORE handling the request
+ // so responses can flow back through the same transport
+ await server.connect(transport);
+ await transport.handleRequest(req, res, req.body);
+ return; // Already handled
+ }
+ else {
+ // Invalid request - no session ID or not initialization request
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: No valid session ID provided'
+ },
+ id: null
+ });
+ return;
+ }
+ // Handle the request with existing transport - no need to reconnect
+ // The existing transport is already connected to the server
+ await transport.handleRequest(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32603,
+ message: 'Internal server error'
+ },
+ id: null
+ });
+ }
+ }
+};
+// Set up routes with auth middleware
+app.post('/mcp', authMiddleware, mcpPostHandler);
+// Handle GET requests for SSE streams (using built-in support from StreamableHTTP)
+const mcpGetHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ // Check for Last-Event-ID header for resumability
+ const lastEventId = req.headers['last-event-id'];
+ if (lastEventId) {
+ console.log(`Client reconnecting with Last-Event-ID: ${lastEventId}`);
+ }
+ else {
+ console.log(`Establishing new SSE stream for session ${sessionId}`);
+ }
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+ if (sessionsNeedingElicitation[sessionId]) {
+ const { elicitationSender, createCompletionNotifier } = sessionsNeedingElicitation[sessionId];
+ // Send an elicitation request to the client in the background
+ sendApiKeyElicitation(sessionId, elicitationSender, createCompletionNotifier)
+ .then(() => {
+ // Only delete on successful send for this demo
+ delete sessionsNeedingElicitation[sessionId];
+ console.log(`🔑 URL elicitation demo: Finished sending API key elicitation request for session ${sessionId}`);
+ })
+ .catch(error => {
+ console.error('Error sending API key elicitation:', error);
+ // Keep in map to potentially retry on next reconnect
+ });
+ }
+};
+// Set up GET route with conditional auth middleware
+app.get('/mcp', authMiddleware, mcpGetHandler);
+// Handle DELETE requests for session termination (according to MCP spec)
+const mcpDeleteHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ console.log(`Received session termination request for session ${sessionId}`);
+ try {
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+ }
+ catch (error) {
+ console.error('Error handling session termination:', error);
+ if (!res.headersSent) {
+ res.status(500).send('Error processing session termination');
+ }
+ }
+};
+// Set up DELETE route with auth middleware
+app.delete('/mcp', authMiddleware, mcpDeleteHandler);
+app.listen(MCP_PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`MCP Streamable HTTP Server listening on port ${MCP_PORT}`);
+});
+// Handle server shutdown
+process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ // Close all active transports to properly clean up resources
+ for (const sessionId in transports) {
+ try {
+ console.log(`Closing transport for session ${sessionId}`);
+ await transports[sessionId].close();
+ delete transports[sessionId];
+ delete sessionsNeedingElicitation[sessionId];
+ }
+ catch (error) {
+ console.error(`Error closing transport for session ${sessionId}:`, error);
+ }
+ }
+ console.log('Server shutdown complete');
+ process.exit(0);
+});
+//# sourceMappingURL=elicitationUrlExample.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js.map
new file mode 100644
index 0000000..a37e196
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"elicitationUrlExample.js","sourceRoot":"","sources":["../../../../src/examples/server/elicitationUrlExample.ts"],"names":[],"mappings":";AAAA,iEAAiE;AACjE,EAAE;AACF,2EAA2E;AAC3E,oDAAoD;AACpD,uFAAuF;AACvF,oCAAoC;AACpC,8FAA8F;AAC9F,kEAAkE;;;;;AAElE,sDAAqD;AACrD,6CAAyC;AACzC,6BAAwB;AACxB,gDAAgD;AAChD,wDAA8D;AAC9D,sEAA+E;AAC/E,2DAA0G;AAC1G,8EAA+E;AAC/E,6CAAwI;AACxI,2EAAqE;AACrE,iFAAiE;AAEjE,8DAAkE;AAElE,gDAAwB;AAExB,mDAAmD;AACnD,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,MAAM,SAAS,GAAG,IAAI,kBAAS,CAC3B;QACI,IAAI,EAAE,6BAA6B;QACnC,OAAO,EAAE,OAAO;KACnB,EACD;QACI,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;KAChC,CACJ,CAAC;IAEF,SAAS,CAAC,YAAY,CAClB,iBAAiB,EACjB;QACI,WAAW,EAAE,qDAAqD;QAClE,WAAW,EAAE;YACT,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;SAC/D;KACJ,EACD,K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AM,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE;IACzB,IAAI,KAAK,EAAE,CAAC;QACR,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,gDAAgD,QAAQ,EAAE,CAAC,CAAC;AAC5E,CAAC,CAAC,CAAC;AAEH,yBAAyB;AACzB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC5B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IAEvC,6DAA6D;IAC7D,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACjC,IAAI,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,iCAAiC,SAAS,EAAE,CAAC,CAAC;YAC1D,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC;YACpC,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC;YAC7B,OAAO,0BAA0B,CAAC,SAAS,CAAC,CAAC;QACjD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,uCAAuC,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9E,CAAC;IACL,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.d.ts
new file mode 100644
index 0000000..bc6abdd
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.d.ts
@@ -0,0 +1,10 @@
+/**
+ * Example MCP server using Hono with WebStandardStreamableHTTPServerTransport
+ *
+ * This example demonstrates using the Web Standard transport directly with Hono,
+ * which works on any runtime: Node.js, Cloudflare Workers, Deno, Bun, etc.
+ *
+ * Run with: npx tsx src/examples/server/honoWebStandardStreamableHttp.ts
+ */
+export {};
+//# sourceMappingURL=honoWebStandardStreamableHttp.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.d.ts.map
new file mode 100644
index 0000000..a6a6199
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"honoWebStandardStreamableHttp.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/honoWebStandardStreamableHttp.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.js
new file mode 100644
index 0000000..b45127e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.js
@@ -0,0 +1,85 @@
+"use strict";
+/**
+ * Example MCP server using Hono with WebStandardStreamableHTTPServerTransport
+ *
+ * This example demonstrates using the Web Standard transport directly with Hono,
+ * which works on any runtime: Node.js, Cloudflare Workers, Deno, Bun, etc.
+ *
+ * Run with: npx tsx src/examples/server/honoWebStandardStreamableHttp.ts
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const hono_1 = require("hono");
+const cors_1 = require("hono/cors");
+const node_server_1 = require("@hono/node-server");
+const z = __importStar(require("zod/v4"));
+const mcp_js_1 = require("../../server/mcp.js");
+const webStandardStreamableHttp_js_1 = require("../../server/webStandardStreamableHttp.js");
+// Factory function to create a new MCP server per request (stateless mode)
+const getServer = () => {
+ const server = new mcp_js_1.McpServer({
+ name: 'hono-webstandard-mcp-server',
+ version: '1.0.0'
+ });
+ // Register a simple greeting tool
+ server.registerTool('greet', {
+ title: 'Greeting Tool',
+ description: 'A simple greeting tool',
+ inputSchema: { name: z.string().describe('Name to greet') }
+ }, async ({ name }) => {
+ return {
+ content: [{ type: 'text', text: `Hello, ${name}! (from Hono + WebStandard transport)` }]
+ };
+ });
+ return server;
+};
+// Create the Hono app
+const app = new hono_1.Hono();
+// Enable CORS for all origins
+app.use('*', (0, cors_1.cors)({
+ origin: '*',
+ allowMethods: ['GET', 'POST', 'DELETE', 'OPTIONS'],
+ allowHeaders: ['Content-Type', 'mcp-session-id', 'Last-Event-ID', 'mcp-protocol-version'],
+ exposeHeaders: ['mcp-session-id', 'mcp-protocol-version']
+}));
+// Health check endpoint
+app.get('/health', c => c.json({ status: 'ok' }));
+// MCP endpoint - create a fresh transport and server per request (stateless)
+app.all('/mcp', async (c) => {
+ const transport = new webStandardStreamableHttp_js_1.WebStandardStreamableHTTPServerTransport();
+ const server = getServer();
+ await server.connect(transport);
+ return transport.handleRequest(c.req.raw);
+});
+// Start the server
+const PORT = process.env.MCP_PORT ? parseInt(process.env.MCP_PORT, 10) : 3000;
+console.log(`Starting Hono MCP server on port ${PORT}`);
+console.log(`Health check: http://localhost:${PORT}/health`);
+console.log(`MCP endpoint: http://localhost:${PORT}/mcp`);
+(0, node_server_1.serve)({
+ fetch: app.fetch,
+ port: PORT
+});
+//# sourceMappingURL=honoWebStandardStreamableHttp.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.js.map
new file mode 100644
index 0000000..8c23f27
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"honoWebStandardStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/server/honoWebStandardStreamableHttp.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+BAA4B;AAC5B,oCAAiC;AACjC,mDAA0C;AAC1C,0CAA4B;AAC5B,gDAAgD;AAChD,4FAAqG;AAGrG,2EAA2E;AAC3E,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC;QACzB,IAAI,EAAE,6BAA6B;QACnC,OAAO,EAAE,OAAO;KACnB,CAAC,CAAC;IAEH,kCAAkC;IAClC,MAAM,CAAC,YAAY,C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,CAAC,GAAG,CAAC,CAAC;AAC9C,CAAC,CAAC,CAAC;AAEH,mBAAmB;AACnB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAE9E,OAAO,CAAC,GAAG,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAC;AACxD,OAAO,CAAC,GAAG,CAAC,kCAAkC,IAAI,SAAS,CAAC,CAAC;AAC7D,OAAO,CAAC,GAAG,CAAC,kCAAkC,IAAI,MAAM,CAAC,CAAC;AAE1D,IAAA,mBAAK,EAAC;IACF,KAAK,EAAE,GAAG,CAAC,KAAK;IAChB,IAAI,EAAE,IAAI;CACb,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.d.ts
new file mode 100644
index 0000000..477fa6b
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=jsonResponseStreamableHttp.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.d.ts.map
new file mode 100644
index 0000000..ee8117e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"jsonResponseStreamableHttp.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/jsonResponseStreamableHttp.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js
new file mode 100644
index 0000000..ecd769b
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js
@@ -0,0 +1,171 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_crypto_1 = require("node:crypto");
+const mcp_js_1 = require("../../server/mcp.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const z = __importStar(require("zod/v4"));
+const types_js_1 = require("../../types.js");
+const express_js_1 = require("../../server/express.js");
+// Create an MCP server with implementation details
+const getServer = () => {
+ const server = new mcp_js_1.McpServer({
+ name: 'json-response-streamable-http-server',
+ version: '1.0.0'
+ }, {
+ capabilities: {
+ logging: {}
+ }
+ });
+ // Register a simple tool that returns a greeting
+ server.registerTool('greet', {
+ description: 'A simple greeting tool',
+ inputSchema: {
+ name: z.string().describe('Name to greet')
+ }
+ }, async ({ name }) => {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Hello, ${name}!`
+ }
+ ]
+ };
+ });
+ // Register a tool that sends multiple greetings with notifications
+ server.registerTool('multi-greet', {
+ description: 'A tool that sends different greetings with delays between them',
+ inputSchema: {
+ name: z.string().describe('Name to greet')
+ }
+ }, async ({ name }, extra) => {
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ await server.sendLoggingMessage({
+ level: 'debug',
+ data: `Starting multi-greet for ${name}`
+ }, extra.sessionId);
+ await sleep(1000); // Wait 1 second before first greeting
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Sending first greeting to ${name}`
+ }, extra.sessionId);
+ await sleep(1000); // Wait another second before second greeting
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Sending second greeting to ${name}`
+ }, extra.sessionId);
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Good morning, ${name}!`
+ }
+ ]
+ };
+ });
+ return server;
+};
+const app = (0, express_js_1.createMcpExpressApp)();
+// Map to store transports by session ID
+const transports = {};
+app.post('/mcp', async (req, res) => {
+ console.log('Received MCP request:', req.body);
+ try {
+ // Check for existing session ID
+ const sessionId = req.headers['mcp-session-id'];
+ let transport;
+ if (sessionId && transports[sessionId]) {
+ // Reuse existing transport
+ transport = transports[sessionId];
+ }
+ else if (!sessionId && (0, types_js_1.isInitializeRequest)(req.body)) {
+ // New initialization request - use JSON response mode
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ enableJsonResponse: true, // Enable JSON response mode
+ onsessioninitialized: sessionId => {
+ // Store the transport by session ID when session is initialized
+ // This avoids race conditions where requests might come in before the session is stored
+ console.log(`Session initialized with ID: ${sessionId}`);
+ transports[sessionId] = transport;
+ }
+ });
+ // Connect the transport to the MCP server BEFORE handling the request
+ const server = getServer();
+ await server.connect(transport);
+ await transport.handleRequest(req, res, req.body);
+ return; // Already handled
+ }
+ else {
+ // Invalid request - no session ID or not initialization request
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: No valid session ID provided'
+ },
+ id: null
+ });
+ return;
+ }
+ // Handle the request with existing transport - no need to reconnect
+ await transport.handleRequest(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32603,
+ message: 'Internal server error'
+ },
+ id: null
+ });
+ }
+ }
+});
+// Handle GET requests for SSE streams according to spec
+app.get('/mcp', async (req, res) => {
+ // Since this is a very simple example, we don't support GET requests for this server
+ // The spec requires returning 405 Method Not Allowed in this case
+ res.status(405).set('Allow', 'POST').send('Method Not Allowed');
+});
+// Start the server
+const PORT = 3000;
+app.listen(PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`MCP Streamable HTTP Server listening on port ${PORT}`);
+});
+// Handle server shutdown
+process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ process.exit(0);
+});
+//# sourceMappingURL=jsonResponseStreamableHttp.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js.map
new file mode 100644
index 0000000..dd8782c
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"jsonResponseStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/server/jsonResponseStreamableHttp.ts"],"names":[],"mappings":";;;;;;;;;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oBACZ,OAAO,EAAE,uBAAuB;iBACnC;gBACD,EAAE,EAAE,IAAI;aACX,CAAC,CAAC;QACP,CAAC;IACL,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,wDAAwD;AACxD,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,EAAE;IAClD,qFAAqF;IACrF,kEAAkE;IAClE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;AACpE,CAAC,CAAC,CAAC;AAEH,mBAAmB;AACnB,MAAM,IAAI,GAAG,IAAI,CAAC;AAClB,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;IACrB,IAAI,KAAK,EAAE,CAAC;QACR,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,gDAAgD,IAAI,EAAE,CAAC,CAAC;AACxE,CAAC,CAAC,CAAC;AAEH,yBAAyB;AACzB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC5B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.d.ts
new file mode 100644
index 0000000..a6cb497
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.d.ts
@@ -0,0 +1,7 @@
+#!/usr/bin/env node
+/**
+ * Example MCP server using the high-level McpServer API with outputSchema
+ * This demonstrates how to easily create tools with structured output
+ */
+export {};
+//# sourceMappingURL=mcpServerOutputSchema.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.d.ts.map
new file mode 100644
index 0000000..bd3abdc
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"mcpServerOutputSchema.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/mcpServerOutputSchema.ts"],"names":[],"mappings":";AACA;;;GAGG"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.js
new file mode 100644
index 0000000..4ac7e5c
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.js
@@ -0,0 +1,95 @@
+#!/usr/bin/env node
+"use strict";
+/**
+ * Example MCP server using the high-level McpServer API with outputSchema
+ * This demonstrates how to easily create tools with structured output
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const mcp_js_1 = require("../../server/mcp.js");
+const stdio_js_1 = require("../../server/stdio.js");
+const z = __importStar(require("zod/v4"));
+const server = new mcp_js_1.McpServer({
+ name: 'mcp-output-schema-high-level-example',
+ version: '1.0.0'
+});
+// Define a tool with structured output - Weather data
+server.registerTool('get_weather', {
+ description: 'Get weather information for a city',
+ inputSchema: {
+ city: z.string().describe('City name'),
+ country: z.string().describe('Country code (e.g., US, UK)')
+ },
+ outputSchema: {
+ temperature: z.object({
+ celsius: z.number(),
+ fahrenheit: z.number()
+ }),
+ conditions: z.enum(['sunny', 'cloudy', 'rainy', 'stormy', 'snowy']),
+ humidity: z.number().min(0).max(100),
+ wind: z.object({
+ speed_kmh: z.number(),
+ direction: z.string()
+ })
+ }
+}, async ({ city, country }) => {
+ // Parameters are available but not used in this example
+ void city;
+ void country;
+ // Simulate weather API call
+ const temp_c = Math.round((Math.random() * 35 - 5) * 10) / 10;
+ const conditions = ['sunny', 'cloudy', 'rainy', 'stormy', 'snowy'][Math.floor(Math.random() * 5)];
+ const structuredContent = {
+ temperature: {
+ celsius: temp_c,
+ fahrenheit: Math.round(((temp_c * 9) / 5 + 32) * 10) / 10
+ },
+ conditions,
+ humidity: Math.round(Math.random() * 100),
+ wind: {
+ speed_kmh: Math.round(Math.random() * 50),
+ direction: ['N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW'][Math.floor(Math.random() * 8)]
+ }
+ };
+ return {
+ content: [
+ {
+ type: 'text',
+ text: JSON.stringify(structuredContent, null, 2)
+ }
+ ],
+ structuredContent
+ };
+});
+async function main() {
+ const transport = new stdio_js_1.StdioServerTransport();
+ await server.connect(transport);
+ console.error('High-level Output Schema Example Server running on stdio');
+}
+main().catch(error => {
+ console.error('Server error:', error);
+ process.exit(1);
+});
+//# sourceMappingURL=mcpServerOutputSchema.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.js.map
new file mode 100644
index 0000000..ba0f8b2
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"mcpServerOutputSchema.js","sourceRoot":"","sources":["../../../../src/examples/server/mcpServerOutputSchema.ts"],"names":[],"mappings":";;AACA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAgD;AAChD,oDAA6D;AAC7D,0CAA4B;AAE5B,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC;IACzB,IAAI,EAAE,sCAAsC;IAC5C,OAAO,EAAE,OAAO;CACnB,CAAC,CAAC;AAEH,sDAAsD;AACtD,MAAM,CAAC,YAAY,CACf,aAAa,EACb;IACI,WAAW,EAAE,oCAAoC;IACjD,WAAW,EAAE;QACT,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC;QACtC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;KAC9D;IACD,YAAY,EAAE;QACV,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YAClB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;YACnB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;SACzB,CAAC;QACF,UAAU,EAAE,CAAC,CAAC,IAAI,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,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;SACzF;KACJ,CAAC;IAEF,OAAO;QACH,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC;aACnD;SACJ;QACD,iBAAiB;KACpB,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,KAAK,UAAU,IAAI;IACf,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;AAC9E,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.d.ts
new file mode 100644
index 0000000..1b97c20
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.d.ts
@@ -0,0 +1,12 @@
+/**
+ * Example: Progress notifications over stdio.
+ *
+ * Demonstrates a tool that reports progress to the client while processing.
+ *
+ * Run:
+ * npx tsx src/examples/server/progressExample.ts
+ *
+ * Then connect a client with an `onprogress` callback (see docs/protocol.md).
+ */
+export {};
+//# sourceMappingURL=progressExample.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.d.ts.map
new file mode 100644
index 0000000..590e57d
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"progressExample.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/progressExample.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.js
new file mode 100644
index 0000000..041f213
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.js
@@ -0,0 +1,49 @@
+"use strict";
+/**
+ * Example: Progress notifications over stdio.
+ *
+ * Demonstrates a tool that reports progress to the client while processing.
+ *
+ * Run:
+ * npx tsx src/examples/server/progressExample.ts
+ *
+ * Then connect a client with an `onprogress` callback (see docs/protocol.md).
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const mcp_js_1 = require("../../server/mcp.js");
+const stdio_js_1 = require("../../server/stdio.js");
+const zod_1 = require("zod");
+const server = new mcp_js_1.McpServer({ name: 'progress-example', version: '1.0.0' }, { capabilities: { logging: {} } });
+server.registerTool('count', {
+ description: 'Count to N with progress updates',
+ inputSchema: { n: zod_1.z.number().int().min(1).max(100) }
+}, async ({ n }, extra) => {
+ for (let i = 1; i <= n; i++) {
+ if (extra.signal.aborted) {
+ return { content: [{ type: 'text', text: `Cancelled at ${i}` }], isError: true };
+ }
+ if (extra._meta?.progressToken !== undefined) {
+ await extra.sendNotification({
+ method: 'notifications/progress',
+ params: {
+ progressToken: extra._meta.progressToken,
+ progress: i,
+ total: n,
+ message: `Counting: ${i}/${n}`
+ }
+ });
+ }
+ // Simulate work
+ await new Promise(resolve => setTimeout(resolve, 100));
+ }
+ return { content: [{ type: 'text', text: `Counted to ${n}` }] };
+});
+async function main() {
+ const transport = new stdio_js_1.StdioServerTransport();
+ await server.connect(transport);
+}
+main().catch(error => {
+ console.error('Server error:', error);
+ process.exit(1);
+});
+//# sourceMappingURL=progressExample.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.js.map
new file mode 100644
index 0000000..e8475e9
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"progressExample.js","sourceRoot":"","sources":["../../../../src/examples/server/progressExample.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;AAEH,gDAAgD;AAChD,oDAA6D;AAC7D,6BAAwB;AAExB,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAEhH,MAAM,CAAC,YAAY,CACf,OAAO,EACP;IACI,WAAW,EAAE,kCAAkC;IAC/C,WAAW,EAAE,EAAE,CAAC,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;CACvD,EACD,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC1B,IAAI,KA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accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.d.ts
new file mode 100644
index 0000000..4269b78
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=simpleSseServer.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.d.ts.map
new file mode 100644
index 0000000..08a1b45
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleSseServer.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/simpleSseServer.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.js
new file mode 100644
index 0000000..ed1efd5
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.js
@@ -0,0 +1,168 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const mcp_js_1 = require("../../server/mcp.js");
+const sse_js_1 = require("../../server/sse.js");
+const z = __importStar(require("zod/v4"));
+const express_js_1 = require("../../server/express.js");
+/**
+ * This example server demonstrates the deprecated HTTP+SSE transport
+ * (protocol version 2024-11-05). It mainly used for testing backward compatible clients.
+ *
+ * The server exposes two endpoints:
+ * - /mcp: For establishing the SSE stream (GET)
+ * - /messages: For receiving client messages (POST)
+ *
+ */
+// Create an MCP server instance
+const getServer = () => {
+ const server = new mcp_js_1.McpServer({
+ name: 'simple-sse-server',
+ version: '1.0.0'
+ }, { capabilities: { logging: {} } });
+ server.registerTool('start-notification-stream', {
+ description: 'Starts sending periodic notifications',
+ inputSchema: {
+ interval: z.number().describe('Interval in milliseconds between notifications').default(1000),
+ count: z.number().describe('Number of notifications to send').default(10)
+ }
+ }, async ({ interval, count }, extra) => {
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ let counter = 0;
+ // Send the initial notification
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Starting notification stream with ${count} messages every ${interval}ms`
+ }, extra.sessionId);
+ // Send periodic notifications
+ while (counter < count) {
+ counter++;
+ await sleep(interval);
+ try {
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Notification #${counter} at ${new Date().toISOString()}`
+ }, extra.sessionId);
+ }
+ catch (error) {
+ console.error('Error sending notification:', error);
+ }
+ }
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Completed sending ${count} notifications every ${interval}ms`
+ }
+ ]
+ };
+ });
+ return server;
+};
+const app = (0, express_js_1.createMcpExpressApp)();
+// Store transports by session ID
+const transports = {};
+// SSE endpoint for establishing the stream
+app.get('/mcp', async (req, res) => {
+ console.log('Received GET request to /sse (establishing SSE stream)');
+ try {
+ // Create a new SSE transport for the client
+ // The endpoint for POST messages is '/messages'
+ const transport = new sse_js_1.SSEServerTransport('/messages', res);
+ // Store the transport by session ID
+ const sessionId = transport.sessionId;
+ transports[sessionId] = transport;
+ // Set up onclose handler to clean up transport when closed
+ transport.onclose = () => {
+ console.log(`SSE transport closed for session ${sessionId}`);
+ delete transports[sessionId];
+ };
+ // Connect the transport to the MCP server
+ const server = getServer();
+ await server.connect(transport);
+ console.log(`Established SSE stream with session ID: ${sessionId}`);
+ }
+ catch (error) {
+ console.error('Error establishing SSE stream:', error);
+ if (!res.headersSent) {
+ res.status(500).send('Error establishing SSE stream');
+ }
+ }
+});
+// Messages endpoint for receiving client JSON-RPC requests
+app.post('/messages', async (req, res) => {
+ console.log('Received POST request to /messages');
+ // Extract session ID from URL query parameter
+ // In the SSE protocol, this is added by the client based on the endpoint event
+ const sessionId = req.query.sessionId;
+ if (!sessionId) {
+ console.error('No session ID provided in request URL');
+ res.status(400).send('Missing sessionId parameter');
+ return;
+ }
+ const transport = transports[sessionId];
+ if (!transport) {
+ console.error(`No active transport found for session ID: ${sessionId}`);
+ res.status(404).send('Session not found');
+ return;
+ }
+ try {
+ // Handle the POST message with the transport
+ await transport.handlePostMessage(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling request:', error);
+ if (!res.headersSent) {
+ res.status(500).send('Error handling request');
+ }
+ }
+});
+// Start the server
+const PORT = 3000;
+app.listen(PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`Simple SSE Server (deprecated protocol version 2024-11-05) listening on port ${PORT}`);
+});
+// Handle server shutdown
+process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ // Close all active transports to properly clean up resources
+ for (const sessionId in transports) {
+ try {
+ console.log(`Closing transport for session ${sessionId}`);
+ await transports[sessionId].close();
+ delete transports[sessionId];
+ }
+ catch (error) {
+ console.error(`Error closing transport for session ${sessionId}:`, error);
+ }
+ }
+ console.log('Server shutdown complete');
+ process.exit(0);
+});
+//# sourceMappingURL=simpleSseServer.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.js.map
new file mode 100644
index 0000000..e3a334c
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleSseServer.js","sourceRoot":"","sources":["../../../../src/examples/server/simpleSseServer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,gDAAgD;AAChD,gDAAyD;AACzD,0CAA4B;AAE5B,wDAA8D;AAE9D;;;;;;;;GAQG;AAEH,gCAAgC;AAChC,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,MAAM,MAAM,GAAG,IAAI,kBAAS,CACxB;QACI,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,OAAO;KACnB,EACD,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CACpC,CAAC;IAEF,MAAM,CAAC,YAAY,CACf,2BAA2B,EAC3B;QACI,WAAW,EAAE,uCAAuC;QACpD,WAAW,EAAE;YACT,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;YAC7F,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;SAC5E;KACJ,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,EAA2B,EAAE;QAC1D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AC;IAEvC,6DAA6D;IAC7D,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACjC,IAAI,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,iCAAiC,SAAS,EAAE,CAAC,CAAC;YAC1D,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC;YACpC,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,uCAAuC,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9E,CAAC;IACL,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.d.ts
new file mode 100644
index 0000000..0aa4ad2
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=simpleStatelessStreamableHttp.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.d.ts.map
new file mode 100644
index 0000000..92deb06
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleStatelessStreamableHttp.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/simpleStatelessStreamableHttp.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.js
new file mode 100644
index 0000000..87601ab
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.js
@@ -0,0 +1,166 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const mcp_js_1 = require("../../server/mcp.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const z = __importStar(require("zod/v4"));
+const express_js_1 = require("../../server/express.js");
+const getServer = () => {
+ // Create an MCP server with implementation details
+ const server = new mcp_js_1.McpServer({
+ name: 'stateless-streamable-http-server',
+ version: '1.0.0'
+ }, { capabilities: { logging: {} } });
+ // Register a simple prompt
+ server.registerPrompt('greeting-template', {
+ description: 'A simple greeting prompt template',
+ argsSchema: {
+ name: z.string().describe('Name to include in greeting')
+ }
+ }, async ({ name }) => {
+ return {
+ messages: [
+ {
+ role: 'user',
+ content: {
+ type: 'text',
+ text: `Please greet ${name} in a friendly manner.`
+ }
+ }
+ ]
+ };
+ });
+ // Register a tool specifically for testing resumability
+ server.registerTool('start-notification-stream', {
+ description: 'Starts sending periodic notifications for testing resumability',
+ inputSchema: {
+ interval: z.number().describe('Interval in milliseconds between notifications').default(100),
+ count: z.number().describe('Number of notifications to send (0 for 100)').default(10)
+ }
+ }, async ({ interval, count }, extra) => {
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ let counter = 0;
+ while (count === 0 || counter < count) {
+ counter++;
+ try {
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Periodic notification #${counter} at ${new Date().toISOString()}`
+ }, extra.sessionId);
+ }
+ catch (error) {
+ console.error('Error sending notification:', error);
+ }
+ // Wait for the specified interval
+ await sleep(interval);
+ }
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Started sending periodic notifications every ${interval}ms`
+ }
+ ]
+ };
+ });
+ // Create a simple resource at a fixed URI
+ server.registerResource('greeting-resource', 'https://example.com/greetings/default', { mimeType: 'text/plain' }, async () => {
+ return {
+ contents: [
+ {
+ uri: 'https://example.com/greetings/default',
+ text: 'Hello, world!'
+ }
+ ]
+ };
+ });
+ return server;
+};
+const app = (0, express_js_1.createMcpExpressApp)();
+app.post('/mcp', async (req, res) => {
+ const server = getServer();
+ try {
+ const transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: undefined
+ });
+ await server.connect(transport);
+ await transport.handleRequest(req, res, req.body);
+ res.on('close', () => {
+ console.log('Request closed');
+ transport.close();
+ server.close();
+ });
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32603,
+ message: 'Internal server error'
+ },
+ id: null
+ });
+ }
+ }
+});
+app.get('/mcp', async (req, res) => {
+ console.log('Received GET MCP request');
+ res.writeHead(405).end(JSON.stringify({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Method not allowed.'
+ },
+ id: null
+ }));
+});
+app.delete('/mcp', async (req, res) => {
+ console.log('Received DELETE MCP request');
+ res.writeHead(405).end(JSON.stringify({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Method not allowed.'
+ },
+ id: null
+ }));
+});
+// Start the server
+const PORT = 3000;
+app.listen(PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`MCP Stateless Streamable HTTP Server listening on port ${PORT}`);
+});
+// Handle server shutdown
+process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ process.exit(0);
+});
+//# sourceMappingURL=simpleStatelessStreamableHttp.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.js.map
new file mode 100644
index 0000000..e87774a
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleStatelessStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/server/simpleStatelessStreamableHttp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,gDAAgD;AAChD,sEAA+E;AAC/E,0CAA4B;AAE5B,wDAA8D;AAE9D,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,mDAAmD;IACnD,MAAM,MAAM,GAAG,IAAI,kBAAS,CACxB;QACI,IAAI,EAAE,kCAAkC;QACxC,OAAO,EAAE,OAAO;KACnB,EACD,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAA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C,KAAK;YACZ,OAAO,EAAE,qBAAqB;SACjC;QACD,EAAE,EAAE,IAAI;KACX,CAAC,CACL,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,mBAAmB;AACnB,MAAM,IAAI,GAAG,IAAI,CAAC;AAClB,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;IACrB,IAAI,KAAK,EAAE,CAAC;QACR,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,0DAA0D,IAAI,EAAE,CAAC,CAAC;AAClF,CAAC,CAAC,CAAC;AAEH,yBAAyB;AACzB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC5B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.d.ts
new file mode 100644
index 0000000..a20be42
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=simpleStreamableHttp.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.d.ts.map
new file mode 100644
index 0000000..e3cf042
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleStreamableHttp.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/simpleStreamableHttp.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js
new file mode 100644
index 0000000..5e79893
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js
@@ -0,0 +1,750 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_crypto_1 = require("node:crypto");
+const z = __importStar(require("zod/v4"));
+const mcp_js_1 = require("../../server/mcp.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const router_js_1 = require("../../server/auth/router.js");
+const bearerAuth_js_1 = require("../../server/auth/middleware/bearerAuth.js");
+const express_js_1 = require("../../server/express.js");
+const types_js_1 = require("../../types.js");
+const inMemoryEventStore_js_1 = require("../shared/inMemoryEventStore.js");
+const in_memory_js_1 = require("../../experimental/tasks/stores/in-memory.js");
+const demoInMemoryOAuthProvider_js_1 = require("./demoInMemoryOAuthProvider.js");
+const auth_utils_js_1 = require("../../shared/auth-utils.js");
+// Check for OAuth flag
+const useOAuth = process.argv.includes('--oauth');
+const strictOAuth = process.argv.includes('--oauth-strict');
+// Create shared task store for demonstration
+const taskStore = new in_memory_js_1.InMemoryTaskStore();
+// Create an MCP server with implementation details
+const getServer = () => {
+ const server = new mcp_js_1.McpServer({
+ name: 'simple-streamable-http-server',
+ version: '1.0.0',
+ icons: [{ src: './mcp.svg', sizes: ['512x512'], mimeType: 'image/svg+xml' }],
+ websiteUrl: 'https://github.com/modelcontextprotocol/typescript-sdk'
+ }, {
+ capabilities: { logging: {}, tasks: { requests: { tools: { call: {} } } } },
+ taskStore, // Enable task support
+ taskMessageQueue: new in_memory_js_1.InMemoryTaskMessageQueue()
+ });
+ // Register a simple tool that returns a greeting
+ server.registerTool('greet', {
+ title: 'Greeting Tool', // Display name for UI
+ description: 'A simple greeting tool',
+ inputSchema: {
+ name: z.string().describe('Name to greet')
+ }
+ }, async ({ name }) => {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Hello, ${name}!`
+ }
+ ]
+ };
+ });
+ // Register a tool that sends multiple greetings with notifications (with annotations)
+ server.registerTool('multi-greet', {
+ description: 'A tool that sends different greetings with delays between them',
+ inputSchema: {
+ name: z.string().describe('Name to greet')
+ },
+ annotations: {
+ title: 'Multiple Greeting Tool',
+ readOnlyHint: true,
+ openWorldHint: false
+ }
+ }, async ({ name }, extra) => {
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ await server.sendLoggingMessage({
+ level: 'debug',
+ data: `Starting multi-greet for ${name}`
+ }, extra.sessionId);
+ await sleep(1000); // Wait 1 second before first greeting
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Sending first greeting to ${name}`
+ }, extra.sessionId);
+ await sleep(1000); // Wait another second before second greeting
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Sending second greeting to ${name}`
+ }, extra.sessionId);
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Good morning, ${name}!`
+ }
+ ]
+ };
+ });
+ // Register a tool that demonstrates form elicitation (user input collection with a schema)
+ // This creates a closure that captures the server instance
+ server.registerTool('collect-user-info', {
+ description: 'A tool that collects user information through form elicitation',
+ inputSchema: {
+ infoType: z.enum(['contact', 'preferences', 'feedback']).describe('Type of information to collect')
+ }
+ }, async ({ infoType }, extra) => {
+ let message;
+ let requestedSchema;
+ switch (infoType) {
+ case 'contact':
+ message = 'Please provide your contact information';
+ requestedSchema = {
+ type: 'object',
+ properties: {
+ name: {
+ type: 'string',
+ title: 'Full Name',
+ description: 'Your full name'
+ },
+ email: {
+ type: 'string',
+ title: 'Email Address',
+ description: 'Your email address',
+ format: 'email'
+ },
+ phone: {
+ type: 'string',
+ title: 'Phone Number',
+ description: 'Your phone number (optional)'
+ }
+ },
+ required: ['name', 'email']
+ };
+ break;
+ case 'preferences':
+ message = 'Please set your preferences';
+ requestedSchema = {
+ type: 'object',
+ properties: {
+ theme: {
+ type: 'string',
+ title: 'Theme',
+ description: 'Choose your preferred theme',
+ enum: ['light', 'dark', 'auto'],
+ enumNames: ['Light', 'Dark', 'Auto']
+ },
+ notifications: {
+ type: 'boolean',
+ title: 'Enable Notifications',
+ description: 'Would you like to receive notifications?',
+ default: true
+ },
+ frequency: {
+ type: 'string',
+ title: 'Notification Frequency',
+ description: 'How often would you like notifications?',
+ enum: ['daily', 'weekly', 'monthly'],
+ enumNames: ['Daily', 'Weekly', 'Monthly']
+ }
+ },
+ required: ['theme']
+ };
+ break;
+ case 'feedback':
+ message = 'Please provide your feedback';
+ requestedSchema = {
+ type: 'object',
+ properties: {
+ rating: {
+ type: 'integer',
+ title: 'Rating',
+ description: 'Rate your experience (1-5)',
+ minimum: 1,
+ maximum: 5
+ },
+ comments: {
+ type: 'string',
+ title: 'Comments',
+ description: 'Additional comments (optional)',
+ maxLength: 500
+ },
+ recommend: {
+ type: 'boolean',
+ title: 'Would you recommend this?',
+ description: 'Would you recommend this to others?'
+ }
+ },
+ required: ['rating', 'recommend']
+ };
+ break;
+ default:
+ throw new Error(`Unknown info type: ${infoType}`);
+ }
+ try {
+ // Use sendRequest through the extra parameter to elicit input
+ const result = await extra.sendRequest({
+ method: 'elicitation/create',
+ params: {
+ mode: 'form',
+ message,
+ requestedSchema
+ }
+ }, types_js_1.ElicitResultSchema);
+ if (result.action === 'accept') {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Thank you! Collected ${infoType} information: ${JSON.stringify(result.content, null, 2)}`
+ }
+ ]
+ };
+ }
+ else if (result.action === 'decline') {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `No information was collected. User declined ${infoType} information request.`
+ }
+ ]
+ };
+ }
+ else {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Information collection was cancelled by the user.`
+ }
+ ]
+ };
+ }
+ }
+ catch (error) {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Error collecting ${infoType} information: ${error}`
+ }
+ ]
+ };
+ }
+ });
+ // Register a tool that demonstrates bidirectional task support:
+ // Server creates a task, then elicits input from client using elicitInputStream
+ // Using the experimental tasks API - WARNING: may change without notice
+ server.experimental.tasks.registerToolTask('collect-user-info-task', {
+ title: 'Collect Info with Task',
+ description: 'Collects user info via elicitation with task support using elicitInputStream',
+ inputSchema: {
+ infoType: z.enum(['contact', 'preferences']).describe('Type of information to collect').default('contact')
+ }
+ }, {
+ async createTask({ infoType }, { taskStore: createTaskStore, taskRequestedTtl }) {
+ // Create the server-side task
+ const task = await createTaskStore.createTask({
+ ttl: taskRequestedTtl
+ });
+ // Perform async work that makes a nested elicitation request using elicitInputStream
+ (async () => {
+ try {
+ const message = infoType === 'contact' ? 'Please provide your contact information' : 'Please set your preferences';
+ // Define schemas with proper typing for PrimitiveSchemaDefinition
+ const contactSchema = {
+ type: 'object',
+ properties: {
+ name: { type: 'string', title: 'Full Name', description: 'Your full name' },
+ email: { type: 'string', title: 'Email', description: 'Your email address' }
+ },
+ required: ['name', 'email']
+ };
+ const preferencesSchema = {
+ type: 'object',
+ properties: {
+ theme: { type: 'string', title: 'Theme', enum: ['light', 'dark', 'auto'] },
+ notifications: { type: 'boolean', title: 'Enable Notifications', default: true }
+ },
+ required: ['theme']
+ };
+ const requestedSchema = infoType === 'contact' ? contactSchema : preferencesSchema;
+ // Use elicitInputStream to elicit input from client
+ // This demonstrates the streaming elicitation API
+ // Access via server.server to get the underlying Server instance
+ const stream = server.server.experimental.tasks.elicitInputStream({
+ mode: 'form',
+ message,
+ requestedSchema
+ });
+ let elicitResult;
+ for await (const msg of stream) {
+ if (msg.type === 'result') {
+ elicitResult = msg.result;
+ }
+ else if (msg.type === 'error') {
+ throw msg.error;
+ }
+ }
+ if (!elicitResult) {
+ throw new Error('No result received from elicitation');
+ }
+ let resultText;
+ if (elicitResult.action === 'accept') {
+ resultText = `Collected ${infoType} info: ${JSON.stringify(elicitResult.content, null, 2)}`;
+ }
+ else if (elicitResult.action === 'decline') {
+ resultText = `User declined to provide ${infoType} information`;
+ }
+ else {
+ resultText = 'User cancelled the request';
+ }
+ await taskStore.storeTaskResult(task.taskId, 'completed', {
+ content: [{ type: 'text', text: resultText }]
+ });
+ }
+ catch (error) {
+ console.error('Error in collect-user-info-task:', error);
+ await taskStore.storeTaskResult(task.taskId, 'failed', {
+ content: [{ type: 'text', text: `Error: ${error}` }],
+ isError: true
+ });
+ }
+ })();
+ return { task };
+ },
+ async getTask(_args, { taskId, taskStore: getTaskStore }) {
+ return await getTaskStore.getTask(taskId);
+ },
+ async getTaskResult(_args, { taskId, taskStore: getResultTaskStore }) {
+ const result = await getResultTaskStore.getTaskResult(taskId);
+ return result;
+ }
+ });
+ // Register a simple prompt with title
+ server.registerPrompt('greeting-template', {
+ title: 'Greeting Template', // Display name for UI
+ description: 'A simple greeting prompt template',
+ argsSchema: {
+ name: z.string().describe('Name to include in greeting')
+ }
+ }, async ({ name }) => {
+ return {
+ messages: [
+ {
+ role: 'user',
+ content: {
+ type: 'text',
+ text: `Please greet ${name} in a friendly manner.`
+ }
+ }
+ ]
+ };
+ });
+ // Register a tool specifically for testing resumability
+ server.registerTool('start-notification-stream', {
+ description: 'Starts sending periodic notifications for testing resumability',
+ inputSchema: {
+ interval: z.number().describe('Interval in milliseconds between notifications').default(100),
+ count: z.number().describe('Number of notifications to send (0 for 100)').default(50)
+ }
+ }, async ({ interval, count }, extra) => {
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ let counter = 0;
+ while (count === 0 || counter < count) {
+ counter++;
+ try {
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Periodic notification #${counter} at ${new Date().toISOString()}`
+ }, extra.sessionId);
+ }
+ catch (error) {
+ console.error('Error sending notification:', error);
+ }
+ // Wait for the specified interval
+ await sleep(interval);
+ }
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Started sending periodic notifications every ${interval}ms`
+ }
+ ]
+ };
+ });
+ // Create a simple resource at a fixed URI
+ server.registerResource('greeting-resource', 'https://example.com/greetings/default', {
+ title: 'Default Greeting', // Display name for UI
+ description: 'A simple greeting resource',
+ mimeType: 'text/plain'
+ }, async () => {
+ return {
+ contents: [
+ {
+ uri: 'https://example.com/greetings/default',
+ text: 'Hello, world!'
+ }
+ ]
+ };
+ });
+ // Create additional resources for ResourceLink demonstration
+ server.registerResource('example-file-1', 'file:///example/file1.txt', {
+ title: 'Example File 1',
+ description: 'First example file for ResourceLink demonstration',
+ mimeType: 'text/plain'
+ }, async () => {
+ return {
+ contents: [
+ {
+ uri: 'file:///example/file1.txt',
+ text: 'This is the content of file 1'
+ }
+ ]
+ };
+ });
+ server.registerResource('example-file-2', 'file:///example/file2.txt', {
+ title: 'Example File 2',
+ description: 'Second example file for ResourceLink demonstration',
+ mimeType: 'text/plain'
+ }, async () => {
+ return {
+ contents: [
+ {
+ uri: 'file:///example/file2.txt',
+ text: 'This is the content of file 2'
+ }
+ ]
+ };
+ });
+ // Register a tool that returns ResourceLinks
+ server.registerTool('list-files', {
+ title: 'List Files with ResourceLinks',
+ description: 'Returns a list of files as ResourceLinks without embedding their content',
+ inputSchema: {
+ includeDescriptions: z.boolean().optional().describe('Whether to include descriptions in the resource links')
+ }
+ }, async ({ includeDescriptions = true }) => {
+ const resourceLinks = [
+ {
+ type: 'resource_link',
+ uri: 'https://example.com/greetings/default',
+ name: 'Default Greeting',
+ mimeType: 'text/plain',
+ ...(includeDescriptions && { description: 'A simple greeting resource' })
+ },
+ {
+ type: 'resource_link',
+ uri: 'file:///example/file1.txt',
+ name: 'Example File 1',
+ mimeType: 'text/plain',
+ ...(includeDescriptions && { description: 'First example file for ResourceLink demonstration' })
+ },
+ {
+ type: 'resource_link',
+ uri: 'file:///example/file2.txt',
+ name: 'Example File 2',
+ mimeType: 'text/plain',
+ ...(includeDescriptions && { description: 'Second example file for ResourceLink demonstration' })
+ }
+ ];
+ return {
+ content: [
+ {
+ type: 'text',
+ text: 'Here are the available files as resource links:'
+ },
+ ...resourceLinks,
+ {
+ type: 'text',
+ text: '\nYou can read any of these resources using their URI.'
+ }
+ ]
+ };
+ });
+ // Register a long-running tool that demonstrates task execution
+ // Using the experimental tasks API - WARNING: may change without notice
+ server.experimental.tasks.registerToolTask('delay', {
+ title: 'Delay',
+ description: 'A simple tool that delays for a specified duration, useful for testing task execution',
+ inputSchema: {
+ duration: z.number().describe('Duration in milliseconds').default(5000)
+ }
+ }, {
+ async createTask({ duration }, { taskStore, taskRequestedTtl }) {
+ // Create the task
+ const task = await taskStore.createTask({
+ ttl: taskRequestedTtl
+ });
+ // Simulate out-of-band work
+ (async () => {
+ await new Promise(resolve => setTimeout(resolve, duration));
+ await taskStore.storeTaskResult(task.taskId, 'completed', {
+ content: [
+ {
+ type: 'text',
+ text: `Completed ${duration}ms delay`
+ }
+ ]
+ });
+ })();
+ // Return CreateTaskResult with the created task
+ return {
+ task
+ };
+ },
+ async getTask(_args, { taskId, taskStore }) {
+ return await taskStore.getTask(taskId);
+ },
+ async getTaskResult(_args, { taskId, taskStore }) {
+ const result = await taskStore.getTaskResult(taskId);
+ return result;
+ }
+ });
+ return server;
+};
+const MCP_PORT = process.env.MCP_PORT ? parseInt(process.env.MCP_PORT, 10) : 3000;
+const AUTH_PORT = process.env.MCP_AUTH_PORT ? parseInt(process.env.MCP_AUTH_PORT, 10) : 3001;
+const app = (0, express_js_1.createMcpExpressApp)();
+// Set up OAuth if enabled
+let authMiddleware = null;
+if (useOAuth) {
+ // Create auth middleware for MCP endpoints
+ const mcpServerUrl = new URL(`http://localhost:${MCP_PORT}/mcp`);
+ const authServerUrl = new URL(`http://localhost:${AUTH_PORT}`);
+ const oauthMetadata = (0, demoInMemoryOAuthProvider_js_1.setupAuthServer)({ authServerUrl, mcpServerUrl, strictResource: strictOAuth });
+ const tokenVerifier = {
+ verifyAccessToken: async (token) => {
+ const endpoint = oauthMetadata.introspection_endpoint;
+ if (!endpoint) {
+ throw new Error('No token verification endpoint available in metadata');
+ }
+ const response = await fetch(endpoint, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded'
+ },
+ body: new URLSearchParams({
+ token: token
+ }).toString()
+ });
+ if (!response.ok) {
+ const text = await response.text().catch(() => null);
+ throw new Error(`Invalid or expired token: ${text}`);
+ }
+ const data = await response.json();
+ if (strictOAuth) {
+ if (!data.aud) {
+ throw new Error(`Resource Indicator (RFC8707) missing`);
+ }
+ if (!(0, auth_utils_js_1.checkResourceAllowed)({ requestedResource: data.aud, configuredResource: mcpServerUrl })) {
+ throw new Error(`Expected resource indicator ${mcpServerUrl}, got: ${data.aud}`);
+ }
+ }
+ // Convert the response to AuthInfo format
+ return {
+ token,
+ clientId: data.client_id,
+ scopes: data.scope ? data.scope.split(' ') : [],
+ expiresAt: data.exp
+ };
+ }
+ };
+ // Add metadata routes to the main MCP server
+ app.use((0, router_js_1.mcpAuthMetadataRouter)({
+ oauthMetadata,
+ resourceServerUrl: mcpServerUrl,
+ scopesSupported: ['mcp:tools'],
+ resourceName: 'MCP Demo Server'
+ }));
+ authMiddleware = (0, bearerAuth_js_1.requireBearerAuth)({
+ verifier: tokenVerifier,
+ requiredScopes: [],
+ resourceMetadataUrl: (0, router_js_1.getOAuthProtectedResourceMetadataUrl)(mcpServerUrl)
+ });
+}
+// Map to store transports by session ID
+const transports = {};
+// MCP POST endpoint with optional auth
+const mcpPostHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (sessionId) {
+ console.log(`Received MCP request for session: ${sessionId}`);
+ }
+ else {
+ console.log('Request body:', req.body);
+ }
+ if (useOAuth && req.auth) {
+ console.log('Authenticated user:', req.auth);
+ }
+ try {
+ let transport;
+ if (sessionId && transports[sessionId]) {
+ // Reuse existing transport
+ transport = transports[sessionId];
+ }
+ else if (!sessionId && (0, types_js_1.isInitializeRequest)(req.body)) {
+ // New initialization request
+ const eventStore = new inMemoryEventStore_js_1.InMemoryEventStore();
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ eventStore, // Enable resumability
+ onsessioninitialized: sessionId => {
+ // Store the transport by session ID when session is initialized
+ // This avoids race conditions where requests might come in before the session is stored
+ console.log(`Session initialized with ID: ${sessionId}`);
+ transports[sessionId] = transport;
+ }
+ });
+ // Set up onclose handler to clean up transport when closed
+ transport.onclose = () => {
+ const sid = transport.sessionId;
+ if (sid && transports[sid]) {
+ console.log(`Transport closed for session ${sid}, removing from transports map`);
+ delete transports[sid];
+ }
+ };
+ // Connect the transport to the MCP server BEFORE handling the request
+ // so responses can flow back through the same transport
+ const server = getServer();
+ await server.connect(transport);
+ await transport.handleRequest(req, res, req.body);
+ return; // Already handled
+ }
+ else {
+ // Invalid request - no session ID or not initialization request
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: No valid session ID provided'
+ },
+ id: null
+ });
+ return;
+ }
+ // Handle the request with existing transport - no need to reconnect
+ // The existing transport is already connected to the server
+ await transport.handleRequest(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32603,
+ message: 'Internal server error'
+ },
+ id: null
+ });
+ }
+ }
+};
+// Set up routes with conditional auth middleware
+if (useOAuth && authMiddleware) {
+ app.post('/mcp', authMiddleware, mcpPostHandler);
+}
+else {
+ app.post('/mcp', mcpPostHandler);
+}
+// Handle GET requests for SSE streams (using built-in support from StreamableHTTP)
+const mcpGetHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ if (useOAuth && req.auth) {
+ console.log('Authenticated SSE connection from user:', req.auth);
+ }
+ // Check for Last-Event-ID header for resumability
+ const lastEventId = req.headers['last-event-id'];
+ if (lastEventId) {
+ console.log(`Client reconnecting with Last-Event-ID: ${lastEventId}`);
+ }
+ else {
+ console.log(`Establishing new SSE stream for session ${sessionId}`);
+ }
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+};
+// Set up GET route with conditional auth middleware
+if (useOAuth && authMiddleware) {
+ app.get('/mcp', authMiddleware, mcpGetHandler);
+}
+else {
+ app.get('/mcp', mcpGetHandler);
+}
+// Handle DELETE requests for session termination (according to MCP spec)
+const mcpDeleteHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ console.log(`Received session termination request for session ${sessionId}`);
+ try {
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+ }
+ catch (error) {
+ console.error('Error handling session termination:', error);
+ if (!res.headersSent) {
+ res.status(500).send('Error processing session termination');
+ }
+ }
+};
+// Set up DELETE route with conditional auth middleware
+if (useOAuth && authMiddleware) {
+ app.delete('/mcp', authMiddleware, mcpDeleteHandler);
+}
+else {
+ app.delete('/mcp', mcpDeleteHandler);
+}
+app.listen(MCP_PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`MCP Streamable HTTP Server listening on port ${MCP_PORT}`);
+});
+// Handle server shutdown
+process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ // Close all active transports to properly clean up resources
+ for (const sessionId in transports) {
+ try {
+ console.log(`Closing transport for session ${sessionId}`);
+ await transports[sessionId].close();
+ delete transports[sessionId];
+ }
+ catch (error) {
+ console.error(`Error closing transport for session ${sessionId}:`, error);
+ }
+ }
+ console.log('Server shutdown complete');
+ process.exit(0);
+});
+//# sourceMappingURL=simpleStreamableHttp.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js.map
new file mode 100644
index 0000000..64486a8
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/server/simpleStreamableHttp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAyC;AACzC,0CAA4B;AAC5B,gDAAgD;AAChD,sEAA+E;AAC/E,2DAA0G;AAC1G,8EAA+E;AAC/E,wDAA8D;AAC9D,6CASwB;AACxB,2EAAqE;AACrE,+EAA2G;AAC3G,iFAAiE;AAEjE,8DAAkE;AAElE,uBAAuB;AACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAClD,MAAM,WA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,CAAC,yBAAyB,CAAC,CAAC;IAEvC,6DAA6D;IAC7D,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACjC,IAAI,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,iCAAiC,SAAS,EAAE,CAAC,CAAC;YAC1D,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC;YACpC,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,uCAAuC,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9E,CAAC;IACL,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.d.ts
new file mode 100644
index 0000000..661c9f0
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.d.ts
@@ -0,0 +1,12 @@
+/**
+ * Simple interactive task server demonstrating elicitation and sampling.
+ *
+ * This server demonstrates the task message queue pattern from the MCP Tasks spec:
+ * - confirm_delete: Uses elicitation to ask the user for confirmation
+ * - write_haiku: Uses sampling to request an LLM to generate content
+ *
+ * Both tools use the "call-now, fetch-later" pattern where the initial call
+ * creates a task, and the result is fetched via tasks/result endpoint.
+ */
+export {};
+//# sourceMappingURL=simpleTaskInteractive.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.d.ts.map
new file mode 100644
index 0000000..3e48b9e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleTaskInteractive.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/simpleTaskInteractive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js
new file mode 100644
index 0000000..cd95140
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js
@@ -0,0 +1,600 @@
+"use strict";
+/**
+ * Simple interactive task server demonstrating elicitation and sampling.
+ *
+ * This server demonstrates the task message queue pattern from the MCP Tasks spec:
+ * - confirm_delete: Uses elicitation to ask the user for confirmation
+ * - write_haiku: Uses sampling to request an LLM to generate content
+ *
+ * Both tools use the "call-now, fetch-later" pattern where the initial call
+ * creates a task, and the result is fetched via tasks/result endpoint.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_crypto_1 = require("node:crypto");
+const index_js_1 = require("../../server/index.js");
+const express_js_1 = require("../../server/express.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const types_js_1 = require("../../types.js");
+const interfaces_js_1 = require("../../experimental/tasks/interfaces.js");
+const in_memory_js_1 = require("../../experimental/tasks/stores/in-memory.js");
+// ============================================================================
+// Resolver - Promise-like for passing results between async operations
+// ============================================================================
+class Resolver {
+ constructor() {
+ this._done = false;
+ this._promise = new Promise((resolve, reject) => {
+ this._resolve = resolve;
+ this._reject = reject;
+ });
+ }
+ setResult(value) {
+ if (this._done)
+ return;
+ this._done = true;
+ this._resolve(value);
+ }
+ setException(error) {
+ if (this._done)
+ return;
+ this._done = true;
+ this._reject(error);
+ }
+ wait() {
+ return this._promise;
+ }
+ done() {
+ return this._done;
+ }
+}
+class TaskMessageQueueWithResolvers {
+ constructor() {
+ this.queues = new Map();
+ this.waitResolvers = new Map();
+ }
+ getQueue(taskId) {
+ let queue = this.queues.get(taskId);
+ if (!queue) {
+ queue = [];
+ this.queues.set(taskId, queue);
+ }
+ return queue;
+ }
+ async enqueue(taskId, message, _sessionId, maxSize) {
+ const queue = this.getQueue(taskId);
+ if (maxSize !== undefined && queue.length >= maxSize) {
+ throw new Error(`Task message queue overflow: queue size (${queue.length}) exceeds maximum (${maxSize})`);
+ }
+ queue.push(message);
+ // Notify any waiters
+ this.notifyWaiters(taskId);
+ }
+ async enqueueWithResolver(taskId, message, resolver, originalRequestId) {
+ const queue = this.getQueue(taskId);
+ const queuedMessage = {
+ type: 'request',
+ message,
+ timestamp: Date.now(),
+ resolver,
+ originalRequestId
+ };
+ queue.push(queuedMessage);
+ this.notifyWaiters(taskId);
+ }
+ async dequeue(taskId, _sessionId) {
+ const queue = this.getQueue(taskId);
+ return queue.shift();
+ }
+ async dequeueAll(taskId, _sessionId) {
+ const queue = this.queues.get(taskId) ?? [];
+ this.queues.delete(taskId);
+ return queue;
+ }
+ async waitForMessage(taskId) {
+ // Check if there are already messages
+ const queue = this.getQueue(taskId);
+ if (queue.length > 0)
+ return;
+ // Wait for a message to be added
+ return new Promise(resolve => {
+ let waiters = this.waitResolvers.get(taskId);
+ if (!waiters) {
+ waiters = [];
+ this.waitResolvers.set(taskId, waiters);
+ }
+ waiters.push(resolve);
+ });
+ }
+ notifyWaiters(taskId) {
+ const waiters = this.waitResolvers.get(taskId);
+ if (waiters) {
+ this.waitResolvers.delete(taskId);
+ for (const resolve of waiters) {
+ resolve();
+ }
+ }
+ }
+ cleanup() {
+ this.queues.clear();
+ this.waitResolvers.clear();
+ }
+}
+// ============================================================================
+// Extended task store with wait functionality
+// ============================================================================
+class TaskStoreWithNotifications extends in_memory_js_1.InMemoryTaskStore {
+ constructor() {
+ super(...arguments);
+ this.updateResolvers = new Map();
+ }
+ async updateTaskStatus(taskId, status, statusMessage, sessionId) {
+ await super.updateTaskStatus(taskId, status, statusMessage, sessionId);
+ this.notifyUpdate(taskId);
+ }
+ async storeTaskResult(taskId, status, result, sessionId) {
+ await super.storeTaskResult(taskId, status, result, sessionId);
+ this.notifyUpdate(taskId);
+ }
+ async waitForUpdate(taskId) {
+ return new Promise(resolve => {
+ let waiters = this.updateResolvers.get(taskId);
+ if (!waiters) {
+ waiters = [];
+ this.updateResolvers.set(taskId, waiters);
+ }
+ waiters.push(resolve);
+ });
+ }
+ notifyUpdate(taskId) {
+ const waiters = this.updateResolvers.get(taskId);
+ if (waiters) {
+ this.updateResolvers.delete(taskId);
+ for (const resolve of waiters) {
+ resolve();
+ }
+ }
+ }
+}
+// ============================================================================
+// Task Result Handler - delivers queued messages and routes responses
+// ============================================================================
+class TaskResultHandler {
+ constructor(store, queue) {
+ this.store = store;
+ this.queue = queue;
+ this.pendingRequests = new Map();
+ }
+ async handle(taskId, server, _sessionId) {
+ while (true) {
+ // Get fresh task state
+ const task = await this.store.getTask(taskId);
+ if (!task) {
+ throw new Error(`Task not found: ${taskId}`);
+ }
+ // Dequeue and send all pending messages
+ await this.deliverQueuedMessages(taskId, server, _sessionId);
+ // If task is terminal, return result
+ if ((0, interfaces_js_1.isTerminal)(task.status)) {
+ const result = await this.store.getTaskResult(taskId);
+ // Add related-task metadata per spec
+ return {
+ ...result,
+ _meta: {
+ ...(result._meta || {}),
+ [types_js_1.RELATED_TASK_META_KEY]: { taskId }
+ }
+ };
+ }
+ // Wait for task update or new message
+ await this.waitForUpdate(taskId);
+ }
+ }
+ async deliverQueuedMessages(taskId, server, _sessionId) {
+ while (true) {
+ const message = await this.queue.dequeue(taskId);
+ if (!message)
+ break;
+ console.log(`[Server] Delivering queued ${message.type} message for task ${taskId}`);
+ if (message.type === 'request') {
+ const reqMessage = message;
+ // Send the request via the server
+ // Store the resolver so we can route the response back
+ if (reqMessage.resolver && reqMessage.originalRequestId) {
+ this.pendingRequests.set(reqMessage.originalRequestId, reqMessage.resolver);
+ }
+ // Send the message - for elicitation/sampling, we use the server's methods
+ // But since we're in tasks/result context, we need to send via transport
+ // This is simplified - in production you'd use proper message routing
+ try {
+ const request = reqMessage.message;
+ let response;
+ if (request.method === 'elicitation/create') {
+ // Send elicitation request to client
+ const params = request.params;
+ response = await server.elicitInput(params);
+ }
+ else if (request.method === 'sampling/createMessage') {
+ // Send sampling request to client
+ const params = request.params;
+ response = await server.createMessage(params);
+ }
+ else {
+ throw new Error(`Unknown request method: ${request.method}`);
+ }
+ // Route response back to resolver
+ if (reqMessage.resolver) {
+ reqMessage.resolver.setResult(response);
+ }
+ }
+ catch (error) {
+ if (reqMessage.resolver) {
+ reqMessage.resolver.setException(error instanceof Error ? error : new Error(String(error)));
+ }
+ }
+ }
+ // For notifications, we'd send them too but this example focuses on requests
+ }
+ }
+ async waitForUpdate(taskId) {
+ // Race between store update and queue message
+ await Promise.race([this.store.waitForUpdate(taskId), this.queue.waitForMessage(taskId)]);
+ }
+ routeResponse(requestId, response) {
+ const resolver = this.pendingRequests.get(requestId);
+ if (resolver && !resolver.done()) {
+ this.pendingRequests.delete(requestId);
+ resolver.setResult(response);
+ return true;
+ }
+ return false;
+ }
+ routeError(requestId, error) {
+ const resolver = this.pendingRequests.get(requestId);
+ if (resolver && !resolver.done()) {
+ this.pendingRequests.delete(requestId);
+ resolver.setException(error);
+ return true;
+ }
+ return false;
+ }
+}
+// ============================================================================
+// Task Session - wraps server to enqueue requests during task execution
+// ============================================================================
+class TaskSession {
+ constructor(server, taskId, store, queue) {
+ this.server = server;
+ this.taskId = taskId;
+ this.store = store;
+ this.queue = queue;
+ this.requestCounter = 0;
+ }
+ nextRequestId() {
+ return `task-${this.taskId}-${++this.requestCounter}`;
+ }
+ async elicit(message, requestedSchema) {
+ // Update task status to input_required
+ await this.store.updateTaskStatus(this.taskId, 'input_required');
+ const requestId = this.nextRequestId();
+ // Build the elicitation request with related-task metadata
+ const params = {
+ message,
+ requestedSchema,
+ mode: 'form',
+ _meta: {
+ [types_js_1.RELATED_TASK_META_KEY]: { taskId: this.taskId }
+ }
+ };
+ const jsonrpcRequest = {
+ jsonrpc: '2.0',
+ id: requestId,
+ method: 'elicitation/create',
+ params
+ };
+ // Create resolver to wait for response
+ const resolver = new Resolver();
+ // Enqueue the request
+ await this.queue.enqueueWithResolver(this.taskId, jsonrpcRequest, resolver, requestId);
+ try {
+ // Wait for response
+ const response = await resolver.wait();
+ // Update status back to working
+ await this.store.updateTaskStatus(this.taskId, 'working');
+ return response;
+ }
+ catch (error) {
+ await this.store.updateTaskStatus(this.taskId, 'working');
+ throw error;
+ }
+ }
+ async createMessage(messages, maxTokens) {
+ // Update task status to input_required
+ await this.store.updateTaskStatus(this.taskId, 'input_required');
+ const requestId = this.nextRequestId();
+ // Build the sampling request with related-task metadata
+ const params = {
+ messages,
+ maxTokens,
+ _meta: {
+ [types_js_1.RELATED_TASK_META_KEY]: { taskId: this.taskId }
+ }
+ };
+ const jsonrpcRequest = {
+ jsonrpc: '2.0',
+ id: requestId,
+ method: 'sampling/createMessage',
+ params
+ };
+ // Create resolver to wait for response
+ const resolver = new Resolver();
+ // Enqueue the request
+ await this.queue.enqueueWithResolver(this.taskId, jsonrpcRequest, resolver, requestId);
+ try {
+ // Wait for response
+ const response = await resolver.wait();
+ // Update status back to working
+ await this.store.updateTaskStatus(this.taskId, 'working');
+ return response;
+ }
+ catch (error) {
+ await this.store.updateTaskStatus(this.taskId, 'working');
+ throw error;
+ }
+ }
+}
+// ============================================================================
+// Server Setup
+// ============================================================================
+const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 8000;
+// Create shared stores
+const taskStore = new TaskStoreWithNotifications();
+const messageQueue = new TaskMessageQueueWithResolvers();
+const taskResultHandler = new TaskResultHandler(taskStore, messageQueue);
+// Track active task executions
+const activeTaskExecutions = new Map();
+// Create the server
+const createServer = () => {
+ const server = new index_js_1.Server({ name: 'simple-task-interactive', version: '1.0.0' }, {
+ capabilities: {
+ tools: {},
+ tasks: {
+ requests: {
+ tools: { call: {} }
+ }
+ }
+ }
+ });
+ // Register tools
+ server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
+ return {
+ tools: [
+ {
+ name: 'confirm_delete',
+ description: 'Asks for confirmation before deleting (demonstrates elicitation)',
+ inputSchema: {
+ type: 'object',
+ properties: {
+ filename: { type: 'string' }
+ }
+ },
+ execution: { taskSupport: 'required' }
+ },
+ {
+ name: 'write_haiku',
+ description: 'Asks LLM to write a haiku (demonstrates sampling)',
+ inputSchema: {
+ type: 'object',
+ properties: {
+ topic: { type: 'string' }
+ }
+ },
+ execution: { taskSupport: 'required' }
+ }
+ ]
+ };
+ });
+ // Handle tool calls
+ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request, extra) => {
+ const { name, arguments: args } = request.params;
+ const taskParams = (request.params._meta?.task || request.params.task);
+ // Validate task mode - these tools require tasks
+ if (!taskParams) {
+ throw new Error(`Tool ${name} requires task mode`);
+ }
+ // Create task
+ const taskOptions = {
+ ttl: taskParams.ttl,
+ pollInterval: taskParams.pollInterval ?? 1000
+ };
+ const task = await taskStore.createTask(taskOptions, extra.requestId, request, extra.sessionId);
+ console.log(`\n[Server] ${name} called, task created: ${task.taskId}`);
+ // Start background task execution
+ const taskExecution = (async () => {
+ try {
+ const taskSession = new TaskSession(server, task.taskId, taskStore, messageQueue);
+ if (name === 'confirm_delete') {
+ const filename = args?.filename ?? 'unknown.txt';
+ console.log(`[Server] confirm_delete: asking about '${filename}'`);
+ console.log('[Server] Sending elicitation request to client...');
+ const result = await taskSession.elicit(`Are you sure you want to delete '${filename}'?`, {
+ type: 'object',
+ properties: {
+ confirm: { type: 'boolean' }
+ },
+ required: ['confirm']
+ });
+ console.log(`[Server] Received elicitation response: action=${result.action}, content=${JSON.stringify(result.content)}`);
+ let text;
+ if (result.action === 'accept' && result.content) {
+ const confirmed = result.content.confirm;
+ text = confirmed ? `Deleted '${filename}'` : 'Deletion cancelled';
+ }
+ else {
+ text = 'Deletion cancelled';
+ }
+ console.log(`[Server] Completing task with result: ${text}`);
+ await taskStore.storeTaskResult(task.taskId, 'completed', {
+ content: [{ type: 'text', text }]
+ });
+ }
+ else if (name === 'write_haiku') {
+ const topic = args?.topic ?? 'nature';
+ console.log(`[Server] write_haiku: topic '${topic}'`);
+ console.log('[Server] Sending sampling request to client...');
+ const result = await taskSession.createMessage([
+ {
+ role: 'user',
+ content: { type: 'text', text: `Write a haiku about ${topic}` }
+ }
+ ], 50);
+ let haiku = 'No response';
+ if (result.content && 'text' in result.content) {
+ haiku = result.content.text;
+ }
+ console.log(`[Server] Received sampling response: ${haiku.substring(0, 50)}...`);
+ console.log('[Server] Completing task with haiku');
+ await taskStore.storeTaskResult(task.taskId, 'completed', {
+ content: [{ type: 'text', text: `Haiku:\n${haiku}` }]
+ });
+ }
+ }
+ catch (error) {
+ console.error(`[Server] Task ${task.taskId} failed:`, error);
+ await taskStore.storeTaskResult(task.taskId, 'failed', {
+ content: [{ type: 'text', text: `Error: ${error}` }],
+ isError: true
+ });
+ }
+ finally {
+ activeTaskExecutions.delete(task.taskId);
+ }
+ })();
+ activeTaskExecutions.set(task.taskId, {
+ promise: taskExecution,
+ server,
+ sessionId: extra.sessionId ?? ''
+ });
+ return { task };
+ });
+ // Handle tasks/get
+ server.setRequestHandler(types_js_1.GetTaskRequestSchema, async (request) => {
+ const { taskId } = request.params;
+ const task = await taskStore.getTask(taskId);
+ if (!task) {
+ throw new Error(`Task ${taskId} not found`);
+ }
+ return task;
+ });
+ // Handle tasks/result
+ server.setRequestHandler(types_js_1.GetTaskPayloadRequestSchema, async (request, extra) => {
+ const { taskId } = request.params;
+ console.log(`[Server] tasks/result called for task ${taskId}`);
+ return taskResultHandler.handle(taskId, server, extra.sessionId ?? '');
+ });
+ return server;
+};
+// ============================================================================
+// Express App Setup
+// ============================================================================
+const app = (0, express_js_1.createMcpExpressApp)();
+// Map to store transports by session ID
+const transports = {};
+// Helper to check if request is initialize
+const isInitializeRequest = (body) => {
+ return typeof body === 'object' && body !== null && 'method' in body && body.method === 'initialize';
+};
+// MCP POST endpoint
+app.post('/mcp', async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ try {
+ let transport;
+ if (sessionId && transports[sessionId]) {
+ transport = transports[sessionId];
+ }
+ else if (!sessionId && isInitializeRequest(req.body)) {
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ onsessioninitialized: sid => {
+ console.log(`Session initialized: ${sid}`);
+ transports[sid] = transport;
+ }
+ });
+ transport.onclose = () => {
+ const sid = transport.sessionId;
+ if (sid && transports[sid]) {
+ console.log(`Transport closed for session ${sid}`);
+ delete transports[sid];
+ }
+ };
+ const server = createServer();
+ await server.connect(transport);
+ await transport.handleRequest(req, res, req.body);
+ return;
+ }
+ else {
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: { code: -32000, message: 'Bad Request: No valid session ID' },
+ id: null
+ });
+ return;
+ }
+ await transport.handleRequest(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: { code: -32603, message: 'Internal server error' },
+ id: null
+ });
+ }
+ }
+});
+// Handle GET requests for SSE streams
+app.get('/mcp', async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+});
+// Handle DELETE requests for session termination
+app.delete('/mcp', async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ console.log(`Session termination request: ${sessionId}`);
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+});
+// Start server
+app.listen(PORT, () => {
+ console.log(`Starting server on http://localhost:${PORT}/mcp`);
+ console.log('\nAvailable tools:');
+ console.log(' - confirm_delete: Demonstrates elicitation (asks user y/n)');
+ console.log(' - write_haiku: Demonstrates sampling (requests LLM completion)');
+});
+// Handle shutdown
+process.on('SIGINT', async () => {
+ console.log('\nShutting down server...');
+ for (const sessionId of Object.keys(transports)) {
+ try {
+ await transports[sessionId].close();
+ delete transports[sessionId];
+ }
+ catch (error) {
+ console.error(`Error closing session ${sessionId}:`, error);
+ }
+ }
+ taskStore.cleanup();
+ messageQueue.cleanup();
+ console.log('Server shutdown complete');
+ process.exit(0);
+});
+//# sourceMappingURL=simpleTaskInteractive.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js.map
new file mode 100644
index 0000000..faabd3f
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleTaskInteractive.js","sourceRoot":"","sources":["../../../../src/examples/server/simpleTaskInteractive.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;AAGH,6CAAyC;AACzC,oDAA+C;AAC/C,wDAA8D;AAC9D,sEAA+E;AAC/E,6CAsBwB;AACxB,0EAAuI;AACvI,+EAAiF;AAEjF,+EAA+E;AAC/E,uEAAuE;AACvE,+EAA+E;AAE/E,MAAM,QAAQ;IAMV;QAFQ,UAAK,GAAG,KAAK,CAAC;QAGlB,IAAI,CAAC,QAAQ,GAAG,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC/C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YACxB,IAAI,CAAC,OAAO,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AAC;YACb,OAAO,CAAC,KAAK,CAAC,yBAAyB,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;QAChE,CAAC;IACL,CAAC;IACD,SAAS,CAAC,OAAO,EAAE,CAAC;IACpB,YAAY,CAAC,OAAO,EAAE,CAAC;IACvB,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.d.ts
new file mode 100644
index 0000000..c536d0c
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=sseAndStreamableHttpCompatibleServer.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.d.ts.map
new file mode 100644
index 0000000..fb982c8
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"sseAndStreamableHttpCompatibleServer.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/sseAndStreamableHttpCompatibleServer.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js
new file mode 100644
index 0000000..6e2c1b4
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js
@@ -0,0 +1,256 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_crypto_1 = require("node:crypto");
+const mcp_js_1 = require("../../server/mcp.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const sse_js_1 = require("../../server/sse.js");
+const z = __importStar(require("zod/v4"));
+const types_js_1 = require("../../types.js");
+const inMemoryEventStore_js_1 = require("../shared/inMemoryEventStore.js");
+const express_js_1 = require("../../server/express.js");
+/**
+ * This example server demonstrates backwards compatibility with both:
+ * 1. The deprecated HTTP+SSE transport (protocol version 2024-11-05)
+ * 2. The Streamable HTTP transport (protocol version 2025-11-25)
+ *
+ * It maintains a single MCP server instance but exposes two transport options:
+ * - /mcp: The new Streamable HTTP endpoint (supports GET/POST/DELETE)
+ * - /sse: The deprecated SSE endpoint for older clients (GET to establish stream)
+ * - /messages: The deprecated POST endpoint for older clients (POST to send messages)
+ */
+const getServer = () => {
+ const server = new mcp_js_1.McpServer({
+ name: 'backwards-compatible-server',
+ version: '1.0.0'
+ }, { capabilities: { logging: {} } });
+ // Register a simple tool that sends notifications over time
+ server.registerTool('start-notification-stream', {
+ description: 'Starts sending periodic notifications for testing resumability',
+ inputSchema: {
+ interval: z.number().describe('Interval in milliseconds between notifications').default(100),
+ count: z.number().describe('Number of notifications to send (0 for 100)').default(50)
+ }
+ }, async ({ interval, count }, extra) => {
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ let counter = 0;
+ while (count === 0 || counter < count) {
+ counter++;
+ try {
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Periodic notification #${counter} at ${new Date().toISOString()}`
+ }, extra.sessionId);
+ }
+ catch (error) {
+ console.error('Error sending notification:', error);
+ }
+ // Wait for the specified interval
+ await sleep(interval);
+ }
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Started sending periodic notifications every ${interval}ms`
+ }
+ ]
+ };
+ });
+ return server;
+};
+// Create Express application
+const app = (0, express_js_1.createMcpExpressApp)();
+// Store transports by session ID
+const transports = {};
+//=============================================================================
+// STREAMABLE HTTP TRANSPORT (PROTOCOL VERSION 2025-11-25)
+//=============================================================================
+// Handle all MCP Streamable HTTP requests (GET, POST, DELETE) on a single endpoint
+app.all('/mcp', async (req, res) => {
+ console.log(`Received ${req.method} request to /mcp`);
+ try {
+ // Check for existing session ID
+ const sessionId = req.headers['mcp-session-id'];
+ let transport;
+ if (sessionId && transports[sessionId]) {
+ // Check if the transport is of the correct type
+ const existingTransport = transports[sessionId];
+ if (existingTransport instanceof streamableHttp_js_1.StreamableHTTPServerTransport) {
+ // Reuse existing transport
+ transport = existingTransport;
+ }
+ else {
+ // Transport exists but is not a StreamableHTTPServerTransport (could be SSEServerTransport)
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: Session exists but uses a different transport protocol'
+ },
+ id: null
+ });
+ return;
+ }
+ }
+ else if (!sessionId && req.method === 'POST' && (0, types_js_1.isInitializeRequest)(req.body)) {
+ const eventStore = new inMemoryEventStore_js_1.InMemoryEventStore();
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ eventStore, // Enable resumability
+ onsessioninitialized: sessionId => {
+ // Store the transport by session ID when session is initialized
+ console.log(`StreamableHTTP session initialized with ID: ${sessionId}`);
+ transports[sessionId] = transport;
+ }
+ });
+ // Set up onclose handler to clean up transport when closed
+ transport.onclose = () => {
+ const sid = transport.sessionId;
+ if (sid && transports[sid]) {
+ console.log(`Transport closed for session ${sid}, removing from transports map`);
+ delete transports[sid];
+ }
+ };
+ // Connect the transport to the MCP server
+ const server = getServer();
+ await server.connect(transport);
+ }
+ else {
+ // Invalid request - no session ID or not initialization request
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: No valid session ID provided'
+ },
+ id: null
+ });
+ return;
+ }
+ // Handle the request with the transport
+ await transport.handleRequest(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32603,
+ message: 'Internal server error'
+ },
+ id: null
+ });
+ }
+ }
+});
+//=============================================================================
+// DEPRECATED HTTP+SSE TRANSPORT (PROTOCOL VERSION 2024-11-05)
+//=============================================================================
+app.get('/sse', async (req, res) => {
+ console.log('Received GET request to /sse (deprecated SSE transport)');
+ const transport = new sse_js_1.SSEServerTransport('/messages', res);
+ transports[transport.sessionId] = transport;
+ res.on('close', () => {
+ delete transports[transport.sessionId];
+ });
+ const server = getServer();
+ await server.connect(transport);
+});
+app.post('/messages', async (req, res) => {
+ const sessionId = req.query.sessionId;
+ let transport;
+ const existingTransport = transports[sessionId];
+ if (existingTransport instanceof sse_js_1.SSEServerTransport) {
+ // Reuse existing transport
+ transport = existingTransport;
+ }
+ else {
+ // Transport exists but is not a SSEServerTransport (could be StreamableHTTPServerTransport)
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: Session exists but uses a different transport protocol'
+ },
+ id: null
+ });
+ return;
+ }
+ if (transport) {
+ await transport.handlePostMessage(req, res, req.body);
+ }
+ else {
+ res.status(400).send('No transport found for sessionId');
+ }
+});
+// Start the server
+const PORT = 3000;
+app.listen(PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`Backwards compatible MCP server listening on port ${PORT}`);
+ console.log(`
+==============================================
+SUPPORTED TRANSPORT OPTIONS:
+
+1. Streamable Http(Protocol version: 2025-11-25)
+ Endpoint: /mcp
+ Methods: GET, POST, DELETE
+ Usage:
+ - Initialize with POST to /mcp
+ - Establish SSE stream with GET to /mcp
+ - Send requests with POST to /mcp
+ - Terminate session with DELETE to /mcp
+
+2. Http + SSE (Protocol version: 2024-11-05)
+ Endpoints: /sse (GET) and /messages (POST)
+ Usage:
+ - Establish SSE stream with GET to /sse
+ - Send requests with POST to /messages?sessionId=
+==============================================
+`);
+});
+// Handle server shutdown
+process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ // Close all active transports to properly clean up resources
+ for (const sessionId in transports) {
+ try {
+ console.log(`Closing transport for session ${sessionId}`);
+ await transports[sessionId].close();
+ delete transports[sessionId];
+ }
+ catch (error) {
+ console.error(`Error closing transport for session ${sessionId}:`, error);
+ }
+ }
+ console.log('Server shutdown complete');
+ process.exit(0);
+});
+//# sourceMappingURL=sseAndStreamableHttpCompatibleServer.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js.map
new file mode 100644
index 0000000..3f6331a
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"sseAndStreamableHttpCompatibleServer.js","sourceRoot":"","sources":["../../../../src/examples/server/sseAndStreamableHttpCompatibleServer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAyC;AACzC,gDAAgD;AAChD,sEAA+E;AAC/E,gDAAyD;AACzD,0CAA4B;AAC5B,6CAAqE;AACrE,2EAAqE;AACrE,wDAA8D;AAE9D;;;;;;;;;GASG;AAEH,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,MAAM,MAAM,GAAG,IAAI,kBAAS,CACxB;QACI,IAAI,EAAE,6BAA6B;QACnC,OAAO,EAAE,OAAO;KACnB,EACD,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CACpC,CAAC;IAEF,4DAA4D;IAC5D,MAAM,CAAC,YAAY,CACf,2BAA2B,EAC3B;QACI,WAAW,EAAE,gEAAgE;QAC7E,WAAW,EAAE;YACT,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YAC5F,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;SACxF;KACJ,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,EAA2B,EAAE;QAC1D,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;QAC9E,IAAI,OAAO,GAAG,CAAC,CAAC;QAEhB,OAAO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KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,qDAAqD,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;CAmBf,CAAC,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,yBAAyB;AACzB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC5B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IAEvC,6DAA6D;IAC7D,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACjC,IAAI,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,iCAAiC,SAAS,EAAE,CAAC,CAAC;YAC1D,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC;YACpC,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,uCAAuC,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9E,CAAC;IACL,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.d.ts
new file mode 100644
index 0000000..63e4554
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=ssePollingExample.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.d.ts.map
new file mode 100644
index 0000000..9382731
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ssePollingExample.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/ssePollingExample.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js
new file mode 100644
index 0000000..ea5c9ed
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js
@@ -0,0 +1,107 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_crypto_1 = require("node:crypto");
+const mcp_js_1 = require("../../server/mcp.js");
+const express_js_1 = require("../../server/express.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const inMemoryEventStore_js_1 = require("../shared/inMemoryEventStore.js");
+const cors_1 = __importDefault(require("cors"));
+// Factory to create a new MCP server per session.
+// Each session needs its own server+transport pair to avoid cross-session contamination.
+const getServer = () => {
+ const server = new mcp_js_1.McpServer({
+ name: 'sse-polling-example',
+ version: '1.0.0'
+ }, {
+ capabilities: { logging: {} }
+ });
+ // Register a long-running tool that demonstrates server-initiated disconnect
+ server.tool('long-task', 'A long-running task that sends progress updates. Server will disconnect mid-task to demonstrate polling.', {}, async (_args, extra) => {
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ console.log(`[${extra.sessionId}] Starting long-task...`);
+ // Send first progress notification
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: 'Progress: 25% - Starting work...'
+ }, extra.sessionId);
+ await sleep(1000);
+ // Send second progress notification
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: 'Progress: 50% - Halfway there...'
+ }, extra.sessionId);
+ await sleep(1000);
+ // Server decides to disconnect the client to free resources
+ // Client will reconnect via GET with Last-Event-ID after the transport's retryInterval
+ // Use extra.closeSSEStream callback - available when eventStore is configured
+ if (extra.closeSSEStream) {
+ console.log(`[${extra.sessionId}] Closing SSE stream to trigger client polling...`);
+ extra.closeSSEStream();
+ }
+ // Continue processing while client is disconnected
+ // Events are stored in eventStore and will be replayed on reconnect
+ await sleep(500);
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: 'Progress: 75% - Almost done (sent while client disconnected)...'
+ }, extra.sessionId);
+ await sleep(500);
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: 'Progress: 100% - Complete!'
+ }, extra.sessionId);
+ console.log(`[${extra.sessionId}] Task complete`);
+ return {
+ content: [
+ {
+ type: 'text',
+ text: 'Long task completed successfully!'
+ }
+ ]
+ };
+ });
+ return server;
+};
+// Set up Express app
+const app = (0, express_js_1.createMcpExpressApp)();
+app.use((0, cors_1.default)());
+// Create event store for resumability
+const eventStore = new inMemoryEventStore_js_1.InMemoryEventStore();
+// Track transports by session ID for session reuse
+const transports = new Map();
+// Handle all MCP requests
+app.all('/mcp', async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ // Reuse existing transport or create new one
+ let transport = sessionId ? transports.get(sessionId) : undefined;
+ if (!transport) {
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ eventStore,
+ retryInterval: 2000, // Default retry interval for priming events
+ onsessioninitialized: id => {
+ console.log(`[${id}] Session initialized`);
+ transports.set(id, transport);
+ }
+ });
+ // Create a new server per session and connect it to the transport
+ const server = getServer();
+ await server.connect(transport);
+ }
+ await transport.handleRequest(req, res, req.body);
+});
+// Start the server
+const PORT = 3001;
+app.listen(PORT, () => {
+ console.log(`SSE Polling Example Server running on http://localhost:${PORT}/mcp`);
+ console.log('');
+ console.log('This server demonstrates SEP-1699 SSE polling:');
+ console.log('- retryInterval: 2000ms (client waits 2s before reconnecting)');
+ console.log('- eventStore: InMemoryEventStore (events are persisted for replay)');
+ console.log('');
+ console.log('Try calling the "long-task" tool to see server-initiated disconnect in action.');
+});
+//# sourceMappingURL=ssePollingExample.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js.map
new file mode 100644
index 0000000..d001a5b
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ssePollingExample.js","sourceRoot":"","sources":["../../../../src/examples/server/ssePollingExample.ts"],"names":[],"mappings":";;;;;AAeA,6CAAyC;AACzC,gDAAgD;AAChD,wDAA8D;AAC9D,sEAA+E;AAE/E,2EAAqE;AACrE,gDAAwB;AAExB,kDAAkD;AAClD,yFAAyF;AACzF,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,MAAM,MAAM,GAAG,IAAI,kBAAS,CACxB;QACI,IAAI,EAAE,qBAAqB;QAC3B,OAAO,EAAE,OAAO;KACnB,EACD;QACI,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;KAChC,CACJ,CAAC;IAEF,6EAA6E;IAC7E,MAAM,CAAC,IAAI,CACP,WAAW,EACX,0GAA0G,EAC1G,EAAE,EACF,KAAK,EAAE,KAAK,EAAE,KAAK,EAA2B,EAAE;QAC5C,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,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E,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;AACtD,CAAC,CAAC,CAAC;AAEH,mBAAmB;AACnB,MAAM,IAAI,GAAG,IAAI,CAAC;AAClB,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;IAClB,OAAO,CAAC,GAAG,CAAC,0DAA0D,IAAI,MAAM,CAAC,CAAC;IAClF,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAAC;IAC9D,OAAO,CAAC,GAAG,CAAC,+DAA+D,CAAC,CAAC;IAC7E,OAAO,CAAC,GAAG,CAAC,oEAAoE,CAAC,CAAC;IAClF,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,gFAAgF,CAAC,CAAC;AAClG,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.d.ts
new file mode 100644
index 0000000..4df1783
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=standaloneSseWithGetStreamableHttp.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.d.ts.map
new file mode 100644
index 0000000..df60dc5
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"standaloneSseWithGetStreamableHttp.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/standaloneSseWithGetStreamableHttp.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js
new file mode 100644
index 0000000..129980e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js
@@ -0,0 +1,124 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_crypto_1 = require("node:crypto");
+const mcp_js_1 = require("../../server/mcp.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const types_js_1 = require("../../types.js");
+const express_js_1 = require("../../server/express.js");
+// Factory to create a new MCP server per session.
+// Each session needs its own server+transport pair to avoid cross-session contamination.
+const getServer = () => {
+ const server = new mcp_js_1.McpServer({
+ name: 'resource-list-changed-notification-server',
+ version: '1.0.0'
+ });
+ const addResource = (name, content) => {
+ const uri = `https://mcp-example.com/dynamic/${encodeURIComponent(name)}`;
+ server.registerResource(name, uri, { mimeType: 'text/plain', description: `Dynamic resource: ${name}` }, async () => {
+ return {
+ contents: [{ uri, text: content }]
+ };
+ });
+ };
+ addResource('example-resource', 'Initial content for example-resource');
+ // Periodically add new resources to demonstrate notifications
+ const resourceChangeInterval = setInterval(() => {
+ const name = (0, node_crypto_1.randomUUID)();
+ addResource(name, `Content for ${name}`);
+ }, 5000);
+ // Clean up the interval when the server closes
+ server.server.onclose = () => {
+ clearInterval(resourceChangeInterval);
+ };
+ return server;
+};
+// Store transports by session ID to send notifications
+const transports = {};
+const app = (0, express_js_1.createMcpExpressApp)();
+app.post('/mcp', async (req, res) => {
+ console.log('Received MCP request:', req.body);
+ try {
+ // Check for existing session ID
+ const sessionId = req.headers['mcp-session-id'];
+ let transport;
+ if (sessionId && transports[sessionId]) {
+ // Reuse existing transport
+ transport = transports[sessionId];
+ }
+ else if (!sessionId && (0, types_js_1.isInitializeRequest)(req.body)) {
+ // New initialization request
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ onsessioninitialized: sessionId => {
+ // Store the transport by session ID when session is initialized
+ // This avoids race conditions where requests might come in before the session is stored
+ console.log(`Session initialized with ID: ${sessionId}`);
+ transports[sessionId] = transport;
+ }
+ });
+ // Create a new server per session and connect it to the transport
+ const server = getServer();
+ await server.connect(transport);
+ // Handle the request - the onsessioninitialized callback will store the transport
+ await transport.handleRequest(req, res, req.body);
+ return; // Already handled
+ }
+ else {
+ // Invalid request - no session ID or not initialization request
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: No valid session ID provided'
+ },
+ id: null
+ });
+ return;
+ }
+ // Handle the request with existing transport
+ await transport.handleRequest(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32603,
+ message: 'Internal server error'
+ },
+ id: null
+ });
+ }
+ }
+});
+// Handle GET requests for SSE streams (now using built-in support from StreamableHTTP)
+app.get('/mcp', async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ console.log(`Establishing SSE stream for session ${sessionId}`);
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+});
+// Start the server
+const PORT = 3000;
+app.listen(PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`Server listening on port ${PORT}`);
+});
+// Handle server shutdown
+process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ for (const sessionId in transports) {
+ await transports[sessionId].close();
+ delete transports[sessionId];
+ }
+ process.exit(0);
+});
+//# sourceMappingURL=standaloneSseWithGetStreamableHttp.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js.map
new file mode 100644
index 0000000..f5c8acd
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"standaloneSseWithGetStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/server/standaloneSseWithGetStreamableHttp.ts"],"names":[],"mappings":";;AACA,6CAAyC;AACzC,gDAAgD;AAChD,sEAA+E;AAC/E,6CAAyE;AACzE,wDAA8D;AAE9D,kDAAkD;AAClD,yFAAyF;AACzF,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC;QACzB,IAAI,EAAE,2CAA2C;QACjD,OAAO,EAAE,OAAO;KACnB,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE,EAAE;QAClD,MAAM,GAAG,GAAG,mCAAmC,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1E,MAAM,CAAC,gBAAgB,CACnB,IAAI,EACJ,GAAG,EACH,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,qBAAqB,IAAI,EAAE,EAAE,EACpE,KAAK,IAAiC,EAAE;YACpC,OAAO;gBACH,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;aACrC,CAAC;QACN,CAAC,CACJ,CAAC;IACN,CAAC,CAAC;IAEF,WAAW,CAAC,kB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otocol/sdk/dist/cjs/examples/server/toolWithSampleServer.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.d.ts
new file mode 100644
index 0000000..acc24b6
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=toolWithSampleServer.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.d.ts.map
new file mode 100644
index 0000000..bd0cebc
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"toolWithSampleServer.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/toolWithSampleServer.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.js
new file mode 100644
index 0000000..45d3837
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.js
@@ -0,0 +1,73 @@
+"use strict";
+// Run with: npx tsx src/examples/server/toolWithSampleServer.ts
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const mcp_js_1 = require("../../server/mcp.js");
+const stdio_js_1 = require("../../server/stdio.js");
+const z = __importStar(require("zod/v4"));
+const mcpServer = new mcp_js_1.McpServer({
+ name: 'tools-with-sample-server',
+ version: '1.0.0'
+});
+// Tool that uses LLM sampling to summarize any text
+mcpServer.registerTool('summarize', {
+ description: 'Summarize any text using an LLM',
+ inputSchema: {
+ text: z.string().describe('Text to summarize')
+ }
+}, async ({ text }) => {
+ // Call the LLM through MCP sampling
+ const response = await mcpServer.server.createMessage({
+ messages: [
+ {
+ role: 'user',
+ content: {
+ type: 'text',
+ text: `Please summarize the following text concisely:\n\n${text}`
+ }
+ }
+ ],
+ maxTokens: 500
+ });
+ // Since we're not passing tools param to createMessage, response.content is single content
+ return {
+ content: [
+ {
+ type: 'text',
+ text: response.content.type === 'text' ? response.content.text : 'Unable to generate summary'
+ }
+ ]
+ };
+});
+async function main() {
+ const transport = new stdio_js_1.StdioServerTransport();
+ await mcpServer.connect(transport);
+ console.log('MCP server is running...');
+}
+main().catch(error => {
+ console.error('Server error:', error);
+ process.exit(1);
+});
+//# sourceMappingURL=toolWithSampleServer.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.js.map
new file mode 100644
index 0000000..287e11e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"toolWithSampleServer.js","sourceRoot":"","sources":["../../../../src/examples/server/toolWithSampleServer.ts"],"names":[],"mappings":";AAAA,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;AAEhE,gDAAgD;AAChD,oDAA6D;AAC7D,0CAA4B;AAE5B,MAAM,SAAS,GAAG,IAAI,kBAAS,CAAC;IAC5B,IAAI,EAAE,0BAA0B;IAChC,OAAO,EAAE,OAAO;CACnB,CAAC,CAAC;AAEH,oDAAoD;AACpD,SAAS,CAAC,YAAY,CAClB,WAAW,EACX;IACI,WAAW,EAAE,iCAAiC;IAC9C,WAAW,EAAE;QACT,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;KACjD;CACJ,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IACf,oCAAoC;IACpC,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC;QAClD,QAAQ,EAAE;YACN;gBACI,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACL,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,qDAAqD,IAAI,EAAE;iBACpE;aACJ;SACJ;QACD,SAAS,EAAE,GAAG;KACjB,CAAC,CAAC;IAEH,2FAA2F;IAC3F,OAAO;QACH,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,4BAA4B;aAChG;SACJ;KACJ,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,KAAK,UAAU,IAAI;IACf,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACnC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;AAC5C,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.d.ts
new file mode 100644
index 0000000..26ff38c
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.d.ts
@@ -0,0 +1,31 @@
+import { JSONRPCMessage } from '../../types.js';
+import { EventStore } from '../../server/streamableHttp.js';
+/**
+ * Simple in-memory implementation of the EventStore interface for resumability
+ * This is primarily intended for examples and testing, not for production use
+ * where a persistent storage solution would be more appropriate.
+ */
+export declare class InMemoryEventStore implements EventStore {
+ private events;
+ /**
+ * Generates a unique event ID for a given stream ID
+ */
+ private generateEventId;
+ /**
+ * Extracts the stream ID from an event ID
+ */
+ private getStreamIdFromEventId;
+ /**
+ * Stores an event with a generated event ID
+ * Implements EventStore.storeEvent
+ */
+ storeEvent(streamId: string, message: JSONRPCMessage): Promise;
+ /**
+ * Replays events that occurred after a specific event ID
+ * Implements EventStore.replayEventsAfter
+ */
+ replayEventsAfter(lastEventId: string, { send }: {
+ send: (eventId: string, message: JSONRPCMessage) => Promise;
+ }): Promise;
+}
+//# sourceMappingURL=inMemoryEventStore.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.d.ts.map
new file mode 100644
index 0000000..a67ee6c
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"inMemoryEventStore.d.ts","sourceRoot":"","sources":["../../../../src/examples/shared/inMemoryEventStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;;;GAIG;AACH,qBAAa,kBAAmB,YAAW,UAAU;IACjD,OAAO,CAAC,MAAM,CAAyE;IAEvF;;OAEG;IACH,OAAO,CAAC,eAAe;IAIvB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAK9B;;;OAGG;IACG,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAM5E;;;OAGG;IACG,iBAAiB,CACnB,WAAW,EAAE,MAAM,EACnB,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,GAChF,OAAO,CAAC,MAAM,CAAC;CAkCrB"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.js
new file mode 100644
index 0000000..d33ffdb
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.js
@@ -0,0 +1,69 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InMemoryEventStore = void 0;
+/**
+ * Simple in-memory implementation of the EventStore interface for resumability
+ * This is primarily intended for examples and testing, not for production use
+ * where a persistent storage solution would be more appropriate.
+ */
+class InMemoryEventStore {
+ constructor() {
+ this.events = new Map();
+ }
+ /**
+ * Generates a unique event ID for a given stream ID
+ */
+ generateEventId(streamId) {
+ return `${streamId}_${Date.now()}_${Math.random().toString(36).substring(2, 10)}`;
+ }
+ /**
+ * Extracts the stream ID from an event ID
+ */
+ getStreamIdFromEventId(eventId) {
+ const parts = eventId.split('_');
+ return parts.length > 0 ? parts[0] : '';
+ }
+ /**
+ * Stores an event with a generated event ID
+ * Implements EventStore.storeEvent
+ */
+ async storeEvent(streamId, message) {
+ const eventId = this.generateEventId(streamId);
+ this.events.set(eventId, { streamId, message });
+ return eventId;
+ }
+ /**
+ * Replays events that occurred after a specific event ID
+ * Implements EventStore.replayEventsAfter
+ */
+ async replayEventsAfter(lastEventId, { send }) {
+ if (!lastEventId || !this.events.has(lastEventId)) {
+ return '';
+ }
+ // Extract the stream ID from the event ID
+ const streamId = this.getStreamIdFromEventId(lastEventId);
+ if (!streamId) {
+ return '';
+ }
+ let foundLastEvent = false;
+ // Sort events by eventId for chronological ordering
+ const sortedEvents = [...this.events.entries()].sort((a, b) => a[0].localeCompare(b[0]));
+ for (const [eventId, { streamId: eventStreamId, message }] of sortedEvents) {
+ // Only include events from the same stream
+ if (eventStreamId !== streamId) {
+ continue;
+ }
+ // Start sending events after we find the lastEventId
+ if (eventId === lastEventId) {
+ foundLastEvent = true;
+ continue;
+ }
+ if (foundLastEvent) {
+ await send(eventId, message);
+ }
+ }
+ return streamId;
+ }
+}
+exports.InMemoryEventStore = InMemoryEventStore;
+//# sourceMappingURL=inMemoryEventStore.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.js.map
new file mode 100644
index 0000000..d696450
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"inMemoryEventStore.js","sourceRoot":"","sources":["../../../../src/examples/shared/inMemoryEventStore.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACH,MAAa,kBAAkB;IAA/B;QACY,WAAM,GAA+D,IAAI,GAAG,EAAE,CAAC;IAoE3F,CAAC;IAlEG;;OAEG;IACK,eAAe,CAAC,QAAgB;QACpC,OAAO,GAAG,QAAQ,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;IACtF,CAAC;IAED;;OAEG;IACK,sBAAsB,CAAC,OAAe;QAC1C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5C,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,UAAU,CAAC,QAAgB,EAAE,OAAuB;QACtD,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;QAChD,OAAO,OAAO,CAAC;IACnB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,iBAAiB,CACnB,WAAmB,EACnB,EAAE,IAAI,EAAyE;QAE/E,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;YAChD,OAAO,EAAE,CAAC;QACd,CAAC;QAED,0CAA0C;QAC1C,MAAM,QAAQ,GAAG,IAAI,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC;QAC1D,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO,EAAE,CAAC;QACd,CAAC;QAED,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,oDAAoD;QACpD,MAAM,YAAY,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAEzF,KAAK,MAAM,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,IAAI,YAAY,EAAE,CAAC;YACzE,2CAA2C;YAC3C,IAAI,aAAa,KAAK,QAAQ,EAAE,CAAC;gBAC7B,SAAS;YACb,CAAC;YAED,qDAAqD;YACrD,IAAI,OAAO,KAAK,WAAW,EAAE,CAAC;gBAC1B,cAAc,GAAG,IAAI,CAAC;gBACtB,SAAS;YACb,CAAC;YAED,IAAI,cAAc,EAAE,CAAC;gBACjB,MAAM,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACjC,CAAC;QACL,CAAC;QACD,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ;AArED,gDAqEC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.d.ts
new file mode 100644
index 0000000..2a86335
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.d.ts
@@ -0,0 +1,13 @@
+/**
+ * Experimental MCP SDK features.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * Import experimental features from this module:
+ * ```typescript
+ * import { TaskStore, InMemoryTaskStore } from '@modelcontextprotocol/sdk/experimental';
+ * ```
+ *
+ * @experimental
+ */
+export * from './tasks/index.js';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.d.ts.map
new file mode 100644
index 0000000..410892a
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/experimental/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,cAAc,kBAAkB,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.js
new file mode 100644
index 0000000..7634e67
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.js
@@ -0,0 +1,29 @@
+"use strict";
+/**
+ * Experimental MCP SDK features.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * Import experimental features from this module:
+ * ```typescript
+ * import { TaskStore, InMemoryTaskStore } from '@modelcontextprotocol/sdk/experimental';
+ * ```
+ *
+ * @experimental
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./tasks/index.js"), exports);
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.js.map
new file mode 100644
index 0000000..110189e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/experimental/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;AAEH,mDAAiC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.d.ts
new file mode 100644
index 0000000..9c7a928
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.d.ts
@@ -0,0 +1,121 @@
+/**
+ * Experimental client task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+import type { Client } from '../../client/index.js';
+import type { RequestOptions } from '../../shared/protocol.js';
+import type { ResponseMessage } from '../../shared/responseMessage.js';
+import type { AnyObjectSchema, SchemaOutput } from '../../server/zod-compat.js';
+import type { CallToolRequest, ClientRequest, Notification, Request, Result } from '../../types.js';
+import { CallToolResultSchema, type CompatibilityCallToolResultSchema } from '../../types.js';
+import type { GetTaskResult, ListTasksResult, CancelTaskResult } from './types.js';
+/**
+ * Experimental task features for MCP clients.
+ *
+ * Access via `client.experimental.tasks`:
+ * ```typescript
+ * const stream = client.experimental.tasks.callToolStream({ name: 'tool', arguments: {} });
+ * const task = await client.experimental.tasks.getTask(taskId);
+ * ```
+ *
+ * @experimental
+ */
+export declare class ExperimentalClientTasks {
+ private readonly _client;
+ constructor(_client: Client);
+ /**
+ * Calls a tool and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * This method provides streaming access to tool execution, allowing you to
+ * observe intermediate task status updates for long-running tool calls.
+ * Automatically validates structured output if the tool has an outputSchema.
+ *
+ * @example
+ * ```typescript
+ * const stream = client.experimental.tasks.callToolStream({ name: 'myTool', arguments: {} });
+ * for await (const message of stream) {
+ * switch (message.type) {
+ * case 'taskCreated':
+ * console.log('Tool execution started:', message.task.taskId);
+ * break;
+ * case 'taskStatus':
+ * console.log('Tool status:', message.task.status);
+ * break;
+ * case 'result':
+ * console.log('Tool result:', message.result);
+ * break;
+ * case 'error':
+ * console.error('Tool error:', message.error);
+ * break;
+ * }
+ * }
+ * ```
+ *
+ * @param params - Tool call parameters (name and arguments)
+ * @param resultSchema - Zod schema for validating the result (defaults to CallToolResultSchema)
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ callToolStream(params: CallToolRequest['params'], resultSchema?: T, options?: RequestOptions): AsyncGenerator>, void, void>;
+ /**
+ * Gets the current status of a task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ * @returns The task status
+ *
+ * @experimental
+ */
+ getTask(taskId: string, options?: RequestOptions): Promise;
+ /**
+ * Retrieves the result of a completed task.
+ *
+ * @param taskId - The task identifier
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options
+ * @returns The task result
+ *
+ * @experimental
+ */
+ getTaskResult(taskId: string, resultSchema?: T, options?: RequestOptions): Promise>;
+ /**
+ * Lists tasks with optional pagination.
+ *
+ * @param cursor - Optional pagination cursor
+ * @param options - Optional request options
+ * @returns List of tasks with optional next cursor
+ *
+ * @experimental
+ */
+ listTasks(cursor?: string, options?: RequestOptions): Promise;
+ /**
+ * Cancels a running task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ *
+ * @experimental
+ */
+ cancelTask(taskId: string, options?: RequestOptions): Promise;
+ /**
+ * Sends a request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * This method provides streaming access to request processing, allowing you to
+ * observe intermediate task status updates for task-augmented requests.
+ *
+ * @param request - The request to send
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ requestStream(request: ClientRequest | RequestT, resultSchema: T, options?: RequestOptions): AsyncGenerator>, void, void>;
+}
+//# sourceMappingURL=client.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.d.ts.map
new file mode 100644
index 0000000..e54158d
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,Y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ACG,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;IASrF;;;;;;;;;;;;;OAaG;IACH,aAAa,CAAC,CAAC,SAAS,eAAe,EACnC,OAAO,EAAE,aAAa,GAAG,QAAQ,EACjC,YAAY,EAAE,CAAC,EACf,OAAO,CAAC,EAAE,cAAc,GACzB,cAAc,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;CAWlE"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.js
new file mode 100644
index 0000000..cb7d26f
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.js
@@ -0,0 +1,188 @@
+"use strict";
+/**
+ * Experimental client task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ExperimentalClientTasks = void 0;
+const types_js_1 = require("../../types.js");
+/**
+ * Experimental task features for MCP clients.
+ *
+ * Access via `client.experimental.tasks`:
+ * ```typescript
+ * const stream = client.experimental.tasks.callToolStream({ name: 'tool', arguments: {} });
+ * const task = await client.experimental.tasks.getTask(taskId);
+ * ```
+ *
+ * @experimental
+ */
+class ExperimentalClientTasks {
+ constructor(_client) {
+ this._client = _client;
+ }
+ /**
+ * Calls a tool and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * This method provides streaming access to tool execution, allowing you to
+ * observe intermediate task status updates for long-running tool calls.
+ * Automatically validates structured output if the tool has an outputSchema.
+ *
+ * @example
+ * ```typescript
+ * const stream = client.experimental.tasks.callToolStream({ name: 'myTool', arguments: {} });
+ * for await (const message of stream) {
+ * switch (message.type) {
+ * case 'taskCreated':
+ * console.log('Tool execution started:', message.task.taskId);
+ * break;
+ * case 'taskStatus':
+ * console.log('Tool status:', message.task.status);
+ * break;
+ * case 'result':
+ * console.log('Tool result:', message.result);
+ * break;
+ * case 'error':
+ * console.error('Tool error:', message.error);
+ * break;
+ * }
+ * }
+ * ```
+ *
+ * @param params - Tool call parameters (name and arguments)
+ * @param resultSchema - Zod schema for validating the result (defaults to CallToolResultSchema)
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ async *callToolStream(params, resultSchema = types_js_1.CallToolResultSchema, options) {
+ // Access Client's internal methods
+ const clientInternal = this._client;
+ // Add task creation parameters if server supports it and not explicitly provided
+ const optionsWithTask = {
+ ...options,
+ // We check if the tool is known to be a task during auto-configuration, but assume
+ // the caller knows what they're doing if they pass this explicitly
+ task: options?.task ?? (clientInternal.isToolTask(params.name) ? {} : undefined)
+ };
+ const stream = clientInternal.requestStream({ method: 'tools/call', params }, resultSchema, optionsWithTask);
+ // Get the validator for this tool (if it has an output schema)
+ const validator = clientInternal.getToolOutputValidator(params.name);
+ // Iterate through the stream and validate the final result if needed
+ for await (const message of stream) {
+ // If this is a result message and the tool has an output schema, validate it
+ if (message.type === 'result' && validator) {
+ const result = message.result;
+ // If tool has outputSchema, it MUST return structuredContent (unless it's an error)
+ if (!result.structuredContent && !result.isError) {
+ yield {
+ type: 'error',
+ error: new types_js_1.McpError(types_js_1.ErrorCode.InvalidRequest, `Tool ${params.name} has an output schema but did not return structured content`)
+ };
+ return;
+ }
+ // Only validate structured content if present (not when there's an error)
+ if (result.structuredContent) {
+ try {
+ // Validate the structured content against the schema
+ const validationResult = validator(result.structuredContent);
+ if (!validationResult.valid) {
+ yield {
+ type: 'error',
+ error: new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Structured content does not match the tool's output schema: ${validationResult.errorMessage}`)
+ };
+ return;
+ }
+ }
+ catch (error) {
+ if (error instanceof types_js_1.McpError) {
+ yield { type: 'error', error };
+ return;
+ }
+ yield {
+ type: 'error',
+ error: new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Failed to validate structured content: ${error instanceof Error ? error.message : String(error)}`)
+ };
+ return;
+ }
+ }
+ }
+ // Yield the message (either validated result or any other message type)
+ yield message;
+ }
+ }
+ /**
+ * Gets the current status of a task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ * @returns The task status
+ *
+ * @experimental
+ */
+ async getTask(taskId, options) {
+ return this._client.getTask({ taskId }, options);
+ }
+ /**
+ * Retrieves the result of a completed task.
+ *
+ * @param taskId - The task identifier
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options
+ * @returns The task result
+ *
+ * @experimental
+ */
+ async getTaskResult(taskId, resultSchema, options) {
+ // Delegate to the client's underlying Protocol method
+ return this._client.getTaskResult({ taskId }, resultSchema, options);
+ }
+ /**
+ * Lists tasks with optional pagination.
+ *
+ * @param cursor - Optional pagination cursor
+ * @param options - Optional request options
+ * @returns List of tasks with optional next cursor
+ *
+ * @experimental
+ */
+ async listTasks(cursor, options) {
+ // Delegate to the client's underlying Protocol method
+ return this._client.listTasks(cursor ? { cursor } : undefined, options);
+ }
+ /**
+ * Cancels a running task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ *
+ * @experimental
+ */
+ async cancelTask(taskId, options) {
+ // Delegate to the client's underlying Protocol method
+ return this._client.cancelTask({ taskId }, options);
+ }
+ /**
+ * Sends a request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * This method provides streaming access to request processing, allowing you to
+ * observe intermediate task status updates for task-augmented requests.
+ *
+ * @param request - The request to send
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ requestStream(request, resultSchema, options) {
+ return this._client.requestStream(request, resultSchema, options);
+ }
+}
+exports.ExperimentalClientTasks = ExperimentalClientTasks;
+//# sourceMappingURL=client.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.js.map
new file mode 100644
index 0000000..a5dd7bd
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/experimental/tasks/client.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAOH,6CAAmH;AAkBnH;;;;;;;;;;GAUG;AACH,MAAa,uBAAuB;IAKhC,YAA6B,OAAiD;QAAjD,YAAO,GAAP,OAAO,CAA0C;IAAG,CAAC;IAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,KAAK,CAAC,CAAC,cAAc,CACjB,MAAiC,EACjC,eAAkB,+BAAyB,EAC3C,OAAwB;QAExB,mCAAmC;QACnC,MAAM,cAAc,GAAG,IAAI,CAAC,OAA8C,CAAC;QAE3E,iFAAiF;QACjF,MAAM,eAAe,GAAG;YACpB,GAAG,OAAO;YACV,mFAAmF;YACnF,mEAAmE;YACnE,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;SACnF,CAAC;QAEF,MAAM,MAAM,GAAG,cAAc,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,eAAe,CAAC,CAAC;QAE7G,+DAA+D;QAC/D,MAAM,SAAS,GAAG,cAAc,CAAC,sBAAsB,CAAC,MAAM,CA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extprotocol/sdk/dist/cjs/experimental/tasks/helpers.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.d.ts
new file mode 100644
index 0000000..f5e505f
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.d.ts
@@ -0,0 +1,47 @@
+/**
+ * Experimental task capability assertion helpers.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+/**
+ * Type representing the task requests capability structure.
+ * This is derived from ClientTasksCapability.requests and ServerTasksCapability.requests.
+ */
+interface TaskRequestsCapability {
+ tools?: {
+ call?: object;
+ };
+ sampling?: {
+ createMessage?: object;
+ };
+ elicitation?: {
+ create?: object;
+ };
+}
+/**
+ * Asserts that task creation is supported for tools/call.
+ * Used by Client.assertTaskCapability and Server.assertTaskHandlerCapability.
+ *
+ * @param requests - The task requests capability object
+ * @param method - The method being checked
+ * @param entityName - 'Server' or 'Client' for error messages
+ * @throws Error if the capability is not supported
+ *
+ * @experimental
+ */
+export declare function assertToolsCallTaskCapability(requests: TaskRequestsCapability | undefined, method: string, entityName: 'Server' | 'Client'): void;
+/**
+ * Asserts that task creation is supported for sampling/createMessage or elicitation/create.
+ * Used by Server.assertTaskCapability and Client.assertTaskHandlerCapability.
+ *
+ * @param requests - The task requests capability object
+ * @param method - The method being checked
+ * @param entityName - 'Server' or 'Client' for error messages
+ * @throws Error if the capability is not supported
+ *
+ * @experimental
+ */
+export declare function assertClientRequestTaskCapability(requests: TaskRequestsCapability | undefined, method: string, entityName: 'Server' | 'Client'): void;
+export {};
+//# sourceMappingURL=helpers.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.d.ts.map
new file mode 100644
index 0000000..99dc903
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,UAAU,sBAAsB;IAC5B,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,WAAW,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACrC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,6BAA6B,CACzC,QAAQ,EAAE,sBAAsB,GAAG,SAAS,EAC5C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,QAAQ,GAAG,QAAQ,GAChC,IAAI,CAgBN;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iCAAiC,CAC7C,QAAQ,EAAE,sBAAsB,GAAG,SAAS,EAC5C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,QAAQ,GAAG,QAAQ,GAChC,IAAI,CAsBN"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.js
new file mode 100644
index 0000000..6348ab0
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.js
@@ -0,0 +1,68 @@
+"use strict";
+/**
+ * Experimental task capability assertion helpers.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.assertToolsCallTaskCapability = assertToolsCallTaskCapability;
+exports.assertClientRequestTaskCapability = assertClientRequestTaskCapability;
+/**
+ * Asserts that task creation is supported for tools/call.
+ * Used by Client.assertTaskCapability and Server.assertTaskHandlerCapability.
+ *
+ * @param requests - The task requests capability object
+ * @param method - The method being checked
+ * @param entityName - 'Server' or 'Client' for error messages
+ * @throws Error if the capability is not supported
+ *
+ * @experimental
+ */
+function assertToolsCallTaskCapability(requests, method, entityName) {
+ if (!requests) {
+ throw new Error(`${entityName} does not support task creation (required for ${method})`);
+ }
+ switch (method) {
+ case 'tools/call':
+ if (!requests.tools?.call) {
+ throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
+ }
+ break;
+ default:
+ // Method doesn't support tasks, which is fine - no error
+ break;
+ }
+}
+/**
+ * Asserts that task creation is supported for sampling/createMessage or elicitation/create.
+ * Used by Server.assertTaskCapability and Client.assertTaskHandlerCapability.
+ *
+ * @param requests - The task requests capability object
+ * @param method - The method being checked
+ * @param entityName - 'Server' or 'Client' for error messages
+ * @throws Error if the capability is not supported
+ *
+ * @experimental
+ */
+function assertClientRequestTaskCapability(requests, method, entityName) {
+ if (!requests) {
+ throw new Error(`${entityName} does not support task creation (required for ${method})`);
+ }
+ switch (method) {
+ case 'sampling/createMessage':
+ if (!requests.sampling?.createMessage) {
+ throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`);
+ }
+ break;
+ case 'elicitation/create':
+ if (!requests.elicitation?.create) {
+ throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
+ }
+ break;
+ default:
+ // Method doesn't support tasks, which is fine - no error
+ break;
+ }
+}
+//# sourceMappingURL=helpers.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.js.map
new file mode 100644
index 0000000..1054273
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.js.map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D,MAAM;IACd,CAAC;AACL,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.d.ts
new file mode 100644
index 0000000..33ab791
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.d.ts
@@ -0,0 +1,16 @@
+/**
+ * Experimental task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+export * from './types.js';
+export * from './interfaces.js';
+export * from './helpers.js';
+export * from './client.js';
+export * from './server.js';
+export * from './mcp-server.js';
+export * from './stores/in-memory.js';
+export type { ResponseMessage, TaskStatusMessage, TaskCreatedMessage, ResultMessage, ErrorMessage, BaseResponseMessage } from '../../shared/responseMessage.js';
+export { takeResult, toArrayAsync } from '../../shared/responseMessage.js';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.d.ts.map
new file mode 100644
index 0000000..cf117ed
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,YAAY,CAAC;AAG3B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,cAAc,CAAC;AAG7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,uBAAuB,CAAC;AAGtC,YAAY,EACR,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,mBAAmB,EACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.js
new file mode 100644
index 0000000..25296f6
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.js
@@ -0,0 +1,39 @@
+"use strict";
+/**
+ * Experimental task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.toArrayAsync = exports.takeResult = void 0;
+// Re-export spec types for convenience
+__exportStar(require("./types.js"), exports);
+// SDK implementation interfaces
+__exportStar(require("./interfaces.js"), exports);
+// Assertion helpers
+__exportStar(require("./helpers.js"), exports);
+// Wrapper classes
+__exportStar(require("./client.js"), exports);
+__exportStar(require("./server.js"), exports);
+__exportStar(require("./mcp-server.js"), exports);
+// Store implementations
+__exportStar(require("./stores/in-memory.js"), exports);
+var responseMessage_js_1 = require("../../shared/responseMessage.js");
+Object.defineProperty(exports, "takeResult", { enumerable: true, get: function () { return responseMessage_js_1.takeResult; } });
+Object.defineProperty(exports, "toArrayAsync", { enumerable: true, get: function () { return responseMessage_js_1.toArrayAsync; } });
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.js.map
new file mode 100644
index 0000000..3d57065
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/experimental/tasks/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;AAEH,uCAAuC;AACvC,6CAA2B;AAE3B,gCAAgC;AAChC,kDAAgC;AAEhC,oBAAoB;AACpB,+CAA6B;AAE7B,kBAAkB;AAClB,8CAA4B;AAC5B,8CAA4B;AAC5B,kDAAgC;AAEhC,wBAAwB;AACxB,wDAAsC;AAWtC,sEAA2E;AAAlE,gHAAA,UAAU,OAAA;AAAE,kHAAA,YAAY,OAAA"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts
new file mode 100644
index 0000000..b0bb989
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts
@@ -0,0 +1,232 @@
+/**
+ * Experimental task interfaces for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ */
+import { Task, RequestId, Result, JSONRPCRequest, JSONRPCNotification, JSONRPCResultResponse, JSONRPCErrorResponse, ServerRequest, ServerNotification, CallToolResult, GetTaskResult, ToolExecution, Request } from '../../types.js';
+import { CreateTaskResult } from './types.js';
+import type { RequestHandlerExtra, RequestTaskStore } from '../../shared/protocol.js';
+import type { ZodRawShapeCompat, AnySchema, ShapeOutput } from '../../server/zod-compat.js';
+/**
+ * Extended handler extra with task store for task creation.
+ * @experimental
+ */
+export interface CreateTaskRequestHandlerExtra extends RequestHandlerExtra {
+ taskStore: RequestTaskStore;
+}
+/**
+ * Extended handler extra with task ID and store for task operations.
+ * @experimental
+ */
+export interface TaskRequestHandlerExtra extends RequestHandlerExtra {
+ taskId: string;
+ taskStore: RequestTaskStore;
+}
+/**
+ * Base callback type for tool handlers.
+ * @experimental
+ */
+export type BaseToolCallback, Args extends undefined | ZodRawShapeCompat | AnySchema = undefined> = Args extends ZodRawShapeCompat ? (args: ShapeOutput, extra: ExtraT) => SendResultT | Promise : Args extends AnySchema ? (args: unknown, extra: ExtraT) => SendResultT | Promise : (extra: ExtraT) => SendResultT | Promise;
+/**
+ * Handler for creating a task.
+ * @experimental
+ */
+export type CreateTaskRequestHandler = BaseToolCallback;
+/**
+ * Handler for task operations (get, getResult).
+ * @experimental
+ */
+export type TaskRequestHandler = BaseToolCallback;
+/**
+ * Interface for task-based tool handlers.
+ * @experimental
+ */
+export interface ToolTaskHandler {
+ createTask: CreateTaskRequestHandler;
+ getTask: TaskRequestHandler;
+ getTaskResult: TaskRequestHandler;
+}
+/**
+ * Task-specific execution configuration.
+ * taskSupport cannot be 'forbidden' for task-based tools.
+ * @experimental
+ */
+export type TaskToolExecution = Omit & {
+ taskSupport: TaskSupport extends 'forbidden' | undefined ? never : TaskSupport;
+};
+/**
+ * Represents a message queued for side-channel delivery via tasks/result.
+ *
+ * This is a serializable data structure that can be stored in external systems.
+ * All fields are JSON-serializable.
+ */
+export type QueuedMessage = QueuedRequest | QueuedNotification | QueuedResponse | QueuedError;
+export interface BaseQueuedMessage {
+ /** Type of message */
+ type: string;
+ /** When the message was queued (milliseconds since epoch) */
+ timestamp: number;
+}
+export interface QueuedRequest extends BaseQueuedMessage {
+ type: 'request';
+ /** The actual JSONRPC request */
+ message: JSONRPCRequest;
+}
+export interface QueuedNotification extends BaseQueuedMessage {
+ type: 'notification';
+ /** The actual JSONRPC notification */
+ message: JSONRPCNotification;
+}
+export interface QueuedResponse extends BaseQueuedMessage {
+ type: 'response';
+ /** The actual JSONRPC response */
+ message: JSONRPCResultResponse;
+}
+export interface QueuedError extends BaseQueuedMessage {
+ type: 'error';
+ /** The actual JSONRPC error */
+ message: JSONRPCErrorResponse;
+}
+/**
+ * Interface for managing per-task FIFO message queues.
+ *
+ * Similar to TaskStore, this allows pluggable queue implementations
+ * (in-memory, Redis, other distributed queues, etc.).
+ *
+ * Each method accepts taskId and optional sessionId parameters to enable
+ * a single queue instance to manage messages for multiple tasks, with
+ * isolation based on task ID and session ID.
+ *
+ * All methods are async to support external storage implementations.
+ * All data in QueuedMessage must be JSON-serializable.
+ *
+ * @experimental
+ */
+export interface TaskMessageQueue {
+ /**
+ * Adds a message to the end of the queue for a specific task.
+ * Atomically checks queue size and throws if maxSize would be exceeded.
+ * @param taskId The task identifier
+ * @param message The message to enqueue
+ * @param sessionId Optional session ID for binding the operation to a specific session
+ * @param maxSize Optional maximum queue size - if specified and queue is full, throws an error
+ * @throws Error if maxSize is specified and would be exceeded
+ */
+ enqueue(taskId: string, message: QueuedMessage, sessionId?: string, maxSize?: number): Promise;
+ /**
+ * Removes and returns the first message from the queue for a specific task.
+ * @param taskId The task identifier
+ * @param sessionId Optional session ID for binding the query to a specific session
+ * @returns The first message, or undefined if the queue is empty
+ */
+ dequeue(taskId: string, sessionId?: string): Promise;
+ /**
+ * Removes and returns all messages from the queue for a specific task.
+ * Used when tasks are cancelled or failed to clean up pending messages.
+ * @param taskId The task identifier
+ * @param sessionId Optional session ID for binding the query to a specific session
+ * @returns Array of all messages that were in the queue
+ */
+ dequeueAll(taskId: string, sessionId?: string): Promise;
+}
+/**
+ * Task creation options.
+ * @experimental
+ */
+export interface CreateTaskOptions {
+ /**
+ * Time in milliseconds to keep task results available after completion.
+ * If null, the task has unlimited lifetime until manually cleaned up.
+ */
+ ttl?: number | null;
+ /**
+ * Time in milliseconds to wait between task status requests.
+ */
+ pollInterval?: number;
+ /**
+ * Additional context to pass to the task store.
+ */
+ context?: Record;
+}
+/**
+ * Interface for storing and retrieving task state and results.
+ *
+ * Similar to Transport, this allows pluggable task storage implementations
+ * (in-memory, database, distributed cache, etc.).
+ *
+ * @experimental
+ */
+export interface TaskStore {
+ /**
+ * Creates a new task with the given creation parameters and original request.
+ * The implementation must generate a unique taskId and createdAt timestamp.
+ *
+ * TTL Management:
+ * - The implementation receives the TTL suggested by the requestor via taskParams.ttl
+ * - The implementation MAY override the requested TTL (e.g., to enforce limits)
+ * - The actual TTL used MUST be returned in the Task object
+ * - Null TTL indicates unlimited task lifetime (no automatic cleanup)
+ * - Cleanup SHOULD occur automatically after TTL expires, regardless of task status
+ *
+ * @param taskParams - The task creation parameters from the request (ttl, pollInterval)
+ * @param requestId - The JSON-RPC request ID
+ * @param request - The original request that triggered task creation
+ * @param sessionId - Optional session ID for binding the task to a specific session
+ * @returns The created task object
+ */
+ createTask(taskParams: CreateTaskOptions, requestId: RequestId, request: Request, sessionId?: string): Promise;
+ /**
+ * Gets the current status of a task.
+ *
+ * @param taskId - The task identifier
+ * @param sessionId - Optional session ID for binding the query to a specific session
+ * @returns The task object, or null if it does not exist
+ */
+ getTask(taskId: string, sessionId?: string): Promise;
+ /**
+ * Stores the result of a task and sets its final status.
+ *
+ * @param taskId - The task identifier
+ * @param status - The final status: 'completed' for success, 'failed' for errors
+ * @param result - The result to store
+ * @param sessionId - Optional session ID for binding the operation to a specific session
+ */
+ storeTaskResult(taskId: string, status: 'completed' | 'failed', result: Result, sessionId?: string): Promise;
+ /**
+ * Retrieves the stored result of a task.
+ *
+ * @param taskId - The task identifier
+ * @param sessionId - Optional session ID for binding the query to a specific session
+ * @returns The stored result
+ */
+ getTaskResult(taskId: string, sessionId?: string): Promise;
+ /**
+ * Updates a task's status (e.g., to 'cancelled', 'failed', 'completed').
+ *
+ * @param taskId - The task identifier
+ * @param status - The new status
+ * @param statusMessage - Optional diagnostic message for failed tasks or other status information
+ * @param sessionId - Optional session ID for binding the operation to a specific session
+ */
+ updateTaskStatus(taskId: string, status: Task['status'], statusMessage?: string, sessionId?: string): Promise;
+ /**
+ * Lists tasks, optionally starting from a pagination cursor.
+ *
+ * @param cursor - Optional cursor for pagination
+ * @param sessionId - Optional session ID for binding the query to a specific session
+ * @returns An object containing the tasks array and an optional nextCursor
+ */
+ listTasks(cursor?: string, sessionId?: string): Promise<{
+ tasks: Task[];
+ nextCursor?: string;
+ }>;
+}
+/**
+ * Checks if a task status represents a terminal state.
+ * Terminal states are those where the task has finished and will not change.
+ *
+ * @param status - The task status to check
+ * @returns True if the status is terminal (completed, failed, or cancelled)
+ * @experimental
+ */
+export declare function isTerminal(status: Task['status']): boolean;
+//# sourceMappingURL=interfaces.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts.map
new file mode 100644
index 0000000..afd1d70
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,IAAI,EACJ,SAAS,EACT,MAAM,EACN,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,aAAa,EACb,OAAO,EACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,mBA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AAE,MAAM,EAAE,WAAW,GAAG,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnH;;;;;;OAMG;IACH,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnE;;;;;;;OAOG;IACH,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpH;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnG;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,OAAO,CAE1D"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.js
new file mode 100644
index 0000000..8f533bb
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.js
@@ -0,0 +1,19 @@
+"use strict";
+/**
+ * Experimental task interfaces for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isTerminal = isTerminal;
+/**
+ * Checks if a task status represents a terminal state.
+ * Terminal states are those where the task has finished and will not change.
+ *
+ * @param status - The task status to check
+ * @returns True if the status is terminal (completed, failed, or cancelled)
+ * @experimental
+ */
+function isTerminal(status) {
+ return status === 'completed' || status === 'failed' || status === 'cancelled';
+}
+//# sourceMappingURL=interfaces.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.js.map
new file mode 100644
index 0000000..c3cd4ed
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/experimental/tasks/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AA2RH,gCAEC;AAVD;;;;;;;GAOG;AACH,SAAgB,UAAU,CAAC,MAAsB;IAC7C,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,WAAW,CAAC;AACnF,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.d.ts
new file mode 100644
index 0000000..b3244f9
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.d.ts
@@ -0,0 +1,77 @@
+/**
+ * Experimental McpServer task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+import type { McpServer, RegisteredTool } from '../../server/mcp.js';
+import type { ZodRawShapeCompat, AnySchema } from '../../server/zod-compat.js';
+import type { ToolAnnotations } from '../../types.js';
+import type { ToolTaskHandler, TaskToolExecution } from './interfaces.js';
+/**
+ * Experimental task features for McpServer.
+ *
+ * Access via `server.experimental.tasks`:
+ * ```typescript
+ * server.experimental.tasks.registerToolTask('long-running', config, handler);
+ * ```
+ *
+ * @experimental
+ */
+export declare class ExperimentalMcpServerTasks {
+ private readonly _mcpServer;
+ constructor(_mcpServer: McpServer);
+ /**
+ * Registers a task-based tool with a config object and handler.
+ *
+ * Task-based tools support long-running operations that can be polled for status
+ * and results. The handler must implement `createTask`, `getTask`, and `getTaskResult`
+ * methods.
+ *
+ * @example
+ * ```typescript
+ * server.experimental.tasks.registerToolTask('long-computation', {
+ * description: 'Performs a long computation',
+ * inputSchema: { input: z.string() },
+ * execution: { taskSupport: 'required' }
+ * }, {
+ * createTask: async (args, extra) => {
+ * const task = await extra.taskStore.createTask({ ttl: 300000 });
+ * startBackgroundWork(task.taskId, args);
+ * return { task };
+ * },
+ * getTask: async (args, extra) => {
+ * return extra.taskStore.getTask(extra.taskId);
+ * },
+ * getTaskResult: async (args, extra) => {
+ * return extra.taskStore.getTaskResult(extra.taskId);
+ * }
+ * });
+ * ```
+ *
+ * @param name - The tool name
+ * @param config - Tool configuration (description, schemas, etc.)
+ * @param handler - Task handler with createTask, getTask, getTaskResult methods
+ * @returns RegisteredTool for managing the tool's lifecycle
+ *
+ * @experimental
+ */
+ registerToolTask(name: string, config: {
+ title?: string;
+ description?: string;
+ outputSchema?: OutputArgs;
+ annotations?: ToolAnnotations;
+ execution?: TaskToolExecution;
+ _meta?: Record;
+ }, handler: ToolTaskHandler): RegisteredTool;
+ registerToolTask(name: string, config: {
+ title?: string;
+ description?: string;
+ inputSchema: InputArgs;
+ outputSchema?: OutputArgs;
+ annotations?: ToolAnnotations;
+ execution?: TaskToolExecution;
+ _meta?: Record;
+ }, handler: ToolTaskHandler): RegisteredTool;
+}
+//# sourceMappingURL=mcp-server.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.d.ts.map
new file mode 100644
index 0000000..84ee9e0
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/mcp-server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAkB,MAAM,qBAAqB,CAAC;AACrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAoB1E;;;;;;;;;GASG;AACH,qBAAa,0BAA0B;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,SAAS;IAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,gBAAgB,CAAC,UAAU,SAAS,SAAS,GAAG,iBAAiB,GAAG,SAAS,EACzE,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,UAAU,CAAC;QAC1B,WAAW,CAAC,EAAE,eAAe,CAAC;QAC9B,SAAS,CAAC,EAAE,iBAAiB,CAAC;QAC9B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC,EACD,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,GACpC,cAAc;IAEjB,gBAAgB,CAAC,SAAS,SAAS,iBAAiB,GAAG,SAAS,EAAE,UAAU,SAAS,SAAS,GAAG,iBAAiB,GAAG,SAAS,EAC1H,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,SAAS,CAAC;QACvB,YAAY,CAAC,EAAE,UAAU,CAAC;QAC1B,WAAW,CAAC,EAAE,eAAe,CAAC;QAC9B,SAAS,CAAC,EAAE,iBAAiB,CAAC;QAC9B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC,EACD,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,GACpC,cAAc;CAsCpB"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.js
new file mode 100644
index 0000000..a2718e1
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.js
@@ -0,0 +1,36 @@
+"use strict";
+/**
+ * Experimental McpServer task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ExperimentalMcpServerTasks = void 0;
+/**
+ * Experimental task features for McpServer.
+ *
+ * Access via `server.experimental.tasks`:
+ * ```typescript
+ * server.experimental.tasks.registerToolTask('long-running', config, handler);
+ * ```
+ *
+ * @experimental
+ */
+class ExperimentalMcpServerTasks {
+ constructor(_mcpServer) {
+ this._mcpServer = _mcpServer;
+ }
+ registerToolTask(name, config, handler) {
+ // Validate that taskSupport is not 'forbidden' for task-based tools
+ const execution = { taskSupport: 'required', ...config.execution };
+ if (execution.taskSupport === 'forbidden') {
+ throw new Error(`Cannot register task-based tool '${name}' with taskSupport 'forbidden'. Use registerTool() instead.`);
+ }
+ // Access McpServer's internal _createRegisteredTool method
+ const mcpServerInternal = this._mcpServer;
+ return mcpServerInternal._createRegisteredTool(name, config.title, config.description, config.inputSchema, config.outputSchema, config.annotations, execution, config._meta, handler);
+ }
+}
+exports.ExperimentalMcpServerTasks = ExperimentalMcpServerTasks;
+//# sourceMappingURL=mcp-server.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.js.map
new file mode 100644
index 0000000..ff3e8c4
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../../../../src/experimental/tasks/mcp-server.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAyBH;;;;;;;;;GASG;AACH,MAAa,0BAA0B;IACnC,YAA6B,UAAqB;QAArB,eAAU,GAAV,UAAU,CAAW;IAAG,CAAC;IAgEtD,gBAAgB,CAIZ,IAAY,EACZ,MAQC,EACD,OAAmC;QAEnC,oEAAoE;QACpE,MAAM,SAAS,GAAkB,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAClF,IAAI,SAAS,CAAC,WAAW,KAAK,WAAW,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,oCAAoC,IAAI,6DAA6D,CAAC,CAAC;QAC3H,CAAC;QAED,2DAA2D;QAC3D,MAAM,iBAAiB,GAAG,IAAI,CAAC,UAA0C,CAAC;QAC1E,OAAO,iBAAiB,CAAC,qBAAqB,CAC1C,IAAI,EACJ,MAAM,CAAC,KAAK,EACZ,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,YAAY,EACnB,MAAM,CAAC,WAAW,EAClB,SAAS,EACT,MAAM,CAAC,KAAK,EACZ,OAAwD,CAC3D,CAAC;IACN,CAAC;CACJ;AArGD,gEAqGC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.d.ts
new file mode 100644
index 0000000..45ac3d6
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.d.ts
@@ -0,0 +1,170 @@
+/**
+ * Experimental server task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+import type { Server } from '../../server/index.js';
+import type { RequestOptions } from '../../shared/protocol.js';
+import type { ResponseMessage } from '../../shared/responseMessage.js';
+import type { AnySchema, SchemaOutput } from '../../server/zod-compat.js';
+import type { ServerRequest, Notification, Request, Result, GetTaskResult, ListTasksResult, CancelTaskResult, CreateMessageRequestParams, CreateMessageResult, ElicitRequestFormParams, ElicitRequestURLParams, ElicitResult } from '../../types.js';
+/**
+ * Experimental task features for low-level MCP servers.
+ *
+ * Access via `server.experimental.tasks`:
+ * ```typescript
+ * const stream = server.experimental.tasks.requestStream(request, schema, options);
+ * ```
+ *
+ * For high-level server usage with task-based tools, use `McpServer.experimental.tasks` instead.
+ *
+ * @experimental
+ */
+export declare class ExperimentalServerTasks {
+ private readonly _server;
+ constructor(_server: Server);
+ /**
+ * Sends a request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * This method provides streaming access to request processing, allowing you to
+ * observe intermediate task status updates for task-augmented requests.
+ *
+ * @param request - The request to send
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ requestStream(request: ServerRequest | RequestT, resultSchema: T, options?: RequestOptions): AsyncGenerator>, void, void>;
+ /**
+ * Sends a sampling request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * For task-augmented requests, yields 'taskCreated' and 'taskStatus' messages
+ * before the final result.
+ *
+ * @example
+ * ```typescript
+ * const stream = server.experimental.tasks.createMessageStream({
+ * messages: [{ role: 'user', content: { type: 'text', text: 'Hello' } }],
+ * maxTokens: 100
+ * }, {
+ * onprogress: (progress) => {
+ * // Handle streaming tokens via progress notifications
+ * console.log('Progress:', progress.message);
+ * }
+ * });
+ *
+ * for await (const message of stream) {
+ * switch (message.type) {
+ * case 'taskCreated':
+ * console.log('Task created:', message.task.taskId);
+ * break;
+ * case 'taskStatus':
+ * console.log('Task status:', message.task.status);
+ * break;
+ * case 'result':
+ * console.log('Final result:', message.result);
+ * break;
+ * case 'error':
+ * console.error('Error:', message.error);
+ * break;
+ * }
+ * }
+ * ```
+ *
+ * @param params - The sampling request parameters
+ * @param options - Optional request options (timeout, signal, task creation params, onprogress, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ createMessageStream(params: CreateMessageRequestParams, options?: RequestOptions): AsyncGenerator, void, void>;
+ /**
+ * Sends an elicitation request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * For task-augmented requests (especially URL-based elicitation), yields 'taskCreated'
+ * and 'taskStatus' messages before the final result.
+ *
+ * @example
+ * ```typescript
+ * const stream = server.experimental.tasks.elicitInputStream({
+ * mode: 'url',
+ * message: 'Please authenticate',
+ * elicitationId: 'auth-123',
+ * url: 'https://example.com/auth'
+ * }, {
+ * task: { ttl: 300000 } // Task-augmented for long-running auth flow
+ * });
+ *
+ * for await (const message of stream) {
+ * switch (message.type) {
+ * case 'taskCreated':
+ * console.log('Task created:', message.task.taskId);
+ * break;
+ * case 'taskStatus':
+ * console.log('Task status:', message.task.status);
+ * break;
+ * case 'result':
+ * console.log('User action:', message.result.action);
+ * break;
+ * case 'error':
+ * console.error('Error:', message.error);
+ * break;
+ * }
+ * }
+ * ```
+ *
+ * @param params - The elicitation request parameters
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ elicitInputStream(params: ElicitRequestFormParams | ElicitRequestURLParams, options?: RequestOptions): AsyncGenerator, void, void>;
+ /**
+ * Gets the current status of a task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ * @returns The task status
+ *
+ * @experimental
+ */
+ getTask(taskId: string, options?: RequestOptions): Promise;
+ /**
+ * Retrieves the result of a completed task.
+ *
+ * @param taskId - The task identifier
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options
+ * @returns The task result
+ *
+ * @experimental
+ */
+ getTaskResult(taskId: string, resultSchema?: T, options?: RequestOptions): Promise>;
+ /**
+ * Lists tasks with optional pagination.
+ *
+ * @param cursor - Optional pagination cursor
+ * @param options - Optional request options
+ * @returns List of tasks with optional next cursor
+ *
+ * @experimental
+ */
+ listTasks(cursor?: string, options?: RequestOptions): Promise;
+ /**
+ * Cancels a running task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ *
+ * @experimental
+ */
+ cancelTask(taskId: string, options?: RequestOptions): Promise;
+}
+//# sourceMappingURL=server.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.d.ts.map
new file mode 100644
index 0000000..48c996b
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0B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AC,EAAE,IAAI,EAAE,IAAI,CAAC;IAoC5D;;;;;;;;OAQG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAK/E;;;;;;;;;OASG;IACG,aAAa,CAAC,CAAC,SAAS,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAY9H;;;;;;;;OAQG;IACG,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;IAQpF;;;;;;;OAOG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAOxF"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.js
new file mode 100644
index 0000000..5da86c9
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.js
@@ -0,0 +1,250 @@
+"use strict";
+/**
+ * Experimental server task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ExperimentalServerTasks = void 0;
+const types_js_1 = require("../../types.js");
+/**
+ * Experimental task features for low-level MCP servers.
+ *
+ * Access via `server.experimental.tasks`:
+ * ```typescript
+ * const stream = server.experimental.tasks.requestStream(request, schema, options);
+ * ```
+ *
+ * For high-level server usage with task-based tools, use `McpServer.experimental.tasks` instead.
+ *
+ * @experimental
+ */
+class ExperimentalServerTasks {
+ constructor(_server) {
+ this._server = _server;
+ }
+ /**
+ * Sends a request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * This method provides streaming access to request processing, allowing you to
+ * observe intermediate task status updates for task-augmented requests.
+ *
+ * @param request - The request to send
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ requestStream(request, resultSchema, options) {
+ return this._server.requestStream(request, resultSchema, options);
+ }
+ /**
+ * Sends a sampling request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * For task-augmented requests, yields 'taskCreated' and 'taskStatus' messages
+ * before the final result.
+ *
+ * @example
+ * ```typescript
+ * const stream = server.experimental.tasks.createMessageStream({
+ * messages: [{ role: 'user', content: { type: 'text', text: 'Hello' } }],
+ * maxTokens: 100
+ * }, {
+ * onprogress: (progress) => {
+ * // Handle streaming tokens via progress notifications
+ * console.log('Progress:', progress.message);
+ * }
+ * });
+ *
+ * for await (const message of stream) {
+ * switch (message.type) {
+ * case 'taskCreated':
+ * console.log('Task created:', message.task.taskId);
+ * break;
+ * case 'taskStatus':
+ * console.log('Task status:', message.task.status);
+ * break;
+ * case 'result':
+ * console.log('Final result:', message.result);
+ * break;
+ * case 'error':
+ * console.error('Error:', message.error);
+ * break;
+ * }
+ * }
+ * ```
+ *
+ * @param params - The sampling request parameters
+ * @param options - Optional request options (timeout, signal, task creation params, onprogress, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ createMessageStream(params, options) {
+ // Access client capabilities via the server
+ const clientCapabilities = this._server.getClientCapabilities();
+ // Capability check - only required when tools/toolChoice are provided
+ if ((params.tools || params.toolChoice) && !clientCapabilities?.sampling?.tools) {
+ throw new Error('Client does not support sampling tools capability.');
+ }
+ // Message structure validation - always validate tool_use/tool_result pairs.
+ // These may appear even without tools/toolChoice in the current request when
+ // a previous sampling request returned tool_use and this is a follow-up with results.
+ if (params.messages.length > 0) {
+ const lastMessage = params.messages[params.messages.length - 1];
+ const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];
+ const hasToolResults = lastContent.some(c => c.type === 'tool_result');
+ const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : undefined;
+ const previousContent = previousMessage
+ ? Array.isArray(previousMessage.content)
+ ? previousMessage.content
+ : [previousMessage.content]
+ : [];
+ const hasPreviousToolUse = previousContent.some(c => c.type === 'tool_use');
+ if (hasToolResults) {
+ if (lastContent.some(c => c.type !== 'tool_result')) {
+ throw new Error('The last message must contain only tool_result content if any is present');
+ }
+ if (!hasPreviousToolUse) {
+ throw new Error('tool_result blocks are not matching any tool_use from the previous message');
+ }
+ }
+ if (hasPreviousToolUse) {
+ // Extract tool_use IDs from previous message and tool_result IDs from current message
+ const toolUseIds = new Set(previousContent.filter(c => c.type === 'tool_use').map(c => c.id));
+ const toolResultIds = new Set(lastContent.filter(c => c.type === 'tool_result').map(c => c.toolUseId));
+ if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every(id => toolResultIds.has(id))) {
+ throw new Error('ids of tool_result blocks and tool_use blocks from previous message do not match');
+ }
+ }
+ }
+ return this.requestStream({
+ method: 'sampling/createMessage',
+ params
+ }, types_js_1.CreateMessageResultSchema, options);
+ }
+ /**
+ * Sends an elicitation request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * For task-augmented requests (especially URL-based elicitation), yields 'taskCreated'
+ * and 'taskStatus' messages before the final result.
+ *
+ * @example
+ * ```typescript
+ * const stream = server.experimental.tasks.elicitInputStream({
+ * mode: 'url',
+ * message: 'Please authenticate',
+ * elicitationId: 'auth-123',
+ * url: 'https://example.com/auth'
+ * }, {
+ * task: { ttl: 300000 } // Task-augmented for long-running auth flow
+ * });
+ *
+ * for await (const message of stream) {
+ * switch (message.type) {
+ * case 'taskCreated':
+ * console.log('Task created:', message.task.taskId);
+ * break;
+ * case 'taskStatus':
+ * console.log('Task status:', message.task.status);
+ * break;
+ * case 'result':
+ * console.log('User action:', message.result.action);
+ * break;
+ * case 'error':
+ * console.error('Error:', message.error);
+ * break;
+ * }
+ * }
+ * ```
+ *
+ * @param params - The elicitation request parameters
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ elicitInputStream(params, options) {
+ // Access client capabilities via the server
+ const clientCapabilities = this._server.getClientCapabilities();
+ const mode = params.mode ?? 'form';
+ // Capability check based on mode
+ switch (mode) {
+ case 'url': {
+ if (!clientCapabilities?.elicitation?.url) {
+ throw new Error('Client does not support url elicitation.');
+ }
+ break;
+ }
+ case 'form': {
+ if (!clientCapabilities?.elicitation?.form) {
+ throw new Error('Client does not support form elicitation.');
+ }
+ break;
+ }
+ }
+ // Normalize params to ensure mode is set for form mode (defaults to 'form' per spec)
+ const normalizedParams = mode === 'form' && params.mode === undefined ? { ...params, mode: 'form' } : params;
+ // Cast to ServerRequest needed because TypeScript can't narrow the union type
+ // based on the discriminated 'method' field when constructing the object literal
+ return this.requestStream({
+ method: 'elicitation/create',
+ params: normalizedParams
+ }, types_js_1.ElicitResultSchema, options);
+ }
+ /**
+ * Gets the current status of a task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ * @returns The task status
+ *
+ * @experimental
+ */
+ async getTask(taskId, options) {
+ return this._server.getTask({ taskId }, options);
+ }
+ /**
+ * Retrieves the result of a completed task.
+ *
+ * @param taskId - The task identifier
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options
+ * @returns The task result
+ *
+ * @experimental
+ */
+ async getTaskResult(taskId, resultSchema, options) {
+ return this._server.getTaskResult({ taskId }, resultSchema, options);
+ }
+ /**
+ * Lists tasks with optional pagination.
+ *
+ * @param cursor - Optional pagination cursor
+ * @param options - Optional request options
+ * @returns List of tasks with optional next cursor
+ *
+ * @experimental
+ */
+ async listTasks(cursor, options) {
+ return this._server.listTasks(cursor ? { cursor } : undefined, options);
+ }
+ /**
+ * Cancels a running task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ *
+ * @experimental
+ */
+ async cancelTask(taskId, options) {
+ return this._server.cancelTask({ taskId }, options);
+ }
+}
+exports.ExperimentalServerTasks = ExperimentalServerTasks;
+//# sourceMappingURL=server.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.js.map
new file mode 100644
index 0000000..5beb316
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../src/experimental/tasks/server.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAoBH,6CAA+E;AAE/E;;;;;;;;;;;GAWG;AACH,MAAa,uBAAuB;IAKhC,YAA6B,OAAiD;QAAjD,YAAO,GAAP,OAAO,CAA0C;IAAG,CAAC;IAElF;;;;;;;;;;;;;OAaG;IACH,aAAa,CACT,OAAiC,EACjC,YAAe,EACf,OAAwB;QAUxB,OAAQ,IAAI,CAAC,OAA8C,CAAC,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IAC9G,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,mBAAmB,CACf,MAAkC,EAClC,OAAwB;QAExB,4CAA4C;QAC5C,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC;QAEhE,sEAAsE;QACtE,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,EAAE,QAA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AED;;;;;;;;OAQG;IACH,KAAK,CAAC,SAAS,CAAC,MAAe,EAAE,OAAwB;QACrD,OACI,IAAI,CAAC,OAGR,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,UAAU,CAAC,MAAc,EAAE,OAAwB;QACrD,OACI,IAAI,CAAC,OAGR,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACJ;AA/RD,0DA+RC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts
new file mode 100644
index 0000000..d30795e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts
@@ -0,0 +1,94 @@
+/**
+ * In-memory implementations of TaskStore and TaskMessageQueue.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+import { Task, RequestId, Result, Request } from '../../../types.js';
+import { TaskStore, TaskMessageQueue, QueuedMessage, CreateTaskOptions } from '../interfaces.js';
+/**
+ * A simple in-memory implementation of TaskStore for demonstration purposes.
+ *
+ * This implementation stores all tasks in memory and provides automatic cleanup
+ * based on the ttl duration specified in the task creation parameters.
+ *
+ * Note: This is not suitable for production use as all data is lost on restart.
+ * For production, consider implementing TaskStore with a database or distributed cache.
+ *
+ * @experimental
+ */
+export declare class InMemoryTaskStore implements TaskStore {
+ private tasks;
+ private cleanupTimers;
+ /**
+ * Generates a unique task ID.
+ * Uses 16 bytes of random data encoded as hex (32 characters).
+ */
+ private generateTaskId;
+ createTask(taskParams: CreateTaskOptions, requestId: RequestId, request: Request, _sessionId?: string): Promise;
+ getTask(taskId: string, _sessionId?: string): Promise;
+ storeTaskResult(taskId: string, status: 'completed' | 'failed', result: Result, _sessionId?: string): Promise;
+ getTaskResult(taskId: string, _sessionId?: string): Promise;
+ updateTaskStatus(taskId: string, status: Task['status'], statusMessage?: string, _sessionId?: string): Promise;
+ listTasks(cursor?: string, _sessionId?: string): Promise<{
+ tasks: Task[];
+ nextCursor?: string;
+ }>;
+ /**
+ * Cleanup all timers (useful for testing or graceful shutdown)
+ */
+ cleanup(): void;
+ /**
+ * Get all tasks (useful for debugging)
+ */
+ getAllTasks(): Task[];
+}
+/**
+ * A simple in-memory implementation of TaskMessageQueue for demonstration purposes.
+ *
+ * This implementation stores messages in memory, organized by task ID and optional session ID.
+ * Messages are stored in FIFO queues per task.
+ *
+ * Note: This is not suitable for production use in distributed systems.
+ * For production, consider implementing TaskMessageQueue with Redis or other distributed queues.
+ *
+ * @experimental
+ */
+export declare class InMemoryTaskMessageQueue implements TaskMessageQueue {
+ private queues;
+ /**
+ * Generates a queue key from taskId.
+ * SessionId is intentionally ignored because taskIds are globally unique
+ * and tasks need to be accessible across HTTP requests/sessions.
+ */
+ private getQueueKey;
+ /**
+ * Gets or creates a queue for the given task and session.
+ */
+ private getQueue;
+ /**
+ * Adds a message to the end of the queue for a specific task.
+ * Atomically checks queue size and throws if maxSize would be exceeded.
+ * @param taskId The task identifier
+ * @param message The message to enqueue
+ * @param sessionId Optional session ID for binding the operation to a specific session
+ * @param maxSize Optional maximum queue size - if specified and queue is full, throws an error
+ * @throws Error if maxSize is specified and would be exceeded
+ */
+ enqueue(taskId: string, message: QueuedMessage, sessionId?: string, maxSize?: number): Promise;
+ /**
+ * Removes and returns the first message from the queue for a specific task.
+ * @param taskId The task identifier
+ * @param sessionId Optional session ID for binding the query to a specific session
+ * @returns The first message, or undefined if the queue is empty
+ */
+ dequeue(taskId: string, sessionId?: string): Promise;
+ /**
+ * Removes and returns all messages from the queue for a specific task.
+ * @param taskId The task identifier
+ * @param sessionId Optional session ID for binding the query to a specific session
+ * @returns Array of all messages that were in the queue
+ */
+ dequeueAll(taskId: string, sessionId?: string): Promise;
+}
+//# sourceMappingURL=in-memory.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts.map
new file mode 100644
index 0000000..1825e87
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"in-memory.d.ts","sourceRoot":"","sources":["../../../../../src/experimental/tasks/stores/in-memory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAc,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAU7G;;;;;;;;;;GAUG;AACH,qBAAa,iBAAkB,YAAW,SAAS;IAC/C,OAAO,CAAC,KAAK,CAAiC;IAC9C,OAAO,CAAC,aAAa,CAAoD;IAEzE;;;OAGG;IACH,OAAO,CAAC,cAAc;IAIhB,UAAU,CAAC,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA0CrH,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAKlE,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,QAAQ,EAAE,MAAM,EAAE,MAAM,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extprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js
new file mode 100644
index 0000000..fe1b1e7
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js
@@ -0,0 +1,251 @@
+"use strict";
+/**
+ * In-memory implementations of TaskStore and TaskMessageQueue.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InMemoryTaskMessageQueue = exports.InMemoryTaskStore = void 0;
+const interfaces_js_1 = require("../interfaces.js");
+const node_crypto_1 = require("node:crypto");
+/**
+ * A simple in-memory implementation of TaskStore for demonstration purposes.
+ *
+ * This implementation stores all tasks in memory and provides automatic cleanup
+ * based on the ttl duration specified in the task creation parameters.
+ *
+ * Note: This is not suitable for production use as all data is lost on restart.
+ * For production, consider implementing TaskStore with a database or distributed cache.
+ *
+ * @experimental
+ */
+class InMemoryTaskStore {
+ constructor() {
+ this.tasks = new Map();
+ this.cleanupTimers = new Map();
+ }
+ /**
+ * Generates a unique task ID.
+ * Uses 16 bytes of random data encoded as hex (32 characters).
+ */
+ generateTaskId() {
+ return (0, node_crypto_1.randomBytes)(16).toString('hex');
+ }
+ async createTask(taskParams, requestId, request, _sessionId) {
+ // Generate a unique task ID
+ const taskId = this.generateTaskId();
+ // Ensure uniqueness
+ if (this.tasks.has(taskId)) {
+ throw new Error(`Task with ID ${taskId} already exists`);
+ }
+ const actualTtl = taskParams.ttl ?? null;
+ // Create task with generated ID and timestamps
+ const createdAt = new Date().toISOString();
+ const task = {
+ taskId,
+ status: 'working',
+ ttl: actualTtl,
+ createdAt,
+ lastUpdatedAt: createdAt,
+ pollInterval: taskParams.pollInterval ?? 1000
+ };
+ this.tasks.set(taskId, {
+ task,
+ request,
+ requestId
+ });
+ // Schedule cleanup if ttl is specified
+ // Cleanup occurs regardless of task status
+ if (actualTtl) {
+ const timer = setTimeout(() => {
+ this.tasks.delete(taskId);
+ this.cleanupTimers.delete(taskId);
+ }, actualTtl);
+ this.cleanupTimers.set(taskId, timer);
+ }
+ return task;
+ }
+ async getTask(taskId, _sessionId) {
+ const stored = this.tasks.get(taskId);
+ return stored ? { ...stored.task } : null;
+ }
+ async storeTaskResult(taskId, status, result, _sessionId) {
+ const stored = this.tasks.get(taskId);
+ if (!stored) {
+ throw new Error(`Task with ID ${taskId} not found`);
+ }
+ // Don't allow storing results for tasks already in terminal state
+ if ((0, interfaces_js_1.isTerminal)(stored.task.status)) {
+ throw new Error(`Cannot store result for task ${taskId} in terminal status '${stored.task.status}'. Task results can only be stored once.`);
+ }
+ stored.result = result;
+ stored.task.status = status;
+ stored.task.lastUpdatedAt = new Date().toISOString();
+ // Reset cleanup timer to start from now (if ttl is set)
+ if (stored.task.ttl) {
+ const existingTimer = this.cleanupTimers.get(taskId);
+ if (existingTimer) {
+ clearTimeout(existingTimer);
+ }
+ const timer = setTimeout(() => {
+ this.tasks.delete(taskId);
+ this.cleanupTimers.delete(taskId);
+ }, stored.task.ttl);
+ this.cleanupTimers.set(taskId, timer);
+ }
+ }
+ async getTaskResult(taskId, _sessionId) {
+ const stored = this.tasks.get(taskId);
+ if (!stored) {
+ throw new Error(`Task with ID ${taskId} not found`);
+ }
+ if (!stored.result) {
+ throw new Error(`Task ${taskId} has no result stored`);
+ }
+ return stored.result;
+ }
+ async updateTaskStatus(taskId, status, statusMessage, _sessionId) {
+ const stored = this.tasks.get(taskId);
+ if (!stored) {
+ throw new Error(`Task with ID ${taskId} not found`);
+ }
+ // Don't allow transitions from terminal states
+ if ((0, interfaces_js_1.isTerminal)(stored.task.status)) {
+ throw new Error(`Cannot update task ${taskId} from terminal status '${stored.task.status}' to '${status}'. Terminal states (completed, failed, cancelled) cannot transition to other states.`);
+ }
+ stored.task.status = status;
+ if (statusMessage) {
+ stored.task.statusMessage = statusMessage;
+ }
+ stored.task.lastUpdatedAt = new Date().toISOString();
+ // If task is in a terminal state and has ttl, start cleanup timer
+ if ((0, interfaces_js_1.isTerminal)(status) && stored.task.ttl) {
+ const existingTimer = this.cleanupTimers.get(taskId);
+ if (existingTimer) {
+ clearTimeout(existingTimer);
+ }
+ const timer = setTimeout(() => {
+ this.tasks.delete(taskId);
+ this.cleanupTimers.delete(taskId);
+ }, stored.task.ttl);
+ this.cleanupTimers.set(taskId, timer);
+ }
+ }
+ async listTasks(cursor, _sessionId) {
+ const PAGE_SIZE = 10;
+ const allTaskIds = Array.from(this.tasks.keys());
+ let startIndex = 0;
+ if (cursor) {
+ const cursorIndex = allTaskIds.indexOf(cursor);
+ if (cursorIndex >= 0) {
+ startIndex = cursorIndex + 1;
+ }
+ else {
+ // Invalid cursor - throw error
+ throw new Error(`Invalid cursor: ${cursor}`);
+ }
+ }
+ const pageTaskIds = allTaskIds.slice(startIndex, startIndex + PAGE_SIZE);
+ const tasks = pageTaskIds.map(taskId => {
+ const stored = this.tasks.get(taskId);
+ return { ...stored.task };
+ });
+ const nextCursor = startIndex + PAGE_SIZE < allTaskIds.length ? pageTaskIds[pageTaskIds.length - 1] : undefined;
+ return { tasks, nextCursor };
+ }
+ /**
+ * Cleanup all timers (useful for testing or graceful shutdown)
+ */
+ cleanup() {
+ for (const timer of this.cleanupTimers.values()) {
+ clearTimeout(timer);
+ }
+ this.cleanupTimers.clear();
+ this.tasks.clear();
+ }
+ /**
+ * Get all tasks (useful for debugging)
+ */
+ getAllTasks() {
+ return Array.from(this.tasks.values()).map(stored => ({ ...stored.task }));
+ }
+}
+exports.InMemoryTaskStore = InMemoryTaskStore;
+/**
+ * A simple in-memory implementation of TaskMessageQueue for demonstration purposes.
+ *
+ * This implementation stores messages in memory, organized by task ID and optional session ID.
+ * Messages are stored in FIFO queues per task.
+ *
+ * Note: This is not suitable for production use in distributed systems.
+ * For production, consider implementing TaskMessageQueue with Redis or other distributed queues.
+ *
+ * @experimental
+ */
+class InMemoryTaskMessageQueue {
+ constructor() {
+ this.queues = new Map();
+ }
+ /**
+ * Generates a queue key from taskId.
+ * SessionId is intentionally ignored because taskIds are globally unique
+ * and tasks need to be accessible across HTTP requests/sessions.
+ */
+ getQueueKey(taskId, _sessionId) {
+ return taskId;
+ }
+ /**
+ * Gets or creates a queue for the given task and session.
+ */
+ getQueue(taskId, sessionId) {
+ const key = this.getQueueKey(taskId, sessionId);
+ let queue = this.queues.get(key);
+ if (!queue) {
+ queue = [];
+ this.queues.set(key, queue);
+ }
+ return queue;
+ }
+ /**
+ * Adds a message to the end of the queue for a specific task.
+ * Atomically checks queue size and throws if maxSize would be exceeded.
+ * @param taskId The task identifier
+ * @param message The message to enqueue
+ * @param sessionId Optional session ID for binding the operation to a specific session
+ * @param maxSize Optional maximum queue size - if specified and queue is full, throws an error
+ * @throws Error if maxSize is specified and would be exceeded
+ */
+ async enqueue(taskId, message, sessionId, maxSize) {
+ const queue = this.getQueue(taskId, sessionId);
+ // Atomically check size and enqueue
+ if (maxSize !== undefined && queue.length >= maxSize) {
+ throw new Error(`Task message queue overflow: queue size (${queue.length}) exceeds maximum (${maxSize})`);
+ }
+ queue.push(message);
+ }
+ /**
+ * Removes and returns the first message from the queue for a specific task.
+ * @param taskId The task identifier
+ * @param sessionId Optional session ID for binding the query to a specific session
+ * @returns The first message, or undefined if the queue is empty
+ */
+ async dequeue(taskId, sessionId) {
+ const queue = this.getQueue(taskId, sessionId);
+ return queue.shift();
+ }
+ /**
+ * Removes and returns all messages from the queue for a specific task.
+ * @param taskId The task identifier
+ * @param sessionId Optional session ID for binding the query to a specific session
+ * @returns Array of all messages that were in the queue
+ */
+ async dequeueAll(taskId, sessionId) {
+ const key = this.getQueueKey(taskId, sessionId);
+ const queue = this.queues.get(key) ?? [];
+ this.queues.delete(key);
+ return queue;
+ }
+}
+exports.InMemoryTaskMessageQueue = InMemoryTaskMessageQueue;
+//# sourceMappingURL=in-memory.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js.map
new file mode 100644
index 0000000..a4d21a9
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"in-memory.js","sourceRoot":"","sources":["../../../../../src/experimental/tasks/stores/in-memory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,oDAA6G;AAC7G,6CAA0C;AAS1C;;;;;;;;;;GAUG;AACH,MAAa,iBAAiB;IAA9B;QACY,UAAK,GAAG,IAAI,GAAG,EAAsB,CAAC;QACtC,kBAAa,GAAG,IAAI,GAAG,EAAyC,CAAC;IAsL7E,CAAC;IApLG;;;OAGG;IACK,cAAc;QAClB,OAAO,IAAA,yBAAW,EAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,UAA6B,EAAE,SAAoB,EAAE,OAAgB,EAAE,UAAmB;QACvG,4BAA4B;QAC5B,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAErC,oBAAoB;QACpB,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,gBAAgB,MAAM,iBAAiB,CAAC,CAAC;QAC7D,CAAC;QAED,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,IAAI,IAAI,CAAC;QAEzC,+CAA+C;QAC/C,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC3C,MAAM,IAAI,GAAS;YACf,MAAM;YACN,MAAM,EAAE,SAAS;YACjB,GAAG,EAAE,SAAS;YACd,SAAS;YACT,aAAa,EAAE,SAAS;YACx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A4C,KAAK,CAAC,MAAM,sBAAsB,OAAO,GAAG,CAAC,CAAC;QAC9G,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,MAAc,EAAE,SAAkB;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAC/C,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,UAAU,CAAC,MAAc,EAAE,SAAkB;QAC/C,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAChD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACxB,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AApED,4DAoEC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.d.ts
new file mode 100644
index 0000000..6022e19
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.d.ts
@@ -0,0 +1,10 @@
+/**
+ * Re-exports of task-related types from the MCP protocol spec.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * These types are defined in types.ts (matching the protocol spec) and
+ * re-exported here for convenience when working with experimental task features.
+ */
+export { TaskCreationParamsSchema, RelatedTaskMetadataSchema, TaskSchema, CreateTaskResultSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, GetTaskRequestSchema, GetTaskResultSchema, GetTaskPayloadRequestSchema, ListTasksRequestSchema, ListTasksResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, ClientTasksCapabilitySchema, ServerTasksCapabilitySchema } from '../../types.js';
+export type { Task, TaskCreationParams, RelatedTaskMetadata, CreateTaskResult, TaskStatusNotificationParams, TaskStatusNotification, GetTaskRequest, GetTaskResult, GetTaskPayloadRequest, ListTasksRequest, ListTasksResult, CancelTaskRequest, CancelTaskResult } from '../../types.js';
+//# sourceMappingURL=types.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.d.ts.map
new file mode 100644
index 0000000..f7b9ead
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACH,wBAAwB,EACxB,yBAAyB,EACzB,UAAU,EACV,sBAAsB,EACtB,kCAAkC,EAClC,4BAA4B,EAC5B,oBAAoB,EACpB,mBAAmB,EACnB,2BAA2B,EAC3B,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,EAC3B,2BAA2B,EAC9B,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EACR,IAAI,EACJ,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,4BAA4B,EAC5B,sBAAsB,EACtB,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EACnB,MAAM,gBAAgB,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.js
new file mode 100644
index 0000000..b051c84
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.js
@@ -0,0 +1,28 @@
+"use strict";
+/**
+ * Re-exports of task-related types from the MCP protocol spec.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * These types are defined in types.ts (matching the protocol spec) and
+ * re-exported here for convenience when working with experimental task features.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ServerTasksCapabilitySchema = exports.ClientTasksCapabilitySchema = exports.CancelTaskResultSchema = exports.CancelTaskRequestSchema = exports.ListTasksResultSchema = exports.ListTasksRequestSchema = exports.GetTaskPayloadRequestSchema = exports.GetTaskResultSchema = exports.GetTaskRequestSchema = exports.TaskStatusNotificationSchema = exports.TaskStatusNotificationParamsSchema = exports.CreateTaskResultSchema = exports.TaskSchema = exports.RelatedTaskMetadataSchema = exports.TaskCreationParamsSchema = void 0;
+// Task schemas (Zod)
+var types_js_1 = require("../../types.js");
+Object.defineProperty(exports, "TaskCreationParamsSchema", { enumerable: true, get: function () { return types_js_1.TaskCreationParamsSchema; } });
+Object.defineProperty(exports, "RelatedTaskMetadataSchema", { enumerable: true, get: function () { return types_js_1.RelatedTaskMetadataSchema; } });
+Object.defineProperty(exports, "TaskSchema", { enumerable: true, get: function () { return types_js_1.TaskSchema; } });
+Object.defineProperty(exports, "CreateTaskResultSchema", { enumerable: true, get: function () { return types_js_1.CreateTaskResultSchema; } });
+Object.defineProperty(exports, "TaskStatusNotificationParamsSchema", { enumerable: true, get: function () { return types_js_1.TaskStatusNotificationParamsSchema; } });
+Object.defineProperty(exports, "TaskStatusNotificationSchema", { enumerable: true, get: function () { return types_js_1.TaskStatusNotificationSchema; } });
+Object.defineProperty(exports, "GetTaskRequestSchema", { enumerable: true, get: function () { return types_js_1.GetTaskRequestSchema; } });
+Object.defineProperty(exports, "GetTaskResultSchema", { enumerable: true, get: function () { return types_js_1.GetTaskResultSchema; } });
+Object.defineProperty(exports, "GetTaskPayloadRequestSchema", { enumerable: true, get: function () { return types_js_1.GetTaskPayloadRequestSchema; } });
+Object.defineProperty(exports, "ListTasksRequestSchema", { enumerable: true, get: function () { return types_js_1.ListTasksRequestSchema; } });
+Object.defineProperty(exports, "ListTasksResultSchema", { enumerable: true, get: function () { return types_js_1.ListTasksResultSchema; } });
+Object.defineProperty(exports, "CancelTaskRequestSchema", { enumerable: true, get: function () { return types_js_1.CancelTaskRequestSchema; } });
+Object.defineProperty(exports, "CancelTaskResultSchema", { enumerable: true, get: function () { return types_js_1.CancelTaskResultSchema; } });
+Object.defineProperty(exports, "ClientTasksCapabilitySchema", { enumerable: true, get: function () { return types_js_1.ClientTasksCapabilitySchema; } });
+Object.defineProperty(exports, "ServerTasksCapabilitySchema", { enumerable: true, get: function () { return types_js_1.ServerTasksCapabilitySchema; } });
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.js.map
new file mode 100644
index 0000000..adfc3ab
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/experimental/tasks/types.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,qBAAqB;AACrB,2CAgBwB;AAfpB,oHAAA,wBAAwB,OAAA;AACxB,qHAAA,yBAAyB,OAAA;AACzB,sGAAA,UAAU,OAAA;AACV,kHAAA,sBAAsB,OAAA;AACtB,8HAAA,kCAAkC,OAAA;AAClC,wHAAA,4BAA4B,OAAA;AAC5B,gHAAA,oBAAoB,OAAA;AACpB,+GAAA,mBAAmB,OAAA;AACnB,uHAAA,2BAA2B,OAAA;AAC3B,kHAAA,sBAAsB,OAAA;AACtB,iHAAA,qBAAqB,OAAA;AACrB,mHAAA,uBAAuB,OAAA;AACvB,kHAAA,sBAAsB,OAAA;AACtB,uHAAA,2BAA2B,OAAA;AAC3B,uHAAA,2BAA2B,OAAA"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts
new file mode 100644
index 0000000..32a931a
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts
@@ -0,0 +1,31 @@
+import { Transport } from './shared/transport.js';
+import { JSONRPCMessage, RequestId } from './types.js';
+import { AuthInfo } from './server/auth/types.js';
+/**
+ * In-memory transport for creating clients and servers that talk to each other within the same process.
+ */
+export declare class InMemoryTransport implements Transport {
+ private _otherTransport?;
+ private _messageQueue;
+ onclose?: () => void;
+ onerror?: (error: Error) => void;
+ onmessage?: (message: JSONRPCMessage, extra?: {
+ authInfo?: AuthInfo;
+ }) => void;
+ sessionId?: string;
+ /**
+ * Creates a pair of linked in-memory transports that can communicate with each other. One should be passed to a Client and one to a Server.
+ */
+ static createLinkedPair(): [InMemoryTransport, InMemoryTransport];
+ start(): Promise;
+ close(): Promise;
+ /**
+ * Sends a message with optional auth info.
+ * This is useful for testing authentication scenarios.
+ */
+ send(message: JSONRPCMessage, options?: {
+ relatedRequestId?: RequestId;
+ authInfo?: AuthInfo;
+ }): Promise;
+}
+//# sourceMappingURL=inMemory.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts.map
new file mode 100644
index 0000000..46bc74b
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"inMemory.d.ts","sourceRoot":"","sources":["../../src/inMemory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAOlD;;GAEG;AACH,qBAAa,iBAAkB,YAAW,SAAS;IAC/C,OAAO,CAAC,eAAe,CAAC,CAAoB;IAC5C,OAAO,CAAC,aAAa,CAAuB;IAE5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,gBAAgB,IAAI,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAQ3D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAQtB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAO5B;;;OAGG;IACG,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAWtH"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js
new file mode 100644
index 0000000..9c6cb0e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js
@@ -0,0 +1,51 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InMemoryTransport = void 0;
+/**
+ * In-memory transport for creating clients and servers that talk to each other within the same process.
+ */
+class InMemoryTransport {
+ constructor() {
+ this._messageQueue = [];
+ }
+ /**
+ * Creates a pair of linked in-memory transports that can communicate with each other. One should be passed to a Client and one to a Server.
+ */
+ static createLinkedPair() {
+ const clientTransport = new InMemoryTransport();
+ const serverTransport = new InMemoryTransport();
+ clientTransport._otherTransport = serverTransport;
+ serverTransport._otherTransport = clientTransport;
+ return [clientTransport, serverTransport];
+ }
+ async start() {
+ // Process any messages that were queued before start was called
+ while (this._messageQueue.length > 0) {
+ const queuedMessage = this._messageQueue.shift();
+ this.onmessage?.(queuedMessage.message, queuedMessage.extra);
+ }
+ }
+ async close() {
+ const other = this._otherTransport;
+ this._otherTransport = undefined;
+ await other?.close();
+ this.onclose?.();
+ }
+ /**
+ * Sends a message with optional auth info.
+ * This is useful for testing authentication scenarios.
+ */
+ async send(message, options) {
+ if (!this._otherTransport) {
+ throw new Error('Not connected');
+ }
+ if (this._otherTransport.onmessage) {
+ this._otherTransport.onmessage(message, { authInfo: options?.authInfo });
+ }
+ else {
+ this._otherTransport._messageQueue.push({ message, extra: { authInfo: options?.authInfo } });
+ }
+ }
+}
+exports.InMemoryTransport = InMemoryTransport;
+//# sourceMappingURL=inMemory.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js.map
new file mode 100644
index 0000000..a45f3a8
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"inMemory.js","sourceRoot":"","sources":["../../src/inMemory.ts"],"names":[],"mappings":";;;AASA;;GAEG;AACH,MAAa,iBAAiB;IA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AAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;QACjG,CAAC;IACL,CAAC;CACJ;AAlDD,8CAkDC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/package.json b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/package.json
new file mode 100644
index 0000000..b731bd6
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/package.json
@@ -0,0 +1 @@
+{"type": "commonjs"}
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts
new file mode 100644
index 0000000..be6899a
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts
@@ -0,0 +1,19 @@
+import { OAuthClientInformationFull } from '../../shared/auth.js';
+/**
+ * Stores information about registered OAuth clients for this server.
+ */
+export interface OAuthRegisteredClientsStore {
+ /**
+ * Returns information about a registered client, based on its ID.
+ */
+ getClient(clientId: string): OAuthClientInformationFull | undefined | Promise;
+ /**
+ * Registers a new client with the server. The client ID and secret will be automatically generated by the library. A modified version of the client information can be returned to reflect specific values enforced by the server.
+ *
+ * NOTE: Implementations should NOT delete expired client secrets in-place. Auth middleware provided by this library will automatically check the `client_secret_expires_at` field and reject requests with expired secrets. Any custom logic for authenticating clients should check the `client_secret_expires_at` field as well.
+ *
+ * If unimplemented, dynamic client registration is unsupported.
+ */
+ registerClient?(client: Omit): OAuthClientInformationFull | Promise;
+}
+//# sourceMappingURL=clients.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts.map
new file mode 100644
index 0000000..ab3851d
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"clients.d.ts","sourceRoot":"","sources":["../../../../src/server/auth/clients.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,2BAA2B;IACxC;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,0BAA0B,GAAG,SAAS,GAAG,OAAO,CAAC,0BAA0B,GAAG,SAAS,CAAC,CAAC;IAEtH;;;;;;OAMG;IACH,cAAc,CAAC,CACX,MAAM,EAAE,IAAI,CAAC,0BAA0B,EAAE,WAAW,GAAG,qBAAqB,CAAC,GAC9E,0BAA0B,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;CACvE"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js
new file mode 100644
index 0000000..866b88b
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=clients.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js.map
new file mode 100644
index 0000000..0210104
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"clients.js","sourceRoot":"","sources":["../../../../src/server/auth/clients.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts
new file mode 100644
index 0000000..7fddf95
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts
@@ -0,0 +1,148 @@
+import { OAuthErrorResponse } from '../../shared/auth.js';
+/**
+ * Base class for all OAuth errors
+ */
+export declare class OAuthError extends Error {
+ readonly errorUri?: string | undefined;
+ static errorCode: string;
+ constructor(message: string, errorUri?: string | undefined);
+ /**
+ * Converts the error to a standard OAuth error response object
+ */
+ toResponseObject(): OAuthErrorResponse;
+ get errorCode(): string;
+}
+/**
+ * Invalid request error - The request is missing a required parameter,
+ * includes an invalid parameter value, includes a parameter more than once,
+ * or is otherwise malformed.
+ */
+export declare class InvalidRequestError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Invalid client error - Client authentication failed (e.g., unknown client, no client
+ * authentication included, or unsupported authentication method).
+ */
+export declare class InvalidClientError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Invalid grant error - The provided authorization grant or refresh token is
+ * invalid, expired, revoked, does not match the redirection URI used in the
+ * authorization request, or was issued to another client.
+ */
+export declare class InvalidGrantError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Unauthorized client error - The authenticated client is not authorized to use
+ * this authorization grant type.
+ */
+export declare class UnauthorizedClientError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Unsupported grant type error - The authorization grant type is not supported
+ * by the authorization server.
+ */
+export declare class UnsupportedGrantTypeError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Invalid scope error - The requested scope is invalid, unknown, malformed, or
+ * exceeds the scope granted by the resource owner.
+ */
+export declare class InvalidScopeError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Access denied error - The resource owner or authorization server denied the request.
+ */
+export declare class AccessDeniedError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Server error - The authorization server encountered an unexpected condition
+ * that prevented it from fulfilling the request.
+ */
+export declare class ServerError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Temporarily unavailable error - The authorization server is currently unable to
+ * handle the request due to a temporary overloading or maintenance of the server.
+ */
+export declare class TemporarilyUnavailableError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Unsupported response type error - The authorization server does not support
+ * obtaining an authorization code using this method.
+ */
+export declare class UnsupportedResponseTypeError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Unsupported token type error - The authorization server does not support
+ * the requested token type.
+ */
+export declare class UnsupportedTokenTypeError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Invalid token error - The access token provided is expired, revoked, malformed,
+ * or invalid for other reasons.
+ */
+export declare class InvalidTokenError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Method not allowed error - The HTTP method used is not allowed for this endpoint.
+ * (Custom, non-standard error)
+ */
+export declare class MethodNotAllowedError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Too many requests error - Rate limit exceeded.
+ * (Custom, non-standard error based on RFC 6585)
+ */
+export declare class TooManyRequestsError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Invalid client metadata error - The client metadata is invalid.
+ * (Custom error for dynamic client registration - RFC 7591)
+ */
+export declare class InvalidClientMetadataError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Insufficient scope error - The request requires higher privileges than provided by the access token.
+ */
+export declare class InsufficientScopeError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Invalid target error - The requested resource is invalid, missing, unknown, or malformed.
+ * (Custom error for resource indicators - RFC 8707)
+ */
+export declare class InvalidTargetError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * A utility class for defining one-off error codes
+ */
+export declare class CustomOAuthError extends OAuthError {
+ private readonly customErrorCode;
+ constructor(customErrorCode: string, message: string, errorUri?: string);
+ get errorCode(): string;
+}
+/**
+ * A full list of all OAuthErrors, enabling parsing from error responses
+ */
+export declare const OAUTH_ERRORS: {
+ readonly [x: string]: typeof InvalidRequestError;
+};
+//# sourceMappingURL=errors.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts.map
new file mode 100644
index 0000000..5c0e992
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/server/auth/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;aAKb,QAAQ,CAAC,EAAE,MAAM;IAJrC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC;gBAGrB,OAAO,EAAE,MAAM,EACC,QAAQ,CAAC,EAAE,MAAM,YAAA;IAMrC;;OAEG;IACH,gBAAgB,IAAI,kBAAkB;IAatC,IAAI,SAAS,IAAI,MAAM,CAEtB;CACJ;AAED;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,UAAU;IAC/C,MAAM,CAAC,SAAS,SAAqB;CACxC;AAED;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,UAAU;IAC9C,MAAM,CAAC,SAAS,SAAoB;CACvC;AAED;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,UAAU;IAC7C,MAAM,CAAC,SAAS,SAAmB;CACtC;AAED;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,UAAU;IACnD,MAAM,CAAC,SAAS,SAAyB;CAC5C;AAED;;;GAGG;AACH,qBAAa,yBAA0B,SAAQ,UAAU;IACrD,MAAM,CAAC,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EtB;CACJ;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;;CAkBf,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js
new file mode 100644
index 0000000..e67478c
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js
@@ -0,0 +1,202 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OAUTH_ERRORS = exports.CustomOAuthError = exports.InvalidTargetError = exports.InsufficientScopeError = exports.InvalidClientMetadataError = exports.TooManyRequestsError = exports.MethodNotAllowedError = exports.InvalidTokenError = exports.UnsupportedTokenTypeError = exports.UnsupportedResponseTypeError = exports.TemporarilyUnavailableError = exports.ServerError = exports.AccessDeniedError = exports.InvalidScopeError = exports.UnsupportedGrantTypeError = exports.UnauthorizedClientError = exports.InvalidGrantError = exports.InvalidClientError = exports.InvalidRequestError = exports.OAuthError = void 0;
+/**
+ * Base class for all OAuth errors
+ */
+class OAuthError extends Error {
+ constructor(message, errorUri) {
+ super(message);
+ this.errorUri = errorUri;
+ this.name = this.constructor.name;
+ }
+ /**
+ * Converts the error to a standard OAuth error response object
+ */
+ toResponseObject() {
+ const response = {
+ error: this.errorCode,
+ error_description: this.message
+ };
+ if (this.errorUri) {
+ response.error_uri = this.errorUri;
+ }
+ return response;
+ }
+ get errorCode() {
+ return this.constructor.errorCode;
+ }
+}
+exports.OAuthError = OAuthError;
+/**
+ * Invalid request error - The request is missing a required parameter,
+ * includes an invalid parameter value, includes a parameter more than once,
+ * or is otherwise malformed.
+ */
+class InvalidRequestError extends OAuthError {
+}
+exports.InvalidRequestError = InvalidRequestError;
+InvalidRequestError.errorCode = 'invalid_request';
+/**
+ * Invalid client error - Client authentication failed (e.g., unknown client, no client
+ * authentication included, or unsupported authentication method).
+ */
+class InvalidClientError extends OAuthError {
+}
+exports.InvalidClientError = InvalidClientError;
+InvalidClientError.errorCode = 'invalid_client';
+/**
+ * Invalid grant error - The provided authorization grant or refresh token is
+ * invalid, expired, revoked, does not match the redirection URI used in the
+ * authorization request, or was issued to another client.
+ */
+class InvalidGrantError extends OAuthError {
+}
+exports.InvalidGrantError = InvalidGrantError;
+InvalidGrantError.errorCode = 'invalid_grant';
+/**
+ * Unauthorized client error - The authenticated client is not authorized to use
+ * this authorization grant type.
+ */
+class UnauthorizedClientError extends OAuthError {
+}
+exports.UnauthorizedClientError = UnauthorizedClientError;
+UnauthorizedClientError.errorCode = 'unauthorized_client';
+/**
+ * Unsupported grant type error - The authorization grant type is not supported
+ * by the authorization server.
+ */
+class UnsupportedGrantTypeError extends OAuthError {
+}
+exports.UnsupportedGrantTypeError = UnsupportedGrantTypeError;
+UnsupportedGrantTypeError.errorCode = 'unsupported_grant_type';
+/**
+ * Invalid scope error - The requested scope is invalid, unknown, malformed, or
+ * exceeds the scope granted by the resource owner.
+ */
+class InvalidScopeError extends OAuthError {
+}
+exports.InvalidScopeError = InvalidScopeError;
+InvalidScopeError.errorCode = 'invalid_scope';
+/**
+ * Access denied error - The resource owner or authorization server denied the request.
+ */
+class AccessDeniedError extends OAuthError {
+}
+exports.AccessDeniedError = AccessDeniedError;
+AccessDeniedError.errorCode = 'access_denied';
+/**
+ * Server error - The authorization server encountered an unexpected condition
+ * that prevented it from fulfilling the request.
+ */
+class ServerError extends OAuthError {
+}
+exports.ServerError = ServerError;
+ServerError.errorCode = 'server_error';
+/**
+ * Temporarily unavailable error - The authorization server is currently unable to
+ * handle the request due to a temporary overloading or maintenance of the server.
+ */
+class TemporarilyUnavailableError extends OAuthError {
+}
+exports.TemporarilyUnavailableError = TemporarilyUnavailableError;
+TemporarilyUnavailableError.errorCode = 'temporarily_unavailable';
+/**
+ * Unsupported response type error - The authorization server does not support
+ * obtaining an authorization code using this method.
+ */
+class UnsupportedResponseTypeError extends OAuthError {
+}
+exports.UnsupportedResponseTypeError = UnsupportedResponseTypeError;
+UnsupportedResponseTypeError.errorCode = 'unsupported_response_type';
+/**
+ * Unsupported token type error - The authorization server does not support
+ * the requested token type.
+ */
+class UnsupportedTokenTypeError extends OAuthError {
+}
+exports.UnsupportedTokenTypeError = UnsupportedTokenTypeError;
+UnsupportedTokenTypeError.errorCode = 'unsupported_token_type';
+/**
+ * Invalid token error - The access token provided is expired, revoked, malformed,
+ * or invalid for other reasons.
+ */
+class InvalidTokenError extends OAuthError {
+}
+exports.InvalidTokenError = InvalidTokenError;
+InvalidTokenError.errorCode = 'invalid_token';
+/**
+ * Method not allowed error - The HTTP method used is not allowed for this endpoint.
+ * (Custom, non-standard error)
+ */
+class MethodNotAllowedError extends OAuthError {
+}
+exports.MethodNotAllowedError = MethodNotAllowedError;
+MethodNotAllowedError.errorCode = 'method_not_allowed';
+/**
+ * Too many requests error - Rate limit exceeded.
+ * (Custom, non-standard error based on RFC 6585)
+ */
+class TooManyRequestsError extends OAuthError {
+}
+exports.TooManyRequestsError = TooManyRequestsError;
+TooManyRequestsError.errorCode = 'too_many_requests';
+/**
+ * Invalid client metadata error - The client metadata is invalid.
+ * (Custom error for dynamic client registration - RFC 7591)
+ */
+class InvalidClientMetadataError extends OAuthError {
+}
+exports.InvalidClientMetadataError = InvalidClientMetadataError;
+InvalidClientMetadataError.errorCode = 'invalid_client_metadata';
+/**
+ * Insufficient scope error - The request requires higher privileges than provided by the access token.
+ */
+class InsufficientScopeError extends OAuthError {
+}
+exports.InsufficientScopeError = InsufficientScopeError;
+InsufficientScopeError.errorCode = 'insufficient_scope';
+/**
+ * Invalid target error - The requested resource is invalid, missing, unknown, or malformed.
+ * (Custom error for resource indicators - RFC 8707)
+ */
+class InvalidTargetError extends OAuthError {
+}
+exports.InvalidTargetError = InvalidTargetError;
+InvalidTargetError.errorCode = 'invalid_target';
+/**
+ * A utility class for defining one-off error codes
+ */
+class CustomOAuthError extends OAuthError {
+ constructor(customErrorCode, message, errorUri) {
+ super(message, errorUri);
+ this.customErrorCode = customErrorCode;
+ }
+ get errorCode() {
+ return this.customErrorCode;
+ }
+}
+exports.CustomOAuthError = CustomOAuthError;
+/**
+ * A full list of all OAuthErrors, enabling parsing from error responses
+ */
+exports.OAUTH_ERRORS = {
+ [InvalidRequestError.errorCode]: InvalidRequestError,
+ [InvalidClientError.errorCode]: InvalidClientError,
+ [InvalidGrantError.errorCode]: InvalidGrantError,
+ [UnauthorizedClientError.errorCode]: UnauthorizedClientError,
+ [UnsupportedGrantTypeError.errorCode]: UnsupportedGrantTypeError,
+ [InvalidScopeError.errorCode]: InvalidScopeError,
+ [AccessDeniedError.errorCode]: AccessDeniedError,
+ [ServerError.errorCode]: ServerError,
+ [TemporarilyUnavailableError.errorCode]: TemporarilyUnavailableError,
+ [UnsupportedResponseTypeError.errorCode]: UnsupportedResponseTypeError,
+ [UnsupportedTokenTypeError.errorCode]: UnsupportedTokenTypeError,
+ [InvalidTokenError.errorCode]: InvalidTokenError,
+ [MethodNotAllowedError.errorCode]: MethodNotAllowedError,
+ [TooManyRequestsError.errorCode]: TooManyRequestsError,
+ [InvalidClientMetadataError.errorCode]: InvalidClientMetadataError,
+ [InsufficientScopeError.errorCode]: InsufficientScopeError,
+ [InvalidTargetError.errorCode]: InvalidTargetError
+};
+//# sourceMappingURL=errors.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js.map
new file mode 100644
index 0000000..f802594
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/server/auth/errors.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,UAAW,SAAQ,KAAK;IAGjC,YACI,OAAe,EACC,QAAiB;QAE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AC,mBAAmB,CAAC,SAAS,CAAC,EAAE,mBAAmB;IACpD,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,kBAAkB;IAClD,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,iBAAiB;IAChD,CAAC,uBAAuB,CAAC,SAAS,CAAC,EAAE,uBAAuB;IAC5D,CAAC,yBAAyB,CAAC,SAAS,CAAC,EAAE,yBAAyB;IAChE,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,iBAAiB;IAChD,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,iBAAiB;IAChD,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,WAAW;IACpC,CAAC,2BAA2B,CAAC,SAAS,CAAC,EAAE,2BAA2B;IACpE,CAAC,4BAA4B,CAAC,SAAS,CAAC,EAAE,4BAA4B;IACtE,CAAC,yBAAyB,CAAC,SAAS,CAAC,EAAE,yBAAyB;IAChE,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,iBAAiB;IAChD,CAAC,qBAAqB,CAAC,SAAS,CAAC,EAAE,qBAAqB;IACxD,CAAC,oBAAoB,CAAC,SAAS,CAAC,EAAE,oBAAoB;IACtD,CAAC,0BAA0B,CAAC,SAAS,CAAC,EAAE,0BAA0B;IAClE,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAAE,sBAAsB;IAC1D,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,kBAAkB;CAC5C,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.d.ts
new file mode 100644
index 0000000..e2da8f0
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.d.ts
@@ -0,0 +1,24 @@
+import { RequestHandler } from 'express';
+import { OAuthServerProvider } from '../provider.js';
+import { Options as RateLimitOptions } from 'express-rate-limit';
+export type AuthorizationHandlerOptions = {
+ provider: OAuthServerProvider;
+ /**
+ * Rate limiting configuration for the authorization endpoint.
+ * Set to false to disable rate limiting for this endpoint.
+ */
+ rateLimit?: Partial | false;
+};
+/**
+ * Validates a requested redirect_uri against a registered one.
+ *
+ * Per RFC 8252 §7.3 (OAuth 2.0 for Native Apps), authorization servers MUST
+ * allow any port for loopback redirect URIs (localhost, 127.0.0.1, [::1]) to
+ * accommodate native clients that obtain an ephemeral port from the OS. For
+ * non-loopback URIs, exact match is required.
+ *
+ * @see https://datatracker.ietf.org/doc/html/rfc8252#section-7.3
+ */
+export declare function redirectUriMatches(requested: string, registered: string): boolean;
+export declare function authorizationHandler({ provider, rateLimit: rateLimitConfig }: AuthorizationHandlerOptions): RequestHandler;
+//# sourceMappingURL=authorize.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.d.ts.map
new file mode 100644
index 0000000..b0e0631
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"authorize.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/authorize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAa,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI5E,MAAM,MAAM,2BAA2B,GAAG;IACtC,QAAQ,EAAE,mBAAmB,CAAC;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC;CACjD,CAAC;AAIF;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAmBjF;AAqBD,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,2BAA2B,GAAG,cAAc,CAiH1H"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.js
new file mode 100644
index 0000000..21de602
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.js
@@ -0,0 +1,201 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.redirectUriMatches = redirectUriMatches;
+exports.authorizationHandler = authorizationHandler;
+const z = __importStar(require("zod/v4"));
+const express_1 = __importDefault(require("express"));
+const express_rate_limit_1 = require("express-rate-limit");
+const allowedMethods_js_1 = require("../middleware/allowedMethods.js");
+const errors_js_1 = require("../errors.js");
+const LOOPBACK_HOSTS = new Set(['localhost', '127.0.0.1', '[::1]']);
+/**
+ * Validates a requested redirect_uri against a registered one.
+ *
+ * Per RFC 8252 §7.3 (OAuth 2.0 for Native Apps), authorization servers MUST
+ * allow any port for loopback redirect URIs (localhost, 127.0.0.1, [::1]) to
+ * accommodate native clients that obtain an ephemeral port from the OS. For
+ * non-loopback URIs, exact match is required.
+ *
+ * @see https://datatracker.ietf.org/doc/html/rfc8252#section-7.3
+ */
+function redirectUriMatches(requested, registered) {
+ if (requested === registered) {
+ return true;
+ }
+ let req, reg;
+ try {
+ req = new URL(requested);
+ reg = new URL(registered);
+ }
+ catch {
+ return false;
+ }
+ // Port relaxation only applies when both URIs target a loopback host.
+ if (!LOOPBACK_HOSTS.has(req.hostname) || !LOOPBACK_HOSTS.has(reg.hostname)) {
+ return false;
+ }
+ // RFC 8252 relaxes the port only — scheme, host, path, and query must
+ // still match exactly. Note: hostname must match exactly too (the RFC
+ // does not allow localhost↔127.0.0.1 cross-matching).
+ return req.protocol === reg.protocol && req.hostname === reg.hostname && req.pathname === reg.pathname && req.search === reg.search;
+}
+// Parameters that must be validated in order to issue redirects.
+const ClientAuthorizationParamsSchema = z.object({
+ client_id: z.string(),
+ redirect_uri: z
+ .string()
+ .optional()
+ .refine(value => value === undefined || URL.canParse(value), { message: 'redirect_uri must be a valid URL' })
+});
+// Parameters that must be validated for a successful authorization request. Failure can be reported to the redirect URI.
+const RequestAuthorizationParamsSchema = z.object({
+ response_type: z.literal('code'),
+ code_challenge: z.string(),
+ code_challenge_method: z.literal('S256'),
+ scope: z.string().optional(),
+ state: z.string().optional(),
+ resource: z.string().url().optional()
+});
+function authorizationHandler({ provider, rateLimit: rateLimitConfig }) {
+ // Create a router to apply middleware
+ const router = express_1.default.Router();
+ router.use((0, allowedMethods_js_1.allowedMethods)(['GET', 'POST']));
+ router.use(express_1.default.urlencoded({ extended: false }));
+ // Apply rate limiting unless explicitly disabled
+ if (rateLimitConfig !== false) {
+ router.use((0, express_rate_limit_1.rateLimit)({
+ windowMs: 15 * 60 * 1000, // 15 minutes
+ max: 100, // 100 requests per windowMs
+ standardHeaders: true,
+ legacyHeaders: false,
+ message: new errors_js_1.TooManyRequestsError('You have exceeded the rate limit for authorization requests').toResponseObject(),
+ ...rateLimitConfig
+ }));
+ }
+ router.all('/', async (req, res) => {
+ res.setHeader('Cache-Control', 'no-store');
+ // In the authorization flow, errors are split into two categories:
+ // 1. Pre-redirect errors (direct response with 400)
+ // 2. Post-redirect errors (redirect with error parameters)
+ // Phase 1: Validate client_id and redirect_uri. Any errors here must be direct responses.
+ let client_id, redirect_uri, client;
+ try {
+ const result = ClientAuthorizationParamsSchema.safeParse(req.method === 'POST' ? req.body : req.query);
+ if (!result.success) {
+ throw new errors_js_1.InvalidRequestError(result.error.message);
+ }
+ client_id = result.data.client_id;
+ redirect_uri = result.data.redirect_uri;
+ client = await provider.clientsStore.getClient(client_id);
+ if (!client) {
+ throw new errors_js_1.InvalidClientError('Invalid client_id');
+ }
+ if (redirect_uri !== undefined) {
+ const requested = redirect_uri;
+ if (!client.redirect_uris.some(registered => redirectUriMatches(requested, registered))) {
+ throw new errors_js_1.InvalidRequestError('Unregistered redirect_uri');
+ }
+ }
+ else if (client.redirect_uris.length === 1) {
+ redirect_uri = client.redirect_uris[0];
+ }
+ else {
+ throw new errors_js_1.InvalidRequestError('redirect_uri must be specified when client has multiple registered URIs');
+ }
+ }
+ catch (error) {
+ // Pre-redirect errors - return direct response
+ //
+ // These don't need to be JSON encoded, as they'll be displayed in a user
+ // agent, but OTOH they all represent exceptional situations (arguably,
+ // "programmer error"), so presenting a nice HTML page doesn't help the
+ // user anyway.
+ if (error instanceof errors_js_1.OAuthError) {
+ const status = error instanceof errors_js_1.ServerError ? 500 : 400;
+ res.status(status).json(error.toResponseObject());
+ }
+ else {
+ const serverError = new errors_js_1.ServerError('Internal Server Error');
+ res.status(500).json(serverError.toResponseObject());
+ }
+ return;
+ }
+ // Phase 2: Validate other parameters. Any errors here should go into redirect responses.
+ let state;
+ try {
+ // Parse and validate authorization parameters
+ const parseResult = RequestAuthorizationParamsSchema.safeParse(req.method === 'POST' ? req.body : req.query);
+ if (!parseResult.success) {
+ throw new errors_js_1.InvalidRequestError(parseResult.error.message);
+ }
+ const { scope, code_challenge, resource } = parseResult.data;
+ state = parseResult.data.state;
+ // Validate scopes
+ let requestedScopes = [];
+ if (scope !== undefined) {
+ requestedScopes = scope.split(' ');
+ }
+ // All validation passed, proceed with authorization
+ await provider.authorize(client, {
+ state,
+ scopes: requestedScopes,
+ redirectUri: redirect_uri,
+ codeChallenge: code_challenge,
+ resource: resource ? new URL(resource) : undefined
+ }, res);
+ }
+ catch (error) {
+ // Post-redirect errors - redirect with error parameters
+ if (error instanceof errors_js_1.OAuthError) {
+ res.redirect(302, createErrorRedirect(redirect_uri, error, state));
+ }
+ else {
+ const serverError = new errors_js_1.ServerError('Internal Server Error');
+ res.redirect(302, createErrorRedirect(redirect_uri, serverError, state));
+ }
+ }
+ });
+ return router;
+}
+/**
+ * Helper function to create redirect URL with error parameters
+ */
+function createErrorRedirect(redirectUri, error, state) {
+ const errorUrl = new URL(redirectUri);
+ errorUrl.searchParams.set('error', error.errorCode);
+ errorUrl.searchParams.set('error_description', error.message);
+ if (error.errorUri) {
+ errorUrl.searchParams.set('error_uri', error.errorUri);
+ }
+ if (state) {
+ errorUrl.searchParams.set('state', state);
+ }
+ return errorUrl.href;
+}
+//# sourceMappingURL=authorize.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.js.map
new file mode 100644
index 0000000..a9156fb
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"authorize.js","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/authorize.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,gDAmBC;AAqBD,oDAiHC;AArLD,0CAA4B;AAC5B,sDAA8B;AAE9B,2DAA4E;AAC5E,uEAAiE;AACjE,4CAAsH;AAWtH,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;AAEpE;;;;;;;;;GASG;AACH,SAAgB,kBAAkB,CAAC,SAAiB,EAAE,UAAkB;IACpE,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,IAAI,GAAQ,EAAE,GAAQ,CAAC;IACvB,IAAI,CAAC;QACD,GAAG,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;QACzB,GAAG,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,sEAAsE;IACtE,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzE,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,sEAAsE;IACtE,sEAAsE;IACtE,sDAAsD;IACtD,OAAO,GAAG,CAAC,QAAQ,KAAK,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,KAAK,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,KAAK,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,CAAC;AAC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AEG;AACH,SAAS,mBAAmB,CAAC,WAAmB,EAAE,KAAiB,EAAE,KAAc;IAC/E,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC;IACtC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACpD,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,mBAAmB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9D,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC3D,CAAC;IACD,IAAI,KAAK,EAAE,CAAC;QACR,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC;AACzB,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.d.ts
new file mode 100644
index 0000000..4d03286
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.d.ts
@@ -0,0 +1,4 @@
+import { RequestHandler } from 'express';
+import { OAuthMetadata, OAuthProtectedResourceMetadata } from '../../../shared/auth.js';
+export declare function metadataHandler(metadata: OAuthMetadata | OAuthProtectedResourceMetadata): RequestHandler;
+//# sourceMappingURL=metadata.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.d.ts.map
new file mode 100644
index 0000000..55e3a50
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/metadata.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AAIxF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,aAAa,GAAG,8BAA8B,GAAG,cAAc,CAaxG"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.js
new file mode 100644
index 0000000..4e00bc5
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.js
@@ -0,0 +1,21 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.metadataHandler = metadataHandler;
+const express_1 = __importDefault(require("express"));
+const cors_1 = __importDefault(require("cors"));
+const allowedMethods_js_1 = require("../middleware/allowedMethods.js");
+function metadataHandler(metadata) {
+ // Nested router so we can configure middleware and restrict HTTP method
+ const router = express_1.default.Router();
+ // Configure CORS to allow any origin, to make accessible to web-based MCP clients
+ router.use((0, cors_1.default)());
+ router.use((0, allowedMethods_js_1.allowedMethods)(['GET', 'OPTIONS']));
+ router.get('/', (req, res) => {
+ res.status(200).json(metadata);
+ });
+ return router;
+}
+//# sourceMappingURL=metadata.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.js.map
new file mode 100644
index 0000000..9679c9f
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/metadata.ts"],"names":[],"mappings":";;;;;AAKA,0CAaC;AAlBD,sDAAkD;AAElD,gDAAwB;AACxB,uEAAiE;AAEjE,SAAgB,eAAe,CAAC,QAAwD;IACpF,wEAAwE;IACxE,MAAM,MAAM,GAAG,iBAAO,CAAC,MAAM,EAAE,CAAC;IAEhC,kFAAkF;IAClF,MAAM,CAAC,GAAG,CAAC,IAAA,cAAI,GAAE,CAAC,CAAC;IAEnB,MAAM,CAAC,GAAG,CAAC,IAAA,kCAAc,EAAC,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IAC/C,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QACzB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAClB,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.d.ts
new file mode 100644
index 0000000..e9add28
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.d.ts
@@ -0,0 +1,29 @@
+import { RequestHandler } from 'express';
+import { OAuthRegisteredClientsStore } from '../clients.js';
+import { Options as RateLimitOptions } from 'express-rate-limit';
+export type ClientRegistrationHandlerOptions = {
+ /**
+ * A store used to save information about dynamically registered OAuth clients.
+ */
+ clientsStore: OAuthRegisteredClientsStore;
+ /**
+ * The number of seconds after which to expire issued client secrets, or 0 to prevent expiration of client secrets (not recommended).
+ *
+ * If not set, defaults to 30 days.
+ */
+ clientSecretExpirySeconds?: number;
+ /**
+ * Rate limiting configuration for the client registration endpoint.
+ * Set to false to disable rate limiting for this endpoint.
+ * Registration endpoints are particularly sensitive to abuse and should be rate limited.
+ */
+ rateLimit?: Partial | false;
+ /**
+ * Whether to generate a client ID before calling the client registration endpoint.
+ *
+ * If not set, defaults to true.
+ */
+ clientIdGeneration?: boolean;
+};
+export declare function clientRegistrationHandler({ clientsStore, clientSecretExpirySeconds, rateLimit: rateLimitConfig, clientIdGeneration }: ClientRegistrationHandlerOptions): RequestHandler;
+//# sourceMappingURL=register.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.d.ts.map
new file mode 100644
index 0000000..a38ebdb
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/register.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAIlD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAa,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI5E,MAAM,MAAM,gCAAgC,GAAG;IAC3C;;OAEG;IACH,YAAY,EAAE,2BAA2B,CAAC;IAE1C;;;;OAIG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAEnC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC;IAE9C;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAIF,wBAAgB,yBAAyB,CAAC,EACtC,YAAY,EACZ,yBAAgE,EAChE,SAAS,EAAE,eAAe,EAC1B,kBAAyB,EAC5B,EAAE,gCAAgC,GAAG,cAAc,CA0EnD"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.js
new file mode 100644
index 0000000..e40c5c9
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.js
@@ -0,0 +1,77 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.clientRegistrationHandler = clientRegistrationHandler;
+const express_1 = __importDefault(require("express"));
+const auth_js_1 = require("../../../shared/auth.js");
+const node_crypto_1 = __importDefault(require("node:crypto"));
+const cors_1 = __importDefault(require("cors"));
+const express_rate_limit_1 = require("express-rate-limit");
+const allowedMethods_js_1 = require("../middleware/allowedMethods.js");
+const errors_js_1 = require("../errors.js");
+const DEFAULT_CLIENT_SECRET_EXPIRY_SECONDS = 30 * 24 * 60 * 60; // 30 days
+function clientRegistrationHandler({ clientsStore, clientSecretExpirySeconds = DEFAULT_CLIENT_SECRET_EXPIRY_SECONDS, rateLimit: rateLimitConfig, clientIdGeneration = true }) {
+ if (!clientsStore.registerClient) {
+ throw new Error('Client registration store does not support registering clients');
+ }
+ // Nested router so we can configure middleware and restrict HTTP method
+ const router = express_1.default.Router();
+ // Configure CORS to allow any origin, to make accessible to web-based MCP clients
+ router.use((0, cors_1.default)());
+ router.use((0, allowedMethods_js_1.allowedMethods)(['POST']));
+ router.use(express_1.default.json());
+ // Apply rate limiting unless explicitly disabled - stricter limits for registration
+ if (rateLimitConfig !== false) {
+ router.use((0, express_rate_limit_1.rateLimit)({
+ windowMs: 60 * 60 * 1000, // 1 hour
+ max: 20, // 20 requests per hour - stricter as registration is sensitive
+ standardHeaders: true,
+ legacyHeaders: false,
+ message: new errors_js_1.TooManyRequestsError('You have exceeded the rate limit for client registration requests').toResponseObject(),
+ ...rateLimitConfig
+ }));
+ }
+ router.post('/', async (req, res) => {
+ res.setHeader('Cache-Control', 'no-store');
+ try {
+ const parseResult = auth_js_1.OAuthClientMetadataSchema.safeParse(req.body);
+ if (!parseResult.success) {
+ throw new errors_js_1.InvalidClientMetadataError(parseResult.error.message);
+ }
+ const clientMetadata = parseResult.data;
+ const isPublicClient = clientMetadata.token_endpoint_auth_method === 'none';
+ // Generate client credentials
+ const clientSecret = isPublicClient ? undefined : node_crypto_1.default.randomBytes(32).toString('hex');
+ const clientIdIssuedAt = Math.floor(Date.now() / 1000);
+ // Calculate client secret expiry time
+ const clientsDoExpire = clientSecretExpirySeconds > 0;
+ const secretExpiryTime = clientsDoExpire ? clientIdIssuedAt + clientSecretExpirySeconds : 0;
+ const clientSecretExpiresAt = isPublicClient ? undefined : secretExpiryTime;
+ let clientInfo = {
+ ...clientMetadata,
+ client_secret: clientSecret,
+ client_secret_expires_at: clientSecretExpiresAt
+ };
+ if (clientIdGeneration) {
+ clientInfo.client_id = node_crypto_1.default.randomUUID();
+ clientInfo.client_id_issued_at = clientIdIssuedAt;
+ }
+ clientInfo = await clientsStore.registerClient(clientInfo);
+ res.status(201).json(clientInfo);
+ }
+ catch (error) {
+ if (error instanceof errors_js_1.OAuthError) {
+ const status = error instanceof errors_js_1.ServerError ? 500 : 400;
+ res.status(status).json(error.toResponseObject());
+ }
+ else {
+ const serverError = new errors_js_1.ServerError('Internal Server Error');
+ res.status(500).json(serverError.toResponseObject());
+ }
+ }
+ });
+ return router;
+}
+//# sourceMappingURL=register.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.js.map
new file mode 100644
index 0000000..e116a47
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/register.ts"],"names":[],"mappings":";;;;;AAuCA,8DA+EC;AAtHD,sDAAkD;AAClD,qDAAgG;AAChG,8DAAiC;AACjC,gDAAwB;AAExB,2DAA4E;AAC5E,uEAAiE;AACjE,4CAAyG;AA8BzG,MAAM,oCAAoC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU;AAE1E,SAAgB,yBAAyB,CAAC,EACtC,YAAY,EACZ,yBAAyB,GAAG,oCAAoC,EAChE,SAAS,EAAE,eAAe,EAC1B,kBAAkB,GAAG,IAAI,EACM;IAC/B,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACtF,CAAC;IAED,wEAAwE;IACxE,MAAM,MAAM,GAAG,iBAAO,CAAC,MAAM,EAAE,CAAC;IAEhC,kFAAkF;IAClF,MAAM,CAAC,GAAG,CAAC,IAAA,cAAI,GAAE,CAAC,CAAC;IAEnB,MAAM,CAAC,GAAG,CAAC,IAAA,kCAAc,EAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACrC,MAAM,CAAC,GAAG,CAAC,iBAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IAE3B,oFAAoF;IACpF,IAAI,eAAe,KAAK,KAAK,EAAE,CAAC;QAC5B,MAAM,CAAC,GAAG,CACN,IAAA,8BAAS,EAAC;YACN,QAAQ,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,SAAS;YACnC,GAAG,EAA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gBACrF,GAAG,cAAc;gBACjB,aAAa,EAAE,YAAY;gBAC3B,wBAAwB,EAAE,qBAAqB;aAClD,CAAC;YAEF,IAAI,kBAAkB,EAAE,CAAC;gBACrB,UAAU,CAAC,SAAS,GAAG,qBAAM,CAAC,UAAU,EAAE,CAAC;gBAC3C,UAAU,CAAC,mBAAmB,GAAG,gBAAgB,CAAC;YACtD,CAAC;YAED,UAAU,GAAG,MAAM,YAAY,CAAC,cAAe,CAAC,UAAU,CAAC,CAAC;YAC5D,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAI,KAAK,YAAY,sBAAU,EAAE,CAAC;gBAC9B,MAAM,MAAM,GAAG,KAAK,YAAY,uBAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;gBACxD,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACtD,CAAC;iBAAM,CAAC;gBACJ,MAAM,WAAW,GAAG,IAAI,uBAAW,CAAC,uBAAuB,CAAC,CAAC;gBAC7D,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACzD,CAAC;QACL,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAClB,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/revoke.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/revoke.d.ts
new file mode 100644
index 0000000..2be32bb
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/revoke.d.ts
@@ -0,0 +1,13 @@
+import { OAuthServerProvider } from '../provider.js';
+import { RequestHandler } from 'express';
+import { Options as RateLimitOptions } from 'express-rate-limit';
+export type RevocationHandlerOptions = {
+ provider: OAuthServerProvider;
+ /**
+ * Rate limiting configuration for the token revocation endpoint.
+ * Set to false to disable rate limiting for this endpoint.
+ */
+ rateLimit?: Partial | false;
+};
+export declare function revocationHandler({ provider, rateLimit: rateLimitConfig }: RevocationHandlerOptions): RequestHandler;
+//# sourceMappingURL=revoke.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/revoke.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/revoke.d.ts.map
new file mode 100644
index 0000000..fb13cf1
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/revoke.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"revoke.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/revoke.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAgB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAIlD,OAAO,EAAa,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI5E,MAAM,MAAM,wBAAwB,GAAG;IACnC,QAAQ,EAAE,mBAAmB,CAAC;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC;CACjD,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,wBAAwB,GAAG,cAAc,CA4DpH"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/revoke.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/revoke.js
new file mode 100644
index 0000000..4fb1da7
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/revoke.js
@@ -0,0 +1,65 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.revocationHandler = revocationHandler;
+const express_1 = __importDefault(require("express"));
+const cors_1 = __importDefault(require("cors"));
+const clientAuth_js_1 = require("../middleware/clientAuth.js");
+const auth_js_1 = require("../../../shared/auth.js");
+const express_rate_limit_1 = require("express-rate-limit");
+const allowedMethods_js_1 = require("../middleware/allowedMethods.js");
+const errors_js_1 = require("../errors.js");
+function revocationHandler({ provider, rateLimit: rateLimitConfig }) {
+ if (!provider.revokeToken) {
+ throw new Error('Auth provider does not support revoking tokens');
+ }
+ // Nested router so we can configure middleware and restrict HTTP method
+ const router = express_1.default.Router();
+ // Configure CORS to allow any origin, to make accessible to web-based MCP clients
+ router.use((0, cors_1.default)());
+ router.use((0, allowedMethods_js_1.allowedMethods)(['POST']));
+ router.use(express_1.default.urlencoded({ extended: false }));
+ // Apply rate limiting unless explicitly disabled
+ if (rateLimitConfig !== false) {
+ router.use((0, express_rate_limit_1.rateLimit)({
+ windowMs: 15 * 60 * 1000, // 15 minutes
+ max: 50, // 50 requests per windowMs
+ standardHeaders: true,
+ legacyHeaders: false,
+ message: new errors_js_1.TooManyRequestsError('You have exceeded the rate limit for token revocation requests').toResponseObject(),
+ ...rateLimitConfig
+ }));
+ }
+ // Authenticate and extract client details
+ router.use((0, clientAuth_js_1.authenticateClient)({ clientsStore: provider.clientsStore }));
+ router.post('/', async (req, res) => {
+ res.setHeader('Cache-Control', 'no-store');
+ try {
+ const parseResult = auth_js_1.OAuthTokenRevocationRequestSchema.safeParse(req.body);
+ if (!parseResult.success) {
+ throw new errors_js_1.InvalidRequestError(parseResult.error.message);
+ }
+ const client = req.client;
+ if (!client) {
+ // This should never happen
+ throw new errors_js_1.ServerError('Internal Server Error');
+ }
+ await provider.revokeToken(client, parseResult.data);
+ res.status(200).json({});
+ }
+ catch (error) {
+ if (error instanceof errors_js_1.OAuthError) {
+ const status = error instanceof errors_js_1.ServerError ? 500 : 400;
+ res.status(status).json(error.toResponseObject());
+ }
+ else {
+ const serverError = new errors_js_1.ServerError('Internal Server Error');
+ res.status(500).json(serverError.toResponseObject());
+ }
+ }
+ });
+ return router;
+}
+//# sourceMappingURL=revoke.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/revoke.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/revoke.js.map
new file mode 100644
index 0000000..ca01fee
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/revoke.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"revoke.js","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/revoke.ts"],"names":[],"mappings":";;;;;AAkBA,8CA4DC;AA7ED,sDAAkD;AAClD,gDAAwB;AACxB,+DAAiE;AACjE,qDAA4E;AAC5E,2DAA4E;AAC5E,uEAAiE;AACjE,4CAAkG;AAWlG,SAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAA4B;IAChG,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACtE,CAAC;IAED,wEAAwE;IACxE,MAAM,MAAM,GAAG,iBAAO,CAAC,MAAM,EAAE,CAAC;IAEhC,kFAAkF;IAClF,MAAM,CAAC,GAAG,CAAC,IAAA,cAAI,GAAE,CAAC,CAAC;IAEnB,MAAM,CAAC,GAAG,CAAC,IAAA,kCAAc,EAAC,CAAC,MAAM,CAAC,CAAC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AI,CAAC,CAAC;YACtD,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC7B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAI,KAAK,YAAY,sBAAU,EAAE,CAAC;gBAC9B,MAAM,MAAM,GAAG,KAAK,YAAY,uBAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;gBACxD,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACtD,CAAC;iBAAM,CAAC;gBACJ,MAAM,WAAW,GAAG,IAAI,uBAAW,CAAC,uBAAuB,CAAC,CAAC;gBAC7D,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACzD,CAAC;QACL,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAClB,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/token.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/token.d.ts
new file mode 100644
index 0000000..24d1c87
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/token.d.ts
@@ -0,0 +1,13 @@
+import { RequestHandler } from 'express';
+import { OAuthServerProvider } from '../provider.js';
+import { Options as RateLimitOptions } from 'express-rate-limit';
+export type TokenHandlerOptions = {
+ provider: OAuthServerProvider;
+ /**
+ * Rate limiting configuration for the token endpoint.
+ * Set to false to disable rate limiting for this endpoint.
+ */
+ rateLimit?: Partial | false;
+};
+export declare function tokenHandler({ provider, rateLimit: rateLimitConfig }: TokenHandlerOptions): RequestHandler;
+//# sourceMappingURL=token.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/token.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/token.d.ts.map
new file mode 100644
index 0000000..68189b0
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/token.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/token.ts"],"names":[],"mappings":"AACA,OAAgB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD,OAAO,EAAa,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAW5E,MAAM,MAAM,mBAAmB,GAAG;IAC9B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC;CACjD,CAAC;AAmBF,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,mBAAmB,GAAG,cAAc,CA+G1G"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/token.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/token.js
new file mode 100644
index 0000000..8318de6
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/token.js
@@ -0,0 +1,136 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.tokenHandler = tokenHandler;
+const z = __importStar(require("zod/v4"));
+const express_1 = __importDefault(require("express"));
+const cors_1 = __importDefault(require("cors"));
+const pkce_challenge_1 = require("pkce-challenge");
+const clientAuth_js_1 = require("../middleware/clientAuth.js");
+const express_rate_limit_1 = require("express-rate-limit");
+const allowedMethods_js_1 = require("../middleware/allowedMethods.js");
+const errors_js_1 = require("../errors.js");
+const TokenRequestSchema = z.object({
+ grant_type: z.string()
+});
+const AuthorizationCodeGrantSchema = z.object({
+ code: z.string(),
+ code_verifier: z.string(),
+ redirect_uri: z.string().optional(),
+ resource: z.string().url().optional()
+});
+const RefreshTokenGrantSchema = z.object({
+ refresh_token: z.string(),
+ scope: z.string().optional(),
+ resource: z.string().url().optional()
+});
+function tokenHandler({ provider, rateLimit: rateLimitConfig }) {
+ // Nested router so we can configure middleware and restrict HTTP method
+ const router = express_1.default.Router();
+ // Configure CORS to allow any origin, to make accessible to web-based MCP clients
+ router.use((0, cors_1.default)());
+ router.use((0, allowedMethods_js_1.allowedMethods)(['POST']));
+ router.use(express_1.default.urlencoded({ extended: false }));
+ // Apply rate limiting unless explicitly disabled
+ if (rateLimitConfig !== false) {
+ router.use((0, express_rate_limit_1.rateLimit)({
+ windowMs: 15 * 60 * 1000, // 15 minutes
+ max: 50, // 50 requests per windowMs
+ standardHeaders: true,
+ legacyHeaders: false,
+ message: new errors_js_1.TooManyRequestsError('You have exceeded the rate limit for token requests').toResponseObject(),
+ ...rateLimitConfig
+ }));
+ }
+ // Authenticate and extract client details
+ router.use((0, clientAuth_js_1.authenticateClient)({ clientsStore: provider.clientsStore }));
+ router.post('/', async (req, res) => {
+ res.setHeader('Cache-Control', 'no-store');
+ try {
+ const parseResult = TokenRequestSchema.safeParse(req.body);
+ if (!parseResult.success) {
+ throw new errors_js_1.InvalidRequestError(parseResult.error.message);
+ }
+ const { grant_type } = parseResult.data;
+ const client = req.client;
+ if (!client) {
+ // This should never happen
+ throw new errors_js_1.ServerError('Internal Server Error');
+ }
+ switch (grant_type) {
+ case 'authorization_code': {
+ const parseResult = AuthorizationCodeGrantSchema.safeParse(req.body);
+ if (!parseResult.success) {
+ throw new errors_js_1.InvalidRequestError(parseResult.error.message);
+ }
+ const { code, code_verifier, redirect_uri, resource } = parseResult.data;
+ const skipLocalPkceValidation = provider.skipLocalPkceValidation;
+ // Perform local PKCE validation unless explicitly skipped
+ // (e.g. to validate code_verifier in upstream server)
+ if (!skipLocalPkceValidation) {
+ const codeChallenge = await provider.challengeForAuthorizationCode(client, code);
+ if (!(await (0, pkce_challenge_1.verifyChallenge)(code_verifier, codeChallenge))) {
+ throw new errors_js_1.InvalidGrantError('code_verifier does not match the challenge');
+ }
+ }
+ // Passes the code_verifier to the provider if PKCE validation didn't occur locally
+ const tokens = await provider.exchangeAuthorizationCode(client, code, skipLocalPkceValidation ? code_verifier : undefined, redirect_uri, resource ? new URL(resource) : undefined);
+ res.status(200).json(tokens);
+ break;
+ }
+ case 'refresh_token': {
+ const parseResult = RefreshTokenGrantSchema.safeParse(req.body);
+ if (!parseResult.success) {
+ throw new errors_js_1.InvalidRequestError(parseResult.error.message);
+ }
+ const { refresh_token, scope, resource } = parseResult.data;
+ const scopes = scope?.split(' ');
+ const tokens = await provider.exchangeRefreshToken(client, refresh_token, scopes, resource ? new URL(resource) : undefined);
+ res.status(200).json(tokens);
+ break;
+ }
+ // Additional auth methods will not be added on the server side of the SDK.
+ case 'client_credentials':
+ default:
+ throw new errors_js_1.UnsupportedGrantTypeError('The grant type is not supported by this authorization server.');
+ }
+ }
+ catch (error) {
+ if (error instanceof errors_js_1.OAuthError) {
+ const status = error instanceof errors_js_1.ServerError ? 500 : 400;
+ res.status(status).json(error.toResponseObject());
+ }
+ else {
+ const serverError = new errors_js_1.ServerError('Internal Server Error');
+ res.status(500).json(serverError.toResponseObject());
+ }
+ }
+ });
+ return router;
+}
+//# sourceMappingURL=token.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/token.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/token.js.map
new file mode 100644
index 0000000..b6b6406
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/token.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"token.js","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/token.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,oCA+GC;AA1JD,0CAA4B;AAC5B,sDAAkD;AAElD,gDAAwB;AACxB,mDAAiD;AACjD,+DAAiE;AACjE,2DAA4E;AAC5E,uEAAiE;AACjE,4CAOsB;AAWtB,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC;AAEH,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,YAAY,EAAE,CAAC,CAAC,M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AC,IAAI,CAAC,MAAM,CAAC,CAAC;oBAC7B,MAAM;gBACV,CAAC;gBACD,2EAA2E;gBAC3E,KAAK,oBAAoB,CAAC;gBAC1B;oBACI,MAAM,IAAI,qCAAyB,CAAC,+DAA+D,CAAC,CAAC;YAC7G,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAI,KAAK,YAAY,sBAAU,EAAE,CAAC;gBAC9B,MAAM,MAAM,GAAG,KAAK,YAAY,uBAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;gBACxD,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACtD,CAAC;iBAAM,CAAC;gBACJ,MAAM,WAAW,GAAG,IAAI,uBAAW,CAAC,uBAAuB,CAAC,CAAC;gBAC7D,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACzD,CAAC;QACL,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAClB,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/allowedMethods.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/allowedMethods.d.ts
new file mode 100644
index 0000000..ee6037e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/allowedMethods.d.ts
@@ -0,0 +1,9 @@
+import { RequestHandler } from 'express';
+/**
+ * Middleware to handle unsupported HTTP methods with a 405 Method Not Allowed response.
+ *
+ * @param allowedMethods Array of allowed HTTP methods for this endpoint (e.g., ['GET', 'POST'])
+ * @returns Express middleware that returns a 405 error if method not in allowed list
+ */
+export declare function allowedMethods(allowedMethods: string[]): RequestHandler;
+//# sourceMappingURL=allowedMethods.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/allowedMethods.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/allowedMethods.d.ts.map
new file mode 100644
index 0000000..d3de93e
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/allowedMethods.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"allowedMethods.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/middleware/allowedMethods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,cAAc,CAUvE"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/allowedMethods.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/allowedMethods.js
new file mode 100644
index 0000000..f445537
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/allowedMethods.js
@@ -0,0 +1,21 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.allowedMethods = allowedMethods;
+const errors_js_1 = require("../errors.js");
+/**
+ * Middleware to handle unsupported HTTP methods with a 405 Method Not Allowed response.
+ *
+ * @param allowedMethods Array of allowed HTTP methods for this endpoint (e.g., ['GET', 'POST'])
+ * @returns Express middleware that returns a 405 error if method not in allowed list
+ */
+function allowedMethods(allowedMethods) {
+ return (req, res, next) => {
+ if (allowedMethods.includes(req.method)) {
+ next();
+ return;
+ }
+ const error = new errors_js_1.MethodNotAllowedError(`The method ${req.method} is not allowed for this endpoint`);
+ res.status(405).set('Allow', allowedMethods.join(', ')).json(error.toResponseObject());
+ };
+}
+//# sourceMappingURL=allowedMethods.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/allowedMethods.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/allowedMethods.js.map
new file mode 100644
index 0000000..be69f33
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/allowedMethods.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"allowedMethods.js","sourceRoot":"","sources":["../../../../../src/server/auth/middleware/allowedMethods.ts"],"names":[],"mappings":";;AASA,wCAUC;AAlBD,4CAAqD;AAErD;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,cAAwB;IACnD,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QACtB,IAAI,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YACtC,IAAI,EAAE,CAAC;YACP,OAAO;QACX,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,iCAAqB,CAAC,cAAc,GAAG,CAAC,MAAM,mCAAmC,CAAC,CAAC;QACrG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC3F,CAAC,CAAC;AACN,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.d.ts
new file mode 100644
index 0000000..1073075
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.d.ts
@@ -0,0 +1,35 @@
+import { RequestHandler } from 'express';
+import { OAuthTokenVerifier } from '../provider.js';
+import { AuthInfo } from '../types.js';
+export type BearerAuthMiddlewareOptions = {
+ /**
+ * A provider used to verify tokens.
+ */
+ verifier: OAuthTokenVerifier;
+ /**
+ * Optional scopes that the token must have.
+ */
+ requiredScopes?: string[];
+ /**
+ * Optional resource metadata URL to include in WWW-Authenticate header.
+ */
+ resourceMetadataUrl?: string;
+};
+declare module 'express-serve-static-core' {
+ interface Request {
+ /**
+ * Information about the validated access token, if the `requireBearerAuth` middleware was used.
+ */
+ auth?: AuthInfo;
+ }
+}
+/**
+ * Middleware that requires a valid Bearer token in the Authorization header.
+ *
+ * This will validate the token with the auth provider and add the resulting auth info to the request object.
+ *
+ * If resourceMetadataUrl is provided, it will be included in the WWW-Authenticate header
+ * for 401 responses as per the OAuth 2.0 Protected Resource Metadata spec.
+ */
+export declare function requireBearerAuth({ verifier, requiredScopes, resourceMetadataUrl }: BearerAuthMiddlewareOptions): RequestHandler;
+//# sourceMappingURL=bearerAuth.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.d.ts.map
new file mode 100644
index 0000000..c9d939f
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"bearerAuth.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/middleware/bearerAuth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,MAAM,2BAA2B,GAAG;IACtC;;OAEG;IACH,QAAQ,EAAE,kBAAkB,CAAC;IAE7B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,OAAO,QAAQ,2BAA2B,CAAC;IACvC,UAAU,OAAO;QACb;;WAEG;QACH,IAAI,CAAC,EAAE,QAAQ,CAAC;KACnB;CACJ;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,cAAmB,EAAE,mBAAmB,EAAE,EAAE,2BAA2B,GAAG,cAAc,CA8DrI"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.js
new file mode 100644
index 0000000..dcfc509
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.js
@@ -0,0 +1,75 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.requireBearerAuth = requireBearerAuth;
+const errors_js_1 = require("../errors.js");
+/**
+ * Middleware that requires a valid Bearer token in the Authorization header.
+ *
+ * This will validate the token with the auth provider and add the resulting auth info to the request object.
+ *
+ * If resourceMetadataUrl is provided, it will be included in the WWW-Authenticate header
+ * for 401 responses as per the OAuth 2.0 Protected Resource Metadata spec.
+ */
+function requireBearerAuth({ verifier, requiredScopes = [], resourceMetadataUrl }) {
+ return async (req, res, next) => {
+ try {
+ const authHeader = req.headers.authorization;
+ if (!authHeader) {
+ throw new errors_js_1.InvalidTokenError('Missing Authorization header');
+ }
+ const [type, token] = authHeader.split(' ');
+ if (type.toLowerCase() !== 'bearer' || !token) {
+ throw new errors_js_1.InvalidTokenError("Invalid Authorization header format, expected 'Bearer TOKEN'");
+ }
+ const authInfo = await verifier.verifyAccessToken(token);
+ // Check if token has the required scopes (if any)
+ if (requiredScopes.length > 0) {
+ const hasAllScopes = requiredScopes.every(scope => authInfo.scopes.includes(scope));
+ if (!hasAllScopes) {
+ throw new errors_js_1.InsufficientScopeError('Insufficient scope');
+ }
+ }
+ // Check if the token is set to expire or if it is expired
+ if (typeof authInfo.expiresAt !== 'number' || isNaN(authInfo.expiresAt)) {
+ throw new errors_js_1.InvalidTokenError('Token has no expiration time');
+ }
+ else if (authInfo.expiresAt < Date.now() / 1000) {
+ throw new errors_js_1.InvalidTokenError('Token has expired');
+ }
+ req.auth = authInfo;
+ next();
+ }
+ catch (error) {
+ // Build WWW-Authenticate header parts
+ const buildWwwAuthHeader = (errorCode, message) => {
+ let header = `Bearer error="${errorCode}", error_description="${message}"`;
+ if (requiredScopes.length > 0) {
+ header += `, scope="${requiredScopes.join(' ')}"`;
+ }
+ if (resourceMetadataUrl) {
+ header += `, resource_metadata="${resourceMetadataUrl}"`;
+ }
+ return header;
+ };
+ if (error instanceof errors_js_1.InvalidTokenError) {
+ res.set('WWW-Authenticate', buildWwwAuthHeader(error.errorCode, error.message));
+ res.status(401).json(error.toResponseObject());
+ }
+ else if (error instanceof errors_js_1.InsufficientScopeError) {
+ res.set('WWW-Authenticate', buildWwwAuthHeader(error.errorCode, error.message));
+ res.status(403).json(error.toResponseObject());
+ }
+ else if (error instanceof errors_js_1.ServerError) {
+ res.status(500).json(error.toResponseObject());
+ }
+ else if (error instanceof errors_js_1.OAuthError) {
+ res.status(400).json(error.toResponseObject());
+ }
+ else {
+ const serverError = new errors_js_1.ServerError('Internal Server Error');
+ res.status(500).json(serverError.toResponseObject());
+ }
+ }
+ };
+}
+//# sourceMappingURL=bearerAuth.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.js.map
new file mode 100644
index 0000000..d111d36
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"bearerAuth.js","sourceRoot":"","sources":["../../../../../src/server/auth/middleware/bearerAuth.ts"],"names":[],"mappings":";;AAuCA,8CA8DC;AApGD,4CAAkG;AA8BlG;;;;;;;GAOG;AACH,SAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,cAAc,GAAG,EAAE,EAAE,mBAAmB,EAA+B;IACjH,OAAO,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC5B,IAAI,CAAC;YACD,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC;YAC7C,IAAI,CAAC,UAAU,EAAE,CAAC;gBACd,MAAM,IAAI,6BAAiB,CAAC,8BAA8B,CAAC,CAAC;YAChE,CAAC;YAED,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC5C,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,QAAQ,IAAI,CAAC,KAAK,EAAE,CAAC;gBAC5C,MAAM,IAAI,6BAAiB,CAAC,8DAA8D,CAAC,CAAC;YAChG,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAEzD,kDAAkD;YAClD,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC5B,MAAM,YAAY,GAAG,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;gBAEpF,IAAI,CAAC,YAAY,EAAE,CAAC;oBAChB,MAAM,IAAI,kCAAsB,CAAC,oBAAoB,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BACjD,GAAG,CAAC,GAAG,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;gBAChF,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACnD,CAAC;iBAAM,IAAI,KAAK,YAAY,uBAAW,EAAE,CAAC;gBACtC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACnD,CAAC;iBAAM,IAAI,KAAK,YAAY,sBAAU,EAAE,CAAC;gBACrC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACnD,CAAC;iBAAM,CAAC;gBACJ,MAAM,WAAW,GAAG,IAAI,uBAAW,CAAC,uBAAuB,CAAC,CAAC;gBAC7D,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACzD,CAAC;QACL,CAAC;IACL,CAAC,CAAC;AACN,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/clientAuth.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/clientAuth.d.ts
new file mode 100644
index 0000000..837f95f
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/clientAuth.d.ts
@@ -0,0 +1,19 @@
+import { RequestHandler } from 'express';
+import { OAuthRegisteredClientsStore } from '../clients.js';
+import { OAuthClientInformationFull } from '../../../shared/auth.js';
+export type ClientAuthenticationMiddlewareOptions = {
+ /**
+ * A store used to read information about registered OAuth clients.
+ */
+ clientsStore: OAuthRegisteredClientsStore;
+};
+declare module 'express-serve-static-core' {
+ interface Request {
+ /**
+ * The authenticated client for this request, if the `authenticateClient` middleware was used.
+ */
+ client?: OAuthClientInformationFull;
+ }
+}
+export declare function authenticateClient({ clientsStore }: ClientAuthenticationMiddlewareOptions): RequestHandler;
+//# sourceMappingURL=clientAuth.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/clientAuth.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/clientAuth.d.ts.map
new file mode 100644
index 0000000..5455132
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/clientAuth.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"clientAuth.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/middleware/clientAuth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAGrE,MAAM,MAAM,qCAAqC,GAAG;IAChD;;OAEG;IACH,YAAY,EAAE,2BAA2B,CAAC;CAC7C,CAAC;AAOF,OAAO,QAAQ,2BAA2B,CAAC;IACvC,UAAU,OAAO;QACb;;WAEG;QACH,MAAM,CAAC,EAAE,0BAA0B,CAAC;KACvC;CACJ;AAED,wBAAgB,kBAAkB,CAAC,EAAE,YAAY,EAAE,EAAE,qCAAqC,GAAG,cAAc,CAoC1G"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/clientAuth.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/clientAuth.js
new file mode 100644
index 0000000..e54dd10
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/clientAuth.js
@@ -0,0 +1,71 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.authenticateClient = authenticateClient;
+const z = __importStar(require("zod/v4"));
+const errors_js_1 = require("../errors.js");
+const ClientAuthenticatedRequestSchema = z.object({
+ client_id: z.string(),
+ client_secret: z.string().optional()
+});
+function authenticateClient({ clientsStore }) {
+ return async (req, res, next) => {
+ try {
+ const result = ClientAuthenticatedRequestSchema.safeParse(req.body);
+ if (!result.success) {
+ throw new errors_js_1.InvalidRequestError(String(result.error));
+ }
+ const { client_id, client_secret } = result.data;
+ const client = await clientsStore.getClient(client_id);
+ if (!client) {
+ throw new errors_js_1.InvalidClientError('Invalid client_id');
+ }
+ if (client.client_secret) {
+ if (!client_secret) {
+ throw new errors_js_1.InvalidClientError('Client secret is required');
+ }
+ if (client.client_secret !== client_secret) {
+ throw new errors_js_1.InvalidClientError('Invalid client_secret');
+ }
+ if (client.client_secret_expires_at && client.client_secret_expires_at < Math.floor(Date.now() / 1000)) {
+ throw new errors_js_1.InvalidClientError('Client secret has expired');
+ }
+ }
+ req.client = client;
+ next();
+ }
+ catch (error) {
+ if (error instanceof errors_js_1.OAuthError) {
+ const status = error instanceof errors_js_1.ServerError ? 500 : 400;
+ res.status(status).json(error.toResponseObject());
+ }
+ else {
+ const serverError = new errors_js_1.ServerError('Internal Server Error');
+ res.status(500).json(serverError.toResponseObject());
+ }
+ }
+ };
+}
+//# sourceMappingURL=clientAuth.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/clientAuth.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/clientAuth.js.map
new file mode 100644
index 0000000..63184f4
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/clientAuth.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"clientAuth.js","sourceRoot":"","sources":["../../../../../src/server/auth/middleware/clientAuth.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,gDAoCC;AA/DD,0CAA4B;AAI5B,4CAAgG;AAShG,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC;AAWH,SAAgB,kBAAkB,CAAC,EAAE,YAAY,EAAyC;IACtF,OAAO,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC5B,IAAI,CAAC;YACD,MAAM,MAAM,GAAG,gCAAgC,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACpE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBAClB,MAAM,IAAI,+BAAmB,CAAC,MAAM,CAAC,MAAM,CAA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,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACzD,CAAC;QACL,CAAC;IACL,CAAC,CAAC;AACN,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/provider.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/provider.d.ts
new file mode 100644
index 0000000..3e4eca3
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/provider.d.ts
@@ -0,0 +1,68 @@
+import { Response } from 'express';
+import { OAuthRegisteredClientsStore } from './clients.js';
+import { OAuthClientInformationFull, OAuthTokenRevocationRequest, OAuthTokens } from '../../shared/auth.js';
+import { AuthInfo } from './types.js';
+export type AuthorizationParams = {
+ state?: string;
+ scopes?: string[];
+ codeChallenge: string;
+ redirectUri: string;
+ resource?: URL;
+};
+/**
+ * Implements an end-to-end OAuth server.
+ */
+export interface OAuthServerProvider {
+ /**
+ * A store used to read information about registered OAuth clients.
+ */
+ get clientsStore(): OAuthRegisteredClientsStore;
+ /**
+ * Begins the authorization flow, which can either be implemented by this server itself or via redirection to a separate authorization server.
+ *
+ * This server must eventually issue a redirect with an authorization response or an error response to the given redirect URI. Per OAuth 2.1:
+ * - In the successful case, the redirect MUST include the `code` and `state` (if present) query parameters.
+ * - In the error case, the redirect MUST include the `error` query parameter, and MAY include an optional `error_description` query parameter.
+ */
+ authorize(client: OAuthClientInformationFull, params: AuthorizationParams, res: Response): Promise;
+ /**
+ * Returns the `codeChallenge` that was used when the indicated authorization began.
+ */
+ challengeForAuthorizationCode(client: OAuthClientInformationFull, authorizationCode: string): Promise;
+ /**
+ * Exchanges an authorization code for an access token.
+ */
+ exchangeAuthorizationCode(client: OAuthClientInformationFull, authorizationCode: string, codeVerifier?: string, redirectUri?: string, resource?: URL): Promise;
+ /**
+ * Exchanges a refresh token for an access token.
+ */
+ exchangeRefreshToken(client: OAuthClientInformationFull, refreshToken: string, scopes?: string[], resource?: URL): Promise;
+ /**
+ * Verifies an access token and returns information about it.
+ */
+ verifyAccessToken(token: string): Promise;
+ /**
+ * Revokes an access or refresh token. If unimplemented, token revocation is not supported (not recommended).
+ *
+ * If the given token is invalid or already revoked, this method should do nothing.
+ */
+ revokeToken?(client: OAuthClientInformationFull, request: OAuthTokenRevocationRequest): Promise;
+ /**
+ * Whether to skip local PKCE validation.
+ *
+ * If true, the server will not perform PKCE validation locally and will pass the code_verifier to the upstream server.
+ *
+ * NOTE: This should only be true if the upstream server is performing the actual PKCE validation.
+ */
+ skipLocalPkceValidation?: boolean;
+}
+/**
+ * Slim implementation useful for token verification
+ */
+export interface OAuthTokenVerifier {
+ /**
+ * Verifies an access token and returns information about it.
+ */
+ verifyAccessToken(token: string): Promise;
+}
+//# sourceMappingURL=provider.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/provider.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/provider.d.ts.map
new file mode 100644
index 0000000..d1a4bff
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/provider.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/server/auth/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC5G,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,MAAM,mBAAmB,GAAG;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,C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MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CACvD"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/provider.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/provider.js
new file mode 100644
index 0000000..0903bb2
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/provider.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=provider.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/provider.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/provider.js.map
new file mode 100644
index 0000000..b968414
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/provider.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../../src/server/auth/provider.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.d.ts
new file mode 100644
index 0000000..ee6f350
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.d.ts
@@ -0,0 +1,49 @@
+import { Response } from 'express';
+import { OAuthRegisteredClientsStore } from '../clients.js';
+import { OAuthClientInformationFull, OAuthTokenRevocationRequest, OAuthTokens } from '../../../shared/auth.js';
+import { AuthInfo } from '../types.js';
+import { AuthorizationParams, OAuthServerProvider } from '../provider.js';
+import { FetchLike } from '../../../shared/transport.js';
+export type ProxyEndpoints = {
+ authorizationUrl: string;
+ tokenUrl: string;
+ revocationUrl?: string;
+ registrationUrl?: string;
+};
+export type ProxyOptions = {
+ /**
+ * Individual endpoint URLs for proxying specific OAuth operations
+ */
+ endpoints: ProxyEndpoints;
+ /**
+ * Function to verify access tokens and return auth info
+ */
+ verifyAccessToken: (token: string) => Promise;
+ /**
+ * Function to fetch client information from the upstream server
+ */
+ getClient: (clientId: string) => Promise;
+ /**
+ * Custom fetch implementation used for all network requests.
+ */
+ fetch?: FetchLike;
+};
+/**
+ * Implements an OAuth server that proxies requests to another OAuth server.
+ */
+export declare class ProxyOAuthServerProvider implements OAuthServerProvider {
+ protected readonly _endpoints: ProxyEndpoints;
+ protected readonly _verifyAccessToken: (token: string) => Promise;
+ protected readonly _getClient: (clientId: string) => Promise;
+ protected readonly _fetch?: FetchLike;
+ skipLocalPkceValidation: boolean;
+ revokeToken?: (client: OAuthClientInformationFull, request: OAuthTokenRevocationRequest) => Promise;
+ constructor(options: ProxyOptions);
+ get clientsStore(): OAuthRegisteredClientsStore;
+ authorize(client: OAuthClientInformationFull, params: AuthorizationParams, res: Response): Promise;
+ challengeForAuthorizationCode(_client: OAuthClientInformationFull, _authorizationCode: string): Promise;
+ exchangeAuthorizationCode(client: OAuthClientInformationFull, authorizationCode: string, codeVerifier?: string, redirectUri?: string, resource?: URL): Promise;
+ exchangeRefreshToken(client: OAuthClientInformationFull, refreshToken: string, scopes?: string[], resource?: URL): Promise;
+ verifyAccessToken(token: string): Promise;
+}
+//# sourceMappingURL=proxyProvider.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.d.ts.map
new file mode 100644
index 0000000..124c105
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"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AAO,CAAC,0BAA0B,GAAG,SAAS,CAAC,CAAC;IACrG,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAEtC,uBAAuB,UAAQ;IAE/B,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,0BAA0B,EAAE,OAAO,EAAE,2BAA2B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;gBAE9F,OAAO,EAAE,YAAY;IAuCjC,IAAI,YAAY,IAAI,2BAA2B,CAwB9C;IAEK,SAAS,CAAC,MAAM,EAAE,0BAA0B,EAAE,MAAM,EAAE,mBAAmB,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBxG,6BAA6B,CAAC,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAM/G,yBAAyB,CAC3B,MAAM,EAAE,0BAA0B,EAClC,iBAAiB,EAAE,MAAM,EACzB,YAAY,CAAC,EAAE,MAAM,EACrB,WAAW,CAAC,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,GAAG,GACf,OAAO,CAAC,WAAW,CAAC;IAwCjB,oBAAoB,CACtB,MAAM,EAAE,0BAA0B,EAClC,YAAY,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,MAAM,EAAE,EACjB,QAAQ,CAAC,EAAE,GAAG,GACf,OAAO,CAAC,WAAW,CAAC;IAoCjB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;CAG5D"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.js
new file mode 100644
index 0000000..1707894
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.js
@@ -0,0 +1,159 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ProxyOAuthServerProvider = void 0;
+const auth_js_1 = require("../../../shared/auth.js");
+const errors_js_1 = require("../errors.js");
+/**
+ * Implements an OAuth server that proxies requests to another OAuth server.
+ */
+class ProxyOAuthServerProvider {
+ constructor(options) {
+ this.skipLocalPkceValidation = true;
+ this._endpoints = options.endpoints;
+ this._verifyAccessToken = options.verifyAccessToken;
+ this._getClient = options.getClient;
+ this._fetch = options.fetch;
+ if (options.endpoints?.revocationUrl) {
+ this.revokeToken = async (client, request) => {
+ const revocationUrl = this._endpoints.revocationUrl;
+ if (!revocationUrl) {
+ throw new Error('No revocation endpoint configured');
+ }
+ const params = new URLSearchParams();
+ params.set('token', request.token);
+ params.set('client_id', client.client_id);
+ if (client.client_secret) {
+ params.set('client_secret', client.client_secret);
+ }
+ if (request.token_type_hint) {
+ params.set('token_type_hint', request.token_type_hint);
+ }
+ const response = await (this._fetch ?? fetch)(revocationUrl, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded'
+ },
+ body: params.toString()
+ });
+ await response.body?.cancel();
+ if (!response.ok) {
+ throw new errors_js_1.ServerError(`Token revocation failed: ${response.status}`);
+ }
+ };
+ }
+ }
+ get clientsStore() {
+ const registrationUrl = this._endpoints.registrationUrl;
+ return {
+ getClient: this._getClient,
+ ...(registrationUrl && {
+ registerClient: async (client) => {
+ const response = await (this._fetch ?? fetch)(registrationUrl, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify(client)
+ });
+ if (!response.ok) {
+ await response.body?.cancel();
+ throw new errors_js_1.ServerError(`Client registration failed: ${response.status}`);
+ }
+ const data = await response.json();
+ return auth_js_1.OAuthClientInformationFullSchema.parse(data);
+ }
+ })
+ };
+ }
+ async authorize(client, params, res) {
+ // Start with required OAuth parameters
+ const targetUrl = new URL(this._endpoints.authorizationUrl);
+ const searchParams = new URLSearchParams({
+ client_id: client.client_id,
+ response_type: 'code',
+ redirect_uri: params.redirectUri,
+ code_challenge: params.codeChallenge,
+ code_challenge_method: 'S256'
+ });
+ // Add optional standard OAuth parameters
+ if (params.state)
+ searchParams.set('state', params.state);
+ if (params.scopes?.length)
+ searchParams.set('scope', params.scopes.join(' '));
+ if (params.resource)
+ searchParams.set('resource', params.resource.href);
+ targetUrl.search = searchParams.toString();
+ res.redirect(targetUrl.toString());
+ }
+ async challengeForAuthorizationCode(_client, _authorizationCode) {
+ // In a proxy setup, we don't store the code challenge ourselves
+ // Instead, we proxy the token request and let the upstream server validate it
+ return '';
+ }
+ async exchangeAuthorizationCode(client, authorizationCode, codeVerifier, redirectUri, resource) {
+ const params = new URLSearchParams({
+ grant_type: 'authorization_code',
+ client_id: client.client_id,
+ code: authorizationCode
+ });
+ if (client.client_secret) {
+ params.append('client_secret', client.client_secret);
+ }
+ if (codeVerifier) {
+ params.append('code_verifier', codeVerifier);
+ }
+ if (redirectUri) {
+ params.append('redirect_uri', redirectUri);
+ }
+ if (resource) {
+ params.append('resource', resource.href);
+ }
+ const response = await (this._fetch ?? fetch)(this._endpoints.tokenUrl, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded'
+ },
+ body: params.toString()
+ });
+ if (!response.ok) {
+ await response.body?.cancel();
+ throw new errors_js_1.ServerError(`Token exchange failed: ${response.status}`);
+ }
+ const data = await response.json();
+ return auth_js_1.OAuthTokensSchema.parse(data);
+ }
+ async exchangeRefreshToken(client, refreshToken, scopes, resource) {
+ const params = new URLSearchParams({
+ grant_type: 'refresh_token',
+ client_id: client.client_id,
+ refresh_token: refreshToken
+ });
+ if (client.client_secret) {
+ params.set('client_secret', client.client_secret);
+ }
+ if (scopes?.length) {
+ params.set('scope', scopes.join(' '));
+ }
+ if (resource) {
+ params.set('resource', resource.href);
+ }
+ const response = await (this._fetch ?? fetch)(this._endpoints.tokenUrl, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded'
+ },
+ body: params.toString()
+ });
+ if (!response.ok) {
+ await response.body?.cancel();
+ throw new errors_js_1.ServerError(`Token refresh failed: ${response.status}`);
+ }
+ const data = await response.json();
+ return auth_js_1.OAuthTokensSchema.parse(data);
+ }
+ async verifyAccessToken(token) {
+ return this._verifyAccessToken(token);
+ }
+}
+exports.ProxyOAuthServerProvider = ProxyOAuthServerProvider;
+//# sourceMappingURL=proxyProvider.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.js.map
new file mode 100644
index 0000000..7f16e74
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"proxyProvider.js","sourceRoot":"","sources":["../../../../../src/server/auth/providers/proxyProvider.ts"],"names":[],"mappings":";;;AAEA,qDAMiC;AAGjC,4CAA2C;AAgC3C;;GAEG;AACH,MAAa,wBAAwB;IAUjC,YAAY,OAAqB;QAJjC,4BAAuB,GAAG,IAAI,CAAC;QAK3B,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC;QACpC,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACpD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC;QACpC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAC5B,IAAI,OAAO,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC;YACnC,IAAI,CAAC,WAAW,GAAG,KAAK,EAAE,MAAkC,EAAE,OAAoC,EAAE,EAAE;gBAClG,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;gBAEpD,IAAI,CAAC,aAAa,EAAE,CAAC;oBACjB,MAA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E;SAC1B,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACf,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;YAC9B,MAAM,IAAI,uBAAW,CAAC,yBAAyB,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QACtE,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,OAAO,2BAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,KAAa;QACjC,OAAO,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;CACJ;AA/LD,4DA+LC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/router.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/router.d.ts
new file mode 100644
index 0000000..43dabde
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/router.d.ts
@@ -0,0 +1,101 @@
+import express, { RequestHandler } from 'express';
+import { ClientRegistrationHandlerOptions } from './handlers/register.js';
+import { TokenHandlerOptions } from './handlers/token.js';
+import { AuthorizationHandlerOptions } from './handlers/authorize.js';
+import { RevocationHandlerOptions } from './handlers/revoke.js';
+import { OAuthServerProvider } from './provider.js';
+import { OAuthMetadata } from '../../shared/auth.js';
+export type AuthRouterOptions = {
+ /**
+ * A provider implementing the actual authorization logic for this router.
+ */
+ provider: OAuthServerProvider;
+ /**
+ * The authorization server's issuer identifier, which is a URL that uses the "https" scheme and has no query or fragment components.
+ */
+ issuerUrl: URL;
+ /**
+ * The base URL of the authorization server to use for the metadata endpoints.
+ *
+ * If not provided, the issuer URL will be used as the base URL.
+ */
+ baseUrl?: URL;
+ /**
+ * An optional URL of a page containing human-readable information that developers might want or need to know when using the authorization server.
+ */
+ serviceDocumentationUrl?: URL;
+ /**
+ * An optional list of scopes supported by this authorization server
+ */
+ scopesSupported?: string[];
+ /**
+ * The resource name to be displayed in protected resource metadata
+ */
+ resourceName?: string;
+ /**
+ * The URL of the protected resource (RS) whose metadata we advertise.
+ * If not provided, falls back to `baseUrl` and then to `issuerUrl` (AS=RS).
+ */
+ resourceServerUrl?: URL;
+ authorizationOptions?: Omit;
+ clientRegistrationOptions?: Omit;
+ revocationOptions?: Omit;
+ tokenOptions?: Omit;
+};
+export declare const createOAuthMetadata: (options: {
+ provider: OAuthServerProvider;
+ issuerUrl: URL;
+ baseUrl?: URL;
+ serviceDocumentationUrl?: URL;
+ scopesSupported?: string[];
+}) => OAuthMetadata;
+/**
+ * Installs standard MCP authorization server endpoints, including dynamic client registration and token revocation (if supported).
+ * Also advertises standard authorization server metadata, for easier discovery of supported configurations by clients.
+ * Note: if your MCP server is only a resource server and not an authorization server, use mcpAuthMetadataRouter instead.
+ *
+ * By default, rate limiting is applied to all endpoints to prevent abuse.
+ *
+ * This router MUST be installed at the application root, like so:
+ *
+ * const app = express();
+ * app.use(mcpAuthRouter(...));
+ */
+export declare function mcpAuthRouter(options: AuthRouterOptions): RequestHandler;
+export type AuthMetadataOptions = {
+ /**
+ * OAuth Metadata as would be returned from the authorization server
+ * this MCP server relies on
+ */
+ oauthMetadata: OAuthMetadata;
+ /**
+ * The url of the MCP server, for use in protected resource metadata
+ */
+ resourceServerUrl: URL;
+ /**
+ * The url for documentation for the MCP server
+ */
+ serviceDocumentationUrl?: URL;
+ /**
+ * An optional list of scopes supported by this MCP server
+ */
+ scopesSupported?: string[];
+ /**
+ * An optional resource name to display in resource metadata
+ */
+ resourceName?: string;
+};
+export declare function mcpAuthMetadataRouter(options: AuthMetadataOptions): express.Router;
+/**
+ * Helper function to construct the OAuth 2.0 Protected Resource Metadata URL
+ * from a given server URL. This replaces the path with the standard metadata endpoint.
+ *
+ * @param serverUrl - The base URL of the protected resource server
+ * @returns The URL for the OAuth protected resource metadata endpoint
+ *
+ * @example
+ * getOAuthProtectedResourceMetadataUrl(new URL('https://api.example.com/mcp'))
+ * // Returns: 'https://api.example.com/.well-known/oauth-protected-resource/mcp'
+ */
+export declare function getOAuthProtectedResourceMetadataUrl(serverUrl: URL): string;
+//# sourceMappingURL=router.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/router.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/router.d.ts.map
new file mode 100644
index 0000000..615cb96
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/router.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../src/server/auth/router.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAA6B,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AACrG,OAAO,EAAgB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAwB,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAqB,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,aAAa,EAAkC,MAAM,sBAAsB,CAAC;AAUrF,MAAM,MAAM,iBAAiB,GAAG;IAC5B;;OAEG;IACH,QAAQ,EAAE,mBAAmB,CAAC;IAE9B;;OAEG;IACH,SAAS,EAAE,GAAG,CAAC;IAEf;;;;OAIG;IACH,OAAO,CAAC,EAAE,GAAG,CAAC;IAEd;;OAEG;IACH,uBAAuB,CAAC,EAAE,GAAG,CAAC;IAE9B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAE3B;;OAEG;IACH,YAA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server/auth/router.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/router.js
new file mode 100644
index 0000000..5827119
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/router.js
@@ -0,0 +1,128 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.createOAuthMetadata = void 0;
+exports.mcpAuthRouter = mcpAuthRouter;
+exports.mcpAuthMetadataRouter = mcpAuthMetadataRouter;
+exports.getOAuthProtectedResourceMetadataUrl = getOAuthProtectedResourceMetadataUrl;
+const express_1 = __importDefault(require("express"));
+const register_js_1 = require("./handlers/register.js");
+const token_js_1 = require("./handlers/token.js");
+const authorize_js_1 = require("./handlers/authorize.js");
+const revoke_js_1 = require("./handlers/revoke.js");
+const metadata_js_1 = require("./handlers/metadata.js");
+// Check for dev mode flag that allows HTTP issuer URLs (for development/testing only)
+const allowInsecureIssuerUrl = process.env.MCP_DANGEROUSLY_ALLOW_INSECURE_ISSUER_URL === 'true' || process.env.MCP_DANGEROUSLY_ALLOW_INSECURE_ISSUER_URL === '1';
+if (allowInsecureIssuerUrl) {
+ // eslint-disable-next-line no-console
+ console.warn('MCP_DANGEROUSLY_ALLOW_INSECURE_ISSUER_URL is enabled - HTTP issuer URLs are allowed. Do not use in production.');
+}
+const checkIssuerUrl = (issuer) => {
+ // Technically RFC 8414 does not permit a localhost HTTPS exemption, but this will be necessary for ease of testing
+ if (issuer.protocol !== 'https:' && issuer.hostname !== 'localhost' && issuer.hostname !== '127.0.0.1' && !allowInsecureIssuerUrl) {
+ throw new Error('Issuer URL must be HTTPS');
+ }
+ if (issuer.hash) {
+ throw new Error(`Issuer URL must not have a fragment: ${issuer}`);
+ }
+ if (issuer.search) {
+ throw new Error(`Issuer URL must not have a query string: ${issuer}`);
+ }
+};
+const createOAuthMetadata = (options) => {
+ const issuer = options.issuerUrl;
+ const baseUrl = options.baseUrl;
+ checkIssuerUrl(issuer);
+ const authorization_endpoint = '/authorize';
+ const token_endpoint = '/token';
+ const registration_endpoint = options.provider.clientsStore.registerClient ? '/register' : undefined;
+ const revocation_endpoint = options.provider.revokeToken ? '/revoke' : undefined;
+ const metadata = {
+ issuer: issuer.href,
+ service_documentation: options.serviceDocumentationUrl?.href,
+ authorization_endpoint: new URL(authorization_endpoint, baseUrl || issuer).href,
+ response_types_supported: ['code'],
+ code_challenge_methods_supported: ['S256'],
+ token_endpoint: new URL(token_endpoint, baseUrl || issuer).href,
+ token_endpoint_auth_methods_supported: ['client_secret_post', 'none'],
+ grant_types_supported: ['authorization_code', 'refresh_token'],
+ scopes_supported: options.scopesSupported,
+ revocation_endpoint: revocation_endpoint ? new URL(revocation_endpoint, baseUrl || issuer).href : undefined,
+ revocation_endpoint_auth_methods_supported: revocation_endpoint ? ['client_secret_post'] : undefined,
+ registration_endpoint: registration_endpoint ? new URL(registration_endpoint, baseUrl || issuer).href : undefined
+ };
+ return metadata;
+};
+exports.createOAuthMetadata = createOAuthMetadata;
+/**
+ * Installs standard MCP authorization server endpoints, including dynamic client registration and token revocation (if supported).
+ * Also advertises standard authorization server metadata, for easier discovery of supported configurations by clients.
+ * Note: if your MCP server is only a resource server and not an authorization server, use mcpAuthMetadataRouter instead.
+ *
+ * By default, rate limiting is applied to all endpoints to prevent abuse.
+ *
+ * This router MUST be installed at the application root, like so:
+ *
+ * const app = express();
+ * app.use(mcpAuthRouter(...));
+ */
+function mcpAuthRouter(options) {
+ const oauthMetadata = (0, exports.createOAuthMetadata)(options);
+ const router = express_1.default.Router();
+ router.use(new URL(oauthMetadata.authorization_endpoint).pathname, (0, authorize_js_1.authorizationHandler)({ provider: options.provider, ...options.authorizationOptions }));
+ router.use(new URL(oauthMetadata.token_endpoint).pathname, (0, token_js_1.tokenHandler)({ provider: options.provider, ...options.tokenOptions }));
+ router.use(mcpAuthMetadataRouter({
+ oauthMetadata,
+ // Prefer explicit RS; otherwise fall back to AS baseUrl, then to issuer (back-compat)
+ resourceServerUrl: options.resourceServerUrl ?? options.baseUrl ?? new URL(oauthMetadata.issuer),
+ serviceDocumentationUrl: options.serviceDocumentationUrl,
+ scopesSupported: options.scopesSupported,
+ resourceName: options.resourceName
+ }));
+ if (oauthMetadata.registration_endpoint) {
+ router.use(new URL(oauthMetadata.registration_endpoint).pathname, (0, register_js_1.clientRegistrationHandler)({
+ clientsStore: options.provider.clientsStore,
+ ...options.clientRegistrationOptions
+ }));
+ }
+ if (oauthMetadata.revocation_endpoint) {
+ router.use(new URL(oauthMetadata.revocation_endpoint).pathname, (0, revoke_js_1.revocationHandler)({ provider: options.provider, ...options.revocationOptions }));
+ }
+ return router;
+}
+function mcpAuthMetadataRouter(options) {
+ checkIssuerUrl(new URL(options.oauthMetadata.issuer));
+ const router = express_1.default.Router();
+ const protectedResourceMetadata = {
+ resource: options.resourceServerUrl.href,
+ authorization_servers: [options.oauthMetadata.issuer],
+ scopes_supported: options.scopesSupported,
+ resource_name: options.resourceName,
+ resource_documentation: options.serviceDocumentationUrl?.href
+ };
+ // Serve PRM at the path-specific URL per RFC 9728
+ const rsPath = new URL(options.resourceServerUrl.href).pathname;
+ router.use(`/.well-known/oauth-protected-resource${rsPath === '/' ? '' : rsPath}`, (0, metadata_js_1.metadataHandler)(protectedResourceMetadata));
+ // Always add this for OAuth Authorization Server metadata per RFC 8414
+ router.use('/.well-known/oauth-authorization-server', (0, metadata_js_1.metadataHandler)(options.oauthMetadata));
+ return router;
+}
+/**
+ * Helper function to construct the OAuth 2.0 Protected Resource Metadata URL
+ * from a given server URL. This replaces the path with the standard metadata endpoint.
+ *
+ * @param serverUrl - The base URL of the protected resource server
+ * @returns The URL for the OAuth protected resource metadata endpoint
+ *
+ * @example
+ * getOAuthProtectedResourceMetadataUrl(new URL('https://api.example.com/mcp'))
+ * // Returns: 'https://api.example.com/.well-known/oauth-protected-resource/mcp'
+ */
+function getOAuthProtectedResourceMetadataUrl(serverUrl) {
+ const u = new URL(serverUrl.href);
+ const rsPath = u.pathname && u.pathname !== '/' ? u.pathname : '';
+ return new URL(`/.well-known/oauth-protected-resource${rsPath}`, u).href;
+}
+//# sourceMappingURL=router.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/router.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/router.js.map
new file mode 100644
index 0000000..991898b
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/router.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"router.js","sourceRoot":"","sources":["../../../../src/server/auth/router.ts"],"names":[],"mappings":";;;;;;AAgIA,sCAyCC;AA8BD,sDAuBC;AAaD,oFAIC;AA/OD,sDAAkD;AAClD,wDAAqG;AACrG,kDAAwE;AACxE,0DAA4F;AAC5F,oDAAmF;AACnF,wDAAyD;AAIzD,sFAAsF;AACtF,MAAM,sBAAsB,GACxB,OAAO,CAAC,GAAG,CAAC,yCAAyC,KAAK,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,yCAAyC,KAAK,GAAG,CAAC;AACtI,IAAI,sBAAsB,EAAE,CAAC;IACzB,sCAAsC;IACtC,OAAO,CAAC,IAAI,CAAC,gHAAgH,CAAC,CAAC;AACnI,CAAC;AAgDD,MAAM,cAAc,GAAG,CAAC,MAAW,EAAQ,EAAE;IACzC,mHAAmH;IACnH,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,KAAK,WAAW,IAAI,MAAM,CAAC,QAAQ,KAAK,WAAW,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAChI,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAChD,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,wCAAwC,M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AAC;IAChE,MAAM,CAAC,GAAG,CAAC,wCAAwC,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,IAAA,6BAAe,EAAC,yBAAyB,CAAC,CAAC,CAAC;IAE/H,uEAAuE;IACvE,MAAM,CAAC,GAAG,CAAC,yCAAyC,EAAE,IAAA,6BAAe,EAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;IAE9F,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,oCAAoC,CAAC,SAAc;IAC/D,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,MAAM,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAClE,OAAO,IAAI,GAAG,CAAC,wCAAwC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7E,CAAC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/types.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/types.d.ts
new file mode 100644
index 0000000..05ec848
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/types.d.ts
@@ -0,0 +1,32 @@
+/**
+ * Information about a validated access token, provided to request handlers.
+ */
+export interface AuthInfo {
+ /**
+ * The access token.
+ */
+ token: string;
+ /**
+ * The client ID associated with this token.
+ */
+ clientId: string;
+ /**
+ * Scopes associated with this token.
+ */
+ scopes: string[];
+ /**
+ * When the token expires (in seconds since epoch).
+ */
+ expiresAt?: number;
+ /**
+ * The RFC 8707 resource server identifier for which this token is valid.
+ * If set, this MUST match the MCP server's resource identifier (minus hash fragment).
+ */
+ resource?: URL;
+ /**
+ * Additional data associated with the token.
+ * This field should be used for any additional data that needs to be attached to the auth info.
+ */
+ extra?: Record;
+}
+//# sourceMappingURL=types.d.ts.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/types.d.ts.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/types.d.ts.map
new file mode 100644
index 0000000..021e947
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/types.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/server/auth/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAC;IAEf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC"}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/types.js b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/types.js
new file mode 100644
index 0000000..11e638d
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/types.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/types.js.map b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/types.js.map
new file mode 100644
index 0000000..0d8063d
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/server/auth/types.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/completable.d.ts b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/completable.d.ts
new file mode 100644
index 0000000..1b3159a
--- /dev/null
+++ b/mcp-tools/accessibility/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/completable.d.ts
@@ -0,0 +1,38 @@
+import { AnySchema, SchemaInput } from './zod-compat.js';
+export declare const COMPLETABLE_SYMBOL: unique symbol;
+export type CompleteCallback = (value: SchemaInput, context?: {
+ arguments?: Record;
+}) => SchemaInput[] | Promise[]>;
+export type CompletableMeta