diff --git a/docs/app/[[...mdxPath]]/page.jsx b/docs/app/[[...mdxPath]]/page.jsx new file mode 100644 index 00000000..fbf1101e --- /dev/null +++ b/docs/app/[[...mdxPath]]/page.jsx @@ -0,0 +1,25 @@ +import { generateStaticParamsFor, importPage } from 'nextra/pages'; + +import { useMDXComponents } from '../../mdx-components'; + +export const generateStaticParams = generateStaticParamsFor('mdxPath'); + +export async function generateMetadata(props) { + const params = await props.params; + const { metadata } = await importPage(params?.mdxPath); + return metadata; +} + +const Wrapper = useMDXComponents().wrapper; + +export default async function Page(props) { + const params = await props.params; + const result = await importPage(params?.mdxPath); + const { default: MDXContent, metadata, sourceCode, toc } = result; + + return ( + + + + ); +} diff --git a/docs/app/layout.jsx b/docs/app/layout.jsx new file mode 100644 index 00000000..85911381 --- /dev/null +++ b/docs/app/layout.jsx @@ -0,0 +1,86 @@ +import Image from 'next/image'; +import { Analytics } from '@vercel/analytics/react'; +import { Banner, Head } from 'nextra/components'; +import { getPageMap } from 'nextra/page-map'; +import { Footer, Layout, Navbar } from 'nextra-theme-docs'; +import 'nextra-theme-docs/style.css'; + +import CuteLogo from '../public/cute-docsgpt.png'; +import themeConfig from '../theme.config'; + +const github = 'https://github.com/arc53/DocsGPT'; + +export const metadata = { + title: { + default: 'DocsGPT Documentation', + template: '%s - DocsGPT Documentation', + }, + description: + 'Use DocsGPT to chat with your data. DocsGPT is a GPT-powered chatbot that can answer questions about your data.', +}; + +const navbar = ( + + DocsGPT logo + DocsGPT Docs + + } + projectLink={github} + chatLink="https://discord.com/invite/n5BX8dh8rU" + /> +); + +const footer = ( + +); + +export default async function RootLayout({ children }) { + return ( + + + + + + + + + + +
+ Welcome to the new DocsGPT docs! +
+ + } + navbar={navbar} + footer={footer} + pageMap={await getPageMap()} + {...themeConfig} + > + {children} +
+ + + + ); +} diff --git a/docs/components/DeploymentCards.jsx b/docs/components/DeploymentCards.jsx index 1f91c171..5f2cf7c1 100644 --- a/docs/components/DeploymentCards.jsx +++ b/docs/components/DeploymentCards.jsx @@ -1,3 +1,5 @@ +'use client'; + import Image from 'next/image'; const iconMap = { @@ -117,4 +119,4 @@ export function DeploymentCards({ items }) { `} ); -} \ No newline at end of file +} diff --git a/docs/components/ToolCards.jsx b/docs/components/ToolCards.jsx index a7932c4c..edf73ae6 100644 --- a/docs/components/ToolCards.jsx +++ b/docs/components/ToolCards.jsx @@ -1,3 +1,5 @@ +'use client'; + import Image from 'next/image'; const iconMap = { @@ -114,4 +116,4 @@ export function ToolCards({ items }) { `} ); -} \ No newline at end of file +} diff --git a/docs/pages/Agents/_meta.js b/docs/content/Agents/_meta.js similarity index 100% rename from docs/pages/Agents/_meta.js rename to docs/content/Agents/_meta.js diff --git a/docs/content/Agents/api.mdx b/docs/content/Agents/api.mdx new file mode 100644 index 00000000..5b1313dd --- /dev/null +++ b/docs/content/Agents/api.mdx @@ -0,0 +1,342 @@ +--- +title: Interacting with Agents via API +description: Learn how to programmatically interact with DocsGPT Agents using the streaming and non-streaming API endpoints. +--- + +import { Callout, Tabs } from 'nextra/components'; + +# Interacting with Agents via API + +DocsGPT Agents can be accessed programmatically through API endpoints. This page covers: + +- Non-streaming answers (`/api/answer`) +- Streaming answers over SSE (`/stream`) +- File/image attachments (`/api/store_attachment` + `/api/task_status` + `/stream`) + +When you use an agent `api_key`, DocsGPT loads that agent's configuration automatically (prompt, tools, sources, default model). You usually only need to send `question` and `api_key`. + +## Base URL + + +For DocsGPT Cloud, use `https://gptcloud.arc53.com` as the base URL. + + +- Local: `http://localhost:7091` +- Cloud: `https://gptcloud.arc53.com` + +## How Request Resolution Works + +DocsGPT resolves your request in this order: + +1. If `api_key` is provided, DocsGPT loads the mapped agent and executes with that config. +2. If `agent_id` is provided (typically with JWT auth), DocsGPT loads that agent if allowed. +3. If neither is provided, DocsGPT uses request-level fields (`prompt_id`, `active_docs`, `retriever`, etc.). + +Authentication: + +- Agent API-key flow: include `api_key` in JSON/form payload. +- JWT flow (if auth enabled): include `Authorization: Bearer `. + +## Endpoints + +- `POST /api/answer` (non-streaming) +- `POST /stream` (SSE streaming) +- `POST /api/store_attachment` (multipart upload) +- `GET /api/task_status?task_id=...` (Celery task polling) + +## Request Parameters + +Common request body fields: + +| Field | Type | Required | Applies to | Notes | +| --- | --- | --- | --- | --- | +| `question` | `string` | Yes | `/api/answer`, `/stream` | User query. | +| `api_key` | `string` | Usually | `/api/answer`, `/stream` | Recommended for agent API use. Loads agent config from key. | +| `conversation_id` | `string` | No | `/api/answer`, `/stream` | Continue an existing conversation. | +| `history` | `string` (JSON-encoded array) | No | `/api/answer`, `/stream` | Used for new conversations. Format: `[{\"prompt\":\"...\",\"response\":\"...\"}]`. | +| `model_id` | `string` | No | `/api/answer`, `/stream` | Override model for this request. | +| `save_conversation` | `boolean` | No | `/api/answer`, `/stream` | Default `true`. If `false`, no conversation is persisted. | +| `passthrough` | `object` | No | `/api/answer`, `/stream` | Dynamic values injected into prompt templates. | +| `prompt_id` | `string` | No | `/api/answer`, `/stream` | Ignored when `api_key` already defines prompt. | +| `active_docs` | `string` or `string[]` | No | `/api/answer`, `/stream` | Overrides active docs when not using key-owned source config. | +| `retriever` | `string` | No | `/api/answer`, `/stream` | Retriever type (for example `classic`). | +| `chunks` | `number` | No | `/api/answer`, `/stream` | Retrieval chunk count, default `2`. | +| `isNoneDoc` | `boolean` | No | `/api/answer`, `/stream` | Skip document retrieval. | +| `agent_id` | `string` | No | `/api/answer`, `/stream` | Alternative to `api_key` when using authenticated user context. | + +Streaming-only fields: + +| Field | Type | Required | Notes | +| --- | --- | --- | --- | +| `attachments` | `string[]` | No | List of attachment IDs from `/api/task_status` success result. | +| `index` | `number` | No | Update an existing query index. If provided, `conversation_id` is required. | + +## Non-Streaming API (`/api/answer`) + +`/api/answer` waits for completion and returns one JSON response. + + +`attachments` are currently handled through `/stream`. For file/image-attached queries, use the streaming endpoint. + + +Response fields: + +- `conversation_id` +- `answer` +- `sources` +- `tool_calls` +- `thought` +- Optional structured output metadata (`structured`, `schema`) when enabled + +### Examples + + + + ```bash + curl -X POST http://localhost:7091/api/answer \ + -H "Content-Type: application/json" \ + -d '{"question":"your question here","api_key":"your_agent_api_key"}' + ``` + + + ```python + import requests + + API_URL = "http://localhost:7091/api/answer" + API_KEY = "your_agent_api_key" + QUESTION = "your question here" + + response = requests.post( + API_URL, + json={"question": QUESTION, "api_key": API_KEY} + ) + + if response.status_code == 200: + print(response.json()) + else: + print(f"Error: {response.status_code}") + print(response.text) + ``` + + + ```javascript + const apiUrl = 'http://localhost:7091/api/answer'; + const apiKey = 'your_agent_api_key'; + const question = 'your question here'; + + async function getAnswer() { + try { + const response = await fetch(apiUrl, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ question, api_key: apiKey }), + }); + + if (!response.ok) { + throw new Error(`HTTP error! Status: ${response.status}`); + } + + const data = await response.json(); + console.log(data); + } catch (error) { + console.error("Failed to fetch answer:", error); + } + } + + getAnswer(); + ``` + + + +--- + +## Streaming API (`/stream`) + +`/stream` returns a Server-Sent Events (SSE) stream so you can render output token-by-token. + +### SSE Event Types + +Each `data:` frame is JSON with `type`: + +- `answer`: incremental answer chunk +- `source`: source list/chunks +- `tool_calls`: tool invocation results/metadata +- `thought`: reasoning/thought chunk (agent dependent) +- `structured_answer`: final structured payload (when schema mode is active) +- `id`: final conversation ID +- `error`: error message +- `end`: stream is complete + +### Examples + + + + ```bash + curl -X POST http://localhost:7091/stream \ + -H "Content-Type: application/json" \ + -H "Accept: text/event-stream" \ + -d '{"question":"your question here","api_key":"your_agent_api_key"}' + ``` + + + ```python + import requests + import json + + API_URL = "http://localhost:7091/stream" + payload = { + "question": "your question here", + "api_key": "your_agent_api_key" + } + + with requests.post(API_URL, json=payload, stream=True) as r: + for line in r.iter_lines(): + if line: + decoded_line = line.decode('utf-8') + if decoded_line.startswith('data: '): + try: + data = json.loads(decoded_line[6:]) + print(data) + except json.JSONDecodeError: + pass + ``` + + + ```javascript + const apiUrl = 'http://localhost:7091/stream'; + const apiKey = 'your_agent_api_key'; + const question = 'your question here'; + + async function getStream() { + try { + const response = await fetch(apiUrl, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'Accept': 'text/event-stream' + }, + body: JSON.stringify({ question, api_key: apiKey }), + }); + + if (!response.ok) { + throw new Error(`HTTP error! Status: ${response.status}`); + } + + const reader = response.body.getReader(); + const decoder = new TextDecoder(); + + while (true) { + const { done, value } = await reader.read(); + if (done) break; + + const chunk = decoder.decode(value, { stream: true }); + // Note: This parsing method assumes each chunk contains whole lines. + // For a more robust production implementation, buffer the chunks + // and process them line by line. + const lines = chunk.split('\n'); + + for (const line of lines) { + if (line.startsWith('data: ')) { + try { + const data = JSON.parse(line.substring(6)); + console.log(data); + } catch (e) { + console.error("Failed to parse JSON from SSE event:", e); + } + } + } + } + } catch (error) { + console.error("Failed to fetch stream:", error); + } + } + + getStream(); + ``` + + + +--- + +## Attachments API (Including Images) + +To attach an image (or other file) to a query: + +1. Upload file(s) to `/api/store_attachment` (multipart/form-data). +2. Poll `/api/task_status` until `status=SUCCESS`. +3. Read `result.attachment_id` from task result. +4. Send that ID in `/stream` as `attachments: ["..."]`. + + +Attachments are processed asynchronously. Do not call `/stream` with an attachment until its task has finished with `SUCCESS`. + + +### Step 1: Upload Attachment + +`POST /api/store_attachment` + +- Content type: `multipart/form-data` +- Form fields: + - `file` (required, can be repeated for multi-file upload) + - `api_key` (optional if JWT is present; useful for API-key-only flows) + +Example upload (single image): + +```bash +curl -X POST http://localhost:7091/api/store_attachment \ + -F "file=@/absolute/path/to/image.png" \ + -F "api_key=your_agent_api_key" +``` + +Possible response (single-file upload): + +```json +{ + "success": true, + "task_id": "34f1cb56-7c7f-4d5f-a973-4ea7e65f7a10", + "message": "File uploaded successfully. Processing started." +} +``` + +### Step 2: Poll Task Status + +```bash +curl "http://localhost:7091/api/task_status?task_id=34f1cb56-7c7f-4d5f-a973-4ea7e65f7a10" +``` + +When complete: + +```json +{ + "status": "SUCCESS", + "result": { + "attachment_id": "67b4f8f2618dc9f19384a9e1", + "filename": "image.png", + "mime_type": "image/png" + } +} +``` + +### Step 3: Attach to `/stream` Request + +Use the `attachment_id` in `attachments`. + +```bash +curl -X POST http://localhost:7091/stream \ + -H "Content-Type: application/json" \ + -H "Accept: text/event-stream" \ + -d '{ + "question": "Describe this image", + "api_key": "your_agent_api_key", + "attachments": ["67b4f8f2618dc9f19384a9e1"] + }' +``` + +### Image/Attachment Behavior Notes + +- Typical image MIME types supported for native vision flows: `image/png`, `image/jpeg`, `image/jpg`, `image/webp`, `image/gif`. +- If the selected model/provider does not support a file type natively, DocsGPT falls back to parsed text content. +- For providers that support images but not native PDF file attachments, DocsGPT can convert PDF pages to images (synthetic PDF support). +- Attachments are user-scoped. Upload and query must be done under the same user context (same API key owner or same JWT user). diff --git a/docs/pages/Agents/basics.mdx b/docs/content/Agents/basics.mdx similarity index 100% rename from docs/pages/Agents/basics.mdx rename to docs/content/Agents/basics.mdx diff --git a/docs/pages/Agents/nodes.mdx b/docs/content/Agents/nodes.mdx similarity index 100% rename from docs/pages/Agents/nodes.mdx rename to docs/content/Agents/nodes.mdx diff --git a/docs/pages/Agents/webhooks.mdx b/docs/content/Agents/webhooks.mdx similarity index 100% rename from docs/pages/Agents/webhooks.mdx rename to docs/content/Agents/webhooks.mdx diff --git a/docs/pages/Deploying/Amazon-Lightsail.mdx b/docs/content/Deploying/Amazon-Lightsail.mdx similarity index 100% rename from docs/pages/Deploying/Amazon-Lightsail.mdx rename to docs/content/Deploying/Amazon-Lightsail.mdx diff --git a/docs/pages/Deploying/Development-Environment.mdx b/docs/content/Deploying/Development-Environment.mdx similarity index 100% rename from docs/pages/Deploying/Development-Environment.mdx rename to docs/content/Deploying/Development-Environment.mdx diff --git a/docs/pages/Deploying/Docker-Deploying.mdx b/docs/content/Deploying/Docker-Deploying.mdx similarity index 100% rename from docs/pages/Deploying/Docker-Deploying.mdx rename to docs/content/Deploying/Docker-Deploying.mdx diff --git a/docs/pages/Deploying/DocsGPT-Settings.mdx b/docs/content/Deploying/DocsGPT-Settings.mdx similarity index 100% rename from docs/pages/Deploying/DocsGPT-Settings.mdx rename to docs/content/Deploying/DocsGPT-Settings.mdx diff --git a/docs/pages/Deploying/Hosting-the-app.mdx b/docs/content/Deploying/Hosting-the-app.mdx similarity index 100% rename from docs/pages/Deploying/Hosting-the-app.mdx rename to docs/content/Deploying/Hosting-the-app.mdx diff --git a/docs/pages/Deploying/Kubernetes-Deploying.mdx b/docs/content/Deploying/Kubernetes-Deploying.mdx similarity index 100% rename from docs/pages/Deploying/Kubernetes-Deploying.mdx rename to docs/content/Deploying/Kubernetes-Deploying.mdx diff --git a/docs/pages/Deploying/Railway.mdx b/docs/content/Deploying/Railway.mdx similarity index 100% rename from docs/pages/Deploying/Railway.mdx rename to docs/content/Deploying/Railway.mdx diff --git a/docs/pages/Deploying/_meta.js b/docs/content/Deploying/_meta.js similarity index 100% rename from docs/pages/Deploying/_meta.js rename to docs/content/Deploying/_meta.js diff --git a/docs/pages/Extensions/Chatwoot-extension.mdx b/docs/content/Extensions/Chatwoot-extension.mdx similarity index 100% rename from docs/pages/Extensions/Chatwoot-extension.mdx rename to docs/content/Extensions/Chatwoot-extension.mdx diff --git a/docs/pages/Extensions/Chrome-extension.mdx b/docs/content/Extensions/Chrome-extension.mdx similarity index 100% rename from docs/pages/Extensions/Chrome-extension.mdx rename to docs/content/Extensions/Chrome-extension.mdx diff --git a/docs/pages/Extensions/_meta.js b/docs/content/Extensions/_meta.js similarity index 100% rename from docs/pages/Extensions/_meta.js rename to docs/content/Extensions/_meta.js diff --git a/docs/pages/Extensions/api-key-guide.mdx b/docs/content/Extensions/api-key-guide.mdx similarity index 100% rename from docs/pages/Extensions/api-key-guide.mdx rename to docs/content/Extensions/api-key-guide.mdx diff --git a/docs/pages/Extensions/chat-widget.mdx b/docs/content/Extensions/chat-widget.mdx similarity index 100% rename from docs/pages/Extensions/chat-widget.mdx rename to docs/content/Extensions/chat-widget.mdx diff --git a/docs/pages/Extensions/search-widget.mdx b/docs/content/Extensions/search-widget.mdx similarity index 100% rename from docs/pages/Extensions/search-widget.mdx rename to docs/content/Extensions/search-widget.mdx diff --git a/docs/pages/Guides/Architecture.mdx b/docs/content/Guides/Architecture.mdx similarity index 100% rename from docs/pages/Guides/Architecture.mdx rename to docs/content/Guides/Architecture.mdx diff --git a/docs/pages/Guides/Customising-prompts.mdx b/docs/content/Guides/Customising-prompts.mdx similarity index 100% rename from docs/pages/Guides/Customising-prompts.mdx rename to docs/content/Guides/Customising-prompts.mdx diff --git a/docs/pages/Guides/How-to-train-on-other-documentation.mdx b/docs/content/Guides/How-to-train-on-other-documentation.mdx similarity index 100% rename from docs/pages/Guides/How-to-train-on-other-documentation.mdx rename to docs/content/Guides/How-to-train-on-other-documentation.mdx diff --git a/docs/pages/Guides/How-to-use-different-LLM.mdx b/docs/content/Guides/How-to-use-different-LLM.mdx similarity index 100% rename from docs/pages/Guides/How-to-use-different-LLM.mdx rename to docs/content/Guides/How-to-use-different-LLM.mdx diff --git a/docs/pages/Guides/Integrations/_meta.js b/docs/content/Guides/Integrations/_meta.js similarity index 100% rename from docs/pages/Guides/Integrations/_meta.js rename to docs/content/Guides/Integrations/_meta.js diff --git a/docs/pages/Guides/Integrations/google-drive-connector.mdx b/docs/content/Guides/Integrations/google-drive-connector.mdx similarity index 100% rename from docs/pages/Guides/Integrations/google-drive-connector.mdx rename to docs/content/Guides/Integrations/google-drive-connector.mdx diff --git a/docs/pages/Guides/My-AI-answers-questions-using-external-knowledge.mdx b/docs/content/Guides/My-AI-answers-questions-using-external-knowledge.mdx similarity index 100% rename from docs/pages/Guides/My-AI-answers-questions-using-external-knowledge.mdx rename to docs/content/Guides/My-AI-answers-questions-using-external-knowledge.mdx diff --git a/docs/pages/Guides/_meta.js b/docs/content/Guides/_meta.js similarity index 100% rename from docs/pages/Guides/_meta.js rename to docs/content/Guides/_meta.js diff --git a/docs/pages/Guides/compression.md b/docs/content/Guides/compression.md similarity index 100% rename from docs/pages/Guides/compression.md rename to docs/content/Guides/compression.md diff --git a/docs/pages/Guides/ocr.mdx b/docs/content/Guides/ocr.mdx similarity index 100% rename from docs/pages/Guides/ocr.mdx rename to docs/content/Guides/ocr.mdx diff --git a/docs/pages/Models/_meta.js b/docs/content/Models/_meta.js similarity index 100% rename from docs/pages/Models/_meta.js rename to docs/content/Models/_meta.js diff --git a/docs/pages/Models/cloud-providers.mdx b/docs/content/Models/cloud-providers.mdx similarity index 100% rename from docs/pages/Models/cloud-providers.mdx rename to docs/content/Models/cloud-providers.mdx diff --git a/docs/pages/Models/embeddings.md b/docs/content/Models/embeddings.md similarity index 100% rename from docs/pages/Models/embeddings.md rename to docs/content/Models/embeddings.md diff --git a/docs/pages/Models/local-inference.mdx b/docs/content/Models/local-inference.mdx similarity index 100% rename from docs/pages/Models/local-inference.mdx rename to docs/content/Models/local-inference.mdx diff --git a/docs/pages/Tools/_meta.js b/docs/content/Tools/_meta.js similarity index 100% rename from docs/pages/Tools/_meta.js rename to docs/content/Tools/_meta.js diff --git a/docs/pages/Tools/api-tool.mdx b/docs/content/Tools/api-tool.mdx similarity index 100% rename from docs/pages/Tools/api-tool.mdx rename to docs/content/Tools/api-tool.mdx diff --git a/docs/pages/Tools/basics.mdx b/docs/content/Tools/basics.mdx similarity index 100% rename from docs/pages/Tools/basics.mdx rename to docs/content/Tools/basics.mdx diff --git a/docs/pages/Tools/creating-a-tool.mdx b/docs/content/Tools/creating-a-tool.mdx similarity index 100% rename from docs/pages/Tools/creating-a-tool.mdx rename to docs/content/Tools/creating-a-tool.mdx diff --git a/docs/pages/_meta.js b/docs/content/_meta.js similarity index 84% rename from docs/pages/_meta.js rename to docs/content/_meta.js index 58e4f900..96206313 100644 --- a/docs/pages/_meta.js +++ b/docs/content/_meta.js @@ -8,8 +8,7 @@ export default { "Extensions": "Extensions", "https://gptcloud.arc53.com/": { "title": "API", - "href": "https://gptcloud.arc53.com/", - "newWindow": true + "href": "https://gptcloud.arc53.com/" }, "Guides": "Guides", "changelog": { diff --git a/docs/pages/changelog.mdx b/docs/content/changelog.mdx similarity index 100% rename from docs/pages/changelog.mdx rename to docs/content/changelog.mdx diff --git a/docs/pages/index.mdx b/docs/content/index.mdx similarity index 100% rename from docs/pages/index.mdx rename to docs/content/index.mdx diff --git a/docs/pages/quickstart.mdx b/docs/content/quickstart.mdx similarity index 100% rename from docs/pages/quickstart.mdx rename to docs/content/quickstart.mdx diff --git a/docs/mdx-components.jsx b/docs/mdx-components.jsx new file mode 100644 index 00000000..b3823cab --- /dev/null +++ b/docs/mdx-components.jsx @@ -0,0 +1,8 @@ +import { useMDXComponents as getThemeComponents } from 'nextra-theme-docs'; + +export function useMDXComponents(components) { + return { + ...getThemeComponents(), + ...components, + }; +} diff --git a/docs/next.config.js b/docs/next.config.js index 8c94697a..62ad557e 100644 --- a/docs/next.config.js +++ b/docs/next.config.js @@ -1,9 +1,9 @@ -const withNextra = require('nextra').default({ - theme: 'nextra-theme-docs', - themeConfig: './theme.config.jsx' -}) +const nextra = require('nextra').default; -module.exports = withNextra() - -// If you have other Next.js configurations, you can pass them as the parameter: -// module.exports = withNextra({ /* other next.js config */ }) +const withNextra = nextra({ + // Nextra v4 config lives in app/layout + theme.config.jsx +}); + +module.exports = withNextra({ + reactStrictMode: true, +}); diff --git a/docs/package-lock.json b/docs/package-lock.json index ecbc56e6..eeadc457 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -9,8 +9,8 @@ "@vercel/analytics": "^1.1.1", "docsgpt-react": "^0.5.1", "next": "^15.5.9", - "nextra": "^3.3.1", - "nextra-theme-docs": "^3.3.1", + "nextra": "^4.6.1", + "nextra-theme-docs": "^4.6.1", "react": "^18.2.0", "react-dom": "^18.2.0" }, @@ -477,12 +477,12 @@ "license": "MIT" }, "node_modules/@formatjs/intl-localematcher": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.10.tgz", - "integrity": "sha512-af3qATX+m4Rnd9+wHcjJ4w2ijq+rAVP3CCinJQvFv1kgSu1W6jypUmvleJxcewdxmutM8dmIRZFxO/IQBZmP2Q==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.6.2.tgz", + "integrity": "sha512-XOMO2Hupl0wdd172Y06h6kLpBz6Dv+J4okPLl4LPtzbr8f66WbIoy4ev98EBuZ6ZK4h5ydTN6XneT4QVpD7cdA==", "license": "MIT", "dependencies": { - "tslib": "2" + "tslib": "^2.8.0" } }, "node_modules/@headlessui/react": { @@ -1163,23 +1163,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/@mdx-js/react": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.1.tgz", - "integrity": "sha512-f++rKLQgUVYDAtECQ6fn/is15GkEH9+nZPM3MS0RcxVqoTfawHvDlSCH7JbMhAM6uJ32v3eXLvLmLvjGu7PTQw==", - "license": "MIT", - "dependencies": { - "@types/mdx": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - }, - "peerDependencies": { - "@types/react": ">=16", - "react": ">=16" - } - }, "node_modules/@mermaid-js/parser": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-1.0.0.tgz", @@ -1594,6 +1577,41 @@ "node": ">= 10" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@parcel/cache": { "version": "2.12.0", "resolved": "https://registry.npmjs.org/@parcel/cache/-/cache-2.12.0.tgz", @@ -2591,76 +2609,77 @@ } }, "node_modules/@shikijs/core": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.29.2.tgz", - "integrity": "sha512-vju0lY9r27jJfOY4Z7+Rt/nIOjzJpZ3y+nYpqtUZInVoXQ/TJZcfGnNOGnKjFdVZb8qexiCuSlZRKcGfhhTTZQ==", + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-3.22.0.tgz", + "integrity": "sha512-iAlTtSDDbJiRpvgL5ugKEATDtHdUVkqgHDm/gbD2ZS9c88mx7G1zSYjjOxp5Qa0eaW0MAQosFRmJSk354PRoQA==", "license": "MIT", "dependencies": { - "@shikijs/engine-javascript": "1.29.2", - "@shikijs/engine-oniguruma": "1.29.2", - "@shikijs/types": "1.29.2", - "@shikijs/vscode-textmate": "^10.0.1", + "@shikijs/types": "3.22.0", + "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", - "hast-util-to-html": "^9.0.4" + "hast-util-to-html": "^9.0.5" } }, "node_modules/@shikijs/engine-javascript": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.29.2.tgz", - "integrity": "sha512-iNEZv4IrLYPv64Q6k7EPpOCE/nuvGiKl7zxdq0WFuRPF5PAE9PRo2JGq/d8crLusM59BRemJ4eOqrFrC4wiQ+A==", + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-3.22.0.tgz", + "integrity": "sha512-jdKhfgW9CRtj3Tor0L7+yPwdG3CgP7W+ZEqSsojrMzCjD1e0IxIbwUMDDpYlVBlC08TACg4puwFGkZfLS+56Tw==", "license": "MIT", "dependencies": { - "@shikijs/types": "1.29.2", - "@shikijs/vscode-textmate": "^10.0.1", - "oniguruma-to-es": "^2.2.0" + "@shikijs/types": "3.22.0", + "@shikijs/vscode-textmate": "^10.0.2", + "oniguruma-to-es": "^4.3.4" } }, "node_modules/@shikijs/engine-oniguruma": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.29.2.tgz", - "integrity": "sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA==", + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.22.0.tgz", + "integrity": "sha512-DyXsOG0vGtNtl7ygvabHd7Mt5EY8gCNqR9Y7Lpbbd/PbJvgWrqaKzH1JW6H6qFkuUa8aCxoiYVv8/YfFljiQxA==", "license": "MIT", "dependencies": { - "@shikijs/types": "1.29.2", - "@shikijs/vscode-textmate": "^10.0.1" + "@shikijs/types": "3.22.0", + "@shikijs/vscode-textmate": "^10.0.2" } }, "node_modules/@shikijs/langs": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-1.29.2.tgz", - "integrity": "sha512-FIBA7N3LZ+223U7cJDUYd5shmciFQlYkFXlkKVaHsCPgfVLiO+e12FmQE6Tf9vuyEsFe3dIl8qGWKXgEHL9wmQ==", + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.22.0.tgz", + "integrity": "sha512-x/42TfhWmp6H00T6uwVrdTJGKgNdFbrEdhaDwSR5fd5zhQ1Q46bHq9EO61SCEWJR0HY7z2HNDMaBZp8JRmKiIA==", "license": "MIT", "dependencies": { - "@shikijs/types": "1.29.2" + "@shikijs/types": "3.22.0" } }, "node_modules/@shikijs/themes": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-1.29.2.tgz", - "integrity": "sha512-i9TNZlsq4uoyqSbluIcZkmPL9Bfi3djVxRnofUHwvx/h6SRW3cwgBC5SML7vsDcWyukY0eCzVN980rqP6qNl9g==", + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.22.0.tgz", + "integrity": "sha512-o+tlOKqsr6FE4+mYJG08tfCFDS+3CG20HbldXeVoyP+cYSUxDhrFf3GPjE60U55iOkkjbpY2uC3It/eeja35/g==", "license": "MIT", "dependencies": { - "@shikijs/types": "1.29.2" + "@shikijs/types": "3.22.0" } }, "node_modules/@shikijs/twoslash": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/twoslash/-/twoslash-1.29.2.tgz", - "integrity": "sha512-2S04ppAEa477tiaLfGEn1QJWbZUmbk8UoPbAEw4PifsrxkBXtAtOflIZJNtuCwz8ptc/TPxy7CO7gW4Uoi6o/g==", + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/@shikijs/twoslash/-/twoslash-3.22.0.tgz", + "integrity": "sha512-GO27UPN+kegOMQvC+4XcLt0Mttyg+n16XKjmoKjdaNZoW+sOJV7FLdv2QKauqUDws6nE3EQPD+TFHEdyyoUBDw==", "license": "MIT", "dependencies": { - "@shikijs/core": "1.29.2", - "@shikijs/types": "1.29.2", - "twoslash": "^0.2.12" + "@shikijs/core": "3.22.0", + "@shikijs/types": "3.22.0", + "twoslash": "^0.3.6" + }, + "peerDependencies": { + "typescript": ">=5.5.0" } }, "node_modules/@shikijs/types": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.29.2.tgz", - "integrity": "sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw==", + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.22.0.tgz", + "integrity": "sha512-491iAekgKDBFE67z70Ok5a8KBMsQ2IJwOWw3us/7ffQkIBCyOQfm/aNwVMBUriP02QshIfgHCBSIYAl3u2eWjg==", "license": "MIT", "dependencies": { - "@shikijs/vscode-textmate": "^10.0.1", + "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, @@ -3219,16 +3238,16 @@ } }, "node_modules/@theguild/remark-mermaid": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@theguild/remark-mermaid/-/remark-mermaid-0.1.3.tgz", - "integrity": "sha512-2FjVlaaKXK7Zj7UJAgOVTyaahn/3/EAfqYhyXg0BfDBVUl+lXcoIWRaxzqfnDr2rv8ax6GsC5mNh6hAaT86PDw==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@theguild/remark-mermaid/-/remark-mermaid-0.3.0.tgz", + "integrity": "sha512-Fy1J4FSj8totuHsHFpaeWyWRaRSIvpzGTRoEfnNJc1JmLV9uV70sYE3zcT+Jj5Yw20Xq4iCsiT+3Ho49BBZcBQ==", "license": "MIT", "dependencies": { "mermaid": "^11.0.0", "unist-util-visit": "^5.0.0" }, "peerDependencies": { - "react": "^18.2.0" + "react": "^18.2.0 || ^19.0.0" } }, "node_modules/@theguild/remark-npm2yarn": { @@ -3249,6 +3268,17 @@ "node": ">=10.13.0" } }, + "node_modules/@ts-morph/common": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.28.1.tgz", + "integrity": "sha512-W74iWf7ILp1ZKNYXY5qbddNaml7e9Sedv5lvU1V8lftlitkc9Pq1A+jlH23ltDgWYeZFFEqGCD1Ies9hqu3O+g==", + "license": "MIT", + "dependencies": { + "minimatch": "^10.0.1", + "path-browserify": "^1.0.1", + "tinyglobby": "^0.2.14" + } + }, "node_modules/@types/d3": { "version": "7.4.3", "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz", @@ -3598,12 +3628,12 @@ "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/@typescript/vfs": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.6.3.tgz", - "integrity": "sha512-8Qs6/Tj2B8Uyo4lYJkopdCtrsfpF/ZlbTXK13Nq6JKN+Ih8FF9Oxg97gEp+zIS96wmkMdWUIETl35Yt9BITeiw==", + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.6.4.tgz", + "integrity": "sha512-PJFXFS4ZJKiJ9Qiuix6Dz/OwEIqHD7Dme1UwZhTK11vR+5dqW2ACbdndWQexBzCx+CPuMe5WBYQWCsFyGlQLlQ==", "license": "MIT", "dependencies": { - "debug": "^4.1.1" + "debug": "^4.4.3" }, "peerDependencies": { "typescript": "*" @@ -3658,14 +3688,6 @@ "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", "license": "MIT" }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, "node_modules/array-iterate": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/array-iterate/-/array-iterate-2.0.1.tgz", @@ -3695,6 +3717,15 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/balanced-match": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.3.tgz", + "integrity": "sha512-1pHv8LX9CpKut1Zp4EXey7Z8OfH11ONNH6Dhi2WDUt31VVZFXZzKwXcysBgqSumFCmR+0dqjMK5v5JiFHzi0+g==", + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, "node_modules/better-react-mathjax": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/better-react-mathjax/-/better-react-mathjax-2.3.0.tgz", @@ -3712,6 +3743,18 @@ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" }, + "node_modules/brace-expansion": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.2.tgz", + "integrity": "sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw==", + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, "node_modules/braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", @@ -3947,6 +3990,12 @@ "node": ">=6" } }, + "node_modules/code-block-writer": { + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.3.tgz", + "integrity": "sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==", + "license": "MIT" + }, "node_modules/collapse-white-space": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-2.1.0.tgz", @@ -4572,11 +4621,12 @@ "license": "MIT" }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -4748,12 +4798,6 @@ "integrity": "sha512-9vcp2xHhkvraY6AHw2WMi+GDSLPX42qe2xjYaVoZqFRJiOcilVQFq9mZmpuHEQpzlgGDelKlV7ZiGcmMsc8WxQ==", "license": "ISC" }, - "node_modules/emoji-regex-xs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex-xs/-/emoji-regex-xs-1.0.0.tgz", - "integrity": "sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==", - "license": "MIT" - }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -4834,18 +4878,6 @@ "node": ">=6" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/estree-util-attach-comments": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/estree-util-attach-comments/-/estree-util-attach-comments-3.0.0.tgz", @@ -4993,15 +5025,29 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "license": "MIT" }, - "node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "license": "MIT", "dependencies": { - "is-extendable": "^0.1.0" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" }, "engines": { - "node": ">=0.10.0" + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" } }, "node_modules/fault": { @@ -5017,6 +5063,23 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -5028,12 +5091,6 @@ "node": ">=8" } }, - "node_modules/flexsearch": { - "version": "0.7.43", - "resolved": "https://registry.npmjs.org/flexsearch/-/flexsearch-0.7.43.tgz", - "integrity": "sha512-c5o/+Um8aqCSOXGcZoqZOm+NqtVwNsvVpWv6lfmSclU954O3wvQKxxK8zj74fPaSJbXpSLTs4PRhh+wnoCXnKg==", - "license": "Apache-2.0" - }, "node_modules/flow-bin": { "version": "0.229.2", "resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.229.2.tgz", @@ -5078,6 +5135,18 @@ "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-2.0.0.tgz", "integrity": "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==" }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -5086,25 +5155,6 @@ "node": ">=4" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" - }, - "node_modules/gray-matter": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz", - "integrity": "sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==", - "dependencies": { - "js-yaml": "^3.13.1", - "kind-of": "^6.0.2", - "section-matter": "^1.0.0", - "strip-bom-string": "^1.0.0" - }, - "engines": { - "node": ">=6.0" - } - }, "node_modules/hachure-fill": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz", @@ -5584,14 +5634,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -5712,18 +5754,6 @@ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -5772,14 +5802,6 @@ "resolved": "https://registry.npmjs.org/khroma/-/khroma-2.1.0.tgz", "integrity": "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw==" }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/langium": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/langium/-/langium-4.2.1.tgz", @@ -6348,6 +6370,15 @@ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "license": "MIT" }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, "node_modules/mermaid": { "version": "11.12.3", "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.12.3.tgz", @@ -7157,11 +7188,12 @@ "license": "MIT" }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -7180,6 +7212,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/minimatch": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.1.tgz", + "integrity": "sha512-MClCe8IL5nRRmawL6ib/eT4oLyeKMGCghibcDWK+J0hh0Q8kqSdia6BvbRMVk6mPa6WqUa5uR2oxt6C5jd533A==", + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/mj-context-menu": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/mj-context-menu/-/mj-context-menu-0.6.1.tgz", @@ -7199,9 +7246,10 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/msgpackr": { "version": "1.11.4", @@ -7333,77 +7381,77 @@ } }, "node_modules/nextra": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nextra/-/nextra-3.3.1.tgz", - "integrity": "sha512-jiwj+LfUPHHeAxJAEqFuglxnbjFgzAOnDWFsjv7iv3BWiX8OksDwd3I2Sv3j2zba00iIBDEPdNeylfzTtTLZVg==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/nextra/-/nextra-4.6.1.tgz", + "integrity": "sha512-yz5WMJFZ5c58y14a6Rmwt+SJUYDdIgzWSxwtnpD4XAJTq3mbOqOg3VTaJqLiJjwRSxoFRHNA1yAhnhbvbw9zSg==", "license": "MIT", "dependencies": { - "@formatjs/intl-localematcher": "^0.5.4", + "@formatjs/intl-localematcher": "^0.6.0", "@headlessui/react": "^2.1.2", "@mdx-js/mdx": "^3.0.0", - "@mdx-js/react": "^3.0.0", "@napi-rs/simple-git": "^0.1.9", - "@shikijs/twoslash": "^1.0.0", - "@theguild/remark-mermaid": "^0.1.3", + "@shikijs/twoslash": "^3.2.1", + "@theguild/remark-mermaid": "^0.3.0", "@theguild/remark-npm2yarn": "^0.3.2", - "better-react-mathjax": "^2.0.3", - "clsx": "^2.0.0", + "better-react-mathjax": "^2.3.0", + "clsx": "^2.1.0", "estree-util-to-js": "^2.0.0", - "estree-util-value-to-estree": "^3.0.1", + "estree-util-value-to-estree": "^3.3.3", + "fast-glob": "^3.3.2", "github-slugger": "^2.0.0", - "graceful-fs": "^4.2.11", - "gray-matter": "^4.0.3", "hast-util-to-estree": "^3.1.0", - "katex": "^0.16.9", + "katex": "^0.16.21", "mdast-util-from-markdown": "^2.0.1", "mdast-util-gfm": "^3.0.0", "mdast-util-to-hast": "^13.2.0", "negotiator": "^1.0.0", - "p-limit": "^6.0.0", + "react-compiler-runtime": "^19.1.0-rc.2", "react-medium-image-zoom": "^5.2.12", "rehype-katex": "^7.0.0", - "rehype-pretty-code": "0.14.0", + "rehype-pretty-code": "0.14.1", "rehype-raw": "^7.0.0", "remark-frontmatter": "^5.0.0", "remark-gfm": "^4.0.0", "remark-math": "^6.0.0", - "remark-reading-time": "^2.0.1", + "remark-reading-time": "^2.0.2", "remark-smartypants": "^3.0.0", - "shiki": "^1.0.0", + "server-only": "^0.0.1", + "shiki": "^3.2.1", "slash": "^5.1.0", - "title": "^4.0.0", + "title": "^4.0.1", + "ts-morph": "^27.0.0", "unist-util-remove": "^4.0.0", "unist-util-visit": "^5.0.0", + "unist-util-visit-children": "^3.0.0", "yaml": "^2.3.2", - "zod": "^3.22.3", - "zod-validation-error": "^3.0.0" + "zod": "^4.1.12" }, "engines": { "node": ">=18" }, "peerDependencies": { - "next": ">=13", + "next": ">=14", "react": ">=18", "react-dom": ">=18" } }, "node_modules/nextra-theme-docs": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nextra-theme-docs/-/nextra-theme-docs-3.3.1.tgz", - "integrity": "sha512-P305m2UcW2IDyQhjrcAu0qpdPArikofinABslUCAyixYShsmcdDRUhIMd4QBHYru4gQuVjGWX9PhWZZCbNvzDQ==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/nextra-theme-docs/-/nextra-theme-docs-4.6.1.tgz", + "integrity": "sha512-u5Hh8erVcGOXO1FVrwYBgrEjyzdYQY0k/iAhLd8RofKp+Bru3fyLy9V9W34mfJ0KHKHjv/ldlDTlb4KlL4eIuQ==", "license": "MIT", "dependencies": { "@headlessui/react": "^2.1.2", - "clsx": "^2.0.0", - "escape-string-regexp": "^5.0.0", - "flexsearch": "^0.7.43", + "clsx": "^2.1.0", "next-themes": "^0.4.0", + "react-compiler-runtime": "^19.1.0-rc.2", "scroll-into-view-if-needed": "^3.1.0", - "zod": "^3.22.3" + "zod": "^4.1.12", + "zustand": "^5.0.1" }, "peerDependencies": { - "next": ">=13", - "nextra": "3.3.1", + "next": ">=14", + "nextra": "4.6.1", "react": ">=18", "react-dom": ">=18" } @@ -10178,15 +10226,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/oniguruma-parser": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.1.tgz", + "integrity": "sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==", + "license": "MIT" + }, "node_modules/oniguruma-to-es": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-2.3.0.tgz", - "integrity": "sha512-bwALDxriqfKGfUufKGGepCzu9x7nJQuoRoAFp4AnwehhC2crqrDIAP/uN2qdlsAvSMpeRC3+Yzhqc7hLmle5+g==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.4.tgz", + "integrity": "sha512-3VhUGN3w2eYxnTzHn+ikMI+fp/96KoRSVK9/kMTcFqj1NRDh2IhQCKvYxDnWePKRXY/AqH+Fuiyb7VHSzBjHfA==", "license": "MIT", "dependencies": { - "emoji-regex-xs": "^1.0.0", - "regex": "^5.1.1", - "regex-recursion": "^5.1.1" + "oniguruma-parser": "^0.12.1", + "regex": "^6.0.1", + "regex-recursion": "^6.0.2" } }, "node_modules/ordered-binary": { @@ -10194,21 +10248,6 @@ "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.5.1.tgz", "integrity": "sha512-5VyHfHY3cd0iza71JepYG50My+YUbrFtGoUz2ooEydPyPM7Aai/JW098juLr+RG6+rDJuzNNTsEQu2DZa1A41A==" }, - "node_modules/p-limit": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-6.2.0.tgz", - "integrity": "sha512-kuUqqHNUqoIWp/c467RI4X6mmyuojY5jGutNU0wVTmEOOfcuwLqyMVoAi9MKi2Ak+5i9+nhmrK4ufZE8069kHA==", - "license": "MIT", - "dependencies": { - "yocto-queue": "^1.1.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/package-manager-detector": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.6.0.tgz", @@ -10303,6 +10342,12 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "license": "MIT" + }, "node_modules/path-data-parser": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz", @@ -10426,6 +10471,26 @@ "node": ">=6" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/react": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", @@ -10437,6 +10502,15 @@ "node": ">=0.10.0" } }, + "node_modules/react-compiler-runtime": { + "version": "19.1.0-rc.3", + "resolved": "https://registry.npmjs.org/react-compiler-runtime/-/react-compiler-runtime-19.1.0-rc.3.tgz", + "integrity": "sha512-Cssogys2XZu6SqxRdX2xd8cQAf57BBvFbLEBlIa77161lninbKUn/EqbecCe7W3eqDQfg3rIoOwzExzgCh7h/g==", + "license": "MIT", + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^0.0.0-experimental" + } + }, "node_modules/react-dom": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", @@ -10538,21 +10612,20 @@ } }, "node_modules/regex": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/regex/-/regex-5.1.1.tgz", - "integrity": "sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==", + "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": "5.1.1", - "resolved": "https://registry.npmjs.org/regex-recursion/-/regex-recursion-5.1.1.tgz", - "integrity": "sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w==", + "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": "^5.1.1", "regex-utilities": "^2.3.0" } }, @@ -10596,9 +10669,9 @@ } }, "node_modules/rehype-pretty-code": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/rehype-pretty-code/-/rehype-pretty-code-0.14.0.tgz", - "integrity": "sha512-hBeKF/Wkkf3zyUS8lal9RCUuhypDWLQc+h9UrP9Pav25FUm/AQAVh4m5gdvJxh4Oz+U+xKvdsV01p1LdvsZTiQ==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/rehype-pretty-code/-/rehype-pretty-code-0.14.1.tgz", + "integrity": "sha512-IpG4OL0iYlbx78muVldsK86hdfNoht0z63AP7sekQNW2QOTmjxB7RbTO+rhIYNGRljgHxgVZoPwUl6bIC9SbjA==", "license": "MIT", "dependencies": { "@types/hast": "^3.0.4", @@ -10612,7 +10685,7 @@ "node": ">=18" }, "peerDependencies": { - "shiki": "^1.3.0" + "shiki": "^1.0.0 || ^2.0.0 || ^3.0.0" } }, "node_modules/rehype-raw": { @@ -10879,6 +10952,16 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/robust-predicates": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", @@ -10897,6 +10980,29 @@ "points-on-path": "^0.2.1" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/rw": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", @@ -10925,18 +11031,6 @@ "compute-scroll-into-view": "^3.0.2" } }, - "node_modules/section-matter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", - "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", - "dependencies": { - "extend-shallow": "^2.0.1", - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -11045,18 +11139,18 @@ } }, "node_modules/shiki": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.29.2.tgz", - "integrity": "sha512-njXuliz/cP+67jU2hukkxCNuH1yUi4QfdZZY+sMr5PPrIyXSu5iTb/qYC4BiWWB0vZ+7TbdvYUCeL23zpwCfbg==", + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-3.22.0.tgz", + "integrity": "sha512-LBnhsoYEe0Eou4e1VgJACes+O6S6QC0w71fCSp5Oya79inkwkm15gQ1UF6VtQ8j/taMDh79hAB49WUk8ALQW3g==", "license": "MIT", "dependencies": { - "@shikijs/core": "1.29.2", - "@shikijs/engine-javascript": "1.29.2", - "@shikijs/engine-oniguruma": "1.29.2", - "@shikijs/langs": "1.29.2", - "@shikijs/themes": "1.29.2", - "@shikijs/types": "1.29.2", - "@shikijs/vscode-textmate": "^10.0.1", + "@shikijs/core": "3.22.0", + "@shikijs/engine-javascript": "3.22.0", + "@shikijs/engine-oniguruma": "3.22.0", + "@shikijs/langs": "3.22.0", + "@shikijs/themes": "3.22.0", + "@shikijs/types": "3.22.0", + "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, @@ -11133,11 +11227,6 @@ "node": ">=18" } }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" - }, "node_modules/stable": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", @@ -11158,14 +11247,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/strip-bom-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", - "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/strip-final-newline": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", @@ -11293,6 +11374,34 @@ "node": ">=18" } }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/title": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/title/-/title-4.0.1.tgz", @@ -11346,6 +11455,16 @@ "node": ">=6.10" } }, + "node_modules/ts-morph": { + "version": "27.0.2", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-27.0.2.tgz", + "integrity": "sha512-fhUhgeljcrdZ+9DZND1De1029PrE+cMkIP7ooqkLRTrRLTqcki2AstsyJm0vRNbTbVCNJ0idGlbBrfqc7/nA8w==", + "license": "MIT", + "dependencies": { + "@ts-morph/common": "~0.28.1", + "code-block-writer": "^13.0.3" + } + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -11353,22 +11472,22 @@ "license": "0BSD" }, "node_modules/twoslash": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/twoslash/-/twoslash-0.2.12.tgz", - "integrity": "sha512-tEHPASMqi7kqwfJbkk7hc/4EhlrKCSLcur+TcvYki3vhIfaRMXnXjaYFgXpoZRbT6GdprD4tGuVBEmTpUgLBsw==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/twoslash/-/twoslash-0.3.6.tgz", + "integrity": "sha512-VuI5OKl+MaUO9UIW3rXKoPgHI3X40ZgB/j12VY6h98Ae1mCBihjPvhOPeJWlxCYcmSbmeZt5ZKkK0dsVtp+6pA==", "license": "MIT", "dependencies": { - "@typescript/vfs": "^1.6.0", - "twoslash-protocol": "0.2.12" + "@typescript/vfs": "^1.6.2", + "twoslash-protocol": "0.3.6" }, "peerDependencies": { - "typescript": "*" + "typescript": "^5.5.0" } }, "node_modules/twoslash-protocol": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/twoslash-protocol/-/twoslash-protocol-0.2.12.tgz", - "integrity": "sha512-5qZLXVYfZ9ABdjqbvPc4RWMr7PrpPaaDSeaYY55vl/w1j6H6kzsWK/urAEIXlzYlyrFmyz1UbwIt+AA0ck+wbg==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/twoslash-protocol/-/twoslash-protocol-0.3.6.tgz", + "integrity": "sha512-FHGsJ9Q+EsNr5bEbgG3hnbkvEBdW5STgPU824AHUjB4kw0Dn4p8tABT7Ncg1Ie6V0+mDg3Qpy41VafZXcQhWMA==", "license": "MIT" }, "node_modules/typescript": { @@ -11878,36 +11997,42 @@ "node": ">= 6" } }, - "node_modules/yocto-queue": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", - "integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==", - "license": "MIT", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/zod": { - "version": "3.22.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", - "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", + "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" } }, - "node_modules/zod-validation-error": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-3.5.4.tgz", - "integrity": "sha512-+hEiRIiPobgyuFlEojnqjJnhFvg4r/i3cqgcm67eehZf/WBaK3g6cD02YU9mtdVxZjv8CzCA9n/Rhrs3yAAvAw==", + "node_modules/zustand": { + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.11.tgz", + "integrity": "sha512-fdZY+dk7zn/vbWNCYmzZULHRrss0jx5pPFiOuMZ/5HJN6Yv3u+1Wswy/4MpZEkEGhtNH+pwxZB8OKgUBPzYAGg==", "license": "MIT", "engines": { - "node": ">=18.0.0" + "node": ">=12.20.0" }, "peerDependencies": { - "zod": "^3.24.4" + "@types/react": ">=18.0.0", + "immer": ">=9.0.6", + "react": ">=18.0.0", + "use-sync-external-store": ">=1.2.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "immer": { + "optional": true + }, + "react": { + "optional": true + }, + "use-sync-external-store": { + "optional": true + } } }, "node_modules/zwitch": { diff --git a/docs/package.json b/docs/package.json index 443dbb5b..adb5fd60 100644 --- a/docs/package.json +++ b/docs/package.json @@ -9,8 +9,8 @@ "@vercel/analytics": "^1.1.1", "docsgpt-react": "^0.5.1", "next": "^15.5.9", - "nextra": "^3.3.1", - "nextra-theme-docs": "^3.3.1", + "nextra": "^4.6.1", + "nextra-theme-docs": "^4.6.1", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/docs/pages/Agents/api.mdx b/docs/pages/Agents/api.mdx deleted file mode 100644 index 18d4e763..00000000 --- a/docs/pages/Agents/api.mdx +++ /dev/null @@ -1,227 +0,0 @@ ---- -title: Interacting with Agents via API -description: Learn how to programmatically interact with DocsGPT Agents using the streaming and non-streaming API endpoints. ---- - -import { Callout, Tabs } from 'nextra/components'; - -# Interacting with Agents via API - -DocsGPT Agents can be accessed programmatically through a dedicated API, allowing you to integrate their specialized capabilities into your own applications, scripts, and workflows. This guide covers the two primary methods for interacting with an agent: the streaming API for real-time responses and the non-streaming API for a single, consolidated answer. - -When you use an API key generated for a specific agent, you do not need to pass `prompt`, `tools` etc. The agent's configuration (including its prompt, selected tools, and knowledge sources) is already associated with its unique API key. - -### API Endpoints - -- **Non-Streaming:** `http://localhost:7091/api/answer` -- **Streaming:** `http://localhost:7091/stream` - - -For DocsGPT Cloud, use `https://gptcloud.arc53.com/` as the base URL. - - -For more technical details, you can explore the API swagger documentation available for the cloud version or your local instance. - ---- - -## Non-Streaming API (`/api/answer`) - -This is a standard synchronous endpoint. It waits for the agent to fully process the request and returns a single JSON object with the complete answer. This is the simplest method and is ideal for backend processes where a real-time feed is not required. - -### Request - -- **Endpoint:** `/api/answer` -- **Method:** `POST` -- **Payload:** - - `question` (string, required): The user's query or input for the agent. - - `api_key` (string, required): The unique API key for the agent you wish to interact with. - - `history` (string, optional): A JSON string representing the conversation history, e.g., `[{\"prompt\": \"first question\", \"answer\": \"first answer\"}]`. - -### Response - -A single JSON object containing: -- `answer`: The complete, final answer from the agent. -- `sources`: A list of sources the agent consulted. -- `conversation_id`: The unique ID for the interaction. - -### Examples - - - - ```bash - curl -X POST http://localhost:7091/api/answer \ - -H "Content-Type: application/json" \ - -d '{ - "question": "your question here", - "api_key": "your_agent_api_key" - }' - ``` - - - ```python - import requests - - API_URL = "http://localhost:7091/api/answer" - API_KEY = "your_agent_api_key" - QUESTION = "your question here" - - response = requests.post( - API_URL, - json={"question": QUESTION, "api_key": API_KEY} - ) - - if response.status_code == 200: - print(response.json()) - else: - print(f"Error: {response.status_code}") - print(response.text) - ``` - - - ```javascript - const apiUrl = 'http://localhost:7091/api/answer'; - const apiKey = 'your_agent_api_key'; - const question = 'your question here'; - - async function getAnswer() { - try { - const response = await fetch(apiUrl, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ question, api_key: apiKey }), - }); - - if (!response.ok) { - throw new Error(`HTTP error! Status: ${response.status}`); - } - - const data = await response.json(); - console.log(data); - } catch (error) { - console.error("Failed to fetch answer:", error); - } - } - - getAnswer(); - ``` - - - ---- - -## Streaming API (`/stream`) - -The `/stream` endpoint uses Server-Sent Events (SSE) to push data in real-time. This is ideal for applications where you want to display the response as it's being generated, such as in a live chatbot interface. - -### Request - -- **Endpoint:** `/stream` -- **Method:** `POST` -- **Payload:** Same as the non-streaming API. - -### Response (SSE Stream) - -The stream consists of multiple `data:` events, each containing a JSON object. Your client should listen for these events and process them based on their `type`. - -**Event Types:** -- `answer`: A chunk of the agent's final answer. -- `source`: A document or source used by the agent. -- `thought`: A reasoning step from the agent (for ReAct agents). -- `id`: The unique `conversation_id` for the interaction. -- `error`: An error message. -- `end`: A final message indicating the stream has concluded. - -### Examples - - - - ```bash - curl -X POST http://localhost:7091/stream \ - -H "Content-Type: application/json" \ - -H "Accept: text/event-stream" \ - -d '{ - "question": "your question here", - "api_key": "your_agent_api_key" - }' - ``` - - - ```python - import requests - import json - - API_URL = "http://localhost:7091/stream" - payload = { - "question": "your question here", - "api_key": "your_agent_api_key" - } - - with requests.post(API_URL, json=payload, stream=True) as r: - for line in r.iter_lines(): - if line: - decoded_line = line.decode('utf-8') - if decoded_line.startswith('data: '): - try: - data = json.loads(decoded_line[6:]) - print(data) - except json.JSONDecodeError: - pass - ``` - - - ```javascript - const apiUrl = 'http://localhost:7091/stream'; - const apiKey = 'your_agent_api_key'; - const question = 'your question here'; - - async function getStream() { - try { - const response = await fetch(apiUrl, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Accept': 'text/event-stream' - }, - // Corrected line: 'apiKey' is changed to 'api_key' - body: JSON.stringify({ question, api_key: apiKey }), - }); - - if (!response.ok) { - throw new Error(`HTTP error! Status: ${response.status}`); - } - - const reader = response.body.getReader(); - const decoder = new TextDecoder(); - - while (true) { - const { done, value } = await reader.read(); - if (done) break; - - const chunk = decoder.decode(value, { stream: true }); - // Note: This parsing method assumes each chunk contains whole lines. - // For a more robust production implementation, buffer the chunks - // and process them line by line. - const lines = chunk.split('\n'); - - for (const line of lines) { - if (line.startsWith('data: ')) { - try { - const data = JSON.parse(line.substring(6)); - console.log(data); - } catch (e) { - console.error("Failed to parse JSON from SSE event:", e); - } - } - } - } - } catch (error) { - console.error("Failed to fetch stream:", error); - } - } - - getStream(); - ``` - - diff --git a/docs/pages/_app.jsx b/docs/pages/_app.jsx deleted file mode 100644 index 52ff477a..00000000 --- a/docs/pages/_app.jsx +++ /dev/null @@ -1,10 +0,0 @@ -import { DocsGPTWidget } from "docsgpt-react"; - -export default function MyApp({ Component, pageProps }) { - return ( - <> - - - - ) -} diff --git a/docs/theme.config.jsx b/docs/theme.config.jsx index bfd32b4c..d4f8b0ac 100644 --- a/docs/theme.config.jsx +++ b/docs/theme.config.jsx @@ -1,161 +1,18 @@ -import Image from 'next/image' -import { Analytics } from '@vercel/analytics/react'; - const github = 'https://github.com/arc53/DocsGPT'; - - - -import { useConfig, useTheme } from 'nextra-theme-docs'; -import CuteLogo from './public/cute-docsgpt.png'; -const Logo = ({ height, width }) => { - const { theme } = useTheme(); - return ( -
- DocsGPT logo - - DocsGPT Docs - - -
- ); -}; - const config = { docsRepositoryBase: `${github}/blob/main/docs`, - chat: { - link: 'https://discord.com/invite/n5BX8dh8rU', - }, - banner: { - key: 'docs-launch', - text: ( -
- Welcome to the new DocsGPT 🦖 docs! 👋 -
- ), - }, - toc: { - float: true, - }, - project: { - link: github, - }, darkMode: true, nextThemes: { defaultTheme: 'dark', }, - primaryHue: { - dark: 207, - light: 212, - }, - footer: { - text: ( -
- MIT {new Date().getFullYear()} © - - DocsGPT - - {' | '} - - GitHub - - {' | '} - - Blog - -
- ), - }, - editLink: { - content: 'Edit this page on GitHub', - }, - logo() { - return ( -
- -
- ); - }, - useNextSeoProps() { - return { - titleTemplate: `%s - DocsGPT Documentation`, - }; - }, - - head() { - const { frontMatter } = useConfig(); - const { theme } = useTheme(); - const title = frontMatter?.title || 'Chat with your data with DocsGPT'; - const description = - frontMatter?.description || - 'Use DocsGPT to chat with your data. DocsGPT is a GPT powered chatbot that can answer questions about your data.' - const image = '/cute-docsgpt.png'; - - const composedTitle = `${title} – DocsGPT Documentation`; - - return ( - <> - - - - - - - - - - - - - - - - - - - - - - ); - }, sidebar: { defaultMenuCollapseLevel: 1, - titleComponent: ({ title, type }) => - type === 'separator' ? ( -
- - {title} - -
- - ) : ( - <>{title} - - - - ), }, - - gitTimestamp: ({ timestamp }) => ( - <>Last updated on {timestamp.toLocaleDateString()} - ), + toc: { + float: true, + }, + editLink: 'Edit this page on GitHub', }; -export default config; \ No newline at end of file +export default config; diff --git a/frontend/.env.development b/frontend/.env.development index 03827379..f5dc2bb1 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -3,4 +3,5 @@ VITE_BASE_URL=http://localhost:5173 VITE_API_HOST=http://127.0.0.1:7091 VITE_API_STREAMING=true VITE_NOTIFICATION_TEXT="What's new in 0.15.0 — Changelog" -VITE_NOTIFICATION_LINK="https://blog.docsgpt.cloud/docsgpt-0-15-masters-long-term-memory-and-tooling/" \ No newline at end of file +VITE_NOTIFICATION_LINK="https://blog.docsgpt.cloud/docsgpt-0-15-masters-long-term-memory-and-tooling/" +VITE_GOOGLE_CLIENT_ID=896376503572-u46l78n8ctgtdr4dlei4u06jv6rbpqc5.apps.googleusercontent.com