@mastra/convex 1.0.11-alpha.0 → 1.0.11

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.js CHANGED
@@ -81,7 +81,6 @@ var ConvexDB = class extends MastraBase {
81
81
  super({ name: "convex-db" });
82
82
  this.client = client;
83
83
  }
84
- client;
85
84
  async hasColumn(_table, _column) {
86
85
  return true;
87
86
  }
@@ -325,12 +324,15 @@ var MemoryConvex = class extends MemoryStorage {
325
324
  await this.#db.clearTable({ tableName: TABLE_MESSAGES });
326
325
  await this.#db.clearTable({ tableName: TABLE_RESOURCES });
327
326
  }
328
- async getThreadById({ threadId }) {
327
+ async getThreadById({
328
+ threadId,
329
+ resourceId
330
+ }) {
329
331
  const row = await this.#db.load({
330
332
  tableName: TABLE_THREADS,
331
333
  keys: { id: threadId }
332
334
  });
333
- if (!row) return null;
335
+ if (!row || resourceId !== void 0 && row.resourceId !== resourceId) return null;
334
336
  return {
335
337
  ...row,
336
338
  metadata: typeof row.metadata === "string" ? JSON.parse(row.metadata) : row.metadata,