@mastra/core 0.10.2-alpha.2 → 0.10.2-alpha.4
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/dist/agent/index.cjs +4 -4
- package/dist/agent/index.d.cts +1 -1
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +2 -2
- package/dist/{base-BUTjc86H.d.ts → base-CJfljebX.d.ts} +73 -20
- package/dist/{base-BIRXTC4Q.d.cts → base-D3nqrhQw.d.cts} +73 -20
- package/dist/{chunk-NY4KJJWC.js → chunk-3YEDPVNU.js} +1 -1
- package/dist/{chunk-KSPHQSZX.cjs → chunk-4ETGZJWF.cjs} +2 -2
- package/dist/{chunk-HONQGIUB.js → chunk-4YCQPROE.js} +24 -1
- package/dist/{chunk-4I6LG5EO.cjs → chunk-52MCT5OL.cjs} +2 -2
- package/dist/{chunk-EZYCQBP2.cjs → chunk-BCFBT6AN.cjs} +2 -2
- package/dist/{chunk-RVS6OUJN.cjs → chunk-E4PVJAEL.cjs} +23 -2
- package/dist/{chunk-BFNYQFG2.js → chunk-EWDGXKOQ.js} +100 -2
- package/dist/{chunk-QUCBJ363.cjs → chunk-EZDS6FFZ.cjs} +15 -14
- package/dist/{chunk-C3ICEF6E.js → chunk-JU3LCRM2.js} +1 -1
- package/dist/{chunk-KJQFFEEQ.js → chunk-KSJGZAMN.js} +22 -1
- package/dist/{chunk-75EMTCUM.js → chunk-L5ADXH5Q.js} +1 -1
- package/dist/{chunk-ZKN6HYYQ.js → chunk-MSJ24XNY.js} +1 -1
- package/dist/{chunk-XAO67QBR.cjs → chunk-OB2PB6SX.cjs} +15 -15
- package/dist/{chunk-2CK6E5UF.cjs → chunk-PD6WZC42.cjs} +4 -4
- package/dist/{chunk-5UFUPI3G.js → chunk-Q5L522HN.js} +1 -1
- package/dist/{chunk-VS2G3ZPT.cjs → chunk-SE4RJNUA.cjs} +25 -2
- package/dist/{chunk-UVRGQEMD.cjs → chunk-TICDQWVJ.cjs} +106 -2
- package/dist/{chunk-P7BGXOQV.cjs → chunk-U3XKEE2T.cjs} +19 -19
- package/dist/{chunk-LCCQWUQP.js → chunk-U47X2EYV.js} +15 -15
- package/dist/{chunk-D3237VN7.js → chunk-WCGRF63O.js} +9 -8
- package/dist/eval/index.d.cts +1 -1
- package/dist/eval/index.d.ts +1 -1
- package/dist/index.cjs +32 -32
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -10
- package/dist/integration/index.d.cts +1 -1
- package/dist/integration/index.d.ts +1 -1
- package/dist/llm/index.d.cts +1 -1
- package/dist/llm/index.d.ts +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.cts +1 -1
- package/dist/mastra/index.d.ts +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/mcp/index.d.cts +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/memory/index.cjs +4 -4
- package/dist/memory/index.d.cts +1 -1
- package/dist/memory/index.d.ts +1 -1
- package/dist/memory/index.js +1 -1
- package/dist/network/index.cjs +2 -2
- package/dist/network/index.d.cts +1 -1
- package/dist/network/index.d.ts +1 -1
- package/dist/network/index.js +1 -1
- package/dist/relevance/index.cjs +4 -4
- package/dist/relevance/index.d.cts +1 -1
- package/dist/relevance/index.d.ts +1 -1
- package/dist/relevance/index.js +1 -1
- package/dist/server/index.d.cts +2 -2
- package/dist/server/index.d.ts +2 -2
- package/dist/storage/index.cjs +16 -12
- package/dist/storage/index.d.cts +8 -3
- package/dist/storage/index.d.ts +8 -3
- package/dist/storage/index.js +9 -5
- package/dist/telemetry/index.cjs +7 -7
- package/dist/telemetry/index.d.cts +1 -1
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/tools/index.d.cts +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/tts/index.cjs +2 -2
- package/dist/tts/index.js +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/voice/index.cjs +4 -4
- package/dist/voice/index.d.cts +1 -1
- package/dist/voice/index.d.ts +1 -1
- package/dist/voice/index.js +1 -1
- package/dist/workflows/index.cjs +9 -9
- package/dist/workflows/index.d.cts +12 -7
- package/dist/workflows/index.d.ts +12 -7
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/legacy/index.cjs +22 -22
- package/dist/workflows/legacy/index.d.cts +2 -2
- package/dist/workflows/legacy/index.d.ts +2 -2
- package/dist/workflows/legacy/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-6KB5CPBV.cjs +0 -104
- package/dist/chunk-SEOWDGC2.js +0 -97
package/dist/agent/index.cjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkEZDS6FFZ_cjs = require('../chunk-EZDS6FFZ.cjs');
|
|
4
|
+
var chunkOB2PB6SX_cjs = require('../chunk-OB2PB6SX.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 chunkEZDS6FFZ_cjs.Agent; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "MessageList", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkOB2PB6SX_cjs.MessageList; }
|
|
15
15
|
});
|
package/dist/agent/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Message as AiMessageType } from 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export {
|
|
4
|
+
export { s as Agent, ab as AgentConfig, bN as AgentGenerateOptions, bO as AgentStreamOptions, bM as DynamicArgument, bh as MastraLanguageModel, bP as MastraMessageContentV2, e as MastraMessageV2, bK as MessageList, u as ToolsInput, bL as ToolsetsInput } from '../base-D3nqrhQw.cjs';
|
|
5
5
|
import '../base-aPYtPBT2.cjs';
|
|
6
6
|
import '../types-Bo1uigWx.cjs';
|
|
7
7
|
import '../runtime-context/index.cjs';
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Message as AiMessageType } from 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export {
|
|
4
|
+
export { s as Agent, ab as AgentConfig, bN as AgentGenerateOptions, bO as AgentStreamOptions, bM as DynamicArgument, bh as MastraLanguageModel, bP as MastraMessageContentV2, e as MastraMessageV2, bK as MessageList, u as ToolsInput, bL as ToolsetsInput } from '../base-CJfljebX.js';
|
|
5
5
|
import '../base-tc5kgDTD.js';
|
|
6
6
|
import '../types-Bo1uigWx.js';
|
|
7
7
|
import '../runtime-context/index.js';
|
package/dist/agent/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Agent } from '../chunk-
|
|
2
|
-
export { MessageList } from '../chunk-
|
|
1
|
+
export { Agent } from '../chunk-WCGRF63O.js';
|
|
2
|
+
export { MessageList } from '../chunk-U47X2EYV.js';
|
|
@@ -1041,6 +1041,7 @@ declare class LegacyWorkflow<TSteps extends LegacyStep<string, any, any>[] = Leg
|
|
|
1041
1041
|
}
|
|
1042
1042
|
|
|
1043
1043
|
type ExecuteFunction<TStepInput, TStepOutput, TResumeSchema, TSuspendSchema> = (params: {
|
|
1044
|
+
runId: string;
|
|
1044
1045
|
mastra: Mastra;
|
|
1045
1046
|
runtimeContext: RuntimeContext;
|
|
1046
1047
|
inputData: TStepInput;
|
|
@@ -1166,6 +1167,7 @@ interface WorkflowRunState {
|
|
|
1166
1167
|
context: {
|
|
1167
1168
|
input?: Record<string, any>;
|
|
1168
1169
|
} & Record<string, StepResult<any, any, any, any>>;
|
|
1170
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
1169
1171
|
activePaths: Array<unknown>;
|
|
1170
1172
|
suspendedPaths: Record<string, number[]>;
|
|
1171
1173
|
timestamp: number;
|
|
@@ -1198,6 +1200,7 @@ declare abstract class ExecutionEngine extends MastraBase {
|
|
|
1198
1200
|
workflowId: string;
|
|
1199
1201
|
runId: string;
|
|
1200
1202
|
graph: ExecutionGraph;
|
|
1203
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
1201
1204
|
input?: TInput;
|
|
1202
1205
|
resume?: {
|
|
1203
1206
|
steps: string[];
|
|
@@ -1472,6 +1475,10 @@ declare class Run<TSteps extends Step<string, any, any>[] = Step<string, any, an
|
|
|
1472
1475
|
* The execution graph for this run
|
|
1473
1476
|
*/
|
|
1474
1477
|
executionGraph: ExecutionGraph;
|
|
1478
|
+
/**
|
|
1479
|
+
* The serialized step graph for this run
|
|
1480
|
+
*/
|
|
1481
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
1475
1482
|
protected cleanup?: () => void;
|
|
1476
1483
|
protected retryConfig?: {
|
|
1477
1484
|
attempts?: number;
|
|
@@ -1488,6 +1495,7 @@ declare class Run<TSteps extends Step<string, any, any>[] = Step<string, any, an
|
|
|
1488
1495
|
delay?: number;
|
|
1489
1496
|
};
|
|
1490
1497
|
cleanup?: () => void;
|
|
1498
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
1491
1499
|
});
|
|
1492
1500
|
/**
|
|
1493
1501
|
* Starts the workflow execution with the provided input
|
|
@@ -1598,16 +1606,17 @@ type MastraMessageV1 = {
|
|
|
1598
1606
|
content: string | UserContent | AssistantContent | ToolContent;
|
|
1599
1607
|
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
1600
1608
|
createdAt: Date;
|
|
1601
|
-
threadId
|
|
1602
|
-
resourceId
|
|
1609
|
+
threadId?: string;
|
|
1610
|
+
resourceId?: string;
|
|
1603
1611
|
toolCallIds?: string[];
|
|
1604
1612
|
toolCallArgs?: Record<string, unknown>[];
|
|
1605
1613
|
toolNames?: string[];
|
|
1606
1614
|
type: 'text' | 'tool-call' | 'tool-result';
|
|
1607
1615
|
};
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1616
|
+
/**
|
|
1617
|
+
* @deprecated use MastraMessageV1 or MastraMessageV2
|
|
1618
|
+
*/
|
|
1619
|
+
type MessageType = MastraMessageV1;
|
|
1611
1620
|
type StorageThreadType = {
|
|
1612
1621
|
id: string;
|
|
1613
1622
|
title?: string;
|
|
@@ -1673,8 +1682,8 @@ declare class MessageList {
|
|
|
1673
1682
|
private taggedSystemMessages;
|
|
1674
1683
|
private memoryInfo;
|
|
1675
1684
|
private memoryMessages;
|
|
1676
|
-
private
|
|
1677
|
-
private
|
|
1685
|
+
private newUserMessages;
|
|
1686
|
+
private newResponseMessages;
|
|
1678
1687
|
private generateMessageId?;
|
|
1679
1688
|
constructor({ threadId, resourceId, generateMessageId, }?: {
|
|
1680
1689
|
threadId?: string;
|
|
@@ -1685,26 +1694,26 @@ declare class MessageList {
|
|
|
1685
1694
|
getLatestUserContent(): string | null;
|
|
1686
1695
|
get get(): {
|
|
1687
1696
|
all: {
|
|
1688
|
-
|
|
1697
|
+
v2: () => MastraMessageV2[];
|
|
1689
1698
|
v1: () => MastraMessageV1[];
|
|
1690
1699
|
ui: () => UIMessage[];
|
|
1691
1700
|
core: () => CoreMessage$1[];
|
|
1692
1701
|
prompt: () => CoreMessage$1[];
|
|
1693
1702
|
};
|
|
1694
1703
|
remembered: {
|
|
1695
|
-
|
|
1704
|
+
v2: () => MastraMessageV2[];
|
|
1696
1705
|
v1: () => MastraMessageV1[];
|
|
1697
1706
|
ui: () => UIMessage[];
|
|
1698
1707
|
core: () => CoreMessage$1[];
|
|
1699
1708
|
};
|
|
1700
1709
|
input: {
|
|
1701
|
-
|
|
1710
|
+
v2: () => MastraMessageV2[];
|
|
1702
1711
|
v1: () => MastraMessageV1[];
|
|
1703
1712
|
ui: () => UIMessage[];
|
|
1704
1713
|
core: () => CoreMessage$1[];
|
|
1705
1714
|
};
|
|
1706
1715
|
response: {
|
|
1707
|
-
|
|
1716
|
+
v2: () => MastraMessageV2[];
|
|
1708
1717
|
};
|
|
1709
1718
|
};
|
|
1710
1719
|
private all;
|
|
@@ -1854,17 +1863,28 @@ declare abstract class MastraMemory extends MastraBase {
|
|
|
1854
1863
|
* @param messages - Array of messages to save
|
|
1855
1864
|
* @returns Promise resolving to the saved messages
|
|
1856
1865
|
*/
|
|
1857
|
-
abstract saveMessages(
|
|
1858
|
-
messages: (MastraMessageV1 | MastraMessageV2)[];
|
|
1859
|
-
memoryConfig
|
|
1866
|
+
abstract saveMessages(args: {
|
|
1867
|
+
messages: (MastraMessageV1 | MastraMessageV2)[] | MastraMessageV1[] | MastraMessageV2[];
|
|
1868
|
+
memoryConfig?: MemoryConfig | undefined;
|
|
1869
|
+
format?: 'v1';
|
|
1870
|
+
}): Promise<MastraMessageV1[]>;
|
|
1871
|
+
abstract saveMessages(args: {
|
|
1872
|
+
messages: (MastraMessageV1 | MastraMessageV2)[] | MastraMessageV1[] | MastraMessageV2[];
|
|
1873
|
+
memoryConfig?: MemoryConfig | undefined;
|
|
1874
|
+
format: 'v2';
|
|
1860
1875
|
}): Promise<MastraMessageV2[]>;
|
|
1876
|
+
abstract saveMessages(args: {
|
|
1877
|
+
messages: (MastraMessageV1 | MastraMessageV2)[] | MastraMessageV1[] | MastraMessageV2[];
|
|
1878
|
+
memoryConfig?: MemoryConfig | undefined;
|
|
1879
|
+
format?: 'v1' | 'v2';
|
|
1880
|
+
}): Promise<MastraMessageV2[] | MastraMessageV1[]>;
|
|
1861
1881
|
/**
|
|
1862
1882
|
* Retrieves all messages for a specific thread
|
|
1863
1883
|
* @param threadId - The unique identifier of the thread
|
|
1864
1884
|
* @returns Promise resolving to array of messages and uiMessages
|
|
1865
1885
|
*/
|
|
1866
1886
|
abstract query({ threadId, resourceId, selectBy, }: StorageGetMessagesArg): Promise<{
|
|
1867
|
-
messages:
|
|
1887
|
+
messages: CoreMessage$1[];
|
|
1868
1888
|
uiMessages: UIMessage[];
|
|
1869
1889
|
}>;
|
|
1870
1890
|
/**
|
|
@@ -2128,6 +2148,13 @@ declare abstract class MastraVoice<TOptions = unknown, TSpeakOptions = unknown,
|
|
|
2128
2148
|
getSpeakers(): Promise<Array<{
|
|
2129
2149
|
voiceId: string;
|
|
2130
2150
|
} & TSpeakerMetadata>>;
|
|
2151
|
+
/**
|
|
2152
|
+
* Get available speakers/voices
|
|
2153
|
+
* @returns Array of available voice IDs and their metadata
|
|
2154
|
+
*/
|
|
2155
|
+
getListener(): Promise<{
|
|
2156
|
+
enabled: boolean;
|
|
2157
|
+
}>;
|
|
2131
2158
|
}
|
|
2132
2159
|
|
|
2133
2160
|
declare class CompositeVoice extends MastraVoice<unknown, unknown, unknown, ToolsInput, VoiceEventMap> {
|
|
@@ -2158,6 +2185,9 @@ declare class CompositeVoice extends MastraVoice<unknown, unknown, unknown, Tool
|
|
|
2158
2185
|
getSpeakers(): Promise<{
|
|
2159
2186
|
voiceId: string;
|
|
2160
2187
|
}[]>;
|
|
2188
|
+
getListener(): Promise<{
|
|
2189
|
+
enabled: boolean;
|
|
2190
|
+
}>;
|
|
2161
2191
|
updateConfig(options: Record<string, unknown>): void;
|
|
2162
2192
|
/**
|
|
2163
2193
|
* Initializes a WebSocket or WebRTC connection for real-time communication
|
|
@@ -2208,6 +2238,9 @@ declare class DefaultVoice extends MastraVoice {
|
|
|
2208
2238
|
getSpeakers(): Promise<{
|
|
2209
2239
|
voiceId: string;
|
|
2210
2240
|
}[]>;
|
|
2241
|
+
getListener(): Promise<{
|
|
2242
|
+
enabled: boolean;
|
|
2243
|
+
}>;
|
|
2211
2244
|
}
|
|
2212
2245
|
|
|
2213
2246
|
type ToolsInput = Record<string, ToolAction<any, any, any> | VercelTool>;
|
|
@@ -3137,7 +3170,7 @@ declare class Agent<TAgentId extends string = string, TTools extends ToolsInput
|
|
|
3137
3170
|
runtimeContext?: RuntimeContext;
|
|
3138
3171
|
}): Promise<string>;
|
|
3139
3172
|
getMostRecentUserMessage(messages: Array<UIMessage>): UIMessage | undefined;
|
|
3140
|
-
genTitle(userMessage: UIMessage | undefined): Promise<string>;
|
|
3173
|
+
genTitle(userMessage: UIMessage | undefined, runtimeContext: RuntimeContext): Promise<string>;
|
|
3141
3174
|
fetchMemory({ threadId, thread: passedThread, memoryConfig, resourceId, runId, messageList, }: {
|
|
3142
3175
|
resourceId: string;
|
|
3143
3176
|
threadId: string;
|
|
@@ -3310,10 +3343,30 @@ declare abstract class MastraStorage extends MastraBase {
|
|
|
3310
3343
|
abstract deleteThread({ threadId }: {
|
|
3311
3344
|
threadId: string;
|
|
3312
3345
|
}): Promise<void>;
|
|
3313
|
-
abstract getMessages(
|
|
3314
|
-
|
|
3315
|
-
|
|
3346
|
+
abstract getMessages(args: StorageGetMessagesArg & {
|
|
3347
|
+
format?: 'v1';
|
|
3348
|
+
}): Promise<MastraMessageV1[]>;
|
|
3349
|
+
abstract getMessages(args: StorageGetMessagesArg & {
|
|
3350
|
+
format: 'v2';
|
|
3351
|
+
}): Promise<MastraMessageV2[]>;
|
|
3352
|
+
abstract getMessages({ threadId, resourceId, selectBy, format, }: StorageGetMessagesArg & {
|
|
3353
|
+
format?: 'v1' | 'v2';
|
|
3354
|
+
}): Promise<MastraMessageV1[] | MastraMessageV2[]>;
|
|
3355
|
+
abstract saveMessages(args: {
|
|
3356
|
+
messages: MastraMessageV1[];
|
|
3357
|
+
format?: undefined | 'v1';
|
|
3358
|
+
}): Promise<MastraMessageV1[]>;
|
|
3359
|
+
abstract saveMessages(args: {
|
|
3360
|
+
messages: MastraMessageV2[];
|
|
3361
|
+
format: 'v2';
|
|
3316
3362
|
}): Promise<MastraMessageV2[]>;
|
|
3363
|
+
abstract saveMessages(args: {
|
|
3364
|
+
messages: MastraMessageV1[];
|
|
3365
|
+
format?: undefined | 'v1';
|
|
3366
|
+
} | {
|
|
3367
|
+
messages: MastraMessageV2[];
|
|
3368
|
+
format: 'v2';
|
|
3369
|
+
}): Promise<MastraMessageV2[] | MastraMessageV1[]>;
|
|
3317
3370
|
abstract getTraces({ name, scope, page, perPage, attributes, filters, }: {
|
|
3318
3371
|
name?: string;
|
|
3319
3372
|
scope?: string;
|
|
@@ -3349,4 +3402,4 @@ declare abstract class MastraStorage extends MastraBase {
|
|
|
3349
3402
|
}): Promise<WorkflowRun | null>;
|
|
3350
3403
|
}
|
|
3351
3404
|
|
|
3352
|
-
export { type
|
|
3405
|
+
export { type WorkflowActionParams as $, type ApiRoute as A, type StepNode as B, type ContextWithMastra as C, type StepGraph as D, type EvalRow as E, type BaseCondition as F, type ActionContext as G, WhenConditionReturnValue as H, type StepDef as I, type StepCondition as J, type StepConfig as K, type LegacyWorkflowRuns as L, type Methods as M, type StepsRecord$1 as N, type WorkflowLogMessage as O, type WorkflowEvent as P, type ResolverFunctionInput as Q, type RetryConfig as R, type StorageColumn as S, type TABLE_NAMES as T, type ResolverFunctionOutput as U, type VariableReference$1 as V, type WorkflowRuns as W, type SubscriberFunctionOutput as X, type DependencyCheckOutput as Y, type StepResolverOutput as Z, type WorkflowActors as _, Mastra as a, Run as a$, type WorkflowActions as a0, type LegacyWorkflowState as a1, type StepId as a2, type ExtractSchemaFromStep$1 as a3, type ExtractStepResult as a4, type StepInputType as a5, type ExtractSchemaType$1 as a6, type PathsToStringProps$1 as a7, type LegacyWorkflowRunState as a8, type WorkflowResumeResult as a9, type DefaultLLMStreamObjectOptions as aA, type LLMTextOptions as aB, type LLMTextObjectOptions as aC, type LLMStreamOptions as aD, type LLMInnerStreamOptions as aE, type LLMStreamObjectOptions as aF, createMockModel as aG, type Config as aH, type MessageType as aI, type MessageResponse as aJ, type MemoryConfig as aK, type SharedMemoryConfig as aL, type MemoryProcessorOpts as aM, MemoryProcessor as aN, memoryDefaultOptions as aO, createTool as aP, type VercelTool as aQ, type CoreTool as aR, type InternalCoreTool as aS, type StepFlowEntry as aT, type SerializedStep as aU, type SerializedStepFlowEntry as aV, createStep as aW, cloneStep as aX, createWorkflow as aY, cloneWorkflow as aZ, type WorkflowResult as a_, type ToolAction as aa, type AgentConfig as ab, MastraMemory as ac, type ToolExecutionContext as ad, Tool as ae, type Step as af, Workflow as ag, type WorkflowConfig as ah, type LanguageModel as ai, type CoreMessage as aj, type CoreSystemMessage as ak, type CoreAssistantMessage as al, type CoreUserMessage as am, type CoreToolMessage as an, type EmbedResult as ao, type EmbedManyResult as ap, type BaseStructuredOutputType as aq, type StructuredOutputType as ar, type StructuredOutputArrayItem as as, type StructuredOutput as at, type GenerateReturn as au, type StreamReturn as av, type OutputType as aw, type DefaultLLMTextOptions as ax, type DefaultLLMTextObjectOptions as ay, type DefaultLLMStreamOptions as az, type MastraAuthConfig as b, type ExecutionGraph as b0, ExecutionEngine as b1, type ExecuteFunction as b2, type StepSuccess as b3, type StepFailure as b4, type StepSuspended as b5, type StepRunning as b6, type StepResult as b7, type StepsRecord as b8, type DynamicMapping as b9, type NamedArgumentInfo as bA, type SubcommandInfo as bB, type CommandInfo as bC, type EnvironmentVariableInfo as bD, type PackageInfo as bE, type RemoteInfo as bF, type MCPServerConfig as bG, type ServerInfo as bH, type ServerDetailInfo as bI, type MCPToolType as bJ, MessageList as bK, type ToolsetsInput as bL, type DynamicArgument as bM, type AgentGenerateOptions as bN, type AgentStreamOptions as bO, type MastraMessageContentV2 as bP, type PathsToStringProps as ba, type ExtractSchemaType as bb, type ExtractSchemaFromStep as bc, type VariableReference as bd, type WatchEvent as be, type ZodPathType as bf, type WorkflowRunState as bg, type MastraLanguageModel as bh, type MastraPrimitives as bi, AgentNetwork as bj, MCPServerBase as bk, type VoiceEventType as bl, type VoiceEventMap as bm, type VoiceConfig as bn, MastraVoice as bo, CompositeVoice as bp, DefaultVoice as bq, type AgentNetworkConfig as br, type ConvertedTool as bs, type MCPServerSSEOptions as bt, type MCPServerHonoSSEOptions as bu, type MCPServerHTTPOptions as bv, type Repository as bw, type VersionDetail as bx, type ArgumentInfo as by, type PositionalArgumentInfo as bz, MastraStorage as c, type StorageThreadType as d, type MastraMessageV2 as e, type StorageGetMessagesArg as f, type MastraMessageV1 as g, type WorkflowRun as h, type LegacyWorkflowRun as i, TABLE_WORKFLOW_SNAPSHOT as j, TABLE_EVALS as k, TABLE_MESSAGES as l, TABLE_THREADS as m, TABLE_TRACES as n, TABLE_SCHEMAS as o, type StepResult$1 as p, LegacyStep as q, LegacyWorkflow as r, Agent as s, type WorkflowContext as t, type ToolsInput as u, type StepAction as v, type LegacyWorkflowRunResult as w, type WorkflowOptions as x, type StepExecutionContext as y, type StepVariableType as z };
|
|
@@ -1041,6 +1041,7 @@ declare class LegacyWorkflow<TSteps extends LegacyStep<string, any, any>[] = Leg
|
|
|
1041
1041
|
}
|
|
1042
1042
|
|
|
1043
1043
|
type ExecuteFunction<TStepInput, TStepOutput, TResumeSchema, TSuspendSchema> = (params: {
|
|
1044
|
+
runId: string;
|
|
1044
1045
|
mastra: Mastra;
|
|
1045
1046
|
runtimeContext: RuntimeContext;
|
|
1046
1047
|
inputData: TStepInput;
|
|
@@ -1166,6 +1167,7 @@ interface WorkflowRunState {
|
|
|
1166
1167
|
context: {
|
|
1167
1168
|
input?: Record<string, any>;
|
|
1168
1169
|
} & Record<string, StepResult<any, any, any, any>>;
|
|
1170
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
1169
1171
|
activePaths: Array<unknown>;
|
|
1170
1172
|
suspendedPaths: Record<string, number[]>;
|
|
1171
1173
|
timestamp: number;
|
|
@@ -1198,6 +1200,7 @@ declare abstract class ExecutionEngine extends MastraBase {
|
|
|
1198
1200
|
workflowId: string;
|
|
1199
1201
|
runId: string;
|
|
1200
1202
|
graph: ExecutionGraph;
|
|
1203
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
1201
1204
|
input?: TInput;
|
|
1202
1205
|
resume?: {
|
|
1203
1206
|
steps: string[];
|
|
@@ -1472,6 +1475,10 @@ declare class Run<TSteps extends Step<string, any, any>[] = Step<string, any, an
|
|
|
1472
1475
|
* The execution graph for this run
|
|
1473
1476
|
*/
|
|
1474
1477
|
executionGraph: ExecutionGraph;
|
|
1478
|
+
/**
|
|
1479
|
+
* The serialized step graph for this run
|
|
1480
|
+
*/
|
|
1481
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
1475
1482
|
protected cleanup?: () => void;
|
|
1476
1483
|
protected retryConfig?: {
|
|
1477
1484
|
attempts?: number;
|
|
@@ -1488,6 +1495,7 @@ declare class Run<TSteps extends Step<string, any, any>[] = Step<string, any, an
|
|
|
1488
1495
|
delay?: number;
|
|
1489
1496
|
};
|
|
1490
1497
|
cleanup?: () => void;
|
|
1498
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
1491
1499
|
});
|
|
1492
1500
|
/**
|
|
1493
1501
|
* Starts the workflow execution with the provided input
|
|
@@ -1598,16 +1606,17 @@ type MastraMessageV1 = {
|
|
|
1598
1606
|
content: string | UserContent | AssistantContent | ToolContent;
|
|
1599
1607
|
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
1600
1608
|
createdAt: Date;
|
|
1601
|
-
threadId
|
|
1602
|
-
resourceId
|
|
1609
|
+
threadId?: string;
|
|
1610
|
+
resourceId?: string;
|
|
1603
1611
|
toolCallIds?: string[];
|
|
1604
1612
|
toolCallArgs?: Record<string, unknown>[];
|
|
1605
1613
|
toolNames?: string[];
|
|
1606
1614
|
type: 'text' | 'tool-call' | 'tool-result';
|
|
1607
1615
|
};
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1616
|
+
/**
|
|
1617
|
+
* @deprecated use MastraMessageV1 or MastraMessageV2
|
|
1618
|
+
*/
|
|
1619
|
+
type MessageType = MastraMessageV1;
|
|
1611
1620
|
type StorageThreadType = {
|
|
1612
1621
|
id: string;
|
|
1613
1622
|
title?: string;
|
|
@@ -1673,8 +1682,8 @@ declare class MessageList {
|
|
|
1673
1682
|
private taggedSystemMessages;
|
|
1674
1683
|
private memoryInfo;
|
|
1675
1684
|
private memoryMessages;
|
|
1676
|
-
private
|
|
1677
|
-
private
|
|
1685
|
+
private newUserMessages;
|
|
1686
|
+
private newResponseMessages;
|
|
1678
1687
|
private generateMessageId?;
|
|
1679
1688
|
constructor({ threadId, resourceId, generateMessageId, }?: {
|
|
1680
1689
|
threadId?: string;
|
|
@@ -1685,26 +1694,26 @@ declare class MessageList {
|
|
|
1685
1694
|
getLatestUserContent(): string | null;
|
|
1686
1695
|
get get(): {
|
|
1687
1696
|
all: {
|
|
1688
|
-
|
|
1697
|
+
v2: () => MastraMessageV2[];
|
|
1689
1698
|
v1: () => MastraMessageV1[];
|
|
1690
1699
|
ui: () => UIMessage[];
|
|
1691
1700
|
core: () => CoreMessage$1[];
|
|
1692
1701
|
prompt: () => CoreMessage$1[];
|
|
1693
1702
|
};
|
|
1694
1703
|
remembered: {
|
|
1695
|
-
|
|
1704
|
+
v2: () => MastraMessageV2[];
|
|
1696
1705
|
v1: () => MastraMessageV1[];
|
|
1697
1706
|
ui: () => UIMessage[];
|
|
1698
1707
|
core: () => CoreMessage$1[];
|
|
1699
1708
|
};
|
|
1700
1709
|
input: {
|
|
1701
|
-
|
|
1710
|
+
v2: () => MastraMessageV2[];
|
|
1702
1711
|
v1: () => MastraMessageV1[];
|
|
1703
1712
|
ui: () => UIMessage[];
|
|
1704
1713
|
core: () => CoreMessage$1[];
|
|
1705
1714
|
};
|
|
1706
1715
|
response: {
|
|
1707
|
-
|
|
1716
|
+
v2: () => MastraMessageV2[];
|
|
1708
1717
|
};
|
|
1709
1718
|
};
|
|
1710
1719
|
private all;
|
|
@@ -1854,17 +1863,28 @@ declare abstract class MastraMemory extends MastraBase {
|
|
|
1854
1863
|
* @param messages - Array of messages to save
|
|
1855
1864
|
* @returns Promise resolving to the saved messages
|
|
1856
1865
|
*/
|
|
1857
|
-
abstract saveMessages(
|
|
1858
|
-
messages: (MastraMessageV1 | MastraMessageV2)[];
|
|
1859
|
-
memoryConfig
|
|
1866
|
+
abstract saveMessages(args: {
|
|
1867
|
+
messages: (MastraMessageV1 | MastraMessageV2)[] | MastraMessageV1[] | MastraMessageV2[];
|
|
1868
|
+
memoryConfig?: MemoryConfig | undefined;
|
|
1869
|
+
format?: 'v1';
|
|
1870
|
+
}): Promise<MastraMessageV1[]>;
|
|
1871
|
+
abstract saveMessages(args: {
|
|
1872
|
+
messages: (MastraMessageV1 | MastraMessageV2)[] | MastraMessageV1[] | MastraMessageV2[];
|
|
1873
|
+
memoryConfig?: MemoryConfig | undefined;
|
|
1874
|
+
format: 'v2';
|
|
1860
1875
|
}): Promise<MastraMessageV2[]>;
|
|
1876
|
+
abstract saveMessages(args: {
|
|
1877
|
+
messages: (MastraMessageV1 | MastraMessageV2)[] | MastraMessageV1[] | MastraMessageV2[];
|
|
1878
|
+
memoryConfig?: MemoryConfig | undefined;
|
|
1879
|
+
format?: 'v1' | 'v2';
|
|
1880
|
+
}): Promise<MastraMessageV2[] | MastraMessageV1[]>;
|
|
1861
1881
|
/**
|
|
1862
1882
|
* Retrieves all messages for a specific thread
|
|
1863
1883
|
* @param threadId - The unique identifier of the thread
|
|
1864
1884
|
* @returns Promise resolving to array of messages and uiMessages
|
|
1865
1885
|
*/
|
|
1866
1886
|
abstract query({ threadId, resourceId, selectBy, }: StorageGetMessagesArg): Promise<{
|
|
1867
|
-
messages:
|
|
1887
|
+
messages: CoreMessage$1[];
|
|
1868
1888
|
uiMessages: UIMessage[];
|
|
1869
1889
|
}>;
|
|
1870
1890
|
/**
|
|
@@ -2128,6 +2148,13 @@ declare abstract class MastraVoice<TOptions = unknown, TSpeakOptions = unknown,
|
|
|
2128
2148
|
getSpeakers(): Promise<Array<{
|
|
2129
2149
|
voiceId: string;
|
|
2130
2150
|
} & TSpeakerMetadata>>;
|
|
2151
|
+
/**
|
|
2152
|
+
* Get available speakers/voices
|
|
2153
|
+
* @returns Array of available voice IDs and their metadata
|
|
2154
|
+
*/
|
|
2155
|
+
getListener(): Promise<{
|
|
2156
|
+
enabled: boolean;
|
|
2157
|
+
}>;
|
|
2131
2158
|
}
|
|
2132
2159
|
|
|
2133
2160
|
declare class CompositeVoice extends MastraVoice<unknown, unknown, unknown, ToolsInput, VoiceEventMap> {
|
|
@@ -2158,6 +2185,9 @@ declare class CompositeVoice extends MastraVoice<unknown, unknown, unknown, Tool
|
|
|
2158
2185
|
getSpeakers(): Promise<{
|
|
2159
2186
|
voiceId: string;
|
|
2160
2187
|
}[]>;
|
|
2188
|
+
getListener(): Promise<{
|
|
2189
|
+
enabled: boolean;
|
|
2190
|
+
}>;
|
|
2161
2191
|
updateConfig(options: Record<string, unknown>): void;
|
|
2162
2192
|
/**
|
|
2163
2193
|
* Initializes a WebSocket or WebRTC connection for real-time communication
|
|
@@ -2208,6 +2238,9 @@ declare class DefaultVoice extends MastraVoice {
|
|
|
2208
2238
|
getSpeakers(): Promise<{
|
|
2209
2239
|
voiceId: string;
|
|
2210
2240
|
}[]>;
|
|
2241
|
+
getListener(): Promise<{
|
|
2242
|
+
enabled: boolean;
|
|
2243
|
+
}>;
|
|
2211
2244
|
}
|
|
2212
2245
|
|
|
2213
2246
|
type ToolsInput = Record<string, ToolAction<any, any, any> | VercelTool>;
|
|
@@ -3137,7 +3170,7 @@ declare class Agent<TAgentId extends string = string, TTools extends ToolsInput
|
|
|
3137
3170
|
runtimeContext?: RuntimeContext;
|
|
3138
3171
|
}): Promise<string>;
|
|
3139
3172
|
getMostRecentUserMessage(messages: Array<UIMessage>): UIMessage | undefined;
|
|
3140
|
-
genTitle(userMessage: UIMessage | undefined): Promise<string>;
|
|
3173
|
+
genTitle(userMessage: UIMessage | undefined, runtimeContext: RuntimeContext): Promise<string>;
|
|
3141
3174
|
fetchMemory({ threadId, thread: passedThread, memoryConfig, resourceId, runId, messageList, }: {
|
|
3142
3175
|
resourceId: string;
|
|
3143
3176
|
threadId: string;
|
|
@@ -3310,10 +3343,30 @@ declare abstract class MastraStorage extends MastraBase {
|
|
|
3310
3343
|
abstract deleteThread({ threadId }: {
|
|
3311
3344
|
threadId: string;
|
|
3312
3345
|
}): Promise<void>;
|
|
3313
|
-
abstract getMessages(
|
|
3314
|
-
|
|
3315
|
-
|
|
3346
|
+
abstract getMessages(args: StorageGetMessagesArg & {
|
|
3347
|
+
format?: 'v1';
|
|
3348
|
+
}): Promise<MastraMessageV1[]>;
|
|
3349
|
+
abstract getMessages(args: StorageGetMessagesArg & {
|
|
3350
|
+
format: 'v2';
|
|
3351
|
+
}): Promise<MastraMessageV2[]>;
|
|
3352
|
+
abstract getMessages({ threadId, resourceId, selectBy, format, }: StorageGetMessagesArg & {
|
|
3353
|
+
format?: 'v1' | 'v2';
|
|
3354
|
+
}): Promise<MastraMessageV1[] | MastraMessageV2[]>;
|
|
3355
|
+
abstract saveMessages(args: {
|
|
3356
|
+
messages: MastraMessageV1[];
|
|
3357
|
+
format?: undefined | 'v1';
|
|
3358
|
+
}): Promise<MastraMessageV1[]>;
|
|
3359
|
+
abstract saveMessages(args: {
|
|
3360
|
+
messages: MastraMessageV2[];
|
|
3361
|
+
format: 'v2';
|
|
3316
3362
|
}): Promise<MastraMessageV2[]>;
|
|
3363
|
+
abstract saveMessages(args: {
|
|
3364
|
+
messages: MastraMessageV1[];
|
|
3365
|
+
format?: undefined | 'v1';
|
|
3366
|
+
} | {
|
|
3367
|
+
messages: MastraMessageV2[];
|
|
3368
|
+
format: 'v2';
|
|
3369
|
+
}): Promise<MastraMessageV2[] | MastraMessageV1[]>;
|
|
3317
3370
|
abstract getTraces({ name, scope, page, perPage, attributes, filters, }: {
|
|
3318
3371
|
name?: string;
|
|
3319
3372
|
scope?: string;
|
|
@@ -3349,4 +3402,4 @@ declare abstract class MastraStorage extends MastraBase {
|
|
|
3349
3402
|
}): Promise<WorkflowRun | null>;
|
|
3350
3403
|
}
|
|
3351
3404
|
|
|
3352
|
-
export { type
|
|
3405
|
+
export { type WorkflowActionParams as $, type ApiRoute as A, type StepNode as B, type ContextWithMastra as C, type StepGraph as D, type EvalRow as E, type BaseCondition as F, type ActionContext as G, WhenConditionReturnValue as H, type StepDef as I, type StepCondition as J, type StepConfig as K, type LegacyWorkflowRuns as L, type Methods as M, type StepsRecord$1 as N, type WorkflowLogMessage as O, type WorkflowEvent as P, type ResolverFunctionInput as Q, type RetryConfig as R, type StorageColumn as S, type TABLE_NAMES as T, type ResolverFunctionOutput as U, type VariableReference$1 as V, type WorkflowRuns as W, type SubscriberFunctionOutput as X, type DependencyCheckOutput as Y, type StepResolverOutput as Z, type WorkflowActors as _, Mastra as a, Run as a$, type WorkflowActions as a0, type LegacyWorkflowState as a1, type StepId as a2, type ExtractSchemaFromStep$1 as a3, type ExtractStepResult as a4, type StepInputType as a5, type ExtractSchemaType$1 as a6, type PathsToStringProps$1 as a7, type LegacyWorkflowRunState as a8, type WorkflowResumeResult as a9, type DefaultLLMStreamObjectOptions as aA, type LLMTextOptions as aB, type LLMTextObjectOptions as aC, type LLMStreamOptions as aD, type LLMInnerStreamOptions as aE, type LLMStreamObjectOptions as aF, createMockModel as aG, type Config as aH, type MessageType as aI, type MessageResponse as aJ, type MemoryConfig as aK, type SharedMemoryConfig as aL, type MemoryProcessorOpts as aM, MemoryProcessor as aN, memoryDefaultOptions as aO, createTool as aP, type VercelTool as aQ, type CoreTool as aR, type InternalCoreTool as aS, type StepFlowEntry as aT, type SerializedStep as aU, type SerializedStepFlowEntry as aV, createStep as aW, cloneStep as aX, createWorkflow as aY, cloneWorkflow as aZ, type WorkflowResult as a_, type ToolAction as aa, type AgentConfig as ab, MastraMemory as ac, type ToolExecutionContext as ad, Tool as ae, type Step as af, Workflow as ag, type WorkflowConfig as ah, type LanguageModel as ai, type CoreMessage as aj, type CoreSystemMessage as ak, type CoreAssistantMessage as al, type CoreUserMessage as am, type CoreToolMessage as an, type EmbedResult as ao, type EmbedManyResult as ap, type BaseStructuredOutputType as aq, type StructuredOutputType as ar, type StructuredOutputArrayItem as as, type StructuredOutput as at, type GenerateReturn as au, type StreamReturn as av, type OutputType as aw, type DefaultLLMTextOptions as ax, type DefaultLLMTextObjectOptions as ay, type DefaultLLMStreamOptions as az, type MastraAuthConfig as b, type ExecutionGraph as b0, ExecutionEngine as b1, type ExecuteFunction as b2, type StepSuccess as b3, type StepFailure as b4, type StepSuspended as b5, type StepRunning as b6, type StepResult as b7, type StepsRecord as b8, type DynamicMapping as b9, type NamedArgumentInfo as bA, type SubcommandInfo as bB, type CommandInfo as bC, type EnvironmentVariableInfo as bD, type PackageInfo as bE, type RemoteInfo as bF, type MCPServerConfig as bG, type ServerInfo as bH, type ServerDetailInfo as bI, type MCPToolType as bJ, MessageList as bK, type ToolsetsInput as bL, type DynamicArgument as bM, type AgentGenerateOptions as bN, type AgentStreamOptions as bO, type MastraMessageContentV2 as bP, type PathsToStringProps as ba, type ExtractSchemaType as bb, type ExtractSchemaFromStep as bc, type VariableReference as bd, type WatchEvent as be, type ZodPathType as bf, type WorkflowRunState as bg, type MastraLanguageModel as bh, type MastraPrimitives as bi, AgentNetwork as bj, MCPServerBase as bk, type VoiceEventType as bl, type VoiceEventMap as bm, type VoiceConfig as bn, MastraVoice as bo, CompositeVoice as bp, DefaultVoice as bq, type AgentNetworkConfig as br, type ConvertedTool as bs, type MCPServerSSEOptions as bt, type MCPServerHonoSSEOptions as bu, type MCPServerHTTPOptions as bv, type Repository as bw, type VersionDetail as bx, type ArgumentInfo as by, type PositionalArgumentInfo as bz, MastraStorage as c, type StorageThreadType as d, type MastraMessageV2 as e, type StorageGetMessagesArg as f, type MastraMessageV1 as g, type WorkflowRun as h, type LegacyWorkflowRun as i, TABLE_WORKFLOW_SNAPSHOT as j, TABLE_EVALS as k, TABLE_MESSAGES as l, TABLE_THREADS as m, TABLE_TRACES as n, TABLE_SCHEMAS as o, type StepResult$1 as p, LegacyStep as q, LegacyWorkflow as r, Agent as s, type WorkflowContext as t, type ToolsInput as u, type StepAction as v, type LegacyWorkflowRunResult as w, type WorkflowOptions as x, type StepExecutionContext as y, type StepVariableType as z };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkTICDQWVJ_cjs = require('./chunk-TICDQWVJ.cjs');
|
|
4
4
|
var chunkYEULQPUY_cjs = require('./chunk-YEULQPUY.cjs');
|
|
5
5
|
var chunkRWTSGWWL_cjs = require('./chunk-RWTSGWWL.cjs');
|
|
6
6
|
|
|
7
7
|
// src/tts/index.ts
|
|
8
8
|
var _MastraTTS_decorators, _init, _a;
|
|
9
|
-
_MastraTTS_decorators = [
|
|
9
|
+
_MastraTTS_decorators = [chunkTICDQWVJ_cjs.InstrumentClass({
|
|
10
10
|
prefix: "tts",
|
|
11
11
|
excludeMethods: ["__setTools", "__setLogger", "__setTelemetry", "#log"]
|
|
12
12
|
})];
|