@mastra/core 0.10.8 → 0.10.9

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.
Files changed (93) hide show
  1. package/dist/agent/index.cjs +4 -4
  2. package/dist/agent/index.d.cts +8 -8
  3. package/dist/agent/index.d.ts +8 -8
  4. package/dist/agent/index.js +2 -2
  5. package/dist/{base-DVVTzIQy.d.cts → base-B_y9sMg0.d.cts} +1 -1
  6. package/dist/{base-B_WEJuiR.d.cts → base-Bu9IeyHt.d.cts} +48 -15
  7. package/dist/{base-BbdvunNJ.d.ts → base-ClrXcCRx.d.ts} +1 -1
  8. package/dist/{base-DnSegjq5.d.ts → base-D6PagN3X.d.ts} +48 -15
  9. package/dist/base.d.cts +2 -2
  10. package/dist/base.d.ts +2 -2
  11. package/dist/bundler/index.d.cts +2 -2
  12. package/dist/bundler/index.d.ts +2 -2
  13. package/dist/{chunk-V73Z32LN.js → chunk-5S3K64EU.js} +1 -1
  14. package/dist/{chunk-2D7NOO7S.cjs → chunk-6Y4UL5Z6.cjs} +11 -0
  15. package/dist/{chunk-QZ3VZRUU.cjs → chunk-7H2GET5Z.cjs} +6 -2
  16. package/dist/{chunk-YXQF4U4L.js → chunk-7XQIPES3.js} +5 -1
  17. package/dist/{chunk-CHBIZNA3.cjs → chunk-CWXF3ZG4.cjs} +31 -9
  18. package/dist/{chunk-GKCO24Z4.cjs → chunk-CZGP56Y3.cjs} +2 -2
  19. package/dist/{chunk-WTTYHREJ.js → chunk-HM4AOWTY.js} +1 -1
  20. package/dist/{chunk-DO5R43AJ.js → chunk-JQOMTERC.js} +11 -1
  21. package/dist/{chunk-FBURVKXA.js → chunk-O7YOEBDC.js} +220 -41
  22. package/dist/{chunk-E4A4XDDG.cjs → chunk-SO4GUX3Q.cjs} +221 -42
  23. package/dist/{chunk-EYJXFYUH.cjs → chunk-SUF6QXSI.cjs} +70 -40
  24. package/dist/{chunk-QIQOR45O.js → chunk-VMIMBLH4.js} +31 -9
  25. package/dist/{chunk-U2LC4K7N.cjs → chunk-X73RHIY2.cjs} +2 -2
  26. package/dist/{chunk-WK3SHUOG.js → chunk-Y2FKASKG.js} +61 -31
  27. package/dist/deployer/index.d.cts +2 -2
  28. package/dist/deployer/index.d.ts +2 -2
  29. package/dist/eval/index.d.cts +6 -6
  30. package/dist/eval/index.d.ts +6 -6
  31. package/dist/index.cjs +22 -22
  32. package/dist/index.d.cts +5 -5
  33. package/dist/index.d.ts +5 -5
  34. package/dist/index.js +7 -7
  35. package/dist/integration/index.d.cts +10 -10
  36. package/dist/integration/index.d.ts +10 -10
  37. package/dist/llm/index.d.cts +6 -6
  38. package/dist/llm/index.d.ts +6 -6
  39. package/dist/logger/index.cjs +8 -4
  40. package/dist/logger/index.d.cts +2 -2
  41. package/dist/logger/index.d.ts +2 -2
  42. package/dist/logger/index.js +1 -1
  43. package/dist/{logger-CpL0z5v_.d.cts → logger-B8XXh6ya.d.cts} +2 -1
  44. package/dist/{logger-DtVDdb81.d.ts → logger-Bpa2oLL4.d.ts} +2 -1
  45. package/dist/mastra/index.cjs +2 -2
  46. package/dist/mastra/index.d.cts +4 -4
  47. package/dist/mastra/index.d.ts +4 -4
  48. package/dist/mastra/index.js +1 -1
  49. package/dist/mcp/index.d.cts +8 -8
  50. package/dist/mcp/index.d.ts +8 -8
  51. package/dist/memory/index.cjs +4 -4
  52. package/dist/memory/index.d.cts +6 -6
  53. package/dist/memory/index.d.ts +6 -6
  54. package/dist/memory/index.js +1 -1
  55. package/dist/network/index.cjs +2 -2
  56. package/dist/network/index.d.cts +6 -6
  57. package/dist/network/index.d.ts +6 -6
  58. package/dist/network/index.js +1 -1
  59. package/dist/network/vNext/index.cjs +37 -23
  60. package/dist/network/vNext/index.d.cts +8 -8
  61. package/dist/network/vNext/index.d.ts +8 -8
  62. package/dist/network/vNext/index.js +26 -12
  63. package/dist/relevance/index.cjs +4 -4
  64. package/dist/relevance/index.d.cts +8 -8
  65. package/dist/relevance/index.d.ts +8 -8
  66. package/dist/relevance/index.js +1 -1
  67. package/dist/server/index.d.cts +7 -7
  68. package/dist/server/index.d.ts +7 -7
  69. package/dist/storage/index.cjs +2 -2
  70. package/dist/storage/index.d.cts +7 -7
  71. package/dist/storage/index.d.ts +7 -7
  72. package/dist/storage/index.js +1 -1
  73. package/dist/telemetry/index.d.cts +6 -6
  74. package/dist/telemetry/index.d.ts +6 -6
  75. package/dist/tools/index.d.cts +9 -9
  76. package/dist/tools/index.d.ts +9 -9
  77. package/dist/tts/index.d.cts +2 -2
  78. package/dist/tts/index.d.ts +2 -2
  79. package/dist/utils.d.cts +3 -3
  80. package/dist/utils.d.ts +3 -3
  81. package/dist/vector/index.d.cts +2 -2
  82. package/dist/vector/index.d.ts +2 -2
  83. package/dist/voice/index.d.cts +6 -6
  84. package/dist/voice/index.d.ts +6 -6
  85. package/dist/workflows/index.cjs +10 -10
  86. package/dist/workflows/index.d.cts +34 -13
  87. package/dist/workflows/index.d.ts +34 -13
  88. package/dist/workflows/index.js +1 -1
  89. package/dist/workflows/legacy/index.cjs +22 -22
  90. package/dist/workflows/legacy/index.d.cts +11 -11
  91. package/dist/workflows/legacy/index.d.ts +11 -11
  92. package/dist/workflows/legacy/index.js +1 -1
  93. package/package.json +4 -4
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkEYJXFYUH_cjs = require('../chunk-EYJXFYUH.cjs');
4
- var chunkCHBIZNA3_cjs = require('../chunk-CHBIZNA3.cjs');
3
+ var chunkSUF6QXSI_cjs = require('../chunk-SUF6QXSI.cjs');
4
+ var chunkCWXF3ZG4_cjs = require('../chunk-CWXF3ZG4.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Agent", {
9
9
  enumerable: true,
10
- get: function () { return chunkEYJXFYUH_cjs.Agent; }
10
+ get: function () { return chunkSUF6QXSI_cjs.Agent; }
11
11
  });
12
12
  Object.defineProperty(exports, "MessageList", {
13
13
  enumerable: true,
14
- get: function () { return chunkCHBIZNA3_cjs.MessageList; }
14
+ get: function () { return chunkCWXF3ZG4_cjs.MessageList; }
15
15
  });
@@ -1,21 +1,21 @@
1
1
  export { Message as AiMessageType } from 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { A as Agent, av as AgentConfig, c5 as AgentGenerateOptions, c4 as AgentMemoryOption, c6 as AgentStreamOptions, c3 as DynamicArgument, bD as MastraLanguageModel, c7 as MastraMessageContentV2, t as MastraMessageV2, c1 as MessageList, T as ToolsInput, c2 as ToolsetsInput } from '../base-B_WEJuiR.cjs';
5
- import '../base-DVVTzIQy.cjs';
4
+ export { A as Agent, av as AgentConfig, c6 as AgentGenerateOptions, c5 as AgentMemoryOption, c7 as AgentStreamOptions, aZ as DynamicArgument, aY as MastraLanguageModel, c8 as MastraMessageContentV2, t as MastraMessageV2, c3 as MessageList, T as ToolsInput, c4 as ToolsetsInput } from '../base-Bu9IeyHt.cjs';
5
+ import '../base-B_y9sMg0.cjs';
6
6
  import '../types-Bo1uigWx.cjs';
7
7
  import '../runtime-context/index.cjs';
8
- import '../logger-CpL0z5v_.cjs';
8
+ import '../logger-B8XXh6ya.cjs';
9
9
  import '../error/index.cjs';
10
10
  import 'stream';
11
- import '../tts/index.cjs';
12
- import '@opentelemetry/api';
13
- import '@opentelemetry/sdk-trace-base';
14
- import '../vector/index.cjs';
15
- import '../vector/filter/index.cjs';
16
11
  import 'sift';
12
+ import '@opentelemetry/api';
17
13
  import 'xstate';
18
14
  import 'node:events';
15
+ import '../vector/index.cjs';
16
+ import '../vector/filter/index.cjs';
17
+ import '@opentelemetry/sdk-trace-base';
18
+ import '../tts/index.cjs';
19
19
  import 'node:http';
20
20
  import 'hono';
21
21
  import 'stream/web';
@@ -1,21 +1,21 @@
1
1
  export { Message as AiMessageType } from 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { A as Agent, av as AgentConfig, c5 as AgentGenerateOptions, c4 as AgentMemoryOption, c6 as AgentStreamOptions, c3 as DynamicArgument, bD as MastraLanguageModel, c7 as MastraMessageContentV2, t as MastraMessageV2, c1 as MessageList, T as ToolsInput, c2 as ToolsetsInput } from '../base-DnSegjq5.js';
5
- import '../base-BbdvunNJ.js';
4
+ export { A as Agent, av as AgentConfig, c6 as AgentGenerateOptions, c5 as AgentMemoryOption, c7 as AgentStreamOptions, aZ as DynamicArgument, aY as MastraLanguageModel, c8 as MastraMessageContentV2, t as MastraMessageV2, c3 as MessageList, T as ToolsInput, c4 as ToolsetsInput } from '../base-D6PagN3X.js';
5
+ import '../base-ClrXcCRx.js';
6
6
  import '../types-Bo1uigWx.js';
7
7
  import '../runtime-context/index.js';
8
- import '../logger-DtVDdb81.js';
8
+ import '../logger-Bpa2oLL4.js';
9
9
  import '../error/index.js';
10
10
  import 'stream';
11
- import '../tts/index.js';
12
- import '@opentelemetry/api';
13
- import '@opentelemetry/sdk-trace-base';
14
- import '../vector/index.js';
15
- import '../vector/filter/index.js';
16
11
  import 'sift';
12
+ import '@opentelemetry/api';
17
13
  import 'xstate';
18
14
  import 'node:events';
15
+ import '../vector/index.js';
16
+ import '../vector/filter/index.js';
17
+ import '@opentelemetry/sdk-trace-base';
18
+ import '../tts/index.js';
19
19
  import 'node:http';
20
20
  import 'hono';
21
21
  import 'stream/web';
@@ -1,2 +1,2 @@
1
- export { Agent } from '../chunk-WK3SHUOG.js';
2
- export { MessageList } from '../chunk-QIQOR45O.js';
1
+ export { Agent } from '../chunk-Y2FKASKG.js';
2
+ export { MessageList } from '../chunk-VMIMBLH4.js';
@@ -1,6 +1,6 @@
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-CpL0z5v_.cjs';
3
+ import { R as RegisteredLogger, I as IMastraLogger } from './logger-B8XXh6ya.cjs';
4
4
  import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
5
5
 
6
6
  /** Sampling strategy configuration for OpenTelemetry */
@@ -1,11 +1,9 @@
1
1
  import * as ai from 'ai';
2
2
  import { Tool as Tool$2, Schema, ToolExecutionOptions, LanguageModelV1, CoreMessage as CoreMessage$1, GenerateTextResult, GenerateObjectResult, StreamTextResult, StreamObjectResult, TextStreamPart, UserContent, AssistantContent, ToolContent, EmbeddingModel, UIMessage, Message, IDGenerator as IDGenerator$1, CoreSystemMessage as CoreSystemMessage$1, LanguageModel as LanguageModel$1, 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, GenerateTextOnStepFinishCallback, StreamTextOnFinishCallback, StreamObjectOnFinishCallback, StreamTextOnStepFinishCallback } from 'ai';
3
- import { M as MastraBase, a as Telemetry, O as OtelConfig, T as Trace } from './base-DVVTzIQy.cjs';
3
+ import { M as MastraBase, a as Telemetry, O as OtelConfig, T as Trace } from './base-B_y9sMg0.cjs';
4
4
  import { z, ZodSchema, ZodObject } from 'zod';
5
- import { B as BaseLogMessage, R as RegisteredLogger, I as IMastraLogger, a as LogLevel } from './logger-CpL0z5v_.cjs';
5
+ import { B as BaseLogMessage, R as RegisteredLogger, I as IMastraLogger, a as LogLevel } from './logger-B8XXh6ya.cjs';
6
6
  import { JSONSchema7Type, JSONSchema7 } from 'json-schema';
7
- import { MastraTTS } from './tts/index.cjs';
8
- import { MastraVector } from './vector/index.cjs';
9
7
  import { M as Metric, a as MetricResult, T as TestInfo } from './types-Bo1uigWx.cjs';
10
8
  import { Query } from 'sift';
11
9
  import { RuntimeContext } from './runtime-context/index.cjs';
@@ -13,6 +11,8 @@ import { Span } from '@opentelemetry/api';
13
11
  import * as xstate from 'xstate';
14
12
  import { Snapshot } from 'xstate';
15
13
  import EventEmitter from 'node:events';
14
+ import { MastraVector } from './vector/index.cjs';
15
+ import { MastraTTS } from './tts/index.cjs';
16
16
  import * as http from 'node:http';
17
17
  import { Context, HonoRequest, Handler, MiddlewareHandler } from 'hono';
18
18
  import * as stream_web from 'stream/web';
@@ -940,7 +940,6 @@ declare class Machine<TSteps extends LegacyStep<any, any, any, any>[] = LegacySt
940
940
  output: ResolverFunctionOutput;
941
941
  }, xstate.AnyEventObject>;
942
942
  }) => {
943
- mastra?: MastraUnion | undefined;
944
943
  steps: {
945
944
  [x: string]: {
946
945
  status: "failed";
@@ -965,6 +964,7 @@ declare class Machine<TSteps extends LegacyStep<any, any, any, any>[] = LegacySt
965
964
  output?: any;
966
965
  };
967
966
  };
967
+ mastra?: MastraUnion | undefined;
968
968
  attempts: Record<string, number>;
969
969
  inputData: Record<string, any>;
970
970
  triggerData: any;
@@ -1167,17 +1167,20 @@ type ExecuteFunction<TStepInput, TStepOutput, TResumeSchema, TSuspendSchema, Eng
1167
1167
  runtimeContext: RuntimeContext;
1168
1168
  inputData: TStepInput;
1169
1169
  resumeData?: TResumeSchema;
1170
+ runCount: number;
1170
1171
  getInitData<T extends z.ZodType<any>>(): z.infer<T>;
1171
1172
  getInitData<T extends Workflow<any, any, any, any, any>>(): T extends undefined ? unknown : z.infer<NonNullable<T['inputSchema']>>;
1172
1173
  getStepResult<T extends Step<any, any, any>>(stepId: T): T['outputSchema'] extends undefined ? unknown : z.infer<NonNullable<T['outputSchema']>>;
1173
1174
  suspend(suspendPayload: TSuspendSchema): Promise<any>;
1174
1175
  bail(result: any): any;
1176
+ abort(): any;
1175
1177
  resume?: {
1176
1178
  steps: string[];
1177
1179
  resumePayload: any;
1178
1180
  };
1179
1181
  [EMITTER_SYMBOL]: Emitter;
1180
1182
  engine: EngineType;
1183
+ abortSignal: AbortSignal;
1181
1184
  }) => Promise<TStepOutput>;
1182
1185
  interface Step<TStepId extends string = string, TSchemaIn extends z.ZodType<any> = z.ZodType<any>, TSchemaOut extends z.ZodType<any> = z.ZodType<any>, TResumeSchema extends z.ZodType<any> = z.ZodType<any>, TSuspendSchema extends z.ZodType<any> = z.ZodType<any>, TEngineType = any> {
1183
1186
  id: TStepId;
@@ -1272,7 +1275,7 @@ type StreamEvent = TextStreamPart<any> | {
1272
1275
  payload: any;
1273
1276
  id: string;
1274
1277
  };
1275
- type WorkflowRunStatus = 'running' | 'success' | 'failed' | 'suspended' | 'waiting' | 'pending';
1278
+ type WorkflowRunStatus = 'running' | 'success' | 'failed' | 'suspended' | 'waiting' | 'pending' | 'canceled';
1276
1279
  type WatchEvent = {
1277
1280
  type: 'watch';
1278
1281
  payload: {
@@ -1361,6 +1364,7 @@ declare abstract class ExecutionEngine extends MastraBase {
1361
1364
  attempts?: number;
1362
1365
  delay?: number;
1363
1366
  };
1367
+ abortController: AbortController;
1364
1368
  }): Promise<TOutput>;
1365
1369
  }
1366
1370
 
@@ -1454,6 +1458,10 @@ type SerializedStepFlowEntry = {
1454
1458
  concurrency: number;
1455
1459
  };
1456
1460
  };
1461
+ type StepWithComponent = Step<string, any, any, any, any, any> & {
1462
+ component?: string;
1463
+ steps?: Record<string, StepWithComponent>;
1464
+ };
1457
1465
  declare function mapVariable<TStep extends Step<string, any, any, any, any, any>>({ step, path, }: {
1458
1466
  step: TStep;
1459
1467
  path: PathsToStringProps<ExtractSchemaType<ExtractSchemaFromStep<TStep, 'outputSchema'>>> | '.';
@@ -1542,7 +1550,7 @@ declare class Workflow<TEngineType = any, TSteps extends Step<string, any, any,
1542
1550
  description?: string | undefined;
1543
1551
  inputSchema: TInput;
1544
1552
  outputSchema: TOutput;
1545
- steps: Record<string, Step<string, any, any, any, any>>;
1553
+ steps: Record<string, StepWithComponent>;
1546
1554
  stepDefs?: TSteps;
1547
1555
  protected stepFlow: StepFlowEntry[];
1548
1556
  protected serializedStepFlow: SerializedStepFlowEntry[];
@@ -1633,7 +1641,7 @@ declare class Workflow<TEngineType = any, TSteps extends Step<string, any, any,
1633
1641
  createRunAsync(options?: {
1634
1642
  runId?: string;
1635
1643
  }): Promise<Run<TEngineType, TSteps, TInput, TOutput>>;
1636
- execute({ inputData, resumeData, suspend, resume, [EMITTER_SYMBOL]: emitter, mastra, runtimeContext, }: {
1644
+ execute({ inputData, resumeData, suspend, resume, [EMITTER_SYMBOL]: emitter, mastra, runtimeContext, abort, abortSignal, }: {
1637
1645
  inputData: z.infer<TInput>;
1638
1646
  resumeData?: any;
1639
1647
  getStepResult<T extends Step<any, any, any, any, any, TEngineType>>(stepId: T): T['outputSchema'] extends undefined ? unknown : z.infer<NonNullable<T['outputSchema']>>;
@@ -1649,6 +1657,9 @@ declare class Workflow<TEngineType = any, TSteps extends Step<string, any, any,
1649
1657
  mastra: Mastra;
1650
1658
  runtimeContext?: RuntimeContext;
1651
1659
  engine: DefaultEngineType;
1660
+ abortSignal: AbortSignal;
1661
+ bail: (result: any) => any;
1662
+ abort: () => any;
1652
1663
  }): Promise<z.infer<TOutput>>;
1653
1664
  getWorkflowRuns(args?: {
1654
1665
  fromDate?: Date;
@@ -1665,6 +1676,7 @@ declare class Workflow<TEngineType = any, TSteps extends Step<string, any, any,
1665
1676
  */
1666
1677
  declare class Run<TEngineType = any, TSteps extends Step<string, any, any, any, any, TEngineType>[] = Step<string, any, any, any, any, TEngineType>[], TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>> {
1667
1678
  #private;
1679
+ abortController: AbortController;
1668
1680
  protected emitter: EventEmitter$1;
1669
1681
  /**
1670
1682
  * Unique identifier for this workflow
@@ -1710,7 +1722,11 @@ declare class Run<TEngineType = any, TSteps extends Step<string, any, any, any,
1710
1722
  cleanup?: () => void;
1711
1723
  serializedStepGraph: SerializedStepFlowEntry[];
1712
1724
  });
1713
- sendEvent(event: string, data: any): void;
1725
+ /**
1726
+ * Cancels the workflow execution
1727
+ */
1728
+ cancel(): Promise<void>;
1729
+ sendEvent(event: string, data: any): Promise<void>;
1714
1730
  /**
1715
1731
  * Starts the workflow execution with the provided input
1716
1732
  * @param input The input data for the workflow
@@ -1908,7 +1924,9 @@ type MemoryConfig = {
1908
1924
  };
1909
1925
  workingMemory?: WorkingMemory;
1910
1926
  threads?: {
1911
- generateTitle?: boolean;
1927
+ generateTitle?: boolean | {
1928
+ model: DynamicArgument<MastraLanguageModel>;
1929
+ };
1912
1930
  };
1913
1931
  };
1914
1932
  type SharedMemoryConfig = {
@@ -2110,7 +2128,9 @@ declare abstract class MastraMemory extends MastraBase {
2110
2128
  * @param messages The messages to process
2111
2129
  * @returns The processed messages
2112
2130
  */
2113
- private applyProcessors;
2131
+ protected applyProcessors(messages: CoreMessage$1[], opts: {
2132
+ processors?: MemoryProcessor[];
2133
+ } & MemoryProcessorOpts): CoreMessage$1[];
2114
2134
  processMessages({ messages, processors, ...opts }: {
2115
2135
  messages: CoreMessage$1[];
2116
2136
  processors?: MemoryProcessor[];
@@ -2793,12 +2813,14 @@ declare class NewAgentNetwork extends MastraBase {
2793
2813
  threadId: z.ZodOptional<z.ZodString>;
2794
2814
  threadResourceId: z.ZodOptional<z.ZodString>;
2795
2815
  isOneOff: z.ZodBoolean;
2816
+ verboseIntrospection: z.ZodBoolean;
2796
2817
  }, "strip", z.ZodTypeAny, {
2797
2818
  resourceId: string;
2798
2819
  task: string;
2799
2820
  resourceType: "none" | "tool" | "workflow" | "agent";
2800
2821
  iteration: number;
2801
2822
  isOneOff: boolean;
2823
+ verboseIntrospection: boolean;
2802
2824
  threadId?: string | undefined;
2803
2825
  result?: string | undefined;
2804
2826
  threadResourceId?: string | undefined;
@@ -2808,6 +2830,7 @@ declare class NewAgentNetwork extends MastraBase {
2808
2830
  resourceType: "none" | "tool" | "workflow" | "agent";
2809
2831
  iteration: number;
2810
2832
  isOneOff: boolean;
2833
+ verboseIntrospection: boolean;
2811
2834
  threadId?: string | undefined;
2812
2835
  result?: string | undefined;
2813
2836
  threadResourceId?: string | undefined;
@@ -2856,12 +2879,14 @@ declare class NewAgentNetwork extends MastraBase {
2856
2879
  threadId: z.ZodOptional<z.ZodString>;
2857
2880
  threadResourceId: z.ZodOptional<z.ZodString>;
2858
2881
  isOneOff: z.ZodBoolean;
2882
+ verboseIntrospection: z.ZodBoolean;
2859
2883
  }, "strip", z.ZodTypeAny, {
2860
2884
  resourceId: string;
2861
2885
  task: string;
2862
2886
  resourceType: "none" | "tool" | "workflow" | "agent";
2863
2887
  iteration: number;
2864
2888
  isOneOff: boolean;
2889
+ verboseIntrospection: boolean;
2865
2890
  threadId?: string | undefined;
2866
2891
  result?: string | undefined;
2867
2892
  threadResourceId?: string | undefined;
@@ -2871,6 +2896,7 @@ declare class NewAgentNetwork extends MastraBase {
2871
2896
  resourceType: "none" | "tool" | "workflow" | "agent";
2872
2897
  iteration: number;
2873
2898
  isOneOff: boolean;
2899
+ verboseIntrospection: boolean;
2874
2900
  threadId?: string | undefined;
2875
2901
  result?: string | undefined;
2876
2902
  threadResourceId?: string | undefined;
@@ -3675,8 +3701,9 @@ declare class Agent<TAgentId extends string = string, TTools extends ToolsInput
3675
3701
  * @param options Options for getting the LLM
3676
3702
  * @returns A promise that resolves to the LLM instance
3677
3703
  */
3678
- getLLM({ runtimeContext }?: {
3704
+ getLLM({ runtimeContext, model, }?: {
3679
3705
  runtimeContext?: RuntimeContext;
3706
+ model?: MastraLanguageModel | DynamicArgument<MastraLanguageModel>;
3680
3707
  }): MastraLLMBase | Promise<MastraLLMBase>;
3681
3708
  /**
3682
3709
  * Gets the model, resolving it if it's a function
@@ -3694,12 +3721,13 @@ declare class Agent<TAgentId extends string = string, TTools extends ToolsInput
3694
3721
  * @param tools
3695
3722
  */
3696
3723
  __setTools(tools: TTools): void;
3697
- generateTitleFromUserMessage({ message, runtimeContext, }: {
3724
+ generateTitleFromUserMessage({ message, runtimeContext, model, }: {
3698
3725
  message: string | MessageInput;
3699
3726
  runtimeContext?: RuntimeContext;
3727
+ model?: DynamicArgument<MastraLanguageModel>;
3700
3728
  }): Promise<string>;
3701
3729
  getMostRecentUserMessage(messages: Array<UIMessage>): UIMessage | undefined;
3702
- genTitle(userMessage: string | MessageInput | undefined, runtimeContext: RuntimeContext): Promise<string>;
3730
+ genTitle(userMessage: string | MessageInput | undefined, runtimeContext: RuntimeContext, model?: DynamicArgument<MastraLanguageModel>): Promise<string | undefined>;
3703
3731
  fetchMemory({ threadId, thread: passedThread, memoryConfig, resourceId, runId, userMessages, systemMessage, messageList, }: {
3704
3732
  resourceId: string;
3705
3733
  threadId: string;
@@ -3818,6 +3846,11 @@ declare class Agent<TAgentId extends string = string, TTools extends ToolsInput
3818
3846
  }>, z.ZodObject<{
3819
3847
  text: z.ZodString;
3820
3848
  }>, any>;
3849
+ /**
3850
+ * Resolves the configuration for title generation.
3851
+ * @private
3852
+ */
3853
+ private resolveTitleGenerationConfig;
3821
3854
  }
3822
3855
 
3823
3856
  declare abstract class MastraStorage extends MastraBase {
@@ -3984,4 +4017,4 @@ declare abstract class MastraStorage extends MastraBase {
3984
4017
  }>;
3985
4018
  }
3986
4019
 
3987
- export { type StepGraph as $, Agent as A, type PaginationArgs as B, type CoreTool as C, type StorageGetTracesArg as D, type EvalRow as E, TABLE_WORKFLOW_SNAPSHOT as F, TABLE_EVALS as G, TABLE_MESSAGES as H, TABLE_THREADS as I, TABLE_TRACES as J, TABLE_RESOURCES as K, LegacyWorkflow as L, Mastra as M, NewAgentNetwork as N, TABLE_SCHEMAS as O, type PaginationInfo as P, type VariableReference$1 as Q, type StepResult$1 as R, type StepExecutionContext as S, type ToolsInput as T, type StepAction as U, type VercelTool as V, type WorkflowContext as W, type LegacyWorkflowRunResult as X, type WorkflowOptions as Y, type StepVariableType as Z, type StepNode as _, type MastraPrimitives as a, type MemoryConfig as a$, type RetryConfig as a0, type BaseCondition as a1, type ActionContext as a2, WhenConditionReturnValue as a3, type StepDef as a4, type StepCondition as a5, type StepConfig as a6, type StepsRecord$1 as a7, type WorkflowLogMessage as a8, type WorkflowEvent as a9, type CoreSystemMessage as aA, type CoreAssistantMessage as aB, type CoreUserMessage as aC, type CoreToolMessage as aD, type EmbedResult as aE, type EmbedManyResult as aF, type BaseStructuredOutputType as aG, type StructuredOutputType as aH, type StructuredOutputArrayItem as aI, type StructuredOutput as aJ, type GenerateReturn as aK, type StreamReturn as aL, type OutputType as aM, type DefaultLLMTextOptions as aN, type DefaultLLMTextObjectOptions as aO, type DefaultLLMStreamOptions as aP, type DefaultLLMStreamObjectOptions as aQ, type LLMTextOptions as aR, type LLMTextObjectOptions as aS, type LLMStreamOptions as aT, type LLMInnerStreamOptions as aU, type LLMStreamObjectOptions as aV, createMockModel as aW, type Config as aX, type MessageType as aY, type MessageResponse as aZ, type WorkingMemory as a_, type ResolverFunctionInput as aa, type ResolverFunctionOutput as ab, type SubscriberFunctionOutput as ac, type DependencyCheckOutput as ad, type StepResolverOutput as ae, type WorkflowActors as af, type WorkflowActionParams as ag, type WorkflowActions as ah, type LegacyWorkflowState as ai, type StepId as aj, type ExtractSchemaFromStep$1 as ak, type ExtractStepResult as al, type StepInputType as am, type ExtractSchemaType$1 as an, type PathsToStringProps$1 as ao, type LegacyWorkflowRunState as ap, type WorkflowResumeResult as aq, Tool$1 as ar, createTool as as, type InternalCoreTool as at, type ToolExecutionContext as au, type AgentConfig as av, type DefaultEngineType as aw, type WorkflowConfig as ax, type LanguageModel as ay, type CoreMessage as az, MastraMemory as b, type ServerDetailInfo as b$, type SharedMemoryConfig as b0, type TraceType as b1, type WorkingMemoryFormat as b2, type WorkingMemoryTemplate as b3, type MemoryProcessorOpts as b4, MemoryProcessor as b5, memoryDefaultOptions as b6, Tool as b7, type StepFlowEntry as b8, type SerializedStep as b9, type WatchEvent as bA, type ZodPathType as bB, type WorkflowRunState as bC, type MastraLanguageModel as bD, type AgentNetworkConfig as bE, type VoiceEventType as bF, type VoiceEventMap as bG, type VoiceConfig as bH, MastraVoice as bI, CompositeVoice as bJ, DefaultVoice as bK, type ConvertedTool as bL, type MCPServerSSEOptions as bM, type MCPServerHonoSSEOptions as bN, type MCPServerHTTPOptions as bO, type Repository as bP, type VersionDetail as bQ, type ArgumentInfo as bR, type PositionalArgumentInfo as bS, type NamedArgumentInfo as bT, type SubcommandInfo as bU, type CommandInfo as bV, type EnvironmentVariableInfo as bW, type PackageInfo as bX, type RemoteInfo as bY, type MCPServerConfig as bZ, type ServerInfo as b_, type SerializedStepFlowEntry as ba, mapVariable as bb, createStep as bc, cloneStep as bd, createWorkflow as be, cloneWorkflow as bf, type WorkflowResult as bg, Run as bh, type ExecutionGraph as bi, ExecutionEngine as bj, type ExecuteFunction as bk, type Emitter as bl, type StepSuccess as bm, type StepFailure as bn, type StepSuspended as bo, type StepRunning as bp, type StepWaiting as bq, type StepResult as br, type StepsRecord as bs, type DynamicMapping as bt, type PathsToStringProps as bu, type ExtractSchemaType as bv, type ExtractSchemaFromStep as bw, type VariableReference as bx, type StreamEvent as by, type WorkflowRunStatus as bz, type ToolAction as c, type MCPToolType as c0, MessageList as c1, type ToolsetsInput as c2, type DynamicArgument as c3, type AgentMemoryOption as c4, type AgentGenerateOptions as c5, type AgentStreamOptions as c6, type MastraMessageContentV2 as c7, 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 StorageResourceType as s, type MastraMessageV2 as t, type StorageGetMessagesArg as u, type MastraMessageV1 as v, type WorkflowRuns as w, type WorkflowRun as x, type LegacyWorkflowRuns as y, type LegacyWorkflowRun as z };
4020
+ export { type StepGraph as $, Agent as A, type PaginationArgs as B, type CoreTool as C, type StorageGetTracesArg as D, type EvalRow as E, TABLE_WORKFLOW_SNAPSHOT as F, TABLE_EVALS as G, TABLE_MESSAGES as H, TABLE_THREADS as I, TABLE_TRACES as J, TABLE_RESOURCES as K, LegacyWorkflow as L, Mastra as M, NewAgentNetwork as N, TABLE_SCHEMAS as O, type PaginationInfo as P, type VariableReference$1 as Q, type StepResult$1 as R, type StepExecutionContext as S, type ToolsInput as T, type StepAction as U, type VercelTool as V, type WorkflowContext as W, type LegacyWorkflowRunResult as X, type WorkflowOptions as Y, type StepVariableType as Z, type StepNode as _, type MastraPrimitives as a, type MessageResponse as a$, type RetryConfig as a0, type BaseCondition as a1, type ActionContext as a2, WhenConditionReturnValue as a3, type StepDef as a4, type StepCondition as a5, type StepConfig as a6, type StepsRecord$1 as a7, type WorkflowLogMessage as a8, type WorkflowEvent as a9, type CoreSystemMessage as aA, type CoreAssistantMessage as aB, type CoreUserMessage as aC, type CoreToolMessage as aD, type EmbedResult as aE, type EmbedManyResult as aF, type BaseStructuredOutputType as aG, type StructuredOutputType as aH, type StructuredOutputArrayItem as aI, type StructuredOutput as aJ, type GenerateReturn as aK, type StreamReturn as aL, type OutputType as aM, type DefaultLLMTextOptions as aN, type DefaultLLMTextObjectOptions as aO, type DefaultLLMStreamOptions as aP, type DefaultLLMStreamObjectOptions as aQ, type LLMTextOptions as aR, type LLMTextObjectOptions as aS, type LLMStreamOptions as aT, type LLMInnerStreamOptions as aU, type LLMStreamObjectOptions as aV, createMockModel as aW, type Config as aX, type MastraLanguageModel as aY, type DynamicArgument as aZ, type MessageType as a_, type ResolverFunctionInput as aa, type ResolverFunctionOutput as ab, type SubscriberFunctionOutput as ac, type DependencyCheckOutput as ad, type StepResolverOutput as ae, type WorkflowActors as af, type WorkflowActionParams as ag, type WorkflowActions as ah, type LegacyWorkflowState as ai, type StepId as aj, type ExtractSchemaFromStep$1 as ak, type ExtractStepResult as al, type StepInputType as am, type ExtractSchemaType$1 as an, type PathsToStringProps$1 as ao, type LegacyWorkflowRunState as ap, type WorkflowResumeResult as aq, Tool$1 as ar, createTool as as, type InternalCoreTool as at, type ToolExecutionContext as au, type AgentConfig as av, type DefaultEngineType as aw, type WorkflowConfig as ax, type LanguageModel as ay, type CoreMessage as az, MastraMemory as b, type MCPServerConfig as b$, type WorkingMemory as b0, type MemoryConfig as b1, type SharedMemoryConfig as b2, type TraceType as b3, type WorkingMemoryFormat as b4, type WorkingMemoryTemplate as b5, type MemoryProcessorOpts as b6, MemoryProcessor as b7, memoryDefaultOptions as b8, Tool as b9, type VariableReference as bA, type StreamEvent as bB, type WorkflowRunStatus as bC, type WatchEvent as bD, type ZodPathType as bE, type WorkflowRunState as bF, type AgentNetworkConfig as bG, type VoiceEventType as bH, type VoiceEventMap as bI, type VoiceConfig as bJ, MastraVoice as bK, CompositeVoice as bL, DefaultVoice as bM, type ConvertedTool as bN, type MCPServerSSEOptions as bO, type MCPServerHonoSSEOptions as bP, type MCPServerHTTPOptions as bQ, type Repository as bR, type VersionDetail as bS, type ArgumentInfo as bT, type PositionalArgumentInfo as bU, type NamedArgumentInfo as bV, type SubcommandInfo as bW, type CommandInfo as bX, type EnvironmentVariableInfo as bY, type PackageInfo as bZ, type RemoteInfo as b_, type StepFlowEntry as ba, type SerializedStep as bb, type SerializedStepFlowEntry as bc, type StepWithComponent as bd, mapVariable as be, createStep as bf, cloneStep as bg, createWorkflow as bh, cloneWorkflow as bi, type WorkflowResult as bj, Run as bk, type ExecutionGraph as bl, ExecutionEngine as bm, type ExecuteFunction as bn, type Emitter as bo, type StepSuccess as bp, type StepFailure as bq, type StepSuspended as br, type StepRunning as bs, type StepWaiting as bt, type StepResult as bu, type StepsRecord as bv, type DynamicMapping as bw, type PathsToStringProps as bx, type ExtractSchemaType as by, type ExtractSchemaFromStep as bz, type ToolAction as c, type ServerInfo as c0, type ServerDetailInfo as c1, type MCPToolType as c2, MessageList as c3, type ToolsetsInput as c4, type AgentMemoryOption as c5, type AgentGenerateOptions as c6, type AgentStreamOptions as c7, type MastraMessageContentV2 as c8, 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 StorageResourceType as s, type MastraMessageV2 as t, type StorageGetMessagesArg as u, type MastraMessageV1 as v, type WorkflowRuns as w, type WorkflowRun as x, type LegacyWorkflowRuns as y, type LegacyWorkflowRun as z };
@@ -1,6 +1,6 @@
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-DtVDdb81.js';
3
+ import { R as RegisteredLogger, I as IMastraLogger } from './logger-Bpa2oLL4.js';
4
4
  import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
5
5
 
6
6
  /** Sampling strategy configuration for OpenTelemetry */
@@ -1,11 +1,9 @@
1
1
  import * as ai from 'ai';
2
2
  import { Tool as Tool$2, Schema, ToolExecutionOptions, LanguageModelV1, CoreMessage as CoreMessage$1, GenerateTextResult, GenerateObjectResult, StreamTextResult, StreamObjectResult, TextStreamPart, UserContent, AssistantContent, ToolContent, EmbeddingModel, UIMessage, Message, IDGenerator as IDGenerator$1, CoreSystemMessage as CoreSystemMessage$1, LanguageModel as LanguageModel$1, 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, GenerateTextOnStepFinishCallback, StreamTextOnFinishCallback, StreamObjectOnFinishCallback, StreamTextOnStepFinishCallback } from 'ai';
3
- import { M as MastraBase, a as Telemetry, O as OtelConfig, T as Trace } from './base-BbdvunNJ.js';
3
+ import { M as MastraBase, a as Telemetry, O as OtelConfig, T as Trace } from './base-ClrXcCRx.js';
4
4
  import { z, ZodSchema, ZodObject } from 'zod';
5
- import { B as BaseLogMessage, R as RegisteredLogger, I as IMastraLogger, a as LogLevel } from './logger-DtVDdb81.js';
5
+ import { B as BaseLogMessage, R as RegisteredLogger, I as IMastraLogger, a as LogLevel } from './logger-Bpa2oLL4.js';
6
6
  import { JSONSchema7Type, JSONSchema7 } from 'json-schema';
7
- import { MastraTTS } from './tts/index.js';
8
- import { MastraVector } from './vector/index.js';
9
7
  import { M as Metric, a as MetricResult, T as TestInfo } from './types-Bo1uigWx.js';
10
8
  import { Query } from 'sift';
11
9
  import { RuntimeContext } from './runtime-context/index.js';
@@ -13,6 +11,8 @@ import { Span } from '@opentelemetry/api';
13
11
  import * as xstate from 'xstate';
14
12
  import { Snapshot } from 'xstate';
15
13
  import EventEmitter from 'node:events';
14
+ import { MastraVector } from './vector/index.js';
15
+ import { MastraTTS } from './tts/index.js';
16
16
  import * as http from 'node:http';
17
17
  import { Context, HonoRequest, Handler, MiddlewareHandler } from 'hono';
18
18
  import * as stream_web from 'stream/web';
@@ -940,7 +940,6 @@ declare class Machine<TSteps extends LegacyStep<any, any, any, any>[] = LegacySt
940
940
  output: ResolverFunctionOutput;
941
941
  }, xstate.AnyEventObject>;
942
942
  }) => {
943
- mastra?: MastraUnion | undefined;
944
943
  steps: {
945
944
  [x: string]: {
946
945
  status: "failed";
@@ -965,6 +964,7 @@ declare class Machine<TSteps extends LegacyStep<any, any, any, any>[] = LegacySt
965
964
  output?: any;
966
965
  };
967
966
  };
967
+ mastra?: MastraUnion | undefined;
968
968
  attempts: Record<string, number>;
969
969
  inputData: Record<string, any>;
970
970
  triggerData: any;
@@ -1167,17 +1167,20 @@ type ExecuteFunction<TStepInput, TStepOutput, TResumeSchema, TSuspendSchema, Eng
1167
1167
  runtimeContext: RuntimeContext;
1168
1168
  inputData: TStepInput;
1169
1169
  resumeData?: TResumeSchema;
1170
+ runCount: number;
1170
1171
  getInitData<T extends z.ZodType<any>>(): z.infer<T>;
1171
1172
  getInitData<T extends Workflow<any, any, any, any, any>>(): T extends undefined ? unknown : z.infer<NonNullable<T['inputSchema']>>;
1172
1173
  getStepResult<T extends Step<any, any, any>>(stepId: T): T['outputSchema'] extends undefined ? unknown : z.infer<NonNullable<T['outputSchema']>>;
1173
1174
  suspend(suspendPayload: TSuspendSchema): Promise<any>;
1174
1175
  bail(result: any): any;
1176
+ abort(): any;
1175
1177
  resume?: {
1176
1178
  steps: string[];
1177
1179
  resumePayload: any;
1178
1180
  };
1179
1181
  [EMITTER_SYMBOL]: Emitter;
1180
1182
  engine: EngineType;
1183
+ abortSignal: AbortSignal;
1181
1184
  }) => Promise<TStepOutput>;
1182
1185
  interface Step<TStepId extends string = string, TSchemaIn extends z.ZodType<any> = z.ZodType<any>, TSchemaOut extends z.ZodType<any> = z.ZodType<any>, TResumeSchema extends z.ZodType<any> = z.ZodType<any>, TSuspendSchema extends z.ZodType<any> = z.ZodType<any>, TEngineType = any> {
1183
1186
  id: TStepId;
@@ -1272,7 +1275,7 @@ type StreamEvent = TextStreamPart<any> | {
1272
1275
  payload: any;
1273
1276
  id: string;
1274
1277
  };
1275
- type WorkflowRunStatus = 'running' | 'success' | 'failed' | 'suspended' | 'waiting' | 'pending';
1278
+ type WorkflowRunStatus = 'running' | 'success' | 'failed' | 'suspended' | 'waiting' | 'pending' | 'canceled';
1276
1279
  type WatchEvent = {
1277
1280
  type: 'watch';
1278
1281
  payload: {
@@ -1361,6 +1364,7 @@ declare abstract class ExecutionEngine extends MastraBase {
1361
1364
  attempts?: number;
1362
1365
  delay?: number;
1363
1366
  };
1367
+ abortController: AbortController;
1364
1368
  }): Promise<TOutput>;
1365
1369
  }
1366
1370
 
@@ -1454,6 +1458,10 @@ type SerializedStepFlowEntry = {
1454
1458
  concurrency: number;
1455
1459
  };
1456
1460
  };
1461
+ type StepWithComponent = Step<string, any, any, any, any, any> & {
1462
+ component?: string;
1463
+ steps?: Record<string, StepWithComponent>;
1464
+ };
1457
1465
  declare function mapVariable<TStep extends Step<string, any, any, any, any, any>>({ step, path, }: {
1458
1466
  step: TStep;
1459
1467
  path: PathsToStringProps<ExtractSchemaType<ExtractSchemaFromStep<TStep, 'outputSchema'>>> | '.';
@@ -1542,7 +1550,7 @@ declare class Workflow<TEngineType = any, TSteps extends Step<string, any, any,
1542
1550
  description?: string | undefined;
1543
1551
  inputSchema: TInput;
1544
1552
  outputSchema: TOutput;
1545
- steps: Record<string, Step<string, any, any, any, any>>;
1553
+ steps: Record<string, StepWithComponent>;
1546
1554
  stepDefs?: TSteps;
1547
1555
  protected stepFlow: StepFlowEntry[];
1548
1556
  protected serializedStepFlow: SerializedStepFlowEntry[];
@@ -1633,7 +1641,7 @@ declare class Workflow<TEngineType = any, TSteps extends Step<string, any, any,
1633
1641
  createRunAsync(options?: {
1634
1642
  runId?: string;
1635
1643
  }): Promise<Run<TEngineType, TSteps, TInput, TOutput>>;
1636
- execute({ inputData, resumeData, suspend, resume, [EMITTER_SYMBOL]: emitter, mastra, runtimeContext, }: {
1644
+ execute({ inputData, resumeData, suspend, resume, [EMITTER_SYMBOL]: emitter, mastra, runtimeContext, abort, abortSignal, }: {
1637
1645
  inputData: z.infer<TInput>;
1638
1646
  resumeData?: any;
1639
1647
  getStepResult<T extends Step<any, any, any, any, any, TEngineType>>(stepId: T): T['outputSchema'] extends undefined ? unknown : z.infer<NonNullable<T['outputSchema']>>;
@@ -1649,6 +1657,9 @@ declare class Workflow<TEngineType = any, TSteps extends Step<string, any, any,
1649
1657
  mastra: Mastra;
1650
1658
  runtimeContext?: RuntimeContext;
1651
1659
  engine: DefaultEngineType;
1660
+ abortSignal: AbortSignal;
1661
+ bail: (result: any) => any;
1662
+ abort: () => any;
1652
1663
  }): Promise<z.infer<TOutput>>;
1653
1664
  getWorkflowRuns(args?: {
1654
1665
  fromDate?: Date;
@@ -1665,6 +1676,7 @@ declare class Workflow<TEngineType = any, TSteps extends Step<string, any, any,
1665
1676
  */
1666
1677
  declare class Run<TEngineType = any, TSteps extends Step<string, any, any, any, any, TEngineType>[] = Step<string, any, any, any, any, TEngineType>[], TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>> {
1667
1678
  #private;
1679
+ abortController: AbortController;
1668
1680
  protected emitter: EventEmitter$1;
1669
1681
  /**
1670
1682
  * Unique identifier for this workflow
@@ -1710,7 +1722,11 @@ declare class Run<TEngineType = any, TSteps extends Step<string, any, any, any,
1710
1722
  cleanup?: () => void;
1711
1723
  serializedStepGraph: SerializedStepFlowEntry[];
1712
1724
  });
1713
- sendEvent(event: string, data: any): void;
1725
+ /**
1726
+ * Cancels the workflow execution
1727
+ */
1728
+ cancel(): Promise<void>;
1729
+ sendEvent(event: string, data: any): Promise<void>;
1714
1730
  /**
1715
1731
  * Starts the workflow execution with the provided input
1716
1732
  * @param input The input data for the workflow
@@ -1908,7 +1924,9 @@ type MemoryConfig = {
1908
1924
  };
1909
1925
  workingMemory?: WorkingMemory;
1910
1926
  threads?: {
1911
- generateTitle?: boolean;
1927
+ generateTitle?: boolean | {
1928
+ model: DynamicArgument<MastraLanguageModel>;
1929
+ };
1912
1930
  };
1913
1931
  };
1914
1932
  type SharedMemoryConfig = {
@@ -2110,7 +2128,9 @@ declare abstract class MastraMemory extends MastraBase {
2110
2128
  * @param messages The messages to process
2111
2129
  * @returns The processed messages
2112
2130
  */
2113
- private applyProcessors;
2131
+ protected applyProcessors(messages: CoreMessage$1[], opts: {
2132
+ processors?: MemoryProcessor[];
2133
+ } & MemoryProcessorOpts): CoreMessage$1[];
2114
2134
  processMessages({ messages, processors, ...opts }: {
2115
2135
  messages: CoreMessage$1[];
2116
2136
  processors?: MemoryProcessor[];
@@ -2793,12 +2813,14 @@ declare class NewAgentNetwork extends MastraBase {
2793
2813
  threadId: z.ZodOptional<z.ZodString>;
2794
2814
  threadResourceId: z.ZodOptional<z.ZodString>;
2795
2815
  isOneOff: z.ZodBoolean;
2816
+ verboseIntrospection: z.ZodBoolean;
2796
2817
  }, "strip", z.ZodTypeAny, {
2797
2818
  resourceId: string;
2798
2819
  task: string;
2799
2820
  resourceType: "none" | "tool" | "workflow" | "agent";
2800
2821
  iteration: number;
2801
2822
  isOneOff: boolean;
2823
+ verboseIntrospection: boolean;
2802
2824
  threadId?: string | undefined;
2803
2825
  result?: string | undefined;
2804
2826
  threadResourceId?: string | undefined;
@@ -2808,6 +2830,7 @@ declare class NewAgentNetwork extends MastraBase {
2808
2830
  resourceType: "none" | "tool" | "workflow" | "agent";
2809
2831
  iteration: number;
2810
2832
  isOneOff: boolean;
2833
+ verboseIntrospection: boolean;
2811
2834
  threadId?: string | undefined;
2812
2835
  result?: string | undefined;
2813
2836
  threadResourceId?: string | undefined;
@@ -2856,12 +2879,14 @@ declare class NewAgentNetwork extends MastraBase {
2856
2879
  threadId: z.ZodOptional<z.ZodString>;
2857
2880
  threadResourceId: z.ZodOptional<z.ZodString>;
2858
2881
  isOneOff: z.ZodBoolean;
2882
+ verboseIntrospection: z.ZodBoolean;
2859
2883
  }, "strip", z.ZodTypeAny, {
2860
2884
  resourceId: string;
2861
2885
  task: string;
2862
2886
  resourceType: "none" | "tool" | "workflow" | "agent";
2863
2887
  iteration: number;
2864
2888
  isOneOff: boolean;
2889
+ verboseIntrospection: boolean;
2865
2890
  threadId?: string | undefined;
2866
2891
  result?: string | undefined;
2867
2892
  threadResourceId?: string | undefined;
@@ -2871,6 +2896,7 @@ declare class NewAgentNetwork extends MastraBase {
2871
2896
  resourceType: "none" | "tool" | "workflow" | "agent";
2872
2897
  iteration: number;
2873
2898
  isOneOff: boolean;
2899
+ verboseIntrospection: boolean;
2874
2900
  threadId?: string | undefined;
2875
2901
  result?: string | undefined;
2876
2902
  threadResourceId?: string | undefined;
@@ -3675,8 +3701,9 @@ declare class Agent<TAgentId extends string = string, TTools extends ToolsInput
3675
3701
  * @param options Options for getting the LLM
3676
3702
  * @returns A promise that resolves to the LLM instance
3677
3703
  */
3678
- getLLM({ runtimeContext }?: {
3704
+ getLLM({ runtimeContext, model, }?: {
3679
3705
  runtimeContext?: RuntimeContext;
3706
+ model?: MastraLanguageModel | DynamicArgument<MastraLanguageModel>;
3680
3707
  }): MastraLLMBase | Promise<MastraLLMBase>;
3681
3708
  /**
3682
3709
  * Gets the model, resolving it if it's a function
@@ -3694,12 +3721,13 @@ declare class Agent<TAgentId extends string = string, TTools extends ToolsInput
3694
3721
  * @param tools
3695
3722
  */
3696
3723
  __setTools(tools: TTools): void;
3697
- generateTitleFromUserMessage({ message, runtimeContext, }: {
3724
+ generateTitleFromUserMessage({ message, runtimeContext, model, }: {
3698
3725
  message: string | MessageInput;
3699
3726
  runtimeContext?: RuntimeContext;
3727
+ model?: DynamicArgument<MastraLanguageModel>;
3700
3728
  }): Promise<string>;
3701
3729
  getMostRecentUserMessage(messages: Array<UIMessage>): UIMessage | undefined;
3702
- genTitle(userMessage: string | MessageInput | undefined, runtimeContext: RuntimeContext): Promise<string>;
3730
+ genTitle(userMessage: string | MessageInput | undefined, runtimeContext: RuntimeContext, model?: DynamicArgument<MastraLanguageModel>): Promise<string | undefined>;
3703
3731
  fetchMemory({ threadId, thread: passedThread, memoryConfig, resourceId, runId, userMessages, systemMessage, messageList, }: {
3704
3732
  resourceId: string;
3705
3733
  threadId: string;
@@ -3818,6 +3846,11 @@ declare class Agent<TAgentId extends string = string, TTools extends ToolsInput
3818
3846
  }>, z.ZodObject<{
3819
3847
  text: z.ZodString;
3820
3848
  }>, any>;
3849
+ /**
3850
+ * Resolves the configuration for title generation.
3851
+ * @private
3852
+ */
3853
+ private resolveTitleGenerationConfig;
3821
3854
  }
3822
3855
 
3823
3856
  declare abstract class MastraStorage extends MastraBase {
@@ -3984,4 +4017,4 @@ declare abstract class MastraStorage extends MastraBase {
3984
4017
  }>;
3985
4018
  }
3986
4019
 
3987
- export { type StepGraph as $, Agent as A, type PaginationArgs as B, type CoreTool as C, type StorageGetTracesArg as D, type EvalRow as E, TABLE_WORKFLOW_SNAPSHOT as F, TABLE_EVALS as G, TABLE_MESSAGES as H, TABLE_THREADS as I, TABLE_TRACES as J, TABLE_RESOURCES as K, LegacyWorkflow as L, Mastra as M, NewAgentNetwork as N, TABLE_SCHEMAS as O, type PaginationInfo as P, type VariableReference$1 as Q, type StepResult$1 as R, type StepExecutionContext as S, type ToolsInput as T, type StepAction as U, type VercelTool as V, type WorkflowContext as W, type LegacyWorkflowRunResult as X, type WorkflowOptions as Y, type StepVariableType as Z, type StepNode as _, type MastraPrimitives as a, type MemoryConfig as a$, type RetryConfig as a0, type BaseCondition as a1, type ActionContext as a2, WhenConditionReturnValue as a3, type StepDef as a4, type StepCondition as a5, type StepConfig as a6, type StepsRecord$1 as a7, type WorkflowLogMessage as a8, type WorkflowEvent as a9, type CoreSystemMessage as aA, type CoreAssistantMessage as aB, type CoreUserMessage as aC, type CoreToolMessage as aD, type EmbedResult as aE, type EmbedManyResult as aF, type BaseStructuredOutputType as aG, type StructuredOutputType as aH, type StructuredOutputArrayItem as aI, type StructuredOutput as aJ, type GenerateReturn as aK, type StreamReturn as aL, type OutputType as aM, type DefaultLLMTextOptions as aN, type DefaultLLMTextObjectOptions as aO, type DefaultLLMStreamOptions as aP, type DefaultLLMStreamObjectOptions as aQ, type LLMTextOptions as aR, type LLMTextObjectOptions as aS, type LLMStreamOptions as aT, type LLMInnerStreamOptions as aU, type LLMStreamObjectOptions as aV, createMockModel as aW, type Config as aX, type MessageType as aY, type MessageResponse as aZ, type WorkingMemory as a_, type ResolverFunctionInput as aa, type ResolverFunctionOutput as ab, type SubscriberFunctionOutput as ac, type DependencyCheckOutput as ad, type StepResolverOutput as ae, type WorkflowActors as af, type WorkflowActionParams as ag, type WorkflowActions as ah, type LegacyWorkflowState as ai, type StepId as aj, type ExtractSchemaFromStep$1 as ak, type ExtractStepResult as al, type StepInputType as am, type ExtractSchemaType$1 as an, type PathsToStringProps$1 as ao, type LegacyWorkflowRunState as ap, type WorkflowResumeResult as aq, Tool$1 as ar, createTool as as, type InternalCoreTool as at, type ToolExecutionContext as au, type AgentConfig as av, type DefaultEngineType as aw, type WorkflowConfig as ax, type LanguageModel as ay, type CoreMessage as az, MastraMemory as b, type ServerDetailInfo as b$, type SharedMemoryConfig as b0, type TraceType as b1, type WorkingMemoryFormat as b2, type WorkingMemoryTemplate as b3, type MemoryProcessorOpts as b4, MemoryProcessor as b5, memoryDefaultOptions as b6, Tool as b7, type StepFlowEntry as b8, type SerializedStep as b9, type WatchEvent as bA, type ZodPathType as bB, type WorkflowRunState as bC, type MastraLanguageModel as bD, type AgentNetworkConfig as bE, type VoiceEventType as bF, type VoiceEventMap as bG, type VoiceConfig as bH, MastraVoice as bI, CompositeVoice as bJ, DefaultVoice as bK, type ConvertedTool as bL, type MCPServerSSEOptions as bM, type MCPServerHonoSSEOptions as bN, type MCPServerHTTPOptions as bO, type Repository as bP, type VersionDetail as bQ, type ArgumentInfo as bR, type PositionalArgumentInfo as bS, type NamedArgumentInfo as bT, type SubcommandInfo as bU, type CommandInfo as bV, type EnvironmentVariableInfo as bW, type PackageInfo as bX, type RemoteInfo as bY, type MCPServerConfig as bZ, type ServerInfo as b_, type SerializedStepFlowEntry as ba, mapVariable as bb, createStep as bc, cloneStep as bd, createWorkflow as be, cloneWorkflow as bf, type WorkflowResult as bg, Run as bh, type ExecutionGraph as bi, ExecutionEngine as bj, type ExecuteFunction as bk, type Emitter as bl, type StepSuccess as bm, type StepFailure as bn, type StepSuspended as bo, type StepRunning as bp, type StepWaiting as bq, type StepResult as br, type StepsRecord as bs, type DynamicMapping as bt, type PathsToStringProps as bu, type ExtractSchemaType as bv, type ExtractSchemaFromStep as bw, type VariableReference as bx, type StreamEvent as by, type WorkflowRunStatus as bz, type ToolAction as c, type MCPToolType as c0, MessageList as c1, type ToolsetsInput as c2, type DynamicArgument as c3, type AgentMemoryOption as c4, type AgentGenerateOptions as c5, type AgentStreamOptions as c6, type MastraMessageContentV2 as c7, 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 StorageResourceType as s, type MastraMessageV2 as t, type StorageGetMessagesArg as u, type MastraMessageV1 as v, type WorkflowRuns as w, type WorkflowRun as x, type LegacyWorkflowRuns as y, type LegacyWorkflowRun as z };
4020
+ export { type StepGraph as $, Agent as A, type PaginationArgs as B, type CoreTool as C, type StorageGetTracesArg as D, type EvalRow as E, TABLE_WORKFLOW_SNAPSHOT as F, TABLE_EVALS as G, TABLE_MESSAGES as H, TABLE_THREADS as I, TABLE_TRACES as J, TABLE_RESOURCES as K, LegacyWorkflow as L, Mastra as M, NewAgentNetwork as N, TABLE_SCHEMAS as O, type PaginationInfo as P, type VariableReference$1 as Q, type StepResult$1 as R, type StepExecutionContext as S, type ToolsInput as T, type StepAction as U, type VercelTool as V, type WorkflowContext as W, type LegacyWorkflowRunResult as X, type WorkflowOptions as Y, type StepVariableType as Z, type StepNode as _, type MastraPrimitives as a, type MessageResponse as a$, type RetryConfig as a0, type BaseCondition as a1, type ActionContext as a2, WhenConditionReturnValue as a3, type StepDef as a4, type StepCondition as a5, type StepConfig as a6, type StepsRecord$1 as a7, type WorkflowLogMessage as a8, type WorkflowEvent as a9, type CoreSystemMessage as aA, type CoreAssistantMessage as aB, type CoreUserMessage as aC, type CoreToolMessage as aD, type EmbedResult as aE, type EmbedManyResult as aF, type BaseStructuredOutputType as aG, type StructuredOutputType as aH, type StructuredOutputArrayItem as aI, type StructuredOutput as aJ, type GenerateReturn as aK, type StreamReturn as aL, type OutputType as aM, type DefaultLLMTextOptions as aN, type DefaultLLMTextObjectOptions as aO, type DefaultLLMStreamOptions as aP, type DefaultLLMStreamObjectOptions as aQ, type LLMTextOptions as aR, type LLMTextObjectOptions as aS, type LLMStreamOptions as aT, type LLMInnerStreamOptions as aU, type LLMStreamObjectOptions as aV, createMockModel as aW, type Config as aX, type MastraLanguageModel as aY, type DynamicArgument as aZ, type MessageType as a_, type ResolverFunctionInput as aa, type ResolverFunctionOutput as ab, type SubscriberFunctionOutput as ac, type DependencyCheckOutput as ad, type StepResolverOutput as ae, type WorkflowActors as af, type WorkflowActionParams as ag, type WorkflowActions as ah, type LegacyWorkflowState as ai, type StepId as aj, type ExtractSchemaFromStep$1 as ak, type ExtractStepResult as al, type StepInputType as am, type ExtractSchemaType$1 as an, type PathsToStringProps$1 as ao, type LegacyWorkflowRunState as ap, type WorkflowResumeResult as aq, Tool$1 as ar, createTool as as, type InternalCoreTool as at, type ToolExecutionContext as au, type AgentConfig as av, type DefaultEngineType as aw, type WorkflowConfig as ax, type LanguageModel as ay, type CoreMessage as az, MastraMemory as b, type MCPServerConfig as b$, type WorkingMemory as b0, type MemoryConfig as b1, type SharedMemoryConfig as b2, type TraceType as b3, type WorkingMemoryFormat as b4, type WorkingMemoryTemplate as b5, type MemoryProcessorOpts as b6, MemoryProcessor as b7, memoryDefaultOptions as b8, Tool as b9, type VariableReference as bA, type StreamEvent as bB, type WorkflowRunStatus as bC, type WatchEvent as bD, type ZodPathType as bE, type WorkflowRunState as bF, type AgentNetworkConfig as bG, type VoiceEventType as bH, type VoiceEventMap as bI, type VoiceConfig as bJ, MastraVoice as bK, CompositeVoice as bL, DefaultVoice as bM, type ConvertedTool as bN, type MCPServerSSEOptions as bO, type MCPServerHonoSSEOptions as bP, type MCPServerHTTPOptions as bQ, type Repository as bR, type VersionDetail as bS, type ArgumentInfo as bT, type PositionalArgumentInfo as bU, type NamedArgumentInfo as bV, type SubcommandInfo as bW, type CommandInfo as bX, type EnvironmentVariableInfo as bY, type PackageInfo as bZ, type RemoteInfo as b_, type StepFlowEntry as ba, type SerializedStep as bb, type SerializedStepFlowEntry as bc, type StepWithComponent as bd, mapVariable as be, createStep as bf, cloneStep as bg, createWorkflow as bh, cloneWorkflow as bi, type WorkflowResult as bj, Run as bk, type ExecutionGraph as bl, ExecutionEngine as bm, type ExecuteFunction as bn, type Emitter as bo, type StepSuccess as bp, type StepFailure as bq, type StepSuspended as br, type StepRunning as bs, type StepWaiting as bt, type StepResult as bu, type StepsRecord as bv, type DynamicMapping as bw, type PathsToStringProps as bx, type ExtractSchemaType as by, type ExtractSchemaFromStep as bz, type ToolAction as c, type ServerInfo as c0, type ServerDetailInfo as c1, type MCPToolType as c2, MessageList as c3, type ToolsetsInput as c4, type AgentMemoryOption as c5, type AgentGenerateOptions as c6, type AgentStreamOptions as c7, type MastraMessageContentV2 as c8, 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 StorageResourceType as s, type MastraMessageV2 as t, type StorageGetMessagesArg as u, type MastraMessageV1 as v, type WorkflowRuns as w, type WorkflowRun as x, type LegacyWorkflowRuns as y, type LegacyWorkflowRun as z };