@mastra/client-js 1.61.0-alpha.7 → 1.61.1-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.
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/reference-client-js-agent-controller.md +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/resources/agent-controller.d.ts +5 -1
- package/dist/resources/agent-controller.d.ts.map +1 -1
- package/package.json +6 -6
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.61.
|
|
6
|
+
version: "1.61.1-alpha.0"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -126,6 +126,8 @@ Subscribes to the session's event stream over SSE. The promise resolves once the
|
|
|
126
126
|
|
|
127
127
|
**idleTimeoutMs** (`number`): Treats the stream as dropped after this many milliseconds without receiving any data. Server heartbeats, sent every 25 seconds, reset the timer, so only a silent connection, such as one left half-open by laptop sleep or a proxy timeout, trips it. A timeout is handled like any other drop: it triggers reconnect and onReconnect when reconnect is enabled, otherwise onError. Also bounds opening the stream: subscribe() rejects, and a reconnect attempt counts as failed, when no response arrives in time. Set to 0 to disable. (Default: `60000`)
|
|
128
128
|
|
|
129
|
+
**displayState** (`boolean`): Set to false to receive no display_state_changed snapshots, including the one that opens the stream. The stream then opens with the session state as ordinary events instead: a message_start for the reply in flight, the latest om_status, and a usage_update carrying the token total. Use this when the client keeps its own state from events, since each snapshot carries the whole display state. (Default: `true`)
|
|
130
|
+
|
|
129
131
|
Returns: `Promise<AgentControllerSubscription>`, an object with an `unsubscribe()` method that stops reading and releases the stream.
|
|
130
132
|
|
|
131
133
|
### `sendMessage(message, options?)`
|
|
@@ -261,6 +263,8 @@ Returns: `Promise<SendNotificationResult>`
|
|
|
261
263
|
| Workspace | `workspace_ready`, `workspace_error`, `workspace_status_changed` |
|
|
262
264
|
| Diagnostics | `info`, `error` |
|
|
263
265
|
|
|
266
|
+
`usage_update` carries the step's `usage` and, from servers that send it, `total`: the thread's running token total after that step.
|
|
267
|
+
|
|
264
268
|
Notifications are delivered as agent signals carried on messages rather than as `notification` or `notification_summary` controller events.
|
|
265
269
|
|
|
266
270
|
A message lifecycle uses three event shapes:
|