@mastra/core 0.16.2 → 0.16.3-alpha.1
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 +44 -0
- package/dist/agent/agent.d.ts +316 -0
- package/dist/agent/agent.d.ts.map +1 -0
- package/dist/agent/agent.types.d.ts +19 -2
- package/dist/agent/agent.types.d.ts.map +1 -1
- package/dist/agent/index.cjs +11 -11
- package/dist/agent/index.d.ts +4 -313
- 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/types.d.ts +8 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/ai-tracing/base.d.ts.map +1 -1
- package/dist/ai-tracing/context.d.ts.map +1 -1
- package/dist/ai-tracing/default.d.ts +1 -2
- package/dist/ai-tracing/default.d.ts.map +1 -1
- package/dist/ai-tracing/exporters/cloud.d.ts +32 -0
- package/dist/ai-tracing/exporters/cloud.d.ts.map +1 -0
- package/dist/ai-tracing/exporters/default.d.ts.map +1 -1
- package/dist/ai-tracing/exporters/index.d.ts +2 -0
- package/dist/ai-tracing/exporters/index.d.ts.map +1 -1
- package/dist/ai-tracing/index.cjs +36 -40
- package/dist/ai-tracing/index.js +1 -1
- package/dist/ai-tracing/no-op.d.ts +1 -0
- package/dist/ai-tracing/no-op.d.ts.map +1 -1
- package/dist/ai-tracing/registry.d.ts.map +1 -1
- package/dist/ai-tracing/types.d.ts +39 -14
- package/dist/ai-tracing/types.d.ts.map +1 -1
- package/dist/ai-tracing/utils.d.ts +29 -19
- package/dist/ai-tracing/utils.d.ts.map +1 -1
- package/dist/{chunk-JLVFFZT7.cjs → chunk-2LEMTQEN.cjs} +4 -4
- package/dist/{chunk-JLVFFZT7.cjs.map → chunk-2LEMTQEN.cjs.map} +1 -1
- package/dist/{chunk-6RVOPJVP.cjs → chunk-37GX66ZQ.cjs} +7 -7
- package/dist/{chunk-6RVOPJVP.cjs.map → chunk-37GX66ZQ.cjs.map} +1 -1
- package/dist/{chunk-IMDDMIVR.cjs → chunk-3CYEVZGC.cjs} +6 -6
- package/dist/{chunk-IMDDMIVR.cjs.map → chunk-3CYEVZGC.cjs.map} +1 -1
- package/dist/{chunk-P67M4R6G.js → chunk-46ZMVRXN.js} +5 -5
- package/dist/{chunk-P67M4R6G.js.map → chunk-46ZMVRXN.js.map} +1 -1
- package/dist/chunk-4WQYXT2I.cjs +12 -0
- package/dist/chunk-4WQYXT2I.cjs.map +1 -0
- package/dist/{chunk-YYRE76UM.js → chunk-6ILOFPTU.js} +4 -4
- package/dist/{chunk-YYRE76UM.js.map → chunk-6ILOFPTU.js.map} +1 -1
- package/dist/{chunk-YI3AIJJL.js → chunk-7ARB2XCY.js} +4 -4
- package/dist/chunk-7ARB2XCY.js.map +1 -0
- package/dist/{chunk-SJO2HEVU.cjs → chunk-AV5QBG6P.cjs} +185 -125
- package/dist/chunk-AV5QBG6P.cjs.map +1 -0
- package/dist/{chunk-RVNDGKE5.js → chunk-BE6HGZV7.js} +3 -3
- package/dist/{chunk-RVNDGKE5.js.map → chunk-BE6HGZV7.js.map} +1 -1
- package/dist/chunk-CM4UEIAB.cjs +808 -0
- package/dist/chunk-CM4UEIAB.cjs.map +1 -0
- package/dist/{chunk-DUABZASJ.js → chunk-DWGGSV3L.js} +4 -4
- package/dist/{chunk-DUABZASJ.js.map → chunk-DWGGSV3L.js.map} +1 -1
- package/dist/chunk-HHRWDBFK.js +737 -0
- package/dist/chunk-HHRWDBFK.js.map +1 -0
- package/dist/{chunk-D3UG2YLU.cjs → chunk-I77GWNQI.cjs} +5 -5
- package/dist/chunk-I77GWNQI.cjs.map +1 -0
- package/dist/chunk-PJKCPRYF.js +3 -0
- package/dist/chunk-PJKCPRYF.js.map +1 -0
- package/dist/{chunk-ZIDWSQFD.cjs → chunk-PPMRSBCA.cjs} +8 -8
- package/dist/{chunk-ZIDWSQFD.cjs.map → chunk-PPMRSBCA.cjs.map} +1 -1
- package/dist/{chunk-YBKHXKRR.js → chunk-SLQGF75B.js} +3 -3
- package/dist/{chunk-YBKHXKRR.js.map → chunk-SLQGF75B.js.map} +1 -1
- package/dist/{chunk-OYHHJUTH.cjs → chunk-VK7LOYGD.cjs} +12 -12
- package/dist/{chunk-OYHHJUTH.cjs.map → chunk-VK7LOYGD.cjs.map} +1 -1
- package/dist/{chunk-UGCG7DI3.cjs → chunk-VVUCWRGD.cjs} +855 -87
- package/dist/chunk-VVUCWRGD.cjs.map +1 -0
- package/dist/{chunk-2NKNTPFR.js → chunk-W5K2KOZX.js} +834 -85
- package/dist/chunk-W5K2KOZX.js.map +1 -0
- package/dist/{chunk-BQ43NQXK.js → chunk-WAN6BRTN.js} +182 -122
- package/dist/chunk-WAN6BRTN.js.map +1 -0
- package/dist/index.cjs +38 -38
- package/dist/index.js +7 -7
- package/dist/llm/model/base.types.d.ts +6 -4
- package/dist/llm/model/base.types.d.ts.map +1 -1
- package/dist/llm/model/model.d.ts +0 -2
- package/dist/llm/model/model.d.ts.map +1 -1
- package/dist/llm/model/model.loop.d.ts.map +1 -1
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +1 -1
- package/dist/loop/loop.d.ts.map +1 -1
- package/dist/loop/network/index.d.ts +139 -0
- package/dist/loop/network/index.d.ts.map +1 -0
- package/dist/loop/test-utils/streamObject.d.ts.map +1 -1
- package/dist/loop/types.d.ts +2 -0
- package/dist/loop/types.d.ts.map +1 -1
- package/dist/loop/workflow/llm-execution.d.ts +5 -5
- package/dist/loop/workflow/llm-execution.d.ts.map +1 -1
- package/dist/loop/workflow/outer-llm-step.d.ts +2 -2
- package/dist/loop/workflow/schema.d.ts +12 -12
- package/dist/loop/workflow/stream.d.ts.map +1 -1
- package/dist/loop/workflow/tool-call-step.d.ts +10 -10
- 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 +6 -3
- package/dist/network/index.cjs.map +1 -1
- package/dist/network/index.js +5 -2
- package/dist/network/index.js.map +1 -1
- package/dist/network/network.d.ts.map +1 -1
- package/dist/network/vNext/index.cjs +32 -30
- package/dist/network/vNext/index.cjs.map +1 -1
- package/dist/network/vNext/index.d.ts +7 -7
- package/dist/network/vNext/index.d.ts.map +1 -1
- package/dist/network/vNext/index.js +5 -3
- package/dist/network/vNext/index.js.map +1 -1
- package/dist/processors/index.cjs +8 -8
- package/dist/processors/index.js +2 -2
- package/dist/processors/runner.d.ts +2 -2
- package/dist/processors/runner.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/scores/types.d.ts +2 -2
- package/dist/storage/index.cjs +3 -3
- package/dist/storage/index.js +1 -1
- package/dist/stream/MastraWorkflowStream.d.ts +1 -1
- package/dist/stream/base/output-format-handlers.d.ts.map +1 -1
- package/dist/stream/base/output.d.ts +13 -3
- package/dist/stream/base/output.d.ts.map +1 -1
- package/dist/stream/base/schema.d.ts +3 -2
- package/dist/stream/base/schema.d.ts.map +1 -1
- package/dist/stream/index.cjs +3 -3
- package/dist/stream/index.d.ts +1 -1
- package/dist/stream/index.d.ts.map +1 -1
- package/dist/stream/index.js +1 -1
- package/dist/stream/types.d.ts +139 -1
- package/dist/stream/types.d.ts.map +1 -1
- package/dist/test-utils/llm-mock.cjs +2 -2
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/utils.cjs +17 -17
- package/dist/utils.js +1 -1
- package/dist/workflows/default.d.ts +3 -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/execution-engine.d.ts +2 -2
- package/dist/workflows/execution-engine.d.ts.map +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/legacy/machine.d.ts +1 -1
- package/dist/workflows/legacy/workflow.d.ts +1 -1
- package/dist/workflows/types.d.ts +5 -4
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/workflow.d.ts +8 -4
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/dist/zod-to-json.cjs +2 -2
- package/dist/zod-to-json.cjs.map +1 -1
- package/dist/zod-to-json.js +1 -1
- package/dist/zod-to-json.js.map +1 -1
- package/package.json +5 -5
- package/dist/chunk-2NKNTPFR.js.map +0 -1
- package/dist/chunk-3MSZBGO3.js +0 -15991
- package/dist/chunk-3MSZBGO3.js.map +0 -1
- package/dist/chunk-BJASJTXK.cjs +0 -16061
- package/dist/chunk-BJASJTXK.cjs.map +0 -1
- package/dist/chunk-BQ43NQXK.js.map +0 -1
- package/dist/chunk-D3UG2YLU.cjs.map +0 -1
- package/dist/chunk-KB4IEMPV.cjs +0 -548
- package/dist/chunk-KB4IEMPV.cjs.map +0 -1
- package/dist/chunk-SJO2HEVU.cjs.map +0 -1
- package/dist/chunk-TDLB5JKT.js +0 -527
- package/dist/chunk-TDLB5JKT.js.map +0 -1
- package/dist/chunk-UGCG7DI3.cjs.map +0 -1
- package/dist/chunk-YI3AIJJL.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
+
## 0.16.3-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Delayed deprecation notice for streamVNext() replacing stream() until Sept 23rd ([#7739](https://github.com/mastra-ai/mastra/pull/7739))
|
|
8
|
+
|
|
9
|
+
- Fix onFinish callback in VNext functions to properly resolve the result ([#7733](https://github.com/mastra-ai/mastra/pull/7733))
|
|
10
|
+
|
|
11
|
+
- cleanup ([#7736](https://github.com/mastra-ai/mastra/pull/7736))
|
|
12
|
+
|
|
13
|
+
## 0.16.3-alpha.0
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- dependencies updates: ([#7545](https://github.com/mastra-ai/mastra/pull/7545))
|
|
18
|
+
- Updated dependency [`hono@^4.9.6` ↗︎](https://www.npmjs.com/package/hono/v/4.9.6) (from `^4.8.12`, in `dependencies`)
|
|
19
|
+
|
|
20
|
+
- support JSONSchema7 output option with generateVNext, streamVNext ([#7630](https://github.com/mastra-ai/mastra/pull/7630))
|
|
21
|
+
|
|
22
|
+
- various improvements to input & output data on ai spans ([#7636](https://github.com/mastra-ai/mastra/pull/7636))
|
|
23
|
+
|
|
24
|
+
- add network method ([#7704](https://github.com/mastra-ai/mastra/pull/7704))
|
|
25
|
+
|
|
26
|
+
- Fix memory not being affected by agent output processors (#7087). Output processors now correctly modify messages before they are saved to memory storage. The fix ensures that any transformations applied by output processors (like redacting sensitive information) are properly propagated to the memory system. ([#7647](https://github.com/mastra-ai/mastra/pull/7647))
|
|
27
|
+
|
|
28
|
+
- Fix agent structuredOutput option types ([#7668](https://github.com/mastra-ai/mastra/pull/7668))
|
|
29
|
+
|
|
30
|
+
- "added output to agent spans in ai-tracing" ([#7717](https://github.com/mastra-ai/mastra/pull/7717))
|
|
31
|
+
|
|
32
|
+
- Ensure system messages are persisted in processedList ([#7715](https://github.com/mastra-ai/mastra/pull/7715))
|
|
33
|
+
|
|
34
|
+
- AN Merge pt 1 ([#7702](https://github.com/mastra-ai/mastra/pull/7702))
|
|
35
|
+
|
|
36
|
+
- Custom metadata for traces can now be set when starting agents or workflows ([#7689](https://github.com/mastra-ai/mastra/pull/7689))
|
|
37
|
+
|
|
38
|
+
- Workflow & Agent executions now return traceId. ([#7663](https://github.com/mastra-ai/mastra/pull/7663))
|
|
39
|
+
|
|
40
|
+
- fixed bugs in observability config parsing ([#7669](https://github.com/mastra-ai/mastra/pull/7669))
|
|
41
|
+
|
|
42
|
+
- fix playground UI issue about dynmic workflow exec in agent thread ([#7665](https://github.com/mastra-ai/mastra/pull/7665))
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [[`779d469`](https://github.com/mastra-ai/mastra/commit/779d469366bb9f7fcb6d1638fdabb9f3acc49218)]:
|
|
45
|
+
- @mastra/schema-compat@0.11.3-alpha.0
|
|
46
|
+
|
|
3
47
|
## 0.16.2
|
|
4
48
|
|
|
5
49
|
### Patch Changes
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import type { WritableStream } from 'stream/web';
|
|
2
|
+
import type { CoreMessage, StreamObjectResult, UIMessage } from 'ai';
|
|
3
|
+
import type { JSONSchema7 } from 'json-schema';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import type { ZodSchema } from 'zod';
|
|
6
|
+
import type { MastraPrimitives } from '../action/index.js';
|
|
7
|
+
import { AISpanType } from '../ai-tracing/index.js';
|
|
8
|
+
import type { AISpan, TracingContext, TracingOptions, TracingProperties } from '../ai-tracing/index.js';
|
|
9
|
+
import { MastraBase } from '../base.js';
|
|
10
|
+
import type { Metric } from '../eval/index.js';
|
|
11
|
+
import { MastraLLMV1 } from '../llm/model/index.js';
|
|
12
|
+
import type { GenerateObjectResult, GenerateTextResult, StreamTextResult } from '../llm/model/base.types.js';
|
|
13
|
+
import { MastraLLMVNext } from '../llm/model/model.loop.js';
|
|
14
|
+
import type { MastraLanguageModel } from '../llm/model/shared.types.js';
|
|
15
|
+
import type { Mastra } from '../mastra/index.js';
|
|
16
|
+
import type { MastraMemory } from '../memory/memory.js';
|
|
17
|
+
import type { MemoryConfig, StorageThreadType } from '../memory/types.js';
|
|
18
|
+
import { RuntimeContext } from '../runtime-context/index.js';
|
|
19
|
+
import type { ScorerRunInputForAgent, ScorerRunOutputForAgent, MastraScorers, MastraScorer } from '../scores/index.js';
|
|
20
|
+
import type { AISDKV5OutputStream } from '../stream/index.js';
|
|
21
|
+
import type { MastraModelOutput } from '../stream/base/output.js';
|
|
22
|
+
import type { OutputSchema } from '../stream/base/schema.js';
|
|
23
|
+
import type { ChunkType } from '../stream/types.js';
|
|
24
|
+
import type { CoreTool } from '../tools/types.js';
|
|
25
|
+
import type { DynamicArgument } from '../types.js';
|
|
26
|
+
import type { CompositeVoice } from '../voice/index.js';
|
|
27
|
+
import { DefaultVoice } from '../voice/index.js';
|
|
28
|
+
import type { Workflow } from '../workflows/index.js';
|
|
29
|
+
import { LegacyStep as Step } from '../workflows/legacy/index.js';
|
|
30
|
+
import type { AgentExecutionOptions, MultiPrimitiveExecutionOptions } from './agent.types.js';
|
|
31
|
+
import { MessageList } from './message-list/index.js';
|
|
32
|
+
import type { MessageInput, MessageListInput, UIMessageWithMetadata } from './message-list/index.js';
|
|
33
|
+
import { SaveQueueManager } from './save-queue/index.js';
|
|
34
|
+
import type { AgentConfig, AgentGenerateOptions, AgentStreamOptions, ToolsetsInput, ToolsInput } from './types.js';
|
|
35
|
+
export type MastraLLM = MastraLLMV1 | MastraLLMVNext;
|
|
36
|
+
export declare class Agent<TAgentId extends string = string, TTools extends ToolsInput = ToolsInput, TMetrics extends Record<string, Metric> = Record<string, Metric>> extends MastraBase {
|
|
37
|
+
#private;
|
|
38
|
+
id: TAgentId;
|
|
39
|
+
name: TAgentId;
|
|
40
|
+
model?: DynamicArgument<MastraLanguageModel>;
|
|
41
|
+
evals: TMetrics;
|
|
42
|
+
private _agentNetworkAppend;
|
|
43
|
+
constructor(config: AgentConfig<TAgentId, TTools, TMetrics>);
|
|
44
|
+
getMastraInstance(): Mastra<Record<string, Agent<any, ToolsInput, Record<string, Metric>>>, Record<string, import("../workflows/legacy").LegacyWorkflow<Step<string, any, any, import("../workflows/legacy").StepExecutionContext<any, import("../workflows/legacy").WorkflowContext<any, Step<string, any, any, any>[], Record<string, any>>>>[], string, any, any>>, Record<string, Workflow<any, import("..").Step<string, any, any, any, any, any>[], string, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>>>, Record<string, import("../vector").MastraVector<import("../vector/filter").VectorFilter>>, Record<string, import("../tts").MastraTTS>, import("../logger").IMastraLogger, Record<string, import("../network").AgentNetwork>, Record<string, import("../network/vNext").NewAgentNetwork>, Record<string, import("../mcp").MCPServerBase>, Record<string, MastraScorer<any, any, any, any>>> | undefined;
|
|
45
|
+
listAgents({ runtimeContext }?: {
|
|
46
|
+
runtimeContext?: RuntimeContext;
|
|
47
|
+
}): Record<string, Agent<string, ToolsInput, Record<string, Metric>>> | Promise<Record<string, Agent<string, ToolsInput, Record<string, Metric>>>>;
|
|
48
|
+
private getProcessorRunner;
|
|
49
|
+
private getResolvedOutputProcessors;
|
|
50
|
+
hasOwnMemory(): boolean;
|
|
51
|
+
getMemory({ runtimeContext }?: {
|
|
52
|
+
runtimeContext?: RuntimeContext;
|
|
53
|
+
}): Promise<MastraMemory | undefined>;
|
|
54
|
+
get voice(): CompositeVoice;
|
|
55
|
+
getWorkflows({ runtimeContext, }?: {
|
|
56
|
+
runtimeContext?: RuntimeContext;
|
|
57
|
+
}): Promise<Record<string, Workflow>>;
|
|
58
|
+
getScorers({ runtimeContext, }?: {
|
|
59
|
+
runtimeContext?: RuntimeContext;
|
|
60
|
+
}): Promise<MastraScorers>;
|
|
61
|
+
getVoice({ runtimeContext }?: {
|
|
62
|
+
runtimeContext?: RuntimeContext;
|
|
63
|
+
}): Promise<CompositeVoice | DefaultVoice>;
|
|
64
|
+
get instructions(): string;
|
|
65
|
+
getInstructions({ runtimeContext }?: {
|
|
66
|
+
runtimeContext?: RuntimeContext;
|
|
67
|
+
}): string | Promise<string>;
|
|
68
|
+
getDescription(): string;
|
|
69
|
+
getDefaultGenerateOptions({ runtimeContext, }?: {
|
|
70
|
+
runtimeContext?: RuntimeContext;
|
|
71
|
+
}): AgentGenerateOptions | Promise<AgentGenerateOptions>;
|
|
72
|
+
getDefaultStreamOptions({ runtimeContext }?: {
|
|
73
|
+
runtimeContext?: RuntimeContext;
|
|
74
|
+
}): AgentStreamOptions | Promise<AgentStreamOptions>;
|
|
75
|
+
getDefaultVNextStreamOptions<Output extends ZodSchema | undefined, StructuredOutput extends ZodSchema | undefined>({ runtimeContext }?: {
|
|
76
|
+
runtimeContext?: RuntimeContext;
|
|
77
|
+
}): AgentExecutionOptions<Output, StructuredOutput> | Promise<AgentExecutionOptions<Output, StructuredOutput>>;
|
|
78
|
+
get tools(): TTools;
|
|
79
|
+
getTools({ runtimeContext }?: {
|
|
80
|
+
runtimeContext?: RuntimeContext;
|
|
81
|
+
}): TTools | Promise<TTools>;
|
|
82
|
+
get llm(): MastraLLM | Promise<MastraLLM>;
|
|
83
|
+
/**
|
|
84
|
+
* Gets or creates an LLM instance based on the current model
|
|
85
|
+
* @param options Options for getting the LLM
|
|
86
|
+
* @returns A promise that resolves to the LLM instance
|
|
87
|
+
*/
|
|
88
|
+
getLLM({ runtimeContext, model, }?: {
|
|
89
|
+
runtimeContext?: RuntimeContext;
|
|
90
|
+
model?: MastraLanguageModel | DynamicArgument<MastraLanguageModel>;
|
|
91
|
+
}): MastraLLM | Promise<MastraLLM>;
|
|
92
|
+
/**
|
|
93
|
+
* Gets the model, resolving it if it's a function
|
|
94
|
+
* @param options Options for getting the model
|
|
95
|
+
* @returns A promise that resolves to the model
|
|
96
|
+
*/
|
|
97
|
+
getModel({ runtimeContext }?: {
|
|
98
|
+
runtimeContext?: RuntimeContext;
|
|
99
|
+
}): MastraLanguageModel | Promise<MastraLanguageModel>;
|
|
100
|
+
__updateInstructions(newInstructions: string): void;
|
|
101
|
+
__updateModel({ model }: {
|
|
102
|
+
model: DynamicArgument<MastraLanguageModel>;
|
|
103
|
+
}): void;
|
|
104
|
+
__registerPrimitives(p: MastraPrimitives): void;
|
|
105
|
+
__registerMastra(mastra: Mastra): void;
|
|
106
|
+
/**
|
|
107
|
+
* Set the concrete tools for the agent
|
|
108
|
+
* @param tools
|
|
109
|
+
*/
|
|
110
|
+
__setTools(tools: TTools): void;
|
|
111
|
+
generateTitleFromUserMessage({ message, runtimeContext, tracingContext, model, instructions, }: {
|
|
112
|
+
message: string | MessageInput;
|
|
113
|
+
runtimeContext?: RuntimeContext;
|
|
114
|
+
tracingContext: TracingContext;
|
|
115
|
+
model?: DynamicArgument<MastraLanguageModel>;
|
|
116
|
+
instructions?: DynamicArgument<string>;
|
|
117
|
+
}): Promise<string>;
|
|
118
|
+
getMostRecentUserMessage(messages: Array<UIMessage | UIMessageWithMetadata>): UIMessage | UIMessageWithMetadata | undefined;
|
|
119
|
+
genTitle(userMessage: string | MessageInput | undefined, runtimeContext: RuntimeContext, tracingContext: TracingContext, model?: DynamicArgument<MastraLanguageModel>, instructions?: DynamicArgument<string>): Promise<string | undefined>;
|
|
120
|
+
fetchMemory({ threadId, thread: passedThread, memoryConfig, resourceId, runId, userMessages, systemMessage, messageList, runtimeContext, }: {
|
|
121
|
+
resourceId: string;
|
|
122
|
+
threadId: string;
|
|
123
|
+
thread?: StorageThreadType;
|
|
124
|
+
memoryConfig?: MemoryConfig;
|
|
125
|
+
userMessages?: CoreMessage[];
|
|
126
|
+
systemMessage?: CoreMessage;
|
|
127
|
+
runId?: string;
|
|
128
|
+
messageList?: MessageList;
|
|
129
|
+
runtimeContext?: RuntimeContext;
|
|
130
|
+
}): Promise<{
|
|
131
|
+
threadId: string;
|
|
132
|
+
messages: CoreMessage[];
|
|
133
|
+
}>;
|
|
134
|
+
private getMemoryTools;
|
|
135
|
+
private __runInputProcessors;
|
|
136
|
+
private __runOutputProcessors;
|
|
137
|
+
private getMemoryMessages;
|
|
138
|
+
private getAssignedTools;
|
|
139
|
+
private getToolsets;
|
|
140
|
+
private getClientTools;
|
|
141
|
+
private getWorkflowTools;
|
|
142
|
+
private convertTools;
|
|
143
|
+
private formatTools;
|
|
144
|
+
/**
|
|
145
|
+
* Adds response messages from a step to the MessageList and schedules persistence.
|
|
146
|
+
* This is used for incremental saving: after each agent step, messages are added to a save queue
|
|
147
|
+
* and a debounced save operation is triggered to avoid redundant writes.
|
|
148
|
+
*
|
|
149
|
+
* @param result - The step result containing response messages.
|
|
150
|
+
* @param messageList - The MessageList instance for the current thread.
|
|
151
|
+
* @param threadId - The thread ID.
|
|
152
|
+
* @param memoryConfig - The memory configuration for saving.
|
|
153
|
+
* @param runId - (Optional) The run ID for logging.
|
|
154
|
+
*/
|
|
155
|
+
private saveStepMessages;
|
|
156
|
+
__primitive({ instructions, messages, context, thread, memoryConfig, resourceId, runId, toolsets, clientTools, runtimeContext, saveQueueManager, writableStream, methodType, tracingContext, tracingOptions, }: {
|
|
157
|
+
instructions: string;
|
|
158
|
+
toolsets?: ToolsetsInput;
|
|
159
|
+
clientTools?: ToolsInput;
|
|
160
|
+
resourceId?: string;
|
|
161
|
+
thread?: (Partial<StorageThreadType> & {
|
|
162
|
+
id: string;
|
|
163
|
+
}) | undefined;
|
|
164
|
+
memoryConfig?: MemoryConfig;
|
|
165
|
+
context?: CoreMessage[];
|
|
166
|
+
runId?: string;
|
|
167
|
+
messages: MessageListInput;
|
|
168
|
+
runtimeContext: RuntimeContext;
|
|
169
|
+
saveQueueManager: SaveQueueManager;
|
|
170
|
+
writableStream?: WritableStream<ChunkType>;
|
|
171
|
+
methodType: 'generate' | 'stream';
|
|
172
|
+
tracingContext?: TracingContext;
|
|
173
|
+
tracingOptions?: TracingOptions;
|
|
174
|
+
}): {
|
|
175
|
+
before: () => Promise<{
|
|
176
|
+
tripwire?: boolean | undefined;
|
|
177
|
+
tripwireReason?: string | undefined;
|
|
178
|
+
messageObjects: CoreMessage[];
|
|
179
|
+
convertedTools: Record<string, CoreTool>;
|
|
180
|
+
threadExists: boolean;
|
|
181
|
+
thread: undefined;
|
|
182
|
+
messageList: MessageList;
|
|
183
|
+
agentAISpan: AISpan<AISpanType.AGENT_RUN> | undefined;
|
|
184
|
+
} | {
|
|
185
|
+
threadExists: boolean;
|
|
186
|
+
tripwire?: boolean | undefined;
|
|
187
|
+
tripwireReason?: string | undefined;
|
|
188
|
+
convertedTools: Record<string, CoreTool>;
|
|
189
|
+
thread: StorageThreadType;
|
|
190
|
+
messageList: MessageList;
|
|
191
|
+
messageObjects: CoreMessage[];
|
|
192
|
+
agentAISpan: AISpan<AISpanType.AGENT_RUN> | undefined;
|
|
193
|
+
}>;
|
|
194
|
+
after: ({ result, thread: threadAfter, threadId, memoryConfig, outputText, runId, messageList, threadExists, structuredOutput, overrideScorers, agentAISpan, }: {
|
|
195
|
+
runId: string;
|
|
196
|
+
result: Record<string, any>;
|
|
197
|
+
thread: StorageThreadType | null | undefined;
|
|
198
|
+
threadId?: string;
|
|
199
|
+
memoryConfig: MemoryConfig | undefined;
|
|
200
|
+
outputText: string;
|
|
201
|
+
messageList: MessageList;
|
|
202
|
+
threadExists: boolean;
|
|
203
|
+
structuredOutput?: boolean;
|
|
204
|
+
overrideScorers?: MastraScorers;
|
|
205
|
+
agentAISpan?: AISpan<AISpanType.AGENT_RUN>;
|
|
206
|
+
}) => Promise<{
|
|
207
|
+
scoringData: {
|
|
208
|
+
input: Omit<ScorerRunInputForAgent, "runId">;
|
|
209
|
+
output: ScorerRunOutputForAgent;
|
|
210
|
+
};
|
|
211
|
+
}>;
|
|
212
|
+
};
|
|
213
|
+
private resolveOverrideScorerReferences;
|
|
214
|
+
private prepareLLMOptions;
|
|
215
|
+
network(messages: MessageListInput, options?: MultiPrimitiveExecutionOptions): Promise<import("stream/web").ReadableStream<any>>;
|
|
216
|
+
generateVNext<OUTPUT extends OutputSchema | undefined = undefined, STRUCTURED_OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' = 'mastra'>(messages: MessageListInput, options?: AgentExecutionOptions<OUTPUT, STRUCTURED_OUTPUT, FORMAT>): Promise<FORMAT extends 'aisdk' ? Awaited<ReturnType<AISDKV5OutputStream<OUTPUT>['getFullOutput']>> : Awaited<ReturnType<MastraModelOutput<OUTPUT>['getFullOutput']>>>;
|
|
217
|
+
streamVNext<OUTPUT extends OutputSchema | undefined = undefined, STRUCTURED_OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined, FORMAT extends 'mastra' | 'aisdk' | undefined = undefined>(messages: MessageListInput, streamOptions?: AgentExecutionOptions<OUTPUT, STRUCTURED_OUTPUT, FORMAT>): Promise<FORMAT extends 'aisdk' ? AISDKV5OutputStream<OUTPUT> : MastraModelOutput<OUTPUT>>;
|
|
218
|
+
generate(messages: MessageListInput, args?: AgentGenerateOptions<undefined, undefined> & {
|
|
219
|
+
output?: never;
|
|
220
|
+
experimental_output?: never;
|
|
221
|
+
}): Promise<GenerateTextResult<any, undefined>>;
|
|
222
|
+
generate<OUTPUT extends ZodSchema | JSONSchema7>(messages: MessageListInput, args?: AgentGenerateOptions<OUTPUT, undefined> & {
|
|
223
|
+
output?: OUTPUT;
|
|
224
|
+
experimental_output?: never;
|
|
225
|
+
}): Promise<GenerateObjectResult<OUTPUT>>;
|
|
226
|
+
generate<EXPERIMENTAL_OUTPUT extends ZodSchema | JSONSchema7>(messages: MessageListInput, args?: AgentGenerateOptions<undefined, EXPERIMENTAL_OUTPUT> & {
|
|
227
|
+
output?: never;
|
|
228
|
+
experimental_output?: EXPERIMENTAL_OUTPUT;
|
|
229
|
+
}): Promise<GenerateTextResult<any, EXPERIMENTAL_OUTPUT>>;
|
|
230
|
+
generateLegacy(messages: MessageListInput, args?: AgentGenerateOptions<undefined, undefined> & {
|
|
231
|
+
output?: never;
|
|
232
|
+
experimental_output?: never;
|
|
233
|
+
}): Promise<GenerateTextResult<any, undefined>>;
|
|
234
|
+
generateLegacy<OUTPUT extends ZodSchema | JSONSchema7>(messages: MessageListInput, args?: AgentGenerateOptions<OUTPUT, undefined> & {
|
|
235
|
+
output?: OUTPUT;
|
|
236
|
+
experimental_output?: never;
|
|
237
|
+
}): Promise<GenerateObjectResult<OUTPUT>>;
|
|
238
|
+
generateLegacy<EXPERIMENTAL_OUTPUT extends ZodSchema | JSONSchema7>(messages: MessageListInput, args?: AgentGenerateOptions<undefined, EXPERIMENTAL_OUTPUT> & {
|
|
239
|
+
output?: never;
|
|
240
|
+
experimental_output?: EXPERIMENTAL_OUTPUT;
|
|
241
|
+
}): Promise<GenerateTextResult<any, EXPERIMENTAL_OUTPUT>>;
|
|
242
|
+
stream<OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined, EXPERIMENTAL_OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: MessageListInput, args?: AgentStreamOptions<OUTPUT, EXPERIMENTAL_OUTPUT> & {
|
|
243
|
+
output?: never;
|
|
244
|
+
experimental_output?: never;
|
|
245
|
+
}): Promise<StreamTextResult<any, OUTPUT extends ZodSchema ? z.infer<OUTPUT> : unknown>>;
|
|
246
|
+
stream<OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined, EXPERIMENTAL_OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: MessageListInput, args?: AgentStreamOptions<OUTPUT, EXPERIMENTAL_OUTPUT> & {
|
|
247
|
+
output?: OUTPUT;
|
|
248
|
+
experimental_output?: never;
|
|
249
|
+
}): Promise<StreamObjectResult<any, OUTPUT extends ZodSchema ? z.infer<OUTPUT> : unknown, any> & TracingProperties>;
|
|
250
|
+
stream<OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined, EXPERIMENTAL_OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: MessageListInput, args?: AgentStreamOptions<OUTPUT, EXPERIMENTAL_OUTPUT> & {
|
|
251
|
+
output?: never;
|
|
252
|
+
experimental_output?: EXPERIMENTAL_OUTPUT;
|
|
253
|
+
}): Promise<StreamTextResult<any, OUTPUT extends ZodSchema ? z.infer<OUTPUT> : unknown> & {
|
|
254
|
+
partialObjectStream: StreamTextResult<any, OUTPUT extends ZodSchema ? z.infer<OUTPUT> : EXPERIMENTAL_OUTPUT extends ZodSchema ? z.infer<EXPERIMENTAL_OUTPUT> : unknown>['experimental_partialOutputStream'];
|
|
255
|
+
}>;
|
|
256
|
+
streamLegacy<OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined, EXPERIMENTAL_OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: MessageListInput, args?: AgentStreamOptions<OUTPUT, EXPERIMENTAL_OUTPUT> & {
|
|
257
|
+
output?: never;
|
|
258
|
+
experimental_output?: never;
|
|
259
|
+
}): Promise<StreamTextResult<any, OUTPUT extends ZodSchema ? z.infer<OUTPUT> : unknown>>;
|
|
260
|
+
streamLegacy<OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined, EXPERIMENTAL_OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: MessageListInput, args?: AgentStreamOptions<OUTPUT, EXPERIMENTAL_OUTPUT> & {
|
|
261
|
+
output?: OUTPUT;
|
|
262
|
+
experimental_output?: never;
|
|
263
|
+
}): Promise<StreamObjectResult<any, OUTPUT extends ZodSchema ? z.infer<OUTPUT> : unknown, any> & TracingProperties>;
|
|
264
|
+
streamLegacy<OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined, EXPERIMENTAL_OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: MessageListInput, args?: AgentStreamOptions<OUTPUT, EXPERIMENTAL_OUTPUT> & {
|
|
265
|
+
output?: never;
|
|
266
|
+
experimental_output?: EXPERIMENTAL_OUTPUT;
|
|
267
|
+
}): Promise<StreamTextResult<any, OUTPUT extends ZodSchema ? z.infer<OUTPUT> : unknown> & {
|
|
268
|
+
partialObjectStream: StreamTextResult<any, OUTPUT extends ZodSchema ? z.infer<OUTPUT> : EXPERIMENTAL_OUTPUT extends ZodSchema ? z.infer<EXPERIMENTAL_OUTPUT> : unknown>['experimental_partialOutputStream'];
|
|
269
|
+
}>;
|
|
270
|
+
/**
|
|
271
|
+
* Convert text to speech using the configured voice provider
|
|
272
|
+
* @param input Text or text stream to convert to speech
|
|
273
|
+
* @param options Speech options including speaker and provider-specific options
|
|
274
|
+
* @returns Audio stream
|
|
275
|
+
* @deprecated Use agent.voice.speak() instead
|
|
276
|
+
*/
|
|
277
|
+
speak(input: string | NodeJS.ReadableStream, options?: {
|
|
278
|
+
speaker?: string;
|
|
279
|
+
[key: string]: any;
|
|
280
|
+
}): Promise<NodeJS.ReadableStream | void>;
|
|
281
|
+
/**
|
|
282
|
+
* Convert speech to text using the configured voice provider
|
|
283
|
+
* @param audioStream Audio stream to transcribe
|
|
284
|
+
* @param options Provider-specific transcription options
|
|
285
|
+
* @returns Text or text stream
|
|
286
|
+
* @deprecated Use agent.voice.listen() instead
|
|
287
|
+
*/
|
|
288
|
+
listen(audioStream: NodeJS.ReadableStream, options?: {
|
|
289
|
+
[key: string]: any;
|
|
290
|
+
}): Promise<string | NodeJS.ReadableStream | void>;
|
|
291
|
+
/**
|
|
292
|
+
* Get a list of available speakers from the configured voice provider
|
|
293
|
+
* @throws {Error} If no voice provider is configured
|
|
294
|
+
* @returns {Promise<Array<{voiceId: string}>>} List of available speakers
|
|
295
|
+
* @deprecated Use agent.voice.getSpeakers() instead
|
|
296
|
+
*/
|
|
297
|
+
getSpeakers(): Promise<{
|
|
298
|
+
voiceId: string;
|
|
299
|
+
}[]>;
|
|
300
|
+
toStep(): Step<TAgentId, z.ZodObject<{
|
|
301
|
+
prompt: z.ZodString;
|
|
302
|
+
}>, z.ZodObject<{
|
|
303
|
+
text: z.ZodString;
|
|
304
|
+
}>, any>;
|
|
305
|
+
/**
|
|
306
|
+
* Resolves the configuration for title generation.
|
|
307
|
+
* @private
|
|
308
|
+
*/
|
|
309
|
+
private resolveTitleGenerationConfig;
|
|
310
|
+
/**
|
|
311
|
+
* Resolves title generation instructions, handling both static strings and dynamic functions
|
|
312
|
+
* @private
|
|
313
|
+
*/
|
|
314
|
+
private resolveTitleInstructions;
|
|
315
|
+
}
|
|
316
|
+
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/agent/agent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACj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MAAM,CAAC;QACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,GACA,OAAO,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;IA4CxC;;;;;;OAMG;IACG,MAAM,CACV,WAAW,EAAE,MAAM,CAAC,cAAc,EAClC,OAAO,CAAC,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,GACA,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;IA2CjD;;;;;OAKG;IACG,WAAW;;;IA4CjB,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC;QAAE,MAAM,EAAE,CAAC,CAAC,SAAS,CAAA;KAAE,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC;QAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAA;KAAE,CAAC,EAAE,GAAG,CAAC;IAKvG;;;OAGG;IACH,OAAO,CAAC,4BAA4B;IAyBpC;;;OAGG;YACW,wBAAwB;CAwBvC"}
|
|
@@ -4,7 +4,7 @@ import type { ModelMessage, ToolChoice } from 'ai-v5';
|
|
|
4
4
|
import type { z } from 'zod';
|
|
5
5
|
import type { ZodSchema as ZodSchemaV3 } from 'zod/v3';
|
|
6
6
|
import type { ZodAny } from 'zod/v4';
|
|
7
|
-
import type { TracingContext } from '../ai-tracing/index.js';
|
|
7
|
+
import type { TracingContext, TracingOptions } from '../ai-tracing/index.js';
|
|
8
8
|
import type { StreamTextOnFinishCallback, StreamTextOnStepFinishCallback } from '../llm/model/base.types.js';
|
|
9
9
|
import type { LoopConfig, LoopOptions, PrepareStepFunction } from '../loop/types.js';
|
|
10
10
|
import type { InputProcessor, OutputProcessor } from '../processors/index.js';
|
|
@@ -14,6 +14,21 @@ import type { OutputSchema } from '../stream/base/schema.js';
|
|
|
14
14
|
import type { ChunkType } from '../stream/types.js';
|
|
15
15
|
import type { MessageListInput } from './message-list/index.js';
|
|
16
16
|
import type { AgentMemoryOption, ToolsetsInput, ToolsInput, StructuredOutputOptions } from './types.js';
|
|
17
|
+
export type MultiPrimitiveExecutionOptions = {
|
|
18
|
+
/** Memory configuration for conversation persistence and retrieval */
|
|
19
|
+
memory?: AgentMemoryOption;
|
|
20
|
+
/** Unique identifier for this execution run */
|
|
21
|
+
runId?: string;
|
|
22
|
+
/** Runtime context containing dynamic configuration and state */
|
|
23
|
+
runtimeContext?: RuntimeContext;
|
|
24
|
+
/** Maximum number of steps to run */
|
|
25
|
+
maxSteps?: number;
|
|
26
|
+
/** AI tracing context for span hierarchy and metadata */
|
|
27
|
+
tracingContext?: TracingContext;
|
|
28
|
+
/** Model-specific settings like temperature, maxTokens, topP, etc. */
|
|
29
|
+
modelSettings?: LoopOptions['modelSettings'];
|
|
30
|
+
telemetry?: TelemetrySettings;
|
|
31
|
+
};
|
|
17
32
|
export type AgentExecutionOptions<OUTPUT extends OutputSchema | undefined = undefined, STRUCTURED_OUTPUT extends ZodSchemaV3 | ZodAny | JSONSchema7 | undefined = undefined, FORMAT extends 'mastra' | 'aisdk' | undefined = undefined> = {
|
|
18
33
|
/**
|
|
19
34
|
* Determines the output stream format. Use 'mastra' for Mastra's native format (default) or 'aisdk' for AI SDK v5 compatibility.
|
|
@@ -65,7 +80,7 @@ export type AgentExecutionOptions<OUTPUT extends OutputSchema | undefined = unde
|
|
|
65
80
|
/** Output processors to use for this execution (overrides agent's default) */
|
|
66
81
|
outputProcessors?: OutputProcessor[];
|
|
67
82
|
/** Structured output generation with enhanced developer experience @experimental */
|
|
68
|
-
structuredOutput?: STRUCTURED_OUTPUT extends z.ZodTypeAny ?
|
|
83
|
+
structuredOutput?: StructuredOutputOptions<STRUCTURED_OUTPUT extends z.ZodTypeAny ? STRUCTURED_OUTPUT : never>;
|
|
69
84
|
/** Additional tool sets that can be used for this execution */
|
|
70
85
|
toolsets?: ToolsetsInput;
|
|
71
86
|
/** Client-side tools available during execution */
|
|
@@ -83,6 +98,8 @@ export type AgentExecutionOptions<OUTPUT extends OutputSchema | undefined = unde
|
|
|
83
98
|
returnScorerData?: boolean;
|
|
84
99
|
/** AI tracing context for span hierarchy and metadata */
|
|
85
100
|
tracingContext?: TracingContext;
|
|
101
|
+
/** AI tracing options for starting new traces */
|
|
102
|
+
tracingOptions?: TracingOptions;
|
|
86
103
|
/** Callback function called before each step of multi-step execution */
|
|
87
104
|
prepareStep?: PrepareStepFunction<any>;
|
|
88
105
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.types.d.ts","sourceRoot":"","sources":["../../src/agent/agent.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.types.d.ts","sourceRoot":"","sources":["../../src/agent/agent.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAA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AS,GAAG,SAAS,EACnD,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,IACvD,qBAAqB,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG;IAC/C,cAAc,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IAC3C,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,UAAU,GAAG,QAAQ,GAAG,aAAa,CAAC;CACnD,CAAC"}
|
package/dist/agent/index.cjs
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkCM4UEIAB_cjs = require('../chunk-CM4UEIAB.cjs');
|
|
4
|
+
var chunkI77GWNQI_cjs = require('../chunk-I77GWNQI.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "Agent", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkCM4UEIAB_cjs.Agent; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "LanguageDetectorInputProcessor", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkCM4UEIAB_cjs.LanguageDetectorInputProcessor; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "ModerationInputProcessor", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkCM4UEIAB_cjs.ModerationInputProcessor; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "PIIDetectorInputProcessor", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkCM4UEIAB_cjs.PIIDetectorInputProcessor; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "PromptInjectionDetectorInputProcessor", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkCM4UEIAB_cjs.PromptInjectionDetectorInputProcessor; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "TripWire", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkCM4UEIAB_cjs.TripWire; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "UnicodeNormalizerInputProcessor", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkCM4UEIAB_cjs.UnicodeNormalizerInputProcessor; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "MessageList", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkI77GWNQI_cjs.MessageList; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "convertMessages", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkI77GWNQI_cjs.convertMessages; }
|
|
43
43
|
});
|
|
44
44
|
//# sourceMappingURL=index.cjs.map
|
|
45
45
|
//# sourceMappingURL=index.cjs.map
|