@mastra/dynamodb 0.0.0-vector-query-tool-provider-options-20250828222356 → 0.0.0-vector-extension-schema-20250922130418
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 +928 -0
- package/README.md +0 -4
- package/dist/index.cjs +12 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +2 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +2 -1
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +19 -10
- package/src/entities/eval.ts +0 -102
- package/src/entities/index.ts +0 -27
- package/src/entities/message.ts +0 -143
- package/src/entities/resource.ts +0 -57
- package/src/entities/score.ts +0 -317
- package/src/entities/thread.ts +0 -66
- package/src/entities/trace.ts +0 -129
- package/src/entities/utils.ts +0 -51
- package/src/entities/workflow-snapshot.ts +0 -56
- package/src/index.ts +0 -1
- package/src/storage/docker-compose.yml +0 -16
- package/src/storage/domains/legacy-evals/index.ts +0 -243
- package/src/storage/domains/memory/index.ts +0 -987
- package/src/storage/domains/operations/index.ts +0 -435
- package/src/storage/domains/score/index.ts +0 -292
- package/src/storage/domains/traces/index.ts +0 -286
- package/src/storage/domains/workflows/index.ts +0 -334
- package/src/storage/index.test.ts +0 -1420
- package/src/storage/index.ts +0 -538
package/README.md
CHANGED
|
@@ -138,7 +138,3 @@ This implementation uses a single-table design pattern with ElectroDB, which off
|
|
|
138
138
|
3. **Simplified administration**: Only one table to monitor and back up
|
|
139
139
|
4. **Reduced complexity**: Consistent access patterns across entities
|
|
140
140
|
5. **Transaction support**: Atomic operations across different entity types
|
|
141
|
-
|
|
142
|
-
## License
|
|
143
|
-
|
|
144
|
-
MIT
|
package/dist/index.cjs
CHANGED
|
@@ -1307,6 +1307,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1307
1307
|
}) {
|
|
1308
1308
|
this.logger.debug("Getting messages", { threadId, selectBy });
|
|
1309
1309
|
try {
|
|
1310
|
+
if (!threadId.trim()) throw new Error("threadId must be a non-empty string");
|
|
1310
1311
|
const messages = [];
|
|
1311
1312
|
const limit = storage.resolveMessageLimit({ last: selectBy?.last, defaultLimit: Number.MAX_SAFE_INTEGER });
|
|
1312
1313
|
if (selectBy?.include?.length) {
|
|
@@ -1355,7 +1356,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1355
1356
|
id: "STORAGE_DYNAMODB_STORE_GET_MESSAGES_FAILED",
|
|
1356
1357
|
domain: error.ErrorDomain.STORAGE,
|
|
1357
1358
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1358
|
-
details: { threadId }
|
|
1359
|
+
details: { threadId, resourceId: resourceId ?? "" }
|
|
1359
1360
|
},
|
|
1360
1361
|
error$1
|
|
1361
1362
|
);
|
|
@@ -1510,6 +1511,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1510
1511
|
const limit = storage.resolveMessageLimit({ last: selectBy?.last, defaultLimit: Number.MAX_SAFE_INTEGER });
|
|
1511
1512
|
this.logger.debug("Getting messages with pagination", { threadId, page, perPage, fromDate, toDate, limit });
|
|
1512
1513
|
try {
|
|
1514
|
+
if (!threadId.trim()) throw new Error("threadId must be a non-empty string");
|
|
1513
1515
|
let messages = [];
|
|
1514
1516
|
if (selectBy?.include?.length) {
|
|
1515
1517
|
const includeMessages = await this._getIncludedMessages(threadId, selectBy);
|
|
@@ -1565,19 +1567,23 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1565
1567
|
hasMore
|
|
1566
1568
|
};
|
|
1567
1569
|
} catch (error$1) {
|
|
1568
|
-
|
|
1570
|
+
const mastraError = new error.MastraError(
|
|
1569
1571
|
{
|
|
1570
1572
|
id: "STORAGE_DYNAMODB_STORE_GET_MESSAGES_PAGINATED_FAILED",
|
|
1571
1573
|
domain: error.ErrorDomain.STORAGE,
|
|
1572
1574
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1573
|
-
details: { threadId }
|
|
1575
|
+
details: { threadId, resourceId: resourceId ?? "" }
|
|
1574
1576
|
},
|
|
1575
1577
|
error$1
|
|
1576
1578
|
);
|
|
1579
|
+
this.logger?.trackException?.(mastraError);
|
|
1580
|
+
this.logger?.error?.(mastraError.toString());
|
|
1581
|
+
return { messages: [], total: 0, page, perPage, hasMore: false };
|
|
1577
1582
|
}
|
|
1578
1583
|
}
|
|
1579
1584
|
// Helper method to get included messages with context
|
|
1580
1585
|
async _getIncludedMessages(threadId, selectBy) {
|
|
1586
|
+
if (!threadId.trim()) throw new Error("threadId must be a non-empty string");
|
|
1581
1587
|
if (!selectBy?.include?.length) {
|
|
1582
1588
|
return [];
|
|
1583
1589
|
}
|
|
@@ -2622,11 +2628,11 @@ var WorkflowStorageDynamoDB = class extends storage.WorkflowsStorage {
|
|
|
2622
2628
|
async persistWorkflowSnapshot({
|
|
2623
2629
|
workflowName,
|
|
2624
2630
|
runId,
|
|
2631
|
+
resourceId,
|
|
2625
2632
|
snapshot
|
|
2626
2633
|
}) {
|
|
2627
2634
|
this.logger.debug("Persisting workflow snapshot", { workflowName, runId });
|
|
2628
2635
|
try {
|
|
2629
|
-
const resourceId = "resourceId" in snapshot ? snapshot.resourceId : void 0;
|
|
2630
2636
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
2631
2637
|
const data = {
|
|
2632
2638
|
entity: "workflow_snapshot",
|
|
@@ -2752,8 +2758,6 @@ var WorkflowStorageDynamoDB = class extends storage.WorkflowsStorage {
|
|
|
2752
2758
|
async getWorkflowRunById(args) {
|
|
2753
2759
|
const { runId, workflowName } = args;
|
|
2754
2760
|
this.logger.debug("Getting workflow run by ID", { runId, workflowName });
|
|
2755
|
-
console.log("workflowName", workflowName);
|
|
2756
|
-
console.log("runId", runId);
|
|
2757
2761
|
try {
|
|
2758
2762
|
if (workflowName) {
|
|
2759
2763
|
this.logger.debug("WorkflowName provided, using direct GET operation.");
|
|
@@ -2763,7 +2767,6 @@ var WorkflowStorageDynamoDB = class extends storage.WorkflowsStorage {
|
|
|
2763
2767
|
workflow_name: workflowName,
|
|
2764
2768
|
run_id: runId
|
|
2765
2769
|
}).go();
|
|
2766
|
-
console.log("result", result2);
|
|
2767
2770
|
if (!result2.data) {
|
|
2768
2771
|
return null;
|
|
2769
2772
|
}
|
|
@@ -3035,9 +3038,10 @@ var DynamoDBStore = class extends storage.MastraStorage {
|
|
|
3035
3038
|
async persistWorkflowSnapshot({
|
|
3036
3039
|
workflowName,
|
|
3037
3040
|
runId,
|
|
3041
|
+
resourceId,
|
|
3038
3042
|
snapshot
|
|
3039
3043
|
}) {
|
|
3040
|
-
return this.stores.workflows.persistWorkflowSnapshot({ workflowName, runId, snapshot });
|
|
3044
|
+
return this.stores.workflows.persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot });
|
|
3041
3045
|
}
|
|
3042
3046
|
async loadWorkflowSnapshot({
|
|
3043
3047
|
workflowName,
|