@mastra/editor 0.2.0-alpha.0 → 0.2.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,61 @@
1
1
  # @mastra/editor
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Created @mastra/editor package for managing and resolving stored agent configurations ([#12631](https://github.com/mastra-ai/mastra/pull/12631))
8
+
9
+ This major addition introduces the editor package, which provides a complete solution for storing, versioning, and instantiating agent configurations from a database. The editor seamlessly integrates with Mastra's storage layer to enable dynamic agent management.
10
+
11
+ **Key Features:**
12
+ - **Agent Storage & Retrieval**: Store complete agent configurations including instructions, model settings, tools, workflows, nested agents, scorers, processors, and memory configuration
13
+ - **Version Management**: Create and manage multiple versions of agents, with support for activating specific versions
14
+ - **Dependency Resolution**: Automatically resolves and instantiates all agent dependencies (tools, workflows, sub-agents, etc.) from the Mastra registry
15
+ - **Caching**: Built-in caching for improved performance when repeatedly accessing stored agents
16
+ - **Type Safety**: Full TypeScript support with proper typing for stored configurations
17
+
18
+ **Usage Example:**
19
+
20
+ ```typescript
21
+ import { MastraEditor } from '@mastra/editor';
22
+ import { Mastra } from '@mastra/core';
23
+
24
+ // Initialize editor with Mastra
25
+ const mastra = new Mastra({
26
+ /* config */
27
+ editor: new MastraEditor(),
28
+ });
29
+
30
+ // Store an agent configuration
31
+ const agentId = await mastra.storage.stores?.agents?.createAgent({
32
+ name: 'customer-support',
33
+ instructions: 'Help customers with inquiries',
34
+ model: { provider: 'openai', name: 'gpt-4' },
35
+ tools: ['search-kb', 'create-ticket'],
36
+ workflows: ['escalation-flow'],
37
+ memory: { vector: 'pinecone-db' },
38
+ });
39
+
40
+ // Retrieve and use the stored agent
41
+ const agent = await mastra.getEditor()?.getStoredAgentById(agentId);
42
+ const response = await agent?.generate('How do I reset my password?');
43
+
44
+ // List all stored agents
45
+ const agents = await mastra.getEditor()?.listStoredAgents({ pageSize: 10 });
46
+ ```
47
+
48
+ **Storage Improvements:**
49
+ - Fixed JSONB handling in LibSQL, PostgreSQL, and MongoDB adapters
50
+ - Improved agent resolution queries to properly merge version data
51
+ - Enhanced type safety for serialized configurations
52
+
53
+ ### Patch Changes
54
+
55
+ - Updated dependencies [[`e6fc281`](https://github.com/mastra-ai/mastra/commit/e6fc281896a3584e9e06465b356a44fe7faade65), [`97be6c8`](https://github.com/mastra-ai/mastra/commit/97be6c8963130fca8a664fcf99d7b3a38e463595), [`2770921`](https://github.com/mastra-ai/mastra/commit/2770921eec4d55a36b278d15c3a83f694e462ee5), [`b1695db`](https://github.com/mastra-ai/mastra/commit/b1695db2d7be0c329d499619c7881899649188d0), [`5fe1fe0`](https://github.com/mastra-ai/mastra/commit/5fe1fe0109faf2c87db34b725d8a4571a594f80e), [`4133d48`](https://github.com/mastra-ai/mastra/commit/4133d48eaa354cdb45920dc6265732ffbc96788d), [`5dd01cc`](https://github.com/mastra-ai/mastra/commit/5dd01cce68d61874aa3ecbd91ee17884cfd5aca2), [`13e0a2a`](https://github.com/mastra-ai/mastra/commit/13e0a2a2bcec01ff4d701274b3727d5e907a6a01), [`f6673b8`](https://github.com/mastra-ai/mastra/commit/f6673b893b65b7d273ad25ead42e990704cc1e17), [`cd6be8a`](https://github.com/mastra-ai/mastra/commit/cd6be8ad32741cd41cabf508355bb31b71e8a5bd), [`9eb4e8e`](https://github.com/mastra-ai/mastra/commit/9eb4e8e39efbdcfff7a40ff2ce07ce2714c65fa8), [`c987384`](https://github.com/mastra-ai/mastra/commit/c987384d6c8ca844a9701d7778f09f5a88da7f9f), [`cb8cc12`](https://github.com/mastra-ai/mastra/commit/cb8cc12bfadd526aa95a01125076f1da44e4afa7), [`aa37c84`](https://github.com/mastra-ai/mastra/commit/aa37c84d29b7db68c72517337932ef486c316275), [`62f5d50`](https://github.com/mastra-ai/mastra/commit/62f5d5043debbba497dacb7ab008fe86b38b8de3), [`47eba72`](https://github.com/mastra-ai/mastra/commit/47eba72f0397d0d14fbe324b97940c3d55e5a525)]:
56
+ - @mastra/core@1.2.0
57
+ - @mastra/memory@1.1.0
58
+
3
59
  ## 0.2.0-alpha.0
4
60
 
5
61
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/editor",
3
- "version": "0.2.0-alpha.0",
3
+ "version": "0.2.0",
4
4
  "description": "Mastra Editor for agent management and instantiation",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -20,18 +20,18 @@
20
20
  "url": "https://github.com/mastra-ai/mastra/issues"
21
21
  },
22
22
  "dependencies": {
23
- "@mastra/memory": "1.1.0-alpha.1"
23
+ "@mastra/memory": "1.1.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "tsup": "^8.0.2",
27
27
  "typescript": "^5.9.3",
28
28
  "vitest": "4.0.16",
29
29
  "zod": "^3.25.76",
30
- "@internal/ai-sdk-v4": "0.0.3",
31
- "@internal/ai-sdk-v5": "0.0.3",
32
- "@internal/ai-v6": "0.0.3",
33
- "@mastra/core": "1.2.0-alpha.1",
34
- "@mastra/libsql": "1.2.0-alpha.0"
30
+ "@internal/ai-sdk-v4": "0.0.4",
31
+ "@internal/ai-v6": "0.0.4",
32
+ "@mastra/core": "1.2.0",
33
+ "@internal/ai-sdk-v5": "0.0.4",
34
+ "@mastra/libsql": "1.2.0"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@mastra/core": ">=1.0.0-0 <2.0.0-0",