@mastra/pg 1.3.0-alpha.0 → 1.3.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 +54 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# @mastra/pg
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **Updated storage adapters for generic storage domain API** ([#12846](https://github.com/mastra-ai/mastra/pull/12846))
|
|
8
|
+
|
|
9
|
+
All storage adapters now implement the unified `VersionedStorageDomain` method names. Entity-specific methods (`createAgent`, `getAgentById`, `deleteAgent`, etc.) have been replaced with generic equivalents (`create`, `getById`, `delete`, etc.) across agents, prompt blocks, and scorer definitions domains.
|
|
10
|
+
|
|
11
|
+
Added `scorer-definitions` domain support to all adapters.
|
|
12
|
+
|
|
13
|
+
**Before:**
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const store = storage.getStore('agents');
|
|
17
|
+
await store.createAgent({ agent: input });
|
|
18
|
+
await store.getAgentById({ id: 'abc' });
|
|
19
|
+
await store.deleteAgent({ id: 'abc' });
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**After:**
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
const store = storage.getStore('agents');
|
|
26
|
+
await store.create({ agent: input });
|
|
27
|
+
await store.getById('abc');
|
|
28
|
+
await store.delete('abc');
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Fixed observational memory progress bars resetting to zero after agent responses finish. ([#12934](https://github.com/mastra-ai/mastra/pull/12934))
|
|
34
|
+
|
|
35
|
+
- Fixed issues with stored agents ([#12790](https://github.com/mastra-ai/mastra/pull/12790))
|
|
36
|
+
|
|
37
|
+
- Fixed cross-schema constraint checks in multi-schema PostgreSQL setups so tables and indexes are created in the intended schema. Single-schema (default) setups are unaffected. ([#12868](https://github.com/mastra-ai/mastra/pull/12868))
|
|
38
|
+
|
|
39
|
+
- Supporting changes for async buffering in observational memory, including new config options, streaming events, and UI markers. ([#12891](https://github.com/mastra-ai/mastra/pull/12891))
|
|
40
|
+
|
|
41
|
+
- Fixed PostgreSQL constraint names exceeding 63-byte identifier limit. Schema-prefixed constraint names are now truncated to fit within PostgreSQL's identifier length limit, preventing "relation already exists" errors when restarting the dev server with schema names longer than 13 characters. Fixes #12679. ([#12687](https://github.com/mastra-ai/mastra/pull/12687))
|
|
42
|
+
|
|
43
|
+
- Added prompt block storage implementations. Each store supports full CRUD for prompt blocks and their versions, including JSON serialization for rules and metadata. Also updated agent instructions serialization to support the new `AgentInstructionBlock` array format alongside plain strings. ([#12776](https://github.com/mastra-ai/mastra/pull/12776))
|
|
44
|
+
|
|
45
|
+
- Updated dependencies [[`717ffab`](https://github.com/mastra-ai/mastra/commit/717ffab42cfd58ff723b5c19ada4939997773004), [`b31c922`](https://github.com/mastra-ai/mastra/commit/b31c922215b513791d98feaea1b98784aa00803a), [`e4b6dab`](https://github.com/mastra-ai/mastra/commit/e4b6dab171c5960e340b3ea3ea6da8d64d2b8672), [`5719fa8`](https://github.com/mastra-ai/mastra/commit/5719fa8880e86e8affe698ec4b3807c7e0e0a06f), [`83cda45`](https://github.com/mastra-ai/mastra/commit/83cda4523e588558466892bff8f80f631a36945a), [`11804ad`](https://github.com/mastra-ai/mastra/commit/11804adf1d6be46ebe216be40a43b39bb8b397d7), [`aa95f95`](https://github.com/mastra-ai/mastra/commit/aa95f958b186ae5c9f4219c88e268f5565c277a2), [`90f7894`](https://github.com/mastra-ai/mastra/commit/90f7894568dc9481f40a4d29672234fae23090bb), [`f5501ae`](https://github.com/mastra-ai/mastra/commit/f5501aedb0a11106c7db7e480d6eaf3971b7bda8), [`44573af`](https://github.com/mastra-ai/mastra/commit/44573afad0a4bc86f627d6cbc0207961cdcb3bc3), [`00e3861`](https://github.com/mastra-ai/mastra/commit/00e3861863fbfee78faeb1ebbdc7c0223aae13ff), [`8109aee`](https://github.com/mastra-ai/mastra/commit/8109aeeab758e16cd4255a6c36f044b70eefc6a6), [`7bfbc52`](https://github.com/mastra-ai/mastra/commit/7bfbc52a8604feb0fff2c0a082c13c0c2a3df1a2), [`1445994`](https://github.com/mastra-ai/mastra/commit/1445994aee19c9334a6a101cf7bd80ca7ed4d186), [`61f44a2`](https://github.com/mastra-ai/mastra/commit/61f44a26861c89e364f367ff40825bdb7f19df55), [`37145d2`](https://github.com/mastra-ai/mastra/commit/37145d25f99dc31f1a9105576e5452609843ce32), [`fdad759`](https://github.com/mastra-ai/mastra/commit/fdad75939ff008b27625f5ec0ce9c6915d99d9ec), [`e4569c5`](https://github.com/mastra-ai/mastra/commit/e4569c589e00c4061a686c9eb85afe1b7050b0a8), [`7309a85`](https://github.com/mastra-ai/mastra/commit/7309a85427281a8be23f4fb80ca52e18eaffd596), [`99424f6`](https://github.com/mastra-ai/mastra/commit/99424f6862ffb679c4ec6765501486034754a4c2), [`44eb452`](https://github.com/mastra-ai/mastra/commit/44eb4529b10603c279688318bebf3048543a1d61), [`6c40593`](https://github.com/mastra-ai/mastra/commit/6c40593d6d2b1b68b0c45d1a3a4c6ac5ecac3937), [`8c1135d`](https://github.com/mastra-ai/mastra/commit/8c1135dfb91b057283eae7ee11f9ec28753cc64f), [`dd39e54`](https://github.com/mastra-ai/mastra/commit/dd39e54ea34532c995b33bee6e0e808bf41a7341), [`b6fad9a`](https://github.com/mastra-ai/mastra/commit/b6fad9a602182b1cc0df47cd8c55004fa829ad61), [`4129c07`](https://github.com/mastra-ai/mastra/commit/4129c073349b5a66643fd8136ebfe9d7097cf793), [`5b930ab`](https://github.com/mastra-ai/mastra/commit/5b930aba1834d9898e8460a49d15106f31ac7c8d), [`4be93d0`](https://github.com/mastra-ai/mastra/commit/4be93d09d68e20aaf0ea3f210749422719618b5f), [`047635c`](https://github.com/mastra-ai/mastra/commit/047635ccd7861d726c62d135560c0022a5490aec), [`8c90ff4`](https://github.com/mastra-ai/mastra/commit/8c90ff4d3414e7f2a2d216ea91274644f7b29133), [`ed232d1`](https://github.com/mastra-ai/mastra/commit/ed232d1583f403925dc5ae45f7bee948cf2a182b), [`3891795`](https://github.com/mastra-ai/mastra/commit/38917953518eb4154a984ee36e6ededdcfe80f72), [`4f955b2`](https://github.com/mastra-ai/mastra/commit/4f955b20c7f66ed282ee1fd8709696fa64c4f19d), [`55a4c90`](https://github.com/mastra-ai/mastra/commit/55a4c9044ac7454349b9f6aeba0bbab5ee65d10f)]:
|
|
46
|
+
- @mastra/core@1.3.0
|
|
47
|
+
|
|
48
|
+
## 1.3.0-alpha.1
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- Fixed observational memory progress bars resetting to zero after agent responses finish. The messages and observations sidebar bars now retain their values on stream completion, cancellation, and page reload. Also added a buffer-status endpoint so buffering badges resolve with accurate token counts instead of spinning forever when buffering outlives the stream. ([#12934](https://github.com/mastra-ai/mastra/pull/12934))
|
|
53
|
+
|
|
54
|
+
- Updated dependencies [[`b31c922`](https://github.com/mastra-ai/mastra/commit/b31c922215b513791d98feaea1b98784aa00803a)]:
|
|
55
|
+
- @mastra/core@1.3.0-alpha.2
|
|
56
|
+
|
|
3
57
|
## 1.3.0-alpha.0
|
|
4
58
|
|
|
5
59
|
### Minor Changes
|
package/dist/docs/SKILL.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -5716,7 +5716,7 @@ var MemoryPG = class _MemoryPG extends storage.MemoryStorage {
|
|
|
5716
5716
|
);
|
|
5717
5717
|
}
|
|
5718
5718
|
}
|
|
5719
|
-
async
|
|
5719
|
+
async setPendingMessageTokens(id, tokenCount) {
|
|
5720
5720
|
try {
|
|
5721
5721
|
const tableName = getTableName3({
|
|
5722
5722
|
indexName: OM_TABLE,
|
|
@@ -5725,7 +5725,7 @@ var MemoryPG = class _MemoryPG extends storage.MemoryStorage {
|
|
|
5725
5725
|
const nowStr = (/* @__PURE__ */ new Date()).toISOString();
|
|
5726
5726
|
const result = await this.#db.client.query(
|
|
5727
5727
|
`UPDATE ${tableName} SET
|
|
5728
|
-
"pendingMessageTokens" =
|
|
5728
|
+
"pendingMessageTokens" = $1,
|
|
5729
5729
|
"updatedAt" = $2,
|
|
5730
5730
|
"updatedAtZ" = $3
|
|
5731
5731
|
WHERE id = $4`,
|
|
@@ -5733,7 +5733,7 @@ var MemoryPG = class _MemoryPG extends storage.MemoryStorage {
|
|
|
5733
5733
|
);
|
|
5734
5734
|
if (result.rowCount === 0) {
|
|
5735
5735
|
throw new error.MastraError({
|
|
5736
|
-
id: storage.createStorageErrorId("PG", "
|
|
5736
|
+
id: storage.createStorageErrorId("PG", "SET_PENDING_MESSAGE_TOKENS", "NOT_FOUND"),
|
|
5737
5737
|
text: `Observational memory record not found: ${id}`,
|
|
5738
5738
|
domain: error.ErrorDomain.STORAGE,
|
|
5739
5739
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
@@ -5746,7 +5746,7 @@ var MemoryPG = class _MemoryPG extends storage.MemoryStorage {
|
|
|
5746
5746
|
}
|
|
5747
5747
|
throw new error.MastraError(
|
|
5748
5748
|
{
|
|
5749
|
-
id: storage.createStorageErrorId("PG", "
|
|
5749
|
+
id: storage.createStorageErrorId("PG", "SET_PENDING_MESSAGE_TOKENS", "FAILED"),
|
|
5750
5750
|
domain: error.ErrorDomain.STORAGE,
|
|
5751
5751
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
5752
5752
|
details: { id, tokenCount }
|