@mastra/core 0.7.0-alpha.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.cjs +2 -2
- package/dist/agent/index.d.cts +1 -1
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +1 -1
- package/dist/{base-BXaDbCb8.d.cts → base-C0wILuA9.d.cts} +60 -11
- package/dist/{base-C8x76XUh.d.ts → base-Cyl73WbV.d.ts} +60 -11
- package/dist/{chunk-R5KLVRNE.cjs → chunk-C6BBAS4I.cjs} +1 -3
- package/dist/{chunk-WEU4BQV7.js → chunk-QM6WIIPM.js} +1 -1
- package/dist/{chunk-DDVDPAH5.js → chunk-VNQRLYIA.js} +1 -3
- package/dist/{chunk-XXFOTPWO.cjs → chunk-WESJ2ZY7.cjs} +2 -2
- package/dist/eval/index.d.cts +1 -1
- package/dist/eval/index.d.ts +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/integration/index.d.cts +1 -1
- package/dist/integration/index.d.ts +1 -1
- package/dist/llm/index.d.cts +1 -1
- package/dist/llm/index.d.ts +1 -1
- package/dist/mastra/index.d.cts +1 -1
- package/dist/mastra/index.d.ts +1 -1
- package/dist/memory/index.d.cts +1 -1
- package/dist/memory/index.d.ts +1 -1
- package/dist/network/index.cjs +2 -2
- package/dist/network/index.d.cts +1 -1
- package/dist/network/index.d.ts +1 -1
- package/dist/network/index.js +1 -1
- package/dist/relevance/index.cjs +4 -4
- package/dist/relevance/index.d.cts +1 -1
- package/dist/relevance/index.d.ts +1 -1
- package/dist/relevance/index.js +1 -1
- package/dist/storage/index.d.cts +1 -1
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/libsql/index.d.cts +1 -1
- package/dist/storage/libsql/index.d.ts +1 -1
- package/dist/telemetry/index.d.cts +1 -1
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/tools/index.d.cts +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/voice/index.cjs +17 -0
- package/dist/voice/index.d.cts +1 -1
- package/dist/voice/index.d.ts +1 -1
- package/dist/voice/index.js +17 -0
- package/dist/workflows/index.d.cts +2 -2
- package/dist/workflows/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/agent/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkC6BBAS4I_cjs = require('../chunk-C6BBAS4I.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Agent", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkC6BBAS4I_cjs.Agent; }
|
|
10
10
|
});
|
package/dist/agent/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Message as AiMessageType } from 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export { A as Agent, m as AgentConfig, aH as AgentGenerateOptions, aI as AgentStreamOptions, az as MastraLanguageModel, a as ToolsInput, aG as ToolsetsInput } from '../base-
|
|
4
|
+
export { A as Agent, m as AgentConfig, aH as AgentGenerateOptions, aI as AgentStreamOptions, az as MastraLanguageModel, a as ToolsInput, aG as ToolsetsInput } from '../base-C0wILuA9.cjs';
|
|
5
5
|
import '../base-ObPJ-w8K.cjs';
|
|
6
6
|
import '../types-CwTG2XyQ.cjs';
|
|
7
7
|
import 'sift';
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Message as AiMessageType } from 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export { A as Agent, m as AgentConfig, aH as AgentGenerateOptions, aI as AgentStreamOptions, az as MastraLanguageModel, a as ToolsInput, aG as ToolsetsInput } from '../base-
|
|
4
|
+
export { A as Agent, m as AgentConfig, aH as AgentGenerateOptions, aI as AgentStreamOptions, az as MastraLanguageModel, a as ToolsInput, aG as ToolsetsInput } from '../base-Cyl73WbV.js';
|
|
5
5
|
import '../base-Cmunaaxb.js';
|
|
6
6
|
import '../types-CwTG2XyQ.js';
|
|
7
7
|
import 'sift';
|
package/dist/agent/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Agent } from '../chunk-
|
|
1
|
+
export { Agent } from '../chunk-VNQRLYIA.js';
|
|
@@ -248,8 +248,9 @@ declare abstract class MastraMemory extends MastraBase {
|
|
|
248
248
|
|
|
249
249
|
type VoiceEventType = 'speaking' | 'writing' | 'error' | string;
|
|
250
250
|
interface VoiceEventMap {
|
|
251
|
+
speaker: NodeJS.ReadableStream;
|
|
251
252
|
speaking: {
|
|
252
|
-
audio?:
|
|
253
|
+
audio?: string;
|
|
253
254
|
};
|
|
254
255
|
writing: {
|
|
255
256
|
text: string;
|
|
@@ -332,6 +333,11 @@ declare abstract class MastraVoice<TOptions = unknown, TSpeakOptions = unknown,
|
|
|
332
333
|
* Trigger voice providers to respond
|
|
333
334
|
*/
|
|
334
335
|
answer(_options?: Record<string, unknown>): Promise<void>;
|
|
336
|
+
/**
|
|
337
|
+
* Equip the voice provider with instructions
|
|
338
|
+
* @param instructions Instructions to add
|
|
339
|
+
*/
|
|
340
|
+
addInstructions(_instructions?: string): void;
|
|
335
341
|
/**
|
|
336
342
|
* Equip the voice provider with tools
|
|
337
343
|
* @param tools Array of tools to add
|
|
@@ -399,6 +405,11 @@ declare class CompositeVoice extends MastraVoice<unknown, unknown, unknown, Tool
|
|
|
399
405
|
* Trigger voice providers to respond
|
|
400
406
|
*/
|
|
401
407
|
answer(options?: Record<string, unknown>): Promise<void>;
|
|
408
|
+
/**
|
|
409
|
+
* Equip the voice provider with instructions
|
|
410
|
+
* @param instructions Instructions to add
|
|
411
|
+
*/
|
|
412
|
+
addInstructions(instructions: string): void;
|
|
402
413
|
/**
|
|
403
414
|
* Equip the voice provider with tools
|
|
404
415
|
* @param tools Array of tools to add
|
|
@@ -437,20 +448,35 @@ interface AgentConfig<TTools extends ToolsInput = ToolsInput, TMetrics extends R
|
|
|
437
448
|
memory?: MastraMemory;
|
|
438
449
|
voice?: CompositeVoice;
|
|
439
450
|
}
|
|
451
|
+
/**
|
|
452
|
+
* Options for generating responses with an agent
|
|
453
|
+
* @template Z - The schema type for structured output (Zod schema or JSON schema)
|
|
454
|
+
*/
|
|
440
455
|
type AgentGenerateOptions<Z extends ZodSchema | JSONSchema7 | undefined = undefined> = {
|
|
456
|
+
/** Optional instructions to override the agent's default instructions */
|
|
441
457
|
instructions?: string;
|
|
458
|
+
/** Additional tool sets that can be used for this generation */
|
|
442
459
|
toolsets?: ToolsetsInput;
|
|
460
|
+
/** Additional context messages to include */
|
|
443
461
|
context?: CoreMessage[];
|
|
462
|
+
/** Memory configuration options */
|
|
444
463
|
memoryOptions?: MemoryConfig;
|
|
464
|
+
/** Unique ID for this generation run */
|
|
445
465
|
runId?: string;
|
|
466
|
+
/** Callback fired after each generation step completes */
|
|
446
467
|
onStepFinish?: Z extends undefined ? GenerateTextOnStepFinishCallback<any> : never;
|
|
468
|
+
/** Maximum number of steps allowed for generation */
|
|
447
469
|
maxSteps?: number;
|
|
470
|
+
/** Schema for structured output, does not work with tools, use experimental_output instead */
|
|
448
471
|
output?: OutputType | Z;
|
|
472
|
+
/** Schema for structured output generation alongside tool calls. */
|
|
449
473
|
experimental_output?: Z;
|
|
474
|
+
/** Controls how tools are selected during generation */
|
|
450
475
|
toolChoice?: 'auto' | 'none' | 'required' | {
|
|
451
476
|
type: 'tool';
|
|
452
477
|
toolName: string;
|
|
453
478
|
};
|
|
479
|
+
/** Telemetry settings */
|
|
454
480
|
telemetry?: TelemetrySettings;
|
|
455
481
|
} & ({
|
|
456
482
|
resourceId?: undefined;
|
|
@@ -459,22 +485,39 @@ type AgentGenerateOptions<Z extends ZodSchema | JSONSchema7 | undefined = undefi
|
|
|
459
485
|
resourceId: string;
|
|
460
486
|
threadId: string;
|
|
461
487
|
}) & (Z extends undefined ? DefaultLLMTextOptions : DefaultLLMTextObjectOptions);
|
|
488
|
+
/**
|
|
489
|
+
* Options for streaming responses with an agent
|
|
490
|
+
* @template Z - The schema type for structured output (Zod schema or JSON schema)
|
|
491
|
+
*/
|
|
462
492
|
type AgentStreamOptions<Z extends ZodSchema | JSONSchema7 | undefined = undefined> = {
|
|
493
|
+
/** Optional instructions to override the agent's default instructions */
|
|
463
494
|
instructions?: string;
|
|
495
|
+
/** Additional tool sets that can be used for this generation */
|
|
464
496
|
toolsets?: ToolsetsInput;
|
|
497
|
+
/** Additional context messages to include */
|
|
465
498
|
context?: CoreMessage[];
|
|
499
|
+
/** Memory configuration options */
|
|
466
500
|
memoryOptions?: MemoryConfig;
|
|
501
|
+
/** Unique ID for this generation run */
|
|
467
502
|
runId?: string;
|
|
503
|
+
/** Callback fired when streaming completes */
|
|
468
504
|
onFinish?: Z extends undefined ? StreamTextOnFinishCallback<any> : Z extends ZodSchema ? StreamObjectOnFinishCallback<z.infer<Z>> : StreamObjectOnFinishCallback<any>;
|
|
505
|
+
/** Callback fired after each generation step completes */
|
|
469
506
|
onStepFinish?: Z extends undefined ? StreamTextOnStepFinishCallback<any> : never;
|
|
507
|
+
/** Maximum number of steps allowed for generation */
|
|
470
508
|
maxSteps?: number;
|
|
509
|
+
/** Schema for structured output */
|
|
471
510
|
output?: OutputType | Z;
|
|
511
|
+
/** Temperature parameter for controlling randomness */
|
|
472
512
|
temperature?: number;
|
|
513
|
+
/** Controls how tools are selected during generation */
|
|
473
514
|
toolChoice?: 'auto' | 'none' | 'required' | {
|
|
474
515
|
type: 'tool';
|
|
475
516
|
toolName: string;
|
|
476
517
|
};
|
|
518
|
+
/** Experimental schema for structured output */
|
|
477
519
|
experimental_output?: Z;
|
|
520
|
+
/** Telemetry settings */
|
|
478
521
|
telemetry?: TelemetrySettings;
|
|
479
522
|
} & ({
|
|
480
523
|
resourceId?: undefined;
|
|
@@ -1730,24 +1773,30 @@ declare class Agent<TTools extends ToolsInput = ToolsInput, TMetrics extends Rec
|
|
|
1730
1773
|
output?: never;
|
|
1731
1774
|
experimental_output?: never;
|
|
1732
1775
|
}): Promise<GenerateTextResult<any, Z extends ZodSchema ? z.infer<Z> : unknown>>;
|
|
1733
|
-
generate<Z extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: string | string[] | CoreMessage$1[] | Message[], args?: AgentGenerateOptions<Z> &
|
|
1734
|
-
output
|
|
1776
|
+
generate<Z extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: string | string[] | CoreMessage$1[] | Message[], args?: AgentGenerateOptions<Z> & {
|
|
1777
|
+
output?: Z;
|
|
1735
1778
|
experimental_output?: never;
|
|
1736
|
-
}
|
|
1737
|
-
|
|
1779
|
+
}): Promise<GenerateObjectResult<Z extends ZodSchema ? z.infer<Z> : unknown>>;
|
|
1780
|
+
generate<Z extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: string | string[] | CoreMessage$1[] | Message[], args?: AgentGenerateOptions<Z> & {
|
|
1738
1781
|
output?: never;
|
|
1739
|
-
|
|
1782
|
+
experimental_output?: Z;
|
|
1783
|
+
}): Promise<GenerateTextResult<any, Z extends ZodSchema ? z.infer<Z> : unknown> & {
|
|
1784
|
+
object: Z extends ZodSchema ? z.infer<Z> : unknown;
|
|
1785
|
+
}>;
|
|
1740
1786
|
stream<Z extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: string | string[] | CoreMessage$1[] | Message[], args?: AgentStreamOptions<Z> & {
|
|
1741
1787
|
output?: never;
|
|
1742
1788
|
experimental_output?: never;
|
|
1743
1789
|
}): Promise<StreamTextResult<any, Z extends ZodSchema ? z.infer<Z> : unknown>>;
|
|
1744
|
-
stream<Z extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: string | string[] | CoreMessage$1[] | Message[], args?: AgentStreamOptions<Z> &
|
|
1745
|
-
output
|
|
1790
|
+
stream<Z extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: string | string[] | CoreMessage$1[] | Message[], args?: AgentStreamOptions<Z> & {
|
|
1791
|
+
output?: Z;
|
|
1746
1792
|
experimental_output?: never;
|
|
1747
|
-
}
|
|
1748
|
-
|
|
1793
|
+
}): Promise<StreamObjectResult<any, Z extends ZodSchema ? z.infer<Z> : unknown, any>>;
|
|
1794
|
+
stream<Z extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: string | string[] | CoreMessage$1[] | Message[], args?: AgentStreamOptions<Z> & {
|
|
1749
1795
|
output?: never;
|
|
1750
|
-
|
|
1796
|
+
experimental_output?: Z;
|
|
1797
|
+
}): Promise<StreamTextResult<any, Z extends ZodSchema ? z.infer<Z> : unknown> & {
|
|
1798
|
+
partialObjectStream: StreamTextResult<any, Z extends ZodSchema ? z.infer<Z> : unknown>['experimental_partialOutputStream'];
|
|
1799
|
+
}>;
|
|
1751
1800
|
/**
|
|
1752
1801
|
* Convert text to speech using the configured voice provider
|
|
1753
1802
|
* @param input Text or text stream to convert to speech
|
|
@@ -248,8 +248,9 @@ declare abstract class MastraMemory extends MastraBase {
|
|
|
248
248
|
|
|
249
249
|
type VoiceEventType = 'speaking' | 'writing' | 'error' | string;
|
|
250
250
|
interface VoiceEventMap {
|
|
251
|
+
speaker: NodeJS.ReadableStream;
|
|
251
252
|
speaking: {
|
|
252
|
-
audio?:
|
|
253
|
+
audio?: string;
|
|
253
254
|
};
|
|
254
255
|
writing: {
|
|
255
256
|
text: string;
|
|
@@ -332,6 +333,11 @@ declare abstract class MastraVoice<TOptions = unknown, TSpeakOptions = unknown,
|
|
|
332
333
|
* Trigger voice providers to respond
|
|
333
334
|
*/
|
|
334
335
|
answer(_options?: Record<string, unknown>): Promise<void>;
|
|
336
|
+
/**
|
|
337
|
+
* Equip the voice provider with instructions
|
|
338
|
+
* @param instructions Instructions to add
|
|
339
|
+
*/
|
|
340
|
+
addInstructions(_instructions?: string): void;
|
|
335
341
|
/**
|
|
336
342
|
* Equip the voice provider with tools
|
|
337
343
|
* @param tools Array of tools to add
|
|
@@ -399,6 +405,11 @@ declare class CompositeVoice extends MastraVoice<unknown, unknown, unknown, Tool
|
|
|
399
405
|
* Trigger voice providers to respond
|
|
400
406
|
*/
|
|
401
407
|
answer(options?: Record<string, unknown>): Promise<void>;
|
|
408
|
+
/**
|
|
409
|
+
* Equip the voice provider with instructions
|
|
410
|
+
* @param instructions Instructions to add
|
|
411
|
+
*/
|
|
412
|
+
addInstructions(instructions: string): void;
|
|
402
413
|
/**
|
|
403
414
|
* Equip the voice provider with tools
|
|
404
415
|
* @param tools Array of tools to add
|
|
@@ -437,20 +448,35 @@ interface AgentConfig<TTools extends ToolsInput = ToolsInput, TMetrics extends R
|
|
|
437
448
|
memory?: MastraMemory;
|
|
438
449
|
voice?: CompositeVoice;
|
|
439
450
|
}
|
|
451
|
+
/**
|
|
452
|
+
* Options for generating responses with an agent
|
|
453
|
+
* @template Z - The schema type for structured output (Zod schema or JSON schema)
|
|
454
|
+
*/
|
|
440
455
|
type AgentGenerateOptions<Z extends ZodSchema | JSONSchema7 | undefined = undefined> = {
|
|
456
|
+
/** Optional instructions to override the agent's default instructions */
|
|
441
457
|
instructions?: string;
|
|
458
|
+
/** Additional tool sets that can be used for this generation */
|
|
442
459
|
toolsets?: ToolsetsInput;
|
|
460
|
+
/** Additional context messages to include */
|
|
443
461
|
context?: CoreMessage[];
|
|
462
|
+
/** Memory configuration options */
|
|
444
463
|
memoryOptions?: MemoryConfig;
|
|
464
|
+
/** Unique ID for this generation run */
|
|
445
465
|
runId?: string;
|
|
466
|
+
/** Callback fired after each generation step completes */
|
|
446
467
|
onStepFinish?: Z extends undefined ? GenerateTextOnStepFinishCallback<any> : never;
|
|
468
|
+
/** Maximum number of steps allowed for generation */
|
|
447
469
|
maxSteps?: number;
|
|
470
|
+
/** Schema for structured output, does not work with tools, use experimental_output instead */
|
|
448
471
|
output?: OutputType | Z;
|
|
472
|
+
/** Schema for structured output generation alongside tool calls. */
|
|
449
473
|
experimental_output?: Z;
|
|
474
|
+
/** Controls how tools are selected during generation */
|
|
450
475
|
toolChoice?: 'auto' | 'none' | 'required' | {
|
|
451
476
|
type: 'tool';
|
|
452
477
|
toolName: string;
|
|
453
478
|
};
|
|
479
|
+
/** Telemetry settings */
|
|
454
480
|
telemetry?: TelemetrySettings;
|
|
455
481
|
} & ({
|
|
456
482
|
resourceId?: undefined;
|
|
@@ -459,22 +485,39 @@ type AgentGenerateOptions<Z extends ZodSchema | JSONSchema7 | undefined = undefi
|
|
|
459
485
|
resourceId: string;
|
|
460
486
|
threadId: string;
|
|
461
487
|
}) & (Z extends undefined ? DefaultLLMTextOptions : DefaultLLMTextObjectOptions);
|
|
488
|
+
/**
|
|
489
|
+
* Options for streaming responses with an agent
|
|
490
|
+
* @template Z - The schema type for structured output (Zod schema or JSON schema)
|
|
491
|
+
*/
|
|
462
492
|
type AgentStreamOptions<Z extends ZodSchema | JSONSchema7 | undefined = undefined> = {
|
|
493
|
+
/** Optional instructions to override the agent's default instructions */
|
|
463
494
|
instructions?: string;
|
|
495
|
+
/** Additional tool sets that can be used for this generation */
|
|
464
496
|
toolsets?: ToolsetsInput;
|
|
497
|
+
/** Additional context messages to include */
|
|
465
498
|
context?: CoreMessage[];
|
|
499
|
+
/** Memory configuration options */
|
|
466
500
|
memoryOptions?: MemoryConfig;
|
|
501
|
+
/** Unique ID for this generation run */
|
|
467
502
|
runId?: string;
|
|
503
|
+
/** Callback fired when streaming completes */
|
|
468
504
|
onFinish?: Z extends undefined ? StreamTextOnFinishCallback<any> : Z extends ZodSchema ? StreamObjectOnFinishCallback<z.infer<Z>> : StreamObjectOnFinishCallback<any>;
|
|
505
|
+
/** Callback fired after each generation step completes */
|
|
469
506
|
onStepFinish?: Z extends undefined ? StreamTextOnStepFinishCallback<any> : never;
|
|
507
|
+
/** Maximum number of steps allowed for generation */
|
|
470
508
|
maxSteps?: number;
|
|
509
|
+
/** Schema for structured output */
|
|
471
510
|
output?: OutputType | Z;
|
|
511
|
+
/** Temperature parameter for controlling randomness */
|
|
472
512
|
temperature?: number;
|
|
513
|
+
/** Controls how tools are selected during generation */
|
|
473
514
|
toolChoice?: 'auto' | 'none' | 'required' | {
|
|
474
515
|
type: 'tool';
|
|
475
516
|
toolName: string;
|
|
476
517
|
};
|
|
518
|
+
/** Experimental schema for structured output */
|
|
477
519
|
experimental_output?: Z;
|
|
520
|
+
/** Telemetry settings */
|
|
478
521
|
telemetry?: TelemetrySettings;
|
|
479
522
|
} & ({
|
|
480
523
|
resourceId?: undefined;
|
|
@@ -1730,24 +1773,30 @@ declare class Agent<TTools extends ToolsInput = ToolsInput, TMetrics extends Rec
|
|
|
1730
1773
|
output?: never;
|
|
1731
1774
|
experimental_output?: never;
|
|
1732
1775
|
}): Promise<GenerateTextResult<any, Z extends ZodSchema ? z.infer<Z> : unknown>>;
|
|
1733
|
-
generate<Z extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: string | string[] | CoreMessage$1[] | Message[], args?: AgentGenerateOptions<Z> &
|
|
1734
|
-
output
|
|
1776
|
+
generate<Z extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: string | string[] | CoreMessage$1[] | Message[], args?: AgentGenerateOptions<Z> & {
|
|
1777
|
+
output?: Z;
|
|
1735
1778
|
experimental_output?: never;
|
|
1736
|
-
}
|
|
1737
|
-
|
|
1779
|
+
}): Promise<GenerateObjectResult<Z extends ZodSchema ? z.infer<Z> : unknown>>;
|
|
1780
|
+
generate<Z extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: string | string[] | CoreMessage$1[] | Message[], args?: AgentGenerateOptions<Z> & {
|
|
1738
1781
|
output?: never;
|
|
1739
|
-
|
|
1782
|
+
experimental_output?: Z;
|
|
1783
|
+
}): Promise<GenerateTextResult<any, Z extends ZodSchema ? z.infer<Z> : unknown> & {
|
|
1784
|
+
object: Z extends ZodSchema ? z.infer<Z> : unknown;
|
|
1785
|
+
}>;
|
|
1740
1786
|
stream<Z extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: string | string[] | CoreMessage$1[] | Message[], args?: AgentStreamOptions<Z> & {
|
|
1741
1787
|
output?: never;
|
|
1742
1788
|
experimental_output?: never;
|
|
1743
1789
|
}): Promise<StreamTextResult<any, Z extends ZodSchema ? z.infer<Z> : unknown>>;
|
|
1744
|
-
stream<Z extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: string | string[] | CoreMessage$1[] | Message[], args?: AgentStreamOptions<Z> &
|
|
1745
|
-
output
|
|
1790
|
+
stream<Z extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: string | string[] | CoreMessage$1[] | Message[], args?: AgentStreamOptions<Z> & {
|
|
1791
|
+
output?: Z;
|
|
1746
1792
|
experimental_output?: never;
|
|
1747
|
-
}
|
|
1748
|
-
|
|
1793
|
+
}): Promise<StreamObjectResult<any, Z extends ZodSchema ? z.infer<Z> : unknown, any>>;
|
|
1794
|
+
stream<Z extends ZodSchema | JSONSchema7 | undefined = undefined>(messages: string | string[] | CoreMessage$1[] | Message[], args?: AgentStreamOptions<Z> & {
|
|
1749
1795
|
output?: never;
|
|
1750
|
-
|
|
1796
|
+
experimental_output?: Z;
|
|
1797
|
+
}): Promise<StreamTextResult<any, Z extends ZodSchema ? z.infer<Z> : unknown> & {
|
|
1798
|
+
partialObjectStream: StreamTextResult<any, Z extends ZodSchema ? z.infer<Z> : unknown>['experimental_partialOutputStream'];
|
|
1799
|
+
}>;
|
|
1751
1800
|
/**
|
|
1752
1801
|
* Convert text to speech using the configured voice provider
|
|
1753
1802
|
* @param input Text or text stream to convert to speech
|
|
@@ -747,9 +747,7 @@ exports.Agent = class Agent extends (_a = chunkPL7PVTGF_cjs.MastraBase) {
|
|
|
747
747
|
if (config.voice) {
|
|
748
748
|
this.voice = config.voice;
|
|
749
749
|
this.voice?.addTools(this.tools);
|
|
750
|
-
this.voice?.
|
|
751
|
-
instructions: config.instructions
|
|
752
|
-
});
|
|
750
|
+
this.voice?.addInstructions(config.instructions);
|
|
753
751
|
}
|
|
754
752
|
}
|
|
755
753
|
hasOwnMemory() {
|
|
@@ -745,9 +745,7 @@ var Agent = class extends (_a = MastraBase) {
|
|
|
745
745
|
if (config.voice) {
|
|
746
746
|
this.voice = config.voice;
|
|
747
747
|
this.voice?.addTools(this.tools);
|
|
748
|
-
this.voice?.
|
|
749
|
-
instructions: config.instructions
|
|
750
|
-
});
|
|
748
|
+
this.voice?.addInstructions(config.instructions);
|
|
751
749
|
}
|
|
752
750
|
}
|
|
753
751
|
hasOwnMemory() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkC6BBAS4I_cjs = require('./chunk-C6BBAS4I.cjs');
|
|
4
4
|
var cohereAi = require('cohere-ai');
|
|
5
5
|
|
|
6
6
|
var CohereRelevanceScorer = class {
|
|
@@ -38,7 +38,7 @@ Relevance score (0-1):`;
|
|
|
38
38
|
var MastraAgentRelevanceScorer = class {
|
|
39
39
|
agent;
|
|
40
40
|
constructor(name, model) {
|
|
41
|
-
this.agent = new
|
|
41
|
+
this.agent = new chunkC6BBAS4I_cjs.Agent({
|
|
42
42
|
name: `Relevance Scorer ${name}`,
|
|
43
43
|
instructions: `You are a specialized agent for evaluating the relevance of text to queries.
|
|
44
44
|
Your task is to rate how well a text passage answers a given query.
|
package/dist/eval/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { M as Metric, T as TestInfo, a as MetricResult } from '../types-CwTG2XyQ.cjs';
|
|
2
|
-
import { A as Agent } from '../base-
|
|
2
|
+
import { A as Agent } from '../base-C0wILuA9.cjs';
|
|
3
3
|
import 'ai';
|
|
4
4
|
import '../base-ObPJ-w8K.cjs';
|
|
5
5
|
import '@opentelemetry/api';
|
package/dist/eval/index.d.ts
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -6,9 +6,9 @@ var chunkXLSROQ26_cjs = require('./chunk-XLSROQ26.cjs');
|
|
|
6
6
|
var chunkYXJQFZOW_cjs = require('./chunk-YXJQFZOW.cjs');
|
|
7
7
|
var chunkASFUEC75_cjs = require('./chunk-ASFUEC75.cjs');
|
|
8
8
|
var chunkRUA6BSB6_cjs = require('./chunk-RUA6BSB6.cjs');
|
|
9
|
-
var
|
|
9
|
+
var chunkWESJ2ZY7_cjs = require('./chunk-WESJ2ZY7.cjs');
|
|
10
10
|
var chunkWVVKLIUW_cjs = require('./chunk-WVVKLIUW.cjs');
|
|
11
|
-
var
|
|
11
|
+
var chunkC6BBAS4I_cjs = require('./chunk-C6BBAS4I.cjs');
|
|
12
12
|
var chunkXB2TJ7LX_cjs = require('./chunk-XB2TJ7LX.cjs');
|
|
13
13
|
var chunk5FAJ6HUC_cjs = require('./chunk-5FAJ6HUC.cjs');
|
|
14
14
|
var chunk2W2GYEYQ_cjs = require('./chunk-2W2GYEYQ.cjs');
|
|
@@ -19,7 +19,7 @@ var chunkV5ORZPFW_cjs = require('./chunk-V5ORZPFW.cjs');
|
|
|
19
19
|
var chunkST5RMVLG_cjs = require('./chunk-ST5RMVLG.cjs');
|
|
20
20
|
|
|
21
21
|
// src/agent/index.warning.ts
|
|
22
|
-
var Agent2 = class extends
|
|
22
|
+
var Agent2 = class extends chunkC6BBAS4I_cjs.Agent {
|
|
23
23
|
constructor(config) {
|
|
24
24
|
super(config);
|
|
25
25
|
this.logger.warn('Please import "Agent from "@mastra/core/agent" instead of "@mastra/core"');
|
|
@@ -192,15 +192,15 @@ Object.defineProperty(exports, "Mastra", {
|
|
|
192
192
|
});
|
|
193
193
|
Object.defineProperty(exports, "CohereRelevanceScorer", {
|
|
194
194
|
enumerable: true,
|
|
195
|
-
get: function () { return
|
|
195
|
+
get: function () { return chunkWESJ2ZY7_cjs.CohereRelevanceScorer; }
|
|
196
196
|
});
|
|
197
197
|
Object.defineProperty(exports, "MastraAgentRelevanceScorer", {
|
|
198
198
|
enumerable: true,
|
|
199
|
-
get: function () { return
|
|
199
|
+
get: function () { return chunkWESJ2ZY7_cjs.MastraAgentRelevanceScorer; }
|
|
200
200
|
});
|
|
201
201
|
Object.defineProperty(exports, "createSimilarityPrompt", {
|
|
202
202
|
enumerable: true,
|
|
203
|
-
get: function () { return
|
|
203
|
+
get: function () { return chunkWESJ2ZY7_cjs.createSimilarityPrompt; }
|
|
204
204
|
});
|
|
205
205
|
Object.defineProperty(exports, "InstrumentClass", {
|
|
206
206
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M as Metric } from './types-CwTG2XyQ.cjs';
|
|
2
2
|
export { a as MetricResult, T as TestInfo } from './types-CwTG2XyQ.cjs';
|
|
3
|
-
import { T as ToolAction, A as Agent$1, m as AgentConfig, g as MastraStorage$1, c as MastraMemory$1, n as ToolExecutionContext, o as Tool$1, S as Step, W as Workflow$1, p as WorkflowOptions } from './base-
|
|
4
|
-
export { a7 as ActionContext, a6 as BaseCondition, B as BaseStructuredOutputType, X as Config, t as CoreAssistantMessage, r as CoreMessage, s as CoreSystemMessage, C as CoreTool, v as CoreToolMessage, u as CoreUserMessage, K as DefaultLLMStreamObjectOptions, J as DefaultLLMStreamOptions, I as DefaultLLMTextObjectOptions, H as DefaultLLMTextOptions, ak as DependencyCheckOutput, x as EmbedManyResult, w as EmbedResult, E as EvalRow, ar as ExtractSchemaFromStep, au as ExtractSchemaType, as as ExtractStepResult, G as GenerateReturn, R as LLMInnerStreamOptions, U as LLMStreamObjectOptions, Q as LLMStreamOptions, P as LLMTextObjectOptions, N as LLMTextOptions, L as LanguageModel, M as Mastra, Z as MemoryConfig, Y as MessageResponse, k as MessageType, O as OutputType, av as PathsToStringProps, ah as ResolverFunctionInput, ai as ResolverFunctionOutput, a4 as RetryConfig, _ as SharedMemoryConfig, a0 as StepAction, aa as StepCondition, ab as StepConfig, a9 as StepDef, d as StepExecutionContext, a3 as StepGraph, aq as StepId, at as StepInputType, a2 as StepNode, al as StepResolverOutput, ac as StepResult, a1 as StepVariableType, ad as StepsRecord, i as StorageColumn, l as StorageGetMessagesArg, j as StorageThreadType, F as StreamReturn, D as StructuredOutput, z as StructuredOutputArrayItem, y as StructuredOutputType, aj as SubscriberFunctionOutput, a5 as VariableReference, V as VercelTool, a8 as WhenConditionReturnValue, an as WorkflowActionParams, ao as WorkflowActions, am as WorkflowActors, e as WorkflowContext, ag as WorkflowEvent, af as WorkflowLogMessage, ax as WorkflowResumeResult, q as WorkflowRow, ae as WorkflowRunResult, aw as WorkflowRunState, ap as WorkflowState, ay as createStep, $ as createTool } from './base-
|
|
3
|
+
import { T as ToolAction, A as Agent$1, m as AgentConfig, g as MastraStorage$1, c as MastraMemory$1, n as ToolExecutionContext, o as Tool$1, S as Step, W as Workflow$1, p as WorkflowOptions } from './base-C0wILuA9.cjs';
|
|
4
|
+
export { a7 as ActionContext, a6 as BaseCondition, B as BaseStructuredOutputType, X as Config, t as CoreAssistantMessage, r as CoreMessage, s as CoreSystemMessage, C as CoreTool, v as CoreToolMessage, u as CoreUserMessage, K as DefaultLLMStreamObjectOptions, J as DefaultLLMStreamOptions, I as DefaultLLMTextObjectOptions, H as DefaultLLMTextOptions, ak as DependencyCheckOutput, x as EmbedManyResult, w as EmbedResult, E as EvalRow, ar as ExtractSchemaFromStep, au as ExtractSchemaType, as as ExtractStepResult, G as GenerateReturn, R as LLMInnerStreamOptions, U as LLMStreamObjectOptions, Q as LLMStreamOptions, P as LLMTextObjectOptions, N as LLMTextOptions, L as LanguageModel, M as Mastra, Z as MemoryConfig, Y as MessageResponse, k as MessageType, O as OutputType, av as PathsToStringProps, ah as ResolverFunctionInput, ai as ResolverFunctionOutput, a4 as RetryConfig, _ as SharedMemoryConfig, a0 as StepAction, aa as StepCondition, ab as StepConfig, a9 as StepDef, d as StepExecutionContext, a3 as StepGraph, aq as StepId, at as StepInputType, a2 as StepNode, al as StepResolverOutput, ac as StepResult, a1 as StepVariableType, ad as StepsRecord, i as StorageColumn, l as StorageGetMessagesArg, j as StorageThreadType, F as StreamReturn, D as StructuredOutput, z as StructuredOutputArrayItem, y as StructuredOutputType, aj as SubscriberFunctionOutput, a5 as VariableReference, V as VercelTool, a8 as WhenConditionReturnValue, an as WorkflowActionParams, ao as WorkflowActions, am as WorkflowActors, e as WorkflowContext, ag as WorkflowEvent, af as WorkflowLogMessage, ax as WorkflowResumeResult, q as WorkflowRow, ae as WorkflowRunResult, aw as WorkflowRunState, ap as WorkflowState, ay as createStep, $ as createTool } from './base-C0wILuA9.cjs';
|
|
5
5
|
import { M as MastraBase$1 } from './base-ObPJ-w8K.cjs';
|
|
6
6
|
export { O as OtelConfig, S as SamplingStrategy, T as Telemetry } from './base-ObPJ-w8K.cjs';
|
|
7
7
|
import { R as RegisteredLogger, a as LogLevel, T as TransportMap, L as Logger } from './index-CquI0inB.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M as Metric } from './types-CwTG2XyQ.js';
|
|
2
2
|
export { a as MetricResult, T as TestInfo } from './types-CwTG2XyQ.js';
|
|
3
|
-
import { T as ToolAction, A as Agent$1, m as AgentConfig, g as MastraStorage$1, c as MastraMemory$1, n as ToolExecutionContext, o as Tool$1, S as Step, W as Workflow$1, p as WorkflowOptions } from './base-
|
|
4
|
-
export { a7 as ActionContext, a6 as BaseCondition, B as BaseStructuredOutputType, X as Config, t as CoreAssistantMessage, r as CoreMessage, s as CoreSystemMessage, C as CoreTool, v as CoreToolMessage, u as CoreUserMessage, K as DefaultLLMStreamObjectOptions, J as DefaultLLMStreamOptions, I as DefaultLLMTextObjectOptions, H as DefaultLLMTextOptions, ak as DependencyCheckOutput, x as EmbedManyResult, w as EmbedResult, E as EvalRow, ar as ExtractSchemaFromStep, au as ExtractSchemaType, as as ExtractStepResult, G as GenerateReturn, R as LLMInnerStreamOptions, U as LLMStreamObjectOptions, Q as LLMStreamOptions, P as LLMTextObjectOptions, N as LLMTextOptions, L as LanguageModel, M as Mastra, Z as MemoryConfig, Y as MessageResponse, k as MessageType, O as OutputType, av as PathsToStringProps, ah as ResolverFunctionInput, ai as ResolverFunctionOutput, a4 as RetryConfig, _ as SharedMemoryConfig, a0 as StepAction, aa as StepCondition, ab as StepConfig, a9 as StepDef, d as StepExecutionContext, a3 as StepGraph, aq as StepId, at as StepInputType, a2 as StepNode, al as StepResolverOutput, ac as StepResult, a1 as StepVariableType, ad as StepsRecord, i as StorageColumn, l as StorageGetMessagesArg, j as StorageThreadType, F as StreamReturn, D as StructuredOutput, z as StructuredOutputArrayItem, y as StructuredOutputType, aj as SubscriberFunctionOutput, a5 as VariableReference, V as VercelTool, a8 as WhenConditionReturnValue, an as WorkflowActionParams, ao as WorkflowActions, am as WorkflowActors, e as WorkflowContext, ag as WorkflowEvent, af as WorkflowLogMessage, ax as WorkflowResumeResult, q as WorkflowRow, ae as WorkflowRunResult, aw as WorkflowRunState, ap as WorkflowState, ay as createStep, $ as createTool } from './base-
|
|
3
|
+
import { T as ToolAction, A as Agent$1, m as AgentConfig, g as MastraStorage$1, c as MastraMemory$1, n as ToolExecutionContext, o as Tool$1, S as Step, W as Workflow$1, p as WorkflowOptions } from './base-Cyl73WbV.js';
|
|
4
|
+
export { a7 as ActionContext, a6 as BaseCondition, B as BaseStructuredOutputType, X as Config, t as CoreAssistantMessage, r as CoreMessage, s as CoreSystemMessage, C as CoreTool, v as CoreToolMessage, u as CoreUserMessage, K as DefaultLLMStreamObjectOptions, J as DefaultLLMStreamOptions, I as DefaultLLMTextObjectOptions, H as DefaultLLMTextOptions, ak as DependencyCheckOutput, x as EmbedManyResult, w as EmbedResult, E as EvalRow, ar as ExtractSchemaFromStep, au as ExtractSchemaType, as as ExtractStepResult, G as GenerateReturn, R as LLMInnerStreamOptions, U as LLMStreamObjectOptions, Q as LLMStreamOptions, P as LLMTextObjectOptions, N as LLMTextOptions, L as LanguageModel, M as Mastra, Z as MemoryConfig, Y as MessageResponse, k as MessageType, O as OutputType, av as PathsToStringProps, ah as ResolverFunctionInput, ai as ResolverFunctionOutput, a4 as RetryConfig, _ as SharedMemoryConfig, a0 as StepAction, aa as StepCondition, ab as StepConfig, a9 as StepDef, d as StepExecutionContext, a3 as StepGraph, aq as StepId, at as StepInputType, a2 as StepNode, al as StepResolverOutput, ac as StepResult, a1 as StepVariableType, ad as StepsRecord, i as StorageColumn, l as StorageGetMessagesArg, j as StorageThreadType, F as StreamReturn, D as StructuredOutput, z as StructuredOutputArrayItem, y as StructuredOutputType, aj as SubscriberFunctionOutput, a5 as VariableReference, V as VercelTool, a8 as WhenConditionReturnValue, an as WorkflowActionParams, ao as WorkflowActions, am as WorkflowActors, e as WorkflowContext, ag as WorkflowEvent, af as WorkflowLogMessage, ax as WorkflowResumeResult, q as WorkflowRow, ae as WorkflowRunResult, aw as WorkflowRunState, ap as WorkflowState, ay as createStep, $ as createTool } from './base-Cyl73WbV.js';
|
|
5
5
|
import { M as MastraBase$1 } from './base-Cmunaaxb.js';
|
|
6
6
|
export { O as OtelConfig, S as SamplingStrategy, T as Telemetry } from './base-Cmunaaxb.js';
|
|
7
7
|
import { R as RegisteredLogger, a as LogLevel, T as TransportMap, L as Logger } from './index-CquI0inB.js';
|
package/dist/index.js
CHANGED
|
@@ -5,9 +5,9 @@ import { Integration, OpenAPIToolset } from './chunk-PNZK456O.js';
|
|
|
5
5
|
export { Mastra } from './chunk-ZBKJDQPM.js';
|
|
6
6
|
import { MastraMemory } from './chunk-43SD5CUE.js';
|
|
7
7
|
import { MastraVector } from './chunk-ZABXT2MN.js';
|
|
8
|
-
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-
|
|
8
|
+
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from './chunk-QM6WIIPM.js';
|
|
9
9
|
import { MastraStorage } from './chunk-RU7CSPAV.js';
|
|
10
|
-
import { Agent } from './chunk-
|
|
10
|
+
import { Agent } from './chunk-VNQRLYIA.js';
|
|
11
11
|
export { InstrumentClass, OTLPTraceExporter as OTLPStorageExporter, Telemetry, hasActiveTelemetry, withSpan } from './chunk-W5HVJX45.js';
|
|
12
12
|
export { checkEvalStorageFields, createMastraProxy, deepMerge, delay, ensureAllMessagesAreCoreMessages, ensureToolProperties, isVercelTool, jsonSchemaPropertiesToTSTypes, jsonSchemaToModel, makeCoreTool, maskStreamTags, resolveSerializedZodOutput } from './chunk-2YF5JYTJ.js';
|
|
13
13
|
import { Tool } from './chunk-ZINPRHAN.js';
|
package/dist/llm/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export { B as BaseStructuredOutputType, t as CoreAssistantMessage, r as CoreMessage, s as CoreSystemMessage, v as CoreToolMessage, u as CoreUserMessage, K as DefaultLLMStreamObjectOptions, J as DefaultLLMStreamOptions, I as DefaultLLMTextObjectOptions, H as DefaultLLMTextOptions, x as EmbedManyResult, w as EmbedResult, G as GenerateReturn, R as LLMInnerStreamOptions, U as LLMStreamObjectOptions, Q as LLMStreamOptions, P as LLMTextObjectOptions, N as LLMTextOptions, L as LanguageModel, O as OutputType, F as StreamReturn, D as StructuredOutput, z as StructuredOutputArrayItem, y as StructuredOutputType } from '../base-
|
|
4
|
+
export { B as BaseStructuredOutputType, t as CoreAssistantMessage, r as CoreMessage, s as CoreSystemMessage, v as CoreToolMessage, u as CoreUserMessage, K as DefaultLLMStreamObjectOptions, J as DefaultLLMStreamOptions, I as DefaultLLMTextObjectOptions, H as DefaultLLMTextOptions, x as EmbedManyResult, w as EmbedResult, G as GenerateReturn, R as LLMInnerStreamOptions, U as LLMStreamObjectOptions, Q as LLMStreamOptions, P as LLMTextObjectOptions, N as LLMTextOptions, L as LanguageModel, O as OutputType, F as StreamReturn, D as StructuredOutput, z as StructuredOutputArrayItem, y as StructuredOutputType } from '../base-C0wILuA9.cjs';
|
|
5
5
|
import '../index-CquI0inB.cjs';
|
|
6
6
|
import '../base-ObPJ-w8K.cjs';
|
|
7
7
|
import '@opentelemetry/api';
|
package/dist/llm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export { B as BaseStructuredOutputType, t as CoreAssistantMessage, r as CoreMessage, s as CoreSystemMessage, v as CoreToolMessage, u as CoreUserMessage, K as DefaultLLMStreamObjectOptions, J as DefaultLLMStreamOptions, I as DefaultLLMTextObjectOptions, H as DefaultLLMTextOptions, x as EmbedManyResult, w as EmbedResult, G as GenerateReturn, R as LLMInnerStreamOptions, U as LLMStreamObjectOptions, Q as LLMStreamOptions, P as LLMTextObjectOptions, N as LLMTextOptions, L as LanguageModel, O as OutputType, F as StreamReturn, D as StructuredOutput, z as StructuredOutputArrayItem, y as StructuredOutputType } from '../base-
|
|
4
|
+
export { B as BaseStructuredOutputType, t as CoreAssistantMessage, r as CoreMessage, s as CoreSystemMessage, v as CoreToolMessage, u as CoreUserMessage, K as DefaultLLMStreamObjectOptions, J as DefaultLLMStreamOptions, I as DefaultLLMTextObjectOptions, H as DefaultLLMTextOptions, x as EmbedManyResult, w as EmbedResult, G as GenerateReturn, R as LLMInnerStreamOptions, U as LLMStreamObjectOptions, Q as LLMStreamOptions, P as LLMTextObjectOptions, N as LLMTextOptions, L as LanguageModel, O as OutputType, F as StreamReturn, D as StructuredOutput, z as StructuredOutputArrayItem, y as StructuredOutputType } from '../base-Cyl73WbV.js';
|
|
5
5
|
import '../index-CquI0inB.js';
|
|
6
6
|
import '../base-Cmunaaxb.js';
|
|
7
7
|
import '@opentelemetry/api';
|
package/dist/mastra/index.d.cts
CHANGED
package/dist/mastra/index.d.ts
CHANGED
package/dist/memory/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as MastraMemory, Z as MemoryConfig, Y as MessageResponse, k as MessageType, _ as SharedMemoryConfig, j as StorageThreadType } from '../base-
|
|
1
|
+
export { c as MastraMemory, Z as MemoryConfig, Y as MessageResponse, k as MessageType, _ as SharedMemoryConfig, j as StorageThreadType } from '../base-C0wILuA9.cjs';
|
|
2
2
|
export { Message as AiMessageType } from 'ai';
|
|
3
3
|
import '../base-ObPJ-w8K.cjs';
|
|
4
4
|
import '@opentelemetry/api';
|
package/dist/memory/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as MastraMemory, Z as MemoryConfig, Y as MessageResponse, k as MessageType, _ as SharedMemoryConfig, j as StorageThreadType } from '../base-
|
|
1
|
+
export { c as MastraMemory, Z as MemoryConfig, Y as MessageResponse, k as MessageType, _ as SharedMemoryConfig, j as StorageThreadType } from '../base-Cyl73WbV.js';
|
|
2
2
|
export { Message as AiMessageType } from 'ai';
|
|
3
3
|
import '../base-Cmunaaxb.js';
|
|
4
4
|
import '@opentelemetry/api';
|
package/dist/network/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkC6BBAS4I_cjs = require('../chunk-C6BBAS4I.cjs');
|
|
4
4
|
var chunk2W2GYEYQ_cjs = require('../chunk-2W2GYEYQ.cjs');
|
|
5
5
|
var chunkPL7PVTGF_cjs = require('../chunk-PL7PVTGF.cjs');
|
|
6
6
|
var chunkNPOKIPWC_cjs = require('../chunk-NPOKIPWC.cjs');
|
|
@@ -17,7 +17,7 @@ var AgentNetwork = class extends chunkPL7PVTGF_cjs.MastraBase {
|
|
|
17
17
|
this.#instructions = config.instructions;
|
|
18
18
|
this.#agents = config.agents;
|
|
19
19
|
this.#model = config.model;
|
|
20
|
-
this.#routingAgent = new
|
|
20
|
+
this.#routingAgent = new chunkC6BBAS4I_cjs.Agent({
|
|
21
21
|
name: config.name,
|
|
22
22
|
instructions: this.getInstructions(),
|
|
23
23
|
model: this.#model,
|
package/dist/network/index.d.cts
CHANGED
package/dist/network/index.d.ts
CHANGED
package/dist/network/index.js
CHANGED
package/dist/relevance/index.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWESJ2ZY7_cjs = require('../chunk-WESJ2ZY7.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "CohereRelevanceScorer", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkWESJ2ZY7_cjs.CohereRelevanceScorer; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "MastraAgentRelevanceScorer", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkWESJ2ZY7_cjs.MastraAgentRelevanceScorer; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "createSimilarityPrompt", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkWESJ2ZY7_cjs.createSimilarityPrompt; }
|
|
18
18
|
});
|
package/dist/relevance/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-
|
|
1
|
+
export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-QM6WIIPM.js';
|
package/dist/storage/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as EvalRow, g as MastraStorage, i as StorageColumn, l as StorageGetMessagesArg, aK as TABLE_EVALS, aL as TABLE_MESSAGES, h as TABLE_NAMES, aM as TABLE_THREADS, aN as TABLE_TRACES, aJ as TABLE_WORKFLOW_SNAPSHOT, q as WorkflowRow } from '../base-
|
|
1
|
+
export { E as EvalRow, g as MastraStorage, i as StorageColumn, l as StorageGetMessagesArg, aK as TABLE_EVALS, aL as TABLE_MESSAGES, h as TABLE_NAMES, aM as TABLE_THREADS, aN as TABLE_TRACES, aJ as TABLE_WORKFLOW_SNAPSHOT, q as WorkflowRow } from '../base-C0wILuA9.cjs';
|
|
2
2
|
import 'ai';
|
|
3
3
|
import '../base-ObPJ-w8K.cjs';
|
|
4
4
|
import '@opentelemetry/api';
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as EvalRow, g as MastraStorage, i as StorageColumn, l as StorageGetMessagesArg, aK as TABLE_EVALS, aL as TABLE_MESSAGES, h as TABLE_NAMES, aM as TABLE_THREADS, aN as TABLE_TRACES, aJ as TABLE_WORKFLOW_SNAPSHOT, q as WorkflowRow } from '../base-
|
|
1
|
+
export { E as EvalRow, g as MastraStorage, i as StorageColumn, l as StorageGetMessagesArg, aK as TABLE_EVALS, aL as TABLE_MESSAGES, h as TABLE_NAMES, aM as TABLE_THREADS, aN as TABLE_TRACES, aJ as TABLE_WORKFLOW_SNAPSHOT, q as WorkflowRow } from '../base-Cyl73WbV.js';
|
|
2
2
|
import 'ai';
|
|
3
3
|
import '../base-Cmunaaxb.js';
|
|
4
4
|
import '@opentelemetry/api';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as MastraStorage, h as TABLE_NAMES, i as StorageColumn, j as StorageThreadType, k as MessageType, l as StorageGetMessagesArg, E as EvalRow } from '../../base-
|
|
1
|
+
import { g as MastraStorage, h as TABLE_NAMES, i as StorageColumn, j as StorageThreadType, k as MessageType, l as StorageGetMessagesArg, E as EvalRow } from '../../base-C0wILuA9.cjs';
|
|
2
2
|
import 'ai';
|
|
3
3
|
import '../../base-ObPJ-w8K.cjs';
|
|
4
4
|
import '@opentelemetry/api';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as MastraStorage, h as TABLE_NAMES, i as StorageColumn, j as StorageThreadType, k as MessageType, l as StorageGetMessagesArg, E as EvalRow } from '../../base-
|
|
1
|
+
import { g as MastraStorage, h as TABLE_NAMES, i as StorageColumn, j as StorageThreadType, k as MessageType, l as StorageGetMessagesArg, E as EvalRow } from '../../base-Cyl73WbV.js';
|
|
2
2
|
import 'ai';
|
|
3
3
|
import '../../base-Cmunaaxb.js';
|
|
4
4
|
import '@opentelemetry/api';
|
|
@@ -3,7 +3,7 @@ import { SpanKind } from '@opentelemetry/api';
|
|
|
3
3
|
import { ExportResult } from '@opentelemetry/core';
|
|
4
4
|
import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
5
5
|
import { L as Logger } from '../index-CquI0inB.cjs';
|
|
6
|
-
import { g as MastraStorage } from '../base-
|
|
6
|
+
import { g as MastraStorage } from '../base-C0wILuA9.cjs';
|
|
7
7
|
import 'stream';
|
|
8
8
|
import 'pino';
|
|
9
9
|
import 'ai';
|
|
@@ -3,7 +3,7 @@ import { SpanKind } from '@opentelemetry/api';
|
|
|
3
3
|
import { ExportResult } from '@opentelemetry/core';
|
|
4
4
|
import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
5
5
|
import { L as Logger } from '../index-CquI0inB.js';
|
|
6
|
-
import { g as MastraStorage } from '../base-
|
|
6
|
+
import { g as MastraStorage } from '../base-Cyl73WbV.js';
|
|
7
7
|
import 'stream';
|
|
8
8
|
import 'pino';
|
|
9
9
|
import 'ai';
|
package/dist/tools/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CoreTool, o as Tool, T as ToolAction, n as ToolExecutionContext, V as VercelTool, $ as createTool } from '../base-
|
|
1
|
+
export { C as CoreTool, o as Tool, T as ToolAction, n as ToolExecutionContext, V as VercelTool, $ as createTool } from '../base-C0wILuA9.cjs';
|
|
2
2
|
import 'ai';
|
|
3
3
|
import '../base-ObPJ-w8K.cjs';
|
|
4
4
|
import '@opentelemetry/api';
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CoreTool, o as Tool, T as ToolAction, n as ToolExecutionContext, V as VercelTool, $ as createTool } from '../base-
|
|
1
|
+
export { C as CoreTool, o as Tool, T as ToolAction, n as ToolExecutionContext, V as VercelTool, $ as createTool } from '../base-Cyl73WbV.js';
|
|
2
2
|
import 'ai';
|
|
3
3
|
import '../base-Cmunaaxb.js';
|
|
4
4
|
import '@opentelemetry/api';
|
package/dist/utils.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VercelTool, T as ToolAction, a as ToolsInput, M as Mastra, b as MastraPrimitives, c as MastraMemory, C as CoreTool, A as Agent, W as Workflow, S as Step, d as StepExecutionContext, e as WorkflowContext, f as AgentNetwork } from './base-
|
|
1
|
+
import { V as VercelTool, T as ToolAction, a as ToolsInput, M as Mastra, b as MastraPrimitives, c as MastraMemory, C as CoreTool, A as Agent, W as Workflow, S as Step, d as StepExecutionContext, e as WorkflowContext, f as AgentNetwork } from './base-C0wILuA9.cjs';
|
|
2
2
|
import { CoreMessage, Message } from 'ai';
|
|
3
3
|
import { MastraTTS } from './tts/index.cjs';
|
|
4
4
|
import { MastraVector } from './vector/index.cjs';
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VercelTool, T as ToolAction, a as ToolsInput, M as Mastra, b as MastraPrimitives, c as MastraMemory, C as CoreTool, A as Agent, W as Workflow, S as Step, d as StepExecutionContext, e as WorkflowContext, f as AgentNetwork } from './base-
|
|
1
|
+
import { V as VercelTool, T as ToolAction, a as ToolsInput, M as Mastra, b as MastraPrimitives, c as MastraMemory, C as CoreTool, A as Agent, W as Workflow, S as Step, d as StepExecutionContext, e as WorkflowContext, f as AgentNetwork } from './base-Cyl73WbV.js';
|
|
2
2
|
import { CoreMessage, Message } from 'ai';
|
|
3
3
|
import { MastraTTS } from './tts/index.js';
|
|
4
4
|
import { MastraVector } from './vector/index.js';
|
package/dist/voice/index.cjs
CHANGED
|
@@ -65,6 +65,13 @@ exports.MastraVoice = class MastraVoice extends (_a = chunkPL7PVTGF_cjs.MastraBa
|
|
|
65
65
|
this.logger.warn("answer not implemented by this voice provider");
|
|
66
66
|
return Promise.resolve();
|
|
67
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Equip the voice provider with instructions
|
|
70
|
+
* @param instructions Instructions to add
|
|
71
|
+
*/
|
|
72
|
+
addInstructions(_instructions) {
|
|
73
|
+
this.logger.warn("addInstructions not implemented by this voice provider");
|
|
74
|
+
}
|
|
68
75
|
/**
|
|
69
76
|
* Equip the voice provider with tools
|
|
70
77
|
* @param tools Array of tools to add
|
|
@@ -191,6 +198,16 @@ var CompositeVoice = class extends exports.MastraVoice {
|
|
|
191
198
|
}
|
|
192
199
|
return this.realtimeProvider.answer(options);
|
|
193
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Equip the voice provider with instructions
|
|
203
|
+
* @param instructions Instructions to add
|
|
204
|
+
*/
|
|
205
|
+
addInstructions(instructions) {
|
|
206
|
+
if (!this.realtimeProvider) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
this.realtimeProvider.addInstructions(instructions);
|
|
210
|
+
}
|
|
194
211
|
/**
|
|
195
212
|
* Equip the voice provider with tools
|
|
196
213
|
* @param tools Array of tools to add
|
package/dist/voice/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aE as CompositeVoice, aD as MastraVoice, aC as VoiceConfig, aB as VoiceEventMap, aA as VoiceEventType } from '../base-
|
|
1
|
+
export { aE as CompositeVoice, aD as MastraVoice, aC as VoiceConfig, aB as VoiceEventMap, aA as VoiceEventType } from '../base-C0wILuA9.cjs';
|
|
2
2
|
import 'ai';
|
|
3
3
|
import '../base-ObPJ-w8K.cjs';
|
|
4
4
|
import '@opentelemetry/api';
|
package/dist/voice/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aE as CompositeVoice, aD as MastraVoice, aC as VoiceConfig, aB as VoiceEventMap, aA as VoiceEventType } from '../base-
|
|
1
|
+
export { aE as CompositeVoice, aD as MastraVoice, aC as VoiceConfig, aB as VoiceEventMap, aA as VoiceEventType } from '../base-Cyl73WbV.js';
|
|
2
2
|
import 'ai';
|
|
3
3
|
import '../base-Cmunaaxb.js';
|
|
4
4
|
import '@opentelemetry/api';
|
package/dist/voice/index.js
CHANGED
|
@@ -63,6 +63,13 @@ var MastraVoice = class extends (_a = MastraBase) {
|
|
|
63
63
|
this.logger.warn("answer not implemented by this voice provider");
|
|
64
64
|
return Promise.resolve();
|
|
65
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Equip the voice provider with instructions
|
|
68
|
+
* @param instructions Instructions to add
|
|
69
|
+
*/
|
|
70
|
+
addInstructions(_instructions) {
|
|
71
|
+
this.logger.warn("addInstructions not implemented by this voice provider");
|
|
72
|
+
}
|
|
66
73
|
/**
|
|
67
74
|
* Equip the voice provider with tools
|
|
68
75
|
* @param tools Array of tools to add
|
|
@@ -189,6 +196,16 @@ var CompositeVoice = class extends MastraVoice {
|
|
|
189
196
|
}
|
|
190
197
|
return this.realtimeProvider.answer(options);
|
|
191
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* Equip the voice provider with instructions
|
|
201
|
+
* @param instructions Instructions to add
|
|
202
|
+
*/
|
|
203
|
+
addInstructions(instructions) {
|
|
204
|
+
if (!this.realtimeProvider) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
this.realtimeProvider.addInstructions(instructions);
|
|
208
|
+
}
|
|
192
209
|
/**
|
|
193
210
|
* Equip the voice provider with tools
|
|
194
211
|
* @param tools Array of tools to add
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a5 as VariableReference, ac as StepResult, S as Step, W as Workflow, e as WorkflowContext, M as Mastra, a0 as StepAction, ae as WorkflowRunResult } from '../base-
|
|
2
|
-
export { a7 as ActionContext, a6 as BaseCondition, ak as DependencyCheckOutput, ar as ExtractSchemaFromStep, au as ExtractSchemaType, as as ExtractStepResult, av as PathsToStringProps, ah as ResolverFunctionInput, ai as ResolverFunctionOutput, a4 as RetryConfig, aa as StepCondition, ab as StepConfig, a9 as StepDef, d as StepExecutionContext, a3 as StepGraph, aq as StepId, at as StepInputType, a2 as StepNode, al as StepResolverOutput, a1 as StepVariableType, ad as StepsRecord, aj as SubscriberFunctionOutput, a8 as WhenConditionReturnValue, an as WorkflowActionParams, ao as WorkflowActions, am as WorkflowActors, ag as WorkflowEvent, af as WorkflowLogMessage, p as WorkflowOptions, ax as WorkflowResumeResult, aw as WorkflowRunState, ap as WorkflowState, ay as createStep } from '../base-
|
|
1
|
+
import { a5 as VariableReference, ac as StepResult, S as Step, W as Workflow, e as WorkflowContext, M as Mastra, a0 as StepAction, ae as WorkflowRunResult } from '../base-C0wILuA9.cjs';
|
|
2
|
+
export { a7 as ActionContext, a6 as BaseCondition, ak as DependencyCheckOutput, ar as ExtractSchemaFromStep, au as ExtractSchemaType, as as ExtractStepResult, av as PathsToStringProps, ah as ResolverFunctionInput, ai as ResolverFunctionOutput, a4 as RetryConfig, aa as StepCondition, ab as StepConfig, a9 as StepDef, d as StepExecutionContext, a3 as StepGraph, aq as StepId, at as StepInputType, a2 as StepNode, al as StepResolverOutput, a1 as StepVariableType, ad as StepsRecord, aj as SubscriberFunctionOutput, a8 as WhenConditionReturnValue, an as WorkflowActionParams, ao as WorkflowActions, am as WorkflowActors, ag as WorkflowEvent, af as WorkflowLogMessage, p as WorkflowOptions, ax as WorkflowResumeResult, aw as WorkflowRunState, ap as WorkflowState, ay as createStep } from '../base-C0wILuA9.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { L as Logger } from '../index-CquI0inB.cjs';
|
|
5
5
|
import '../base-ObPJ-w8K.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a5 as VariableReference, ac as StepResult, S as Step, W as Workflow, e as WorkflowContext, M as Mastra, a0 as StepAction, ae as WorkflowRunResult } from '../base-
|
|
2
|
-
export { a7 as ActionContext, a6 as BaseCondition, ak as DependencyCheckOutput, ar as ExtractSchemaFromStep, au as ExtractSchemaType, as as ExtractStepResult, av as PathsToStringProps, ah as ResolverFunctionInput, ai as ResolverFunctionOutput, a4 as RetryConfig, aa as StepCondition, ab as StepConfig, a9 as StepDef, d as StepExecutionContext, a3 as StepGraph, aq as StepId, at as StepInputType, a2 as StepNode, al as StepResolverOutput, a1 as StepVariableType, ad as StepsRecord, aj as SubscriberFunctionOutput, a8 as WhenConditionReturnValue, an as WorkflowActionParams, ao as WorkflowActions, am as WorkflowActors, ag as WorkflowEvent, af as WorkflowLogMessage, p as WorkflowOptions, ax as WorkflowResumeResult, aw as WorkflowRunState, ap as WorkflowState, ay as createStep } from '../base-
|
|
1
|
+
import { a5 as VariableReference, ac as StepResult, S as Step, W as Workflow, e as WorkflowContext, M as Mastra, a0 as StepAction, ae as WorkflowRunResult } from '../base-Cyl73WbV.js';
|
|
2
|
+
export { a7 as ActionContext, a6 as BaseCondition, ak as DependencyCheckOutput, ar as ExtractSchemaFromStep, au as ExtractSchemaType, as as ExtractStepResult, av as PathsToStringProps, ah as ResolverFunctionInput, ai as ResolverFunctionOutput, a4 as RetryConfig, aa as StepCondition, ab as StepConfig, a9 as StepDef, d as StepExecutionContext, a3 as StepGraph, aq as StepId, at as StepInputType, a2 as StepNode, al as StepResolverOutput, a1 as StepVariableType, ad as StepsRecord, aj as SubscriberFunctionOutput, a8 as WhenConditionReturnValue, an as WorkflowActionParams, ao as WorkflowActions, am as WorkflowActors, ag as WorkflowEvent, af as WorkflowLogMessage, p as WorkflowOptions, ax as WorkflowResumeResult, aw as WorkflowRunState, ap as WorkflowState, ay as createStep } from '../base-Cyl73WbV.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { L as Logger } from '../index-CquI0inB.js';
|
|
5
5
|
import '../base-Cmunaaxb.js';
|