@mastra/client-js 1.42.5-alpha.1 → 1.42.5-alpha.2
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/docs-harness-schedules.md +1 -1
- package/dist/docs/references/docs-harness-signals.md +1 -1
- package/dist/docs/references/docs-server-mastra-client.md +1 -1
- package/dist/docs/references/docs-studio-editor.md +1 -1
- package/dist/docs/references/reference-editor-versioning.md +1 -1
- package/package.json +6 -7
- package/CHANGELOG.md +0 -13556
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.42.5-alpha.
|
|
6
|
+
version: "1.42.5-alpha.2"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Beta:** Breaking changes may occur without a major version bump until the API is stable.
|
|
10
10
|
|
|
11
|
-
A schedule runs an agent on a cron cadence. On each fire, Mastra sends a prompt
|
|
11
|
+
A schedule runs an agent on a cron cadence. On each fire, Mastra sends a prompt either as a [signal](https://mastra.ai/docs/harness/signals) into a thread or as a threadless [`agent.generate()`](https://mastra.ai/reference/agents/generate) run. Use schedules for recurring work such as daily summaries and periodic checks, including scheduled nudges into a conversation.
|
|
12
12
|
|
|
13
13
|
Schedules are persisted, so they survive restarts and redeploys. Manage them at runtime through [`mastra.schedules`](https://mastra.ai/reference/schedules/overview), the canonical create, read, update, and delete (CRUD) surface. The same surface also manages [workflow schedules](https://mastra.ai/docs/workflows/scheduled-workflows) (pass `workflowId` instead of `agentId` to schedule a workflow).
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Beta:** Breaking changes may occur without a major version bump until the API is stable.
|
|
10
10
|
|
|
11
|
-
Signals
|
|
11
|
+
Signals let you interact with an agent through a thread. Instead of starting every interaction with `agent.stream()`, subscribe to a thread and send messages or signals. Mastra wakes an idle agent or delivers input to its running loop; alternatively, it queues the input for the next turn.
|
|
12
12
|
|
|
13
13
|
Use message APIs for user-authored input. Use `sendSignal()` for lower-level system context, such as background task notifications, policy reminders, or processor-generated context.
|
|
14
14
|
|
|
@@ -305,7 +305,7 @@ export const colorAgent = new Agent({
|
|
|
305
305
|
|
|
306
306
|
## Use MastraClient on the server
|
|
307
307
|
|
|
308
|
-
|
|
308
|
+
Server-side API routes and serverless functions, including actions, can also use `MastraClient`. The usage is unchanged, although you may need to recreate the response for your client:
|
|
309
309
|
|
|
310
310
|
```typescript
|
|
311
311
|
export async function action() {
|
|
@@ -77,7 +77,7 @@ An instruction block can include values from the current request. For example, `
|
|
|
77
77
|
|
|
78
78
|
### Prompt blocks
|
|
79
79
|
|
|
80
|
-
A prompt block is a saved piece of instruction text that can be used by more than one agent. Create one under **Prompts
|
|
80
|
+
A prompt block is a saved piece of instruction text that can be used by more than one agent. Create and publish one under **Prompts**. Then open an agent's **Instructions** section and select **Add block**.
|
|
81
81
|
|
|
82
82
|
For example, agents for support, returns, and order status may all need the same refund policy. Save the policy as a prompt block and add it to each agent. When the policy changes, update and publish the block once instead of editing three agents.
|
|
83
83
|
|
|
@@ -10,7 +10,7 @@ See [Editor versioning](https://mastra.ai/docs/studio/editor) for release and ex
|
|
|
10
10
|
|
|
11
11
|
## Database lifecycle
|
|
12
12
|
|
|
13
|
-
The resource record stores an `activeVersionId
|
|
13
|
+
The resource record stores an `activeVersionId`, while individual snapshots don't store a lifecycle status.
|
|
14
14
|
|
|
15
15
|
| Term | Meaning |
|
|
16
16
|
| ---------- | -------------------------------------------------------------------------------------------- |
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/client-js",
|
|
3
|
-
"version": "1.42.5-alpha.
|
|
3
|
+
"version": "1.42.5-alpha.2",
|
|
4
4
|
"description": "The official TypeScript library for the Mastra Client API",
|
|
5
5
|
"author": "",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"files": [
|
|
10
|
-
"dist"
|
|
11
|
-
"CHANGELOG.md"
|
|
10
|
+
"dist"
|
|
12
11
|
],
|
|
13
12
|
"exports": {
|
|
14
13
|
".": {
|
|
@@ -39,8 +38,8 @@
|
|
|
39
38
|
"canonicalize": "^1.0.8",
|
|
40
39
|
"jose": "^6.2.1",
|
|
41
40
|
"json-schema": "^0.4.0",
|
|
42
|
-
"@mastra/core": "1.
|
|
43
|
-
"@mastra/schema-compat": "1.3.
|
|
41
|
+
"@mastra/core": "1.64.0-alpha.2",
|
|
42
|
+
"@mastra/schema-compat": "1.3.8-alpha.0"
|
|
44
43
|
},
|
|
45
44
|
"peerDependencies": {
|
|
46
45
|
"zod": "^3.25.0 || ^4.0.0"
|
|
@@ -58,8 +57,8 @@
|
|
|
58
57
|
"zod": "^4.4.3",
|
|
59
58
|
"@internal/ai-sdk-v4": "0.0.76",
|
|
60
59
|
"@internal/lint": "0.0.129",
|
|
61
|
-
"@internal/
|
|
62
|
-
"@internal/
|
|
60
|
+
"@internal/types-builder": "0.0.104",
|
|
61
|
+
"@internal/ai-sdk-v5": "0.0.76"
|
|
63
62
|
},
|
|
64
63
|
"engines": {
|
|
65
64
|
"node": ">=22.13.0"
|