@mastra/convex 0.0.0-fix-11329-windows-path-20251222155941 → 0.0.0-fix-local-pkg-cwd-20251224015404
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 +5 -5
- 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/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
import { MastraStorage, MemoryStorage, TABLE_THREADS, TABLE_MESSAGES, TABLE_RESOURCES, createStorageErrorId, normalizePerPage, calculatePagination, safelyParseJSON, WorkflowsStorage, TABLE_WORKFLOW_SNAPSHOT, ScoresStorage, TABLE_SCORERS } from '@mastra/core/storage';
|
|
4
4
|
import { MessageList } from '@mastra/core/agent';
|
|
5
5
|
import { MastraError, ErrorCategory, ErrorDomain } from '@mastra/core/error';
|
|
@@ -857,20 +857,18 @@ var isClientConfig = (config) => {
|
|
|
857
857
|
return "client" in config;
|
|
858
858
|
};
|
|
859
859
|
var ConvexStore = class extends MastraStorage {
|
|
860
|
-
|
|
861
|
-
workflows;
|
|
862
|
-
scores;
|
|
860
|
+
stores = {};
|
|
863
861
|
constructor(config) {
|
|
864
862
|
super({ id: config.id, name: config.name ?? "ConvexStore", disableInit: config.disableInit });
|
|
865
863
|
const client = isClientConfig(config) ? config.client : new ConvexAdminClient(config);
|
|
866
864
|
const domainConfig = { client };
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
865
|
+
const memory = new MemoryConvex(domainConfig);
|
|
866
|
+
const workflows = new WorkflowsConvex(domainConfig);
|
|
867
|
+
const scores = new ScoresConvex(domainConfig);
|
|
870
868
|
this.stores = {
|
|
871
|
-
memory
|
|
872
|
-
workflows
|
|
873
|
-
scores
|
|
869
|
+
memory,
|
|
870
|
+
workflows,
|
|
871
|
+
scores
|
|
874
872
|
};
|
|
875
873
|
}
|
|
876
874
|
get supports() {
|
|
@@ -880,119 +878,12 @@ var ConvexStore = class extends MastraStorage {
|
|
|
880
878
|
hasColumn: false,
|
|
881
879
|
createTable: false,
|
|
882
880
|
deleteMessages: true,
|
|
883
|
-
|
|
884
|
-
|
|
881
|
+
observability: false,
|
|
882
|
+
indexManagement: false,
|
|
883
|
+
listScoresBySpan: false,
|
|
884
|
+
agents: false
|
|
885
885
|
};
|
|
886
886
|
}
|
|
887
|
-
async getThreadById({ threadId }) {
|
|
888
|
-
return this.memory.getThreadById({ threadId });
|
|
889
|
-
}
|
|
890
|
-
async saveThread({ thread }) {
|
|
891
|
-
return this.memory.saveThread({ thread });
|
|
892
|
-
}
|
|
893
|
-
async updateThread({
|
|
894
|
-
id,
|
|
895
|
-
title,
|
|
896
|
-
metadata
|
|
897
|
-
}) {
|
|
898
|
-
return this.memory.updateThread({ id, title, metadata });
|
|
899
|
-
}
|
|
900
|
-
async deleteThread({ threadId }) {
|
|
901
|
-
await this.memory.deleteThread({ threadId });
|
|
902
|
-
}
|
|
903
|
-
async listMessages(args) {
|
|
904
|
-
return this.memory.listMessages(args);
|
|
905
|
-
}
|
|
906
|
-
async listMessagesById({ messageIds }) {
|
|
907
|
-
return this.memory.listMessagesById({ messageIds });
|
|
908
|
-
}
|
|
909
|
-
async saveMessages(args) {
|
|
910
|
-
return this.memory.saveMessages(args);
|
|
911
|
-
}
|
|
912
|
-
async updateMessages({
|
|
913
|
-
messages
|
|
914
|
-
}) {
|
|
915
|
-
return this.memory.updateMessages({ messages });
|
|
916
|
-
}
|
|
917
|
-
async deleteMessages(messageIds) {
|
|
918
|
-
await this.memory.deleteMessages(messageIds);
|
|
919
|
-
}
|
|
920
|
-
async listThreadsByResourceId(args) {
|
|
921
|
-
return this.memory.listThreadsByResourceId(args);
|
|
922
|
-
}
|
|
923
|
-
async getResourceById({ resourceId }) {
|
|
924
|
-
return this.memory.getResourceById({ resourceId });
|
|
925
|
-
}
|
|
926
|
-
async saveResource({ resource }) {
|
|
927
|
-
return this.memory.saveResource({ resource });
|
|
928
|
-
}
|
|
929
|
-
async updateResource({
|
|
930
|
-
resourceId,
|
|
931
|
-
workingMemory,
|
|
932
|
-
metadata
|
|
933
|
-
}) {
|
|
934
|
-
return this.memory.updateResource({ resourceId, workingMemory, metadata });
|
|
935
|
-
}
|
|
936
|
-
async updateWorkflowResults(params) {
|
|
937
|
-
return this.workflows.updateWorkflowResults(params);
|
|
938
|
-
}
|
|
939
|
-
async updateWorkflowState(params) {
|
|
940
|
-
return this.workflows.updateWorkflowState(params);
|
|
941
|
-
}
|
|
942
|
-
async persistWorkflowSnapshot({
|
|
943
|
-
workflowName,
|
|
944
|
-
runId,
|
|
945
|
-
resourceId,
|
|
946
|
-
snapshot
|
|
947
|
-
}) {
|
|
948
|
-
await this.workflows.persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot });
|
|
949
|
-
}
|
|
950
|
-
async loadWorkflowSnapshot({
|
|
951
|
-
workflowName,
|
|
952
|
-
runId
|
|
953
|
-
}) {
|
|
954
|
-
return this.workflows.loadWorkflowSnapshot({ workflowName, runId });
|
|
955
|
-
}
|
|
956
|
-
async listWorkflowRuns(args) {
|
|
957
|
-
return this.workflows.listWorkflowRuns(args);
|
|
958
|
-
}
|
|
959
|
-
async getWorkflowRunById({
|
|
960
|
-
runId,
|
|
961
|
-
workflowName
|
|
962
|
-
}) {
|
|
963
|
-
return this.workflows.getWorkflowRunById({ runId, workflowName });
|
|
964
|
-
}
|
|
965
|
-
async deleteWorkflowRunById({ runId, workflowName }) {
|
|
966
|
-
return this.workflows.deleteWorkflowRunById({ runId, workflowName });
|
|
967
|
-
}
|
|
968
|
-
async getScoreById({ id }) {
|
|
969
|
-
return this.scores.getScoreById({ id });
|
|
970
|
-
}
|
|
971
|
-
async saveScore(score) {
|
|
972
|
-
return this.scores.saveScore(score);
|
|
973
|
-
}
|
|
974
|
-
async listScoresByScorerId({
|
|
975
|
-
scorerId,
|
|
976
|
-
pagination,
|
|
977
|
-
entityId,
|
|
978
|
-
entityType,
|
|
979
|
-
source
|
|
980
|
-
}) {
|
|
981
|
-
return this.scores.listScoresByScorerId({ scorerId, pagination, entityId, entityType, source });
|
|
982
|
-
}
|
|
983
|
-
async listScoresByRunId({
|
|
984
|
-
runId,
|
|
985
|
-
pagination
|
|
986
|
-
}) {
|
|
987
|
-
return this.scores.listScoresByRunId({ runId, pagination });
|
|
988
|
-
}
|
|
989
|
-
async listScoresByEntityId({
|
|
990
|
-
entityId,
|
|
991
|
-
entityType,
|
|
992
|
-
pagination
|
|
993
|
-
}) {
|
|
994
|
-
return this.scores.listScoresByEntityId({ entityId, entityType, pagination });
|
|
995
|
-
}
|
|
996
887
|
};
|
|
997
888
|
var INDEX_METADATA_TABLE = "mastra_vector_indexes";
|
|
998
889
|
var ConvexVector = class extends MastraVector {
|