From f825c9849aea8b19ff5f3ad31be2d564cdd5d9e1 Mon Sep 17 00:00:00 2001 From: "jiaxin.loh" Date: Sat, 29 Aug 2026 15:54:54 +0800 Subject: [PATCH 1/8] docs: add llm integration options --- docs/llm-integration.md | 375 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 375 insertions(+) create mode 100644 docs/llm-integration.md diff --git a/docs/llm-integration.md b/docs/llm-integration.md new file mode 100644 index 0000000..1be7874 --- /dev/null +++ b/docs/llm-integration.md @@ -0,0 +1,375 @@ +# LLM access options + +Git-Mastery Desktop needs a way to reach a language model so it can help students who get stuck. +This document assesses **how the app obtains inference** — nothing else. Features, prompting, +what context is gathered, and how answers are shaped are separate concerns and are not covered here. + +The target audience is NUS students. They have a university ChatGPT plan through SSO, they generally +do not have paid API accounts, and they are able to sign up for a free API key if told how. The app +runs locally on their own machine, which means any credential involved is a credential the student +holds or the app ships with. + +This is an assessment, not a recommendation. Each option is described on the same four axes so they +can be compared directly. + +| Axis | Question | +| --------------- | ----------------------------------------------------------------- | +| **Capability** | Which models are reachable, at what context length and quality | +| **Cost** | What the student pays, and what the project or department pays | +| **Setup** | What a student must do once, before the feature works | +| **Feasibility** | Whether it can be built, and whether it is likely to keep working | + +--- + +## The shape of the problem + +Every option is a different answer to one question: _whose credential pays for the call?_ + +```mermaid +flowchart TB + Q{"Who holds the
credential?"} + + Q --> S["The student"] + Q --> I["The institution
or course"] + Q --> N["Nobody —
no API call"] + + S --> S1["Own API key
free or paid tier"] + S --> S2["Local model
on their machine"] + S --> S3["ChatGPT subscription
via OAuth"] + + I --> I1["Course-held key
behind a proxy"] + I --> I2["Institutional endpoint
e.g. Azure OpenAI"] + + N --> N1["Prompt handed to
an app they already use"] + + style Q fill:#f5f5f5,stroke:#666 + style S fill:#f0f9ff,stroke:#0369a1 + style I fill:#fffaeb,stroke:#b54708 + style N fill:#f5f5f5,stroke:#666 +``` + +Options that put the credential on the student cost the project nothing but require setup from every +individual. Options that put it on the institution invert that. Options that avoid the API entirely +cost nothing and require nothing, but give the app no control over the answer. + +--- + +## How these were checked + +Endpoints were probed directly on 29 August 2026. An unauthenticated request that returns `401`, +`403`, or `400 invalid key` confirms the route exists and is rejecting a missing credential — the +healthy result. A `404` means the path is wrong. A `410` or a DNS failure means the service is gone. + +Rate limits and prices come from vendor documentation and secondary reporting; they move often and +are marked where sources disagree. Anything not directly probed is labelled as such. + +--- + +## Option 1 — Student-supplied API key + +The student obtains their own key from a provider and enters it in the app. The app talks to any +provider exposing an OpenAI-compatible `POST {baseUrl}/chat/completions` endpoint, which is now the +de facto standard across the industry. + +**Capability.** Wide. The same client reaches free-tier models, frontier paid models, and anything +self-hosted. Free tiers in this class currently reach context windows from 64k to over 1M tokens. +Quality is whatever the student's chosen provider offers, which varies considerably. + +**Cost.** Zero for the project. Zero for the student if they pick a free tier; their own spend if +they use a paid key they already have. + +**Setup.** Sign up with a provider, generate a key, paste it into the app once. Roughly two to five +minutes with instructions. This is a per-student, one-time cost that scales linearly with cohort size +and is where support burden concentrates. + +**Feasibility.** High, and durable. No single vendor is load-bearing: if one free tier closes or +degrades, the student switches provider in settings and the app is unchanged. This durability is not +theoretical — see Option 9. + +### Providers verified for this option + +All probed 29 Aug 2026. "Free tier" means a usable key obtainable without a credit card. + +| Provider | `baseUrl` | Probe | Free tier | +| ------------- | --------------------------------------------------------- | --------------------------------------- | ---------------------------- | +| OpenRouter | `https://openrouter.ai/api/v1` | `/models` → `200` | **21 models priced at zero** | +| Google Gemini | `https://generativelanguage.googleapis.com/v1beta/openai` | `/chat/completions` → `400 invalid key` | Yes, no card | +| Groq | `https://api.groq.com/openai/v1` | `401` | Yes, no card | +| Cerebras | `https://api.cerebras.ai/v1` | `403` | Yes, no card | +| Mistral | `https://api.mistral.ai/v1` | `401` | Yes, phone verification | +| DeepSeek | `https://api.deepseek.com/v1` | `401` | No | +| Together | `https://api.together.xyz/v1` | `401` | No | +| OpenAI | `https://api.openai.com/v1` | `401` | No | +| Anthropic | `https://api.anthropic.com/v1` | `/chat/completions` → `401` | No | + +Two details worth recording, both confirmed by probe rather than documentation: + +- **Gemini's compatibility layer has no `/models` route.** `/v1beta/openai/chat/completions` is live, + but `/v1beta/openai/models` returns `404 Requested entity was not found`. Model discovery cannot be + assumed to work uniformly across providers. +- **Anthropic exposes an OpenAI-compatible endpoint.** `POST https://api.anthropic.com/v1/chat/completions` + returns `401 Invalid Anthropic API Key` rather than a `404`, so a Claude key needs no special path. + +### Free-tier capacity + +| Provider | Reported free allowance | Confidence | +| ---------- | -------------------------------------------------------- | ----------------------------- | +| OpenRouter | 21 models at `pricing.prompt == 0`; contexts 64k–1M | **Probed directly** | +| Cerebras | ~1M tokens/day | Vendor reporting | +| Mistral | ~1B tokens/month, open-weight models | Vendor reporting | +| Groq | ~30 req/min, ~14,400 req/day | Vendor reporting | +| Gemini | ~10–15 req/min; daily cap reported between 250 and 1,500 | **Sources disagree — verify** | + +The OpenRouter zero-cost list at time of probe included `thinkingmachines/inkling` and +`minimax/minimax-m3` at 1M context, `nvidia/nemotron-3.5-lightning` at 1M, and +`google/gemma-4-31b-it` at 262k. Membership of that list changes without notice, which is an argument +for reading it at runtime rather than hard-coding it. + +--- + +## Option 2 — Local model on the student's machine + +The student installs Ollama or similar; the app points at `http://localhost:11434/v1`, which is +OpenAI-compatible. + +**Capability.** Limited by the student's hardware. Models in the 3B–8B range run acceptably on a +typical laptop; these are noticeably weaker at instruction-following, and in particular at +_withholding_ information on request, which matters for a teaching tool. No network dependency. + +**Cost.** Zero, permanently. No rate limits, no quotas, no vendor relationship. + +**Setup.** Heaviest of any option: install a runtime, download a multi-gigabyte model, and have +enough RAM and disk. Realistically only a subset of a cohort will complete this. + +**Feasibility.** Straightforward to support — it is the same client as Option 1 with a different base +URL. Detecting whether `ollama` is on `PATH` follows the pattern already used for `git` and `gh`. +Viable as an additional choice; unlikely to serve a whole cohort. + +--- + +## Option 3 — Course-held key behind a proxy + +The teaching team holds one API key behind a small gateway. The app calls the gateway; the gateway +holds the credential and applies per-student quotas. + +**Capability.** Full choice of model, decided centrally. Consistent for every student, so the +experience can be tuned and reasoned about. + +**Cost.** Real, but small. Illustrative, using ~4,000 tokens in and ~300 out per request, and a +500-student cohort making 30 requests each per semester — 60M input and 4.5M output tokens: + +| Model tier | Approximate semester cost | +| ------------------------------------ | ------------------------- | +| `gpt-5-nano` at $0.05 / $0.40 per 1M | ≈ $4.80 | +| GPT-5.6 Luna at $0.20 / $1.20 per 1M | ≈ $17.40 | + +Prices are as reported following OpenAI's 30 July 2026 reduction and should be re-checked against the +current rate card. The order of magnitude — tens of dollars per cohort per semester, not thousands — +is the durable part. + +**Setup.** None for the student. The app works on first launch. + +**Feasibility.** Technically simple; the gateway is a thin OpenAI-compatible passthrough. The real +requirements are organisational: a budget line, someone who owns the key and the server, and an abuse +story. It also concentrates risk — if the gateway is down, every student is affected simultaneously. + +--- + +## Option 4 — Institutional endpoint + +If NUS already operates an Azure OpenAI deployment or a similar internal endpoint, the app points at +it. + +**Capability.** Whatever the institution provisions. Typically frontier models with enterprise data +handling, which is materially better for privacy than sending student repository state to a consumer +free tier. + +**Cost.** Absorbed by existing institutional spend, or billed to the department. + +**Setup.** Depends on the endpoint's auth model. If it accepts SSO, none; if it issues keys, similar +to Option 1. + +**Feasibility.** Unknown until asked — this is an open question rather than an assessment. If such an +endpoint exists it is likely OpenAI-compatible, in which case it costs nothing extra to support. Note +that a ChatGPT Enterprise agreement does not imply one exists; see Option 5. + +--- + +## Option 5 — ChatGPT Enterprise seat used as an API + +Students have NUS ChatGPT access through SSO. The question is whether that seat can serve the app. + +**Capability.** Not applicable — the seat provides no programmatic interface to a third-party +application. + +**Cost.** Not applicable. + +**Setup.** Not applicable. + +**Feasibility.** Not possible as stated. ChatGPT Enterprise workspace membership and OpenAI API +Platform organisation membership are administered separately; OpenAI's documentation states that +belonging to one does not grant the other. A seat is a licence to use ChatGPT's own interface, not a +credential the app can present. Driving the web session inside an embedded browser view would be +fragile and outside the terms of service. + +The relevant follow-up is not "can we use the seat" but "does the institution also hold an API +Platform organisation" — which is Option 4. + +--- + +## Option 6 — Sign in with ChatGPT (Codex OAuth) + +OpenAI operates an OAuth flow that bills model usage to a user's ChatGPT subscription, Enterprise +included. This is the one OpenAI credential that draws on a subscription rather than a separate API +balance. + +**Capability.** Frontier OpenAI models, subject to the plan's own limits. + +**Cost.** No new spend for the student, but usage is metered. ChatGPT Enterprise separates standard +ChatGPT seats from **Codex seats**, and Codex usage bills as credits per million tokens. Students +would need Codex entitlement, and the traffic would draw down institutional credits. + +**Setup.** A browser-based sign-in, comparable to any OAuth flow. + +**Feasibility.** Technically demonstrated — third-party tools do use this flow — but it is documented +only for OpenAI's own clients (ChatGPT desktop, Codex CLI, IDE extension). There is no published +`client_id` or registration path for external applications, so an integration would rely on +undocumented behaviour. + +Two constraints bear on how durable that is. Anthropic prohibited subscription OAuth in third-party +tools in February 2026 and began enforcing it in April 2026; Google made an equivalent change for +Gemini CLI. OpenAI has moved the other way, broadening Codex access across paid plans during the same +period. The pattern is therefore permitted by one major vendor and closed by two others, and that +position has changed within the last twelve months. + +Additionally, device-code and workspace login behaviour is subject to admin settings, so this route +depends on NUS configuration regardless of what OpenAI permits. + +--- + +## Option 7 — MCP server plus the student's own assistant + +Rather than calling a model, the app exposes its local context over the Model Context Protocol, and +the student connects an assistant they already use. + +**Capability.** Whatever the student's assistant provides — potentially frontier models at no cost to +anyone. The app supplies local repository context that a browser-based chat otherwise cannot see. + +**Cost.** Zero to the project and zero additional cost to the student. + +**Setup.** A one-time client configuration, and support varies sharply by client: + +| Client | Local MCP server | Notes | +| ----------------- | ---------------- | ------------------------------------------------------------------------------------- | +| Claude Desktop | Supported | Local process, no network exposure | +| VS Code / Copilot | Supported | Copilot Pro is free for students via the GitHub Student Pack | +| ChatGPT | **Not directly** | Connectors require a public HTTPS URL; `localhost` and private addresses are rejected | + +**Feasibility.** Buildable, with one significant limitation: the assistant the cohort actually has — +ChatGPT — cannot reach a server on the student's own machine without a tunnel, which is more setup +than pasting an API key. This option serves Claude and Copilot users well and ChatGPT users poorly. + +A second consequence is loss of control: once the conversation happens inside someone else's client, +the app cannot inspect or constrain the response. Any teaching constraints must be expressed as +instructions inside the tool payload and cannot be enforced. + +--- + +## Option 8 — Hand the prompt to an app the student already has + +The app assembles a prompt, copies it to the clipboard, and opens ChatGPT in the system browser. The +student pastes it. + +**Capability.** Full frontier-model quality via the student's existing plan. The app keeps control of +what goes into the prompt, but none over what comes back. + +**Cost.** Zero to everyone. + +**Setup.** None whatsoever. Works for every student on first launch, including anyone who declines +to configure a key. + +**Feasibility.** Trivial to build — clipboard plus `shell.openExternal`, both already available. It +is the only option with no credential, no vendor relationship, and no dependency that can be +withdrawn. The trade is experience: no streaming into the app, no follow-up questions in context, and +a manual paste step every time. + +--- + +## Option 9 — GitHub Models + +Recorded because it was assessed and because its outcome informs how the other options should be +weighted. + +GitHub operated a free, rate-limited, OpenAI-compatible inference endpoint that accepted a GitHub +token. Since the app already requires the GitHub CLI during setup, every student would have finished +onboarding holding a usable credential with no additional steps. + +**Feasibility.** None — the service no longer exists. Probed with a live token: + +``` +POST https://models.github.ai/inference/chat/completions → HTTP 410 +{"error":{"code":"github_models_retirement_brownout"}} + +https://models.inference.ai.azure.com → DNS resolution failure +``` + +GitHub Models closed to new customers on 16 June 2026 and was fully retired on 30 July 2026 — +playground, model catalog, inference API and BYOK — with no grandfathering for existing users. + +The general point: a free tier can be announced, deprecated, and removed within a single semester. +Any option in this document that depends on one vendor's goodwill carries that risk, and the ones +that route through a swappable base URL carry it least. + +--- + +## Option 10 — Ship a key inside the application + +Recorded for completeness so the option is explicitly closed. + +A key embedded in an Electron build is extractable from the application bundle by anyone who +downloads it. Usage would be unbounded and billed to whoever owns the key. This is not a viable +option at any scale. + +--- + +## Comparison + +| Option | Capability | Cost to student | Cost to project | Setup | In-app answer | Feasibility | +| -------------------------- | ------------------------------ | --------------- | --------------- | --------------------- | ------------- | -------------------- | +| 1. Student API key | Wide; free tiers to 1M context | $0 on free tier | $0 | Paste one key | Yes | High, durable | +| 2. Local model | Weak; hardware-bound | $0 | $0 | Install + GB download | Yes | High, low uptake | +| 3. Course proxy | Full, uniform | $0 | ~$5–20/semester | None | Yes | Needs owner + budget | +| 4. Institutional endpoint | Enterprise-grade | $0 | Institutional | Varies | Yes | Unknown — must ask | +| 5. ChatGPT Enterprise seat | — | — | — | — | — | Not possible | +| 6. Codex OAuth | Frontier OpenAI | $0 direct | NUS credits | Browser sign-in | Yes | Undocumented | +| 7. MCP + own assistant | Frontier | $0 | $0 | Client config | No | Not for ChatGPT | +| 8. Prompt handoff | Frontier | $0 | $0 | None | No | Trivial | +| 9. GitHub Models | — | — | — | — | — | Retired | +| 10. Bundled key | Full | $0 | Unbounded | None | Yes | Not viable | + +Note that Options 1, 2, 3 and 4 are the same client with a different base URL. Supporting any one of +them makes the others a configuration change rather than new work. Options 7 and 8 are structurally +different: they hand the question to another application and give up control of the response. + +--- + +## Open questions + +These would change the assessment and cannot be resolved from inside the codebase. + +1. **Does NUS hold an OpenAI API Platform organisation, or an Azure OpenAI deployment?** A yes makes + Option 4 concrete and changes the cost picture for Option 3. +2. **Would the department fund and own a proxy?** Option 3's technical cost is low; its + organisational cost is the whole question. +3. **Is sending local repository state and terminal output to a third-party free tier acceptable + under NUS data policy?** This constrains Options 1 and 2 differently from Options 3 and 4, and is a + compliance question rather than a technical one. +4. **How much per-student setup is acceptable?** This is the axis on which Options 1, 3 and 8 differ + most, and it is a judgement about the cohort rather than about the technology. +5. **What are Gemini's current free-tier daily limits?** Reported figures range from 250 to 1,500 + requests per day; the difference matters if Gemini is presented as a default. + +--- + +_Endpoint probes conducted 29 August 2026. Pricing and rate limits are vendor-reported and change +frequently — re-verify before relying on any figure here._ From fe1906b7f3ac0f634a19db395af08086374eb6e5 Mon Sep 17 00:00:00 2001 From: "jiaxin.loh" Date: Mon, 31 Aug 2026 13:50:59 +0800 Subject: [PATCH 2/8] feat: add byok openrouter integration --- components.json | 21 + package-lock.json | 2341 +++++++++++++++-- package.json | 11 +- src/electron/ai/chat.ts | 76 + src/electron/ai/context.ts | 68 + src/electron/ai/model.ts | 32 + src/electron/ai/providers/exerciseBrief.ts | 10 + src/electron/aiKey.ts | 59 + src/electron/ipc/ai.ts | 99 + src/electron/ipc/chatView.ts | 203 ++ src/electron/ipc/webContentsView.ts | 83 +- src/electron/main.ts | 4 + src/electron/preload.cts | 28 + src/electron/storage.ts | 4 + src/electron/utils/util.ts | 4 +- src/ui/ai/IpcChatTransport.ts | 111 + src/ui/components/Chat/Composer.tsx | 104 + src/ui/components/Chat/CopyButton.tsx | 36 + src/ui/components/Chat/TypingDots.tsx | 17 + src/ui/components/Header/SettingsMenu.tsx | 12 +- src/ui/components/Setup/AiKeyPanel.tsx | 227 ++ .../components/ai-elements/conversation.tsx | 78 + src/ui/components/ai-elements/message.tsx | 89 + src/ui/index.css | 34 + src/ui/lib/utils.ts | 11 + src/ui/main.tsx | 51 +- src/ui/pages/ChatPanel.tsx | 369 +++ tsconfig.app.json | 4 + tsconfig.json | 8 +- types.d.ts | 108 + vite.config.ts | 6 + 31 files changed, 4127 insertions(+), 181 deletions(-) create mode 100644 components.json create mode 100644 src/electron/ai/chat.ts create mode 100644 src/electron/ai/context.ts create mode 100644 src/electron/ai/model.ts create mode 100644 src/electron/ai/providers/exerciseBrief.ts create mode 100644 src/electron/aiKey.ts create mode 100644 src/electron/ipc/ai.ts create mode 100644 src/electron/ipc/chatView.ts create mode 100644 src/ui/ai/IpcChatTransport.ts create mode 100644 src/ui/components/Chat/Composer.tsx create mode 100644 src/ui/components/Chat/CopyButton.tsx create mode 100644 src/ui/components/Chat/TypingDots.tsx create mode 100644 src/ui/components/Setup/AiKeyPanel.tsx create mode 100644 src/ui/components/ai-elements/conversation.tsx create mode 100644 src/ui/components/ai-elements/message.tsx create mode 100644 src/ui/lib/utils.ts create mode 100644 src/ui/pages/ChatPanel.tsx diff --git a/components.json b/components.json new file mode 100644 index 0000000..b91ea5f --- /dev/null +++ b/components.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "", + "css": "src/ui/index.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "iconLibrary": "lucide", + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/shadcn", + "lib": "@/lib", + "hooks": "@/hooks" + } +} diff --git a/package-lock.json b/package-lock.json index 6488e19..19f361c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,14 +9,23 @@ "version": "1.2.0", "hasInstallScript": true, "dependencies": { + "@ai-sdk/openai-compatible": "^2.0.74", + "@ai-sdk/react": "^3.0.275", + "@streamdown/code": "^1.1.1", "@tabler/icons-react": "^3.38.0", "@tanstack/react-query": "^5.90.21", "@xterm/addon-fit": "^0.11.0", "@xterm/xterm": "^6.0.0", + "ai": "^6.0.272", + "clsx": "^2.1.1", "lucide-react": "^1.33.0", "node-pty": "^1.1.0", "react": "^19.2.0", - "react-dom": "^19.2.0" + "react-dom": "^19.2.0", + "streamdown": "^2.6.0", + "tailwind-merge": "^3.6.0", + "use-stick-to-bottom": "^1.1.6", + "zod": "^4.5.4" }, "devDependencies": { "@electron/rebuild": "^4.0.4", @@ -46,6 +55,87 @@ "vite": "^7.3.1" } }, + "node_modules/@ai-sdk/gateway": { + "version": "3.0.202", + "resolved": "https://registry.npmjs.org/@ai-sdk/gateway/-/gateway-3.0.202.tgz", + "integrity": "sha512-Ronhnf8CD4r1etZ37foVj+1klJfipLIcIYWH7/+WsotBrB64JdVzz2iC3PpzYYOcqKVcN1gvJPBYeJTCGfStRQ==", + "license": "Apache-2.0", + "dependencies": { + "@ai-sdk/provider": "3.0.17", + "@ai-sdk/provider-utils": "4.0.54", + "@vercel/oidc": "3.2.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "zod": "^3.25.76 || ^4.1.8" + } + }, + "node_modules/@ai-sdk/openai-compatible": { + "version": "2.0.78", + "resolved": "https://registry.npmjs.org/@ai-sdk/openai-compatible/-/openai-compatible-2.0.78.tgz", + "integrity": "sha512-fNkZ1NSxFYMGkM+AOpaNA/WMh1lRWKtNDwenRaqdw7PD5YB08Ttzy1v/0MyNCZPlvneipPEewPeFESH6Uhk9Yw==", + "license": "Apache-2.0", + "dependencies": { + "@ai-sdk/provider": "3.0.17", + "@ai-sdk/provider-utils": "4.0.54" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "zod": "^3.25.76 || ^4.1.8" + } + }, + "node_modules/@ai-sdk/provider": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-3.0.17.tgz", + "integrity": "sha512-ijb+g+XxIAmv46hpt73ty83LhQHwwsqA1IwVX6p1MAREyX0zGM9eIrz1m3KlFxTHr8E4k/ao01w6Dlx3UBOihQ==", + "license": "Apache-2.0", + "dependencies": { + "json-schema": "^0.4.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ai-sdk/provider-utils": { + "version": "4.0.54", + "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-4.0.54.tgz", + "integrity": "sha512-piCQO5dnTqW7QSUbMsKg8oNI+u5VtgLnVFkgG6LfckrOyHcHFrIssBVJDg3/CXOdWXIFhVjIr540rzZAdom2TA==", + "license": "Apache-2.0", + "dependencies": { + "@ai-sdk/provider": "3.0.17", + "@standard-schema/spec": "^1.1.0", + "eventsource-parser": "^3.0.8", + "undici": "^6.28.0" + }, + "engines": { + "node": ">=18.17" + }, + "peerDependencies": { + "zod": "^3.25.76 || ^4.1.8" + } + }, + "node_modules/@ai-sdk/react": { + "version": "3.0.295", + "resolved": "https://registry.npmjs.org/@ai-sdk/react/-/react-3.0.295.tgz", + "integrity": "sha512-Jxhdaf0g+E/C4oxPjfQlqqxRe3cGrIDq1PXCd5vzs80o9QXs62L+thmoFNcPRFogrnCiO1n3efHUgwAzukltvg==", + "license": "Apache-2.0", + "dependencies": { + "@ai-sdk/provider-utils": "4.0.54", + "ai": "6.0.292", + "swr": "^2.2.5", + "throttleit": "2.1.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "react": "^18 || ~19.0.1 || ~19.1.2 || ^19.2.1" + } + }, "node_modules/@alloc/quick-lru": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", @@ -1652,6 +1742,15 @@ "@octokit/openapi-types": "^29.0.1" } }, + "node_modules/@opentelemetry/api": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.1.tgz", + "integrity": "sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q==", + "license": "Apache-2.0", + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/@peculiar/asn1-schema": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.9.0.tgz", @@ -2702,6 +2801,73 @@ "semantic-release": ">=20.1.0" } }, + "node_modules/@shikijs/core": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-3.23.0.tgz", + "integrity": "sha512-NSWQz0riNb67xthdm5br6lAkvpDJRTgB36fxlo37ZzM2yq0PQFFzbd8psqC2XMPgCzo1fW6cVi18+ArJ44wqgA==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.23.0", + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.4", + "hast-util-to-html": "^9.0.5" + } + }, + "node_modules/@shikijs/engine-javascript": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-3.23.0.tgz", + "integrity": "sha512-aHt9eiGFobmWR5uqJUViySI1bHMqrAgamWE1TYSUoftkAeCCAiGawPMwM+VCadylQtF4V3VNOZ5LmfItH5f3yA==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.23.0", + "@shikijs/vscode-textmate": "^10.0.2", + "oniguruma-to-es": "^4.3.4" + } + }, + "node_modules/@shikijs/engine-oniguruma": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.23.0.tgz", + "integrity": "sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.23.0", + "@shikijs/vscode-textmate": "^10.0.2" + } + }, + "node_modules/@shikijs/langs": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.23.0.tgz", + "integrity": "sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.23.0" + } + }, + "node_modules/@shikijs/themes": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.23.0.tgz", + "integrity": "sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==", + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.23.0" + } + }, + "node_modules/@shikijs/types": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.23.0.tgz", + "integrity": "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==", + "license": "MIT", + "dependencies": { + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.4" + } + }, + "node_modules/@shikijs/vscode-textmate": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", + "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", + "license": "MIT" + }, "node_modules/@simple-libs/stream-utils": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@simple-libs/stream-utils/-/stream-utils-1.2.0.tgz", @@ -2741,6 +2907,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "license": "MIT" + }, + "node_modules/@streamdown/code": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@streamdown/code/-/code-1.1.1.tgz", + "integrity": "sha512-i7HTNuDgZWb+VdrNVOam9gQhIc5MSSDXKWXgbUrn/4vSRaSMM+Rtl10MQj4wLWPNpF7p80waJsAqFP8HZfb0Jg==", + "license": "Apache-2.0", + "dependencies": { + "shiki": "^3.19.0" + }, + "peerDependencies": { + "react": "^18.0.0 || ^19.0.0" + } + }, "node_modules/@szmarczak/http-timer": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", @@ -3139,7 +3323,6 @@ "version": "4.1.13", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.13.tgz", "integrity": "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==", - "dev": true, "license": "MIT", "dependencies": { "@types/ms": "*" @@ -3149,9 +3332,17 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "dev": true, "license": "MIT" }, + "node_modules/@types/estree-jsx": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.5.tgz", + "integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==", + "license": "MIT", + "dependencies": { + "@types/estree": "*" + } + }, "node_modules/@types/fs-extra": { "version": "9.0.13", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz", @@ -3162,6 +3353,15 @@ "@types/node": "*" } }, + "node_modules/@types/hast": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.5.tgz", + "integrity": "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/http-cache-semantics": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", @@ -3186,11 +3386,19 @@ "@types/node": "*" } }, + "node_modules/@types/mdast": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", + "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/ms": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", - "dev": true, "license": "MIT" }, "node_modules/@types/node": { @@ -3240,6 +3448,12 @@ "@types/node": "*" } }, + "node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "license": "MIT" + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.56.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.56.1.tgz", @@ -3535,6 +3749,21 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz", + "integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==", + "license": "ISC" + }, + "node_modules/@vercel/oidc": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@vercel/oidc/-/oidc-3.2.0.tgz", + "integrity": "sha512-UycprH3T6n3jH0k44NHMa7pnFHGu/N05MjojYr+Mc6I7obkoLIJujSWwin1pCvdy/eOxrI/l3uDLQsmcrOb4ug==", + "license": "Apache-2.0", + "engines": { + "node": ">= 20" + } + }, "node_modules/@vitejs/plugin-react": { "version": "5.1.4", "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-5.1.4.tgz", @@ -3638,6 +3867,24 @@ "node": ">=8" } }, + "node_modules/ai": { + "version": "6.0.292", + "resolved": "https://registry.npmjs.org/ai/-/ai-6.0.292.tgz", + "integrity": "sha512-bWHUQhqCoHUj+KGSmU6u5ikZY+3zbsLEBNGOxIYH8D+MLzWO/iuvFjeacE45ekfuBLX8Z1DqDnZsPL/to8pTiw==", + "license": "Apache-2.0", + "dependencies": { + "@ai-sdk/gateway": "3.0.202", + "@ai-sdk/provider": "3.0.17", + "@ai-sdk/provider-utils": "4.0.54", + "@opentelemetry/api": "^1.9.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "zod": "^3.25.76 || ^4.1.8" + } + }, "node_modules/ajv": { "version": "6.14.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", @@ -4088,6 +4335,16 @@ "dev": true, "license": "MIT" }, + "node_modules/bail": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", + "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -4384,6 +4641,16 @@ ], "license": "CC-BY-4.0" }, + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -4411,6 +4678,46 @@ "node": ">=10" } }, + "node_modules/character-entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", + "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/chownr": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", @@ -4561,6 +4868,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -4594,6 +4910,16 @@ "node": ">= 0.8" } }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/commander": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", @@ -4952,7 +5278,6 @@ "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -4966,6 +5291,19 @@ } } }, + "node_modules/decode-named-character-reference": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.3.0.tgz", + "integrity": "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==", + "license": "MIT", + "dependencies": { + "character-entities": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/decompress-response": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", @@ -5068,6 +5406,15 @@ "node": ">=0.4.0" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", @@ -5086,6 +5433,19 @@ "license": "MIT", "optional": true }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "license": "MIT", + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/dir-compare": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/dir-compare/-/dir-compare-4.2.0.tgz", @@ -5397,6 +5757,18 @@ "node": ">=10.13.0" } }, + "node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/env-ci": { "version": "11.2.0", "resolved": "https://registry.npmjs.org/env-ci/-/env-ci-11.2.0.tgz", @@ -6000,6 +6372,16 @@ "node": ">=4.0" } }, + "node_modules/estree-util-is-identifier-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz", + "integrity": "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -6010,6 +6392,15 @@ "node": ">=0.10.0" } }, + "node_modules/eventsource-parser": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.1.1.tgz", + "integrity": "sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -6054,6 +6445,12 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "license": "MIT" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -6758,37 +7155,221 @@ "node": ">= 0.4" } }, - "node_modules/hermes-estree": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz", - "integrity": "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==", - "dev": true, - "license": "MIT" - }, - "node_modules/hermes-parser": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.25.1.tgz", - "integrity": "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==", - "dev": true, + "node_modules/hast-util-from-parse5": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-8.0.3.tgz", + "integrity": "sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg==", "license": "MIT", "dependencies": { - "hermes-estree": "0.25.1" - } - }, - "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": "*" + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "devlop": "^1.0.0", + "hastscript": "^9.0.0", + "property-information": "^7.0.0", + "vfile": "^6.0.0", + "vfile-location": "^5.0.0", + "web-namespaces": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/hook-std": { + "node_modules/hast-util-parse-selector": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/hook-std/-/hook-std-4.0.0.tgz", - "integrity": "sha512-IHI4bEVOt3vRUDJ+bFA9VUJlo7SzvFARPNLw75pqSmAOP2HmTWfFJtPvLBrDrlgjEYXY9zs7SFdHPQaJShkSCQ==", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-4.0.0.tgz", + "integrity": "sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-raw": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-9.1.0.tgz", + "integrity": "sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "@ungap/structured-clone": "^1.0.0", + "hast-util-from-parse5": "^8.0.0", + "hast-util-to-parse5": "^8.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "parse5": "^7.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-raw/node_modules/parse5": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", + "license": "MIT", + "dependencies": { + "entities": "^6.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/hast-util-sanitize": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/hast-util-sanitize/-/hast-util-sanitize-5.0.2.tgz", + "integrity": "sha512-3yTWghByc50aGS7JlGhk61SPenfE/p1oaFeNwkOOyrscaOkMGrcW9+Cy/QAIOBpZxP1yqDIzFMR0+Np0i0+usg==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@ungap/structured-clone": "^1.0.0", + "unist-util-position": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-html": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.5.tgz", + "integrity": "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^3.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-jsx-runtime": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz", + "integrity": "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "devlop": "^1.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "hast-util-whitespace": "^3.0.0", + "mdast-util-mdx-expression": "^2.0.0", + "mdast-util-mdx-jsx": "^3.0.0", + "mdast-util-mdxjs-esm": "^2.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0", + "style-to-js": "^1.0.0", + "unist-util-position": "^5.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-parse5": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-8.0.1.tgz", + "integrity": "sha512-MlWT6Pjt4CG9lFCjiz4BH7l9wmrMkfkJYCxFwKQic8+RTZgWPuWxwAfjJElsXkex7DJjfSJsQIt931ilUgmwdA==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "devlop": "^1.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hastscript": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-9.0.1.tgz", + "integrity": "sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-parse-selector": "^4.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hermes-estree": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz", + "integrity": "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==", + "dev": true, + "license": "MIT" + }, + "node_modules/hermes-parser": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.25.1.tgz", + "integrity": "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hermes-estree": "0.25.1" + } + }, + "node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": "*" + } + }, + "node_modules/hook-std": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/hook-std/-/hook-std-4.0.0.tgz", + "integrity": "sha512-IHI4bEVOt3vRUDJ+bFA9VUJlo7SzvFARPNLw75pqSmAOP2HmTWfFJtPvLBrDrlgjEYXY9zs7SFdHPQaJShkSCQ==", "dev": true, "license": "MIT", "engines": { @@ -6831,6 +7412,26 @@ "dev": true, "license": "ISC" }, + "node_modules/html-url-attributes": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz", + "integrity": "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/html-void-elements": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", + "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/http-cache-semantics": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", @@ -7001,6 +7602,12 @@ "dev": true, "license": "ISC" }, + "node_modules/inline-style-parser": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.7.tgz", + "integrity": "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==", + "license": "MIT" + }, "node_modules/internal-slot": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", @@ -7016,6 +7623,30 @@ "node": ">= 0.4" } }, + "node_modules/is-alphabetical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", + "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", + "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", + "license": "MIT", + "dependencies": { + "is-alphabetical": "^2.0.0", + "is-decimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-array-buffer": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", @@ -7158,6 +7789,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-decimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", + "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-document.all": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-document.all/-/is-document.all-1.0.0.tgz", @@ -7243,6 +7884,16 @@ "node": ">=0.10.0" } }, + "node_modules/is-hexadecimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", + "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-map": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", @@ -7310,7 +7961,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", - "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -7636,6 +8286,12 @@ "dev": true, "license": "MIT" }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "license": "(AFL-2.1 OR BSD-3-Clause)" + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -8078,6 +8734,16 @@ "dev": true, "license": "MIT" }, + "node_modules/longest-streak": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", + "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/lowercase-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", @@ -8107,159 +8773,1014 @@ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, - "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "dev": true, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/make-asynchronous": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/make-asynchronous/-/make-asynchronous-1.1.0.tgz", + "integrity": "sha512-ayF7iT+44LXdxJLTrTd3TLQpFDDvPCBxXxbv+pMUSuHA5Q8zyAfwkRP6aHHwNVFBUFWtxAHqwNJxF8vMZLAbVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-event": "^6.0.0", + "type-fest": "^4.6.0", + "web-worker": "^1.5.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-asynchronous/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/markdown-table": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.4.tgz", + "integrity": "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/marked": { + "version": "15.0.12", + "resolved": "https://registry.npmjs.org/marked/-/marked-15.0.12.tgz", + "integrity": "sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA==", + "dev": true, + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/marked-terminal": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-7.3.0.tgz", + "integrity": "sha512-t4rBvPsHc57uE/2nJOLmMbZCQ4tgAccAED3ngXQqW6g+TxA488JzJ+FK3lQkzBQOI1mRV/r/Kq+1ZlJ4D0owQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^7.0.0", + "ansi-regex": "^6.1.0", + "chalk": "^5.4.1", + "cli-highlight": "^2.1.11", + "cli-table3": "^0.6.5", + "node-emoji": "^2.2.0", + "supports-hyperlinks": "^3.1.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "marked": ">=1 <16" + } + }, + "node_modules/marked-terminal/node_modules/ansi-regex": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.3.0.tgz", + "integrity": "sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/marked-terminal/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/matcher": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", + "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "escape-string-regexp": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mdast-util-find-and-replace": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.2.tgz", + "integrity": "sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "escape-string-regexp": "^5.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mdast-util-from-markdown": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.3.tgz", + "integrity": "sha512-W4mAWTvSlKvf8L6J+VN9yLSqQ9AOAAvHuoDAmPkz4dHf553m5gVj2ejadHJhoJmcmxEnOv6Pa8XJhpxE93kb8Q==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "mdast-util-to-string": "^4.0.0", + "micromark": "^4.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-decode-string": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-3.1.0.tgz", + "integrity": "sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==", + "license": "MIT", + "dependencies": { + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-gfm-autolink-literal": "^2.0.0", + "mdast-util-gfm-footnote": "^2.0.0", + "mdast-util-gfm-strikethrough": "^2.0.0", + "mdast-util-gfm-table": "^2.0.0", + "mdast-util-gfm-task-list-item": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-autolink-literal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.0.1.tgz", + "integrity": "sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "ccount": "^2.0.0", + "devlop": "^1.0.0", + "mdast-util-find-and-replace": "^3.0.0", + "micromark-util-character": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-footnote": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.1.0.tgz", + "integrity": "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.1.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-strikethrough": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-2.0.0.tgz", + "integrity": "sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-table": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-2.0.0.tgz", + "integrity": "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "markdown-table": "^3.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-task-list-item": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-2.0.0.tgz", + "integrity": "sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdx-expression": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz", + "integrity": "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdx-jsx": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.2.0.tgz", + "integrity": "sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "devlop": "^1.1.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "parse-entities": "^4.0.0", + "stringify-entities": "^4.0.0", + "unist-util-stringify-position": "^4.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdxjs-esm": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz", + "integrity": "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-phrasing": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz", + "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast": { + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz", + "integrity": "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "trim-lines": "^3.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-markdown": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.2.tgz", + "integrity": "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "longest-streak": "^3.0.0", + "mdast-util-phrasing": "^4.0.0", + "mdast-util-to-string": "^4.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-decode-string": "^2.0.0", + "unist-util-visit": "^5.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz", + "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/meow": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/micromark": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", + "integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0", + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-core-commonmark": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz", + "integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-factory-destination": "^2.0.0", + "micromark-factory-label": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-factory-title": "^2.0.0", + "micromark-factory-whitespace": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-html-tag-name": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-extension-gfm": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-3.0.0.tgz", + "integrity": "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==", + "license": "MIT", + "dependencies": { + "micromark-extension-gfm-autolink-literal": "^2.0.0", + "micromark-extension-gfm-footnote": "^2.0.0", + "micromark-extension-gfm-strikethrough": "^2.0.0", + "micromark-extension-gfm-table": "^2.0.0", + "micromark-extension-gfm-tagfilter": "^2.0.0", + "micromark-extension-gfm-task-list-item": "^2.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-autolink-literal": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.1.0.tgz", + "integrity": "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==", + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-footnote": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz", + "integrity": "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==", + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-strikethrough": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0.tgz", + "integrity": "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==", + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-table": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.2.tgz", + "integrity": "sha512-pRzm4kDTu0MjlmBkxmS9yYhw60nncfcEwu9NNdPFSQEFXS95ZKyIIyTSHu/o3ReBUrLKYEq+7YaXCRn/bPB4MA==", + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-tagfilter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-2.0.0.tgz", + "integrity": "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==", + "license": "MIT", + "dependencies": { + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-task-list-item": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz", + "integrity": "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==", + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-factory-destination": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz", + "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-label": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz", + "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-space": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-title": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz", + "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-whitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz", + "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" } }, - "node_modules/make-asynchronous": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/make-asynchronous/-/make-asynchronous-1.1.0.tgz", - "integrity": "sha512-ayF7iT+44LXdxJLTrTd3TLQpFDDvPCBxXxbv+pMUSuHA5Q8zyAfwkRP6aHHwNVFBUFWtxAHqwNJxF8vMZLAbVg==", - "dev": true, + "node_modules/micromark-util-character": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], "license": "MIT", "dependencies": { - "p-event": "^6.0.0", - "type-fest": "^4.6.0", - "web-worker": "^1.5.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" } }, - "node_modules/make-asynchronous/node_modules/type-fest": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", - "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node_modules/micromark-util-chunked": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz", + "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" } }, - "node_modules/marked": { - "version": "15.0.12", - "resolved": "https://registry.npmjs.org/marked/-/marked-15.0.12.tgz", - "integrity": "sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA==", - "dev": true, + "node_modules/micromark-util-classify-character": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz", + "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 18" + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" } }, - "node_modules/marked-terminal": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-7.3.0.tgz", - "integrity": "sha512-t4rBvPsHc57uE/2nJOLmMbZCQ4tgAccAED3ngXQqW6g+TxA488JzJ+FK3lQkzBQOI1mRV/r/Kq+1ZlJ4D0owQw==", - "dev": true, + "node_modules/micromark-util-combine-extensions": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz", + "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], "license": "MIT", "dependencies": { - "ansi-escapes": "^7.0.0", - "ansi-regex": "^6.1.0", - "chalk": "^5.4.1", - "cli-highlight": "^2.1.11", - "cli-table3": "^0.6.5", - "node-emoji": "^2.2.0", - "supports-hyperlinks": "^3.1.0" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "marked": ">=1 <16" + "micromark-util-chunked": "^2.0.0", + "micromark-util-types": "^2.0.0" } }, - "node_modules/marked-terminal/node_modules/ansi-regex": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.3.0.tgz", - "integrity": "sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==", - "dev": true, + "node_modules/micromark-util-decode-numeric-character-reference": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz", + "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "dependencies": { + "micromark-util-symbol": "^2.0.0" } }, - "node_modules/marked-terminal/node_modules/chalk": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", - "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", - "dev": true, + "node_modules/micromark-util-decode-string": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz", + "integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-symbol": "^2.0.0" } }, - "node_modules/matcher": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", - "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", - "dev": true, + "node_modules/micromark-util-encode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", + "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-html-tag-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz", + "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-normalize-identifier": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz", + "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], "license": "MIT", - "optional": true, "dependencies": { - "escape-string-regexp": "^4.0.0" - }, - "engines": { - "node": ">=10" + "micromark-util-symbol": "^2.0.0" } }, - "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==", - "dev": true, + "node_modules/micromark-util-resolve-all": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz", + "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], "license": "MIT", - "engines": { - "node": ">= 0.4" + "dependencies": { + "micromark-util-types": "^2.0.0" } }, - "node_modules/memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", - "dev": true, - "engines": { - "node": ">= 0.10.0" + "node_modules/micromark-util-sanitize-uri": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", + "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" } }, - "node_modules/meow": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", - "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", - "dev": true, + "node_modules/micromark-util-subtokenize": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz", + "integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" } }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, + "node_modules/micromark-util-symbol": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-types": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz", + "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], "license": "MIT" }, "node_modules/micromatch": { @@ -8409,7 +9930,6 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, "license": "MIT" }, "node_modules/mz": { @@ -11483,6 +13003,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/oniguruma-parser": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.2.tgz", + "integrity": "sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==", + "license": "MIT" + }, + "node_modules/oniguruma-to-es": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.6.tgz", + "integrity": "sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==", + "license": "MIT", + "dependencies": { + "oniguruma-parser": "^0.12.2", + "regex": "^6.1.0", + "regex-recursion": "^6.0.2" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -11666,6 +13203,31 @@ "node": ">=6" } }, + "node_modules/parse-entities": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", + "integrity": "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "character-entities-legacy": "^3.0.0", + "character-reference-invalid": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "is-alphanumerical": "^2.0.0", + "is-decimal": "^2.0.0", + "is-hexadecimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse-entities/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "license": "MIT" + }, "node_modules/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", @@ -12112,6 +13674,16 @@ "signal-exit": "^3.0.2" } }, + "node_modules/property-information": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.2.0.tgz", + "integrity": "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", @@ -12434,6 +14006,30 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/regex/-/regex-6.1.0.tgz", + "integrity": "sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg==", + "license": "MIT", + "dependencies": { + "regex-utilities": "^2.3.0" + } + }, + "node_modules/regex-recursion": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/regex-recursion/-/regex-recursion-6.0.2.tgz", + "integrity": "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==", + "license": "MIT", + "dependencies": { + "regex-utilities": "^2.3.0" + } + }, + "node_modules/regex-utilities": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/regex-utilities/-/regex-utilities-2.3.0.tgz", + "integrity": "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==", + "license": "MIT" + }, "node_modules/regexp.prototype.flags": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", @@ -12468,6 +14064,116 @@ "node": ">=14" } }, + "node_modules/rehype-harden": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/rehype-harden/-/rehype-harden-1.1.8.tgz", + "integrity": "sha512-Qn7vR1xrf6fZCrkm9TDWi/AB4ylrHy+jqsNm1EHOAmbARYA6gsnVJBq/sdBh6kmT4NEZxH5vgIjrscefJAOXcw==", + "license": "MIT", + "dependencies": { + "unist-util-visit": "^5.0.0" + } + }, + "node_modules/rehype-raw": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-7.0.0.tgz", + "integrity": "sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "hast-util-raw": "^9.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-sanitize": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/rehype-sanitize/-/rehype-sanitize-6.0.0.tgz", + "integrity": "sha512-CsnhKNsyI8Tub6L4sm5ZFsme4puGfc6pYylvXo1AeqaGbjOYyzNv3qZPwvs0oMJ39eryyeOdmxwUIo94IpEhqg==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "hast-util-sanitize": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-gfm": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.1.tgz", + "integrity": "sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-gfm": "^3.0.0", + "micromark-extension-gfm": "^3.0.0", + "remark-parse": "^11.0.0", + "remark-stringify": "^11.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-parse": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz", + "integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-from-markdown": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-rehype": { + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz", + "integrity": "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "mdast-util-to-hast": "^13.0.0", + "unified": "^11.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-stringify": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-11.0.0.tgz", + "integrity": "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-to-markdown": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remend": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/remend/-/remend-1.3.1.tgz", + "integrity": "sha512-N3DiY5qbRPoa5vkxn1oDLMyXOVTeo6Hp+XOj6SIqJAYUgLS0Q587gILPMom/qm86AQ/ZrcOdwEIzCz8V3J0nxQ==", + "license": "Apache-2.0" + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -13203,6 +14909,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/shiki": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-3.23.0.tgz", + "integrity": "sha512-55Dj73uq9ZXL5zyeRPzHQsK7Nbyt6Y10k5s7OjuFZGMhpp4r/rsLBH0o/0fstIzX1Lep9VxefWljK/SKCzygIA==", + "license": "MIT", + "dependencies": { + "@shikijs/core": "3.23.0", + "@shikijs/engine-javascript": "3.23.0", + "@shikijs/engine-oniguruma": "3.23.0", + "@shikijs/langs": "3.23.0", + "@shikijs/themes": "3.23.0", + "@shikijs/types": "3.23.0", + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.4" + } + }, "node_modules/side-channel": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz", @@ -13462,6 +15184,16 @@ "source-map": "^0.6.0" } }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/spawn-error-forwarder": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/spawn-error-forwarder/-/spawn-error-forwarder-1.0.0.tgz", @@ -13558,6 +15290,45 @@ "readable-stream": "^2.0.2" } }, + "node_modules/streamdown": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/streamdown/-/streamdown-2.6.0.tgz", + "integrity": "sha512-nQZVUn4GvB2R5SAlDNph20iKZeW+RM4gv6G1H3ACypEnmQf8PgTHZ/1Ta2OACRwQ2coK7aW5AeIAa7Ls5zk+RA==", + "license": "Apache-2.0", + "dependencies": { + "clsx": "^2.1.1", + "hast-util-to-jsx-runtime": "^2.3.6", + "html-url-attributes": "^3.0.1", + "marked": "^17.0.1", + "rehype-harden": "^1.1.8", + "rehype-raw": "^7.0.0", + "rehype-sanitize": "^6.0.0", + "remark-gfm": "^4.0.1", + "remark-parse": "^11.0.0", + "remark-rehype": "^11.1.2", + "remend": "1.3.1", + "tailwind-merge": "^3.6.0", + "unified": "^11.0.5", + "unist-util-visit": "^5.1.0", + "unist-util-visit-parents": "^6.0.2" + }, + "peerDependencies": { + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + } + }, + "node_modules/streamdown/node_modules/marked": { + "version": "17.0.6", + "resolved": "https://registry.npmjs.org/marked/-/marked-17.0.6.tgz", + "integrity": "sha512-gB0gkNafnonOw0obSTEGZTT86IuhILt2Wfx0mWH/1Au83kybTayroZ/V6nS25mN7u8ASy+5fMhgB3XPNrOZdmA==", + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 20" + } + }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -13662,6 +15433,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/stringify-entities": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", + "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", + "license": "MIT", + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -13708,6 +15493,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/style-to-js": { + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.21.tgz", + "integrity": "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==", + "license": "MIT", + "dependencies": { + "style-to-object": "1.0.14" + } + }, + "node_modules/style-to-object": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.14.tgz", + "integrity": "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw==", + "license": "MIT", + "dependencies": { + "inline-style-parser": "0.2.7" + } + }, "node_modules/sugarss": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-5.0.1.tgz", @@ -13807,6 +15610,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/swr": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/swr/-/swr-2.5.1.tgz", + "integrity": "sha512-BRw55e8r0B7SpDN20CAzoQAHl7y1yP7/Zt7oqUjMv0vSt2u2Xnkm88Ws+VypbV9BXHQVuSuyVq7zMjO16wSExw==", + "license": "MIT", + "dependencies": { + "dequal": "^2.0.3", + "use-sync-external-store": "^1.6.0" + }, + "peerDependencies": { + "react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/tailwind-merge": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.7.0.tgz", + "integrity": "sha512-XPPUyAc+cvspz3lHTcR/QgPfW2A0lv/xQNIjX3HGhLR+Nq2lHaLq5MtTesHn8GUr3W3DguT2KT5x3NVgRtYwmA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, "node_modules/tailwindcss": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.0.tgz", @@ -13959,6 +15785,18 @@ "node": ">=0.8" } }, + "node_modules/throttleit": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-2.1.0.tgz", + "integrity": "sha512-nt6AMGKW1p/70DF/hGBdJB57B8Tspmbp5gfJ8ilhLnt7kkr2ye7hzD6NVG8GGErk2HWF34igrL2CXmNIkzKqKw==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", @@ -14069,6 +15907,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/trough": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz", + "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/truncate-utf8-bytes": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", @@ -14279,7 +16137,6 @@ "version": "6.28.0", "resolved": "https://registry.npmjs.org/undici/-/undici-6.28.0.tgz", "integrity": "sha512-LIY910g9TI13YS95lrMFrs8Rm/u/irgHeTWoKCoteeJ04CUJ92eEfj0rVn+7VKMPBpUPiUoBKfhNyLI23EE/KA==", - "dev": true, "license": "MIT", "engines": { "node": ">=18.17" @@ -14315,6 +16172,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/unified": { + "version": "11.0.5", + "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz", + "integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "bail": "^2.0.0", + "devlop": "^1.0.0", + "extend": "^3.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/unique-string": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", @@ -14331,6 +16207,74 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/unist-util-is": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz", + "integrity": "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", + "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.1.0.tgz", + "integrity": "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.2.tgz", + "integrity": "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/universal-user-agent": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz", @@ -14428,6 +16372,30 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, + "node_modules/use-stick-to-bottom": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/use-stick-to-bottom/-/use-stick-to-bottom-1.1.6.tgz", + "integrity": "sha512-z3Up8jYQGTkUCsGBnwg6/wj70KgXoW5Kz1AAc1j8MtQuYMBo6ZsdhrIXoegxa7gaMMilgQYyTohTrt3p94jHog==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/samdenty" + } + ], + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/use-sync-external-store": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.7.0.tgz", + "integrity": "sha512-6L+EeigHMQhdaIPNIFUKwfWJSwWFQ8gJbJ2DLOs5sDIegTwR9fRxvnM3uciHKjIZhFz+KAv2emhWMRvDmMcY8A==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/utf8-byte-length": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz", @@ -14453,6 +16421,48 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/vfile": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-location": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-5.0.3.tgz", + "integrity": "sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.3.tgz", + "integrity": "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/vite": { "version": "7.3.6", "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.6.tgz", @@ -14528,6 +16538,16 @@ } } }, + "node_modules/web-namespaces": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", + "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/web-worker": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.5.0.tgz", @@ -14789,10 +16809,9 @@ } }, "node_modules/zod": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", - "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", - "dev": true, + "version": "4.6.5", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.5.tgz", + "integrity": "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" @@ -14810,6 +16829,16 @@ "peerDependencies": { "zod": "^3.25.0 || ^4.0.0" } + }, + "node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } } } } diff --git a/package.json b/package.json index f429ede..9dfa311 100644 --- a/package.json +++ b/package.json @@ -21,14 +21,23 @@ "postinstall": "electron-rebuild -f -w node-pty" }, "dependencies": { + "@ai-sdk/openai-compatible": "^2.0.74", + "@ai-sdk/react": "^3.0.275", + "@streamdown/code": "^1.1.1", "@tabler/icons-react": "^3.38.0", "@tanstack/react-query": "^5.90.21", "@xterm/addon-fit": "^0.11.0", "@xterm/xterm": "^6.0.0", + "ai": "^6.0.272", + "clsx": "^2.1.1", "lucide-react": "^1.33.0", "node-pty": "^1.1.0", "react": "^19.2.0", - "react-dom": "^19.2.0" + "react-dom": "^19.2.0", + "streamdown": "^2.6.0", + "tailwind-merge": "^3.6.0", + "use-stick-to-bottom": "^1.1.6", + "zod": "^4.5.4" }, "devDependencies": { "@electron/rebuild": "^4.0.4", diff --git a/src/electron/ai/chat.ts b/src/electron/ai/chat.ts new file mode 100644 index 0000000..b8c00cb --- /dev/null +++ b/src/electron/ai/chat.ts @@ -0,0 +1,76 @@ +import { + convertToModelMessages, + createUIMessageStream, + streamText, + type UIMessageChunk, +} from "ai"; +import { buildSystemPrompt, collectContext } from "./context.js"; +import { getChatModel } from "./model.js"; + +/** + * One entry per in-flight send. The renderer owns stream ids, so an abort that + * races a newly started stream cannot cancel the wrong one. + */ +const running = new Map(); + +function toUserMessage(error: unknown): string { + if (error instanceof Error) { + if (error.name === "AbortError") return "Stopped."; + if (/fetch failed|ENOTFOUND|ECONNREFUSED/i.test(error.message)) { + return "Could not reach OpenRouter. Check your connection and try again."; + } + return error.message; + } + return "Something went wrong while answering. Try again."; +} + +export function abortChat(streamId: string) { + running.get(streamId)?.abort(); + running.delete(streamId); +} + +/** + * Runs one turn and hands each UI message chunk to `onChunk`, which ships it to + * the chat view. The renderer reassembles the chunks into a ReadableStream for + * `useChat`, so this is the AI SDK's own stream protocol carried over IPC + * instead of over HTTP. + */ +export async function runChat(options: { + streamId: string; + exerciseId: string; + apiKey: string; + messages: GitMasteryUIMessage[]; + onChunk: (chunk: UIMessageChunk) => void; +}) { + const { streamId, exerciseId, apiKey, messages, onChunk } = options; + + const controller = new AbortController(); + running.set(streamId, controller); + + const stream = createUIMessageStream({ + onError: toUserMessage, + execute: async ({ writer }) => { + // Collected per send, not per panel open, so a future git-state provider + // sees the repo as it is after the student's latest attempt. + const context = await collectContext(exerciseId); + writer.write({ type: "data-context", id: "context", data: context }); + + const result = streamText({ + model: getChatModel(apiKey), + system: buildSystemPrompt(context), + messages: await convertToModelMessages(messages), + abortSignal: controller.signal, + }); + + writer.merge(result.toUIMessageStream()); + }, + }); + + try { + for await (const chunk of stream) { + onChunk(chunk); + } + } finally { + if (running.get(streamId) === controller) running.delete(streamId); + } +} diff --git a/src/electron/ai/context.ts b/src/electron/ai/context.ts new file mode 100644 index 0000000..cb72a6a --- /dev/null +++ b/src/electron/ai/context.ts @@ -0,0 +1,68 @@ +import { getCwd } from "../ipc/terminal.js"; +import { exerciseBriefProvider } from "./providers/exerciseBrief.js"; + +export type ContextBlock = AiContextBlock; + +export type ContextCollectArgs = { + exerciseId: string; + cwd: string; +}; + +export type ContextProvider = { + id: string; + label: string; + collect: (ctx: ContextCollectArgs) => Promise; +}; + +const MAX_BLOCK_CHARS = 8000; + +/** + * Adding a live signal (git status, verify output, terminal scrollback) means + * appending one provider here. collectContext, the system prompt, IPC, and the + * context chip all stay unchanged. + */ +const PROVIDERS: ContextProvider[] = [exerciseBriefProvider]; + +export async function collectContext( + exerciseId: string, +): Promise { + const cwd = getCwd(); + const results = await Promise.all( + PROVIDERS.map(async (provider) => { + try { + const text = await provider.collect({ exerciseId, cwd }); + if (!text?.trim()) return null; + return { + id: provider.id, + label: provider.label, + text: text.trim().slice(0, MAX_BLOCK_CHARS), + }; + } catch (err) { + console.warn(`[ai] context provider ${provider.id} failed:`, err); + return null; + } + }), + ); + return results.filter((block): block is ContextBlock => block !== null); +} + +export function buildSystemPrompt(blocks: ContextBlock[]): string { + const preamble = `You are a teaching assistant for Git-Mastery, a tool that teaches Git through hands-on exercises. + +Give hints and ask what the student has already tried. Do not hand over the full sequence of commands that would complete the exercise. Prefer short, stepwise guidance.`; + + if (blocks.length === 0) { + return `${preamble} + +No exercise text could be collected for this session. Answer from the student's question alone.`; + } + + const attached = blocks + .map((block) => `## ${block.label}\n${block.text}`) + .join("\n\n"); + return `${preamble} + +The following context is attached for this exercise: + +${attached}`; +} diff --git a/src/electron/ai/model.ts b/src/electron/ai/model.ts new file mode 100644 index 0000000..079d73a --- /dev/null +++ b/src/electron/ai/model.ts @@ -0,0 +1,32 @@ +import { createOpenAICompatible } from "@ai-sdk/openai-compatible"; +import type { LanguageModel } from "ai"; + +export const OPENROUTER_BASE_URL = "https://openrouter.ai/api/v1"; +export const OPENROUTER_KEY_URL = `${OPENROUTER_BASE_URL}/key`; + +/** + * MVP hardcodes OpenRouter's zero-cost router. Membership changes without + * notice — see the open questions in the tech design. + */ +const MODEL_ID = "openrouter/free"; + +/** Optional OpenRouter attribution headers. */ +const HEADERS = { + "HTTP-Referer": "https://git-mastery.org", + "X-Title": "Git-Mastery Desktop", +}; + +/** + * Deliberately an OpenAI-compatible client rather than an OpenRouter-specific + * provider: pointing at Ollama, Azure, or a course-held proxy later is a change + * of baseURL and model id, not a change of client. + */ +export function getChatModel(apiKey: string): LanguageModel { + const provider = createOpenAICompatible({ + name: "openrouter", + baseURL: OPENROUTER_BASE_URL, + apiKey, + headers: HEADERS, + }); + return provider.chatModel(MODEL_ID); +} diff --git a/src/electron/ai/providers/exerciseBrief.ts b/src/electron/ai/providers/exerciseBrief.ts new file mode 100644 index 0000000..3d25177 --- /dev/null +++ b/src/electron/ai/providers/exerciseBrief.ts @@ -0,0 +1,10 @@ +import type { ContextProvider } from "../context.js"; +import { getExerciseText } from "../../ipc/webContentsView.js"; + +export const exerciseBriefProvider: ContextProvider = { + id: "exercise-brief", + label: "Exercise brief", + async collect({ exerciseId }) { + return getExerciseText(exerciseId); + }, +}; diff --git a/src/electron/aiKey.ts b/src/electron/aiKey.ts new file mode 100644 index 0000000..76dc755 --- /dev/null +++ b/src/electron/aiKey.ts @@ -0,0 +1,59 @@ +import { safeStorage } from "electron"; +import { getConfig, saveConfig } from "./storage.js"; + +export function isKeyEncryptionAvailable(): boolean { + return safeStorage.isEncryptionAvailable(); +} + +export function setApiKey(key: string): { encrypted: boolean } { + const trimmed = key.trim(); + if (!trimmed) { + clearApiKey(); + return { encrypted: false }; + } + + if (safeStorage.isEncryptionAvailable()) { + const enc = safeStorage.encryptString(trimmed).toString("base64"); + saveConfig({ + openRouterApiKeyEnc: enc, + openRouterApiKeyPlain: undefined, + }); + return { encrypted: true }; + } + + saveConfig({ + openRouterApiKeyPlain: trimmed, + openRouterApiKeyEnc: undefined, + }); + return { encrypted: false }; +} + +export function getApiKey(): string | null { + const config = getConfig(); + if (config.openRouterApiKeyEnc) { + try { + return safeStorage.decryptString( + Buffer.from(config.openRouterApiKeyEnc, "base64"), + ); + } catch (err) { + console.error("[ai] failed to decrypt OpenRouter key:", err); + return null; + } + } + return config.openRouterApiKeyPlain ?? null; +} + +export function clearApiKey(): void { + saveConfig({ + openRouterApiKeyEnc: undefined, + openRouterApiKeyPlain: undefined, + }); +} + +export function hasApiKey(): boolean { + return Boolean(getApiKey()); +} + +export function isStoredKeyEncrypted(): boolean { + return Boolean(getConfig().openRouterApiKeyEnc); +} diff --git a/src/electron/ipc/ai.ts b/src/electron/ipc/ai.ts new file mode 100644 index 0000000..7629e71 --- /dev/null +++ b/src/electron/ipc/ai.ts @@ -0,0 +1,99 @@ +import { ipcMainHandle, ipcMainOn } from "../utils/util.js"; +import { + clearApiKey, + getApiKey, + hasApiKey, + isKeyEncryptionAvailable, + isStoredKeyEncrypted, + setApiKey, +} from "../aiKey.js"; +import { abortChat, runChat } from "../ai/chat.js"; +import { OPENROUTER_KEY_URL } from "../ai/model.js"; +import { sendToChat } from "./chatView.js"; +import { setAiHintsEnabled } from "./webContentsView.js"; + +function notifyAiEnabled() { + setAiHintsEnabled(hasApiKey()); +} + +async function validateKey( + key: string, +): Promise<{ ok: boolean; error?: string }> { + try { + const response = await fetch(OPENROUTER_KEY_URL, { + method: "GET", + headers: { Authorization: `Bearer ${key}` }, + }); + if (response.ok) return { ok: true }; + if (response.status === 401 || response.status === 403) { + return { + ok: false, + error: "That key was rejected. Check it and try again.", + }; + } + return { + ok: false, + error: `OpenRouter returned ${response.status}. Try again in a moment.`, + }; + } catch { + return { + ok: false, + error: "Could not reach OpenRouter. Check your connection and try again.", + }; + } +} + +export function setupAiIpc() { + ipcMainHandle("set-openrouter-key", async ({ key }) => { + const result = setApiKey(key); + notifyAiEnabled(); + return { ok: hasApiKey(), encrypted: result.encrypted }; + }); + + ipcMainHandle("get-openrouter-key", async () => ({ + key: getApiKey(), + storedEncrypted: isStoredKeyEncrypted(), + encryptionAvailable: isKeyEncryptionAvailable(), + })); + + ipcMainHandle("has-openrouter-key", async () => hasApiKey()); + + ipcMainHandle("clear-openrouter-key", async () => { + clearApiKey(); + notifyAiEnabled(); + }); + + ipcMainHandle("validate-openrouter-key", async (payload) => { + const key = payload?.key?.trim() || getApiKey(); + if (!key) { + return { ok: false, error: "Paste an OpenRouter API key first." }; + } + return validateKey(key); + }); + + // Resolves as soon as the turn is accepted. Everything the renderer renders + // arrives on `ai-chat-chunk`, so the transport's ReadableStream can start + // producing before the model has finished. + ipcMainHandle("ai-chat-start", async ({ streamId, exerciseId, messages }) => { + const apiKey = getApiKey(); + if (!apiKey) { + return { ok: false, error: "Set up AI features in Settings first." }; + } + + void runChat({ + streamId, + exerciseId, + apiKey, + messages, + onChunk: (chunk) => sendToChat("ai-chat-chunk", { streamId, chunk }), + }) + .catch((err) => console.error("[ai] chat stream failed:", err)) + // The renderer's stream stays open until this arrives, so it has to be + // sent even when the turn fell over. + .finally(() => sendToChat("ai-chat-end", { streamId })); + + return { ok: true }; + }); + + ipcMainOn("ai-chat-abort", ({ streamId }) => abortChat(streamId)); +} diff --git a/src/electron/ipc/chatView.ts b/src/electron/ipc/chatView.ts new file mode 100644 index 0000000..a357ab2 --- /dev/null +++ b/src/electron/ipc/chatView.ts @@ -0,0 +1,203 @@ +import { WebContentsView, type BrowserWindow } from "electron"; +import { ipcMainHandle, ipcMainOn, isDev } from "../utils/util.js"; +import { getPreloadPath, getUIPath } from "../pathResolver.js"; + +const VIEW_PAD = 12; +const DEFAULT_WIDTH = 380; +const DEFAULT_HEIGHT = 480; +const MIN_WIDTH = 280; +const MIN_HEIGHT = 320; + +let chatView: WebContentsView | null = null; +let hostWindow: BrowserWindow | null = null; +let visible = false; +let panel: ChatPanelRect = { + x: 24, + y: 80, + width: DEFAULT_WIDTH, + height: DEFAULT_HEIGHT, +}; +let currentSession: ChatSession | null = null; +let ready: Promise | null = null; + +function contentSize(): { width: number; height: number } { + if (!hostWindow || hostWindow.isDestroyed()) { + return { width: 1024, height: 680 }; + } + const bounds = hostWindow.getContentBounds(); + return { width: bounds.width, height: bounds.height }; +} + +function clampPanel(rect: ChatPanelRect): ChatPanelRect { + const { width: windowWidth, height: windowHeight } = contentSize(); + const width = Math.max( + MIN_WIDTH, + Math.min(rect.width, Math.max(MIN_WIDTH, windowWidth - VIEW_PAD * 2)), + ); + const height = Math.max( + MIN_HEIGHT, + Math.min(rect.height, Math.max(MIN_HEIGHT, windowHeight - VIEW_PAD * 2)), + ); + const maxX = Math.max(VIEW_PAD, windowWidth - width - VIEW_PAD); + const maxY = Math.max(VIEW_PAD, windowHeight - height - VIEW_PAD); + return { + width, + height, + x: Math.min(Math.max(rect.x, VIEW_PAD), maxX), + y: Math.min(Math.max(rect.y, VIEW_PAD), maxY), + }; +} + +function applyBounds() { + if (!chatView) return; + if (!visible) { + chatView.setBounds({ x: 0, y: 0, width: 0, height: 0 }); + return; + } + panel = clampPanel(panel); + chatView.setBounds({ + x: Math.round(panel.x - VIEW_PAD), + y: Math.round(panel.y - VIEW_PAD), + width: Math.round(panel.width + VIEW_PAD * 2), + height: Math.round(panel.height + VIEW_PAD * 2), + }); +} + +function raiseView() { + if (!hostWindow || hostWindow.isDestroyed() || !chatView) return; + hostWindow.contentView.addChildView(chatView); +} + +function getOrCreateChatView(mainWindow: BrowserWindow): WebContentsView { + hostWindow = mainWindow; + if (chatView) return chatView; + + chatView = new WebContentsView({ + webPreferences: { + preload: getPreloadPath(), + }, + }); + chatView.setBackgroundColor("#00000000"); + mainWindow.contentView.addChildView(chatView); + chatView.setBounds({ x: 0, y: 0, width: 0, height: 0 }); + + ready = new Promise((resolve) => { + chatView!.webContents.once("did-finish-load", () => resolve()); + }); + + chatView.webContents.on("did-finish-load", () => { + if (currentSession) sendToChat("chat-session", currentSession); + }); + + chatView.webContents.on("did-fail-load", () => { + if (!isDev() || !chatView) return; + setTimeout(() => { + void chatView?.webContents.loadURL("http://localhost:5123/#chat"); + }, 750); + }); + + if (isDev()) { + void chatView.webContents.loadURL("http://localhost:5123/#chat"); + } else { + void chatView.webContents.loadFile(getUIPath(), { hash: "chat" }); + } + + mainWindow.on("resize", () => { + if (visible) applyBounds(); + }); + + return chatView; +} + +function formatExerciseTitle(exerciseId: string) { + return exerciseId + .split("-") + .filter(Boolean) + .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) + .join(" "); +} + +export function sendToChat( + channel: Key, + payload: IpcHandlerChannelMapping[Key], +) { + if (!chatView || chatView.webContents.isDestroyed()) return; + chatView.webContents.send(channel, payload); +} + +export async function showChat(exerciseId: string) { + if (!hostWindow) return; + getOrCreateChatView(hostWindow); + if (ready) { + await Promise.race([ + ready, + new Promise((resolve) => setTimeout(resolve, 2500)), + ]); + } + + currentSession = { + exerciseId, + exerciseTitle: formatExerciseTitle(exerciseId), + }; + + if (!visible) { + const { width, height } = contentSize(); + panel = clampPanel({ + x: 24, + y: 80, + width: DEFAULT_WIDTH, + height: Math.min(DEFAULT_HEIGHT, height - 104), + }); + // Keep the default from covering a very narrow window. + if (panel.x + panel.width > width - 24) { + panel.x = Math.max(VIEW_PAD, width - panel.width - 24); + } + } + + visible = true; + applyBounds(); + raiseView(); + sendToChat("chat-session", currentSession); +} + +export function hideChat() { + visible = false; + applyBounds(); +} + +export function setupChatViewIpc(mainWindow: BrowserWindow) { + hostWindow = mainWindow; + getOrCreateChatView(mainWindow); + + ipcMainHandle("chat-drag-begin", async () => { + const { width, height } = contentSize(); + if (chatView && visible) { + chatView.setBounds({ x: 0, y: 0, width, height }); + raiseView(); + } + return { + windowWidth: width, + windowHeight: height, + panel: { ...panel }, + }; + }); + + ipcMainHandle("chat-drag-end", async (rect) => { + panel = clampPanel(rect); + applyBounds(); + }); + + ipcMainOn("chat-close", () => { + hideChat(); + }); + + ipcMainHandle("get-chat-session", async () => currentSession); + + mainWindow.on("closed", () => { + chatView = null; + hostWindow = null; + visible = false; + currentSession = null; + ready = null; + }); +} diff --git a/src/electron/ipc/webContentsView.ts b/src/electron/ipc/webContentsView.ts index e7c80e2..93168ff 100644 --- a/src/electron/ipc/webContentsView.ts +++ b/src/electron/ipc/webContentsView.ts @@ -9,6 +9,8 @@ import { getWcvPreloadPath } from "../pathResolver.js"; import { startExercise, _verify } from "./gitmastery.js"; import { getMainWindow } from "../main.js"; import { sendToRenderer } from "./ipcUtils.js"; +import { hasApiKey } from "../aiKey.js"; +import { showChat } from "./chatView.js"; import { getAppliedResolvedTheme, registerThemeBackgroundTarget, @@ -243,6 +245,11 @@ function injectExerciseButtons(mainWindow: BrowserWindow) { const { exerciseId } = args[0] as { exerciseId: string }; console.log("[wcv] verify exercise clicked:", exerciseId); _verify(mainWindow, exerciseId); + } else if (channel === "wcv-ai-hints") { + const { exerciseId } = args[0] as { exerciseId: string }; + console.log("[wcv] ai hints clicked:", exerciseId); + if (!hasApiKey()) return; + void showChat(exerciseId); } }); @@ -268,6 +275,8 @@ function injectExerciseButtons(mainWindow: BrowserWindow) { var ICON_DOWNLOAD = ''; var ICON_CHECK = ''; + var ICON_SPARKLES = ''; + var AI_ENABLED = ${hasApiKey() ? "true" : "false"}; var BASE_STYLE = "display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:6px; font-size:14px; font-weight:500; font-family:Inter,system-ui,sans-serif; cursor:pointer; line-height:20px;"; @@ -284,6 +293,32 @@ function injectExerciseButtons(mainWindow: BrowserWindow) { btn.addEventListener("mouseleave", function () { btn.style.background = "transparent"; }); } + function styleSecondary(btn) { + var colors = isDark() + ? { text: "#dee2e6", border: "#495057", bg: "#212529", hoverBg: "#343a40" } + : { text: "#404040", border: "#d4d4d4", bg: "#fff", hoverBg: "#fafafa" }; + btn.style.cssText = BASE_STYLE + "background:" + colors.bg + "; color:" + colors.text + "; border:1px solid " + colors.border + ";"; + btn.addEventListener("mouseenter", function () { + if (btn.dataset.gmDisabled === "true") return; + btn.style.background = colors.hoverBg; + }); + btn.addEventListener("mouseleave", function () { btn.style.background = colors.bg; }); + } + + function applyAiButtonState(btn) { + var enabled = !!window.__gmAiEnabled; + btn.dataset.gmDisabled = enabled ? "false" : "true"; + btn.style.opacity = enabled ? "1" : "0.5"; + btn.style.cursor = enabled ? "pointer" : "not-allowed"; + btn.title = enabled ? "Ask for a hint on this exercise" : "Set up AI features in Settings first"; + } + + window.__gmAiEnabled = AI_ENABLED; + window.__gmSetAiEnabled = function (enabled) { + window.__gmAiEnabled = !!enabled; + document.querySelectorAll("[data-gm-ai-hints]").forEach(applyAiButtonState); + }; + function createStartButton(id, label) { var btn = document.createElement("button"); btn.innerHTML = ICON_DOWNLOAD + '' + (label || 'Start Exercise') + ''; @@ -304,6 +339,19 @@ function injectExerciseButtons(mainWindow: BrowserWindow) { return btn; } + function createAiHintsButton(id) { + var btn = document.createElement("button"); + btn.setAttribute("data-gm-ai-hints", "true"); + btn.innerHTML = ICON_SPARKLES + 'AI Hints for this exercise'; + styleSecondary(btn); + applyAiButtonState(btn); + btn.addEventListener("click", function () { + if (!window.__gmAiEnabled) return; + window.wcvBridge.send("wcv-ai-hints", { exerciseId: id }); + }); + return btn; + } + /** * Removes the old download-info divs (their button now lives * alongside Verify) and replaces each verify-info div with both @@ -375,9 +423,10 @@ function injectExerciseButtons(mainWindow: BrowserWindow) { document.querySelectorAll('div[id^="ex-verify-info-"]').forEach(function (el) { var id = el.id.replace("ex-verify-info-", ""); var container = document.createElement("div"); - container.style.cssText = "display:flex; align-items:center; gap:8px; margin-top:12px; padding-bottom:20px;"; + container.style.cssText = "display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:12px; padding-bottom:20px;"; container.appendChild(createStartButton(id)); container.appendChild(createVerifyButton(id)); + container.appendChild(createAiHintsButton(id)); el.replaceWith(container); }); @@ -465,6 +514,38 @@ function injectExerciseButtons(mainWindow: BrowserWindow) { wcv.webContents.addListener("dom-ready", handler); return () => wcv.webContents.removeListener("dom-ready", handler); } + +export function setAiHintsEnabled(enabled: boolean) { + if (!wcv || wcv.webContents.isDestroyed()) return; + void wcv.webContents + .executeJavaScript( + `if (typeof window.__gmSetAiEnabled === "function") window.__gmSetAiEnabled(${enabled ? "true" : "false"});`, + ) + .catch(() => {}); +} + +export async function getExerciseText( + exerciseId: string, +): Promise { + if (!wcv || wcv.webContents.isDestroyed()) return null; + try { + const text = await wcv.webContents.executeJavaScript(` + (function () { + var el = document.getElementById(${JSON.stringify("exercise-" + exerciseId)}); + if (!el) return null; + var card = el.closest(".card"); + var body = card && card.querySelector(".card-body"); + if (body && body.innerText) return body.innerText; + return el.innerText || null; + })() + `); + return typeof text === "string" && text.trim() ? text.trim() : null; + } catch (err) { + console.warn("[wcv] failed to scrape exercise text:", err); + return null; + } +} + export function setupWebContentsViewIpc(mainWindow: BrowserWindow) { registerThemeBackgroundTarget((color) => { wcv?.setBackgroundColor(color); diff --git a/src/electron/main.ts b/src/electron/main.ts index 1e3755c..8386d36 100644 --- a/src/electron/main.ts +++ b/src/electron/main.ts @@ -7,6 +7,8 @@ import { setupGitmasteryIpc } from "./ipc/gitmastery.js"; import { setupWebContentsViewIpc } from "./ipc/webContentsView.js"; import { setupConfigIpc } from "./ipc/config.js"; import { setupPrereqIpc } from "./ipc/setupPrereq.js"; +import { setupChatViewIpc } from "./ipc/chatView.js"; +import { setupAiIpc } from "./ipc/ai.js"; import { setupStartPrereqIpc } from "./startPrereqs.js"; import { readStoredThemePreference, @@ -43,6 +45,8 @@ app.on("ready", () => { setupConfigIpc(mainWindow); setupPrereqIpc(); setupStartPrereqIpc(); + setupChatViewIpc(mainWindow); + setupAiIpc(); console.log("isDev: ", isDev()); if (isDev()) { diff --git a/src/electron/preload.cts b/src/electron/preload.cts index 8ce1f71..fa7d7c2 100644 --- a/src/electron/preload.cts +++ b/src/electron/preload.cts @@ -58,6 +58,34 @@ contextBridge.exposeInMainWorld("electron", { // Shell openExternal: (url: string) => ipcSend("open-external", { url }), + + // OpenRouter key + setOpenRouterKey: (key: string) => ipcInvoke("set-openrouter-key", { key }), + getOpenRouterKey: () => ipcInvoke("get-openrouter-key", null), + hasOpenRouterKey: () => ipcInvoke("has-openrouter-key", null), + clearOpenRouterKey: () => ipcInvoke("clear-openrouter-key", null), + validateOpenRouterKey: (key?: string) => + ipcInvoke("validate-openrouter-key", { key }), + + // AI hints chat + chatDragBegin: () => ipcInvoke("chat-drag-begin", null), + chatDragEnd: (rect: ChatPanelRect) => ipcInvoke("chat-drag-end", rect), + chatClose: () => ipcSend("chat-close", null), + getChatSession: () => ipcInvoke("get-chat-session", null), + onChatSession: (callback: (session: ChatSession) => void) => + ipcOn("chat-session", callback), + + // AI SDK UI message stream + aiChatStart: (payload: { + streamId: string; + exerciseId: string; + messages: GitMasteryUIMessage[]; + }) => ipcInvoke("ai-chat-start", payload), + aiChatAbort: (streamId: string) => ipcSend("ai-chat-abort", { streamId }), + onAiChatChunk: (callback: (streamId: string, chunk: AiChatChunk) => void) => + ipcOn("ai-chat-chunk", ({ streamId, chunk }) => callback(streamId, chunk)), + onAiChatEnd: (callback: (streamId: string) => void) => + ipcOn("ai-chat-end", ({ streamId }) => callback(streamId)), } satisfies Window["electron"]); // Note: you canNOT import external files into the preload script, due to Electron sandboxing diff --git a/src/electron/storage.ts b/src/electron/storage.ts index 64e692f..0886596 100644 --- a/src/electron/storage.ts +++ b/src/electron/storage.ts @@ -14,6 +14,10 @@ interface Config { theme?: SitePageTheme; /** Parent folder chosen by older builds. Migrated to `exercisesRoot` on read. */ dataDirectory?: string; + /** OpenRouter API key encrypted with Electron safeStorage, as base64. */ + openRouterApiKeyEnc?: string; + /** Plaintext fallback when safeStorage encryption is unavailable. */ + openRouterApiKeyPlain?: string; } const appBasePath = app.getPath("userData"); diff --git a/src/electron/utils/util.ts b/src/electron/utils/util.ts index 89a14b9..769f6f2 100644 --- a/src/electron/utils/util.ts +++ b/src/electron/utils/util.ts @@ -32,7 +32,9 @@ export function validateEventFrame(frame: WebFrameMain) { if (isDev() && new URL(frame.url).host === "localhost:5123") { return; } - if (frame.url !== pathToFileURL(getUIPath()).toString()) { + const incoming = frame.url.split("#")[0].split("?")[0]; + const expected = pathToFileURL(getUIPath()).toString().split("#")[0]; + if (incoming !== expected) { throw new Error("Malicious event"); } } diff --git a/src/ui/ai/IpcChatTransport.ts b/src/ui/ai/IpcChatTransport.ts new file mode 100644 index 0000000..9b41c7b --- /dev/null +++ b/src/ui/ai/IpcChatTransport.ts @@ -0,0 +1,111 @@ +import type { ChatTransport, UIMessageChunk } from "ai"; + +function nextStreamId() { + return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`; +} + +/** + * Bridges `useChat` to the Electron main process. + * + * The OpenRouter key never leaves main, so there is no HTTP endpoint for + * `DefaultChatTransport` to post to. Main runs `streamText` and pushes the AI + * SDK's own UI message chunks over IPC; this reassembles them into the + * `ReadableStream` the transport contract expects. Swapping in a real endpoint + * later means swapping this class, and nothing else. + */ +export class IpcChatTransport implements ChatTransport { + /** + * Held as a ref rather than a value so switching exercises does not rebuild + * the transport and orphan an in-flight stream. + */ + private readonly exerciseIdRef: { current: string | null }; + + constructor(exerciseIdRef: { current: string | null }) { + this.exerciseIdRef = exerciseIdRef; + } + + sendMessages({ + messages, + abortSignal, + }: Parameters< + ChatTransport["sendMessages"] + >[0]): Promise> { + const exerciseId = this.exerciseIdRef.current; + if (!exerciseId) { + return Promise.reject(new Error("No exercise is selected.")); + } + + const streamId = nextStreamId(); + let finish: () => void = () => {}; + + const stream = new ReadableStream({ + start: async (controller) => { + let done = false; + const cleanups: (() => void)[] = []; + + finish = () => { + if (done) return; + done = true; + for (const cleanup of cleanups) cleanup(); + try { + controller.close(); + } catch { + // Already closed by a cancelled reader. + } + }; + + // Subscribe before starting the turn so no early chunk is dropped. + cleanups.push( + window.electron.onAiChatChunk((id, chunk) => { + if (id !== streamId || done) return; + controller.enqueue(chunk); + }), + ); + cleanups.push( + window.electron.onAiChatEnd((id) => { + if (id === streamId) finish(); + }), + ); + + if (abortSignal) { + const onAbort = () => { + window.electron.aiChatAbort(streamId); + finish(); + }; + if (abortSignal.aborted) { + onAbort(); + return; + } + abortSignal.addEventListener("abort", onAbort); + cleanups.push(() => + abortSignal.removeEventListener("abort", onAbort), + ); + } + + const result = await window.electron.aiChatStart({ + streamId, + exerciseId, + messages, + }); + + // Surfaced as a stream error rather than a rejected promise so a + // missing key reads as a message in the thread, not a thrown dialog. + if (!result.ok && !done) { + controller.enqueue({ type: "error", errorText: result.error }); + finish(); + } + }, + cancel: () => { + window.electron.aiChatAbort(streamId); + finish(); + }, + }); + + return Promise.resolve(stream); + } + + reconnectToStream(): Promise | null> { + // Streams live only as long as the panel; there is nothing to resume. + return Promise.resolve(null); + } +} diff --git a/src/ui/components/Chat/Composer.tsx b/src/ui/components/Chat/Composer.tsx new file mode 100644 index 0000000..4dee599 --- /dev/null +++ b/src/ui/components/Chat/Composer.tsx @@ -0,0 +1,104 @@ +import { useEffect, useRef, useState } from "react"; +import { IconArrowUp, IconPlayerStopFilled } from "@tabler/icons-react"; +import { cx } from "../../utils/cx"; + +const MAX_HEIGHT = 132; + +type ComposerProps = { + disabled?: boolean; + busy?: boolean; + placeholder?: string; + onSend: (text: string) => void; + onStop: () => void; +}; + +/** + * Single rounded field with the action tucked inside, the shape people expect + * from a chat composer. Built on the house input recipe rather than on + * AI Elements' PromptInput, which carries attachments, screenshot capture, and + * a model picker that a hints panel has no use for. + */ +export const Composer = ({ + disabled = false, + busy = false, + placeholder = "Ask for a hint…", + onSend, + onStop, +}: ComposerProps) => { + const [value, setValue] = useState(""); + const textareaRef = useRef(null); + + useEffect(() => { + const textarea = textareaRef.current; + if (!textarea) return; + textarea.style.height = "auto"; + textarea.style.height = `${Math.min(textarea.scrollHeight, MAX_HEIGHT)}px`; + }, [value]); + + const submit = () => { + const text = value.trim(); + if (!text || busy || disabled) return; + setValue(""); + onSend(text); + }; + + const canSend = Boolean(value.trim()) && !disabled; + + return ( +
{ + event.preventDefault(); + submit(); + }} + > +