@mastra/dynamodb 0.14.3 → 0.14.5
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/index.cjs +34 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +35 -2
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/operations/index.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +19 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +19 -1
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/storage/domains/operations/index.ts +2 -0
- package/src/storage/domains/workflows/index.ts +38 -1
- package/src/storage/index.ts +35 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DynamoDBClient, DescribeTableCommand } from '@aws-sdk/client-dynamodb';
|
|
2
2
|
import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
|
|
3
3
|
import { MastraError, ErrorCategory, ErrorDomain } from '@mastra/core/error';
|
|
4
|
-
import { MastraStorage, StoreOperations, TracesStorage, TABLE_TRACES, WorkflowsStorage, MemoryStorage, resolveMessageLimit, ScoresStorage, LegacyEvalsStorage, TABLE_RESOURCES, TABLE_SCORERS, TABLE_EVALS, TABLE_WORKFLOW_SNAPSHOT, TABLE_MESSAGES, TABLE_THREADS } from '@mastra/core/storage';
|
|
4
|
+
import { MastraStorage, StoreOperations, TracesStorage, TABLE_TRACES, WorkflowsStorage, MemoryStorage, resolveMessageLimit, ScoresStorage, LegacyEvalsStorage, TABLE_AI_SPANS, TABLE_RESOURCES, TABLE_SCORERS, TABLE_EVALS, TABLE_WORKFLOW_SNAPSHOT, TABLE_MESSAGES, TABLE_THREADS } from '@mastra/core/storage';
|
|
5
5
|
import { Entity, Service } from 'electrodb';
|
|
6
6
|
import { MessageList } from '@mastra/core/agent';
|
|
7
7
|
|
|
@@ -1842,7 +1842,8 @@ var StoreOperationsDynamoDB = class extends StoreOperations {
|
|
|
1842
1842
|
[TABLE_EVALS]: "eval",
|
|
1843
1843
|
[TABLE_SCORERS]: "score",
|
|
1844
1844
|
[TABLE_TRACES]: "trace",
|
|
1845
|
-
[TABLE_RESOURCES]: "resource"
|
|
1845
|
+
[TABLE_RESOURCES]: "resource",
|
|
1846
|
+
[TABLE_AI_SPANS]: "ai_span"
|
|
1846
1847
|
};
|
|
1847
1848
|
return mapping[tableName] || null;
|
|
1848
1849
|
}
|
|
@@ -2599,6 +2600,22 @@ var WorkflowStorageDynamoDB = class extends WorkflowsStorage {
|
|
|
2599
2600
|
super();
|
|
2600
2601
|
this.service = service;
|
|
2601
2602
|
}
|
|
2603
|
+
updateWorkflowResults({
|
|
2604
|
+
// workflowName,
|
|
2605
|
+
// runId,
|
|
2606
|
+
// stepId,
|
|
2607
|
+
// result,
|
|
2608
|
+
// runtimeContext,
|
|
2609
|
+
}) {
|
|
2610
|
+
throw new Error("Method not implemented.");
|
|
2611
|
+
}
|
|
2612
|
+
updateWorkflowState({
|
|
2613
|
+
// workflowName,
|
|
2614
|
+
// runId,
|
|
2615
|
+
// opts,
|
|
2616
|
+
}) {
|
|
2617
|
+
throw new Error("Method not implemented.");
|
|
2618
|
+
}
|
|
2602
2619
|
// Workflow operations
|
|
2603
2620
|
async persistWorkflowSnapshot({
|
|
2604
2621
|
workflowName,
|
|
@@ -2997,6 +3014,22 @@ var DynamoDBStore = class extends MastraStorage {
|
|
|
2997
3014
|
return this.stores.traces.getTracesPaginated(_args);
|
|
2998
3015
|
}
|
|
2999
3016
|
// Workflow operations
|
|
3017
|
+
async updateWorkflowResults({
|
|
3018
|
+
workflowName,
|
|
3019
|
+
runId,
|
|
3020
|
+
stepId,
|
|
3021
|
+
result,
|
|
3022
|
+
runtimeContext
|
|
3023
|
+
}) {
|
|
3024
|
+
return this.stores.workflows.updateWorkflowResults({ workflowName, runId, stepId, result, runtimeContext });
|
|
3025
|
+
}
|
|
3026
|
+
async updateWorkflowState({
|
|
3027
|
+
workflowName,
|
|
3028
|
+
runId,
|
|
3029
|
+
opts
|
|
3030
|
+
}) {
|
|
3031
|
+
return this.stores.workflows.updateWorkflowState({ workflowName, runId, opts });
|
|
3032
|
+
}
|
|
3000
3033
|
async persistWorkflowSnapshot({
|
|
3001
3034
|
workflowName,
|
|
3002
3035
|
runId,
|