@mastra/rag 1.3.4-alpha.0 → 1.3.5-alpha.0

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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @mastra/rag
2
2
 
3
+ ## 1.3.5-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix invalid filter handling in vector queries and graph-rag searches. Invalid filter inputs now throw explicit errors instead of silently falling back to empty filters, preventing unintended unfiltered results. ([#10376](https://github.com/mastra-ai/mastra/pull/10376))
8
+
9
+ - Updated dependencies [[`880f12b`](https://github.com/mastra-ai/mastra/commit/880f12bb45a3d49faf8d22969744ffb6e01c66fd)]:
10
+ - @mastra/core@0.24.5-alpha.0
11
+
12
+ ## 1.3.4
13
+
14
+ ### Patch Changes
15
+
16
+ - update peerdeps ([`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc))
17
+
18
+ - Updated dependencies [[`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc), [`6d7e90d`](https://github.com/mastra-ai/mastra/commit/6d7e90db09713e6250f4d6c3d3cff1b4740e50f9), [`f78b908`](https://github.com/mastra-ai/mastra/commit/f78b9080e11af765969b36b4a619761056030840), [`23c2614`](https://github.com/mastra-ai/mastra/commit/23c26140fdbf04b8c59e8d7d52106d67dad962ec), [`e365eda`](https://github.com/mastra-ai/mastra/commit/e365eda45795b43707310531cac1e2ce4e5a0712)]:
19
+ - @mastra/core@0.24.0
20
+
3
21
  ## 1.3.4-alpha.0
4
22
 
5
23
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -7146,9 +7146,9 @@ var createGraphRAGTool = (options) => {
7146
7146
  return typeof filter === "string" ? JSON.parse(filter) : filter;
7147
7147
  } catch (error) {
7148
7148
  if (logger) {
7149
- logger.warn("Failed to parse filter as JSON, using empty filter", { filter, error });
7149
+ logger.error("Invalid filter", { filter, error });
7150
7150
  }
7151
- return {};
7151
+ throw new Error(`Invalid filter format: ${error instanceof Error ? error.message : String(error)}`);
7152
7152
  }
7153
7153
  })();
7154
7154
  }
@@ -7272,9 +7272,9 @@ var createVectorQueryTool = (options) => {
7272
7272
  return typeof filter === "string" ? JSON.parse(filter) : filter;
7273
7273
  } catch (error) {
7274
7274
  if (logger) {
7275
- logger.warn("Failed to parse filter as JSON, using empty filter", { filter, error });
7275
+ logger.error("Invalid filter", { filter, error });
7276
7276
  }
7277
- return {};
7277
+ throw new Error(`Invalid filter format: ${error instanceof Error ? error.message : String(error)}`);
7278
7278
  }
7279
7279
  })();
7280
7280
  }