@case-framework/survey-assistant 0.3.0 → 0.5.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/README.md +20 -4
- package/dist/capabilities-default.d.mts +1 -1
- package/dist/capabilities-default.mjs +1 -1
- package/dist/{constants-DrGZXtQf.d.mts → constants-DbrJxxOh.d.mts} +5 -2
- package/dist/constants-DbrJxxOh.d.mts.map +1 -0
- package/dist/{controller-proxy-DmBdzqKs.d.mts → controller-proxy-BdKF2yrq.d.mts} +2 -2
- package/dist/{controller-proxy-DmBdzqKs.d.mts.map → controller-proxy-BdKF2yrq.d.mts.map} +1 -1
- package/dist/{controller-proxy-CpkQRezb.mjs → controller-proxy-jWIPOZAv.mjs} +17 -8
- package/dist/controller-proxy-jWIPOZAv.mjs.map +1 -0
- package/dist/{engine-CWTuN3o2.mjs → engine-DcSdLRle.mjs} +172 -12
- package/dist/engine-DcSdLRle.mjs.map +1 -0
- package/dist/engine.d.mts +2 -2
- package/dist/engine.mjs +3 -3
- package/dist/{form-authoring-DCd9XfXf.mjs → form-authoring-BQh40yDb.mjs} +2 -2
- package/dist/{form-authoring-DCd9XfXf.mjs.map → form-authoring-BQh40yDb.mjs.map} +1 -1
- package/dist/{index-D4OitUg4.d.mts → index-BApnIiCI.d.mts} +7 -4
- package/dist/index-BApnIiCI.d.mts.map +1 -0
- package/dist/{index-Bo4dHAo8.d.mts → index-Da_Hb9-1.d.mts} +28 -4
- package/dist/index-Da_Hb9-1.d.mts.map +1 -0
- package/dist/{index-DZk20e3k.d.mts → index-DhNQKOwr.d.mts} +9 -5
- package/dist/index-DhNQKOwr.d.mts.map +1 -0
- package/dist/{index-Dxgg0-D_.d.mts → index-dV6df0W3.d.mts} +11 -5
- package/dist/index-dV6df0W3.d.mts.map +1 -0
- package/dist/{memory-thread-repository-acbz6HZJ.mjs → memory-thread-repository-CvYZwni6.mjs} +87 -28
- package/dist/memory-thread-repository-CvYZwni6.mjs.map +1 -0
- package/dist/{protocol-DATvkr1S.mjs → protocol-DJUP4gc0.mjs} +10 -4
- package/dist/protocol-DJUP4gc0.mjs.map +1 -0
- package/dist/protocol.d.mts +1 -1
- package/dist/protocol.mjs +1 -1
- package/dist/{react-Br5YE8H-.mjs → react-CY6N7lVi.mjs} +25 -5
- package/dist/react-CY6N7lVi.mjs.map +1 -0
- package/dist/react-integration.d.mts +1 -1
- package/dist/react-integration.mjs +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.mjs +2 -2
- package/dist/{request-context-BEjnaaFr.mjs → request-context-D1sC54ZA.mjs} +3 -3
- package/dist/request-context-D1sC54ZA.mjs.map +1 -0
- package/dist/server-agent.d.mts +8 -6
- package/dist/server-agent.d.mts.map +1 -1
- package/dist/server-agent.mjs +4 -3
- package/dist/server-agent.mjs.map +1 -1
- package/dist/server-runtime.d.mts +354 -7
- package/dist/server-runtime.d.mts.map +1 -1
- package/dist/server-runtime.mjs +361 -24
- package/dist/server-runtime.mjs.map +1 -1
- package/dist/server-tasks.d.mts +1 -1
- package/dist/server-tasks.mjs +5 -4
- package/dist/server-tasks.mjs.map +1 -1
- package/dist/server-tools.d.mts +1 -1
- package/dist/server-tools.mjs +1 -1
- package/dist/server.d.mts +7 -7
- package/dist/server.d.mts.map +1 -1
- package/dist/server.mjs +2 -2
- package/dist/storage-postgres.mjs +3 -0
- package/dist/storage-postgres.mjs.map +1 -1
- package/dist/{tasks-DQgL449A.d.mts → tasks-CCtxjhwh.d.mts} +3 -3
- package/dist/{tasks-DQgL449A.d.mts.map → tasks-CCtxjhwh.d.mts.map} +1 -1
- package/dist/{thread-handlers-CeYl45xG.d.mts → thread-handlers-Bt9cDo-F.d.mts} +21 -6
- package/dist/{thread-handlers-CeYl45xG.d.mts.map → thread-handlers-Bt9cDo-F.d.mts.map} +1 -1
- package/dist/{tools-Dg9HZrYU.mjs → tools-3tq-XqI0.mjs} +31 -6
- package/dist/{tools-Dg9HZrYU.mjs.map → tools-3tq-XqI0.mjs.map} +1 -1
- package/dist/ui.css +1 -1
- package/dist/ui.d.mts +3 -3
- package/dist/ui.d.mts.map +1 -1
- package/dist/ui.mjs +438 -140
- package/dist/ui.mjs.map +1 -1
- package/docs/integration.md +113 -58
- package/package.json +3 -3
- package/dist/constants-DrGZXtQf.d.mts.map +0 -1
- package/dist/controller-proxy-CpkQRezb.mjs.map +0 -1
- package/dist/engine-CWTuN3o2.mjs.map +0 -1
- package/dist/index-Bo4dHAo8.d.mts.map +0 -1
- package/dist/index-D4OitUg4.d.mts.map +0 -1
- package/dist/index-DZk20e3k.d.mts.map +0 -1
- package/dist/index-Dxgg0-D_.d.mts.map +0 -1
- package/dist/memory-thread-repository-acbz6HZJ.mjs.map +0 -1
- package/dist/protocol-DATvkr1S.mjs.map +0 -1
- package/dist/react-Br5YE8H-.mjs.map +0 -1
- package/dist/request-context-BEjnaaFr.mjs.map +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { t as SurveyAssistantModelCatalog } from "./index-
|
|
2
|
-
import {
|
|
1
|
+
import { t as SurveyAssistantModelCatalog } from "./index-BApnIiCI.mjs";
|
|
2
|
+
import { Ut as SurveyAssistantCapabilitySet } from "./index-Da_Hb9-1.mjs";
|
|
3
3
|
import { a as SurveyAssistantThreadDocumentRepository } from "./thread-documents-Dvo6XS7o.mjs";
|
|
4
|
-
import { a as SurveyAssistantModelSelection } from "./constants-
|
|
4
|
+
import { a as SurveyAssistantModelSelection } from "./constants-DbrJxxOh.mjs";
|
|
5
5
|
import { SurveyAssistantObservationalMemoryOptions, createSurveyAssistantAgent } from "./server-agent.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import { c as createSurveyAssistantTaskAgent, n as CreateSurveyAssistantTaskHandlerOptions, s as SurveyAssistantTaskModelResolutionInput } from "./tasks-
|
|
6
|
+
import { d as SurveyAssistantChatHandlerOptions, k as SurveyAssistantRequestLimits, l as SurveyAssistantAuthorize, p as SurveyAssistantResolveModel, t as CreateSurveyAssistantThreadHandlersOptions } from "./thread-handlers-Bt9cDo-F.mjs";
|
|
7
|
+
import { c as createSurveyAssistantTaskAgent, n as CreateSurveyAssistantTaskHandlerOptions, s as SurveyAssistantTaskModelResolutionInput } from "./tasks-CCtxjhwh.mjs";
|
|
8
|
+
import { z } from "zod";
|
|
8
9
|
import { AgentExecutionOptions } from "@mastra/core/agent";
|
|
9
10
|
import { AzureOpenAIGatewayConfig, MastraModelGatewayInterface } from "@mastra/core/llm";
|
|
10
11
|
import { Mastra } from "@mastra/core/mastra";
|
|
@@ -12,9 +13,16 @@ import { Mastra } from "@mastra/core/mastra";
|
|
|
12
13
|
//#region src/server/runtime-config.d.ts
|
|
13
14
|
type SurveyAssistantProvider = "azure-openai" | "lmstudio" | "mistral" | "openai";
|
|
14
15
|
type SurveyAssistantProviderOptionsKey = "azure" | "lmstudio" | "mistral" | "openai";
|
|
16
|
+
type SurveyAssistantModelRole = "chat-default" | "chat-picker" | "memory" | "task-default";
|
|
17
|
+
interface SurveyAssistantConfiguredModel {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
upstreamModelId: string;
|
|
21
|
+
providerOptions?: AgentExecutionOptions["providerOptions"];
|
|
22
|
+
}
|
|
15
23
|
interface SurveyAssistantAzureConfig {
|
|
16
24
|
apiKey?: string;
|
|
17
|
-
apiVersion:
|
|
25
|
+
apiVersion: "preview" | "v1";
|
|
18
26
|
discoverModels: boolean;
|
|
19
27
|
management?: AzureOpenAIGatewayConfig["management"];
|
|
20
28
|
resourceName?: string;
|
|
@@ -42,9 +50,13 @@ interface SurveyAssistantRuntimeConfig {
|
|
|
42
50
|
/** Fixed same-provider model shared by memory observation and reflection. */
|
|
43
51
|
memoryModelId: string;
|
|
44
52
|
modelCatalogTtlMs: number;
|
|
53
|
+
/** Every configured model for the active provider, including internal-only roles. */
|
|
54
|
+
models?: SurveyAssistantConfiguredModel[];
|
|
45
55
|
modelIds: string[];
|
|
46
56
|
observationalMemory: SurveyAssistantObservationalMemoryOptions | false;
|
|
47
57
|
provider: SurveyAssistantProvider;
|
|
58
|
+
/** Resolved server-only provider credential. Never expose it through the model catalog. */
|
|
59
|
+
providerApiKey?: string;
|
|
48
60
|
requestLimits: Pick<SurveyAssistantRequestLimits, "maxAttachmentBytes" | "maxAttachments" | "maxRequestBytes" | "maxTextPartChars" | "maxTotalAttachmentBytes">;
|
|
49
61
|
readinessError: string | null;
|
|
50
62
|
/**
|
|
@@ -59,11 +71,344 @@ interface ParseSurveyAssistantEnvironmentOptions {
|
|
|
59
71
|
defaultMistralModel?: string;
|
|
60
72
|
defaultOpenAIModel?: string;
|
|
61
73
|
defaultProvider?: SurveyAssistantProvider;
|
|
74
|
+
/**
|
|
75
|
+
* Adds an explicit production rollout gate to assistant enablement. When
|
|
76
|
+
* true, an otherwise enabled assistant remains disabled outside development
|
|
77
|
+
* unless `SURVEY_ASSISTANT_ALLOW_EXPERIMENTAL_IDENTITY=true` is also set.
|
|
78
|
+
*
|
|
79
|
+
* Despite the legacy environment-variable name, this does not select an
|
|
80
|
+
* identity authority or replace the host's authorization callback. Most
|
|
81
|
+
* hosts with authenticated identity integration should omit it unless they
|
|
82
|
+
* deliberately want the additional rollout gate.
|
|
83
|
+
*
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
62
86
|
requireExperimentalIdentityOptIn?: boolean;
|
|
63
87
|
requireStorage?: boolean;
|
|
64
88
|
}
|
|
65
89
|
type Environment = Record<string, string | undefined>;
|
|
90
|
+
declare const surveyAssistantConfigurationDocumentSchema: z.ZodObject<{
|
|
91
|
+
version: z.ZodLiteral<1>;
|
|
92
|
+
activeProvider: z.ZodString;
|
|
93
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
providers: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
95
|
+
type: z.ZodLiteral<"openai">;
|
|
96
|
+
apiKeyEnv: z.ZodString;
|
|
97
|
+
models: z.ZodArray<z.ZodObject<{
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
label: z.ZodOptional<z.ZodString>;
|
|
100
|
+
upstreamModel: z.ZodOptional<z.ZodString>;
|
|
101
|
+
roles: z.ZodArray<z.ZodEnum<{
|
|
102
|
+
memory: "memory";
|
|
103
|
+
"chat-default": "chat-default";
|
|
104
|
+
"chat-picker": "chat-picker";
|
|
105
|
+
"task-default": "task-default";
|
|
106
|
+
}>>;
|
|
107
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
108
|
+
parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
109
|
+
promptCacheKey: z.ZodOptional<z.ZodString>;
|
|
110
|
+
promptCacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
111
|
+
in_memory: "in_memory";
|
|
112
|
+
"24h": "24h";
|
|
113
|
+
}>>;
|
|
114
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
115
|
+
reasoningSummary: z.ZodOptional<z.ZodEnum<{
|
|
116
|
+
auto: "auto";
|
|
117
|
+
none: "none";
|
|
118
|
+
concise: "concise";
|
|
119
|
+
detailed: "detailed";
|
|
120
|
+
off: "off";
|
|
121
|
+
}>>;
|
|
122
|
+
serviceTier: z.ZodOptional<z.ZodEnum<{
|
|
123
|
+
default: "default";
|
|
124
|
+
auto: "auto";
|
|
125
|
+
flex: "flex";
|
|
126
|
+
priority: "priority";
|
|
127
|
+
}>>;
|
|
128
|
+
textVerbosity: z.ZodOptional<z.ZodEnum<{
|
|
129
|
+
low: "low";
|
|
130
|
+
medium: "medium";
|
|
131
|
+
high: "high";
|
|
132
|
+
}>>;
|
|
133
|
+
}, z.core.$strict>>;
|
|
134
|
+
}, z.core.$strict>>;
|
|
135
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
136
|
+
parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
137
|
+
promptCacheKey: z.ZodOptional<z.ZodString>;
|
|
138
|
+
promptCacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
139
|
+
in_memory: "in_memory";
|
|
140
|
+
"24h": "24h";
|
|
141
|
+
}>>;
|
|
142
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
143
|
+
reasoningSummary: z.ZodOptional<z.ZodEnum<{
|
|
144
|
+
auto: "auto";
|
|
145
|
+
none: "none";
|
|
146
|
+
concise: "concise";
|
|
147
|
+
detailed: "detailed";
|
|
148
|
+
off: "off";
|
|
149
|
+
}>>;
|
|
150
|
+
serviceTier: z.ZodOptional<z.ZodEnum<{
|
|
151
|
+
default: "default";
|
|
152
|
+
auto: "auto";
|
|
153
|
+
flex: "flex";
|
|
154
|
+
priority: "priority";
|
|
155
|
+
}>>;
|
|
156
|
+
textVerbosity: z.ZodOptional<z.ZodEnum<{
|
|
157
|
+
low: "low";
|
|
158
|
+
medium: "medium";
|
|
159
|
+
high: "high";
|
|
160
|
+
}>>;
|
|
161
|
+
}, z.core.$strict>>;
|
|
162
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
163
|
+
type: z.ZodLiteral<"mistral">;
|
|
164
|
+
apiKeyEnv: z.ZodString;
|
|
165
|
+
models: z.ZodArray<z.ZodObject<{
|
|
166
|
+
id: z.ZodString;
|
|
167
|
+
label: z.ZodOptional<z.ZodString>;
|
|
168
|
+
upstreamModel: z.ZodOptional<z.ZodString>;
|
|
169
|
+
roles: z.ZodArray<z.ZodEnum<{
|
|
170
|
+
memory: "memory";
|
|
171
|
+
"chat-default": "chat-default";
|
|
172
|
+
"chat-picker": "chat-picker";
|
|
173
|
+
"task-default": "task-default";
|
|
174
|
+
}>>;
|
|
175
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
176
|
+
parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
177
|
+
promptCacheKey: z.ZodOptional<z.ZodString>;
|
|
178
|
+
promptCacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
179
|
+
in_memory: "in_memory";
|
|
180
|
+
"24h": "24h";
|
|
181
|
+
}>>;
|
|
182
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
183
|
+
reasoningSummary: z.ZodOptional<z.ZodEnum<{
|
|
184
|
+
auto: "auto";
|
|
185
|
+
none: "none";
|
|
186
|
+
concise: "concise";
|
|
187
|
+
detailed: "detailed";
|
|
188
|
+
off: "off";
|
|
189
|
+
}>>;
|
|
190
|
+
serviceTier: z.ZodOptional<z.ZodEnum<{
|
|
191
|
+
default: "default";
|
|
192
|
+
auto: "auto";
|
|
193
|
+
flex: "flex";
|
|
194
|
+
priority: "priority";
|
|
195
|
+
}>>;
|
|
196
|
+
textVerbosity: z.ZodOptional<z.ZodEnum<{
|
|
197
|
+
low: "low";
|
|
198
|
+
medium: "medium";
|
|
199
|
+
high: "high";
|
|
200
|
+
}>>;
|
|
201
|
+
}, z.core.$strict>>;
|
|
202
|
+
}, z.core.$strict>>;
|
|
203
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
204
|
+
parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
205
|
+
promptCacheKey: z.ZodOptional<z.ZodString>;
|
|
206
|
+
promptCacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
207
|
+
in_memory: "in_memory";
|
|
208
|
+
"24h": "24h";
|
|
209
|
+
}>>;
|
|
210
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
211
|
+
reasoningSummary: z.ZodOptional<z.ZodEnum<{
|
|
212
|
+
auto: "auto";
|
|
213
|
+
none: "none";
|
|
214
|
+
concise: "concise";
|
|
215
|
+
detailed: "detailed";
|
|
216
|
+
off: "off";
|
|
217
|
+
}>>;
|
|
218
|
+
serviceTier: z.ZodOptional<z.ZodEnum<{
|
|
219
|
+
default: "default";
|
|
220
|
+
auto: "auto";
|
|
221
|
+
flex: "flex";
|
|
222
|
+
priority: "priority";
|
|
223
|
+
}>>;
|
|
224
|
+
textVerbosity: z.ZodOptional<z.ZodEnum<{
|
|
225
|
+
low: "low";
|
|
226
|
+
medium: "medium";
|
|
227
|
+
high: "high";
|
|
228
|
+
}>>;
|
|
229
|
+
}, z.core.$strict>>;
|
|
230
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
231
|
+
type: z.ZodLiteral<"lmstudio">;
|
|
232
|
+
baseUrl: z.ZodDefault<z.ZodString>;
|
|
233
|
+
apiKeyOptional: z.ZodDefault<z.ZodBoolean>;
|
|
234
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
235
|
+
models: z.ZodArray<z.ZodObject<{
|
|
236
|
+
id: z.ZodString;
|
|
237
|
+
label: z.ZodOptional<z.ZodString>;
|
|
238
|
+
upstreamModel: z.ZodOptional<z.ZodString>;
|
|
239
|
+
roles: z.ZodArray<z.ZodEnum<{
|
|
240
|
+
memory: "memory";
|
|
241
|
+
"chat-default": "chat-default";
|
|
242
|
+
"chat-picker": "chat-picker";
|
|
243
|
+
"task-default": "task-default";
|
|
244
|
+
}>>;
|
|
245
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
246
|
+
parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
247
|
+
promptCacheKey: z.ZodOptional<z.ZodString>;
|
|
248
|
+
promptCacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
249
|
+
in_memory: "in_memory";
|
|
250
|
+
"24h": "24h";
|
|
251
|
+
}>>;
|
|
252
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
253
|
+
reasoningSummary: z.ZodOptional<z.ZodEnum<{
|
|
254
|
+
auto: "auto";
|
|
255
|
+
none: "none";
|
|
256
|
+
concise: "concise";
|
|
257
|
+
detailed: "detailed";
|
|
258
|
+
off: "off";
|
|
259
|
+
}>>;
|
|
260
|
+
serviceTier: z.ZodOptional<z.ZodEnum<{
|
|
261
|
+
default: "default";
|
|
262
|
+
auto: "auto";
|
|
263
|
+
flex: "flex";
|
|
264
|
+
priority: "priority";
|
|
265
|
+
}>>;
|
|
266
|
+
textVerbosity: z.ZodOptional<z.ZodEnum<{
|
|
267
|
+
low: "low";
|
|
268
|
+
medium: "medium";
|
|
269
|
+
high: "high";
|
|
270
|
+
}>>;
|
|
271
|
+
}, z.core.$strict>>;
|
|
272
|
+
}, z.core.$strict>>;
|
|
273
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
274
|
+
parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
275
|
+
promptCacheKey: z.ZodOptional<z.ZodString>;
|
|
276
|
+
promptCacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
277
|
+
in_memory: "in_memory";
|
|
278
|
+
"24h": "24h";
|
|
279
|
+
}>>;
|
|
280
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
281
|
+
reasoningSummary: z.ZodOptional<z.ZodEnum<{
|
|
282
|
+
auto: "auto";
|
|
283
|
+
none: "none";
|
|
284
|
+
concise: "concise";
|
|
285
|
+
detailed: "detailed";
|
|
286
|
+
off: "off";
|
|
287
|
+
}>>;
|
|
288
|
+
serviceTier: z.ZodOptional<z.ZodEnum<{
|
|
289
|
+
default: "default";
|
|
290
|
+
auto: "auto";
|
|
291
|
+
flex: "flex";
|
|
292
|
+
priority: "priority";
|
|
293
|
+
}>>;
|
|
294
|
+
textVerbosity: z.ZodOptional<z.ZodEnum<{
|
|
295
|
+
low: "low";
|
|
296
|
+
medium: "medium";
|
|
297
|
+
high: "high";
|
|
298
|
+
}>>;
|
|
299
|
+
}, z.core.$strict>>;
|
|
300
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
301
|
+
type: z.ZodLiteral<"azure-openai">;
|
|
302
|
+
apiKeyEnv: z.ZodString;
|
|
303
|
+
apiVersion: z.ZodDefault<z.ZodEnum<{
|
|
304
|
+
v1: "v1";
|
|
305
|
+
preview: "preview";
|
|
306
|
+
}>>;
|
|
307
|
+
discoverModels: z.ZodDefault<z.ZodBoolean>;
|
|
308
|
+
resourceName: z.ZodString;
|
|
309
|
+
management: z.ZodOptional<z.ZodObject<{
|
|
310
|
+
tenantId: z.ZodString;
|
|
311
|
+
clientId: z.ZodString;
|
|
312
|
+
clientSecretEnv: z.ZodString;
|
|
313
|
+
subscriptionId: z.ZodString;
|
|
314
|
+
resourceGroup: z.ZodString;
|
|
315
|
+
}, z.core.$strict>>;
|
|
316
|
+
models: z.ZodArray<z.ZodObject<{
|
|
317
|
+
id: z.ZodString;
|
|
318
|
+
label: z.ZodOptional<z.ZodString>;
|
|
319
|
+
upstreamModel: z.ZodOptional<z.ZodString>;
|
|
320
|
+
roles: z.ZodArray<z.ZodEnum<{
|
|
321
|
+
memory: "memory";
|
|
322
|
+
"chat-default": "chat-default";
|
|
323
|
+
"chat-picker": "chat-picker";
|
|
324
|
+
"task-default": "task-default";
|
|
325
|
+
}>>;
|
|
326
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
327
|
+
parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
328
|
+
promptCacheKey: z.ZodOptional<z.ZodString>;
|
|
329
|
+
promptCacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
330
|
+
in_memory: "in_memory";
|
|
331
|
+
"24h": "24h";
|
|
332
|
+
}>>;
|
|
333
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
334
|
+
reasoningSummary: z.ZodOptional<z.ZodEnum<{
|
|
335
|
+
auto: "auto";
|
|
336
|
+
none: "none";
|
|
337
|
+
concise: "concise";
|
|
338
|
+
detailed: "detailed";
|
|
339
|
+
off: "off";
|
|
340
|
+
}>>;
|
|
341
|
+
serviceTier: z.ZodOptional<z.ZodEnum<{
|
|
342
|
+
default: "default";
|
|
343
|
+
auto: "auto";
|
|
344
|
+
flex: "flex";
|
|
345
|
+
priority: "priority";
|
|
346
|
+
}>>;
|
|
347
|
+
textVerbosity: z.ZodOptional<z.ZodEnum<{
|
|
348
|
+
low: "low";
|
|
349
|
+
medium: "medium";
|
|
350
|
+
high: "high";
|
|
351
|
+
}>>;
|
|
352
|
+
}, z.core.$strict>>;
|
|
353
|
+
}, z.core.$strict>>;
|
|
354
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
355
|
+
parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
356
|
+
promptCacheKey: z.ZodOptional<z.ZodString>;
|
|
357
|
+
promptCacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
358
|
+
in_memory: "in_memory";
|
|
359
|
+
"24h": "24h";
|
|
360
|
+
}>>;
|
|
361
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
362
|
+
reasoningSummary: z.ZodOptional<z.ZodEnum<{
|
|
363
|
+
auto: "auto";
|
|
364
|
+
none: "none";
|
|
365
|
+
concise: "concise";
|
|
366
|
+
detailed: "detailed";
|
|
367
|
+
off: "off";
|
|
368
|
+
}>>;
|
|
369
|
+
serviceTier: z.ZodOptional<z.ZodEnum<{
|
|
370
|
+
default: "default";
|
|
371
|
+
auto: "auto";
|
|
372
|
+
flex: "flex";
|
|
373
|
+
priority: "priority";
|
|
374
|
+
}>>;
|
|
375
|
+
textVerbosity: z.ZodOptional<z.ZodEnum<{
|
|
376
|
+
low: "low";
|
|
377
|
+
medium: "medium";
|
|
378
|
+
high: "high";
|
|
379
|
+
}>>;
|
|
380
|
+
}, z.core.$strict>>;
|
|
381
|
+
}, z.core.$strict>], "type">>;
|
|
382
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
383
|
+
firstResponseTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
384
|
+
idleTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
385
|
+
maxConcurrentRequests: z.ZodOptional<z.ZodNumber>;
|
|
386
|
+
maxDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
387
|
+
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
388
|
+
sendReasoning: z.ZodOptional<z.ZodBoolean>;
|
|
389
|
+
}, z.core.$strict>>;
|
|
390
|
+
memory: z.ZodOptional<z.ZodObject<{
|
|
391
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
392
|
+
bufferOnIdle: z.ZodOptional<z.ZodBoolean>;
|
|
393
|
+
messageTokens: z.ZodOptional<z.ZodNumber>;
|
|
394
|
+
observationTokens: z.ZodOptional<z.ZodNumber>;
|
|
395
|
+
temporalMarkers: z.ZodOptional<z.ZodBoolean>;
|
|
396
|
+
}, z.core.$strict>>;
|
|
397
|
+
modelCatalogTtlMs: z.ZodOptional<z.ZodNumber>;
|
|
398
|
+
requestLimits: z.ZodOptional<z.ZodObject<{
|
|
399
|
+
maxAttachmentBytes: z.ZodOptional<z.ZodNumber>;
|
|
400
|
+
maxAttachments: z.ZodOptional<z.ZodNumber>;
|
|
401
|
+
maxRequestBytes: z.ZodOptional<z.ZodNumber>;
|
|
402
|
+
maxTextPartChars: z.ZodOptional<z.ZodNumber>;
|
|
403
|
+
maxTotalAttachmentBytes: z.ZodOptional<z.ZodNumber>;
|
|
404
|
+
}, z.core.$strict>>;
|
|
405
|
+
}, z.core.$strict>;
|
|
406
|
+
type SurveyAssistantConfigurationDocument = z.infer<typeof surveyAssistantConfigurationDocumentSchema>;
|
|
66
407
|
declare const resolveSurveyAssistantProviderOptionsKey: (provider: SurveyAssistantProvider) => SurveyAssistantProviderOptionsKey;
|
|
408
|
+
declare const parseSurveyAssistantConfigurationDocument: (input: unknown, env: Environment, {
|
|
409
|
+
requireExperimentalIdentityOptIn,
|
|
410
|
+
requireStorage
|
|
411
|
+
}?: Pick<ParseSurveyAssistantEnvironmentOptions, "requireExperimentalIdentityOptIn" | "requireStorage">) => SurveyAssistantRuntimeConfig;
|
|
67
412
|
declare const parseSurveyAssistantEnvironment: (env: Environment, {
|
|
68
413
|
defaultLmStudioModel,
|
|
69
414
|
defaultMistralModel,
|
|
@@ -108,6 +453,7 @@ interface CreateSurveyAssistantRuntimeHandlersOptions {
|
|
|
108
453
|
mastra: Mastra | (() => Mastra | Promise<Mastra>);
|
|
109
454
|
modelRouter: SurveyAssistantModelRouter;
|
|
110
455
|
task?: TaskHandlerOverrides;
|
|
456
|
+
threads?: Pick<CreateSurveyAssistantThreadHandlersOptions, "onError">;
|
|
111
457
|
threadDocuments?: SurveyAssistantThreadDocumentRepository;
|
|
112
458
|
}
|
|
113
459
|
type CreateConfiguredSurveyAssistantRuntimeHandlersOptions = Omit<CreateSurveyAssistantRuntimeHandlersOptions, "config" | "modelRouter">;
|
|
@@ -118,6 +464,7 @@ declare const createSurveyAssistantRuntimeHandlers: ({
|
|
|
118
464
|
mastra,
|
|
119
465
|
modelRouter,
|
|
120
466
|
task,
|
|
467
|
+
threads: threadOptions,
|
|
121
468
|
threadDocuments
|
|
122
469
|
}: CreateSurveyAssistantRuntimeHandlersOptions) => {
|
|
123
470
|
chat: (request: Request) => Promise<Response>;
|
|
@@ -146,5 +493,5 @@ interface CreateSurveyAssistantRuntimeOptions {
|
|
|
146
493
|
*/
|
|
147
494
|
declare const createSurveyAssistantRuntime: (config: SurveyAssistantRuntimeConfig, runtimeOptions?: CreateSurveyAssistantRuntimeOptions) => SurveyAssistantRuntime;
|
|
148
495
|
//#endregion
|
|
149
|
-
export { CreateConfiguredSurveyAssistantRuntimeHandlersOptions, CreateSurveyAssistantRuntimeHandlersOptions, CreateSurveyAssistantRuntimeOptions, type ParseSurveyAssistantEnvironmentOptions, type SurveyAssistantAzureConfig, type SurveyAssistantExecutionConfig, type SurveyAssistantLmStudioConfig, SurveyAssistantModelRouter, type SurveyAssistantProvider, type SurveyAssistantProviderOptionsKey, SurveyAssistantRuntime, SurveyAssistantRuntimeComponents, type SurveyAssistantRuntimeConfig, createSurveyAssistantModelRouter, createSurveyAssistantRuntime, createSurveyAssistantRuntimeComponents, createSurveyAssistantRuntimeHandlers, parseSurveyAssistantEnvironment, resolveSurveyAssistantProviderOptionsKey };
|
|
496
|
+
export { CreateConfiguredSurveyAssistantRuntimeHandlersOptions, CreateSurveyAssistantRuntimeHandlersOptions, CreateSurveyAssistantRuntimeOptions, type ParseSurveyAssistantEnvironmentOptions, type SurveyAssistantAzureConfig, type SurveyAssistantConfigurationDocument, type SurveyAssistantConfiguredModel, type SurveyAssistantExecutionConfig, type SurveyAssistantLmStudioConfig, type SurveyAssistantModelRole, SurveyAssistantModelRouter, type SurveyAssistantProvider, type SurveyAssistantProviderOptionsKey, SurveyAssistantRuntime, SurveyAssistantRuntimeComponents, type SurveyAssistantRuntimeConfig, createSurveyAssistantModelRouter, createSurveyAssistantRuntime, createSurveyAssistantRuntimeComponents, createSurveyAssistantRuntimeHandlers, parseSurveyAssistantConfigurationDocument, parseSurveyAssistantEnvironment, resolveSurveyAssistantProviderOptionsKey, surveyAssistantConfigurationDocumentSchema };
|
|
150
497
|
//# sourceMappingURL=server-runtime.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-runtime.d.mts","names":[],"sources":["../src/server/runtime-config.ts","../src/server/runtime.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"server-runtime.d.mts","names":[],"sources":["../src/server/runtime-config.ts","../src/server/runtime.ts"],"mappings":";;;;;;;;;;;;;KAaY,uBAAA;AAAA,KACA,iCAAA;AAAA,KAEA,wBAAA;AAAA,UAEK,8BAAA;EACf,EAAA;EACA,KAAA;EACA,eAAA;EACA,eAAA,GAAkB,qBAAA;AAAA;AAAA,UAGH,0BAAA;EACf,MAAA;EACA,UAAA;EACA,cAAA;EACA,UAAA,GAAa,wBAAA;EACb,YAAA;AAAA;AAAA,UAGe,6BAAA;EACf,MAAA;EACA,OAAA;AAAA;AAAA,UAGe,8BAAA;EACf,sBAAA;EACA,aAAA;EACA,qBAAA;EAvB6C;EAyB7C,aAAA;EACA,QAAA;EACA,eAAA,GAAkB,qBAAA;EAClB,aAAA;AAAA;AAAA,UAGe,4BAAA;EACf,KAAA,GAAQ,0BAAA;EACR,QAAA,GAAW,6BAAA;EA7B4B;EA+BvC,cAAA;EACA,OAAA;;EAEA,aAAA;EACA,iBAAA;EA9BA;EAgCA,MAAA,GAAS,8BAAA;EACT,QAAA;EACA,mBAAA,EAAqB,yCAAA;EACrB,QAAA,EAAU,uBAAA;EAhCE;EAkCZ,cAAA;EACA,aAAA,EAAe,IAAA,CACb,4B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