@mastra/editor 0.17.1-alpha.6 → 0.17.1-alpha.7

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.
@@ -3,7 +3,7 @@ name: mastra-editor
3
3
  description: Documentation for @mastra/editor. Use when working with @mastra/editor APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/editor"
6
- version: "0.17.1-alpha.6"
6
+ version: "0.17.1-alpha.7"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.17.1-alpha.6",
2
+ "version": "0.17.1-alpha.7",
3
3
  "package": "@mastra/editor",
4
4
  "exports": {
5
5
  "CrudEditorNamespace": {
package/dist/index.cjs CHANGED
@@ -1317,9 +1317,12 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
1317
1317
  ...skillsFormat && { skillsFormat },
1318
1318
  ...durable !== void 0 && { durable }
1319
1319
  });
1320
- if (!this.getCodeDefinedAgent(storedAgent.id) && this.mastra?.listAgents()[storedAgent.id]?.source !== "stored") {
1321
- this.mastra?.addAgent(agent, storedAgent.id, { source: "stored" });
1322
- this._registeredStoredAgentIds.add(storedAgent.id);
1320
+ if (!this.getCodeDefinedAgent(storedAgent.id)) {
1321
+ agent.source = "stored";
1322
+ if (this.mastra?.listAgents()[storedAgent.id]?.source !== "stored") {
1323
+ this.mastra?.addAgent(agent, storedAgent.id, { source: "stored" });
1324
+ this._registeredStoredAgentIds.add(storedAgent.id);
1325
+ }
1323
1326
  }
1324
1327
  this.logger?.debug(`[createAgentFromStoredConfig] Successfully created agent "${storedAgent.id}"`);
1325
1328
  return agent;
@@ -1370,14 +1373,11 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
1370
1373
  return async (args) => wrap(envelope, await stored(args));
1371
1374
  }
1372
1375
  const getOriginal = agent.getInstructions.bind(agent);
1373
- return async ({ requestContext, mastra }) => {
1374
- const text = typeof stored === "string" ? stored : await stored({
1375
- requestContext,
1376
- mastra
1377
- });
1376
+ return async (args) => {
1377
+ const text = typeof stored === "string" ? stored : await stored(args);
1378
1378
  let original;
1379
1379
  try {
1380
- original = await getOriginal({ requestContext });
1380
+ original = await getOriginal({ requestContext: args.requestContext });
1381
1381
  } catch {
1382
1382
  return text;
1383
1383
  }