@mastra/editor 0.7.0 → 0.7.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/CHANGELOG.md +12 -0
- package/dist/index.cjs +6 -3
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -3
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @mastra/editor
|
|
2
2
|
|
|
3
|
+
## 0.7.1-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- dependencies updates: ([#14046](https://github.com/mastra-ai/mastra/pull/14046))
|
|
8
|
+
- Updated dependency [`@composio/core@^0.6.4` ↗︎](https://www.npmjs.com/package/@composio/core/v/0.6.4) (from `^0.6.3`, in `dependencies`)
|
|
9
|
+
- Updated dependencies [[`4f71b43`](https://github.com/mastra-ai/mastra/commit/4f71b436a4a6b8839842d8da47b57b84509af56c), [`a070277`](https://github.com/mastra-ai/mastra/commit/a07027766ce195ba74d0783116d894cbab25d44c), [`b628b91`](https://github.com/mastra-ai/mastra/commit/b628b9128b372c0f54214d902b07279f03443900), [`332c014`](https://github.com/mastra-ai/mastra/commit/332c014e076b81edf7fe45b58205882726415e90), [`6b63153`](https://github.com/mastra-ai/mastra/commit/6b63153878ea841c0f4ce632ba66bb33e57e9c1b), [`4246e34`](https://github.com/mastra-ai/mastra/commit/4246e34cec9c26636d0965942268e6d07c346671), [`b8837ee`](https://github.com/mastra-ai/mastra/commit/b8837ee77e2e84197609762bfabd8b3da326d30c), [`fb58ce1`](https://github.com/mastra-ai/mastra/commit/fb58ce1de85d57f142005c4b3b7559f909167a3f), [`5d950f7`](https://github.com/mastra-ai/mastra/commit/5d950f7bf426a215a1808f0abef7de5c8336ba1c), [`28c85b1`](https://github.com/mastra-ai/mastra/commit/28c85b184fc32b40f7f160483c982da6d388ecbd), [`e9a08fb`](https://github.com/mastra-ai/mastra/commit/e9a08fbef1ada7e50e961e2f54f55e8c10b4a45c), [`57c7391`](https://github.com/mastra-ai/mastra/commit/57c739108b9a6c9160352f0468dfe0428c03a234), [`18d91c3`](https://github.com/mastra-ai/mastra/commit/18d91c3b6e905cfd3ba50e7c7dc81164b6aa69ad), [`631ffd8`](https://github.com/mastra-ai/mastra/commit/631ffd82fed108648b448b28e6a90e38c5f53bf5), [`aae2295`](https://github.com/mastra-ai/mastra/commit/aae2295838a2d329ad6640829e87934790ffe5b8), [`aa61f29`](https://github.com/mastra-ai/mastra/commit/aa61f29ff8095ce46a4ae16e46c4d8c79b2b685b), [`7ff3714`](https://github.com/mastra-ai/mastra/commit/7ff37148515439bb3be009a60e02c3e363299760), [`41d79a1`](https://github.com/mastra-ai/mastra/commit/41d79a14bd8cb6de1e2565fd0a04786bae2f211b), [`e673376`](https://github.com/mastra-ai/mastra/commit/e6733763ad1321aa7e5ae15096b9c2104f93b1f3), [`b2204c9`](https://github.com/mastra-ai/mastra/commit/b2204c98a42848bbfb6f0440f005dc2b6354f1cd), [`a1bf1e3`](https://github.com/mastra-ai/mastra/commit/a1bf1e385ed4c0ef6f11b56c5887442970d127f2), [`b6f647a`](https://github.com/mastra-ai/mastra/commit/b6f647ae2388e091f366581595feb957e37d5b40), [`0c57b8b`](https://github.com/mastra-ai/mastra/commit/0c57b8b0a69a97b5a4ae3f79be6c610f29f3cf7b), [`b081f27`](https://github.com/mastra-ai/mastra/commit/b081f272cf411716e1d6bd72ceac4bcee2657b19), [`682b7f7`](https://github.com/mastra-ai/mastra/commit/682b7f773b7940687ef22569e720fd4bc4fdb8fe), [`0c09eac`](https://github.com/mastra-ai/mastra/commit/0c09eacb1926f64cfdc9ae5c6d63385cf8c9f72c), [`6b9b93d`](https://github.com/mastra-ai/mastra/commit/6b9b93d6f459d1ba6e36f163abf62a085ddb3d64), [`31b6067`](https://github.com/mastra-ai/mastra/commit/31b6067d0cc3ab10e1b29c36147f3b5266bc714a), [`797ac42`](https://github.com/mastra-ai/mastra/commit/797ac4276de231ad2d694d9aeca75980f6cd0419), [`aae2295`](https://github.com/mastra-ai/mastra/commit/aae2295838a2d329ad6640829e87934790ffe5b8), [`0bc289e`](https://github.com/mastra-ai/mastra/commit/0bc289e2d476bf46c5b91c21969e8d0c6864691c), [`9b75a06`](https://github.com/mastra-ai/mastra/commit/9b75a06e53ebb0b950ba7c1e83a0142047185f46), [`4c3a1b1`](https://github.com/mastra-ai/mastra/commit/4c3a1b122ea083e003d71092f30f3b31680b01c0), [`85cc3b3`](https://github.com/mastra-ai/mastra/commit/85cc3b3b6f32ae4b083c26498f50d5b250ba944b), [`3ebdadf`](https://github.com/mastra-ai/mastra/commit/3ebdadfe517d16f29464f35baba8356771160369), [`d567299`](https://github.com/mastra-ai/mastra/commit/d567299cf81e02bd9d5221d4bc05967d6c224161), [`97ea28c`](https://github.com/mastra-ai/mastra/commit/97ea28c746e9e4147d56047bbb1c4a92417a3fec), [`d567299`](https://github.com/mastra-ai/mastra/commit/d567299cf81e02bd9d5221d4bc05967d6c224161), [`716ffe6`](https://github.com/mastra-ai/mastra/commit/716ffe68bed81f7c2690bc8581b9e140f7bf1c3d), [`8296332`](https://github.com/mastra-ai/mastra/commit/8296332de21c16e3dfc3d0b2d615720a6dc88f2f), [`4df2116`](https://github.com/mastra-ai/mastra/commit/4df211619dd922c047d396ca41cd7027c8c4c8e7), [`2219c1a`](https://github.com/mastra-ai/mastra/commit/2219c1acbd21da116da877f0036ffb985a9dd5a3), [`17c4145`](https://github.com/mastra-ai/mastra/commit/17c4145166099354545582335b5252bdfdfd908b)]:
|
|
10
|
+
- @mastra/core@1.11.0-alpha.0
|
|
11
|
+
- @mastra/schema-compat@1.2.0-alpha.0
|
|
12
|
+
- @mastra/memory@1.6.2-alpha.0
|
|
13
|
+
- @mastra/mcp@1.1.0
|
|
14
|
+
|
|
3
15
|
## 0.7.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -291,7 +291,10 @@ async function resolveInstructionBlocks(blocks, context, deps) {
|
|
|
291
291
|
);
|
|
292
292
|
const resolvedBlocksMap = /* @__PURE__ */ new Map();
|
|
293
293
|
if (blockIds.length > 0) {
|
|
294
|
-
const
|
|
294
|
+
const resolveOptions = deps.includeDrafts ? { status: "draft" } : void 0;
|
|
295
|
+
const fetchResults = await Promise.all(
|
|
296
|
+
blockIds.map((id) => deps.promptBlocksStorage.getByIdResolved(id, resolveOptions))
|
|
297
|
+
);
|
|
295
298
|
for (let i = 0; i < blockIds.length; i++) {
|
|
296
299
|
const result = fetchResults[i];
|
|
297
300
|
if (result) {
|
|
@@ -324,7 +327,7 @@ async function resolveInstructionBlocks(blocks, context, deps) {
|
|
|
324
327
|
if (!resolved) {
|
|
325
328
|
continue;
|
|
326
329
|
}
|
|
327
|
-
if (resolved.status !== "published") {
|
|
330
|
+
if (!deps.includeDrafts && resolved.status !== "published") {
|
|
328
331
|
continue;
|
|
329
332
|
}
|
|
330
333
|
if (resolved.rules) {
|
|
@@ -1616,7 +1619,7 @@ var EditorPromptNamespace = class extends CrudEditorNamespace {
|
|
|
1616
1619
|
if (!storage) throw new Error("Storage is not configured");
|
|
1617
1620
|
const store = await storage.getStore("promptBlocks");
|
|
1618
1621
|
if (!store) throw new Error("Prompt blocks storage domain is not available");
|
|
1619
|
-
return resolveInstructionBlocks(blocks, context, { promptBlocksStorage: store });
|
|
1622
|
+
return resolveInstructionBlocks(blocks, context, { promptBlocksStorage: store, includeDrafts: true });
|
|
1620
1623
|
}
|
|
1621
1624
|
};
|
|
1622
1625
|
|
package/dist/index.d.cts
CHANGED
|
@@ -358,6 +358,8 @@ declare function evaluateRuleGroup(ruleGroup: RuleGroup, context: Record<string,
|
|
|
358
358
|
|
|
359
359
|
interface InstructionBuilderDeps {
|
|
360
360
|
promptBlocksStorage: PromptBlocksStorage;
|
|
361
|
+
/** When true, include draft (unpublished) prompt block refs. Used for preview mode. */
|
|
362
|
+
includeDrafts?: boolean;
|
|
361
363
|
}
|
|
362
364
|
/**
|
|
363
365
|
* Resolves an array of instruction blocks into a final instruction string.
|
package/dist/index.d.ts
CHANGED
|
@@ -358,6 +358,8 @@ declare function evaluateRuleGroup(ruleGroup: RuleGroup, context: Record<string,
|
|
|
358
358
|
|
|
359
359
|
interface InstructionBuilderDeps {
|
|
360
360
|
promptBlocksStorage: PromptBlocksStorage;
|
|
361
|
+
/** When true, include draft (unpublished) prompt block refs. Used for preview mode. */
|
|
362
|
+
includeDrafts?: boolean;
|
|
361
363
|
}
|
|
362
364
|
/**
|
|
363
365
|
* Resolves an array of instruction blocks into a final instruction string.
|
package/dist/index.js
CHANGED
|
@@ -243,7 +243,10 @@ async function resolveInstructionBlocks(blocks, context, deps) {
|
|
|
243
243
|
);
|
|
244
244
|
const resolvedBlocksMap = /* @__PURE__ */ new Map();
|
|
245
245
|
if (blockIds.length > 0) {
|
|
246
|
-
const
|
|
246
|
+
const resolveOptions = deps.includeDrafts ? { status: "draft" } : void 0;
|
|
247
|
+
const fetchResults = await Promise.all(
|
|
248
|
+
blockIds.map((id) => deps.promptBlocksStorage.getByIdResolved(id, resolveOptions))
|
|
249
|
+
);
|
|
247
250
|
for (let i = 0; i < blockIds.length; i++) {
|
|
248
251
|
const result = fetchResults[i];
|
|
249
252
|
if (result) {
|
|
@@ -276,7 +279,7 @@ async function resolveInstructionBlocks(blocks, context, deps) {
|
|
|
276
279
|
if (!resolved) {
|
|
277
280
|
continue;
|
|
278
281
|
}
|
|
279
|
-
if (resolved.status !== "published") {
|
|
282
|
+
if (!deps.includeDrafts && resolved.status !== "published") {
|
|
280
283
|
continue;
|
|
281
284
|
}
|
|
282
285
|
if (resolved.rules) {
|
|
@@ -1568,7 +1571,7 @@ var EditorPromptNamespace = class extends CrudEditorNamespace {
|
|
|
1568
1571
|
if (!storage) throw new Error("Storage is not configured");
|
|
1569
1572
|
const store = await storage.getStore("promptBlocks");
|
|
1570
1573
|
if (!store) throw new Error("Prompt blocks storage domain is not available");
|
|
1571
|
-
return resolveInstructionBlocks(blocks, context, { promptBlocksStorage: store });
|
|
1574
|
+
return resolveInstructionBlocks(blocks, context, { promptBlocksStorage: store, includeDrafts: true });
|
|
1572
1575
|
}
|
|
1573
1576
|
};
|
|
1574
1577
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/editor",
|
|
3
|
-
"version": "0.7.0",
|
|
3
|
+
"version": "0.7.1-alpha.0",
|
|
4
4
|
"description": "Mastra Editor for agent management and instantiation",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -63,24 +63,24 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@arcadeai/arcadejs": "^2.2.0",
|
|
66
|
-
"@composio/core": "^0.6.
|
|
66
|
+
"@composio/core": "^0.6.4",
|
|
67
67
|
"@composio/mastra": "^0.6.3",
|
|
68
|
-
"@mastra/memory": "1.6.
|
|
69
|
-
"@mastra/schema-compat": "1.
|
|
68
|
+
"@mastra/memory": "1.6.2-alpha.0",
|
|
69
|
+
"@mastra/schema-compat": "1.2.0-alpha.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@hono/node-server": "^1.19.9",
|
|
73
73
|
"hono": "^4.7.10",
|
|
74
|
-
"tsup": "^8.
|
|
74
|
+
"tsup": "^8.5.1",
|
|
75
75
|
"typescript": "^5.9.3",
|
|
76
76
|
"vitest": "4.0.18",
|
|
77
77
|
"zod": "^3.25.76",
|
|
78
|
-
"@internal/ai-sdk-v4": "0.0.13",
|
|
79
78
|
"@internal/ai-sdk-v5": "0.0.13",
|
|
80
|
-
"@
|
|
79
|
+
"@internal/ai-sdk-v4": "0.0.13",
|
|
81
80
|
"@internal/ai-v6": "0.0.13",
|
|
82
|
-
"@mastra/hono": "1.
|
|
83
|
-
"@mastra/libsql": "1.
|
|
81
|
+
"@mastra/hono": "1.2.0-alpha.0",
|
|
82
|
+
"@mastra/libsql": "1.7.0-alpha.0",
|
|
83
|
+
"@mastra/core": "1.11.0-alpha.0",
|
|
84
84
|
"@mastra/mcp": "1.1.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|