@mastra/server 1.77.0-alpha.1 → 1.77.0-alpha.2
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-B6B4Cxda.js → dist-C6Y74AMV.js} +8 -8
- package/dist/dist-C6Y74AMV.js.map +1 -0
- package/dist/{dist-BGfXR4Xj.cjs → dist-D0yst49-.cjs} +8 -8
- package/dist/dist-D0yst49-.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/agent-controller.cjs +5 -5
- package/dist/server/handlers/agent-controller.cjs.map +1 -1
- package/dist/server/handlers/agent-controller.d.ts +2 -0
- package/dist/server/handlers/agent-controller.d.ts.map +1 -1
- package/dist/server/handlers/agent-controller.js +5 -5
- package/dist/server/handlers/agent-controller.js.map +1 -1
- package/dist/server/handlers/workflows.cjs +8 -0
- package/dist/server/handlers/workflows.cjs.map +1 -1
- package/dist/server/handlers/workflows.d.ts +8 -0
- package/dist/server/handlers/workflows.d.ts.map +1 -1
- package/dist/server/handlers/workflows.js +8 -0
- package/dist/server/handlers/workflows.js.map +1 -1
- package/dist/server/server-adapter/routes/workflows.d.ts +2 -0
- package/dist/server/server-adapter/routes/workflows.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/dist-B6B4Cxda.js.map +0 -1
- package/dist/dist-BGfXR4Xj.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-D0yst49-.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-C6Y74AMV.js").then((mod) => mod.agentBuilderWorkflows);
|
|
33
33
|
return agentBuilderWorkflowsPromise;
|
|
34
34
|
}
|
|
35
35
|
async function registerAgentBuilderWorkflows(mastra) {
|
|
@@ -154,6 +154,7 @@ const toolApprovalBodySchema = zod_v4.z.object({
|
|
|
154
154
|
});
|
|
155
155
|
const toolSuspensionBodySchema = zod_v4.z.object({
|
|
156
156
|
toolCallId: zod_v4.z.string().min(1),
|
|
157
|
+
runId: zod_v4.z.string().min(1).optional(),
|
|
157
158
|
resumeData: zod_v4.z.unknown(),
|
|
158
159
|
requestContext: bodyRequestContextSchema
|
|
159
160
|
});
|
|
@@ -699,21 +700,20 @@ const AGENT_CONTROLLER_TOOL_SUSPENSION_ROUTE = require_route_builder.createRoute
|
|
|
699
700
|
tags: ["AgentController"],
|
|
700
701
|
requiresAuth: true,
|
|
701
702
|
requiresPermission: "agent-controller:execute",
|
|
702
|
-
handler: async ({ mastra, controllerId, resourceId, sessionScope, toolCallId, resumeData, requestContext }) => {
|
|
703
|
+
handler: async ({ mastra, controllerId, resourceId, sessionScope, toolCallId, runId, resumeData, requestContext }) => {
|
|
703
704
|
try {
|
|
704
705
|
const session = await getSession(getAgentControllerOrThrow(mastra, controllerId), resourceId, { scope: sessionScope }, requestContext);
|
|
705
|
-
const claim = session.claimToolSuspension(toolCallId);
|
|
706
|
+
const claim = session.claimToolSuspension(toolCallId, runId);
|
|
706
707
|
if (!claim.accepted) return {
|
|
707
708
|
ok: false,
|
|
708
709
|
reason: claim.reason
|
|
709
710
|
};
|
|
710
|
-
const claimedToolCallId = claim.toolCallId;
|
|
711
711
|
ackBackgroundSessionWork({
|
|
712
712
|
work: session.respondToToolSuspension({
|
|
713
|
-
|
|
713
|
+
address: claim.address,
|
|
714
714
|
resumeData,
|
|
715
715
|
requestContext
|
|
716
|
-
}).finally(() => session.releaseToolResponse(
|
|
716
|
+
}).finally(() => session.releaseToolResponse(claim.claimKey)),
|
|
717
717
|
session,
|
|
718
718
|
mastra,
|
|
719
719
|
operation: "respondToToolSuspension"
|