ai 4.2.2 → 4.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -1
- package/mcp-stdio/create-child-process.test.ts +92 -0
- package/mcp-stdio/create-child-process.ts +2 -37
- package/mcp-stdio/dist/index.js +17 -13
- package/mcp-stdio/dist/index.js.map +1 -1
- package/mcp-stdio/dist/index.mjs +17 -13
- package/mcp-stdio/dist/index.mjs.map +1 -1
- package/mcp-stdio/get-environment.ts +43 -0
- package/package.json +1 -1
- package/rsc/dist/rsc-server.mjs +6 -0
- package/rsc/dist/rsc-server.mjs.map +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# ai
|
2
2
|
|
3
|
+
## 4.2.4
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 3d6d96d: fix (ai/core): validate that messages are not empty
|
8
|
+
|
9
|
+
## 4.2.3
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- 0b3bf29: fix (ai/core): custom env support for stdio MCP transport
|
14
|
+
|
3
15
|
## 4.2.2
|
4
16
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
@@ -2175,6 +2175,12 @@ function standardizePrompt({
|
|
2175
2175
|
const messages = promptType === "ui-messages" ? convertToCoreMessages(prompt.messages, {
|
2176
2176
|
tools
|
2177
2177
|
}) : prompt.messages;
|
2178
|
+
if (messages.length === 0) {
|
2179
|
+
throw new import_provider10.InvalidPromptError({
|
2180
|
+
prompt,
|
2181
|
+
message: "messages must not be empty"
|
2182
|
+
});
|
2183
|
+
}
|
2178
2184
|
const validationResult = (0, import_provider_utils4.safeValidateTypes)({
|
2179
2185
|
value: messages,
|
2180
2186
|
schema: import_zod7.z.array(coreMessageSchema)
|