@convex-dev/agent 0.2.6-alpha.1 → 0.2.7

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.
Files changed (101) hide show
  1. package/dist/client/createTool.js +1 -1
  2. package/dist/client/createTool.js.map +1 -1
  3. package/dist/client/definePlaygroundAPI.d.ts +6 -4
  4. package/dist/client/definePlaygroundAPI.d.ts.map +1 -1
  5. package/dist/client/definePlaygroundAPI.js +15 -6
  6. package/dist/client/definePlaygroundAPI.js.map +1 -1
  7. package/dist/client/index.d.ts +55 -122
  8. package/dist/client/index.d.ts.map +1 -1
  9. package/dist/client/index.js +47 -371
  10. package/dist/client/index.js.map +1 -1
  11. package/dist/client/messages.d.ts +1 -1
  12. package/dist/client/messages.d.ts.map +1 -1
  13. package/dist/client/mockModel.d.ts +5 -3
  14. package/dist/client/mockModel.d.ts.map +1 -1
  15. package/dist/client/mockModel.js +33 -24
  16. package/dist/client/mockModel.js.map +1 -1
  17. package/dist/client/saveInputMessages.d.ts +20 -0
  18. package/dist/client/saveInputMessages.d.ts.map +1 -0
  19. package/dist/client/saveInputMessages.js +57 -0
  20. package/dist/client/saveInputMessages.js.map +1 -0
  21. package/dist/client/search.d.ts +110 -9
  22. package/dist/client/search.d.ts.map +1 -1
  23. package/dist/client/search.js +271 -39
  24. package/dist/client/search.js.map +1 -1
  25. package/dist/client/start.d.ts +84 -0
  26. package/dist/client/start.d.ts.map +1 -0
  27. package/dist/client/start.js +171 -0
  28. package/dist/client/start.js.map +1 -0
  29. package/dist/client/streaming.d.ts +8 -8
  30. package/dist/client/streaming.d.ts.map +1 -1
  31. package/dist/client/streaming.js +2 -1
  32. package/dist/client/streaming.js.map +1 -1
  33. package/dist/client/textStreamParts.d.ts.map +1 -1
  34. package/dist/client/textStreamParts.js +2 -9
  35. package/dist/client/textStreamParts.js.map +1 -1
  36. package/dist/client/threads.d.ts +1 -1
  37. package/dist/client/threads.d.ts.map +1 -1
  38. package/dist/client/types.d.ts +147 -17
  39. package/dist/client/types.d.ts.map +1 -1
  40. package/dist/component/_generated/api.d.ts +11 -3
  41. package/dist/component/messages.d.ts +13 -4
  42. package/dist/component/messages.d.ts.map +1 -1
  43. package/dist/component/messages.js +67 -25
  44. package/dist/component/messages.js.map +1 -1
  45. package/dist/component/schema.d.ts +2 -1643
  46. package/dist/component/schema.d.ts.map +1 -1
  47. package/dist/component/schema.js +0 -24
  48. package/dist/component/schema.js.map +1 -1
  49. package/dist/mapping.d.ts +5 -8
  50. package/dist/mapping.d.ts.map +1 -1
  51. package/dist/mapping.js +72 -6
  52. package/dist/mapping.js.map +1 -1
  53. package/dist/react/deltas.d.ts.map +1 -1
  54. package/dist/react/deltas.js +1 -0
  55. package/dist/react/deltas.js.map +1 -1
  56. package/dist/react/fromUIMessages.d.ts +13 -0
  57. package/dist/react/fromUIMessages.d.ts.map +1 -0
  58. package/dist/react/fromUIMessages.js +75 -0
  59. package/dist/react/fromUIMessages.js.map +1 -0
  60. package/dist/react/toUIMessages.d.ts +5 -2
  61. package/dist/react/toUIMessages.d.ts.map +1 -1
  62. package/dist/react/toUIMessages.js +3 -0
  63. package/dist/react/toUIMessages.js.map +1 -1
  64. package/dist/shared.d.ts +10 -0
  65. package/dist/shared.d.ts.map +1 -1
  66. package/dist/shared.js +26 -0
  67. package/dist/shared.js.map +1 -1
  68. package/dist/validators.d.ts +1640 -0
  69. package/dist/validators.d.ts.map +1 -1
  70. package/dist/validators.js +41 -0
  71. package/dist/validators.js.map +1 -1
  72. package/package.json +4 -4
  73. package/src/client/createTool.ts +1 -1
  74. package/src/client/definePlaygroundAPI.ts +16 -7
  75. package/src/client/index.test.ts +11 -46
  76. package/src/client/index.ts +128 -573
  77. package/src/client/messages.ts +1 -1
  78. package/src/client/mock.json +68 -0
  79. package/src/client/mockModel.ts +47 -31
  80. package/src/client/saveInputMessages.test.ts +576 -0
  81. package/src/client/saveInputMessages.ts +100 -0
  82. package/src/client/search.test.ts +1017 -0
  83. package/src/client/search.ts +446 -68
  84. package/src/client/start.ts +315 -0
  85. package/src/client/stream.json +48 -0
  86. package/src/client/streaming.ts +3 -3
  87. package/src/client/textStreamParts.ts +2 -11
  88. package/src/client/threads.ts +1 -1
  89. package/src/client/types.ts +153 -22
  90. package/src/component/_generated/api.d.ts +11 -3
  91. package/src/component/messages.ts +73 -27
  92. package/src/component/schema.ts +1 -29
  93. package/src/mapping.ts +83 -6
  94. package/src/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
  95. package/src/react/deltas.ts +1 -0
  96. package/src/react/fromUIMessages.test.ts +467 -0
  97. package/src/react/fromUIMessages.ts +90 -0
  98. package/src/react/toUIMessages.ts +21 -13
  99. package/src/shared.ts +33 -0
  100. package/src/validators.test.ts +13 -2
  101. package/src/validators.ts +48 -0
@@ -11297,5 +11297,1645 @@ export declare const vStreamDelta: import("convex/values").VObject<{
11297
11297
  parts: import("convex/values").VArray<any[], import("convex/values").VAny<any, "required", string>, "required">;
11298
11298
  }, "required", "streamId" | "start" | "end" | "parts">;
11299
11299
  export type StreamDelta = Infer<typeof vStreamDelta>;
11300
+ export declare const vMessageDoc: import("convex/values").VObject<{
11301
+ id?: string | undefined;
11302
+ userId?: string | undefined;
11303
+ embeddingId?: string | undefined;
11304
+ fileIds?: string[] | undefined;
11305
+ error?: string | undefined;
11306
+ agentName?: string | undefined;
11307
+ model?: string | undefined;
11308
+ provider?: string | undefined;
11309
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11310
+ message?: {
11311
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11312
+ role: "user";
11313
+ content: string | ({
11314
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11315
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11316
+ type: "text";
11317
+ text: string;
11318
+ } | {
11319
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11320
+ mimeType?: string | undefined;
11321
+ type: "image";
11322
+ image: string | ArrayBuffer;
11323
+ } | {
11324
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11325
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11326
+ filename?: string | undefined;
11327
+ type: "file";
11328
+ mimeType: string;
11329
+ data: string | ArrayBuffer;
11330
+ })[];
11331
+ } | {
11332
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11333
+ role: "assistant";
11334
+ content: string | ({
11335
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11336
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11337
+ type: "text";
11338
+ text: string;
11339
+ } | {
11340
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11341
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11342
+ filename?: string | undefined;
11343
+ type: "file";
11344
+ mimeType: string;
11345
+ data: string | ArrayBuffer;
11346
+ } | {
11347
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11348
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11349
+ signature?: string | undefined;
11350
+ type: "reasoning";
11351
+ text: string;
11352
+ } | {
11353
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11354
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11355
+ type: "redacted-reasoning";
11356
+ data: string;
11357
+ } | {
11358
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11359
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11360
+ providerExecuted?: boolean | undefined;
11361
+ type: "tool-call";
11362
+ toolCallId: string;
11363
+ toolName: string;
11364
+ args: any;
11365
+ } | {
11366
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11367
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11368
+ args?: any;
11369
+ providerExecuted?: boolean | undefined;
11370
+ output?: {
11371
+ type: "text";
11372
+ value: string;
11373
+ } | {
11374
+ type: "json";
11375
+ value: any;
11376
+ } | {
11377
+ type: "error-text";
11378
+ value: string;
11379
+ } | {
11380
+ type: "error-json";
11381
+ value: any;
11382
+ } | {
11383
+ type: "content";
11384
+ value: ({
11385
+ type: "text";
11386
+ text: string;
11387
+ } | {
11388
+ type: "media";
11389
+ data: string;
11390
+ mediaType: string;
11391
+ })[];
11392
+ } | undefined;
11393
+ result?: any;
11394
+ isError?: boolean | undefined;
11395
+ experimental_content?: ({
11396
+ type: "text";
11397
+ text: string;
11398
+ } | {
11399
+ mimeType?: string | undefined;
11400
+ type: "image";
11401
+ data: string;
11402
+ })[] | undefined;
11403
+ type: "tool-result";
11404
+ toolCallId: string;
11405
+ toolName: string;
11406
+ } | {
11407
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11408
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11409
+ id: string;
11410
+ title: string;
11411
+ type: "source";
11412
+ sourceType: "url";
11413
+ url: string;
11414
+ } | {
11415
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11416
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11417
+ filename?: string | undefined;
11418
+ id: string;
11419
+ title: string;
11420
+ type: "source";
11421
+ mediaType: string;
11422
+ sourceType: "document";
11423
+ })[];
11424
+ } | {
11425
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11426
+ role: "tool";
11427
+ content: {
11428
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11429
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11430
+ args?: any;
11431
+ providerExecuted?: boolean | undefined;
11432
+ output?: {
11433
+ type: "text";
11434
+ value: string;
11435
+ } | {
11436
+ type: "json";
11437
+ value: any;
11438
+ } | {
11439
+ type: "error-text";
11440
+ value: string;
11441
+ } | {
11442
+ type: "error-json";
11443
+ value: any;
11444
+ } | {
11445
+ type: "content";
11446
+ value: ({
11447
+ type: "text";
11448
+ text: string;
11449
+ } | {
11450
+ type: "media";
11451
+ data: string;
11452
+ mediaType: string;
11453
+ })[];
11454
+ } | undefined;
11455
+ result?: any;
11456
+ isError?: boolean | undefined;
11457
+ experimental_content?: ({
11458
+ type: "text";
11459
+ text: string;
11460
+ } | {
11461
+ mimeType?: string | undefined;
11462
+ type: "image";
11463
+ data: string;
11464
+ })[] | undefined;
11465
+ type: "tool-result";
11466
+ toolCallId: string;
11467
+ toolName: string;
11468
+ }[];
11469
+ } | {
11470
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11471
+ role: "system";
11472
+ content: string;
11473
+ } | undefined;
11474
+ text?: string | undefined;
11475
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11476
+ reasoning?: string | undefined;
11477
+ usage?: {
11478
+ reasoningTokens?: number | undefined;
11479
+ cachedInputTokens?: number | undefined;
11480
+ promptTokens: number;
11481
+ completionTokens: number;
11482
+ totalTokens: number;
11483
+ } | undefined;
11484
+ sources?: ({
11485
+ title?: string | undefined;
11486
+ type?: "source" | undefined;
11487
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11488
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11489
+ id: string;
11490
+ sourceType: "url";
11491
+ url: string;
11492
+ } | {
11493
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11494
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11495
+ filename?: string | undefined;
11496
+ id: string;
11497
+ title: string;
11498
+ type: "source";
11499
+ mediaType: string;
11500
+ sourceType: "document";
11501
+ })[] | undefined;
11502
+ warnings?: ({
11503
+ details?: string | undefined;
11504
+ type: "unsupported-setting";
11505
+ setting: string;
11506
+ } | {
11507
+ details?: string | undefined;
11508
+ type: "unsupported-tool";
11509
+ tool: any;
11510
+ } | {
11511
+ type: "other";
11512
+ message: string;
11513
+ })[] | undefined;
11514
+ finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
11515
+ reasoningDetails?: ({
11516
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11517
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11518
+ signature?: string | undefined;
11519
+ type: "reasoning";
11520
+ text: string;
11521
+ } | {
11522
+ signature?: string | undefined;
11523
+ type: "text";
11524
+ text: string;
11525
+ } | {
11526
+ type: "redacted";
11527
+ data: string;
11528
+ })[] | undefined;
11529
+ _id: string;
11530
+ _creationTime: number;
11531
+ status: "pending" | "success" | "failed";
11532
+ order: number;
11533
+ threadId: string;
11534
+ stepOrder: number;
11535
+ tool: boolean;
11536
+ }, {
11537
+ _id: import("convex/values").VString<string, "required">;
11538
+ _creationTime: import("convex/values").VFloat64<number, "required">;
11539
+ userId: import("convex/values").VString<string | undefined, "optional">;
11540
+ threadId: import("convex/values").VString<string, "required">;
11541
+ order: import("convex/values").VFloat64<number, "required">;
11542
+ stepOrder: import("convex/values").VFloat64<number, "required">;
11543
+ embeddingId: import("convex/values").VString<string | undefined, "optional">;
11544
+ fileIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
11545
+ error: import("convex/values").VString<string | undefined, "optional">;
11546
+ status: import("convex/values").VUnion<"pending" | "success" | "failed", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"success", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
11547
+ agentName: import("convex/values").VString<string | undefined, "optional">;
11548
+ model: import("convex/values").VString<string | undefined, "optional">;
11549
+ provider: import("convex/values").VString<string | undefined, "optional">;
11550
+ 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>;
11551
+ message: import("convex/values").VUnion<{
11552
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11553
+ role: "user";
11554
+ content: string | ({
11555
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11556
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11557
+ type: "text";
11558
+ text: string;
11559
+ } | {
11560
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11561
+ mimeType?: string | undefined;
11562
+ type: "image";
11563
+ image: string | ArrayBuffer;
11564
+ } | {
11565
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11566
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11567
+ filename?: string | undefined;
11568
+ type: "file";
11569
+ mimeType: string;
11570
+ data: string | ArrayBuffer;
11571
+ })[];
11572
+ } | {
11573
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11574
+ role: "assistant";
11575
+ content: string | ({
11576
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11577
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11578
+ type: "text";
11579
+ text: string;
11580
+ } | {
11581
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11582
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11583
+ filename?: string | undefined;
11584
+ type: "file";
11585
+ mimeType: string;
11586
+ data: string | ArrayBuffer;
11587
+ } | {
11588
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11589
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11590
+ signature?: string | undefined;
11591
+ type: "reasoning";
11592
+ text: string;
11593
+ } | {
11594
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11595
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11596
+ type: "redacted-reasoning";
11597
+ data: string;
11598
+ } | {
11599
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11600
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11601
+ providerExecuted?: boolean | undefined;
11602
+ type: "tool-call";
11603
+ toolCallId: string;
11604
+ toolName: string;
11605
+ args: any;
11606
+ } | {
11607
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11608
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11609
+ args?: any;
11610
+ providerExecuted?: boolean | undefined;
11611
+ output?: {
11612
+ type: "text";
11613
+ value: string;
11614
+ } | {
11615
+ type: "json";
11616
+ value: any;
11617
+ } | {
11618
+ type: "error-text";
11619
+ value: string;
11620
+ } | {
11621
+ type: "error-json";
11622
+ value: any;
11623
+ } | {
11624
+ type: "content";
11625
+ value: ({
11626
+ type: "text";
11627
+ text: string;
11628
+ } | {
11629
+ type: "media";
11630
+ data: string;
11631
+ mediaType: string;
11632
+ })[];
11633
+ } | undefined;
11634
+ result?: any;
11635
+ isError?: boolean | undefined;
11636
+ experimental_content?: ({
11637
+ type: "text";
11638
+ text: string;
11639
+ } | {
11640
+ mimeType?: string | undefined;
11641
+ type: "image";
11642
+ data: string;
11643
+ })[] | undefined;
11644
+ type: "tool-result";
11645
+ toolCallId: string;
11646
+ toolName: string;
11647
+ } | {
11648
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11649
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11650
+ id: string;
11651
+ title: string;
11652
+ type: "source";
11653
+ sourceType: "url";
11654
+ url: string;
11655
+ } | {
11656
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11657
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11658
+ filename?: string | undefined;
11659
+ id: string;
11660
+ title: string;
11661
+ type: "source";
11662
+ mediaType: string;
11663
+ sourceType: "document";
11664
+ })[];
11665
+ } | {
11666
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11667
+ role: "tool";
11668
+ content: {
11669
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11670
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11671
+ args?: any;
11672
+ providerExecuted?: boolean | undefined;
11673
+ output?: {
11674
+ type: "text";
11675
+ value: string;
11676
+ } | {
11677
+ type: "json";
11678
+ value: any;
11679
+ } | {
11680
+ type: "error-text";
11681
+ value: string;
11682
+ } | {
11683
+ type: "error-json";
11684
+ value: any;
11685
+ } | {
11686
+ type: "content";
11687
+ value: ({
11688
+ type: "text";
11689
+ text: string;
11690
+ } | {
11691
+ type: "media";
11692
+ data: string;
11693
+ mediaType: string;
11694
+ })[];
11695
+ } | undefined;
11696
+ result?: any;
11697
+ isError?: boolean | undefined;
11698
+ experimental_content?: ({
11699
+ type: "text";
11700
+ text: string;
11701
+ } | {
11702
+ mimeType?: string | undefined;
11703
+ type: "image";
11704
+ data: string;
11705
+ })[] | undefined;
11706
+ type: "tool-result";
11707
+ toolCallId: string;
11708
+ toolName: string;
11709
+ }[];
11710
+ } | {
11711
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11712
+ role: "system";
11713
+ content: string;
11714
+ } | undefined, [import("convex/values").VObject<{
11715
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11716
+ role: "user";
11717
+ content: string | ({
11718
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11719
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11720
+ type: "text";
11721
+ text: string;
11722
+ } | {
11723
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11724
+ mimeType?: string | undefined;
11725
+ type: "image";
11726
+ image: string | ArrayBuffer;
11727
+ } | {
11728
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11729
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11730
+ filename?: string | undefined;
11731
+ type: "file";
11732
+ mimeType: string;
11733
+ data: string | ArrayBuffer;
11734
+ })[];
11735
+ }, {
11736
+ role: import("convex/values").VLiteral<"user", "required">;
11737
+ content: import("convex/values").VUnion<string | ({
11738
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11739
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11740
+ type: "text";
11741
+ text: string;
11742
+ } | {
11743
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11744
+ mimeType?: string | undefined;
11745
+ type: "image";
11746
+ image: string | ArrayBuffer;
11747
+ } | {
11748
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11749
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11750
+ filename?: string | undefined;
11751
+ type: "file";
11752
+ mimeType: string;
11753
+ data: string | ArrayBuffer;
11754
+ })[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<({
11755
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11756
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11757
+ type: "text";
11758
+ text: string;
11759
+ } | {
11760
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11761
+ mimeType?: string | undefined;
11762
+ type: "image";
11763
+ image: string | ArrayBuffer;
11764
+ } | {
11765
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11766
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11767
+ filename?: string | undefined;
11768
+ type: "file";
11769
+ mimeType: string;
11770
+ data: string | ArrayBuffer;
11771
+ })[], import("convex/values").VUnion<{
11772
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11773
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11774
+ type: "text";
11775
+ text: string;
11776
+ } | {
11777
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11778
+ mimeType?: string | undefined;
11779
+ type: "image";
11780
+ image: string | ArrayBuffer;
11781
+ } | {
11782
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11783
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11784
+ filename?: string | undefined;
11785
+ type: "file";
11786
+ mimeType: string;
11787
+ data: string | ArrayBuffer;
11788
+ }, [import("convex/values").VObject<{
11789
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11790
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11791
+ type: "text";
11792
+ text: string;
11793
+ }, {
11794
+ type: import("convex/values").VLiteral<"text", "required">;
11795
+ text: import("convex/values").VString<string, "required">;
11796
+ 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>;
11797
+ providerMetadata: 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>;
11798
+ }, "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}`>, import("convex/values").VObject<{
11799
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11800
+ mimeType?: string | undefined;
11801
+ type: "image";
11802
+ image: string | ArrayBuffer;
11803
+ }, {
11804
+ type: import("convex/values").VLiteral<"image", "required">;
11805
+ image: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
11806
+ mimeType: import("convex/values").VString<string | undefined, "optional">;
11807
+ 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>;
11808
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "image" | "mimeType">, import("convex/values").VObject<{
11809
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11810
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11811
+ filename?: string | undefined;
11812
+ type: "file";
11813
+ mimeType: string;
11814
+ data: string | ArrayBuffer;
11815
+ }, {
11816
+ type: import("convex/values").VLiteral<"file", "required">;
11817
+ data: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
11818
+ filename: import("convex/values").VString<string | undefined, "optional">;
11819
+ mimeType: import("convex/values").VString<string, "required">;
11820
+ 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>;
11821
+ providerMetadata: 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>;
11822
+ }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
11823
+ 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>;
11824
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
11825
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11826
+ role: "assistant";
11827
+ content: string | ({
11828
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11829
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11830
+ type: "text";
11831
+ text: string;
11832
+ } | {
11833
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11834
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11835
+ filename?: string | undefined;
11836
+ type: "file";
11837
+ mimeType: string;
11838
+ data: string | ArrayBuffer;
11839
+ } | {
11840
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11841
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11842
+ signature?: string | undefined;
11843
+ type: "reasoning";
11844
+ text: string;
11845
+ } | {
11846
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11847
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11848
+ type: "redacted-reasoning";
11849
+ data: string;
11850
+ } | {
11851
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11852
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11853
+ providerExecuted?: boolean | undefined;
11854
+ type: "tool-call";
11855
+ toolCallId: string;
11856
+ toolName: string;
11857
+ args: any;
11858
+ } | {
11859
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11860
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11861
+ args?: any;
11862
+ providerExecuted?: boolean | undefined;
11863
+ output?: {
11864
+ type: "text";
11865
+ value: string;
11866
+ } | {
11867
+ type: "json";
11868
+ value: any;
11869
+ } | {
11870
+ type: "error-text";
11871
+ value: string;
11872
+ } | {
11873
+ type: "error-json";
11874
+ value: any;
11875
+ } | {
11876
+ type: "content";
11877
+ value: ({
11878
+ type: "text";
11879
+ text: string;
11880
+ } | {
11881
+ type: "media";
11882
+ data: string;
11883
+ mediaType: string;
11884
+ })[];
11885
+ } | undefined;
11886
+ result?: any;
11887
+ isError?: boolean | undefined;
11888
+ experimental_content?: ({
11889
+ type: "text";
11890
+ text: string;
11891
+ } | {
11892
+ mimeType?: string | undefined;
11893
+ type: "image";
11894
+ data: string;
11895
+ })[] | undefined;
11896
+ type: "tool-result";
11897
+ toolCallId: string;
11898
+ toolName: string;
11899
+ } | {
11900
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11901
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11902
+ id: string;
11903
+ title: string;
11904
+ type: "source";
11905
+ sourceType: "url";
11906
+ url: string;
11907
+ } | {
11908
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11909
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11910
+ filename?: string | undefined;
11911
+ id: string;
11912
+ title: string;
11913
+ type: "source";
11914
+ mediaType: string;
11915
+ sourceType: "document";
11916
+ })[];
11917
+ }, {
11918
+ role: import("convex/values").VLiteral<"assistant", "required">;
11919
+ content: import("convex/values").VUnion<string | ({
11920
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11921
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11922
+ type: "text";
11923
+ text: string;
11924
+ } | {
11925
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11926
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11927
+ filename?: string | undefined;
11928
+ type: "file";
11929
+ mimeType: string;
11930
+ data: string | ArrayBuffer;
11931
+ } | {
11932
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11933
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11934
+ signature?: string | undefined;
11935
+ type: "reasoning";
11936
+ text: string;
11937
+ } | {
11938
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11939
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11940
+ type: "redacted-reasoning";
11941
+ data: string;
11942
+ } | {
11943
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11944
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11945
+ providerExecuted?: boolean | undefined;
11946
+ type: "tool-call";
11947
+ toolCallId: string;
11948
+ toolName: string;
11949
+ args: any;
11950
+ } | {
11951
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11952
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11953
+ args?: any;
11954
+ providerExecuted?: boolean | undefined;
11955
+ output?: {
11956
+ type: "text";
11957
+ value: string;
11958
+ } | {
11959
+ type: "json";
11960
+ value: any;
11961
+ } | {
11962
+ type: "error-text";
11963
+ value: string;
11964
+ } | {
11965
+ type: "error-json";
11966
+ value: any;
11967
+ } | {
11968
+ type: "content";
11969
+ value: ({
11970
+ type: "text";
11971
+ text: string;
11972
+ } | {
11973
+ type: "media";
11974
+ data: string;
11975
+ mediaType: string;
11976
+ })[];
11977
+ } | undefined;
11978
+ result?: any;
11979
+ isError?: boolean | undefined;
11980
+ experimental_content?: ({
11981
+ type: "text";
11982
+ text: string;
11983
+ } | {
11984
+ mimeType?: string | undefined;
11985
+ type: "image";
11986
+ data: string;
11987
+ })[] | undefined;
11988
+ type: "tool-result";
11989
+ toolCallId: string;
11990
+ toolName: string;
11991
+ } | {
11992
+ providerOptions?: Record<string, Record<string, any>> | undefined;
11993
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
11994
+ id: string;
11995
+ title: string;
11996
+ type: "source";
11997
+ sourceType: "url";
11998
+ url: string;
11999
+ } | {
12000
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12001
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12002
+ filename?: string | undefined;
12003
+ id: string;
12004
+ title: string;
12005
+ type: "source";
12006
+ mediaType: string;
12007
+ sourceType: "document";
12008
+ })[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<({
12009
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12010
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12011
+ type: "text";
12012
+ text: string;
12013
+ } | {
12014
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12015
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12016
+ filename?: string | undefined;
12017
+ type: "file";
12018
+ mimeType: string;
12019
+ data: string | ArrayBuffer;
12020
+ } | {
12021
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12022
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12023
+ signature?: string | undefined;
12024
+ type: "reasoning";
12025
+ text: string;
12026
+ } | {
12027
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12028
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12029
+ type: "redacted-reasoning";
12030
+ data: string;
12031
+ } | {
12032
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12033
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12034
+ providerExecuted?: boolean | undefined;
12035
+ type: "tool-call";
12036
+ toolCallId: string;
12037
+ toolName: string;
12038
+ args: any;
12039
+ } | {
12040
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12041
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12042
+ args?: any;
12043
+ providerExecuted?: boolean | undefined;
12044
+ output?: {
12045
+ type: "text";
12046
+ value: string;
12047
+ } | {
12048
+ type: "json";
12049
+ value: any;
12050
+ } | {
12051
+ type: "error-text";
12052
+ value: string;
12053
+ } | {
12054
+ type: "error-json";
12055
+ value: any;
12056
+ } | {
12057
+ type: "content";
12058
+ value: ({
12059
+ type: "text";
12060
+ text: string;
12061
+ } | {
12062
+ type: "media";
12063
+ data: string;
12064
+ mediaType: string;
12065
+ })[];
12066
+ } | undefined;
12067
+ result?: any;
12068
+ isError?: boolean | undefined;
12069
+ experimental_content?: ({
12070
+ type: "text";
12071
+ text: string;
12072
+ } | {
12073
+ mimeType?: string | undefined;
12074
+ type: "image";
12075
+ data: string;
12076
+ })[] | undefined;
12077
+ type: "tool-result";
12078
+ toolCallId: string;
12079
+ toolName: string;
12080
+ } | {
12081
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12082
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12083
+ id: string;
12084
+ title: string;
12085
+ type: "source";
12086
+ sourceType: "url";
12087
+ url: string;
12088
+ } | {
12089
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12090
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12091
+ filename?: string | undefined;
12092
+ id: string;
12093
+ title: string;
12094
+ type: "source";
12095
+ mediaType: string;
12096
+ sourceType: "document";
12097
+ })[], import("convex/values").VUnion<{
12098
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12099
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12100
+ type: "text";
12101
+ text: string;
12102
+ } | {
12103
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12104
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12105
+ filename?: string | undefined;
12106
+ type: "file";
12107
+ mimeType: string;
12108
+ data: string | ArrayBuffer;
12109
+ } | {
12110
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12111
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12112
+ signature?: string | undefined;
12113
+ type: "reasoning";
12114
+ text: string;
12115
+ } | {
12116
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12117
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12118
+ type: "redacted-reasoning";
12119
+ data: string;
12120
+ } | {
12121
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12122
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12123
+ providerExecuted?: boolean | undefined;
12124
+ type: "tool-call";
12125
+ toolCallId: string;
12126
+ toolName: string;
12127
+ args: any;
12128
+ } | {
12129
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12130
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12131
+ args?: any;
12132
+ providerExecuted?: boolean | undefined;
12133
+ output?: {
12134
+ type: "text";
12135
+ value: string;
12136
+ } | {
12137
+ type: "json";
12138
+ value: any;
12139
+ } | {
12140
+ type: "error-text";
12141
+ value: string;
12142
+ } | {
12143
+ type: "error-json";
12144
+ value: any;
12145
+ } | {
12146
+ type: "content";
12147
+ value: ({
12148
+ type: "text";
12149
+ text: string;
12150
+ } | {
12151
+ type: "media";
12152
+ data: string;
12153
+ mediaType: string;
12154
+ })[];
12155
+ } | undefined;
12156
+ result?: any;
12157
+ isError?: boolean | undefined;
12158
+ experimental_content?: ({
12159
+ type: "text";
12160
+ text: string;
12161
+ } | {
12162
+ mimeType?: string | undefined;
12163
+ type: "image";
12164
+ data: string;
12165
+ })[] | undefined;
12166
+ type: "tool-result";
12167
+ toolCallId: string;
12168
+ toolName: string;
12169
+ } | {
12170
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12171
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12172
+ id: string;
12173
+ title: string;
12174
+ type: "source";
12175
+ sourceType: "url";
12176
+ url: string;
12177
+ } | {
12178
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12179
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12180
+ filename?: string | undefined;
12181
+ id: string;
12182
+ title: string;
12183
+ type: "source";
12184
+ mediaType: string;
12185
+ sourceType: "document";
12186
+ }, [import("convex/values").VObject<{
12187
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12188
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12189
+ type: "text";
12190
+ text: string;
12191
+ }, {
12192
+ type: import("convex/values").VLiteral<"text", "required">;
12193
+ text: import("convex/values").VString<string, "required">;
12194
+ 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>;
12195
+ providerMetadata: 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>;
12196
+ }, "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}`>, import("convex/values").VObject<{
12197
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12198
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12199
+ filename?: string | undefined;
12200
+ type: "file";
12201
+ mimeType: string;
12202
+ data: string | ArrayBuffer;
12203
+ }, {
12204
+ type: import("convex/values").VLiteral<"file", "required">;
12205
+ data: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
12206
+ filename: import("convex/values").VString<string | undefined, "optional">;
12207
+ mimeType: import("convex/values").VString<string, "required">;
12208
+ 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>;
12209
+ providerMetadata: 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>;
12210
+ }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
12211
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12212
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12213
+ signature?: string | undefined;
12214
+ type: "reasoning";
12215
+ text: string;
12216
+ }, {
12217
+ type: import("convex/values").VLiteral<"reasoning", "required">;
12218
+ text: import("convex/values").VString<string, "required">;
12219
+ signature: import("convex/values").VString<string | undefined, "optional">;
12220
+ 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>;
12221
+ providerMetadata: 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>;
12222
+ }, "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "signature">, import("convex/values").VObject<{
12223
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12224
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12225
+ type: "redacted-reasoning";
12226
+ data: string;
12227
+ }, {
12228
+ type: import("convex/values").VLiteral<"redacted-reasoning", "required">;
12229
+ data: import("convex/values").VString<string, "required">;
12230
+ 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>;
12231
+ providerMetadata: 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>;
12232
+ }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "data">, import("convex/values").VObject<{
12233
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12234
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12235
+ providerExecuted?: boolean | undefined;
12236
+ type: "tool-call";
12237
+ toolCallId: string;
12238
+ toolName: string;
12239
+ args: any;
12240
+ }, {
12241
+ type: import("convex/values").VLiteral<"tool-call", "required">;
12242
+ toolCallId: import("convex/values").VString<string, "required">;
12243
+ toolName: import("convex/values").VString<string, "required">;
12244
+ args: import("convex/values").VAny<any, "required", string>;
12245
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
12246
+ 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>;
12247
+ providerMetadata: 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>;
12248
+ }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, import("convex/values").VObject<{
12249
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12250
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12251
+ args?: any;
12252
+ providerExecuted?: boolean | undefined;
12253
+ output?: {
12254
+ type: "text";
12255
+ value: string;
12256
+ } | {
12257
+ type: "json";
12258
+ value: any;
12259
+ } | {
12260
+ type: "error-text";
12261
+ value: string;
12262
+ } | {
12263
+ type: "error-json";
12264
+ value: any;
12265
+ } | {
12266
+ type: "content";
12267
+ value: ({
12268
+ type: "text";
12269
+ text: string;
12270
+ } | {
12271
+ type: "media";
12272
+ data: string;
12273
+ mediaType: string;
12274
+ })[];
12275
+ } | undefined;
12276
+ result?: any;
12277
+ isError?: boolean | undefined;
12278
+ experimental_content?: ({
12279
+ type: "text";
12280
+ text: string;
12281
+ } | {
12282
+ mimeType?: string | undefined;
12283
+ type: "image";
12284
+ data: string;
12285
+ })[] | undefined;
12286
+ type: "tool-result";
12287
+ toolCallId: string;
12288
+ toolName: string;
12289
+ }, {
12290
+ type: import("convex/values").VLiteral<"tool-result", "required">;
12291
+ toolCallId: import("convex/values").VString<string, "required">;
12292
+ toolName: import("convex/values").VString<string, "required">;
12293
+ output: import("convex/values").VUnion<{
12294
+ type: "text";
12295
+ value: string;
12296
+ } | {
12297
+ type: "json";
12298
+ value: any;
12299
+ } | {
12300
+ type: "error-text";
12301
+ value: string;
12302
+ } | {
12303
+ type: "error-json";
12304
+ value: any;
12305
+ } | {
12306
+ type: "content";
12307
+ value: ({
12308
+ type: "text";
12309
+ text: string;
12310
+ } | {
12311
+ type: "media";
12312
+ data: string;
12313
+ mediaType: string;
12314
+ })[];
12315
+ } | undefined, [import("convex/values").VObject<{
12316
+ type: "text";
12317
+ value: string;
12318
+ }, {
12319
+ type: import("convex/values").VLiteral<"text", "required">;
12320
+ value: import("convex/values").VString<string, "required">;
12321
+ }, "required", "type" | "value">, import("convex/values").VObject<{
12322
+ type: "json";
12323
+ value: any;
12324
+ }, {
12325
+ type: import("convex/values").VLiteral<"json", "required">;
12326
+ value: import("convex/values").VAny<any, "required", string>;
12327
+ }, "required", "type" | "value" | `value.${string}`>, import("convex/values").VObject<{
12328
+ type: "error-text";
12329
+ value: string;
12330
+ }, {
12331
+ type: import("convex/values").VLiteral<"error-text", "required">;
12332
+ value: import("convex/values").VString<string, "required">;
12333
+ }, "required", "type" | "value">, import("convex/values").VObject<{
12334
+ type: "error-json";
12335
+ value: any;
12336
+ }, {
12337
+ type: import("convex/values").VLiteral<"error-json", "required">;
12338
+ value: import("convex/values").VAny<any, "required", string>;
12339
+ }, "required", "type" | "value" | `value.${string}`>, import("convex/values").VObject<{
12340
+ type: "content";
12341
+ value: ({
12342
+ type: "text";
12343
+ text: string;
12344
+ } | {
12345
+ type: "media";
12346
+ data: string;
12347
+ mediaType: string;
12348
+ })[];
12349
+ }, {
12350
+ type: import("convex/values").VLiteral<"content", "required">;
12351
+ value: import("convex/values").VArray<({
12352
+ type: "text";
12353
+ text: string;
12354
+ } | {
12355
+ type: "media";
12356
+ data: string;
12357
+ mediaType: string;
12358
+ })[], import("convex/values").VUnion<{
12359
+ type: "text";
12360
+ text: string;
12361
+ } | {
12362
+ type: "media";
12363
+ data: string;
12364
+ mediaType: string;
12365
+ }, [import("convex/values").VObject<{
12366
+ type: "text";
12367
+ text: string;
12368
+ }, {
12369
+ type: import("convex/values").VLiteral<"text", "required">;
12370
+ text: import("convex/values").VString<string, "required">;
12371
+ }, "required", "type" | "text">, import("convex/values").VObject<{
12372
+ type: "media";
12373
+ data: string;
12374
+ mediaType: string;
12375
+ }, {
12376
+ type: import("convex/values").VLiteral<"media", "required">;
12377
+ data: import("convex/values").VString<string, "required">;
12378
+ mediaType: import("convex/values").VString<string, "required">;
12379
+ }, "required", "type" | "data" | "mediaType">], "required", "type" | "text" | "data" | "mediaType">, "required">;
12380
+ }, "required", "type" | "value">], "optional", "type" | "value" | `value.${string}`>;
12381
+ 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>;
12382
+ providerMetadata: 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>;
12383
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
12384
+ result: import("convex/values").VAny<any, "optional", string>;
12385
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
12386
+ args: import("convex/values").VAny<any, "optional", string>;
12387
+ experimental_content: import("convex/values").VArray<({
12388
+ type: "text";
12389
+ text: string;
12390
+ } | {
12391
+ mimeType?: string | undefined;
12392
+ type: "image";
12393
+ data: string;
12394
+ })[] | undefined, import("convex/values").VUnion<{
12395
+ type: "text";
12396
+ text: string;
12397
+ } | {
12398
+ mimeType?: string | undefined;
12399
+ type: "image";
12400
+ data: string;
12401
+ }, [import("convex/values").VObject<{
12402
+ type: "text";
12403
+ text: string;
12404
+ }, {
12405
+ type: import("convex/values").VLiteral<"text", "required">;
12406
+ text: import("convex/values").VString<string, "required">;
12407
+ }, "required", "type" | "text">, import("convex/values").VObject<{
12408
+ mimeType?: string | undefined;
12409
+ type: "image";
12410
+ data: string;
12411
+ }, {
12412
+ type: import("convex/values").VLiteral<"image", "required">;
12413
+ data: import("convex/values").VString<string, "required">;
12414
+ mimeType: import("convex/values").VString<string | undefined, "optional">;
12415
+ }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
12416
+ }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "output" | "result" | "isError" | "experimental_content" | "output.type" | "output.value" | `output.value.${string}` | `result.${string}`>, import("convex/values").VUnion<{
12417
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12418
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12419
+ id: string;
12420
+ title: string;
12421
+ type: "source";
12422
+ sourceType: "url";
12423
+ url: string;
12424
+ } | {
12425
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12426
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12427
+ filename?: string | undefined;
12428
+ id: string;
12429
+ title: string;
12430
+ type: "source";
12431
+ mediaType: string;
12432
+ sourceType: "document";
12433
+ }, [import("convex/values").VObject<{
12434
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12435
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12436
+ id: string;
12437
+ title: string;
12438
+ type: "source";
12439
+ sourceType: "url";
12440
+ url: string;
12441
+ }, {
12442
+ type: import("convex/values").VLiteral<"source", "required">;
12443
+ sourceType: import("convex/values").VLiteral<"url", "required">;
12444
+ id: import("convex/values").VString<string, "required">;
12445
+ url: import("convex/values").VString<string, "required">;
12446
+ title: import("convex/values").VString<string, "required">;
12447
+ 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>;
12448
+ providerMetadata: 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>;
12449
+ }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
12450
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12451
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12452
+ filename?: string | undefined;
12453
+ id: string;
12454
+ title: string;
12455
+ type: "source";
12456
+ mediaType: string;
12457
+ sourceType: "document";
12458
+ }, {
12459
+ type: import("convex/values").VLiteral<"source", "required">;
12460
+ sourceType: import("convex/values").VLiteral<"document", "required">;
12461
+ id: import("convex/values").VString<string, "required">;
12462
+ mediaType: import("convex/values").VString<string, "required">;
12463
+ title: import("convex/values").VString<string, "required">;
12464
+ filename: import("convex/values").VString<string | undefined, "optional">;
12465
+ 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>;
12466
+ providerMetadata: 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>;
12467
+ }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "filename" | "mediaType" | "sourceType">], "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "filename" | "mediaType" | "sourceType" | "url">], "required", "id" | "title" | "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "output" | "mediaType" | "result" | "isError" | "experimental_content" | "output.type" | "output.value" | `output.value.${string}` | `result.${string}` | "sourceType" | "url">, "required">], "required", never>;
12468
+ 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>;
12469
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
12470
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12471
+ role: "tool";
12472
+ content: {
12473
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12474
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12475
+ args?: any;
12476
+ providerExecuted?: boolean | undefined;
12477
+ output?: {
12478
+ type: "text";
12479
+ value: string;
12480
+ } | {
12481
+ type: "json";
12482
+ value: any;
12483
+ } | {
12484
+ type: "error-text";
12485
+ value: string;
12486
+ } | {
12487
+ type: "error-json";
12488
+ value: any;
12489
+ } | {
12490
+ type: "content";
12491
+ value: ({
12492
+ type: "text";
12493
+ text: string;
12494
+ } | {
12495
+ type: "media";
12496
+ data: string;
12497
+ mediaType: string;
12498
+ })[];
12499
+ } | undefined;
12500
+ result?: any;
12501
+ isError?: boolean | undefined;
12502
+ experimental_content?: ({
12503
+ type: "text";
12504
+ text: string;
12505
+ } | {
12506
+ mimeType?: string | undefined;
12507
+ type: "image";
12508
+ data: string;
12509
+ })[] | undefined;
12510
+ type: "tool-result";
12511
+ toolCallId: string;
12512
+ toolName: string;
12513
+ }[];
12514
+ }, {
12515
+ role: import("convex/values").VLiteral<"tool", "required">;
12516
+ content: import("convex/values").VArray<{
12517
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12518
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12519
+ args?: any;
12520
+ providerExecuted?: boolean | undefined;
12521
+ output?: {
12522
+ type: "text";
12523
+ value: string;
12524
+ } | {
12525
+ type: "json";
12526
+ value: any;
12527
+ } | {
12528
+ type: "error-text";
12529
+ value: string;
12530
+ } | {
12531
+ type: "error-json";
12532
+ value: any;
12533
+ } | {
12534
+ type: "content";
12535
+ value: ({
12536
+ type: "text";
12537
+ text: string;
12538
+ } | {
12539
+ type: "media";
12540
+ data: string;
12541
+ mediaType: string;
12542
+ })[];
12543
+ } | undefined;
12544
+ result?: any;
12545
+ isError?: boolean | undefined;
12546
+ experimental_content?: ({
12547
+ type: "text";
12548
+ text: string;
12549
+ } | {
12550
+ mimeType?: string | undefined;
12551
+ type: "image";
12552
+ data: string;
12553
+ })[] | undefined;
12554
+ type: "tool-result";
12555
+ toolCallId: string;
12556
+ toolName: string;
12557
+ }[], import("convex/values").VObject<{
12558
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12559
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12560
+ args?: any;
12561
+ providerExecuted?: boolean | undefined;
12562
+ output?: {
12563
+ type: "text";
12564
+ value: string;
12565
+ } | {
12566
+ type: "json";
12567
+ value: any;
12568
+ } | {
12569
+ type: "error-text";
12570
+ value: string;
12571
+ } | {
12572
+ type: "error-json";
12573
+ value: any;
12574
+ } | {
12575
+ type: "content";
12576
+ value: ({
12577
+ type: "text";
12578
+ text: string;
12579
+ } | {
12580
+ type: "media";
12581
+ data: string;
12582
+ mediaType: string;
12583
+ })[];
12584
+ } | undefined;
12585
+ result?: any;
12586
+ isError?: boolean | undefined;
12587
+ experimental_content?: ({
12588
+ type: "text";
12589
+ text: string;
12590
+ } | {
12591
+ mimeType?: string | undefined;
12592
+ type: "image";
12593
+ data: string;
12594
+ })[] | undefined;
12595
+ type: "tool-result";
12596
+ toolCallId: string;
12597
+ toolName: string;
12598
+ }, {
12599
+ type: import("convex/values").VLiteral<"tool-result", "required">;
12600
+ toolCallId: import("convex/values").VString<string, "required">;
12601
+ toolName: import("convex/values").VString<string, "required">;
12602
+ output: import("convex/values").VUnion<{
12603
+ type: "text";
12604
+ value: string;
12605
+ } | {
12606
+ type: "json";
12607
+ value: any;
12608
+ } | {
12609
+ type: "error-text";
12610
+ value: string;
12611
+ } | {
12612
+ type: "error-json";
12613
+ value: any;
12614
+ } | {
12615
+ type: "content";
12616
+ value: ({
12617
+ type: "text";
12618
+ text: string;
12619
+ } | {
12620
+ type: "media";
12621
+ data: string;
12622
+ mediaType: string;
12623
+ })[];
12624
+ } | undefined, [import("convex/values").VObject<{
12625
+ type: "text";
12626
+ value: string;
12627
+ }, {
12628
+ type: import("convex/values").VLiteral<"text", "required">;
12629
+ value: import("convex/values").VString<string, "required">;
12630
+ }, "required", "type" | "value">, import("convex/values").VObject<{
12631
+ type: "json";
12632
+ value: any;
12633
+ }, {
12634
+ type: import("convex/values").VLiteral<"json", "required">;
12635
+ value: import("convex/values").VAny<any, "required", string>;
12636
+ }, "required", "type" | "value" | `value.${string}`>, import("convex/values").VObject<{
12637
+ type: "error-text";
12638
+ value: string;
12639
+ }, {
12640
+ type: import("convex/values").VLiteral<"error-text", "required">;
12641
+ value: import("convex/values").VString<string, "required">;
12642
+ }, "required", "type" | "value">, import("convex/values").VObject<{
12643
+ type: "error-json";
12644
+ value: any;
12645
+ }, {
12646
+ type: import("convex/values").VLiteral<"error-json", "required">;
12647
+ value: import("convex/values").VAny<any, "required", string>;
12648
+ }, "required", "type" | "value" | `value.${string}`>, import("convex/values").VObject<{
12649
+ type: "content";
12650
+ value: ({
12651
+ type: "text";
12652
+ text: string;
12653
+ } | {
12654
+ type: "media";
12655
+ data: string;
12656
+ mediaType: string;
12657
+ })[];
12658
+ }, {
12659
+ type: import("convex/values").VLiteral<"content", "required">;
12660
+ value: import("convex/values").VArray<({
12661
+ type: "text";
12662
+ text: string;
12663
+ } | {
12664
+ type: "media";
12665
+ data: string;
12666
+ mediaType: string;
12667
+ })[], import("convex/values").VUnion<{
12668
+ type: "text";
12669
+ text: string;
12670
+ } | {
12671
+ type: "media";
12672
+ data: string;
12673
+ mediaType: string;
12674
+ }, [import("convex/values").VObject<{
12675
+ type: "text";
12676
+ text: string;
12677
+ }, {
12678
+ type: import("convex/values").VLiteral<"text", "required">;
12679
+ text: import("convex/values").VString<string, "required">;
12680
+ }, "required", "type" | "text">, import("convex/values").VObject<{
12681
+ type: "media";
12682
+ data: string;
12683
+ mediaType: string;
12684
+ }, {
12685
+ type: import("convex/values").VLiteral<"media", "required">;
12686
+ data: import("convex/values").VString<string, "required">;
12687
+ mediaType: import("convex/values").VString<string, "required">;
12688
+ }, "required", "type" | "data" | "mediaType">], "required", "type" | "text" | "data" | "mediaType">, "required">;
12689
+ }, "required", "type" | "value">], "optional", "type" | "value" | `value.${string}`>;
12690
+ 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>;
12691
+ providerMetadata: 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>;
12692
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
12693
+ result: import("convex/values").VAny<any, "optional", string>;
12694
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
12695
+ args: import("convex/values").VAny<any, "optional", string>;
12696
+ experimental_content: import("convex/values").VArray<({
12697
+ type: "text";
12698
+ text: string;
12699
+ } | {
12700
+ mimeType?: string | undefined;
12701
+ type: "image";
12702
+ data: string;
12703
+ })[] | undefined, import("convex/values").VUnion<{
12704
+ type: "text";
12705
+ text: string;
12706
+ } | {
12707
+ mimeType?: string | undefined;
12708
+ type: "image";
12709
+ data: string;
12710
+ }, [import("convex/values").VObject<{
12711
+ type: "text";
12712
+ text: string;
12713
+ }, {
12714
+ type: import("convex/values").VLiteral<"text", "required">;
12715
+ text: import("convex/values").VString<string, "required">;
12716
+ }, "required", "type" | "text">, import("convex/values").VObject<{
12717
+ mimeType?: string | undefined;
12718
+ type: "image";
12719
+ data: string;
12720
+ }, {
12721
+ type: import("convex/values").VLiteral<"image", "required">;
12722
+ data: import("convex/values").VString<string, "required">;
12723
+ mimeType: import("convex/values").VString<string | undefined, "optional">;
12724
+ }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
12725
+ }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "output" | "result" | "isError" | "experimental_content" | "output.type" | "output.value" | `output.value.${string}` | `result.${string}`>, "required">;
12726
+ 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>;
12727
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
12728
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12729
+ role: "system";
12730
+ content: string;
12731
+ }, {
12732
+ role: import("convex/values").VLiteral<"system", "required">;
12733
+ content: import("convex/values").VString<string, "required">;
12734
+ 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>;
12735
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">], "optional", "providerOptions" | "role" | `providerOptions.${string}` | "content">;
12736
+ tool: import("convex/values").VBoolean<boolean, "required">;
12737
+ text: import("convex/values").VString<string | undefined, "optional">;
12738
+ usage: import("convex/values").VObject<{
12739
+ reasoningTokens?: number | undefined;
12740
+ cachedInputTokens?: number | undefined;
12741
+ promptTokens: number;
12742
+ completionTokens: number;
12743
+ totalTokens: number;
12744
+ } | undefined, {
12745
+ promptTokens: import("convex/values").VFloat64<number, "required">;
12746
+ completionTokens: import("convex/values").VFloat64<number, "required">;
12747
+ totalTokens: import("convex/values").VFloat64<number, "required">;
12748
+ reasoningTokens: import("convex/values").VFloat64<number | undefined, "optional">;
12749
+ cachedInputTokens: import("convex/values").VFloat64<number | undefined, "optional">;
12750
+ }, "optional", "promptTokens" | "completionTokens" | "totalTokens" | "reasoningTokens" | "cachedInputTokens">;
12751
+ providerMetadata: 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>;
12752
+ sources: import("convex/values").VArray<({
12753
+ title?: string | undefined;
12754
+ type?: "source" | undefined;
12755
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12756
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12757
+ id: string;
12758
+ sourceType: "url";
12759
+ url: string;
12760
+ } | {
12761
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12762
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12763
+ filename?: string | undefined;
12764
+ id: string;
12765
+ title: string;
12766
+ type: "source";
12767
+ mediaType: string;
12768
+ sourceType: "document";
12769
+ })[] | undefined, import("convex/values").VUnion<{
12770
+ title?: string | undefined;
12771
+ type?: "source" | undefined;
12772
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12773
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12774
+ id: string;
12775
+ sourceType: "url";
12776
+ url: string;
12777
+ } | {
12778
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12779
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12780
+ filename?: string | undefined;
12781
+ id: string;
12782
+ title: string;
12783
+ type: "source";
12784
+ mediaType: string;
12785
+ sourceType: "document";
12786
+ }, [import("convex/values").VObject<{
12787
+ title?: string | undefined;
12788
+ type?: "source" | undefined;
12789
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12790
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12791
+ id: string;
12792
+ sourceType: "url";
12793
+ url: string;
12794
+ }, {
12795
+ type: import("convex/values").VLiteral<"source" | undefined, "optional">;
12796
+ sourceType: import("convex/values").VLiteral<"url", "required">;
12797
+ id: import("convex/values").VString<string, "required">;
12798
+ url: import("convex/values").VString<string, "required">;
12799
+ title: import("convex/values").VString<string | undefined, "optional">;
12800
+ 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>;
12801
+ providerMetadata: 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>;
12802
+ }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
12803
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12804
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12805
+ filename?: string | undefined;
12806
+ id: string;
12807
+ title: string;
12808
+ type: "source";
12809
+ mediaType: string;
12810
+ sourceType: "document";
12811
+ }, {
12812
+ type: import("convex/values").VLiteral<"source", "required">;
12813
+ sourceType: import("convex/values").VLiteral<"document", "required">;
12814
+ id: import("convex/values").VString<string, "required">;
12815
+ mediaType: import("convex/values").VString<string, "required">;
12816
+ title: import("convex/values").VString<string, "required">;
12817
+ filename: import("convex/values").VString<string | undefined, "optional">;
12818
+ 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>;
12819
+ providerMetadata: 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>;
12820
+ }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "filename" | "mediaType" | "sourceType">], "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "filename" | "mediaType" | "sourceType" | "url">, "optional">;
12821
+ warnings: import("convex/values").VArray<({
12822
+ details?: string | undefined;
12823
+ type: "unsupported-setting";
12824
+ setting: string;
12825
+ } | {
12826
+ details?: string | undefined;
12827
+ type: "unsupported-tool";
12828
+ tool: any;
12829
+ } | {
12830
+ type: "other";
12831
+ message: string;
12832
+ })[] | undefined, import("convex/values").VUnion<{
12833
+ details?: string | undefined;
12834
+ type: "unsupported-setting";
12835
+ setting: string;
12836
+ } | {
12837
+ details?: string | undefined;
12838
+ type: "unsupported-tool";
12839
+ tool: any;
12840
+ } | {
12841
+ type: "other";
12842
+ message: string;
12843
+ }, [import("convex/values").VObject<{
12844
+ details?: string | undefined;
12845
+ type: "unsupported-setting";
12846
+ setting: string;
12847
+ }, {
12848
+ type: import("convex/values").VLiteral<"unsupported-setting", "required">;
12849
+ setting: import("convex/values").VString<string, "required">;
12850
+ details: import("convex/values").VString<string | undefined, "optional">;
12851
+ }, "required", "type" | "setting" | "details">, import("convex/values").VObject<{
12852
+ details?: string | undefined;
12853
+ type: "unsupported-tool";
12854
+ tool: any;
12855
+ }, {
12856
+ type: import("convex/values").VLiteral<"unsupported-tool", "required">;
12857
+ tool: import("convex/values").VAny<any, "required", string>;
12858
+ details: import("convex/values").VString<string | undefined, "optional">;
12859
+ }, "required", "type" | "tool" | "details" | `tool.${string}`>, import("convex/values").VObject<{
12860
+ type: "other";
12861
+ message: string;
12862
+ }, {
12863
+ type: import("convex/values").VLiteral<"other", "required">;
12864
+ message: import("convex/values").VString<string, "required">;
12865
+ }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
12866
+ finishReason: import("convex/values").VUnion<"length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>;
12867
+ reasoning: import("convex/values").VString<string | undefined, "optional">;
12868
+ reasoningDetails: import("convex/values").VArray<({
12869
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12870
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12871
+ signature?: string | undefined;
12872
+ type: "reasoning";
12873
+ text: string;
12874
+ } | {
12875
+ signature?: string | undefined;
12876
+ type: "text";
12877
+ text: string;
12878
+ } | {
12879
+ type: "redacted";
12880
+ data: string;
12881
+ })[] | undefined, import("convex/values").VUnion<{
12882
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12883
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12884
+ signature?: string | undefined;
12885
+ type: "reasoning";
12886
+ text: string;
12887
+ } | {
12888
+ signature?: string | undefined;
12889
+ type: "text";
12890
+ text: string;
12891
+ } | {
12892
+ type: "redacted";
12893
+ data: string;
12894
+ }, [import("convex/values").VObject<{
12895
+ providerOptions?: Record<string, Record<string, any>> | undefined;
12896
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
12897
+ signature?: string | undefined;
12898
+ type: "reasoning";
12899
+ text: string;
12900
+ }, {
12901
+ type: import("convex/values").VLiteral<"reasoning", "required">;
12902
+ text: import("convex/values").VString<string, "required">;
12903
+ signature: import("convex/values").VString<string | undefined, "optional">;
12904
+ 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>;
12905
+ providerMetadata: 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>;
12906
+ }, "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "signature">, import("convex/values").VObject<{
12907
+ signature?: string | undefined;
12908
+ type: "text";
12909
+ text: string;
12910
+ }, {
12911
+ type: import("convex/values").VLiteral<"text", "required">;
12912
+ text: import("convex/values").VString<string, "required">;
12913
+ signature: import("convex/values").VString<string | undefined, "optional">;
12914
+ }, "required", "type" | "text" | "signature">, import("convex/values").VObject<{
12915
+ type: "redacted";
12916
+ data: string;
12917
+ }, {
12918
+ type: import("convex/values").VLiteral<"redacted", "required">;
12919
+ data: import("convex/values").VString<string, "required">;
12920
+ }, "required", "type" | "data">], "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "data" | "signature">, "optional">;
12921
+ id: import("convex/values").VString<string | undefined, "optional">;
12922
+ }, "required", "_id" | "_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "reasoning" | "tool" | "usage" | "sources" | "warnings" | "finishReason" | "reasoningDetails" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens">;
12923
+ export type MessageDoc = Infer<typeof vMessageDoc>;
12924
+ export declare const vThreadDoc: import("convex/values").VObject<{
12925
+ userId?: string | undefined;
12926
+ title?: string | undefined;
12927
+ summary?: string | undefined;
12928
+ _id: string;
12929
+ _creationTime: number;
12930
+ status: "active" | "archived";
12931
+ }, {
12932
+ _id: import("convex/values").VString<string, "required">;
12933
+ _creationTime: import("convex/values").VFloat64<number, "required">;
12934
+ userId: import("convex/values").VString<string | undefined, "optional">;
12935
+ title: import("convex/values").VString<string | undefined, "optional">;
12936
+ summary: import("convex/values").VString<string | undefined, "optional">;
12937
+ status: import("convex/values").VUnion<"active" | "archived", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"archived", "required">], "required", never>;
12938
+ }, "required", "_id" | "_creationTime" | "status" | "userId" | "title" | "summary">;
12939
+ export type ThreadDoc = Infer<typeof vThreadDoc>;
11300
12940
  export {};
11301
12941
  //# sourceMappingURL=validators.d.ts.map