@mastra/memory 1.0.0-beta.5 → 1.0.0-beta.6

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,20 @@
1
+ export declare const WORKING_MEMORY_START_TAG = "<working_memory>";
2
+ export declare const WORKING_MEMORY_END_TAG = "</working_memory>";
3
+ /**
4
+ * Extracts all working memory tag contents from text using indexOf-based parsing.
5
+ * This avoids ReDoS vulnerability that exists with regex-based approaches.
6
+ * @returns Array of full matches (including tags) or null if no matches
7
+ */
8
+ export declare function extractWorkingMemoryTags(text: string): string[] | null;
9
+ /**
10
+ * Removes all working memory tags and their contents from text.
11
+ * Uses indexOf-based parsing to avoid ReDoS vulnerability.
12
+ */
13
+ export declare function removeWorkingMemoryTags(text: string): string;
14
+ /**
15
+ * Extracts the content of the first working memory tag (without the tags themselves).
16
+ * Uses indexOf-based parsing to avoid ReDoS vulnerability.
17
+ * @returns The content between the tags, or null if no valid tag pair found
18
+ */
19
+ export declare function extractWorkingMemoryContent(text: string): string | null;
20
+ //# sourceMappingURL=working-memory-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"working-memory-utils.d.ts","sourceRoot":"","sources":["../src/working-memory-utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAC3D,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAE1D;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAgBtE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAwB5D;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CASvE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/memory",
3
- "version": "1.0.0-beta.5",
3
+ "version": "1.0.0-beta.6",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -46,11 +46,11 @@
46
46
  "typescript": "^5.8.3",
47
47
  "typescript-eslint": "^8.38.0",
48
48
  "vitest": "4.0.12",
49
+ "@internal/ai-sdk-v4": "0.0.0",
50
+ "@internal/ai-sdk-v5": "0.0.0",
49
51
  "@internal/lint": "0.0.53",
50
52
  "@internal/types-builder": "0.0.28",
51
- "@mastra/core": "1.0.0-beta.13",
52
- "@internal/ai-sdk-v5": "0.0.0",
53
- "@internal/ai-sdk-v4": "0.0.0"
53
+ "@mastra/core": "1.0.0-beta.14"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@mastra/core": ">=1.0.0-0 <2.0.0-0",