@mastra/client-js 1.32.0-alpha.7 → 1.32.0-alpha.9
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 +25 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +10 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/resources/agent-controller.d.ts +22 -3
- package/dist/resources/agent-controller.d.ts.map +1 -1
- package/dist/route-types.generated.d.ts +5 -0
- package/dist/route-types.generated.d.ts.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @mastra/client-js
|
|
2
2
|
|
|
3
|
+
## 1.32.0-alpha.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`edce8d2`](https://github.com/mastra-ai/mastra/commit/edce8d2769f19e27a05737c627af2d765472a4f8)]:
|
|
8
|
+
- @mastra/core@1.51.0-alpha.9
|
|
9
|
+
|
|
10
|
+
## 1.32.0-alpha.8
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- Added image attachment support to agent controller chat. You can now send images (and other files) with a message, and the Mastra Code web chat lets you attach, paste, or drag-and-drop images which render inline in the transcript. ([#19368](https://github.com/mastra-ai/mastra/pull/19368))
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
await session.sendMessage({
|
|
18
|
+
content: 'What is in this screenshot?',
|
|
19
|
+
files: [{ data: base64Png, mediaType: 'image/png', filename: 'screenshot.png' }],
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [[`bd6d240`](https://github.com/mastra-ai/mastra/commit/bd6d2402db93dddaef0721667e7e8a030e7c6e16), [`0111486`](https://github.com/mastra-ai/mastra/commit/01114867612593eef5cfa2fda6a1194dfedda841), [`96a3749`](https://github.com/mastra-ai/mastra/commit/96a37492235f5b8076b3e3177d83ed5a5e44a640), [`3e26c87`](https://github.com/mastra-ai/mastra/commit/3e26c87de0c5bc2583b795ce6ca5889b6b161acb), [`a5008f2`](https://github.com/mastra-ai/mastra/commit/a5008f22ae710ad9402ea9f2547d8c02f74d384b)]:
|
|
26
|
+
- @mastra/core@1.51.0-alpha.8
|
|
27
|
+
|
|
3
28
|
## 1.32.0-alpha.7
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
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.32.0-alpha.
|
|
6
|
+
version: "1.32.0-alpha.9"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
package/dist/index.cjs
CHANGED
|
@@ -6223,9 +6223,17 @@ var AgentControllerSession = class extends BaseResource {
|
|
|
6223
6223
|
}
|
|
6224
6224
|
};
|
|
6225
6225
|
}
|
|
6226
|
-
/**
|
|
6226
|
+
/**
|
|
6227
|
+
* Send a user message. The reply streams over `subscribe()`.
|
|
6228
|
+
* Pass a structured message to attach files (e.g. pasted images) as base64-encoded data:
|
|
6229
|
+
* `sendMessage({ content: 'What is in this image?', files })`.
|
|
6230
|
+
*/
|
|
6227
6231
|
async sendMessage(message) {
|
|
6228
|
-
|
|
6232
|
+
const { content, files } = typeof message === "string" ? { content: message, files: void 0 } : message;
|
|
6233
|
+
await this.request(this.url(`${this.base()}/messages`), {
|
|
6234
|
+
method: "POST",
|
|
6235
|
+
body: { message: content, ...files?.length ? { files } : {} }
|
|
6236
|
+
});
|
|
6229
6237
|
}
|
|
6230
6238
|
/** Abort the in-flight run for this session. */
|
|
6231
6239
|
async abort() {
|