@mastra/pg 1.7.0-alpha.0 → 1.7.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,42 @@
1
1
  # @mastra/pg
2
2
 
3
+ ## 1.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - `PgVector.query()` now supports querying by metadata filters alone without providing a query vector — useful when you need to retrieve records by metadata without performing similarity search. ([#13286](https://github.com/mastra-ai/mastra/pull/13286))
8
+
9
+ **Before** (queryVector was required):
10
+
11
+ ```ts
12
+ const results = await pgVector.query({
13
+ indexName: 'my-index',
14
+ queryVector: [0.1, 0.2, ...],
15
+ filter: { category: 'docs' },
16
+ });
17
+ ```
18
+
19
+ **After** (metadata-only query):
20
+
21
+ ```ts
22
+ const results = await pgVector.query({
23
+ indexName: 'my-index',
24
+ filter: { category: 'docs' },
25
+ });
26
+ // Returns matching records with score: 0 (no similarity ranking)
27
+ ```
28
+
29
+ At least one of `queryVector` or `filter` must be provided. When `queryVector` is omitted, results are returned with `score: 0` since no similarity computation is performed.
30
+
31
+ ### Patch Changes
32
+
33
+ - Set REPLICA IDENTITY USING INDEX on the mastra_workflow_snapshot table so PostgreSQL logical replication can track row updates. The table only has a UNIQUE constraint with no PRIMARY KEY, which caused "cannot update table because it does not have a replica identity and publishes updates" errors when logical replication was enabled. Fixes #13097. ([#13178](https://github.com/mastra-ai/mastra/pull/13178))
34
+
35
+ - Fixed observation activation to always preserve a minimum amount of context. Previously, swapping buffered observation chunks could unexpectedly drop the context window to near-zero tokens. ([#13476](https://github.com/mastra-ai/mastra/pull/13476))
36
+
37
+ - Updated dependencies [[`df170fd`](https://github.com/mastra-ai/mastra/commit/df170fd139b55f845bfd2de8488b16435bd3d0da), [`ae55343`](https://github.com/mastra-ai/mastra/commit/ae5534397fc006fd6eef3e4f80c235bcdc9289ef), [`c290cec`](https://github.com/mastra-ai/mastra/commit/c290cec5bf9107225de42942b56b487107aa9dce), [`f03e794`](https://github.com/mastra-ai/mastra/commit/f03e794630f812b56e95aad54f7b1993dc003add), [`aa4a5ae`](https://github.com/mastra-ai/mastra/commit/aa4a5aedb80d8d6837bab8cbb2e301215d1ba3e9), [`de3f584`](https://github.com/mastra-ai/mastra/commit/de3f58408752a8d80a295275c7f23fc306cf7f4f), [`d3fb010`](https://github.com/mastra-ai/mastra/commit/d3fb010c98f575f1c0614452667396e2653815f6), [`702ee1c`](https://github.com/mastra-ai/mastra/commit/702ee1c41be67cc532b4dbe89bcb62143508f6f0), [`f495051`](https://github.com/mastra-ai/mastra/commit/f495051eb6496a720f637fc85b6d69941c12554c), [`e622f1d`](https://github.com/mastra-ai/mastra/commit/e622f1d3ab346a8e6aca6d1fe2eac99bd961e50b), [`861f111`](https://github.com/mastra-ai/mastra/commit/861f11189211b20ddb70d8df81a6b901fc78d11e), [`00f43e8`](https://github.com/mastra-ai/mastra/commit/00f43e8e97a80c82b27d5bd30494f10a715a1df9), [`1b6f651`](https://github.com/mastra-ai/mastra/commit/1b6f65127d4a0d6c38d0a1055cb84527db529d6b), [`96a1702`](https://github.com/mastra-ai/mastra/commit/96a1702ce362c50dda20c8b4a228b4ad1a36a17a), [`cb9f921`](https://github.com/mastra-ai/mastra/commit/cb9f921320913975657abb1404855d8c510f7ac5), [`114e7c1`](https://github.com/mastra-ai/mastra/commit/114e7c146ac682925f0fb37376c1be70e5d6e6e5), [`1b6f651`](https://github.com/mastra-ai/mastra/commit/1b6f65127d4a0d6c38d0a1055cb84527db529d6b), [`72df4a8`](https://github.com/mastra-ai/mastra/commit/72df4a8f9bf1a20cfd3d9006a4fdb597ad56d10a)]:
38
+ - @mastra/core@1.8.0
39
+
3
40
  ## 1.7.0-alpha.0
4
41
 
5
42
  ### Minor Changes
@@ -3,7 +3,7 @@ name: mastra-pg
3
3
  description: Documentation for @mastra/pg. Use when working with @mastra/pg APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/pg"
6
- version: "1.7.0-alpha.0"
6
+ version: "1.7.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.7.0-alpha.0",
2
+ "version": "1.7.0",
3
3
  "package": "@mastra/pg",
4
4
  "exports": {},
5
5
  "modules": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/pg",
3
- "version": "1.7.0-alpha.0",
3
+ "version": "1.7.0",
4
4
  "description": "Postgres provider for Mastra - includes both vector and db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -33,10 +33,10 @@
33
33
  "tsup": "^8.5.1",
34
34
  "typescript": "^5.9.3",
35
35
  "vitest": "4.0.18",
36
- "@internal/lint": "0.0.62",
37
- "@internal/storage-test-utils": "0.0.58",
38
- "@internal/types-builder": "0.0.37",
39
- "@mastra/core": "1.8.0-alpha.0"
36
+ "@internal/lint": "0.0.63",
37
+ "@internal/types-builder": "0.0.38",
38
+ "@internal/storage-test-utils": "0.0.59",
39
+ "@mastra/core": "1.8.0"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@mastra/core": ">=1.4.0-0 <2.0.0-0"