@mastra/memory 0.1.0 → 0.1.1-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.
@@ -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,18 @@
1
1
  # @mastra/memory
2
2
 
3
+ ## 0.1.1-alpha.0
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-alpha.0
15
+
3
16
  ## 0.1.0
4
17
 
5
18
  ### 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 : undefined
80
+ vectorSearchString: threadConfig.semanticRecall && vectorMessageSearch ? vectorMessageSearch : void 0
82
81
  },
83
82
  threadConfig: config
84
83
  });
@@ -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.0",
3
+ "version": "0.1.1-alpha.0",
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.0"
39
+ "@mastra/core": "^0.2.1-alpha.0"
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
- "vitest": "^3.0.4"
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 { type CoreMessage, deepMerge } from '@mastra/core';
2
- import {
3
- MastraMemory,
4
- type MessageType,
5
- type MemoryConfig,
6
- type SharedMemoryConfig,
7
- type StorageThreadType,
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