@mastra/memory 1.19.1-alpha.0 → 1.20.0-alpha.2

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/{chunk-D4J4XPGM.cjs → chunk-3Q3LOVQP.cjs} +9 -2
  3. package/dist/chunk-3Q3LOVQP.cjs.map +1 -0
  4. package/dist/{chunk-BCYGTJF2.js → chunk-BCWFD5J7.js} +51 -9
  5. package/dist/chunk-BCWFD5J7.js.map +1 -0
  6. package/dist/{chunk-IRMLP4QH.cjs → chunk-SMKIROLC.cjs} +74 -32
  7. package/dist/chunk-SMKIROLC.cjs.map +1 -0
  8. package/dist/{chunk-LSJJAJAF.js → chunk-VKRZ3O5X.js} +9 -3
  9. package/dist/chunk-VKRZ3O5X.js.map +1 -0
  10. package/dist/{constants-PJXB7ZIS.cjs → constants-D6W7OWCP.cjs} +8 -8
  11. package/dist/{constants-PJXB7ZIS.cjs.map → constants-D6W7OWCP.cjs.map} +1 -1
  12. package/dist/constants-SPS7MR4D.js +3 -0
  13. package/dist/{constants-XEHPYRDJ.js.map → constants-SPS7MR4D.js.map} +1 -1
  14. package/dist/docs/SKILL.md +1 -1
  15. package/dist/docs/assets/SOURCE_MAP.json +52 -52
  16. package/dist/docs/references/docs-memory-multi-user-threads.md +1 -1
  17. package/dist/docs/references/docs-memory-observational-memory.md +2 -2
  18. package/dist/docs/references/docs-memory-storage.md +1 -1
  19. package/dist/docs/references/reference-memory-observational-memory.md +1 -1
  20. package/dist/docs/references/reference-storage-dsql.md +1 -1
  21. package/dist/docs/references/reference-storage-redis.md +1 -1
  22. package/dist/index.cjs +39246 -9273
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +39209 -9218
  26. package/dist/index.js.map +1 -1
  27. package/dist/{observational-memory-CSI3OZXQ.js → observational-memory-E6F7NKJP.js} +4 -4
  28. package/dist/{observational-memory-CSI3OZXQ.js.map → observational-memory-E6F7NKJP.js.map} +1 -1
  29. package/dist/{observational-memory-RWXMKXJP.cjs → observational-memory-LGCWMUEM.cjs} +31 -31
  30. package/dist/{observational-memory-RWXMKXJP.cjs.map → observational-memory-LGCWMUEM.cjs.map} +1 -1
  31. package/dist/processors/index.cjs +29 -29
  32. package/dist/processors/index.js +2 -2
  33. package/dist/processors/observational-memory/message-utils.d.ts +1 -0
  34. package/dist/processors/observational-memory/message-utils.d.ts.map +1 -1
  35. package/dist/processors/observational-memory/observation-strategies/async-buffer.d.ts.map +1 -1
  36. package/dist/processors/observational-memory/observation-strategies/sync.d.ts.map +1 -1
  37. package/dist/processors/observational-memory/observation-turn/step.d.ts.map +1 -1
  38. package/dist/processors/observational-memory/observer-runner.d.ts +11 -0
  39. package/dist/processors/observational-memory/observer-runner.d.ts.map +1 -1
  40. package/dist/processors/observational-memory/types.d.ts +7 -3
  41. package/dist/processors/observational-memory/types.d.ts.map +1 -1
  42. package/dist/tools/om-tools.d.ts +1 -12
  43. package/dist/tools/om-tools.d.ts.map +1 -1
  44. package/dist/tools/working-memory.d.ts +2 -8
  45. package/dist/tools/working-memory.d.ts.map +1 -1
  46. package/package.json +7 -8
  47. package/dist/chunk-BCYGTJF2.js.map +0 -1
  48. package/dist/chunk-D4J4XPGM.cjs.map +0 -1
  49. package/dist/chunk-IRMLP4QH.cjs.map +0 -1
  50. package/dist/chunk-LSJJAJAF.js.map +0 -1
  51. package/dist/constants-XEHPYRDJ.js +0 -3
@@ -1,3 +1,9 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
1
7
  // src/processors/observational-memory/constants.ts
2
8
  var OBSERVATIONAL_MEMORY_DEFAULTS = {
3
9
  observation: {
@@ -100,6 +106,6 @@ Low-detail results may include truncation hints like:
100
106
 
101
107
  Observation groups with range IDs and your recall tool allows you to think back and remember details you're fuzzy on.`;
102
108
 
103
- export { OBSERVATIONAL_MEMORY_DEFAULTS, OBSERVATION_CONTEXT_INSTRUCTIONS, OBSERVATION_CONTEXT_PROMPT, OBSERVATION_CONTINUATION_HINT, OBSERVATION_RETRIEVAL_INSTRUCTIONS };
104
- //# sourceMappingURL=chunk-LSJJAJAF.js.map
105
- //# sourceMappingURL=chunk-LSJJAJAF.js.map
109
+ export { OBSERVATIONAL_MEMORY_DEFAULTS, OBSERVATION_CONTEXT_INSTRUCTIONS, OBSERVATION_CONTEXT_PROMPT, OBSERVATION_CONTINUATION_HINT, OBSERVATION_RETRIEVAL_INSTRUCTIONS, __export };
110
+ //# sourceMappingURL=chunk-VKRZ3O5X.js.map
111
+ //# sourceMappingURL=chunk-VKRZ3O5X.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/processors/observational-memory/constants.ts"],"names":[],"mappings":";;;;;;;AAGO,IAAM,6BAAA,GAAgC;AAAA,EAC3C,WAAA,EAAa;AAAA,IACX,KAAA,EAAO,yBAAA;AAAA,IACP,aAAA,EAAe,GAAA;AAAA,IACf,aAAA,EAAe;AAAA,MACb,WAAA,EAAa,GAAA;AAAA,MACb,eAAA,EAAiB;AAAA,KACnB;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,MAAA,EAAQ;AAAA,QACN,cAAA,EAAgB;AAAA,UACd,cAAA,EAAgB;AAAA;AAClB;AACF,KACF;AAAA,IACA,iBAAA,EAAmB,GAAA;AAAA;AAAA,IAEnB,YAAA,EAAc,GAAA;AAAA;AAAA,IACd,gBAAA,EAAkB;AAAA;AAAA,GACpB;AAAA,EACA,UAAA,EAAY;AAAA,IACV,KAAA,EAAO,yBAAA;AAAA,IACP,iBAAA,EAAmB,GAAA;AAAA,IACnB,aAAA,EAAe;AAAA,MACb,WAAA,EAAa,CAAA;AAAA;AAAA,MACb,eAAA,EAAiB;AAAA,KACnB;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,MAAA,EAAQ;AAAA,QACN,cAAA,EAAgB;AAAA,UACd,cAAA,EAAgB;AAAA;AAClB;AACF,KACF;AAAA;AAAA,IAEA,gBAAA,EAAkB;AAAA;AAAA;AAEtB;AAOO,IAAM,6BAAA,GAAgC,CAAA;;AAAA;;AAAA;;AAAA,wEAAA;AAatC,IAAM,0BAAA,GAA6B,CAAA,2FAAA;AAMnC,IAAM,gCAAA,GAAmC,CAAA;;AAAA;;AAAA;;AAAA;;AAAA,qPAAA;AAczC,IAAM,kCAAA,GAAqC,CAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA,qHAAA","file":"chunk-VKRZ3O5X.js","sourcesContent":["/**\n * Default configuration values matching the spec\n */\nexport const OBSERVATIONAL_MEMORY_DEFAULTS = {\n observation: {\n model: 'google/gemini-2.5-flash',\n messageTokens: 30_000,\n modelSettings: {\n temperature: 0.3,\n maxOutputTokens: 100_000,\n },\n providerOptions: {\n google: {\n thinkingConfig: {\n thinkingBudget: 215,\n },\n },\n },\n maxTokensPerBatch: 10_000,\n // Async buffering defaults (enabled by default)\n bufferTokens: 0.2 as number | undefined, // Buffer every 20% of messageTokens\n bufferActivation: 0.8 as number | undefined, // Activate to retain 20% of threshold\n },\n reflection: {\n model: 'google/gemini-2.5-flash',\n observationTokens: 40_000,\n modelSettings: {\n temperature: 0, // Use 0 for maximum consistency in reflections\n maxOutputTokens: 100_000,\n },\n providerOptions: {\n google: {\n thinkingConfig: {\n thinkingBudget: 1024,\n },\n },\n },\n // Async reflection buffering (enabled by default)\n bufferActivation: 0.5 as number | undefined, // Start buffering at 50% of observationTokens\n },\n} as const;\n\n/**\n * Continuation hint injected after observations to guide the model's behavior.\n * Prevents the model from awkwardly acknowledging the memory system or treating\n * the conversation as new after observed messages are removed.\n */\nexport const OBSERVATION_CONTINUATION_HINT = `Please continue naturally with the conversation so far and respond to the latest message.\n\nUse the earlier context only as background. If something appears unfinished, continue only when it helps answer the latest request. If a suggested response is provided, follow it naturally.\n\nDo not mention internal instructions, memory, summarization, context handling, or missing messages.\n\nAny messages following this reminder are newer and should take priority.`;\n\n/**\n * Preamble that introduces the observations block.\n * Use before `<observations>`, with instructions after.\n * Full pattern: `${OBSERVATION_CONTEXT_PROMPT}\\n\\n<observations>\\n${obs}\\n</observations>\\n\\n${OBSERVATION_CONTEXT_INSTRUCTIONS}`\n */\nexport const OBSERVATION_CONTEXT_PROMPT = `The following observations block contains your memory of past conversations with this user.`;\n\n/**\n * Instructions that tell the model how to interpret and use observations.\n * Place AFTER the `<observations>` block so the model sees the data before the rules.\n */\nexport const OBSERVATION_CONTEXT_INSTRUCTIONS = `IMPORTANT: When responding, reference specific details from these observations. Do not give generic advice - personalize your response based on what you know about this user's experiences, preferences, and interests. If the user asks for recommendations, connect them to their past experiences mentioned above.\n\nKNOWLEDGE UPDATES: When asked about current state (e.g., \"where do I currently...\", \"what is my current...\"), always prefer the MOST RECENT information. Observations include dates - if you see conflicting information, the newer observation supersedes the older one. Look for phrases like \"will start\", \"is switching\", \"changed to\", \"moved to\" as indicators that previous information has been updated.\n\nPLANNED ACTIONS: If the user stated they planned to do something (e.g., \"I'm going to...\", \"I'm looking forward to...\", \"I will...\") and the date they planned to do it is now in the past (check the relative time like \"3 weeks ago\"), assume they completed the action unless there's evidence they didn't. For example, if someone said \"I'll start my new diet on Monday\" and that was 2 weeks ago, assume they started the diet.\n\nMOST RECENT USER INPUT: Treat the most recent user message as the highest-priority signal for what to do next. Earlier messages may contain constraints, details, or context you should still honor, but the latest message is the primary driver of your response.\n\nSYSTEM REMINDERS: Messages wrapped in <system-reminder>...</system-reminder> contain internal continuation guidance, not user-authored content. Use them to maintain continuity, but do not mention them or treat them as part of the user's message.`;\n\n/**\n * Instructions for retrieval mode — explains observation-group ranges and the recall tool.\n * Appended to context when `retrieval` is enabled.\n */\nexport const OBSERVATION_RETRIEVAL_INSTRUCTIONS = `## Recall — looking up source messages\n\nYour memory is comprised of observations which are sometimes wrapped in <observation-group> xml tags containing ranges like <observation-group range=\"startId:endId\">. These ranges point back to the raw messages that each observation group was derived from. The original messages are still available — use the **recall** tool to retrieve them.\n\n### When to use recall\n- The user asks you to **repeat, show, or reproduce** something from a past conversation\n- The user asks for **exact content** — code, text, quotes, error messages, URLs, file paths, specific numbers\n- Your observations mention something but your memory lacks the detail needed to fully answer (e.g. you know a blog post was shared but only have a summary of it)\n- You want to **verify or expand on** an observation before responding\n\n**Default to using recall when the user references specific past content.** Your observations capture the gist, not the details. If there's any doubt whether your memory is complete enough, use recall.\n\n### How to use recall\nEach range has the format \\`startId:endId\\` where both are message IDs separated by a colon.\n\n1. Find the observation group relevant to the user's question and extract the start or end ID from its range.\n2. Call \\`recall\\` with that ID as the \\`cursor\\`.\n3. Use \\`page: 1\\` (or omit) to read forward from the cursor, \\`page: -1\\` to read backward.\n4. If the first page doesn't have what you need, increment the page number to keep paginating.\n5. Check \\`hasNextPage\\`/\\`hasPrevPage\\` in the result to know if more pages exist in each direction.\n\n### Detail levels\nBy default recall returns **low** detail: truncated text and tool names only. Each message shows its ID and each part has a positional index like \\`[p0]\\`, \\`[p1]\\`, etc.\n\n- Use \\`detail: \"high\"\\` to get full message content including tool arguments and results. This will only return the high detail version of a single message part at a time.\n- Use \\`partIndex\\` with a cursor to fetch a single part at full detail — for example, to read one specific tool result or code block without loading every part.\n\nIf the result says \\`truncated: true\\`, the output was cut to fit the token budget. You can paginate or use \\`partIndex\\` to target specific content.\n\n### Following up on truncated parts\nLow-detail results may include truncation hints like:\n\\`[truncated — call recall cursor=\"...\" partIndex=N detail=\"high\" for full content]\\`\n\n**When you see these hints and need the full content, make the exact call described in the hint.** This is the normal workflow: first recall at low detail to scan, then drill into specific parts at high detail. Do not stop at the low-detail result if the user asked for exact content.\n\n### When recall is NOT needed\n- The user is asking for a high-level summary and your observations already cover it\n- The question is about general preferences or facts that don't require source text\n- There is no relevant range in your observations for the topic\n\nObservation groups with range IDs and your recall tool allows you to think back and remember details you're fuzzy on.`;\n"]}
@@ -1,28 +1,28 @@
1
1
  'use strict';
2
2
 
3
- var chunkD4J4XPGM_cjs = require('./chunk-D4J4XPGM.cjs');
3
+ var chunk3Q3LOVQP_cjs = require('./chunk-3Q3LOVQP.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "OBSERVATIONAL_MEMORY_DEFAULTS", {
8
8
  enumerable: true,
9
- get: function () { return chunkD4J4XPGM_cjs.OBSERVATIONAL_MEMORY_DEFAULTS; }
9
+ get: function () { return chunk3Q3LOVQP_cjs.OBSERVATIONAL_MEMORY_DEFAULTS; }
10
10
  });
11
11
  Object.defineProperty(exports, "OBSERVATION_CONTEXT_INSTRUCTIONS", {
12
12
  enumerable: true,
13
- get: function () { return chunkD4J4XPGM_cjs.OBSERVATION_CONTEXT_INSTRUCTIONS; }
13
+ get: function () { return chunk3Q3LOVQP_cjs.OBSERVATION_CONTEXT_INSTRUCTIONS; }
14
14
  });
15
15
  Object.defineProperty(exports, "OBSERVATION_CONTEXT_PROMPT", {
16
16
  enumerable: true,
17
- get: function () { return chunkD4J4XPGM_cjs.OBSERVATION_CONTEXT_PROMPT; }
17
+ get: function () { return chunk3Q3LOVQP_cjs.OBSERVATION_CONTEXT_PROMPT; }
18
18
  });
19
19
  Object.defineProperty(exports, "OBSERVATION_CONTINUATION_HINT", {
20
20
  enumerable: true,
21
- get: function () { return chunkD4J4XPGM_cjs.OBSERVATION_CONTINUATION_HINT; }
21
+ get: function () { return chunk3Q3LOVQP_cjs.OBSERVATION_CONTINUATION_HINT; }
22
22
  });
23
23
  Object.defineProperty(exports, "OBSERVATION_RETRIEVAL_INSTRUCTIONS", {
24
24
  enumerable: true,
25
- get: function () { return chunkD4J4XPGM_cjs.OBSERVATION_RETRIEVAL_INSTRUCTIONS; }
25
+ get: function () { return chunk3Q3LOVQP_cjs.OBSERVATION_RETRIEVAL_INSTRUCTIONS; }
26
26
  });
27
- //# sourceMappingURL=constants-PJXB7ZIS.cjs.map
28
- //# sourceMappingURL=constants-PJXB7ZIS.cjs.map
27
+ //# sourceMappingURL=constants-D6W7OWCP.cjs.map
28
+ //# sourceMappingURL=constants-D6W7OWCP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"constants-PJXB7ZIS.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"constants-D6W7OWCP.cjs"}
@@ -0,0 +1,3 @@
1
+ export { OBSERVATIONAL_MEMORY_DEFAULTS, OBSERVATION_CONTEXT_INSTRUCTIONS, OBSERVATION_CONTEXT_PROMPT, OBSERVATION_CONTINUATION_HINT, OBSERVATION_RETRIEVAL_INSTRUCTIONS } from './chunk-VKRZ3O5X.js';
2
+ //# sourceMappingURL=constants-SPS7MR4D.js.map
3
+ //# sourceMappingURL=constants-SPS7MR4D.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"constants-XEHPYRDJ.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"constants-SPS7MR4D.js"}
@@ -3,7 +3,7 @@ name: mastra-memory
3
3
  description: Documentation for @mastra/memory. Use when working with @mastra/memory APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/memory"
6
- version: "1.19.1-alpha.0"
6
+ version: "1.20.0-alpha.2"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,136 +1,136 @@
1
1
  {
2
- "version": "1.19.1-alpha.0",
2
+ "version": "1.20.0-alpha.2",
3
3
  "package": "@mastra/memory",
4
4
  "exports": {
5
5
  "ModelByInputTokens": {
6
6
  "types": "dist/processors/index.d.ts",
7
- "implementation": "dist/chunk-BCYGTJF2.js",
8
- "line": 786
7
+ "implementation": "dist/chunk-BCWFD5J7.js",
8
+ "line": 787
9
9
  },
10
10
  "OBSERVER_SYSTEM_PROMPT": {
11
11
  "types": "dist/processors/index.d.ts",
12
- "implementation": "dist/chunk-BCYGTJF2.js"
12
+ "implementation": "dist/chunk-BCWFD5J7.js"
13
13
  },
14
14
  "ObservationalMemory": {
15
15
  "types": "dist/processors/index.d.ts",
16
- "implementation": "dist/chunk-BCYGTJF2.js",
17
- "line": 7009
16
+ "implementation": "dist/chunk-BCWFD5J7.js",
17
+ "line": 7051
18
18
  },
19
19
  "ObservationalMemoryProcessor": {
20
20
  "types": "dist/processors/index.d.ts",
21
- "implementation": "dist/chunk-BCYGTJF2.js",
22
- "line": 9577
21
+ "implementation": "dist/chunk-BCWFD5J7.js",
22
+ "line": 9619
23
23
  },
24
24
  "TokenCounter": {
25
25
  "types": "dist/processors/index.d.ts",
26
- "implementation": "dist/chunk-BCYGTJF2.js",
27
- "line": 6455
26
+ "implementation": "dist/chunk-BCWFD5J7.js",
27
+ "line": 6497
28
28
  },
29
29
  "buildObserverPrompt": {
30
30
  "types": "dist/processors/index.d.ts",
31
- "implementation": "dist/chunk-BCYGTJF2.js",
32
- "line": 3760
31
+ "implementation": "dist/chunk-BCWFD5J7.js",
32
+ "line": 3765
33
33
  },
34
34
  "buildObserverSystemPrompt": {
35
35
  "types": "dist/processors/index.d.ts",
36
- "implementation": "dist/chunk-BCYGTJF2.js",
37
- "line": 3031
36
+ "implementation": "dist/chunk-BCWFD5J7.js",
37
+ "line": 3036
38
38
  },
39
39
  "combineObservationGroupRanges": {
40
40
  "types": "dist/processors/index.d.ts",
41
- "implementation": "dist/chunk-BCYGTJF2.js",
42
- "line": 878
41
+ "implementation": "dist/chunk-BCWFD5J7.js",
42
+ "line": 879
43
43
  },
44
44
  "deriveObservationGroupProvenance": {
45
45
  "types": "dist/processors/index.d.ts",
46
- "implementation": "dist/chunk-BCYGTJF2.js",
47
- "line": 912
46
+ "implementation": "dist/chunk-BCWFD5J7.js",
47
+ "line": 913
48
48
  },
49
49
  "extractCurrentTask": {
50
50
  "types": "dist/processors/index.d.ts",
51
- "implementation": "dist/chunk-BCYGTJF2.js",
52
- "line": 3874
51
+ "implementation": "dist/chunk-BCWFD5J7.js",
52
+ "line": 3879
53
53
  },
54
54
  "formatMessagesForObserver": {
55
55
  "types": "dist/processors/index.d.ts",
56
- "implementation": "dist/chunk-BCYGTJF2.js",
57
- "line": 3486
56
+ "implementation": "dist/chunk-BCWFD5J7.js",
57
+ "line": 3491
58
58
  },
59
59
  "getObservationsAsOf": {
60
60
  "types": "dist/processors/index.d.ts",
61
- "implementation": "dist/chunk-BCYGTJF2.js",
62
- "line": 9789
61
+ "implementation": "dist/chunk-BCWFD5J7.js",
62
+ "line": 9831
63
63
  },
64
64
  "hasCurrentTaskSection": {
65
65
  "types": "dist/processors/index.d.ts",
66
- "implementation": "dist/chunk-BCYGTJF2.js",
67
- "line": 3862
66
+ "implementation": "dist/chunk-BCWFD5J7.js",
67
+ "line": 3867
68
68
  },
69
69
  "injectAnchorIds": {
70
70
  "types": "dist/processors/index.d.ts",
71
- "implementation": "dist/chunk-BCYGTJF2.js",
72
- "line": 2579
71
+ "implementation": "dist/chunk-BCWFD5J7.js",
72
+ "line": 2584
73
73
  },
74
74
  "optimizeObservationsForContext": {
75
75
  "types": "dist/processors/index.d.ts",
76
- "implementation": "dist/chunk-BCYGTJF2.js",
77
- "line": 3885
76
+ "implementation": "dist/chunk-BCWFD5J7.js",
77
+ "line": 3890
78
78
  },
79
79
  "parseAnchorId": {
80
80
  "types": "dist/processors/index.d.ts",
81
- "implementation": "dist/chunk-BCYGTJF2.js",
82
- "line": 2552
81
+ "implementation": "dist/chunk-BCWFD5J7.js",
82
+ "line": 2557
83
83
  },
84
84
  "parseObservationGroups": {
85
85
  "types": "dist/processors/index.d.ts",
86
- "implementation": "dist/chunk-BCYGTJF2.js",
87
- "line": 847
86
+ "implementation": "dist/chunk-BCWFD5J7.js",
87
+ "line": 848
88
88
  },
89
89
  "parseObserverOutput": {
90
90
  "types": "dist/processors/index.d.ts",
91
- "implementation": "dist/chunk-BCYGTJF2.js",
92
- "line": 3770
91
+ "implementation": "dist/chunk-BCWFD5J7.js",
92
+ "line": 3775
93
93
  },
94
94
  "reconcileObservationGroupsFromReflection": {
95
95
  "types": "dist/processors/index.d.ts",
96
- "implementation": "dist/chunk-BCYGTJF2.js",
97
- "line": 936
96
+ "implementation": "dist/chunk-BCWFD5J7.js",
97
+ "line": 937
98
98
  },
99
99
  "renderObservationGroupsForReflection": {
100
100
  "types": "dist/processors/index.d.ts",
101
- "implementation": "dist/chunk-BCYGTJF2.js",
102
- "line": 892
101
+ "implementation": "dist/chunk-BCWFD5J7.js",
102
+ "line": 893
103
103
  },
104
104
  "stripEphemeralAnchorIds": {
105
105
  "types": "dist/processors/index.d.ts",
106
- "implementation": "dist/chunk-BCYGTJF2.js",
107
- "line": 2609
106
+ "implementation": "dist/chunk-BCWFD5J7.js",
107
+ "line": 2614
108
108
  },
109
109
  "stripObservationGroups": {
110
110
  "types": "dist/processors/index.d.ts",
111
- "implementation": "dist/chunk-BCYGTJF2.js",
112
- "line": 869
111
+ "implementation": "dist/chunk-BCWFD5J7.js",
112
+ "line": 870
113
113
  },
114
114
  "wrapInObservationGroup": {
115
115
  "types": "dist/processors/index.d.ts",
116
- "implementation": "dist/chunk-BCYGTJF2.js",
117
- "line": 840
116
+ "implementation": "dist/chunk-BCWFD5J7.js",
117
+ "line": 841
118
118
  },
119
119
  "OBSERVATIONAL_MEMORY_DEFAULTS": {
120
120
  "types": "dist/processors/index.d.ts",
121
- "implementation": "dist/chunk-LSJJAJAF.js"
121
+ "implementation": "dist/chunk-VKRZ3O5X.js"
122
122
  },
123
123
  "OBSERVATION_CONTEXT_INSTRUCTIONS": {
124
124
  "types": "dist/processors/index.d.ts",
125
- "implementation": "dist/chunk-LSJJAJAF.js"
125
+ "implementation": "dist/chunk-VKRZ3O5X.js"
126
126
  },
127
127
  "OBSERVATION_CONTEXT_PROMPT": {
128
128
  "types": "dist/processors/index.d.ts",
129
- "implementation": "dist/chunk-LSJJAJAF.js"
129
+ "implementation": "dist/chunk-VKRZ3O5X.js"
130
130
  },
131
131
  "OBSERVATION_CONTINUATION_HINT": {
132
132
  "types": "dist/processors/index.d.ts",
133
- "implementation": "dist/chunk-LSJJAJAF.js"
133
+ "implementation": "dist/chunk-VKRZ3O5X.js"
134
134
  },
135
135
  "MessageHistory": {
136
136
  "types": "dist/index.d.ts",
@@ -149,8 +149,8 @@
149
149
  "processors": {
150
150
  "index": "dist/processors/index.js",
151
151
  "chunks": [
152
- "chunk-BCYGTJF2.js",
153
- "chunk-LSJJAJAF.js"
152
+ "chunk-BCWFD5J7.js",
153
+ "chunk-VKRZ3O5X.js"
154
154
  ]
155
155
  }
156
156
  }
@@ -65,7 +65,7 @@ const memory = new Memory({
65
65
  export const collabAgent = new Agent({
66
66
  id: 'collab',
67
67
  name: 'CollabAgent',
68
- model: 'openai/gpt-5.4-mini',
68
+ model: '__OPENAI_MODEL_MINI__',
69
69
  memory,
70
70
  instructions: `
71
71
  You are a collaborative document assistant. Multiple users talk to you in the SAME thread.
@@ -316,7 +316,7 @@ const memory = new Memory({
316
316
  // Faster, cheaper models for smaller inputs; stronger models for larger contexts
317
317
  5_000: 'openrouter/mistralai/ministral-8b-2512',
318
318
  20_000: 'openrouter/mistralai/mistral-small-2603',
319
- 40_000: 'openai/gpt-5.4-mini',
319
+ 40_000: 'openai/gpt-5-mini',
320
320
  1_000_000: 'google/gemini-3.1-flash-lite-preview',
321
321
  },
322
322
  }),
@@ -324,7 +324,7 @@ const memory = new Memory({
324
324
  reflection: {
325
325
  model: new ModelByInputTokens({
326
326
  upTo: {
327
- 20_000: 'openai/gpt-5.4-mini',
327
+ 20_000: 'openai/gpt-5-mini',
328
328
  100_000: 'google/gemini-2.5-flash',
329
329
  },
330
330
  }),
@@ -179,7 +179,7 @@ export const agent = new Agent({
179
179
  memory: new Memory({
180
180
  options: {
181
181
  generateTitle: {
182
- model: 'openai/gpt-5-mini',
182
+ model: '__OPENAI_MODEL_MINI__',
183
183
  instructions: 'Generate a 1 word title',
184
184
  },
185
185
  },
@@ -674,7 +674,7 @@ import { ModelByInputTokens } from '@mastra/memory'
674
674
  const selector = new ModelByInputTokens({
675
675
  upTo: {
676
676
  10_000: 'google/gemini-2.5-flash', // Fast for small inputs
677
- 40_000: 'openai/gpt-5.4-mini', // Stronger for medium inputs
677
+ 40_000: 'openai/gpt-5-mini', // Stronger for medium inputs
678
678
  1_000_000: 'openai/gpt-5.4', // Most capable for large inputs
679
679
  },
680
680
  })
@@ -241,7 +241,7 @@ export const dsqlAgent = new Agent({
241
241
  name: 'DSQL Agent',
242
242
  instructions:
243
243
  'You are an AI agent with the ability to automatically recall memories from previous interactions.',
244
- model: 'openai/gpt-5.1',
244
+ model: 'openai/gpt-5.4',
245
245
  memory: new Memory({
246
246
  storage: new DSQLStore({
247
247
  id: 'dsql-agent-storage',
@@ -181,7 +181,7 @@ export const redisAgent = new Agent({
181
181
  name: 'Redis Agent',
182
182
  instructions:
183
183
  'You are an AI agent with the ability to automatically recall memories from previous interactions.',
184
- model: 'openai/gpt-4o',
184
+ model: 'openai/gpt-5.4',
185
185
  memory: new Memory({
186
186
  storage: new RedisStore({
187
187
  id: 'redis-agent-storage',