@mastra/convex 0.0.0-fix-11329-windows-path-20251222155941 → 0.0.0-fix-local-pkg-cwd-20251226155239
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 +348 -3
- package/dist/chunk-H5QJE733.cjs +104 -0
- package/dist/chunk-H5QJE733.cjs.map +1 -0
- package/dist/chunk-HXB4DWFE.js +73 -0
- package/dist/chunk-HXB4DWFE.js.map +1 -0
- package/dist/index.cjs +25 -134
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -121
- package/dist/index.js.map +1 -1
- package/dist/schema.cjs +17 -17
- package/dist/schema.d.ts +52 -75
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +1 -1
- package/dist/server/index.cjs +14 -14
- package/dist/server/index.js +1 -1
- package/dist/storage/domains/scores/index.d.ts +5 -14
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +21 -121
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/chunk-PKUUSREO.js +0 -76
- package/dist/chunk-PKUUSREO.js.map +0 -1
- package/dist/chunk-ZBUP3DS6.cjs +0 -93
- package/dist/chunk-ZBUP3DS6.cjs.map +0 -1
- package/dist/server/schema.d.ts +0 -115
- package/dist/server/schema.d.ts.map +0 -1
package/dist/schema.d.ts
CHANGED
|
@@ -1,103 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convex schema definitions for Mastra tables.
|
|
3
|
+
*
|
|
4
|
+
* This file dynamically builds Convex table definitions from the canonical
|
|
5
|
+
* TABLE_SCHEMAS in @mastra/core/storage/constants to ensure they stay in sync.
|
|
6
|
+
*
|
|
7
|
+
* The import path @mastra/core/storage/constants is specifically designed to
|
|
8
|
+
* avoid pulling in Node.js dependencies, making it safe to use in Convex's
|
|
9
|
+
* sandboxed schema evaluation environment.
|
|
10
|
+
*/
|
|
11
|
+
import { TABLE_WORKFLOW_SNAPSHOT, TABLE_MESSAGES, TABLE_THREADS, TABLE_RESOURCES, TABLE_SCORERS } from '@mastra/core/storage/constants';
|
|
12
|
+
/**
|
|
13
|
+
* Threads table - stores conversation threads
|
|
14
|
+
* Schema: TABLE_SCHEMAS[TABLE_THREADS]
|
|
15
|
+
*/
|
|
1
16
|
export declare const mastraThreadsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
id: string;
|
|
5
|
-
createdAt: string;
|
|
6
|
-
updatedAt: string;
|
|
7
|
-
}, {
|
|
8
|
-
id: import("convex/values").VString<string, "required">;
|
|
9
|
-
resourceId: import("convex/values").VString<string, "optional">;
|
|
10
|
-
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
11
|
-
createdAt: import("convex/values").VString<string, "required">;
|
|
12
|
-
updatedAt: import("convex/values").VString<string, "required">;
|
|
13
|
-
}, "required", "id" | "createdAt" | "resourceId" | "metadata" | "updatedAt" | `metadata.${string}`>, {
|
|
17
|
+
[x: string]: any;
|
|
18
|
+
}, Record<string, any>, "required", string>, {
|
|
14
19
|
by_record_id: ["id", "_creationTime"];
|
|
15
20
|
by_resource: ["resourceId", "_creationTime"];
|
|
16
21
|
by_created: ["createdAt", "_creationTime"];
|
|
17
22
|
by_updated: ["updatedAt", "_creationTime"];
|
|
18
23
|
}, {}, {}>;
|
|
24
|
+
/**
|
|
25
|
+
* Messages table - stores conversation messages
|
|
26
|
+
* Schema: TABLE_SCHEMAS[TABLE_MESSAGES]
|
|
27
|
+
*/
|
|
19
28
|
export declare const mastraMessagesTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
createdAt: string;
|
|
23
|
-
role: string;
|
|
24
|
-
type: string;
|
|
25
|
-
content: string;
|
|
26
|
-
thread_id: string;
|
|
27
|
-
}, {
|
|
28
|
-
id: import("convex/values").VString<string, "required">;
|
|
29
|
-
thread_id: import("convex/values").VString<string, "required">;
|
|
30
|
-
content: import("convex/values").VString<string, "required">;
|
|
31
|
-
role: import("convex/values").VString<string, "required">;
|
|
32
|
-
type: import("convex/values").VString<string, "required">;
|
|
33
|
-
createdAt: import("convex/values").VString<string, "required">;
|
|
34
|
-
resourceId: import("convex/values").VString<string, "optional">;
|
|
35
|
-
}, "required", "id" | "createdAt" | "role" | "resourceId" | "type" | "content" | "thread_id">, {
|
|
29
|
+
[x: string]: any;
|
|
30
|
+
}, Record<string, any>, "required", string>, {
|
|
36
31
|
by_record_id: ["id", "_creationTime"];
|
|
37
32
|
by_thread: ["thread_id", "_creationTime"];
|
|
38
33
|
by_thread_created: ["thread_id", "createdAt", "_creationTime"];
|
|
39
34
|
by_resource: ["resourceId", "_creationTime"];
|
|
40
35
|
}, {}, {}>;
|
|
36
|
+
/**
|
|
37
|
+
* Resources table - stores resource/user working memory
|
|
38
|
+
* Schema: TABLE_SCHEMAS[TABLE_RESOURCES]
|
|
39
|
+
*/
|
|
41
40
|
export declare const mastraResourcesTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
updatedAt: string;
|
|
45
|
-
data: any;
|
|
46
|
-
}, {
|
|
47
|
-
id: import("convex/values").VString<string, "required">;
|
|
48
|
-
data: import("convex/values").VAny<any, "required", string>;
|
|
49
|
-
createdAt: import("convex/values").VString<string, "required">;
|
|
50
|
-
updatedAt: import("convex/values").VString<string, "required">;
|
|
51
|
-
}, "required", "id" | "createdAt" | "updatedAt" | "data" | `data.${string}`>, {
|
|
41
|
+
[x: string]: any;
|
|
42
|
+
}, Record<string, any>, "required", string>, {
|
|
52
43
|
by_record_id: ["id", "_creationTime"];
|
|
53
44
|
by_updated: ["updatedAt", "_creationTime"];
|
|
54
45
|
}, {}, {}>;
|
|
46
|
+
/**
|
|
47
|
+
* Workflow snapshots table - stores workflow execution state
|
|
48
|
+
* Schema: TABLE_SCHEMAS[TABLE_WORKFLOW_SNAPSHOT]
|
|
49
|
+
*/
|
|
55
50
|
export declare const mastraWorkflowSnapshotsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
run_id: string;
|
|
59
|
-
workflow_name: string;
|
|
60
|
-
createdAt: string;
|
|
61
|
-
state: any;
|
|
62
|
-
}, {
|
|
63
|
-
id: import("convex/values").VString<string, "required">;
|
|
64
|
-
workflow_name: import("convex/values").VString<string, "required">;
|
|
65
|
-
run_id: import("convex/values").VString<string, "required">;
|
|
66
|
-
state: import("convex/values").VAny<any, "required", string>;
|
|
67
|
-
createdAt: import("convex/values").VString<string, "required">;
|
|
68
|
-
resourceId: import("convex/values").VString<string, "optional">;
|
|
69
|
-
}, "required", "id" | "run_id" | "workflow_name" | "createdAt" | "resourceId" | "state" | `state.${string}`>, {
|
|
51
|
+
[x: string]: any;
|
|
52
|
+
}, Record<string, any>, "required", string>, {
|
|
70
53
|
by_record_id: ["id", "_creationTime"];
|
|
71
54
|
by_workflow_run: ["workflow_name", "run_id", "_creationTime"];
|
|
72
55
|
by_workflow: ["workflow_name", "_creationTime"];
|
|
73
56
|
by_resource: ["resourceId", "_creationTime"];
|
|
74
57
|
by_created: ["createdAt", "_creationTime"];
|
|
75
58
|
}, {}, {}>;
|
|
59
|
+
/**
|
|
60
|
+
* Scores table - stores evaluation scores
|
|
61
|
+
* Schema: TABLE_SCHEMAS[TABLE_SCORERS]
|
|
62
|
+
*/
|
|
76
63
|
export declare const mastraScoresTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
id: string;
|
|
80
|
-
createdAt: string;
|
|
81
|
-
score: number;
|
|
82
|
-
entityType: string;
|
|
83
|
-
entityId: string;
|
|
84
|
-
scorerId: string;
|
|
85
|
-
}, {
|
|
86
|
-
id: import("convex/values").VString<string, "required">;
|
|
87
|
-
scorerId: import("convex/values").VString<string, "required">;
|
|
88
|
-
entityId: import("convex/values").VString<string, "required">;
|
|
89
|
-
entityType: import("convex/values").VString<string, "required">;
|
|
90
|
-
score: import("convex/values").VFloat64<number, "required">;
|
|
91
|
-
runId: import("convex/values").VString<string, "optional">;
|
|
92
|
-
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
93
|
-
createdAt: import("convex/values").VString<string, "required">;
|
|
94
|
-
}, "required", "id" | "runId" | "createdAt" | "metadata" | "score" | "entityType" | "entityId" | "scorerId" | `metadata.${string}`>, {
|
|
64
|
+
[x: string]: any;
|
|
65
|
+
}, Record<string, any>, "required", string>, {
|
|
95
66
|
by_record_id: ["id", "_creationTime"];
|
|
96
67
|
by_scorer: ["scorerId", "_creationTime"];
|
|
97
68
|
by_entity: ["entityId", "entityType", "_creationTime"];
|
|
98
69
|
by_run: ["runId", "_creationTime"];
|
|
99
70
|
by_created: ["createdAt", "_creationTime"];
|
|
100
71
|
}, {}, {}>;
|
|
72
|
+
/**
|
|
73
|
+
* Vector indexes table - stores metadata about vector indexes
|
|
74
|
+
*/
|
|
101
75
|
export declare const mastraVectorIndexesTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
102
76
|
id: string;
|
|
103
77
|
createdAt: string;
|
|
@@ -114,6 +88,10 @@ export declare const mastraVectorIndexesTable: import("convex/server").TableDefi
|
|
|
114
88
|
by_record_id: ["id", "_creationTime"];
|
|
115
89
|
by_name: ["indexName", "_creationTime"];
|
|
116
90
|
}, {}, {}>;
|
|
91
|
+
/**
|
|
92
|
+
* Vectors table - stores vector embeddings
|
|
93
|
+
* Uses indexName field to support multiple indexes with different dimensions
|
|
94
|
+
*/
|
|
117
95
|
export declare const mastraVectorsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
118
96
|
metadata?: any;
|
|
119
97
|
id: string;
|
|
@@ -128,6 +106,9 @@ export declare const mastraVectorsTable: import("convex/server").TableDefinition
|
|
|
128
106
|
by_index_id: ["indexName", "id", "_creationTime"];
|
|
129
107
|
by_index: ["indexName", "_creationTime"];
|
|
130
108
|
}, {}, {}>;
|
|
109
|
+
/**
|
|
110
|
+
* Generic documents table - fallback for unknown table types
|
|
111
|
+
*/
|
|
131
112
|
export declare const mastraDocumentsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
132
113
|
record: any;
|
|
133
114
|
table: string;
|
|
@@ -140,11 +121,7 @@ export declare const mastraDocumentsTable: import("convex/server").TableDefiniti
|
|
|
140
121
|
by_table: ["table", "_creationTime"];
|
|
141
122
|
by_table_primary: ["table", "primaryKey", "_creationTime"];
|
|
142
123
|
}, {}, {}>;
|
|
143
|
-
export
|
|
144
|
-
export declare const TABLE_MESSAGES = "mastra_messages";
|
|
145
|
-
export declare const TABLE_THREADS = "mastra_threads";
|
|
146
|
-
export declare const TABLE_RESOURCES = "mastra_resources";
|
|
147
|
-
export declare const TABLE_SCORERS = "mastra_scores";
|
|
124
|
+
export { TABLE_WORKFLOW_SNAPSHOT, TABLE_MESSAGES, TABLE_THREADS, TABLE_RESOURCES, TABLE_SCORERS };
|
|
148
125
|
export declare const TABLE_VECTOR_INDEXES = "mastra_vector_indexes";
|
|
149
126
|
export declare const TABLE_VECTORS = "mastra_vectors";
|
|
150
127
|
export declare const TABLE_DOCUMENTS = "mastra_documents";
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAEL,uBAAuB,EACvB,cAAc,EACd,aAAa,EACb,eAAe,EACf,aAAa,EACd,MAAM,gCAAgC,CAAC;AAoDxC;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;UAIM,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;UAIO,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;UAEI,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;UAKJ,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;UAKO,CAAC;AAMtC;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;UAQH,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;UAOI,CAAC;AAMpC;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;UAMoB,CAAC;AAMtD,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC;AAGlG,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAC5D,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C,eAAO,MAAM,eAAe,qBAAqB,CAAC"}
|
package/dist/schema.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { TABLE_DOCUMENTS, TABLE_MESSAGES, TABLE_RESOURCES, TABLE_SCORERS, TABLE_THREADS, TABLE_VECTORS, TABLE_VECTOR_INDEXES, TABLE_WORKFLOW_SNAPSHOT, mastraDocumentsTable, mastraMessagesTable, mastraResourcesTable, mastraScoresTable, mastraThreadsTable, mastraVectorIndexesTable, mastraVectorsTable, mastraWorkflowSnapshotsTable } from './chunk-
|
|
1
|
+
export { TABLE_DOCUMENTS, TABLE_MESSAGES, TABLE_RESOURCES, TABLE_SCORERS, TABLE_THREADS, TABLE_VECTORS, TABLE_VECTOR_INDEXES, TABLE_WORKFLOW_SNAPSHOT, mastraDocumentsTable, mastraMessagesTable, mastraResourcesTable, mastraScoresTable, mastraThreadsTable, mastraVectorIndexesTable, mastraVectorsTable, mastraWorkflowSnapshotsTable } from './chunk-HXB4DWFE.js';
|
|
2
2
|
//# sourceMappingURL=schema.js.map
|
|
3
3
|
//# sourceMappingURL=schema.js.map
|
package/dist/server/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkBKVR7SL7_cjs = require('../chunk-BKVR7SL7.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkH5QJE733_cjs = require('../chunk-H5QJE733.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -11,55 +11,55 @@ Object.defineProperty(exports, "mastraStorage", {
|
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "TABLE_MESSAGES", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkH5QJE733_cjs.TABLE_MESSAGES; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "TABLE_RESOURCES", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkH5QJE733_cjs.TABLE_RESOURCES; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "TABLE_SCORERS", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkH5QJE733_cjs.TABLE_SCORERS; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "TABLE_THREADS", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkH5QJE733_cjs.TABLE_THREADS; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "TABLE_WORKFLOW_SNAPSHOT", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkH5QJE733_cjs.TABLE_WORKFLOW_SNAPSHOT; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "mastraDocumentsTable", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkH5QJE733_cjs.mastraDocumentsTable; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "mastraMessagesTable", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkH5QJE733_cjs.mastraMessagesTable; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "mastraResourcesTable", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkH5QJE733_cjs.mastraResourcesTable; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "mastraScoresTable", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkH5QJE733_cjs.mastraScoresTable; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "mastraThreadsTable", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkH5QJE733_cjs.mastraThreadsTable; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "mastraVectorIndexesTable", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkH5QJE733_cjs.mastraVectorIndexesTable; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "mastraVectorsTable", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkH5QJE733_cjs.mastraVectorsTable; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "mastraWorkflowSnapshotsTable", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkH5QJE733_cjs.mastraWorkflowSnapshotsTable; }
|
|
63
63
|
});
|
|
64
64
|
//# sourceMappingURL=index.cjs.map
|
|
65
65
|
//# sourceMappingURL=index.cjs.map
|
package/dist/server/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { mastraStorage } from '../chunk-KSAPIIEJ.js';
|
|
2
|
-
export { TABLE_MESSAGES, TABLE_RESOURCES, TABLE_SCORERS, TABLE_THREADS, TABLE_WORKFLOW_SNAPSHOT, mastraDocumentsTable, mastraMessagesTable, mastraResourcesTable, mastraScoresTable, mastraThreadsTable, mastraVectorIndexesTable, mastraVectorsTable, mastraWorkflowSnapshotsTable } from '../chunk-
|
|
2
|
+
export { TABLE_MESSAGES, TABLE_RESOURCES, TABLE_SCORERS, TABLE_THREADS, TABLE_WORKFLOW_SNAPSHOT, mastraDocumentsTable, mastraMessagesTable, mastraResourcesTable, mastraScoresTable, mastraThreadsTable, mastraVectorIndexesTable, mastraVectorsTable, mastraWorkflowSnapshotsTable } from '../chunk-HXB4DWFE.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { SaveScorePayload, ScoreRowData, ScoringEntityType, ScoringSource } from '@mastra/core/evals';
|
|
1
|
+
import type { ListScoresResponse, SaveScorePayload, ScoreRowData, ScoringEntityType, ScoringSource } from '@mastra/core/evals';
|
|
2
2
|
import { ScoresStorage } from '@mastra/core/storage';
|
|
3
|
-
import type {
|
|
3
|
+
import type { StoragePagination } from '@mastra/core/storage';
|
|
4
4
|
import type { ConvexDomainConfig } from '../../db/index.js';
|
|
5
5
|
export declare class ScoresConvex extends ScoresStorage {
|
|
6
6
|
#private;
|
|
@@ -19,25 +19,16 @@ export declare class ScoresConvex extends ScoresStorage {
|
|
|
19
19
|
entityId?: string;
|
|
20
20
|
entityType?: ScoringEntityType;
|
|
21
21
|
source?: ScoringSource;
|
|
22
|
-
}): Promise<
|
|
23
|
-
pagination: PaginationInfo;
|
|
24
|
-
scores: ScoreRowData[];
|
|
25
|
-
}>;
|
|
22
|
+
}): Promise<ListScoresResponse>;
|
|
26
23
|
listScoresByRunId({ runId, pagination, }: {
|
|
27
24
|
runId: string;
|
|
28
25
|
pagination: StoragePagination;
|
|
29
|
-
}): Promise<
|
|
30
|
-
pagination: PaginationInfo;
|
|
31
|
-
scores: ScoreRowData[];
|
|
32
|
-
}>;
|
|
26
|
+
}): Promise<ListScoresResponse>;
|
|
33
27
|
listScoresByEntityId({ entityId, entityType, pagination, }: {
|
|
34
28
|
entityId: string;
|
|
35
29
|
entityType: ScoringEntityType;
|
|
36
30
|
pagination: StoragePagination;
|
|
37
|
-
}): Promise<
|
|
38
|
-
pagination: PaginationInfo;
|
|
39
|
-
scores: ScoreRowData[];
|
|
40
|
-
}>;
|
|
31
|
+
}): Promise<ListScoresResponse>;
|
|
41
32
|
private listScores;
|
|
42
33
|
private deserialize;
|
|
43
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/scores/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/scores/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAiB,aAAa,EAAwB,MAAM,sBAAsB,CAAC;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAOnD,qBAAa,YAAa,SAAQ,aAAa;;gBAEjC,MAAM,EAAE,kBAAkB;IAMhC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAIpC,YAAY,CAAC,EAAE,EAAE,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAQlE,SAAS,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,YAAY,CAAA;KAAE,CAAC;IAiBpE,oBAAoB,CAAC,EACzB,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,UAAU,EACV,MAAM,GACP,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,iBAAiB,CAAC;QAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,iBAAiB,CAAC;QAC/B,MAAM,CAAC,EAAE,aAAa,CAAC;KACxB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAOzB,iBAAiB,CAAC,EACtB,KAAK,EACL,UAAU,GACX,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,iBAAiB,CAAC;KAC/B,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAOzB,oBAAoB,CAAC,EACzB,QAAQ,EACR,UAAU,EACV,UAAU,GACX,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,iBAAiB,CAAC;QAC9B,UAAU,EAAE,iBAAiB,CAAC;KAC/B,GAAG,OAAO,CAAC,kBAAkB,CAAC;YAOjB,UAAU;IA4CxB,OAAO,CAAC,WAAW;CAOpB"}
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { MastraDBMessage, StorageThreadType } from '@mastra/core/memory';
|
|
3
|
-
import type { StorageResourceType, PaginationInfo, StorageListMessagesInput, StorageListMessagesOutput, StorageListThreadsByResourceIdInput, StorageListThreadsByResourceIdOutput, StorageListWorkflowRunsInput, StoragePagination, WorkflowRun, WorkflowRuns, UpdateWorkflowStateOptions } from '@mastra/core/storage';
|
|
1
|
+
import type { StorageDomains, StorageSupports } from '@mastra/core/storage';
|
|
4
2
|
import { MastraStorage } from '@mastra/core/storage';
|
|
5
|
-
import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
|
|
6
3
|
import type { ConvexAdminClientConfig } from './client.js';
|
|
7
4
|
import { ConvexAdminClient } from './client.js';
|
|
8
5
|
/**
|
|
@@ -55,124 +52,27 @@ export type ConvexStoreConfig = {
|
|
|
55
52
|
*/
|
|
56
53
|
client: ConvexAdminClient;
|
|
57
54
|
} | ConvexAdminClientConfig);
|
|
55
|
+
/**
|
|
56
|
+
* Convex storage adapter for Mastra.
|
|
57
|
+
*
|
|
58
|
+
* Access domain-specific storage via `getStore()`:
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* const storage = new ConvexStore({ id: 'my-store', deploymentUrl: '...', adminAuthToken: '...' });
|
|
63
|
+
*
|
|
64
|
+
* // Access memory domain
|
|
65
|
+
* const memory = await storage.getStore('memory');
|
|
66
|
+
* await memory?.saveThread({ thread });
|
|
67
|
+
*
|
|
68
|
+
* // Access workflows domain
|
|
69
|
+
* const workflows = await storage.getStore('workflows');
|
|
70
|
+
* await workflows?.persistWorkflowSnapshot({ workflowName, runId, snapshot });
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
58
73
|
export declare class ConvexStore extends MastraStorage {
|
|
59
|
-
|
|
60
|
-
private readonly workflows;
|
|
61
|
-
private readonly scores;
|
|
74
|
+
stores: StorageDomains;
|
|
62
75
|
constructor(config: ConvexStoreConfig);
|
|
63
|
-
get supports():
|
|
64
|
-
selectByIncludeResourceScope: boolean;
|
|
65
|
-
resourceWorkingMemory: boolean;
|
|
66
|
-
hasColumn: boolean;
|
|
67
|
-
createTable: boolean;
|
|
68
|
-
deleteMessages: boolean;
|
|
69
|
-
observabilityInstance: boolean;
|
|
70
|
-
listScoresBySpan: boolean;
|
|
71
|
-
};
|
|
72
|
-
getThreadById({ threadId }: {
|
|
73
|
-
threadId: string;
|
|
74
|
-
}): Promise<StorageThreadType | null>;
|
|
75
|
-
saveThread({ thread }: {
|
|
76
|
-
thread: StorageThreadType;
|
|
77
|
-
}): Promise<StorageThreadType>;
|
|
78
|
-
updateThread({ id, title, metadata, }: {
|
|
79
|
-
id: string;
|
|
80
|
-
title: string;
|
|
81
|
-
metadata: Record<string, unknown>;
|
|
82
|
-
}): Promise<StorageThreadType>;
|
|
83
|
-
deleteThread({ threadId }: {
|
|
84
|
-
threadId: string;
|
|
85
|
-
}): Promise<void>;
|
|
86
|
-
listMessages(args: StorageListMessagesInput): Promise<StorageListMessagesOutput>;
|
|
87
|
-
listMessagesById({ messageIds }: {
|
|
88
|
-
messageIds: string[];
|
|
89
|
-
}): Promise<{
|
|
90
|
-
messages: MastraDBMessage[];
|
|
91
|
-
}>;
|
|
92
|
-
saveMessages(args: {
|
|
93
|
-
messages: MastraDBMessage[];
|
|
94
|
-
}): Promise<{
|
|
95
|
-
messages: MastraDBMessage[];
|
|
96
|
-
}>;
|
|
97
|
-
updateMessages({ messages, }: {
|
|
98
|
-
messages: (Partial<Omit<MastraDBMessage, 'createdAt'>> & {
|
|
99
|
-
id: string;
|
|
100
|
-
})[];
|
|
101
|
-
}): Promise<MastraDBMessage[]>;
|
|
102
|
-
deleteMessages(messageIds: string[]): Promise<void>;
|
|
103
|
-
listThreadsByResourceId(args: StorageListThreadsByResourceIdInput): Promise<StorageListThreadsByResourceIdOutput>;
|
|
104
|
-
getResourceById({ resourceId }: {
|
|
105
|
-
resourceId: string;
|
|
106
|
-
}): Promise<StorageResourceType | null>;
|
|
107
|
-
saveResource({ resource }: {
|
|
108
|
-
resource: StorageResourceType;
|
|
109
|
-
}): Promise<StorageResourceType>;
|
|
110
|
-
updateResource({ resourceId, workingMemory, metadata, }: {
|
|
111
|
-
resourceId: string;
|
|
112
|
-
workingMemory?: string;
|
|
113
|
-
metadata?: Record<string, unknown>;
|
|
114
|
-
}): Promise<StorageResourceType>;
|
|
115
|
-
updateWorkflowResults(params: {
|
|
116
|
-
workflowName: string;
|
|
117
|
-
runId: string;
|
|
118
|
-
stepId: string;
|
|
119
|
-
result: StepResult<any, any, any, any>;
|
|
120
|
-
requestContext: Record<string, any>;
|
|
121
|
-
}): Promise<Record<string, StepResult<any, any, any, any>>>;
|
|
122
|
-
updateWorkflowState(params: {
|
|
123
|
-
workflowName: string;
|
|
124
|
-
runId: string;
|
|
125
|
-
opts: UpdateWorkflowStateOptions;
|
|
126
|
-
}): Promise<WorkflowRunState | undefined>;
|
|
127
|
-
persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot, }: {
|
|
128
|
-
workflowName: string;
|
|
129
|
-
runId: string;
|
|
130
|
-
resourceId?: string | undefined;
|
|
131
|
-
snapshot: WorkflowRunState;
|
|
132
|
-
}): Promise<void>;
|
|
133
|
-
loadWorkflowSnapshot({ workflowName, runId, }: {
|
|
134
|
-
workflowName: string;
|
|
135
|
-
runId: string;
|
|
136
|
-
}): Promise<WorkflowRunState | null>;
|
|
137
|
-
listWorkflowRuns(args?: StorageListWorkflowRunsInput): Promise<WorkflowRuns>;
|
|
138
|
-
getWorkflowRunById({ runId, workflowName, }: {
|
|
139
|
-
runId: string;
|
|
140
|
-
workflowName?: string | undefined;
|
|
141
|
-
}): Promise<WorkflowRun | null>;
|
|
142
|
-
deleteWorkflowRunById({ runId, workflowName }: {
|
|
143
|
-
runId: string;
|
|
144
|
-
workflowName: string;
|
|
145
|
-
}): Promise<void>;
|
|
146
|
-
getScoreById({ id }: {
|
|
147
|
-
id: string;
|
|
148
|
-
}): Promise<ScoreRowData | null>;
|
|
149
|
-
saveScore(score: SaveScorePayload): Promise<{
|
|
150
|
-
score: ScoreRowData;
|
|
151
|
-
}>;
|
|
152
|
-
listScoresByScorerId({ scorerId, pagination, entityId, entityType, source, }: {
|
|
153
|
-
scorerId: string;
|
|
154
|
-
pagination: StoragePagination;
|
|
155
|
-
entityId?: string | undefined;
|
|
156
|
-
entityType?: ScoringEntityType | undefined;
|
|
157
|
-
source?: ScoringSource | undefined;
|
|
158
|
-
}): Promise<{
|
|
159
|
-
pagination: PaginationInfo;
|
|
160
|
-
scores: ScoreRowData[];
|
|
161
|
-
}>;
|
|
162
|
-
listScoresByRunId({ runId, pagination, }: {
|
|
163
|
-
runId: string;
|
|
164
|
-
pagination: StoragePagination;
|
|
165
|
-
}): Promise<{
|
|
166
|
-
pagination: PaginationInfo;
|
|
167
|
-
scores: ScoreRowData[];
|
|
168
|
-
}>;
|
|
169
|
-
listScoresByEntityId({ entityId, entityType, pagination, }: {
|
|
170
|
-
pagination: StoragePagination;
|
|
171
|
-
entityId: string;
|
|
172
|
-
entityType: ScoringEntityType;
|
|
173
|
-
}): Promise<{
|
|
174
|
-
pagination: PaginationInfo;
|
|
175
|
-
scores: ScoreRowData[];
|
|
176
|
-
}>;
|
|
76
|
+
get supports(): StorageSupports;
|
|
177
77
|
}
|
|
178
78
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAK7C;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;;;;;;OAkBG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,CACA;IACE;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,EAAE,iBAAiB,CAAC;CAC3B,GACD,uBAAuB,CAC1B,CAAC;AASF;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,WAAY,SAAQ,aAAa;IAC5C,MAAM,EAAE,cAAc,CAAwB;gBAElC,MAAM,EAAE,iBAAiB;IAkBrC,IAAW,QAAQ,IAAI,eAAe,CAYrC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/convex",
|
|
3
|
-
"version": "0.0.0-fix-
|
|
3
|
+
"version": "0.0.0-fix-local-pkg-cwd-20251226155239",
|
|
4
4
|
"description": "Convex provider for Mastra - includes both storage and vector adapters plus Convex server helpers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
"tsup": "^8.5.0",
|
|
52
52
|
"typescript": "^5.8.3",
|
|
53
53
|
"vitest": "4.0.12",
|
|
54
|
-
"@internal/
|
|
55
|
-
"@internal/
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
54
|
+
"@internal/types-builder": "0.0.0-fix-local-pkg-cwd-20251226155239",
|
|
55
|
+
"@internal/lint": "0.0.0-fix-local-pkg-cwd-20251226155239",
|
|
56
|
+
"@mastra/core": "0.0.0-fix-local-pkg-cwd-20251226155239",
|
|
57
|
+
"@internal/storage-test-utils": "0.0.49"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@mastra/core": "0.0.0-fix-
|
|
60
|
+
"@mastra/core": "0.0.0-fix-local-pkg-cwd-20251226155239"
|
|
61
61
|
},
|
|
62
62
|
"files": [
|
|
63
63
|
"dist",
|
package/dist/chunk-PKUUSREO.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { defineTable } from 'convex/server';
|
|
2
|
-
import { v } from 'convex/values';
|
|
3
|
-
|
|
4
|
-
// src/schema.ts
|
|
5
|
-
var mastraThreadsTable = defineTable({
|
|
6
|
-
id: v.string(),
|
|
7
|
-
resourceId: v.optional(v.string()),
|
|
8
|
-
metadata: v.optional(v.any()),
|
|
9
|
-
createdAt: v.string(),
|
|
10
|
-
updatedAt: v.string()
|
|
11
|
-
}).index("by_record_id", ["id"]).index("by_resource", ["resourceId"]).index("by_created", ["createdAt"]).index("by_updated", ["updatedAt"]);
|
|
12
|
-
var mastraMessagesTable = defineTable({
|
|
13
|
-
id: v.string(),
|
|
14
|
-
thread_id: v.string(),
|
|
15
|
-
content: v.string(),
|
|
16
|
-
role: v.string(),
|
|
17
|
-
type: v.string(),
|
|
18
|
-
createdAt: v.string(),
|
|
19
|
-
resourceId: v.optional(v.string())
|
|
20
|
-
}).index("by_record_id", ["id"]).index("by_thread", ["thread_id"]).index("by_thread_created", ["thread_id", "createdAt"]).index("by_resource", ["resourceId"]);
|
|
21
|
-
var mastraResourcesTable = defineTable({
|
|
22
|
-
id: v.string(),
|
|
23
|
-
data: v.any(),
|
|
24
|
-
createdAt: v.string(),
|
|
25
|
-
updatedAt: v.string()
|
|
26
|
-
}).index("by_record_id", ["id"]).index("by_updated", ["updatedAt"]);
|
|
27
|
-
var mastraWorkflowSnapshotsTable = defineTable({
|
|
28
|
-
id: v.string(),
|
|
29
|
-
workflow_name: v.string(),
|
|
30
|
-
run_id: v.string(),
|
|
31
|
-
state: v.any(),
|
|
32
|
-
createdAt: v.string(),
|
|
33
|
-
resourceId: v.optional(v.string())
|
|
34
|
-
}).index("by_record_id", ["id"]).index("by_workflow_run", ["workflow_name", "run_id"]).index("by_workflow", ["workflow_name"]).index("by_resource", ["resourceId"]).index("by_created", ["createdAt"]);
|
|
35
|
-
var mastraScoresTable = defineTable({
|
|
36
|
-
id: v.string(),
|
|
37
|
-
scorerId: v.string(),
|
|
38
|
-
entityId: v.string(),
|
|
39
|
-
entityType: v.string(),
|
|
40
|
-
score: v.number(),
|
|
41
|
-
runId: v.optional(v.string()),
|
|
42
|
-
metadata: v.optional(v.any()),
|
|
43
|
-
createdAt: v.string()
|
|
44
|
-
}).index("by_record_id", ["id"]).index("by_scorer", ["scorerId"]).index("by_entity", ["entityId", "entityType"]).index("by_run", ["runId"]).index("by_created", ["createdAt"]);
|
|
45
|
-
var mastraVectorIndexesTable = defineTable({
|
|
46
|
-
id: v.string(),
|
|
47
|
-
// Mastra record ID (same as indexName)
|
|
48
|
-
indexName: v.string(),
|
|
49
|
-
dimension: v.number(),
|
|
50
|
-
metric: v.string(),
|
|
51
|
-
createdAt: v.string()
|
|
52
|
-
}).index("by_record_id", ["id"]).index("by_name", ["indexName"]);
|
|
53
|
-
var mastraVectorsTable = defineTable({
|
|
54
|
-
id: v.string(),
|
|
55
|
-
// Mastra record ID
|
|
56
|
-
indexName: v.string(),
|
|
57
|
-
embedding: v.array(v.float64()),
|
|
58
|
-
metadata: v.optional(v.any())
|
|
59
|
-
}).index("by_index_id", ["indexName", "id"]).index("by_index", ["indexName"]);
|
|
60
|
-
var mastraDocumentsTable = defineTable({
|
|
61
|
-
table: v.string(),
|
|
62
|
-
primaryKey: v.string(),
|
|
63
|
-
record: v.any()
|
|
64
|
-
}).index("by_table", ["table"]).index("by_table_primary", ["table", "primaryKey"]);
|
|
65
|
-
var TABLE_WORKFLOW_SNAPSHOT = "mastra_workflow_snapshots";
|
|
66
|
-
var TABLE_MESSAGES = "mastra_messages";
|
|
67
|
-
var TABLE_THREADS = "mastra_threads";
|
|
68
|
-
var TABLE_RESOURCES = "mastra_resources";
|
|
69
|
-
var TABLE_SCORERS = "mastra_scores";
|
|
70
|
-
var TABLE_VECTOR_INDEXES = "mastra_vector_indexes";
|
|
71
|
-
var TABLE_VECTORS = "mastra_vectors";
|
|
72
|
-
var TABLE_DOCUMENTS = "mastra_documents";
|
|
73
|
-
|
|
74
|
-
export { TABLE_DOCUMENTS, TABLE_MESSAGES, TABLE_RESOURCES, TABLE_SCORERS, TABLE_THREADS, TABLE_VECTORS, TABLE_VECTOR_INDEXES, TABLE_WORKFLOW_SNAPSHOT, mastraDocumentsTable, mastraMessagesTable, mastraResourcesTable, mastraScoresTable, mastraThreadsTable, mastraVectorIndexesTable, mastraVectorsTable, mastraWorkflowSnapshotsTable };
|
|
75
|
-
//# sourceMappingURL=chunk-PKUUSREO.js.map
|
|
76
|
-
//# source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AChB,UAAA,EAAY,EAAE,MAAA,EAAO;AAAA,EACrB,MAAA,EAAQ,EAAE,GAAA;AACZ,CAAC,CAAA,CACE,KAAA,CAAM,UAAA,EAAY,CAAC,OAAO,CAAC,CAAA,CAC3B,KAAA,CAAM,kBAAA,EAAoB,CAAC,OAAA,EAAS,YAAY,CAAC;AAE7C,IAAM,uBAAA,GAA0B;AAChC,IAAM,cAAA,GAAiB;AACvB,IAAM,aAAA,GAAgB;AACtB,IAAM,eAAA,GAAkB;AACxB,IAAM,aAAA,GAAgB;AACtB,IAAM,oBAAA,GAAuB;AAC7B,IAAM,aAAA,GAAgB;AACtB,IAAM,eAAA,GAAkB","file":"chunk-PKUUSREO.js","sourcesContent":["import { defineTable } from 'convex/server';\nimport { v } from 'convex/values';\n\nexport const mastraThreadsTable = defineTable({\n id: v.string(),\n resourceId: v.optional(v.string()),\n metadata: v.optional(v.any()),\n createdAt: v.string(),\n updatedAt: v.string(),\n})\n .index('by_record_id', ['id'])\n .index('by_resource', ['resourceId'])\n .index('by_created', ['createdAt'])\n .index('by_updated', ['updatedAt']);\n\nexport const mastraMessagesTable = defineTable({\n id: v.string(),\n thread_id: v.string(),\n content: v.string(),\n role: v.string(),\n type: v.string(),\n createdAt: v.string(),\n resourceId: v.optional(v.string()),\n})\n .index('by_record_id', ['id'])\n .index('by_thread', ['thread_id'])\n .index('by_thread_created', ['thread_id', 'createdAt'])\n .index('by_resource', ['resourceId']);\n\nexport const mastraResourcesTable = defineTable({\n id: v.string(),\n data: v.any(),\n createdAt: v.string(),\n updatedAt: v.string(),\n})\n .index('by_record_id', ['id'])\n .index('by_updated', ['updatedAt']);\n\nexport const mastraWorkflowSnapshotsTable = defineTable({\n id: v.string(),\n workflow_name: v.string(),\n run_id: v.string(),\n state: v.any(),\n createdAt: v.string(),\n resourceId: v.optional(v.string()),\n})\n .index('by_record_id', ['id'])\n .index('by_workflow_run', ['workflow_name', 'run_id'])\n .index('by_workflow', ['workflow_name'])\n .index('by_resource', ['resourceId'])\n .index('by_created', ['createdAt']);\n\nexport const mastraScoresTable = defineTable({\n id: v.string(),\n scorerId: v.string(),\n entityId: v.string(),\n entityType: v.string(),\n score: v.number(),\n runId: v.optional(v.string()),\n metadata: v.optional(v.any()),\n createdAt: v.string(),\n})\n .index('by_record_id', ['id'])\n .index('by_scorer', ['scorerId'])\n .index('by_entity', ['entityId', 'entityType'])\n .index('by_run', ['runId'])\n .index('by_created', ['createdAt']);\n\nexport const mastraVectorIndexesTable = defineTable({\n id: v.string(), // Mastra record ID (same as indexName)\n indexName: v.string(),\n dimension: v.number(),\n metric: v.string(),\n createdAt: v.string(),\n})\n .index('by_record_id', ['id'])\n .index('by_name', ['indexName']);\n\nexport const mastraVectorsTable = defineTable({\n id: v.string(), // Mastra record ID\n indexName: v.string(),\n embedding: v.array(v.float64()),\n metadata: v.optional(v.any()),\n})\n .index('by_index_id', ['indexName', 'id'])\n .index('by_index', ['indexName']);\n\nexport const mastraDocumentsTable = defineTable({\n table: v.string(),\n primaryKey: v.string(),\n record: v.any(),\n})\n .index('by_table', ['table'])\n .index('by_table_primary', ['table', 'primaryKey']);\n\nexport const TABLE_WORKFLOW_SNAPSHOT = 'mastra_workflow_snapshots';\nexport const TABLE_MESSAGES = 'mastra_messages';\nexport const TABLE_THREADS = 'mastra_threads';\nexport const TABLE_RESOURCES = 'mastra_resources';\nexport const TABLE_SCORERS = 'mastra_scores';\nexport const TABLE_VECTOR_INDEXES = 'mastra_vector_indexes';\nexport const TABLE_VECTORS = 'mastra_vectors';\nexport const TABLE_DOCUMENTS = 'mastra_documents';\n"]}
|