@mastra/core 0.16.1-alpha.0 → 0.16.1-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/CHANGELOG.md +30 -0
- package/dist/agent/agent.types.d.ts +10 -2
- package/dist/agent/agent.types.d.ts.map +1 -1
- 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 +30 -0
- package/dist/agent/message-list/prompt/image-utils.d.ts.map +1 -1
- package/dist/agent/test-utils.d.ts +3 -0
- package/dist/agent/test-utils.d.ts.map +1 -1
- package/dist/agent/types.d.ts +2 -2
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/ai-tracing/context.d.ts +7 -13
- package/dist/ai-tracing/context.d.ts.map +1 -1
- package/dist/ai-tracing/index.cjs +32 -36
- package/dist/ai-tracing/index.js +1 -1
- package/dist/{chunk-WEPWZHE4.js → chunk-2NKNTPFR.js} +49 -5
- package/dist/chunk-2NKNTPFR.js.map +1 -0
- package/dist/{chunk-RT2ETR6A.js → chunk-BIJYFZVF.js} +3 -3
- package/dist/{chunk-RT2ETR6A.js.map → chunk-BIJYFZVF.js.map} +1 -1
- package/dist/{chunk-2QDX6OPE.js → chunk-BQ43NQXK.js} +3 -3
- package/dist/{chunk-2QDX6OPE.js.map → chunk-BQ43NQXK.js.map} +1 -1
- package/dist/{chunk-KT4WNDGP.cjs → chunk-D3UG2YLU.cjs} +110 -31
- package/dist/chunk-D3UG2YLU.cjs.map +1 -0
- package/dist/{chunk-H33WOKEO.js → chunk-DUABZASJ.js} +4 -4
- package/dist/{chunk-H33WOKEO.js.map → chunk-DUABZASJ.js.map} +1 -1
- package/dist/{chunk-YUJ7GETS.js → chunk-HJ2UGNRG.js} +3 -3
- package/dist/{chunk-YUJ7GETS.js.map → chunk-HJ2UGNRG.js.map} +1 -1
- package/dist/{chunk-Y6MXP3EN.cjs → chunk-IMDDMIVR.cjs} +6 -6
- package/dist/{chunk-Y6MXP3EN.cjs.map → chunk-IMDDMIVR.cjs.map} +1 -1
- package/dist/{chunk-N3HXDMF2.js → chunk-IU367D3M.js} +3 -3
- package/dist/{chunk-N3HXDMF2.js.map → chunk-IU367D3M.js.map} +1 -1
- package/dist/{chunk-6FVCJBBG.cjs → chunk-KB4IEMPV.cjs} +5 -3
- package/dist/chunk-KB4IEMPV.cjs.map +1 -0
- package/dist/{chunk-G7YM2FA2.cjs → chunk-ONGPJVTY.cjs} +7 -7
- package/dist/{chunk-G7YM2FA2.cjs.map → chunk-ONGPJVTY.cjs.map} +1 -1
- package/dist/{chunk-4FWIB47J.cjs → chunk-PHS6DKEV.cjs} +4 -4
- package/dist/{chunk-4FWIB47J.cjs.map → chunk-PHS6DKEV.cjs.map} +1 -1
- package/dist/{chunk-LGJCH6XF.cjs → chunk-R467FTA7.cjs} +12 -12
- package/dist/{chunk-LGJCH6XF.cjs.map → chunk-R467FTA7.cjs.map} +1 -1
- package/dist/{chunk-OE3SL5VG.cjs → chunk-SJO2HEVU.cjs} +6 -6
- package/dist/{chunk-OE3SL5VG.cjs.map → chunk-SJO2HEVU.cjs.map} +1 -1
- package/dist/{chunk-ULA3AGAI.js → chunk-TDLB5JKT.js} +5 -3
- package/dist/chunk-TDLB5JKT.js.map +1 -0
- package/dist/{chunk-WW62UQPE.js → chunk-TOCMMZ2Y.js} +5 -5
- package/dist/{chunk-WW62UQPE.js.map → chunk-TOCMMZ2Y.js.map} +1 -1
- package/dist/{chunk-UFCYMOYH.cjs → chunk-UGCG7DI3.cjs} +49 -6
- package/dist/chunk-UGCG7DI3.cjs.map +1 -0
- package/dist/{chunk-IUF2ESZH.cjs → chunk-WJXZMK43.cjs} +158 -109
- package/dist/chunk-WJXZMK43.cjs.map +1 -0
- package/dist/{chunk-VMV5VND5.cjs → chunk-XS5PJKTF.cjs} +7 -7
- package/dist/{chunk-VMV5VND5.cjs.map → chunk-XS5PJKTF.cjs.map} +1 -1
- package/dist/{chunk-4BQBSBQP.js → chunk-YI3AIJJL.js} +109 -30
- package/dist/chunk-YI3AIJJL.js.map +1 -0
- package/dist/{chunk-MW4CYUSP.js → chunk-ZGSS7RCP.js} +123 -74
- package/dist/chunk-ZGSS7RCP.js.map +1 -0
- package/dist/index.cjs +38 -38
- package/dist/index.js +7 -7
- package/dist/llm/model/model.loop.d.ts +1 -1
- package/dist/llm/model/model.loop.d.ts.map +1 -1
- package/dist/llm/model/model.loop.types.d.ts +4 -2
- package/dist/llm/model/model.loop.types.d.ts.map +1 -1
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +1 -1
- package/dist/loop/test-utils/fullStream.d.ts.map +1 -1
- package/dist/loop/test-utils/generateText.d.ts.map +1 -1
- package/dist/loop/test-utils/resultObject.d.ts.map +1 -1
- package/dist/loop/test-utils/streamObject.d.ts.map +1 -1
- package/dist/loop/test-utils/tools.d.ts.map +1 -1
- package/dist/loop/test-utils/utils.d.ts +1 -0
- package/dist/loop/test-utils/utils.d.ts.map +1 -1
- package/dist/loop/types.d.ts +0 -1
- package/dist/loop/types.d.ts.map +1 -1
- package/dist/loop/workflow/outer-llm-step.d.ts.map +1 -1
- package/dist/loop/workflow/schema.d.ts +12 -0
- package/dist/loop/workflow/schema.d.ts.map +1 -1
- package/dist/loop/workflow/tool-call-step.d.ts +12 -0
- package/dist/loop/workflow/tool-call-step.d.ts.map +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/processors/processors/structured-output.d.ts +2 -1
- package/dist/processors/processors/structured-output.d.ts.map +1 -1
- package/dist/relevance/index.cjs +4 -4
- package/dist/relevance/index.js +1 -1
- package/dist/scores/index.cjs +8 -8
- package/dist/scores/index.js +1 -1
- package/dist/storage/domains/observability/inmemory.d.ts.map +1 -1
- package/dist/storage/index.cjs +5 -3
- package/dist/storage/index.cjs.map +1 -1
- package/dist/storage/index.js +3 -1
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/types.d.ts +2 -0
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/MastraWorkflowStream.d.ts.map +1 -1
- package/dist/stream/base/output.d.ts.map +1 -1
- package/dist/stream/index.cjs +3 -3
- package/dist/stream/index.js +1 -1
- package/dist/test-utils/llm-mock.cjs +2 -2
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/tools/tool-builder/builder.d.ts.map +1 -1
- package/dist/utils.cjs +17 -17
- package/dist/utils.js +1 -1
- 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/dist/workflows/types.d.ts +3 -0
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/workflow.d.ts +2 -1
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-4BQBSBQP.js.map +0 -1
- package/dist/chunk-6FVCJBBG.cjs.map +0 -1
- package/dist/chunk-IUF2ESZH.cjs.map +0 -1
- package/dist/chunk-KT4WNDGP.cjs.map +0 -1
- package/dist/chunk-MW4CYUSP.js.map +0 -1
- package/dist/chunk-UFCYMOYH.cjs.map +0 -1
- package/dist/chunk-ULA3AGAI.js.map +0 -1
- package/dist/chunk-WEPWZHE4.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWJXZMK43_cjs = require('../../chunk-WJXZMK43.cjs');
|
|
4
4
|
var chunkABJOUEVA_cjs = require('../../chunk-ABJOUEVA.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkD3UG2YLU_cjs = require('../../chunk-D3UG2YLU.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 chunkD3UG2YLU_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 chunkWJXZMK43_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 = chunkWJXZMK43_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 = chunkWJXZMK43_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 = chunkWJXZMK43_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 = chunkWJXZMK43_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 = chunkWJXZMK43_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 = chunkWJXZMK43_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 = chunkWJXZMK43_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 = chunkWJXZMK43_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 = chunkWJXZMK43_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 = chunkWJXZMK43_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-ZGSS7RCP.js';
|
|
2
2
|
import { EMITTER_SYMBOL } from '../../chunk-NLNKQD2T.js';
|
|
3
|
-
import { MessageList } from '../../chunk-
|
|
3
|
+
import { MessageList } from '../../chunk-YI3AIJJL.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 chunkWJXZMK43_cjs = require('../chunk-WJXZMK43.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 chunkWJXZMK43_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 chunkWJXZMK43_cjs.LanguageDetector; }
|
|
503
503
|
});
|
|
504
504
|
Object.defineProperty(exports, "ModerationProcessor", {
|
|
505
505
|
enumerable: true,
|
|
506
|
-
get: function () { return
|
|
506
|
+
get: function () { return chunkWJXZMK43_cjs.ModerationProcessor; }
|
|
507
507
|
});
|
|
508
508
|
Object.defineProperty(exports, "PIIDetector", {
|
|
509
509
|
enumerable: true,
|
|
510
|
-
get: function () { return
|
|
510
|
+
get: function () { return chunkWJXZMK43_cjs.PIIDetector; }
|
|
511
511
|
});
|
|
512
512
|
Object.defineProperty(exports, "PromptInjectionDetector", {
|
|
513
513
|
enumerable: true,
|
|
514
|
-
get: function () { return
|
|
514
|
+
get: function () { return chunkWJXZMK43_cjs.PromptInjectionDetector; }
|
|
515
515
|
});
|
|
516
516
|
Object.defineProperty(exports, "StructuredOutputProcessor", {
|
|
517
517
|
enumerable: true,
|
|
518
|
-
get: function () { return
|
|
518
|
+
get: function () { return chunkWJXZMK43_cjs.StructuredOutputProcessor; }
|
|
519
519
|
});
|
|
520
520
|
Object.defineProperty(exports, "UnicodeNormalizer", {
|
|
521
521
|
enumerable: true,
|
|
522
|
-
get: function () { return
|
|
522
|
+
get: function () { return chunkWJXZMK43_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-ZGSS7RCP.js';
|
|
2
|
+
export { LanguageDetector, ModerationProcessor, PIIDetector, PromptInjectionDetector, StructuredOutputProcessor, UnicodeNormalizer } from '../chunk-ZGSS7RCP.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';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type z from 'zod';
|
|
2
2
|
import type { MastraMessageV2 } from '../../agent/message-list/index.js';
|
|
3
3
|
import type { StructuredOutputOptions } from '../../agent/types.js';
|
|
4
|
+
import type { MastraLanguageModel } from '../../llm/model/shared.types.js';
|
|
4
5
|
import type { Processor } from '../index.js';
|
|
5
6
|
export type { StructuredOutputOptions } from '../../agent/types.js';
|
|
6
7
|
/**
|
|
@@ -21,7 +22,7 @@ export declare class StructuredOutputProcessor<S extends z.ZodTypeAny> implement
|
|
|
21
22
|
private structuringAgent;
|
|
22
23
|
private errorStrategy;
|
|
23
24
|
private fallbackValue?;
|
|
24
|
-
constructor(options: StructuredOutputOptions<S
|
|
25
|
+
constructor(options: StructuredOutputOptions<S>, fallbackModel?: MastraLanguageModel);
|
|
25
26
|
processOutputResult(args: {
|
|
26
27
|
messages: MastraMessageV2[];
|
|
27
28
|
abort: (reason?: string) => never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structured-output.d.ts","sourceRoot":"","sources":["../../../src/processors/processors/structured-output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,YAAY,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAEjE;;;;;;;;;;;GAWG;AACH,qBAAa,yBAAyB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,CAAE,YAAW,SAAS;IACjF,QAAQ,CAAC,IAAI,uBAAuB;IAE7B,MAAM,EAAE,CAAC,CAAC;IACjB,OAAO,CAAC,gBAAgB,CAAQ;IAChC,OAAO,CAAC,aAAa,CAAiC;IACtD,OAAO,CAAC,aAAa,CAAC,CAAa;gBAEvB,OAAO,EAAE,uBAAuB,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"structured-output.d.ts","sourceRoot":"","sources":["../../../src/processors/processors/structured-output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,YAAY,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAEjE;;;;;;;;;;;GAWG;AACH,qBAAa,yBAAyB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,CAAE,YAAW,SAAS;IACjF,QAAQ,CAAC,IAAI,uBAAuB;IAE7B,MAAM,EAAE,CAAC,CAAC;IACjB,OAAO,CAAC,gBAAgB,CAAQ;IAChC,OAAO,CAAC,aAAa,CAAiC;IACtD,OAAO,CAAC,aAAa,CAAC,CAAa;gBAEvB,OAAO,EAAE,uBAAuB,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,mBAAmB;IAmB9E,mBAAmB,CAAC,IAAI,EAAE;QAC9B,QAAQ,EAAE,eAAe,EAAE,CAAC;QAC5B,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,KAAK,CAAC;KACnC,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAgG9B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAkB1B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAe5B;;OAEG;IACH,OAAO,CAAC,WAAW;CAiBpB"}
|
package/dist/relevance/index.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPHS6DKEV_cjs = require('../chunk-PHS6DKEV.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 chunkPHS6DKEV_cjs.CohereRelevanceScorer; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "MastraAgentRelevanceScorer", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkPHS6DKEV_cjs.MastraAgentRelevanceScorer; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "createSimilarityPrompt", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkPHS6DKEV_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-BIJYFZVF.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/scores/index.cjs
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXS5PJKTF_cjs = require('../chunk-XS5PJKTF.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "MastraScorer", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkXS5PJKTF_cjs.MastraScorer; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "createScorer", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkXS5PJKTF_cjs.createScorer; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "runExperiment", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkXS5PJKTF_cjs.runExperiment; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "saveScorePayloadSchema", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkXS5PJKTF_cjs.saveScorePayloadSchema; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "scoreResultSchema", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkXS5PJKTF_cjs.scoreResultSchema; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "scoringExtractStepResultSchema", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkXS5PJKTF_cjs.scoringExtractStepResultSchema; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "scoringValueSchema", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkXS5PJKTF_cjs.scoringValueSchema; }
|
|
34
34
|
});
|
|
35
35
|
//# sourceMappingURL=index.cjs.map
|
|
36
36
|
//# sourceMappingURL=index.cjs.map
|
package/dist/scores/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MastraScorer, createScorer, runExperiment, saveScorePayloadSchema, scoreResultSchema, scoringExtractStepResultSchema, scoringValueSchema } from '../chunk-
|
|
1
|
+
export { MastraScorer, createScorer, runExperiment, saveScorePayloadSchema, scoreResultSchema, scoringExtractStepResultSchema, scoringValueSchema } from '../chunk-HJ2UGNRG.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @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AAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC;KAC5D,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBX,kBAAkB,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,YAAY,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAQpE,kBAAkB,CAAC,IAAI,EAAE;QAC7B,OAAO,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAA;SAAE,EAAE,CAAC;KAC5G,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBX,mBAAmB,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAQvE"}
|
package/dist/storage/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunk33GDW3SI_cjs = require('../chunk-33GDW3SI.cjs');
|
|
4
4
|
var chunkXUAWHRUO_cjs = require('../chunk-XUAWHRUO.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkD3UG2YLU_cjs = require('../chunk-D3UG2YLU.cjs');
|
|
6
6
|
var chunkC73WLCY3_cjs = require('../chunk-C73WLCY3.cjs');
|
|
7
7
|
var chunkKXCUCBEI_cjs = require('../chunk-KXCUCBEI.cjs');
|
|
8
8
|
|
|
@@ -311,7 +311,7 @@ var InMemoryMemory = class extends MemoryStorage {
|
|
|
311
311
|
}) {
|
|
312
312
|
this.logger.debug(`MockStore: getMessagesById called`);
|
|
313
313
|
const rawMessages = messageIds.map((id) => this.collection.messages.get(id)).filter((message) => !!message);
|
|
314
|
-
const list = new
|
|
314
|
+
const list = new chunkD3UG2YLU_cjs.MessageList().add(rawMessages.map(this.parseStoredMessage), "memory");
|
|
315
315
|
if (format === "v1") return list.get.all.v1();
|
|
316
316
|
return list.get.all.v2();
|
|
317
317
|
}
|
|
@@ -341,7 +341,7 @@ var InMemoryMemory = class extends MemoryStorage {
|
|
|
341
341
|
};
|
|
342
342
|
this.collection.messages.set(key, storageMessage);
|
|
343
343
|
}
|
|
344
|
-
const list = new
|
|
344
|
+
const list = new chunkD3UG2YLU_cjs.MessageList().add(messages, "memory");
|
|
345
345
|
if (format === `v2`) return list.get.all.v2();
|
|
346
346
|
return list.get.all.v1();
|
|
347
347
|
}
|
|
@@ -816,6 +816,8 @@ var ObservabilityInMemory = class extends ObservabilityStorage {
|
|
|
816
816
|
return spans.filter((span) => {
|
|
817
817
|
if (filter?.name && span.name !== filter.name) return false;
|
|
818
818
|
if (filter?.spanType && span.spanType !== filter.spanType) return false;
|
|
819
|
+
if (filter?.entityType === "agent" && filter.entityId !== span.attributes?.agentId) return false;
|
|
820
|
+
if (filter?.entityType === "workflow" && filter.entityId !== span.attributes?.workflowId) return false;
|
|
819
821
|
return true;
|
|
820
822
|
});
|
|
821
823
|
}
|