@dexto/core 1.5.0 → 1.5.1
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/agent/schemas.d.ts +48 -0
- package/dist/agent/schemas.d.ts.map +1 -1
- package/dist/events/index.cjs +4 -1
- package/dist/events/index.d.ts +20 -4
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +3 -1
- package/dist/llm/executor/provider-options.cjs +87 -0
- package/dist/llm/executor/provider-options.d.ts +49 -0
- package/dist/llm/executor/provider-options.d.ts.map +1 -0
- package/dist/llm/executor/provider-options.js +63 -0
- package/dist/llm/executor/stream-processor.cjs +11 -8
- package/dist/llm/executor/stream-processor.d.ts.map +1 -1
- package/dist/llm/executor/stream-processor.js +11 -8
- package/dist/llm/executor/turn-executor.cjs +10 -0
- package/dist/llm/executor/turn-executor.d.ts +1 -0
- package/dist/llm/executor/turn-executor.d.ts.map +1 -1
- package/dist/llm/executor/turn-executor.js +10 -0
- package/dist/llm/formatters/vercel.cjs +9 -1
- package/dist/llm/formatters/vercel.d.ts.map +1 -1
- package/dist/llm/formatters/vercel.js +9 -1
- package/dist/llm/registry.cjs +69 -0
- package/dist/llm/registry.d.ts +9 -0
- package/dist/llm/registry.d.ts.map +1 -1
- package/dist/llm/registry.js +68 -0
- package/dist/llm/schemas.cjs +17 -1
- package/dist/llm/schemas.d.ts +23 -0
- package/dist/llm/schemas.d.ts.map +1 -1
- package/dist/llm/schemas.js +17 -1
- package/dist/llm/services/vercel.cjs +3 -1
- package/dist/llm/services/vercel.d.ts.map +1 -1
- package/dist/llm/services/vercel.js +3 -1
- package/dist/logger/logger.cjs +7 -3
- package/dist/logger/logger.d.ts.map +1 -1
- package/dist/logger/logger.js +7 -3
- package/dist/memory/schemas.d.ts +2 -2
- package/dist/providers/discovery.cjs +14 -0
- package/dist/providers/discovery.d.ts +4 -2
- package/dist/providers/discovery.d.ts.map +1 -1
- package/dist/providers/discovery.js +14 -0
- package/dist/session/history/database.cjs +49 -15
- package/dist/session/history/database.d.ts.map +1 -1
- package/dist/session/history/database.js +49 -15
- package/dist/session/session-manager.cjs +2 -1
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +2 -1
- package/dist/storage/database/postgres-store.cjs +174 -78
- package/dist/storage/database/postgres-store.d.ts +19 -0
- package/dist/storage/database/postgres-store.d.ts.map +1 -1
- package/dist/storage/database/postgres-store.js +174 -78
- package/dist/storage/database/schemas.cjs +4 -1
- package/dist/storage/database/schemas.d.ts +8 -0
- package/dist/storage/database/schemas.d.ts.map +1 -1
- package/dist/storage/database/schemas.js +4 -1
- package/dist/storage/schemas.d.ts +7 -0
- package/dist/storage/schemas.d.ts.map +1 -1
- package/dist/tools/custom-tool-registry.d.ts +9 -3
- package/dist/tools/custom-tool-registry.d.ts.map +1 -1
- package/dist/tools/internal-tools/provider.cjs +5 -2
- package/dist/tools/internal-tools/provider.d.ts.map +1 -1
- package/dist/tools/internal-tools/provider.js +5 -2
- package/package.json +1 -1
package/dist/llm/schemas.cjs
CHANGED
|
@@ -48,6 +48,20 @@ const LLMConfigFields = {
|
|
|
48
48
|
temperature: import_zod.z.coerce.number().min(0).max(1).optional().describe("Randomness: 0 deterministic, 1 creative"),
|
|
49
49
|
allowedMediaTypes: import_zod.z.array(import_zod.z.string()).optional().describe(
|
|
50
50
|
'MIME type patterns for media expansion (e.g., "image/*", "application/pdf"). If omitted, uses model capabilities from registry. Supports wildcards.'
|
|
51
|
+
),
|
|
52
|
+
// Provider-specific options
|
|
53
|
+
/**
|
|
54
|
+
* OpenAI reasoning effort level for reasoning-capable models (o1, o3, codex, gpt-5.x).
|
|
55
|
+
* Controls how many reasoning tokens the model generates before producing a response.
|
|
56
|
+
* - 'none': No reasoning, fastest responses
|
|
57
|
+
* - 'minimal': Barely any reasoning, very fast responses
|
|
58
|
+
* - 'low': Light reasoning, fast responses
|
|
59
|
+
* - 'medium': Balanced reasoning (OpenAI's recommended daily driver)
|
|
60
|
+
* - 'high': Thorough reasoning for complex tasks
|
|
61
|
+
* - 'xhigh': Extra high reasoning for quality-critical, non-latency-sensitive tasks
|
|
62
|
+
*/
|
|
63
|
+
reasoningEffort: import_zod.z.enum(["none", "minimal", "low", "medium", "high", "xhigh"]).optional().describe(
|
|
64
|
+
"OpenAI reasoning effort level for reasoning models (o1, o3, codex). Options: 'none', 'minimal', 'low', 'medium' (recommended), 'high', 'xhigh'"
|
|
51
65
|
)
|
|
52
66
|
};
|
|
53
67
|
const LLMConfigBaseSchema = import_zod.z.object({
|
|
@@ -61,7 +75,9 @@ const LLMConfigBaseSchema = import_zod.z.object({
|
|
|
61
75
|
maxInputTokens: LLMConfigFields.maxInputTokens,
|
|
62
76
|
maxOutputTokens: LLMConfigFields.maxOutputTokens,
|
|
63
77
|
temperature: LLMConfigFields.temperature,
|
|
64
|
-
allowedMediaTypes: LLMConfigFields.allowedMediaTypes
|
|
78
|
+
allowedMediaTypes: LLMConfigFields.allowedMediaTypes,
|
|
79
|
+
// Provider-specific options
|
|
80
|
+
reasoningEffort: LLMConfigFields.reasoningEffort
|
|
65
81
|
}).strict();
|
|
66
82
|
function createLLMConfigSchema(options = {}) {
|
|
67
83
|
const { strict = true } = options;
|
package/dist/llm/schemas.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare const LLMConfigBaseSchema: z.ZodObject<{
|
|
|
30
30
|
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
31
31
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
32
32
|
allowedMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
33
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>>;
|
|
33
34
|
}, "strict", z.ZodTypeAny, {
|
|
34
35
|
model: string;
|
|
35
36
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
@@ -40,6 +41,7 @@ export declare const LLMConfigBaseSchema: z.ZodObject<{
|
|
|
40
41
|
maxOutputTokens?: number | undefined;
|
|
41
42
|
temperature?: number | undefined;
|
|
42
43
|
allowedMediaTypes?: string[] | undefined;
|
|
44
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
43
45
|
}, {
|
|
44
46
|
model: string;
|
|
45
47
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
@@ -50,6 +52,7 @@ export declare const LLMConfigBaseSchema: z.ZodObject<{
|
|
|
50
52
|
maxOutputTokens?: number | undefined;
|
|
51
53
|
temperature?: number | undefined;
|
|
52
54
|
allowedMediaTypes?: string[] | undefined;
|
|
55
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
53
56
|
}>;
|
|
54
57
|
/**
|
|
55
58
|
* Creates an LLM config schema with configurable validation strictness.
|
|
@@ -67,6 +70,7 @@ export declare function createLLMConfigSchema(options?: LLMValidationOptions): z
|
|
|
67
70
|
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
68
71
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
69
72
|
allowedMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
73
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>>;
|
|
70
74
|
}, "strict", z.ZodTypeAny, {
|
|
71
75
|
model: string;
|
|
72
76
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
@@ -77,6 +81,7 @@ export declare function createLLMConfigSchema(options?: LLMValidationOptions): z
|
|
|
77
81
|
maxOutputTokens?: number | undefined;
|
|
78
82
|
temperature?: number | undefined;
|
|
79
83
|
allowedMediaTypes?: string[] | undefined;
|
|
84
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
80
85
|
}, {
|
|
81
86
|
model: string;
|
|
82
87
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
@@ -87,6 +92,7 @@ export declare function createLLMConfigSchema(options?: LLMValidationOptions): z
|
|
|
87
92
|
maxOutputTokens?: number | undefined;
|
|
88
93
|
temperature?: number | undefined;
|
|
89
94
|
allowedMediaTypes?: string[] | undefined;
|
|
95
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
90
96
|
}>, {
|
|
91
97
|
model: string;
|
|
92
98
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
@@ -97,6 +103,7 @@ export declare function createLLMConfigSchema(options?: LLMValidationOptions): z
|
|
|
97
103
|
maxOutputTokens?: number | undefined;
|
|
98
104
|
temperature?: number | undefined;
|
|
99
105
|
allowedMediaTypes?: string[] | undefined;
|
|
106
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
100
107
|
}, {
|
|
101
108
|
model: string;
|
|
102
109
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
@@ -107,6 +114,7 @@ export declare function createLLMConfigSchema(options?: LLMValidationOptions): z
|
|
|
107
114
|
maxOutputTokens?: number | undefined;
|
|
108
115
|
temperature?: number | undefined;
|
|
109
116
|
allowedMediaTypes?: string[] | undefined;
|
|
117
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
110
118
|
}>, "ValidatedLLMConfig">;
|
|
111
119
|
/**
|
|
112
120
|
* Default LLM config schema with strict validation (backwards compatible).
|
|
@@ -122,6 +130,7 @@ export declare const LLMConfigSchema: z.ZodBranded<z.ZodEffects<z.ZodObject<{
|
|
|
122
130
|
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
123
131
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
124
132
|
allowedMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
133
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>>;
|
|
125
134
|
}, "strict", z.ZodTypeAny, {
|
|
126
135
|
model: string;
|
|
127
136
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
@@ -132,6 +141,7 @@ export declare const LLMConfigSchema: z.ZodBranded<z.ZodEffects<z.ZodObject<{
|
|
|
132
141
|
maxOutputTokens?: number | undefined;
|
|
133
142
|
temperature?: number | undefined;
|
|
134
143
|
allowedMediaTypes?: string[] | undefined;
|
|
144
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
135
145
|
}, {
|
|
136
146
|
model: string;
|
|
137
147
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
@@ -142,6 +152,7 @@ export declare const LLMConfigSchema: z.ZodBranded<z.ZodEffects<z.ZodObject<{
|
|
|
142
152
|
maxOutputTokens?: number | undefined;
|
|
143
153
|
temperature?: number | undefined;
|
|
144
154
|
allowedMediaTypes?: string[] | undefined;
|
|
155
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
145
156
|
}>, {
|
|
146
157
|
model: string;
|
|
147
158
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
@@ -152,6 +163,7 @@ export declare const LLMConfigSchema: z.ZodBranded<z.ZodEffects<z.ZodObject<{
|
|
|
152
163
|
maxOutputTokens?: number | undefined;
|
|
153
164
|
temperature?: number | undefined;
|
|
154
165
|
allowedMediaTypes?: string[] | undefined;
|
|
166
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
155
167
|
}, {
|
|
156
168
|
model: string;
|
|
157
169
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
@@ -162,6 +174,7 @@ export declare const LLMConfigSchema: z.ZodBranded<z.ZodEffects<z.ZodObject<{
|
|
|
162
174
|
maxOutputTokens?: number | undefined;
|
|
163
175
|
temperature?: number | undefined;
|
|
164
176
|
allowedMediaTypes?: string[] | undefined;
|
|
177
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
165
178
|
}>, "ValidatedLLMConfig">;
|
|
166
179
|
/**
|
|
167
180
|
* Relaxed LLM config schema that allows missing API keys and baseURLs.
|
|
@@ -177,6 +190,7 @@ export declare const LLMConfigSchemaRelaxed: z.ZodBranded<z.ZodEffects<z.ZodObje
|
|
|
177
190
|
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
178
191
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
179
192
|
allowedMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
193
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>>;
|
|
180
194
|
}, "strict", z.ZodTypeAny, {
|
|
181
195
|
model: string;
|
|
182
196
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
@@ -187,6 +201,7 @@ export declare const LLMConfigSchemaRelaxed: z.ZodBranded<z.ZodEffects<z.ZodObje
|
|
|
187
201
|
maxOutputTokens?: number | undefined;
|
|
188
202
|
temperature?: number | undefined;
|
|
189
203
|
allowedMediaTypes?: string[] | undefined;
|
|
204
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
190
205
|
}, {
|
|
191
206
|
model: string;
|
|
192
207
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
@@ -197,6 +212,7 @@ export declare const LLMConfigSchemaRelaxed: z.ZodBranded<z.ZodEffects<z.ZodObje
|
|
|
197
212
|
maxOutputTokens?: number | undefined;
|
|
198
213
|
temperature?: number | undefined;
|
|
199
214
|
allowedMediaTypes?: string[] | undefined;
|
|
215
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
200
216
|
}>, {
|
|
201
217
|
model: string;
|
|
202
218
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
@@ -207,6 +223,7 @@ export declare const LLMConfigSchemaRelaxed: z.ZodBranded<z.ZodEffects<z.ZodObje
|
|
|
207
223
|
maxOutputTokens?: number | undefined;
|
|
208
224
|
temperature?: number | undefined;
|
|
209
225
|
allowedMediaTypes?: string[] | undefined;
|
|
226
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
210
227
|
}, {
|
|
211
228
|
model: string;
|
|
212
229
|
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
@@ -217,6 +234,7 @@ export declare const LLMConfigSchemaRelaxed: z.ZodBranded<z.ZodEffects<z.ZodObje
|
|
|
217
234
|
maxOutputTokens?: number | undefined;
|
|
218
235
|
temperature?: number | undefined;
|
|
219
236
|
allowedMediaTypes?: string[] | undefined;
|
|
237
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
220
238
|
}>, "ValidatedLLMConfig">;
|
|
221
239
|
export type LLMConfig = z.input<typeof LLMConfigSchema>;
|
|
222
240
|
export type ValidatedLLMConfig = z.output<typeof LLMConfigSchema>;
|
|
@@ -230,6 +248,7 @@ export declare const LLMUpdatesSchema: z.ZodEffects<z.ZodObject<{
|
|
|
230
248
|
maxOutputTokens: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
231
249
|
temperature: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
232
250
|
allowedMediaTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
251
|
+
reasoningEffort: z.ZodOptional<z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>>>;
|
|
233
252
|
}, "strip", z.ZodTypeAny, {
|
|
234
253
|
model?: string | undefined;
|
|
235
254
|
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | undefined;
|
|
@@ -240,6 +259,7 @@ export declare const LLMUpdatesSchema: z.ZodEffects<z.ZodObject<{
|
|
|
240
259
|
maxOutputTokens?: number | undefined;
|
|
241
260
|
temperature?: number | undefined;
|
|
242
261
|
allowedMediaTypes?: string[] | undefined;
|
|
262
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
243
263
|
}, {
|
|
244
264
|
model?: string | undefined;
|
|
245
265
|
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | undefined;
|
|
@@ -250,6 +270,7 @@ export declare const LLMUpdatesSchema: z.ZodEffects<z.ZodObject<{
|
|
|
250
270
|
maxOutputTokens?: number | undefined;
|
|
251
271
|
temperature?: number | undefined;
|
|
252
272
|
allowedMediaTypes?: string[] | undefined;
|
|
273
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
253
274
|
}>, {
|
|
254
275
|
model?: string | undefined;
|
|
255
276
|
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | undefined;
|
|
@@ -260,6 +281,7 @@ export declare const LLMUpdatesSchema: z.ZodEffects<z.ZodObject<{
|
|
|
260
281
|
maxOutputTokens?: number | undefined;
|
|
261
282
|
temperature?: number | undefined;
|
|
262
283
|
allowedMediaTypes?: string[] | undefined;
|
|
284
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
263
285
|
}, {
|
|
264
286
|
model?: string | undefined;
|
|
265
287
|
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | undefined;
|
|
@@ -270,6 +292,7 @@ export declare const LLMUpdatesSchema: z.ZodEffects<z.ZodObject<{
|
|
|
270
292
|
maxOutputTokens?: number | undefined;
|
|
271
293
|
temperature?: number | undefined;
|
|
272
294
|
allowedMediaTypes?: string[] | undefined;
|
|
295
|
+
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
273
296
|
}>;
|
|
274
297
|
export type LLMUpdates = z.input<typeof LLMUpdatesSchema>;
|
|
275
298
|
export type { LLMUpdateContext } from '../llm/types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/llm/schemas.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/llm/schemas.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AA0ED,4CAA4C;AAG5C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBnB,CAAC;AAEd;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,oBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BA4IvE;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAA0C,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAA2C,CAAC;AAG/E,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAIlE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYvB,CAAC;AACP,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/llm/schemas.js
CHANGED
|
@@ -31,6 +31,20 @@ const LLMConfigFields = {
|
|
|
31
31
|
temperature: z.coerce.number().min(0).max(1).optional().describe("Randomness: 0 deterministic, 1 creative"),
|
|
32
32
|
allowedMediaTypes: z.array(z.string()).optional().describe(
|
|
33
33
|
'MIME type patterns for media expansion (e.g., "image/*", "application/pdf"). If omitted, uses model capabilities from registry. Supports wildcards.'
|
|
34
|
+
),
|
|
35
|
+
// Provider-specific options
|
|
36
|
+
/**
|
|
37
|
+
* OpenAI reasoning effort level for reasoning-capable models (o1, o3, codex, gpt-5.x).
|
|
38
|
+
* Controls how many reasoning tokens the model generates before producing a response.
|
|
39
|
+
* - 'none': No reasoning, fastest responses
|
|
40
|
+
* - 'minimal': Barely any reasoning, very fast responses
|
|
41
|
+
* - 'low': Light reasoning, fast responses
|
|
42
|
+
* - 'medium': Balanced reasoning (OpenAI's recommended daily driver)
|
|
43
|
+
* - 'high': Thorough reasoning for complex tasks
|
|
44
|
+
* - 'xhigh': Extra high reasoning for quality-critical, non-latency-sensitive tasks
|
|
45
|
+
*/
|
|
46
|
+
reasoningEffort: z.enum(["none", "minimal", "low", "medium", "high", "xhigh"]).optional().describe(
|
|
47
|
+
"OpenAI reasoning effort level for reasoning models (o1, o3, codex). Options: 'none', 'minimal', 'low', 'medium' (recommended), 'high', 'xhigh'"
|
|
34
48
|
)
|
|
35
49
|
};
|
|
36
50
|
const LLMConfigBaseSchema = z.object({
|
|
@@ -44,7 +58,9 @@ const LLMConfigBaseSchema = z.object({
|
|
|
44
58
|
maxInputTokens: LLMConfigFields.maxInputTokens,
|
|
45
59
|
maxOutputTokens: LLMConfigFields.maxOutputTokens,
|
|
46
60
|
temperature: LLMConfigFields.temperature,
|
|
47
|
-
allowedMediaTypes: LLMConfigFields.allowedMediaTypes
|
|
61
|
+
allowedMediaTypes: LLMConfigFields.allowedMediaTypes,
|
|
62
|
+
// Provider-specific options
|
|
63
|
+
reasoningEffort: LLMConfigFields.reasoningEffort
|
|
48
64
|
}).strict();
|
|
49
65
|
function createLLMConfigSchema(options = {}) {
|
|
50
66
|
const { strict = true } = options;
|
|
@@ -142,7 +142,9 @@ class VercelLLMService {
|
|
|
142
142
|
maxSteps: this.config.maxIterations,
|
|
143
143
|
maxOutputTokens: this.config.maxOutputTokens,
|
|
144
144
|
temperature: this.config.temperature,
|
|
145
|
-
baseURL: this.config.baseURL
|
|
145
|
+
baseURL: this.config.baseURL,
|
|
146
|
+
// Provider-specific options
|
|
147
|
+
reasoningEffort: this.config.reasoningEffort
|
|
146
148
|
},
|
|
147
149
|
{ provider: this.config.provider, model: this.getModelId() },
|
|
148
150
|
this.logger,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vercel.d.ts","sourceRoot":"","sources":["../../../src/llm/services/vercel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAqB,MAAM,IAAI,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAIxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe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,kBAAkB;IAyB1B;;;;;;;OAOG;IACG,MAAM,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAsDxF;;;OAGG;IACH,SAAS,IAAI,gBAAgB;IA+B7B;;OAEG;IACH,iBAAiB,IAAI,cAAc,CAAC,OAAO,CAAC;IAI5C;;OAEG;IACH,eAAe,IAAI,mBAAmB;CAGzC"}
|
|
@@ -79,7 +79,9 @@ class VercelLLMService {
|
|
|
79
79
|
maxSteps: this.config.maxIterations,
|
|
80
80
|
maxOutputTokens: this.config.maxOutputTokens,
|
|
81
81
|
temperature: this.config.temperature,
|
|
82
|
-
baseURL: this.config.baseURL
|
|
82
|
+
baseURL: this.config.baseURL,
|
|
83
|
+
// Provider-specific options
|
|
84
|
+
reasoningEffort: this.config.reasoningEffort
|
|
83
85
|
},
|
|
84
86
|
{ provider: this.config.provider, model: this.getModelId() },
|
|
85
87
|
this.logger,
|
package/dist/logger/logger.cjs
CHANGED
|
@@ -375,9 +375,13 @@ ${import_chalk.default.white(JSON.stringify(args, null, 2))}`,
|
|
|
375
375
|
console.log(`\u{1F4AC} ${import_chalk.default.bold("Session:")} ${import_chalk.default.blue(info.sessionId)}`);
|
|
376
376
|
}
|
|
377
377
|
if (info.logLevel && info.logFile) {
|
|
378
|
-
|
|
379
|
-
`\u{1F4CB} ${import_chalk.default.bold("Log Level:")} ${import_chalk.default.cyan(info.logLevel)}
|
|
380
|
-
|
|
378
|
+
if (process.env.DEXTO_PRIVACY_MODE === "true") {
|
|
379
|
+
console.log(`\u{1F4CB} ${import_chalk.default.bold("Log Level:")} ${import_chalk.default.cyan(info.logLevel)}`);
|
|
380
|
+
} else {
|
|
381
|
+
console.log(
|
|
382
|
+
`\u{1F4CB} ${import_chalk.default.bold("Log Level:")} ${import_chalk.default.cyan(info.logLevel)} ${import_chalk.default.dim(`(file: ${info.logFile})`)}`
|
|
383
|
+
);
|
|
384
|
+
}
|
|
381
385
|
}
|
|
382
386
|
}
|
|
383
387
|
displayError(message, error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAwCH,KAAK,UAAU,GACT,OAAO,GACP,KAAK,GACL,OAAO,GACP,QAAQ,GACR,MAAM,GACN,SAAS,GACT,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,aAAa,GACb,WAAW,GACX,aAAa,GACb,cAAc,GACd,YAAY,GACZ,eAAe,GACf,YAAY,GACZ,aAAa,CAAC;AA2CpB,MAAM,WAAW,aAAa;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAWD,qBAAa,MAAM;IACf,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,WAAW,CAAuB;IAC1C,OAAO,CAAC,YAAY,CAAkB;gBAE1B,OAAO,GAAE,aAAkB;IAsBvC,OAAO,CAAC,oBAAoB;IAe5B,OAAO,CAAC,gBAAgB;IA4ExB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,UAAU;IASrD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,UAAU;IAQpD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,UAAU;IAQpD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,G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AG,EAAE,KAAK,CAAC,EAAE,UAAU;IAU9D,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,UAAU;IASrD,iBAAiB,CAAC,QAAQ,EAAE,GAAG;IAkB/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG;IAUpC,UAAU,CAAC,MAAM,EAAE,GAAG;IA4EtB,QAAQ,CAAC,KAAK,EAAE,MAAM;IAatB,cAAc,IAAI,MAAM,GAAG,IAAI;IAK/B,QAAQ,IAAI,MAAM;IAKlB,kBAAkB,CAAC,IAAI,EAAE;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,gBAAgB,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,EAAE,CAAA;SAAE,CAAC;QACtD,iBAAiB,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;QAC9C,SAAS,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;QAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB;IAyDD,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAkB9C;AAGD,eAAO,MAAM,MAAM,QAAe,CAAC"}
|
package/dist/logger/logger.js
CHANGED
|
@@ -342,9 +342,13 @@ ${chalk.white(JSON.stringify(args, null, 2))}`,
|
|
|
342
342
|
console.log(`\u{1F4AC} ${chalk.bold("Session:")} ${chalk.blue(info.sessionId)}`);
|
|
343
343
|
}
|
|
344
344
|
if (info.logLevel && info.logFile) {
|
|
345
|
-
|
|
346
|
-
`\u{1F4CB} ${chalk.bold("Log Level:")} ${chalk.cyan(info.logLevel)}
|
|
347
|
-
|
|
345
|
+
if (process.env.DEXTO_PRIVACY_MODE === "true") {
|
|
346
|
+
console.log(`\u{1F4CB} ${chalk.bold("Log Level:")} ${chalk.cyan(info.logLevel)}`);
|
|
347
|
+
} else {
|
|
348
|
+
console.log(
|
|
349
|
+
`\u{1F4CB} ${chalk.bold("Log Level:")} ${chalk.cyan(info.logLevel)} ${chalk.dim(`(file: ${info.logFile})`)}`
|
|
350
|
+
);
|
|
351
|
+
}
|
|
348
352
|
}
|
|
349
353
|
}
|
|
350
354
|
displayError(message, error) {
|
package/dist/memory/schemas.d.ts
CHANGED
|
@@ -28,8 +28,8 @@ export declare const MemorySchema: z.ZodObject<{
|
|
|
28
28
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
29
29
|
}, "strict", z.ZodTypeAny, {
|
|
30
30
|
content: string;
|
|
31
|
-
id: string;
|
|
32
31
|
createdAt: number;
|
|
32
|
+
id: string;
|
|
33
33
|
updatedAt: number;
|
|
34
34
|
metadata?: z.objectOutputType<{
|
|
35
35
|
source: z.ZodOptional<z.ZodEnum<["user", "system"]>>;
|
|
@@ -38,8 +38,8 @@ export declare const MemorySchema: z.ZodObject<{
|
|
|
38
38
|
tags?: string[] | undefined;
|
|
39
39
|
}, {
|
|
40
40
|
content: string;
|
|
41
|
-
id: string;
|
|
42
41
|
createdAt: number;
|
|
42
|
+
id: string;
|
|
43
43
|
updatedAt: number;
|
|
44
44
|
metadata?: z.objectInputType<{
|
|
45
45
|
source: z.ZodOptional<z.ZodEnum<["user", "system"]>>;
|
|
@@ -24,6 +24,7 @@ __export(discovery_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(discovery_exports);
|
|
26
26
|
var import_blob = require("../storage/blob/index.js");
|
|
27
|
+
var import_database = require("../storage/database/index.js");
|
|
27
28
|
var import_compaction = require("../context/compaction/index.js");
|
|
28
29
|
var import_custom_tool_registry = require("../tools/custom-tool-registry.js");
|
|
29
30
|
var import_constants = require("../tools/internal-tools/constants.js");
|
|
@@ -60,12 +61,23 @@ function listAllProviders() {
|
|
|
60
61
|
}
|
|
61
62
|
return info;
|
|
62
63
|
});
|
|
64
|
+
const databaseProviders = import_database.databaseRegistry.getProviders().map((provider) => {
|
|
65
|
+
const info = {
|
|
66
|
+
type: provider.type,
|
|
67
|
+
category: "database"
|
|
68
|
+
};
|
|
69
|
+
if (provider.metadata) {
|
|
70
|
+
info.metadata = provider.metadata;
|
|
71
|
+
}
|
|
72
|
+
return info;
|
|
73
|
+
});
|
|
63
74
|
const internalTools = import_constants.INTERNAL_TOOL_NAMES.map((name) => ({
|
|
64
75
|
name,
|
|
65
76
|
description: import_registry.INTERNAL_TOOL_REGISTRY[name].description
|
|
66
77
|
}));
|
|
67
78
|
return {
|
|
68
79
|
blob: blobProviders,
|
|
80
|
+
database: databaseProviders,
|
|
69
81
|
compaction: compactionProviders,
|
|
70
82
|
customTools: customToolProviders,
|
|
71
83
|
internalTools
|
|
@@ -79,6 +91,8 @@ function hasProvider(category, type) {
|
|
|
79
91
|
switch (category) {
|
|
80
92
|
case "blob":
|
|
81
93
|
return import_blob.blobStoreRegistry.has(type);
|
|
94
|
+
case "database":
|
|
95
|
+
return import_database.databaseRegistry.has(type);
|
|
82
96
|
case "compaction":
|
|
83
97
|
return import_compaction.compactionRegistry.has(type);
|
|
84
98
|
case "customTools":
|
|
@@ -5,7 +5,7 @@ export interface DiscoveredProvider {
|
|
|
5
5
|
/** Provider type identifier (e.g., 'local', 's3', 'reactive-overflow') */
|
|
6
6
|
type: string;
|
|
7
7
|
/** Provider category */
|
|
8
|
-
category: 'blob' | 'compaction' | 'customTools';
|
|
8
|
+
category: 'blob' | 'database' | 'compaction' | 'customTools';
|
|
9
9
|
/** Optional metadata about the provider */
|
|
10
10
|
metadata?: {
|
|
11
11
|
displayName?: string;
|
|
@@ -28,6 +28,8 @@ export interface InternalToolDiscovery {
|
|
|
28
28
|
export interface ProviderDiscovery {
|
|
29
29
|
/** Blob storage providers */
|
|
30
30
|
blob: DiscoveredProvider[];
|
|
31
|
+
/** Database providers */
|
|
32
|
+
database: DiscoveredProvider[];
|
|
31
33
|
/** Compaction strategy providers */
|
|
32
34
|
compaction: DiscoveredProvider[];
|
|
33
35
|
/** Custom tool providers */
|
|
@@ -38,7 +40,7 @@ export interface ProviderDiscovery {
|
|
|
38
40
|
/**
|
|
39
41
|
* Provider category type.
|
|
40
42
|
*/
|
|
41
|
-
export type ProviderCategory = 'blob' | 'compaction' | 'customTools';
|
|
43
|
+
export type ProviderCategory = 'blob' | 'database' | 'compaction' | 'customTools';
|
|
42
44
|
/**
|
|
43
45
|
* List all registered providers across all registries.
|
|
44
46
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/providers/discovery.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/providers/discovery.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IAEb,wBAAwB;IACxB,QAAQ,EAAE,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,aAAa,CAAC;IAE7D,2CAA2C;IAC3C,QAAQ,CAAC,EACH;QACI,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACtB,GACD,SAAS,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IAEb,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,6BAA6B;IAC7B,IAAI,EAAE,kBAAkB,EAAE,CAAC;IAE3B,yBAAyB;IACzB,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAE/B,oCAAoC;IACpC,UAAU,EAAE,kBAAkB,EAAE,CAAC;IAEjC,4BAA4B;IAC5B,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAElC,iDAAiD;IACjD,aAAa,EAAE,qBAAqB,EAAE,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,aAAa,CAAC;AAElF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,IAAI,iBAAiB,CA+DpD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,kBAAkB,EAAE,CAGvF;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAa7E"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "../chunk-PTJYTZNU.js";
|
|
2
2
|
import { blobStoreRegistry } from "../storage/blob/index.js";
|
|
3
|
+
import { databaseRegistry } from "../storage/database/index.js";
|
|
3
4
|
import { compactionRegistry } from "../context/compaction/index.js";
|
|
4
5
|
import { customToolRegistry } from "../tools/custom-tool-registry.js";
|
|
5
6
|
import { INTERNAL_TOOL_NAMES } from "../tools/internal-tools/constants.js";
|
|
@@ -36,12 +37,23 @@ function listAllProviders() {
|
|
|
36
37
|
}
|
|
37
38
|
return info;
|
|
38
39
|
});
|
|
40
|
+
const databaseProviders = databaseRegistry.getProviders().map((provider) => {
|
|
41
|
+
const info = {
|
|
42
|
+
type: provider.type,
|
|
43
|
+
category: "database"
|
|
44
|
+
};
|
|
45
|
+
if (provider.metadata) {
|
|
46
|
+
info.metadata = provider.metadata;
|
|
47
|
+
}
|
|
48
|
+
return info;
|
|
49
|
+
});
|
|
39
50
|
const internalTools = INTERNAL_TOOL_NAMES.map((name) => ({
|
|
40
51
|
name,
|
|
41
52
|
description: INTERNAL_TOOL_REGISTRY[name].description
|
|
42
53
|
}));
|
|
43
54
|
return {
|
|
44
55
|
blob: blobProviders,
|
|
56
|
+
database: databaseProviders,
|
|
45
57
|
compaction: compactionProviders,
|
|
46
58
|
customTools: customToolProviders,
|
|
47
59
|
internalTools
|
|
@@ -55,6 +67,8 @@ function hasProvider(category, type) {
|
|
|
55
67
|
switch (category) {
|
|
56
68
|
case "blob":
|
|
57
69
|
return blobStoreRegistry.has(type);
|
|
70
|
+
case "database":
|
|
71
|
+
return databaseRegistry.has(type);
|
|
58
72
|
case "compaction":
|
|
59
73
|
return compactionRegistry.has(type);
|
|
60
74
|
case "customTools":
|
|
@@ -42,10 +42,37 @@ class DatabaseHistoryProvider {
|
|
|
42
42
|
if (this.cache === null) {
|
|
43
43
|
const key = this.getMessagesKey();
|
|
44
44
|
try {
|
|
45
|
-
|
|
46
|
-
this.
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
const limit = 1e4;
|
|
46
|
+
const rawMessages = await this.database.getRange(key, 0, limit);
|
|
47
|
+
if (rawMessages.length === limit) {
|
|
48
|
+
this.logger.warn(
|
|
49
|
+
`DatabaseHistoryProvider: Session ${this.sessionId} hit message limit (${limit}), history may be truncated`
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
const seen = /* @__PURE__ */ new Set();
|
|
53
|
+
this.cache = [];
|
|
54
|
+
let duplicateCount = 0;
|
|
55
|
+
for (const msg of rawMessages) {
|
|
56
|
+
if (msg.id && seen.has(msg.id)) {
|
|
57
|
+
duplicateCount++;
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (msg.id) {
|
|
61
|
+
seen.add(msg.id);
|
|
62
|
+
}
|
|
63
|
+
this.cache.push(msg);
|
|
64
|
+
}
|
|
65
|
+
if (duplicateCount > 0) {
|
|
66
|
+
this.logger.warn(
|
|
67
|
+
`DatabaseHistoryProvider: Found ${duplicateCount} duplicate messages for session ${this.sessionId}, deduped to ${this.cache.length}`
|
|
68
|
+
);
|
|
69
|
+
this.dirty = true;
|
|
70
|
+
this.scheduleFlush();
|
|
71
|
+
} else {
|
|
72
|
+
this.logger.debug(
|
|
73
|
+
`DatabaseHistoryProvider: Loaded ${this.cache.length} messages for session ${this.sessionId}`
|
|
74
|
+
);
|
|
75
|
+
}
|
|
49
76
|
} catch (error) {
|
|
50
77
|
this.logger.error(
|
|
51
78
|
`DatabaseHistoryProvider: Error loading messages for session ${this.sessionId}: ${error instanceof Error ? error.message : String(error)}`
|
|
@@ -64,15 +91,17 @@ class DatabaseHistoryProvider {
|
|
|
64
91
|
if (this.cache === null) {
|
|
65
92
|
await this.getHistory();
|
|
66
93
|
}
|
|
94
|
+
if (message.id && this.cache.some((m) => m.id === message.id)) {
|
|
95
|
+
this.logger.debug(
|
|
96
|
+
`DatabaseHistoryProvider: Message ${message.id} already exists, skipping`
|
|
97
|
+
);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
67
100
|
this.cache.push(message);
|
|
68
101
|
try {
|
|
69
102
|
await this.database.append(key, message);
|
|
70
103
|
this.logger.debug(
|
|
71
|
-
`DatabaseHistoryProvider: Saved message for session ${this.sessionId}
|
|
72
|
-
{
|
|
73
|
-
role: message.role,
|
|
74
|
-
id: message.id
|
|
75
|
-
}
|
|
104
|
+
`DatabaseHistoryProvider: Saved message ${message.id} (${message.role}) for session ${this.sessionId}`
|
|
76
105
|
);
|
|
77
106
|
} catch (error) {
|
|
78
107
|
this.cache.pop();
|
|
@@ -159,18 +188,23 @@ class DatabaseHistoryProvider {
|
|
|
159
188
|
return;
|
|
160
189
|
}
|
|
161
190
|
const key = this.getMessagesKey();
|
|
162
|
-
const
|
|
191
|
+
const snapshot = [...this.cache];
|
|
192
|
+
const messageCount = snapshot.length;
|
|
193
|
+
this.logger.debug(
|
|
194
|
+
`DatabaseHistoryProvider: FLUSH START key=${key} snapshotSize=${messageCount} ids=[${snapshot.map((m) => m.id).join(",")}]`
|
|
195
|
+
);
|
|
163
196
|
try {
|
|
164
197
|
await this.database.delete(key);
|
|
165
|
-
|
|
198
|
+
this.logger.debug(`DatabaseHistoryProvider: FLUSH DELETED key=${key}`);
|
|
199
|
+
for (const msg of snapshot) {
|
|
166
200
|
await this.database.append(key, msg);
|
|
167
201
|
}
|
|
202
|
+
this.logger.debug(
|
|
203
|
+
`DatabaseHistoryProvider: FLUSH REAPPENDED key=${key} count=${messageCount}`
|
|
204
|
+
);
|
|
168
205
|
if (!this.flushTimer) {
|
|
169
206
|
this.dirty = false;
|
|
170
207
|
}
|
|
171
|
-
this.logger.debug(
|
|
172
|
-
`DatabaseHistoryProvider: Flushed ${messageCount} messages to DB for session ${this.sessionId}`
|
|
173
|
-
);
|
|
174
208
|
} catch (error) {
|
|
175
209
|
this.logger.error(
|
|
176
210
|
`DatabaseHistoryProvider: Error flushing messages for session ${this.sessionId}: ${error instanceof Error ? error.message : String(error)}`
|
|
@@ -192,7 +226,7 @@ class DatabaseHistoryProvider {
|
|
|
192
226
|
}
|
|
193
227
|
this.flushTimer = setTimeout(() => {
|
|
194
228
|
this.flushTimer = null;
|
|
195
|
-
this.
|
|
229
|
+
this.flush().catch(() => {
|
|
196
230
|
});
|
|
197
231
|
}, DatabaseHistoryProvider.FLUSH_DELAY_MS);
|
|
198
232
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../src/session/history/database.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,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