@mastra/dynamodb 0.0.0-remove-unused-model-providers-api-20251030210744 → 0.0.0-remove-ai-peer-dep-from-evals-20260105220639
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 +1094 -3
- package/dist/docs/README.md +31 -0
- package/dist/docs/SKILL.md +32 -0
- package/dist/docs/SOURCE_MAP.json +6 -0
- package/dist/docs/storage/01-reference.md +162 -0
- package/dist/entities/index.d.ts +4 -0
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/score.d.ts +4 -0
- package/dist/entities/score.d.ts.map +1 -1
- package/dist/index.cjs +465 -882
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +463 -883
- package/dist/index.js.map +1 -1
- package/dist/storage/db/index.d.ts +32 -0
- package/dist/storage/db/index.d.ts.map +1 -0
- package/dist/storage/domains/memory/index.d.ts +15 -44
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/scores/index.d.ts +46 -0
- package/dist/storage/domains/scores/index.d.ts.map +1 -0
- package/dist/storage/domains/utils.d.ts +7 -0
- package/dist/storage/domains/utils.d.ts.map +1 -0
- package/dist/storage/domains/workflows/index.d.ts +14 -15
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +87 -182
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +16 -14
- package/dist/storage/domains/operations/index.d.ts +0 -69
- package/dist/storage/domains/operations/index.d.ts.map +0 -1
- package/dist/storage/domains/score/index.d.ts +0 -51
- package/dist/storage/domains/score/index.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/dynamodb",
|
|
3
|
-
"version": "0.0.0-remove-
|
|
3
|
+
"version": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639",
|
|
4
4
|
"description": "DynamoDB storage adapter for Mastra",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,25 +25,23 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@aws-sdk/client-dynamodb": "^3.902.0",
|
|
27
27
|
"@aws-sdk/lib-dynamodb": "^3.902.0",
|
|
28
|
-
"electrodb": "^3.
|
|
28
|
+
"electrodb": "^3.5.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@mastra/core": "0.0.0-remove-
|
|
31
|
+
"@mastra/core": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@vitest/
|
|
37
|
-
"@vitest/ui": "3.2.3",
|
|
38
|
-
"axios": "^1.12.2",
|
|
34
|
+
"@types/node": "22.13.17",
|
|
35
|
+
"@vitest/coverage-v8": "4.0.12",
|
|
36
|
+
"@vitest/ui": "4.0.12",
|
|
39
37
|
"eslint": "^9.37.0",
|
|
40
38
|
"tsup": "^8.5.0",
|
|
41
|
-
"typescript": "^5.
|
|
42
|
-
"vitest": "
|
|
43
|
-
"@internal/lint": "0.0.0-remove-
|
|
39
|
+
"typescript": "^5.9.3",
|
|
40
|
+
"vitest": "4.0.16",
|
|
41
|
+
"@internal/lint": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639",
|
|
42
|
+
"@internal/types-builder": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639",
|
|
44
43
|
"@internal/storage-test-utils": "0.0.49",
|
|
45
|
-
"@mastra/core": "0.0.0-remove-
|
|
46
|
-
"@internal/types-builder": "0.0.0-remove-unused-model-providers-api-20251030210744"
|
|
44
|
+
"@mastra/core": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639"
|
|
47
45
|
},
|
|
48
46
|
"homepage": "https://mastra.ai",
|
|
49
47
|
"repository": {
|
|
@@ -54,8 +52,12 @@
|
|
|
54
52
|
"bugs": {
|
|
55
53
|
"url": "https://github.com/mastra-ai/mastra/issues"
|
|
56
54
|
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=22.13.0"
|
|
57
|
+
},
|
|
57
58
|
"scripts": {
|
|
58
|
-
"build": "tsup --silent --config tsup.config.ts",
|
|
59
|
+
"build:lib": "tsup --silent --config tsup.config.ts",
|
|
60
|
+
"build:docs": "pnpx tsx ../../scripts/generate-package-docs.ts stores/dynamodb",
|
|
59
61
|
"dev": "tsup --watch && tsc -p tsconfig.build.json",
|
|
60
62
|
"clean": "rm -rf dist",
|
|
61
63
|
"lint": "eslint .",
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
|
|
2
|
-
import { StoreOperations } from '@mastra/core/storage';
|
|
3
|
-
import type { StorageColumn, TABLE_NAMES } from '@mastra/core/storage';
|
|
4
|
-
import type { Service } from 'electrodb';
|
|
5
|
-
export declare class StoreOperationsDynamoDB extends StoreOperations {
|
|
6
|
-
client: DynamoDBDocumentClient;
|
|
7
|
-
tableName: string;
|
|
8
|
-
service: Service<Record<string, any>>;
|
|
9
|
-
constructor({ service, tableName, client, }: {
|
|
10
|
-
service: Service<Record<string, any>>;
|
|
11
|
-
tableName: string;
|
|
12
|
-
client: DynamoDBDocumentClient;
|
|
13
|
-
});
|
|
14
|
-
hasColumn(): Promise<boolean>;
|
|
15
|
-
dropTable(): Promise<void>;
|
|
16
|
-
private getEntityNameForTable;
|
|
17
|
-
/**
|
|
18
|
-
* Pre-processes a record to ensure Date objects are converted to ISO strings
|
|
19
|
-
* This is necessary because ElectroDB validation happens before setters are applied
|
|
20
|
-
*/
|
|
21
|
-
private preprocessRecord;
|
|
22
|
-
/**
|
|
23
|
-
* Validates that the required DynamoDB table exists and is accessible.
|
|
24
|
-
* This does not check the table structure - it assumes the table
|
|
25
|
-
* was created with the correct structure via CDK/CloudFormation.
|
|
26
|
-
*/
|
|
27
|
-
private validateTableExists;
|
|
28
|
-
/**
|
|
29
|
-
* This method is modified for DynamoDB with ElectroDB single-table design.
|
|
30
|
-
* It assumes the table is created and managed externally via CDK/CloudFormation.
|
|
31
|
-
*
|
|
32
|
-
* This implementation only validates that the required table exists and is accessible.
|
|
33
|
-
* No table creation is attempted - we simply check if we can access the table.
|
|
34
|
-
*/
|
|
35
|
-
createTable({ tableName }: {
|
|
36
|
-
tableName: TABLE_NAMES;
|
|
37
|
-
schema: Record<string, any>;
|
|
38
|
-
}): Promise<void>;
|
|
39
|
-
insert({ tableName, record }: {
|
|
40
|
-
tableName: TABLE_NAMES;
|
|
41
|
-
record: Record<string, any>;
|
|
42
|
-
}): Promise<void>;
|
|
43
|
-
alterTable(_args: {
|
|
44
|
-
tableName: TABLE_NAMES;
|
|
45
|
-
schema: Record<string, StorageColumn>;
|
|
46
|
-
ifNotExists: string[];
|
|
47
|
-
}): Promise<void>;
|
|
48
|
-
/**
|
|
49
|
-
* Clear all items from a logical "table" (entity type)
|
|
50
|
-
*/
|
|
51
|
-
clearTable({ tableName }: {
|
|
52
|
-
tableName: TABLE_NAMES;
|
|
53
|
-
}): Promise<void>;
|
|
54
|
-
/**
|
|
55
|
-
* Insert multiple records as a batch
|
|
56
|
-
*/
|
|
57
|
-
batchInsert({ tableName, records }: {
|
|
58
|
-
tableName: TABLE_NAMES;
|
|
59
|
-
records: Record<string, any>[];
|
|
60
|
-
}): Promise<void>;
|
|
61
|
-
/**
|
|
62
|
-
* Load a record by its keys
|
|
63
|
-
*/
|
|
64
|
-
load<R>({ tableName, keys }: {
|
|
65
|
-
tableName: TABLE_NAMES;
|
|
66
|
-
keys: Record<string, string>;
|
|
67
|
-
}): Promise<R | null>;
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/operations/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uB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AAC,CAAC;QACtC,WAAW,EAAE,MAAM,EAAE,CAAC;KACvB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjB;;OAEG;IACG,UAAU,CAAC,EAAE,SAAS,EAAE,EAAE;QAAE,SAAS,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAwG1E;;OAEG;IACG,WAAW,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QAAE,SAAS,EAAE,WAAW,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAqDpH;;OAEG;IACG,IAAI,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE;QAAE,SAAS,EAAE,WAAW,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;CA+ChH"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { ScoreRowData, ScoringSource } from '@mastra/core/scores';
|
|
2
|
-
import { ScoresStorage } from '@mastra/core/storage';
|
|
3
|
-
import type { PaginationInfo, StoragePagination } from '@mastra/core/storage';
|
|
4
|
-
import type { Service } from 'electrodb';
|
|
5
|
-
export declare class ScoresStorageDynamoDB extends ScoresStorage {
|
|
6
|
-
private service;
|
|
7
|
-
constructor({ service }: {
|
|
8
|
-
service: Service<Record<string, any>>;
|
|
9
|
-
});
|
|
10
|
-
private parseScoreData;
|
|
11
|
-
getScoreById({ id }: {
|
|
12
|
-
id: string;
|
|
13
|
-
}): Promise<ScoreRowData | null>;
|
|
14
|
-
saveScore(score: Omit<ScoreRowData, 'id' | 'createdAt' | 'updatedAt'>): Promise<{
|
|
15
|
-
score: ScoreRowData;
|
|
16
|
-
}>;
|
|
17
|
-
getScoresByScorerId({ scorerId, pagination, entityId, entityType, source, }: {
|
|
18
|
-
scorerId: string;
|
|
19
|
-
pagination: StoragePagination;
|
|
20
|
-
entityId?: string;
|
|
21
|
-
entityType?: string;
|
|
22
|
-
source?: ScoringSource;
|
|
23
|
-
}): Promise<{
|
|
24
|
-
pagination: PaginationInfo;
|
|
25
|
-
scores: ScoreRowData[];
|
|
26
|
-
}>;
|
|
27
|
-
getScoresByRunId({ runId, pagination, }: {
|
|
28
|
-
runId: string;
|
|
29
|
-
pagination: StoragePagination;
|
|
30
|
-
}): Promise<{
|
|
31
|
-
pagination: PaginationInfo;
|
|
32
|
-
scores: ScoreRowData[];
|
|
33
|
-
}>;
|
|
34
|
-
getScoresByEntityId({ entityId, entityType, pagination, }: {
|
|
35
|
-
entityId: string;
|
|
36
|
-
entityType: string;
|
|
37
|
-
pagination: StoragePagination;
|
|
38
|
-
}): Promise<{
|
|
39
|
-
pagination: PaginationInfo;
|
|
40
|
-
scores: ScoreRowData[];
|
|
41
|
-
}>;
|
|
42
|
-
getScoresBySpan({ traceId, spanId, pagination, }: {
|
|
43
|
-
traceId: string;
|
|
44
|
-
spanId: string;
|
|
45
|
-
pagination: StoragePagination;
|
|
46
|
-
}): Promise<{
|
|
47
|
-
pagination: PaginationInfo;
|
|
48
|
-
scores: ScoreRowData[];
|
|
49
|
-
}>;
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/score/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAA6B,MAAM,qBAAqB,CAAC;AAElG,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,qBAAa,qBAAsB,SAAQ,aAA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