@mastra/redis 1.2.1 → 1.2.2
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 +40 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/reference-storage-redis.md +2 -0
- package/dist/index.cjs +24 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -6
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/scores/index.d.ts +9 -5
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SaveScorePayload, ScoreRowData, ScoringSource } from '@mastra/core/evals';
|
|
2
2
|
import { ScoresStorage } from '@mastra/core/storage';
|
|
3
|
-
import type { PaginationInfo, StoragePagination } from '@mastra/core/storage';
|
|
3
|
+
import type { PaginationInfo, StoragePagination, ScoreTenancyFilters } from '@mastra/core/storage';
|
|
4
4
|
import type { RedisDomainConfig } from '../../db/index.js';
|
|
5
5
|
export declare class ScoresRedis extends ScoresStorage {
|
|
6
6
|
private client;
|
|
@@ -10,12 +10,13 @@ export declare class ScoresRedis extends ScoresStorage {
|
|
|
10
10
|
getScoreById({ id }: {
|
|
11
11
|
id: string;
|
|
12
12
|
}): Promise<ScoreRowData | null>;
|
|
13
|
-
listScoresByScorerId({ scorerId, entityId, entityType, source, pagination, }: {
|
|
13
|
+
listScoresByScorerId({ scorerId, entityId, entityType, source, pagination, filters, }: {
|
|
14
14
|
scorerId: string;
|
|
15
15
|
entityId?: string;
|
|
16
16
|
entityType?: string;
|
|
17
17
|
source?: ScoringSource;
|
|
18
18
|
pagination?: StoragePagination;
|
|
19
|
+
filters?: ScoreTenancyFilters;
|
|
19
20
|
}): Promise<{
|
|
20
21
|
scores: ScoreRowData[];
|
|
21
22
|
pagination: PaginationInfo;
|
|
@@ -23,25 +24,28 @@ export declare class ScoresRedis extends ScoresStorage {
|
|
|
23
24
|
saveScore(score: SaveScorePayload): Promise<{
|
|
24
25
|
score: ScoreRowData;
|
|
25
26
|
}>;
|
|
26
|
-
listScoresByRunId({ runId, pagination, }: {
|
|
27
|
+
listScoresByRunId({ runId, pagination, filters, }: {
|
|
27
28
|
runId: string;
|
|
28
29
|
pagination?: StoragePagination;
|
|
30
|
+
filters?: ScoreTenancyFilters;
|
|
29
31
|
}): Promise<{
|
|
30
32
|
scores: ScoreRowData[];
|
|
31
33
|
pagination: PaginationInfo;
|
|
32
34
|
}>;
|
|
33
|
-
listScoresByEntityId({ entityId, entityType, pagination, }: {
|
|
35
|
+
listScoresByEntityId({ entityId, entityType, pagination, filters, }: {
|
|
34
36
|
entityId: string;
|
|
35
37
|
entityType?: string;
|
|
36
38
|
pagination?: StoragePagination;
|
|
39
|
+
filters?: ScoreTenancyFilters;
|
|
37
40
|
}): Promise<{
|
|
38
41
|
scores: ScoreRowData[];
|
|
39
42
|
pagination: PaginationInfo;
|
|
40
43
|
}>;
|
|
41
|
-
listScoresBySpan({ traceId, spanId, pagination, }: {
|
|
44
|
+
listScoresBySpan({ traceId, spanId, pagination, filters, }: {
|
|
42
45
|
traceId: string;
|
|
43
46
|
spanId: string;
|
|
44
47
|
pagination?: StoragePagination;
|
|
48
|
+
filters?: ScoreTenancyFilters;
|
|
45
49
|
}): Promise<{
|
|
46
50
|
scores: ScoreRowData[];
|
|
47
51
|
pagination: PaginationInfo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/scores/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExF,OAAO,EAGL,aAAa,EAId,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,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ACD,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,iBAAiB,CAAC;QAC/B,OAAO,CAAC,EAAE,mBAAmB,CAAC;KAC/B,GAAG,OAAO,CAAC;QACV,MAAM,EAAE,YAAY,EAAE,CAAC;QACvB,UAAU,EAAE,cAAc,CAAC;KAC5B,CAAC;IAIW,oBAAoB,CAAC,EAChC,QAAQ,EACR,UAAU,EACV,UAAqC,EACrC,OAAO,GACR,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,iBAAiB,CAAC;QAC/B,OAAO,CAAC,EAAE,mBAAmB,CAAC;KAC/B,GAAG,OAAO,CAAC;QACV,MAAM,EAAE,YAAY,EAAE,CAAC;QACvB,UAAU,EAAE,cAAc,CAAC;KAC5B,CAAC;IAeW,gBAAgB,CAAC,EAC5B,OAAO,EACP,MAAM,EACN,UAAqC,EACrC,OAAO,GACR,EAAE;QACD,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,iBAAiB,CAAC;QAC/B,OAAO,CAAC,EAAE,mBAAmB,CAAC;KAC/B,GAAG,OAAO,CAAC;QACV,MAAM,EAAE,YAAY,EAAE,CAAC;QACvB,UAAU,EAAE,cAAc,CAAC;KAC5B,CAAC;YAOY,oBAAoB;CA6CnC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/redis",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Redis storage provider for Mastra - provides storage capabilities for direct Redis connections",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"tsx": "^4.22.4",
|
|
35
35
|
"typescript": "^6.0.3",
|
|
36
36
|
"vitest": "4.1.8",
|
|
37
|
-
"@internal/
|
|
38
|
-
"@internal/
|
|
39
|
-
"@mastra/core": "1.
|
|
40
|
-
"@internal/
|
|
37
|
+
"@internal/types-builder": "0.0.86",
|
|
38
|
+
"@internal/lint": "0.0.111",
|
|
39
|
+
"@mastra/core": "1.49.0",
|
|
40
|
+
"@internal/storage-test-utils": "0.0.107"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@mastra/core": ">=1.0.0-0 <2.0.0-0"
|