@mastra/deployer 0.22.2-alpha.0 → 0.23.0-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 +26 -0
- package/dist/server/handlers/routes/agents/handlers.d.ts.map +1 -1
- package/dist/server/handlers/routes/agents/router.d.ts.map +1 -1
- package/dist/server/index.cjs +5 -7
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +6 -8
- package/dist/server/index.js.map +1 -1
- package/package.json +14 -7
package/dist/server/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import { getAgentCardByIdHandler as getAgentCardByIdHandler$1, getAgentExecution
|
|
|
22
22
|
import { stream } from 'hono/streaming';
|
|
23
23
|
import { bodyLimit } from 'hono/body-limit';
|
|
24
24
|
import { getAgentBuilderActionsHandler as getAgentBuilderActionsHandler$1, getAgentBuilderActionByIdHandler as getAgentBuilderActionByIdHandler$1, getAgentBuilderActionRunsHandler as getAgentBuilderActionRunsHandler$1, getAgentBuilderActionRunExecutionResultHandler as getAgentBuilderActionRunExecutionResultHandler$1, getAgentBuilderActionRunByIdHandler as getAgentBuilderActionRunByIdHandler$1, resumeAgentBuilderActionHandler as resumeAgentBuilderActionHandler$1, resumeAsyncAgentBuilderActionHandler as resumeAsyncAgentBuilderActionHandler$1, streamAgentBuilderActionHandler as streamAgentBuilderActionHandler$1, streamVNextAgentBuilderActionHandler as streamVNextAgentBuilderActionHandler$1, createAgentBuilderActionRunHandler as createAgentBuilderActionRunHandler$1, startAsyncAgentBuilderActionHandler as startAsyncAgentBuilderActionHandler$1, startAgentBuilderActionRunHandler as startAgentBuilderActionRunHandler$1, watchAgentBuilderActionHandler as watchAgentBuilderActionHandler$1, cancelAgentBuilderActionRunHandler as cancelAgentBuilderActionRunHandler$1, sendAgentBuilderActionRunEventHandler as sendAgentBuilderActionRunEventHandler$1 } from '@mastra/server/handlers/agent-builder';
|
|
25
|
-
import { MastraError, ErrorCategory, ErrorDomain } from '@mastra/core/error';
|
|
25
|
+
import { MastraError, ErrorCategory, ErrorDomain, getErrorFromUnknown } from '@mastra/core/error';
|
|
26
26
|
import { getProviderConfig, PROVIDER_REGISTRY } from '@mastra/core/llm';
|
|
27
27
|
import { ChunkFrom } from '@mastra/core/stream';
|
|
28
28
|
import { getAgentsHandler as getAgentsHandler$1, getAgentByIdHandler as getAgentByIdHandler$1, getEvalsByAgentIdHandler as getEvalsByAgentIdHandler$1, getLiveEvalsByAgentIdHandler as getLiveEvalsByAgentIdHandler$1, generateLegacyHandler as generateLegacyHandler$1, generateHandler as generateHandler$1, getAgentFromSystem, streamNetworkHandler as streamNetworkHandler$1, streamGenerateHandler as streamGenerateHandler$1, streamGenerateLegacyHandler as streamGenerateLegacyHandler$1, streamUIMessageHandler as streamUIMessageHandler$1, updateAgentModelHandler as updateAgentModelHandler$1, reorderAgentModelListHandler as reorderAgentModelListHandler$1, updateAgentModelInModelListHandler as updateAgentModelInModelListHandler$1, approveToolCallHandler as approveToolCallHandler$1, declineToolCallHandler as declineToolCallHandler$1 } from '@mastra/server/handlers/agents';
|
|
@@ -2527,11 +2527,7 @@ async function streamGenerateHandler(c2) {
|
|
|
2527
2527
|
from: ChunkFrom.AGENT,
|
|
2528
2528
|
runId: body.runId || "unknown",
|
|
2529
2529
|
payload: {
|
|
2530
|
-
error: err
|
|
2531
|
-
message: err.message,
|
|
2532
|
-
name: err.name,
|
|
2533
|
-
stack: err.stack
|
|
2534
|
-
} : String(err)
|
|
2530
|
+
error: getErrorFromUnknown(err, { fallbackMessage: "Unknown error in stream generate" })
|
|
2535
2531
|
}
|
|
2536
2532
|
};
|
|
2537
2533
|
await stream6.write(`data: ${JSON.stringify(errorChunk)}
|
|
@@ -4452,10 +4448,11 @@ function agentsRouter(bodyLimitOptions) {
|
|
|
4452
4448
|
type: "object",
|
|
4453
4449
|
properties: {
|
|
4454
4450
|
runId: { type: "string", description: "The run ID for the execution" },
|
|
4451
|
+
toolCallId: { type: "string", description: "The tool call ID for the execution" },
|
|
4455
4452
|
runtimeContext: { type: "object", description: "Runtime context for the execution" },
|
|
4456
4453
|
format: { type: "string", enum: ["aisdk", "mastra"], description: "Output format" }
|
|
4457
4454
|
},
|
|
4458
|
-
required: ["runId"]
|
|
4455
|
+
required: ["runId", "toolCallId"]
|
|
4459
4456
|
}
|
|
4460
4457
|
}
|
|
4461
4458
|
}
|
|
@@ -4493,10 +4490,11 @@ function agentsRouter(bodyLimitOptions) {
|
|
|
4493
4490
|
type: "object",
|
|
4494
4491
|
properties: {
|
|
4495
4492
|
runId: { type: "string", description: "The run ID for the execution" },
|
|
4493
|
+
toolCallId: { type: "string", description: "The tool call ID for the execution" },
|
|
4496
4494
|
runtimeContext: { type: "object", description: "Runtime context for the execution" },
|
|
4497
4495
|
format: { type: "string", enum: ["aisdk", "mastra"], description: "Output format" }
|
|
4498
4496
|
},
|
|
4499
|
-
required: ["runId"]
|
|
4497
|
+
required: ["runId", "toolCallId"]
|
|
4500
4498
|
}
|
|
4501
4499
|
}
|
|
4502
4500
|
}
|