@mastra/core 0.10.3 → 0.10.4-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/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-Dmg7H-Iz.d.cts → base-BBs8xtlU.d.cts} +71 -6
- 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-Bdo-CPMn.d.ts → base-DKqdQHNd.d.ts} +71 -6
- 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-EWDGXKOQ.js → chunk-36UICULV.js} +2 -1
- package/dist/{chunk-JOCKZ2US.js → chunk-5IEKR756.js} +1 -1
- package/dist/{chunk-XXVGT7SJ.js → chunk-5YDTZN2X.js} +32 -9
- package/dist/{chunk-4TEWSQS5.js → chunk-6FYLLPWK.js} +1 -1
- package/dist/chunk-7LRIVP5A.cjs +138 -0
- package/dist/{chunk-FLPSXJWQ.js → chunk-7UNDRBOU.js} +2 -2
- 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-5EB62G6T.js → chunk-DU32FMDF.js} +3 -3
- package/dist/{chunk-CYJF6U6B.cjs → chunk-FEYYOBBG.cjs} +2 -2
- package/dist/{chunk-K7BZ4VXX.js → chunk-GSELXPJC.js} +3 -3
- package/dist/{chunk-SH2C4VTJ.cjs → chunk-GV6P24NY.cjs} +25 -14
- package/dist/{chunk-FHLDRRKJ.cjs → chunk-H5IRI46R.cjs} +3 -3
- package/dist/{chunk-FGBS7VRU.js → chunk-HFEELWJO.js} +33 -23
- package/dist/{chunk-PMAVDBJY.js → chunk-IM7CLVLZ.js} +1 -1
- package/dist/{chunk-TIPFGQCO.js → chunk-IZGRJXUQ.js} +19 -8
- package/dist/{chunk-XJCP3SLA.js → chunk-JNMQKJH4.js} +1 -1
- package/dist/{chunk-3JGO7S6X.cjs → chunk-JYLH5IY3.cjs} +4 -4
- package/dist/{chunk-TAHSAZUN.cjs → chunk-LEK3J7YN.cjs} +2 -2
- package/dist/{chunk-B4TMM6NT.js → chunk-MGOJI66G.js} +25 -9
- package/dist/{chunk-ERUGEZPR.cjs → chunk-NFGQDPZL.cjs} +2 -2
- package/dist/{chunk-7MWWPVCE.js → chunk-NWJWIOVO.js} +48 -2
- package/dist/{chunk-MVXVUMLA.cjs → chunk-OKHKG5C7.cjs} +42 -26
- 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-VBSKHNCY.cjs → chunk-RO5VPM3P.cjs} +39 -29
- package/dist/{chunk-LMTSGD2E.cjs → chunk-RORSYAKV.cjs} +7 -7
- package/dist/{chunk-HZ7ME4LD.cjs → chunk-S6WRT7GI.cjs} +4 -4
- package/dist/{chunk-ZPOETARN.js → chunk-SI2ENZ3O.js} +2 -2
- package/dist/chunk-TRJIWZKM.js +390 -0
- package/dist/{chunk-IBIGJYTD.cjs → chunk-UJODXBBX.cjs} +8 -8
- package/dist/{chunk-677GIYFF.js → chunk-YCYAVLYR.js} +1 -1
- package/dist/{chunk-TICDQWVJ.cjs → chunk-ZAXPU6F2.cjs} +2 -1
- 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 +58 -58
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +14 -14
- 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 +4 -4
- package/dist/server/index.d.cts +5 -4
- package/dist/server/index.d.ts +5 -4
- package/dist/server/index.js +2 -2
- package/dist/storage/index.cjs +17 -12
- package/dist/storage/index.d.cts +11 -5
- package/dist/storage/index.d.ts +11 -5
- package/dist/storage/index.js +9 -4
- package/dist/telemetry/index.cjs +7 -7
- package/dist/telemetry/index.d.cts +4 -3
- package/dist/telemetry/index.d.ts +4 -3
- package/dist/telemetry/index.js +1 -1
- 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 +10 -11
- package/dist/chunk-WWLMZIHW.cjs +0 -995
- package/dist/chunk-X6VHQCYN.cjs +0 -92
- 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 chunkOKHKG5C7_cjs = require('../chunk-OKHKG5C7.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 chunkOKHKG5C7_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, bT as AgentGenerateOptions, bU as AgentStreamOptions, bS as DynamicArgument, bq as MastraLanguageModel, bV as MastraMessageContentV2, s as MastraMessageV2, bQ as MessageList, T as ToolsInput, bR as ToolsetsInput } from '../base-BBs8xtlU.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, bT as AgentGenerateOptions, bU as AgentStreamOptions, bS as DynamicArgument, bq as MastraLanguageModel, bV as MastraMessageContentV2, s as MastraMessageV2, bQ as MessageList, T as ToolsInput, bR as ToolsetsInput } from '../base-DKqdQHNd.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-MGOJI66G.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';
|
|
@@ -1660,6 +1675,22 @@ type SharedMemoryConfig = {
|
|
|
1660
1675
|
embedder?: EmbeddingModel<string>;
|
|
1661
1676
|
processors?: MemoryProcessor[];
|
|
1662
1677
|
};
|
|
1678
|
+
type TraceType = {
|
|
1679
|
+
id: string;
|
|
1680
|
+
parentSpanId: string | null;
|
|
1681
|
+
name: string;
|
|
1682
|
+
traceId: string;
|
|
1683
|
+
scope: string;
|
|
1684
|
+
kind: number;
|
|
1685
|
+
attributes: Record<string, unknown> | null;
|
|
1686
|
+
status: Record<string, unknown> | null;
|
|
1687
|
+
events: Record<string, unknown> | null;
|
|
1688
|
+
links: Record<string, unknown> | null;
|
|
1689
|
+
other: Record<string, unknown> | null;
|
|
1690
|
+
startTime: number;
|
|
1691
|
+
endTime: number;
|
|
1692
|
+
createdAt: Date;
|
|
1693
|
+
};
|
|
1663
1694
|
|
|
1664
1695
|
type MastraMessageContentV2 = {
|
|
1665
1696
|
format: 2;
|
|
@@ -3095,11 +3126,36 @@ declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<string,
|
|
|
3095
3126
|
* @returns The network with the specified ID, or undefined if not found
|
|
3096
3127
|
*/
|
|
3097
3128
|
getNetwork(networkId: string): AgentNetwork | undefined;
|
|
3098
|
-
getLogsByRunId({ runId, transportId }: {
|
|
3129
|
+
getLogsByRunId({ runId, transportId, fromDate, toDate, logLevel, filters, page, perPage, }: {
|
|
3099
3130
|
runId: string;
|
|
3100
3131
|
transportId: string;
|
|
3101
|
-
|
|
3102
|
-
|
|
3132
|
+
fromDate?: Date;
|
|
3133
|
+
toDate?: Date;
|
|
3134
|
+
logLevel?: LogLevel;
|
|
3135
|
+
filters?: Record<string, any>;
|
|
3136
|
+
page?: number;
|
|
3137
|
+
perPage?: number;
|
|
3138
|
+
}): Promise<{
|
|
3139
|
+
logs: BaseLogMessage[];
|
|
3140
|
+
total: number;
|
|
3141
|
+
page: number;
|
|
3142
|
+
perPage: number;
|
|
3143
|
+
hasMore: boolean;
|
|
3144
|
+
}>;
|
|
3145
|
+
getLogs(transportId: string, params?: {
|
|
3146
|
+
fromDate?: Date;
|
|
3147
|
+
toDate?: Date;
|
|
3148
|
+
logLevel?: LogLevel;
|
|
3149
|
+
filters?: Record<string, any>;
|
|
3150
|
+
page?: number;
|
|
3151
|
+
perPage?: number;
|
|
3152
|
+
}): Promise<{
|
|
3153
|
+
logs: BaseLogMessage[];
|
|
3154
|
+
total: number;
|
|
3155
|
+
page: number;
|
|
3156
|
+
perPage: number;
|
|
3157
|
+
hasMore: boolean;
|
|
3158
|
+
}>;
|
|
3103
3159
|
/**
|
|
3104
3160
|
* Get all registered MCP server instances.
|
|
3105
3161
|
* @returns A record of MCP server ID to MCPServerBase instance, or undefined if none are registered.
|
|
@@ -3337,6 +3393,10 @@ declare abstract class MastraStorage extends MastraBase {
|
|
|
3337
3393
|
constructor({ name }: {
|
|
3338
3394
|
name: string;
|
|
3339
3395
|
});
|
|
3396
|
+
protected ensureDate(date: Date | string | undefined): Date | undefined;
|
|
3397
|
+
protected serializeDate(date: Date | string | undefined): string | undefined;
|
|
3398
|
+
protected getSqlType(type: StorageColumn['type']): string;
|
|
3399
|
+
protected getDefaultValue(type: StorageColumn['type']): string;
|
|
3340
3400
|
abstract createTable({ tableName }: {
|
|
3341
3401
|
tableName: TABLE_NAMES;
|
|
3342
3402
|
schema: Record<string, StorageColumn>;
|
|
@@ -3344,6 +3404,11 @@ declare abstract class MastraStorage extends MastraBase {
|
|
|
3344
3404
|
abstract clearTable({ tableName }: {
|
|
3345
3405
|
tableName: TABLE_NAMES;
|
|
3346
3406
|
}): Promise<void>;
|
|
3407
|
+
abstract alterTable(args: {
|
|
3408
|
+
tableName: TABLE_NAMES;
|
|
3409
|
+
schema: Record<string, StorageColumn>;
|
|
3410
|
+
ifNotExists: string[];
|
|
3411
|
+
}): Promise<void>;
|
|
3347
3412
|
abstract insert({ tableName, record }: {
|
|
3348
3413
|
tableName: TABLE_NAMES;
|
|
3349
3414
|
record: Record<string, any>;
|
|
@@ -3435,4 +3500,4 @@ declare abstract class MastraStorage extends MastraBase {
|
|
|
3435
3500
|
}): Promise<WorkflowRun | null>;
|
|
3436
3501
|
}
|
|
3437
3502
|
|
|
3438
|
-
export {
|
|
3503
|
+
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 StepFlowEntry 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 TraceType as aX, type MemoryProcessorOpts as aY, MemoryProcessor as aZ, memoryDefaultOptions 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 SerializedStep as b0, type SerializedStepFlowEntry as b1, createStep as b2, cloneStep as b3, createWorkflow as b4, cloneWorkflow as b5, type WorkflowResult as b6, Run as b7, type ExecutionGraph as b8, ExecutionEngine as b9, type MCPServerHonoSSEOptions as bA, type MCPServerHTTPOptions as bB, type Repository as bC, type VersionDetail as bD, type ArgumentInfo as bE, type PositionalArgumentInfo as bF, type NamedArgumentInfo as bG, type SubcommandInfo as bH, type CommandInfo as bI, type EnvironmentVariableInfo as bJ, type PackageInfo as bK, type RemoteInfo as bL, type MCPServerConfig as bM, type ServerInfo as bN, type ServerDetailInfo as bO, type MCPToolType as bP, MessageList as bQ, type ToolsetsInput as bR, type DynamicArgument as bS, type AgentGenerateOptions as bT, type AgentStreamOptions as bU, type MastraMessageContentV2 as bV, type ExecuteFunction as ba, type StepSuccess as bb, type StepFailure as bc, type StepSuspended as bd, type StepRunning as be, type StepResult as bf, type StepsRecord as bg, type DynamicMapping as bh, type PathsToStringProps as bi, type ExtractSchemaType as bj, type ExtractSchemaFromStep as bk, type VariableReference as bl, type StreamEvent as bm, type WatchEvent as bn, type ZodPathType as bo, type WorkflowRunState as bp, type MastraLanguageModel as bq, type VoiceEventType as br, type VoiceEventMap as bs, type VoiceConfig as bt, MastraVoice as bu, CompositeVoice as bv, DefaultVoice as bw, type AgentNetworkConfig as bx, type ConvertedTool as by, type MCPServerSSEOptions 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';
|
|
@@ -1660,6 +1675,22 @@ type SharedMemoryConfig = {
|
|
|
1660
1675
|
embedder?: EmbeddingModel<string>;
|
|
1661
1676
|
processors?: MemoryProcessor[];
|
|
1662
1677
|
};
|
|
1678
|
+
type TraceType = {
|
|
1679
|
+
id: string;
|
|
1680
|
+
parentSpanId: string | null;
|
|
1681
|
+
name: string;
|
|
1682
|
+
traceId: string;
|
|
1683
|
+
scope: string;
|
|
1684
|
+
kind: number;
|
|
1685
|
+
attributes: Record<string, unknown> | null;
|
|
1686
|
+
status: Record<string, unknown> | null;
|
|
1687
|
+
events: Record<string, unknown> | null;
|
|
1688
|
+
links: Record<string, unknown> | null;
|
|
1689
|
+
other: Record<string, unknown> | null;
|
|
1690
|
+
startTime: number;
|
|
1691
|
+
endTime: number;
|
|
1692
|
+
createdAt: Date;
|
|
1693
|
+
};
|
|
1663
1694
|
|
|
1664
1695
|
type MastraMessageContentV2 = {
|
|
1665
1696
|
format: 2;
|
|
@@ -3095,11 +3126,36 @@ declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<string,
|
|
|
3095
3126
|
* @returns The network with the specified ID, or undefined if not found
|
|
3096
3127
|
*/
|
|
3097
3128
|
getNetwork(networkId: string): AgentNetwork | undefined;
|
|
3098
|
-
getLogsByRunId({ runId, transportId }: {
|
|
3129
|
+
getLogsByRunId({ runId, transportId, fromDate, toDate, logLevel, filters, page, perPage, }: {
|
|
3099
3130
|
runId: string;
|
|
3100
3131
|
transportId: string;
|
|
3101
|
-
|
|
3102
|
-
|
|
3132
|
+
fromDate?: Date;
|
|
3133
|
+
toDate?: Date;
|
|
3134
|
+
logLevel?: LogLevel;
|
|
3135
|
+
filters?: Record<string, any>;
|
|
3136
|
+
page?: number;
|
|
3137
|
+
perPage?: number;
|
|
3138
|
+
}): Promise<{
|
|
3139
|
+
logs: BaseLogMessage[];
|
|
3140
|
+
total: number;
|
|
3141
|
+
page: number;
|
|
3142
|
+
perPage: number;
|
|
3143
|
+
hasMore: boolean;
|
|
3144
|
+
}>;
|
|
3145
|
+
getLogs(transportId: string, params?: {
|
|
3146
|
+
fromDate?: Date;
|
|
3147
|
+
toDate?: Date;
|
|
3148
|
+
logLevel?: LogLevel;
|
|
3149
|
+
filters?: Record<string, any>;
|
|
3150
|
+
page?: number;
|
|
3151
|
+
perPage?: number;
|
|
3152
|
+
}): Promise<{
|
|
3153
|
+
logs: BaseLogMessage[];
|
|
3154
|
+
total: number;
|
|
3155
|
+
page: number;
|
|
3156
|
+
perPage: number;
|
|
3157
|
+
hasMore: boolean;
|
|
3158
|
+
}>;
|
|
3103
3159
|
/**
|
|
3104
3160
|
* Get all registered MCP server instances.
|
|
3105
3161
|
* @returns A record of MCP server ID to MCPServerBase instance, or undefined if none are registered.
|
|
@@ -3337,6 +3393,10 @@ declare abstract class MastraStorage extends MastraBase {
|
|
|
3337
3393
|
constructor({ name }: {
|
|
3338
3394
|
name: string;
|
|
3339
3395
|
});
|
|
3396
|
+
protected ensureDate(date: Date | string | undefined): Date | undefined;
|
|
3397
|
+
protected serializeDate(date: Date | string | undefined): string | undefined;
|
|
3398
|
+
protected getSqlType(type: StorageColumn['type']): string;
|
|
3399
|
+
protected getDefaultValue(type: StorageColumn['type']): string;
|
|
3340
3400
|
abstract createTable({ tableName }: {
|
|
3341
3401
|
tableName: TABLE_NAMES;
|
|
3342
3402
|
schema: Record<string, StorageColumn>;
|
|
@@ -3344,6 +3404,11 @@ declare abstract class MastraStorage extends MastraBase {
|
|
|
3344
3404
|
abstract clearTable({ tableName }: {
|
|
3345
3405
|
tableName: TABLE_NAMES;
|
|
3346
3406
|
}): Promise<void>;
|
|
3407
|
+
abstract alterTable(args: {
|
|
3408
|
+
tableName: TABLE_NAMES;
|
|
3409
|
+
schema: Record<string, StorageColumn>;
|
|
3410
|
+
ifNotExists: string[];
|
|
3411
|
+
}): Promise<void>;
|
|
3347
3412
|
abstract insert({ tableName, record }: {
|
|
3348
3413
|
tableName: TABLE_NAMES;
|
|
3349
3414
|
record: Record<string, any>;
|
|
@@ -3435,4 +3500,4 @@ declare abstract class MastraStorage extends MastraBase {
|
|
|
3435
3500
|
}): Promise<WorkflowRun | null>;
|
|
3436
3501
|
}
|
|
3437
3502
|
|
|
3438
|
-
export {
|
|
3503
|
+
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 StepFlowEntry 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 TraceType as aX, type MemoryProcessorOpts as aY, MemoryProcessor as aZ, memoryDefaultOptions 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 SerializedStep as b0, type SerializedStepFlowEntry as b1, createStep as b2, cloneStep as b3, createWorkflow as b4, cloneWorkflow as b5, type WorkflowResult as b6, Run as b7, type ExecutionGraph as b8, ExecutionEngine as b9, type MCPServerHonoSSEOptions as bA, type MCPServerHTTPOptions as bB, type Repository as bC, type VersionDetail as bD, type ArgumentInfo as bE, type PositionalArgumentInfo as bF, type NamedArgumentInfo as bG, type SubcommandInfo as bH, type CommandInfo as bI, type EnvironmentVariableInfo as bJ, type PackageInfo as bK, type RemoteInfo as bL, type MCPServerConfig as bM, type ServerInfo as bN, type ServerDetailInfo as bO, type MCPToolType as bP, MessageList as bQ, type ToolsetsInput as bR, type DynamicArgument as bS, type AgentGenerateOptions as bT, type AgentStreamOptions as bU, type MastraMessageContentV2 as bV, type ExecuteFunction as ba, type StepSuccess as bb, type StepFailure as bc, type StepSuspended as bd, type StepRunning as be, type StepResult as bf, type StepsRecord as bg, type DynamicMapping as bh, type PathsToStringProps as bi, type ExtractSchemaType as bj, type ExtractSchemaFromStep as bk, type VariableReference as bl, type StreamEvent as bm, type WatchEvent as bn, type ZodPathType as bo, type WorkflowRunState as bp, type MastraLanguageModel as bq, type VoiceEventType as br, type VoiceEventMap as bs, type VoiceConfig as bt, MastraVoice as bu, CompositeVoice as bv, DefaultVoice as bw, type AgentNetworkConfig as bx, type ConvertedTool as by, type MCPServerSSEOptions 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
|
|
|
@@ -211,7 +211,8 @@ var TABLE_SCHEMAS = {
|
|
|
211
211
|
content: { type: "text", nullable: false },
|
|
212
212
|
role: { type: "text", nullable: false },
|
|
213
213
|
type: { type: "text", nullable: false },
|
|
214
|
-
createdAt: { type: "timestamp", nullable: false }
|
|
214
|
+
createdAt: { type: "timestamp", nullable: false },
|
|
215
|
+
resourceId: { type: "text", nullable: true }
|
|
215
216
|
},
|
|
216
217
|
[TABLE_TRACES]: {
|
|
217
218
|
id: { type: "text", nullable: false, primaryKey: true },
|