@mastra/editor 0.7.6 → 0.7.7-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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mastra/editor
2
2
 
3
+ ## 0.7.7-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 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))
8
+
9
+ - 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)]:
10
+ - @mastra/core@1.15.0-alpha.0
11
+ - @mastra/schema-compat@1.2.6-alpha.0
12
+ - @mastra/mcp@1.3.1-alpha.0
13
+ - @mastra/memory@1.8.4-alpha.0
14
+
3
15
  ## 0.7.6
4
16
 
5
17
  ### 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
- storedConfig = await adapter.getByIdResolved(agent.id, { status: "draft" });
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): Promise<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): Promise<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
- storedConfig = await adapter.getByIdResolved(agent.id, { status: "draft" });
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.6",
3
+ "version": "0.7.7-alpha.0",
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.8.3",
69
- "@mastra/schema-compat": "1.2.5"
68
+ "@mastra/memory": "1.8.4-alpha.0",
69
+ "@mastra/schema-compat": "1.2.6-alpha.0"
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/hono": "1.2.5",
81
+ "@mastra/core": "1.15.0-alpha.0",
82
+ "@mastra/hono": "1.2.6-alpha.0",
82
83
  "@mastra/libsql": "1.7.1",
83
- "@mastra/mcp": "1.3.0",
84
- "@mastra/core": "1.14.0"
84
+ "@mastra/mcp": "1.3.1-alpha.0"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "@mastra/core": ">=1.7.1-0 <2.0.0-0",