@nyuchi/mzizi-mcp 0.13.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/README.md +197 -26
  2. package/dist/auth/front.d.ts +8 -0
  3. package/dist/auth/front.d.ts.map +1 -1
  4. package/dist/auth/front.js +10 -0
  5. package/dist/auth/front.js.map +1 -1
  6. package/dist/auth/mcp-api-handler.d.ts +1 -1
  7. package/dist/auth/mcp-api-handler.d.ts.map +1 -1
  8. package/dist/auth/mcp-api-handler.js +4 -3
  9. package/dist/auth/mcp-api-handler.js.map +1 -1
  10. package/dist/auth/provider-options.d.ts +16 -0
  11. package/dist/auth/provider-options.d.ts.map +1 -0
  12. package/dist/auth/provider-options.js +21 -0
  13. package/dist/auth/provider-options.js.map +1 -0
  14. package/dist/docs-federation.d.ts +1 -1
  15. package/dist/docs-federation.d.ts.map +1 -1
  16. package/dist/docs-federation.js +1 -0
  17. package/dist/docs-federation.js.map +1 -1
  18. package/dist/env.d.ts +1 -0
  19. package/dist/env.d.ts.map +1 -1
  20. package/dist/floors.d.ts +117 -0
  21. package/dist/floors.d.ts.map +1 -0
  22. package/dist/floors.js +103 -0
  23. package/dist/floors.js.map +1 -0
  24. package/dist/fundi-client.d.ts +6 -0
  25. package/dist/fundi-client.d.ts.map +1 -1
  26. package/dist/fundi-client.js +14 -3
  27. package/dist/fundi-client.js.map +1 -1
  28. package/dist/generated/registry-pin.d.ts +8 -1
  29. package/dist/generated/registry-pin.d.ts.map +1 -1
  30. package/dist/generated/registry-pin.js +3 -1
  31. package/dist/generated/registry-pin.js.map +1 -1
  32. package/dist/generated/registry.d.ts +2 -2
  33. package/dist/generated/registry.d.ts.map +1 -1
  34. package/dist/generated/registry.js +381 -325
  35. package/dist/generated/registry.js.map +1 -1
  36. package/dist/generated/skills.d.ts +11 -1
  37. package/dist/generated/skills.d.ts.map +1 -1
  38. package/dist/generated/skills.js +216 -21
  39. package/dist/generated/skills.js.map +1 -1
  40. package/dist/http.d.ts +32 -2
  41. package/dist/http.d.ts.map +1 -1
  42. package/dist/http.js +109 -28
  43. package/dist/http.js.map +1 -1
  44. package/dist/limits.d.ts +32 -0
  45. package/dist/limits.d.ts.map +1 -0
  46. package/dist/limits.js +44 -0
  47. package/dist/limits.js.map +1 -0
  48. package/dist/origin.d.ts +55 -0
  49. package/dist/origin.d.ts.map +1 -0
  50. package/dist/origin.js +127 -0
  51. package/dist/origin.js.map +1 -0
  52. package/dist/rate-limit.d.ts +1 -1
  53. package/dist/rate-limit.d.ts.map +1 -1
  54. package/dist/rate-limit.js +3 -2
  55. package/dist/rate-limit.js.map +1 -1
  56. package/dist/registry.d.ts +1 -1
  57. package/dist/registry.d.ts.map +1 -1
  58. package/dist/registry.js +22 -1
  59. package/dist/registry.js.map +1 -1
  60. package/dist/server.d.ts +83 -4
  61. package/dist/server.d.ts.map +1 -1
  62. package/dist/server.js +109 -10
  63. package/dist/server.js.map +1 -1
  64. package/dist/stdio.js +5 -4
  65. package/dist/stdio.js.map +1 -1
  66. package/dist/tools.d.ts +21 -1
  67. package/dist/tools.d.ts.map +1 -1
  68. package/dist/tools.js +413 -114
  69. package/dist/tools.js.map +1 -1
  70. package/dist/worker.d.ts.map +1 -1
  71. package/dist/worker.js +19 -8
  72. package/dist/worker.js.map +1 -1
  73. package/package.json +18 -17
package/README.md CHANGED
@@ -12,7 +12,7 @@ Owned and operated by **Mzizi**.
12
12
  ---
13
13
 
14
14
  **Live at** `https://mcp.mzizi.dev/mcp` (Cloudflare Worker `mzizi-mcp`, version
15
- 0.13.0 — `MZIZI_MCP_VERSION` in `src/server.ts` is what `serverInfo.version`
15
+ 0.15.0 — `MZIZI_MCP_VERSION` in `src/server.ts` is what `serverInfo.version`
16
16
  reports, and it moves in lockstep with `package.json` and `server.json`).
17
17
 
18
18
  ## Free, with no gate except Fundi
@@ -66,7 +66,102 @@ Point any MCP client at the live HTTP endpoint:
66
66
 
67
67
  No sign-in is needed. To use the Fundi tools, use
68
68
  `"url": "https://mcp.mzizi.dev/mcp/signin"` instead; the client runs the WorkOS
69
- Connect OAuth (PKCE) flow on first connect.
69
+ Connect OAuth (PKCE) flow on first connect. `/mcp` never answers `401`, so a client
70
+ never starts that flow there. The authorization server supports dynamic client
71
+ registration and does not publish a client ID metadata document.
72
+
73
+ ### Per client
74
+
75
+ Each client writes the entry above in its own format. The full guide, with the vendor page
76
+ each line was read from, is
77
+ [docs.mzizi.dev/toolchain/connect](https://docs.mzizi.dev/toolchain/connect); the table in this
78
+ repository's [README](../README.md#connect-a-client) has the config path and key for Claude
79
+ Code, Claude.ai and Desktop, Codex, Cursor, VS Code, Antigravity, Gemini CLI, Devin Desktop
80
+ (formerly Windsurf), Zed, Cline, OpenCode, Kiro and JetBrains. All of it is documented by the
81
+ vendors, read on 2026-11-03, and not run in the tools. The short version:
82
+
83
+ ```bash
84
+ # Claude Code: the server alone (skills over MCP) ...
85
+ claude mcp add --transport http mzizi https://mcp.mzizi.dev/mcp
86
+ # ... or the public plugin, which also installs the skills
87
+ /plugin marketplace add mzizi-dev/mzizi-registry
88
+ /plugin install mzizi@mzizi
89
+
90
+ # Codex: the server (there is no Codex plugin until mzizi-registry#520 merges)
91
+ codex mcp add mzizi --url https://mcp.mzizi.dev/mcp
92
+
93
+ # Gemini CLI (enterprise; free and Pro/Ultra users moved to Antigravity CLI on 2026-06-18)
94
+ gemini mcp add --transport http mzizi https://mcp.mzizi.dev/mcp
95
+
96
+ # VS Code
97
+ code --add-mcp '{"name":"mzizi","type":"http","url":"https://mcp.mzizi.dev/mcp"}'
98
+ ```
99
+
100
+ - **Claude.ai, Claude Desktop:** a custom connector at `https://mcp.mzizi.dev/mcp`, with no
101
+ sign-in. For the Fundi tools, a second one at `/mcp/signin` with **Register automatically**.
102
+ - **ChatGPT:** Plugins, **+**, **Add custom MCP server**, then **Create as a plugin**.
103
+ - **Claude API:** the MCP connector,
104
+ `"mcp_servers": [{"type": "url", "url": "https://mcp.mzizi.dev/mcp", "name": "mzizi"}]`, with
105
+ `{"type": "mcp_toolset", "mcp_server_name": "mzizi"}` in `tools` and the
106
+ `mcp-client-2025-11-20` beta header.
107
+ - **OpenAI Responses API and Agents SDK:** a tool
108
+ `{"type": "mcp", "server_label": "mzizi", "server_url": "https://mcp.mzizi.dev/mcp"}`
109
+ (`HostedMCPTool(tool_config=...)` in the SDK).
110
+ - **The URL key differs by client:** `url` (Cursor, Zed, Kiro, JetBrains, Devin Desktop,
111
+ Cline, OpenCode), `serverUrl` (Antigravity), `httpUrl` (Gemini CLI `settings.json`). Cline
112
+ needs `"type": "streamableHttp"` set explicitly (without it, it falls back to SSE), and
113
+ Devin Desktop names the transport `transport`, not `type`.
114
+ - **Needs a bridge or stdio:** a client that only speaks stdio (older MCP clients, and Junie,
115
+ whose current help page does not confirm streamable HTTP) runs `npx -y @nyuchi/mzizi-mcp`
116
+ (stdio, below). `mcp-remote` is a third-party bridge this project has not tested.
117
+
118
+ **Skills over MCP.** A client that cannot install the npm package (Claude.ai, ChatGPT, the
119
+ APIs) gets the skills from `mzizi_get_skills`: no arguments lists them with their category,
120
+ `name` returns one in full, and `category` (`dev`, `design`, `language` or `build`) returns
121
+ every skill in it. A skill's answer lists the files it ships beside its SKILL.md
122
+ (`hygiene.sh`, `progress.sh`, `mzizi-design`'s token stylesheets); `name` plus `file` returns
123
+ one file's content. The same skills are also **MCP resources** (`mzizi://skills/<name>` for the
124
+ SKILL.md body, `mzizi://skills/<name>/<path>` for each file, listed by `resources/list`) and
125
+ **MCP prompts** (`skill-<name>`, whose message is the whole skill), so a client that reads
126
+ resources or offers prompts gets them without calling a tool. `catalogue.json` and
127
+ `mzizi_mcp_describe` list every skill with its category and files. All of it is read from the
128
+ skill files bundled at build time, and `test/skills-surfaces.test.ts` fails if any surface
129
+ drifts from `mzizi-skills/`. Codex, Cursor, VS Code, Gemini CLI, Antigravity, Zed, OpenCode and
130
+ Devin Desktop also read `.agents/skills/`, where `npx skills experimental_sync` links the npm
131
+ bundle. For instruction formats that cannot hold a skill (Cursor rules, Antigravity and Devin
132
+ rules, `AGENTS.md`), see [`mzizi-skills/adapters/`](../mzizi-skills/adapters/README.md).
133
+
134
+ How a skills change reaches this server: the skills are read from `../mzizi-skills/` in this
135
+ repository at build time, not from npm and not from the registry pin. A change to a SKILL.md
136
+ merged to `main` redeploys `mcp.mzizi.dev` (Workers Builds), and that deploy serves it. The npm
137
+ publish of `@nyuchi/mzizi-skills` and the registry's dependency bump feed the plugin and
138
+ `api.mzizi.dev/v1/skills`, not this server.
139
+
140
+ ### Compatibility with the MCP spec
141
+
142
+ Probed from outside with `curl` on 2026-11-03, with no `Origin` header and again with a CLI
143
+ user agent (`codex_cli_rs/0.1`), against the Streamable HTTP page of the 2026-07-28 revision
144
+ (<https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http>):
145
+
146
+ | Probe | Result |
147
+ | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
148
+ | `initialize` with `2025-06-18`, `2025-11-25` | `200`, `application/json`, same version echoed, tools, resources and prompts with `listChanged`; no `Mcp-Session-Id` (stateless) |
149
+ | `initialize` with `2026-07-28` | `200`, answers `2025-11-25` (the legacy handshake is the highest it negotiates) |
150
+ | `server/discover` and `tools/list` with `_meta` and the headers | `200`; `supportedVersions: ["2026-07-28"]`, 14 tools |
151
+ | `tools/call` without `Mcp-Name` | `400`, JSON-RPC `-32020` `HeaderMismatch`, as the spec requires |
152
+ | `tools/list` with no `initialize` and no version header | `200` (treated as the earliest header-less version, which the spec allows) |
153
+ | notification POST (`notifications/initialized`) | `202`, no body |
154
+ | `GET` on the endpoint | `405` with `Allow: POST, OPTIONS` (the spec's answer for a server with no GET stream) |
155
+ | `Accept: application/json` alone | `406`; the client must list both `application/json` and `text/event-stream` |
156
+ | `MCP-Protocol-Version: 1999-01-01` | `400`, lists the supported versions (`2025-11-25` back to `2024-10-07`) |
157
+ | `Origin: http://evil.example`, `Origin: null` | `403` |
158
+ | `Origin: https://evil.example` | `200` on the deployed 0.14.0: any `https` origin is accepted. The spec says an invalid Origin MUST get `403`. The explicit allowlist merged to `staging` in #319 refuses it, and is live only after the next release. |
159
+ | `/mcp/signin` without a token | `401` with `WWW-Authenticate: Bearer ... resource_metadata=...`, the OAuth flow clients start from |
160
+
161
+ Deviations to know about: a JSON-RPC batch array (removed from the spec in 2025-06-18) answers
162
+ a single object, not an array, and `server/discover` lists only the modern version while the
163
+ legacy handshake still negotiates the older ones. No client was run; these are the server's
164
+ answers to a plain HTTP client.
70
165
 
71
166
  ### stdio (local / offline)
72
167
 
@@ -163,22 +258,81 @@ call, passing the result through untouched:
163
258
 
164
259
  ## Tools
165
260
 
166
- | Tool | Returns |
167
- | ---------------------------------- | ------------------------------------------------------------------------------ |
168
- | `mzizi_search` | Word search over components, conventions, AI instruction sets and releases |
169
- | `mzizi_get_component` | One component in full, **Rust first**; `include: ["docs", "versions"]` |
170
- | `mzizi_list_components` | The lean, paged index; filter by `node`, `owner`, `collection`, `type`, `rust` |
171
- | `mzizi_get_tokens` | Brand system; `family: "colors"` for all 21 colour families |
172
- | `mzizi_get_architecture` | The DNA helix, or one node/rung with `node` (uncapped) |
173
- | `mzizi_get_doctrine` | `ubuntu-pillars`, `ubuntu-principles`, `ai-instructions`, `conventions` |
174
- | `mzizi_get_skills` | The agent skills: listed with their category, one by `name`, or a `category` |
175
- | `mzizi_check_accessibility` | Contrast ratio against the Mzizi AAA floor, computed locally |
176
- | `mzizi_report_issue` | Your issue desk. **Sign-in** |
177
- | `mzizi_fundi` | Delegate to fundi (when the Worker can reach fundi). **Sign-in** |
178
- | `mzizi_mcp_describe` | This server's tools, their access, what each replaces, and data sources |
179
- | `docs_search_mzizi` | Search the documentation (forwarded) |
180
- | `docs_query_docs_filesystem_mzizi` | Read-only `rg`/`cat`/`tree` over the doc pages (forwarded) |
181
- | `docs_submit_feedback` | Report a documentation problem (forwarded) |
261
+ | Tool | Returns |
262
+ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
263
+ | `mzizi_search` | Word search over components, conventions, AI instruction sets and releases |
264
+ | `mzizi_get_component` | One component in full, **Rust first**; `include: ["docs", "versions"]` |
265
+ | `mzizi_list_components` | The lean, paged index; filter by `node`, `owner`, `collection`, `type`, `rust` |
266
+ | `mzizi_get_tokens` | Brand system; `family: "colors"` for all 21 colour families, `"floors"` for the Bundu floor |
267
+ | `mzizi_get_architecture` | The DNA helix, or one node/rung with `node` (uncapped) |
268
+ | `mzizi_get_doctrine` | `ubuntu-pillars`, `ubuntu-principles`, `ai-instructions`, `conventions`, `bundu-floor` |
269
+ | `mzizi_get_skills` | The agent skills: listed, one by `name` (with `file`), or a `category` |
270
+ | `mzizi_check_accessibility` | WCAG 2 contrast ratio and the Mzizi 7:1 floor, and spacing values against the spacing floor, computed locally (not APCA) |
271
+ | `mzizi_report_issue` | Your issue desk. **Sign-in** |
272
+ | `mzizi_fundi` | Delegate to fundi (when the Worker can reach fundi). **Sign-in** |
273
+ | `mzizi_mcp_describe` | This server's tools, their access, what each replaces, and data sources |
274
+ | `docs_search_mzizi` | Search the documentation (forwarded) |
275
+ | `docs_query_docs_filesystem_mzizi` | Read-only `rg`/`cat`/`tree` over the doc pages (forwarded) |
276
+ | `docs_submit_feedback` | Report a documentation problem (forwarded) |
277
+
278
+ **How the tools behave (SDK v2, #295).**
279
+
280
+ - Built on the official MCP TypeScript SDK v2 (`@modelcontextprotocol/server`). Over HTTP it
281
+ serves the **2026-07-28** revision (`server/discover`, per-request `_meta`, no sessions)
282
+ through the SDK's `createMcpHandler`, and 2025-era clients (`initialize`) through the SDK's
283
+ Streamable HTTP transport with JSON responses. Every request gets a fresh server; nothing is
284
+ shared between callers. `GET` and `DELETE` answer 405.
285
+ - Every tool has a `title` and all four annotations (`readOnlyHint`, `destructiveHint`,
286
+ `idempotentHint`, `openWorldHint`). `mzizi_search`, `mzizi_list_components` and
287
+ `mzizi_check_accessibility` declare an `outputSchema` and return matching `structuredContent`.
288
+ - **Size limit:** `mzizi_search` and `mzizi_list_components` stop a page at 25,000 characters
289
+ (`CHARACTER_LIMIT`, `src/limits.ts`) by returning fewer items. `has_more` and `next_offset`
290
+ (`meta.has_more` / `meta.next_offset` on search) say where the next page starts;
291
+ `mzizi_list_components` also keeps `hasMore` / `nextOffset` for older clients.
292
+ - A domain failure (unknown component, bad colour, sign-in needed) is a tool result with
293
+ `isError: true` and text that says how to recover, never a protocol error.
294
+ - **Browser origins (Streamable HTTP §Security):** a request with an `Origin` header whose host is
295
+ not on the list is refused with 403 before any server is built, on `/mcp`, `/mcp/signin` and
296
+ every other path starting with `/mcp`, with or without a token, and before the anonymous rate
297
+ limit is charged. The code refuses a present but empty `Origin` (only a missing header counts as
298
+ no `Origin`), though workerd appears to deliver an empty header as absent. The list is `mzizi.dev`, `www.mzizi.dev`, `docs.mzizi.dev`, `app.mzizi.dev` and
299
+ `mcp.mzizi.dev`, each over `https` on the default port only (no `http`, no `:8443`, no other
300
+ subdomain), plus localhost on any port. Add more with the `MZIZI_ALLOWED_ORIGINS` variable,
301
+ comma-separated `https://host` origins (case and a trailing slash are tolerated; anything else
302
+ that is not a plain `https` origin is dropped with a logged warning). Clients that send no
303
+ `Origin` (every non-browser client) are not affected. On `/mcp`, CORS echoes an allowed `Origin`
304
+ with `Vary: Origin` and never answers `Access-Control-Allow-Origin: *`. The OAuth provider's own
305
+ endpoints (`/token`, `/register`, `/.well-known/*`) keep the provider's CORS behaviour, which
306
+ echoes the caller's `Origin`, and `/catalogue.json` is `*` on purpose. Browser clients hosted on
307
+ other sites cannot call `/mcp` (`src/origin.ts` is the one list).
308
+ - **PKCE and token audience:** the authorization-server metadata advertises `S256` only. Audience
309
+ binding applies only to clients that send a `resource` indicator (RFC 8707): such a token is
310
+ refused on a different server or path, but a token for `/mcp` is also accepted on
311
+ `/mcp/signin` (path-prefix matching, the same server). A token minted with no `resource` has no
312
+ audience and is served on `/mcp` and `/mcp/signin` (see the CHANGELOG, #295).
313
+ - Calls to fundi and to the identity provider time out after 15 s.
314
+ - `evals.xml` holds ten read-only questions with answers checked against production.
315
+
316
+ **The Bundu floor, and the spacing floor in it.** The registry's minimums nothing can go under are
317
+ served three ways, all read from the bundled registry's `/v1/brand` `accessibility` block at the
318
+ pinned commit (`minTouchTarget`, `minInset`, `minControlGap`, `minLabelGap`, `minItemGap`,
319
+ `minBodyLeading`), never typed in this repo (`src/floors.ts`): `mzizi_get_tokens family=floors` (also
320
+ `family=accessibility`, and `family=spacing`, which returns `spacingFloor` beside the scale),
321
+ `mzizi_get_doctrine topic=bundu-floor`, and the `floors` block of `mzizi_mcp_describe`, the
322
+ `mzizi://tools` resource and `GET /catalogue.json`. The spacing floor (owner, 2026-11-04,
323
+ mzizi-registry#617) is a 14px inset between text and its container edge (`--inset-floor`), 7px gaps between
324
+ adjacent controls, between a label and its field and between sibling items (`--gap-floor`), and 1.5
325
+ body leading (`--leading-floor`). `mzizi_check_accessibility` takes `insetPx`, `controlGapPx`,
326
+ `labelGapPx`, `itemGapPx` and `leading` beside (or instead of) the two colours, compares each with that
327
+ floor and returns `spacing: { floor, checks, meetsFloor }`. If the pinned registry commit predates the
328
+ floor, `floors.spacing` is `null`, the tool descriptions name no number, and a spacing check is a tool
329
+ error saying so (or, beside colours, a `spacingUnavailable` note); the tools never answer from a copy. To check a project's source rather than values, run `mzizi check` (`@nyuchi/mzizi-cli`).
330
+
331
+ **Text colours from `mzizi_get_tokens`.** Every colour family carries `textLight` /
332
+ `textDark`: use them for text in that colour on the base surface (they are
333
+ `--color-<name>-text`). On a family's container, use `onContainerLight` /
334
+ `onContainerDark`. Never use `hex`, `lightHex` or `darkHex` as a text colour: they
335
+ are accents and fills.
182
336
 
183
337
  **The tool list is whatever `tools/list` returns.** The `docs_*` names mirror
184
338
  whatever docs.mzizi.dev lists; the three above are what it lists today (checked
@@ -212,8 +366,24 @@ tools present the Rust implementation first wherever one exists:
212
366
  `GET /v1/ui/{name}` body unchanged (shadcn-shaped, `files[]` inline). If the registry
213
367
  refuses the React build but Rust exists, `react` is `{build, error}` and the Rust
214
368
  still leads.
369
+ - `react.vendor` is what you need to vendor the React build without calling the API:
370
+ - `registry`: `{repository, ref}`, the registry commit this server's data comes from.
371
+ - `files[]`: `{path, target, url, sha256}`. `url` is
372
+ `https://raw.githubusercontent.com/mzizi-dev/mzizi-registry/<ref>/<path>`, pinned to
373
+ the same `ref` the `sha256` is taken at.
374
+ - `imports[]`: every `@/` specifier the files import, re-export or load with a dynamic
375
+ `import()` (comments are ignored), with `providedBy`, the declared registry
376
+ dependency that installs it, or `null`. `@/lib/utils` is provided by the registry's
377
+ `utils` item, or by shadcn init in a project that ran it.
378
+ - `live.url`: `https://api.mzizi.dev/v1/ui/<name>`, labelled live. It serves the
379
+ commit the API is deployed at, which can differ from `registry.ref`.
380
+ - **What `sha256` covers:** the registry source at `path`@`ref`, which is what
381
+ `files[].url` serves. A file written by `shadcn add` can differ: shadcn strips
382
+ `"use client"` when the project sets `rsc: false`, and rewrites `@/` aliases to the
383
+ project's own. Hash the registry source, not the installed file.
215
384
  - **Breaking for readers of 0.10.x:** the React body moved from `component` to
216
385
  `react`, and `renamedFrom` moved to the top level.
386
+
217
387
  - `mzizi_list_components` rows carry `rustCrate` when the component has Rust (absent
218
388
  otherwise), the response carries `withRust` (how many of `total` have Rust), and
219
389
  `rust: true` / `rust: false` filters on it.
@@ -228,8 +398,8 @@ tools present the Rust implementation first wherever one exists:
228
398
  **Shape notes (changed when the registry moved into the build).**
229
399
 
230
400
  - `mzizi_get_component` with `include: ["versions"]` is derived from the committed
231
- changelog and rename map: rows are `{version, title, change, breaking,
232
- released_at}` with `meta.previousNames`. The database view it used to read is gone
401
+ changelog and rename map: rows are
402
+ `{version, title, change, breaking, released_at}` with `meta.previousNames`. The database view it used to read is gone
233
403
  from this path.
234
404
  - `mzizi_search` returns `{data: [{kind, name, title?, description?}], meta}`, with
235
405
  `kind` one of `component | convention | ai-instruction | release`. Documentation
@@ -265,11 +435,12 @@ at. See `AUTH.md`.
265
435
 
266
436
  Plain vars (`[vars]` in `wrangler.toml`, not secrets):
267
437
 
268
- | Var | Notes |
269
- | ---------------------- | ------------------------------------------------------------- |
270
- | `WORKOS_CLIENT_ID` | Connect OAuth app client id (public client; PKCE) |
271
- | `WORKOS_M2M_CLIENT_ID` | Fundi M2M app client id; used only on the HTTP + M2M fallback |
272
- | `FUNDI_URL` | Base URL of the fundi worker, for the HTTP + M2M fallback |
438
+ | Var | Notes |
439
+ | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
440
+ | `WORKOS_CLIENT_ID` | Connect OAuth app client id (public client; PKCE) |
441
+ | `WORKOS_M2M_CLIENT_ID` | Fundi M2M app client id; used only on the HTTP + M2M fallback |
442
+ | `FUNDI_URL` | Base URL of the fundi worker, for the HTTP + M2M fallback |
443
+ | `MZIZI_ALLOWED_ORIGINS` | Optional, unset by default. Extra browser origins for `/mcp`, comma-separated `https://host` (e.g. `https://partner.example`); a public setting, so a var, not a secret. See "Browser origins" |
273
444
 
274
445
  Bindings (`wrangler.toml`): `FUNDI_SERVICE` (Service Binding to `mzizi-fundi`'s
275
446
  `FundiInternal` entrypoint; what makes fundi reachable in production),
@@ -346,7 +517,7 @@ fails the build, and a failed build deploys nothing — the running version stay
346
517
 
347
518
  **Rollback:** Cloudflare dashboard → Workers & Pages → `mzizi-mcp` → Deployments → pick
348
519
  the previous version → _Rollback_, or `wrangler rollback` from `mzizi-mcp/`. Reverting
349
- the commit on `main` (merges are rebase-only) redeploys the previous source through Workers
520
+ the squash commit on `main` (merges are squash, through the merge queue) redeploys the previous source through Workers
350
521
  Builds.
351
522
 
352
523
  ---
@@ -4,6 +4,14 @@
4
4
  * Its own module, not `worker.ts`: the Worker's entry module may export only
5
5
  * handlers and Durable Object classes, and this is tested directly.
6
6
  */
7
+ /**
8
+ * True for the provider's API route as the PROVIDER matches it: any path that
9
+ * starts with `/mcp` (`/mcp`, `/mcp/signin`, `/mcpx`, `/mcp%2Fsignin`: the
10
+ * provider's `matchApiRoute` is a bare `startsWith`). The Origin gate in
11
+ * `worker.ts` uses this, so no path the provider treats as the API route
12
+ * escapes the gate.
13
+ */
14
+ export declare function isProviderApiPath(pathname: string): boolean;
7
15
  /**
8
16
  * True for a request the free tier serves: the MCP path, no credential at all.
9
17
  *
@@ -1 +1 @@
1
- {"version":3,"file":"front.d.ts","sourceRoot":"","sources":["../../src/auth/front.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAI/D"}
1
+ {"version":3,"file":"front.d.ts","sourceRoot":"","sources":["../../src/auth/front.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAI/D"}
@@ -6,6 +6,16 @@
6
6
  */
7
7
  /** The paths served to a caller with no token. `/mcp/signin` is deliberately not one. */
8
8
  const ANONYMOUS_PATHS = new Set(["/mcp", "/mcp/"]);
9
+ /**
10
+ * True for the provider's API route as the PROVIDER matches it: any path that
11
+ * starts with `/mcp` (`/mcp`, `/mcp/signin`, `/mcpx`, `/mcp%2Fsignin`: the
12
+ * provider's `matchApiRoute` is a bare `startsWith`). The Origin gate in
13
+ * `worker.ts` uses this, so no path the provider treats as the API route
14
+ * escapes the gate.
15
+ */
16
+ export function isProviderApiPath(pathname) {
17
+ return pathname.startsWith("/mcp");
18
+ }
9
19
  /**
10
20
  * True for a request the free tier serves: the MCP path, no credential at all.
11
21
  *
@@ -1 +1 @@
1
- {"version":3,"file":"front.js","sourceRoot":"","sources":["../../src/auth/front.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,yFAAyF;AACzF,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC/C,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;QAAE,OAAO,KAAK,CAAC;IACvD,OAAO,eAAe,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC5D,CAAC"}
1
+ {"version":3,"file":"front.js","sourceRoot":"","sources":["../../src/auth/front.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,yFAAyF;AACzF,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAAgB;IAChD,OAAO,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC/C,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;QAAE,OAAO,KAAK,CAAC;IACvD,OAAO,eAAe,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC5D,CAAC"}
@@ -24,7 +24,7 @@ type AuthedContext = ExecutionContext & {
24
24
  * Takes no `ctx` on purpose, so the anonymous front in `worker.ts` cannot pick
25
25
  * up a `ctx.props` the provider did not set.
26
26
  */
27
- export declare function serveAnonymous(request: Request, env: Env): Promise<Response>;
27
+ export declare function serveAnonymous(request: Request, env: Env, hosts?: readonly string[]): Promise<Response>;
28
28
  export declare const mcpApiHandler: {
29
29
  fetch(request: Request, env: Env, ctx: AuthedContext): Promise<Response>;
30
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-api-handler.d.ts","sourceRoot":"","sources":["../../src/auth/mcp-api-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAGvC,KAAK,aAAa,GAAG,gBAAgB,GAAG;IAAE,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAA;AAEzD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAE5E;AAED,eAAO,MAAM,aAAa;mBACH,OAAO,OAAO,GAAG,OAAO,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC;CA4B/E,CAAA"}
1
+ {"version":3,"file":"mcp-api-handler.d.ts","sourceRoot":"","sources":["../../src/auth/mcp-api-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAIvC,KAAK,aAAa,GAAG,gBAAgB,GAAG;IAAE,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAA;AAEzD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,GAAE,SAAS,MAAM,EAA6B,GAAG,OAAO,CAAC,QAAQ,CAAC,CAEjI;AAED,eAAO,MAAM,aAAa;mBACH,OAAO,OAAO,GAAG,OAAO,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC;CA4B/E,CAAA"}
@@ -15,6 +15,7 @@
15
15
  import { createMziziHttpHandler } from "../http.js";
16
16
  import { createFundiCaller, createUserTokenResolver, fundiConfigured } from "../fundi-client.js";
17
17
  import { deskFor } from "../desk-context.js";
18
+ import { allowedHostsFromEnv } from "../origin.js";
18
19
  /**
19
20
  * The free tier: no user. `fundi` says whether to LIST mzizi_fundi (so its
20
21
  * refusal can say how to sign in); it wires no caller and no desk.
@@ -22,8 +23,8 @@ import { deskFor } from "../desk-context.js";
22
23
  * Takes no `ctx` on purpose, so the anonymous front in `worker.ts` cannot pick
23
24
  * up a `ctx.props` the provider did not set.
24
25
  */
25
- export function serveAnonymous(request, env) {
26
- return createMziziHttpHandler({ anonymous: { fundi: fundiConfigured(env) } })(request);
26
+ export function serveAnonymous(request, env, hosts = allowedHostsFromEnv(env)) {
27
+ return createMziziHttpHandler({ anonymous: { fundi: fundiConfigured(env) }, allowedOrigins: hosts })(request);
27
28
  }
28
29
  export const mcpApiHandler = {
29
30
  async fetch(request, env, ctx) {
@@ -47,7 +48,7 @@ export const mcpApiHandler = {
47
48
  // `idFromName` is deterministic, so the same person reaches the same object
48
49
  // across sessions, devices and years; that is what makes the history real.
49
50
  const desk = deskFor(env.ISSUE_DESK.get(env.ISSUE_DESK.idFromName(props.userId)), props, fundi?.resolveUserToken);
50
- return createMziziHttpHandler({ fundi, desk })(request);
51
+ return createMziziHttpHandler({ fundi, desk, allowedOrigins: allowedHostsFromEnv(env) })(request);
51
52
  },
52
53
  };
53
54
  //# sourceMappingURL=mcp-api-handler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-api-handler.js","sourceRoot":"","sources":["../../src/auth/mcp-api-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAGhG,OAAO,EAAE,OAAO,EAAE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CAClB,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAC3D,KAAK,EACL,KAAK,EAAE,gBAAgB,CACxB,CAAA;QAED,OAAO,sBAAsB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,mBAAmB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAA;IACnG,CAAC;CACF,CAAA"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The OAuth provider's static options, shared by `worker.ts` and the tests that
3
+ * drive the real provider (`test/oauth-provider.test.ts`), so a test cannot
4
+ * pass against a configuration the Worker does not run.
5
+ *
6
+ * Its own module, not `worker.ts`: the Worker's entry module may export only
7
+ * handlers and Durable Object classes.
8
+ */
9
+ export declare const PROVIDER_OPTIONS: {
10
+ readonly apiRoute: "/mcp";
11
+ readonly authorizeEndpoint: "/authorize";
12
+ readonly tokenEndpoint: "/token";
13
+ readonly clientRegistrationEndpoint: "/register";
14
+ readonly allowPlainPKCE: false;
15
+ };
16
+ //# sourceMappingURL=provider-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-options.d.ts","sourceRoot":"","sources":["../../src/auth/provider-options.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,gBAAgB;;;;;;CAWnB,CAAA"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The OAuth provider's static options, shared by `worker.ts` and the tests that
3
+ * drive the real provider (`test/oauth-provider.test.ts`), so a test cannot
4
+ * pass against a configuration the Worker does not run.
5
+ *
6
+ * Its own module, not `worker.ts`: the Worker's entry module may export only
7
+ * handlers and Durable Object classes.
8
+ */
9
+ export const PROVIDER_OPTIONS = {
10
+ // A prefix: it covers `/mcp` and `/mcp/signin`.
11
+ apiRoute: "/mcp",
12
+ authorizeEndpoint: "/authorize",
13
+ tokenEndpoint: "/token",
14
+ clientRegistrationEndpoint: "/register",
15
+ // OAuth 2.1 and the MCP authorization spec require S256; `plain` offers no
16
+ // protection against an intercepted code (#295). With this `false` the
17
+ // authorization-server metadata advertises `["S256"]` and the token endpoint
18
+ // refuses a `plain` challenge.
19
+ allowPlainPKCE: false,
20
+ };
21
+ //# sourceMappingURL=provider-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-options.js","sourceRoot":"","sources":["../../src/auth/provider-options.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,gDAAgD;IAChD,QAAQ,EAAE,MAAM;IAChB,iBAAiB,EAAE,YAAY;IAC/B,aAAa,EAAE,QAAQ;IACvB,0BAA0B,EAAE,WAAW;IACvC,2EAA2E;IAC3E,uEAAuE;IACvE,6EAA6E;IAC7E,+BAA+B;IAC/B,cAAc,EAAE,KAAK;CACb,CAAA"}
@@ -19,7 +19,7 @@
19
19
  * so the tool surface does not change shape while docs are down. Calls then
20
20
  * fail with the clear error above until the upstream is back.
21
21
  */
22
- import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
22
+ import type { McpServer } from "@modelcontextprotocol/server";
23
23
  export declare const DOCS_MCP_URL = "https://docs.mzizi.dev/mcp";
24
24
  export declare const DOCS_TOOL_PREFIX = "docs_";
25
25
  /** How long a fetched tool list is reused before asking upstream again. */
@@ -1 +1 @@
1
- {"version":3,"file":"docs-federation.d.ts","sourceRoot":"","sources":["../src/docs-federation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,eAAO,MAAM,YAAY,+BAA+B,CAAC;AACzD,eAAO,MAAM,gBAAgB,UAAU,CAAC;AACxC,2EAA2E;AAC3E,eAAO,MAAM,iBAAiB,QAAa,CAAC;AAC5C;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,QAAS,CAAC;AAI9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AAiB,QAAa,CAAC;AAC5C;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,QAAS,CAAC;AAI9C,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAwEjD,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB,CAAC;AA+EF,4DAA4D;AAC5D,wBAAgB,kBAAkB,IAAI,IAAI,CAGzC;AAsBD;;;GAGG;AACH,wBAAsB,SAAS,CAAC,IAAI,GAAE,qBAA0B,GAAG,OAAO,CAAC;IACzE,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,MAAM,EAAE,OAAO,GAAG,UAAU,GAAG,aAAa,GAAG,UAAU,CAAC;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAkCD;AAcD;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,SAAS,EACjB,IAAI,GAAE,qBAA0B,GAC/B,OAAO,CAAC,MAAM,EAAE,CAAC,CA8CnB"}
@@ -255,6 +255,7 @@ export async function registerDocsTools(server, opts = {}) {
255
255
  // One malformed upstream definition must not take down the whole server:
256
256
  // skip it and keep the rest (and every mzizi_* tool).
257
257
  try {
258
+ // `inputShapeFor` always returns a Zod object schema (never a raw shape).
258
259
  server.registerTool(name, {
259
260
  title: tool.title ? `Docs: ${tool.title}` : undefined,
260
261
  description: `[docs.mzizi.dev] ${tool.description ?? ""}`.trim(),
@@ -1 +1 @@
1
- {"version":3,"file":"docs-federation.js","sourceRoot":"","sources":["../src/docs-federation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,CAAC,MAAM,YAAY,GAAG,4BAA4B,CAAC;AACzD,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAC;AACxC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,GAAG,MAAM,CAAC;AAC5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAC9C,MAAM,eAAe,GAAG,KAAK,CAAC;AAC9B,MAAM,eAAe,GAAG,MAAM,CAAC;AAU/B;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAA4B;IACrD;QACE,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EACT,uTAAuT;QACzT,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,EAAE;YACtE,QAAQ,EAAE,CAAC,OAAO,CAAC;YACnB,oBAAoB,EAAE,KAAK;SAC5B;QACD,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,KAAK;SACrB;KACF;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,WAAW,EACT,uPAAuP;QACzP,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,WA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AI,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,EAC1C,eAAe,CAChB,CAAU,CAAC;gBACd,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,OAAO,SAAS,CACd,GAAG,IAAI,mCAAmC,GAAG,KAAM,GAAa,CAAC,OAAO,IAAI;wBAC1E,uIAAuI,CAC1I,CAAC;gBACJ,CAAC;YACH,CAAC,CAAU,CACZ,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;QACD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
package/dist/env.d.ts CHANGED
@@ -19,6 +19,7 @@ export interface Env {
19
19
  FUNDI_SERVICE?: Fetcher;
20
20
  COOKIE_ENCRYPTION_KEY: string;
21
21
  ISSUE_DESK: DurableObjectNamespace<import("./issue-desk.js").IssueDesk>;
22
+ MZIZI_ALLOWED_ORIGINS?: string;
22
23
  ANON_RATE_LIMIT?: import("./rate-limit.js").RateLimiter;
23
24
  OAUTH_KV: KVNamespace;
24
25
  OAUTH_PROVIDER: OAuthHelpers;
package/dist/env.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AAEtE,MAAM,WAAW,GAAG;IAiBlB,gBAAgB,EAAE,MAAM,CAAA;IAYxB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAO9B,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAUlB,aAAa,CAAC,EAAE,OAAO,CAAA;IAGvB,qBAAqB,EAAE,MAAM,CAAA;IAM7B,UAAU,EAAE,sBAAsB,CAAC,OAAO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