@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.
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
package/dist/docs/SKILL.md
CHANGED
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)
|
|
1321
|
-
|
|
1322
|
-
this.
|
|
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 (
|
|
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
|
}
|