@convex-dev/agent 0.6.4 → 0.7.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 (225) hide show
  1. package/MIGRATION.md +60 -116
  2. package/dist/client/messages.d.ts +1 -398
  3. package/dist/client/messages.d.ts.map +1 -1
  4. package/dist/client/messages.js +3 -47
  5. package/dist/client/messages.js.map +1 -1
  6. package/dist/client/types.d.ts +1 -455
  7. package/dist/client/types.d.ts.map +1 -1
  8. package/dist/component/_generated/component.d.ts +805 -45
  9. package/dist/component/_generated/component.d.ts.map +1 -1
  10. package/dist/component/messages.d.ts +1252 -201
  11. package/dist/component/messages.d.ts.map +1 -1
  12. package/dist/component/messages.js +49 -23
  13. package/dist/component/messages.js.map +1 -1
  14. package/dist/component/schema.d.ts +2593 -332
  15. package/dist/component/schema.d.ts.map +1 -1
  16. package/dist/component/streams.d.ts +7 -1
  17. package/dist/component/streams.d.ts.map +1 -1
  18. package/dist/component/streams.js +24 -30
  19. package/dist/component/streams.js.map +1 -1
  20. package/dist/component/threads.d.ts.map +1 -1
  21. package/dist/component/threads.js +1 -2
  22. package/dist/component/threads.js.map +1 -1
  23. package/dist/react/index.d.ts +5 -5
  24. package/dist/react/index.d.ts.map +1 -1
  25. package/dist/react/index.js +5 -5
  26. package/dist/react/index.js.map +1 -1
  27. package/dist/shared.d.ts +19 -7
  28. package/dist/shared.d.ts.map +1 -1
  29. package/dist/shared.js +4 -4
  30. package/dist/shared.js.map +1 -1
  31. package/dist/streaming/materializePersistedUIMessageChunks.d.ts +16 -0
  32. package/dist/streaming/materializePersistedUIMessageChunks.d.ts.map +1 -0
  33. package/dist/streaming/materializePersistedUIMessageChunks.js +302 -0
  34. package/dist/streaming/materializePersistedUIMessageChunks.js.map +1 -0
  35. package/dist/streaming/persistedUIMessageChunks.d.ts +106 -0
  36. package/dist/streaming/persistedUIMessageChunks.d.ts.map +1 -0
  37. package/dist/streaming/persistedUIMessageChunks.js +475 -0
  38. package/dist/streaming/persistedUIMessageChunks.js.map +1 -0
  39. package/dist/validators.d.ts +10026 -1055
  40. package/dist/validators.d.ts.map +1 -1
  41. package/dist/validators.js +71 -9
  42. package/dist/validators.js.map +1 -1
  43. package/dist/{UIMessages.d.ts → vercel/UIMessages.d.ts} +1 -1
  44. package/dist/vercel/UIMessages.d.ts.map +1 -0
  45. package/dist/{UIMessages.js → vercel/UIMessages.js} +63 -1
  46. package/dist/vercel/UIMessages.js.map +1 -0
  47. package/dist/{client → vercel/client}/createTool.d.ts +23 -16
  48. package/dist/vercel/client/createTool.d.ts.map +1 -0
  49. package/dist/{client → vercel/client}/createTool.js +2 -0
  50. package/dist/vercel/client/createTool.js.map +1 -0
  51. package/dist/{client → vercel/client}/definePlaygroundAPI.d.ts +533 -79
  52. package/dist/{client → vercel/client}/definePlaygroundAPI.d.ts.map +1 -1
  53. package/dist/{client → vercel/client}/definePlaygroundAPI.js +8 -7
  54. package/dist/vercel/client/definePlaygroundAPI.js.map +1 -0
  55. package/dist/{client → vercel/client}/files.d.ts +2 -2
  56. package/dist/vercel/client/files.d.ts.map +1 -0
  57. package/dist/vercel/client/files.js.map +1 -0
  58. package/dist/vercel/client/messages.d.ts +542 -0
  59. package/dist/vercel/client/messages.d.ts.map +1 -0
  60. package/dist/vercel/client/messages.js +66 -0
  61. package/dist/vercel/client/messages.js.map +1 -0
  62. package/dist/{client → vercel/client}/mockModel.d.ts +17 -17
  63. package/dist/vercel/client/mockModel.d.ts.map +1 -0
  64. package/dist/{client → vercel/client}/mockModel.js +12 -13
  65. package/dist/vercel/client/mockModel.js.map +1 -0
  66. package/dist/{client → vercel/client}/saveInputMessages.d.ts +2 -2
  67. package/dist/vercel/client/saveInputMessages.d.ts.map +1 -0
  68. package/dist/vercel/client/saveInputMessages.js.map +1 -0
  69. package/dist/{client → vercel/client}/search.d.ts +119 -22
  70. package/dist/vercel/client/search.d.ts.map +1 -0
  71. package/dist/{client → vercel/client}/search.js +2 -2
  72. package/dist/vercel/client/search.js.map +1 -0
  73. package/dist/{client → vercel/client}/start.d.ts +26 -11
  74. package/dist/vercel/client/start.d.ts.map +1 -0
  75. package/dist/{client → vercel/client}/start.js +64 -22
  76. package/dist/vercel/client/start.js.map +1 -0
  77. package/dist/{client → vercel/client}/streamText.d.ts +13 -12
  78. package/dist/vercel/client/streamText.d.ts.map +1 -0
  79. package/dist/{client → vercel/client}/streamText.js +43 -9
  80. package/dist/vercel/client/streamText.js.map +1 -0
  81. package/dist/{client → vercel/client}/streaming.d.ts +1410 -183
  82. package/dist/vercel/client/streaming.d.ts.map +1 -0
  83. package/dist/{client → vercel/client}/streaming.js +120 -52
  84. package/dist/vercel/client/streaming.js.map +1 -0
  85. package/dist/vercel/client/types.d.ts +456 -0
  86. package/dist/vercel/client/types.d.ts.map +1 -0
  87. package/dist/vercel/client/types.js +3 -0
  88. package/dist/vercel/client/types.js.map +1 -0
  89. package/dist/{client → vercel/client}/utils.d.ts +3 -2
  90. package/dist/vercel/client/utils.d.ts.map +1 -0
  91. package/dist/{client → vercel/client}/utils.js +2 -2
  92. package/dist/vercel/client/utils.js.map +1 -0
  93. package/dist/{deltas.d.ts → vercel/deltas.d.ts} +3 -4
  94. package/dist/vercel/deltas.d.ts.map +1 -0
  95. package/dist/{deltas.js → vercel/deltas.js} +195 -99
  96. package/dist/vercel/deltas.js.map +1 -0
  97. package/dist/{client → vercel}/index.d.ts +482 -106
  98. package/dist/vercel/index.d.ts.map +1 -0
  99. package/dist/{client → vercel}/index.js +64 -46
  100. package/dist/vercel/index.js.map +1 -0
  101. package/dist/{mapping.d.ts → vercel/mapping.d.ts} +5 -19
  102. package/dist/vercel/mapping.d.ts.map +1 -0
  103. package/dist/{mapping.js → vercel/mapping.js} +411 -114
  104. package/dist/vercel/mapping.js.map +1 -0
  105. package/dist/{react → vercel/react}/optimisticallySendMessage.d.ts +2 -2
  106. package/dist/vercel/react/optimisticallySendMessage.d.ts.map +1 -0
  107. package/dist/vercel/react/optimisticallySendMessage.js.map +1 -0
  108. package/dist/{react → vercel/react}/types.d.ts +1 -1
  109. package/dist/vercel/react/types.d.ts.map +1 -0
  110. package/dist/{react → vercel/react}/types.js.map +1 -1
  111. package/dist/{react → vercel/react}/useDeltaStreams.d.ts +1 -1
  112. package/dist/vercel/react/useDeltaStreams.d.ts.map +1 -0
  113. package/dist/{react → vercel/react}/useDeltaStreams.js +1 -1
  114. package/dist/vercel/react/useDeltaStreams.js.map +1 -0
  115. package/dist/{react → vercel/react}/useStreamingUIMessages.d.ts +1 -1
  116. package/dist/vercel/react/useStreamingUIMessages.d.ts.map +1 -0
  117. package/dist/{react → vercel/react}/useStreamingUIMessages.js +7 -3
  118. package/dist/vercel/react/useStreamingUIMessages.js.map +1 -0
  119. package/dist/{react → vercel/react}/useThreadMessages.d.ts +1 -1
  120. package/dist/vercel/react/useThreadMessages.d.ts.map +1 -0
  121. package/dist/{react → vercel/react}/useThreadMessages.js +1 -1
  122. package/dist/vercel/react/useThreadMessages.js.map +1 -0
  123. package/dist/{react → vercel/react}/useUIMessages.d.ts +1 -1
  124. package/dist/vercel/react/useUIMessages.d.ts.map +1 -0
  125. package/dist/{react → vercel/react}/useUIMessages.js +1 -1
  126. package/dist/vercel/react/useUIMessages.js.map +1 -0
  127. package/package.json +31 -24
  128. package/src/client/messages.ts +5 -107
  129. package/src/client/types.ts +0 -608
  130. package/src/component/_generated/component.ts +1089 -48
  131. package/src/component/messages.test.ts +273 -1
  132. package/src/component/messages.ts +62 -32
  133. package/src/component/streams.ts +47 -47
  134. package/src/component/threads.ts +5 -2
  135. package/src/eslintConfig.test.ts +44 -0
  136. package/src/react/index.ts +8 -5
  137. package/src/shared.ts +26 -36
  138. package/src/streaming/materializePersistedUIMessageChunks.test.ts +513 -0
  139. package/src/streaming/materializePersistedUIMessageChunks.ts +398 -0
  140. package/src/streaming/persistedUIMessageChunks.test.ts +205 -0
  141. package/src/streaming/persistedUIMessageChunks.ts +658 -0
  142. package/src/validators.test.ts +4 -1
  143. package/src/validators.ts +89 -8
  144. package/src/{UIMessages.combineUIMessages.test.ts → vercel/UIMessages.combineUIMessages.test.ts} +4 -1
  145. package/src/{UIMessages.ts → vercel/UIMessages.ts} +95 -3
  146. package/src/{client → vercel/client}/approval.test.ts +23 -13
  147. package/src/{client → vercel/client}/createTool.ts +62 -22
  148. package/src/{client → vercel/client}/definePlaygroundAPI.ts +15 -16
  149. package/src/{client → vercel/client}/files.ts +2 -2
  150. package/src/{client → vercel/client}/index.test.ts +99 -31
  151. package/src/vercel/client/messages.ts +182 -0
  152. package/src/{client → vercel/client}/mockModel.ts +38 -39
  153. package/src/{client → vercel/client}/saveInputMessages.test.ts +1 -1
  154. package/src/{client → vercel/client}/saveInputMessages.ts +3 -3
  155. package/src/{client → vercel/client}/search.test.ts +3 -3
  156. package/src/{client → vercel/client}/search.ts +4 -4
  157. package/src/{client → vercel/client}/setup.test.ts +6 -3
  158. package/src/vercel/client/start.test.ts +14 -0
  159. package/src/{client → vercel/client}/start.ts +147 -36
  160. package/src/vercel/client/streamText.test.ts +223 -0
  161. package/src/{client → vercel/client}/streamText.ts +102 -31
  162. package/src/{client → vercel/client}/streaming.integration.test.ts +6 -3
  163. package/src/{client → vercel/client}/streaming.test.ts +178 -4
  164. package/src/{client → vercel/client}/streaming.ts +114 -52
  165. package/src/vercel/client/types.test.ts +13 -0
  166. package/src/vercel/client/types.ts +679 -0
  167. package/src/{client → vercel/client}/utils.ts +13 -7
  168. package/src/{deltas.test.ts → vercel/deltas.test.ts} +384 -93
  169. package/src/{deltas.ts → vercel/deltas.ts} +218 -115
  170. package/src/{fromUIMessages.test.ts → vercel/fromUIMessages.test.ts} +17 -1
  171. package/src/{client → vercel}/index.ts +167 -84
  172. package/src/{mapping.test.ts → vercel/mapping.test.ts} +377 -92
  173. package/src/{mapping.ts → vercel/mapping.ts} +501 -137
  174. package/src/{react → vercel/react}/optimisticallySendMessage.ts +2 -2
  175. package/src/{react → vercel/react}/types.ts +1 -1
  176. package/src/{react → vercel/react}/useDeltaStreams.ts +6 -2
  177. package/src/{react → vercel/react}/useStreamingUIMessages.ts +7 -3
  178. package/src/{react → vercel/react}/useThreadMessages.ts +2 -2
  179. package/src/{react → vercel/react}/useUIMessages.ts +2 -2
  180. package/src/{toUIMessages.test.ts → vercel/toUIMessages.test.ts} +49 -2
  181. package/dist/UIMessages.d.ts.map +0 -1
  182. package/dist/UIMessages.js.map +0 -1
  183. package/dist/client/createTool.d.ts.map +0 -1
  184. package/dist/client/createTool.js.map +0 -1
  185. package/dist/client/definePlaygroundAPI.js.map +0 -1
  186. package/dist/client/files.d.ts.map +0 -1
  187. package/dist/client/files.js.map +0 -1
  188. package/dist/client/index.d.ts.map +0 -1
  189. package/dist/client/index.js.map +0 -1
  190. package/dist/client/mockModel.d.ts.map +0 -1
  191. package/dist/client/mockModel.js.map +0 -1
  192. package/dist/client/saveInputMessages.d.ts.map +0 -1
  193. package/dist/client/saveInputMessages.js.map +0 -1
  194. package/dist/client/search.d.ts.map +0 -1
  195. package/dist/client/search.js.map +0 -1
  196. package/dist/client/start.d.ts.map +0 -1
  197. package/dist/client/start.js.map +0 -1
  198. package/dist/client/streamText.d.ts.map +0 -1
  199. package/dist/client/streamText.js.map +0 -1
  200. package/dist/client/streaming.d.ts.map +0 -1
  201. package/dist/client/streaming.js.map +0 -1
  202. package/dist/client/utils.d.ts.map +0 -1
  203. package/dist/client/utils.js.map +0 -1
  204. package/dist/deltas.d.ts.map +0 -1
  205. package/dist/deltas.js.map +0 -1
  206. package/dist/mapping.d.ts.map +0 -1
  207. package/dist/mapping.js.map +0 -1
  208. package/dist/react/optimisticallySendMessage.d.ts.map +0 -1
  209. package/dist/react/optimisticallySendMessage.js.map +0 -1
  210. package/dist/react/types.d.ts.map +0 -1
  211. package/dist/react/useDeltaStreams.d.ts.map +0 -1
  212. package/dist/react/useDeltaStreams.js.map +0 -1
  213. package/dist/react/useStreamingUIMessages.d.ts.map +0 -1
  214. package/dist/react/useStreamingUIMessages.js.map +0 -1
  215. package/dist/react/useThreadMessages.d.ts.map +0 -1
  216. package/dist/react/useThreadMessages.js.map +0 -1
  217. package/dist/react/useUIMessages.d.ts.map +0 -1
  218. package/dist/react/useUIMessages.js.map +0 -1
  219. package/src/client/streamText.test.ts +0 -102
  220. /package/dist/{client → vercel/client}/files.js +0 -0
  221. /package/dist/{client → vercel/client}/saveInputMessages.js +0 -0
  222. /package/dist/{react → vercel/react}/optimisticallySendMessage.js +0 -0
  223. /package/dist/{react → vercel/react}/types.js +0 -0
  224. /package/src/{UIMessages.test.ts → vercel/UIMessages.test.ts} +0 -0
  225. /package/src/{react → vercel/react}/useUIMessages.test.ts +0 -0
package/MIGRATION.md CHANGED
@@ -1,153 +1,97 @@
1
- # Migration Guide: v0.3.x to v0.6.0 (AI SDK v6)
1
+ # Migration Guide: v0.6.x to v0.7.0 (AI SDK v7)
2
2
 
3
- This guide helps you upgrade from @convex-dev/agent v0.3.x to v0.6.0.
3
+ `@convex-dev/agent` v0.7 uses AI SDK 7 at runtime. Existing messages saved by
4
+ v0.6 remain readable; applications must update their AI SDK runtime and
5
+ provider packages together.
4
6
 
5
- ## Step 1: Update dependencies
7
+ ## 1. Update Node.js and dependencies
6
8
 
7
- Update all AI SDK packages **together** to avoid peer dependency conflicts:
9
+ Agent v0.7 requires Node.js 22 or newer.
8
10
 
9
11
  ```bash
10
- npm install @convex-dev/agent@^0.6.0 ai@^6.0.35 @ai-sdk/provider-utils@^4.0.6
12
+ pnpm add @convex-dev/agent@^0.7.0 ai@^7.0.0 \
13
+ @ai-sdk/provider@^4.0.0 @ai-sdk/provider-utils@^5.0.0
11
14
  ```
12
15
 
13
- ### Official AI SDK providers
16
+ Update official provider packages to v4:
14
17
 
15
- Update your AI SDK provider packages to v3.x:
16
18
  ```bash
17
- # For OpenAI
18
- npm install @ai-sdk/openai@^3.0.10
19
-
20
- # For Anthropic
21
- npm install @ai-sdk/anthropic@^3.0.13
22
-
23
- # For Groq
24
- npm install @ai-sdk/groq@^3.0.8
25
-
26
- # For Google (Gemini)
27
- npm install @ai-sdk/google@^3.0.8
19
+ pnpm add @ai-sdk/openai@^4.0.0 @ai-sdk/anthropic@^4.0.0 \
20
+ @ai-sdk/google@^4.0.0 @ai-sdk/groq@^4.0.0
28
21
  ```
29
22
 
30
- ### Third-party providers
31
-
32
- Third-party providers also need updates to be compatible with AI SDK v6:
33
-
34
- ```bash
35
- # For OpenRouter
36
- npm install @openrouter/ai-sdk-provider@^2.0.0
37
-
38
- # For other providers, check their documentation for AI SDK v6 compatibility
39
- ```
23
+ Update third-party providers to releases that support AI SDK 7. If your
24
+ application uses `@convex-dev/rag` with Agent, use an AI SDK 7-compatible RAG
25
+ release (>= 0.8.0.alpha.0).
40
26
 
41
- ### Handling dependency conflicts
27
+ Avoid installing with `--force`. Mixed AI SDK major versions can compile
28
+ against incompatible model, tool, and message types.
42
29
 
43
- If you see peer dependency warnings or errors, try updating all packages at once:
30
+ ## 2. Rename top-level `system` to `instructions`
44
31
 
45
- ```bash
46
- npm install @convex-dev/agent@^0.6.0 ai@^6.0.35 @ai-sdk/openai@^3.0.10 @openrouter/ai-sdk-provider@^2.0.0
47
- ```
32
+ Agent continues to accept `system` temporarily, but it is deprecated. Use
33
+ `instructions` for top-level model guidance:
48
34
 
49
- If you still have conflicts, you can use `--force` as a last resort:
35
+ ```typescript
36
+ const agent = new Agent(components.agent, {
37
+ languageModel: openai("gpt-5"),
38
+ instructions: "You are a helpful assistant.",
39
+ });
50
40
 
51
- ```bash
52
- npm install @convex-dev/agent@^0.6.0 --force
41
+ await agent.generateText(ctx, { threadId }, {
42
+ prompt: "Hello",
43
+ instructions: "Answer concisely.",
44
+ });
53
45
  ```
54
46
 
55
- > **Note**: Using `--force` can lead to inconsistent dependency trees. After using it, verify your app works correctly and consider running `npm dedupe` to clean up.
47
+ Stored system messages remain supported. Passing system messages in assembled
48
+ history requires `allowSystemInMessages: true`.
56
49
 
57
- ## Step 2: Update tool definitions
50
+ ## 3. Update AI SDK types and callbacks
58
51
 
59
- Replace `parameters` with `inputSchema`:
52
+ Agent's generation, streaming, tool, usage, warning, and provider types now
53
+ come from AI SDK 7. Re-run TypeScript after updating dependencies and fix
54
+ custom callbacks or wrappers that depend on AI SDK 6 types.
60
55
 
61
- ```typescript
62
- // Before (v5)
63
- const myTool = createTool({
64
- description: "My tool",
65
- parameters: z.object({ query: z.string() }),
66
- execute: async (ctx, args) => { ... }
67
- })
68
-
69
- // After (v6)
70
- const myTool = createTool({
71
- description: "My tool",
72
- inputSchema: z.object({ query: z.string() }),
73
- execute: async (ctx, input, options) => { ... }
74
- })
75
- ```
56
+ In particular:
76
57
 
77
- ## Step 3: Update Agent config (if using embeddings)
58
+ - Use `mediaType` for AI SDK image and file parts.
59
+ - Update custom tools and provider options to their AI SDK 7 forms.
60
+ - Review code that consumes usage, warnings, response metadata, or step
61
+ results; these now use AI SDK 7 shapes.
78
62
 
79
- ```typescript
80
- // Before
81
- new Agent(components.agent, {
82
- textEmbeddingModel: openai.embedding("text-embedding-3-small")
83
- })
84
-
85
- // After
86
- new Agent(components.agent, {
87
- embeddingModel: openai.embedding("text-embedding-3-small")
88
- })
89
- ```
63
+ Agent still supports `maxSteps`; `stopWhen` remains the preferred AI SDK API.
90
64
 
91
- ## Step 4: Update maxSteps (optional)
65
+ ## 4. Existing data and streamed files
92
66
 
93
- ```typescript
94
- // Before
95
- await agent.generateText(ctx, { threadId }, {
96
- prompt: "...",
97
- maxSteps: 5
98
- })
67
+ No message-data migration is required. Agent reads messages saved by v0.6 and
68
+ writes new streams in the AI SDK 7 `UIMessageChunk` format. The stream reader
69
+ uses one reducer for the v0.6-compatible subset and the v0.7 superset.
99
70
 
100
- // After (maxSteps still works, but stopWhen is preferred)
101
- import { stepCountIs } from "ai"
102
- await agent.generateText(ctx, { threadId }, {
103
- prompt: "...",
104
- stopWhen: stepCountIs(5)
105
- })
106
- ```
71
+ This release does not offload every oversized inline file encoding. Top-level
72
+ `ArrayBuffer` image/file inputs and URL-backed files continue to work.
73
+ Reasoning files, nested tool-result files, and tagged/base64/data-URL payloads
74
+ will gain durable offloading separately.
107
75
 
108
- ## Step 5: Verify
76
+ ## 5. Verify
109
77
 
110
78
  ```bash
111
- npm run typecheck
112
- npm test
79
+ pnpm exec tsc --noEmit
80
+ pnpm test
113
81
  ```
114
82
 
115
- ## Common Issues
116
-
117
- ### EmbeddingModelV2 vs EmbeddingModelV3 type errors
118
- Ensure all `@ai-sdk/*` packages are updated to v3.x. Older versions use AI SDK v5 types.
119
-
120
- ### Tool `args` vs `input`
121
- AI SDK v6 renamed `args` to `input` in tool calls. The library maintains backwards compatibility, but you may see this in types.
122
-
123
- ### `mimeType` vs `mediaType`
124
- AI SDK v6 renamed `mimeType` to `mediaType`. Backwards compatibility is maintained.
83
+ See the [AI SDK migration guides](https://ai-sdk.dev/docs/migration-guides)
84
+ for upstream breaking changes.
125
85
 
126
- ### Peer dependency conflicts
86
+ ---
127
87
 
128
- If you see errors like:
129
- ```
130
- npm error ERESOLVE unable to resolve dependency tree
131
- npm error peer ai@"^5.0.0" from @openrouter/ai-sdk-provider@1.0.3
132
- ```
133
-
134
- This means a third-party provider needs updating. Common solutions:
135
-
136
- 1. **Update the provider** to a version compatible with AI SDK v6
137
- 2. **Check npm** for the latest version: `npm view @openrouter/ai-sdk-provider versions`
138
- 3. **Use `--force`** if a compatible version isn't available yet (temporary workaround)
88
+ ## More Information
139
89
 
140
- ### Third-party provider compatibility
90
+ - [AI SDK v7 Migration Guide](https://ai-sdk.dev/docs/migration-guides/migration-guide-7-0)
91
+ - [Convex Agent Documentation](https://docs.convex.dev/agents)
141
92
 
142
- | Provider | AI SDK v5 (ai@5.x) | AI SDK v6 (ai@6.x) |
143
- |----------|-------------------|-------------------|
144
- | @openrouter/ai-sdk-provider | v1.x | v2.x |
145
- | @ai-sdk/openai | v1.x-v2.x | v3.x |
146
- | @ai-sdk/anthropic | v1.x-v2.x | v3.x |
147
- | @ai-sdk/groq | v1.x-v2.x | v3.x |
148
- | @ai-sdk/google | v1.x-v2.x | v3.x |
93
+ ## Earlier migration: v0.3.x to v0.6.0 (AI SDK v6)
149
94
 
150
- ## More Information
95
+ An earlier version of this guide to transition from AI SDK v5 to v6 can be found here:
151
96
 
152
- - [AI SDK v6 Migration Guide](https://ai-sdk.dev/docs/migration-guides/migration-guide-6-0)
153
- - [Convex Agent Documentation](https://docs.convex.dev/agents)
97
+ https://github.com/get-convex/agent/blob/2ac74487d69462b6575e21526e09d52a9371c578/MIGRATION.md
@@ -1,8 +1,6 @@
1
- import type { ModelMessage } from "ai";
2
1
  import type { PaginationOptions, PaginationResult } from "convex/server";
3
2
  import type { MessageDoc } from "../validators.js";
4
3
  import { type Message, type MessageEmbeddings, type MessageStatus, type MessageWithMetadata } from "../validators.js";
5
- import { type UIMessage } from "../UIMessages.js";
6
4
  import type { AgentComponent, MutationCtx, QueryCtx, ActionCtx } from "./types.js";
7
5
  /**
8
6
  * List messages from a thread.
@@ -21,10 +19,6 @@ export declare function listMessages(ctx: QueryCtx | MutationCtx | ActionCtx, co
21
19
  excludeToolMessages?: boolean;
22
20
  statuses?: MessageStatus[];
23
21
  }): Promise<PaginationResult<MessageDoc>>;
24
- export declare function listUIMessages(ctx: QueryCtx | MutationCtx | ActionCtx, component: AgentComponent, args: {
25
- threadId: string;
26
- paginationOpts: PaginationOptions;
27
- }): Promise<PaginationResult<UIMessage>>;
28
22
  export type SaveMessagesArgs = {
29
23
  threadId: string;
30
24
  userId?: string | null;
@@ -36,7 +30,7 @@ export type SaveMessagesArgs = {
36
30
  /**
37
31
  * The messages to save.
38
32
  */
39
- messages: (ModelMessage | Message)[];
33
+ messages: Message[];
40
34
  /**
41
35
  * Metadata to save with the messages. Each element corresponds to the
42
36
  * message at the same index.
@@ -67,395 +61,4 @@ export declare function saveMessages(ctx: MutationCtx | ActionCtx, component: Ag
67
61
  }): Promise<{
68
62
  messages: MessageDoc[];
69
63
  }>;
70
- export type SaveMessageArgs = {
71
- threadId: string;
72
- userId?: string | null;
73
- /**
74
- * The message that these messages are in response to. They will be
75
- * the same "order" as this message, at increasing stepOrder(s).
76
- */
77
- promptMessageId?: string;
78
- /**
79
- * Metadata to save with the messages. Each element corresponds to the
80
- * message at the same index.
81
- */
82
- metadata?: Omit<MessageWithMetadata, "message">;
83
- /**
84
- * The embedding to save with the message.
85
- */
86
- embedding?: {
87
- vector: number[];
88
- model: string;
89
- };
90
- /**
91
- * A pending message ID to replace with this message.
92
- */
93
- pendingMessageId?: string;
94
- } & ({
95
- prompt?: undefined;
96
- /**
97
- * The message to save.
98
- */
99
- message: ModelMessage | Message;
100
- } | {
101
- prompt: string;
102
- message?: undefined;
103
- });
104
- /**
105
- * Save a message to the thread.
106
- * @param ctx A ctx object from a mutation or action.
107
- * @param args The message and what to associate it with (user / thread)
108
- * You can pass extra metadata alongside the message, e.g. associated fileIds.
109
- * @returns The messageId of the saved message.
110
- */
111
- export declare function saveMessage(ctx: MutationCtx | ActionCtx, component: AgentComponent, args: SaveMessageArgs & {
112
- /**
113
- * The agent name to associate with the message.
114
- */
115
- agentName?: string;
116
- }): Promise<{
117
- messageId: string;
118
- message: {
119
- id?: string | undefined;
120
- userId?: string | undefined;
121
- embeddingId?: string | undefined;
122
- fileIds?: string[] | undefined;
123
- error?: string | undefined;
124
- agentName?: string | undefined;
125
- model?: string | undefined;
126
- provider?: string | undefined;
127
- providerOptions?: Record<string, Record<string, any>> | undefined;
128
- message?: {
129
- providerOptions?: Record<string, Record<string, any>> | undefined;
130
- role: "user";
131
- content: string | ({
132
- providerOptions?: Record<string, Record<string, any>> | undefined;
133
- providerMetadata?: Record<string, Record<string, any>> | undefined;
134
- type: "text";
135
- text: string;
136
- } | {
137
- providerOptions?: Record<string, Record<string, any>> | undefined;
138
- mediaType?: string | undefined;
139
- mimeType?: string | undefined;
140
- type: "image";
141
- image: string | ArrayBuffer;
142
- } | {
143
- providerOptions?: Record<string, Record<string, any>> | undefined;
144
- providerMetadata?: Record<string, Record<string, any>> | undefined;
145
- mediaType?: string | undefined;
146
- mimeType?: string | undefined;
147
- filename?: string | undefined;
148
- type: "file";
149
- data: string | ArrayBuffer;
150
- })[];
151
- } | {
152
- providerOptions?: Record<string, Record<string, any>> | undefined;
153
- role: "assistant";
154
- content: string | ({
155
- providerOptions?: Record<string, Record<string, any>> | undefined;
156
- providerMetadata?: Record<string, Record<string, any>> | undefined;
157
- type: "text";
158
- text: string;
159
- } | {
160
- providerOptions?: Record<string, Record<string, any>> | undefined;
161
- providerMetadata?: Record<string, Record<string, any>> | undefined;
162
- mediaType?: string | undefined;
163
- mimeType?: string | undefined;
164
- filename?: string | undefined;
165
- type: "file";
166
- data: string | ArrayBuffer;
167
- } | {
168
- providerOptions?: Record<string, Record<string, any>> | undefined;
169
- providerMetadata?: Record<string, Record<string, any>> | undefined;
170
- signature?: string | undefined;
171
- type: "reasoning";
172
- text: string;
173
- } | {
174
- providerOptions?: Record<string, Record<string, any>> | undefined;
175
- providerMetadata?: Record<string, Record<string, any>> | undefined;
176
- type: "redacted-reasoning";
177
- data: string;
178
- } | {
179
- providerOptions?: Record<string, Record<string, any>> | undefined;
180
- providerMetadata?: Record<string, Record<string, any>> | undefined;
181
- args?: any;
182
- providerExecuted?: boolean | undefined;
183
- type: "tool-call";
184
- toolCallId: string;
185
- toolName: string;
186
- input: any;
187
- } | {
188
- providerOptions?: Record<string, Record<string, any>> | undefined;
189
- providerMetadata?: Record<string, Record<string, any>> | undefined;
190
- input?: any;
191
- providerExecuted?: boolean | undefined;
192
- type: "tool-call";
193
- toolCallId: string;
194
- toolName: string;
195
- args: any;
196
- } | {
197
- providerOptions?: Record<string, Record<string, any>> | undefined;
198
- providerMetadata?: Record<string, Record<string, any>> | undefined;
199
- args?: any;
200
- providerExecuted?: boolean | undefined;
201
- output?: {
202
- providerOptions?: Record<string, Record<string, any>> | undefined;
203
- type: "text";
204
- value: string;
205
- } | {
206
- providerOptions?: Record<string, Record<string, any>> | undefined;
207
- type: "json";
208
- value: any;
209
- } | {
210
- providerOptions?: Record<string, Record<string, any>> | undefined;
211
- type: "error-text";
212
- value: string;
213
- } | {
214
- providerOptions?: Record<string, Record<string, any>> | undefined;
215
- type: "error-json";
216
- value: any;
217
- } | {
218
- providerOptions?: Record<string, Record<string, any>> | undefined;
219
- reason?: string | undefined;
220
- type: "execution-denied";
221
- } | {
222
- type: "content";
223
- value: ({
224
- providerOptions?: Record<string, Record<string, any>> | undefined;
225
- type: "text";
226
- text: string;
227
- } | {
228
- type: "media";
229
- mediaType: string;
230
- data: string;
231
- } | {
232
- providerOptions?: Record<string, Record<string, any>> | undefined;
233
- filename?: string | undefined;
234
- type: "file-data";
235
- mediaType: string;
236
- data: string;
237
- } | {
238
- providerOptions?: Record<string, Record<string, any>> | undefined;
239
- type: "file-url";
240
- url: string;
241
- } | {
242
- providerOptions?: Record<string, Record<string, any>> | undefined;
243
- type: "file-id";
244
- fileId: string | Record<string, string>;
245
- } | {
246
- providerOptions?: Record<string, Record<string, any>> | undefined;
247
- type: "image-data";
248
- mediaType: string;
249
- data: string;
250
- } | {
251
- providerOptions?: Record<string, Record<string, any>> | undefined;
252
- type: "image-url";
253
- url: string;
254
- } | {
255
- providerOptions?: Record<string, Record<string, any>> | undefined;
256
- type: "image-file-id";
257
- fileId: string | Record<string, string>;
258
- } | {
259
- providerOptions?: Record<string, Record<string, any>> | undefined;
260
- type: "custom";
261
- })[];
262
- } | undefined;
263
- result?: any;
264
- isError?: boolean | undefined;
265
- experimental_content?: ({
266
- type: "text";
267
- text: string;
268
- } | {
269
- mimeType?: string | undefined;
270
- type: "image";
271
- data: string;
272
- })[] | undefined;
273
- type: "tool-result";
274
- toolCallId: string;
275
- toolName: string;
276
- } | {
277
- title?: string | undefined;
278
- providerOptions?: Record<string, Record<string, any>> | undefined;
279
- providerMetadata?: Record<string, Record<string, any>> | undefined;
280
- id: string;
281
- type: "source";
282
- url: string;
283
- sourceType: "url";
284
- } | {
285
- providerOptions?: Record<string, Record<string, any>> | undefined;
286
- providerMetadata?: Record<string, Record<string, any>> | undefined;
287
- filename?: string | undefined;
288
- id: string;
289
- title: string;
290
- type: "source";
291
- mediaType: string;
292
- sourceType: "document";
293
- } | {
294
- providerOptions?: Record<string, Record<string, any>> | undefined;
295
- providerMetadata?: Record<string, Record<string, any>> | undefined;
296
- type: "tool-approval-request";
297
- toolCallId: string;
298
- approvalId: string;
299
- })[];
300
- } | {
301
- providerOptions?: Record<string, Record<string, any>> | undefined;
302
- role: "tool";
303
- content: ({
304
- providerOptions?: Record<string, Record<string, any>> | undefined;
305
- providerMetadata?: Record<string, Record<string, any>> | undefined;
306
- args?: any;
307
- providerExecuted?: boolean | undefined;
308
- output?: {
309
- providerOptions?: Record<string, Record<string, any>> | undefined;
310
- type: "text";
311
- value: string;
312
- } | {
313
- providerOptions?: Record<string, Record<string, any>> | undefined;
314
- type: "json";
315
- value: any;
316
- } | {
317
- providerOptions?: Record<string, Record<string, any>> | undefined;
318
- type: "error-text";
319
- value: string;
320
- } | {
321
- providerOptions?: Record<string, Record<string, any>> | undefined;
322
- type: "error-json";
323
- value: any;
324
- } | {
325
- providerOptions?: Record<string, Record<string, any>> | undefined;
326
- reason?: string | undefined;
327
- type: "execution-denied";
328
- } | {
329
- type: "content";
330
- value: ({
331
- providerOptions?: Record<string, Record<string, any>> | undefined;
332
- type: "text";
333
- text: string;
334
- } | {
335
- type: "media";
336
- mediaType: string;
337
- data: string;
338
- } | {
339
- providerOptions?: Record<string, Record<string, any>> | undefined;
340
- filename?: string | undefined;
341
- type: "file-data";
342
- mediaType: string;
343
- data: string;
344
- } | {
345
- providerOptions?: Record<string, Record<string, any>> | undefined;
346
- type: "file-url";
347
- url: string;
348
- } | {
349
- providerOptions?: Record<string, Record<string, any>> | undefined;
350
- type: "file-id";
351
- fileId: string | Record<string, string>;
352
- } | {
353
- providerOptions?: Record<string, Record<string, any>> | undefined;
354
- type: "image-data";
355
- mediaType: string;
356
- data: string;
357
- } | {
358
- providerOptions?: Record<string, Record<string, any>> | undefined;
359
- type: "image-url";
360
- url: string;
361
- } | {
362
- providerOptions?: Record<string, Record<string, any>> | undefined;
363
- type: "image-file-id";
364
- fileId: string | Record<string, string>;
365
- } | {
366
- providerOptions?: Record<string, Record<string, any>> | undefined;
367
- type: "custom";
368
- })[];
369
- } | undefined;
370
- result?: any;
371
- isError?: boolean | undefined;
372
- experimental_content?: ({
373
- type: "text";
374
- text: string;
375
- } | {
376
- mimeType?: string | undefined;
377
- type: "image";
378
- data: string;
379
- })[] | undefined;
380
- type: "tool-result";
381
- toolCallId: string;
382
- toolName: string;
383
- } | {
384
- providerOptions?: Record<string, Record<string, any>> | undefined;
385
- providerMetadata?: Record<string, Record<string, any>> | undefined;
386
- providerExecuted?: boolean | undefined;
387
- reason?: string | undefined;
388
- type: "tool-approval-response";
389
- approvalId: string;
390
- approved: boolean;
391
- })[];
392
- } | {
393
- providerOptions?: Record<string, Record<string, any>> | undefined;
394
- role: "system";
395
- content: string;
396
- } | undefined;
397
- text?: string | undefined;
398
- providerMetadata?: Record<string, Record<string, any>> | undefined;
399
- reasoning?: string | undefined;
400
- usage?: {
401
- reasoningTokens?: number | undefined;
402
- cachedInputTokens?: number | undefined;
403
- promptTokens: number;
404
- completionTokens: number;
405
- totalTokens: number;
406
- } | undefined;
407
- sources?: ({
408
- title?: string | undefined;
409
- type?: "source" | undefined;
410
- providerOptions?: Record<string, Record<string, any>> | undefined;
411
- providerMetadata?: Record<string, Record<string, any>> | undefined;
412
- id: string;
413
- url: string;
414
- sourceType: "url";
415
- } | {
416
- providerOptions?: Record<string, Record<string, any>> | undefined;
417
- providerMetadata?: Record<string, Record<string, any>> | undefined;
418
- filename?: string | undefined;
419
- id: string;
420
- title: string;
421
- type: "source";
422
- mediaType: string;
423
- sourceType: "document";
424
- })[] | undefined;
425
- warnings?: ({
426
- details?: string | undefined;
427
- type: "unsupported-setting";
428
- setting: string;
429
- } | {
430
- details?: string | undefined;
431
- type: "unsupported-tool";
432
- tool: any;
433
- } | {
434
- type: "other";
435
- message: string;
436
- })[] | undefined;
437
- finishReason?: "error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
438
- reasoningDetails?: ({
439
- providerOptions?: Record<string, Record<string, any>> | undefined;
440
- providerMetadata?: Record<string, Record<string, any>> | undefined;
441
- signature?: string | undefined;
442
- type: "reasoning";
443
- text: string;
444
- } | {
445
- signature?: string | undefined;
446
- type: "text";
447
- text: string;
448
- } | {
449
- type: "redacted";
450
- data: string;
451
- })[] | undefined;
452
- status: "pending" | "success" | "failed";
453
- order: number;
454
- _creationTime: number;
455
- threadId: string;
456
- stepOrder: number;
457
- tool: boolean;
458
- _id: string;
459
- };
460
- }>;
461
64
  //# sourceMappingURL=messages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/client/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EAEtB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,QAAQ,EACR,SAAS,EACV,MAAM,YAAY,CAAC;AAGpB;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,QAAQ,GAAG,WAAW,GAAG,SAAS,EACvC,SAAS,EAAE,cAAc,EACzB,EACE,QAAQ,EACR,cAAc,EACd,mBAAmB,EACnB,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,iBAAiB,CAAC;IAClC,mBAAmB,CAAC,EAAE,OA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