@mastra/core 0.15.3-alpha.7 → 0.15.3-alpha.8
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 +8 -0
- package/dist/agent/index.cjs +11 -11
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +2 -2
- package/dist/agent/input-processor/index.cjs +6 -6
- package/dist/agent/input-processor/index.js +1 -1
- package/dist/agent/message-list/index.d.ts.map +1 -1
- package/dist/agent/message-list/prompt/image-utils.d.ts +56 -0
- package/dist/agent/message-list/prompt/image-utils.d.ts.map +1 -0
- package/dist/{chunk-XJO6WBIW.js → chunk-3J53FZD3.js} +3 -3
- package/dist/{chunk-XJO6WBIW.js.map → chunk-3J53FZD3.js.map} +1 -1
- package/dist/{chunk-NVB2F66X.cjs → chunk-4VDXHBFW.cjs} +7 -7
- package/dist/{chunk-NVB2F66X.cjs.map → chunk-4VDXHBFW.cjs.map} +1 -1
- package/dist/{chunk-AYPDYPRS.js → chunk-AQE35OJE.js} +3 -3
- package/dist/{chunk-AYPDYPRS.js.map → chunk-AQE35OJE.js.map} +1 -1
- package/dist/{chunk-GJD2BTI5.cjs → chunk-AQX57EIH.cjs} +22 -31
- package/dist/chunk-AQX57EIH.cjs.map +1 -0
- package/dist/{chunk-7IIXZ5HS.cjs → chunk-EBOMP2R5.cjs} +4 -4
- package/dist/{chunk-7IIXZ5HS.cjs.map → chunk-EBOMP2R5.cjs.map} +1 -1
- package/dist/{chunk-P24PB73W.js → chunk-ELYFYZO6.js} +3 -12
- package/dist/chunk-ELYFYZO6.js.map +1 -0
- package/dist/{chunk-POFCBVHG.js → chunk-EU3ADOKK.js} +3 -3
- package/dist/{chunk-POFCBVHG.js.map → chunk-EU3ADOKK.js.map} +1 -1
- package/dist/{chunk-BGE27UEX.js → chunk-HF7HXOCC.js} +196 -28
- package/dist/chunk-HF7HXOCC.js.map +1 -0
- package/dist/{chunk-AAJF7WLJ.cjs → chunk-SIKEQ32R.cjs} +196 -28
- package/dist/chunk-SIKEQ32R.cjs.map +1 -0
- package/dist/{chunk-626FLQPT.cjs → chunk-TCYQAAIT.cjs} +4 -4
- package/dist/{chunk-626FLQPT.cjs.map → chunk-TCYQAAIT.cjs.map} +1 -1
- package/dist/{chunk-EUZ3OA6Y.js → chunk-YI3DG7WN.js} +3 -3
- package/dist/{chunk-EUZ3OA6Y.js.map → chunk-YI3DG7WN.js.map} +1 -1
- package/dist/{chunk-AB2X2OLU.cjs → chunk-ZDPAMCRK.cjs} +4 -4
- package/dist/{chunk-AB2X2OLU.cjs.map → chunk-ZDPAMCRK.cjs.map} +1 -1
- package/dist/index.cjs +21 -21
- package/dist/index.js +6 -6
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +4 -4
- package/dist/memory/index.js +1 -1
- package/dist/network/index.cjs +2 -2
- package/dist/network/index.js +1 -1
- package/dist/network/vNext/index.cjs +14 -14
- package/dist/network/vNext/index.js +2 -2
- package/dist/processors/index.cjs +8 -8
- package/dist/processors/index.js +2 -2
- package/dist/relevance/index.cjs +4 -4
- package/dist/relevance/index.js +1 -1
- package/dist/scores/index.cjs +5 -5
- package/dist/scores/index.js +1 -1
- package/dist/storage/index.cjs +3 -3
- package/dist/storage/index.js +1 -1
- package/dist/stream/index.cjs +3 -3
- package/dist/stream/index.js +1 -1
- package/dist/workflows/default.d.ts +1 -2
- package/dist/workflows/default.d.ts.map +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +10 -10
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/legacy/index.cjs +22 -22
- package/dist/workflows/legacy/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-AAJF7WLJ.cjs.map +0 -1
- package/dist/chunk-BGE27UEX.js.map +0 -1
- package/dist/chunk-GJD2BTI5.cjs.map +0 -1
- package/dist/chunk-P24PB73W.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
var chunkAWES6LTC_cjs = require('./chunk-AWES6LTC.cjs');
|
|
4
4
|
var chunkGEPX327P_cjs = require('./chunk-GEPX327P.cjs');
|
|
5
5
|
var chunkK6UMYGK5_cjs = require('./chunk-K6UMYGK5.cjs');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
6
|
+
var chunkEBOMP2R5_cjs = require('./chunk-EBOMP2R5.cjs');
|
|
7
|
+
var chunkTCYQAAIT_cjs = require('./chunk-TCYQAAIT.cjs');
|
|
8
|
+
var chunkZDPAMCRK_cjs = require('./chunk-ZDPAMCRK.cjs');
|
|
9
9
|
var chunkELKY3FEM_cjs = require('./chunk-ELKY3FEM.cjs');
|
|
10
10
|
var chunkSW7WPHZ2_cjs = require('./chunk-SW7WPHZ2.cjs');
|
|
11
11
|
var chunkF6XWBVVG_cjs = require('./chunk-F6XWBVVG.cjs');
|
|
12
|
-
var
|
|
12
|
+
var chunkAQX57EIH_cjs = require('./chunk-AQX57EIH.cjs');
|
|
13
13
|
var chunkZ637KSJF_cjs = require('./chunk-Z637KSJF.cjs');
|
|
14
14
|
var chunkTSNDVBUU_cjs = require('./chunk-TSNDVBUU.cjs');
|
|
15
15
|
var chunkLVGGMWSE_cjs = require('./chunk-LVGGMWSE.cjs');
|
|
@@ -17,7 +17,7 @@ var chunkABRPHTOG_cjs = require('./chunk-ABRPHTOG.cjs');
|
|
|
17
17
|
var chunkKXCUCBEI_cjs = require('./chunk-KXCUCBEI.cjs');
|
|
18
18
|
|
|
19
19
|
// src/agent/index.warning.ts
|
|
20
|
-
var Agent2 = class extends
|
|
20
|
+
var Agent2 = class extends chunkAQX57EIH_cjs.Agent {
|
|
21
21
|
constructor(config) {
|
|
22
22
|
super(config);
|
|
23
23
|
this.logger.warn('Please import "Agent from "@mastra/core/agent" instead of "@mastra/core"');
|
|
@@ -67,7 +67,7 @@ var OpenAPIToolset2 = class extends chunkF6XWBVVG_cjs.OpenAPIToolset {
|
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
// src/memory/index.warning.ts
|
|
70
|
-
var MastraMemory2 = class extends
|
|
70
|
+
var MastraMemory2 = class extends chunkTCYQAAIT_cjs.MastraMemory {
|
|
71
71
|
constructor(_arg) {
|
|
72
72
|
super({ name: `Deprecated memory` });
|
|
73
73
|
this.logger.warn('Please import "MastraMemory" from "@mastra/core/memory" instead of "@mastra/core"');
|
|
@@ -99,7 +99,7 @@ var MastraVector2 = class extends chunkGEPX327P_cjs.MastraVector {
|
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
// src/workflows/workflow.warning.ts
|
|
102
|
-
var Workflow2 = class extends
|
|
102
|
+
var Workflow2 = class extends chunkAQX57EIH_cjs.Workflow {
|
|
103
103
|
constructor(args) {
|
|
104
104
|
super(args);
|
|
105
105
|
this.logger.warn('Please import "Workflow" from "@mastra/core/workflows" instead of "@mastra/core"');
|
|
@@ -128,27 +128,27 @@ Object.defineProperty(exports, "serializeDate", {
|
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "Mastra", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkEBOMP2R5_cjs.Mastra; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "MemoryProcessor", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkTCYQAAIT_cjs.MemoryProcessor; }
|
|
136
136
|
});
|
|
137
137
|
Object.defineProperty(exports, "memoryDefaultOptions", {
|
|
138
138
|
enumerable: true,
|
|
139
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunkTCYQAAIT_cjs.memoryDefaultOptions; }
|
|
140
140
|
});
|
|
141
141
|
Object.defineProperty(exports, "CohereRelevanceScorer", {
|
|
142
142
|
enumerable: true,
|
|
143
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunkZDPAMCRK_cjs.CohereRelevanceScorer; }
|
|
144
144
|
});
|
|
145
145
|
Object.defineProperty(exports, "MastraAgentRelevanceScorer", {
|
|
146
146
|
enumerable: true,
|
|
147
|
-
get: function () { return
|
|
147
|
+
get: function () { return chunkZDPAMCRK_cjs.MastraAgentRelevanceScorer; }
|
|
148
148
|
});
|
|
149
149
|
Object.defineProperty(exports, "createSimilarityPrompt", {
|
|
150
150
|
enumerable: true,
|
|
151
|
-
get: function () { return
|
|
151
|
+
get: function () { return chunkZDPAMCRK_cjs.createSimilarityPrompt; }
|
|
152
152
|
});
|
|
153
153
|
Object.defineProperty(exports, "Metric", {
|
|
154
154
|
enumerable: true,
|
|
@@ -160,35 +160,35 @@ Object.defineProperty(exports, "evaluate", {
|
|
|
160
160
|
});
|
|
161
161
|
Object.defineProperty(exports, "DefaultExecutionEngine", {
|
|
162
162
|
enumerable: true,
|
|
163
|
-
get: function () { return
|
|
163
|
+
get: function () { return chunkAQX57EIH_cjs.DefaultExecutionEngine; }
|
|
164
164
|
});
|
|
165
165
|
Object.defineProperty(exports, "ExecutionEngine", {
|
|
166
166
|
enumerable: true,
|
|
167
|
-
get: function () { return
|
|
167
|
+
get: function () { return chunkAQX57EIH_cjs.ExecutionEngine; }
|
|
168
168
|
});
|
|
169
169
|
Object.defineProperty(exports, "Run", {
|
|
170
170
|
enumerable: true,
|
|
171
|
-
get: function () { return
|
|
171
|
+
get: function () { return chunkAQX57EIH_cjs.Run; }
|
|
172
172
|
});
|
|
173
173
|
Object.defineProperty(exports, "cloneStep", {
|
|
174
174
|
enumerable: true,
|
|
175
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunkAQX57EIH_cjs.cloneStep; }
|
|
176
176
|
});
|
|
177
177
|
Object.defineProperty(exports, "cloneWorkflow", {
|
|
178
178
|
enumerable: true,
|
|
179
|
-
get: function () { return
|
|
179
|
+
get: function () { return chunkAQX57EIH_cjs.cloneWorkflow; }
|
|
180
180
|
});
|
|
181
181
|
Object.defineProperty(exports, "createStep", {
|
|
182
182
|
enumerable: true,
|
|
183
|
-
get: function () { return
|
|
183
|
+
get: function () { return chunkAQX57EIH_cjs.createStep; }
|
|
184
184
|
});
|
|
185
185
|
Object.defineProperty(exports, "createWorkflow", {
|
|
186
186
|
enumerable: true,
|
|
187
|
-
get: function () { return
|
|
187
|
+
get: function () { return chunkAQX57EIH_cjs.createWorkflow; }
|
|
188
188
|
});
|
|
189
189
|
Object.defineProperty(exports, "mapVariable", {
|
|
190
190
|
enumerable: true,
|
|
191
|
-
get: function () { return
|
|
191
|
+
get: function () { return chunkAQX57EIH_cjs.mapVariable; }
|
|
192
192
|
});
|
|
193
193
|
Object.defineProperty(exports, "InstrumentClass", {
|
|
194
194
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -3,15 +3,15 @@ import { MastraVector } from './chunk-Z73WO76N.js';
|
|
|
3
3
|
export { embed as embedV1, embed2 as embedV2 } from './chunk-Z73WO76N.js';
|
|
4
4
|
import { MastraStorage } from './chunk-YGW2WEJ5.js';
|
|
5
5
|
export { ensureDate, resolveMessageLimit, serializeDate } from './chunk-YGW2WEJ5.js';
|
|
6
|
-
export { Mastra } from './chunk-
|
|
7
|
-
import { MastraMemory } from './chunk-
|
|
8
|
-
export { MemoryProcessor, memoryDefaultOptions } from './chunk-
|
|
9
|
-
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-
|
|
6
|
+
export { Mastra } from './chunk-YI3DG7WN.js';
|
|
7
|
+
import { MastraMemory } from './chunk-EU3ADOKK.js';
|
|
8
|
+
export { MemoryProcessor, memoryDefaultOptions } from './chunk-EU3ADOKK.js';
|
|
9
|
+
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-3J53FZD3.js';
|
|
10
10
|
import { MastraDeployer } from './chunk-AWILTHBM.js';
|
|
11
11
|
export { Metric, evaluate } from './chunk-FXLZYRV7.js';
|
|
12
12
|
import { Integration, OpenAPIToolset } from './chunk-IODUKRQP.js';
|
|
13
|
-
import { Agent, Workflow } from './chunk-
|
|
14
|
-
export { DefaultExecutionEngine, ExecutionEngine, Run, cloneStep, cloneWorkflow, createStep, createWorkflow, mapVariable } from './chunk-
|
|
13
|
+
import { Agent, Workflow } from './chunk-ELYFYZO6.js';
|
|
14
|
+
export { DefaultExecutionEngine, ExecutionEngine, Run, cloneStep, cloneWorkflow, createStep, createWorkflow, mapVariable } from './chunk-ELYFYZO6.js';
|
|
15
15
|
export { InstrumentClass, OTLPTraceExporter as OTLPStorageExporter, Telemetry, getBaggageValues, hasActiveTelemetry, withSpan } from './chunk-R7K2QO7M.js';
|
|
16
16
|
export { AvailableHooks, executeHook, registerHook } from './chunk-TTELJD4F.js';
|
|
17
17
|
export { checkEvalStorageFields, createMastraProxy, deepMerge, delay, ensureToolProperties, fetchWithRetry, generateEmptyFromSchema, isCoreMessage, isUiMessage, isZodType, makeCoreTool, makeCoreToolV5, maskStreamTags, parseFieldKey, parseSqlIdentifier, resolveSerializedZodOutput } from './chunk-WWQ3QRPF.js';
|
package/dist/loop/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkAQX57EIH_cjs = require('../chunk-AQX57EIH.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "loop", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkAQX57EIH_cjs.loop; }
|
|
10
10
|
});
|
|
11
11
|
//# sourceMappingURL=index.cjs.map
|
|
12
12
|
//# sourceMappingURL=index.cjs.map
|
package/dist/loop/index.js
CHANGED
package/dist/mastra/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkEBOMP2R5_cjs = require('../chunk-EBOMP2R5.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Mastra", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkEBOMP2R5_cjs.Mastra; }
|
|
10
10
|
});
|
|
11
11
|
//# sourceMappingURL=index.cjs.map
|
|
12
12
|
//# sourceMappingURL=index.cjs.map
|
package/dist/mastra/index.js
CHANGED
package/dist/memory/index.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkTCYQAAIT_cjs = require('../chunk-TCYQAAIT.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "MastraMemory", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkTCYQAAIT_cjs.MastraMemory; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "MemoryProcessor", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkTCYQAAIT_cjs.MemoryProcessor; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "memoryDefaultOptions", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkTCYQAAIT_cjs.memoryDefaultOptions; }
|
|
18
18
|
});
|
|
19
19
|
//# sourceMappingURL=index.cjs.map
|
|
20
20
|
//# sourceMappingURL=index.cjs.map
|
package/dist/memory/index.js
CHANGED
package/dist/network/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkAQX57EIH_cjs = require('../chunk-AQX57EIH.cjs');
|
|
4
4
|
var chunkABRPHTOG_cjs = require('../chunk-ABRPHTOG.cjs');
|
|
5
5
|
var chunkC73WLCY3_cjs = require('../chunk-C73WLCY3.cjs');
|
|
6
6
|
var chunkKXCUCBEI_cjs = require('../chunk-KXCUCBEI.cjs');
|
|
@@ -18,7 +18,7 @@ var AgentNetwork = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
18
18
|
this.#instructions = config.instructions;
|
|
19
19
|
this.#agents = config.agents;
|
|
20
20
|
this.#model = config.model;
|
|
21
|
-
this.#routingAgent = new
|
|
21
|
+
this.#routingAgent = new chunkAQX57EIH_cjs.Agent({
|
|
22
22
|
name: config.name,
|
|
23
23
|
instructions: this.getInstructions(),
|
|
24
24
|
model: this.#model,
|
package/dist/network/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkAQX57EIH_cjs = require('../../chunk-AQX57EIH.cjs');
|
|
4
4
|
var chunkNFXTYMWZ_cjs = require('../../chunk-NFXTYMWZ.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkSIKEQ32R_cjs = require('../../chunk-SIKEQ32R.cjs');
|
|
6
6
|
var chunkGPWMM745_cjs = require('../../chunk-GPWMM745.cjs');
|
|
7
7
|
var chunkKXCUCBEI_cjs = require('../../chunk-KXCUCBEI.cjs');
|
|
8
8
|
var chunkV5WKCX3G_cjs = require('../../chunk-V5WKCX3G.cjs');
|
|
@@ -103,7 +103,7 @@ var NewAgentNetwork = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
103
103
|
format: "v2"
|
|
104
104
|
});
|
|
105
105
|
} else {
|
|
106
|
-
const messageList = new
|
|
106
|
+
const messageList = new chunkSIKEQ32R_cjs.MessageList({
|
|
107
107
|
threadId: thread?.id,
|
|
108
108
|
resourceId: thread?.resourceId
|
|
109
109
|
});
|
|
@@ -210,7 +210,7 @@ var NewAgentNetwork = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
210
210
|
|
|
211
211
|
Keep in mind that the user only sees the final result of the task. When reviewing completion, you should know that the user will not see the intermediate results.
|
|
212
212
|
`;
|
|
213
|
-
return new
|
|
213
|
+
return new chunkAQX57EIH_cjs.Agent({
|
|
214
214
|
name: "routing-agent",
|
|
215
215
|
instructions,
|
|
216
216
|
model: this.#model,
|
|
@@ -226,7 +226,7 @@ var NewAgentNetwork = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
226
226
|
resourceId
|
|
227
227
|
}) {
|
|
228
228
|
const networkWorkflow = this.createWorkflow({ runtimeContext });
|
|
229
|
-
const finalStep =
|
|
229
|
+
const finalStep = chunkAQX57EIH_cjs.createStep({
|
|
230
230
|
id: "final-step",
|
|
231
231
|
inputSchema: networkWorkflow.outputSchema,
|
|
232
232
|
outputSchema: networkWorkflow.outputSchema,
|
|
@@ -240,7 +240,7 @@ var NewAgentNetwork = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
240
240
|
return inputData;
|
|
241
241
|
}
|
|
242
242
|
});
|
|
243
|
-
const mainWorkflow =
|
|
243
|
+
const mainWorkflow = chunkAQX57EIH_cjs.createWorkflow({
|
|
244
244
|
id: "Agent-Network-Main-Workflow",
|
|
245
245
|
inputSchema: zod.z.object({
|
|
246
246
|
iteration: zod.z.number(),
|
|
@@ -285,7 +285,7 @@ var NewAgentNetwork = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
285
285
|
resourceId
|
|
286
286
|
}) {
|
|
287
287
|
const networkWorkflow = this.createWorkflow({ runtimeContext });
|
|
288
|
-
const finalStep =
|
|
288
|
+
const finalStep = chunkAQX57EIH_cjs.createStep({
|
|
289
289
|
id: "final-step",
|
|
290
290
|
inputSchema: networkWorkflow.outputSchema,
|
|
291
291
|
outputSchema: networkWorkflow.outputSchema,
|
|
@@ -299,7 +299,7 @@ var NewAgentNetwork = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
299
299
|
return inputData;
|
|
300
300
|
}
|
|
301
301
|
});
|
|
302
|
-
const mainWorkflow =
|
|
302
|
+
const mainWorkflow = chunkAQX57EIH_cjs.createWorkflow({
|
|
303
303
|
id: "Agent-Network-Main-Workflow",
|
|
304
304
|
inputSchema: zod.z.object({
|
|
305
305
|
iteration: zod.z.number(),
|
|
@@ -349,7 +349,7 @@ var NewAgentNetwork = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
349
349
|
createWorkflow({ runtimeContext }) {
|
|
350
350
|
const runId = this.#mastra?.generateId() || crypto.randomUUID();
|
|
351
351
|
const runtimeContextToUse = runtimeContext || new chunkGPWMM745_cjs.RuntimeContext();
|
|
352
|
-
const routingStep =
|
|
352
|
+
const routingStep = chunkAQX57EIH_cjs.createStep({
|
|
353
353
|
id: "routing-step",
|
|
354
354
|
inputSchema: zod.z.object({
|
|
355
355
|
task: zod.z.string(),
|
|
@@ -479,7 +479,7 @@ ${completionResult.object.finalResult}` : ""}
|
|
|
479
479
|
};
|
|
480
480
|
}
|
|
481
481
|
});
|
|
482
|
-
const agentStep =
|
|
482
|
+
const agentStep = chunkAQX57EIH_cjs.createStep({
|
|
483
483
|
id: "agent-step",
|
|
484
484
|
inputSchema: zod.z.object({
|
|
485
485
|
task: zod.z.string(),
|
|
@@ -615,7 +615,7 @@ ${completionResult.object.finalResult}` : ""}
|
|
|
615
615
|
};
|
|
616
616
|
}
|
|
617
617
|
});
|
|
618
|
-
const workflowStep =
|
|
618
|
+
const workflowStep = chunkAQX57EIH_cjs.createStep({
|
|
619
619
|
id: "workflow-step",
|
|
620
620
|
inputSchema: zod.z.object({
|
|
621
621
|
task: zod.z.string(),
|
|
@@ -737,7 +737,7 @@ ${completionResult.object.finalResult}` : ""}
|
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
739
|
});
|
|
740
|
-
const toolStep =
|
|
740
|
+
const toolStep = chunkAQX57EIH_cjs.createStep({
|
|
741
741
|
id: "toolStep",
|
|
742
742
|
inputSchema: zod.z.object({
|
|
743
743
|
task: zod.z.string(),
|
|
@@ -809,7 +809,7 @@ ${completionResult.object.finalResult}` : ""}
|
|
|
809
809
|
};
|
|
810
810
|
}
|
|
811
811
|
});
|
|
812
|
-
const finishStep =
|
|
812
|
+
const finishStep = chunkAQX57EIH_cjs.createStep({
|
|
813
813
|
id: "finish-step",
|
|
814
814
|
inputSchema: zod.z.object({
|
|
815
815
|
task: zod.z.string(),
|
|
@@ -836,7 +836,7 @@ ${completionResult.object.finalResult}` : ""}
|
|
|
836
836
|
};
|
|
837
837
|
}
|
|
838
838
|
});
|
|
839
|
-
const networkWorkflow =
|
|
839
|
+
const networkWorkflow = chunkAQX57EIH_cjs.createWorkflow({
|
|
840
840
|
id: "Agent-Network-Outer-Workflow",
|
|
841
841
|
inputSchema: zod.z.object({
|
|
842
842
|
task: zod.z.string(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Agent, createStep, createWorkflow } from '../../chunk-
|
|
1
|
+
import { Agent, createStep, createWorkflow } from '../../chunk-ELYFYZO6.js';
|
|
2
2
|
import { EMITTER_SYMBOL } from '../../chunk-GK5V7YTQ.js';
|
|
3
|
-
import { MessageList } from '../../chunk-
|
|
3
|
+
import { MessageList } from '../../chunk-HF7HXOCC.js';
|
|
4
4
|
import { RuntimeContext } from '../../chunk-HLRWYUFN.js';
|
|
5
5
|
import { MastraBase } from '../../chunk-6GF5M4GX.js';
|
|
6
6
|
import { RegisteredLogger } from '../../chunk-X3GXU6TZ.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkAQX57EIH_cjs = require('../chunk-AQX57EIH.cjs');
|
|
4
4
|
var lite = require('js-tiktoken/lite');
|
|
5
5
|
var o200k_base = require('js-tiktoken/ranks/o200k_base');
|
|
6
6
|
var zod = require('zod');
|
|
@@ -271,7 +271,7 @@ var SystemPromptScrubber = class {
|
|
|
271
271
|
this.placeholderText = options.placeholderText || "[SYSTEM_PROMPT]";
|
|
272
272
|
this.instructions = options.instructions || this.getDefaultInstructions();
|
|
273
273
|
this.model = options.model;
|
|
274
|
-
this.detectionAgent = new
|
|
274
|
+
this.detectionAgent = new chunkAQX57EIH_cjs.Agent({
|
|
275
275
|
name: "system-prompt-detector",
|
|
276
276
|
model: this.model,
|
|
277
277
|
instructions: this.instructions
|
|
@@ -499,27 +499,27 @@ Be thorough but avoid false positives. Only flag content that genuinely represen
|
|
|
499
499
|
|
|
500
500
|
Object.defineProperty(exports, "LanguageDetector", {
|
|
501
501
|
enumerable: true,
|
|
502
|
-
get: function () { return
|
|
502
|
+
get: function () { return chunkAQX57EIH_cjs.LanguageDetector; }
|
|
503
503
|
});
|
|
504
504
|
Object.defineProperty(exports, "ModerationProcessor", {
|
|
505
505
|
enumerable: true,
|
|
506
|
-
get: function () { return
|
|
506
|
+
get: function () { return chunkAQX57EIH_cjs.ModerationProcessor; }
|
|
507
507
|
});
|
|
508
508
|
Object.defineProperty(exports, "PIIDetector", {
|
|
509
509
|
enumerable: true,
|
|
510
|
-
get: function () { return
|
|
510
|
+
get: function () { return chunkAQX57EIH_cjs.PIIDetector; }
|
|
511
511
|
});
|
|
512
512
|
Object.defineProperty(exports, "PromptInjectionDetector", {
|
|
513
513
|
enumerable: true,
|
|
514
|
-
get: function () { return
|
|
514
|
+
get: function () { return chunkAQX57EIH_cjs.PromptInjectionDetector; }
|
|
515
515
|
});
|
|
516
516
|
Object.defineProperty(exports, "StructuredOutputProcessor", {
|
|
517
517
|
enumerable: true,
|
|
518
|
-
get: function () { return
|
|
518
|
+
get: function () { return chunkAQX57EIH_cjs.StructuredOutputProcessor; }
|
|
519
519
|
});
|
|
520
520
|
Object.defineProperty(exports, "UnicodeNormalizer", {
|
|
521
521
|
enumerable: true,
|
|
522
|
-
get: function () { return
|
|
522
|
+
get: function () { return chunkAQX57EIH_cjs.UnicodeNormalizer; }
|
|
523
523
|
});
|
|
524
524
|
exports.BatchPartsProcessor = BatchPartsProcessor;
|
|
525
525
|
exports.SystemPromptScrubber = SystemPromptScrubber;
|
package/dist/processors/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Agent } from '../chunk-
|
|
2
|
-
export { LanguageDetector, ModerationProcessor, PIIDetector, PromptInjectionDetector, StructuredOutputProcessor, UnicodeNormalizer } from '../chunk-
|
|
1
|
+
import { Agent } from '../chunk-ELYFYZO6.js';
|
|
2
|
+
export { LanguageDetector, ModerationProcessor, PIIDetector, PromptInjectionDetector, StructuredOutputProcessor, UnicodeNormalizer } from '../chunk-ELYFYZO6.js';
|
|
3
3
|
import { Tiktoken } from 'js-tiktoken/lite';
|
|
4
4
|
import o200k_base from 'js-tiktoken/ranks/o200k_base';
|
|
5
5
|
import { z } from 'zod';
|
package/dist/relevance/index.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkZDPAMCRK_cjs = require('../chunk-ZDPAMCRK.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "CohereRelevanceScorer", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkZDPAMCRK_cjs.CohereRelevanceScorer; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "MastraAgentRelevanceScorer", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkZDPAMCRK_cjs.MastraAgentRelevanceScorer; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "createSimilarityPrompt", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkZDPAMCRK_cjs.createSimilarityPrompt; }
|
|
18
18
|
});
|
|
19
19
|
//# sourceMappingURL=index.cjs.map
|
|
20
20
|
//# sourceMappingURL=index.cjs.map
|
package/dist/relevance/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-
|
|
1
|
+
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-3J53FZD3.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/scores/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkAQX57EIH_cjs = require('../chunk-AQX57EIH.cjs');
|
|
4
4
|
var chunkC73WLCY3_cjs = require('../chunk-C73WLCY3.cjs');
|
|
5
5
|
var zod = require('zod');
|
|
6
6
|
var crypto = require('crypto');
|
|
@@ -163,7 +163,7 @@ var MastraScorer = class _MastraScorer {
|
|
|
163
163
|
}
|
|
164
164
|
toMastraWorkflow() {
|
|
165
165
|
const workflowSteps = this.steps.map((scorerStep) => {
|
|
166
|
-
return
|
|
166
|
+
return chunkAQX57EIH_cjs.createStep({
|
|
167
167
|
id: scorerStep.name,
|
|
168
168
|
description: `Scorer step: ${scorerStep.name}`,
|
|
169
169
|
inputSchema: zod.z.any(),
|
|
@@ -196,7 +196,7 @@ var MastraScorer = class _MastraScorer {
|
|
|
196
196
|
}
|
|
197
197
|
});
|
|
198
198
|
});
|
|
199
|
-
const workflow =
|
|
199
|
+
const workflow = chunkAQX57EIH_cjs.createWorkflow({
|
|
200
200
|
id: `scorer-${this.config.name}`,
|
|
201
201
|
description: this.config.description,
|
|
202
202
|
inputSchema: zod.z.object({
|
|
@@ -251,7 +251,7 @@ var MastraScorer = class _MastraScorer {
|
|
|
251
251
|
}
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
|
-
const judge = new
|
|
254
|
+
const judge = new chunkAQX57EIH_cjs.Agent({ name: "judge", model, instructions });
|
|
255
255
|
if (scorerStep.name === "generateScore") {
|
|
256
256
|
let result;
|
|
257
257
|
if (model.specificationVersion === "v2") {
|
|
@@ -439,7 +439,7 @@ async function runExperiment(config) {
|
|
|
439
439
|
};
|
|
440
440
|
}
|
|
441
441
|
function isWorkflow(target) {
|
|
442
|
-
return target instanceof
|
|
442
|
+
return target instanceof chunkAQX57EIH_cjs.Workflow;
|
|
443
443
|
}
|
|
444
444
|
function isWorkflowScorerConfig(scorers) {
|
|
445
445
|
return typeof scorers === "object" && !Array.isArray(scorers) && ("workflow" in scorers || "steps" in scorers);
|
package/dist/scores/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createStep, createWorkflow, Agent, Workflow } from '../chunk-
|
|
1
|
+
import { createStep, createWorkflow, Agent, Workflow } from '../chunk-ELYFYZO6.js';
|
|
2
2
|
import { MastraError } from '../chunk-MCOVMKIS.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { randomUUID } from 'crypto';
|
package/dist/storage/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkK6UMYGK5_cjs = require('../chunk-K6UMYGK5.cjs');
|
|
4
4
|
var chunkXUAWHRUO_cjs = require('../chunk-XUAWHRUO.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkSIKEQ32R_cjs = require('../chunk-SIKEQ32R.cjs');
|
|
6
6
|
var chunkC73WLCY3_cjs = require('../chunk-C73WLCY3.cjs');
|
|
7
7
|
var chunkKXCUCBEI_cjs = require('../chunk-KXCUCBEI.cjs');
|
|
8
8
|
|
|
@@ -310,7 +310,7 @@ var InMemoryMemory = class extends MemoryStorage {
|
|
|
310
310
|
}) {
|
|
311
311
|
this.logger.debug(`MockStore: getMessagesById called`);
|
|
312
312
|
const rawMessages = messageIds.map((id) => this.collection.messages.get(id)).filter((message) => !!message);
|
|
313
|
-
const list = new
|
|
313
|
+
const list = new chunkSIKEQ32R_cjs.MessageList().add(rawMessages.map(this.parseStoredMessage), "memory");
|
|
314
314
|
if (format === "v1") return list.get.all.v1();
|
|
315
315
|
return list.get.all.v2();
|
|
316
316
|
}
|
|
@@ -340,7 +340,7 @@ var InMemoryMemory = class extends MemoryStorage {
|
|
|
340
340
|
};
|
|
341
341
|
this.collection.messages.set(key, storageMessage);
|
|
342
342
|
}
|
|
343
|
-
const list = new
|
|
343
|
+
const list = new chunkSIKEQ32R_cjs.MessageList().add(messages, "memory");
|
|
344
344
|
if (format === `v2`) return list.get.all.v2();
|
|
345
345
|
return list.get.all.v1();
|
|
346
346
|
}
|
package/dist/storage/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { MastraStorage } from '../chunk-YGW2WEJ5.js';
|
|
|
2
2
|
export { MastraStorage, ensureDate, resolveMessageLimit, serializeDate } from '../chunk-YGW2WEJ5.js';
|
|
3
3
|
import { TABLE_WORKFLOW_SNAPSHOT, TABLE_EVALS, TABLE_TRACES } from '../chunk-R5GESRGB.js';
|
|
4
4
|
export { AI_SPAN_SCHEMA, SCORERS_SCHEMA, TABLE_AI_SPANS, TABLE_EVALS, TABLE_MESSAGES, TABLE_RESOURCES, TABLE_SCHEMAS, TABLE_SCORERS, TABLE_THREADS, TABLE_TRACES, TABLE_WORKFLOW_SNAPSHOT } from '../chunk-R5GESRGB.js';
|
|
5
|
-
import { MessageList } from '../chunk-
|
|
5
|
+
import { MessageList } from '../chunk-HF7HXOCC.js';
|
|
6
6
|
import { MastraError } from '../chunk-MCOVMKIS.js';
|
|
7
7
|
import { MastraBase } from '../chunk-6GF5M4GX.js';
|
|
8
8
|
|
package/dist/stream/index.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkAQX57EIH_cjs = require('../chunk-AQX57EIH.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "AISDKV5OutputStream", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkAQX57EIH_cjs.AISDKV5OutputStream; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "MastraModelOutput", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkAQX57EIH_cjs.MastraModelOutput; }
|
|
14
14
|
});
|
|
15
15
|
//# sourceMappingURL=index.cjs.map
|
|
16
16
|
//# sourceMappingURL=index.cjs.map
|
package/dist/stream/index.js
CHANGED
|
@@ -156,13 +156,12 @@ export declare class DefaultExecutionEngine extends ExecutionEngine {
|
|
|
156
156
|
serializedStepGraph: SerializedStepFlowEntry[];
|
|
157
157
|
tracingContext: TracingContext;
|
|
158
158
|
}): Promise<StepResult<any, any, any, any>>;
|
|
159
|
-
protected runScorers({ scorers, runId, input, output, workflowId, stepId, runtimeContext,
|
|
159
|
+
protected runScorers({ scorers, runId, input, output, workflowId, stepId, runtimeContext, disableScorers, }: {
|
|
160
160
|
scorers: DynamicArgument<MastraScorers>;
|
|
161
161
|
runId: string;
|
|
162
162
|
input: any;
|
|
163
163
|
output: any;
|
|
164
164
|
runtimeContext: RuntimeContext;
|
|
165
|
-
tracingContext: TracingContext;
|
|
166
165
|
workflowId: string;
|
|
167
166
|
stepId: string;
|
|
168
167
|
disableScorers?: boolean;
|