@mastra/editor 0.7.6 → 0.7.7-alpha.1
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 +22 -0
- package/dist/index.cjs +3 -2
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @mastra/editor
|
|
2
2
|
|
|
3
|
+
## 0.7.7-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`cd7b568`](https://github.com/mastra-ai/mastra/commit/cd7b568fe427b1b4838abe744fa5367a47539db3), [`681ee1c`](https://github.com/mastra-ai/mastra/commit/681ee1c811359efd1b8bebc4bce35b9bb7b14bec), [`aa664b2`](https://github.com/mastra-ai/mastra/commit/aa664b218c15d397598c71194a8603b5b5a691bb)]:
|
|
8
|
+
- @mastra/schema-compat@1.2.6-alpha.1
|
|
9
|
+
- @mastra/core@1.15.0-alpha.1
|
|
10
|
+
- @mastra/memory@1.9.0-alpha.1
|
|
11
|
+
- @mastra/mcp@1.3.1-alpha.0
|
|
12
|
+
|
|
13
|
+
## 0.7.7-alpha.0
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Added version query parameters to GET /api/agents/:agentId endpoint. Code-defined agents can now be resolved with specific stored config versions using ?status=draft (latest, default), ?status=published (active version), or ?versionId=<id> (specific version). ([#14156](https://github.com/mastra-ai/mastra/pull/14156))
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [[`cb611a1`](https://github.com/mastra-ai/mastra/commit/cb611a1e89a4f4cf74c97b57e0c27bb56f2eceb5), [`b71bce1`](https://github.com/mastra-ai/mastra/commit/b71bce144912ed33f76c52a94e594988a649c3e1), [`62d1d3c`](https://github.com/mastra-ai/mastra/commit/62d1d3cc08fe8182e7080237fd975de862ec8c91), [`56c9ad9`](https://github.com/mastra-ai/mastra/commit/56c9ad9c871d258af9da4d6e50065b01d339bf34), [`0773d08`](https://github.com/mastra-ai/mastra/commit/0773d089859210217702d3175ad4b2f3d63d267e), [`8681ecb`](https://github.com/mastra-ai/mastra/commit/8681ecb86184d5907267000e4576cc442a9a83fc), [`28d0249`](https://github.com/mastra-ai/mastra/commit/28d0249295782277040ad1e0d243e695b7ab1ce4), [`bb0f09d`](https://github.com/mastra-ai/mastra/commit/bb0f09dbac58401b36069f483acf5673202db5b5), [`6a8f1e6`](https://github.com/mastra-ai/mastra/commit/6a8f1e66272d2928351db334da091ee27e304c23), [`5f7e9d0`](https://github.com/mastra-ai/mastra/commit/5f7e9d0db664020e1f3d97d7d18c6b0b9d4843d0)]:
|
|
20
|
+
- @mastra/core@1.15.0-alpha.0
|
|
21
|
+
- @mastra/schema-compat@1.2.6-alpha.0
|
|
22
|
+
- @mastra/mcp@1.3.1-alpha.0
|
|
23
|
+
- @mastra/memory@1.8.4-alpha.0
|
|
24
|
+
|
|
3
25
|
## 0.7.6
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -654,12 +654,13 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
|
|
|
654
654
|
* they may contain SDK instances or dynamic functions that cannot be safely serialized.
|
|
655
655
|
* Returns the (possibly mutated) agent.
|
|
656
656
|
*/
|
|
657
|
-
async applyStoredOverrides(agent) {
|
|
657
|
+
async applyStoredOverrides(agent, options) {
|
|
658
658
|
let storedConfig = null;
|
|
659
659
|
try {
|
|
660
660
|
this.ensureRegistered();
|
|
661
661
|
const adapter = await this.getStorageAdapter();
|
|
662
|
-
|
|
662
|
+
const resolvedOptions = options && "versionId" in options ? { versionId: options.versionId } : { status: options?.status ?? "draft" };
|
|
663
|
+
storedConfig = await adapter.getByIdResolved(agent.id, resolvedOptions);
|
|
663
664
|
} catch {
|
|
664
665
|
this.restoreCodeDefaults(agent);
|
|
665
666
|
return agent;
|
package/dist/index.d.cts
CHANGED
|
@@ -115,7 +115,11 @@ declare class EditorAgentNamespace extends CrudEditorNamespace<StorageCreateAgen
|
|
|
115
115
|
* they may contain SDK instances or dynamic functions that cannot be safely serialized.
|
|
116
116
|
* Returns the (possibly mutated) agent.
|
|
117
117
|
*/
|
|
118
|
-
applyStoredOverrides(agent: Agent
|
|
118
|
+
applyStoredOverrides(agent: Agent, options?: {
|
|
119
|
+
status?: 'draft' | 'published';
|
|
120
|
+
} | {
|
|
121
|
+
versionId: string;
|
|
122
|
+
}): Promise<Agent>;
|
|
119
123
|
/**
|
|
120
124
|
* Save the agent's current field values to the module-level WeakMap
|
|
121
125
|
* so they can be restored if the stored config is later removed.
|
package/dist/index.d.ts
CHANGED
|
@@ -115,7 +115,11 @@ declare class EditorAgentNamespace extends CrudEditorNamespace<StorageCreateAgen
|
|
|
115
115
|
* they may contain SDK instances or dynamic functions that cannot be safely serialized.
|
|
116
116
|
* Returns the (possibly mutated) agent.
|
|
117
117
|
*/
|
|
118
|
-
applyStoredOverrides(agent: Agent
|
|
118
|
+
applyStoredOverrides(agent: Agent, options?: {
|
|
119
|
+
status?: 'draft' | 'published';
|
|
120
|
+
} | {
|
|
121
|
+
versionId: string;
|
|
122
|
+
}): Promise<Agent>;
|
|
119
123
|
/**
|
|
120
124
|
* Save the agent's current field values to the module-level WeakMap
|
|
121
125
|
* so they can be restored if the stored config is later removed.
|
package/dist/index.js
CHANGED
|
@@ -606,12 +606,13 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
|
|
|
606
606
|
* they may contain SDK instances or dynamic functions that cannot be safely serialized.
|
|
607
607
|
* Returns the (possibly mutated) agent.
|
|
608
608
|
*/
|
|
609
|
-
async applyStoredOverrides(agent) {
|
|
609
|
+
async applyStoredOverrides(agent, options) {
|
|
610
610
|
let storedConfig = null;
|
|
611
611
|
try {
|
|
612
612
|
this.ensureRegistered();
|
|
613
613
|
const adapter = await this.getStorageAdapter();
|
|
614
|
-
|
|
614
|
+
const resolvedOptions = options && "versionId" in options ? { versionId: options.versionId } : { status: options?.status ?? "draft" };
|
|
615
|
+
storedConfig = await adapter.getByIdResolved(agent.id, resolvedOptions);
|
|
615
616
|
} catch {
|
|
616
617
|
this.restoreCodeDefaults(agent);
|
|
617
618
|
return agent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/editor",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7-alpha.1",
|
|
4
4
|
"description": "Mastra Editor for agent management and instantiation",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@arcadeai/arcadejs": "^2.3.0",
|
|
66
66
|
"@composio/core": "^0.6.5",
|
|
67
67
|
"@composio/mastra": "^0.6.5",
|
|
68
|
-
"@mastra/memory": "1.
|
|
69
|
-
"@mastra/schema-compat": "1.2.
|
|
68
|
+
"@mastra/memory": "1.9.0-alpha.1",
|
|
69
|
+
"@mastra/schema-compat": "1.2.6-alpha.1"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@hono/node-server": "^1.19.11",
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
"@internal/ai-sdk-v4": "0.0.19",
|
|
79
79
|
"@internal/ai-sdk-v5": "0.0.19",
|
|
80
80
|
"@internal/ai-v6": "0.0.19",
|
|
81
|
-
"@mastra/
|
|
81
|
+
"@mastra/core": "1.15.0-alpha.1",
|
|
82
82
|
"@mastra/libsql": "1.7.1",
|
|
83
|
-
"@mastra/mcp": "1.3.0",
|
|
84
|
-
"@mastra/
|
|
83
|
+
"@mastra/mcp": "1.3.1-alpha.0",
|
|
84
|
+
"@mastra/hono": "1.2.6-alpha.1"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"@mastra/core": ">=1.7.1-0 <2.0.0-0",
|