@mastra/server 1.72.0-alpha.2 → 1.72.0-alpha.3
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/{dist-ABdCIqbD.js → dist-Bo9o3JNW.js} +745 -366
- package/dist/dist-Bo9o3JNW.js.map +1 -0
- package/dist/{dist-Cfr6t0cK.cjs → dist-_n0Mp6PP.cjs} +745 -366
- package/dist/dist-_n0Mp6PP.cjs.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/server/handlers/agent-builder.cjs +1 -1
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/agents.cjs +5 -2
- package/dist/server/handlers/agents.cjs.map +1 -1
- package/dist/server/handlers/agents.d.ts.map +1 -1
- package/dist/server/handlers/agents.js +5 -2
- package/dist/server/handlers/agents.js.map +1 -1
- package/package.json +5 -5
- package/dist/dist-ABdCIqbD.js.map +0 -1
- package/dist/dist-Cfr6t0cK.cjs.map +0 -1
package/dist/docs/SKILL.md
CHANGED
|
@@ -30,7 +30,7 @@ var agent_builder_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll
|
|
|
30
30
|
});
|
|
31
31
|
let agentBuilderWorkflowsPromise;
|
|
32
32
|
async function loadAgentBuilderWorkflows() {
|
|
33
|
-
agentBuilderWorkflowsPromise ??= Promise.resolve().then(() => require("../../dist-
|
|
33
|
+
agentBuilderWorkflowsPromise ??= Promise.resolve().then(() => require("../../dist-_n0Mp6PP.cjs")).then((mod) => mod.agentBuilderWorkflows);
|
|
34
34
|
return agentBuilderWorkflowsPromise;
|
|
35
35
|
}
|
|
36
36
|
async function registerAgentBuilderWorkflows(mastra) {
|
|
@@ -29,7 +29,7 @@ var agent_builder_exports = /* @__PURE__ */ __exportAll({
|
|
|
29
29
|
});
|
|
30
30
|
let agentBuilderWorkflowsPromise;
|
|
31
31
|
async function loadAgentBuilderWorkflows() {
|
|
32
|
-
agentBuilderWorkflowsPromise ??= import("../../dist-
|
|
32
|
+
agentBuilderWorkflowsPromise ??= import("../../dist-Bo9o3JNW.js").then((mod) => mod.agentBuilderWorkflows);
|
|
33
33
|
return agentBuilderWorkflowsPromise;
|
|
34
34
|
}
|
|
35
35
|
async function registerAgentBuilderWorkflows(mastra) {
|
|
@@ -125,10 +125,13 @@ function hasSuspendedToolCall(snapshot, toolCallId) {
|
|
|
125
125
|
};
|
|
126
126
|
return visit(snapshot.context);
|
|
127
127
|
}
|
|
128
|
+
function getDurableLoopWorkflowName(agent) {
|
|
129
|
+
return agent.durableLoopWorkflowName ?? _mastra_core_agent_durable.DurableStepIds.AGENTIC_LOOP;
|
|
130
|
+
}
|
|
128
131
|
async function validateDurableToolCallAccess({ mastra, agent, runId, toolCallId, requestContext }) {
|
|
129
132
|
if (!(0, _mastra_core_agent.isDurableAgentLike)(agent)) return;
|
|
130
133
|
const workflowRun = await (await mastra.getStorage()?.getStore("workflows"))?.getWorkflowRunById({
|
|
131
|
-
workflowName:
|
|
134
|
+
workflowName: getDurableLoopWorkflowName(agent),
|
|
132
135
|
runId
|
|
133
136
|
});
|
|
134
137
|
if (!workflowRun) throw new require_http_exception.HTTPException(403, { message: "Access denied: durable run belongs to a different resource" });
|
|
@@ -2068,7 +2071,7 @@ const RECOVER_ROUTE = require_route_builder.createRoute({
|
|
|
2068
2071
|
});
|
|
2069
2072
|
if (!(0, _mastra_core_agent.isDurableAgentLike)(agent)) throw new require_http_exception.HTTPException(400, { message: "Agent does not support recover. Only durable agents (createDurableAgent) can recover runs." });
|
|
2070
2073
|
await require_utils$1.validateRunOwnership(await (await mastra.getStorage()?.getStore("workflows"))?.getWorkflowRunById({
|
|
2071
|
-
workflowName:
|
|
2074
|
+
workflowName: getDurableLoopWorkflowName(agent),
|
|
2072
2075
|
runId
|
|
2073
2076
|
}), require_utils$1.getEffectiveResourceId(serverRequestContext, void 0));
|
|
2074
2077
|
return (await agent.recover(runId, { abortSignal })).fullStream;
|