@vercel/geistdocs 2.7.9 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/assets/icons/icon-thumb-down.d.ts +26 -0
  2. package/dist/assets/icons/icon-thumb-down.d.ts.map +1 -0
  3. package/dist/assets/icons/icon-thumb-down.js +25 -0
  4. package/dist/assets/icons/index.d.ts +1 -0
  5. package/dist/assets/icons/index.d.ts.map +1 -1
  6. package/dist/assets/icons/index.js +1 -0
  7. package/dist/cli/index.js +1 -1
  8. package/dist/components/dialog.d.ts +2 -0
  9. package/dist/components/dialog.d.ts.map +1 -0
  10. package/dist/components/dialog.js +3 -0
  11. package/dist/config.d.ts +67 -3
  12. package/dist/config.d.ts.map +1 -1
  13. package/dist/controls.d.ts +23 -1
  14. package/dist/controls.d.ts.map +1 -1
  15. package/dist/controls.js +44 -3
  16. package/dist/footer.js +1 -1
  17. package/dist/internal/chat/activity.d.ts +5 -1
  18. package/dist/internal/chat/activity.d.ts.map +1 -1
  19. package/dist/internal/chat/activity.js +11 -4
  20. package/dist/internal/chat/chat-user.d.ts +12 -0
  21. package/dist/internal/chat/chat-user.d.ts.map +1 -0
  22. package/dist/internal/chat/chat-user.js +27 -0
  23. package/dist/internal/chat/commands.d.ts +91 -0
  24. package/dist/internal/chat/commands.d.ts.map +1 -0
  25. package/dist/internal/chat/commands.js +165 -0
  26. package/dist/internal/chat/context.d.ts +46 -2
  27. package/dist/internal/chat/context.d.ts.map +1 -1
  28. package/dist/internal/chat/context.js +50 -4
  29. package/dist/internal/chat/message-actions.d.ts +15 -0
  30. package/dist/internal/chat/message-actions.d.ts.map +1 -0
  31. package/dist/internal/chat/message-actions.js +113 -0
  32. package/dist/internal/chat/message-feedback.d.ts +68 -0
  33. package/dist/internal/chat/message-feedback.d.ts.map +1 -0
  34. package/dist/internal/chat/message-feedback.js +188 -0
  35. package/dist/internal/chat/message-metadata.d.ts.map +1 -1
  36. package/dist/internal/chat/message-metadata.js +7 -1
  37. package/dist/internal/chat/message-text.d.ts +9 -0
  38. package/dist/internal/chat/message-text.d.ts.map +1 -0
  39. package/dist/internal/chat/message-text.js +15 -0
  40. package/dist/internal/chat/message.d.ts +4 -2
  41. package/dist/internal/chat/message.d.ts.map +1 -1
  42. package/dist/internal/chat/message.js +10 -6
  43. package/dist/internal/chat/options.d.ts +94 -0
  44. package/dist/internal/chat/options.d.ts.map +1 -0
  45. package/dist/internal/chat/options.js +171 -0
  46. package/dist/internal/chat/page-attachment.d.ts +12 -0
  47. package/dist/internal/chat/page-attachment.d.ts.map +1 -0
  48. package/dist/internal/chat/page-attachment.js +18 -0
  49. package/dist/internal/chat/session-provider.d.ts +33 -0
  50. package/dist/internal/chat/session-provider.d.ts.map +1 -0
  51. package/dist/internal/chat/session-provider.js +138 -0
  52. package/dist/internal/chat/session.d.ts +60 -0
  53. package/dist/internal/chat/session.d.ts.map +1 -0
  54. package/dist/internal/chat/session.js +85 -0
  55. package/dist/internal/chat/shell.d.ts.map +1 -1
  56. package/dist/internal/chat/shell.js +81 -157
  57. package/dist/internal/chat/use-chat-commands.d.ts +28 -0
  58. package/dist/internal/chat/use-chat-commands.d.ts.map +1 -0
  59. package/dist/internal/chat/use-chat-commands.js +62 -0
  60. package/dist/internal/chat/user-avatar.d.ts +7 -0
  61. package/dist/internal/chat/user-avatar.d.ts.map +1 -0
  62. package/dist/internal/chat/user-avatar.js +27 -0
  63. package/dist/internal/eve-agent-session-cookie.d.ts +68 -0
  64. package/dist/internal/eve-agent-session-cookie.d.ts.map +1 -0
  65. package/dist/internal/eve-agent-session-cookie.js +164 -0
  66. package/dist/internal/eve-agent-session.d.ts +9 -7
  67. package/dist/internal/eve-agent-session.d.ts.map +1 -1
  68. package/dist/internal/eve-agent-session.js +10 -13
  69. package/dist/internal/eve-agent.d.ts +96 -24
  70. package/dist/internal/eve-agent.d.ts.map +1 -1
  71. package/dist/internal/eve-agent.js +74 -51
  72. package/dist/internal/feedback-action.d.ts +14 -0
  73. package/dist/internal/feedback-action.d.ts.map +1 -1
  74. package/dist/internal/feedback-action.js +37 -5
  75. package/dist/internal/page-actions-client.d.ts +9 -0
  76. package/dist/internal/page-actions-client.d.ts.map +1 -1
  77. package/dist/internal/page-actions-client.js +8 -4
  78. package/dist/internal/provider-client.d.ts.map +1 -1
  79. package/dist/internal/provider-client.js +2 -2
  80. package/dist/internal/use-mobile.d.ts +7 -0
  81. package/dist/internal/use-mobile.d.ts.map +1 -1
  82. package/dist/internal/use-mobile.js +17 -1
  83. package/dist/internal/webmcp-client.d.ts.map +1 -1
  84. package/dist/internal/webmcp-client.js +13 -3
  85. package/dist/internal/webmcp.d.ts +5 -1
  86. package/dist/internal/webmcp.d.ts.map +1 -1
  87. package/dist/internal/webmcp.js +31 -1
  88. package/dist/pages/changelog.d.ts.map +1 -1
  89. package/dist/pages/changelog.js +4 -0
  90. package/dist/pages/docs.d.ts.map +1 -1
  91. package/dist/pages/docs.js +2 -0
  92. package/dist/providers/public/components/dialog.d.ts +27 -0
  93. package/dist/providers/public/components/dialog.d.ts.map +1 -0
  94. package/dist/providers/public/components/dialog.js +17 -0
  95. package/dist/routes/chat.d.ts +83 -5
  96. package/dist/routes/chat.d.ts.map +1 -1
  97. package/dist/routes/chat.js +517 -80
  98. package/dist/routes/discovery.d.ts +1 -1
  99. package/dist/routes/discovery.d.ts.map +1 -1
  100. package/dist/routes/discovery.js +7 -11
  101. package/dist/routes/openapi.d.ts.map +1 -1
  102. package/dist/routes/openapi.js +47 -25
  103. package/docs/agents.md +4 -3
  104. package/docs/llms.txt +711 -35
  105. package/docs/manifest.json +12 -3
  106. package/docs/pages/agent-readiness.md +1 -1
  107. package/docs/pages/ask-ai.md +567 -24
  108. package/docs/pages/components/dialog.md +74 -0
  109. package/docs/pages/components/index.md +1 -0
  110. package/docs/pages/configuration.md +21 -1
  111. package/docs/pages/env.md +17 -3
  112. package/docs/pages/feedback.md +4 -0
  113. package/docs/pages/webmcp.md +18 -3
  114. package/docs/sitemap.md +2 -1
  115. package/package.json +5 -2
  116. package/public-foundation.css +12 -0
  117. package/template/.env.example +5 -0
  118. package/template/AGENTS.md +2 -0
  119. package/template/components/geistdocs/dialog-demo.tsx +44 -0
  120. package/template/content/docs/agent-readiness.mdx +1 -1
  121. package/template/content/docs/ask-ai.cn.mdx +466 -15
  122. package/template/content/docs/ask-ai.mdx +567 -24
  123. package/template/content/docs/components/dialog.mdx +70 -0
  124. package/template/content/docs/components/index.mdx +1 -0
  125. package/template/content/docs/components/meta.json +1 -0
  126. package/template/content/docs/configuration.cn.mdx +39 -0
  127. package/template/content/docs/configuration.mdx +21 -1
  128. package/template/content/docs/env.cn.mdx +15 -1
  129. package/template/content/docs/env.mdx +18 -4
  130. package/template/content/docs/feedback.cn.mdx +4 -0
  131. package/template/content/docs/feedback.mdx +4 -0
  132. package/template/content/docs/webmcp.mdx +18 -3
  133. package/template/package.json +1 -2
  134. package/dist/providers/public/components/modal.d.ts +0 -22
  135. package/dist/providers/public/components/modal.d.ts.map +0 -1
  136. package/dist/providers/public/components/modal.js +0 -19
@@ -0,0 +1,74 @@
1
+ ---
2
+ title: Dialog
3
+ description: Display focused content in an accessible modal
4
+ type: reference
5
+ summary: Compose Dialog primitives for modal search, chat, forms, and confirmations.
6
+ url: /docs/components/dialog
7
+ source: apps/template/content/docs/components/dialog.mdx
8
+ related:
9
+ - /docs/components
10
+ - /docs/components/button
11
+ - /docs/components/popover
12
+ ---
13
+
14
+ # Dialog
15
+
16
+ import { DialogDemo } from "@/components/geistdocs/dialog-demo";
17
+
18
+ <div className="not-prose my-6 flex min-h-32 items-center justify-center rounded-lg border border-gray-400 bg-background-100 p-6">
19
+ <DialogDemo />
20
+ </div>
21
+
22
+ ```tsx
23
+ "use client";
24
+
25
+ import {
26
+ Dialog,
27
+ DialogAction,
28
+ DialogClose,
29
+ DialogContent,
30
+ DialogDescription,
31
+ DialogFooter,
32
+ DialogHeader,
33
+ DialogTitle,
34
+ } from "@vercel/geistdocs/components/dialog";
35
+ import { useState } from "react";
36
+
37
+ export function SearchDialog() {
38
+ const [active, setActive] = useState(false);
39
+
40
+ return (
41
+ <>
42
+ <button onClick={() => setActive(true)}>Search</button>
43
+ <Dialog
44
+ active={active}
45
+ drawer={false}
46
+ onClickOutside={() => setActive(false)}
47
+ >
48
+ <DialogContent>
49
+ <DialogHeader>
50
+ <DialogTitle>Search documentation</DialogTitle>
51
+ <DialogDescription>Type a query to find a page.</DialogDescription>
52
+ </DialogHeader>
53
+ {/* Search input and results */}
54
+ </DialogContent>
55
+ <DialogFooter>
56
+ <DialogClose
57
+ onClick={() => setActive(false)}
58
+ variant="secondary"
59
+ >
60
+ Cancel
61
+ </DialogClose>
62
+ <DialogAction onClick={() => setActive(false)}>Search</DialogAction>
63
+ </DialogFooter>
64
+ </Dialog>
65
+ </>
66
+ );
67
+ }
68
+ ```
69
+
70
+ `Dialog` is controlled through `active` and `onClickOutside`. Set `drawer={false}` for a centered dialog on every viewport, or omit it to allow mobile drawer behavior where supported.
71
+
72
+ Always provide a `DialogTitle` and `DialogDescription`. `DialogAction` and `DialogClose` render action buttons; call your close-state setter from `DialogClose.onClick`.
73
+
74
+ Import these components from `@vercel/geistdocs/components/dialog`. The public package provides a compatible implementation, while the private package aliases Geistcn's official Modal components under the same `Dialog*` names.
@@ -32,6 +32,7 @@ Internal projects using `@vercel/geistdocs-private` use the same component subpa
32
32
  | [Tabs](/docs/components/tabs) | `components/tabs`, `components/tabs-with-children` | Tab navigation and mounted content panels |
33
33
  | [Collapsible](/docs/components/collapsible) | `components/collapsible` | Expandable content regions |
34
34
  | [Details](/docs/components/details) | `components/details` | Styled native disclosure elements |
35
+ | [Dialog](/docs/components/dialog) | `components/dialog` | Modal search, chat, forms, and confirmations |
35
36
  | [Callout](/docs/components/callout) | `components/callout` | Notices with optional titles and descriptions |
36
37
  | [Code Block](/docs/components/code-block) | `components/code-block`, `components/code-block-tabs` | Highlighted code and tabbed code groups |
37
38
  | [Command Prompt](/docs/components/command-prompt) | `components/command-prompt` | Command surfaces with copy support and alternatives |
@@ -209,7 +209,27 @@ export const ai = {
209
209
 
210
210
  Set `eveAgent.prewarm` only when the agent runs eve 0.59 or newer and allocating an empty durable session as Ask AI loads is appropriate for the site.
211
211
 
212
- See [Ask AI](/docs/ask-ai) for the full eve agent mode behavior, including authentication. Read [Improve Ask AI answers with Mixedbread](/docs/mixedbread-retrieval) before enabling semantic retrieval.
212
+ The `ai` config also controls the chat panel and its route:
213
+
214
+ | Option | Type | Default | Description |
215
+ | ------------------------ | --------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------- |
216
+ | `endpoint` | `string` | `"/api/chat"` | App-local path of the chat route. `basePath` is added automatically. Invalid paths throw. |
217
+ | `title` | `string` | `"Ask AI"` | Chat panel heading and accessible label. |
218
+ | `suggestions` | `(string \| { text: string; icon?: ReactNode })[]` | `[]` | Suggested prompts. The first four distinct prompts are shown, and strings render without an icon. |
219
+ | `history.retentionDays` | `number` | `30` | Days a stored conversation is kept after its most recent message. `0` stores no history, and `Infinity` never expires it. |
220
+ | `messageFeedback` | `boolean` | `false` | Show thumbs up and thumbs down buttons on finished answers and send votes to the Geistdocs feedback service. |
221
+ | `toolLabels` | `Record<string, string>` | `{}` | Activity label shown while a named tool runs, such as `{ web_search: "Searching..." }`. Other tools show `Running <tool name>...`. |
222
+
223
+ ```tsx title="geistdocs.tsx"
224
+ export const ai = {
225
+ endpoint: "/api/ai-chat",
226
+ title: "Ask Acme AI",
227
+ history: { retentionDays: 7 },
228
+ messageFeedback: true,
229
+ };
230
+ ```
231
+
232
+ See [Ask AI](/docs/ask-ai) for the full eve agent mode behavior, including authentication, for moving the chat route adapter when you set `endpoint`, for what a `messageFeedback` vote sends, and for matching a production Vertex or eve setup with `toolLabels` and the server-only `createChatRoute` options. Read [Improve Ask AI answers with Mixedbread](/docs/mixedbread-retrieval) before enabling semantic retrieval.
213
233
 
214
234
  Use [Versioned docs](/docs/versioned-docs) for versioned source setup and [Proxy and markdown routes](/docs/proxy) for route mappings.
215
235
 
package/docs/pages/env.md CHANGED
@@ -2,7 +2,7 @@
2
2
  title: Environment Variables
3
3
  description: Learn about the environment variables used in Geistdocs
4
4
  type: reference
5
- summary: Environment variables required by Geistdocs for AI chat, Mixedbread retrieval, proxy mode, and production URL configuration.
5
+ summary: Environment variables required by Geistdocs for AI chat, Mixedbread retrieval, proxy mode, eve agent session cookies, and production URL configuration.
6
6
  url: /docs/env
7
7
  source: apps/template/content/docs/env.mdx
8
8
  prerequisites:
@@ -14,9 +14,9 @@ related:
14
14
 
15
15
  # Environment Variables
16
16
 
17
- Geistdocs uses environment variables to configure Ask AI, optional Mixedbread retrieval, optional Vertex-backed proxy mode, and production URL behavior.
17
+ Geistdocs uses environment variables to configure Ask AI, optional Mixedbread retrieval, optional Vertex-backed proxy mode, eve agent session cookie signing, and production URL behavior.
18
18
 
19
- Review this Geistdocs project and help me configure the required environment variables. Check whether `AI_GATEWAY_API_KEY`, `MXBAI_API_KEY`, `MXBAI_STORE_ID`, `GEISTDOCS_CHAT_PROXY_URL`, and `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` are needed for the features I enabled, then tell me where to set them locally and on Vercel.
19
+ Review this Geistdocs project and help me configure the required environment variables. Check whether `AI_GATEWAY_API_KEY`, `MXBAI_API_KEY`, `MXBAI_STORE_ID`, `GEISTDOCS_CHAT_PROXY_URL`, `GEISTDOCS_CHAT_SECRET`, and `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` are needed for the features I enabled, then tell me where to set them locally and on Vercel.
20
20
 
21
21
  ## `AI_GATEWAY_API_KEY`
22
22
 
@@ -65,6 +65,20 @@ To route Ask AI through Vertex:
65
65
 
66
66
  The Vertex deployment does not need a Geistdocs-specific environment variable. Access is controlled by Trusted Sources and the OIDC token forwarded by the platform proxy.
67
67
 
68
+ ## `GEISTDOCS_CHAT_SECRET`
69
+
70
+ A server-only secret that signs the httpOnly cookie binding each reader's browser to its eve agent session. Set it when `ai.eveAgent` is configured so Ask AI can continue one eve session across turns and prewarm sessions. The chat route only contacts a session named by a cookie that verifies with this secret, so a reader can't point the chat route at another reader's eve session, and page scripts can't read the session ID.
71
+
72
+ The secret must be at least 32 bytes. Generate one with:
73
+
74
+ ```bash title="Terminal"
75
+ openssl rand -base64 32
76
+ ```
77
+
78
+ Add it to your site's Vercel project environment variables for the Production and Preview environments, and to `.env.local` for local development. Use a separate secret for each docs site. An existing base64-encoded 32-byte secret (44 characters) also works, because Geistdocs uses the value as-is and signs with its own versioned prefix. Rotating the secret invalidates existing session cookies, so each reader's next message starts a new eve session with the conversation inlined.
79
+
80
+ Without this variable, eve agent mode starts a new eve session on every turn with the prior conversation inlined, refuses prewarm requests, and logs a warning. A value shorter than 32 bytes throws when the chat route loads. Pass the `eveAgent.secret` option to `createChatRoute` to supply the secret another way. Never expose it with a `NEXT_PUBLIC_` prefix or put it in `geistdocs.tsx`. Read [Ask AI](/docs/ask-ai#keep-eve-sessions-across-turns-with-geistdocs_chat_secret) for the full behavior.
81
+
68
82
  ## `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL`
69
83
 
70
84
  The production URL of the Geistdocs site. Geistdocs uses it for canonical and Open Graph metadata, product JSON-LD, `sitemap.xml`, `robots.txt`, and RSS links. Vercel sets this variable automatically.
@@ -38,6 +38,10 @@ When feedback is submitted:
38
38
 
39
39
  Each piece of feedback creates a separate issue, allowing for individual tracking and resolution.
40
40
 
41
+ ### Feedback on Ask AI answers
42
+
43
+ When `ai.messageFeedback` is enabled, readers can rate each Ask AI answer with a thumbs up or thumbs down. Ask AI answer votes go to the same feedback service with the same `siteId` label. Each answer vote creates an issue labeled `thumbs-up` or `thumbs-down`, and its note starts with `[Ask AI]` so you can tell answer feedback from page feedback. Thumbs-down issues also get the `reason-empty` label because Ask AI doesn't ask for a reason. Read [Collect feedback on answers](/docs/ask-ai#collect-feedback-on-answers) for the fields each vote sends.
44
+
41
45
  ## Feedback Schema
42
46
 
43
47
  The API accepts the following fields:
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  title: WebMCP
3
- description: Expose documentation search and page reading to browser agents.
3
+ description: Expose documentation search, page reading, and Ask AI to browser agents.
4
4
  url: /docs/webmcp
5
5
  source: apps/template/content/docs/webmcp.mdx
6
6
  ---
7
7
 
8
8
  # WebMCP
9
9
 
10
- Geistdocs uses [mcp-handler's WebMCP bridge](https://github.com/vercel/mcp-handler/blob/main/docs/WEBMCP.md) for search and a browser-local tool for reading the current page. Enable `webmcp: { enabled: true }` in `lib/geistdocs/config.tsx` and add `app/api/mcp/route.ts`:
10
+ Geistdocs uses [mcp-handler's WebMCP bridge](https://github.com/vercel/mcp-handler/blob/main/docs/WEBMCP.md) for search, and browser-local tools for reading the current page and, optionally, asking the site's Ask AI chat. Enable `webmcp: { enabled: true }` in `lib/geistdocs/config.tsx` and add `app/api/mcp/route.ts`:
11
11
 
12
12
  ```ts
13
13
  import { createMcpRoute } from "@vercel/geistdocs/routes/mcp";
@@ -27,10 +27,23 @@ The canonical template includes this setup. Existing consumers must add the rout
27
27
  | --- | --- | --- |
28
28
  | `search_docs` | Nonblank `query` up to 500 characters; optional configured `locale` | MCP result containing search results as JSON text |
29
29
  | `read_current_page` | None | Current page as Markdown |
30
+ | `ask_ai` | `question` of 2 to 2,000 characters after trimming whitespace | Confirmation that the question was submitted to the site's Ask AI chat |
30
31
 
31
32
  The provider loads `/api/mcp?webmcp-script` once through `next/script`. The script discovers the MCP server's tools and registers only `search_docs`. Do not add another copy of the script or register search yourself. Remote MCP clients connect to `/api/mcp` directly. Geistdocs prefixes public paths with `basePath`.
32
33
 
33
- Search calls the supplied search handler directly, retaining its visibility filters and request headers/cookies without another network hop. Pass `locale` explicitly for translated results; omitting it selects `defaultLanguage`, even after navigating to another language. Neither tool modifies documentation or sends it to an external model.
34
+ Search calls the supplied search handler directly, retaining its visibility filters and request headers/cookies without another network hop. Pass `locale` explicitly for translated results; omitting it selects `defaultLanguage`, even after navigating to another language. `search_docs` and `read_current_page` don't modify documentation or send it to an external model.
35
+
36
+ ## Let browser agents ask Ask AI
37
+
38
+ `ask_ai` is opt-in. Set `webmcp.askAI` to `true` to register it when Ask AI is enabled:
39
+
40
+ ```tsx title="lib/geistdocs/config.tsx"
41
+ webmcp: { enabled: true, askAI: true },
42
+ ```
43
+
44
+ `ask_ai` opens the site's Ask AI chat and submits the question as a user message, the same way the `ask` action from [`useGeistdocsChat`](/docs/ask-ai#control-ask-ai-from-your-own-components) does. The tool returns as soon as the question is queued and doesn't return the answer, which streams into the chat panel on the page. Questions sent while a response is streaming wait for it to finish. The tool rejects a missing `question`, or one shorter than 2 or longer than 2,000 characters after trimming whitespace, without opening the chat.
45
+
46
+ `ask_ai` isn't registered when `webmcp.askAI` is unset, when `ai.enabled` is `false`, or when `webmcp.enabled` is `false`. Unlike the read-only tools, `ask_ai` sets `readOnlyHint: false` because it changes the page and sends the question to your Ask AI model or agent, which counts toward your usage. Like `read_current_page`, it runs in the browser and isn't part of the `/api/mcp` server, so remote MCP clients and the `?webmcp-script` bridge don't list it.
34
47
 
35
48
  ## Lifecycle and safety
36
49
 
@@ -55,6 +68,8 @@ agent-browser --session docs-check open http://localhost:3000/docs
55
68
  agent-browser --session docs-check webmcp list
56
69
  agent-browser --session docs-check webmcp invoke search_docs --params '{"query":"configuration","locale":"en"}'
57
70
  agent-browser --session docs-check webmcp invoke read_current_page --params '{}'
71
+ # Requires webmcp.askAI: true
72
+ agent-browser --session docs-check webmcp invoke ask_ai --params '{"question":"How do I configure search?"}'
58
73
  agent-browser --session docs-check close
59
74
  ```
60
75
 
package/docs/sitemap.md CHANGED
@@ -5,7 +5,7 @@ Use it to choose focused page files from `docs/pages/` before reading the full `
5
5
 
6
6
  - [Overview](pages/index.md) | URL: /docs | Type: overview | Summary: Geistdocs is a packaged documentation system for creating Next.js and Fumadocs sites with shared runtime features.
7
7
  - [Getting Started](pages/getting-started.md) | URL: /docs/getting-started | Type: guide | Summary: Create a Geistdocs project, run it locally, and edit your first documentation page.
8
- - [Environment Variables](pages/env.md) | URL: /docs/env | Type: reference | Summary: Environment variables required by Geistdocs for AI chat, Mixedbread retrieval, proxy mode, and production URL configuration.
8
+ - [Environment Variables](pages/env.md) | URL: /docs/env | Type: reference | Summary: Environment variables required by Geistdocs for AI chat, Mixedbread retrieval, proxy mode, eve agent session cookies, and production URL configuration.
9
9
  - [Deploy to Vercel](pages/deployment.md) | URL: /docs/deployment | Type: guide | Summary: Deploy a Geistdocs site to Vercel with the required project settings and environment variables.
10
10
  - [Migrate to Geistdocs](pages/migration.md) | URL: /docs/migration | Type: guide | Summary: Move an existing documentation site to @vercel/geistdocs while keeping local content, routing, middleware behavior, and AI-readable surfaces intact.
11
11
  - [Choose a Geistdocs package](pages/packages.md) | URL: /docs/packages | Type: guide | Summary: Use the public package by default and the private package only where restricted Vercel npm dependencies are already available.
@@ -28,6 +28,7 @@ Use it to choose focused page files from `docs/pages/` before reading the full `
28
28
  - [Configure sidebar navigation](pages/guides/nested-navigation.md) | URL: /docs/guides/nested-navigation | Type: guide | Summary: Configure sidebar order, section labels, folder landing pages, and deeply nested page trees with meta.json files.
29
29
  - [Copy Prompt](pages/components/copy-prompt.md) | URL: /docs/components/copy-prompt | Type: reference | Summary: Use CopyPrompt for reusable instructions that readers can send to an AI assistant.
30
30
  - [Details](pages/components/details.md) | URL: /docs/components/details | Type: reference | Summary: Compose Details and Summary for accessible browser-native disclosures.
31
+ - [Dialog](pages/components/dialog.md) | URL: /docs/components/dialog | Type: reference | Summary: Compose Dialog primitives for modal search, chat, forms, and confirmations.
31
32
  - [Dropdown Menu](pages/components/dropdown-menu.md) | URL: /docs/components/dropdown-menu | Type: reference | Summary: Compose DropdownMenu primitives for application-owned menus outside MDX.
32
33
  - [Edit on GitHub](pages/edit-on-github.md) | URL: /docs/edit-on-github | Type: integration | Summary: A direct link on every documentation page that lets readers propose changes through GitHub pull requests.
33
34
  - [Feedback](pages/feedback.md) | URL: /docs/feedback | Type: integration | Summary: An interactive feedback widget that collects user sentiment and creates structured GitHub Issues automatically.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vercel/geistdocs",
3
3
  "description": "Runtime and CLI for Geistdocs projects.",
4
- "version": "2.7.9",
4
+ "version": "2.8.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -235,6 +235,10 @@
235
235
  "types": "./dist/components/details.d.ts",
236
236
  "default": "./dist/components/details.js"
237
237
  },
238
+ "./components/dialog": {
239
+ "types": "./dist/components/dialog.d.ts",
240
+ "default": "./dist/components/dialog.js"
241
+ },
238
242
  "./components/image": {
239
243
  "types": "./dist/components/image.d.ts",
240
244
  "default": "./dist/components/image.js"
@@ -307,7 +311,6 @@
307
311
  "clsx": "^2.1.1",
308
312
  "commander": "^14.0.2",
309
313
  "dexie": "^4.2.1",
310
- "dexie-react-hooks": "^4.2.0",
311
314
  "fumadocs-core": "16.2.2",
312
315
  "fumadocs-mdx": "14.0.4",
313
316
  "fumadocs-ui": "16.2.2",
@@ -287,6 +287,12 @@
287
287
  0px 8px 16px -4px rgba(0, 0, 0, 0.04),
288
288
  0px 24px 32px -8px rgba(0, 0, 0, 0.06), var(--ds-shadow-background-border);
289
289
 
290
+ --ds-shadow-modal-elevated:
291
+ 0px 0px 0px 1px rgba(0, 0, 0, 0.08),
292
+ 0px 32px 72px -12px rgba(0, 0, 0, 0.06),
293
+ 0px 8px 32px -12px rgba(0, 0, 0, 0.08),
294
+ 0px 8px 24px -12px rgba(0, 0, 0, 0.12);
295
+
290
296
  --ds-focus-ring:
291
297
  0 0 0 2px var(--ds-background-100), 0 0 0 4px var(--ds-blue-700);
292
298
  --ds-focus-border:
@@ -444,6 +450,12 @@
444
450
  0px 8px 16px -4px rgba(0, 0, 0, 0.16),
445
451
  0px 24px 32px -8px rgba(0, 0, 0, 0.24), var(--ds-shadow-background-border);
446
452
 
453
+ --ds-shadow-modal-elevated:
454
+ 0 0 0 1px var(--ds-gray-alpha-400),
455
+ 0px 32px 72px -12px rgba(0, 0, 0, 0.06),
456
+ 0px 8px 32px -12px rgba(0, 0, 0, 0.08),
457
+ 0px 8px 24px -12px rgba(0, 0, 0, 0.12);
458
+
447
459
  --ds-shadow-fullscreen:
448
460
  var(--ds-shadow-border-base), 0px 1px 1px rgba(0, 0, 0, 0.08),
449
461
  0px 8px 16px -4px rgba(0, 0, 0, 0.16),
@@ -15,5 +15,10 @@ GEISTDOCS_CHAT_PROXY_URL=""
15
15
  # The default Geistdocs platform /vertex proxy uses Vercel OIDC and Trusted Sources.
16
16
  GEISTDOCS_CHAT_PROXY_TOKEN=""
17
17
 
18
+ # Signs the eve agent session cookie (ai.eveAgent mode only).
19
+ # Required for multi-turn eve sessions and prewarming. At least 32 bytes:
20
+ # openssl rand -base64 32
21
+ GEISTDOCS_CHAT_SECRET=""
22
+
18
23
  # Production URL (automatically set on Vercel)
19
24
  NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL="localhost:3000"
@@ -76,6 +76,8 @@ Use these instructions when an AI coding agent edits this project.
76
76
  - Keep `app/api/search/export/route.ts` and the `next build && geistdocs search sync` build script when Mixedbread retrieval is enabled. Production builds incrementally sync chat-visible Markdown; local and preview builds skip remote sync unless `--allow-non-production` is passed.
77
77
  - Mixedbread failures fall back to local Orama retrieval. Keep the local source definitions and `excludeFrom: [chat]` visibility behavior intact.
78
78
  - Set `ai.eveAgent: { url }` in `geistdocs.tsx` to answer Ask AI with a hosted eve framework agent instead. The URL flows through the config object; the route file needs no changes. Set `prewarm: true` for eve 0.59+ responders when the site should prepare an empty durable session as the chat client loads. Requests authenticate with a per-request Vercel OIDC bearer token by default; pass server-only headers through the `eveAgent` option on `createChatRoute` for custom auth. Never put auth material in `geistdocs.tsx`. Configuring both `proxy` and an eve agent throws at route creation.
79
+ - Set the server-only `GEISTDOCS_CHAT_SECRET` (at least 32 bytes, generate with `openssl rand -base64 32`) for eve agent mode. It signs the httpOnly `geistdocs_eve_session` cookie that binds a browser to its eve session (the cookie is `SameSite=Strict`, so keep the chat route on the same site as the docs pages); without it every turn starts a new eve session and prewarm requests are refused. Never prefix it with `NEXT_PUBLIC_` or put it in `geistdocs.tsx`.
80
+ - `createChatRoute` caps request size (1,000,000-byte body, 200 messages, 200,000-character `pageContext.content` by default; override with the `limits` option). It does not rate limit, so wrap `POST` with the site's own rate limiting.
79
81
  - Geistdocs Ask AI targets AI SDK v6: `ai` v6 and `@ai-sdk/react` v3. Keep those dependencies on the generated package versions unless a `@vercel/geistdocs` release changes them.
80
82
  - If the app uses `ai` or `@ai-sdk/react` for product code outside Geistdocs, migrate that app code separately or let the package manager install separate versions. Do not downgrade Geistdocs Ask AI to match unrelated app code.
81
83
  - Set `GEISTDOCS_CHAT_PROXY_URL` only when Ask AI should route through the central Vertex-backed proxy. The value must include the `/vertex` route, such as `https://<geistdocs-platform-deployment>/vertex`.
@@ -0,0 +1,44 @@
1
+ "use client";
2
+
3
+ import { Button } from "@vercel/geistdocs/components/button";
4
+ import {
5
+ Dialog,
6
+ DialogClose,
7
+ DialogContent,
8
+ DialogDescription,
9
+ DialogFooter,
10
+ DialogHeader,
11
+ DialogTitle,
12
+ } from "@vercel/geistdocs/components/dialog";
13
+ import { useState } from "react";
14
+
15
+ export function DialogDemo() {
16
+ const [active, setActive] = useState(false);
17
+
18
+ return (
19
+ <>
20
+ <Button onClick={() => setActive(true)} variant="secondary">
21
+ Open dialog
22
+ </Button>
23
+ <Dialog
24
+ active={active}
25
+ drawer={false}
26
+ onClickOutside={() => setActive(false)}
27
+ >
28
+ <DialogContent>
29
+ <DialogHeader>
30
+ <DialogTitle>Search documentation</DialogTitle>
31
+ <DialogDescription>
32
+ Dialogs work for search, chat, forms, and focused decisions.
33
+ </DialogDescription>
34
+ </DialogHeader>
35
+ </DialogContent>
36
+ <DialogFooter>
37
+ <DialogClose onClick={() => setActive(false)} variant="secondary">
38
+ Done
39
+ </DialogClose>
40
+ </DialogFooter>
41
+ </Dialog>
42
+ </>
43
+ );
44
+ }
@@ -156,7 +156,7 @@ export const agent = {
156
156
 
157
157
  The generated OpenAPI 3.1 document states that it describes the documentation site and not the product, links the product spec when `openApiUrl` is set, and lists the languages the site serves. `/agents.md` renders `siteOpenApiUrl` as a separate "Documentation site API" link so agents do not confuse the two.
158
158
 
159
- The document always lists the Markdown discovery routes (`/agents.md`, `/sitemap.md`, `/llms.txt`, and page-level `.md`), so keep those route files mounted. `/api/search` and `/api/chat` follow `search.enabled` and `ai.enabled`; pass `endpoints: { chat: false }` or `endpoints: { search: false }` to `createOpenApiRoute` when the route files differ from the feature flags. `/.well-known/mcp.json` appears only when `agent.mcp.servers` is configured.
159
+ The document always lists the Markdown discovery routes (`/agents.md`, `/sitemap.md`, `/llms.txt`, and page-level `.md`), so keep those route files mounted. `/api/search` and the chat route follow `search.enabled` and `ai.enabled`; pass `endpoints: { chat: false }` or `endpoints: { search: false }` to `createOpenApiRoute` when the route files differ from the feature flags. The document lists the chat route at `ai.endpoint`, which defaults to `/api/chat`. `/.well-known/mcp.json` appears only when `agent.mcp.servers` is configured.
160
160
 
161
161
  The server URL comes from `siteUrl` when it is set, and from the request origin otherwise. Set `siteUrl` so the document names your production host.
162
162