@meistrari/chat-nuxt 3.17.0-rc.3 → 3.17.0-rc.4
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/module.d.mts +7 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -1
- package/dist/runtime/server/utils/chat-api-proxy.js +4 -1
- package/dist/runtime/types/schemas/chat/chat-config.d.ts +1 -0
- package/dist/runtime/types/schemas/chat/chat-config.js +1 -0
- package/package.json +1 -1
package/dist/module.d.mts
CHANGED
|
@@ -34,6 +34,13 @@ interface ChatNuxtModuleOptions {
|
|
|
34
34
|
* `NUXT_CHAT_NUXT_SECRETLESS_EXECUTION`.
|
|
35
35
|
*/
|
|
36
36
|
secretlessExecution?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Opt this deployment into the experimental agent-api v5 snapshot path: the
|
|
39
|
+
* server proxy adds `"agent-api-v5": true` to the `x-chat-config` header, so
|
|
40
|
+
* wake and execute prefer the published snapshot (with v4 fallback). Defaults
|
|
41
|
+
* to `false`; also settable via `NUXT_CHAT_NUXT_AGENT_API_V5`.
|
|
42
|
+
*/
|
|
43
|
+
agentApiV5?: boolean;
|
|
37
44
|
}
|
|
38
45
|
declare const _default: any;
|
|
39
46
|
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -451,7 +451,8 @@ const module$1 = defineNuxtModule({
|
|
|
451
451
|
authTokenCookie: hostAuthComposablePath ? options.authTokenCookie || existingChatNuxtRuntimeConfig?.authTokenCookie : void 0,
|
|
452
452
|
// Explicit boolean default keeps the key in runtime config so the
|
|
453
453
|
// NUXT_CHAT_NUXT_SECRETLESS_EXECUTION env override can apply.
|
|
454
|
-
secretlessExecution: options.secretlessExecution ?? existingChatNuxtRuntimeConfig?.secretlessExecution ?? false
|
|
454
|
+
secretlessExecution: options.secretlessExecution ?? existingChatNuxtRuntimeConfig?.secretlessExecution ?? false,
|
|
455
|
+
agentApiV5: options.agentApiV5 ?? existingChatNuxtRuntimeConfig?.agentApiV5 ?? false
|
|
455
456
|
};
|
|
456
457
|
if (hostAuthComposablePath && !rc.chatNuxt.authTokenCookie) {
|
|
457
458
|
console.warn(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PREPARED_AGENT_RUNTIME_CONFIG_KEY, SECRETLESS_EXECUTION_CONFIG_KEY } from "../../types/schemas/chat/chat-config.js";
|
|
1
|
+
import { AGENT_API_V5_CONFIG_KEY, PREPARED_AGENT_RUNTIME_CONFIG_KEY, SECRETLESS_EXECUTION_CONFIG_KEY } from "../../types/schemas/chat/chat-config.js";
|
|
2
2
|
import { createError, defineEventHandler, getHeader, getRequestURL, getRouterParam, proxyRequest } from "h3";
|
|
3
3
|
import { useRuntimeConfig } from "nitropack/runtime";
|
|
4
4
|
import { resolveAuthToken } from "./auth-token.js";
|
|
@@ -64,6 +64,9 @@ function buildProxyHeaders(event) {
|
|
|
64
64
|
if (config.chatNuxt?.secretlessExecution) {
|
|
65
65
|
chatConfig[SECRETLESS_EXECUTION_CONFIG_KEY] = true;
|
|
66
66
|
}
|
|
67
|
+
if (config.chatNuxt?.agentApiV5) {
|
|
68
|
+
chatConfig[AGENT_API_V5_CONFIG_KEY] = true;
|
|
69
|
+
}
|
|
67
70
|
const headers = {
|
|
68
71
|
"authorization": `Bearer ${token}`,
|
|
69
72
|
"x-chat-client": "chat-nuxt",
|