@mastra/voice-murf 0.13.2 → 0.13.3

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.
@@ -1537,6 +1537,10 @@ export declare class EmptyResponseBodyError extends AISDKError {
1537
1537
  static isInstance(error: unknown): error is EmptyResponseBodyError;
1538
1538
  }
1539
1539
 
1540
+ declare type EnforcedToolChoice = Extract<LanguageModelV2ToolChoice, {
1541
+ type: 'none';
1542
+ }>;
1543
+
1540
1544
  export declare type ErrorHandler = (error: unknown) => void;
1541
1545
 
1542
1546
  /**
@@ -1578,7 +1582,7 @@ declare interface EventSourceMessage {
1578
1582
  * const eventStream =
1579
1583
  * response.body
1580
1584
  * .pipeThrough(new TextDecoderStream())
1581
- * .pipeThrough(new EventSourceParserStream({terminateOnError: true}))
1585
+ * .pipeThrough(new EventSourceParserStream({onError: 'terminate'}))
1582
1586
  * ```
1583
1587
  *
1584
1588
  * @public
@@ -1587,7 +1591,7 @@ declare class EventSourceParserStream extends TransformStream<
1587
1591
  string,
1588
1592
  EventSourceMessage
1589
1593
  > {
1590
- constructor({ onError, onRetry, onComment }?: StreamOptions);
1594
+ constructor({ onError, onRetry, onComment, maxBufferSize }?: StreamOptions);
1591
1595
  }
1592
1596
 
1593
1597
  /**
@@ -3400,7 +3404,7 @@ declare function injectJsonInstructionIntoMessages({ messages, schema, schemaPre
3400
3404
  }): LanguageModelV2Prompt;
3401
3405
 
3402
3406
  export declare class InvalidArgumentError extends AISDKError {
3403
- private readonly [symbol$c_2];
3407
+ private readonly [symbol$d_2];
3404
3408
  readonly parameter: string;
3405
3409
  readonly value: unknown;
3406
3410
  constructor({ parameter, value, message, }: {
@@ -3462,7 +3466,7 @@ export declare class InvalidResponseDataError extends AISDKError {
3462
3466
  }
3463
3467
 
3464
3468
  export declare class InvalidStreamPartError extends AISDKError {
3465
- private readonly [symbol$b_2];
3469
+ private readonly [symbol$c_2];
3466
3470
  readonly chunk: SingleRequestTextStreamPart<any>;
3467
3471
  constructor({ chunk, message, }: {
3468
3472
  chunk: SingleRequestTextStreamPart<any>;
@@ -3472,7 +3476,7 @@ export declare class InvalidStreamPartError extends AISDKError {
3472
3476
  }
3473
3477
 
3474
3478
  export declare class InvalidToolInputError extends AISDKError {
3475
- private readonly [symbol$e];
3479
+ private readonly [symbol$f];
3476
3480
  readonly toolName: string;
3477
3481
  readonly toolInput: string;
3478
3482
  constructor({ toolInput, toolName, cause, message, }: {
@@ -4663,7 +4667,7 @@ export declare class NoContentGeneratedError extends AISDKError {
4663
4667
  - The model generated a response that could not be parsed.
4664
4668
  */
4665
4669
  export declare class NoImageGeneratedError extends AISDKError {
4666
- private readonly [symbol$a];
4670
+ private readonly [symbol$b_2];
4667
4671
  /**
4668
4672
  The response metadata for each call.
4669
4673
  */
@@ -4688,7 +4692,7 @@ export declare class NoImageGeneratedError extends AISDKError {
4688
4692
  - `text`: The text that was generated by the model. This can be the raw text or the tool call text, depending on the model.
4689
4693
  */
4690
4694
  export declare class NoObjectGeneratedError extends AISDKError {
4691
- private readonly [symbol$9_2];
4695
+ private readonly [symbol$a];
4692
4696
  /**
4693
4697
  The text that was generated by the model. This can be the raw text or the tool call text, depending on the model.
4694
4698
  */
@@ -4720,7 +4724,7 @@ export declare class NoObjectGeneratedError extends AISDKError {
4720
4724
  Thrown when no LLM output was generated, e.g. because of errors.
4721
4725
  */
4722
4726
  export declare class NoOutputGeneratedError extends AISDKError {
4723
- private readonly [symbol$8_2];
4727
+ private readonly [symbol$9_2];
4724
4728
  constructor({ message, cause, }?: {
4725
4729
  message?: string;
4726
4730
  cause?: Error;
@@ -4732,7 +4736,7 @@ export declare class NoOutputGeneratedError extends AISDKError {
4732
4736
  Thrown when no output type is specified and output-related methods are called.
4733
4737
  */
4734
4738
  export declare class NoOutputSpecifiedError extends AISDKError {
4735
- private readonly [symbol$7_2];
4739
+ private readonly [symbol$8_2];
4736
4740
  constructor({ message }?: {
4737
4741
  message?: string;
4738
4742
  });
@@ -4786,7 +4790,7 @@ export declare class NoSuchProviderError extends NoSuchModelError {
4786
4790
  }
4787
4791
 
4788
4792
  export declare class NoSuchToolError extends AISDKError {
4789
- private readonly [symbol$d_2];
4793
+ private readonly [symbol$e];
4790
4794
  readonly toolName: string;
4791
4795
  readonly availableTools: string[] | undefined;
4792
4796
  constructor({ toolName, availableTools, message, }: {
@@ -7005,6 +7009,16 @@ declare interface StreamOptions {
7005
7009
  * @param comment - The comment encountered in the stream.
7006
7010
  */
7007
7011
  onComment?: ((comment: string) => void) | undefined;
7012
+ /**
7013
+ * Maximum number of characters the parser is allowed to buffer across calls to `feed()`.
7014
+ * See {@link ParserConfig.maxBufferSize} for details.
7015
+ *
7016
+ * When the limit is exceeded, the stream is always errored (regardless of the `onError`
7017
+ * setting) since the underlying parser is unrecoverable without a `reset()`.
7018
+ *
7019
+ * @defaultValue `undefined` (unbounded)
7020
+ */
7021
+ maxBufferSize?: number | undefined;
7008
7022
  }
7009
7023
 
7010
7024
  /**
@@ -7489,6 +7503,8 @@ declare const symbol$d_2: unique symbol;
7489
7503
 
7490
7504
  declare const symbol$e: unique symbol;
7491
7505
 
7506
+ declare const symbol$f: unique symbol;
7507
+
7492
7508
  declare const symbol: unique symbol;
7493
7509
 
7494
7510
  declare const symbol_2: unique symbol;
@@ -7855,7 +7871,7 @@ export declare interface ToolCallPart {
7855
7871
  }
7856
7872
 
7857
7873
  export declare class ToolCallRepairError extends AISDKError {
7858
- private readonly [symbol$6_2];
7874
+ private readonly [symbol$7_2];
7859
7875
  readonly originalError: NoSuchToolError | InvalidToolInputError;
7860
7876
  constructor({ cause, originalError, message, }: {
7861
7877
  message?: string;
@@ -7902,6 +7918,42 @@ export declare type ToolChoice<TOOLS extends Record<string, unknown>> = 'auto' |
7902
7918
  toolName: Extract<keyof TOOLS, string>;
7903
7919
  };
7904
7920
 
7921
+ /**
7922
+ * Thrown when a model response does not satisfy an enforced tool choice.
7923
+ */
7924
+ export declare class ToolChoiceViolationError extends AISDKError {
7925
+ private readonly [symbol$6_2];
7926
+ /**
7927
+ * The tool choice that the model response did not satisfy.
7928
+ */
7929
+ readonly toolChoice: EnforcedToolChoice;
7930
+ /**
7931
+ * Reason why the model finished generating the response.
7932
+ */
7933
+ readonly finishReason: FinishReason;
7934
+ /**
7935
+ * The provider that returned the response.
7936
+ */
7937
+ readonly provider: string;
7938
+ /**
7939
+ * The model that returned the response.
7940
+ */
7941
+ readonly modelId: string;
7942
+ /**
7943
+ * The normalized content returned by the model.
7944
+ */
7945
+ readonly content: Array<LanguageModelV2Content>;
7946
+ constructor({ toolChoice, finishReason, provider, modelId, content, message, }: {
7947
+ toolChoice: EnforcedToolChoice;
7948
+ finishReason: FinishReason;
7949
+ provider: string;
7950
+ modelId: string;
7951
+ content: Array<LanguageModelV2Content>;
7952
+ message?: string;
7953
+ });
7954
+ static isInstance(error: unknown): error is ToolChoiceViolationError;
7955
+ }
7956
+
7905
7957
  /**
7906
7958
  Content of a tool message. It is an array of tool result parts.
7907
7959
  */
@@ -8987,5 +9039,5 @@ export declare function zodSchema<OBJECT>(zodSchema: z4.core.$ZodType<OBJECT, an
8987
9039
  }): Schema<OBJECT>;
8988
9040
 
8989
9041
  export { }
8990
- export { GatewayProviderSettings as GatewayProviderSettings, GatewayProvider as GatewayProvider, ParseResult as ParseResult, FlexibleValidator as FlexibleValidator, ValidationResult as ValidationResult, LanguageModelV2ToolResultOutput as LanguageModelV2ToolResultOutput, ProviderOptions as ProviderOptions, ReasoningPart as ReasoningPart, ToolOutputProperties as ToolOutputProperties, LanguageModelV2ToolResultPart as LanguageModelV2ToolResultPart, FlexibleSchema as FlexibleSchema, ImageModelV2CallWarning as ImageModelV2CallWarning, SpeechModelV2CallWarning as SpeechModelV2CallWarning, TranscriptionModelV2CallWarning as TranscriptionModelV2CallWarning, AttributeValue as AttributeValue, Tracer as Tracer, EmbeddingModelV2Embedding as EmbeddingModelV2Embedding, ImageModelV2ProviderMetadata as ImageModelV2ProviderMetadata, GlobalProviderModelId as GlobalProviderModelId, LanguageModelV2FinishReason as LanguageModelV2FinishReason, LanguageModelV2CallWarning as LanguageModelV2CallWarning, LanguageModelV2Middleware as LanguageModelV2Middleware, SharedV2ProviderMetadata as SharedV2ProviderMetadata, LanguageModelV2Usage as LanguageModelV2Usage, Source as Source, ResponseMessage as ResponseMessage, DeepPartialInternal as DeepPartialInternal, LanguageModelV2ToolCall as LanguageModelV2ToolCall, StreamTextOnAbortCallback as StreamTextOnAbortCallback, ValueOf as ValueOf, asUITool as asUITool, _ai_sdk_provider_utils as _ai_sdk_provider_utils, DataUIMessageChunk as DataUIMessageChunk, ConsumeStreamOptions as ConsumeStreamOptions, InferAgentTools as InferAgentTools, SingleRequestTextStreamPart as SingleRequestTextStreamPart, RetryErrorReason as RetryErrorReason, InferSchema as InferSchema, Job as Job, StreamObjectOnErrorCallback as StreamObjectOnErrorCallback, JSONValue_2 as JSONValue_2, LanguageModelV2CallOptions as LanguageModelV2CallOptions, LanguageModelV2 as LanguageModelV2, EmbeddingModelV2 as EmbeddingModelV2, ImageModelV2 as ImageModelV2, TranscriptionModelV2 as TranscriptionModelV2, SpeechModelV2 as SpeechModelV2, ExtractModelId as ExtractModelId, ExtractLiteralUnion as ExtractLiteralUnion, ProviderV2 as ProviderV2, getOriginalFetch as getOriginalFetch, UIMessageStreamResponseInit as UIMessageStreamResponseInit, InferUIMessageToolCall as InferUIMessageToolCall, Validator as Validator, StandardSchemaV1 as StandardSchemaV1, UIDataTypesToSchemas as UIDataTypesToSchemas, InferUIMessageData as InferUIMessageData, InferUIMessageMetadata as InferUIMessageMetadata, InferUIMessageTools as InferUIMessageTools, Resolvable as Resolvable, FetchFunction as FetchFunction, ValidateUIMessagesOptions as ValidateUIMessagesOptions };
8991
- export { EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL, schemaSymbol, symbol$1, symbol$1_2, symbol$2, symbol$2_2, symbol$3, symbol$3_2, symbol$4, symbol$4_2, symbol$5, symbol$5_2, symbol$6, symbol$6_2, symbol$7, symbol$7_2, symbol$8, symbol$8_2, symbol$9, symbol$9_2, symbol$a, symbol$b, symbol$b_2, symbol$c, symbol$c_2, symbol$d, symbol$d_2, symbol$e, symbol, symbol_2, symbol_3, validatorSymbol };
9042
+ export { GatewayProviderSettings as GatewayProviderSettings, GatewayProvider as GatewayProvider, ParseResult as ParseResult, FlexibleValidator as FlexibleValidator, ValidationResult as ValidationResult, LanguageModelV2ToolResultOutput as LanguageModelV2ToolResultOutput, ProviderOptions as ProviderOptions, ReasoningPart as ReasoningPart, ToolOutputProperties as ToolOutputProperties, LanguageModelV2ToolResultPart as LanguageModelV2ToolResultPart, FlexibleSchema as FlexibleSchema, ImageModelV2CallWarning as ImageModelV2CallWarning, SpeechModelV2CallWarning as SpeechModelV2CallWarning, TranscriptionModelV2CallWarning as TranscriptionModelV2CallWarning, AttributeValue as AttributeValue, Tracer as Tracer, EmbeddingModelV2Embedding as EmbeddingModelV2Embedding, ImageModelV2ProviderMetadata as ImageModelV2ProviderMetadata, GlobalProviderModelId as GlobalProviderModelId, LanguageModelV2FinishReason as LanguageModelV2FinishReason, LanguageModelV2CallWarning as LanguageModelV2CallWarning, LanguageModelV2Middleware as LanguageModelV2Middleware, SharedV2ProviderMetadata as SharedV2ProviderMetadata, LanguageModelV2Usage as LanguageModelV2Usage, Source as Source, ResponseMessage as ResponseMessage, DeepPartialInternal as DeepPartialInternal, LanguageModelV2ToolCall as LanguageModelV2ToolCall, StreamTextOnAbortCallback as StreamTextOnAbortCallback, ValueOf as ValueOf, asUITool as asUITool, _ai_sdk_provider_utils as _ai_sdk_provider_utils, DataUIMessageChunk as DataUIMessageChunk, ConsumeStreamOptions as ConsumeStreamOptions, InferAgentTools as InferAgentTools, SingleRequestTextStreamPart as SingleRequestTextStreamPart, EnforcedToolChoice as EnforcedToolChoice, LanguageModelV2Content as LanguageModelV2Content, RetryErrorReason as RetryErrorReason, InferSchema as InferSchema, Job as Job, StreamObjectOnErrorCallback as StreamObjectOnErrorCallback, JSONValue_2 as JSONValue_2, LanguageModelV2CallOptions as LanguageModelV2CallOptions, LanguageModelV2 as LanguageModelV2, EmbeddingModelV2 as EmbeddingModelV2, ImageModelV2 as ImageModelV2, TranscriptionModelV2 as TranscriptionModelV2, SpeechModelV2 as SpeechModelV2, ExtractModelId as ExtractModelId, ExtractLiteralUnion as ExtractLiteralUnion, ProviderV2 as ProviderV2, getOriginalFetch as getOriginalFetch, UIMessageStreamResponseInit as UIMessageStreamResponseInit, InferUIMessageToolCall as InferUIMessageToolCall, Validator as Validator, StandardSchemaV1 as StandardSchemaV1, UIDataTypesToSchemas as UIDataTypesToSchemas, InferUIMessageData as InferUIMessageData, InferUIMessageMetadata as InferUIMessageMetadata, InferUIMessageTools as InferUIMessageTools, Resolvable as Resolvable, FetchFunction as FetchFunction, ValidateUIMessagesOptions as ValidateUIMessagesOptions };
9043
+ export { EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL, schemaSymbol, symbol$1, symbol$1_2, symbol$2, symbol$2_2, symbol$3, symbol$3_2, symbol$4, symbol$4_2, symbol$5, symbol$5_2, symbol$6, symbol$6_2, symbol$7, symbol$7_2, symbol$8, symbol$8_2, symbol$9, symbol$9_2, symbol$a, symbol$b, symbol$b_2, symbol$c, symbol$c_2, symbol$d, symbol$d_2, symbol$e, symbol$f, symbol, symbol_2, symbol_3, validatorSymbol };
@@ -1,6 +1,5 @@
1
- import { i as IMastraLogger, u as RegisteredLogger } from "../index-Biaf3BmX.js";
2
- //#region src/base/MastraBase.d.ts
3
- declare class MastraBase {
1
+ import { i as IMastraLogger, u as RegisteredLogger } from "../index-TNVgGNjs.js";
2
+ export declare class MastraBase {
4
3
  #private;
5
4
  component: RegisteredLogger;
6
5
  protected logger: IMastraLogger;
@@ -26,6 +25,4 @@ declare class MastraBase {
26
25
  */
27
26
  __setLogger(logger: IMastraLogger): void;
28
27
  }
29
- //#endregion
30
- export { MastraBase };
31
28
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,4 @@
1
1
  import { Transform } from "stream";
2
- //#region src/logger/adapter.d.ts
3
2
  /**
4
3
  * OpenTelemetry-compatible trace correlation fields, injected at the top
5
4
  * level of a logger's native record.
@@ -91,8 +90,6 @@ declare function exportTrackedException(ctx: LoggerAdapterContext | undefined, e
91
90
  * so the derived record preserves all context from the native call.
92
91
  */
93
92
  declare function buildLogRecordData(args: unknown[]): Record<string, unknown> | undefined;
94
- //#endregion
95
- //#region src/logger/index.d.ts
96
93
  declare const RegisteredLogger: {
97
94
  readonly AGENT: 'AGENT';
98
95
  readonly OBSERVABILITY: 'OBSERVABILITY';
@@ -314,6 +311,5 @@ declare class ConsoleLogger extends MastraLogger {
314
311
  hasMore: boolean;
315
312
  }>;
316
313
  }
317
- //#endregion
318
314
  export { buildLogRecordData as _, LogFilter as a, LoggerTransport as c, createCustomTransport as d, AdaptableLogger as f, TraceFields as g, LoggerAdapterOptions as h, IMastraLogger as i, MastraLogger as l, LoggerAdapterContext as m, ConsoleLogger as n, LogFilterContext as o, AdapterLogSink as p, ConsoleLoggerOptions as r, LogLevel as s, BaseLogMessage as t, RegisteredLogger as u, exportTrackedException as v, isAdaptableLogger as y };
319
- //# sourceMappingURL=index-Biaf3BmX.d.ts.map
315
+ //# sourceMappingURL=index-TNVgGNjs.d.ts.map
@@ -1,4 +1,3 @@
1
- //#region src/request-context/index.d.ts
2
1
  type RecordToTuple<T> = { [K in keyof T]: [K, T[K]]; }[keyof T][];
3
2
  /**
4
3
  * Reserved key for setting resourceId from middleware.
@@ -12,7 +11,7 @@ type RecordToTuple<T> = { [K in keyof T]: [K, T[K]]; }[keyof T][];
12
11
  * requestContext.set(MASTRA_RESOURCE_ID_KEY, authenticatedUser.id);
13
12
  * ```
14
13
  */
15
- declare const MASTRA_RESOURCE_ID_KEY = "mastra__resourceId";
14
+ export declare const MASTRA_RESOURCE_ID_KEY = "mastra__resourceId";
16
15
  /**
17
16
  * Reserved key for setting threadId from middleware.
18
17
  * When set in RequestContext, this takes precedence over client-provided values
@@ -25,7 +24,7 @@ declare const MASTRA_RESOURCE_ID_KEY = "mastra__resourceId";
25
24
  * requestContext.set(MASTRA_THREAD_ID_KEY, threadId);
26
25
  * ```
27
26
  */
28
- declare const MASTRA_THREAD_ID_KEY = "mastra__threadId";
27
+ export declare const MASTRA_THREAD_ID_KEY = "mastra__threadId";
29
28
  /**
30
29
  * Reserved key for setting agent scopes from middleware.
31
30
  *
@@ -46,7 +45,7 @@ declare const MASTRA_THREAD_ID_KEY = "mastra__threadId";
46
45
  * requestContext.set(MASTRA_SCOPES_KEY, [`org:${user.orgId}`, `resource:${user.id}`]);
47
46
  * ```
48
47
  */
49
- declare const MASTRA_SCOPES_KEY = "mastra__scopes";
48
+ export declare const MASTRA_SCOPES_KEY = "mastra__scopes";
50
49
  /**
51
50
  * Reserved key for storing version overrides on RequestContext.
52
51
  * When set, sub-agent delegation resolves versioned agents from these overrides.
@@ -58,13 +57,13 @@ declare const MASTRA_SCOPES_KEY = "mastra__scopes";
58
57
  * });
59
58
  * ```
60
59
  */
61
- declare const MASTRA_VERSIONS_KEY = "mastra__versions";
60
+ export declare const MASTRA_VERSIONS_KEY = "mastra__versions";
62
61
  /**
63
62
  * Reserved key for storing the raw auth token from the incoming request.
64
63
  * Used by the editor to forward authentication when connecting to MCP servers
65
64
  * that require the same auth as the Mastra server itself.
66
65
  */
67
- declare const MASTRA_AUTH_TOKEN_KEY = "mastra__authToken";
66
+ export declare const MASTRA_AUTH_TOKEN_KEY = "mastra__authToken";
68
67
  /**
69
68
  * Reserved key carrying a delegating agent's `MastraMemory` into a delegated
70
69
  * run, so a sub-agent without its own memory can persist that run's transcript
@@ -75,7 +74,7 @@ declare const MASTRA_AUTH_TOKEN_KEY = "mastra__authToken";
75
74
  * from the durable request-context snapshot and is not copied into further
76
75
  * nested delegated runs. Internal to delegation — do not set it yourself.
77
76
  */
78
- declare const MASTRA_INHERITED_MEMORY_KEY = "mastra__inheritedMemory";
77
+ export declare const MASTRA_INHERITED_MEMORY_KEY = "mastra__inheritedMemory";
79
78
  /**
80
79
  * Reserved key naming who sent a user message: `{ id, name?, avatarUrl? }`.
81
80
  * Set by the host that authenticated the request; the agent-controller copies
@@ -88,7 +87,7 @@ declare const MASTRA_INHERITED_MEMORY_KEY = "mastra__inheritedMemory";
88
87
  * requestContext.setRaw(MASTRA_MESSAGE_AUTHOR_KEY, { id: user.id, name: user.name, avatarUrl: user.avatarUrl });
89
88
  * ```
90
89
  */
91
- declare const MASTRA_MESSAGE_AUTHOR_KEY = "mastra__messageAuthor";
90
+ export declare const MASTRA_MESSAGE_AUTHOR_KEY = "mastra__messageAuthor";
92
91
  /**
93
92
  * Whether a request-context key is reserved for Mastra itself.
94
93
  *
@@ -98,18 +97,18 @@ declare const MASTRA_MESSAGE_AUTHOR_KEY = "mastra__messageAuthor";
98
97
  * Reserved keys are framework state rather than caller-provided data, so they
99
98
  * are left out of span serialization.
100
99
  */
101
- declare function isReservedRequestContextKey(key: string): boolean;
102
- type VersionSelector = {
100
+ export declare function isReservedRequestContextKey(key: string): boolean;
101
+ export type VersionSelector = {
103
102
  versionId: string;
104
103
  } | {
105
104
  status: 'draft' | 'published';
106
105
  };
107
- type VersionOverrides = {
106
+ export type VersionOverrides = {
108
107
  agents?: Record<string, VersionSelector>;
109
108
  /** Fallback status for sub-agents (and future primitives) without an explicit entry. */
110
109
  defaultStatus?: 'draft' | 'published';
111
110
  };
112
- declare function mergeVersionOverrides(base?: VersionOverrides, overrides?: VersionOverrides): VersionOverrides | undefined;
111
+ export declare function mergeVersionOverrides(base?: VersionOverrides, overrides?: VersionOverrides): VersionOverrides | undefined;
113
112
  /**
114
113
  * Carries typed, request-specific values through agents, tools, and workflows.
115
114
  * Pass the instance as `requestContext` when starting an operation.
@@ -131,7 +130,7 @@ declare function mergeVersionOverrides(base?: VersionOverrides, overrides?: Vers
131
130
  * @see [Request context documentation](https://mastra.ai/docs/server/request-context)
132
131
  * if packaged docs are unavailable.
133
132
  */
134
- declare class RequestContext<Values extends Record<string, any> | unknown = unknown> {
133
+ export declare class RequestContext<Values extends Record<string, any> | unknown = unknown> {
135
134
  private registry;
136
135
  constructor(iterable?: Values extends Record<string, any> ? RecordToTuple<Partial<Values>> : Iterable<readonly [string, unknown]>);
137
136
  /**
@@ -281,6 +280,5 @@ declare class RequestContext<Values extends Record<string, any> | unknown = unkn
281
280
  */
282
281
  get all(): Values extends Record<string, any> ? Values : Record<string, any>;
283
282
  }
284
- //#endregion
285
- export { MASTRA_AUTH_TOKEN_KEY, MASTRA_INHERITED_MEMORY_KEY, MASTRA_MESSAGE_AUTHOR_KEY, MASTRA_RESOURCE_ID_KEY, MASTRA_SCOPES_KEY, MASTRA_THREAD_ID_KEY, MASTRA_VERSIONS_KEY, RequestContext, VersionOverrides, VersionSelector, isReservedRequestContextKey, mergeVersionOverrides };
283
+ export {};
286
284
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,2 @@
1
- //#region src/types/index.d.ts
2
- type ToolsInput = Record<string, any>;
3
- //#endregion
4
- export { ToolsInput };
1
+ export type ToolsInput = Record<string, any>;
5
2
  //# sourceMappingURL=index.d.ts.map
@@ -3,7 +3,7 @@ name: mastra-voice-murf
3
3
  description: Documentation for @mastra/voice-murf. Use when working with @mastra/voice-murf APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/voice-murf"
6
- version: "0.13.2"
6
+ version: "0.13.3"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.13.2",
2
+ "version": "0.13.3",
3
3
  "package": "@mastra/voice-murf",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -53,7 +53,7 @@ const voices = await voice.getSpeakers()
53
53
 
54
54
  **speechModel.name** (`'GEN1' | 'GEN2'`): The Murf model generation to use
55
55
 
56
- **speechModel.apiKey** (`string`): Murf API key. Falls back to MURF\_API\_KEY environment variable
56
+ **speechModel.apiKey** (`string`): Murf API key. Falls back to MURF_API_KEY environment variable
57
57
 
58
58
  **speechModel.properties** (`object`): Default properties for all speech synthesis requests
59
59
 
@@ -20,7 +20,7 @@ const voiceAgent = new Agent({
20
20
  id: 'voice-agent',
21
21
  name: 'Voice Agent',
22
22
  instructions: 'You are a voice assistant that can help users with their tasks.',
23
- model: 'openai/gpt-5.6-sol',
23
+ model: 'openai/gpt-6.1-sol',
24
24
  voice: new OpenAIVoice(),
25
25
  })
26
26
  ```
@@ -44,7 +44,7 @@ const voiceAgent = new Agent({
44
44
  id: 'voice-agent',
45
45
  name: 'Voice Agent',
46
46
  instructions: 'You are a voice assistant that can help users with their tasks.',
47
- model: 'openai/gpt-5.6-sol',
47
+ model: 'openai/gpt-6.1-sol',
48
48
  voice: new OpenAIVoice(),
49
49
  })
50
50
 
@@ -72,7 +72,7 @@ const voiceAgent = new Agent({
72
72
  id: 'voice-agent',
73
73
  name: 'Voice Agent',
74
74
  instructions: 'You are a voice assistant that can help users with their tasks.',
75
- model: 'openai/gpt-5.6-sol',
75
+ model: 'openai/gpt-6.1-sol',
76
76
  voice: new AzureVoice(),
77
77
  })
78
78
 
@@ -99,7 +99,7 @@ const voiceAgent = new Agent({
99
99
  id: 'voice-agent',
100
100
  name: 'Voice Agent',
101
101
  instructions: 'You are a voice assistant that can help users with their tasks.',
102
- model: 'openai/gpt-5.6-sol',
102
+ model: 'openai/gpt-6.1-sol',
103
103
  voice: new ElevenLabsVoice(),
104
104
  })
105
105
 
@@ -126,7 +126,7 @@ const voiceAgent = new Agent({
126
126
  id: 'voice-agent',
127
127
  name: 'Voice Agent',
128
128
  instructions: 'You are a voice assistant that can help users with their tasks.',
129
- model: 'openai/gpt-5.6-sol',
129
+ model: 'openai/gpt-6.1-sol',
130
130
  voice: new GoogleVoice(),
131
131
  })
132
132
 
@@ -153,7 +153,7 @@ const voiceAgent = new Agent({
153
153
  id: 'voice-agent',
154
154
  name: 'Voice Agent',
155
155
  instructions: 'You are a voice assistant that can help users with their tasks.',
156
- model: 'openai/gpt-5.6-sol',
156
+ model: 'openai/gpt-6.1-sol',
157
157
  voice: new CloudflareVoice(),
158
158
  })
159
159
 
@@ -180,7 +180,7 @@ const voiceAgent = new Agent({
180
180
  id: 'voice-agent',
181
181
  name: 'Voice Agent',
182
182
  instructions: 'You are a voice assistant that can help users with their tasks.',
183
- model: 'openai/gpt-5.6-sol',
183
+ model: 'openai/gpt-6.1-sol',
184
184
  voice: new DeepgramVoice(),
185
185
  })
186
186
 
@@ -207,7 +207,7 @@ const voiceAgent = new Agent({
207
207
  id: 'voice-agent',
208
208
  name: 'Voice Agent',
209
209
  instructions: 'You are a voice assistant that can help users with their tasks.',
210
- model: 'openai/gpt-5.6-sol',
210
+ model: 'openai/gpt-6.1-sol',
211
211
  voice: new InworldVoice(),
212
212
  })
213
213
 
@@ -234,7 +234,7 @@ const voiceAgent = new Agent({
234
234
  id: 'voice-agent',
235
235
  name: 'Voice Agent',
236
236
  instructions: 'You are a voice assistant that can help users with their tasks.',
237
- model: 'openai/gpt-5.6-sol',
237
+ model: 'openai/gpt-6.1-sol',
238
238
  voice: new SpeechifyVoice(),
239
239
  })
240
240
 
@@ -261,7 +261,7 @@ const voiceAgent = new Agent({
261
261
  id: 'voice-agent',
262
262
  name: 'Voice Agent',
263
263
  instructions: 'You are a voice assistant that can help users with their tasks.',
264
- model: 'openai/gpt-5.6-sol',
264
+ model: 'openai/gpt-6.1-sol',
265
265
  voice: new SarvamVoice(),
266
266
  })
267
267
 
@@ -288,7 +288,7 @@ const voiceAgent = new Agent({
288
288
  id: 'voice-agent',
289
289
  name: 'Voice Agent',
290
290
  instructions: 'You are a voice assistant that can help users with their tasks.',
291
- model: 'openai/gpt-5.6-sol',
291
+ model: 'openai/gpt-6.1-sol',
292
292
  voice: new MurfVoice(),
293
293
  })
294
294
 
@@ -323,7 +323,7 @@ const voiceAgent = new Agent({
323
323
  id: 'voice-agent',
324
324
  name: 'Voice Agent',
325
325
  instructions: 'You are a voice assistant that can help users with their tasks.',
326
- model: 'openai/gpt-5.6-sol',
326
+ model: 'openai/gpt-6.1-sol',
327
327
  voice: new OpenAIVoice(),
328
328
  })
329
329
 
@@ -352,7 +352,7 @@ const voiceAgent = new Agent({
352
352
  id: 'voice-agent',
353
353
  name: 'Voice Agent',
354
354
  instructions: 'You are a voice assistant that can help users with their tasks.',
355
- model: 'openai/gpt-5.6-sol',
355
+ model: 'openai/gpt-6.1-sol',
356
356
  voice: new AzureVoice(),
357
357
  })
358
358
 
@@ -380,7 +380,7 @@ const voiceAgent = new Agent({
380
380
  id: 'voice-agent',
381
381
  name: 'Voice Agent',
382
382
  instructions: 'You are a voice assistant that can help users with their tasks.',
383
- model: 'openai/gpt-5.6-sol',
383
+ model: 'openai/gpt-6.1-sol',
384
384
  voice: new ElevenLabsVoice(),
385
385
  })
386
386
 
@@ -408,7 +408,7 @@ const voiceAgent = new Agent({
408
408
  id: 'voice-agent',
409
409
  name: 'Voice Agent',
410
410
  instructions: 'You are a voice assistant that can help users with their tasks.',
411
- model: 'openai/gpt-5.6-sol',
411
+ model: 'openai/gpt-6.1-sol',
412
412
  voice: new GoogleVoice(),
413
413
  })
414
414
 
@@ -436,7 +436,7 @@ const voiceAgent = new Agent({
436
436
  id: 'voice-agent',
437
437
  name: 'Voice Agent',
438
438
  instructions: 'You are a voice assistant that can help users with their tasks.',
439
- model: 'openai/gpt-5.6-sol',
439
+ model: 'openai/gpt-6.1-sol',
440
440
  voice: new CloudflareVoice(),
441
441
  })
442
442
 
@@ -464,7 +464,7 @@ const voiceAgent = new Agent({
464
464
  id: 'voice-agent',
465
465
  name: 'Voice Agent',
466
466
  instructions: 'You are a voice assistant that can help users with their tasks.',
467
- model: 'openai/gpt-5.6-sol',
467
+ model: 'openai/gpt-6.1-sol',
468
468
  voice: new DeepgramVoice(),
469
469
  })
470
470
 
@@ -492,7 +492,7 @@ const voiceAgent = new Agent({
492
492
  id: 'voice-agent',
493
493
  name: 'Voice Agent',
494
494
  instructions: 'You are a voice assistant that can help users with their tasks.',
495
- model: 'openai/gpt-5.6-sol',
495
+ model: 'openai/gpt-6.1-sol',
496
496
  voice: new InworldVoice(),
497
497
  })
498
498
 
@@ -520,7 +520,7 @@ const voiceAgent = new Agent({
520
520
  id: 'voice-agent',
521
521
  name: 'Voice Agent',
522
522
  instructions: 'You are a voice assistant that can help users with their tasks.',
523
- model: 'openai/gpt-5.6-sol',
523
+ model: 'openai/gpt-6.1-sol',
524
524
  voice: new SarvamVoice(),
525
525
  })
526
526
 
@@ -552,7 +552,7 @@ const voiceAgent = new Agent({
552
552
  id: 'voice-agent',
553
553
  name: 'Voice Agent',
554
554
  instructions: 'You are a voice assistant that can help users with their tasks.',
555
- model: 'openai/gpt-5.6-sol',
555
+ model: 'openai/gpt-6.1-sol',
556
556
  voice: new OpenAIRealtimeVoice(),
557
557
  })
558
558
 
@@ -582,7 +582,7 @@ const voiceAgent = new Agent({
582
582
  id: 'voice-agent',
583
583
  name: 'Voice Agent',
584
584
  instructions: 'You are a voice assistant that can help users with their tasks.',
585
- model: 'openai/gpt-5.6-sol',
585
+ model: 'openai/gpt-6.1-sol',
586
586
  voice: new GeminiLiveVoice({
587
587
  // Live API mode
588
588
  apiKey: process.env.GOOGLE_API_KEY,
@@ -631,7 +631,7 @@ const voiceAgent = new Agent({
631
631
  id: 'voice-agent',
632
632
  name: 'Voice Agent',
633
633
  instructions: 'You are a voice assistant that can help users with their tasks.',
634
- model: 'openai/gpt-5.6-sol',
634
+ model: 'openai/gpt-6.1-sol',
635
635
  voice: new NovaSonicVoice({
636
636
  region: 'us-east-1',
637
637
  speaker: 'matthew',
@@ -674,7 +674,7 @@ const voiceAgent = new Agent({
674
674
  id: 'voice-agent',
675
675
  name: 'Voice Agent',
676
676
  instructions: 'You are a voice assistant that can help users with their tasks.',
677
- model: 'openai/gpt-5.6-sol',
677
+ model: 'openai/gpt-6.1-sol',
678
678
  voice: new InworldRealtimeVoice({
679
679
  apiKey: process.env.INWORLD_API_KEY,
680
680
  model: 'inworld/models/gemma-4-26b-a4b-it',
@@ -1120,7 +1120,7 @@ const voiceAgent = new Agent({
1120
1120
  id: 'aisdk-voice-agent',
1121
1121
  name: 'AI SDK Voice Agent',
1122
1122
  instructions: 'You are a helpful assistant with voice capabilities.',
1123
- model: 'openai/gpt-5.6-sol',
1123
+ model: 'openai/gpt-6.1-sol',
1124
1124
  voice,
1125
1125
  })
1126
1126
  ```
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let stream = require("stream");
3
- //#region ../../packages/_internal-core/dist/logger/index.js
3
+ // ../../packages/_internal-core/dist/logger/index.js
4
4
  /**
5
5
  * Export a tracked exception through the adapter sink, mirroring the
6
6
  * DualLogger dual-write shape (`errorId`/`domain`/`category`/`details`/`cause`
@@ -233,8 +233,7 @@ var ConsoleLogger = class ConsoleLogger extends MastraLogger {
233
233
  };
234
234
  }
235
235
  };
236
- //#endregion
237
- //#region ../../packages/_internal-core/dist/base/index.js
236
+ // ../../packages/_internal-core/dist/base/index.js
238
237
  var MastraBase = class {
239
238
  component = RegisteredLogger.LLM;
240
239
  logger;
@@ -268,8 +267,7 @@ var MastraBase = class {
268
267
  this.logger = "child" in logger && typeof logger.child === "function" ? logger.child({ component: this.component }) : logger;
269
268
  }
270
269
  };
271
- //#endregion
272
- //#region ../../packages/_internals/voice/dist/aisdk-C_K-VCwq.js
270
+ // ../../packages/_internals/voice/dist/aisdk-c08VRfTf.js
273
271
  var MastraVoice = class extends MastraBase {
274
272
  listeningModel;
275
273
  speechModel;
@@ -373,8 +371,7 @@ var MastraVoice = class extends MastraBase {
373
371
  return Promise.resolve({ enabled: false });
374
372
  }
375
373
  };
376
- //#endregion
377
- //#region src/voices.ts
374
+ // src/voices.ts
378
375
  /**
379
376
  * List of available voices for Murf TTS
380
377
  */
@@ -519,8 +516,7 @@ const MURF_VOICES = [
519
516
  "zh-CN-tao",
520
517
  "en-US-molly"
521
518
  ];
522
- //#endregion
523
- //#region src/index.ts
519
+ // src/index.ts
524
520
  const DEFAULT_RETRY_COUNT = 2;
525
521
  const RETRY_STATUS_CODES = /* @__PURE__ */ new Set([
526
522
  408,
@@ -634,7 +630,6 @@ var MurfVoice = class extends MastraVoice {
634
630
  }));
635
631
  }
636
632
  };
637
- //#endregion
638
633
  exports.MurfVoice = MurfVoice;
639
634
 
640
635
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["stream","PassThrough"],"sources":["../../../packages/_internal-core/dist/logger/index.js","../../../packages/_internal-core/dist/base/index.js","../../../packages/_internals/voice/dist/aisdk-C_K-VCwq.js","../src/voices.ts","../src/index.ts"],"sourcesContent":["import { Transform } from \"stream\";\n//#region src/logger/adapter.ts\nfunction isAdaptableLogger(logger) {\n\treturn typeof logger.__attachObservability === \"function\";\n}\n/**\n* Export a tracked exception through the adapter sink, mirroring the\n* DualLogger dual-write shape (`errorId`/`domain`/`category`/`details`/`cause`\n* when present on a MastraError-like value). Never throws into the caller.\n*/\nfunction exportTrackedException(ctx, error, metadata) {\n\tif (!ctx?.options.export) return;\n\ttry {\n\t\tconst mastraError = error;\n\t\tctx.getLogSink()?.error(error.message, {\n\t\t\t...mastraError.id !== void 0 ? { errorId: mastraError.id } : {},\n\t\t\t...mastraError.domain !== void 0 ? { domain: mastraError.domain } : {},\n\t\t\t...mastraError.category !== void 0 ? { category: mastraError.category } : {},\n\t\t\t...mastraError.details !== void 0 ? { details: mastraError.details } : {},\n\t\t\t...error.cause instanceof Error ? { cause: error.cause.message } : {},\n\t\t\t...metadata\n\t\t});\n\t} catch {}\n}\n/**\n* Adapt IMastraLogger's variadic args into the structured `data` payload of\n* an exported log record. Extracts the first plain object as data,\n* serializes an Error arg, and collects remaining primitives under `args`\n* so the derived record preserves all context from the native call.\n*/\nfunction buildLogRecordData(args) {\n\tconst objectData = args.find((arg) => arg !== null && typeof arg === \"object\" && !Array.isArray(arg) && !(arg instanceof Error));\n\tconst errorArg = args.find((arg) => arg instanceof Error);\n\tconst extraArgs = args.filter((arg) => arg !== objectData && arg !== errorArg);\n\tif (!objectData && !errorArg && extraArgs.length === 0) return void 0;\n\treturn {\n\t\t...objectData ?? {},\n\t\t...errorArg ? { error: {\n\t\t\tname: errorArg.name,\n\t\t\tmessage: errorArg.message,\n\t\t\tstack: errorArg.stack\n\t\t} } : {},\n\t\t...extraArgs.length > 0 ? { args: extraArgs } : {}\n\t};\n}\n//#endregion\n//#region src/logger/index.ts\nconst RegisteredLogger = {\n\tAGENT: \"AGENT\",\n\tOBSERVABILITY: \"OBSERVABILITY\",\n\tAUTH: \"AUTH\",\n\tBROWSER: \"BROWSER\",\n\tNETWORK: \"NETWORK\",\n\tWORKFLOW: \"WORKFLOW\",\n\tLLM: \"LLM\",\n\tTTS: \"TTS\",\n\tVOICE: \"VOICE\",\n\tVECTOR: \"VECTOR\",\n\tBUNDLER: \"BUNDLER\",\n\tDEPLOYER: \"DEPLOYER\",\n\tMEMORY: \"MEMORY\",\n\tSTORAGE: \"STORAGE\",\n\tEMBEDDINGS: \"EMBEDDINGS\",\n\tMCP_SERVER: \"MCP_SERVER\",\n\tSERVER_CACHE: \"SERVER_CACHE\",\n\tSERVER: \"SERVER\",\n\tWORKSPACE: \"WORKSPACE\",\n\tCHANNEL: \"CHANNEL\"\n};\nconst LogLevel = {\n\tDEBUG: \"debug\",\n\tINFO: \"info\",\n\tWARN: \"warn\",\n\tERROR: \"error\",\n\tNONE: \"silent\"\n};\nvar LoggerTransport = class extends Transform {\n\tconstructor(opts = {}) {\n\t\tsuper({\n\t\t\t...opts,\n\t\t\tobjectMode: true\n\t\t});\n\t}\n\tasync listLogsByRunId(_args) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _args?.page ?? 1,\n\t\t\tperPage: _args?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n\tasync listLogs(_args) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _args?.page ?? 1,\n\t\t\tperPage: _args?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n};\nconst createCustomTransport = (stream, listLogs, listLogsByRunId) => {\n\tlet transport = stream;\n\tif (listLogs) transport.listLogs = listLogs;\n\tif (listLogsByRunId) transport.listLogsByRunId = listLogsByRunId;\n\treturn transport;\n};\nvar MastraLogger = class {\n\tname;\n\tlevel;\n\ttransports;\n\tconstructor(options = {}) {\n\t\tthis.name = options.name || \"Mastra\";\n\t\tthis.level = options.level || LogLevel.ERROR;\n\t\tthis.transports = new Map(Object.entries(options.transports || {}));\n\t}\n\tgetTransports() {\n\t\treturn this.transports;\n\t}\n\ttrackException(_error, _metadata) {}\n\tasync listLogs(transportId, params) {\n\t\tif (!transportId || !this.transports.has(transportId)) return {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: params?.page ?? 1,\n\t\t\tperPage: params?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t\treturn this.transports.get(transportId).listLogs?.(params) ?? {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: params?.page ?? 1,\n\t\t\tperPage: params?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n\tasync listLogsByRunId({ transportId, runId, fromDate, toDate, logLevel, filters, page, perPage }) {\n\t\tif (!transportId || !this.transports.has(transportId) || !runId) return {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: page ?? 1,\n\t\t\tperPage: perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t\treturn this.transports.get(transportId).listLogsByRunId?.({\n\t\t\trunId,\n\t\t\tfromDate,\n\t\t\ttoDate,\n\t\t\tlogLevel,\n\t\t\tfilters,\n\t\t\tpage,\n\t\t\tperPage\n\t\t}) ?? {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: page ?? 1,\n\t\t\tperPage: perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n};\nvar ConsoleLogger = class ConsoleLogger extends MastraLogger {\n\tcomponent;\n\tfilter;\n\t#adapterContext;\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tthis.component = options.component;\n\t\tthis.filter = options.filter;\n\t}\n\t/**\n\t* Adapter hook (see `AdaptableLogger`): enables native trace correlation\n\t* (trace_id/span_id appended to console output) and observability export\n\t* derived from the same record. Called by Mastra during setup.\n\t*/\n\t__attachObservability(ctx) {\n\t\tthis.#adapterContext = ctx;\n\t}\n\tchild(componentOrBindings) {\n\t\tconst component = typeof componentOrBindings === \"string\" ? componentOrBindings : componentOrBindings?.component ?? this.component;\n\t\tconst child = new ConsoleLogger({\n\t\t\tname: this.name,\n\t\t\tlevel: this.level,\n\t\t\tcomponent,\n\t\t\tfilter: this.filter\n\t\t});\n\t\tif (this.#adapterContext) child.__attachObservability(this.#adapterContext);\n\t\treturn child;\n\t}\n\t/**\n\t* Native-record correlation: when a span is active, append the trace\n\t* fields object to the console args so every destination sees them.\n\t*/\n\t#correlate(args) {\n\t\tconst ctx = this.#adapterContext;\n\t\tif (!ctx?.options.correlation) return args;\n\t\ttry {\n\t\t\tconst fields = ctx.resolveTraceFields();\n\t\t\treturn fields ? [...args, fields] : args;\n\t\t} catch {\n\t\t\treturn args;\n\t\t}\n\t}\n\t/**\n\t* Export the record derived from the same native call to observability.\n\t* Mirrors DualLogger semantics: export is independent of the console\n\t* level filter, and never throws into the caller.\n\t*/\n\t#export(level, message, args) {\n\t\tconst ctx = this.#adapterContext;\n\t\tif (!ctx?.options.export) return;\n\t\ttry {\n\t\t\tctx.getLogSink()?.[level](message, buildLogRecordData(args));\n\t\t} catch {}\n\t}\n\tshouldLog(level, message, args) {\n\t\tif (!this.filter) return true;\n\t\ttry {\n\t\t\treturn this.filter({\n\t\t\t\tcomponent: this.component,\n\t\t\t\tlevel,\n\t\t\t\tmessage,\n\t\t\t\targs\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tconsole.error(`[Logger] Filter error for component=${this.component} level=${level}:`, e);\n\t\t\treturn true;\n\t\t}\n\t}\n\tprefix() {\n\t\treturn this.component ? `[${this.component}] ` : \"\";\n\t}\n\tdebug(message, ...args) {\n\t\tif (this.level === LogLevel.DEBUG && this.shouldLog(LogLevel.DEBUG, message, args)) console.info(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"debug\", message, args);\n\t}\n\tinfo(message, ...args) {\n\t\tif ((this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.INFO, message, args)) console.info(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"info\", message, args);\n\t}\n\twarn(message, ...args) {\n\t\tif ((this.level === LogLevel.WARN || this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.WARN, message, args)) console.warn(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"warn\", message, args);\n\t}\n\terror(message, ...args) {\n\t\tif ((this.level === LogLevel.ERROR || this.level === LogLevel.WARN || this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.ERROR, message, args)) console.error(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"error\", message, args);\n\t}\n\ttrackException(error, metadata) {\n\t\texportTrackedException(this.#adapterContext, error, metadata);\n\t}\n\tasync listLogs(_transportId, _params) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _params?.page ?? 1,\n\t\t\tperPage: _params?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n\tasync listLogsByRunId(_args) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _args.page ?? 1,\n\t\t\tperPage: _args.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n};\n//#endregion\nexport { ConsoleLogger, LogLevel, LoggerTransport, MastraLogger, RegisteredLogger, buildLogRecordData, createCustomTransport, exportTrackedException, isAdaptableLogger };\n\n//# sourceMappingURL=index.js.map","import { ConsoleLogger, RegisteredLogger } from \"../logger/index.js\";\n//#region src/base/MastraBase.ts\nvar MastraBase = class {\n\tcomponent = RegisteredLogger.LLM;\n\tlogger;\n\tname;\n\t#rawConfig;\n\tconstructor({ component, name, rawConfig }) {\n\t\tthis.component = component || RegisteredLogger.LLM;\n\t\tthis.name = name;\n\t\tthis.#rawConfig = rawConfig;\n\t\tthis.logger = new ConsoleLogger({ name: `${this.component} - ${this.name}` });\n\t}\n\t/**\n\t* Returns the raw storage configuration this primitive was created from,\n\t* or undefined if it was created from code.\n\t*/\n\ttoRawConfig() {\n\t\treturn this.#rawConfig;\n\t}\n\t/**\n\t* Sets the raw storage configuration for this primitive.\n\t* @internal\n\t*/\n\t__setRawConfig(rawConfig) {\n\t\tthis.#rawConfig = rawConfig;\n\t}\n\t/**\n\t* Set the logger for the agent\n\t* @param logger\n\t*/\n\t__setLogger(logger) {\n\t\tthis.logger = \"child\" in logger && typeof logger.child === \"function\" ? logger.child({ component: this.component }) : logger;\n\t}\n};\n//#endregion\nexport { MastraBase };\n\n//# sourceMappingURL=index.js.map","import { MastraBase } from \"@internal/core/base\";\nimport { PassThrough } from \"stream\";\nimport { experimental_generateSpeech, experimental_transcribe } from \"@internal/ai-sdk-v5\";\n//#region src/voice/voice.ts\nvar MastraVoice = class extends MastraBase {\n\tlisteningModel;\n\tspeechModel;\n\tspeaker;\n\trealtimeConfig;\n\tconstructor({ listeningModel, speechModel, speaker, realtimeConfig, name } = {}) {\n\t\tsuper({\n\t\t\tcomponent: \"VOICE\",\n\t\t\tname\n\t\t});\n\t\tthis.listeningModel = listeningModel;\n\t\tthis.speechModel = speechModel;\n\t\tthis.speaker = speaker;\n\t\tthis.realtimeConfig = realtimeConfig;\n\t}\n\t/**\n\t* Custom serialization for tracing/observability spans.\n\t* Excludes `apiKey` from listeningModel / speechModel / realtimeConfig\n\t* and any provider-specific state held by subclasses. Subclasses that\n\t* need to expose additional non-sensitive fields can override.\n\t*/\n\tserializeForSpan() {\n\t\treturn {\n\t\t\tcomponent: \"VOICE\",\n\t\t\tname: this.name,\n\t\t\tspeaker: this.speaker,\n\t\t\tlisteningModel: this.listeningModel ? { name: this.listeningModel.name } : void 0,\n\t\t\tspeechModel: this.speechModel ? { name: this.speechModel.name } : void 0,\n\t\t\trealtimeModel: this.realtimeConfig?.model\n\t\t};\n\t}\n\tupdateConfig(_options) {\n\t\tthis.logger.debug(\"updateConfig not implemented by this voice provider\");\n\t}\n\t/**\n\t* Initializes a WebSocket or WebRTC connection for real-time communication\n\t* @returns Promise that resolves when the connection is established\n\t*/\n\tasync connect(_options) {\n\t\tthis.logger.debug(\"connect not implemented by this voice provider\");\n\t}\n\t/**\n\t* Relay audio data to the voice provider for real-time processing\n\t* @param audioData Audio data to relay\n\t*/\n\tasync send(_audioData) {\n\t\tthis.logger.debug(\"relay not implemented by this voice provider\");\n\t}\n\t/**\n\t* Trigger voice providers to respond\n\t*/\n\tasync answer(_options) {\n\t\tthis.logger.debug(\"answer not implemented by this voice provider\");\n\t}\n\t/**\n\t* Equip the voice provider with instructions\n\t* @param instructions Instructions to add\n\t*/\n\taddInstructions(_instructions) {}\n\t/**\n\t* Equip the voice provider with tools\n\t* @param tools Array of tools to add\n\t*/\n\taddTools(_tools) {}\n\t/**\n\t* Disconnect from the WebSocket or WebRTC connection\n\t*/\n\tclose() {\n\t\tthis.logger.debug(\"close not implemented by this voice provider\");\n\t}\n\t/**\n\t* Register an event listener\n\t* @param event Event name (e.g., 'speaking', 'writing', 'error')\n\t* @param callback Callback function that receives event data\n\t*/\n\ton(_event, _callback) {\n\t\tthis.logger.debug(\"on not implemented by this voice provider\");\n\t}\n\t/**\n\t* Remove an event listener\n\t* @param event Event name (e.g., 'speaking', 'writing', 'error')\n\t* @param callback Callback function to remove\n\t*/\n\toff(_event, _callback) {\n\t\tthis.logger.debug(\"off not implemented by this voice provider\");\n\t}\n\t/**\n\t* Get available speakers/voices\n\t* @returns Array of available voice IDs and their metadata\n\t*/\n\tgetSpeakers() {\n\t\tthis.logger.debug(\"getSpeakers not implemented by this voice provider\");\n\t\treturn Promise.resolve([]);\n\t}\n\t/**\n\t* Get available speakers/voices\n\t* @returns Array of available voice IDs and their metadata\n\t*/\n\tgetListener() {\n\t\tthis.logger.debug(\"getListener not implemented by this voice provider\");\n\t\treturn Promise.resolve({ enabled: false });\n\t}\n};\n//#endregion\n//#region src/voice/aisdk/speech.ts\nvar AISDKSpeech = class extends MastraVoice {\n\tmodel;\n\tdefaultVoice;\n\tconstructor(model, options) {\n\t\tsuper({ name: \"ai-sdk-speech\" });\n\t\tthis.model = model;\n\t\tthis.defaultVoice = options?.voice;\n\t}\n\tasync speak(input, options) {\n\t\tconst text = typeof input === \"string\" ? input : await this.streamToText(input);\n\t\tconst result = await experimental_generateSpeech({\n\t\t\tmodel: this.model,\n\t\t\ttext,\n\t\t\tvoice: options?.speaker || this.defaultVoice,\n\t\t\tlanguage: options?.language,\n\t\t\tproviderOptions: options?.providerOptions,\n\t\t\tabortSignal: options?.abortSignal,\n\t\t\theaders: options?.headers\n\t\t});\n\t\tconst stream = new PassThrough();\n\t\tstream.end(Buffer.from(result.audio.uint8Array));\n\t\treturn stream;\n\t}\n\tasync listen() {\n\t\tthrow new Error(\"AI SDK speech models do not support transcription. Use AISDKTranscription instead.\");\n\t}\n\tasync getSpeakers() {\n\t\treturn [];\n\t}\n\tasync getListener() {\n\t\treturn { enabled: false };\n\t}\n\tasync streamToText(stream) {\n\t\tconst chunks = [];\n\t\tfor await (const chunk of stream) chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));\n\t\treturn Buffer.concat(chunks).toString(\"utf-8\");\n\t}\n};\n//#endregion\n//#region src/voice/aisdk/transcription.ts\nvar AISDKTranscription = class extends MastraVoice {\n\tmodel;\n\tconstructor(model) {\n\t\tsuper({ name: \"ai-sdk-transcription\" });\n\t\tthis.model = model;\n\t}\n\tasync speak() {\n\t\tthrow new Error(\"AI SDK transcription models do not support text-to-speech. Use AISDKSpeech instead.\");\n\t}\n\tasync getSpeakers() {\n\t\treturn [];\n\t}\n\tasync getListener() {\n\t\treturn { enabled: true };\n\t}\n\t/**\n\t* Transcribe audio to text\n\t* For enhanced metadata (segments, language, duration), use AI SDK's transcribe() directly\n\t*/\n\tasync listen(audioStream, options) {\n\t\tconst audioBuffer = await this.convertToBuffer(audioStream);\n\t\treturn (await experimental_transcribe({\n\t\t\tmodel: this.model,\n\t\t\taudio: audioBuffer,\n\t\t\tproviderOptions: options?.providerOptions,\n\t\t\tabortSignal: options?.abortSignal,\n\t\t\theaders: options?.headers\n\t\t})).text;\n\t}\n\tasync convertToBuffer(audio) {\n\t\tif (Buffer.isBuffer(audio)) return audio;\n\t\tif (audio instanceof Uint8Array) return Buffer.from(audio);\n\t\tif (typeof audio === \"string\") return Buffer.from(audio, \"base64\");\n\t\tconst chunks = [];\n\t\tfor await (const chunk of audio) chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));\n\t\treturn Buffer.concat(chunks);\n\t}\n};\n//#endregion\nexport { AISDKSpeech as n, MastraVoice as r, AISDKTranscription as t };\n\n//# sourceMappingURL=aisdk-C_K-VCwq.js.map","/**\n * List of available voices for Murf TTS\n */\nexport const MURF_VOICES = [\n 'en-UK-hazel',\n 'en-US-cooper',\n 'en-US-imani',\n 'it-IT-giorgio',\n 'en-US-wayne',\n 'en-IN-shivani',\n 'en-US-daniel',\n 'bn-IN-anwesha',\n 'es-MX-alejandro',\n 'en-AU-joyce',\n 'en-US-zion',\n 'en-IN-isha',\n 'en-US-riley',\n 'ko-KR-hwan',\n 'fr-FR-adélie',\n 'en-US-carter',\n 'en-UK-gabriel',\n 'en-UK-juliet',\n 'en-IN-arohi',\n 'fr-FR-maxime',\n 'de-DE-josephine',\n 'en-UK-hugo',\n 'en-US-samantha',\n 'de-DE-erna',\n 'zh-CN-baolin',\n 'pt-BR-isadora',\n 'it-IT-vincenzo',\n 'en-US-terrell',\n 'en-US-denzel',\n 'en-UK-heidi',\n 'en-US-miles',\n 'en-US-abigail',\n 'fr-FR-justine',\n 'it-IT-greta',\n 'en-AU-shane',\n 'en-UK-peter',\n 'nl-NL-famke',\n 'en-AU-ivy',\n 'nl-NL-dirk',\n 'fr-FR-axel',\n 'es-ES-carla',\n 'en-US-claire',\n 'ko-KR-jangmi',\n 'ko-KR-sanghoon',\n 'it-IT-vera',\n 'hi-IN-rahul',\n 'es-ES-elvira',\n 'es-ES-enrique',\n 'en-UK-aiden',\n 'en-US-ronnie',\n 'en-UK-amber',\n 'hi-IN-shweta',\n 'hi-IN-amit',\n 'en-AU-jimm',\n 'en-UK-pearl',\n 'pt-BR-benício',\n 'en-UK-freddie',\n 'en-US-ryan',\n 'pt-BR-eloa',\n 'en-US-charlotte',\n 'de-DE-lia',\n 'en-US-natalie',\n 'en-US-michelle',\n 'en-US-phoebe',\n 'es-ES-carmen',\n 'en-US-caleb',\n 'en-US-iris',\n 'en-UK-harrison',\n 'en-US-marcus',\n 'en-US-josie',\n 'en-US-daisy',\n 'en-US-charles',\n 'en-UK-reggie',\n 'en-US-julia',\n 'en-SCOTT-emily',\n 'en-US-dylan',\n 'es-MX-valeria',\n 'en-IN-eashwar',\n 'en-AU-evelyn',\n 'de-DE-lara',\n 'en-US-evander',\n 'en-SCOTT-rory',\n 'ta-IN-iniya',\n 'en-AU-leyton',\n 'fr-FR-louise',\n 'zh-CN-wei',\n 'ko-KR-gyeong',\n 'de-DE-matthias',\n 'en-IN-rohan',\n 'en-US-delilah',\n 'bn-IN-abhik',\n 'en-US-angela',\n 'en-US-naomi',\n 'es-MX-carlos',\n 'nl-NL-merel',\n 'en-US-alicia',\n 'en-IN-alia',\n 'zh-CN-jiao',\n 'en-US-june',\n 'en-AU-ashton',\n 'en-UK-finley',\n 'pl-PL-blazej',\n 'zh-CN-zhang',\n 'en-AU-kylie',\n 'en-US-jayden',\n 'en-IN-aarav',\n 'de-DE-björn',\n 'bn-IN-ishani',\n 'zh-CN-yuxan',\n 'fr-FR-louis',\n 'ko-KR-jong-su',\n 'en-AU-harper',\n 'en-UK-ruby',\n 'en-US-ken',\n 'ta-IN-mani',\n 'de-DE-ralf',\n 'en-UK-jaxon',\n 'en-US-river',\n 'en-IN-priya',\n 'en-UK-theo',\n 'en-UK-katie',\n 'pl-PL-jacek',\n 'it-IT-lorenzo',\n 'hi-IN-shaan',\n 'en-US-amara',\n 'en-UK-mason',\n 'en-IN-surya',\n 'en-US-finn',\n 'pt-BR-gustavo',\n 'hi-IN-kabir',\n 'es-ES-javier',\n 'en-AU-mitch',\n 'pt-BR-heitor',\n 'en-US-edmund',\n 'hi-IN-ayushi',\n 'pl-PL-kasia',\n 'es-MX-luisa',\n 'zh-CN-tao',\n 'en-US-molly',\n] as const;\n\nexport type MurfVoiceId = (typeof MURF_VOICES)[number];\n","import { PassThrough } from 'node:stream';\nimport { MastraVoice } from '@internal/voice';\nimport { MURF_VOICES } from './voices';\nimport type { MurfVoiceId } from './voices';\n\ntype MurfConfig = {\n name: 'GEN1' | 'GEN2';\n apiKey?: string;\n properties?: Omit<SpeechCreateParams, 'modelVersion' | 'voiceId' | 'text'>;\n};\n\ntype SpeechCreateParams = {\n voiceId: MurfVoiceId;\n text: string;\n modelVersion: 'GEN1' | 'GEN2';\n style?: string;\n rate?: number;\n pitch?: number;\n sampleRate?: 8000 | 24000 | 44100 | 48000;\n format?: 'MP3' | 'WAV' | 'FLAC' | 'ALAW' | 'ULAW';\n channelType?: 'STEREO' | 'MONO';\n pronunciationDictionary?: Record<string, string>;\n encodeAsBase64?: boolean;\n variation?: number;\n audioDuration?: number;\n multiNativeLocale?: string;\n};\n\ntype SpeechCreateResponse = {\n audioFile: string;\n audioLengthInSeconds: number;\n consumedCharacterCount: number;\n encodedAudio: string;\n remainingCharacterCount: number;\n warning: string;\n wordDurations: {\n endMs: number;\n pitchScaleMaximum: number;\n pitchScaleMinimum: number;\n sourceWordIndex: number;\n startMs: number;\n word: string;\n }[];\n};\n\nconst DEFAULT_RETRY_COUNT = 2;\nconst RETRY_STATUS_CODES = new Set([408, 413, 429, 500, 502, 503, 504]);\nconst RETRY_DELAY_MS = 300;\n\nexport class MurfVoice extends MastraVoice {\n private baseUrl = 'https://api.murf.ai';\n private apiKey: string;\n private defaultVoice: MurfVoiceId;\n private properties: Omit<SpeechCreateParams, 'modelVersion' | 'voiceId' | 'text'>;\n\n constructor({ speechModel, speaker }: { speechModel?: MurfConfig; speaker?: string } = {}) {\n super({\n speechModel: {\n name: speechModel?.name ?? 'GEN2',\n apiKey: speechModel?.apiKey ?? process.env.MURF_API_KEY,\n },\n speaker: speaker ?? MURF_VOICES[0],\n });\n\n const apiKey = this.speechModel?.apiKey;\n if (!apiKey) {\n throw new Error('MURF_API_KEY is not set');\n }\n\n this.apiKey = apiKey;\n\n this.properties = {\n ...speechModel?.properties,\n };\n\n this.defaultVoice = (speaker as MurfVoiceId) ?? MURF_VOICES[0];\n }\n\n private async streamToString(stream: NodeJS.ReadableStream): Promise<string> {\n const chunks: Buffer[] = [];\n for await (const chunk of stream) {\n if (typeof chunk === 'string') {\n chunks.push(Buffer.from(chunk));\n } else {\n chunks.push(chunk);\n }\n }\n return Buffer.concat(chunks).toString('utf-8');\n }\n\n async speak(\n input: string | NodeJS.ReadableStream,\n options?: { speaker?: string; properties?: Omit<SpeechCreateParams, 'modelVersion' | 'voiceId' | 'text'> },\n ): Promise<NodeJS.ReadableStream> {\n const text = typeof input === 'string' ? input : await this.streamToString(input);\n\n const response = await this.makeRequest<SpeechCreateResponse>('/v1/speech/generate', {\n voiceId: (options?.speaker || this.defaultVoice) as MurfVoiceId,\n text,\n modelVersion: this.speechModel?.name,\n ...this.properties,\n ...options?.properties,\n });\n\n // Create a PassThrough stream for the audio\n const stream = new PassThrough();\n\n // Get the audio file as a stream\n const audioResponse = await fetch(response.audioFile);\n if (!audioResponse.body) {\n throw new Error('No response body received');\n }\n\n // Process the stream\n const reader = audioResponse.body.getReader();\n (async () => {\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n stream.end();\n break;\n }\n stream.write(value);\n }\n } catch (error) {\n stream.destroy(error as Error);\n }\n })().catch(error => {\n stream.destroy(error as Error);\n });\n\n return stream;\n }\n\n /**\n * Checks if listening capabilities are enabled.\n *\n * @returns {Promise<{ enabled: boolean }>}\n */\n async getListener() {\n return { enabled: false };\n }\n\n async listen(\n _input: NodeJS.ReadableStream,\n _options?: Record<string, unknown>,\n ): Promise<string | NodeJS.ReadableStream> {\n throw new Error('Murf does not support speech recognition');\n }\n\n private async makeRequest<T>(endpoint: string, payload: Record<string, unknown>): Promise<T> {\n let lastError: Error | undefined;\n\n for (let attempt = 0; attempt <= DEFAULT_RETRY_COUNT; attempt++) {\n if (attempt > 0) {\n await new Promise(resolve => setTimeout(resolve, RETRY_DELAY_MS * 2 ** (attempt - 1)));\n }\n\n const res = await fetch(`${this.baseUrl}${endpoint}`, {\n method: 'POST',\n headers: {\n 'api-key': this.apiKey,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(payload),\n });\n\n if (res.ok) {\n return (await res.json()) as T;\n }\n\n if (!RETRY_STATUS_CODES.has(res.status) || attempt === DEFAULT_RETRY_COUNT) {\n let errorMessage: string;\n try {\n const error = (await res.json()) as { message?: string };\n errorMessage = error.message || res.statusText;\n } catch {\n errorMessage = res.statusText;\n }\n throw new Error(`Murf API Error: ${errorMessage}`);\n }\n\n lastError = new Error(`Murf API Error: ${res.statusText}`);\n }\n\n throw lastError ?? new Error('Murf API Error: request failed');\n }\n\n async getSpeakers() {\n return MURF_VOICES.map(voice => ({\n voiceId: voice,\n name: voice,\n language: voice.split('-')[0],\n gender: 'neutral',\n }));\n }\n}\n\nexport type { MurfConfig, MurfVoiceId };\n"],"mappings":";;;;;;;;AAUA,SAAS,uBAAuB,KAAK,OAAO,UAAU;CACrD,IAAI,CAAC,KAAK,QAAQ,QAAQ;CAC1B,IAAI;EACH,MAAM,cAAc;EACpB,IAAI,WAAW,CAAC,EAAE,MAAM,MAAM,SAAS;G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,MAAM,OAAO,UAAU;EACtB,KAAK,OAAO,MAAM,+CAA+C;CAClE;;;;;CAKA,gBAAgB,eAAe,CAAC;;;;;CAKhC,SAAS,QAAQ,CAAC;;;;CAIlB,QAAQ;EACP,KAAK,OAAO,MAAM,8CAA8C;CACjE;;;;;;CAMA,GAAG,QAAQ,WAAW;EACrB,KAAK,OAAO,MAAM,2CAA2C;CAC9D;;;;;;CAMA,IAAI,QAAQ,WAAW;EACtB,KAAK,OAAO,MAAM,4CAA4C;CAC/D;;;;;CAKA,cAAc;EACb,KAAK,OAAO,MAAM,oDAAoD;EACtE,OAAO,QAAQ,QAAQ,CAAC,CAAC;CAC1B;;;;;CAKA,cAAc;EACb,KAAK,OAAO,MAAM,oDAAoD;EACtE,OAAO,QAAQ,QAAQ,EAAE,SAAS,MAAM,CAAC;CAC1C;AACD;;;;;;ACvGA,MAAa,cAAc;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;AClGA,M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,CAAC;GAC3B,QAAQ;EACV,EAAE;CACJ;AACF"}
1
+ {"version":3,"file":"index.cjs","names":["stream","PassThrough"],"sources":["../../../packages/_internal-core/dist/logger/index.js","../../../packages/_internal-core/dist/base/index.js","../../../packages/_internals/voice/dist/aisdk-c08VRfTf.js","../src/voices.ts","../src/index.ts"],"sourcesContent":["import { Transform } from \"stream\";\n// src/logger/adapter.ts\nfunction isAdaptableLogger(logger) {\n\treturn typeof logger.__attachObservability === \"function\";\n}\n/**\n* Export a tracked exception through the adapter sink, mirroring the\n* DualLogger dual-write shape (`errorId`/`domain`/`category`/`details`/`cause`\n* when present on a MastraError-like value). Never throws into the caller.\n*/\nfunction exportTrackedException(ctx, error, metadata) {\n\tif (!ctx?.options.export) return;\n\ttry {\n\t\tconst mastraError = error;\n\t\tctx.getLogSink()?.error(error.message, {\n\t\t\t...mastraError.id !== void 0 ? { errorId: mastraError.id } : {},\n\t\t\t...mastraError.domain !== void 0 ? { domain: mastraError.domain } : {},\n\t\t\t...mastraError.category !== void 0 ? { category: mastraError.category } : {},\n\t\t\t...mastraError.details !== void 0 ? { details: mastraError.details } : {},\n\t\t\t...error.cause instanceof Error ? { cause: error.cause.message } : {},\n\t\t\t...metadata\n\t\t});\n\t} catch {}\n}\n/**\n* Adapt IMastraLogger's variadic args into the structured `data` payload of\n* an exported log record. Extracts the first plain object as data,\n* serializes an Error arg, and collects remaining primitives under `args`\n* so the derived record preserves all context from the native call.\n*/\nfunction buildLogRecordData(args) {\n\tconst objectData = args.find((arg) => arg !== null && typeof arg === \"object\" && !Array.isArray(arg) && !(arg instanceof Error));\n\tconst errorArg = args.find((arg) => arg instanceof Error);\n\tconst extraArgs = args.filter((arg) => arg !== objectData && arg !== errorArg);\n\tif (!objectData && !errorArg && extraArgs.length === 0) return void 0;\n\treturn {\n\t\t...objectData ?? {},\n\t\t...errorArg ? { error: {\n\t\t\tname: errorArg.name,\n\t\t\tmessage: errorArg.message,\n\t\t\tstack: errorArg.stack\n\t\t} } : {},\n\t\t...extraArgs.length > 0 ? { args: extraArgs } : {}\n\t};\n}\n// src/logger/index.ts\nconst RegisteredLogger = {\n\tAGENT: \"AGENT\",\n\tOBSERVABILITY: \"OBSERVABILITY\",\n\tAUTH: \"AUTH\",\n\tBROWSER: \"BROWSER\",\n\tNETWORK: \"NETWORK\",\n\tWORKFLOW: \"WORKFLOW\",\n\tLLM: \"LLM\",\n\tTTS: \"TTS\",\n\tVOICE: \"VOICE\",\n\tVECTOR: \"VECTOR\",\n\tBUNDLER: \"BUNDLER\",\n\tDEPLOYER: \"DEPLOYER\",\n\tMEMORY: \"MEMORY\",\n\tSTORAGE: \"STORAGE\",\n\tEMBEDDINGS: \"EMBEDDINGS\",\n\tMCP_SERVER: \"MCP_SERVER\",\n\tSERVER_CACHE: \"SERVER_CACHE\",\n\tSERVER: \"SERVER\",\n\tWORKSPACE: \"WORKSPACE\",\n\tCHANNEL: \"CHANNEL\"\n};\nconst LogLevel = {\n\tDEBUG: \"debug\",\n\tINFO: \"info\",\n\tWARN: \"warn\",\n\tERROR: \"error\",\n\tNONE: \"silent\"\n};\nvar LoggerTransport = class extends Transform {\n\tconstructor(opts = {}) {\n\t\tsuper({\n\t\t\t...opts,\n\t\t\tobjectMode: true\n\t\t});\n\t}\n\tasync listLogsByRunId(_args) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _args?.page ?? 1,\n\t\t\tperPage: _args?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n\tasync listLogs(_args) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _args?.page ?? 1,\n\t\t\tperPage: _args?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n};\nconst createCustomTransport = (stream, listLogs, listLogsByRunId) => {\n\tlet transport = stream;\n\tif (listLogs) transport.listLogs = listLogs;\n\tif (listLogsByRunId) transport.listLogsByRunId = listLogsByRunId;\n\treturn transport;\n};\nvar MastraLogger = class {\n\tname;\n\tlevel;\n\ttransports;\n\tconstructor(options = {}) {\n\t\tthis.name = options.name || \"Mastra\";\n\t\tthis.level = options.level || LogLevel.ERROR;\n\t\tthis.transports = new Map(Object.entries(options.transports || {}));\n\t}\n\tgetTransports() {\n\t\treturn this.transports;\n\t}\n\ttrackException(_error, _metadata) {}\n\tasync listLogs(transportId, params) {\n\t\tif (!transportId || !this.transports.has(transportId)) return {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: params?.page ?? 1,\n\t\t\tperPage: params?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t\treturn this.transports.get(transportId).listLogs?.(params) ?? {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: params?.page ?? 1,\n\t\t\tperPage: params?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n\tasync listLogsByRunId({ transportId, runId, fromDate, toDate, logLevel, filters, page, perPage }) {\n\t\tif (!transportId || !this.transports.has(transportId) || !runId) return {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: page ?? 1,\n\t\t\tperPage: perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t\treturn this.transports.get(transportId).listLogsByRunId?.({\n\t\t\trunId,\n\t\t\tfromDate,\n\t\t\ttoDate,\n\t\t\tlogLevel,\n\t\t\tfilters,\n\t\t\tpage,\n\t\t\tperPage\n\t\t}) ?? {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: page ?? 1,\n\t\t\tperPage: perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n};\nvar ConsoleLogger = class ConsoleLogger extends MastraLogger {\n\tcomponent;\n\tfilter;\n\t#adapterContext;\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tthis.component = options.component;\n\t\tthis.filter = options.filter;\n\t}\n\t/**\n\t* Adapter hook (see `AdaptableLogger`): enables native trace correlation\n\t* (trace_id/span_id appended to console output) and observability export\n\t* derived from the same record. Called by Mastra during setup.\n\t*/\n\t__attachObservability(ctx) {\n\t\tthis.#adapterContext = ctx;\n\t}\n\tchild(componentOrBindings) {\n\t\tconst component = typeof componentOrBindings === \"string\" ? componentOrBindings : componentOrBindings?.component ?? this.component;\n\t\tconst child = new ConsoleLogger({\n\t\t\tname: this.name,\n\t\t\tlevel: this.level,\n\t\t\tcomponent,\n\t\t\tfilter: this.filter\n\t\t});\n\t\tif (this.#adapterContext) child.__attachObservability(this.#adapterContext);\n\t\treturn child;\n\t}\n\t/**\n\t* Native-record correlation: when a span is active, append the trace\n\t* fields object to the console args so every destination sees them.\n\t*/\n\t#correlate(args) {\n\t\tconst ctx = this.#adapterContext;\n\t\tif (!ctx?.options.correlation) return args;\n\t\ttry {\n\t\t\tconst fields = ctx.resolveTraceFields();\n\t\t\treturn fields ? [...args, fields] : args;\n\t\t} catch {\n\t\t\treturn args;\n\t\t}\n\t}\n\t/**\n\t* Export the record derived from the same native call to observability.\n\t* Mirrors DualLogger semantics: export is independent of the console\n\t* level filter, and never throws into the caller.\n\t*/\n\t#export(level, message, args) {\n\t\tconst ctx = this.#adapterContext;\n\t\tif (!ctx?.options.export) return;\n\t\ttry {\n\t\t\tctx.getLogSink()?.[level](message, buildLogRecordData(args));\n\t\t} catch {}\n\t}\n\tshouldLog(level, message, args) {\n\t\tif (!this.filter) return true;\n\t\ttry {\n\t\t\treturn this.filter({\n\t\t\t\tcomponent: this.component,\n\t\t\t\tlevel,\n\t\t\t\tmessage,\n\t\t\t\targs\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tconsole.error(`[Logger] Filter error for component=${this.component} level=${level}:`, e);\n\t\t\treturn true;\n\t\t}\n\t}\n\tprefix() {\n\t\treturn this.component ? `[${this.component}] ` : \"\";\n\t}\n\tdebug(message, ...args) {\n\t\tif (this.level === LogLevel.DEBUG && this.shouldLog(LogLevel.DEBUG, message, args)) console.info(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"debug\", message, args);\n\t}\n\tinfo(message, ...args) {\n\t\tif ((this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.INFO, message, args)) console.info(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"info\", message, args);\n\t}\n\twarn(message, ...args) {\n\t\tif ((this.level === LogLevel.WARN || this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.WARN, message, args)) console.warn(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"warn\", message, args);\n\t}\n\terror(message, ...args) {\n\t\tif ((this.level === LogLevel.ERROR || this.level === LogLevel.WARN || this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.ERROR, message, args)) console.error(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"error\", message, args);\n\t}\n\ttrackException(error, metadata) {\n\t\texportTrackedException(this.#adapterContext, error, metadata);\n\t}\n\tasync listLogs(_transportId, _params) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _params?.page ?? 1,\n\t\t\tperPage: _params?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n\tasync listLogsByRunId(_args) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _args.page ?? 1,\n\t\t\tperPage: _args.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n};\nexport { ConsoleLogger, LogLevel, LoggerTransport, MastraLogger, RegisteredLogger, buildLogRecordData, createCustomTransport, exportTrackedException, isAdaptableLogger };\n\n//# sourceMappingURL=index.js.map","import { ConsoleLogger, RegisteredLogger } from \"../logger/index.js\";\n// src/base/MastraBase.ts\nvar MastraBase = class {\n\tcomponent = RegisteredLogger.LLM;\n\tlogger;\n\tname;\n\t#rawConfig;\n\tconstructor({ component, name, rawConfig }) {\n\t\tthis.component = component || RegisteredLogger.LLM;\n\t\tthis.name = name;\n\t\tthis.#rawConfig = rawConfig;\n\t\tthis.logger = new ConsoleLogger({ name: `${this.component} - ${this.name}` });\n\t}\n\t/**\n\t* Returns the raw storage configuration this primitive was created from,\n\t* or undefined if it was created from code.\n\t*/\n\ttoRawConfig() {\n\t\treturn this.#rawConfig;\n\t}\n\t/**\n\t* Sets the raw storage configuration for this primitive.\n\t* @internal\n\t*/\n\t__setRawConfig(rawConfig) {\n\t\tthis.#rawConfig = rawConfig;\n\t}\n\t/**\n\t* Set the logger for the agent\n\t* @param logger\n\t*/\n\t__setLogger(logger) {\n\t\tthis.logger = \"child\" in logger && typeof logger.child === \"function\" ? logger.child({ component: this.component }) : logger;\n\t}\n};\nexport { MastraBase };\n\n//# sourceMappingURL=index.js.map","import { MastraBase } from \"@internal/core/base\";\nimport { PassThrough } from \"stream\";\nimport { experimental_generateSpeech, experimental_transcribe } from \"@internal/ai-sdk-v5\";\n// src/voice/voice.ts\nvar MastraVoice = class extends MastraBase {\n\tlisteningModel;\n\tspeechModel;\n\tspeaker;\n\trealtimeConfig;\n\tconstructor({ listeningModel, speechModel, speaker, realtimeConfig, name } = {}) {\n\t\tsuper({\n\t\t\tcomponent: \"VOICE\",\n\t\t\tname\n\t\t});\n\t\tthis.listeningModel = listeningModel;\n\t\tthis.speechModel = speechModel;\n\t\tthis.speaker = speaker;\n\t\tthis.realtimeConfig = realtimeConfig;\n\t}\n\t/**\n\t* Custom serialization for tracing/observability spans.\n\t* Excludes `apiKey` from listeningModel / speechModel / realtimeConfig\n\t* and any provider-specific state held by subclasses. Subclasses that\n\t* need to expose additional non-sensitive fields can override.\n\t*/\n\tserializeForSpan() {\n\t\treturn {\n\t\t\tcomponent: \"VOICE\",\n\t\t\tname: this.name,\n\t\t\tspeaker: this.speaker,\n\t\t\tlisteningModel: this.listeningModel ? { name: this.listeningModel.name } : void 0,\n\t\t\tspeechModel: this.speechModel ? { name: this.speechModel.name } : void 0,\n\t\t\trealtimeModel: this.realtimeConfig?.model\n\t\t};\n\t}\n\tupdateConfig(_options) {\n\t\tthis.logger.debug(\"updateConfig not implemented by this voice provider\");\n\t}\n\t/**\n\t* Initializes a WebSocket or WebRTC connection for real-time communication\n\t* @returns Promise that resolves when the connection is established\n\t*/\n\tasync connect(_options) {\n\t\tthis.logger.debug(\"connect not implemented by this voice provider\");\n\t}\n\t/**\n\t* Relay audio data to the voice provider for real-time processing\n\t* @param audioData Audio data to relay\n\t*/\n\tasync send(_audioData) {\n\t\tthis.logger.debug(\"relay not implemented by this voice provider\");\n\t}\n\t/**\n\t* Trigger voice providers to respond\n\t*/\n\tasync answer(_options) {\n\t\tthis.logger.debug(\"answer not implemented by this voice provider\");\n\t}\n\t/**\n\t* Equip the voice provider with instructions\n\t* @param instructions Instructions to add\n\t*/\n\taddInstructions(_instructions) {}\n\t/**\n\t* Equip the voice provider with tools\n\t* @param tools Array of tools to add\n\t*/\n\taddTools(_tools) {}\n\t/**\n\t* Disconnect from the WebSocket or WebRTC connection\n\t*/\n\tclose() {\n\t\tthis.logger.debug(\"close not implemented by this voice provider\");\n\t}\n\t/**\n\t* Register an event listener\n\t* @param event Event name (e.g., 'speaking', 'writing', 'error')\n\t* @param callback Callback function that receives event data\n\t*/\n\ton(_event, _callback) {\n\t\tthis.logger.debug(\"on not implemented by this voice provider\");\n\t}\n\t/**\n\t* Remove an event listener\n\t* @param event Event name (e.g., 'speaking', 'writing', 'error')\n\t* @param callback Callback function to remove\n\t*/\n\toff(_event, _callback) {\n\t\tthis.logger.debug(\"off not implemented by this voice provider\");\n\t}\n\t/**\n\t* Get available speakers/voices\n\t* @returns Array of available voice IDs and their metadata\n\t*/\n\tgetSpeakers() {\n\t\tthis.logger.debug(\"getSpeakers not implemented by this voice provider\");\n\t\treturn Promise.resolve([]);\n\t}\n\t/**\n\t* Get available speakers/voices\n\t* @returns Array of available voice IDs and their metadata\n\t*/\n\tgetListener() {\n\t\tthis.logger.debug(\"getListener not implemented by this voice provider\");\n\t\treturn Promise.resolve({ enabled: false });\n\t}\n};\n// src/voice/aisdk/speech.ts\nvar AISDKSpeech = class extends MastraVoice {\n\tmodel;\n\tdefaultVoice;\n\tconstructor(model, options) {\n\t\tsuper({ name: \"ai-sdk-speech\" });\n\t\tthis.model = model;\n\t\tthis.defaultVoice = options?.voice;\n\t}\n\tasync speak(input, options) {\n\t\tconst text = typeof input === \"string\" ? input : await this.streamToText(input);\n\t\tconst result = await experimental_generateSpeech({\n\t\t\tmodel: this.model,\n\t\t\ttext,\n\t\t\tvoice: options?.speaker || this.defaultVoice,\n\t\t\tlanguage: options?.language,\n\t\t\tproviderOptions: options?.providerOptions,\n\t\t\tabortSignal: options?.abortSignal,\n\t\t\theaders: options?.headers\n\t\t});\n\t\tconst stream = new PassThrough();\n\t\tstream.end(Buffer.from(result.audio.uint8Array));\n\t\treturn stream;\n\t}\n\tasync listen() {\n\t\tthrow new Error(\"AI SDK speech models do not support transcription. Use AISDKTranscription instead.\");\n\t}\n\tasync getSpeakers() {\n\t\treturn [];\n\t}\n\tasync getListener() {\n\t\treturn { enabled: false };\n\t}\n\tasync streamToText(stream) {\n\t\tconst chunks = [];\n\t\tfor await (const chunk of stream) chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));\n\t\treturn Buffer.concat(chunks).toString(\"utf-8\");\n\t}\n};\n// src/voice/aisdk/transcription.ts\nvar AISDKTranscription = class extends MastraVoice {\n\tmodel;\n\tconstructor(model) {\n\t\tsuper({ name: \"ai-sdk-transcription\" });\n\t\tthis.model = model;\n\t}\n\tasync speak() {\n\t\tthrow new Error(\"AI SDK transcription models do not support text-to-speech. Use AISDKSpeech instead.\");\n\t}\n\tasync getSpeakers() {\n\t\treturn [];\n\t}\n\tasync getListener() {\n\t\treturn { enabled: true };\n\t}\n\t/**\n\t* Transcribe audio to text\n\t* For enhanced metadata (segments, language, duration), use AI SDK's transcribe() directly\n\t*/\n\tasync listen(audioStream, options) {\n\t\tconst audioBuffer = await this.convertToBuffer(audioStream);\n\t\treturn (await experimental_transcribe({\n\t\t\tmodel: this.model,\n\t\t\taudio: audioBuffer,\n\t\t\tproviderOptions: options?.providerOptions,\n\t\t\tabortSignal: options?.abortSignal,\n\t\t\theaders: options?.headers\n\t\t})).text;\n\t}\n\tasync convertToBuffer(audio) {\n\t\tif (Buffer.isBuffer(audio)) return audio;\n\t\tif (audio instanceof Uint8Array) return Buffer.from(audio);\n\t\tif (typeof audio === \"string\") return Buffer.from(audio, \"base64\");\n\t\tconst chunks = [];\n\t\tfor await (const chunk of audio) chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));\n\t\treturn Buffer.concat(chunks);\n\t}\n};\nexport { AISDKSpeech as n, MastraVoice as r, AISDKTranscription as t };\n\n//# sourceMappingURL=aisdk-c08VRfTf.js.map","/**\n * List of available voices for Murf TTS\n */\nexport const MURF_VOICES = [\n 'en-UK-hazel',\n 'en-US-cooper',\n 'en-US-imani',\n 'it-IT-giorgio',\n 'en-US-wayne',\n 'en-IN-shivani',\n 'en-US-daniel',\n 'bn-IN-anwesha',\n 'es-MX-alejandro',\n 'en-AU-joyce',\n 'en-US-zion',\n 'en-IN-isha',\n 'en-US-riley',\n 'ko-KR-hwan',\n 'fr-FR-adélie',\n 'en-US-carter',\n 'en-UK-gabriel',\n 'en-UK-juliet',\n 'en-IN-arohi',\n 'fr-FR-maxime',\n 'de-DE-josephine',\n 'en-UK-hugo',\n 'en-US-samantha',\n 'de-DE-erna',\n 'zh-CN-baolin',\n 'pt-BR-isadora',\n 'it-IT-vincenzo',\n 'en-US-terrell',\n 'en-US-denzel',\n 'en-UK-heidi',\n 'en-US-miles',\n 'en-US-abigail',\n 'fr-FR-justine',\n 'it-IT-greta',\n 'en-AU-shane',\n 'en-UK-peter',\n 'nl-NL-famke',\n 'en-AU-ivy',\n 'nl-NL-dirk',\n 'fr-FR-axel',\n 'es-ES-carla',\n 'en-US-claire',\n 'ko-KR-jangmi',\n 'ko-KR-sanghoon',\n 'it-IT-vera',\n 'hi-IN-rahul',\n 'es-ES-elvira',\n 'es-ES-enrique',\n 'en-UK-aiden',\n 'en-US-ronnie',\n 'en-UK-amber',\n 'hi-IN-shweta',\n 'hi-IN-amit',\n 'en-AU-jimm',\n 'en-UK-pearl',\n 'pt-BR-benício',\n 'en-UK-freddie',\n 'en-US-ryan',\n 'pt-BR-eloa',\n 'en-US-charlotte',\n 'de-DE-lia',\n 'en-US-natalie',\n 'en-US-michelle',\n 'en-US-phoebe',\n 'es-ES-carmen',\n 'en-US-caleb',\n 'en-US-iris',\n 'en-UK-harrison',\n 'en-US-marcus',\n 'en-US-josie',\n 'en-US-daisy',\n 'en-US-charles',\n 'en-UK-reggie',\n 'en-US-julia',\n 'en-SCOTT-emily',\n 'en-US-dylan',\n 'es-MX-valeria',\n 'en-IN-eashwar',\n 'en-AU-evelyn',\n 'de-DE-lara',\n 'en-US-evander',\n 'en-SCOTT-rory',\n 'ta-IN-iniya',\n 'en-AU-leyton',\n 'fr-FR-louise',\n 'zh-CN-wei',\n 'ko-KR-gyeong',\n 'de-DE-matthias',\n 'en-IN-rohan',\n 'en-US-delilah',\n 'bn-IN-abhik',\n 'en-US-angela',\n 'en-US-naomi',\n 'es-MX-carlos',\n 'nl-NL-merel',\n 'en-US-alicia',\n 'en-IN-alia',\n 'zh-CN-jiao',\n 'en-US-june',\n 'en-AU-ashton',\n 'en-UK-finley',\n 'pl-PL-blazej',\n 'zh-CN-zhang',\n 'en-AU-kylie',\n 'en-US-jayden',\n 'en-IN-aarav',\n 'de-DE-björn',\n 'bn-IN-ishani',\n 'zh-CN-yuxan',\n 'fr-FR-louis',\n 'ko-KR-jong-su',\n 'en-AU-harper',\n 'en-UK-ruby',\n 'en-US-ken',\n 'ta-IN-mani',\n 'de-DE-ralf',\n 'en-UK-jaxon',\n 'en-US-river',\n 'en-IN-priya',\n 'en-UK-theo',\n 'en-UK-katie',\n 'pl-PL-jacek',\n 'it-IT-lorenzo',\n 'hi-IN-shaan',\n 'en-US-amara',\n 'en-UK-mason',\n 'en-IN-surya',\n 'en-US-finn',\n 'pt-BR-gustavo',\n 'hi-IN-kabir',\n 'es-ES-javier',\n 'en-AU-mitch',\n 'pt-BR-heitor',\n 'en-US-edmund',\n 'hi-IN-ayushi',\n 'pl-PL-kasia',\n 'es-MX-luisa',\n 'zh-CN-tao',\n 'en-US-molly',\n] as const;\n\nexport type MurfVoiceId = (typeof MURF_VOICES)[number];\n","import { PassThrough } from 'node:stream';\nimport { MastraVoice } from '@internal/voice';\nimport { MURF_VOICES } from './voices';\nimport type { MurfVoiceId } from './voices';\n\ntype MurfConfig = {\n name: 'GEN1' | 'GEN2';\n apiKey?: string;\n properties?: Omit<SpeechCreateParams, 'modelVersion' | 'voiceId' | 'text'>;\n};\n\ntype SpeechCreateParams = {\n voiceId: MurfVoiceId;\n text: string;\n modelVersion: 'GEN1' | 'GEN2';\n style?: string;\n rate?: number;\n pitch?: number;\n sampleRate?: 8000 | 24000 | 44100 | 48000;\n format?: 'MP3' | 'WAV' | 'FLAC' | 'ALAW' | 'ULAW';\n channelType?: 'STEREO' | 'MONO';\n pronunciationDictionary?: Record<string, string>;\n encodeAsBase64?: boolean;\n variation?: number;\n audioDuration?: number;\n multiNativeLocale?: string;\n};\n\ntype SpeechCreateResponse = {\n audioFile: string;\n audioLengthInSeconds: number;\n consumedCharacterCount: number;\n encodedAudio: string;\n remainingCharacterCount: number;\n warning: string;\n wordDurations: {\n endMs: number;\n pitchScaleMaximum: number;\n pitchScaleMinimum: number;\n sourceWordIndex: number;\n startMs: number;\n word: string;\n }[];\n};\n\nconst DEFAULT_RETRY_COUNT = 2;\nconst RETRY_STATUS_CODES = new Set([408, 413, 429, 500, 502, 503, 504]);\nconst RETRY_DELAY_MS = 300;\n\nexport class MurfVoice extends MastraVoice {\n private baseUrl = 'https://api.murf.ai';\n private apiKey: string;\n private defaultVoice: MurfVoiceId;\n private properties: Omit<SpeechCreateParams, 'modelVersion' | 'voiceId' | 'text'>;\n\n constructor({ speechModel, speaker }: { speechModel?: MurfConfig; speaker?: string } = {}) {\n super({\n speechModel: {\n name: speechModel?.name ?? 'GEN2',\n apiKey: speechModel?.apiKey ?? process.env.MURF_API_KEY,\n },\n speaker: speaker ?? MURF_VOICES[0],\n });\n\n const apiKey = this.speechModel?.apiKey;\n if (!apiKey) {\n throw new Error('MURF_API_KEY is not set');\n }\n\n this.apiKey = apiKey;\n\n this.properties = {\n ...speechModel?.properties,\n };\n\n this.defaultVoice = (speaker as MurfVoiceId) ?? MURF_VOICES[0];\n }\n\n private async streamToString(stream: NodeJS.ReadableStream): Promise<string> {\n const chunks: Buffer[] = [];\n for await (const chunk of stream) {\n if (typeof chunk === 'string') {\n chunks.push(Buffer.from(chunk));\n } else {\n chunks.push(chunk);\n }\n }\n return Buffer.concat(chunks).toString('utf-8');\n }\n\n async speak(\n input: string | NodeJS.ReadableStream,\n options?: { speaker?: string; properties?: Omit<SpeechCreateParams, 'modelVersion' | 'voiceId' | 'text'> },\n ): Promise<NodeJS.ReadableStream> {\n const text = typeof input === 'string' ? input : await this.streamToString(input);\n\n const response = await this.makeRequest<SpeechCreateResponse>('/v1/speech/generate', {\n voiceId: (options?.speaker || this.defaultVoice) as MurfVoiceId,\n text,\n modelVersion: this.speechModel?.name,\n ...this.properties,\n ...options?.properties,\n });\n\n // Create a PassThrough stream for the audio\n const stream = new PassThrough();\n\n // Get the audio file as a stream\n const audioResponse = await fetch(response.audioFile);\n if (!audioResponse.body) {\n throw new Error('No response body received');\n }\n\n // Process the stream\n const reader = audioResponse.body.getReader();\n (async () => {\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n stream.end();\n break;\n }\n stream.write(value);\n }\n } catch (error) {\n stream.destroy(error as Error);\n }\n })().catch(error => {\n stream.destroy(error as Error);\n });\n\n return stream;\n }\n\n /**\n * Checks if listening capabilities are enabled.\n *\n * @returns {Promise<{ enabled: boolean }>}\n */\n async getListener() {\n return { enabled: false };\n }\n\n async listen(\n _input: NodeJS.ReadableStream,\n _options?: Record<string, unknown>,\n ): Promise<string | NodeJS.ReadableStream> {\n throw new Error('Murf does not support speech recognition');\n }\n\n private async makeRequest<T>(endpoint: string, payload: Record<string, unknown>): Promise<T> {\n let lastError: Error | undefined;\n\n for (let attempt = 0; attempt <= DEFAULT_RETRY_COUNT; attempt++) {\n if (attempt > 0) {\n await new Promise(resolve => setTimeout(resolve, RETRY_DELAY_MS * 2 ** (attempt - 1)));\n }\n\n const res = await fetch(`${this.baseUrl}${endpoint}`, {\n method: 'POST',\n headers: {\n 'api-key': this.apiKey,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(payload),\n });\n\n if (res.ok) {\n return (await res.json()) as T;\n }\n\n if (!RETRY_STATUS_CODES.has(res.status) || attempt === DEFAULT_RETRY_COUNT) {\n let errorMessage: string;\n try {\n const error = (await res.json()) as { message?: string };\n errorMessage = error.message || res.statusText;\n } catch {\n errorMessage = res.statusText;\n }\n throw new Error(`Murf API Error: ${errorMessage}`);\n }\n\n lastError = new Error(`Murf API Error: ${res.statusText}`);\n }\n\n throw lastError ?? new Error('Murf API Error: request failed');\n }\n\n async getSpeakers() {\n return MURF_VOICES.map(voice => ({\n voiceId: voice,\n name: voice,\n language: voice.split('-')[0],\n gender: 'neutral',\n }));\n }\n}\n\nexport type { MurfConfig, MurfVoiceId };\n"],"mappings":";;;;;;;;AAUA,SAAS,uBAAuB,KAAK,OAAO,UAAU;CACrD,IAAI,CAAC,KAAK,QAAQ,QAAQ;CAC1B,IAAI;EACH,MAAM,cAAc;EACpB,IAAI,WAAW,CAAC,EAAE,MAAM,MAAM,SAAS;GACtC,GAAG,YAAY,OAAO,KAAK,IAAI,EAAE,SAAS,YAAY,GAAG,IAAI,CAAC;GAC9D,GAAG,YAAY,WAAW,KAAK,IAAI,EAAE,QAAQ,YAAY,OAAO,IAAI,CAAC;GACrE,GAAG,YAAY,aAAa,KAAK,IAAI,EAAE,UAAU,YAAY,SAAS,IAAI,CAAC;GAC3E,GAAG,YAAY,YAAY,KAAK,IAAI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A,IAAI,QAAQ,WAAW;EACtB,KAAK,OAAO,MAAM,4CAA4C;CAC/D;;;;;CAKA,cAAc;EACb,KAAK,OAAO,MAAM,oDAAoD;EACtE,OAAO,QAAQ,QAAQ,CAAC,CAAC;CAC1B;;;;;CAKA,cAAc;EACb,KAAK,OAAO,MAAM,oDAAoD;EACtE,OAAO,QAAQ,QAAQ,EAAE,SAAS,MAAM,CAAC;CAC1C;AACD;;;;;ACvGA,MAAa,cAAc;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;AClGA,MAAM,sBAAsB;AAC5B,MAAM,qCAAqB,IAAI,IAAI;CAAC;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;AAAG,CAAC;AACtE,MAAM,iBAAiB;AAEvB,IAAa,YAAb,cAA+B,YAAY;CACzC,UAAkB;CAClB;CACA;CACA;CAEA,YAAY,EAAE,aAAa,YAA4D,CAAC,GAAG;EACzF,MAAM;GACJ,aAAa;IACX,MAA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AED,OAAOD;CACT;;;;;;CAOA,MAAM,cAAc;EAClB,OAAO,EAAE,SAAS,MAAM;CAC1B;CAEA,MAAM,OACJ,QACA,UACyC;EACzC,MAAM,IAAI,MAAM,0CAA0C;CAC5D;CAEA,MAAc,YAAe,UAAkB,SAA8C;EAC3F,IAAI;EAEJ,KAAK,IAAI,UAAU,GAAG,WAAW,qBAAqB,WAAW;GAC/D,IAAI,UAAU,GACZ,MAAM,IAAI,SAAQ,YAAW,WAAW,SAAS,iBAAiB,MAAM,UAAU,EAAE,CAAC;GAGvF,MAAM,MAAM,MAAM,MAAM,GAAG,KAAK,UAAU,YAAY;IACpD,QAAQ;IACR,SAAS;KACP,WAAW,KAAK;KAChB,gBAAgB;IAClB;IACA,MAAM,KAAK,UAAU,OAAO;GAC9B,CAAC;GAED,IAAI,IAAI,IACN,OAAQ,MAAM,IAAI,KAAK;GAGzB,IAAI,CAAC,mBAAmB,IAAI,IAAI,MAAM,KAAK,YAAY,qBAAqB;IAC1E,IAAI;IACJ,IAAI;KAEF,gBAAe,MADM,IAAI,KAAK,EAAA,CACT,WAAW,IAAI;IACtC,QAAQ;KACN,eAAe,IAAI;IACrB;IACA,MAAM,IAAI,MAAM,mBAAmB,cAAc;GACnD;GAEA,4BAAY,IAAI,MAAM,mBAAmB,IAAI,YAAY;EAC3D;EAEA,MAAM,6BAAa,IAAI,MAAM,gCAAgC;CAC/D;CAEA,MAAM,cAAc;EAClB,OAAO,YAAY,KAAI,WAAU;GAC/B,SAAS;GACT,MAAM;GACN,UAAU,MAAM,MAAM,GAAG,CAAC,CAAC;GAC3B,QAAQ;EACV,EAAE;CACJ;AACF"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PassThrough } from "stream";
2
- //#region ../../packages/_internal-core/dist/logger/index.js
2
+ // ../../packages/_internal-core/dist/logger/index.js
3
3
  /**
4
4
  * Export a tracked exception through the adapter sink, mirroring the
5
5
  * DualLogger dual-write shape (`errorId`/`domain`/`category`/`details`/`cause`
@@ -232,8 +232,7 @@ var ConsoleLogger = class ConsoleLogger extends MastraLogger {
232
232
  };
233
233
  }
234
234
  };
235
- //#endregion
236
- //#region ../../packages/_internal-core/dist/base/index.js
235
+ // ../../packages/_internal-core/dist/base/index.js
237
236
  var MastraBase = class {
238
237
  component = RegisteredLogger.LLM;
239
238
  logger;
@@ -267,8 +266,7 @@ var MastraBase = class {
267
266
  this.logger = "child" in logger && typeof logger.child === "function" ? logger.child({ component: this.component }) : logger;
268
267
  }
269
268
  };
270
- //#endregion
271
- //#region ../../packages/_internals/voice/dist/aisdk-C_K-VCwq.js
269
+ // ../../packages/_internals/voice/dist/aisdk-c08VRfTf.js
272
270
  var MastraVoice = class extends MastraBase {
273
271
  listeningModel;
274
272
  speechModel;
@@ -372,8 +370,7 @@ var MastraVoice = class extends MastraBase {
372
370
  return Promise.resolve({ enabled: false });
373
371
  }
374
372
  };
375
- //#endregion
376
- //#region src/voices.ts
373
+ // src/voices.ts
377
374
  /**
378
375
  * List of available voices for Murf TTS
379
376
  */
@@ -518,8 +515,7 @@ const MURF_VOICES = [
518
515
  "zh-CN-tao",
519
516
  "en-US-molly"
520
517
  ];
521
- //#endregion
522
- //#region src/index.ts
518
+ // src/index.ts
523
519
  const DEFAULT_RETRY_COUNT = 2;
524
520
  const RETRY_STATUS_CODES = /* @__PURE__ */ new Set([
525
521
  408,
@@ -633,7 +629,6 @@ var MurfVoice = class extends MastraVoice {
633
629
  }));
634
630
  }
635
631
  };
636
- //#endregion
637
632
  export { MurfVoice };
638
633
 
639
634
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../packages/_internal-core/dist/logger/index.js","../../../packages/_internal-core/dist/base/index.js","../../../packages/_internals/voice/dist/aisdk-C_K-VCwq.js","../src/voices.ts","../src/index.ts"],"sourcesContent":["import { Transform } from \"stream\";\n//#region src/logger/adapter.ts\nfunction isAdaptableLogger(logger) {\n\treturn typeof logger.__attachObservability === \"function\";\n}\n/**\n* Export a tracked exception through the adapter sink, mirroring the\n* DualLogger dual-write shape (`errorId`/`domain`/`category`/`details`/`cause`\n* when present on a MastraError-like value). Never throws into the caller.\n*/\nfunction exportTrackedException(ctx, error, metadata) {\n\tif (!ctx?.options.export) return;\n\ttry {\n\t\tconst mastraError = error;\n\t\tctx.getLogSink()?.error(error.message, {\n\t\t\t...mastraError.id !== void 0 ? { errorId: mastraError.id } : {},\n\t\t\t...mastraError.domain !== void 0 ? { domain: mastraError.domain } : {},\n\t\t\t...mastraError.category !== void 0 ? { category: mastraError.category } : {},\n\t\t\t...mastraError.details !== void 0 ? { details: mastraError.details } : {},\n\t\t\t...error.cause instanceof Error ? { cause: error.cause.message } : {},\n\t\t\t...metadata\n\t\t});\n\t} catch {}\n}\n/**\n* Adapt IMastraLogger's variadic args into the structured `data` payload of\n* an exported log record. Extracts the first plain object as data,\n* serializes an Error arg, and collects remaining primitives under `args`\n* so the derived record preserves all context from the native call.\n*/\nfunction buildLogRecordData(args) {\n\tconst objectData = args.find((arg) => arg !== null && typeof arg === \"object\" && !Array.isArray(arg) && !(arg instanceof Error));\n\tconst errorArg = args.find((arg) => arg instanceof Error);\n\tconst extraArgs = args.filter((arg) => arg !== objectData && arg !== errorArg);\n\tif (!objectData && !errorArg && extraArgs.length === 0) return void 0;\n\treturn {\n\t\t...objectData ?? {},\n\t\t...errorArg ? { error: {\n\t\t\tname: errorArg.name,\n\t\t\tmessage: errorArg.message,\n\t\t\tstack: errorArg.stack\n\t\t} } : {},\n\t\t...extraArgs.length > 0 ? { args: extraArgs } : {}\n\t};\n}\n//#endregion\n//#region src/logger/index.ts\nconst RegisteredLogger = {\n\tAGENT: \"AGENT\",\n\tOBSERVABILITY: \"OBSERVABILITY\",\n\tAUTH: \"AUTH\",\n\tBROWSER: \"BROWSER\",\n\tNETWORK: \"NETWORK\",\n\tWORKFLOW: \"WORKFLOW\",\n\tLLM: \"LLM\",\n\tTTS: \"TTS\",\n\tVOICE: \"VOICE\",\n\tVECTOR: \"VECTOR\",\n\tBUNDLER: \"BUNDLER\",\n\tDEPLOYER: \"DEPLOYER\",\n\tMEMORY: \"MEMORY\",\n\tSTORAGE: \"STORAGE\",\n\tEMBEDDINGS: \"EMBEDDINGS\",\n\tMCP_SERVER: \"MCP_SERVER\",\n\tSERVER_CACHE: \"SERVER_CACHE\",\n\tSERVER: \"SERVER\",\n\tWORKSPACE: \"WORKSPACE\",\n\tCHANNEL: \"CHANNEL\"\n};\nconst LogLevel = {\n\tDEBUG: \"debug\",\n\tINFO: \"info\",\n\tWARN: \"warn\",\n\tERROR: \"error\",\n\tNONE: \"silent\"\n};\nvar LoggerTransport = class extends Transform {\n\tconstructor(opts = {}) {\n\t\tsuper({\n\t\t\t...opts,\n\t\t\tobjectMode: true\n\t\t});\n\t}\n\tasync listLogsByRunId(_args) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _args?.page ?? 1,\n\t\t\tperPage: _args?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n\tasync listLogs(_args) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _args?.page ?? 1,\n\t\t\tperPage: _args?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n};\nconst createCustomTransport = (stream, listLogs, listLogsByRunId) => {\n\tlet transport = stream;\n\tif (listLogs) transport.listLogs = listLogs;\n\tif (listLogsByRunId) transport.listLogsByRunId = listLogsByRunId;\n\treturn transport;\n};\nvar MastraLogger = class {\n\tname;\n\tlevel;\n\ttransports;\n\tconstructor(options = {}) {\n\t\tthis.name = options.name || \"Mastra\";\n\t\tthis.level = options.level || LogLevel.ERROR;\n\t\tthis.transports = new Map(Object.entries(options.transports || {}));\n\t}\n\tgetTransports() {\n\t\treturn this.transports;\n\t}\n\ttrackException(_error, _metadata) {}\n\tasync listLogs(transportId, params) {\n\t\tif (!transportId || !this.transports.has(transportId)) return {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: params?.page ?? 1,\n\t\t\tperPage: params?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t\treturn this.transports.get(transportId).listLogs?.(params) ?? {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: params?.page ?? 1,\n\t\t\tperPage: params?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n\tasync listLogsByRunId({ transportId, runId, fromDate, toDate, logLevel, filters, page, perPage }) {\n\t\tif (!transportId || !this.transports.has(transportId) || !runId) return {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: page ?? 1,\n\t\t\tperPage: perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t\treturn this.transports.get(transportId).listLogsByRunId?.({\n\t\t\trunId,\n\t\t\tfromDate,\n\t\t\ttoDate,\n\t\t\tlogLevel,\n\t\t\tfilters,\n\t\t\tpage,\n\t\t\tperPage\n\t\t}) ?? {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: page ?? 1,\n\t\t\tperPage: perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n};\nvar ConsoleLogger = class ConsoleLogger extends MastraLogger {\n\tcomponent;\n\tfilter;\n\t#adapterContext;\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tthis.component = options.component;\n\t\tthis.filter = options.filter;\n\t}\n\t/**\n\t* Adapter hook (see `AdaptableLogger`): enables native trace correlation\n\t* (trace_id/span_id appended to console output) and observability export\n\t* derived from the same record. Called by Mastra during setup.\n\t*/\n\t__attachObservability(ctx) {\n\t\tthis.#adapterContext = ctx;\n\t}\n\tchild(componentOrBindings) {\n\t\tconst component = typeof componentOrBindings === \"string\" ? componentOrBindings : componentOrBindings?.component ?? this.component;\n\t\tconst child = new ConsoleLogger({\n\t\t\tname: this.name,\n\t\t\tlevel: this.level,\n\t\t\tcomponent,\n\t\t\tfilter: this.filter\n\t\t});\n\t\tif (this.#adapterContext) child.__attachObservability(this.#adapterContext);\n\t\treturn child;\n\t}\n\t/**\n\t* Native-record correlation: when a span is active, append the trace\n\t* fields object to the console args so every destination sees them.\n\t*/\n\t#correlate(args) {\n\t\tconst ctx = this.#adapterContext;\n\t\tif (!ctx?.options.correlation) return args;\n\t\ttry {\n\t\t\tconst fields = ctx.resolveTraceFields();\n\t\t\treturn fields ? [...args, fields] : args;\n\t\t} catch {\n\t\t\treturn args;\n\t\t}\n\t}\n\t/**\n\t* Export the record derived from the same native call to observability.\n\t* Mirrors DualLogger semantics: export is independent of the console\n\t* level filter, and never throws into the caller.\n\t*/\n\t#export(level, message, args) {\n\t\tconst ctx = this.#adapterContext;\n\t\tif (!ctx?.options.export) return;\n\t\ttry {\n\t\t\tctx.getLogSink()?.[level](message, buildLogRecordData(args));\n\t\t} catch {}\n\t}\n\tshouldLog(level, message, args) {\n\t\tif (!this.filter) return true;\n\t\ttry {\n\t\t\treturn this.filter({\n\t\t\t\tcomponent: this.component,\n\t\t\t\tlevel,\n\t\t\t\tmessage,\n\t\t\t\targs\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tconsole.error(`[Logger] Filter error for component=${this.component} level=${level}:`, e);\n\t\t\treturn true;\n\t\t}\n\t}\n\tprefix() {\n\t\treturn this.component ? `[${this.component}] ` : \"\";\n\t}\n\tdebug(message, ...args) {\n\t\tif (this.level === LogLevel.DEBUG && this.shouldLog(LogLevel.DEBUG, message, args)) console.info(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"debug\", message, args);\n\t}\n\tinfo(message, ...args) {\n\t\tif ((this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.INFO, message, args)) console.info(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"info\", message, args);\n\t}\n\twarn(message, ...args) {\n\t\tif ((this.level === LogLevel.WARN || this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.WARN, message, args)) console.warn(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"warn\", message, args);\n\t}\n\terror(message, ...args) {\n\t\tif ((this.level === LogLevel.ERROR || this.level === LogLevel.WARN || this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.ERROR, message, args)) console.error(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"error\", message, args);\n\t}\n\ttrackException(error, metadata) {\n\t\texportTrackedException(this.#adapterContext, error, metadata);\n\t}\n\tasync listLogs(_transportId, _params) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _params?.page ?? 1,\n\t\t\tperPage: _params?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n\tasync listLogsByRunId(_args) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _args.page ?? 1,\n\t\t\tperPage: _args.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n};\n//#endregion\nexport { ConsoleLogger, LogLevel, LoggerTransport, MastraLogger, RegisteredLogger, buildLogRecordData, createCustomTransport, exportTrackedException, isAdaptableLogger };\n\n//# sourceMappingURL=index.js.map","import { ConsoleLogger, RegisteredLogger } from \"../logger/index.js\";\n//#region src/base/MastraBase.ts\nvar MastraBase = class {\n\tcomponent = RegisteredLogger.LLM;\n\tlogger;\n\tname;\n\t#rawConfig;\n\tconstructor({ component, name, rawConfig }) {\n\t\tthis.component = component || RegisteredLogger.LLM;\n\t\tthis.name = name;\n\t\tthis.#rawConfig = rawConfig;\n\t\tthis.logger = new ConsoleLogger({ name: `${this.component} - ${this.name}` });\n\t}\n\t/**\n\t* Returns the raw storage configuration this primitive was created from,\n\t* or undefined if it was created from code.\n\t*/\n\ttoRawConfig() {\n\t\treturn this.#rawConfig;\n\t}\n\t/**\n\t* Sets the raw storage configuration for this primitive.\n\t* @internal\n\t*/\n\t__setRawConfig(rawConfig) {\n\t\tthis.#rawConfig = rawConfig;\n\t}\n\t/**\n\t* Set the logger for the agent\n\t* @param logger\n\t*/\n\t__setLogger(logger) {\n\t\tthis.logger = \"child\" in logger && typeof logger.child === \"function\" ? logger.child({ component: this.component }) : logger;\n\t}\n};\n//#endregion\nexport { MastraBase };\n\n//# sourceMappingURL=index.js.map","import { MastraBase } from \"@internal/core/base\";\nimport { PassThrough } from \"stream\";\nimport { experimental_generateSpeech, experimental_transcribe } from \"@internal/ai-sdk-v5\";\n//#region src/voice/voice.ts\nvar MastraVoice = class extends MastraBase {\n\tlisteningModel;\n\tspeechModel;\n\tspeaker;\n\trealtimeConfig;\n\tconstructor({ listeningModel, speechModel, speaker, realtimeConfig, name } = {}) {\n\t\tsuper({\n\t\t\tcomponent: \"VOICE\",\n\t\t\tname\n\t\t});\n\t\tthis.listeningModel = listeningModel;\n\t\tthis.speechModel = speechModel;\n\t\tthis.speaker = speaker;\n\t\tthis.realtimeConfig = realtimeConfig;\n\t}\n\t/**\n\t* Custom serialization for tracing/observability spans.\n\t* Excludes `apiKey` from listeningModel / speechModel / realtimeConfig\n\t* and any provider-specific state held by subclasses. Subclasses that\n\t* need to expose additional non-sensitive fields can override.\n\t*/\n\tserializeForSpan() {\n\t\treturn {\n\t\t\tcomponent: \"VOICE\",\n\t\t\tname: this.name,\n\t\t\tspeaker: this.speaker,\n\t\t\tlisteningModel: this.listeningModel ? { name: this.listeningModel.name } : void 0,\n\t\t\tspeechModel: this.speechModel ? { name: this.speechModel.name } : void 0,\n\t\t\trealtimeModel: this.realtimeConfig?.model\n\t\t};\n\t}\n\tupdateConfig(_options) {\n\t\tthis.logger.debug(\"updateConfig not implemented by this voice provider\");\n\t}\n\t/**\n\t* Initializes a WebSocket or WebRTC connection for real-time communication\n\t* @returns Promise that resolves when the connection is established\n\t*/\n\tasync connect(_options) {\n\t\tthis.logger.debug(\"connect not implemented by this voice provider\");\n\t}\n\t/**\n\t* Relay audio data to the voice provider for real-time processing\n\t* @param audioData Audio data to relay\n\t*/\n\tasync send(_audioData) {\n\t\tthis.logger.debug(\"relay not implemented by this voice provider\");\n\t}\n\t/**\n\t* Trigger voice providers to respond\n\t*/\n\tasync answer(_options) {\n\t\tthis.logger.debug(\"answer not implemented by this voice provider\");\n\t}\n\t/**\n\t* Equip the voice provider with instructions\n\t* @param instructions Instructions to add\n\t*/\n\taddInstructions(_instructions) {}\n\t/**\n\t* Equip the voice provider with tools\n\t* @param tools Array of tools to add\n\t*/\n\taddTools(_tools) {}\n\t/**\n\t* Disconnect from the WebSocket or WebRTC connection\n\t*/\n\tclose() {\n\t\tthis.logger.debug(\"close not implemented by this voice provider\");\n\t}\n\t/**\n\t* Register an event listener\n\t* @param event Event name (e.g., 'speaking', 'writing', 'error')\n\t* @param callback Callback function that receives event data\n\t*/\n\ton(_event, _callback) {\n\t\tthis.logger.debug(\"on not implemented by this voice provider\");\n\t}\n\t/**\n\t* Remove an event listener\n\t* @param event Event name (e.g., 'speaking', 'writing', 'error')\n\t* @param callback Callback function to remove\n\t*/\n\toff(_event, _callback) {\n\t\tthis.logger.debug(\"off not implemented by this voice provider\");\n\t}\n\t/**\n\t* Get available speakers/voices\n\t* @returns Array of available voice IDs and their metadata\n\t*/\n\tgetSpeakers() {\n\t\tthis.logger.debug(\"getSpeakers not implemented by this voice provider\");\n\t\treturn Promise.resolve([]);\n\t}\n\t/**\n\t* Get available speakers/voices\n\t* @returns Array of available voice IDs and their metadata\n\t*/\n\tgetListener() {\n\t\tthis.logger.debug(\"getListener not implemented by this voice provider\");\n\t\treturn Promise.resolve({ enabled: false });\n\t}\n};\n//#endregion\n//#region src/voice/aisdk/speech.ts\nvar AISDKSpeech = class extends MastraVoice {\n\tmodel;\n\tdefaultVoice;\n\tconstructor(model, options) {\n\t\tsuper({ name: \"ai-sdk-speech\" });\n\t\tthis.model = model;\n\t\tthis.defaultVoice = options?.voice;\n\t}\n\tasync speak(input, options) {\n\t\tconst text = typeof input === \"string\" ? input : await this.streamToText(input);\n\t\tconst result = await experimental_generateSpeech({\n\t\t\tmodel: this.model,\n\t\t\ttext,\n\t\t\tvoice: options?.speaker || this.defaultVoice,\n\t\t\tlanguage: options?.language,\n\t\t\tproviderOptions: options?.providerOptions,\n\t\t\tabortSignal: options?.abortSignal,\n\t\t\theaders: options?.headers\n\t\t});\n\t\tconst stream = new PassThrough();\n\t\tstream.end(Buffer.from(result.audio.uint8Array));\n\t\treturn stream;\n\t}\n\tasync listen() {\n\t\tthrow new Error(\"AI SDK speech models do not support transcription. Use AISDKTranscription instead.\");\n\t}\n\tasync getSpeakers() {\n\t\treturn [];\n\t}\n\tasync getListener() {\n\t\treturn { enabled: false };\n\t}\n\tasync streamToText(stream) {\n\t\tconst chunks = [];\n\t\tfor await (const chunk of stream) chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));\n\t\treturn Buffer.concat(chunks).toString(\"utf-8\");\n\t}\n};\n//#endregion\n//#region src/voice/aisdk/transcription.ts\nvar AISDKTranscription = class extends MastraVoice {\n\tmodel;\n\tconstructor(model) {\n\t\tsuper({ name: \"ai-sdk-transcription\" });\n\t\tthis.model = model;\n\t}\n\tasync speak() {\n\t\tthrow new Error(\"AI SDK transcription models do not support text-to-speech. Use AISDKSpeech instead.\");\n\t}\n\tasync getSpeakers() {\n\t\treturn [];\n\t}\n\tasync getListener() {\n\t\treturn { enabled: true };\n\t}\n\t/**\n\t* Transcribe audio to text\n\t* For enhanced metadata (segments, language, duration), use AI SDK's transcribe() directly\n\t*/\n\tasync listen(audioStream, options) {\n\t\tconst audioBuffer = await this.convertToBuffer(audioStream);\n\t\treturn (await experimental_transcribe({\n\t\t\tmodel: this.model,\n\t\t\taudio: audioBuffer,\n\t\t\tproviderOptions: options?.providerOptions,\n\t\t\tabortSignal: options?.abortSignal,\n\t\t\theaders: options?.headers\n\t\t})).text;\n\t}\n\tasync convertToBuffer(audio) {\n\t\tif (Buffer.isBuffer(audio)) return audio;\n\t\tif (audio instanceof Uint8Array) return Buffer.from(audio);\n\t\tif (typeof audio === \"string\") return Buffer.from(audio, \"base64\");\n\t\tconst chunks = [];\n\t\tfor await (const chunk of audio) chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));\n\t\treturn Buffer.concat(chunks);\n\t}\n};\n//#endregion\nexport { AISDKSpeech as n, MastraVoice as r, AISDKTranscription as t };\n\n//# sourceMappingURL=aisdk-C_K-VCwq.js.map","/**\n * List of available voices for Murf TTS\n */\nexport const MURF_VOICES = [\n 'en-UK-hazel',\n 'en-US-cooper',\n 'en-US-imani',\n 'it-IT-giorgio',\n 'en-US-wayne',\n 'en-IN-shivani',\n 'en-US-daniel',\n 'bn-IN-anwesha',\n 'es-MX-alejandro',\n 'en-AU-joyce',\n 'en-US-zion',\n 'en-IN-isha',\n 'en-US-riley',\n 'ko-KR-hwan',\n 'fr-FR-adélie',\n 'en-US-carter',\n 'en-UK-gabriel',\n 'en-UK-juliet',\n 'en-IN-arohi',\n 'fr-FR-maxime',\n 'de-DE-josephine',\n 'en-UK-hugo',\n 'en-US-samantha',\n 'de-DE-erna',\n 'zh-CN-baolin',\n 'pt-BR-isadora',\n 'it-IT-vincenzo',\n 'en-US-terrell',\n 'en-US-denzel',\n 'en-UK-heidi',\n 'en-US-miles',\n 'en-US-abigail',\n 'fr-FR-justine',\n 'it-IT-greta',\n 'en-AU-shane',\n 'en-UK-peter',\n 'nl-NL-famke',\n 'en-AU-ivy',\n 'nl-NL-dirk',\n 'fr-FR-axel',\n 'es-ES-carla',\n 'en-US-claire',\n 'ko-KR-jangmi',\n 'ko-KR-sanghoon',\n 'it-IT-vera',\n 'hi-IN-rahul',\n 'es-ES-elvira',\n 'es-ES-enrique',\n 'en-UK-aiden',\n 'en-US-ronnie',\n 'en-UK-amber',\n 'hi-IN-shweta',\n 'hi-IN-amit',\n 'en-AU-jimm',\n 'en-UK-pearl',\n 'pt-BR-benício',\n 'en-UK-freddie',\n 'en-US-ryan',\n 'pt-BR-eloa',\n 'en-US-charlotte',\n 'de-DE-lia',\n 'en-US-natalie',\n 'en-US-michelle',\n 'en-US-phoebe',\n 'es-ES-carmen',\n 'en-US-caleb',\n 'en-US-iris',\n 'en-UK-harrison',\n 'en-US-marcus',\n 'en-US-josie',\n 'en-US-daisy',\n 'en-US-charles',\n 'en-UK-reggie',\n 'en-US-julia',\n 'en-SCOTT-emily',\n 'en-US-dylan',\n 'es-MX-valeria',\n 'en-IN-eashwar',\n 'en-AU-evelyn',\n 'de-DE-lara',\n 'en-US-evander',\n 'en-SCOTT-rory',\n 'ta-IN-iniya',\n 'en-AU-leyton',\n 'fr-FR-louise',\n 'zh-CN-wei',\n 'ko-KR-gyeong',\n 'de-DE-matthias',\n 'en-IN-rohan',\n 'en-US-delilah',\n 'bn-IN-abhik',\n 'en-US-angela',\n 'en-US-naomi',\n 'es-MX-carlos',\n 'nl-NL-merel',\n 'en-US-alicia',\n 'en-IN-alia',\n 'zh-CN-jiao',\n 'en-US-june',\n 'en-AU-ashton',\n 'en-UK-finley',\n 'pl-PL-blazej',\n 'zh-CN-zhang',\n 'en-AU-kylie',\n 'en-US-jayden',\n 'en-IN-aarav',\n 'de-DE-björn',\n 'bn-IN-ishani',\n 'zh-CN-yuxan',\n 'fr-FR-louis',\n 'ko-KR-jong-su',\n 'en-AU-harper',\n 'en-UK-ruby',\n 'en-US-ken',\n 'ta-IN-mani',\n 'de-DE-ralf',\n 'en-UK-jaxon',\n 'en-US-river',\n 'en-IN-priya',\n 'en-UK-theo',\n 'en-UK-katie',\n 'pl-PL-jacek',\n 'it-IT-lorenzo',\n 'hi-IN-shaan',\n 'en-US-amara',\n 'en-UK-mason',\n 'en-IN-surya',\n 'en-US-finn',\n 'pt-BR-gustavo',\n 'hi-IN-kabir',\n 'es-ES-javier',\n 'en-AU-mitch',\n 'pt-BR-heitor',\n 'en-US-edmund',\n 'hi-IN-ayushi',\n 'pl-PL-kasia',\n 'es-MX-luisa',\n 'zh-CN-tao',\n 'en-US-molly',\n] as const;\n\nexport type MurfVoiceId = (typeof MURF_VOICES)[number];\n","import { PassThrough } from 'node:stream';\nimport { MastraVoice } from '@internal/voice';\nimport { MURF_VOICES } from './voices';\nimport type { MurfVoiceId } from './voices';\n\ntype MurfConfig = {\n name: 'GEN1' | 'GEN2';\n apiKey?: string;\n properties?: Omit<SpeechCreateParams, 'modelVersion' | 'voiceId' | 'text'>;\n};\n\ntype SpeechCreateParams = {\n voiceId: MurfVoiceId;\n text: string;\n modelVersion: 'GEN1' | 'GEN2';\n style?: string;\n rate?: number;\n pitch?: number;\n sampleRate?: 8000 | 24000 | 44100 | 48000;\n format?: 'MP3' | 'WAV' | 'FLAC' | 'ALAW' | 'ULAW';\n channelType?: 'STEREO' | 'MONO';\n pronunciationDictionary?: Record<string, string>;\n encodeAsBase64?: boolean;\n variation?: number;\n audioDuration?: number;\n multiNativeLocale?: string;\n};\n\ntype SpeechCreateResponse = {\n audioFile: string;\n audioLengthInSeconds: number;\n consumedCharacterCount: number;\n encodedAudio: string;\n remainingCharacterCount: number;\n warning: string;\n wordDurations: {\n endMs: number;\n pitchScaleMaximum: number;\n pitchScaleMinimum: number;\n sourceWordIndex: number;\n startMs: number;\n word: string;\n }[];\n};\n\nconst DEFAULT_RETRY_COUNT = 2;\nconst RETRY_STATUS_CODES = new Set([408, 413, 429, 500, 502, 503, 504]);\nconst RETRY_DELAY_MS = 300;\n\nexport class MurfVoice extends MastraVoice {\n private baseUrl = 'https://api.murf.ai';\n private apiKey: string;\n private defaultVoice: MurfVoiceId;\n private properties: Omit<SpeechCreateParams, 'modelVersion' | 'voiceId' | 'text'>;\n\n constructor({ speechModel, speaker }: { speechModel?: MurfConfig; speaker?: string } = {}) {\n super({\n speechModel: {\n name: speechModel?.name ?? 'GEN2',\n apiKey: speechModel?.apiKey ?? process.env.MURF_API_KEY,\n },\n speaker: speaker ?? MURF_VOICES[0],\n });\n\n const apiKey = this.speechModel?.apiKey;\n if (!apiKey) {\n throw new Error('MURF_API_KEY is not set');\n }\n\n this.apiKey = apiKey;\n\n this.properties = {\n ...speechModel?.properties,\n };\n\n this.defaultVoice = (speaker as MurfVoiceId) ?? MURF_VOICES[0];\n }\n\n private async streamToString(stream: NodeJS.ReadableStream): Promise<string> {\n const chunks: Buffer[] = [];\n for await (const chunk of stream) {\n if (typeof chunk === 'string') {\n chunks.push(Buffer.from(chunk));\n } else {\n chunks.push(chunk);\n }\n }\n return Buffer.concat(chunks).toString('utf-8');\n }\n\n async speak(\n input: string | NodeJS.ReadableStream,\n options?: { speaker?: string; properties?: Omit<SpeechCreateParams, 'modelVersion' | 'voiceId' | 'text'> },\n ): Promise<NodeJS.ReadableStream> {\n const text = typeof input === 'string' ? input : await this.streamToString(input);\n\n const response = await this.makeRequest<SpeechCreateResponse>('/v1/speech/generate', {\n voiceId: (options?.speaker || this.defaultVoice) as MurfVoiceId,\n text,\n modelVersion: this.speechModel?.name,\n ...this.properties,\n ...options?.properties,\n });\n\n // Create a PassThrough stream for the audio\n const stream = new PassThrough();\n\n // Get the audio file as a stream\n const audioResponse = await fetch(response.audioFile);\n if (!audioResponse.body) {\n throw new Error('No response body received');\n }\n\n // Process the stream\n const reader = audioResponse.body.getReader();\n (async () => {\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n stream.end();\n break;\n }\n stream.write(value);\n }\n } catch (error) {\n stream.destroy(error as Error);\n }\n })().catch(error => {\n stream.destroy(error as Error);\n });\n\n return stream;\n }\n\n /**\n * Checks if listening capabilities are enabled.\n *\n * @returns {Promise<{ enabled: boolean }>}\n */\n async getListener() {\n return { enabled: false };\n }\n\n async listen(\n _input: NodeJS.ReadableStream,\n _options?: Record<string, unknown>,\n ): Promise<string | NodeJS.ReadableStream> {\n throw new Error('Murf does not support speech recognition');\n }\n\n private async makeRequest<T>(endpoint: string, payload: Record<string, unknown>): Promise<T> {\n let lastError: Error | undefined;\n\n for (let attempt = 0; attempt <= DEFAULT_RETRY_COUNT; attempt++) {\n if (attempt > 0) {\n await new Promise(resolve => setTimeout(resolve, RETRY_DELAY_MS * 2 ** (attempt - 1)));\n }\n\n const res = await fetch(`${this.baseUrl}${endpoint}`, {\n method: 'POST',\n headers: {\n 'api-key': this.apiKey,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(payload),\n });\n\n if (res.ok) {\n return (await res.json()) as T;\n }\n\n if (!RETRY_STATUS_CODES.has(res.status) || attempt === DEFAULT_RETRY_COUNT) {\n let errorMessage: string;\n try {\n const error = (await res.json()) as { message?: string };\n errorMessage = error.message || res.statusText;\n } catch {\n errorMessage = res.statusText;\n }\n throw new Error(`Murf API Error: ${errorMessage}`);\n }\n\n lastError = new Error(`Murf API Error: ${res.statusText}`);\n }\n\n throw lastError ?? new Error('Murf API Error: request failed');\n }\n\n async getSpeakers() {\n return MURF_VOICES.map(voice => ({\n voiceId: voice,\n name: voice,\n language: voice.split('-')[0],\n gender: 'neutral',\n }));\n }\n}\n\nexport type { MurfConfig, MurfVoiceId };\n"],"mappings":";;;;;;;AAUA,SAAS,uBAAuB,KAAK,OAAO,UAAU;CACrD,IAAI,CAAC,KAAK,QAAQ,QAAQ;CAC1B,IAAI;EACH,MAAM,cAAc;EACpB,IAAI,WAAW,CAAC,EAAE,MAAM,MAAM,SAAS;GACtC,GAAG,YAAY,OAAO,KAAK,IAAI,EAAE,SAAS,YAAY,GAAG,IAAI,CAAC;GAC9D,GAAG,YAAY,WAAW,KAAK,IAAI,EAAE,QAAQ,YAAY,OAAO,IAAI,CAAC;GACrE,GAAG,YAAY,aAAa,KAAK,IAAI,EAAE,UAAU,YAAY,SAAS,IAAI,CAAC;GAC3E,GAAG,YAAY,YAAY,KAAK,IAAI,EAAE,SAAS,YAAY,QAAQ,IAAI,CAAC;GACxE,GAAG,MAAM,iBAAiB,QAAQ,EAAE,OAAO,MAAM,MAAM,QAAQ,IAAI,CAAC;GACpE,GAAG;EACJ,CAAC;CACF,QAAQ,CAAC;AACV;;;;;;;AAOA,SAAS,mBAAmB,MAAM;CACjC,MAAM,aAA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OAAO,QAAQ,QAAQ,EAAE,SAAS,MAAM,CAAC;CAC1C;AACD;;;;;;ACvGA,MAAa,cAAc;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;AClGA,MAAM,sBAAsB;AAC5B,MAAM,qCAAqB,IAAI,IAAI;CAAC;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;AAAG,CAAC;AACtE,MAAM,iBAAiB;AAEvB,IAAa,YAAb,cAA+B,YAAY;CACzC,UAAkB;CAClB;CACA;CACA;CAEA,YAAY,EAAE,aAAa,YAA4D,CAAC,GAAG;EACzF,MAAM;GACJ,aAAa;IACX,MAAM,aAAa,QAAQ;IAC3B,QAAQ,aAAa,UAAU,QAAQ,IAAI;GAC7C;GACA,SAAS,WAAW,YAAY;EAClC,CAAC;EAED,MAAM,SAAS,KAAK,aAAa;EACjC,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,yBAAyB;EAG3C,KAAK,SAAS;EAEd,KAAK,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AAG,WAAW,qBAAqB,WAAW;GAC/D,IAAI,UAAU,GACZ,MAAM,IAAI,SAAQ,YAAW,WAAW,SAAS,iBAAiB,MAAM,UAAU,EAAE,CAAC;GAGvF,MAAM,MAAM,MAAM,MAAM,GAAG,KAAK,UAAU,YAAY;IACpD,QAAQ;IACR,SAAS;KACP,WAAW,KAAK;KAChB,gBAAgB;IAClB;IACA,MAAM,KAAK,UAAU,OAAO;GAC9B,CAAC;GAED,IAAI,IAAI,IACN,OAAQ,MAAM,IAAI,KAAK;GAGzB,IAAI,CAAC,mBAAmB,IAAI,IAAI,MAAM,KAAK,YAAY,qBAAqB;IAC1E,IAAI;IACJ,IAAI;KAEF,gBAAe,MADM,IAAI,KAAK,EAAA,CACT,WAAW,IAAI;IACtC,QAAQ;KACN,eAAe,IAAI;IACrB;IACA,MAAM,IAAI,MAAM,mBAAmB,cAAc;GACnD;GAEA,4BAAY,IAAI,MAAM,mBAAmB,IAAI,YAAY;EAC3D;EAEA,MAAM,6BAAa,IAAI,MAAM,gCAAgC;CAC/D;CAEA,MAAM,cAAc;EAClB,OAAO,YAAY,KAAI,WAAU;GAC/B,SAAS;GACT,MAAM;GACN,UAAU,MAAM,MAAM,GAAG,CAAC,CAAC;GAC3B,QAAQ;EACV,EAAE;CACJ;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../packages/_internal-core/dist/logger/index.js","../../../packages/_internal-core/dist/base/index.js","../../../packages/_internals/voice/dist/aisdk-c08VRfTf.js","../src/voices.ts","../src/index.ts"],"sourcesContent":["import { Transform } from \"stream\";\n// src/logger/adapter.ts\nfunction isAdaptableLogger(logger) {\n\treturn typeof logger.__attachObservability === \"function\";\n}\n/**\n* Export a tracked exception through the adapter sink, mirroring the\n* DualLogger dual-write shape (`errorId`/`domain`/`category`/`details`/`cause`\n* when present on a MastraError-like value). Never throws into the caller.\n*/\nfunction exportTrackedException(ctx, error, metadata) {\n\tif (!ctx?.options.export) return;\n\ttry {\n\t\tconst mastraError = error;\n\t\tctx.getLogSink()?.error(error.message, {\n\t\t\t...mastraError.id !== void 0 ? { errorId: mastraError.id } : {},\n\t\t\t...mastraError.domain !== void 0 ? { domain: mastraError.domain } : {},\n\t\t\t...mastraError.category !== void 0 ? { category: mastraError.category } : {},\n\t\t\t...mastraError.details !== void 0 ? { details: mastraError.details } : {},\n\t\t\t...error.cause instanceof Error ? { cause: error.cause.message } : {},\n\t\t\t...metadata\n\t\t});\n\t} catch {}\n}\n/**\n* Adapt IMastraLogger's variadic args into the structured `data` payload of\n* an exported log record. Extracts the first plain object as data,\n* serializes an Error arg, and collects remaining primitives under `args`\n* so the derived record preserves all context from the native call.\n*/\nfunction buildLogRecordData(args) {\n\tconst objectData = args.find((arg) => arg !== null && typeof arg === \"object\" && !Array.isArray(arg) && !(arg instanceof Error));\n\tconst errorArg = args.find((arg) => arg instanceof Error);\n\tconst extraArgs = args.filter((arg) => arg !== objectData && arg !== errorArg);\n\tif (!objectData && !errorArg && extraArgs.length === 0) return void 0;\n\treturn {\n\t\t...objectData ?? {},\n\t\t...errorArg ? { error: {\n\t\t\tname: errorArg.name,\n\t\t\tmessage: errorArg.message,\n\t\t\tstack: errorArg.stack\n\t\t} } : {},\n\t\t...extraArgs.length > 0 ? { args: extraArgs } : {}\n\t};\n}\n// src/logger/index.ts\nconst RegisteredLogger = {\n\tAGENT: \"AGENT\",\n\tOBSERVABILITY: \"OBSERVABILITY\",\n\tAUTH: \"AUTH\",\n\tBROWSER: \"BROWSER\",\n\tNETWORK: \"NETWORK\",\n\tWORKFLOW: \"WORKFLOW\",\n\tLLM: \"LLM\",\n\tTTS: \"TTS\",\n\tVOICE: \"VOICE\",\n\tVECTOR: \"VECTOR\",\n\tBUNDLER: \"BUNDLER\",\n\tDEPLOYER: \"DEPLOYER\",\n\tMEMORY: \"MEMORY\",\n\tSTORAGE: \"STORAGE\",\n\tEMBEDDINGS: \"EMBEDDINGS\",\n\tMCP_SERVER: \"MCP_SERVER\",\n\tSERVER_CACHE: \"SERVER_CACHE\",\n\tSERVER: \"SERVER\",\n\tWORKSPACE: \"WORKSPACE\",\n\tCHANNEL: \"CHANNEL\"\n};\nconst LogLevel = {\n\tDEBUG: \"debug\",\n\tINFO: \"info\",\n\tWARN: \"warn\",\n\tERROR: \"error\",\n\tNONE: \"silent\"\n};\nvar LoggerTransport = class extends Transform {\n\tconstructor(opts = {}) {\n\t\tsuper({\n\t\t\t...opts,\n\t\t\tobjectMode: true\n\t\t});\n\t}\n\tasync listLogsByRunId(_args) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _args?.page ?? 1,\n\t\t\tperPage: _args?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n\tasync listLogs(_args) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _args?.page ?? 1,\n\t\t\tperPage: _args?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n};\nconst createCustomTransport = (stream, listLogs, listLogsByRunId) => {\n\tlet transport = stream;\n\tif (listLogs) transport.listLogs = listLogs;\n\tif (listLogsByRunId) transport.listLogsByRunId = listLogsByRunId;\n\treturn transport;\n};\nvar MastraLogger = class {\n\tname;\n\tlevel;\n\ttransports;\n\tconstructor(options = {}) {\n\t\tthis.name = options.name || \"Mastra\";\n\t\tthis.level = options.level || LogLevel.ERROR;\n\t\tthis.transports = new Map(Object.entries(options.transports || {}));\n\t}\n\tgetTransports() {\n\t\treturn this.transports;\n\t}\n\ttrackException(_error, _metadata) {}\n\tasync listLogs(transportId, params) {\n\t\tif (!transportId || !this.transports.has(transportId)) return {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: params?.page ?? 1,\n\t\t\tperPage: params?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t\treturn this.transports.get(transportId).listLogs?.(params) ?? {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: params?.page ?? 1,\n\t\t\tperPage: params?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n\tasync listLogsByRunId({ transportId, runId, fromDate, toDate, logLevel, filters, page, perPage }) {\n\t\tif (!transportId || !this.transports.has(transportId) || !runId) return {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: page ?? 1,\n\t\t\tperPage: perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t\treturn this.transports.get(transportId).listLogsByRunId?.({\n\t\t\trunId,\n\t\t\tfromDate,\n\t\t\ttoDate,\n\t\t\tlogLevel,\n\t\t\tfilters,\n\t\t\tpage,\n\t\t\tperPage\n\t\t}) ?? {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: page ?? 1,\n\t\t\tperPage: perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n};\nvar ConsoleLogger = class ConsoleLogger extends MastraLogger {\n\tcomponent;\n\tfilter;\n\t#adapterContext;\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tthis.component = options.component;\n\t\tthis.filter = options.filter;\n\t}\n\t/**\n\t* Adapter hook (see `AdaptableLogger`): enables native trace correlation\n\t* (trace_id/span_id appended to console output) and observability export\n\t* derived from the same record. Called by Mastra during setup.\n\t*/\n\t__attachObservability(ctx) {\n\t\tthis.#adapterContext = ctx;\n\t}\n\tchild(componentOrBindings) {\n\t\tconst component = typeof componentOrBindings === \"string\" ? componentOrBindings : componentOrBindings?.component ?? this.component;\n\t\tconst child = new ConsoleLogger({\n\t\t\tname: this.name,\n\t\t\tlevel: this.level,\n\t\t\tcomponent,\n\t\t\tfilter: this.filter\n\t\t});\n\t\tif (this.#adapterContext) child.__attachObservability(this.#adapterContext);\n\t\treturn child;\n\t}\n\t/**\n\t* Native-record correlation: when a span is active, append the trace\n\t* fields object to the console args so every destination sees them.\n\t*/\n\t#correlate(args) {\n\t\tconst ctx = this.#adapterContext;\n\t\tif (!ctx?.options.correlation) return args;\n\t\ttry {\n\t\t\tconst fields = ctx.resolveTraceFields();\n\t\t\treturn fields ? [...args, fields] : args;\n\t\t} catch {\n\t\t\treturn args;\n\t\t}\n\t}\n\t/**\n\t* Export the record derived from the same native call to observability.\n\t* Mirrors DualLogger semantics: export is independent of the console\n\t* level filter, and never throws into the caller.\n\t*/\n\t#export(level, message, args) {\n\t\tconst ctx = this.#adapterContext;\n\t\tif (!ctx?.options.export) return;\n\t\ttry {\n\t\t\tctx.getLogSink()?.[level](message, buildLogRecordData(args));\n\t\t} catch {}\n\t}\n\tshouldLog(level, message, args) {\n\t\tif (!this.filter) return true;\n\t\ttry {\n\t\t\treturn this.filter({\n\t\t\t\tcomponent: this.component,\n\t\t\t\tlevel,\n\t\t\t\tmessage,\n\t\t\t\targs\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tconsole.error(`[Logger] Filter error for component=${this.component} level=${level}:`, e);\n\t\t\treturn true;\n\t\t}\n\t}\n\tprefix() {\n\t\treturn this.component ? `[${this.component}] ` : \"\";\n\t}\n\tdebug(message, ...args) {\n\t\tif (this.level === LogLevel.DEBUG && this.shouldLog(LogLevel.DEBUG, message, args)) console.info(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"debug\", message, args);\n\t}\n\tinfo(message, ...args) {\n\t\tif ((this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.INFO, message, args)) console.info(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"info\", message, args);\n\t}\n\twarn(message, ...args) {\n\t\tif ((this.level === LogLevel.WARN || this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.WARN, message, args)) console.warn(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"warn\", message, args);\n\t}\n\terror(message, ...args) {\n\t\tif ((this.level === LogLevel.ERROR || this.level === LogLevel.WARN || this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.ERROR, message, args)) console.error(`${this.prefix()}${message}`, ...this.#correlate(args));\n\t\tthis.#export(\"error\", message, args);\n\t}\n\ttrackException(error, metadata) {\n\t\texportTrackedException(this.#adapterContext, error, metadata);\n\t}\n\tasync listLogs(_transportId, _params) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _params?.page ?? 1,\n\t\t\tperPage: _params?.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n\tasync listLogsByRunId(_args) {\n\t\treturn {\n\t\t\tlogs: [],\n\t\t\ttotal: 0,\n\t\t\tpage: _args.page ?? 1,\n\t\t\tperPage: _args.perPage ?? 100,\n\t\t\thasMore: false\n\t\t};\n\t}\n};\nexport { ConsoleLogger, LogLevel, LoggerTransport, MastraLogger, RegisteredLogger, buildLogRecordData, createCustomTransport, exportTrackedException, isAdaptableLogger };\n\n//# sourceMappingURL=index.js.map","import { ConsoleLogger, RegisteredLogger } from \"../logger/index.js\";\n// src/base/MastraBase.ts\nvar MastraBase = class {\n\tcomponent = RegisteredLogger.LLM;\n\tlogger;\n\tname;\n\t#rawConfig;\n\tconstructor({ component, name, rawConfig }) {\n\t\tthis.component = component || RegisteredLogger.LLM;\n\t\tthis.name = name;\n\t\tthis.#rawConfig = rawConfig;\n\t\tthis.logger = new ConsoleLogger({ name: `${this.component} - ${this.name}` });\n\t}\n\t/**\n\t* Returns the raw storage configuration this primitive was created from,\n\t* or undefined if it was created from code.\n\t*/\n\ttoRawConfig() {\n\t\treturn this.#rawConfig;\n\t}\n\t/**\n\t* Sets the raw storage configuration for this primitive.\n\t* @internal\n\t*/\n\t__setRawConfig(rawConfig) {\n\t\tthis.#rawConfig = rawConfig;\n\t}\n\t/**\n\t* Set the logger for the agent\n\t* @param logger\n\t*/\n\t__setLogger(logger) {\n\t\tthis.logger = \"child\" in logger && typeof logger.child === \"function\" ? logger.child({ component: this.component }) : logger;\n\t}\n};\nexport { MastraBase };\n\n//# sourceMappingURL=index.js.map","import { MastraBase } from \"@internal/core/base\";\nimport { PassThrough } from \"stream\";\nimport { experimental_generateSpeech, experimental_transcribe } from \"@internal/ai-sdk-v5\";\n// src/voice/voice.ts\nvar MastraVoice = class extends MastraBase {\n\tlisteningModel;\n\tspeechModel;\n\tspeaker;\n\trealtimeConfig;\n\tconstructor({ listeningModel, speechModel, speaker, realtimeConfig, name } = {}) {\n\t\tsuper({\n\t\t\tcomponent: \"VOICE\",\n\t\t\tname\n\t\t});\n\t\tthis.listeningModel = listeningModel;\n\t\tthis.speechModel = speechModel;\n\t\tthis.speaker = speaker;\n\t\tthis.realtimeConfig = realtimeConfig;\n\t}\n\t/**\n\t* Custom serialization for tracing/observability spans.\n\t* Excludes `apiKey` from listeningModel / speechModel / realtimeConfig\n\t* and any provider-specific state held by subclasses. Subclasses that\n\t* need to expose additional non-sensitive fields can override.\n\t*/\n\tserializeForSpan() {\n\t\treturn {\n\t\t\tcomponent: \"VOICE\",\n\t\t\tname: this.name,\n\t\t\tspeaker: this.speaker,\n\t\t\tlisteningModel: this.listeningModel ? { name: this.listeningModel.name } : void 0,\n\t\t\tspeechModel: this.speechModel ? { name: this.speechModel.name } : void 0,\n\t\t\trealtimeModel: this.realtimeConfig?.model\n\t\t};\n\t}\n\tupdateConfig(_options) {\n\t\tthis.logger.debug(\"updateConfig not implemented by this voice provider\");\n\t}\n\t/**\n\t* Initializes a WebSocket or WebRTC connection for real-time communication\n\t* @returns Promise that resolves when the connection is established\n\t*/\n\tasync connect(_options) {\n\t\tthis.logger.debug(\"connect not implemented by this voice provider\");\n\t}\n\t/**\n\t* Relay audio data to the voice provider for real-time processing\n\t* @param audioData Audio data to relay\n\t*/\n\tasync send(_audioData) {\n\t\tthis.logger.debug(\"relay not implemented by this voice provider\");\n\t}\n\t/**\n\t* Trigger voice providers to respond\n\t*/\n\tasync answer(_options) {\n\t\tthis.logger.debug(\"answer not implemented by this voice provider\");\n\t}\n\t/**\n\t* Equip the voice provider with instructions\n\t* @param instructions Instructions to add\n\t*/\n\taddInstructions(_instructions) {}\n\t/**\n\t* Equip the voice provider with tools\n\t* @param tools Array of tools to add\n\t*/\n\taddTools(_tools) {}\n\t/**\n\t* Disconnect from the WebSocket or WebRTC connection\n\t*/\n\tclose() {\n\t\tthis.logger.debug(\"close not implemented by this voice provider\");\n\t}\n\t/**\n\t* Register an event listener\n\t* @param event Event name (e.g., 'speaking', 'writing', 'error')\n\t* @param callback Callback function that receives event data\n\t*/\n\ton(_event, _callback) {\n\t\tthis.logger.debug(\"on not implemented by this voice provider\");\n\t}\n\t/**\n\t* Remove an event listener\n\t* @param event Event name (e.g., 'speaking', 'writing', 'error')\n\t* @param callback Callback function to remove\n\t*/\n\toff(_event, _callback) {\n\t\tthis.logger.debug(\"off not implemented by this voice provider\");\n\t}\n\t/**\n\t* Get available speakers/voices\n\t* @returns Array of available voice IDs and their metadata\n\t*/\n\tgetSpeakers() {\n\t\tthis.logger.debug(\"getSpeakers not implemented by this voice provider\");\n\t\treturn Promise.resolve([]);\n\t}\n\t/**\n\t* Get available speakers/voices\n\t* @returns Array of available voice IDs and their metadata\n\t*/\n\tgetListener() {\n\t\tthis.logger.debug(\"getListener not implemented by this voice provider\");\n\t\treturn Promise.resolve({ enabled: false });\n\t}\n};\n// src/voice/aisdk/speech.ts\nvar AISDKSpeech = class extends MastraVoice {\n\tmodel;\n\tdefaultVoice;\n\tconstructor(model, options) {\n\t\tsuper({ name: \"ai-sdk-speech\" });\n\t\tthis.model = model;\n\t\tthis.defaultVoice = options?.voice;\n\t}\n\tasync speak(input, options) {\n\t\tconst text = typeof input === \"string\" ? input : await this.streamToText(input);\n\t\tconst result = await experimental_generateSpeech({\n\t\t\tmodel: this.model,\n\t\t\ttext,\n\t\t\tvoice: options?.speaker || this.defaultVoice,\n\t\t\tlanguage: options?.language,\n\t\t\tproviderOptions: options?.providerOptions,\n\t\t\tabortSignal: options?.abortSignal,\n\t\t\theaders: options?.headers\n\t\t});\n\t\tconst stream = new PassThrough();\n\t\tstream.end(Buffer.from(result.audio.uint8Array));\n\t\treturn stream;\n\t}\n\tasync listen() {\n\t\tthrow new Error(\"AI SDK speech models do not support transcription. Use AISDKTranscription instead.\");\n\t}\n\tasync getSpeakers() {\n\t\treturn [];\n\t}\n\tasync getListener() {\n\t\treturn { enabled: false };\n\t}\n\tasync streamToText(stream) {\n\t\tconst chunks = [];\n\t\tfor await (const chunk of stream) chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));\n\t\treturn Buffer.concat(chunks).toString(\"utf-8\");\n\t}\n};\n// src/voice/aisdk/transcription.ts\nvar AISDKTranscription = class extends MastraVoice {\n\tmodel;\n\tconstructor(model) {\n\t\tsuper({ name: \"ai-sdk-transcription\" });\n\t\tthis.model = model;\n\t}\n\tasync speak() {\n\t\tthrow new Error(\"AI SDK transcription models do not support text-to-speech. Use AISDKSpeech instead.\");\n\t}\n\tasync getSpeakers() {\n\t\treturn [];\n\t}\n\tasync getListener() {\n\t\treturn { enabled: true };\n\t}\n\t/**\n\t* Transcribe audio to text\n\t* For enhanced metadata (segments, language, duration), use AI SDK's transcribe() directly\n\t*/\n\tasync listen(audioStream, options) {\n\t\tconst audioBuffer = await this.convertToBuffer(audioStream);\n\t\treturn (await experimental_transcribe({\n\t\t\tmodel: this.model,\n\t\t\taudio: audioBuffer,\n\t\t\tproviderOptions: options?.providerOptions,\n\t\t\tabortSignal: options?.abortSignal,\n\t\t\theaders: options?.headers\n\t\t})).text;\n\t}\n\tasync convertToBuffer(audio) {\n\t\tif (Buffer.isBuffer(audio)) return audio;\n\t\tif (audio instanceof Uint8Array) return Buffer.from(audio);\n\t\tif (typeof audio === \"string\") return Buffer.from(audio, \"base64\");\n\t\tconst chunks = [];\n\t\tfor await (const chunk of audio) chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));\n\t\treturn Buffer.concat(chunks);\n\t}\n};\nexport { AISDKSpeech as n, MastraVoice as r, AISDKTranscription as t };\n\n//# sourceMappingURL=aisdk-c08VRfTf.js.map","/**\n * List of available voices for Murf TTS\n */\nexport const MURF_VOICES = [\n 'en-UK-hazel',\n 'en-US-cooper',\n 'en-US-imani',\n 'it-IT-giorgio',\n 'en-US-wayne',\n 'en-IN-shivani',\n 'en-US-daniel',\n 'bn-IN-anwesha',\n 'es-MX-alejandro',\n 'en-AU-joyce',\n 'en-US-zion',\n 'en-IN-isha',\n 'en-US-riley',\n 'ko-KR-hwan',\n 'fr-FR-adélie',\n 'en-US-carter',\n 'en-UK-gabriel',\n 'en-UK-juliet',\n 'en-IN-arohi',\n 'fr-FR-maxime',\n 'de-DE-josephine',\n 'en-UK-hugo',\n 'en-US-samantha',\n 'de-DE-erna',\n 'zh-CN-baolin',\n 'pt-BR-isadora',\n 'it-IT-vincenzo',\n 'en-US-terrell',\n 'en-US-denzel',\n 'en-UK-heidi',\n 'en-US-miles',\n 'en-US-abigail',\n 'fr-FR-justine',\n 'it-IT-greta',\n 'en-AU-shane',\n 'en-UK-peter',\n 'nl-NL-famke',\n 'en-AU-ivy',\n 'nl-NL-dirk',\n 'fr-FR-axel',\n 'es-ES-carla',\n 'en-US-claire',\n 'ko-KR-jangmi',\n 'ko-KR-sanghoon',\n 'it-IT-vera',\n 'hi-IN-rahul',\n 'es-ES-elvira',\n 'es-ES-enrique',\n 'en-UK-aiden',\n 'en-US-ronnie',\n 'en-UK-amber',\n 'hi-IN-shweta',\n 'hi-IN-amit',\n 'en-AU-jimm',\n 'en-UK-pearl',\n 'pt-BR-benício',\n 'en-UK-freddie',\n 'en-US-ryan',\n 'pt-BR-eloa',\n 'en-US-charlotte',\n 'de-DE-lia',\n 'en-US-natalie',\n 'en-US-michelle',\n 'en-US-phoebe',\n 'es-ES-carmen',\n 'en-US-caleb',\n 'en-US-iris',\n 'en-UK-harrison',\n 'en-US-marcus',\n 'en-US-josie',\n 'en-US-daisy',\n 'en-US-charles',\n 'en-UK-reggie',\n 'en-US-julia',\n 'en-SCOTT-emily',\n 'en-US-dylan',\n 'es-MX-valeria',\n 'en-IN-eashwar',\n 'en-AU-evelyn',\n 'de-DE-lara',\n 'en-US-evander',\n 'en-SCOTT-rory',\n 'ta-IN-iniya',\n 'en-AU-leyton',\n 'fr-FR-louise',\n 'zh-CN-wei',\n 'ko-KR-gyeong',\n 'de-DE-matthias',\n 'en-IN-rohan',\n 'en-US-delilah',\n 'bn-IN-abhik',\n 'en-US-angela',\n 'en-US-naomi',\n 'es-MX-carlos',\n 'nl-NL-merel',\n 'en-US-alicia',\n 'en-IN-alia',\n 'zh-CN-jiao',\n 'en-US-june',\n 'en-AU-ashton',\n 'en-UK-finley',\n 'pl-PL-blazej',\n 'zh-CN-zhang',\n 'en-AU-kylie',\n 'en-US-jayden',\n 'en-IN-aarav',\n 'de-DE-björn',\n 'bn-IN-ishani',\n 'zh-CN-yuxan',\n 'fr-FR-louis',\n 'ko-KR-jong-su',\n 'en-AU-harper',\n 'en-UK-ruby',\n 'en-US-ken',\n 'ta-IN-mani',\n 'de-DE-ralf',\n 'en-UK-jaxon',\n 'en-US-river',\n 'en-IN-priya',\n 'en-UK-theo',\n 'en-UK-katie',\n 'pl-PL-jacek',\n 'it-IT-lorenzo',\n 'hi-IN-shaan',\n 'en-US-amara',\n 'en-UK-mason',\n 'en-IN-surya',\n 'en-US-finn',\n 'pt-BR-gustavo',\n 'hi-IN-kabir',\n 'es-ES-javier',\n 'en-AU-mitch',\n 'pt-BR-heitor',\n 'en-US-edmund',\n 'hi-IN-ayushi',\n 'pl-PL-kasia',\n 'es-MX-luisa',\n 'zh-CN-tao',\n 'en-US-molly',\n] as const;\n\nexport type MurfVoiceId = (typeof MURF_VOICES)[number];\n","import { PassThrough } from 'node:stream';\nimport { MastraVoice } from '@internal/voice';\nimport { MURF_VOICES } from './voices';\nimport type { MurfVoiceId } from './voices';\n\ntype MurfConfig = {\n name: 'GEN1' | 'GEN2';\n apiKey?: string;\n properties?: Omit<SpeechCreateParams, 'modelVersion' | 'voiceId' | 'text'>;\n};\n\ntype SpeechCreateParams = {\n voiceId: MurfVoiceId;\n text: string;\n modelVersion: 'GEN1' | 'GEN2';\n style?: string;\n rate?: number;\n pitch?: number;\n sampleRate?: 8000 | 24000 | 44100 | 48000;\n format?: 'MP3' | 'WAV' | 'FLAC' | 'ALAW' | 'ULAW';\n channelType?: 'STEREO' | 'MONO';\n pronunciationDictionary?: Record<string, string>;\n encodeAsBase64?: boolean;\n variation?: number;\n audioDuration?: number;\n multiNativeLocale?: string;\n};\n\ntype SpeechCreateResponse = {\n audioFile: string;\n audioLengthInSeconds: number;\n consumedCharacterCount: number;\n encodedAudio: string;\n remainingCharacterCount: number;\n warning: string;\n wordDurations: {\n endMs: number;\n pitchScaleMaximum: number;\n pitchScaleMinimum: number;\n sourceWordIndex: number;\n startMs: number;\n word: string;\n }[];\n};\n\nconst DEFAULT_RETRY_COUNT = 2;\nconst RETRY_STATUS_CODES = new Set([408, 413, 429, 500, 502, 503, 504]);\nconst RETRY_DELAY_MS = 300;\n\nexport class MurfVoice extends MastraVoice {\n private baseUrl = 'https://api.murf.ai';\n private apiKey: string;\n private defaultVoice: MurfVoiceId;\n private properties: Omit<SpeechCreateParams, 'modelVersion' | 'voiceId' | 'text'>;\n\n constructor({ speechModel, speaker }: { speechModel?: MurfConfig; speaker?: string } = {}) {\n super({\n speechModel: {\n name: speechModel?.name ?? 'GEN2',\n apiKey: speechModel?.apiKey ?? process.env.MURF_API_KEY,\n },\n speaker: speaker ?? MURF_VOICES[0],\n });\n\n const apiKey = this.speechModel?.apiKey;\n if (!apiKey) {\n throw new Error('MURF_API_KEY is not set');\n }\n\n this.apiKey = apiKey;\n\n this.properties = {\n ...speechModel?.properties,\n };\n\n this.defaultVoice = (speaker as MurfVoiceId) ?? MURF_VOICES[0];\n }\n\n private async streamToString(stream: NodeJS.ReadableStream): Promise<string> {\n const chunks: Buffer[] = [];\n for await (const chunk of stream) {\n if (typeof chunk === 'string') {\n chunks.push(Buffer.from(chunk));\n } else {\n chunks.push(chunk);\n }\n }\n return Buffer.concat(chunks).toString('utf-8');\n }\n\n async speak(\n input: string | NodeJS.ReadableStream,\n options?: { speaker?: string; properties?: Omit<SpeechCreateParams, 'modelVersion' | 'voiceId' | 'text'> },\n ): Promise<NodeJS.ReadableStream> {\n const text = typeof input === 'string' ? input : await this.streamToString(input);\n\n const response = await this.makeRequest<SpeechCreateResponse>('/v1/speech/generate', {\n voiceId: (options?.speaker || this.defaultVoice) as MurfVoiceId,\n text,\n modelVersion: this.speechModel?.name,\n ...this.properties,\n ...options?.properties,\n });\n\n // Create a PassThrough stream for the audio\n const stream = new PassThrough();\n\n // Get the audio file as a stream\n const audioResponse = await fetch(response.audioFile);\n if (!audioResponse.body) {\n throw new Error('No response body received');\n }\n\n // Process the stream\n const reader = audioResponse.body.getReader();\n (async () => {\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n stream.end();\n break;\n }\n stream.write(value);\n }\n } catch (error) {\n stream.destroy(error as Error);\n }\n })().catch(error => {\n stream.destroy(error as Error);\n });\n\n return stream;\n }\n\n /**\n * Checks if listening capabilities are enabled.\n *\n * @returns {Promise<{ enabled: boolean }>}\n */\n async getListener() {\n return { enabled: false };\n }\n\n async listen(\n _input: NodeJS.ReadableStream,\n _options?: Record<string, unknown>,\n ): Promise<string | NodeJS.ReadableStream> {\n throw new Error('Murf does not support speech recognition');\n }\n\n private async makeRequest<T>(endpoint: string, payload: Record<string, unknown>): Promise<T> {\n let lastError: Error | undefined;\n\n for (let attempt = 0; attempt <= DEFAULT_RETRY_COUNT; attempt++) {\n if (attempt > 0) {\n await new Promise(resolve => setTimeout(resolve, RETRY_DELAY_MS * 2 ** (attempt - 1)));\n }\n\n const res = await fetch(`${this.baseUrl}${endpoint}`, {\n method: 'POST',\n headers: {\n 'api-key': this.apiKey,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(payload),\n });\n\n if (res.ok) {\n return (await res.json()) as T;\n }\n\n if (!RETRY_STATUS_CODES.has(res.status) || attempt === DEFAULT_RETRY_COUNT) {\n let errorMessage: string;\n try {\n const error = (await res.json()) as { message?: string };\n errorMessage = error.message || res.statusText;\n } catch {\n errorMessage = res.statusText;\n }\n throw new Error(`Murf API Error: ${errorMessage}`);\n }\n\n lastError = new Error(`Murf API Error: ${res.statusText}`);\n }\n\n throw lastError ?? new Error('Murf API Error: request failed');\n }\n\n async getSpeakers() {\n return MURF_VOICES.map(voice => ({\n voiceId: voice,\n name: voice,\n language: voice.split('-')[0],\n gender: 'neutral',\n }));\n }\n}\n\nexport type { MurfConfig, MurfVoiceId };\n"],"mappings":";;;;;;;AAUA,SAAS,uBAAuB,KAAK,OAAO,UAAU;CACrD,IAAI,CAAC,KAAK,QAAQ,QAAQ;CAC1B,IAAI;EACH,MAAM,cAAc;EACpB,IAAI,WAAW,CAAC,EAAE,MAAM,MAAM,SAAS;GACtC,GAAG,YAAY,OAAO,KAAK,IAAI,EAAE,SAAS,YAAY,GAAG,IAAI,CAAC;GAC9D,GAAG,YAAY,WAAW,KAAK,IAAI,EAAE,QAAQ,YAAY,OAAO,IAAI,CAAC;GACrE,GAAG,YAAY,aAAa,KAAK,IAAI,EAAE,UAAU,YAAY,SAAS,IAAI,CAAC;GAC3E,GAAG,YAAY,YAAY,KAAK,IAAI,EAAE,SAAS,YAAY,QAAQ,IAAI,CAAC;GACxE,GAAG,MAAM,iBAAiB,QAAQ,EAAE,OAAO,MAAM,MAAM,QAAQ,IAAI,CAAC;GACpE,GAAG;EACJ,CAAC;CACF,QAAQ,CAAC;AACV;;;;;;;AAOA,SAAS,mBAAmB,MAAM;CACjC,MAAM,aAAa,KAAK,MAAM,QAAQ,QAAQ,QAAQ,OAAO,QAAQ,YAAY,CAAC,MAAM,QAAQ,GAAG,KAAK,EAAE,eAAe,MAAM;CAC/H,MAAM,WAAW,KAAK,MAAM,QAAQ,eAAe,KAAK;CACxD,MAAM,YAAY,KAAK,QAAQ,QAAQ,QAAQ,cAAc,QAAQ,QAAQ;CAC7E,IAAI,CAAC,cAAc,CAAC,YAAY,UAAU,WAAW,GAAG,OA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A;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;AClGA,MAAM,sBAAsB;AAC5B,MAAM,qCAAqB,IAAI,IAAI;CAAC;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;AAAG,CAAC;AACtE,MAAM,iBAAiB;AAEvB,IAAa,YAAb,cAA+B,YAAY;CACzC,UAAkB;CAClB;CACA;CACA;CAEA,YAAY,EAAE,aAAa,YAA4D,CAAC,GAAG;EACzF,MAAM;GACJ,aAAa;IACX,MAAM,aAAa,QAAQ;IAC3B,QAAQ,aAAa,UAAU,QAAQ,IAAI;GAC7C;GACA,SAAS,WAAW,YAAY;EAClC,CAAC;EAED,MAAM,SAAS,KAAK,aAAa;EACjC,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,yBAAyB;EAG3C,KAAK,SAAS;EAEd,KAAK,aAAa,EAChB,GAAG,aAAa,WAClB;EAEA,KAAK,eAAgB,WAA2B,YAAY;CAC9D;CAEA,MAAc,eAAe,QAAgD;EAC3E,MAAM,SAAmB,CAAC;EAC1B,WAAW,MAAM,SAAS,QACxB,IAAI,OAAO,UAAU,UACnB,OAAO,KAAK,OAAO,KAAK,KAAK,CAAC;OAE9B,OAAO,KAAK,KAAK;EAGrB,OAAO,OAAO,OAAO,MAAM,CAAC,CAAC,SA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IAAI,IAAI,IACN,OAAQ,MAAM,IAAI,KAAK;GAGzB,IAAI,CAAC,mBAAmB,IAAI,IAAI,MAAM,KAAK,YAAY,qBAAqB;IAC1E,IAAI;IACJ,IAAI;KAEF,gBAAe,MADM,IAAI,KAAK,EAAA,CACT,WAAW,IAAI;IACtC,QAAQ;KACN,eAAe,IAAI;IACrB;IACA,MAAM,IAAI,MAAM,mBAAmB,cAAc;GACnD;GAEA,4BAAY,IAAI,MAAM,mBAAmB,IAAI,YAAY;EAC3D;EAEA,MAAM,6BAAa,IAAI,MAAM,gCAAgC;CAC/D;CAEA,MAAM,cAAc;EAClB,OAAO,YAAY,KAAI,WAAU;GAC/B,SAAS;GACT,MAAM;GACN,UAAU,MAAM,MAAM,GAAG,CAAC,CAAC;GAC3B,QAAQ;EACV,EAAE;CACJ;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/voice-murf",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "description": "Mastra Murf voice integration",
5
5
  "type": "module",
6
6
  "files": [
@@ -23,16 +23,16 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "devDependencies": {
26
- "@types/node": "22.20.1",
27
- "@vitest/coverage-v8": "4.1.11",
28
- "@vitest/ui": "4.1.11",
29
- "tsdown": "0.22.9",
30
- "tsx": "^4.23.1",
26
+ "@types/node": "22.19.15",
27
+ "@vitest/coverage-v8": "4.1.12",
28
+ "@vitest/ui": "4.1.12",
29
+ "tsdown": "0.23.1",
30
+ "tsx": "^4.23.15",
31
31
  "typescript": "^7.0.2",
32
- "vitest": "4.1.11",
33
- "@internal/lint": "0.0.145",
34
- "@internal/types-builder": "0.0.120",
35
- "@internal/voice": "0.0.42"
32
+ "vitest": "4.1.12",
33
+ "@internal/lint": "0.0.146",
34
+ "@internal/types-builder": "0.0.121",
35
+ "@internal/voice": "0.0.43"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "zod": "^3.25.0 || ^4.0.0"