@mastra/dynamodb 1.4.1 → 1.4.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/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/entities/index.d.ts +79 -0
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/run-fencing.d.ts +92 -0
- package/dist/entities/run-fencing.d.ts.map +1 -0
- package/dist/index.cjs +424 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +425 -52
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts +16 -5
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/run-fencing.d.ts +41 -0
- package/dist/storage/domains/run-fencing.d.ts.map +1 -0
- package/dist/storage/domains/utils.d.ts +2 -1
- package/dist/storage/domains/utils.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +17 -5
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1,28 +1,36 @@
|
|
|
1
1
|
import type { MastraMessageContentV2 } from '@mastra/core/agent';
|
|
2
2
|
import type { StorageThreadType, MastraDBMessage } from '@mastra/core/memory';
|
|
3
3
|
import { MemoryStorage } from '@mastra/core/storage';
|
|
4
|
-
import type { StorageResourceType, StorageListMessagesInput, StorageListMessagesOutput, StorageListThreadsInput, StorageListThreadsOutput } from '@mastra/core/storage';
|
|
4
|
+
import type { RunFence, StorageResourceType, StorageListMessagesInput, StorageListMessagesOutput, StorageListThreadsInput, StorageListThreadsOutput } from '@mastra/core/storage';
|
|
5
5
|
import type { DynamoDBDomainConfig } from '../../db/index.js';
|
|
6
6
|
export declare class MemoryStorageDynamoDB extends MemoryStorage {
|
|
7
|
+
#private;
|
|
7
8
|
readonly supportsPartialThreadUpdate = true;
|
|
8
9
|
private service;
|
|
9
10
|
private ttlConfig?;
|
|
10
11
|
constructor(config: DynamoDBDomainConfig);
|
|
12
|
+
supportsRunFencing(): boolean;
|
|
11
13
|
dangerouslyClearAll(): Promise<void>;
|
|
12
|
-
|
|
14
|
+
raiseRunFence(fence: RunFence): Promise<boolean>;
|
|
15
|
+
retireRunFence(fence: RunFence): Promise<boolean>;
|
|
16
|
+
deleteMessages(messageIds: string[], options?: {
|
|
17
|
+
fence?: RunFence;
|
|
18
|
+
}): Promise<void>;
|
|
13
19
|
private parseMessageData;
|
|
14
20
|
private transformAndSortThreads;
|
|
15
21
|
getThreadById({ threadId, resourceId, }: {
|
|
16
22
|
threadId: string;
|
|
17
23
|
resourceId?: string;
|
|
18
24
|
}): Promise<StorageThreadType | null>;
|
|
19
|
-
saveThread({ thread }: {
|
|
25
|
+
saveThread({ thread, fence }: {
|
|
20
26
|
thread: StorageThreadType;
|
|
27
|
+
fence?: RunFence;
|
|
21
28
|
}): Promise<StorageThreadType>;
|
|
22
|
-
updateThread({ id, title, metadata, }: {
|
|
29
|
+
updateThread({ id, title, metadata, fence, }: {
|
|
23
30
|
id: string;
|
|
24
31
|
title?: string;
|
|
25
32
|
metadata?: Record<string, unknown>;
|
|
33
|
+
fence?: RunFence;
|
|
26
34
|
}): Promise<StorageThreadType>;
|
|
27
35
|
deleteThread({ threadId }: {
|
|
28
36
|
threadId: string;
|
|
@@ -35,6 +43,7 @@ export declare class MemoryStorageDynamoDB extends MemoryStorage {
|
|
|
35
43
|
listMessages(args: StorageListMessagesInput): Promise<StorageListMessagesOutput>;
|
|
36
44
|
saveMessages(args: {
|
|
37
45
|
messages: MastraDBMessage[];
|
|
46
|
+
fence?: RunFence;
|
|
38
47
|
}): Promise<{
|
|
39
48
|
messages: MastraDBMessage[];
|
|
40
49
|
}>;
|
|
@@ -56,6 +65,7 @@ export declare class MemoryStorageDynamoDB extends MemoryStorage {
|
|
|
56
65
|
content?: MastraMessageContentV2['content'];
|
|
57
66
|
};
|
|
58
67
|
}[];
|
|
68
|
+
fence?: RunFence;
|
|
59
69
|
}): Promise<MastraDBMessage[]>;
|
|
60
70
|
getResourceById({ resourceId }: {
|
|
61
71
|
resourceId: string;
|
|
@@ -63,10 +73,11 @@ export declare class MemoryStorageDynamoDB extends MemoryStorage {
|
|
|
63
73
|
saveResource({ resource }: {
|
|
64
74
|
resource: StorageResourceType;
|
|
65
75
|
}): Promise<StorageResourceType>;
|
|
66
|
-
updateResource({ resourceId, workingMemory, metadata, }: {
|
|
76
|
+
updateResource({ resourceId, workingMemory, metadata, fence, }: {
|
|
67
77
|
resourceId: string;
|
|
68
78
|
workingMemory?: string;
|
|
69
79
|
metadata?: Record<string, unknown>;
|
|
80
|
+
fence?: RunFence;
|
|
70
81
|
}): Promise<StorageResourceType>;
|
|
71
82
|
}
|
|
72
83
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,KAAK,EAAE,iBAAiB,EAAmB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,KAAK,EAAE,iBAAiB,EAAmB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAIL,aAAa,EAUd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,QAAQ,EACR,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAOrD,qBAAa,qBAAsB,SAAQ,aAAa;;IACtD,SAAk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QAAE,QAAQ,EAAE,mBAAmB,CAAA;KAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAEhG;IAyCK,cAAc,CAAC,EACnB,UAAU,EACV,aAAa,EACb,QAAQ,EACR,KAAK,GACN,EAAE;QACD,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACnC,KAAK,CAAC,EAAE,QAAQ,CAAC;KAClB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAgE/B;CACF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { RunFence } from '@mastra/core/storage';
|
|
2
|
+
import type { Service } from 'electrodb';
|
|
3
|
+
/** Entity holding a run's current claim: its ownership item (workflows) or raised fence (memory). */
|
|
4
|
+
export type RunClaimEntity = 'workflow_run_owner' | 'memory_run_fence';
|
|
5
|
+
/** A write's fence, and the entity holding the run's current claim to check it against. */
|
|
6
|
+
export interface RunFenceCheck {
|
|
7
|
+
claims: RunClaimEntity;
|
|
8
|
+
fence: RunFence;
|
|
9
|
+
operation: string;
|
|
10
|
+
}
|
|
11
|
+
/** An ElectroDB write chain, run on its own with `go()` or as a transaction item with `commit()`. */
|
|
12
|
+
export interface WriteChain {
|
|
13
|
+
go(): Promise<unknown>;
|
|
14
|
+
commit(): unknown;
|
|
15
|
+
}
|
|
16
|
+
/** Whether a write failed its condition, either directly or wrapped by ElectroDB. */
|
|
17
|
+
export declare function isConditionalCheckFailed(error: unknown): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Runs a single-item write, retrying while a transaction is writing the same
|
|
20
|
+
* item. DynamoDB rejects such a write with TransactionConflictException
|
|
21
|
+
* instead of waiting for the transaction, and the SDK does not retry it.
|
|
22
|
+
*/
|
|
23
|
+
export declare function retryOnTransactionConflict<T>(write: () => Promise<T>): Promise<T>;
|
|
24
|
+
/**
|
|
25
|
+
* Rejects a fenced write that turns out to have nothing to write when its
|
|
26
|
+
* fence is no longer current, as the write itself would have been rejected.
|
|
27
|
+
*/
|
|
28
|
+
export declare function assertRunFence(service: Service<Record<string, any>>, check: RunFenceCheck | undefined): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Runs a write, fenced when `check` is set. A fenced write is a transaction
|
|
31
|
+
* whose first item is a condition check on the run's claim, matching it on
|
|
32
|
+
* the fence. A fence that is no longer current fails the check, and the write
|
|
33
|
+
* throws `RunFenceConflictError` without writing anything. Transactions are
|
|
34
|
+
* serializable with the single-item writes that claim a run, so a takeover
|
|
35
|
+
* lands either before the transaction (failing its check) or after it.
|
|
36
|
+
*
|
|
37
|
+
* A fenced write whose own condition fails throws an error named
|
|
38
|
+
* `ConditionalCheckFailedException`, as the unfenced write would.
|
|
39
|
+
*/
|
|
40
|
+
export declare function goWithRunFence(service: Service<Record<string, any>>, check: RunFenceCheck | undefined, write: WriteChain): Promise<void>;
|
|
41
|
+
//# sourceMappingURL=run-fencing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-fencing.d.ts","sourceRoot":"","sources":["../../../src/storage/domains/run-fencing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,qGAAqG;AACrG,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAAG,kBAAkB,CAAC;AAEvE,2FAA2F;AAC3F,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,QAAQ,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,qGAAqG;AACrG,MAAM,WAAW,UAAU;IACzB,EAAE,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACvB,MAAM,IAAI,OAAO,CAAC;CACnB;AA6BD,qFAAqF;AACrF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEhE;AAED;;;;GAIG;AACH,wBAAsB,0BAA0B,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CASvF;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EACrC,KAAK,EAAE,aAAa,GAAG,SAAS,GAC/B,OAAO,CAAC,IAAI,CAAC,CAOf;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EACrC,KAAK,EAAE,aAAa,GAAG,SAAS,EAChC,KAAK,EAAE,UAAU,GAChB,OAAO,CAAC,IAAI,CAAC,CAiCf"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { TABLE_WORKFLOW_RUN_OWNERS, TABLE_MEMORY_RUN_FENCES } from '@mastra/core/storage';
|
|
1
2
|
import type { TABLE_NAMES } from '@mastra/core/storage';
|
|
2
3
|
import type { Service } from 'electrodb';
|
|
3
4
|
/**
|
|
4
5
|
* Deletes all data for a given table/entity type
|
|
5
6
|
*/
|
|
6
|
-
export declare function deleteTableData(service: Service<Record<string, any>>, tableName: TABLE_NAMES): Promise<void>;
|
|
7
|
+
export declare function deleteTableData(service: Service<Record<string, any>>, tableName: TABLE_NAMES | typeof TABLE_WORKFLOW_RUN_OWNERS | typeof TABLE_MEMORY_RUN_FENCES): Promise<void>;
|
|
7
8
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/storage/domains/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/storage/domains/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6CzC;;GAEG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EACrC,SAAS,EAAE,WAAW,GAAG,OAAO,yBAAyB,GAAG,OAAO,uBAAuB,GACzF,OAAO,CAAC,IAAI,CAAC,CAsBf"}
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { WorkflowsStorage } from '@mastra/core/storage';
|
|
2
|
-
import type { WorkflowRun, WorkflowRuns, StorageListWorkflowRunsInput, UpdateWorkflowStateOptions } from '@mastra/core/storage';
|
|
2
|
+
import type { ClaimRunOwnershipInput, ClaimRunOwnershipResult, RenewRunOwnershipInput, RenewRunOwnershipResult, RunFence, RunOwnershipRecord, WorkflowRun, WorkflowRuns, StorageListWorkflowRunsInput, UpdateWorkflowStateOptions } from '@mastra/core/storage';
|
|
3
3
|
import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
|
|
4
4
|
import type { DynamoDBDomainConfig } from '../../db/index.js';
|
|
5
5
|
export declare class WorkflowStorageDynamoDB extends WorkflowsStorage {
|
|
6
|
+
#private;
|
|
6
7
|
private service;
|
|
7
8
|
private ttlConfig?;
|
|
8
9
|
constructor(config: DynamoDBDomainConfig);
|
|
9
10
|
supportsConcurrentUpdates(): boolean;
|
|
11
|
+
supportsRunFencing(): boolean;
|
|
10
12
|
dangerouslyClearAll(): Promise<void>;
|
|
13
|
+
claimRunOwnership({ runId, ownerId, leaseMs, force, expectedGeneration, }: ClaimRunOwnershipInput): Promise<ClaimRunOwnershipResult>;
|
|
14
|
+
renewRunOwnership({ leaseMs, ...fence }: RenewRunOwnershipInput): Promise<RenewRunOwnershipResult>;
|
|
15
|
+
releaseRunOwnership(fence: RunFence): Promise<boolean>;
|
|
16
|
+
getRunOwnership({ runId }: {
|
|
17
|
+
runId: string;
|
|
18
|
+
}): Promise<RunOwnershipRecord | null>;
|
|
11
19
|
/**
|
|
12
20
|
* Helper to check if an error is a DynamoDB conditional check failure
|
|
13
21
|
*/
|
|
@@ -16,26 +24,29 @@ export declare class WorkflowStorageDynamoDB extends WorkflowsStorage {
|
|
|
16
24
|
* Helper to delay with exponential backoff and jitter
|
|
17
25
|
*/
|
|
18
26
|
private delay;
|
|
19
|
-
updateWorkflowResults({ workflowName, runId, stepId, result, requestContext, state, }: {
|
|
27
|
+
updateWorkflowResults({ workflowName, runId, stepId, result, requestContext, state, fence, }: {
|
|
20
28
|
workflowName: string;
|
|
21
29
|
runId: string;
|
|
22
30
|
stepId: string;
|
|
23
31
|
result: StepResult<any, any, any, any>;
|
|
24
32
|
requestContext: Record<string, any>;
|
|
25
33
|
state?: Record<string, any>;
|
|
34
|
+
fence?: RunFence;
|
|
26
35
|
}): Promise<Record<string, StepResult<any, any, any, any>>>;
|
|
27
|
-
updateWorkflowState({ workflowName, runId, opts, }: {
|
|
36
|
+
updateWorkflowState({ workflowName, runId, opts, fence, }: {
|
|
28
37
|
workflowName: string;
|
|
29
38
|
runId: string;
|
|
30
39
|
opts: UpdateWorkflowStateOptions;
|
|
40
|
+
fence?: RunFence;
|
|
31
41
|
}): Promise<WorkflowRunState | undefined>;
|
|
32
|
-
persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot, createdAt, updatedAt, }: {
|
|
42
|
+
persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot, createdAt, updatedAt, fence, }: {
|
|
33
43
|
workflowName: string;
|
|
34
44
|
runId: string;
|
|
35
45
|
resourceId?: string;
|
|
36
46
|
snapshot: WorkflowRunState;
|
|
37
47
|
createdAt?: Date;
|
|
38
48
|
updatedAt?: Date;
|
|
49
|
+
fence?: RunFence;
|
|
39
50
|
}): Promise<void>;
|
|
40
51
|
loadWorkflowSnapshot({ workflowName, runId, }: {
|
|
41
52
|
workflowName: string;
|
|
@@ -46,9 +57,10 @@ export declare class WorkflowStorageDynamoDB extends WorkflowsStorage {
|
|
|
46
57
|
runId: string;
|
|
47
58
|
workflowName?: string;
|
|
48
59
|
}): Promise<WorkflowRun | null>;
|
|
49
|
-
deleteWorkflowRunById({ runId, workflowName }: {
|
|
60
|
+
deleteWorkflowRunById({ runId, workflowName, fence, }: {
|
|
50
61
|
runId: string;
|
|
51
62
|
workflowName: string;
|
|
63
|
+
fence?: RunFence;
|
|
52
64
|
}): Promise<void>;
|
|
53
65
|
}
|
|
54
66
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/workflows/index.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/workflows/index.ts"],"names":[],"mappings":"AACA,OAAO,EAQL,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,QAAQ,EACR,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,4BAA4B,EAC5B,0BAA0B,EAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAmDrD,qBAAa,uBAAwB,SAAQ,gBAAgB;;IAC3D,OAAO,CAAC,OAAO,CAA+B;IAC9C,OAAO,CAAC,SAAS,CAAC,CAAoB;IAEtC,YAAY,MAAM,EAAE,oBAAoB,EAKvC;IAED,yBAAyB,IAAI,OAAO,CAEnC;IAEQ,kBAAkB,IAAI,OAAO,CAErC;IAEK,mBAAmB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
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/dynamodb",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "DynamoDB storage adapter for Mastra",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"electrodb": "^3.9.1"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@mastra/core": ">=1.
|
|
30
|
+
"@mastra/core": ">=1.76.0-0 <2.0.0-0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "22.20.1",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"tsx": "^4.23.1",
|
|
39
39
|
"typescript": "^7.0.2",
|
|
40
40
|
"vitest": "4.1.11",
|
|
41
|
-
"@internal/lint": "0.0.
|
|
42
|
-
"@internal/
|
|
43
|
-
"@internal/
|
|
44
|
-
"@mastra/core": "1.
|
|
41
|
+
"@internal/lint": "0.0.143",
|
|
42
|
+
"@internal/types-builder": "0.0.118",
|
|
43
|
+
"@internal/storage-test-utils": "0.0.139",
|
|
44
|
+
"@mastra/core": "1.77.0"
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://mastra.ai",
|
|
47
47
|
"repository": {
|