@mastra/pg 1.0.0-beta.5 → 1.0.0-beta.7

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,81 @@
1
1
  # @mastra/pg
2
2
 
3
+ ## 1.0.0-beta.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Add delete workflow run API ([#10991](https://github.com/mastra-ai/mastra/pull/10991))
8
+
9
+ ```typescript
10
+ await workflow.deleteWorkflowRunById(runId);
11
+ ```
12
+
13
+ - Add halfvec type support for large dimension embeddings ([#11002](https://github.com/mastra-ai/mastra/pull/11002))
14
+
15
+ Adds `vectorType` option to `createIndex()` for choosing between full precision (`vector`) and half precision (`halfvec`) storage. halfvec uses 2 bytes per dimension instead of 4, enabling indexes on embeddings up to 4000 dimensions.
16
+
17
+ ```typescript
18
+ await pgVector.createIndex({
19
+ indexName: 'large-embeddings',
20
+ dimension: 3072, // text-embedding-3-large
21
+ metric: 'cosine',
22
+ vectorType: 'halfvec',
23
+ });
24
+ ```
25
+
26
+ Requires pgvector >= 0.7.0 for halfvec support. Docker compose files updated to use pgvector 0.8.0.
27
+
28
+ - Updated dependencies [[`edb07e4`](https://github.com/mastra-ai/mastra/commit/edb07e49283e0c28bd094a60e03439bf6ecf0221), [`b7e17d3`](https://github.com/mastra-ai/mastra/commit/b7e17d3f5390bb5a71efc112204413656fcdc18d), [`261473a`](https://github.com/mastra-ai/mastra/commit/261473ac637e633064a22076671e2e02b002214d), [`5d7000f`](https://github.com/mastra-ai/mastra/commit/5d7000f757cd65ea9dc5b05e662fd83dfd44e932), [`4f0331a`](https://github.com/mastra-ai/mastra/commit/4f0331a79bf6eb5ee598a5086e55de4b5a0ada03), [`8a000da`](https://github.com/mastra-ai/mastra/commit/8a000da0c09c679a2312f6b3aa05b2ca78ca7393)]:
29
+ - @mastra/core@1.0.0-beta.10
30
+
31
+ ## 1.0.0-beta.6
32
+
33
+ ### Minor Changes
34
+
35
+ - Add stored agents support ([#10953](https://github.com/mastra-ai/mastra/pull/10953))
36
+
37
+ Agents can now be stored in the database and loaded at runtime. This lets you persist agent configurations and dynamically create executable Agent instances from storage.
38
+
39
+ ```typescript
40
+ import { Mastra } from '@mastra/core';
41
+ import { LibSQLStore } from '@mastra/libsql';
42
+
43
+ const mastra = new Mastra({
44
+ storage: new LibSQLStore({ url: ':memory:' }),
45
+ tools: { myTool },
46
+ scorers: { myScorer },
47
+ });
48
+
49
+ // Create agent in storage via API or directly
50
+ await mastra.getStorage().createAgent({
51
+ agent: {
52
+ id: 'my-agent',
53
+ name: 'My Agent',
54
+ instructions: 'You are helpful',
55
+ model: { provider: 'openai', name: 'gpt-4' },
56
+ tools: { myTool: {} },
57
+ scorers: { myScorer: { sampling: { type: 'ratio', rate: 0.5 } } },
58
+ },
59
+ });
60
+
61
+ // Load and use the agent
62
+ const agent = await mastra.getStoredAgentById('my-agent');
63
+ const response = await agent.generate({ messages: 'Hello!' });
64
+
65
+ // List all stored agents with pagination
66
+ const { agents, total, hasMore } = await mastra.listStoredAgents({
67
+ page: 0,
68
+ perPage: 10,
69
+ });
70
+ ```
71
+
72
+ Also adds a memory registry to Mastra so stored agents can reference memory instances by key.
73
+
74
+ ### Patch Changes
75
+
76
+ - Updated dependencies [[`72df8ae`](https://github.com/mastra-ai/mastra/commit/72df8ae595584cdd7747d5c39ffaca45e4507227), [`9198899`](https://github.com/mastra-ai/mastra/commit/91988995c427b185c33714b7f3be955367911324), [`653e65a`](https://github.com/mastra-ai/mastra/commit/653e65ae1f9502c2958a32f47a5a2df11e612a92), [`c6fd6fe`](https://github.com/mastra-ai/mastra/commit/c6fd6fedd09e9cf8004b03a80925f5e94826ad7e), [`0bed332`](https://github.com/mastra-ai/mastra/commit/0bed332843f627202c6520eaf671771313cd20f3)]:
77
+ - @mastra/core@1.0.0-beta.9
78
+
3
79
  ## 1.0.0-beta.5
4
80
 
5
81
  ### Patch Changes