@mastra/client-js 1.53.0-alpha.1 → 1.53.0-alpha.3
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/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-client-js
|
|
|
3
3
|
description: Documentation for @mastra/client-js. Use when working with @mastra/client-js APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/client-js"
|
|
6
|
-
version: "1.53.0-alpha.
|
|
6
|
+
version: "1.53.0-alpha.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -9,7 +9,7 @@ Converts messages from input formats to AI SDK V4 UI message format. This functi
|
|
|
9
9
|
## Usage example
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
import { toAISdkV4Messages } from '@mastra/ai-sdk'
|
|
12
|
+
import { toAISdkV4Messages } from '@mastra/ai-sdk/ui'
|
|
13
13
|
import { useChat } from 'ai/react' // AI SDK V4
|
|
14
14
|
|
|
15
15
|
// Stored messages from your database, memory or API
|
|
@@ -64,7 +64,7 @@ Returns an array of AI SDK V4 `UIMessage` objects with the following structure:
|
|
|
64
64
|
### Converting text messages
|
|
65
65
|
|
|
66
66
|
```typescript
|
|
67
|
-
import { toAISdkV4Messages } from '@mastra/ai-sdk'
|
|
67
|
+
import { toAISdkV4Messages } from '@mastra/ai-sdk/ui'
|
|
68
68
|
|
|
69
69
|
const messages = toAISdkV4Messages(['Hello', 'How can I help you today?'])
|
|
70
70
|
// Returns array of UIMessage objects with user role and content string
|
|
@@ -74,7 +74,7 @@ const messages = toAISdkV4Messages(['Hello', 'How can I help you today?'])
|
|
|
74
74
|
|
|
75
75
|
```typescript
|
|
76
76
|
import { MastraClient } from '@mastra/client-js'
|
|
77
|
-
import { toAISdkV4Messages } from '@mastra/ai-sdk'
|
|
77
|
+
import { toAISdkV4Messages } from '@mastra/ai-sdk/ui'
|
|
78
78
|
|
|
79
79
|
const client = new MastraClient()
|
|
80
80
|
|
|
@@ -204,7 +204,7 @@ const workingMemory = await mastraClient.getWorkingMemory({
|
|
|
204
204
|
|
|
205
205
|
The response includes:
|
|
206
206
|
|
|
207
|
-
- `workingMemory`: The current working memory content (string or null)
|
|
207
|
+
- `workingMemory`: The current working memory content (a string or `null`). When using a JSON or schema-based working memory template, the content is a JSON-encoded string
|
|
208
208
|
- `source`: Whether the memory is from `"thread"` or `"resource"` scope
|
|
209
209
|
- `workingMemoryTemplate`: The template used for working memory (if configured)
|
|
210
210
|
- `threadExists`: Whether the thread exists
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/client-js",
|
|
3
|
-
"version": "1.53.0-alpha.
|
|
3
|
+
"version": "1.53.0-alpha.3",
|
|
4
4
|
"description": "The official TypeScript library for the Mastra Client API",
|
|
5
5
|
"author": "",
|
|
6
6
|
"type": "module",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"canonicalize": "^1.0.8",
|
|
39
39
|
"jose": "^6.2.11",
|
|
40
40
|
"json-schema": "^0.4.0",
|
|
41
|
-
"@mastra/
|
|
42
|
-
"@mastra/
|
|
41
|
+
"@mastra/core": "1.76.0-alpha.3",
|
|
42
|
+
"@mastra/schema-compat": "1.3.13"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"zod": "^3.25.0 || ^4.0.0"
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"typescript": "^7.0.2",
|
|
56
56
|
"vitest": "4.1.11",
|
|
57
57
|
"zod": "^4.6.4",
|
|
58
|
+
"@internal/ai-sdk-v5": "0.0.88",
|
|
58
59
|
"@internal/lint": "0.0.141",
|
|
59
60
|
"@internal/types-builder": "0.0.116",
|
|
60
|
-
"@internal/ai-sdk-v5": "0.0.88",
|
|
61
61
|
"@internal/ai-sdk-v4": "0.0.88"
|
|
62
62
|
},
|
|
63
63
|
"engines": {
|