@mastra/core 0.6.0 → 0.6.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +44 -21
- package/dist/agent/index.cjs +2 -2
- package/dist/agent/index.d.cts +1 -2
- package/dist/agent/index.d.ts +1 -2
- package/dist/agent/index.js +1 -1
- package/dist/{base-DA1J3qra.d.ts → base-CnxSa6Qc.d.ts} +197 -7
- package/dist/{base-zjGki2_Z.d.cts → base-D8JxJ6GC.d.cts} +197 -7
- package/dist/{chunk-WX2ECXAE.cjs → chunk-5BL23DUS.cjs} +27 -12
- package/dist/{chunk-4Y74D74B.js → chunk-64NEAPI4.js} +12 -0
- package/dist/{chunk-B3KTSEC5.cjs → chunk-BPL5FORD.cjs} +11 -11
- package/dist/{chunk-LTLNGEL2.js → chunk-E56VUJSG.js} +18 -3
- package/dist/{chunk-MLKXBAQG.js → chunk-GHONEERA.js} +10 -10
- package/dist/{chunk-DGYFNGOC.js → chunk-HEF3AUCR.js} +1 -1
- package/dist/{chunk-N2G5ZI42.cjs → chunk-MEPD3EOI.cjs} +32 -8
- package/dist/{chunk-L5BNMAC3.cjs → chunk-MNGT2Y5R.cjs} +2 -2
- package/dist/{chunk-6ZHR5KIP.js → chunk-U4EAGYCS.js} +31 -7
- package/dist/{chunk-43Y7WG5W.cjs → chunk-WSMI66XC.cjs} +12 -0
- package/dist/eval/index.d.cts +1 -2
- package/dist/eval/index.d.ts +1 -2
- package/dist/index.cjs +36 -36
- package/dist/index.d.cts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +6 -6
- package/dist/integration/index.d.cts +1 -2
- package/dist/integration/index.d.ts +1 -2
- package/dist/llm/index.d.cts +1 -2
- package/dist/llm/index.d.ts +1 -2
- package/dist/mastra/index.d.cts +2 -3
- package/dist/mastra/index.d.ts +2 -3
- package/dist/memory/index.cjs +2 -2
- package/dist/memory/index.d.cts +1 -2
- package/dist/memory/index.d.ts +1 -2
- package/dist/memory/index.js +1 -1
- package/dist/relevance/index.cjs +4 -4
- package/dist/relevance/index.d.cts +1 -2
- package/dist/relevance/index.d.ts +1 -2
- package/dist/relevance/index.js +1 -1
- package/dist/storage/index.d.cts +1 -2
- package/dist/storage/index.d.ts +1 -2
- package/dist/storage/libsql/index.d.cts +1 -2
- package/dist/storage/libsql/index.d.ts +1 -2
- package/dist/telemetry/index.d.cts +1 -2
- package/dist/telemetry/index.d.ts +1 -2
- package/dist/tools/index.d.cts +2 -3
- package/dist/tools/index.d.ts +2 -3
- package/dist/utils.cjs +11 -11
- package/dist/utils.d.cts +1 -2
- package/dist/utils.d.ts +1 -2
- package/dist/utils.js +1 -1
- package/dist/voice/index.cjs +171 -12
- package/dist/voice/index.d.cts +12 -62
- package/dist/voice/index.d.ts +12 -62
- package/dist/voice/index.js +171 -12
- package/dist/workflows/index.cjs +17 -17
- package/dist/workflows/index.d.cts +2 -3
- package/dist/workflows/index.d.ts +2 -3
- package/dist/workflows/index.js +1 -1
- package/package.json +1 -2
package/LICENSE
CHANGED
|
@@ -1,21 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
Elastic License 2.0 (ELv2)
|
|
2
|
+
|
|
3
|
+
**Acceptance**
|
|
4
|
+
By using the software, you agree to all of the terms and conditions below.
|
|
5
|
+
|
|
6
|
+
**Copyright License**
|
|
7
|
+
The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below
|
|
8
|
+
|
|
9
|
+
**Limitations**
|
|
10
|
+
You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software.
|
|
11
|
+
|
|
12
|
+
You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key.
|
|
13
|
+
|
|
14
|
+
You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
|
|
15
|
+
|
|
16
|
+
**Patents**
|
|
17
|
+
The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
18
|
+
|
|
19
|
+
**Notices**
|
|
20
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
|
|
21
|
+
|
|
22
|
+
If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
|
|
23
|
+
|
|
24
|
+
**No Other Rights**
|
|
25
|
+
These terms do not imply any licenses other than those expressly granted in these terms.
|
|
26
|
+
|
|
27
|
+
**Termination**
|
|
28
|
+
If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
|
|
29
|
+
|
|
30
|
+
**No Liability**
|
|
31
|
+
As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
|
|
32
|
+
|
|
33
|
+
**Definitions**
|
|
34
|
+
The _licensor_ is the entity offering these terms, and the _software_ is the software the licensor makes available under these terms, including any portion of it.
|
|
35
|
+
|
|
36
|
+
_you_ refers to the individual or entity agreeing to these terms.
|
|
37
|
+
|
|
38
|
+
_your company_ is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. _control_ means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
39
|
+
|
|
40
|
+
_your licenses_ are all the licenses granted to you for the software under these terms.
|
|
41
|
+
|
|
42
|
+
_use_ means anything you do with the software requiring one of your licenses.
|
|
43
|
+
|
|
44
|
+
_trademark_ means trademarks, service marks, and similar rights.
|
package/dist/agent/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk5BL23DUS_cjs = require('../chunk-5BL23DUS.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 chunk5BL23DUS_cjs.Agent; }
|
|
10
10
|
});
|
package/dist/agent/index.d.cts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
export { Message as AiMessageType } from 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export { A as Agent, l as AgentConfig,
|
|
4
|
+
export { A as Agent, l as AgentConfig, aD as AgentGenerateOptions, aE as AgentStreamOptions, aw as MastraLanguageModel, a as ToolsInput, aC as ToolsetsInput } from '../base-D8JxJ6GC.cjs';
|
|
5
5
|
import '../base-DboIg_Cd.cjs';
|
|
6
6
|
import '../types-CwTG2XyQ.cjs';
|
|
7
|
-
import '../voice/index.cjs';
|
|
8
7
|
import 'sift';
|
|
9
8
|
import '../index-mKY1XrpK.cjs';
|
|
10
9
|
import 'stream';
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
export { Message as AiMessageType } from 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export { A as Agent, l as AgentConfig,
|
|
4
|
+
export { A as Agent, l as AgentConfig, aD as AgentGenerateOptions, aE as AgentStreamOptions, aw as MastraLanguageModel, a as ToolsInput, aC as ToolsetsInput } from '../base-CnxSa6Qc.js';
|
|
5
5
|
import '../base-BZViaFTt.js';
|
|
6
6
|
import '../types-CwTG2XyQ.js';
|
|
7
|
-
import '../voice/index.js';
|
|
8
7
|
import 'sift';
|
|
9
8
|
import '../index-mKY1XrpK.js';
|
|
10
9
|
import 'stream';
|
package/dist/agent/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Agent } from '../chunk-
|
|
1
|
+
export { Agent } from '../chunk-E56VUJSG.js';
|
|
@@ -10,14 +10,21 @@ import { MastraDeployer } from './deployer/index.js';
|
|
|
10
10
|
import { MastraVector } from './vector/index.js';
|
|
11
11
|
import { Span } from '@opentelemetry/api';
|
|
12
12
|
import { MastraTTS } from './tts/index.js';
|
|
13
|
-
import { CompositeVoice } from './voice/index.js';
|
|
14
13
|
|
|
15
14
|
type VercelTool = Tool;
|
|
16
15
|
type CoreTool = {
|
|
16
|
+
id?: string;
|
|
17
17
|
description?: string;
|
|
18
18
|
parameters: ZodSchema;
|
|
19
19
|
execute?: (params: any, options: ToolExecutionOptions) => Promise<any>;
|
|
20
|
-
}
|
|
20
|
+
} & ({
|
|
21
|
+
type?: 'function' | undefined;
|
|
22
|
+
id?: string;
|
|
23
|
+
} | {
|
|
24
|
+
type: 'provider-defined';
|
|
25
|
+
id: `${string}.${string}`;
|
|
26
|
+
args: Record<string, unknown>;
|
|
27
|
+
});
|
|
21
28
|
interface ToolExecutionContext<TSchemaIn extends z.ZodSchema | undefined = undefined> extends IExecutionContext<TSchemaIn> {
|
|
22
29
|
mastra?: MastraUnion;
|
|
23
30
|
}
|
|
@@ -371,6 +378,8 @@ type DependencyCheckOutput = {
|
|
|
371
378
|
type: 'CONDITIONS_MET';
|
|
372
379
|
} | {
|
|
373
380
|
type: 'CONDITIONS_SKIPPED';
|
|
381
|
+
} | {
|
|
382
|
+
type: 'CONDITIONS_SKIP_TO_COMPLETED';
|
|
374
383
|
} | {
|
|
375
384
|
type: 'CONDITION_FAILED';
|
|
376
385
|
error: string;
|
|
@@ -675,6 +684,182 @@ interface IAction<TId extends string, TSchemaIn extends z.ZodSchema | undefined,
|
|
|
675
684
|
execute?: (context: TContext, options?: TOptions) => Promise<TSchemaOut extends z.ZodSchema ? z.infer<TSchemaOut> : unknown>;
|
|
676
685
|
}
|
|
677
686
|
|
|
687
|
+
type VoiceEventType = 'speaking' | 'writing' | 'error' | string;
|
|
688
|
+
interface VoiceEventMap {
|
|
689
|
+
speaking: {
|
|
690
|
+
audio?: NodeJS.ReadableStream;
|
|
691
|
+
};
|
|
692
|
+
writing: {
|
|
693
|
+
text: string;
|
|
694
|
+
role: 'assistant' | 'user';
|
|
695
|
+
};
|
|
696
|
+
error: {
|
|
697
|
+
message: string;
|
|
698
|
+
code?: string;
|
|
699
|
+
details?: unknown;
|
|
700
|
+
};
|
|
701
|
+
[key: string]: unknown;
|
|
702
|
+
}
|
|
703
|
+
interface BuiltInModelConfig {
|
|
704
|
+
name: string;
|
|
705
|
+
apiKey?: string;
|
|
706
|
+
}
|
|
707
|
+
interface VoiceConfig<T = unknown> {
|
|
708
|
+
listeningModel?: BuiltInModelConfig;
|
|
709
|
+
speechModel?: BuiltInModelConfig;
|
|
710
|
+
speaker?: string;
|
|
711
|
+
name?: string;
|
|
712
|
+
realtimeConfig?: {
|
|
713
|
+
model?: string;
|
|
714
|
+
apiKey?: string;
|
|
715
|
+
options?: T;
|
|
716
|
+
};
|
|
717
|
+
}
|
|
718
|
+
declare abstract class MastraVoice<TOptions = unknown, TSpeakOptions = unknown, TListenOptions = unknown, TTools extends ToolsInput = ToolsInput, TEventArgs extends VoiceEventMap = VoiceEventMap, TSpeakerMetadata = unknown> extends MastraBase {
|
|
719
|
+
protected listeningModel?: BuiltInModelConfig;
|
|
720
|
+
protected speechModel?: BuiltInModelConfig;
|
|
721
|
+
protected speaker?: string;
|
|
722
|
+
protected realtimeConfig?: {
|
|
723
|
+
model?: string;
|
|
724
|
+
apiKey?: string;
|
|
725
|
+
options?: TOptions;
|
|
726
|
+
};
|
|
727
|
+
constructor({ listeningModel, speechModel, speaker, realtimeConfig, name }?: VoiceConfig<TOptions>);
|
|
728
|
+
traced<T extends Function>(method: T, methodName: string): T;
|
|
729
|
+
/**
|
|
730
|
+
* Convert text to speech
|
|
731
|
+
* @param input Text or text stream to convert to speech
|
|
732
|
+
* @param options Speech options including speaker and provider-specific options
|
|
733
|
+
* @returns Audio stream
|
|
734
|
+
*/
|
|
735
|
+
/**
|
|
736
|
+
* Convert text to speech
|
|
737
|
+
* @param input Text or text stream to convert to speech
|
|
738
|
+
* @param options Speech options including speaker and provider-specific options
|
|
739
|
+
* @returns Audio stream or void if in chat mode
|
|
740
|
+
*/
|
|
741
|
+
abstract speak(input: string | NodeJS.ReadableStream, options?: {
|
|
742
|
+
speaker?: string;
|
|
743
|
+
} & TSpeakOptions): Promise<NodeJS.ReadableStream | void>;
|
|
744
|
+
/**
|
|
745
|
+
* Convert speech to text
|
|
746
|
+
* @param audioStream Audio stream to transcribe
|
|
747
|
+
* @param options Provider-specific transcription options
|
|
748
|
+
* @returns Text or text stream
|
|
749
|
+
*/
|
|
750
|
+
/**
|
|
751
|
+
* Convert speech to text
|
|
752
|
+
* @param audioStream Audio stream to transcribe
|
|
753
|
+
* @param options Provider-specific transcription options
|
|
754
|
+
* @returns Text, text stream, or void if in chat mode
|
|
755
|
+
*/
|
|
756
|
+
abstract listen(audioStream: NodeJS.ReadableStream | unknown, // Allow other audio input types for OpenAI realtime API
|
|
757
|
+
options?: TListenOptions): Promise<string | NodeJS.ReadableStream | void>;
|
|
758
|
+
updateConfig(_options: Record<string, unknown>): void;
|
|
759
|
+
/**
|
|
760
|
+
* Initializes a WebSocket or WebRTC connection for real-time communication
|
|
761
|
+
* @returns Promise that resolves when the connection is established
|
|
762
|
+
*/
|
|
763
|
+
connect(_options?: Record<string, unknown>): Promise<void>;
|
|
764
|
+
/**
|
|
765
|
+
* Relay audio data to the voice provider for real-time processing
|
|
766
|
+
* @param audioData Audio data to relay
|
|
767
|
+
*/
|
|
768
|
+
send(_audioData: NodeJS.ReadableStream | Int16Array): Promise<void>;
|
|
769
|
+
/**
|
|
770
|
+
* Trigger voice providers to respond
|
|
771
|
+
*/
|
|
772
|
+
answer(_options?: Record<string, unknown>): Promise<void>;
|
|
773
|
+
/**
|
|
774
|
+
* Equip the voice provider with tools
|
|
775
|
+
* @param tools Array of tools to add
|
|
776
|
+
*/
|
|
777
|
+
addTools(_tools: TTools): void;
|
|
778
|
+
/**
|
|
779
|
+
* Disconnect from the WebSocket or WebRTC connection
|
|
780
|
+
*/
|
|
781
|
+
close(): void;
|
|
782
|
+
/**
|
|
783
|
+
* Register an event listener
|
|
784
|
+
* @param event Event name (e.g., 'speaking', 'writing', 'error')
|
|
785
|
+
* @param callback Callback function that receives event data
|
|
786
|
+
*/
|
|
787
|
+
on<E extends VoiceEventType>(_event: E, _callback: (data: E extends keyof TEventArgs ? TEventArgs[E] : unknown) => void): void;
|
|
788
|
+
/**
|
|
789
|
+
* Remove an event listener
|
|
790
|
+
* @param event Event name (e.g., 'speaking', 'writing', 'error')
|
|
791
|
+
* @param callback Callback function to remove
|
|
792
|
+
*/
|
|
793
|
+
off<E extends VoiceEventType>(_event: E, _callback: (data: E extends keyof TEventArgs ? TEventArgs[E] : unknown) => void): void;
|
|
794
|
+
/**
|
|
795
|
+
* Get available speakers/voices
|
|
796
|
+
* @returns Array of available voice IDs and their metadata
|
|
797
|
+
*/
|
|
798
|
+
getSpeakers(): Promise<Array<{
|
|
799
|
+
voiceId: string;
|
|
800
|
+
} & TSpeakerMetadata>>;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
declare class CompositeVoice extends MastraVoice<unknown, unknown, unknown, ToolsInput, VoiceEventMap> {
|
|
804
|
+
protected speakProvider?: MastraVoice;
|
|
805
|
+
protected listenProvider?: MastraVoice;
|
|
806
|
+
protected realtimeProvider?: MastraVoice;
|
|
807
|
+
constructor({ speakProvider, listenProvider, realtimeProvider, }: {
|
|
808
|
+
speakProvider?: MastraVoice;
|
|
809
|
+
listenProvider?: MastraVoice;
|
|
810
|
+
realtimeProvider?: MastraVoice;
|
|
811
|
+
});
|
|
812
|
+
/**
|
|
813
|
+
* Convert text to speech using the configured provider
|
|
814
|
+
* @param input Text or text stream to convert to speech
|
|
815
|
+
* @param options Speech options including speaker and provider-specific options
|
|
816
|
+
* @returns Audio stream or void if in realtime mode
|
|
817
|
+
*/
|
|
818
|
+
speak(input: string | NodeJS.ReadableStream, options?: {
|
|
819
|
+
speaker?: string;
|
|
820
|
+
} & any): Promise<NodeJS.ReadableStream | void>;
|
|
821
|
+
listen(audioStream: NodeJS.ReadableStream, options?: any): Promise<string | void | NodeJS.ReadableStream>;
|
|
822
|
+
getSpeakers(): Promise<{
|
|
823
|
+
voiceId: string;
|
|
824
|
+
}[]>;
|
|
825
|
+
updateConfig(options: Record<string, unknown>): void;
|
|
826
|
+
/**
|
|
827
|
+
* Initializes a WebSocket or WebRTC connection for real-time communication
|
|
828
|
+
* @returns Promise that resolves when the connection is established
|
|
829
|
+
*/
|
|
830
|
+
connect(options?: Record<string, unknown>): Promise<void>;
|
|
831
|
+
/**
|
|
832
|
+
* Relay audio data to the voice provider for real-time processing
|
|
833
|
+
* @param audioData Audio data to send
|
|
834
|
+
*/
|
|
835
|
+
send(audioData: NodeJS.ReadableStream | Int16Array): Promise<void>;
|
|
836
|
+
/**
|
|
837
|
+
* Trigger voice providers to respond
|
|
838
|
+
*/
|
|
839
|
+
answer(options?: Record<string, unknown>): Promise<void>;
|
|
840
|
+
/**
|
|
841
|
+
* Equip the voice provider with tools
|
|
842
|
+
* @param tools Array of tools to add
|
|
843
|
+
*/
|
|
844
|
+
addTools(tools: ToolsInput): void;
|
|
845
|
+
/**
|
|
846
|
+
* Disconnect from the WebSocket or WebRTC connection
|
|
847
|
+
*/
|
|
848
|
+
close(): void;
|
|
849
|
+
/**
|
|
850
|
+
* Register an event listener
|
|
851
|
+
* @param event Event name (e.g., 'speaking', 'writing', 'error')
|
|
852
|
+
* @param callback Callback function that receives event data
|
|
853
|
+
*/
|
|
854
|
+
on<E extends VoiceEventType>(event: E, callback: (data: E extends keyof VoiceEventMap ? VoiceEventMap[E] : unknown) => void): void;
|
|
855
|
+
/**
|
|
856
|
+
* Remove an event listener
|
|
857
|
+
* @param event Event name (e.g., 'speaking', 'writing', 'error')
|
|
858
|
+
* @param callback Callback function to remove
|
|
859
|
+
*/
|
|
860
|
+
off<E extends VoiceEventType>(event: E, callback: (data: E extends keyof VoiceEventMap ? VoiceEventMap[E] : unknown) => void): void;
|
|
861
|
+
}
|
|
862
|
+
|
|
678
863
|
type ToolsInput = Record<string, ToolAction<any, any, any> | VercelTool>;
|
|
679
864
|
type ToolsetsInput = Record<string, ToolsInput>;
|
|
680
865
|
type MastraLanguageModel = LanguageModelV1;
|
|
@@ -691,6 +876,7 @@ interface AgentConfig<TTools extends ToolsInput = ToolsInput, TMetrics extends R
|
|
|
691
876
|
voice?: CompositeVoice;
|
|
692
877
|
}
|
|
693
878
|
type AgentGenerateOptions<Z extends ZodSchema | JSONSchema7 | undefined = undefined> = {
|
|
879
|
+
instructions?: string;
|
|
694
880
|
toolsets?: ToolsetsInput;
|
|
695
881
|
context?: CoreMessage[];
|
|
696
882
|
memoryOptions?: MemoryConfig;
|
|
@@ -712,6 +898,7 @@ type AgentGenerateOptions<Z extends ZodSchema | JSONSchema7 | undefined = undefi
|
|
|
712
898
|
threadId: string;
|
|
713
899
|
}) & (Z extends undefined ? DefaultLLMTextOptions : DefaultLLMTextObjectOptions);
|
|
714
900
|
type AgentStreamOptions<Z extends ZodSchema | JSONSchema7 | undefined = undefined> = {
|
|
901
|
+
instructions?: string;
|
|
715
902
|
toolsets?: ToolsetsInput;
|
|
716
903
|
context?: CoreMessage[];
|
|
717
904
|
memoryOptions?: MemoryConfig;
|
|
@@ -883,7 +1070,8 @@ declare class Agent<TTools extends ToolsInput = ToolsInput, TMetrics extends Rec
|
|
|
883
1070
|
coreMessages: CoreMessage$1[];
|
|
884
1071
|
threadIdToUse: string;
|
|
885
1072
|
}>;
|
|
886
|
-
__primitive({ messages, context, threadId, memoryConfig, resourceId, runId, toolsets, }: {
|
|
1073
|
+
__primitive({ instructions, messages, context, threadId, memoryConfig, resourceId, runId, toolsets, }: {
|
|
1074
|
+
instructions?: string;
|
|
887
1075
|
toolsets?: ToolsetsInput;
|
|
888
1076
|
resourceId?: string;
|
|
889
1077
|
threadId?: string;
|
|
@@ -932,27 +1120,29 @@ declare class Agent<TTools extends ToolsInput = ToolsInput, TMetrics extends Rec
|
|
|
932
1120
|
* @param input Text or text stream to convert to speech
|
|
933
1121
|
* @param options Speech options including speaker and provider-specific options
|
|
934
1122
|
* @returns Audio stream
|
|
1123
|
+
* @deprecated Use agent.voice.speak() instead
|
|
935
1124
|
*/
|
|
936
1125
|
speak(input: string | NodeJS.ReadableStream, options?: {
|
|
937
1126
|
speaker?: string;
|
|
938
1127
|
[key: string]: any;
|
|
939
|
-
}): Promise<NodeJS.ReadableStream>;
|
|
1128
|
+
}): Promise<NodeJS.ReadableStream | void>;
|
|
940
1129
|
/**
|
|
941
1130
|
* Convert speech to text using the configured voice provider
|
|
942
1131
|
* @param audioStream Audio stream to transcribe
|
|
943
1132
|
* @param options Provider-specific transcription options
|
|
944
1133
|
* @returns Text or text stream
|
|
1134
|
+
* @deprecated Use agent.voice.listen() instead
|
|
945
1135
|
*/
|
|
946
1136
|
listen(audioStream: NodeJS.ReadableStream, options?: {
|
|
947
1137
|
[key: string]: any;
|
|
948
|
-
}): Promise<string | NodeJS.ReadableStream>;
|
|
1138
|
+
}): Promise<string | NodeJS.ReadableStream | void>;
|
|
949
1139
|
/**
|
|
950
1140
|
* Get a list of available speakers from the configured voice provider
|
|
951
1141
|
* @throws {Error} If no voice provider is configured
|
|
952
1142
|
* @returns {Promise<Array<{voiceId: string}>>} List of available speakers
|
|
1143
|
+
* @deprecated Use agent.voice.getSpeakers() instead
|
|
953
1144
|
*/
|
|
954
1145
|
getSpeakers(): Promise<{
|
|
955
|
-
[key: string]: any;
|
|
956
1146
|
voiceId: string;
|
|
957
1147
|
}[]>;
|
|
958
1148
|
}
|
|
@@ -1163,4 +1353,4 @@ declare abstract class MastraStorage extends MastraBase {
|
|
|
1163
1353
|
__getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
|
|
1164
1354
|
}
|
|
1165
1355
|
|
|
1166
|
-
export { type StepNode as $, Agent as A, type BaseStructuredOutputType as B, type CoreTool as C, type DefaultLLMTextOptions as D, type EvalRow as E, type DefaultLLMTextObjectOptions as F, type GenerateReturn as G, type DefaultLLMStreamOptions as H, type DefaultLLMStreamObjectOptions as I, type LLMTextOptions as J, type LLMTextObjectOptions as K, type LanguageModel as L, Mastra as M, type LLMStreamOptions as N, type OutputType as O, type LLMInnerStreamOptions as P, type LLMStreamObjectOptions as Q, type Config as R, Step as S, type ToolAction as T, type MessageResponse as U, type VercelTool as V, Workflow as W, type MemoryConfig as X, type SharedMemoryConfig as Y, type StepAction as Z, type StepVariableType as _, type ToolsInput as a, type StepGraph as a0, type RetryConfig as a1, type VariableReference as a2, type BaseCondition as a3, type ActionContext as a4, WhenConditionReturnValue as a5, type StepDef as a6, type StepCondition as a7, type StepConfig as a8, type StepResult as a9,
|
|
1356
|
+
export { type StepNode as $, Agent as A, type BaseStructuredOutputType as B, type CoreTool as C, type DefaultLLMTextOptions as D, type EvalRow as E, type DefaultLLMTextObjectOptions as F, type GenerateReturn as G, type DefaultLLMStreamOptions as H, type DefaultLLMStreamObjectOptions as I, type LLMTextOptions as J, type LLMTextObjectOptions as K, type LanguageModel as L, Mastra as M, type LLMStreamOptions as N, type OutputType as O, type LLMInnerStreamOptions as P, type LLMStreamObjectOptions as Q, type Config as R, Step as S, type ToolAction as T, type MessageResponse as U, type VercelTool as V, Workflow as W, type MemoryConfig as X, type SharedMemoryConfig as Y, type StepAction as Z, type StepVariableType as _, type ToolsInput as a, type StepGraph as a0, type RetryConfig as a1, type VariableReference as a2, type BaseCondition as a3, type ActionContext as a4, WhenConditionReturnValue as a5, type StepDef as a6, type StepCondition as a7, type StepConfig as a8, type StepResult as a9, MastraVoice as aA, CompositeVoice as aB, type ToolsetsInput as aC, type AgentGenerateOptions as aD, type AgentStreamOptions as aE, TABLE_WORKFLOW_SNAPSHOT as aF, TABLE_EVALS as aG, TABLE_MESSAGES as aH, TABLE_THREADS as aI, TABLE_TRACES as aJ, type StepsRecord as aa, type WorkflowRunResult as ab, type WorkflowLogMessage as ac, type WorkflowEvent as ad, type ResolverFunctionInput as ae, type ResolverFunctionOutput as af, type SubscriberFunctionOutput as ag, type DependencyCheckOutput as ah, type StepResolverOutput as ai, type WorkflowActors as aj, type WorkflowActionParams as ak, type WorkflowActions as al, type WorkflowState as am, type StepId as an, type ExtractSchemaFromStep as ao, type ExtractStepResult as ap, type StepInputType as aq, type ExtractSchemaType as ar, type PathsToStringProps as as, type WorkflowRunState as at, type WorkflowResumeResult as au, createStep as av, type MastraLanguageModel as aw, type VoiceEventType as ax, type VoiceEventMap as ay, type VoiceConfig as az, type MastraPrimitives as b, MastraMemory as c, type StepExecutionContext as d, type WorkflowContext as e, MastraStorage as f, type TABLE_NAMES as g, type StorageColumn as h, type StorageThreadType as i, type MessageType as j, type StorageGetMessagesArg as k, type AgentConfig as l, type ToolExecutionContext as m, type WorkflowOptions as n, type WorkflowRow as o, type CoreMessage as p, type CoreSystemMessage as q, type CoreAssistantMessage as r, type CoreUserMessage as s, type CoreToolMessage as t, type EmbedResult as u, type EmbedManyResult as v, type StructuredOutputType as w, type StructuredOutputArrayItem as x, type StructuredOutput as y, type StreamReturn as z };
|