@mastra/server 0.19.1 → 0.20.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 +17 -0
- package/dist/{chunk-GIM2ZSPB.cjs → chunk-4HS3I2TI.cjs} +91 -12
- package/dist/chunk-4HS3I2TI.cjs.map +1 -0
- package/dist/{chunk-QGW2VHZU.js → chunk-AX5SCBJL.js} +91 -13
- package/dist/chunk-AX5SCBJL.js.map +1 -0
- package/dist/{chunk-2QPKCXLB.cjs → chunk-FYZHFAFB.cjs} +76 -36
- package/dist/chunk-FYZHFAFB.cjs.map +1 -0
- package/dist/{chunk-6QZD7S52.js → chunk-HRG5HN4U.js} +74 -34
- package/dist/chunk-HRG5HN4U.js.map +1 -0
- package/dist/{chunk-BNNUFPA7.cjs → chunk-JOXMWFM6.cjs} +33 -33
- package/dist/{chunk-BNNUFPA7.cjs.map → chunk-JOXMWFM6.cjs.map} +1 -1
- package/dist/{chunk-OZLRIVC4.cjs → chunk-LHGBI76Y.cjs} +19 -39
- package/dist/chunk-LHGBI76Y.cjs.map +1 -0
- package/dist/{chunk-JHH2BWAB.js → chunk-QDPOVUS4.js} +19 -19
- package/dist/{chunk-JHH2BWAB.js.map → chunk-QDPOVUS4.js.map} +1 -1
- package/dist/{chunk-SQY4T6EJ.js → chunk-SZUAJANR.js} +19 -39
- package/dist/chunk-SZUAJANR.js.map +1 -0
- package/dist/server/handlers/agent-builder.cjs +16 -16
- package/dist/server/handlers/agent-builder.d.ts.map +1 -1
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/agents.cjs +25 -25
- package/dist/server/handlers/agents.d.ts +24 -21
- package/dist/server/handlers/agents.d.ts.map +1 -1
- package/dist/server/handlers/agents.js +1 -1
- package/dist/server/handlers/memory.cjs +16 -16
- package/dist/server/handlers/memory.d.ts +14 -15
- package/dist/server/handlers/memory.d.ts.map +1 -1
- package/dist/server/handlers/memory.js +1 -1
- package/dist/server/handlers/workflows.cjs +22 -18
- package/dist/server/handlers/workflows.d.ts +2 -1
- package/dist/server/handlers/workflows.d.ts.map +1 -1
- package/dist/server/handlers/workflows.js +1 -1
- package/dist/server/handlers.cjs +13 -13
- package/dist/server/handlers.js +5 -5
- package/package.json +5 -5
- package/dist/chunk-2QPKCXLB.cjs.map +0 -1
- package/dist/chunk-6QZD7S52.js.map +0 -1
- package/dist/chunk-GIM2ZSPB.cjs.map +0 -1
- package/dist/chunk-OZLRIVC4.cjs.map +0 -1
- package/dist/chunk-QGW2VHZU.js.map +0 -1
- package/dist/chunk-SQY4T6EJ.js.map +0 -1
- package/dist/server/handlers/vNextNetwork.cjs +0 -220
- package/dist/server/handlers/vNextNetwork.cjs.map +0 -1
- package/dist/server/handlers/vNextNetwork.d.ts +0 -246
- package/dist/server/handlers/vNextNetwork.d.ts.map +0 -1
- package/dist/server/handlers/vNextNetwork.js +0 -213
- package/dist/server/handlers/vNextNetwork.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk4HS3I2TI_cjs = require('./chunk-4HS3I2TI.cjs');
|
|
4
4
|
var chunkFALVL2VV_cjs = require('./chunk-FALVL2VV.cjs');
|
|
5
5
|
var chunkHVBBFCDH_cjs = require('./chunk-HVBBFCDH.cjs');
|
|
6
6
|
var chunkPPYGWINI_cjs = require('./chunk-PPYGWINI.cjs');
|
|
@@ -15014,7 +15014,7 @@ ${config.instructions}` : "";
|
|
|
15014
15014
|
* Enhanced generate method with AgentBuilder-specific configuration
|
|
15015
15015
|
* Overrides the base Agent generate method to provide additional project context
|
|
15016
15016
|
*/
|
|
15017
|
-
|
|
15017
|
+
generateLegacy = async (messages, generateOptions = {}) => {
|
|
15018
15018
|
const { maxSteps, ...baseOptions } = generateOptions;
|
|
15019
15019
|
const originalInstructions = await this.getInstructions({ runtimeContext: generateOptions?.runtimeContext });
|
|
15020
15020
|
const additionalInstructions = baseOptions.instructions;
|
|
@@ -15037,13 +15037,13 @@ ${additionalInstructions}`;
|
|
|
15037
15037
|
this.logger.debug(`[AgentBuilder:${this.name}] Starting generation with enhanced context`, {
|
|
15038
15038
|
projectPath: this.builderConfig.projectPath
|
|
15039
15039
|
});
|
|
15040
|
-
return super.
|
|
15040
|
+
return super.generateLegacy(messages, enhancedOptions);
|
|
15041
15041
|
};
|
|
15042
15042
|
/**
|
|
15043
15043
|
* Enhanced stream method with AgentBuilder-specific configuration
|
|
15044
15044
|
* Overrides the base Agent stream method to provide additional project context
|
|
15045
15045
|
*/
|
|
15046
|
-
|
|
15046
|
+
streamLegacy = async (messages, streamOptions = {}) => {
|
|
15047
15047
|
const { maxSteps, ...baseOptions } = streamOptions;
|
|
15048
15048
|
const originalInstructions = await this.getInstructions({ runtimeContext: streamOptions?.runtimeContext });
|
|
15049
15049
|
const additionalInstructions = baseOptions.instructions;
|
|
@@ -15066,13 +15066,13 @@ ${additionalInstructions}`;
|
|
|
15066
15066
|
this.logger.debug(`[AgentBuilder:${this.name}] Starting streaming with enhanced context`, {
|
|
15067
15067
|
projectPath: this.builderConfig.projectPath
|
|
15068
15068
|
});
|
|
15069
|
-
return super.
|
|
15069
|
+
return super.streamLegacy(messages, enhancedOptions);
|
|
15070
15070
|
};
|
|
15071
15071
|
/**
|
|
15072
15072
|
* Enhanced stream method with AgentBuilder-specific configuration
|
|
15073
15073
|
* Overrides the base Agent stream method to provide additional project context
|
|
15074
15074
|
*/
|
|
15075
|
-
async
|
|
15075
|
+
async stream(messages, streamOptions) {
|
|
15076
15076
|
const { ...baseOptions } = streamOptions || {};
|
|
15077
15077
|
const originalInstructions = await this.getInstructions({ runtimeContext: streamOptions?.runtimeContext });
|
|
15078
15078
|
const additionalInstructions = baseOptions.instructions;
|
|
@@ -15094,9 +15094,9 @@ ${additionalInstructions}`;
|
|
|
15094
15094
|
this.logger.debug(`[AgentBuilder:${this.name}] Starting streaming with enhanced context`, {
|
|
15095
15095
|
projectPath: this.builderConfig.projectPath
|
|
15096
15096
|
});
|
|
15097
|
-
return super.
|
|
15097
|
+
return super.stream(messages, enhancedOptions);
|
|
15098
15098
|
}
|
|
15099
|
-
async
|
|
15099
|
+
async generate(messages, options) {
|
|
15100
15100
|
const { ...baseOptions } = options || {};
|
|
15101
15101
|
const originalInstructions = await this.getInstructions({ runtimeContext: options?.runtimeContext });
|
|
15102
15102
|
const additionalInstructions = baseOptions.instructions;
|
|
@@ -15118,7 +15118,7 @@ ${additionalInstructions}`;
|
|
|
15118
15118
|
this.logger.debug(`[AgentBuilder:${this.name}] Starting streaming with enhanced context`, {
|
|
15119
15119
|
projectPath: this.builderConfig.projectPath
|
|
15120
15120
|
});
|
|
15121
|
-
return super.
|
|
15121
|
+
return super.generate(messages, enhancedOptions);
|
|
15122
15122
|
}
|
|
15123
15123
|
};
|
|
15124
15124
|
var cloneTemplateStep = workflows.createStep({
|
|
@@ -15271,10 +15271,10 @@ Return the actual exported names of the units, as well as the file names.`,
|
|
|
15271
15271
|
networks: zod.z.array(zod.z.object({ name: zod.z.string(), file: zod.z.string() })).optional(),
|
|
15272
15272
|
other: zod.z.array(zod.z.object({ name: zod.z.string(), file: zod.z.string() })).optional()
|
|
15273
15273
|
});
|
|
15274
|
-
const result = isV2 ? await agent$1.
|
|
15274
|
+
const result = isV2 ? await agent$1.generate(prompt, {
|
|
15275
15275
|
output,
|
|
15276
15276
|
maxSteps: 100
|
|
15277
|
-
}) : await agent$1.
|
|
15277
|
+
}) : await agent$1.generateLegacy(prompt, {
|
|
15278
15278
|
experimental_output: output,
|
|
15279
15279
|
maxSteps: 100
|
|
15280
15280
|
});
|
|
@@ -16020,7 +16020,7 @@ For each task:
|
|
|
16020
16020
|
Start by listing your tasks and work through them systematically!
|
|
16021
16021
|
`;
|
|
16022
16022
|
const isV2 = model.specificationVersion === "v2";
|
|
16023
|
-
const result = isV2 ? await agentBuilder.
|
|
16023
|
+
const result = isV2 ? await agentBuilder.stream(prompt) : await agentBuilder.streamLegacy(prompt);
|
|
16024
16024
|
const actualResolutions = [];
|
|
16025
16025
|
for await (const chunk of result.fullStream) {
|
|
16026
16026
|
if (chunk.type === "step-finish" || chunk.type === "step-start") {
|
|
@@ -16262,9 +16262,9 @@ Start by running validateCode with all validation types to get a complete pictur
|
|
|
16262
16262
|
Previous iterations may have fixed some issues, so start by re-running validateCode to see the current state, then fix any remaining issues.`;
|
|
16263
16263
|
const isV2 = model.specificationVersion === "v2";
|
|
16264
16264
|
const output = zod.z.object({ success: zod.z.boolean() });
|
|
16265
|
-
const result = isV2 ? await validationAgent.
|
|
16265
|
+
const result = isV2 ? await validationAgent.stream(iterationPrompt, {
|
|
16266
16266
|
output
|
|
16267
|
-
}) : await validationAgent.
|
|
16267
|
+
}) : await validationAgent.streamLegacy(iterationPrompt, {
|
|
16268
16268
|
experimental_output: output
|
|
16269
16269
|
});
|
|
16270
16270
|
let iterationErrors = 0;
|
|
@@ -16874,7 +16874,7 @@ var planningIterationStep = workflows.createStep({
|
|
|
16874
16874
|
projectStructure,
|
|
16875
16875
|
research
|
|
16876
16876
|
});
|
|
16877
|
-
const result = await planningAgent.
|
|
16877
|
+
const result = await planningAgent.generate(planningPrompt, {
|
|
16878
16878
|
output: PlanningAgentOutputSchema
|
|
16879
16879
|
// maxSteps: 15,
|
|
16880
16880
|
});
|
|
@@ -17580,7 +17580,7 @@ var workflowResearchStep = workflows.createStep({
|
|
|
17580
17580
|
dependencies: inputData.dependencies,
|
|
17581
17581
|
hasWorkflowsDir: inputData.structure.hasWorkflowsDir
|
|
17582
17582
|
});
|
|
17583
|
-
const result = await researchAgent.
|
|
17583
|
+
const result = await researchAgent.generate(researchPrompt, {
|
|
17584
17584
|
output: WorkflowResearchResultSchema
|
|
17585
17585
|
// stopWhen: stepCountIs(10),
|
|
17586
17586
|
});
|
|
@@ -17730,7 +17730,7 @@ ${additionalInstructions}`;
|
|
|
17730
17730
|
})}
|
|
17731
17731
|
|
|
17732
17732
|
${workflowBuilderPrompts.validation.instructions}`;
|
|
17733
|
-
const stream = await executionAgent.
|
|
17733
|
+
const stream = await executionAgent.stream(iterationPrompt, {
|
|
17734
17734
|
structuredOutput: {
|
|
17735
17735
|
schema: TaskExecutionIterationInputSchema(tasks.length),
|
|
17736
17736
|
model
|
|
@@ -17947,59 +17947,59 @@ var getAgentBuilderActionsHandler = createAgentBuilderWorkflowHandler(async () =
|
|
|
17947
17947
|
}
|
|
17948
17948
|
}, "Getting agent builder actions");
|
|
17949
17949
|
var getAgentBuilderActionByIdHandler = createAgentBuilderWorkflowHandler(
|
|
17950
|
-
|
|
17950
|
+
chunk4HS3I2TI_cjs.getWorkflowByIdHandler,
|
|
17951
17951
|
"Getting agent builder action by ID"
|
|
17952
17952
|
);
|
|
17953
17953
|
var getAgentBuilderActionRunByIdHandler = createAgentBuilderWorkflowHandler(
|
|
17954
|
-
|
|
17954
|
+
chunk4HS3I2TI_cjs.getWorkflowRunByIdHandler,
|
|
17955
17955
|
"Getting agent builder action run by ID"
|
|
17956
17956
|
);
|
|
17957
17957
|
var getAgentBuilderActionRunExecutionResultHandler = createAgentBuilderWorkflowHandler(
|
|
17958
|
-
|
|
17958
|
+
chunk4HS3I2TI_cjs.getWorkflowRunExecutionResultHandler,
|
|
17959
17959
|
"Getting agent builder action run execution result"
|
|
17960
17960
|
);
|
|
17961
17961
|
var createAgentBuilderActionRunHandler = createAgentBuilderWorkflowHandler(
|
|
17962
|
-
|
|
17962
|
+
chunk4HS3I2TI_cjs.createWorkflowRunHandler,
|
|
17963
17963
|
"Creating agent builder action run"
|
|
17964
17964
|
);
|
|
17965
17965
|
var startAsyncAgentBuilderActionHandler = createAgentBuilderWorkflowHandler(
|
|
17966
|
-
|
|
17966
|
+
chunk4HS3I2TI_cjs.startAsyncWorkflowHandler,
|
|
17967
17967
|
"Starting async agent builder action"
|
|
17968
17968
|
);
|
|
17969
17969
|
var startAgentBuilderActionRunHandler = createAgentBuilderWorkflowHandler(
|
|
17970
|
-
|
|
17970
|
+
chunk4HS3I2TI_cjs.startWorkflowRunHandler,
|
|
17971
17971
|
"Starting agent builder action run"
|
|
17972
17972
|
);
|
|
17973
17973
|
var watchAgentBuilderActionHandler = createAgentBuilderWorkflowHandler(
|
|
17974
|
-
|
|
17974
|
+
chunk4HS3I2TI_cjs.watchWorkflowHandler,
|
|
17975
17975
|
"Watching agent builder action"
|
|
17976
17976
|
);
|
|
17977
17977
|
var streamAgentBuilderActionHandler = createAgentBuilderWorkflowHandler(
|
|
17978
|
-
|
|
17978
|
+
chunk4HS3I2TI_cjs.streamWorkflowHandler,
|
|
17979
17979
|
"Streaming agent builder action"
|
|
17980
17980
|
);
|
|
17981
17981
|
var streamVNextAgentBuilderActionHandler = createAgentBuilderWorkflowHandler(
|
|
17982
|
-
|
|
17982
|
+
chunk4HS3I2TI_cjs.streamVNextWorkflowHandler,
|
|
17983
17983
|
"Streaming VNext agent builder action"
|
|
17984
17984
|
);
|
|
17985
17985
|
var resumeAsyncAgentBuilderActionHandler = createAgentBuilderWorkflowHandler(
|
|
17986
|
-
|
|
17986
|
+
chunk4HS3I2TI_cjs.resumeAsyncWorkflowHandler,
|
|
17987
17987
|
"Resuming async agent builder action"
|
|
17988
17988
|
);
|
|
17989
17989
|
var resumeAgentBuilderActionHandler = createAgentBuilderWorkflowHandler(
|
|
17990
|
-
|
|
17990
|
+
chunk4HS3I2TI_cjs.resumeWorkflowHandler,
|
|
17991
17991
|
"Resuming agent builder action"
|
|
17992
17992
|
);
|
|
17993
17993
|
var getAgentBuilderActionRunsHandler = createAgentBuilderWorkflowHandler(
|
|
17994
|
-
|
|
17994
|
+
chunk4HS3I2TI_cjs.getWorkflowRunsHandler,
|
|
17995
17995
|
"Getting agent builder action runs"
|
|
17996
17996
|
);
|
|
17997
17997
|
var cancelAgentBuilderActionRunHandler = createAgentBuilderWorkflowHandler(
|
|
17998
|
-
|
|
17998
|
+
chunk4HS3I2TI_cjs.cancelWorkflowRunHandler,
|
|
17999
17999
|
"Cancelling agent builder action run"
|
|
18000
18000
|
);
|
|
18001
18001
|
var sendAgentBuilderActionRunEventHandler = createAgentBuilderWorkflowHandler(
|
|
18002
|
-
|
|
18002
|
+
chunk4HS3I2TI_cjs.sendWorkflowRunEventHandler,
|
|
18003
18003
|
"Sending agent builder action run event"
|
|
18004
18004
|
);
|
|
18005
18005
|
|
|
@@ -18019,5 +18019,5 @@ exports.startAsyncAgentBuilderActionHandler = startAsyncAgentBuilderActionHandle
|
|
|
18019
18019
|
exports.streamAgentBuilderActionHandler = streamAgentBuilderActionHandler;
|
|
18020
18020
|
exports.streamVNextAgentBuilderActionHandler = streamVNextAgentBuilderActionHandler;
|
|
18021
18021
|
exports.watchAgentBuilderActionHandler = watchAgentBuilderActionHandler;
|
|
18022
|
-
//# sourceMappingURL=chunk-
|
|
18023
|
-
//# sourceMappingURL=chunk-
|
|
18022
|
+
//# sourceMappingURL=chunk-JOXMWFM6.cjs.map
|
|
18023
|
+
//# sourceMappingURL=chunk-JOXMWFM6.cjs.map
|