@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.
- package/dist/assets/icons/icon-thumb-down.d.ts +26 -0
- package/dist/assets/icons/icon-thumb-down.d.ts.map +1 -0
- package/dist/assets/icons/icon-thumb-down.js +25 -0
- package/dist/assets/icons/index.d.ts +1 -0
- package/dist/assets/icons/index.d.ts.map +1 -1
- package/dist/assets/icons/index.js +1 -0
- package/dist/cli/index.js +1 -1
- package/dist/components/dialog.d.ts +2 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +3 -0
- package/dist/config.d.ts +67 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/controls.d.ts +23 -1
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +44 -3
- package/dist/footer.js +1 -1
- package/dist/internal/chat/activity.d.ts +5 -1
- package/dist/internal/chat/activity.d.ts.map +1 -1
- package/dist/internal/chat/activity.js +11 -4
- package/dist/internal/chat/chat-user.d.ts +12 -0
- package/dist/internal/chat/chat-user.d.ts.map +1 -0
- package/dist/internal/chat/chat-user.js +27 -0
- package/dist/internal/chat/commands.d.ts +91 -0
- package/dist/internal/chat/commands.d.ts.map +1 -0
- package/dist/internal/chat/commands.js +165 -0
- package/dist/internal/chat/context.d.ts +46 -2
- package/dist/internal/chat/context.d.ts.map +1 -1
- package/dist/internal/chat/context.js +50 -4
- package/dist/internal/chat/message-actions.d.ts +15 -0
- package/dist/internal/chat/message-actions.d.ts.map +1 -0
- package/dist/internal/chat/message-actions.js +113 -0
- package/dist/internal/chat/message-feedback.d.ts +68 -0
- package/dist/internal/chat/message-feedback.d.ts.map +1 -0
- package/dist/internal/chat/message-feedback.js +188 -0
- package/dist/internal/chat/message-metadata.d.ts.map +1 -1
- package/dist/internal/chat/message-metadata.js +7 -1
- package/dist/internal/chat/message-text.d.ts +9 -0
- package/dist/internal/chat/message-text.d.ts.map +1 -0
- package/dist/internal/chat/message-text.js +15 -0
- package/dist/internal/chat/message.d.ts +4 -2
- package/dist/internal/chat/message.d.ts.map +1 -1
- package/dist/internal/chat/message.js +10 -6
- package/dist/internal/chat/options.d.ts +94 -0
- package/dist/internal/chat/options.d.ts.map +1 -0
- package/dist/internal/chat/options.js +171 -0
- package/dist/internal/chat/page-attachment.d.ts +12 -0
- package/dist/internal/chat/page-attachment.d.ts.map +1 -0
- package/dist/internal/chat/page-attachment.js +18 -0
- package/dist/internal/chat/session-provider.d.ts +33 -0
- package/dist/internal/chat/session-provider.d.ts.map +1 -0
- package/dist/internal/chat/session-provider.js +138 -0
- package/dist/internal/chat/session.d.ts +60 -0
- package/dist/internal/chat/session.d.ts.map +1 -0
- package/dist/internal/chat/session.js +85 -0
- package/dist/internal/chat/shell.d.ts.map +1 -1
- package/dist/internal/chat/shell.js +81 -157
- package/dist/internal/chat/use-chat-commands.d.ts +28 -0
- package/dist/internal/chat/use-chat-commands.d.ts.map +1 -0
- package/dist/internal/chat/use-chat-commands.js +62 -0
- package/dist/internal/chat/user-avatar.d.ts +7 -0
- package/dist/internal/chat/user-avatar.d.ts.map +1 -0
- package/dist/internal/chat/user-avatar.js +27 -0
- package/dist/internal/eve-agent-session-cookie.d.ts +68 -0
- package/dist/internal/eve-agent-session-cookie.d.ts.map +1 -0
- package/dist/internal/eve-agent-session-cookie.js +164 -0
- package/dist/internal/eve-agent-session.d.ts +9 -7
- package/dist/internal/eve-agent-session.d.ts.map +1 -1
- package/dist/internal/eve-agent-session.js +10 -13
- package/dist/internal/eve-agent.d.ts +96 -24
- package/dist/internal/eve-agent.d.ts.map +1 -1
- package/dist/internal/eve-agent.js +74 -51
- package/dist/internal/feedback-action.d.ts +14 -0
- package/dist/internal/feedback-action.d.ts.map +1 -1
- package/dist/internal/feedback-action.js +37 -5
- package/dist/internal/page-actions-client.d.ts +9 -0
- package/dist/internal/page-actions-client.d.ts.map +1 -1
- package/dist/internal/page-actions-client.js +8 -4
- package/dist/internal/provider-client.d.ts.map +1 -1
- package/dist/internal/provider-client.js +2 -2
- package/dist/internal/use-mobile.d.ts +7 -0
- package/dist/internal/use-mobile.d.ts.map +1 -1
- package/dist/internal/use-mobile.js +17 -1
- package/dist/internal/webmcp-client.d.ts.map +1 -1
- package/dist/internal/webmcp-client.js +13 -3
- package/dist/internal/webmcp.d.ts +5 -1
- package/dist/internal/webmcp.d.ts.map +1 -1
- package/dist/internal/webmcp.js +31 -1
- package/dist/pages/changelog.d.ts.map +1 -1
- package/dist/pages/changelog.js +4 -0
- package/dist/pages/docs.d.ts.map +1 -1
- package/dist/pages/docs.js +2 -0
- package/dist/providers/public/components/dialog.d.ts +27 -0
- package/dist/providers/public/components/dialog.d.ts.map +1 -0
- package/dist/providers/public/components/dialog.js +17 -0
- package/dist/routes/chat.d.ts +83 -5
- package/dist/routes/chat.d.ts.map +1 -1
- package/dist/routes/chat.js +517 -80
- package/dist/routes/discovery.d.ts +1 -1
- package/dist/routes/discovery.d.ts.map +1 -1
- package/dist/routes/discovery.js +7 -11
- package/dist/routes/openapi.d.ts.map +1 -1
- package/dist/routes/openapi.js +47 -25
- package/docs/agents.md +4 -3
- package/docs/llms.txt +711 -35
- package/docs/manifest.json +12 -3
- package/docs/pages/agent-readiness.md +1 -1
- package/docs/pages/ask-ai.md +567 -24
- package/docs/pages/components/dialog.md +74 -0
- package/docs/pages/components/index.md +1 -0
- package/docs/pages/configuration.md +21 -1
- package/docs/pages/env.md +17 -3
- package/docs/pages/feedback.md +4 -0
- package/docs/pages/webmcp.md +18 -3
- package/docs/sitemap.md +2 -1
- package/package.json +5 -2
- package/public-foundation.css +12 -0
- package/template/.env.example +5 -0
- package/template/AGENTS.md +2 -0
- package/template/components/geistdocs/dialog-demo.tsx +44 -0
- package/template/content/docs/agent-readiness.mdx +1 -1
- package/template/content/docs/ask-ai.cn.mdx +466 -15
- package/template/content/docs/ask-ai.mdx +567 -24
- package/template/content/docs/components/dialog.mdx +70 -0
- package/template/content/docs/components/index.mdx +1 -0
- package/template/content/docs/components/meta.json +1 -0
- package/template/content/docs/configuration.cn.mdx +39 -0
- package/template/content/docs/configuration.mdx +21 -1
- package/template/content/docs/env.cn.mdx +15 -1
- package/template/content/docs/env.mdx +18 -4
- package/template/content/docs/feedback.cn.mdx +4 -0
- package/template/content/docs/feedback.mdx +4 -0
- package/template/content/docs/webmcp.mdx +18 -3
- package/template/package.json +1 -2
- package/dist/providers/public/components/modal.d.ts +0 -22
- package/dist/providers/public/components/modal.d.ts.map +0 -1
- 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-cookie.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,eAAe,0BAA0B,CAAC;AACvD,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,wBAAwB,0BAA0B,CAAC;AAChE,eAAO,MAAM,iCAAiC,QAAmB,CAAC;AAYlE,MAAM,WAAW,qBAAqB;IACpC,gEAAgE;IAChE,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAYD,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,qBAAqB,GAAG,IAAI,CAAC;IACtD,8DAA8D;IAC9D,IAAI,EAAE,CAAC,OAAO,EAAE,qBAAqB,KAAK,MAAM,CAAC;IACjD;;;;OAIG;IACH,GAAG,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC;AAcD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,SAM9C,CAAC;AAEF,eAAO,MAAM,gCAAgC,GAAI,mCAK9C;IACD,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,KAAG,0BA6EH,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,EAAE,UAAU,MAAM,YAQhE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,GAAG,IAAI,EAAE,MAAM,MAAM,aAwBnE,CAAC;AAgBF;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,GAAI,OAAO,MAAM,EAAE,KAAK,OAAO,WAczE,CAAC"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { createHmac, timingSafeEqual } from "node: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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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<
|
|
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
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
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
|
|
21
|
+
return false;
|
|
25
22
|
}
|
|
26
23
|
};
|
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
import type { UIMessage, UIMessageChunk, UIMessageStreamWriter } from "ai";
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
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
|
-
/**
|
|
24
|
-
|
|
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
|
-
*
|
|
31
|
-
* message.
|
|
32
|
-
*
|
|
33
|
-
*
|
|
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
|
|
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
|
|
55
|
-
* for example after the
|
|
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
|
|
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<
|
|
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
|
-
*
|
|
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
|
|
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;
|
|
1
|
+
{"version":3,"file":"eve-agent.d.ts","sourceRoot":"","sources":["../../src/internal/eve-agent.ts"],"names":[],"mappings":"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"}
|