@mastra/core 0.2.0-alpha.98 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/agent/index.d.ts +6 -8
  2. package/dist/agent/index.js +15 -7
  3. package/dist/{telemetry-oCUM52DG.d.ts → base-BbtPAA6f.d.ts} +50 -8
  4. package/dist/{index-Cwb-5AzX.d.ts → base-Bpb7Dmwe.d.ts} +367 -320
  5. package/dist/base.d.ts +3 -43
  6. package/dist/base.js +3 -3
  7. package/dist/bundler/index.d.ts +3 -4
  8. package/dist/bundler/index.js +4 -4
  9. package/dist/{chunk-MCB4M5W4.js → chunk-22LC46YN.js} +3 -9
  10. package/dist/{chunk-MG3WAQV7.js → chunk-2JL6DQMZ.js} +20 -28
  11. package/dist/chunk-2SAHBQEF.js +3 -0
  12. package/dist/chunk-3HBFW3Q7.js +24 -0
  13. package/dist/{chunk-KNPBNSJ7.js → chunk-55GTEVHJ.js} +12 -13
  14. package/dist/chunk-65VPTVVP.js +218 -0
  15. package/dist/chunk-AWEACB2T.js +66 -0
  16. package/dist/chunk-C6A6W6XS.js +49 -0
  17. package/dist/chunk-FGZVE4CM.js +404 -0
  18. package/dist/{chunk-TYIBRZOY.js → chunk-J3W3IHDO.js} +120 -87
  19. package/dist/chunk-K36NSQWH.js +10 -0
  20. package/dist/{chunk-QXH6EK72.js → chunk-K4DFI76V.js} +382 -370
  21. package/dist/{chunk-42DYOLDV.js → chunk-MEISIZMP.js} +13 -21
  22. package/dist/chunk-MLWGYRJR.js +87 -0
  23. package/dist/{chunk-ICMEXHKD.js → chunk-O2VP5JBC.js} +48 -55
  24. package/dist/{chunk-ZJOMHCWE.js → chunk-OJ26F3J4.js} +98 -153
  25. package/dist/chunk-RG66XEJT.js +8 -0
  26. package/dist/chunk-SB37QG7O.js +1203 -0
  27. package/dist/chunk-SDBM53G4.js +32 -0
  28. package/dist/{chunk-4LJFWC2Q.js → chunk-SIFBBGY6.js} +59 -85
  29. package/dist/chunk-U6J2FOU4.js +624 -0
  30. package/dist/chunk-VB7CO5ND.js +31 -0
  31. package/dist/{chunk-C55JWGDU.js → chunk-ZJOXJFJI.js} +43 -15
  32. package/dist/deployer/index.d.ts +2 -4
  33. package/dist/deployer/index.js +5 -5
  34. package/dist/eval/index.d.ts +8 -13
  35. package/dist/eval/index.js +3 -3
  36. package/dist/filter/index.js +2 -2
  37. package/dist/hooks/index.d.ts +13 -18
  38. package/dist/hooks/index.js +2 -2
  39. package/dist/{index-CBZ2mk2H.d.ts → index-B2JCcAQt.d.ts} +1 -1
  40. package/dist/index.d.ts +15 -15
  41. package/dist/index.js +43 -69
  42. package/dist/integration/index.d.ts +8 -10
  43. package/dist/integration/index.js +6 -3
  44. package/dist/llm/index.d.ts +6 -8
  45. package/dist/llm/index.js +1 -1
  46. package/dist/logger/index.d.ts +1 -1
  47. package/dist/logger/index.js +2 -2
  48. package/dist/mastra/index.d.ts +10 -13
  49. package/dist/mastra/index.js +20 -4
  50. package/dist/memory/index.d.ts +8 -10
  51. package/dist/memory/index.js +11 -9
  52. package/dist/relevance/index.js +16 -8
  53. package/dist/storage/index.d.ts +21 -10
  54. package/dist/storage/index.js +8 -7
  55. package/dist/telemetry/index.d.ts +35 -5
  56. package/dist/telemetry/index.js +3 -2
  57. package/dist/telemetry/otel-vendor.d.ts +7 -0
  58. package/dist/telemetry/otel-vendor.js +8 -0
  59. package/dist/tools/index.d.ts +6 -8
  60. package/dist/tools/index.js +2 -2
  61. package/dist/tts/index.d.ts +2 -4
  62. package/dist/tts/index.js +6 -5
  63. package/dist/{metric-BWeQNZt6.d.ts → types-m9RryK9a.d.ts} +6 -1
  64. package/dist/utils.js +2 -2
  65. package/dist/vector/index.d.ts +4 -6
  66. package/dist/vector/index.js +4 -4
  67. package/dist/vector/libsql/index.d.ts +2 -4
  68. package/dist/vector/libsql/index.js +6 -6
  69. package/dist/{workflow-DTtv7_Eq.d.ts → workflow-Cy8UTGCt.d.ts} +3 -6
  70. package/dist/workflows/index.d.ts +7 -9
  71. package/dist/workflows/index.js +4 -4
  72. package/package.json +14 -10
  73. package/dist/chunk-4ZUSEHLH.js +0 -285
  74. package/dist/chunk-AJJZUHB4.js +0 -14
  75. package/dist/chunk-G4MCO7XF.js +0 -70
  76. package/dist/chunk-HBTQNIAX.js +0 -90
  77. package/dist/chunk-HPXWJBQK.js +0 -222
  78. package/dist/chunk-JJ57BXQR.js +0 -16
  79. package/dist/chunk-JP37ODNX.js +0 -36
  80. package/dist/chunk-K3N7KJHH.js +0 -52
  81. package/dist/chunk-MDM2JS2U.js +0 -1288
  82. package/dist/chunk-VOUPGVRD.js +0 -27
  83. package/dist/chunk-Z7JFMQZZ.js +0 -551
  84. /package/dist/{chunk-AE3H2QEY.js → chunk-VDOJTUYY.js} +0 -0
@@ -1,16 +1,14 @@
1
1
  import 'ai';
2
2
  import 'json-schema';
3
3
  import 'zod';
4
- export { A as Agent } from '../index-Cwb-5AzX.js';
5
- import '../base.js';
6
- import '../metric-BWeQNZt6.js';
7
- import '../telemetry-oCUM52DG.js';
4
+ export { A as Agent } from '../base-Bpb7Dmwe.js';
5
+ import '../base-BbtPAA6f.js';
6
+ import '../types-m9RryK9a.js';
8
7
  import 'sift';
9
- import '../index-CBZ2mk2H.js';
10
- import 'pino';
11
- import 'stream';
12
8
  import '../vector/index.js';
13
9
  import '@opentelemetry/api';
14
- import '@opentelemetry/sdk-node';
10
+ import '../index-B2JCcAQt.js';
11
+ import 'pino';
12
+ import 'stream';
15
13
  import '@opentelemetry/sdk-trace-base';
16
14
  import '../tts/index.js';
@@ -1,7 +1,15 @@
1
- export { Agent } from '../chunk-QXH6EK72.js';
2
- import '../chunk-4ZUSEHLH.js';
3
- import '../chunk-KNPBNSJ7.js';
4
- import '../chunk-G4MCO7XF.js';
5
- import '../chunk-ICMEXHKD.js';
6
- import '../chunk-HBTQNIAX.js';
7
- import '../chunk-AJJZUHB4.js';
1
+ export { Agent } from '../chunk-K4DFI76V.js';
2
+ import '../chunk-FGZVE4CM.js';
3
+ import '../chunk-2SAHBQEF.js';
4
+ import '../chunk-65VPTVVP.js';
5
+ import '../chunk-U6J2FOU4.js';
6
+ import '../chunk-RG66XEJT.js';
7
+ import '../chunk-OJ26F3J4.js';
8
+ import '../chunk-ZJOXJFJI.js';
9
+ import '../chunk-55GTEVHJ.js';
10
+ import '../chunk-AWEACB2T.js';
11
+ import '../chunk-O2VP5JBC.js';
12
+ import '../chunk-VB7CO5ND.js';
13
+ import '../chunk-MLWGYRJR.js';
14
+ import '../chunk-SIFBBGY6.js';
15
+ import '../chunk-C6A6W6XS.js';
@@ -1,5 +1,6 @@
1
- import { Tracer } from '@opentelemetry/api';
2
- import { NodeSDK } from '@opentelemetry/sdk-node';
1
+ import * as _opentelemetry_api from '@opentelemetry/api';
2
+ import { Tracer, Span } from '@opentelemetry/api';
3
+ import { R as RegisteredLogger, L as Logger, a as LogLevel } from './index-B2JCcAQt.js';
3
4
  import { SpanExporter } from '@opentelemetry/sdk-trace-base';
4
5
 
5
6
  /** Sampling strategy configuration for OpenTelemetry */
@@ -29,6 +30,8 @@ type OtelConfig = {
29
30
  serviceName?: string;
30
31
  /** Whether telemetry is enabled. Defaults to true */
31
32
  enabled?: boolean;
33
+ /** Name of the tracer to use. Defaults to 'mastra-tracer' */
34
+ tracerName?: string;
32
35
  /** Sampling configuration to control trace data volume */
33
36
  sampling?: SamplingStrategy;
34
37
  /** Export configuration for sending telemetry data */
@@ -44,22 +47,22 @@ type OtelConfig = {
44
47
  type: 'console';
45
48
  } | {
46
49
  type: 'custom';
50
+ tracerName?: string;
47
51
  exporter: SpanExporter;
48
52
  };
49
53
  };
50
54
 
51
55
  declare global {
52
- var __OTEL_SDK__: NodeSDK | undefined;
53
56
  var __TELEMETRY__: Telemetry | undefined;
54
57
  }
55
58
  declare class Telemetry {
56
- private sdk;
57
59
  tracer: Tracer;
58
60
  name: string;
59
- private static isInitialized;
60
- private getSampler;
61
61
  private constructor();
62
- private shutdown;
62
+ /**
63
+ * @deprecated This method does not do anything
64
+ */
65
+ shutdown(): Promise<void>;
63
66
  /**
64
67
  * Initialize telemetry with the given configuration
65
68
  * @param config - Optional telemetry configuration object
@@ -98,7 +101,46 @@ declare class Telemetry {
98
101
  spanName: string;
99
102
  attributes?: Record<string, string>;
100
103
  skipIfNoTelemetry?: boolean;
104
+ parentSpan?: Span;
101
105
  }): TMethod;
106
+ getBaggageTracer(): Tracer;
107
+ }
108
+
109
+ declare class MastraBase {
110
+ component: RegisteredLogger;
111
+ protected logger: Logger;
112
+ name?: string;
113
+ telemetry?: Telemetry;
114
+ constructor({ component, name }: {
115
+ component?: RegisteredLogger;
116
+ name?: string;
117
+ });
118
+ /**
119
+ * Set the logger for the agent
120
+ * @param logger
121
+ */
122
+ __setLogger(logger: Logger): void;
123
+ /**
124
+ * Internal logging helper that formats and sends logs to the configured logger
125
+ * @param level - Severity level of the log
126
+ * @param message - Main log message
127
+ * @param opts - Optional object for the log
128
+ */
129
+ log(level: LogLevel, message: string, opts?: Record<string, any>): void;
130
+ /**
131
+ * Set the telemetry for the
132
+ * @param telemetry
133
+ */
134
+ __setTelemetry(telemetry: Telemetry): void;
135
+ /**
136
+ * Get the telemetry on the vector
137
+ * @returns telemetry
138
+ */
139
+ __getTelemetry(): Telemetry | undefined;
140
+ get experimental_telemetry(): {
141
+ tracer: _opentelemetry_api.Tracer;
142
+ isEnabled: boolean;
143
+ } | undefined;
102
144
  }
103
145
 
104
- export { type OtelConfig as O, type SamplingStrategy as S, Telemetry as T };
146
+ export { MastraBase as M, type OtelConfig as O, type SamplingStrategy as S, Telemetry as T };