@convex-dev/agent 0.1.1 → 0.1.2-alpha.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/README.md +9 -3
- package/dist/commonjs/client/createTool.d.ts +49 -0
- package/dist/commonjs/client/createTool.d.ts.map +1 -0
- package/dist/commonjs/client/createTool.js +45 -0
- package/dist/commonjs/client/createTool.js.map +1 -0
- package/dist/commonjs/client/index.d.ts +101 -322
- package/dist/commonjs/client/index.d.ts.map +1 -1
- package/dist/commonjs/client/index.js +142 -194
- package/dist/commonjs/client/index.js.map +1 -1
- package/dist/commonjs/client/streaming.d.ts +54 -0
- package/dist/commonjs/client/streaming.d.ts.map +1 -0
- package/dist/commonjs/client/streaming.js +121 -0
- package/dist/commonjs/client/streaming.js.map +1 -0
- package/dist/commonjs/client/types.d.ts +290 -2
- package/dist/commonjs/client/types.d.ts.map +1 -1
- package/dist/commonjs/component/messages.d.ts +104 -138
- package/dist/commonjs/component/messages.d.ts.map +1 -1
- package/dist/commonjs/component/messages.js +15 -14
- package/dist/commonjs/component/messages.js.map +1 -1
- package/dist/commonjs/component/schema.d.ts +873 -3
- package/dist/commonjs/component/schema.d.ts.map +1 -1
- package/dist/commonjs/component/schema.js +44 -1
- package/dist/commonjs/component/schema.js.map +1 -1
- package/dist/commonjs/component/streams.d.ts +191 -0
- package/dist/commonjs/component/streams.d.ts.map +1 -0
- package/dist/commonjs/component/streams.js +169 -0
- package/dist/commonjs/component/streams.js.map +1 -0
- package/dist/commonjs/component/threads.d.ts +1 -1
- package/dist/commonjs/component/threads.js +3 -3
- package/dist/commonjs/component/threads.js.map +1 -1
- package/dist/commonjs/component/users.js +2 -2
- package/dist/commonjs/component/users.js.map +1 -1
- package/dist/commonjs/mapping.d.ts.map +1 -1
- package/dist/commonjs/mapping.js +3 -1
- package/dist/commonjs/mapping.js.map +1 -1
- package/dist/commonjs/react/index.d.ts +99 -0
- package/dist/commonjs/react/index.d.ts.map +1 -1
- package/dist/commonjs/react/index.js +505 -1
- package/dist/commonjs/react/index.js.map +1 -1
- package/dist/commonjs/react/toUIMessages.d.ts +8 -0
- package/dist/commonjs/react/toUIMessages.d.ts.map +1 -0
- package/dist/commonjs/react/toUIMessages.js +134 -0
- package/dist/commonjs/react/toUIMessages.js.map +1 -0
- package/dist/commonjs/validators.d.ts +506 -4
- package/dist/commonjs/validators.d.ts.map +1 -1
- package/dist/commonjs/validators.js +49 -2
- package/dist/commonjs/validators.js.map +1 -1
- package/dist/esm/client/createTool.d.ts +49 -0
- package/dist/esm/client/createTool.d.ts.map +1 -0
- package/dist/esm/client/createTool.js +45 -0
- package/dist/esm/client/createTool.js.map +1 -0
- package/dist/esm/client/index.d.ts +101 -322
- package/dist/esm/client/index.d.ts.map +1 -1
- package/dist/esm/client/index.js +142 -194
- package/dist/esm/client/index.js.map +1 -1
- package/dist/esm/client/streaming.d.ts +54 -0
- package/dist/esm/client/streaming.d.ts.map +1 -0
- package/dist/esm/client/streaming.js +121 -0
- package/dist/esm/client/streaming.js.map +1 -0
- package/dist/esm/client/types.d.ts +290 -2
- package/dist/esm/client/types.d.ts.map +1 -1
- package/dist/esm/component/messages.d.ts +104 -138
- package/dist/esm/component/messages.d.ts.map +1 -1
- package/dist/esm/component/messages.js +15 -14
- package/dist/esm/component/messages.js.map +1 -1
- package/dist/esm/component/schema.d.ts +873 -3
- package/dist/esm/component/schema.d.ts.map +1 -1
- package/dist/esm/component/schema.js +44 -1
- package/dist/esm/component/schema.js.map +1 -1
- package/dist/esm/component/streams.d.ts +191 -0
- package/dist/esm/component/streams.d.ts.map +1 -0
- package/dist/esm/component/streams.js +169 -0
- package/dist/esm/component/streams.js.map +1 -0
- package/dist/esm/component/threads.d.ts +1 -1
- package/dist/esm/component/threads.js +3 -3
- package/dist/esm/component/threads.js.map +1 -1
- package/dist/esm/component/users.js +2 -2
- package/dist/esm/component/users.js.map +1 -1
- package/dist/esm/mapping.d.ts.map +1 -1
- package/dist/esm/mapping.js +3 -1
- package/dist/esm/mapping.js.map +1 -1
- package/dist/esm/react/index.d.ts +99 -0
- package/dist/esm/react/index.d.ts.map +1 -1
- package/dist/esm/react/index.js +505 -1
- package/dist/esm/react/index.js.map +1 -1
- package/dist/esm/react/toUIMessages.d.ts +8 -0
- package/dist/esm/react/toUIMessages.d.ts.map +1 -0
- package/dist/esm/react/toUIMessages.js +134 -0
- package/dist/esm/react/toUIMessages.js.map +1 -0
- package/dist/esm/validators.d.ts +506 -4
- package/dist/esm/validators.d.ts.map +1 -1
- package/dist/esm/validators.js +49 -2
- package/dist/esm/validators.js.map +1 -1
- package/package.json +5 -1
- package/src/client/createTool.ts +108 -0
- package/src/client/index.ts +270 -689
- package/src/client/streaming.ts +166 -0
- package/src/client/types.ts +430 -5
- package/src/component/_generated/api.d.ts +339 -188
- package/src/component/messages.ts +15 -14
- package/src/component/schema.ts +51 -0
- package/src/component/streams.ts +206 -0
- package/src/component/threads.ts +3 -3
- package/src/component/users.ts +2 -2
- package/src/mapping.ts +3 -1
- package/src/react/index.ts +687 -1
- package/src/react/toUIMessages.ts +153 -0
- package/src/validators.test.ts +18 -0
- package/src/validators.ts +72 -2
|
@@ -2162,6 +2162,344 @@ export declare const schema: import("convex/server").SchemaDefinition<{
|
|
|
2162
2162
|
status_threadId_order_stepOrder: ["status", "threadId", "order", "stepOrder", "_creationTime"];
|
|
2163
2163
|
parentMessageId_order_stepOrder: ["parentMessageId", "order", "stepOrder", "_creationTime"];
|
|
2164
2164
|
}, {}, {}>;
|
|
2165
|
+
streamingMessages: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
2166
|
+
userId?: string | undefined;
|
|
2167
|
+
agentName?: string | undefined;
|
|
2168
|
+
model?: string | undefined;
|
|
2169
|
+
provider?: string | undefined;
|
|
2170
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2171
|
+
order: number;
|
|
2172
|
+
threadId: import("convex/values").GenericId<"threads">;
|
|
2173
|
+
stepOrder: number;
|
|
2174
|
+
state: {
|
|
2175
|
+
timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
|
|
2176
|
+
kind: "streaming";
|
|
2177
|
+
lastHeartbeat: number;
|
|
2178
|
+
} | {
|
|
2179
|
+
kind: "finished";
|
|
2180
|
+
endedAt: number;
|
|
2181
|
+
} | {
|
|
2182
|
+
error: string;
|
|
2183
|
+
kind: "error";
|
|
2184
|
+
};
|
|
2185
|
+
}, {
|
|
2186
|
+
userId: import("convex/values").VString<string | undefined, "optional">;
|
|
2187
|
+
agentName: import("convex/values").VString<string | undefined, "optional">;
|
|
2188
|
+
model: import("convex/values").VString<string | undefined, "optional">;
|
|
2189
|
+
provider: import("convex/values").VString<string | undefined, "optional">;
|
|
2190
|
+
providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
|
|
2191
|
+
threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
|
|
2192
|
+
order: import("convex/values").VFloat64<number, "required">;
|
|
2193
|
+
/**
|
|
2194
|
+
* The step order of the first message in the stream.
|
|
2195
|
+
* If the stream ends up with both a tool call and a tool result,
|
|
2196
|
+
* the stepOrder of the result will be +1 of the tool call.
|
|
2197
|
+
*/
|
|
2198
|
+
stepOrder: import("convex/values").VFloat64<number, "required">;
|
|
2199
|
+
state: import("convex/values").VUnion<{
|
|
2200
|
+
timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
|
|
2201
|
+
kind: "streaming";
|
|
2202
|
+
lastHeartbeat: number;
|
|
2203
|
+
} | {
|
|
2204
|
+
kind: "finished";
|
|
2205
|
+
endedAt: number;
|
|
2206
|
+
} | {
|
|
2207
|
+
error: string;
|
|
2208
|
+
kind: "error";
|
|
2209
|
+
}, [import("convex/values").VObject<{
|
|
2210
|
+
timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
|
|
2211
|
+
kind: "streaming";
|
|
2212
|
+
lastHeartbeat: number;
|
|
2213
|
+
}, {
|
|
2214
|
+
kind: import("convex/values").VLiteral<"streaming", "required">;
|
|
2215
|
+
lastHeartbeat: import("convex/values").VFloat64<number, "required">;
|
|
2216
|
+
timeoutFnId: import("convex/values").VId<import("convex/values").GenericId<"_scheduled_functions"> | undefined, "optional">;
|
|
2217
|
+
}, "required", "kind" | "lastHeartbeat" | "timeoutFnId">, import("convex/values").VObject<{
|
|
2218
|
+
kind: "finished";
|
|
2219
|
+
endedAt: number;
|
|
2220
|
+
}, {
|
|
2221
|
+
kind: import("convex/values").VLiteral<"finished", "required">;
|
|
2222
|
+
endedAt: import("convex/values").VFloat64<number, "required">;
|
|
2223
|
+
}, "required", "kind" | "endedAt">, import("convex/values").VObject<{
|
|
2224
|
+
error: string;
|
|
2225
|
+
kind: "error";
|
|
2226
|
+
}, {
|
|
2227
|
+
kind: import("convex/values").VLiteral<"error", "required">;
|
|
2228
|
+
error: import("convex/values").VString<string, "required">;
|
|
2229
|
+
}, "required", "error" | "kind">], "required", "error" | "kind" | "lastHeartbeat" | "timeoutFnId" | "endedAt">;
|
|
2230
|
+
}, "required", "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.error" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt">, {
|
|
2231
|
+
threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
|
|
2232
|
+
}, {}, {}>;
|
|
2233
|
+
streamDeltas: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
2234
|
+
streamId: import("convex/values").GenericId<"streamingMessages">;
|
|
2235
|
+
start: number;
|
|
2236
|
+
end: number;
|
|
2237
|
+
parts: ({
|
|
2238
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2239
|
+
type: "tool-call";
|
|
2240
|
+
toolCallId: string;
|
|
2241
|
+
toolName: string;
|
|
2242
|
+
args: any;
|
|
2243
|
+
} | {
|
|
2244
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2245
|
+
args?: any;
|
|
2246
|
+
experimental_content?: ({
|
|
2247
|
+
type: "text";
|
|
2248
|
+
text: string;
|
|
2249
|
+
} | {
|
|
2250
|
+
mimeType?: string | undefined;
|
|
2251
|
+
type: "image";
|
|
2252
|
+
data: string;
|
|
2253
|
+
})[] | undefined;
|
|
2254
|
+
isError?: boolean | undefined;
|
|
2255
|
+
type: "tool-result";
|
|
2256
|
+
toolCallId: string;
|
|
2257
|
+
toolName: string;
|
|
2258
|
+
result: any;
|
|
2259
|
+
} | {
|
|
2260
|
+
type: "text-delta";
|
|
2261
|
+
textDelta: string;
|
|
2262
|
+
} | {
|
|
2263
|
+
type: "reasoning";
|
|
2264
|
+
textDelta: string;
|
|
2265
|
+
} | {
|
|
2266
|
+
type: "source";
|
|
2267
|
+
source: {
|
|
2268
|
+
title?: string | undefined;
|
|
2269
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2270
|
+
id: string;
|
|
2271
|
+
url: string;
|
|
2272
|
+
sourceType: "url";
|
|
2273
|
+
};
|
|
2274
|
+
} | {
|
|
2275
|
+
type: "tool-call-streaming-start";
|
|
2276
|
+
toolCallId: string;
|
|
2277
|
+
toolName: string;
|
|
2278
|
+
} | {
|
|
2279
|
+
type: "tool-call-delta";
|
|
2280
|
+
toolCallId: string;
|
|
2281
|
+
toolName: string;
|
|
2282
|
+
argsTextDelta: string;
|
|
2283
|
+
})[];
|
|
2284
|
+
}, {
|
|
2285
|
+
streamId: import("convex/values").VId<import("convex/values").GenericId<"streamingMessages">, "required">;
|
|
2286
|
+
start: import("convex/values").VFloat64<number, "required">;
|
|
2287
|
+
end: import("convex/values").VFloat64<number, "required">;
|
|
2288
|
+
parts: import("convex/values").VArray<({
|
|
2289
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2290
|
+
type: "tool-call";
|
|
2291
|
+
toolCallId: string;
|
|
2292
|
+
toolName: string;
|
|
2293
|
+
args: any;
|
|
2294
|
+
} | {
|
|
2295
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2296
|
+
args?: any;
|
|
2297
|
+
experimental_content?: ({
|
|
2298
|
+
type: "text";
|
|
2299
|
+
text: string;
|
|
2300
|
+
} | {
|
|
2301
|
+
mimeType?: string | undefined;
|
|
2302
|
+
type: "image";
|
|
2303
|
+
data: string;
|
|
2304
|
+
})[] | undefined;
|
|
2305
|
+
isError?: boolean | undefined;
|
|
2306
|
+
type: "tool-result";
|
|
2307
|
+
toolCallId: string;
|
|
2308
|
+
toolName: string;
|
|
2309
|
+
result: any;
|
|
2310
|
+
} | {
|
|
2311
|
+
type: "text-delta";
|
|
2312
|
+
textDelta: string;
|
|
2313
|
+
} | {
|
|
2314
|
+
type: "reasoning";
|
|
2315
|
+
textDelta: string;
|
|
2316
|
+
} | {
|
|
2317
|
+
type: "source";
|
|
2318
|
+
source: {
|
|
2319
|
+
title?: string | undefined;
|
|
2320
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2321
|
+
id: string;
|
|
2322
|
+
url: string;
|
|
2323
|
+
sourceType: "url";
|
|
2324
|
+
};
|
|
2325
|
+
} | {
|
|
2326
|
+
type: "tool-call-streaming-start";
|
|
2327
|
+
toolCallId: string;
|
|
2328
|
+
toolName: string;
|
|
2329
|
+
} | {
|
|
2330
|
+
type: "tool-call-delta";
|
|
2331
|
+
toolCallId: string;
|
|
2332
|
+
toolName: string;
|
|
2333
|
+
argsTextDelta: string;
|
|
2334
|
+
})[], import("convex/values").VUnion<{
|
|
2335
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2336
|
+
type: "tool-call";
|
|
2337
|
+
toolCallId: string;
|
|
2338
|
+
toolName: string;
|
|
2339
|
+
args: any;
|
|
2340
|
+
} | {
|
|
2341
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2342
|
+
args?: any;
|
|
2343
|
+
experimental_content?: ({
|
|
2344
|
+
type: "text";
|
|
2345
|
+
text: string;
|
|
2346
|
+
} | {
|
|
2347
|
+
mimeType?: string | undefined;
|
|
2348
|
+
type: "image";
|
|
2349
|
+
data: string;
|
|
2350
|
+
})[] | undefined;
|
|
2351
|
+
isError?: boolean | undefined;
|
|
2352
|
+
type: "tool-result";
|
|
2353
|
+
toolCallId: string;
|
|
2354
|
+
toolName: string;
|
|
2355
|
+
result: any;
|
|
2356
|
+
} | {
|
|
2357
|
+
type: "text-delta";
|
|
2358
|
+
textDelta: string;
|
|
2359
|
+
} | {
|
|
2360
|
+
type: "reasoning";
|
|
2361
|
+
textDelta: string;
|
|
2362
|
+
} | {
|
|
2363
|
+
type: "source";
|
|
2364
|
+
source: {
|
|
2365
|
+
title?: string | undefined;
|
|
2366
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2367
|
+
id: string;
|
|
2368
|
+
url: string;
|
|
2369
|
+
sourceType: "url";
|
|
2370
|
+
};
|
|
2371
|
+
} | {
|
|
2372
|
+
type: "tool-call-streaming-start";
|
|
2373
|
+
toolCallId: string;
|
|
2374
|
+
toolName: string;
|
|
2375
|
+
} | {
|
|
2376
|
+
type: "tool-call-delta";
|
|
2377
|
+
toolCallId: string;
|
|
2378
|
+
toolName: string;
|
|
2379
|
+
argsTextDelta: string;
|
|
2380
|
+
}, [import("convex/values").VObject<{
|
|
2381
|
+
type: "text-delta";
|
|
2382
|
+
textDelta: string;
|
|
2383
|
+
}, {
|
|
2384
|
+
type: import("convex/values").VLiteral<"text-delta", "required">;
|
|
2385
|
+
textDelta: import("convex/values").VString<string, "required">;
|
|
2386
|
+
}, "required", "type" | "textDelta">, import("convex/values").VObject<{
|
|
2387
|
+
type: "reasoning";
|
|
2388
|
+
textDelta: string;
|
|
2389
|
+
}, {
|
|
2390
|
+
type: import("convex/values").VLiteral<"reasoning", "required">;
|
|
2391
|
+
textDelta: import("convex/values").VString<string, "required">;
|
|
2392
|
+
}, "required", "type" | "textDelta">, import("convex/values").VObject<{
|
|
2393
|
+
type: "source";
|
|
2394
|
+
source: {
|
|
2395
|
+
title?: string | undefined;
|
|
2396
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2397
|
+
id: string;
|
|
2398
|
+
url: string;
|
|
2399
|
+
sourceType: "url";
|
|
2400
|
+
};
|
|
2401
|
+
}, {
|
|
2402
|
+
type: import("convex/values").VLiteral<"source", "required">;
|
|
2403
|
+
source: import("convex/values").VObject<{
|
|
2404
|
+
title?: string | undefined;
|
|
2405
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2406
|
+
id: string;
|
|
2407
|
+
url: string;
|
|
2408
|
+
sourceType: "url";
|
|
2409
|
+
}, {
|
|
2410
|
+
sourceType: import("convex/values").VLiteral<"url", "required">;
|
|
2411
|
+
id: import("convex/values").VString<string, "required">;
|
|
2412
|
+
url: import("convex/values").VString<string, "required">;
|
|
2413
|
+
title: import("convex/values").VString<string | undefined, "optional">;
|
|
2414
|
+
providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
|
|
2415
|
+
}, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "url" | "sourceType">;
|
|
2416
|
+
}, "required", "type" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.url" | "source.sourceType">, import("convex/values").VObject<{
|
|
2417
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2418
|
+
type: "tool-call";
|
|
2419
|
+
toolCallId: string;
|
|
2420
|
+
toolName: string;
|
|
2421
|
+
args: any;
|
|
2422
|
+
}, {
|
|
2423
|
+
type: import("convex/values").VLiteral<"tool-call", "required">;
|
|
2424
|
+
toolCallId: import("convex/values").VString<string, "required">;
|
|
2425
|
+
toolName: import("convex/values").VString<string, "required">;
|
|
2426
|
+
args: import("convex/values").VAny<any, "required", string>;
|
|
2427
|
+
providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
|
|
2428
|
+
}, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>, import("convex/values").VObject<{
|
|
2429
|
+
type: "tool-call-streaming-start";
|
|
2430
|
+
toolCallId: string;
|
|
2431
|
+
toolName: string;
|
|
2432
|
+
}, {
|
|
2433
|
+
type: import("convex/values").VLiteral<"tool-call-streaming-start", "required">;
|
|
2434
|
+
toolCallId: import("convex/values").VString<string, "required">;
|
|
2435
|
+
toolName: import("convex/values").VString<string, "required">;
|
|
2436
|
+
}, "required", "type" | "toolCallId" | "toolName">, import("convex/values").VObject<{
|
|
2437
|
+
type: "tool-call-delta";
|
|
2438
|
+
toolCallId: string;
|
|
2439
|
+
toolName: string;
|
|
2440
|
+
argsTextDelta: string;
|
|
2441
|
+
}, {
|
|
2442
|
+
type: import("convex/values").VLiteral<"tool-call-delta", "required">;
|
|
2443
|
+
toolCallId: import("convex/values").VString<string, "required">;
|
|
2444
|
+
toolName: import("convex/values").VString<string, "required">;
|
|
2445
|
+
argsTextDelta: import("convex/values").VString<string, "required">;
|
|
2446
|
+
}, "required", "type" | "toolCallId" | "toolName" | "argsTextDelta">, import("convex/values").VObject<{
|
|
2447
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2448
|
+
args?: any;
|
|
2449
|
+
experimental_content?: ({
|
|
2450
|
+
type: "text";
|
|
2451
|
+
text: string;
|
|
2452
|
+
} | {
|
|
2453
|
+
mimeType?: string | undefined;
|
|
2454
|
+
type: "image";
|
|
2455
|
+
data: string;
|
|
2456
|
+
})[] | undefined;
|
|
2457
|
+
isError?: boolean | undefined;
|
|
2458
|
+
type: "tool-result";
|
|
2459
|
+
toolCallId: string;
|
|
2460
|
+
toolName: string;
|
|
2461
|
+
result: any;
|
|
2462
|
+
}, {
|
|
2463
|
+
type: import("convex/values").VLiteral<"tool-result", "required">;
|
|
2464
|
+
toolCallId: import("convex/values").VString<string, "required">;
|
|
2465
|
+
toolName: import("convex/values").VString<string, "required">;
|
|
2466
|
+
result: import("convex/values").VAny<any, "required", string>;
|
|
2467
|
+
args: import("convex/values").VAny<any, "optional", string>;
|
|
2468
|
+
experimental_content: import("convex/values").VArray<({
|
|
2469
|
+
type: "text";
|
|
2470
|
+
text: string;
|
|
2471
|
+
} | {
|
|
2472
|
+
mimeType?: string | undefined;
|
|
2473
|
+
type: "image";
|
|
2474
|
+
data: string;
|
|
2475
|
+
})[] | undefined, import("convex/values").VUnion<{
|
|
2476
|
+
type: "text";
|
|
2477
|
+
text: string;
|
|
2478
|
+
} | {
|
|
2479
|
+
mimeType?: string | undefined;
|
|
2480
|
+
type: "image";
|
|
2481
|
+
data: string;
|
|
2482
|
+
}, [import("convex/values").VObject<{
|
|
2483
|
+
type: "text";
|
|
2484
|
+
text: string;
|
|
2485
|
+
}, {
|
|
2486
|
+
type: import("convex/values").VLiteral<"text", "required">;
|
|
2487
|
+
text: import("convex/values").VString<string, "required">;
|
|
2488
|
+
}, "required", "type" | "text">, import("convex/values").VObject<{
|
|
2489
|
+
mimeType?: string | undefined;
|
|
2490
|
+
type: "image";
|
|
2491
|
+
data: string;
|
|
2492
|
+
}, {
|
|
2493
|
+
type: import("convex/values").VLiteral<"image", "required">;
|
|
2494
|
+
data: import("convex/values").VString<string, "required">;
|
|
2495
|
+
mimeType: import("convex/values").VString<string | undefined, "optional">;
|
|
2496
|
+
}, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
|
|
2497
|
+
isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
2498
|
+
providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
|
|
2499
|
+
}, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>], "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}` | "textDelta" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.url" | "source.sourceType" | "argsTextDelta">, "required">;
|
|
2500
|
+
}, "required", "streamId" | "start" | "end" | "parts">, {
|
|
2501
|
+
streamId_start_end: ["streamId", "start", "end", "_creationTime"];
|
|
2502
|
+
}, {}, {}>;
|
|
2165
2503
|
memories: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
2166
2504
|
userId?: string | undefined;
|
|
2167
2505
|
threadId?: import("convex/values").GenericId<"threads"> | undefined;
|
|
@@ -2824,6 +3162,103 @@ export declare const vv: {
|
|
|
2824
3162
|
searchIndexes: {};
|
|
2825
3163
|
vectorIndexes: {};
|
|
2826
3164
|
};
|
|
3165
|
+
streamingMessages: {
|
|
3166
|
+
document: {
|
|
3167
|
+
_id: import("convex/values").GenericId<"streamingMessages">;
|
|
3168
|
+
_creationTime: number;
|
|
3169
|
+
userId?: string | undefined;
|
|
3170
|
+
agentName?: string | undefined;
|
|
3171
|
+
model?: string | undefined;
|
|
3172
|
+
provider?: string | undefined;
|
|
3173
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
3174
|
+
order: number;
|
|
3175
|
+
threadId: import("convex/values").GenericId<"threads">;
|
|
3176
|
+
stepOrder: number;
|
|
3177
|
+
state: {
|
|
3178
|
+
timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
|
|
3179
|
+
kind: "streaming";
|
|
3180
|
+
lastHeartbeat: number;
|
|
3181
|
+
} | {
|
|
3182
|
+
kind: "finished";
|
|
3183
|
+
endedAt: number;
|
|
3184
|
+
} | {
|
|
3185
|
+
error: string;
|
|
3186
|
+
kind: "error";
|
|
3187
|
+
};
|
|
3188
|
+
};
|
|
3189
|
+
fieldPaths: ("userId" | "order" | "_creationTime" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.error" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt") | "_id";
|
|
3190
|
+
indexes: {
|
|
3191
|
+
threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
|
|
3192
|
+
by_id: ["_id"];
|
|
3193
|
+
by_creation_time: ["_creationTime"];
|
|
3194
|
+
};
|
|
3195
|
+
searchIndexes: {};
|
|
3196
|
+
vectorIndexes: {};
|
|
3197
|
+
};
|
|
3198
|
+
streamDeltas: {
|
|
3199
|
+
document: {
|
|
3200
|
+
_id: import("convex/values").GenericId<"streamDeltas">;
|
|
3201
|
+
_creationTime: number;
|
|
3202
|
+
streamId: import("convex/values").GenericId<"streamingMessages">;
|
|
3203
|
+
start: number;
|
|
3204
|
+
end: number;
|
|
3205
|
+
parts: ({
|
|
3206
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
3207
|
+
type: "tool-call";
|
|
3208
|
+
toolCallId: string;
|
|
3209
|
+
toolName: string;
|
|
3210
|
+
args: any;
|
|
3211
|
+
} | {
|
|
3212
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
3213
|
+
args?: any;
|
|
3214
|
+
experimental_content?: ({
|
|
3215
|
+
type: "text";
|
|
3216
|
+
text: string;
|
|
3217
|
+
} | {
|
|
3218
|
+
mimeType?: string | undefined;
|
|
3219
|
+
type: "image";
|
|
3220
|
+
data: string;
|
|
3221
|
+
})[] | undefined;
|
|
3222
|
+
isError?: boolean | undefined;
|
|
3223
|
+
type: "tool-result";
|
|
3224
|
+
toolCallId: string;
|
|
3225
|
+
toolName: string;
|
|
3226
|
+
result: any;
|
|
3227
|
+
} | {
|
|
3228
|
+
type: "text-delta";
|
|
3229
|
+
textDelta: string;
|
|
3230
|
+
} | {
|
|
3231
|
+
type: "reasoning";
|
|
3232
|
+
textDelta: string;
|
|
3233
|
+
} | {
|
|
3234
|
+
type: "source";
|
|
3235
|
+
source: {
|
|
3236
|
+
title?: string | undefined;
|
|
3237
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
3238
|
+
id: string;
|
|
3239
|
+
url: string;
|
|
3240
|
+
sourceType: "url";
|
|
3241
|
+
};
|
|
3242
|
+
} | {
|
|
3243
|
+
type: "tool-call-streaming-start";
|
|
3244
|
+
toolCallId: string;
|
|
3245
|
+
toolName: string;
|
|
3246
|
+
} | {
|
|
3247
|
+
type: "tool-call-delta";
|
|
3248
|
+
toolCallId: string;
|
|
3249
|
+
toolName: string;
|
|
3250
|
+
argsTextDelta: string;
|
|
3251
|
+
})[];
|
|
3252
|
+
};
|
|
3253
|
+
fieldPaths: ("_creationTime" | "streamId" | "start" | "end" | "parts") | "_id";
|
|
3254
|
+
indexes: {
|
|
3255
|
+
streamId_start_end: ["streamId", "start", "end", "_creationTime"];
|
|
3256
|
+
by_id: ["_id"];
|
|
3257
|
+
by_creation_time: ["_creationTime"];
|
|
3258
|
+
};
|
|
3259
|
+
searchIndexes: {};
|
|
3260
|
+
vectorIndexes: {};
|
|
3261
|
+
};
|
|
2827
3262
|
memories: {
|
|
2828
3263
|
document: {
|
|
2829
3264
|
_id: import("convex/values").GenericId<"memories">;
|
|
@@ -3483,10 +3918,107 @@ export declare const vv: {
|
|
|
3483
3918
|
}[];
|
|
3484
3919
|
};
|
|
3485
3920
|
};
|
|
3486
|
-
fieldPaths: ("status" | "order" | "_creationTime" | "threadId" | "stepOrder" | "parentMessageId" | "step" | "step.text" | "step.reasoning" | "step.files" | "step.usage" | "step.providerMetadata" | "step.sources" | "step.reasoningDetails" | "step.warnings" | "step.finishReason" | "step.usage.promptTokens" | "step.usage.completionTokens" | "step.usage.totalTokens" | `step.providerMetadata.${string}` | "step.isContinued" | "step.logprobs" | "step.experimental_providerMetadata" | "step.request" | "step.response" | "step.stepType" | "step.toolCalls" | "step.toolResults" | `step.logprobs.${string}` | `step.experimental_providerMetadata.${string}` | "step.request.url" | "step.request.body" | "step.request.headers" | "step.request.method" | `step.request.body.${string}` | `step.request.headers.${string}` | "step.response.id" | "step.response.messages" | "step.response.body" | "step.response.headers" | `step.response.body.${string}` | `step.response.headers.${string}` | "step.response.timestamp" | "step.response.modelId") | "_id";
|
|
3921
|
+
fieldPaths: ("status" | "order" | "_creationTime" | "threadId" | "stepOrder" | "parentMessageId" | "step" | "step.text" | "step.reasoning" | "step.files" | "step.usage" | "step.providerMetadata" | "step.sources" | "step.reasoningDetails" | "step.warnings" | "step.finishReason" | "step.usage.promptTokens" | "step.usage.completionTokens" | "step.usage.totalTokens" | `step.providerMetadata.${string}` | "step.isContinued" | "step.logprobs" | "step.experimental_providerMetadata" | "step.request" | "step.response" | "step.stepType" | "step.toolCalls" | "step.toolResults" | `step.logprobs.${string}` | `step.experimental_providerMetadata.${string}` | "step.request.url" | "step.request.body" | "step.request.headers" | "step.request.method" | `step.request.body.${string}` | `step.request.headers.${string}` | "step.response.id" | "step.response.messages" | "step.response.body" | "step.response.headers" | `step.response.body.${string}` | `step.response.headers.${string}` | "step.response.timestamp" | "step.response.modelId") | "_id";
|
|
3922
|
+
indexes: {
|
|
3923
|
+
status_threadId_order_stepOrder: ["status", "threadId", "order", "stepOrder", "_creationTime"];
|
|
3924
|
+
parentMessageId_order_stepOrder: ["parentMessageId", "order", "stepOrder", "_creationTime"];
|
|
3925
|
+
by_id: ["_id"];
|
|
3926
|
+
by_creation_time: ["_creationTime"];
|
|
3927
|
+
};
|
|
3928
|
+
searchIndexes: {};
|
|
3929
|
+
vectorIndexes: {};
|
|
3930
|
+
};
|
|
3931
|
+
streamingMessages: {
|
|
3932
|
+
document: {
|
|
3933
|
+
_id: import("convex/values").GenericId<"streamingMessages">;
|
|
3934
|
+
_creationTime: number;
|
|
3935
|
+
userId?: string | undefined;
|
|
3936
|
+
agentName?: string | undefined;
|
|
3937
|
+
model?: string | undefined;
|
|
3938
|
+
provider?: string | undefined;
|
|
3939
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
3940
|
+
order: number;
|
|
3941
|
+
threadId: import("convex/values").GenericId<"threads">;
|
|
3942
|
+
stepOrder: number;
|
|
3943
|
+
state: {
|
|
3944
|
+
timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
|
|
3945
|
+
kind: "streaming";
|
|
3946
|
+
lastHeartbeat: number;
|
|
3947
|
+
} | {
|
|
3948
|
+
kind: "finished";
|
|
3949
|
+
endedAt: number;
|
|
3950
|
+
} | {
|
|
3951
|
+
error: string;
|
|
3952
|
+
kind: "error";
|
|
3953
|
+
};
|
|
3954
|
+
};
|
|
3955
|
+
fieldPaths: ("userId" | "order" | "_creationTime" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.error" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt") | "_id";
|
|
3956
|
+
indexes: {
|
|
3957
|
+
threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
|
|
3958
|
+
by_id: ["_id"];
|
|
3959
|
+
by_creation_time: ["_creationTime"];
|
|
3960
|
+
};
|
|
3961
|
+
searchIndexes: {};
|
|
3962
|
+
vectorIndexes: {};
|
|
3963
|
+
};
|
|
3964
|
+
streamDeltas: {
|
|
3965
|
+
document: {
|
|
3966
|
+
_id: import("convex/values").GenericId<"streamDeltas">;
|
|
3967
|
+
_creationTime: number;
|
|
3968
|
+
streamId: import("convex/values").GenericId<"streamingMessages">;
|
|
3969
|
+
start: number;
|
|
3970
|
+
end: number;
|
|
3971
|
+
parts: ({
|
|
3972
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
3973
|
+
type: "tool-call";
|
|
3974
|
+
toolCallId: string;
|
|
3975
|
+
toolName: string;
|
|
3976
|
+
args: any;
|
|
3977
|
+
} | {
|
|
3978
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
3979
|
+
args?: any;
|
|
3980
|
+
experimental_content?: ({
|
|
3981
|
+
type: "text";
|
|
3982
|
+
text: string;
|
|
3983
|
+
} | {
|
|
3984
|
+
mimeType?: string | undefined;
|
|
3985
|
+
type: "image";
|
|
3986
|
+
data: string;
|
|
3987
|
+
})[] | undefined;
|
|
3988
|
+
isError?: boolean | undefined;
|
|
3989
|
+
type: "tool-result";
|
|
3990
|
+
toolCallId: string;
|
|
3991
|
+
toolName: string;
|
|
3992
|
+
result: any;
|
|
3993
|
+
} | {
|
|
3994
|
+
type: "text-delta";
|
|
3995
|
+
textDelta: string;
|
|
3996
|
+
} | {
|
|
3997
|
+
type: "reasoning";
|
|
3998
|
+
textDelta: string;
|
|
3999
|
+
} | {
|
|
4000
|
+
type: "source";
|
|
4001
|
+
source: {
|
|
4002
|
+
title?: string | undefined;
|
|
4003
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
4004
|
+
id: string;
|
|
4005
|
+
url: string;
|
|
4006
|
+
sourceType: "url";
|
|
4007
|
+
};
|
|
4008
|
+
} | {
|
|
4009
|
+
type: "tool-call-streaming-start";
|
|
4010
|
+
toolCallId: string;
|
|
4011
|
+
toolName: string;
|
|
4012
|
+
} | {
|
|
4013
|
+
type: "tool-call-delta";
|
|
4014
|
+
toolCallId: string;
|
|
4015
|
+
toolName: string;
|
|
4016
|
+
argsTextDelta: string;
|
|
4017
|
+
})[];
|
|
4018
|
+
};
|
|
4019
|
+
fieldPaths: ("_creationTime" | "streamId" | "start" | "end" | "parts") | "_id";
|
|
3487
4020
|
indexes: {
|
|
3488
|
-
|
|
3489
|
-
parentMessageId_order_stepOrder: ["parentMessageId", "order", "stepOrder", "_creationTime"];
|
|
4021
|
+
streamId_start_end: ["streamId", "start", "end", "_creationTime"];
|
|
3490
4022
|
by_id: ["_id"];
|
|
3491
4023
|
by_creation_time: ["_creationTime"];
|
|
3492
4024
|
};
|
|
@@ -5691,6 +6223,344 @@ export declare const vv: {
|
|
|
5691
6223
|
status_threadId_order_stepOrder: ["status", "threadId", "order", "stepOrder", "_creationTime"];
|
|
5692
6224
|
parentMessageId_order_stepOrder: ["parentMessageId", "order", "stepOrder", "_creationTime"];
|
|
5693
6225
|
}, {}, {}>;
|
|
6226
|
+
streamingMessages: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
6227
|
+
userId?: string | undefined;
|
|
6228
|
+
agentName?: string | undefined;
|
|
6229
|
+
model?: string | undefined;
|
|
6230
|
+
provider?: string | undefined;
|
|
6231
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
6232
|
+
order: number;
|
|
6233
|
+
threadId: import("convex/values").GenericId<"threads">;
|
|
6234
|
+
stepOrder: number;
|
|
6235
|
+
state: {
|
|
6236
|
+
timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
|
|
6237
|
+
kind: "streaming";
|
|
6238
|
+
lastHeartbeat: number;
|
|
6239
|
+
} | {
|
|
6240
|
+
kind: "finished";
|
|
6241
|
+
endedAt: number;
|
|
6242
|
+
} | {
|
|
6243
|
+
error: string;
|
|
6244
|
+
kind: "error";
|
|
6245
|
+
};
|
|
6246
|
+
}, {
|
|
6247
|
+
userId: import("convex/values").VString<string | undefined, "optional">;
|
|
6248
|
+
agentName: import("convex/values").VString<string | undefined, "optional">;
|
|
6249
|
+
model: import("convex/values").VString<string | undefined, "optional">;
|
|
6250
|
+
provider: import("convex/values").VString<string | undefined, "optional">;
|
|
6251
|
+
providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
|
|
6252
|
+
threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
|
|
6253
|
+
order: import("convex/values").VFloat64<number, "required">;
|
|
6254
|
+
/**
|
|
6255
|
+
* The step order of the first message in the stream.
|
|
6256
|
+
* If the stream ends up with both a tool call and a tool result,
|
|
6257
|
+
* the stepOrder of the result will be +1 of the tool call.
|
|
6258
|
+
*/
|
|
6259
|
+
stepOrder: import("convex/values").VFloat64<number, "required">;
|
|
6260
|
+
state: import("convex/values").VUnion<{
|
|
6261
|
+
timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
|
|
6262
|
+
kind: "streaming";
|
|
6263
|
+
lastHeartbeat: number;
|
|
6264
|
+
} | {
|
|
6265
|
+
kind: "finished";
|
|
6266
|
+
endedAt: number;
|
|
6267
|
+
} | {
|
|
6268
|
+
error: string;
|
|
6269
|
+
kind: "error";
|
|
6270
|
+
}, [import("convex/values").VObject<{
|
|
6271
|
+
timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
|
|
6272
|
+
kind: "streaming";
|
|
6273
|
+
lastHeartbeat: number;
|
|
6274
|
+
}, {
|
|
6275
|
+
kind: import("convex/values").VLiteral<"streaming", "required">;
|
|
6276
|
+
lastHeartbeat: import("convex/values").VFloat64<number, "required">;
|
|
6277
|
+
timeoutFnId: import("convex/values").VId<import("convex/values").GenericId<"_scheduled_functions"> | undefined, "optional">;
|
|
6278
|
+
}, "required", "kind" | "lastHeartbeat" | "timeoutFnId">, import("convex/values").VObject<{
|
|
6279
|
+
kind: "finished";
|
|
6280
|
+
endedAt: number;
|
|
6281
|
+
}, {
|
|
6282
|
+
kind: import("convex/values").VLiteral<"finished", "required">;
|
|
6283
|
+
endedAt: import("convex/values").VFloat64<number, "required">;
|
|
6284
|
+
}, "required", "kind" | "endedAt">, import("convex/values").VObject<{
|
|
6285
|
+
error: string;
|
|
6286
|
+
kind: "error";
|
|
6287
|
+
}, {
|
|
6288
|
+
kind: import("convex/values").VLiteral<"error", "required">;
|
|
6289
|
+
error: import("convex/values").VString<string, "required">;
|
|
6290
|
+
}, "required", "error" | "kind">], "required", "error" | "kind" | "lastHeartbeat" | "timeoutFnId" | "endedAt">;
|
|
6291
|
+
}, "required", "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.error" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt">, {
|
|
6292
|
+
threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
|
|
6293
|
+
}, {}, {}>;
|
|
6294
|
+
streamDeltas: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
6295
|
+
streamId: import("convex/values").GenericId<"streamingMessages">;
|
|
6296
|
+
start: number;
|
|
6297
|
+
end: number;
|
|
6298
|
+
parts: ({
|
|
6299
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
6300
|
+
type: "tool-call";
|
|
6301
|
+
toolCallId: string;
|
|
6302
|
+
toolName: string;
|
|
6303
|
+
args: any;
|
|
6304
|
+
} | {
|
|
6305
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
6306
|
+
args?: any;
|
|
6307
|
+
experimental_content?: ({
|
|
6308
|
+
type: "text";
|
|
6309
|
+
text: string;
|
|
6310
|
+
} | {
|
|
6311
|
+
mimeType?: string | undefined;
|
|
6312
|
+
type: "image";
|
|
6313
|
+
data: string;
|
|
6314
|
+
})[] | undefined;
|
|
6315
|
+
isError?: boolean | undefined;
|
|
6316
|
+
type: "tool-result";
|
|
6317
|
+
toolCallId: string;
|
|
6318
|
+
toolName: string;
|
|
6319
|
+
result: any;
|
|
6320
|
+
} | {
|
|
6321
|
+
type: "text-delta";
|
|
6322
|
+
textDelta: string;
|
|
6323
|
+
} | {
|
|
6324
|
+
type: "reasoning";
|
|
6325
|
+
textDelta: string;
|
|
6326
|
+
} | {
|
|
6327
|
+
type: "source";
|
|
6328
|
+
source: {
|
|
6329
|
+
title?: string | undefined;
|
|
6330
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
6331
|
+
id: string;
|
|
6332
|
+
url: string;
|
|
6333
|
+
sourceType: "url";
|
|
6334
|
+
};
|
|
6335
|
+
} | {
|
|
6336
|
+
type: "tool-call-streaming-start";
|
|
6337
|
+
toolCallId: string;
|
|
6338
|
+
toolName: string;
|
|
6339
|
+
} | {
|
|
6340
|
+
type: "tool-call-delta";
|
|
6341
|
+
toolCallId: string;
|
|
6342
|
+
toolName: string;
|
|
6343
|
+
argsTextDelta: string;
|
|
6344
|
+
})[];
|
|
6345
|
+
}, {
|
|
6346
|
+
streamId: import("convex/values").VId<import("convex/values").GenericId<"streamingMessages">, "required">;
|
|
6347
|
+
start: import("convex/values").VFloat64<number, "required">;
|
|
6348
|
+
end: import("convex/values").VFloat64<number, "required">;
|
|
6349
|
+
parts: import("convex/values").VArray<({
|
|
6350
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
6351
|
+
type: "tool-call";
|
|
6352
|
+
toolCallId: string;
|
|
6353
|
+
toolName: string;
|
|
6354
|
+
args: any;
|
|
6355
|
+
} | {
|
|
6356
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
6357
|
+
args?: any;
|
|
6358
|
+
experimental_content?: ({
|
|
6359
|
+
type: "text";
|
|
6360
|
+
text: string;
|
|
6361
|
+
} | {
|
|
6362
|
+
mimeType?: string | undefined;
|
|
6363
|
+
type: "image";
|
|
6364
|
+
data: string;
|
|
6365
|
+
})[] | undefined;
|
|
6366
|
+
isError?: boolean | undefined;
|
|
6367
|
+
type: "tool-result";
|
|
6368
|
+
toolCallId: string;
|
|
6369
|
+
toolName: string;
|
|
6370
|
+
result: any;
|
|
6371
|
+
} | {
|
|
6372
|
+
type: "text-delta";
|
|
6373
|
+
textDelta: string;
|
|
6374
|
+
} | {
|
|
6375
|
+
type: "reasoning";
|
|
6376
|
+
textDelta: string;
|
|
6377
|
+
} | {
|
|
6378
|
+
type: "source";
|
|
6379
|
+
source: {
|
|
6380
|
+
title?: string | undefined;
|
|
6381
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
6382
|
+
id: string;
|
|
6383
|
+
url: string;
|
|
6384
|
+
sourceType: "url";
|
|
6385
|
+
};
|
|
6386
|
+
} | {
|
|
6387
|
+
type: "tool-call-streaming-start";
|
|
6388
|
+
toolCallId: string;
|
|
6389
|
+
toolName: string;
|
|
6390
|
+
} | {
|
|
6391
|
+
type: "tool-call-delta";
|
|
6392
|
+
toolCallId: string;
|
|
6393
|
+
toolName: string;
|
|
6394
|
+
argsTextDelta: string;
|
|
6395
|
+
})[], import("convex/values").VUnion<{
|
|
6396
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
6397
|
+
type: "tool-call";
|
|
6398
|
+
toolCallId: string;
|
|
6399
|
+
toolName: string;
|
|
6400
|
+
args: any;
|
|
6401
|
+
} | {
|
|
6402
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
6403
|
+
args?: any;
|
|
6404
|
+
experimental_content?: ({
|
|
6405
|
+
type: "text";
|
|
6406
|
+
text: string;
|
|
6407
|
+
} | {
|
|
6408
|
+
mimeType?: string | undefined;
|
|
6409
|
+
type: "image";
|
|
6410
|
+
data: string;
|
|
6411
|
+
})[] | undefined;
|
|
6412
|
+
isError?: boolean | undefined;
|
|
6413
|
+
type: "tool-result";
|
|
6414
|
+
toolCallId: string;
|
|
6415
|
+
toolName: string;
|
|
6416
|
+
result: any;
|
|
6417
|
+
} | {
|
|
6418
|
+
type: "text-delta";
|
|
6419
|
+
textDelta: string;
|
|
6420
|
+
} | {
|
|
6421
|
+
type: "reasoning";
|
|
6422
|
+
textDelta: string;
|
|
6423
|
+
} | {
|
|
6424
|
+
type: "source";
|
|
6425
|
+
source: {
|
|
6426
|
+
title?: string | undefined;
|
|
6427
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
6428
|
+
id: string;
|
|
6429
|
+
url: string;
|
|
6430
|
+
sourceType: "url";
|
|
6431
|
+
};
|
|
6432
|
+
} | {
|
|
6433
|
+
type: "tool-call-streaming-start";
|
|
6434
|
+
toolCallId: string;
|
|
6435
|
+
toolName: string;
|
|
6436
|
+
} | {
|
|
6437
|
+
type: "tool-call-delta";
|
|
6438
|
+
toolCallId: string;
|
|
6439
|
+
toolName: string;
|
|
6440
|
+
argsTextDelta: string;
|
|
6441
|
+
}, [import("convex/values").VObject<{
|
|
6442
|
+
type: "text-delta";
|
|
6443
|
+
textDelta: string;
|
|
6444
|
+
}, {
|
|
6445
|
+
type: import("convex/values").VLiteral<"text-delta", "required">;
|
|
6446
|
+
textDelta: import("convex/values").VString<string, "required">;
|
|
6447
|
+
}, "required", "type" | "textDelta">, import("convex/values").VObject<{
|
|
6448
|
+
type: "reasoning";
|
|
6449
|
+
textDelta: string;
|
|
6450
|
+
}, {
|
|
6451
|
+
type: import("convex/values").VLiteral<"reasoning", "required">;
|
|
6452
|
+
textDelta: import("convex/values").VString<string, "required">;
|
|
6453
|
+
}, "required", "type" | "textDelta">, import("convex/values").VObject<{
|
|
6454
|
+
type: "source";
|
|
6455
|
+
source: {
|
|
6456
|
+
title?: string | undefined;
|
|
6457
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
6458
|
+
id: string;
|
|
6459
|
+
url: string;
|
|
6460
|
+
sourceType: "url";
|
|
6461
|
+
};
|
|
6462
|
+
}, {
|
|
6463
|
+
type: import("convex/values").VLiteral<"source", "required">;
|
|
6464
|
+
source: import("convex/values").VObject<{
|
|
6465
|
+
title?: string | undefined;
|
|
6466
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
6467
|
+
id: string;
|
|
6468
|
+
url: string;
|
|
6469
|
+
sourceType: "url";
|
|
6470
|
+
}, {
|
|
6471
|
+
sourceType: import("convex/values").VLiteral<"url", "required">;
|
|
6472
|
+
id: import("convex/values").VString<string, "required">;
|
|
6473
|
+
url: import("convex/values").VString<string, "required">;
|
|
6474
|
+
title: import("convex/values").VString<string | undefined, "optional">;
|
|
6475
|
+
providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
|
|
6476
|
+
}, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "url" | "sourceType">;
|
|
6477
|
+
}, "required", "type" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.url" | "source.sourceType">, import("convex/values").VObject<{
|
|
6478
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
6479
|
+
type: "tool-call";
|
|
6480
|
+
toolCallId: string;
|
|
6481
|
+
toolName: string;
|
|
6482
|
+
args: any;
|
|
6483
|
+
}, {
|
|
6484
|
+
type: import("convex/values").VLiteral<"tool-call", "required">;
|
|
6485
|
+
toolCallId: import("convex/values").VString<string, "required">;
|
|
6486
|
+
toolName: import("convex/values").VString<string, "required">;
|
|
6487
|
+
args: import("convex/values").VAny<any, "required", string>;
|
|
6488
|
+
providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
|
|
6489
|
+
}, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>, import("convex/values").VObject<{
|
|
6490
|
+
type: "tool-call-streaming-start";
|
|
6491
|
+
toolCallId: string;
|
|
6492
|
+
toolName: string;
|
|
6493
|
+
}, {
|
|
6494
|
+
type: import("convex/values").VLiteral<"tool-call-streaming-start", "required">;
|
|
6495
|
+
toolCallId: import("convex/values").VString<string, "required">;
|
|
6496
|
+
toolName: import("convex/values").VString<string, "required">;
|
|
6497
|
+
}, "required", "type" | "toolCallId" | "toolName">, import("convex/values").VObject<{
|
|
6498
|
+
type: "tool-call-delta";
|
|
6499
|
+
toolCallId: string;
|
|
6500
|
+
toolName: string;
|
|
6501
|
+
argsTextDelta: string;
|
|
6502
|
+
}, {
|
|
6503
|
+
type: import("convex/values").VLiteral<"tool-call-delta", "required">;
|
|
6504
|
+
toolCallId: import("convex/values").VString<string, "required">;
|
|
6505
|
+
toolName: import("convex/values").VString<string, "required">;
|
|
6506
|
+
argsTextDelta: import("convex/values").VString<string, "required">;
|
|
6507
|
+
}, "required", "type" | "toolCallId" | "toolName" | "argsTextDelta">, import("convex/values").VObject<{
|
|
6508
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
6509
|
+
args?: any;
|
|
6510
|
+
experimental_content?: ({
|
|
6511
|
+
type: "text";
|
|
6512
|
+
text: string;
|
|
6513
|
+
} | {
|
|
6514
|
+
mimeType?: string | undefined;
|
|
6515
|
+
type: "image";
|
|
6516
|
+
data: string;
|
|
6517
|
+
})[] | undefined;
|
|
6518
|
+
isError?: boolean | undefined;
|
|
6519
|
+
type: "tool-result";
|
|
6520
|
+
toolCallId: string;
|
|
6521
|
+
toolName: string;
|
|
6522
|
+
result: any;
|
|
6523
|
+
}, {
|
|
6524
|
+
type: import("convex/values").VLiteral<"tool-result", "required">;
|
|
6525
|
+
toolCallId: import("convex/values").VString<string, "required">;
|
|
6526
|
+
toolName: import("convex/values").VString<string, "required">;
|
|
6527
|
+
result: import("convex/values").VAny<any, "required", string>;
|
|
6528
|
+
args: import("convex/values").VAny<any, "optional", string>;
|
|
6529
|
+
experimental_content: import("convex/values").VArray<({
|
|
6530
|
+
type: "text";
|
|
6531
|
+
text: string;
|
|
6532
|
+
} | {
|
|
6533
|
+
mimeType?: string | undefined;
|
|
6534
|
+
type: "image";
|
|
6535
|
+
data: string;
|
|
6536
|
+
})[] | undefined, import("convex/values").VUnion<{
|
|
6537
|
+
type: "text";
|
|
6538
|
+
text: string;
|
|
6539
|
+
} | {
|
|
6540
|
+
mimeType?: string | undefined;
|
|
6541
|
+
type: "image";
|
|
6542
|
+
data: string;
|
|
6543
|
+
}, [import("convex/values").VObject<{
|
|
6544
|
+
type: "text";
|
|
6545
|
+
text: string;
|
|
6546
|
+
}, {
|
|
6547
|
+
type: import("convex/values").VLiteral<"text", "required">;
|
|
6548
|
+
text: import("convex/values").VString<string, "required">;
|
|
6549
|
+
}, "required", "type" | "text">, import("convex/values").VObject<{
|
|
6550
|
+
mimeType?: string | undefined;
|
|
6551
|
+
type: "image";
|
|
6552
|
+
data: string;
|
|
6553
|
+
}, {
|
|
6554
|
+
type: import("convex/values").VLiteral<"image", "required">;
|
|
6555
|
+
data: import("convex/values").VString<string, "required">;
|
|
6556
|
+
mimeType: import("convex/values").VString<string | undefined, "optional">;
|
|
6557
|
+
}, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
|
|
6558
|
+
isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
6559
|
+
providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
|
|
6560
|
+
}, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>], "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}` | "textDelta" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.url" | "source.sourceType" | "argsTextDelta">, "required">;
|
|
6561
|
+
}, "required", "streamId" | "start" | "end" | "parts">, {
|
|
6562
|
+
streamId_start_end: ["streamId", "start", "end", "_creationTime"];
|
|
6563
|
+
}, {}, {}>;
|
|
5694
6564
|
memories: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
5695
6565
|
userId?: string | undefined;
|
|
5696
6566
|
threadId?: import("convex/values").GenericId<"threads"> | undefined;
|