@mastra/core 0.10.2 → 0.10.4-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.cjs +4 -4
- package/dist/agent/index.d.cts +4 -3
- package/dist/agent/index.d.ts +4 -3
- package/dist/agent/index.js +2 -2
- package/dist/{base-BJBoI-g2.d.cts → base-BURd0RH-.d.cts} +48 -7
- package/dist/{base-BY9WFI65.d.cts → base-Bi9KB0TN.d.ts} +19 -3
- package/dist/{base-C0yUw8BC.d.ts → base-CO-L7hF9.d.cts} +19 -3
- package/dist/{base-BEjkhvZ_.d.ts → base-nFL4giIu.d.ts} +48 -7
- package/dist/base.cjs +2 -2
- package/dist/base.d.cts +3 -2
- package/dist/base.d.ts +3 -2
- package/dist/base.js +1 -1
- package/dist/bundler/index.cjs +2 -2
- package/dist/bundler/index.d.cts +3 -2
- package/dist/bundler/index.d.ts +3 -2
- package/dist/bundler/index.js +1 -1
- package/dist/{chunk-NMDM4IZN.cjs → chunk-2D7NOO7S.cjs} +16 -11
- package/dist/{chunk-3JGO7S6X.cjs → chunk-33LPXZPZ.cjs} +2 -2
- package/dist/{chunk-JOCKZ2US.js → chunk-5IEKR756.js} +1 -1
- package/dist/{chunk-XXVGT7SJ.js → chunk-5YDTZN2X.js} +32 -9
- package/dist/{chunk-DTJ4KVHM.js → chunk-ATXBSEFT.js} +1 -1
- package/dist/chunk-BBAQW23O.cjs +68 -0
- package/dist/{chunk-OBEALYTK.js → chunk-DO5R43AJ.js} +16 -11
- package/dist/{chunk-7AWGDSGR.js → chunk-DU32FMDF.js} +3 -3
- package/dist/{chunk-CYJF6U6B.cjs → chunk-FEYYOBBG.cjs} +2 -2
- package/dist/{chunk-HZ7ME4LD.cjs → chunk-FFYVLKQW.cjs} +2 -2
- package/dist/{chunk-5G3XWKIU.cjs → chunk-FJXOUO3F.cjs} +2 -2
- package/dist/{chunk-FGBS7VRU.js → chunk-FNQU5CHU.js} +3 -3
- package/dist/{chunk-JBTXWDNO.js → chunk-GEDW7TMB.js} +9 -9
- package/dist/{chunk-KUJQVCEL.cjs → chunk-H5IRI46R.cjs} +6 -3
- package/dist/{chunk-FLPSXJWQ.js → chunk-HJML6BS7.js} +1 -1
- package/dist/{chunk-B2RDYK2X.js → chunk-IG7FGYSW.js} +1 -1
- package/dist/{chunk-PMAVDBJY.js → chunk-IM7CLVLZ.js} +1 -1
- package/dist/{chunk-XJCP3SLA.js → chunk-JNMQKJH4.js} +1 -1
- package/dist/{chunk-WE5ABCZN.js → chunk-KIKYEFSA.js} +3 -3
- package/dist/{chunk-VBSKHNCY.cjs → chunk-KQ2KYQLN.cjs} +9 -9
- package/dist/{chunk-TAHSAZUN.cjs → chunk-LEK3J7YN.cjs} +2 -2
- package/dist/{chunk-TO5645ZP.cjs → chunk-MHN2BI4P.cjs} +25 -25
- package/dist/{chunk-VHZPWE5L.cjs → chunk-P3Q73CAW.cjs} +6 -6
- package/dist/chunk-PVGSY24V.js +63 -0
- package/dist/chunk-QVROTSA5.cjs +408 -0
- package/dist/{chunk-SH2C4VTJ.cjs → chunk-QVTGHY2K.cjs} +21 -10
- package/dist/{chunk-S4TS74VT.cjs → chunk-RORSYAKV.cjs} +7 -7
- package/dist/{chunk-7MWWPVCE.js → chunk-RSN3NZQS.js} +1 -1
- package/dist/chunk-TRJIWZKM.js +390 -0
- package/dist/{chunk-ZPOETARN.js → chunk-V6I25JEV.js} +1 -1
- package/dist/{chunk-SKYO5NFQ.cjs → chunk-VAOBU5SY.cjs} +8 -8
- package/dist/{chunk-X6VHQCYN.cjs → chunk-W5I6MEVU.cjs} +2 -2
- package/dist/{chunk-JAVP6ACT.js → chunk-YCYAVLYR.js} +4 -1
- package/dist/{chunk-TIPFGQCO.js → chunk-YKJZX7TE.js} +18 -7
- package/dist/{chunk-RFAN7FAT.cjs → chunk-ZIZ3CVHN.cjs} +32 -9
- package/dist/{chunk-PKYG5CWB.cjs → chunk-ZZLBNB3U.cjs} +2 -2
- package/dist/deployer/index.cjs +2 -2
- package/dist/deployer/index.d.cts +3 -2
- package/dist/deployer/index.d.ts +3 -2
- package/dist/deployer/index.js +1 -1
- package/dist/error/index.cjs +19 -72
- package/dist/error/index.d.cts +25 -31
- package/dist/error/index.d.ts +25 -31
- package/dist/error/index.js +1 -70
- package/dist/eval/index.d.cts +4 -3
- package/dist/eval/index.d.ts +4 -3
- package/dist/index.cjs +45 -45
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +13 -13
- package/dist/integration/index.d.cts +4 -3
- package/dist/integration/index.d.ts +4 -3
- package/dist/llm/index.d.cts +4 -3
- package/dist/llm/index.d.ts +4 -3
- package/dist/logger/index.cjs +10 -10
- package/dist/logger/index.d.cts +60 -7
- package/dist/logger/index.d.ts +60 -7
- package/dist/logger/index.js +2 -2
- package/dist/logger-CpL0z5v_.d.cts +158 -0
- package/dist/logger-DtVDdb81.d.ts +158 -0
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.cts +5 -4
- package/dist/mastra/index.d.ts +5 -4
- package/dist/mastra/index.js +1 -1
- package/dist/mcp/index.cjs +4 -4
- package/dist/mcp/index.d.cts +5 -4
- package/dist/mcp/index.d.ts +5 -4
- package/dist/mcp/index.js +3 -3
- package/dist/memory/index.cjs +4 -4
- package/dist/memory/index.d.cts +4 -3
- package/dist/memory/index.d.ts +4 -3
- package/dist/memory/index.js +1 -1
- package/dist/network/index.cjs +6 -6
- package/dist/network/index.d.cts +4 -3
- package/dist/network/index.d.ts +4 -3
- package/dist/network/index.js +3 -3
- package/dist/relevance/index.cjs +4 -4
- package/dist/relevance/index.d.cts +5 -4
- package/dist/relevance/index.d.ts +5 -4
- package/dist/relevance/index.js +1 -1
- package/dist/server/index.cjs +2 -2
- package/dist/server/index.d.cts +5 -4
- package/dist/server/index.d.ts +5 -4
- package/dist/server/index.js +1 -1
- package/dist/storage/index.cjs +5 -5
- package/dist/storage/index.d.cts +6 -5
- package/dist/storage/index.d.ts +6 -5
- package/dist/storage/index.js +3 -3
- package/dist/telemetry/index.d.cts +4 -3
- package/dist/telemetry/index.d.ts +4 -3
- package/dist/tools/index.d.cts +6 -5
- package/dist/tools/index.d.ts +6 -5
- package/dist/tts/index.cjs +2 -2
- package/dist/tts/index.d.cts +3 -2
- package/dist/tts/index.d.ts +3 -2
- package/dist/tts/index.js +1 -1
- package/dist/utils.cjs +14 -14
- package/dist/utils.d.cts +4 -3
- package/dist/utils.d.ts +4 -3
- package/dist/utils.js +1 -1
- package/dist/vector/index.cjs +2 -2
- package/dist/vector/index.d.cts +3 -2
- package/dist/vector/index.d.ts +3 -2
- package/dist/vector/index.js +1 -1
- package/dist/voice/index.cjs +4 -4
- package/dist/voice/index.d.cts +4 -3
- package/dist/voice/index.d.ts +4 -3
- package/dist/voice/index.js +1 -1
- package/dist/workflows/index.cjs +9 -9
- package/dist/workflows/index.d.cts +5 -4
- package/dist/workflows/index.d.ts +5 -4
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/legacy/index.cjs +22 -22
- package/dist/workflows/legacy/index.d.cts +5 -4
- package/dist/workflows/legacy/index.d.ts +5 -4
- package/dist/workflows/legacy/index.js +1 -1
- package/package.json +9 -10
- package/dist/chunk-WWLMZIHW.cjs +0 -995
- package/dist/chunk-Y5BGCPNZ.js +0 -977
- package/dist/logger-BF2Sn7JX.d.cts +0 -79
- package/dist/logger-BF2Sn7JX.d.ts +0 -79
package/dist/agent/index.cjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkMHN2BI4P_cjs = require('../chunk-MHN2BI4P.cjs');
|
|
4
|
+
var chunkH5IRI46R_cjs = require('../chunk-H5IRI46R.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 chunkMHN2BI4P_cjs.Agent; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "MessageList", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkH5IRI46R_cjs.MessageList; }
|
|
15
15
|
});
|
package/dist/agent/index.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export { Message as AiMessageType } from 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export { A as Agent,
|
|
5
|
-
import '../base-
|
|
4
|
+
export { A as Agent, ar as AgentConfig, bS as AgentGenerateOptions, bT as AgentStreamOptions, bR as DynamicArgument, bp as MastraLanguageModel, bU as MastraMessageContentV2, s as MastraMessageV2, bP as MessageList, T as ToolsInput, bQ as ToolsetsInput } from '../base-BURd0RH-.cjs';
|
|
5
|
+
import '../base-CO-L7hF9.cjs';
|
|
6
6
|
import '../types-Bo1uigWx.cjs';
|
|
7
7
|
import '../runtime-context/index.cjs';
|
|
8
|
-
import '../logger-
|
|
8
|
+
import '../logger-CpL0z5v_.cjs';
|
|
9
|
+
import '../error/index.cjs';
|
|
9
10
|
import 'stream';
|
|
10
11
|
import '../tts/index.cjs';
|
|
11
12
|
import '@opentelemetry/api';
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export { Message as AiMessageType } from 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export { A as Agent,
|
|
5
|
-
import '../base-
|
|
4
|
+
export { A as Agent, ar as AgentConfig, bS as AgentGenerateOptions, bT as AgentStreamOptions, bR as DynamicArgument, bp as MastraLanguageModel, bU as MastraMessageContentV2, s as MastraMessageV2, bP as MessageList, T as ToolsInput, bQ as ToolsetsInput } from '../base-nFL4giIu.js';
|
|
5
|
+
import '../base-Bi9KB0TN.js';
|
|
6
6
|
import '../types-Bo1uigWx.js';
|
|
7
7
|
import '../runtime-context/index.js';
|
|
8
|
-
import '../logger-
|
|
8
|
+
import '../logger-DtVDdb81.js';
|
|
9
|
+
import '../error/index.js';
|
|
9
10
|
import 'stream';
|
|
10
11
|
import '../tts/index.js';
|
|
11
12
|
import '@opentelemetry/api';
|
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-GEDW7TMB.js';
|
|
2
|
+
export { MessageList } from '../chunk-YCYAVLYR.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
2
|
import { Tool as Tool$1, Schema, ToolExecutionOptions, TextStreamPart, UserContent, AssistantContent, ToolContent, EmbeddingModel, CoreMessage as CoreMessage$1, UIMessage, IDGenerator as IDGenerator$1, Message, CoreSystemMessage as CoreSystemMessage$1, LanguageModel as LanguageModel$1, GenerateTextResult, GenerateObjectResult, StreamTextResult, StreamObjectResult, DeepPartial, generateText, generateObject, streamText, streamObject, TelemetrySettings, CoreAssistantMessage as CoreAssistantMessage$1, CoreUserMessage as CoreUserMessage$1, CoreToolMessage as CoreToolMessage$1, EmbedResult as EmbedResult$1, EmbedManyResult as EmbedManyResult$1, LanguageModelV1, GenerateTextOnStepFinishCallback, StreamTextOnFinishCallback, StreamObjectOnFinishCallback, StreamTextOnStepFinishCallback } from 'ai';
|
|
3
|
-
import { M as MastraBase, T as Telemetry, O as OtelConfig } from './base-
|
|
3
|
+
import { M as MastraBase, T as Telemetry, O as OtelConfig } from './base-CO-L7hF9.cjs';
|
|
4
4
|
import { z, ZodSchema } from 'zod';
|
|
5
|
+
import { B as BaseLogMessage, R as RegisteredLogger, I as IMastraLogger, a as LogLevel } from './logger-CpL0z5v_.cjs';
|
|
5
6
|
import { JSONSchema7Type, JSONSchema7 } from 'json-schema';
|
|
6
|
-
import { B as BaseLogMessage, R as RegisteredLogger, I as IMastraLogger } from './logger-BF2Sn7JX.cjs';
|
|
7
7
|
import { MastraTTS } from './tts/index.cjs';
|
|
8
8
|
import { MastraVector } from './vector/index.cjs';
|
|
9
9
|
import { M as Metric, a as MetricResult, T as TestInfo } from './types-Bo1uigWx.cjs';
|
|
@@ -1570,6 +1570,20 @@ interface WorkflowRun {
|
|
|
1570
1570
|
updatedAt: Date;
|
|
1571
1571
|
resourceId?: string;
|
|
1572
1572
|
}
|
|
1573
|
+
type PaginationArgs = {
|
|
1574
|
+
dateRange?: {
|
|
1575
|
+
start?: Date;
|
|
1576
|
+
end?: Date;
|
|
1577
|
+
};
|
|
1578
|
+
page?: number;
|
|
1579
|
+
perPage?: number;
|
|
1580
|
+
};
|
|
1581
|
+
type PaginationInfo = {
|
|
1582
|
+
total: number;
|
|
1583
|
+
page: number;
|
|
1584
|
+
perPage: number;
|
|
1585
|
+
hasMore: boolean;
|
|
1586
|
+
};
|
|
1573
1587
|
type StorageGetMessagesArg = {
|
|
1574
1588
|
threadId: string;
|
|
1575
1589
|
resourceId?: string;
|
|
@@ -1581,6 +1595,7 @@ type StorageGetMessagesArg = {
|
|
|
1581
1595
|
withPreviousMessages?: number;
|
|
1582
1596
|
withNextMessages?: number;
|
|
1583
1597
|
}[];
|
|
1598
|
+
pagination?: PaginationArgs;
|
|
1584
1599
|
};
|
|
1585
1600
|
threadConfig?: MemoryConfig;
|
|
1586
1601
|
format?: 'v1' | 'v2';
|
|
@@ -1680,7 +1695,7 @@ type MastraMessageV2 = {
|
|
|
1680
1695
|
type?: string;
|
|
1681
1696
|
};
|
|
1682
1697
|
type MessageInput = UIMessage | Message | MastraMessageV1 | CoreMessage$1 | MastraMessageV2;
|
|
1683
|
-
type MessageSource = 'memory' | 'response' | 'user' | 'system';
|
|
1698
|
+
type MessageSource = 'memory' | 'response' | 'user' | 'system' | 'context';
|
|
1684
1699
|
declare class MessageList {
|
|
1685
1700
|
private messages;
|
|
1686
1701
|
private systemMessages;
|
|
@@ -1689,6 +1704,7 @@ declare class MessageList {
|
|
|
1689
1704
|
private memoryMessages;
|
|
1690
1705
|
private newUserMessages;
|
|
1691
1706
|
private newResponseMessages;
|
|
1707
|
+
private userContextMessages;
|
|
1692
1708
|
private generateMessageId?;
|
|
1693
1709
|
constructor({ threadId, resourceId, generateMessageId, }?: {
|
|
1694
1710
|
threadId?: string;
|
|
@@ -3094,11 +3110,36 @@ declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<string,
|
|
|
3094
3110
|
* @returns The network with the specified ID, or undefined if not found
|
|
3095
3111
|
*/
|
|
3096
3112
|
getNetwork(networkId: string): AgentNetwork | undefined;
|
|
3097
|
-
getLogsByRunId({ runId, transportId }: {
|
|
3113
|
+
getLogsByRunId({ runId, transportId, fromDate, toDate, logLevel, filters, page, perPage, }: {
|
|
3098
3114
|
runId: string;
|
|
3099
3115
|
transportId: string;
|
|
3100
|
-
|
|
3101
|
-
|
|
3116
|
+
fromDate?: Date;
|
|
3117
|
+
toDate?: Date;
|
|
3118
|
+
logLevel?: LogLevel;
|
|
3119
|
+
filters?: Record<string, any>;
|
|
3120
|
+
page?: number;
|
|
3121
|
+
perPage?: number;
|
|
3122
|
+
}): Promise<{
|
|
3123
|
+
logs: BaseLogMessage[];
|
|
3124
|
+
total: number;
|
|
3125
|
+
page: number;
|
|
3126
|
+
perPage: number;
|
|
3127
|
+
hasMore: boolean;
|
|
3128
|
+
}>;
|
|
3129
|
+
getLogs(transportId: string, params?: {
|
|
3130
|
+
fromDate?: Date;
|
|
3131
|
+
toDate?: Date;
|
|
3132
|
+
logLevel?: LogLevel;
|
|
3133
|
+
filters?: Record<string, any>;
|
|
3134
|
+
page?: number;
|
|
3135
|
+
perPage?: number;
|
|
3136
|
+
}): Promise<{
|
|
3137
|
+
logs: BaseLogMessage[];
|
|
3138
|
+
total: number;
|
|
3139
|
+
page: number;
|
|
3140
|
+
perPage: number;
|
|
3141
|
+
hasMore: boolean;
|
|
3142
|
+
}>;
|
|
3102
3143
|
/**
|
|
3103
3144
|
* Get all registered MCP server instances.
|
|
3104
3145
|
* @returns A record of MCP server ID to MCPServerBase instance, or undefined if none are registered.
|
|
@@ -3434,4 +3475,4 @@ declare abstract class MastraStorage extends MastraBase {
|
|
|
3434
3475
|
}): Promise<WorkflowRun | null>;
|
|
3435
3476
|
}
|
|
3436
3477
|
|
|
3437
|
-
export {
|
|
3478
|
+
export { WhenConditionReturnValue as $, Agent as A, TABLE_WORKFLOW_SNAPSHOT as B, type CoreTool as C, TABLE_EVALS as D, type EvalRow as E, TABLE_MESSAGES as F, TABLE_THREADS as G, TABLE_TRACES as H, TABLE_SCHEMAS as I, type VariableReference$1 as J, type StepResult$1 as K, LegacyWorkflow as L, Mastra as M, type StepAction as N, type LegacyWorkflowRunResult as O, type PaginationArgs as P, type WorkflowOptions as Q, type StepVariableType as R, type StepExecutionContext as S, type ToolsInput as T, type StepNode as U, type VercelTool as V, type WorkflowContext as W, type StepGraph as X, type RetryConfig as Y, type BaseCondition as Z, type ActionContext as _, type MastraPrimitives as a, type SerializedStep as a$, type StepDef as a0, type StepCondition as a1, type StepConfig as a2, type StepsRecord$1 as a3, type WorkflowLogMessage as a4, type WorkflowEvent as a5, type ResolverFunctionInput as a6, type ResolverFunctionOutput as a7, type SubscriberFunctionOutput as a8, type DependencyCheckOutput as a9, type EmbedManyResult as aA, type BaseStructuredOutputType as aB, type StructuredOutputType as aC, type StructuredOutputArrayItem as aD, type StructuredOutput as aE, type GenerateReturn as aF, type StreamReturn as aG, type OutputType as aH, type DefaultLLMTextOptions as aI, type DefaultLLMTextObjectOptions as aJ, type DefaultLLMStreamOptions as aK, type DefaultLLMStreamObjectOptions as aL, type LLMTextOptions as aM, type LLMTextObjectOptions as aN, type LLMStreamOptions as aO, type LLMInnerStreamOptions as aP, type LLMStreamObjectOptions as aQ, createMockModel as aR, type Config as aS, type MessageType as aT, type MessageResponse as aU, type MemoryConfig as aV, type SharedMemoryConfig as aW, type MemoryProcessorOpts as aX, MemoryProcessor as aY, memoryDefaultOptions as aZ, type StepFlowEntry as a_, type StepResolverOutput as aa, type WorkflowActors as ab, type WorkflowActionParams as ac, type WorkflowActions as ad, type LegacyWorkflowState as ae, type StepId as af, type ExtractSchemaFromStep$1 as ag, type ExtractStepResult as ah, type StepInputType as ai, type ExtractSchemaType$1 as aj, type PathsToStringProps$1 as ak, type LegacyWorkflowRunState as al, type WorkflowResumeResult as am, Tool as an, createTool as ao, type InternalCoreTool as ap, type ToolExecutionContext as aq, type AgentConfig as ar, type WorkflowConfig as as, type LanguageModel as at, type CoreMessage as au, type CoreSystemMessage as av, type CoreAssistantMessage as aw, type CoreUserMessage as ax, type CoreToolMessage as ay, type EmbedResult as az, MastraMemory as b, type SerializedStepFlowEntry as b0, createStep as b1, cloneStep as b2, createWorkflow as b3, cloneWorkflow as b4, type WorkflowResult as b5, Run as b6, type ExecutionGraph as b7, ExecutionEngine as b8, type ExecuteFunction as b9, type MCPServerHTTPOptions as bA, type Repository as bB, type VersionDetail as bC, type ArgumentInfo as bD, type PositionalArgumentInfo as bE, type NamedArgumentInfo as bF, type SubcommandInfo as bG, type CommandInfo as bH, type EnvironmentVariableInfo as bI, type PackageInfo as bJ, type RemoteInfo as bK, type MCPServerConfig as bL, type ServerInfo as bM, type ServerDetailInfo as bN, type MCPToolType as bO, MessageList as bP, type ToolsetsInput as bQ, type DynamicArgument as bR, type AgentGenerateOptions as bS, type AgentStreamOptions as bT, type MastraMessageContentV2 as bU, type StepSuccess as ba, type StepFailure as bb, type StepSuspended as bc, type StepRunning as bd, type StepResult as be, type StepsRecord as bf, type DynamicMapping as bg, type PathsToStringProps as bh, type ExtractSchemaType as bi, type ExtractSchemaFromStep as bj, type VariableReference as bk, type StreamEvent as bl, type WatchEvent as bm, type ZodPathType as bn, type WorkflowRunState as bo, type MastraLanguageModel as bp, type VoiceEventType as bq, type VoiceEventMap as br, type VoiceConfig as bs, MastraVoice as bt, CompositeVoice as bu, DefaultVoice as bv, type AgentNetworkConfig as bw, type ConvertedTool as bx, type MCPServerSSEOptions as by, type MCPServerHonoSSEOptions as bz, type ToolAction as c, LegacyStep as d, Workflow as e, type Step as f, AgentNetwork as g, MCPServerBase as h, type Methods as i, type ApiRoute as j, type MastraAuthConfig as k, type ContextWithMastra as l, MastraAuthProvider as m, type MastraAuthProviderOptions as n, MastraStorage as o, type TABLE_NAMES as p, type StorageColumn as q, type StorageThreadType as r, type MastraMessageV2 as s, type StorageGetMessagesArg as t, type MastraMessageV1 as u, type WorkflowRuns as v, type WorkflowRun as w, type LegacyWorkflowRuns as x, type LegacyWorkflowRun as y, type PaginationInfo as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _opentelemetry_api from '@opentelemetry/api';
|
|
2
2
|
import { Tracer, Span, BaggageEntry, Context } from '@opentelemetry/api';
|
|
3
|
-
import { R as RegisteredLogger, I as IMastraLogger } from './logger-
|
|
4
|
-
import { SpanExporter } from '@opentelemetry/sdk-trace-base';
|
|
3
|
+
import { R as RegisteredLogger, I as IMastraLogger } from './logger-DtVDdb81.js';
|
|
4
|
+
import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
5
5
|
|
|
6
6
|
/** Sampling strategy configuration for OpenTelemetry */
|
|
7
7
|
type SamplingStrategy = {
|
|
@@ -55,6 +55,22 @@ type OtelConfig = {
|
|
|
55
55
|
exporter: SpanExporter;
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
|
+
type Trace = {
|
|
59
|
+
id: string;
|
|
60
|
+
parentSpanId: string;
|
|
61
|
+
name: string;
|
|
62
|
+
traceId: string;
|
|
63
|
+
scope: string;
|
|
64
|
+
kind: ReadableSpan['kind'];
|
|
65
|
+
attributes: ReadableSpan['attributes'];
|
|
66
|
+
status: ReadableSpan['status'];
|
|
67
|
+
events: ReadableSpan['events'];
|
|
68
|
+
links: ReadableSpan['links'];
|
|
69
|
+
other: Record<string, any>;
|
|
70
|
+
startTime: number;
|
|
71
|
+
endTime: number;
|
|
72
|
+
createdAt: string;
|
|
73
|
+
};
|
|
58
74
|
|
|
59
75
|
declare global {
|
|
60
76
|
var __TELEMETRY__: Telemetry | undefined;
|
|
@@ -143,4 +159,4 @@ declare class MastraBase {
|
|
|
143
159
|
} | undefined;
|
|
144
160
|
}
|
|
145
161
|
|
|
146
|
-
export { MastraBase as M, type OtelConfig as O, type SamplingStrategy as S, Telemetry as T };
|
|
162
|
+
export { MastraBase as M, type OtelConfig as O, type SamplingStrategy as S, Telemetry as T, type Trace as a };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _opentelemetry_api from '@opentelemetry/api';
|
|
2
2
|
import { Tracer, Span, BaggageEntry, Context } from '@opentelemetry/api';
|
|
3
|
-
import { R as RegisteredLogger, I as IMastraLogger } from './logger-
|
|
4
|
-
import { SpanExporter } from '@opentelemetry/sdk-trace-base';
|
|
3
|
+
import { R as RegisteredLogger, I as IMastraLogger } from './logger-CpL0z5v_.cjs';
|
|
4
|
+
import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
5
5
|
|
|
6
6
|
/** Sampling strategy configuration for OpenTelemetry */
|
|
7
7
|
type SamplingStrategy = {
|
|
@@ -55,6 +55,22 @@ type OtelConfig = {
|
|
|
55
55
|
exporter: SpanExporter;
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
|
+
type Trace = {
|
|
59
|
+
id: string;
|
|
60
|
+
parentSpanId: string;
|
|
61
|
+
name: string;
|
|
62
|
+
traceId: string;
|
|
63
|
+
scope: string;
|
|
64
|
+
kind: ReadableSpan['kind'];
|
|
65
|
+
attributes: ReadableSpan['attributes'];
|
|
66
|
+
status: ReadableSpan['status'];
|
|
67
|
+
events: ReadableSpan['events'];
|
|
68
|
+
links: ReadableSpan['links'];
|
|
69
|
+
other: Record<string, any>;
|
|
70
|
+
startTime: number;
|
|
71
|
+
endTime: number;
|
|
72
|
+
createdAt: string;
|
|
73
|
+
};
|
|
58
74
|
|
|
59
75
|
declare global {
|
|
60
76
|
var __TELEMETRY__: Telemetry | undefined;
|
|
@@ -143,4 +159,4 @@ declare class MastraBase {
|
|
|
143
159
|
} | undefined;
|
|
144
160
|
}
|
|
145
161
|
|
|
146
|
-
export { MastraBase as M, type OtelConfig as O, type SamplingStrategy as S, Telemetry as T };
|
|
162
|
+
export { MastraBase as M, type OtelConfig as O, type SamplingStrategy as S, Telemetry as T, type Trace as a };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
2
|
import { Tool as Tool$1, Schema, ToolExecutionOptions, TextStreamPart, UserContent, AssistantContent, ToolContent, EmbeddingModel, CoreMessage as CoreMessage$1, UIMessage, IDGenerator as IDGenerator$1, Message, CoreSystemMessage as CoreSystemMessage$1, LanguageModel as LanguageModel$1, GenerateTextResult, GenerateObjectResult, StreamTextResult, StreamObjectResult, DeepPartial, generateText, generateObject, streamText, streamObject, TelemetrySettings, CoreAssistantMessage as CoreAssistantMessage$1, CoreUserMessage as CoreUserMessage$1, CoreToolMessage as CoreToolMessage$1, EmbedResult as EmbedResult$1, EmbedManyResult as EmbedManyResult$1, LanguageModelV1, GenerateTextOnStepFinishCallback, StreamTextOnFinishCallback, StreamObjectOnFinishCallback, StreamTextOnStepFinishCallback } from 'ai';
|
|
3
|
-
import { M as MastraBase, T as Telemetry, O as OtelConfig } from './base-
|
|
3
|
+
import { M as MastraBase, T as Telemetry, O as OtelConfig } from './base-Bi9KB0TN.js';
|
|
4
4
|
import { z, ZodSchema } from 'zod';
|
|
5
|
+
import { B as BaseLogMessage, R as RegisteredLogger, I as IMastraLogger, a as LogLevel } from './logger-DtVDdb81.js';
|
|
5
6
|
import { JSONSchema7Type, JSONSchema7 } from 'json-schema';
|
|
6
|
-
import { B as BaseLogMessage, R as RegisteredLogger, I as IMastraLogger } from './logger-BF2Sn7JX.js';
|
|
7
7
|
import { MastraTTS } from './tts/index.js';
|
|
8
8
|
import { MastraVector } from './vector/index.js';
|
|
9
9
|
import { M as Metric, a as MetricResult, T as TestInfo } from './types-Bo1uigWx.js';
|
|
@@ -1570,6 +1570,20 @@ interface WorkflowRun {
|
|
|
1570
1570
|
updatedAt: Date;
|
|
1571
1571
|
resourceId?: string;
|
|
1572
1572
|
}
|
|
1573
|
+
type PaginationArgs = {
|
|
1574
|
+
dateRange?: {
|
|
1575
|
+
start?: Date;
|
|
1576
|
+
end?: Date;
|
|
1577
|
+
};
|
|
1578
|
+
page?: number;
|
|
1579
|
+
perPage?: number;
|
|
1580
|
+
};
|
|
1581
|
+
type PaginationInfo = {
|
|
1582
|
+
total: number;
|
|
1583
|
+
page: number;
|
|
1584
|
+
perPage: number;
|
|
1585
|
+
hasMore: boolean;
|
|
1586
|
+
};
|
|
1573
1587
|
type StorageGetMessagesArg = {
|
|
1574
1588
|
threadId: string;
|
|
1575
1589
|
resourceId?: string;
|
|
@@ -1581,6 +1595,7 @@ type StorageGetMessagesArg = {
|
|
|
1581
1595
|
withPreviousMessages?: number;
|
|
1582
1596
|
withNextMessages?: number;
|
|
1583
1597
|
}[];
|
|
1598
|
+
pagination?: PaginationArgs;
|
|
1584
1599
|
};
|
|
1585
1600
|
threadConfig?: MemoryConfig;
|
|
1586
1601
|
format?: 'v1' | 'v2';
|
|
@@ -1680,7 +1695,7 @@ type MastraMessageV2 = {
|
|
|
1680
1695
|
type?: string;
|
|
1681
1696
|
};
|
|
1682
1697
|
type MessageInput = UIMessage | Message | MastraMessageV1 | CoreMessage$1 | MastraMessageV2;
|
|
1683
|
-
type MessageSource = 'memory' | 'response' | 'user' | 'system';
|
|
1698
|
+
type MessageSource = 'memory' | 'response' | 'user' | 'system' | 'context';
|
|
1684
1699
|
declare class MessageList {
|
|
1685
1700
|
private messages;
|
|
1686
1701
|
private systemMessages;
|
|
@@ -1689,6 +1704,7 @@ declare class MessageList {
|
|
|
1689
1704
|
private memoryMessages;
|
|
1690
1705
|
private newUserMessages;
|
|
1691
1706
|
private newResponseMessages;
|
|
1707
|
+
private userContextMessages;
|
|
1692
1708
|
private generateMessageId?;
|
|
1693
1709
|
constructor({ threadId, resourceId, generateMessageId, }?: {
|
|
1694
1710
|
threadId?: string;
|
|
@@ -3094,11 +3110,36 @@ declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<string,
|
|
|
3094
3110
|
* @returns The network with the specified ID, or undefined if not found
|
|
3095
3111
|
*/
|
|
3096
3112
|
getNetwork(networkId: string): AgentNetwork | undefined;
|
|
3097
|
-
getLogsByRunId({ runId, transportId }: {
|
|
3113
|
+
getLogsByRunId({ runId, transportId, fromDate, toDate, logLevel, filters, page, perPage, }: {
|
|
3098
3114
|
runId: string;
|
|
3099
3115
|
transportId: string;
|
|
3100
|
-
|
|
3101
|
-
|
|
3116
|
+
fromDate?: Date;
|
|
3117
|
+
toDate?: Date;
|
|
3118
|
+
logLevel?: LogLevel;
|
|
3119
|
+
filters?: Record<string, any>;
|
|
3120
|
+
page?: number;
|
|
3121
|
+
perPage?: number;
|
|
3122
|
+
}): Promise<{
|
|
3123
|
+
logs: BaseLogMessage[];
|
|
3124
|
+
total: number;
|
|
3125
|
+
page: number;
|
|
3126
|
+
perPage: number;
|
|
3127
|
+
hasMore: boolean;
|
|
3128
|
+
}>;
|
|
3129
|
+
getLogs(transportId: string, params?: {
|
|
3130
|
+
fromDate?: Date;
|
|
3131
|
+
toDate?: Date;
|
|
3132
|
+
logLevel?: LogLevel;
|
|
3133
|
+
filters?: Record<string, any>;
|
|
3134
|
+
page?: number;
|
|
3135
|
+
perPage?: number;
|
|
3136
|
+
}): Promise<{
|
|
3137
|
+
logs: BaseLogMessage[];
|
|
3138
|
+
total: number;
|
|
3139
|
+
page: number;
|
|
3140
|
+
perPage: number;
|
|
3141
|
+
hasMore: boolean;
|
|
3142
|
+
}>;
|
|
3102
3143
|
/**
|
|
3103
3144
|
* Get all registered MCP server instances.
|
|
3104
3145
|
* @returns A record of MCP server ID to MCPServerBase instance, or undefined if none are registered.
|
|
@@ -3434,4 +3475,4 @@ declare abstract class MastraStorage extends MastraBase {
|
|
|
3434
3475
|
}): Promise<WorkflowRun | null>;
|
|
3435
3476
|
}
|
|
3436
3477
|
|
|
3437
|
-
export {
|
|
3478
|
+
export { WhenConditionReturnValue as $, Agent as A, TABLE_WORKFLOW_SNAPSHOT as B, type CoreTool as C, TABLE_EVALS as D, type EvalRow as E, TABLE_MESSAGES as F, TABLE_THREADS as G, TABLE_TRACES as H, TABLE_SCHEMAS as I, type VariableReference$1 as J, type StepResult$1 as K, LegacyWorkflow as L, Mastra as M, type StepAction as N, type LegacyWorkflowRunResult as O, type PaginationArgs as P, type WorkflowOptions as Q, type StepVariableType as R, type StepExecutionContext as S, type ToolsInput as T, type StepNode as U, type VercelTool as V, type WorkflowContext as W, type StepGraph as X, type RetryConfig as Y, type BaseCondition as Z, type ActionContext as _, type MastraPrimitives as a, type SerializedStep as a$, type StepDef as a0, type StepCondition as a1, type StepConfig as a2, type StepsRecord$1 as a3, type WorkflowLogMessage as a4, type WorkflowEvent as a5, type ResolverFunctionInput as a6, type ResolverFunctionOutput as a7, type SubscriberFunctionOutput as a8, type DependencyCheckOutput as a9, type EmbedManyResult as aA, type BaseStructuredOutputType as aB, type StructuredOutputType as aC, type StructuredOutputArrayItem as aD, type StructuredOutput as aE, type GenerateReturn as aF, type StreamReturn as aG, type OutputType as aH, type DefaultLLMTextOptions as aI, type DefaultLLMTextObjectOptions as aJ, type DefaultLLMStreamOptions as aK, type DefaultLLMStreamObjectOptions as aL, type LLMTextOptions as aM, type LLMTextObjectOptions as aN, type LLMStreamOptions as aO, type LLMInnerStreamOptions as aP, type LLMStreamObjectOptions as aQ, createMockModel as aR, type Config as aS, type MessageType as aT, type MessageResponse as aU, type MemoryConfig as aV, type SharedMemoryConfig as aW, type MemoryProcessorOpts as aX, MemoryProcessor as aY, memoryDefaultOptions as aZ, type StepFlowEntry as a_, type StepResolverOutput as aa, type WorkflowActors as ab, type WorkflowActionParams as ac, type WorkflowActions as ad, type LegacyWorkflowState as ae, type StepId as af, type ExtractSchemaFromStep$1 as ag, type ExtractStepResult as ah, type StepInputType as ai, type ExtractSchemaType$1 as aj, type PathsToStringProps$1 as ak, type LegacyWorkflowRunState as al, type WorkflowResumeResult as am, Tool as an, createTool as ao, type InternalCoreTool as ap, type ToolExecutionContext as aq, type AgentConfig as ar, type WorkflowConfig as as, type LanguageModel as at, type CoreMessage as au, type CoreSystemMessage as av, type CoreAssistantMessage as aw, type CoreUserMessage as ax, type CoreToolMessage as ay, type EmbedResult as az, MastraMemory as b, type SerializedStepFlowEntry as b0, createStep as b1, cloneStep as b2, createWorkflow as b3, cloneWorkflow as b4, type WorkflowResult as b5, Run as b6, type ExecutionGraph as b7, ExecutionEngine as b8, type ExecuteFunction as b9, type MCPServerHTTPOptions as bA, type Repository as bB, type VersionDetail as bC, type ArgumentInfo as bD, type PositionalArgumentInfo as bE, type NamedArgumentInfo as bF, type SubcommandInfo as bG, type CommandInfo as bH, type EnvironmentVariableInfo as bI, type PackageInfo as bJ, type RemoteInfo as bK, type MCPServerConfig as bL, type ServerInfo as bM, type ServerDetailInfo as bN, type MCPToolType as bO, MessageList as bP, type ToolsetsInput as bQ, type DynamicArgument as bR, type AgentGenerateOptions as bS, type AgentStreamOptions as bT, type MastraMessageContentV2 as bU, type StepSuccess as ba, type StepFailure as bb, type StepSuspended as bc, type StepRunning as bd, type StepResult as be, type StepsRecord as bf, type DynamicMapping as bg, type PathsToStringProps as bh, type ExtractSchemaType as bi, type ExtractSchemaFromStep as bj, type VariableReference as bk, type StreamEvent as bl, type WatchEvent as bm, type ZodPathType as bn, type WorkflowRunState as bo, type MastraLanguageModel as bp, type VoiceEventType as bq, type VoiceEventMap as br, type VoiceConfig as bs, MastraVoice as bt, CompositeVoice as bu, DefaultVoice as bv, type AgentNetworkConfig as bw, type ConvertedTool as bx, type MCPServerSSEOptions as by, type MCPServerHonoSSEOptions as bz, type ToolAction as c, LegacyStep as d, Workflow as e, type Step as f, AgentNetwork as g, MCPServerBase as h, type Methods as i, type ApiRoute as j, type MastraAuthConfig as k, type ContextWithMastra as l, MastraAuthProvider as m, type MastraAuthProviderOptions as n, MastraStorage as o, type TABLE_NAMES as p, type StorageColumn as q, type StorageThreadType as r, type MastraMessageV2 as s, type StorageGetMessagesArg as t, type MastraMessageV1 as u, type WorkflowRuns as v, type WorkflowRun as w, type LegacyWorkflowRuns as x, type LegacyWorkflowRun as y, type PaginationInfo as z };
|
package/dist/base.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkP3Q73CAW_cjs = require('./chunk-P3Q73CAW.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "MastraBase", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkP3Q73CAW_cjs.MastraBase; }
|
|
10
10
|
});
|
package/dist/base.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@opentelemetry/api';
|
|
2
|
-
import './logger-
|
|
3
|
-
export { M as MastraBase } from './base-
|
|
2
|
+
import './logger-CpL0z5v_.cjs';
|
|
3
|
+
export { M as MastraBase } from './base-CO-L7hF9.cjs';
|
|
4
|
+
import './error/index.cjs';
|
|
4
5
|
import 'stream';
|
|
5
6
|
import '@opentelemetry/sdk-trace-base';
|
package/dist/base.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@opentelemetry/api';
|
|
2
|
-
import './logger-
|
|
3
|
-
export { M as MastraBase } from './base-
|
|
2
|
+
import './logger-DtVDdb81.js';
|
|
3
|
+
export { M as MastraBase } from './base-Bi9KB0TN.js';
|
|
4
|
+
import './error/index.js';
|
|
4
5
|
import 'stream';
|
|
5
6
|
import '@opentelemetry/sdk-trace-base';
|
package/dist/base.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MastraBase } from './chunk-
|
|
1
|
+
export { MastraBase } from './chunk-5IEKR756.js';
|
package/dist/bundler/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkFEYYOBBG_cjs = require('../chunk-FEYYOBBG.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "MastraBundler", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkFEYYOBBG_cjs.MastraBundler; }
|
|
10
10
|
});
|
package/dist/bundler/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { M as MastraBase } from '../base-
|
|
1
|
+
import { M as MastraBase } from '../base-CO-L7hF9.cjs';
|
|
2
2
|
import '@opentelemetry/api';
|
|
3
|
-
import '../logger-
|
|
3
|
+
import '../logger-CpL0z5v_.cjs';
|
|
4
|
+
import '../error/index.cjs';
|
|
4
5
|
import 'stream';
|
|
5
6
|
import '@opentelemetry/sdk-trace-base';
|
|
6
7
|
|
package/dist/bundler/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { M as MastraBase } from '../base-
|
|
1
|
+
import { M as MastraBase } from '../base-Bi9KB0TN.js';
|
|
2
2
|
import '@opentelemetry/api';
|
|
3
|
-
import '../logger-
|
|
3
|
+
import '../logger-DtVDdb81.js';
|
|
4
|
+
import '../error/index.js';
|
|
4
5
|
import 'stream';
|
|
5
6
|
import '@opentelemetry/sdk-trace-base';
|
|
6
7
|
|
package/dist/bundler/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MastraBundler } from '../chunk-
|
|
1
|
+
export { MastraBundler } from '../chunk-ATXBSEFT.js';
|
|
@@ -20,28 +20,31 @@ var MultiLogger = class {
|
|
|
20
20
|
error(message, ...args) {
|
|
21
21
|
this.loggers.forEach((logger) => logger.error(message, ...args));
|
|
22
22
|
}
|
|
23
|
+
trackException(error) {
|
|
24
|
+
this.loggers.forEach((logger) => logger.trackException(error));
|
|
25
|
+
}
|
|
23
26
|
getTransports() {
|
|
24
27
|
const transports = [];
|
|
25
28
|
this.loggers.forEach((logger) => transports.push(...logger.getTransports().entries()));
|
|
26
29
|
return new Map(transports);
|
|
27
30
|
}
|
|
28
|
-
async getLogs(transportId) {
|
|
31
|
+
async getLogs(transportId, params) {
|
|
29
32
|
for (const logger of this.loggers) {
|
|
30
|
-
const logs = await logger.getLogs(transportId);
|
|
31
|
-
if (logs.
|
|
33
|
+
const logs = await logger.getLogs(transportId, params);
|
|
34
|
+
if (logs.total > 0) {
|
|
32
35
|
return logs;
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
|
-
return [];
|
|
38
|
+
return { logs: [], total: 0, page: params?.page ?? 1, perPage: params?.perPage ?? 100, hasMore: false };
|
|
36
39
|
}
|
|
37
40
|
async getLogsByRunId(args) {
|
|
38
41
|
for (const logger of this.loggers) {
|
|
39
42
|
const logs = await logger.getLogsByRunId(args);
|
|
40
|
-
if (logs.
|
|
43
|
+
if (logs.total > 0) {
|
|
41
44
|
return logs;
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
|
-
return [];
|
|
47
|
+
return { logs: [], total: 0, page: args.page ?? 1, perPage: args.perPage ?? 100, hasMore: false };
|
|
45
48
|
}
|
|
46
49
|
};
|
|
47
50
|
|
|
@@ -58,18 +61,20 @@ var noopLogger = {
|
|
|
58
61
|
cleanup: async () => {
|
|
59
62
|
},
|
|
60
63
|
getTransports: () => /* @__PURE__ */ new Map(),
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
trackException: () => {
|
|
65
|
+
},
|
|
66
|
+
getLogs: async () => ({ logs: [], total: 0, page: 1, perPage: 100, hasMore: false }),
|
|
67
|
+
getLogsByRunId: async () => ({ logs: [], total: 0, page: 1, perPage: 100, hasMore: false })
|
|
63
68
|
};
|
|
64
69
|
var LoggerTransport = class extends stream.Transform {
|
|
65
70
|
constructor(opts = {}) {
|
|
66
71
|
super({ ...opts, objectMode: true });
|
|
67
72
|
}
|
|
68
73
|
async getLogsByRunId(_args) {
|
|
69
|
-
return [];
|
|
74
|
+
return { logs: [], total: 0, page: _args?.page ?? 1, perPage: _args?.perPage ?? 100, hasMore: false };
|
|
70
75
|
}
|
|
71
|
-
async getLogs() {
|
|
72
|
-
return [];
|
|
76
|
+
async getLogs(_args) {
|
|
77
|
+
return { logs: [], total: 0, page: _args?.page ?? 1, perPage: _args?.perPage ?? 100, hasMore: false };
|
|
73
78
|
}
|
|
74
79
|
};
|
|
75
80
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkTICDQWVJ_cjs = require('./chunk-TICDQWVJ.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkP3Q73CAW_cjs = require('./chunk-P3Q73CAW.cjs');
|
|
5
5
|
var chunkRWTSGWWL_cjs = require('./chunk-RWTSGWWL.cjs');
|
|
6
6
|
|
|
7
7
|
// src/voice/voice.ts
|
|
@@ -10,7 +10,7 @@ _MastraVoice_decorators = [chunkTICDQWVJ_cjs.InstrumentClass({
|
|
|
10
10
|
prefix: "voice",
|
|
11
11
|
excludeMethods: ["__setTools", "__setLogger", "__setTelemetry", "#log"]
|
|
12
12
|
})];
|
|
13
|
-
exports.MastraVoice = class MastraVoice extends (_a =
|
|
13
|
+
exports.MastraVoice = class MastraVoice extends (_a = chunkP3Q73CAW_cjs.MastraBase) {
|
|
14
14
|
listeningModel;
|
|
15
15
|
speechModel;
|
|
16
16
|
speaker;
|
|
@@ -36,17 +36,40 @@ var MastraLogger = class {
|
|
|
36
36
|
getTransports() {
|
|
37
37
|
return this.transports;
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
trackException(_error) {
|
|
40
|
+
}
|
|
41
|
+
async getLogs(transportId, params) {
|
|
40
42
|
if (!transportId || !this.transports.has(transportId)) {
|
|
41
|
-
return [];
|
|
43
|
+
return { logs: [], total: 0, page: params?.page ?? 1, perPage: params?.perPage ?? 100, hasMore: false };
|
|
42
44
|
}
|
|
43
|
-
return this.transports.get(transportId).getLogs() ??
|
|
45
|
+
return this.transports.get(transportId).getLogs(params) ?? {
|
|
46
|
+
logs: [],
|
|
47
|
+
total: 0,
|
|
48
|
+
page: params?.page ?? 1,
|
|
49
|
+
perPage: params?.perPage ?? 100,
|
|
50
|
+
hasMore: false
|
|
51
|
+
};
|
|
44
52
|
}
|
|
45
|
-
async getLogsByRunId({
|
|
53
|
+
async getLogsByRunId({
|
|
54
|
+
transportId,
|
|
55
|
+
runId,
|
|
56
|
+
fromDate,
|
|
57
|
+
toDate,
|
|
58
|
+
logLevel,
|
|
59
|
+
filters,
|
|
60
|
+
page,
|
|
61
|
+
perPage
|
|
62
|
+
}) {
|
|
46
63
|
if (!transportId || !this.transports.has(transportId) || !runId) {
|
|
47
|
-
return [];
|
|
64
|
+
return { logs: [], total: 0, page: page ?? 1, perPage: perPage ?? 100, hasMore: false };
|
|
48
65
|
}
|
|
49
|
-
return this.transports.get(transportId).getLogsByRunId({ runId }) ??
|
|
66
|
+
return this.transports.get(transportId).getLogsByRunId({ runId, fromDate, toDate, logLevel, filters, page, perPage }) ?? {
|
|
67
|
+
logs: [],
|
|
68
|
+
total: 0,
|
|
69
|
+
page: page ?? 1,
|
|
70
|
+
perPage: perPage ?? 100,
|
|
71
|
+
hasMore: false
|
|
72
|
+
};
|
|
50
73
|
}
|
|
51
74
|
};
|
|
52
75
|
|
|
@@ -80,11 +103,11 @@ var ConsoleLogger = class extends MastraLogger {
|
|
|
80
103
|
console.error(message, ...args);
|
|
81
104
|
}
|
|
82
105
|
}
|
|
83
|
-
async getLogs(_transportId) {
|
|
84
|
-
return [];
|
|
106
|
+
async getLogs(_transportId, _params) {
|
|
107
|
+
return { logs: [], total: 0, page: _params?.page ?? 1, perPage: _params?.perPage ?? 100, hasMore: false };
|
|
85
108
|
}
|
|
86
109
|
async getLogsByRunId(_args) {
|
|
87
|
-
return [];
|
|
110
|
+
return { logs: [], total: 0, page: _args.page ?? 1, perPage: _args.perPage ?? 100, hasMore: false };
|
|
88
111
|
}
|
|
89
112
|
};
|
|
90
113
|
|