@mastra/convex 1.9.1-alpha.0 → 1.9.1-alpha.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 +11 -11
- package/dist/index.cjs +18 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -27
- package/dist/index.js.map +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/workflow-snapshot.d.ts.map +1 -1
- package/dist/{server-B6-3iw37.cjs → server-CwHPmdFF.cjs} +14 -1
- package/dist/server-CwHPmdFF.cjs.map +1 -0
- package/dist/{server-BD08ym0I.js → server-DS6X9y1L.js} +14 -1
- package/dist/server-DS6X9y1L.js.map +1 -0
- package/dist/vector/index.d.ts +1 -0
- package/dist/vector/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/server-B6-3iw37.cjs.map +0 -1
- package/dist/server-BD08ym0I.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as mastraCache, i as mastraStorage, n as mastraNativeVectorMutation, r as mastraNativeVectorQuery, t as mastraNativeVectorAction } from "./server-
|
|
1
|
+
import { a as mastraCache, i as mastraStorage, n as mastraNativeVectorMutation, r as mastraNativeVectorQuery, t as mastraNativeVectorAction } from "./server-DS6X9y1L.js";
|
|
2
2
|
import { TABLE_BACKGROUND_TASKS, TABLE_CHANNEL_CONFIG, TABLE_CHANNEL_INSTALLATIONS, TABLE_MESSAGES, TABLE_OBSERVATIONAL_MEMORY, TABLE_RESOURCES, TABLE_SCHEDULES, TABLE_SCHEDULE_TRIGGERS, TABLE_SCORERS, TABLE_THREADS, TABLE_WORKFLOW_SNAPSHOT, defineMastraNativeVectorTable, mastraBackgroundTasksTable, mastraCacheListItemsTable, mastraCacheTable, mastraChannelConfigTable, mastraChannelInstallationsTable, mastraDocumentsTable, mastraMessagesTable, mastraObservationalMemoryTable, mastraResourcesTable, mastraScheduleTriggersTable, mastraSchedulesTable, mastraScoresTable, mastraThreadsTable, mastraVectorIndexesTable, mastraVectorsTable, mastraWorkflowSnapshotsTable } from "./schema.js";
|
|
3
3
|
import { MastraServerCache } from "@mastra/core/cache";
|
|
4
4
|
import { BackgroundTasksStorage, ChannelsStorage, MastraCompositeStore, MemoryStorage, RUN_FENCE_CONFLICT_ERROR_ID, RunFenceConflictError, SchedulesStorage, ScoresStorage, TABLE_BACKGROUND_TASKS as TABLE_BACKGROUND_TASKS$1, TABLE_CHANNEL_CONFIG as TABLE_CHANNEL_CONFIG$1, TABLE_CHANNEL_INSTALLATIONS as TABLE_CHANNEL_INSTALLATIONS$1, TABLE_MEMORY_RUN_FENCES, TABLE_MESSAGES as TABLE_MESSAGES$1, TABLE_RESOURCES as TABLE_RESOURCES$1, TABLE_SCHEDULES as TABLE_SCHEDULES$1, TABLE_SCHEDULE_TRIGGERS as TABLE_SCHEDULE_TRIGGERS$1, TABLE_SCORERS as TABLE_SCORERS$1, TABLE_THREADS as TABLE_THREADS$1, TABLE_WORKFLOW_RUN_OWNERS, TABLE_WORKFLOW_SNAPSHOT as TABLE_WORKFLOW_SNAPSHOT$1, WorkflowsStorage, calculatePagination, createStorageErrorId, createVectorErrorId, executeRetentionPrune, filterByDateRange, normalizePerPage, normalizeScheduleTarget, resolveRetentionTargets, resolveRunFence, retentionCutoffMs, safelyParseJSON, storageMessageMatchesMetadataFilter, validateStorageMetadataFilter } from "@mastra/core/storage";
|
|
@@ -2789,38 +2789,29 @@ var ConvexVector = class extends MastraVector {
|
|
|
2789
2789
|
if (!value.some((cond) => this.matchesFilterConditions(recordMetadata, cond))) return false;
|
|
2790
2790
|
continue;
|
|
2791
2791
|
}
|
|
2792
|
-
if (typeof value === "object" && value !== null &&
|
|
2793
|
-
if (!
|
|
2794
|
-
continue;
|
|
2795
|
-
}
|
|
2796
|
-
if (typeof value === "object" && value !== null && "$nin" in value) {
|
|
2797
|
-
if (Array.isArray(value.$nin) && value.$nin.includes(recordMetadata[key])) return false;
|
|
2798
|
-
continue;
|
|
2799
|
-
}
|
|
2800
|
-
if (typeof value === "object" && value !== null && "$gt" in value) {
|
|
2801
|
-
if (!(recordMetadata[key] > value.$gt)) return false;
|
|
2802
|
-
continue;
|
|
2803
|
-
}
|
|
2804
|
-
if (typeof value === "object" && value !== null && "$gte" in value) {
|
|
2805
|
-
if (!(recordMetadata[key] >= value.$gte)) return false;
|
|
2806
|
-
continue;
|
|
2807
|
-
}
|
|
2808
|
-
if (typeof value === "object" && value !== null && "$lt" in value) {
|
|
2809
|
-
if (!(recordMetadata[key] < value.$lt)) return false;
|
|
2810
|
-
continue;
|
|
2811
|
-
}
|
|
2812
|
-
if (typeof value === "object" && value !== null && "$lte" in value) {
|
|
2813
|
-
if (!(recordMetadata[key] <= value.$lte)) return false;
|
|
2814
|
-
continue;
|
|
2815
|
-
}
|
|
2816
|
-
if (typeof value === "object" && value !== null && "$ne" in value) {
|
|
2817
|
-
if (recordMetadata[key] === value.$ne) return false;
|
|
2792
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value) && Object.keys(value).some((k) => k.startsWith("$"))) {
|
|
2793
|
+
if (!this.matchesFieldOperators(recordMetadata[key], value)) return false;
|
|
2818
2794
|
continue;
|
|
2819
2795
|
}
|
|
2820
2796
|
if (recordMetadata[key] !== value) return false;
|
|
2821
2797
|
}
|
|
2822
2798
|
return true;
|
|
2823
2799
|
}
|
|
2800
|
+
matchesFieldOperators(fieldValue, operators) {
|
|
2801
|
+
return Object.entries(operators).every(([operator, operand]) => {
|
|
2802
|
+
switch (operator) {
|
|
2803
|
+
case "$eq": return fieldValue === operand;
|
|
2804
|
+
case "$ne": return fieldValue !== operand;
|
|
2805
|
+
case "$in": return Array.isArray(operand) && operand.includes(fieldValue);
|
|
2806
|
+
case "$nin": return !(Array.isArray(operand) && operand.includes(fieldValue));
|
|
2807
|
+
case "$gt": return fieldValue > operand;
|
|
2808
|
+
case "$gte": return fieldValue >= operand;
|
|
2809
|
+
case "$lt": return fieldValue < operand;
|
|
2810
|
+
case "$lte": return fieldValue <= operand;
|
|
2811
|
+
default: return false;
|
|
2812
|
+
}
|
|
2813
|
+
});
|
|
2814
|
+
}
|
|
2824
2815
|
async callStorage(request) {
|
|
2825
2816
|
return this.client.callStorage(request);
|
|
2826
2817
|
}
|