@mastra/memory 0.1.0 → 0.1.1
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/.turbo/turbo-build.log +6 -6
- package/.turbo/turbo-lint.log +14 -0
- package/CHANGELOG.md +26 -0
- package/dist/_tsup-dts-rollup.d.ts +7 -7
- package/dist/index.js +1 -2
- package/eslint.config.js +12 -0
- package/package.json +8 -4
- package/src/index.ts +7 -10
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/memory@0.1.
|
|
2
|
+
> @mastra/memory@0.1.1-alpha.0 build C:\Users\Ward\projects\mastra\mastra\packages\memory
|
|
3
3
|
> pnpm run check && tsup src/index.ts --format esm --experimental-dts --clean --treeshake
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @mastra/memory@0.1.
|
|
6
|
+
> @mastra/memory@0.1.1-alpha.0 check C:\Users\Ward\projects\mastra\mastra\packages\memory
|
|
7
7
|
> tsc --noEmit
|
|
8
8
|
|
|
9
9
|
[34mCLI[39m Building entry: src/index.ts
|
|
10
10
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
11
11
|
[34mCLI[39m tsup v8.3.6
|
|
12
12
|
[34mTSC[39m Build start
|
|
13
|
-
[32mTSC[39m ⚡️ Build success in
|
|
13
|
+
[32mTSC[39m ⚡️ Build success in 2942ms
|
|
14
14
|
[34mDTS[39m Build start
|
|
15
15
|
[34mCLI[39m Target: es2022
|
|
16
16
|
Analysis will use the bundled TypeScript version 5.7.3
|
|
17
17
|
[36mWriting package typings: C:\Users\Ward\projects\mastra\mastra\packages\memory\dist\_tsup-dts-rollup.d.ts[39m
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 3224ms
|
|
19
19
|
[34mCLI[39m Cleaning output folder
|
|
20
20
|
[34mESM[39m Build start
|
|
21
|
-
[32mESM[39m [1mdist\index.js [22m[32m9.
|
|
22
|
-
[32mESM[39m ⚡️ Build success in
|
|
21
|
+
[32mESM[39m [1mdist\index.js [22m[32m9.10 KB[39m
|
|
22
|
+
[32mESM[39m ⚡️ Build success in 210ms
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
> @mastra/memory@0.1.0 lint C:\Users\Ward\projects\mastra\mastra\packages\memory
|
|
3
|
+
> eslint .
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
C:\Users\Ward\projects\mastra\mastra\packages\memory\integration-tests\src\reusable-tests.ts
|
|
7
|
+
3:1 warning `node:crypto` import should occur before type import of `@mastra/memory` import/order
|
|
8
|
+
|
|
9
|
+
C:\Users\Ward\projects\mastra\mastra\packages\memory\integration-tests\src\working-memory.test.ts
|
|
10
|
+
7:1 warning `node:crypto` import should occur before import of `@ai-sdk/openai` import/order
|
|
11
|
+
|
|
12
|
+
✖ 2 problems (0 errors, 2 warnings)
|
|
13
|
+
0 errors and 2 warnings potentially fixable with the `--fix` option.
|
|
14
|
+
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @mastra/memory
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 91ef439: Add eslint and ran autofix
|
|
8
|
+
- Updated dependencies [d59f1a8]
|
|
9
|
+
- Updated dependencies [91ef439]
|
|
10
|
+
- Updated dependencies [4a25be4]
|
|
11
|
+
- Updated dependencies [bf2e88f]
|
|
12
|
+
- Updated dependencies [2f0d707]
|
|
13
|
+
- Updated dependencies [aac1667]
|
|
14
|
+
- @mastra/core@0.2.1
|
|
15
|
+
|
|
16
|
+
## 0.1.1-alpha.0
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 91ef439: Add eslint and ran autofix
|
|
21
|
+
- Updated dependencies [d59f1a8]
|
|
22
|
+
- Updated dependencies [91ef439]
|
|
23
|
+
- Updated dependencies [4a25be4]
|
|
24
|
+
- Updated dependencies [bf2e88f]
|
|
25
|
+
- Updated dependencies [2f0d707]
|
|
26
|
+
- Updated dependencies [aac1667]
|
|
27
|
+
- @mastra/core@0.2.1-alpha.0
|
|
28
|
+
|
|
3
29
|
## 0.1.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { CoreMessage } from '@mastra/core';
|
|
1
|
+
import type { CoreMessage } from '@mastra/core';
|
|
2
2
|
import { MastraMemory } from '@mastra/core/memory';
|
|
3
|
-
import { MemoryConfig } from '@mastra/core/memory';
|
|
4
|
-
import { Message } from 'ai';
|
|
5
|
-
import { MessageType } from '@mastra/core/memory';
|
|
6
|
-
import { SharedMemoryConfig } from '@mastra/core/memory';
|
|
7
|
-
import { StorageGetMessagesArg } from '@mastra/core/storage';
|
|
8
|
-
import { StorageThreadType } from '@mastra/core/memory';
|
|
3
|
+
import type { MemoryConfig } from '@mastra/core/memory';
|
|
4
|
+
import type { Message } from 'ai';
|
|
5
|
+
import type { MessageType } from '@mastra/core/memory';
|
|
6
|
+
import type { SharedMemoryConfig } from '@mastra/core/memory';
|
|
7
|
+
import type { StorageGetMessagesArg } from '@mastra/core/storage';
|
|
8
|
+
import type { StorageThreadType } from '@mastra/core/memory';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Concrete implementation of MastraMemory that adds support for thread configuration
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { deepMerge } from '@mastra/core';
|
|
2
2
|
import { MastraMemory } from '@mastra/core/memory';
|
|
3
|
-
import '@mastra/core/storage';
|
|
4
3
|
import { embed } from 'ai';
|
|
5
4
|
|
|
6
5
|
// src/index.ts
|
|
@@ -78,7 +77,7 @@ var Memory = class extends MastraMemory {
|
|
|
78
77
|
threadId,
|
|
79
78
|
selectBy: {
|
|
80
79
|
last: threadConfig.lastMessages,
|
|
81
|
-
vectorSearchString: threadConfig.semanticRecall && vectorMessageSearch ? vectorMessageSearch :
|
|
80
|
+
vectorSearchString: threadConfig.semanticRecall && vectorMessageSearch ? vectorMessageSearch : void 0
|
|
82
81
|
},
|
|
83
82
|
threadConfig: config
|
|
84
83
|
});
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createConfig } from '@internal/lint/eslint';
|
|
2
|
+
|
|
3
|
+
const config = await createConfig();
|
|
4
|
+
|
|
5
|
+
/** @type {import("eslint").Linter.Config[]} */
|
|
6
|
+
export default [
|
|
7
|
+
...config,
|
|
8
|
+
{
|
|
9
|
+
files: ['integration-tests/**/*'],
|
|
10
|
+
...(await import('typescript-eslint')).configs.disableTypeChecked,
|
|
11
|
+
},
|
|
12
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/memory",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -36,21 +36,25 @@
|
|
|
36
36
|
"pg-pool": "^3.7.0",
|
|
37
37
|
"postgres": "^3.4.5",
|
|
38
38
|
"redis": "^4.7.0",
|
|
39
|
-
"@mastra/core": "^0.2.
|
|
39
|
+
"@mastra/core": "^0.2.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@microsoft/api-extractor": "^7.49.2",
|
|
43
43
|
"@types/node": "^22.13.1",
|
|
44
44
|
"@types/pg": "^8.11.10",
|
|
45
|
+
"eslint": "^9.20.1",
|
|
45
46
|
"tsup": "^8.0.1",
|
|
46
47
|
"typescript": "^5.7.3",
|
|
47
|
-
"
|
|
48
|
+
"typescript-eslint": "^8.20.0",
|
|
49
|
+
"vitest": "^3.0.4",
|
|
50
|
+
"@internal/lint": "0.0.0"
|
|
48
51
|
},
|
|
49
52
|
"scripts": {
|
|
50
53
|
"check": "tsc --noEmit",
|
|
51
54
|
"build": "pnpm run check && tsup src/index.ts --format esm --experimental-dts --clean --treeshake",
|
|
52
55
|
"build:watch": "pnpm build --watch",
|
|
53
56
|
"test:integration": "cd integration-tests && pnpm run test",
|
|
54
|
-
"test": "pnpm test:integration"
|
|
57
|
+
"test": "pnpm test:integration",
|
|
58
|
+
"lint": "eslint ."
|
|
55
59
|
}
|
|
56
60
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from '@mastra/core/memory';
|
|
9
|
-
import { type StorageGetMessagesArg } from '@mastra/core/storage';
|
|
10
|
-
import { embed, type Message as AiMessage } from 'ai';
|
|
1
|
+
import { deepMerge } from '@mastra/core';
|
|
2
|
+
import type { CoreMessage } from '@mastra/core';
|
|
3
|
+
import { MastraMemory } from '@mastra/core/memory';
|
|
4
|
+
import type { MessageType, MemoryConfig, SharedMemoryConfig, StorageThreadType } from '@mastra/core/memory';
|
|
5
|
+
import type { StorageGetMessagesArg } from '@mastra/core/storage';
|
|
6
|
+
import { embed } from 'ai';
|
|
7
|
+
import type { Message as AiMessage } from 'ai';
|
|
11
8
|
|
|
12
9
|
/**
|
|
13
10
|
* Concrete implementation of MastraMemory that adds support for thread configuration
|