@convex-dev/agent 0.1.1-alpha.0 → 0.1.2-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/README.md +9 -3
  2. package/dist/commonjs/client/createTool.d.ts +49 -0
  3. package/dist/commonjs/client/createTool.d.ts.map +1 -0
  4. package/dist/commonjs/client/createTool.js +45 -0
  5. package/dist/commonjs/client/createTool.js.map +1 -0
  6. package/dist/commonjs/client/index.d.ts +101 -322
  7. package/dist/commonjs/client/index.d.ts.map +1 -1
  8. package/dist/commonjs/client/index.js +142 -194
  9. package/dist/commonjs/client/index.js.map +1 -1
  10. package/dist/commonjs/client/streaming.d.ts +54 -0
  11. package/dist/commonjs/client/streaming.d.ts.map +1 -0
  12. package/dist/commonjs/client/streaming.js +121 -0
  13. package/dist/commonjs/client/streaming.js.map +1 -0
  14. package/dist/commonjs/client/types.d.ts +290 -2
  15. package/dist/commonjs/client/types.d.ts.map +1 -1
  16. package/dist/commonjs/component/messages.d.ts +109 -143
  17. package/dist/commonjs/component/messages.d.ts.map +1 -1
  18. package/dist/commonjs/component/messages.js +15 -14
  19. package/dist/commonjs/component/messages.js.map +1 -1
  20. package/dist/commonjs/component/schema.d.ts +1026 -52
  21. package/dist/commonjs/component/schema.d.ts.map +1 -1
  22. package/dist/commonjs/component/schema.js +39 -1
  23. package/dist/commonjs/component/schema.js.map +1 -1
  24. package/dist/commonjs/component/streams.d.ts +191 -0
  25. package/dist/commonjs/component/streams.d.ts.map +1 -0
  26. package/dist/commonjs/component/streams.js +169 -0
  27. package/dist/commonjs/component/streams.js.map +1 -0
  28. package/dist/commonjs/component/threads.d.ts +1 -1
  29. package/dist/commonjs/component/threads.js +3 -3
  30. package/dist/commonjs/component/threads.js.map +1 -1
  31. package/dist/commonjs/component/users.js +2 -2
  32. package/dist/commonjs/component/users.js.map +1 -1
  33. package/dist/commonjs/component/vector/index.d.ts +8 -8
  34. package/dist/commonjs/component/vector/index.d.ts.map +1 -1
  35. package/dist/commonjs/component/vector/tables.d.ts +5 -5
  36. package/dist/commonjs/component/vector/tables.d.ts.map +1 -1
  37. package/dist/commonjs/component/vector/tables.js +1 -1
  38. package/dist/commonjs/component/vector/tables.js.map +1 -1
  39. package/dist/commonjs/mapping.d.ts.map +1 -1
  40. package/dist/commonjs/mapping.js +3 -1
  41. package/dist/commonjs/mapping.js.map +1 -1
  42. package/dist/commonjs/react/index.d.ts +99 -0
  43. package/dist/commonjs/react/index.d.ts.map +1 -1
  44. package/dist/commonjs/react/index.js +505 -1
  45. package/dist/commonjs/react/index.js.map +1 -1
  46. package/dist/commonjs/react/toUIMessages.d.ts +8 -0
  47. package/dist/commonjs/react/toUIMessages.d.ts.map +1 -0
  48. package/dist/commonjs/react/toUIMessages.js +134 -0
  49. package/dist/commonjs/react/toUIMessages.js.map +1 -0
  50. package/dist/commonjs/validators.d.ts +513 -11
  51. package/dist/commonjs/validators.d.ts.map +1 -1
  52. package/dist/commonjs/validators.js +49 -2
  53. package/dist/commonjs/validators.js.map +1 -1
  54. package/dist/esm/client/createTool.d.ts +49 -0
  55. package/dist/esm/client/createTool.d.ts.map +1 -0
  56. package/dist/esm/client/createTool.js +45 -0
  57. package/dist/esm/client/createTool.js.map +1 -0
  58. package/dist/esm/client/index.d.ts +101 -322
  59. package/dist/esm/client/index.d.ts.map +1 -1
  60. package/dist/esm/client/index.js +142 -194
  61. package/dist/esm/client/index.js.map +1 -1
  62. package/dist/esm/client/streaming.d.ts +54 -0
  63. package/dist/esm/client/streaming.d.ts.map +1 -0
  64. package/dist/esm/client/streaming.js +121 -0
  65. package/dist/esm/client/streaming.js.map +1 -0
  66. package/dist/esm/client/types.d.ts +290 -2
  67. package/dist/esm/client/types.d.ts.map +1 -1
  68. package/dist/esm/component/messages.d.ts +109 -143
  69. package/dist/esm/component/messages.d.ts.map +1 -1
  70. package/dist/esm/component/messages.js +15 -14
  71. package/dist/esm/component/messages.js.map +1 -1
  72. package/dist/esm/component/schema.d.ts +1026 -52
  73. package/dist/esm/component/schema.d.ts.map +1 -1
  74. package/dist/esm/component/schema.js +39 -1
  75. package/dist/esm/component/schema.js.map +1 -1
  76. package/dist/esm/component/streams.d.ts +191 -0
  77. package/dist/esm/component/streams.d.ts.map +1 -0
  78. package/dist/esm/component/streams.js +169 -0
  79. package/dist/esm/component/streams.js.map +1 -0
  80. package/dist/esm/component/threads.d.ts +1 -1
  81. package/dist/esm/component/threads.js +3 -3
  82. package/dist/esm/component/threads.js.map +1 -1
  83. package/dist/esm/component/users.js +2 -2
  84. package/dist/esm/component/users.js.map +1 -1
  85. package/dist/esm/component/vector/index.d.ts +8 -8
  86. package/dist/esm/component/vector/index.d.ts.map +1 -1
  87. package/dist/esm/component/vector/tables.d.ts +5 -5
  88. package/dist/esm/component/vector/tables.d.ts.map +1 -1
  89. package/dist/esm/component/vector/tables.js +1 -1
  90. package/dist/esm/component/vector/tables.js.map +1 -1
  91. package/dist/esm/mapping.d.ts.map +1 -1
  92. package/dist/esm/mapping.js +3 -1
  93. package/dist/esm/mapping.js.map +1 -1
  94. package/dist/esm/react/index.d.ts +99 -0
  95. package/dist/esm/react/index.d.ts.map +1 -1
  96. package/dist/esm/react/index.js +505 -1
  97. package/dist/esm/react/index.js.map +1 -1
  98. package/dist/esm/react/toUIMessages.d.ts +8 -0
  99. package/dist/esm/react/toUIMessages.d.ts.map +1 -0
  100. package/dist/esm/react/toUIMessages.js +134 -0
  101. package/dist/esm/react/toUIMessages.js.map +1 -0
  102. package/dist/esm/validators.d.ts +513 -11
  103. package/dist/esm/validators.d.ts.map +1 -1
  104. package/dist/esm/validators.js +49 -2
  105. package/dist/esm/validators.js.map +1 -1
  106. package/package.json +6 -2
  107. package/src/client/createTool.ts +108 -0
  108. package/src/client/index.ts +270 -689
  109. package/src/client/streaming.ts +166 -0
  110. package/src/client/types.ts +430 -5
  111. package/src/component/_generated/api.d.ts +367 -190
  112. package/src/component/messages.ts +15 -14
  113. package/src/component/schema.ts +46 -0
  114. package/src/component/streams.ts +206 -0
  115. package/src/component/threads.ts +3 -3
  116. package/src/component/users.ts +2 -2
  117. package/src/component/vector/tables.ts +1 -1
  118. package/src/mapping.ts +3 -1
  119. package/src/react/index.ts +687 -1
  120. package/src/react/toUIMessages.ts +153 -0
  121. package/src/validators.test.ts +18 -0
  122. package/src/validators.ts +72 -2
  123. package/dist/commonjs/deltaStreaming.d.ts +0 -2
  124. package/dist/commonjs/deltaStreaming.d.ts.map +0 -1
  125. package/dist/commonjs/deltaStreaming.js +0 -2
  126. package/dist/commonjs/deltaStreaming.js.map +0 -1
  127. package/dist/esm/deltaStreaming.d.ts +0 -2
  128. package/dist/esm/deltaStreaming.d.ts.map +0 -1
  129. package/dist/esm/deltaStreaming.js +0 -2
  130. package/dist/esm/deltaStreaming.js.map +0 -1
  131. package/src/deltaStreaming.ts +0 -1
@@ -11,6 +11,7 @@
11
11
  import type * as apiKeys from "../apiKeys.js";
12
12
  import type * as files from "../files.js";
13
13
  import type * as messages from "../messages.js";
14
+ import type * as streams from "../streams.js";
14
15
  import type * as threads from "../threads.js";
15
16
  import type * as users from "../users.js";
16
17
  import type * as vector_index from "../vector/index.js";
@@ -34,6 +35,7 @@ declare const fullApi: ApiFromModules<{
34
35
  apiKeys: typeof apiKeys;
35
36
  files: typeof files;
36
37
  messages: typeof messages;
38
+ streams: typeof streams;
37
39
  threads: typeof threads;
38
40
  users: typeof users;
39
41
  "vector/index": typeof vector_index;
@@ -91,7 +93,17 @@ export type Mounts = {
91
93
  {
92
94
  agentName?: string;
93
95
  embeddings?: {
94
- dimension: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
96
+ dimension:
97
+ | 128
98
+ | 256
99
+ | 512
100
+ | 768
101
+ | 1024
102
+ | 1408
103
+ | 1536
104
+ | 2048
105
+ | 3072
106
+ | 4096;
95
107
  model: string;
96
108
  vectors: Array<Array<number> | null>;
97
109
  };
@@ -522,7 +534,17 @@ export type Mounts = {
522
534
  promptMessageId: string;
523
535
  step: {
524
536
  embeddings?: {
525
- dimension: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
537
+ dimension:
538
+ | 128
539
+ | 256
540
+ | 512
541
+ | 768
542
+ | 1024
543
+ | 1408
544
+ | 1536
545
+ | 2048
546
+ | 3072
547
+ | 4096;
526
548
  model: string;
527
549
  vectors: Array<Array<number> | null>;
528
550
  };
@@ -879,196 +901,142 @@ export type Mounts = {
879
901
  Array<{
880
902
  _creationTime: number;
881
903
  _id: string;
904
+ agentName?: string;
905
+ embeddingId?: string;
906
+ error?: string;
907
+ files?: Array<{
908
+ data?: ArrayBuffer | string;
909
+ fileId?: string;
910
+ mimeType: string;
911
+ url?: string;
912
+ }>;
913
+ finishReason?:
914
+ | "stop"
915
+ | "length"
916
+ | "content-filter"
917
+ | "tool-calls"
918
+ | "error"
919
+ | "other"
920
+ | "unknown";
921
+ id?: string;
922
+ message?:
923
+ | {
924
+ content:
925
+ | string
926
+ | Array<
927
+ | {
928
+ providerOptions?: Record<string, Record<string, any>>;
929
+ text: string;
930
+ type: "text";
931
+ }
932
+ | {
933
+ image: string | ArrayBuffer;
934
+ mimeType?: string;
935
+ providerOptions?: Record<string, Record<string, any>>;
936
+ type: "image";
937
+ }
938
+ | {
939
+ data: string | ArrayBuffer;
940
+ mimeType: string;
941
+ providerOptions?: Record<string, Record<string, any>>;
942
+ type: "file";
943
+ }
944
+ >;
945
+ providerOptions?: Record<string, Record<string, any>>;
946
+ role: "user";
947
+ }
948
+ | {
949
+ content:
950
+ | string
951
+ | Array<
952
+ | {
953
+ providerOptions?: Record<string, Record<string, any>>;
954
+ text: string;
955
+ type: "text";
956
+ }
957
+ | {
958
+ data: string | ArrayBuffer;
959
+ mimeType: string;
960
+ providerOptions?: Record<string, Record<string, any>>;
961
+ type: "file";
962
+ }
963
+ | {
964
+ providerOptions?: Record<string, Record<string, any>>;
965
+ signature?: string;
966
+ text: string;
967
+ type: "reasoning";
968
+ }
969
+ | {
970
+ data: string;
971
+ providerOptions?: Record<string, Record<string, any>>;
972
+ type: "redacted-reasoning";
973
+ }
974
+ | {
975
+ args: any;
976
+ providerOptions?: Record<string, Record<string, any>>;
977
+ toolCallId: string;
978
+ toolName: string;
979
+ type: "tool-call";
980
+ }
981
+ >;
982
+ providerOptions?: Record<string, Record<string, any>>;
983
+ role: "assistant";
984
+ }
985
+ | {
986
+ content: Array<{
987
+ args?: any;
988
+ experimental_content?: Array<
989
+ | { text: string; type: "text" }
990
+ | { data: string; mimeType?: string; type: "image" }
991
+ >;
992
+ isError?: boolean;
993
+ providerOptions?: Record<string, Record<string, any>>;
994
+ result: any;
995
+ toolCallId: string;
996
+ toolName: string;
997
+ type: "tool-result";
998
+ }>;
999
+ providerOptions?: Record<string, Record<string, any>>;
1000
+ role: "tool";
1001
+ }
1002
+ | {
1003
+ content: string;
1004
+ providerOptions?: Record<string, Record<string, any>>;
1005
+ role: "system";
1006
+ };
1007
+ model?: string;
882
1008
  order: number;
883
- parentMessageId: string;
1009
+ provider?: string;
1010
+ providerMetadata?: Record<string, Record<string, any>>;
1011
+ providerOptions?: Record<string, Record<string, any>>;
1012
+ reasoning?: string;
1013
+ reasoningDetails?: Array<
1014
+ | { signature?: string; text: string; type: "text" }
1015
+ | { data: string; type: "redacted" }
1016
+ >;
1017
+ sources?: Array<{
1018
+ id: string;
1019
+ providerOptions?: Record<string, Record<string, any>>;
1020
+ sourceType: "url";
1021
+ title?: string;
1022
+ url: string;
1023
+ }>;
884
1024
  status: "pending" | "success" | "failed";
885
- step: {
886
- experimental_providerMetadata?: Record<string, Record<string, any>>;
887
- files?: Array<any>;
888
- finishReason:
889
- | "stop"
890
- | "length"
891
- | "content-filter"
892
- | "tool-calls"
893
- | "error"
894
- | "other"
895
- | "unknown";
896
- isContinued: boolean;
897
- logprobs?: any;
898
- providerMetadata?: Record<string, Record<string, any>>;
899
- reasoning?: string;
900
- reasoningDetails?: Array<
901
- | { signature?: string; text: string; type: "text" }
902
- | { data: string; type: "redacted" }
903
- >;
904
- request?: {
905
- body?: any;
906
- headers?: Record<string, string>;
907
- method?: string;
908
- url?: string;
909
- };
910
- response?: {
911
- body?: any;
912
- headers?: Record<string, string>;
913
- id: string;
914
- messages: Array<{
915
- fileId?: string;
916
- id?: string;
917
- message:
918
- | {
919
- content:
920
- | string
921
- | Array<
922
- | {
923
- providerOptions?: Record<
924
- string,
925
- Record<string, any>
926
- >;
927
- text: string;
928
- type: "text";
929
- }
930
- | {
931
- image: string | ArrayBuffer;
932
- mimeType?: string;
933
- providerOptions?: Record<
934
- string,
935
- Record<string, any>
936
- >;
937
- type: "image";
938
- }
939
- | {
940
- data: string | ArrayBuffer;
941
- mimeType: string;
942
- providerOptions?: Record<
943
- string,
944
- Record<string, any>
945
- >;
946
- type: "file";
947
- }
948
- >;
949
- providerOptions?: Record<string, Record<string, any>>;
950
- role: "user";
951
- }
952
- | {
953
- content:
954
- | string
955
- | Array<
956
- | {
957
- providerOptions?: Record<
958
- string,
959
- Record<string, any>
960
- >;
961
- text: string;
962
- type: "text";
963
- }
964
- | {
965
- data: string | ArrayBuffer;
966
- mimeType: string;
967
- providerOptions?: Record<
968
- string,
969
- Record<string, any>
970
- >;
971
- type: "file";
972
- }
973
- | {
974
- providerOptions?: Record<
975
- string,
976
- Record<string, any>
977
- >;
978
- signature?: string;
979
- text: string;
980
- type: "reasoning";
981
- }
982
- | {
983
- data: string;
984
- providerOptions?: Record<
985
- string,
986
- Record<string, any>
987
- >;
988
- type: "redacted-reasoning";
989
- }
990
- | {
991
- args: any;
992
- providerOptions?: Record<
993
- string,
994
- Record<string, any>
995
- >;
996
- toolCallId: string;
997
- toolName: string;
998
- type: "tool-call";
999
- }
1000
- >;
1001
- providerOptions?: Record<string, Record<string, any>>;
1002
- role: "assistant";
1003
- }
1004
- | {
1005
- content: Array<{
1006
- args?: any;
1007
- experimental_content?: Array<
1008
- | { text: string; type: "text" }
1009
- | { data: string; mimeType?: string; type: "image" }
1010
- >;
1011
- isError?: boolean;
1012
- providerOptions?: Record<string, Record<string, any>>;
1013
- result: any;
1014
- toolCallId: string;
1015
- toolName: string;
1016
- type: "tool-result";
1017
- }>;
1018
- providerOptions?: Record<string, Record<string, any>>;
1019
- role: "tool";
1020
- }
1021
- | {
1022
- content: string;
1023
- providerOptions?: Record<string, Record<string, any>>;
1024
- role: "system";
1025
- };
1026
- }>;
1027
- modelId: string;
1028
- timestamp: number;
1029
- };
1030
- sources?: Array<{
1031
- id: string;
1032
- providerOptions?: Record<string, Record<string, any>>;
1033
- sourceType: "url";
1034
- title?: string;
1035
- url: string;
1036
- }>;
1037
- stepType: "initial" | "continue" | "tool-result";
1038
- text: string;
1039
- toolCalls: Array<{
1040
- args: any;
1041
- providerOptions?: Record<string, Record<string, any>>;
1042
- toolCallId: string;
1043
- toolName: string;
1044
- type: "tool-call";
1045
- }>;
1046
- toolResults: Array<{
1047
- args?: any;
1048
- experimental_content?: Array<
1049
- | { text: string; type: "text" }
1050
- | { data: string; mimeType?: string; type: "image" }
1051
- >;
1052
- isError?: boolean;
1053
- providerOptions?: Record<string, Record<string, any>>;
1054
- result: any;
1055
- toolCallId: string;
1056
- toolName: string;
1057
- type: "tool-result";
1058
- }>;
1059
- usage?: {
1060
- completionTokens: number;
1061
- promptTokens: number;
1062
- totalTokens: number;
1063
- };
1064
- warnings?: Array<
1065
- | { details?: string; setting: string; type: "unsupported-setting" }
1066
- | { details?: string; tool: any; type: "unsupported-tool" }
1067
- | { message: string; type: "other" }
1068
- >;
1069
- };
1070
1025
  stepOrder: number;
1026
+ text?: string;
1071
1027
  threadId: string;
1028
+ tool: boolean;
1029
+ usage?: {
1030
+ completionTokens: number;
1031
+ promptTokens: number;
1032
+ totalTokens: number;
1033
+ };
1034
+ userId?: string;
1035
+ warnings?: Array<
1036
+ | { details?: string; setting: string; type: "unsupported-setting" }
1037
+ | { details?: string; tool: any; type: "unsupported-tool" }
1038
+ | { message: string; type: "other" }
1039
+ >;
1072
1040
  }>
1073
1041
  >;
1074
1042
  commitMessage: FunctionReference<
@@ -1234,7 +1202,7 @@ export type Mounts = {
1234
1202
  {
1235
1203
  excludeToolMessages?: boolean;
1236
1204
  isTool?: "use excludeToolMessages instead of this";
1237
- order?: "asc" | "desc";
1205
+ order: "asc" | "desc";
1238
1206
  paginationOpts?: {
1239
1207
  cursor: string | null;
1240
1208
  endCursor?: string | null;
@@ -1707,6 +1675,209 @@ export type Mounts = {
1707
1675
  }>
1708
1676
  >;
1709
1677
  };
1678
+ streams: {
1679
+ addDelta: FunctionReference<
1680
+ "mutation",
1681
+ "public",
1682
+ {
1683
+ end: number;
1684
+ parts: Array<
1685
+ | { textDelta: string; type: "text-delta" }
1686
+ | { textDelta: string; type: "reasoning" }
1687
+ | {
1688
+ source: {
1689
+ id: string;
1690
+ providerOptions?: Record<string, Record<string, any>>;
1691
+ sourceType: "url";
1692
+ title?: string;
1693
+ url: string;
1694
+ };
1695
+ type: "source";
1696
+ }
1697
+ | {
1698
+ args: any;
1699
+ providerOptions?: Record<string, Record<string, any>>;
1700
+ toolCallId: string;
1701
+ toolName: string;
1702
+ type: "tool-call";
1703
+ }
1704
+ | {
1705
+ toolCallId: string;
1706
+ toolName: string;
1707
+ type: "tool-call-streaming-start";
1708
+ }
1709
+ | {
1710
+ argsTextDelta: string;
1711
+ toolCallId: string;
1712
+ toolName: string;
1713
+ type: "tool-call-delta";
1714
+ }
1715
+ | {
1716
+ args?: any;
1717
+ experimental_content?: Array<
1718
+ | { text: string; type: "text" }
1719
+ | { data: string; mimeType?: string; type: "image" }
1720
+ >;
1721
+ isError?: boolean;
1722
+ providerOptions?: Record<string, Record<string, any>>;
1723
+ result: any;
1724
+ toolCallId: string;
1725
+ toolName: string;
1726
+ type: "tool-result";
1727
+ }
1728
+ >;
1729
+ start: number;
1730
+ streamId: string;
1731
+ },
1732
+ null
1733
+ >;
1734
+ create: FunctionReference<
1735
+ "mutation",
1736
+ "public",
1737
+ {
1738
+ agentName?: string;
1739
+ model?: string;
1740
+ order: number;
1741
+ provider?: string;
1742
+ providerOptions?: Record<string, Record<string, any>>;
1743
+ stepOrder: number;
1744
+ threadId: string;
1745
+ userId?: string;
1746
+ },
1747
+ string
1748
+ >;
1749
+ finish: FunctionReference<
1750
+ "mutation",
1751
+ "public",
1752
+ {
1753
+ finalDelta?: {
1754
+ end: number;
1755
+ parts: Array<
1756
+ | { textDelta: string; type: "text-delta" }
1757
+ | { textDelta: string; type: "reasoning" }
1758
+ | {
1759
+ source: {
1760
+ id: string;
1761
+ providerOptions?: Record<string, Record<string, any>>;
1762
+ sourceType: "url";
1763
+ title?: string;
1764
+ url: string;
1765
+ };
1766
+ type: "source";
1767
+ }
1768
+ | {
1769
+ args: any;
1770
+ providerOptions?: Record<string, Record<string, any>>;
1771
+ toolCallId: string;
1772
+ toolName: string;
1773
+ type: "tool-call";
1774
+ }
1775
+ | {
1776
+ toolCallId: string;
1777
+ toolName: string;
1778
+ type: "tool-call-streaming-start";
1779
+ }
1780
+ | {
1781
+ argsTextDelta: string;
1782
+ toolCallId: string;
1783
+ toolName: string;
1784
+ type: "tool-call-delta";
1785
+ }
1786
+ | {
1787
+ args?: any;
1788
+ experimental_content?: Array<
1789
+ | { text: string; type: "text" }
1790
+ | { data: string; mimeType?: string; type: "image" }
1791
+ >;
1792
+ isError?: boolean;
1793
+ providerOptions?: Record<string, Record<string, any>>;
1794
+ result: any;
1795
+ toolCallId: string;
1796
+ toolName: string;
1797
+ type: "tool-result";
1798
+ }
1799
+ >;
1800
+ start: number;
1801
+ streamId: string;
1802
+ };
1803
+ streamId: string;
1804
+ },
1805
+ null
1806
+ >;
1807
+ list: FunctionReference<
1808
+ "query",
1809
+ "public",
1810
+ { threadId: string },
1811
+ Array<{
1812
+ agentName?: string;
1813
+ model?: string;
1814
+ order: number;
1815
+ provider?: string;
1816
+ providerOptions?: Record<string, Record<string, any>>;
1817
+ stepOrder: number;
1818
+ streamId: string;
1819
+ userId?: string;
1820
+ }>
1821
+ >;
1822
+ listDeltas: FunctionReference<
1823
+ "query",
1824
+ "public",
1825
+ {
1826
+ cursors: Array<{ cursor: number; streamId: string }>;
1827
+ threadId: string;
1828
+ },
1829
+ Array<{
1830
+ end: number;
1831
+ parts: Array<
1832
+ | { textDelta: string; type: "text-delta" }
1833
+ | { textDelta: string; type: "reasoning" }
1834
+ | {
1835
+ source: {
1836
+ id: string;
1837
+ providerOptions?: Record<string, Record<string, any>>;
1838
+ sourceType: "url";
1839
+ title?: string;
1840
+ url: string;
1841
+ };
1842
+ type: "source";
1843
+ }
1844
+ | {
1845
+ args: any;
1846
+ providerOptions?: Record<string, Record<string, any>>;
1847
+ toolCallId: string;
1848
+ toolName: string;
1849
+ type: "tool-call";
1850
+ }
1851
+ | {
1852
+ toolCallId: string;
1853
+ toolName: string;
1854
+ type: "tool-call-streaming-start";
1855
+ }
1856
+ | {
1857
+ argsTextDelta: string;
1858
+ toolCallId: string;
1859
+ toolName: string;
1860
+ type: "tool-call-delta";
1861
+ }
1862
+ | {
1863
+ args?: any;
1864
+ experimental_content?: Array<
1865
+ | { text: string; type: "text" }
1866
+ | { data: string; mimeType?: string; type: "image" }
1867
+ >;
1868
+ isError?: boolean;
1869
+ providerOptions?: Record<string, Record<string, any>>;
1870
+ result: any;
1871
+ toolCallId: string;
1872
+ toolName: string;
1873
+ type: "tool-result";
1874
+ }
1875
+ >;
1876
+ start: number;
1877
+ streamId: string;
1878
+ }>
1879
+ >;
1880
+ };
1710
1881
  threads: {
1711
1882
  createThread: FunctionReference<
1712
1883
  "mutation",
@@ -1765,7 +1936,7 @@ export type Mounts = {
1765
1936
  maximumRowsRead?: number;
1766
1937
  numItems: number;
1767
1938
  };
1768
- userId: string;
1939
+ userId?: string;
1769
1940
  },
1770
1941
  {
1771
1942
  continueCursor: string;
@@ -1854,6 +2025,7 @@ export type Mounts = {
1854
2025
  | string
1855
2026
  | string
1856
2027
  | string
2028
+ | string
1857
2029
  >;
1858
2030
  },
1859
2031
  null
@@ -1872,6 +2044,7 @@ export type Mounts = {
1872
2044
  | 512
1873
2045
  | 768
1874
2046
  | 1024
2047
+ | 1408
1875
2048
  | 1536
1876
2049
  | 2048
1877
2050
  | 3072
@@ -1889,6 +2062,7 @@ export type Mounts = {
1889
2062
  | 512
1890
2063
  | 768
1891
2064
  | 1024
2065
+ | 1408
1892
2066
  | 1536
1893
2067
  | 2048
1894
2068
  | 3072
@@ -1917,6 +2091,7 @@ export type Mounts = {
1917
2091
  | 512
1918
2092
  | 768
1919
2093
  | 1024
2094
+ | 1408
1920
2095
  | 1536
1921
2096
  | 2048
1922
2097
  | 3072
@@ -1934,6 +2109,7 @@ export type Mounts = {
1934
2109
  | string
1935
2110
  | string
1936
2111
  | string
2112
+ | string
1937
2113
  >;
1938
2114
  isDone: boolean;
1939
2115
  }
@@ -1952,6 +2128,7 @@ export type Mounts = {
1952
2128
  | string
1953
2129
  | string
1954
2130
  | string
2131
+ | string
1955
2132
  | string;
1956
2133
  model: string;
1957
2134
  vector: Array<number>;