@mastra/deepeval 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/LICENSE.md +30 -0
- package/dist/index.cjs +30 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/tracing.d.ts +16 -0
- package/dist/tracing.d.ts.map +1 -0
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @mastra/deepeval
|
|
2
2
|
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added the `@mastra/deepeval` observability exporter to send Mastra traces to Confident AI for evaluation and monitoring. ([#20599](https://github.com/mastra-ai/mastra/pull/20599))
|
|
8
|
+
|
|
9
|
+
Register it in your Mastra observability config:
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { Mastra } from '@mastra/core';
|
|
13
|
+
import { Observability } from '@mastra/observability';
|
|
14
|
+
import { DeepEvalExporter } from '@mastra/deepeval';
|
|
15
|
+
|
|
16
|
+
export const mastra = new Mastra({
|
|
17
|
+
observability: new Observability({
|
|
18
|
+
configs: {
|
|
19
|
+
deepeval: {
|
|
20
|
+
serviceName: 'my-service',
|
|
21
|
+
exporters: [new DeepEvalExporter()],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Set `CONFIDENT_API_KEY` (and optionally `CONFIDENT_TRACE_ENVIRONMENT`) to send traces. Mastra spans map to Confident AI's `AGENT`, `LLM`, `TOOL`, `RETRIEVER`, and `CUSTOM` span types, with model, token counts, tool calls, and metric collections carried through.
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Updated dependencies [[`8d2399b`](https://github.com/mastra-ai/mastra/commit/8d2399b638f8e0945cf2cda0187dbea8dcf0b784), [`c8002da`](https://github.com/mastra-ai/mastra/commit/c8002da7775c468e2965b6ff5f82045450fa8cb9), [`92be47f`](https://github.com/mastra-ai/mastra/commit/92be47fbd26ffccec0e2131ef7c1d9e70dd5ef4a), [`89200ba`](https://github.com/mastra-ai/mastra/commit/89200bafa05444bb7949b363ce7b743e29867561), [`3d6ae10`](https://github.com/mastra-ai/mastra/commit/3d6ae107c009a40cef08e83da6866c20783d7ac1), [`c950138`](https://github.com/mastra-ai/mastra/commit/c950138e72e4f317a40187e3800588731ab790ce), [`810c7e7`](https://github.com/mastra-ai/mastra/commit/810c7e74929989d8b8b5db52cd3af22cd0998af4), [`063c8b2`](https://github.com/mastra-ai/mastra/commit/063c8b2eb14e4e5ca021779bc33e8c3c031c8604), [`f9f9884`](https://github.com/mastra-ai/mastra/commit/f9f98848ee194dc71a787a709ec430b065cdc41b), [`e0904dc`](https://github.com/mastra-ai/mastra/commit/e0904dc538792e54e1806b70172e5900ac49bff4), [`9672fab`](https://github.com/mastra-ai/mastra/commit/9672fabfbcadb961a35c22a2d6722e077f7b24b9), [`f4e964c`](https://github.com/mastra-ai/mastra/commit/f4e964cad57057301d6bed5c55bcdd730175b941), [`1f7bbd7`](https://github.com/mastra-ai/mastra/commit/1f7bbd7785a8d230aad02454ecabeb4a0b2cc96f), [`e47ff36`](https://github.com/mastra-ai/mastra/commit/e47ff36945720f4ee4caa09f6e83514d7d188608), [`64d6781`](https://github.com/mastra-ai/mastra/commit/64d67814bccddd314f7e09643243821e57cb87b6), [`fb9a6ac`](https://github.com/mastra-ai/mastra/commit/fb9a6ac11c9560518742ece60b49d6b062845fd3), [`aa2cec8`](https://github.com/mastra-ai/mastra/commit/aa2cec8501f634d51c2f3ebfb3dd3aa7af8d2ca2), [`c848e65`](https://github.com/mastra-ai/mastra/commit/c848e655a64ff10331a8ceafafe7f18e70a0f092), [`2adf8eb`](https://github.com/mastra-ai/mastra/commit/2adf8eb4a70ed2b6cff2dd39281496ea0e025fac), [`0494489`](https://github.com/mastra-ai/mastra/commit/049448906e4c3d2d615bbe865b073a0d890ddb7c), [`8d1aeb8`](https://github.com/mastra-ai/mastra/commit/8d1aeb8acf7c20c4bb8e4d8e4bdc6569c83ac561), [`8264611`](https://github.com/mastra-ai/mastra/commit/8264611510e421b818bc7395dc2ae4d9c2d518b2), [`d8fa243`](https://github.com/mastra-ai/mastra/commit/d8fa2430d21113e330c4e676ac65e1235cf44f81), [`44fc98b`](https://github.com/mastra-ai/mastra/commit/44fc98b9d1242aa87a3ab44bdce9e9f12c44d8c9), [`f933ba3`](https://github.com/mastra-ai/mastra/commit/f933ba32700e1d0bf143311c1a08f88300b840b6), [`83065bf`](https://github.com/mastra-ai/mastra/commit/83065bfee9e47c3c6f09132a9034501f6cfb69cf), [`0f2ef41`](https://github.com/mastra-ai/mastra/commit/0f2ef4118da022e4f30dac4e9856cc3a8c97671c), [`01b162f`](https://github.com/mastra-ai/mastra/commit/01b162fe435295881aa7ea55f1759407ad5175ad)]:
|
|
33
|
+
- @mastra/core@1.57.0
|
|
34
|
+
- @mastra/observability@1.16.5
|
|
35
|
+
|
|
3
36
|
## 0.1.0-alpha.0
|
|
4
37
|
|
|
5
38
|
### Minor Changes
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Portions of this software are licensed as follows:
|
|
2
|
+
|
|
3
|
+
- All content that resides under any directory named "ee/" within this
|
|
4
|
+
repository, including but not limited to:
|
|
5
|
+
- `packages/core/src/auth/ee/`
|
|
6
|
+
- `packages/server/src/server/auth/ee/`
|
|
7
|
+
is licensed under the license defined in `ee/LICENSE`.
|
|
8
|
+
|
|
9
|
+
- All third-party components incorporated into the Mastra Software are
|
|
10
|
+
licensed under the original license provided by the owner of the
|
|
11
|
+
applicable component.
|
|
12
|
+
|
|
13
|
+
- Content outside of the above-mentioned directories or restrictions is
|
|
14
|
+
available under the "Apache License 2.0" as defined below.
|
|
15
|
+
|
|
16
|
+
# Apache License 2.0
|
|
17
|
+
|
|
18
|
+
Copyright (c) 2025 Kepler Software, Inc.
|
|
19
|
+
|
|
20
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
21
|
+
you may not use this file except in compliance with the License.
|
|
22
|
+
You may obtain a copy of the License at
|
|
23
|
+
|
|
24
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
+
|
|
26
|
+
Unless required by applicable law or agreed to in writing, software
|
|
27
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
28
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
29
|
+
See the License for the specific language governing permissions and
|
|
30
|
+
limitations under the License.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var observability = require('@mastra/observability');
|
|
4
|
+
var mastra = require('deepeval/integrations/mastra');
|
|
5
|
+
|
|
6
|
+
// src/tracing.ts
|
|
7
|
+
var DeepEvalExporter = class extends observability.BaseExporter {
|
|
8
|
+
name = "deepeval";
|
|
9
|
+
#inner;
|
|
10
|
+
constructor(config = {}) {
|
|
11
|
+
super(config);
|
|
12
|
+
this.#inner = new mastra.DeepEvalExporter(config);
|
|
13
|
+
}
|
|
14
|
+
init(options) {
|
|
15
|
+
this.#inner.init?.(options);
|
|
16
|
+
}
|
|
17
|
+
async _exportTracingEvent(event) {
|
|
18
|
+
await this.#inner.exportTracingEvent(event);
|
|
19
|
+
}
|
|
20
|
+
async flush() {
|
|
21
|
+
await this.#inner.flush();
|
|
22
|
+
}
|
|
23
|
+
async shutdown() {
|
|
24
|
+
await this.#inner.shutdown();
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.DeepEvalExporter = DeepEvalExporter;
|
|
29
|
+
//# sourceMappingURL=index.cjs.map
|
|
30
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tracing.ts"],"names":["BaseExporter","DeepEvalCoreExporter"],"mappings":";;;;;;AAUO,IAAM,gBAAA,GAAN,cAA+BA,0BAAA,CAAa;AAAA,EACjD,IAAA,GAAO,UAAA;AAAA,EAEE,MAAA;AAAA,EAET,WAAA,CAAY,MAAA,GAAiC,EAAC,EAAG;AAC/C,IAAA,KAAA,CAAM,MAAM,CAAA;AACZ,IAAA,IAAA,CAAK,MAAA,GAAS,IAAIC,uBAAA,CAAqB,MAAM,CAAA;AAAA,EAC/C;AAAA,EAES,KAAK,OAAA,EAAoC;AAChD,IAAA,IAAA,CAAK,MAAA,CAAO,OAAO,OAAO,CAAA;AAAA,EAC5B;AAAA,EAEA,MAAgB,oBAAoB,KAAA,EAAoC;AACtE,IAAA,MAAM,IAAA,CAAK,MAAA,CAAO,kBAAA,CAAmB,KAAK,CAAA;AAAA,EAC5C;AAAA,EAEA,MAAe,KAAA,GAAuB;AACpC,IAAA,MAAM,IAAA,CAAK,OAAO,KAAA,EAAM;AAAA,EAC1B;AAAA,EAEA,MAAe,QAAA,GAA0B;AACvC,IAAA,MAAM,IAAA,CAAK,OAAO,QAAA,EAAS;AAAA,EAC7B;AACF","file":"index.cjs","sourcesContent":["import type { InitExporterOptions, TracingEvent } from '@mastra/core/observability';\nimport { BaseExporter } from '@mastra/observability';\nimport type { BaseExporterConfig } from '@mastra/observability';\nimport {\n DeepEvalExporter as DeepEvalCoreExporter,\n type DeepEvalExporterConfig as DeepEvalCoreConfig,\n} from 'deepeval/integrations/mastra';\n\nexport interface DeepEvalExporterConfig extends BaseExporterConfig, DeepEvalCoreConfig {}\n\nexport class DeepEvalExporter extends BaseExporter {\n name = 'deepeval';\n\n readonly #inner: DeepEvalCoreExporter;\n\n constructor(config: DeepEvalExporterConfig = {}) {\n super(config);\n this.#inner = new DeepEvalCoreExporter(config);\n }\n\n override init(options: InitExporterOptions): void {\n this.#inner.init?.(options);\n }\n\n protected async _exportTracingEvent(event: TracingEvent): Promise<void> {\n await this.#inner.exportTracingEvent(event);\n }\n\n override async flush(): Promise<void> {\n await this.#inner.flush();\n }\n\n override async shutdown(): Promise<void> {\n await this.#inner.shutdown();\n }\n}\n"]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BaseExporter } from '@mastra/observability';
|
|
2
|
+
import { DeepEvalExporter as DeepEvalExporter$1 } from 'deepeval/integrations/mastra';
|
|
3
|
+
|
|
4
|
+
// src/tracing.ts
|
|
5
|
+
var DeepEvalExporter = class extends BaseExporter {
|
|
6
|
+
name = "deepeval";
|
|
7
|
+
#inner;
|
|
8
|
+
constructor(config = {}) {
|
|
9
|
+
super(config);
|
|
10
|
+
this.#inner = new DeepEvalExporter$1(config);
|
|
11
|
+
}
|
|
12
|
+
init(options) {
|
|
13
|
+
this.#inner.init?.(options);
|
|
14
|
+
}
|
|
15
|
+
async _exportTracingEvent(event) {
|
|
16
|
+
await this.#inner.exportTracingEvent(event);
|
|
17
|
+
}
|
|
18
|
+
async flush() {
|
|
19
|
+
await this.#inner.flush();
|
|
20
|
+
}
|
|
21
|
+
async shutdown() {
|
|
22
|
+
await this.#inner.shutdown();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { DeepEvalExporter };
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tracing.ts"],"names":["DeepEvalCoreExporter"],"mappings":";;;;AAUO,IAAM,gBAAA,GAAN,cAA+B,YAAA,CAAa;AAAA,EACjD,IAAA,GAAO,UAAA;AAAA,EAEE,MAAA;AAAA,EAET,WAAA,CAAY,MAAA,GAAiC,EAAC,EAAG;AAC/C,IAAA,KAAA,CAAM,MAAM,CAAA;AACZ,IAAA,IAAA,CAAK,MAAA,GAAS,IAAIA,kBAAA,CAAqB,MAAM,CAAA;AAAA,EAC/C;AAAA,EAES,KAAK,OAAA,EAAoC;AAChD,IAAA,IAAA,CAAK,MAAA,CAAO,OAAO,OAAO,CAAA;AAAA,EAC5B;AAAA,EAEA,MAAgB,oBAAoB,KAAA,EAAoC;AACtE,IAAA,MAAM,IAAA,CAAK,MAAA,CAAO,kBAAA,CAAmB,KAAK,CAAA;AAAA,EAC5C;AAAA,EAEA,MAAe,KAAA,GAAuB;AACpC,IAAA,MAAM,IAAA,CAAK,OAAO,KAAA,EAAM;AAAA,EAC1B;AAAA,EAEA,MAAe,QAAA,GAA0B;AACvC,IAAA,MAAM,IAAA,CAAK,OAAO,QAAA,EAAS;AAAA,EAC7B;AACF","file":"index.js","sourcesContent":["import type { InitExporterOptions, TracingEvent } from '@mastra/core/observability';\nimport { BaseExporter } from '@mastra/observability';\nimport type { BaseExporterConfig } from '@mastra/observability';\nimport {\n DeepEvalExporter as DeepEvalCoreExporter,\n type DeepEvalExporterConfig as DeepEvalCoreConfig,\n} from 'deepeval/integrations/mastra';\n\nexport interface DeepEvalExporterConfig extends BaseExporterConfig, DeepEvalCoreConfig {}\n\nexport class DeepEvalExporter extends BaseExporter {\n name = 'deepeval';\n\n readonly #inner: DeepEvalCoreExporter;\n\n constructor(config: DeepEvalExporterConfig = {}) {\n super(config);\n this.#inner = new DeepEvalCoreExporter(config);\n }\n\n override init(options: InitExporterOptions): void {\n this.#inner.init?.(options);\n }\n\n protected async _exportTracingEvent(event: TracingEvent): Promise<void> {\n await this.#inner.exportTracingEvent(event);\n }\n\n override async flush(): Promise<void> {\n await this.#inner.flush();\n }\n\n override async shutdown(): Promise<void> {\n await this.#inner.shutdown();\n }\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { InitExporterOptions, TracingEvent } from '@mastra/core/observability';
|
|
2
|
+
import { BaseExporter } from '@mastra/observability';
|
|
3
|
+
import type { BaseExporterConfig } from '@mastra/observability';
|
|
4
|
+
import { type DeepEvalExporterConfig as DeepEvalCoreConfig } from 'deepeval/integrations/mastra';
|
|
5
|
+
export interface DeepEvalExporterConfig extends BaseExporterConfig, DeepEvalCoreConfig {
|
|
6
|
+
}
|
|
7
|
+
export declare class DeepEvalExporter extends BaseExporter {
|
|
8
|
+
#private;
|
|
9
|
+
name: string;
|
|
10
|
+
constructor(config?: DeepEvalExporterConfig);
|
|
11
|
+
init(options: InitExporterOptions): void;
|
|
12
|
+
protected _exportTracingEvent(event: TracingEvent): Promise<void>;
|
|
13
|
+
flush(): Promise<void>;
|
|
14
|
+
shutdown(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=tracing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../src/tracing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAEL,KAAK,sBAAsB,IAAI,kBAAkB,EAClD,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB,EAAE,kBAAkB;CAAG;AAEzF,qBAAa,gBAAiB,SAAQ,YAAY;;IAChD,IAAI,SAAc;gBAIN,MAAM,GAAE,sBAA2B;IAKtC,IAAI,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI;cAIjC,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAIxD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAGzC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/deepeval",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "DeepEval (Confident AI) observability provider for Mastra - includes tracing and future observability features",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,29 +22,22 @@
|
|
|
22
22
|
},
|
|
23
23
|
"./package.json": "./package.json"
|
|
24
24
|
},
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "tsup --silent --config tsup.config.ts",
|
|
27
|
-
"build:watch": "pnpm build --watch",
|
|
28
|
-
"test": "vitest run",
|
|
29
|
-
"test:watch": "vitest watch",
|
|
30
|
-
"lint": "eslint ."
|
|
31
|
-
},
|
|
32
25
|
"license": "Apache-2.0",
|
|
33
26
|
"dependencies": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
27
|
+
"deepeval": "^0.1.32",
|
|
28
|
+
"@mastra/observability": "1.16.5"
|
|
36
29
|
},
|
|
37
30
|
"devDependencies": {
|
|
38
|
-
"@internal/lint": "workspace:*",
|
|
39
|
-
"@internal/types-builder": "workspace:*",
|
|
40
|
-
"@mastra/core": "workspace:*",
|
|
41
31
|
"@types/node": "22.20.1",
|
|
42
|
-
"@vitest/coverage-v8": "
|
|
43
|
-
"@vitest/ui": "
|
|
32
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
33
|
+
"@vitest/ui": "4.1.10",
|
|
44
34
|
"eslint": "^10.4.1",
|
|
45
35
|
"tsup": "^8.5.1",
|
|
46
|
-
"typescript": "
|
|
47
|
-
"vitest": "
|
|
36
|
+
"typescript": "^6.0.3",
|
|
37
|
+
"vitest": "4.1.10",
|
|
38
|
+
"@internal/lint": "0.0.121",
|
|
39
|
+
"@internal/types-builder": "0.0.96",
|
|
40
|
+
"@mastra/core": "1.57.0"
|
|
48
41
|
},
|
|
49
42
|
"peerDependencies": {
|
|
50
43
|
"@mastra/core": ">=1.16.0-0 <2.0.0-0"
|
|
@@ -60,5 +53,12 @@
|
|
|
60
53
|
},
|
|
61
54
|
"engines": {
|
|
62
55
|
"node": ">=22.13.0"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsup --silent --config tsup.config.ts",
|
|
59
|
+
"build:watch": "pnpm build --watch",
|
|
60
|
+
"test": "vitest run",
|
|
61
|
+
"test:watch": "vitest watch",
|
|
62
|
+
"lint": "eslint ."
|
|
63
63
|
}
|
|
64
|
-
}
|
|
64
|
+
}
|