@mastra/dynamodb 0.0.0-pass-headers-for-create-mastra-client-20250530010057 → 0.0.0-playground-studio-cloud-20251031080052

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 (51) hide show
  1. package/CHANGELOG.md +1074 -0
  2. package/LICENSE.md +11 -42
  3. package/README.md +0 -4
  4. package/dist/entities/eval.d.ts +102 -0
  5. package/dist/entities/eval.d.ts.map +1 -0
  6. package/dist/entities/index.d.ts +761 -0
  7. package/dist/entities/index.d.ts.map +1 -0
  8. package/dist/entities/message.d.ts +100 -0
  9. package/dist/entities/message.d.ts.map +1 -0
  10. package/dist/entities/resource.d.ts +54 -0
  11. package/dist/entities/resource.d.ts.map +1 -0
  12. package/dist/entities/score.d.ts +244 -0
  13. package/dist/entities/score.d.ts.map +1 -0
  14. package/dist/entities/thread.d.ts +69 -0
  15. package/dist/entities/thread.d.ts.map +1 -0
  16. package/dist/entities/trace.d.ts +127 -0
  17. package/dist/entities/trace.d.ts.map +1 -0
  18. package/dist/entities/utils.d.ts +21 -0
  19. package/dist/entities/utils.d.ts.map +1 -0
  20. package/dist/entities/workflow-snapshot.d.ts +74 -0
  21. package/dist/entities/workflow-snapshot.d.ts.map +1 -0
  22. package/dist/index.cjs +2182 -508
  23. package/dist/index.cjs.map +1 -0
  24. package/dist/index.d.ts +2 -0
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +2142 -468
  27. package/dist/index.js.map +1 -0
  28. package/dist/storage/domains/legacy-evals/index.d.ts +19 -0
  29. package/dist/storage/domains/legacy-evals/index.d.ts.map +1 -0
  30. package/dist/storage/domains/memory/index.d.ts +89 -0
  31. package/dist/storage/domains/memory/index.d.ts.map +1 -0
  32. package/dist/storage/domains/operations/index.d.ts +69 -0
  33. package/dist/storage/domains/operations/index.d.ts.map +1 -0
  34. package/dist/storage/domains/score/index.d.ts +51 -0
  35. package/dist/storage/domains/score/index.d.ts.map +1 -0
  36. package/dist/storage/domains/workflows/index.d.ts +51 -0
  37. package/dist/storage/domains/workflows/index.d.ts.map +1 -0
  38. package/dist/storage/index.d.ts +244 -0
  39. package/dist/storage/index.d.ts.map +1 -0
  40. package/package.json +43 -19
  41. package/src/entities/eval.ts +0 -102
  42. package/src/entities/index.ts +0 -23
  43. package/src/entities/message.ts +0 -143
  44. package/src/entities/thread.ts +0 -66
  45. package/src/entities/trace.ts +0 -129
  46. package/src/entities/utils.ts +0 -51
  47. package/src/entities/workflow-snapshot.ts +0 -56
  48. package/src/index.ts +0 -1
  49. package/src/storage/docker-compose.yml +0 -16
  50. package/src/storage/index.test.ts +0 -1053
  51. package/src/storage/index.ts +0 -1059
@@ -0,0 +1,89 @@
1
+ import type { MastraMessageContentV2 } from '@mastra/core/agent';
2
+ import type { StorageThreadType, MastraMessageV1, MastraMessageV2 } from '@mastra/core/memory';
3
+ import { MemoryStorage } from '@mastra/core/storage';
4
+ import type { PaginationInfo, StorageGetMessagesArg, StorageResourceType, ThreadSortOptions } from '@mastra/core/storage';
5
+ import type { Service } from 'electrodb';
6
+ export declare class MemoryStorageDynamoDB extends MemoryStorage {
7
+ private service;
8
+ constructor({ service }: {
9
+ service: Service<Record<string, any>>;
10
+ });
11
+ private parseMessageData;
12
+ private transformAndSortThreads;
13
+ getThreadById({ threadId }: {
14
+ threadId: string;
15
+ }): Promise<StorageThreadType | null>;
16
+ /**
17
+ * @deprecated use getThreadsByResourceIdPaginated instead for paginated results.
18
+ */
19
+ getThreadsByResourceId(args: {
20
+ resourceId: string;
21
+ } & ThreadSortOptions): Promise<StorageThreadType[]>;
22
+ saveThread({ thread }: {
23
+ thread: StorageThreadType;
24
+ }): Promise<StorageThreadType>;
25
+ updateThread({ id, title, metadata, }: {
26
+ id: string;
27
+ title: string;
28
+ metadata: Record<string, unknown>;
29
+ }): Promise<StorageThreadType>;
30
+ deleteThread({ threadId }: {
31
+ threadId: string;
32
+ }): Promise<void>;
33
+ getMessages(args: StorageGetMessagesArg & {
34
+ format?: 'v1';
35
+ }): Promise<MastraMessageV1[]>;
36
+ getMessages(args: StorageGetMessagesArg & {
37
+ format: 'v2';
38
+ }): Promise<MastraMessageV2[]>;
39
+ getMessagesById({ messageIds, format, }: {
40
+ messageIds: string[];
41
+ format: 'v1';
42
+ }): Promise<MastraMessageV1[]>;
43
+ getMessagesById({ messageIds, format, }: {
44
+ messageIds: string[];
45
+ format?: 'v2';
46
+ }): Promise<MastraMessageV2[]>;
47
+ saveMessages(args: {
48
+ messages: MastraMessageV1[];
49
+ format?: undefined | 'v1';
50
+ }): Promise<MastraMessageV1[]>;
51
+ saveMessages(args: {
52
+ messages: MastraMessageV2[];
53
+ format: 'v2';
54
+ }): Promise<MastraMessageV2[]>;
55
+ getThreadsByResourceIdPaginated(args: {
56
+ resourceId: string;
57
+ page?: number;
58
+ perPage?: number;
59
+ } & ThreadSortOptions): Promise<PaginationInfo & {
60
+ threads: StorageThreadType[];
61
+ }>;
62
+ getMessagesPaginated(args: StorageGetMessagesArg & {
63
+ format?: 'v1' | 'v2';
64
+ }): Promise<PaginationInfo & {
65
+ messages: MastraMessageV1[] | MastraMessageV2[];
66
+ }>;
67
+ private _getIncludedMessages;
68
+ updateMessages(args: {
69
+ messages: Partial<Omit<MastraMessageV2, 'createdAt'>> & {
70
+ id: string;
71
+ content?: {
72
+ metadata?: MastraMessageContentV2['metadata'];
73
+ content?: MastraMessageContentV2['content'];
74
+ };
75
+ }[];
76
+ }): Promise<MastraMessageV2[]>;
77
+ getResourceById({ resourceId }: {
78
+ resourceId: string;
79
+ }): Promise<StorageResourceType | null>;
80
+ saveResource({ resource }: {
81
+ resource: StorageResourceType;
82
+ }): Promise<StorageResourceType>;
83
+ updateResource({ resourceId, workingMemory, metadata, }: {
84
+ resourceId: string;
85
+ workingMemory?: string;
86
+ metadata?: Record<string, unknown>;
87
+ }): Promise<StorageResourceType>;
88
+ }
89
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.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AC;IAoDvD,oBAAoB,CACxB,IAAI,EAAE,qBAAqB,GAAG;QAAE,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,GACrD,OAAO,CAAC,cAAc,GAAG;QAAE,QAAQ,EAAE,eAAe,EAAE,GAAG,eAAe,EAAE,CAAA;KAAE,CAAC;YA+GlE,oBAAoB;IAgF5B,cAAc,CAAC,IAAI,EAAE;QACzB,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC,GACnD;YACE,EAAE,EAAE,MAAM,CAAC;YACX,OAAO,CAAC,EAAE;gBAAE,QAAQ,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC,CAAC;gBAAC,OAAO,CAAC,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAA;aAAE,CAAC;SAC1G,EAAE,CAAC;KACP,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAoGxB,eAAe,CAAC,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC;IAiC5F,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;QAAE,QAAQ,EAAE,mBAAmB,CAAA;KAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAqC3F,cAAc,CAAC,EACnB,UAAU,EACV,aAAa,EACb,QAAQ,GACT,EAAE;QACD,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC,GAAG,OAAO,CAAC,mBAAmB,CAAC;CA2DjC"}
@@ -0,0 +1,69 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/operations/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EACL,eAAe,EAShB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,qBAAa,uBAAwB,SAAQ,eAAe;IAC1D,MAAM,EAAE,sBAAsB,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;gBAC1B,EACV,OAAO,EACP,SAAS,EACT,MAAM,GACP,EAAE;QACD,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;QACtC,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,sBAAsB,CAAC;KAChC;IAOK,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;IAI7B,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAGhC,OAAO,CAAC,qBAAqB;IAc7B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAsDxB;;;;OAIG;YACW,mBAAmB;IA6BjC;;;;;;OAMG;IACG,WAAW,CAAC,EAAE,SAAS,EAAE,EAAE;QAAE,SAAS,EAAE,WAAW,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA+BlG,MAAM,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;QAAE,SAAS,EAAE,WAAW,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA+BrG,UAAU,CAAC,KAAK,EAAE;QACtB,SAAS,EAAE,WAAW,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,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"}
@@ -0,0 +1,51 @@
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
@@ -0,0 +1 @@
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,aAAa;IACtD,OAAO,CAAC,OAAO,CAA+B;gBAClC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAA;KAAE;IAMlE,OAAO,CAAC,cAAc;IAUhB,YAAY,CAAC,EAAE,EAAE,EAAE,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AAiB,CAAC;KAC/B,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;CA4CpE"}
@@ -0,0 +1,51 @@
1
+ import { WorkflowsStorage } from '@mastra/core/storage';
2
+ import type { WorkflowRun, WorkflowRuns } from '@mastra/core/storage';
3
+ import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
4
+ import type { Service } from 'electrodb';
5
+ export declare class WorkflowStorageDynamoDB extends WorkflowsStorage {
6
+ private service;
7
+ constructor({ service }: {
8
+ service: Service<Record<string, any>>;
9
+ });
10
+ updateWorkflowResults({}: {
11
+ workflowName: string;
12
+ runId: string;
13
+ stepId: string;
14
+ result: StepResult<any, any, any, any>;
15
+ runtimeContext: Record<string, any>;
16
+ }): Promise<Record<string, StepResult<any, any, any, any>>>;
17
+ updateWorkflowState({}: {
18
+ workflowName: string;
19
+ runId: string;
20
+ opts: {
21
+ status: string;
22
+ result?: StepResult<any, any, any, any>;
23
+ error?: string;
24
+ suspendedPaths?: Record<string, number[]>;
25
+ waitingPaths?: Record<string, number[]>;
26
+ };
27
+ }): Promise<WorkflowRunState | undefined>;
28
+ persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot, }: {
29
+ workflowName: string;
30
+ runId: string;
31
+ resourceId?: string;
32
+ snapshot: WorkflowRunState;
33
+ }): Promise<void>;
34
+ loadWorkflowSnapshot({ workflowName, runId, }: {
35
+ workflowName: string;
36
+ runId: string;
37
+ }): Promise<WorkflowRunState | null>;
38
+ getWorkflowRuns(args?: {
39
+ workflowName?: string;
40
+ fromDate?: Date;
41
+ toDate?: Date;
42
+ limit?: number;
43
+ offset?: number;
44
+ resourceId?: string;
45
+ }): Promise<WorkflowRuns>;
46
+ getWorkflowRunById(args: {
47
+ runId: string;
48
+ workflowName?: string;
49
+ }): Promise<WorkflowRun | null>;
50
+ }
51
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {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1C,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;SACzC,CAAC;KACH,GACA,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAKlC,uBAAuB,CAAC,EAC5B,YAAY,EACZ,KAAK,EACL,UAAU,EACV,QAAQ,GACT,EAAE;QACD,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,gBAAgB,CAAC;KAC5B,GAAG,OAAO,CAAC,IAAI,CAAC;IA8BX,oBAAoB,CAAC,EACzB,YAAY,EACZ,KAAK,GACN,EAAE;QACD,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAiC9B,eAAe,CAAC,IAAI,CAAC,EAAE;QAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,IAAI,CAAC;QAChB,MAAM,CAAC,EAAE,IAAI,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CAAC,YAAY,CAAC;IA2FnB,kBAAkB,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CA8EtG"}
@@ -0,0 +1,244 @@
1
+ import type { MastraMessageContentV2 } from '@mastra/core/agent';
2
+ import type { StorageThreadType, MastraMessageV2, MastraMessageV1 } from '@mastra/core/memory';
3
+ import type { ScoreRowData, ScoringSource } from '@mastra/core/scores';
4
+ import { MastraStorage } from '@mastra/core/storage';
5
+ import type { EvalRow, StorageGetMessagesArg, WorkflowRun, WorkflowRuns, TABLE_NAMES, PaginationInfo, StorageColumn, StoragePagination, StorageDomains, PaginationArgs, StorageResourceType, ThreadSortOptions } from '@mastra/core/storage';
6
+ import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
7
+ export interface DynamoDBStoreConfig {
8
+ region?: string;
9
+ tableName: string;
10
+ endpoint?: string;
11
+ credentials?: {
12
+ accessKeyId: string;
13
+ secretAccessKey: string;
14
+ };
15
+ }
16
+ export declare class DynamoDBStore extends MastraStorage {
17
+ private tableName;
18
+ private client;
19
+ private service;
20
+ protected hasInitialized: Promise<boolean> | null;
21
+ stores: StorageDomains;
22
+ constructor({ name, config }: {
23
+ name: string;
24
+ config: DynamoDBStoreConfig;
25
+ });
26
+ get supports(): {
27
+ selectByIncludeResourceScope: boolean;
28
+ resourceWorkingMemory: boolean;
29
+ hasColumn: boolean;
30
+ createTable: boolean;
31
+ deleteMessages: boolean;
32
+ getScoresBySpan: boolean;
33
+ };
34
+ /**
35
+ * Validates that the required DynamoDB table exists and is accessible.
36
+ * This does not check the table structure - it assumes the table
37
+ * was created with the correct structure via CDK/CloudFormation.
38
+ */
39
+ private validateTableExists;
40
+ /**
41
+ * Initialize storage, validating the externally managed table is accessible.
42
+ * For the single-table design, we only validate once that we can access
43
+ * the table that was created via CDK/CloudFormation.
44
+ */
45
+ init(): Promise<void>;
46
+ /**
47
+ * Performs the actual table validation and stores the promise.
48
+ * Handles resetting the stored promise on failure to allow retries.
49
+ */
50
+ private _performInitializationAndStore;
51
+ createTable({ tableName, schema }: {
52
+ tableName: TABLE_NAMES;
53
+ schema: Record<string, any>;
54
+ }): Promise<void>;
55
+ alterTable(_args: {
56
+ tableName: TABLE_NAMES;
57
+ schema: Record<string, StorageColumn>;
58
+ ifNotExists: string[];
59
+ }): Promise<void>;
60
+ clearTable({ tableName }: {
61
+ tableName: TABLE_NAMES;
62
+ }): Promise<void>;
63
+ dropTable({ tableName }: {
64
+ tableName: TABLE_NAMES;
65
+ }): Promise<void>;
66
+ insert({ tableName, record }: {
67
+ tableName: TABLE_NAMES;
68
+ record: Record<string, any>;
69
+ }): Promise<void>;
70
+ batchInsert({ tableName, records }: {
71
+ tableName: TABLE_NAMES;
72
+ records: Record<string, any>[];
73
+ }): Promise<void>;
74
+ load<R>({ tableName, keys }: {
75
+ tableName: TABLE_NAMES;
76
+ keys: Record<string, string>;
77
+ }): Promise<R | null>;
78
+ getThreadById({ threadId }: {
79
+ threadId: string;
80
+ }): Promise<StorageThreadType | null>;
81
+ getThreadsByResourceId(args: {
82
+ resourceId: string;
83
+ } & ThreadSortOptions): Promise<StorageThreadType[]>;
84
+ saveThread({ thread }: {
85
+ thread: StorageThreadType;
86
+ }): Promise<StorageThreadType>;
87
+ updateThread({ id, title, metadata, }: {
88
+ id: string;
89
+ title: string;
90
+ metadata: Record<string, unknown>;
91
+ }): Promise<StorageThreadType>;
92
+ deleteThread({ threadId }: {
93
+ threadId: string;
94
+ }): Promise<void>;
95
+ getMessages(args: StorageGetMessagesArg & {
96
+ format?: 'v1';
97
+ }): Promise<MastraMessageV1[]>;
98
+ getMessages(args: StorageGetMessagesArg & {
99
+ format: 'v2';
100
+ }): Promise<MastraMessageV2[]>;
101
+ getMessagesById({ messageIds, format }: {
102
+ messageIds: string[];
103
+ format: 'v1';
104
+ }): Promise<MastraMessageV1[]>;
105
+ getMessagesById({ messageIds, format }: {
106
+ messageIds: string[];
107
+ format?: 'v2';
108
+ }): Promise<MastraMessageV2[]>;
109
+ saveMessages(args: {
110
+ messages: MastraMessageV1[];
111
+ format?: undefined | 'v1';
112
+ }): Promise<MastraMessageV1[]>;
113
+ saveMessages(args: {
114
+ messages: MastraMessageV2[];
115
+ format: 'v2';
116
+ }): Promise<MastraMessageV2[]>;
117
+ getThreadsByResourceIdPaginated(args: {
118
+ resourceId: string;
119
+ page: number;
120
+ perPage: number;
121
+ } & ThreadSortOptions): Promise<PaginationInfo & {
122
+ threads: StorageThreadType[];
123
+ }>;
124
+ getMessagesPaginated(args: StorageGetMessagesArg & {
125
+ format?: 'v1' | 'v2';
126
+ }): Promise<PaginationInfo & {
127
+ messages: MastraMessageV1[] | MastraMessageV2[];
128
+ }>;
129
+ updateMessages(_args: {
130
+ messages: Partial<Omit<MastraMessageV2, 'createdAt'>> & {
131
+ id: string;
132
+ content?: {
133
+ metadata?: MastraMessageContentV2['metadata'];
134
+ content?: MastraMessageContentV2['content'];
135
+ };
136
+ }[];
137
+ }): Promise<MastraMessageV2[]>;
138
+ updateWorkflowResults({ workflowName, runId, stepId, result, runtimeContext, }: {
139
+ workflowName: string;
140
+ runId: string;
141
+ stepId: string;
142
+ result: StepResult<any, any, any, any>;
143
+ runtimeContext: Record<string, any>;
144
+ }): Promise<Record<string, StepResult<any, any, any, any>>>;
145
+ updateWorkflowState({ workflowName, runId, opts, }: {
146
+ workflowName: string;
147
+ runId: string;
148
+ opts: {
149
+ status: string;
150
+ result?: StepResult<any, any, any, any>;
151
+ error?: string;
152
+ suspendedPaths?: Record<string, number[]>;
153
+ waitingPaths?: Record<string, number[]>;
154
+ };
155
+ }): Promise<WorkflowRunState | undefined>;
156
+ persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot, }: {
157
+ workflowName: string;
158
+ runId: string;
159
+ resourceId?: string;
160
+ snapshot: WorkflowRunState;
161
+ }): Promise<void>;
162
+ loadWorkflowSnapshot({ workflowName, runId, }: {
163
+ workflowName: string;
164
+ runId: string;
165
+ }): Promise<WorkflowRunState | null>;
166
+ getWorkflowRuns(args?: {
167
+ workflowName?: string;
168
+ fromDate?: Date;
169
+ toDate?: Date;
170
+ limit?: number;
171
+ offset?: number;
172
+ resourceId?: string;
173
+ }): Promise<WorkflowRuns>;
174
+ getWorkflowRunById(args: {
175
+ runId: string;
176
+ workflowName?: string;
177
+ }): Promise<WorkflowRun | null>;
178
+ getResourceById({ resourceId }: {
179
+ resourceId: string;
180
+ }): Promise<StorageResourceType | null>;
181
+ saveResource({ resource }: {
182
+ resource: StorageResourceType;
183
+ }): Promise<StorageResourceType>;
184
+ updateResource({ resourceId, workingMemory, metadata, }: {
185
+ resourceId: string;
186
+ workingMemory?: string;
187
+ metadata?: Record<string, any>;
188
+ }): Promise<StorageResourceType>;
189
+ getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
190
+ getEvals(options: {
191
+ agentName?: string;
192
+ type?: 'test' | 'live';
193
+ } & PaginationArgs): Promise<PaginationInfo & {
194
+ evals: EvalRow[];
195
+ }>;
196
+ /**
197
+ * Closes the DynamoDB client connection and cleans up resources.
198
+ * Should be called when the store is no longer needed, e.g., at the end of tests or application shutdown.
199
+ */
200
+ close(): Promise<void>;
201
+ /**
202
+ * SCORERS - Not implemented
203
+ */
204
+ getScoreById({ id: _id }: {
205
+ id: string;
206
+ }): Promise<ScoreRowData | null>;
207
+ saveScore(_score: ScoreRowData): Promise<{
208
+ score: ScoreRowData;
209
+ }>;
210
+ getScoresByRunId({ runId: _runId, pagination: _pagination, }: {
211
+ runId: string;
212
+ pagination: StoragePagination;
213
+ }): Promise<{
214
+ pagination: PaginationInfo;
215
+ scores: ScoreRowData[];
216
+ }>;
217
+ getScoresByEntityId({ entityId: _entityId, entityType: _entityType, pagination: _pagination, }: {
218
+ pagination: StoragePagination;
219
+ entityId: string;
220
+ entityType: string;
221
+ }): Promise<{
222
+ pagination: PaginationInfo;
223
+ scores: ScoreRowData[];
224
+ }>;
225
+ getScoresByScorerId({ scorerId, source, entityId, entityType, pagination, }: {
226
+ scorerId: string;
227
+ entityId?: string;
228
+ entityType?: string;
229
+ source?: ScoringSource;
230
+ pagination: StoragePagination;
231
+ }): Promise<{
232
+ pagination: PaginationInfo;
233
+ scores: ScoreRowData[];
234
+ }>;
235
+ getScoresBySpan({ traceId, spanId, pagination, }: {
236
+ traceId: string;
237
+ spanId: string;
238
+ pagination: StoragePagination;
239
+ }): Promise<{
240
+ pagination: PaginationInfo;
241
+ scores: ScoreRowData[];
242
+ }>;
243
+ }
244
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @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EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;IAI7D,eAAe,CAAC,EACpB,OAAO,EACP,MAAM,EACN,UAAU,GACX,EAAE;QACD,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,iBAAiB,CAAC;KAC/B,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;CAGpE"}
package/package.json CHANGED
@@ -1,38 +1,62 @@
1
1
  {
2
2
  "name": "@mastra/dynamodb",
3
- "version": "0.0.0-pass-headers-for-create-mastra-client-20250530010057",
3
+ "version": "0.0.0-playground-studio-cloud-20251031080052",
4
4
  "description": "DynamoDB storage adapter for Mastra",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.cjs"
17
+ }
18
+ },
19
+ "./package.json": "./package.json"
20
+ },
8
21
  "files": [
9
22
  "dist",
10
- "src"
23
+ "CHANGELOG.md"
11
24
  ],
12
25
  "dependencies": {
13
- "@aws-sdk/client-dynamodb": "^3.0.0",
14
- "@aws-sdk/lib-dynamodb": "^3.0.0",
15
- "electrodb": "^3.4.1"
26
+ "@aws-sdk/client-dynamodb": "^3.902.0",
27
+ "@aws-sdk/lib-dynamodb": "^3.902.0",
28
+ "electrodb": "^3.4.6"
16
29
  },
17
30
  "peerDependencies": {
18
- "@mastra/core": "^0.10.0"
31
+ "@mastra/core": "0.0.0-playground-studio-cloud-20251031080052"
19
32
  },
20
33
  "devDependencies": {
21
- "@microsoft/api-extractor": "^7.52.1",
22
- "@types/node": "^20.17.27",
23
- "@vitest/coverage-v8": "3.0.9",
24
- "@vitest/ui": "3.0.9",
25
- "axios": "^1.8.4",
26
- "eslint": "^9.23.0",
27
- "tsup": "^8.4.0",
28
- "typescript": "^5.8.2",
29
- "vitest": "^3.0.9",
30
- "@internal/lint": "0.0.0-pass-headers-for-create-mastra-client-20250530010057",
31
- "@mastra/core": "0.0.0-pass-headers-for-create-mastra-client-20250530010057"
34
+ "@microsoft/api-extractor": "^7.52.8",
35
+ "@types/node": "^20.19.0",
36
+ "@vitest/coverage-v8": "3.2.3",
37
+ "@vitest/ui": "3.2.3",
38
+ "axios": "^1.12.2",
39
+ "eslint": "^9.37.0",
40
+ "tsup": "^8.5.0",
41
+ "typescript": "^5.8.3",
42
+ "vitest": "^3.2.4",
43
+ "@internal/lint": "0.0.0-playground-studio-cloud-20251031080052",
44
+ "@internal/storage-test-utils": "0.0.49",
45
+ "@internal/types-builder": "0.0.0-playground-studio-cloud-20251031080052",
46
+ "@mastra/core": "0.0.0-playground-studio-cloud-20251031080052"
47
+ },
48
+ "homepage": "https://mastra.ai",
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "git+https://github.com/mastra-ai/mastra.git",
52
+ "directory": "stores/dynamodb"
53
+ },
54
+ "bugs": {
55
+ "url": "https://github.com/mastra-ai/mastra/issues"
32
56
  },
33
57
  "scripts": {
34
- "build": "tsup src/index.ts --format esm,cjs --clean --treeshake=smallest --splitting",
35
- "dev": "tsup --watch",
58
+ "build": "tsup --silent --config tsup.config.ts",
59
+ "dev": "tsup --watch && tsc -p tsconfig.build.json",
36
60
  "clean": "rm -rf dist",
37
61
  "lint": "eslint .",
38
62
  "pretest": "docker compose up -d",