@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,62 @@
1
+ "use client";
2
+ import { useCallback, useEffect } from "react";
3
+ import { getNextChatCommand, } from "./commands";
4
+ /**
5
+ * Drains the provider's command queue into the chat: a requested clear runs
6
+ * first (stopping a streaming response), then queued questions are sent one
7
+ * at a time whenever the chat is idle. Returns `submitText`, which every
8
+ * submission path uses so an attached page travels with exactly one message.
9
+ */
10
+ export const useChatCommands = ({ clearConversation, commandState, commands, sendMessage, status, stop, }) => {
11
+ const submitText = useCallback(async (text) => {
12
+ const page = commands.takeAttachedPage();
13
+ if (!page) {
14
+ await sendMessage({ text });
15
+ return;
16
+ }
17
+ await sendMessage({ metadata: { page }, text }, { body: { pageContext: { url: page.url } } });
18
+ }, [commands, sendMessage]);
19
+ useEffect(() => {
20
+ // Holds the shared queue until the command settles: `sendMessage`
21
+ // resolves only after the response finishes, so the next question waits
22
+ // its turn even if the other shell becomes active meanwhile. The shells
23
+ // share one chat, so the next question carries the full history either
24
+ // way.
25
+ const run = (task, onSettled) => {
26
+ task()
27
+ .catch((error) => {
28
+ console.error("Failed to run chat command:", error);
29
+ })
30
+ .finally(() => {
31
+ onSettled?.();
32
+ commands.endCommand();
33
+ });
34
+ };
35
+ switch (getNextChatCommand({ state: commandState, status })) {
36
+ case "stop":
37
+ Promise.resolve(stop()).catch(() => undefined);
38
+ break;
39
+ case "clear":
40
+ if (commands.beginCommand()) {
41
+ run(clearConversation, commands.completeClear);
42
+ }
43
+ break;
44
+ case "ask": {
45
+ if (!commands.beginCommand()) {
46
+ break;
47
+ }
48
+ const next = commands.takeNextAsk();
49
+ if (next) {
50
+ run(() => submitText(next.text));
51
+ }
52
+ else {
53
+ commands.endCommand();
54
+ }
55
+ break;
56
+ }
57
+ default:
58
+ break;
59
+ }
60
+ }, [clearConversation, commandState, commands, status, stop, submitText]);
61
+ return submitText;
62
+ };
@@ -0,0 +1,7 @@
1
+ import { type ReactNode } from "react";
2
+ /**
3
+ * The avatar shown beside user messages, or `undefined` when no reader with
4
+ * a valid avatar URL is set with `<AskAIUser />`.
5
+ */
6
+ export declare const useChatUserAvatar: () => ReactNode;
7
+ //# sourceMappingURL=user-avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-avatar.d.ts","sourceRoot":"","sources":["../../../src/internal/chat/user-avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AA+BjD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAO,SAKpC,CAAC"}
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import { resolveChatUserAvatarUrl } from "./chat-user";
5
+ import { useGeistdocsChatContext } from "./context";
6
+ const ChatUserAvatar = ({ name, src }) => {
7
+ const [failedSrc, setFailedSrc] = useState(null);
8
+ // A broken avatar is hidden rather than shown as a broken image.
9
+ if (failedSrc === src) {
10
+ return null;
11
+ }
12
+ return (
13
+ // External avatar hosts vary per site, so next/image remote patterns
14
+ // can't be configured for them.
15
+ // biome-ignore lint/performance/noImgElement: arbitrary avatar hosts
16
+ // biome-ignore lint/a11y/noNoninteractiveElementInteractions: onError is a load event, not an interaction
17
+ _jsx("img", { alt: name?.trim() ?? "", className: "size-6 shrink-0 rounded-full bg-gray-alpha-200 object-cover", decoding: "async", height: 24, loading: "lazy", onError: () => setFailedSrc(src), referrerPolicy: "no-referrer", src: src, width: 24 }));
18
+ };
19
+ /**
20
+ * The avatar shown beside user messages, or `undefined` when no reader with
21
+ * a valid avatar URL is set with `<AskAIUser />`.
22
+ */
23
+ export const useChatUserAvatar = () => {
24
+ const { user } = useGeistdocsChatContext();
25
+ const src = resolveChatUserAvatarUrl(user?.avatarUrl);
26
+ return src ? _jsx(ChatUserAvatar, { name: user?.name, src: src }) : undefined;
27
+ };
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Server-only binding between a browser and its eve session.
3
+ *
4
+ * The chat route talks to the eve agent with the site's own credentials, so
5
+ * it must only ever contact a session this browser created through the
6
+ * route. The session ID lives in an HMAC-signed, httpOnly cookie that page
7
+ * scripts cannot read; the browser only stores a non-reversible tag of the
8
+ * session in message metadata so the route can tell which conversation a
9
+ * session belongs to.
10
+ *
11
+ * Cookie value: `base64url(JSON payload) + "." + base64url(HMAC-SHA256)`.
12
+ * The MAC covers a versioned domain-separation prefix, the agent URL (kept
13
+ * out of the payload so the browser never sees it), and the encoded payload.
14
+ */
15
+ export declare const CHAT_SECRET_ENV = "GEISTDOCS_CHAT_SECRET";
16
+ export declare const MIN_CHAT_SECRET_BYTES = 32;
17
+ export declare const EVE_AGENT_SESSION_COOKIE = "geistdocs_eve_session";
18
+ export declare const EVE_AGENT_SESSION_MAX_AGE_SECONDS: number;
19
+ export interface EveAgentCookieSession {
20
+ /** Created by a prewarm request and not yet used for a turn. */
21
+ prewarmed: boolean;
22
+ sessionId: string;
23
+ }
24
+ export interface EveAgentSessionCookieCodec {
25
+ /**
26
+ * Return the session a cookie value carries, or `null` for anything that
27
+ * is not a valid, unexpired cookie issued for this agent with this secret.
28
+ */
29
+ open: (value: string) => EveAgentCookieSession | null;
30
+ /** Seal a session into a cookie value with a fresh expiry. */
31
+ seal: (session: EveAgentCookieSession) => string;
32
+ /**
33
+ * Short, non-reversible tag for a session ID. Stored in assistant message
34
+ * metadata so the route can match a conversation to the cookie's session
35
+ * without exposing the session ID to page scripts.
36
+ */
37
+ tag: (sessionId: string) => string;
38
+ }
39
+ /**
40
+ * Validate a chat secret. Throws for secrets too short to resist guessing
41
+ * so a misconfigured deployment fails loudly instead of signing cookies
42
+ * with a weak key. A base64 value that decodes to 32 bytes (44 characters)
43
+ * passes, because the raw string is used as the key.
44
+ */
45
+ export declare const assertChatSecret: (secret: string) => void;
46
+ export declare const createEveAgentSessionCookieCodec: ({ agentUrl, now, secret, ttlMs, }: {
47
+ /** Normalized agent URL the sessions belong to. */
48
+ agentUrl: string;
49
+ /** Clock override for tests. */
50
+ now?: () => number;
51
+ secret: string;
52
+ ttlMs?: number;
53
+ }) => EveAgentSessionCookieCodec;
54
+ /** Compare two session tags without leaking where they differ. */
55
+ export declare const isSameSessionTag: (actual: string, expected: string) => boolean;
56
+ /**
57
+ * Every value sent for `name` in a `Cookie` header, in header order.
58
+ * Browsers send one value per matching path, most specific first, so
59
+ * callers should try each value rather than trusting the first.
60
+ */
61
+ export declare const readCookieValues: (header: string | null, name: string) => string[];
62
+ /**
63
+ * `Set-Cookie` header for the eve session. The cookie is scoped to the
64
+ * chat route's own path, so it follows any endpoint or base path without
65
+ * configuration, and is never sent with page or asset requests.
66
+ */
67
+ export declare const serializeEveAgentSessionCookie: (value: string, req: Request) => string;
68
+ //# sourceMappingURL=eve-agent-session-cookie.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eve-agent-session-cookie.d.ts","sourceRoot":"","sources":["../../src/internal/eve-agent-session-c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crypto";
2
+ /**
3
+ * Server-only binding between a browser and its eve session.
4
+ *
5
+ * The chat route talks to the eve agent with the site's own credentials, so
6
+ * it must only ever contact a session this browser created through the
7
+ * route. The session ID lives in an HMAC-signed, httpOnly cookie that page
8
+ * scripts cannot read; the browser only stores a non-reversible tag of the
9
+ * session in message metadata so the route can tell which conversation a
10
+ * session belongs to.
11
+ *
12
+ * Cookie value: `base64url(JSON payload) + "." + base64url(HMAC-SHA256)`.
13
+ * The MAC covers a versioned domain-separation prefix, the agent URL (kept
14
+ * out of the payload so the browser never sees it), and the encoded payload.
15
+ */
16
+ export const CHAT_SECRET_ENV = "GEISTDOCS_CHAT_SECRET";
17
+ export const MIN_CHAT_SECRET_BYTES = 32;
18
+ export const EVE_AGENT_SESSION_COOKIE = "geistdocs_eve_session";
19
+ export const EVE_AGENT_SESSION_MAX_AGE_SECONDS = 7 * 24 * 60 * 60;
20
+ const COOKIE_VERSION = 1;
21
+ const COOKIE_MAC_PREFIX = `geistdocs-eve-session-cookie:v${COOKIE_VERSION}:`;
22
+ const TAG_PREFIX = "geistdocs-eve-session-tag:v1:";
23
+ const TAG_BYTES = 16;
24
+ const MAC_BYTES = 32;
25
+ const MAX_COOKIE_VALUE_LENGTH = 1024;
26
+ const MAX_SESSION_ID_LENGTH = 256;
27
+ /** Characters a cookie `Path` attribute can carry without escaping. */
28
+ const SAFE_COOKIE_PATH_PATTERN = /^\/[\x21-\x3A\x3C-\x7E]*$/;
29
+ const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
30
+ const isPayload = (value) => isRecord(value) &&
31
+ value.v === COOKIE_VERSION &&
32
+ typeof value.s === "string" &&
33
+ value.s.length > 0 &&
34
+ value.s.length <= MAX_SESSION_ID_LENGTH &&
35
+ typeof value.p === "boolean" &&
36
+ Number.isSafeInteger(value.e);
37
+ /**
38
+ * Validate a chat secret. Throws for secrets too short to resist guessing
39
+ * so a misconfigured deployment fails loudly instead of signing cookies
40
+ * with a weak key. A base64 value that decodes to 32 bytes (44 characters)
41
+ * passes, because the raw string is used as the key.
42
+ */
43
+ export const assertChatSecret = (secret) => {
44
+ if (Buffer.byteLength(secret, "utf8") < MIN_CHAT_SECRET_BYTES) {
45
+ throw new Error(`${CHAT_SECRET_ENV} (or createChatRoute({ eveAgent: { secret } })) must be at least ${MIN_CHAT_SECRET_BYTES} bytes. Generate one with \`openssl rand -base64 32\`.`);
46
+ }
47
+ };
48
+ export const createEveAgentSessionCookieCodec = ({ agentUrl, now = Date.now, secret, ttlMs = EVE_AGENT_SESSION_MAX_AGE_SECONDS * 1000, }) => {
49
+ assertChatSecret(secret);
50
+ const key = Buffer.from(secret, "utf8");
51
+ // Length-prefix the agent URL so no (url, payload) pair can collide with
52
+ // another pair's MAC input.
53
+ const boundAgentUrl = `${agentUrl.length}:${agentUrl}:`;
54
+ const mac = (encodedPayload) => createHmac("sha256", key)
55
+ .update(COOKIE_MAC_PREFIX)
56
+ .update(boundAgentUrl)
57
+ .update(encodedPayload)
58
+ .digest();
59
+ const seal = ({ prewarmed, sessionId }) => {
60
+ const payload = {
61
+ v: COOKIE_VERSION,
62
+ s: sessionId,
63
+ p: prewarmed,
64
+ e: now() + ttlMs,
65
+ };
66
+ const encodedPayload = Buffer.from(JSON.stringify(payload)).toString("base64url");
67
+ return `${encodedPayload}.${mac(encodedPayload).toString("base64url")}`;
68
+ };
69
+ const open = (value) => {
70
+ if (value.length === 0 || value.length > MAX_COOKIE_VALUE_LENGTH) {
71
+ return null;
72
+ }
73
+ const [encodedPayload, encodedMac, extra] = value.split(".");
74
+ if (!(encodedPayload && encodedMac) || extra !== undefined) {
75
+ return null;
76
+ }
77
+ const actual = Buffer.from(encodedMac, "base64url");
78
+ if (actual.length !== MAC_BYTES ||
79
+ // Reject non-canonical encodings so each session has one cookie form.
80
+ actual.toString("base64url") !== encodedMac ||
81
+ !timingSafeEqual(actual, mac(encodedPayload))) {
82
+ return null;
83
+ }
84
+ let payload;
85
+ try {
86
+ payload = JSON.parse(Buffer.from(encodedPayload, "base64url").toString("utf8"));
87
+ }
88
+ catch {
89
+ return null;
90
+ }
91
+ if (!isPayload(payload) || payload.e <= now()) {
92
+ return null;
93
+ }
94
+ return { prewarmed: payload.p, sessionId: payload.s };
95
+ };
96
+ const tag = (sessionId) => createHmac("sha256", key)
97
+ .update(TAG_PREFIX)
98
+ .update(boundAgentUrl)
99
+ .update(sessionId)
100
+ .digest()
101
+ .subarray(0, TAG_BYTES)
102
+ .toString("base64url");
103
+ return { open, seal, tag };
104
+ };
105
+ /** Compare two session tags without leaking where they differ. */
106
+ export const isSameSessionTag = (actual, expected) => {
107
+ const actualBytes = Buffer.from(actual);
108
+ const expectedBytes = Buffer.from(expected);
109
+ return (actualBytes.length === expectedBytes.length &&
110
+ timingSafeEqual(actualBytes, expectedBytes));
111
+ };
112
+ /**
113
+ * Every value sent for `name` in a `Cookie` header, in header order.
114
+ * Browsers send one value per matching path, most specific first, so
115
+ * callers should try each value rather than trusting the first.
116
+ */
117
+ export const readCookieValues = (header, name) => {
118
+ if (!header) {
119
+ return [];
120
+ }
121
+ const values = [];
122
+ for (const pair of header.split(";")) {
123
+ const separator = pair.indexOf("=");
124
+ if (separator === -1 || pair.slice(0, separator).trim() !== name) {
125
+ continue;
126
+ }
127
+ let value = pair.slice(separator + 1).trim();
128
+ if (value.length >= 2 && value.startsWith('"') && value.endsWith('"')) {
129
+ value = value.slice(1, -1);
130
+ }
131
+ values.push(value);
132
+ }
133
+ return values;
134
+ };
135
+ const isHttpsRequest = (req) => {
136
+ if (new URL(req.url).protocol === "https:") {
137
+ return true;
138
+ }
139
+ const forwardedProto = req.headers
140
+ .get("x-forwarded-proto")
141
+ ?.split(",")[0]
142
+ ?.trim()
143
+ .toLowerCase();
144
+ return forwardedProto === "https";
145
+ };
146
+ /**
147
+ * `Set-Cookie` header for the eve session. The cookie is scoped to the
148
+ * chat route's own path, so it follows any endpoint or base path without
149
+ * configuration, and is never sent with page or asset requests.
150
+ */
151
+ export const serializeEveAgentSessionCookie = (value, req) => {
152
+ const { pathname } = new URL(req.url);
153
+ const attributes = [
154
+ `${EVE_AGENT_SESSION_COOKIE}=${value}`,
155
+ `Max-Age=${EVE_AGENT_SESSION_MAX_AGE_SECONDS}`,
156
+ // A path with characters that cannot appear in the attribute falls back
157
+ // to the browser's default: the directory of the request path.
158
+ ...(SAFE_COOKIE_PATH_PATTERN.test(pathname) ? [`Path=${pathname}`] : []),
159
+ "HttpOnly",
160
+ "SameSite=Strict",
161
+ ...(isHttpsRequest(req) ? ["Secure"] : []),
162
+ ];
163
+ return attributes.join("; ");
164
+ };
@@ -1,12 +1,14 @@
1
- export interface EveAgentSessionHandle {
2
- sessionId: string;
3
- /** Absolute count of NDJSON events consumed from the session stream. */
4
- streamIndex: number;
5
- }
6
- export declare const isEveAgentSessionHandle: (value: unknown) => value is EveAgentSessionHandle;
1
+ /**
2
+ * Ask the chat route to prewarm an eve session. The route binds the session
3
+ * to this browser with an httpOnly cookie, so the response carries nothing
4
+ * the client needs to keep; the first message only has to wait for this
5
+ * request so the cookie is in place. Resolves `true` when the route accepted
6
+ * the request and `false` on any failure, which falls back to normal session
7
+ * creation.
8
+ */
7
9
  export declare const requestEveAgentPrewarm: ({ apiUrl, fetchImpl, timeoutMs, }: {
8
10
  apiUrl: string;
9
11
  fetchImpl?: typeof fetch;
10
12
  timeoutMs?: number;
11
- }) => Promise<EveAgentSessionHandle | null>;
13
+ }) => Promise<boolean>;
12
14
  //# sourceMappingURL=eve-agent-session.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eve-agent-session.d.ts","sourceRoot":"","sources":["../../src/internal/eve-agent-session.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;CACrB;AAKD,eAAO,MAAM,uBAAuB,GAClC,OAAO,OAAO,KACb,KAAK,IAAI,qBAMY,CAAC;AAEzB,eAAO,MAAM,sBAAsB,GAAU,mCAI1C;IACD,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,KAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAkBvC,CAAC"}
1
+ {"version":3,"file":"eve-agent-session.d.ts","sourceRoot":"","sources":["../../src/internal/eve-agent-session.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GAAU,mCAI1C;IACD,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,KAAG,OAAO,CAAC,OAAO,CAalB,CAAC"}
@@ -1,11 +1,12 @@
1
1
  const PREWARM_TIMEOUT_MS = 20_000;
2
- const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
3
- export const isEveAgentSessionHandle = (value) => isRecord(value) &&
4
- typeof value.sessionId === "string" &&
5
- value.sessionId.length > 0 &&
6
- typeof value.streamIndex === "number" &&
7
- Number.isInteger(value.streamIndex) &&
8
- value.streamIndex >= 0;
2
+ /**
3
+ * Ask the chat route to prewarm an eve session. The route binds the session
4
+ * to this browser with an httpOnly cookie, so the response carries nothing
5
+ * the client needs to keep; the first message only has to wait for this
6
+ * request so the cookie is in place. Resolves `true` when the route accepted
7
+ * the request and `false` on any failure, which falls back to normal session
8
+ * creation.
9
+ */
9
10
  export const requestEveAgentPrewarm = async ({ apiUrl, fetchImpl = fetch, timeoutMs = PREWARM_TIMEOUT_MS, }) => {
10
11
  try {
11
12
  const response = await fetchImpl(apiUrl, {
@@ -14,13 +15,9 @@ export const requestEveAgentPrewarm = async ({ apiUrl, fetchImpl = fetch, timeou
14
15
  headers: { "Content-Type": "application/json" },
15
16
  signal: AbortSignal.timeout(timeoutMs),
16
17
  });
17
- if (!response.ok) {
18
- return null;
19
- }
20
- const body = await response.json();
21
- return isEveAgentSessionHandle(body) ? body : null;
18
+ return response.ok;
22
19
  }
23
20
  catch {
24
- return null;
21
+ return false;
25
22
  }
26
23
  };
@@ -1,18 +1,33 @@
1
1
  import type { UIMessage, UIMessageChunk, UIMessageStreamWriter } from "ai";
2
- import { type EveAgentSessionHandle } from "./eve-agent-session.js";
3
- export type { EveAgentSessionHandle } from "./eve-agent-session.js";
4
- export interface RunEveAgentTurnOptions {
2
+ /** Text part of a structured eve user message. */
3
+ export interface EveAgentTextPart {
4
+ text: string;
5
+ type: "text";
6
+ }
7
+ /** A user message as eve's session routes accept it. */
8
+ export type EveAgentMessage = string | EveAgentTextPart[];
9
+ /** Turn-scoped context sent next to `message` as eve's `clientContext`. */
10
+ export type EveAgentClientContext = Record<string, unknown>;
11
+ /**
12
+ * Stream position persisted on assistant messages. The browser keeps it
13
+ * between turns; the session ID itself only lives in the httpOnly session
14
+ * cookie, so `session` is a non-reversible tag of it.
15
+ */
16
+ export interface EveAgentMessageMetadata {
17
+ session: string;
18
+ /** Absolute count of NDJSON events consumed from the session stream. */
19
+ streamIndex: number;
20
+ }
21
+ export interface EveAgentSession {
22
+ sessionId: string;
23
+ /** Stream index the next turn's events start at. */
24
+ startIndex: number;
25
+ }
26
+ export interface StreamEveAgentTurnOptions {
5
27
  /** Base URL of the deployed eve agent. */
6
28
  agentUrl: string;
7
- /**
8
- * Message used when a fresh session must replace an unusable handle,
9
- * carrying the prior conversation inlined. Defaults to `message`.
10
- */
11
- fallbackMessage?: string;
12
29
  /** Injectable fetch for tests. Defaults to the global `fetch`. */
13
30
  fetchImpl?: typeof fetch;
14
- /** Session handle from a previous turn, if any. */
15
- handle?: EveAgentSessionHandle | null;
16
31
  /** Resolved headers for every request to the agent. */
17
32
  headers?: HeadersInit;
18
33
  /**
@@ -20,19 +35,41 @@ export interface RunEveAgentTurnOptions {
20
35
  * `source-url` citations.
21
36
  */
22
37
  initialChunks?: UIMessageChunk[];
23
- /** The user message (with any docs context already inlined). */
24
- message: string;
38
+ /** Session that received the turn, from `startOrContinueEveAgentSession`. */
39
+ session: EveAgentSession;
40
+ /**
41
+ * Tag of the session written to the finishing message metadata with the
42
+ * next stream index. Without a tag no metadata is written, so the next
43
+ * turn starts a fresh session.
44
+ */
45
+ sessionTag?: string | null;
25
46
  /** Abort signal from the inbound request; triggers an eve cancel. */
26
47
  signal?: AbortSignal;
48
+ /**
49
+ * Forward tool outputs and the citations found in them. When `false`,
50
+ * tool results reach the client with a `null` output and no `source-url`
51
+ * chunks. @default true
52
+ */
53
+ toolCitations?: boolean;
54
+ /**
55
+ * Tool names whose calls are forwarded to the client. Calls to other
56
+ * tools, and their results and citations, are dropped. Omit to forward
57
+ * every tool.
58
+ */
59
+ visibleTools?: readonly string[];
27
60
  writer: UIMessageStreamWriter;
28
61
  }
62
+ export declare const normalizeAgentUrl: (url: string) => string;
29
63
  /**
30
- * Read the eve session handle persisted on the most recent assistant
31
- * message. The handle round-trips through the client: it is written to
32
- * message metadata by the `finish` chunk and sent back with the full
33
- * message history on the next request.
64
+ * Stream position on the most recent assistant message before the trailing
65
+ * user message. Only the most recent assistant message counts: a turn that
66
+ * failed or was stopped carries no position, and resuming from an older one
67
+ * would replay events. Legacy shapes (`{ sessionId, streamIndex }` objects
68
+ * and opaque string tokens) read as no position.
34
69
  */
35
- export declare const getEveAgentSessionHandle: (messages: UIMessage[]) => EveAgentSessionHandle | null;
70
+ export declare const getEveAgentMessageMetadata: (messages: UIMessage[]) => EveAgentMessageMetadata | null;
71
+ /** Whether any earlier assistant message records an eve turn. */
72
+ export declare const hasPriorEveAgentTurn: (messages: UIMessage[]) => boolean;
36
73
  /**
37
74
  * Resolve the eve agent URL from the route option and site config, and
38
75
  * reject ambiguous responder configuration. Pure so the fail-fast contract
@@ -51,8 +88,8 @@ export declare const resolveEveAgentUrl: ({ configUrl, hasProxy, optionUrl, }: {
51
88
  export declare const capLastUserMessageText: (messages: UIMessage[], limit: number) => UIMessage[];
52
89
  /**
53
90
  * Inline prior conversation turns into a single message for a fresh eve
54
- * session. Used when history exists but no (valid) session handle does —
55
- * for example after the client's daily history reset.
91
+ * session. Used when history exists but the browser holds no session for
92
+ * this conversation — for example after the session cookie expired.
56
93
  */
57
94
  export declare const buildEveAgentTranscript: (messages: UIMessage[], currentMessage: string) => string;
58
95
  /**
@@ -65,15 +102,50 @@ export declare const extractSourceUrls: (value: unknown, limit?: number) => {
65
102
  url: string;
66
103
  }[];
67
104
  /** Start an eve session without a turn so the first message can reuse it. */
68
- export declare const prewarmEveAgentSession: ({ agentUrl, fetchImpl, headers, signal, }: {
105
+ export declare const createEmptyEveAgentSession: ({ agentUrl, fetchImpl, headers, signal, }: {
69
106
  agentUrl: string;
70
107
  fetchImpl?: typeof fetch;
71
108
  headers?: HeadersInit;
72
109
  signal?: AbortSignal;
73
- }) => Promise<EveAgentSessionHandle>;
110
+ }) => Promise<{
111
+ sessionId: string;
112
+ }>;
113
+ /**
114
+ * Send the turn's message to the agent: as a follow-up to `continuation`
115
+ * when given, otherwise (or when that session is no longer active) as the
116
+ * first message of a new session. Resolves once the agent has accepted the
117
+ * message, before any event is streamed, so the caller can bind the
118
+ * resulting session to the response.
119
+ */
120
+ export declare const startOrContinueEveAgentSession: ({ agentUrl, clientContext, continuation, fallbackMessage, fetchImpl, headers, message, signal, }: {
121
+ /** Base URL of the deployed eve agent. */
122
+ agentUrl: string;
123
+ /**
124
+ * Turn-scoped context sent as eve's top-level `clientContext` with the
125
+ * message, including on a replacement session.
126
+ */
127
+ clientContext?: EveAgentClientContext;
128
+ /**
129
+ * Session to continue. Only pass a session ID read from a verified
130
+ * session cookie; never one supplied by the browser.
131
+ */
132
+ continuation?: EveAgentSession | null;
133
+ /**
134
+ * Message used when a fresh session replaces an inactive one — typically
135
+ * the message with the prior conversation inlined, so the new session
136
+ * does not lose context. Defaults to `message`.
137
+ */
138
+ fallbackMessage?: EveAgentMessage;
139
+ /** Injectable fetch for tests. Defaults to the global `fetch`. */
140
+ fetchImpl?: typeof fetch;
141
+ headers?: HeadersInit;
142
+ /** The user message (with any docs context already inlined). */
143
+ message: EveAgentMessage;
144
+ signal?: AbortSignal;
145
+ }) => Promise<EveAgentSession>;
74
146
  /**
75
- * Run a single Ask AI turn against a hosted eve agent, writing AI SDK UI
76
- * message chunks to the provided writer.
147
+ * Stream one Ask AI turn from a session that already accepted the turn's
148
+ * message, writing AI SDK UI message chunks to the provided writer.
77
149
  */
78
- export declare const runEveAgentTurn: ({ agentUrl, fallbackMessage, fetchImpl, handle, headers, initialChunks, message, signal, writer, }: RunEveAgentTurnOptions) => Promise<void>;
150
+ export declare const streamEveAgentTurn: ({ agentUrl, fetchImpl, headers, initialChunks, session, sessionTag, signal, toolCitations, visibleTools, writer, }: StreamEveAgentTurnOptions) => Promise<void>;
79
151
  //# sourceMappingURL=eve-agent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eve-agent.d.ts","sourceRoot":"","sources":["../../src/internal/eve-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,IAAI,CAAC;AAC3E,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAwDpE,MAAM,WAAW,sBAAsB;IACrC,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kEAAkE;IAClE,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,mDAAmD;IACnD,MAAM,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACtC,uDAAuD;IACvD,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;OAGG;IACH,aAAa,CAAC,EAAE,cAAc,EAAE,CAAC;IACjC,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,MAAM,CAAC,EAAE,WAAW,C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