@mastra/memory 1.21.1 → 1.21.2-alpha.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.
Files changed (26) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/{chunk-2ZNDDQ6X.cjs → chunk-LEAP5DKB.cjs} +15 -8
  3. package/dist/chunk-LEAP5DKB.cjs.map +1 -0
  4. package/dist/{chunk-3I6H2ABM.js → chunk-UHQBCO7I.js} +15 -8
  5. package/dist/chunk-UHQBCO7I.js.map +1 -0
  6. package/dist/docs/SKILL.md +1 -1
  7. package/dist/docs/assets/SOURCE_MAP.json +27 -27
  8. package/dist/docs/references/docs-agents-background-tasks.md +5 -5
  9. package/dist/docs/references/docs-agents-goals.md +1 -1
  10. package/dist/docs/references/docs-agents-supervisor-agents.md +15 -0
  11. package/dist/docs/references/docs-memory-observational-memory.md +1 -3
  12. package/dist/docs/references/reference-memory-observational-memory.md +1 -1
  13. package/dist/index.cjs +13 -13
  14. package/dist/index.js +4 -4
  15. package/dist/{observational-memory-Y5T2OR2Y.js → observational-memory-NC6DQQWD.js} +3 -3
  16. package/dist/{observational-memory-Y5T2OR2Y.js.map → observational-memory-NC6DQQWD.js.map} +1 -1
  17. package/dist/{observational-memory-XZTKSWPR.cjs → observational-memory-WZ6JQ4JY.cjs} +26 -26
  18. package/dist/{observational-memory-XZTKSWPR.cjs.map → observational-memory-WZ6JQ4JY.cjs.map} +1 -1
  19. package/dist/processors/index.cjs +24 -24
  20. package/dist/processors/index.js +1 -1
  21. package/dist/processors/observational-memory/observational-memory.d.ts.map +1 -1
  22. package/dist/processors/observational-memory/types.d.ts +1 -2
  23. package/dist/processors/observational-memory/types.d.ts.map +1 -1
  24. package/package.json +4 -4
  25. package/dist/chunk-2ZNDDQ6X.cjs.map +0 -1
  26. package/dist/chunk-3I6H2ABM.js.map +0 -1
@@ -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.21.1"
6
+ version: "1.21.2-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,119 +1,119 @@
1
1
  {
2
- "version": "1.21.1",
2
+ "version": "1.21.2-alpha.1",
3
3
  "package": "@mastra/memory",
4
4
  "exports": {
5
5
  "ModelByInputTokens": {
6
6
  "types": "dist/processors/index.d.ts",
7
- "implementation": "dist/chunk-3I6H2ABM.js",
7
+ "implementation": "dist/chunk-UHQBCO7I.js",
8
8
  "line": 795
9
9
  },
10
10
  "OBSERVER_SYSTEM_PROMPT": {
11
11
  "types": "dist/processors/index.d.ts",
12
- "implementation": "dist/chunk-3I6H2ABM.js"
12
+ "implementation": "dist/chunk-UHQBCO7I.js"
13
13
  },
14
14
  "ObservationalMemory": {
15
15
  "types": "dist/processors/index.d.ts",
16
- "implementation": "dist/chunk-3I6H2ABM.js",
16
+ "implementation": "dist/chunk-UHQBCO7I.js",
17
17
  "line": 7194
18
18
  },
19
19
  "ObservationalMemoryProcessor": {
20
20
  "types": "dist/processors/index.d.ts",
21
- "implementation": "dist/chunk-3I6H2ABM.js",
22
- "line": 9766
21
+ "implementation": "dist/chunk-UHQBCO7I.js",
22
+ "line": 9773
23
23
  },
24
24
  "TokenCounter": {
25
25
  "types": "dist/processors/index.d.ts",
26
- "implementation": "dist/chunk-3I6H2ABM.js",
26
+ "implementation": "dist/chunk-UHQBCO7I.js",
27
27
  "line": 6525
28
28
  },
29
29
  "buildObserverPrompt": {
30
30
  "types": "dist/processors/index.d.ts",
31
- "implementation": "dist/chunk-3I6H2ABM.js",
31
+ "implementation": "dist/chunk-UHQBCO7I.js",
32
32
  "line": 3782
33
33
  },
34
34
  "buildObserverSystemPrompt": {
35
35
  "types": "dist/processors/index.d.ts",
36
- "implementation": "dist/chunk-3I6H2ABM.js",
36
+ "implementation": "dist/chunk-UHQBCO7I.js",
37
37
  "line": 3053
38
38
  },
39
39
  "combineObservationGroupRanges": {
40
40
  "types": "dist/processors/index.d.ts",
41
- "implementation": "dist/chunk-3I6H2ABM.js",
41
+ "implementation": "dist/chunk-UHQBCO7I.js",
42
42
  "line": 887
43
43
  },
44
44
  "deriveObservationGroupProvenance": {
45
45
  "types": "dist/processors/index.d.ts",
46
- "implementation": "dist/chunk-3I6H2ABM.js",
46
+ "implementation": "dist/chunk-UHQBCO7I.js",
47
47
  "line": 921
48
48
  },
49
49
  "extractCurrentTask": {
50
50
  "types": "dist/processors/index.d.ts",
51
- "implementation": "dist/chunk-3I6H2ABM.js",
51
+ "implementation": "dist/chunk-UHQBCO7I.js",
52
52
  "line": 3896
53
53
  },
54
54
  "formatMessagesForObserver": {
55
55
  "types": "dist/processors/index.d.ts",
56
- "implementation": "dist/chunk-3I6H2ABM.js",
56
+ "implementation": "dist/chunk-UHQBCO7I.js",
57
57
  "line": 3508
58
58
  },
59
59
  "getObservationsAsOf": {
60
60
  "types": "dist/processors/index.d.ts",
61
- "implementation": "dist/chunk-3I6H2ABM.js",
62
- "line": 9986
61
+ "implementation": "dist/chunk-UHQBCO7I.js",
62
+ "line": 9993
63
63
  },
64
64
  "hasCurrentTaskSection": {
65
65
  "types": "dist/processors/index.d.ts",
66
- "implementation": "dist/chunk-3I6H2ABM.js",
66
+ "implementation": "dist/chunk-UHQBCO7I.js",
67
67
  "line": 3884
68
68
  },
69
69
  "injectAnchorIds": {
70
70
  "types": "dist/processors/index.d.ts",
71
- "implementation": "dist/chunk-3I6H2ABM.js",
71
+ "implementation": "dist/chunk-UHQBCO7I.js",
72
72
  "line": 2601
73
73
  },
74
74
  "optimizeObservationsForContext": {
75
75
  "types": "dist/processors/index.d.ts",
76
- "implementation": "dist/chunk-3I6H2ABM.js",
76
+ "implementation": "dist/chunk-UHQBCO7I.js",
77
77
  "line": 3907
78
78
  },
79
79
  "parseAnchorId": {
80
80
  "types": "dist/processors/index.d.ts",
81
- "implementation": "dist/chunk-3I6H2ABM.js",
81
+ "implementation": "dist/chunk-UHQBCO7I.js",
82
82
  "line": 2574
83
83
  },
84
84
  "parseObservationGroups": {
85
85
  "types": "dist/processors/index.d.ts",
86
- "implementation": "dist/chunk-3I6H2ABM.js",
86
+ "implementation": "dist/chunk-UHQBCO7I.js",
87
87
  "line": 856
88
88
  },
89
89
  "parseObserverOutput": {
90
90
  "types": "dist/processors/index.d.ts",
91
- "implementation": "dist/chunk-3I6H2ABM.js",
91
+ "implementation": "dist/chunk-UHQBCO7I.js",
92
92
  "line": 3792
93
93
  },
94
94
  "reconcileObservationGroupsFromReflection": {
95
95
  "types": "dist/processors/index.d.ts",
96
- "implementation": "dist/chunk-3I6H2ABM.js",
96
+ "implementation": "dist/chunk-UHQBCO7I.js",
97
97
  "line": 945
98
98
  },
99
99
  "renderObservationGroupsForReflection": {
100
100
  "types": "dist/processors/index.d.ts",
101
- "implementation": "dist/chunk-3I6H2ABM.js",
101
+ "implementation": "dist/chunk-UHQBCO7I.js",
102
102
  "line": 901
103
103
  },
104
104
  "stripEphemeralAnchorIds": {
105
105
  "types": "dist/processors/index.d.ts",
106
- "implementation": "dist/chunk-3I6H2ABM.js",
106
+ "implementation": "dist/chunk-UHQBCO7I.js",
107
107
  "line": 2631
108
108
  },
109
109
  "stripObservationGroups": {
110
110
  "types": "dist/processors/index.d.ts",
111
- "implementation": "dist/chunk-3I6H2ABM.js",
111
+ "implementation": "dist/chunk-UHQBCO7I.js",
112
112
  "line": 878
113
113
  },
114
114
  "wrapInObservationGroup": {
115
115
  "types": "dist/processors/index.d.ts",
116
- "implementation": "dist/chunk-3I6H2ABM.js",
116
+ "implementation": "dist/chunk-UHQBCO7I.js",
117
117
  "line": 849
118
118
  },
119
119
  "OBSERVATIONAL_MEMORY_DEFAULTS": {
@@ -162,7 +162,7 @@
162
162
  "processors": {
163
163
  "index": "dist/processors/index.js",
164
164
  "chunks": [
165
- "chunk-3I6H2ABM.js",
165
+ "chunk-UHQBCO7I.js",
166
166
  "chunk-LSJJAJAF.js"
167
167
  ]
168
168
  }
@@ -49,7 +49,7 @@ Once a tool has opted in, the LLM can optionally include a `_background` field i
49
49
 
50
50
  ### Tool-level
51
51
 
52
- Set `backgroundTasks.enabled: true` on the tool definition. Tools opted in at this layer run in the background whenever called by an agent that has the manager enabled.
52
+ Set `background.enabled: true` on the tool definition. Tools opted in at this layer run in the background whenever called by an agent that has the manager enabled.
53
53
 
54
54
  ```typescript
55
55
  import { createTool } from '@mastra/core/tools'
@@ -59,7 +59,7 @@ export const researchTool = createTool({
59
59
  id: 'research',
60
60
  description: 'Run a long research job',
61
61
  inputSchema: z.object({ topic: z.string() }),
62
- backgroundTasks: {
62
+ background: {
63
63
  enabled: true,
64
64
  timeoutMs: 600_000,
65
65
  maxRetries: 1,
@@ -111,7 +111,7 @@ The `_background` override is a _modifier_ on tools the developer has already op
111
111
  When a tool call is dispatched, the resolved background config is computed in this priority order:
112
112
 
113
113
  1. Agent-level `backgroundTasks.tools` entry for the tool.
114
- 2. Tool-level `backgroundTasks` config.
114
+ 2. Tool-level `background` config.
115
115
  3. LLM `_background.enabled` override (only used to enable background dispatch when the tool was opted in at one of the layers above).
116
116
  4. Manager defaults (`defaultTimeoutMs`, `defaultRetries`).
117
117
 
@@ -200,7 +200,7 @@ const stream = await supervisor.stream('Research AI in education and write an ar
200
200
 
201
201
  ### Inheriting from the subagent
202
202
 
203
- If a subagent isn't listed under the supervisor's `backgroundTasks.tools` but has background-eligible tools of its own (either via tool-level `backgroundTasks.enabled: true` or its own `backgroundTasks.tools` entry) the framework still dispatches the entire subagent invocation as a background task. The supervisor inherits the subagent's intent: the subagent itself becomes the background task, and its inner tools run in the foreground inside the subagent's loop.
203
+ If a subagent isn't listed under the supervisor's `backgroundTasks.tools` but has background-eligible tools of its own (either via tool-level `background.enabled: true` or its own `backgroundTasks.tools` entry) the framework still dispatches the entire subagent invocation as a background task. The supervisor inherits the subagent's intent: the subagent itself becomes the background task, and its inner tools run in the foreground inside the subagent's loop.
204
204
 
205
205
  The background config used for the inherited dispatch (for example `waitTimeoutMs`) is derived from the subagent's own `backgroundTasks` config.
206
206
 
@@ -285,7 +285,7 @@ The manager keeps tool executors in process memory. If the process restarts whil
285
285
 
286
286
  Each layer can register terminal-state callbacks. They don't replace one another, and success/failure hooks fire for their respective outcomes:
287
287
 
288
- - Tool-level `backgroundTasks.onComplete` / `onFailed`: scoped to one tool.
288
+ - Tool-level `background.onComplete` / `onFailed`: scoped to one tool.
289
289
  - Agent-level `backgroundTasks.onTaskComplete` / `onTaskFailed`: scoped to all tasks dispatched by this agent.
290
290
  - Manager-level `onTaskComplete` / `onTaskFailed`: scoped globally.
291
291
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Added in:** `@mastra/core@1.42.0`
4
4
 
5
- > **Alpha:** The Goals feature is in alpha stage and subject to breaking changes in minor versions until it graduates from its alpha status.
5
+ > **Beta:** The Goals feature is in beta stage and subject to breaking changes in minor versions until it graduates from its beta status.
6
6
 
7
7
  A goal is a durable, thread-scoped objective: a standing instruction the agent keeps working toward across loop iterations until a judge model decides it is satisfied or a run budget is exhausted. The objective is persisted in thread state, so it survives reloads and is evaluated in-loop — even when a new message arrives in the middle of an already-running turn.
8
8
 
@@ -261,6 +261,21 @@ for await (const chunk of stream.fullStream) {
261
261
  }
262
262
  ```
263
263
 
264
+ ## Cancellation
265
+
266
+ When you pass an `abortSignal` to the supervisor's [`stream()`](https://mastra.ai/reference/streaming/agents/stream) or [`generate()`](https://mastra.ai/reference/agents/generate) call, Mastra forwards that same signal to delegated subagents. Calling `AbortController.abort()` cancels in-flight subagent runs at their next step instead of letting them run to completion.
267
+
268
+ ```typescript
269
+ const controller = new AbortController()
270
+
271
+ const stream = await supervisor.stream('Research AI trends', {
272
+ abortSignal: controller.signal,
273
+ })
274
+
275
+ // Cancel the supervisor and any in-flight subagents
276
+ controller.abort()
277
+ ```
278
+
264
279
  ## Task completion scoring
265
280
 
266
281
  Agents don't always produce a complete, correct output on the first try. Task completion scorers can help with that by validating whether the task is complete after each iteration. If validation fails, the supervisor continues iterating. Feedback from failed scorers is included in the conversation context so subagents can see what was missing.
@@ -210,9 +210,7 @@ The result is a three-tier system:
210
210
  2. **Observations**: A log of what the Observer has seen
211
211
  3. **Reflections**: Condensed observations when memory becomes too long
212
212
 
213
- ### Retrieval mode (experimental)
214
-
215
- > **Note:** Retrieval mode is experimental. The API may change in future releases.
213
+ ### Retrieval mode
216
214
 
217
215
  Normal OM compresses messages into observations, which is great for staying on task, but the original wording is gone. Retrieval mode fixes this by keeping each observation group linked to the raw messages that produced it. When the agent needs exact wording, tool output, or chronology that the summary compressed away, it can call a `recall` tool to page through the source messages.
218
216
 
@@ -44,7 +44,7 @@ OM performs thresholding with fast local token estimation. Text uses `tokenx`, a
44
44
 
45
45
  **temporalMarkers** (`boolean`): Insert temporal-gap reminder markers before new user messages when the previous message in the thread is at least 10 minutes older. The marker is persisted in memory, emitted as an inline reminder event so clients can render it specially, and shown to the observer so it can anchor observations to when events occurred. (Default: `false`)
46
46
 
47
- **retrieval** (`boolean | { vector?: boolean; scope?: 'thread' | 'resource' }`): \*\*Experimental.\*\* Enable retrieval-mode observation groups as durable pointers to raw message history. \`true\` enables cross-thread browsing by default. \`{ vector: true }\` also enables semantic search using Memory's vector store and embedder. \`{ scope: 'thread' }\` restricts the recall tool to the current thread only. Default scope is \`'resource'\`. (Default: `false`)
47
+ **retrieval** (`boolean | { vector?: boolean; scope?: 'thread' | 'resource' }`): Enable retrieval-mode observation groups as durable pointers to raw message history. \`true\` enables cross-thread browsing by default. \`{ vector: true }\` also enables semantic search using Memory's vector store and embedder. \`{ scope: 'thread' }\` restricts the recall tool to the current thread only. Default scope is \`'resource'\`. (Default: `false`)
48
48
 
49
49
  **observation** (`ObservationalMemoryObservationConfig`): Configuration for the observation step. Controls when the Observer agent runs and how it behaves.
50
50
 
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk2ZNDDQ6X_cjs = require('./chunk-2ZNDDQ6X.cjs');
3
+ var chunkLEAP5DKB_cjs = require('./chunk-LEAP5DKB.cjs');
4
4
  var chunk43FJOLKM_cjs = require('./chunk-43FJOLKM.cjs');
5
5
  var chunkQ7SFCCGT_cjs = require('./chunk-Q7SFCCGT.cjs');
6
6
  var agent = require('@mastra/core/agent');
@@ -46035,7 +46035,7 @@ function formatTimestamp(date9) {
46035
46035
  }
46036
46036
  function truncateByTokens(text4, maxTokens, hint) {
46037
46037
  if (tokenx.estimateTokenCount(text4) <= maxTokens) return { text: text4, wasTruncated: false };
46038
- const truncated = chunk2ZNDDQ6X_cjs.truncateStringByTokens(text4, maxTokens);
46038
+ const truncated = chunkLEAP5DKB_cjs.truncateStringByTokens(text4, maxTokens);
46039
46039
  const suffix = hint ? ` [${hint} for more]` : "";
46040
46040
  return { text: truncated + suffix, wasTruncated: true };
46041
46041
  }
@@ -46087,11 +46087,11 @@ ${JSON.stringify(inv.args, null, 2)}`;
46087
46087
  });
46088
46088
  }
46089
46089
  if (inv.state === "result") {
46090
- const { value: resultValue } = chunk2ZNDDQ6X_cjs.resolveToolResultValue(
46090
+ const { value: resultValue } = chunkLEAP5DKB_cjs.resolveToolResultValue(
46091
46091
  part,
46092
46092
  inv.result
46093
46093
  );
46094
- const resultStr = chunk2ZNDDQ6X_cjs.formatToolResultForObserver(resultValue, { maxTokens: HIGH_DETAIL_TOOL_RESULT_TOKENS });
46094
+ const resultStr = chunkLEAP5DKB_cjs.formatToolResultForObserver(resultValue, { maxTokens: HIGH_DETAIL_TOOL_RESULT_TOKENS });
46095
46095
  const fullText = `[Tool Result: ${inv.toolName}]
46096
46096
  ${resultStr}`;
46097
46097
  parts.push(makePart(msg, i, "tool-result", fullText, detail, inv.toolName));
@@ -46118,7 +46118,7 @@ ${typeof rawArgs === "string" ? rawArgs : JSON.stringify(rawArgs, null, 2)}`;
46118
46118
  const toolName = part.toolName;
46119
46119
  if (toolName) {
46120
46120
  const rawResult = part.output ?? part.result;
46121
- const resultStr = chunk2ZNDDQ6X_cjs.formatToolResultForObserver(rawResult, { maxTokens: HIGH_DETAIL_TOOL_RESULT_TOKENS });
46121
+ const resultStr = chunkLEAP5DKB_cjs.formatToolResultForObserver(rawResult, { maxTokens: HIGH_DETAIL_TOOL_RESULT_TOKENS });
46122
46122
  const fullText = `[Tool Result: ${toolName}]
46123
46123
  ${resultStr}`;
46124
46124
  parts.push(makePart(msg, i, "tool-result", fullText, detail, toolName));
@@ -46197,7 +46197,7 @@ function renderFormattedParts(parts, timestamps, options) {
46197
46197
  const text4 = buildRenderedText(parts, timestamps);
46198
46198
  let totalTokens = tokenx.estimateTokenCount(text4);
46199
46199
  if (totalTokens > options.maxTokens) {
46200
- const truncated = chunk2ZNDDQ6X_cjs.truncateStringByTokens(text4, options.maxTokens);
46200
+ const truncated = chunkLEAP5DKB_cjs.truncateStringByTokens(text4, options.maxTokens);
46201
46201
  return { text: truncated, truncated: true, tokenOffset: totalTokens - options.maxTokens };
46202
46202
  }
46203
46203
  const truncatedIndices = parts.map((p, i) => ({ part: p, index: i })).filter(({ part }) => part.text !== part.fullText).sort((a, b) => expandPriority(a.part) - expandPriority(b.part));
@@ -46230,7 +46230,7 @@ function renderFormattedParts(parts, timestamps, options) {
46230
46230
  if (expandedTokens <= options.maxTokens) {
46231
46231
  return { text: expanded, truncated: false, tokenOffset: 0 };
46232
46232
  }
46233
- const hardTruncated = chunk2ZNDDQ6X_cjs.truncateStringByTokens(expanded, options.maxTokens);
46233
+ const hardTruncated = chunkLEAP5DKB_cjs.truncateStringByTokens(expanded, options.maxTokens);
46234
46234
  return { text: hardTruncated, truncated: true, tokenOffset: expandedTokens - options.maxTokens };
46235
46235
  }
46236
46236
  async function recallPart({
@@ -46281,7 +46281,7 @@ async function recallPart({
46281
46281
 
46282
46282
  `;
46283
46283
  const fallbackText = `${fallbackNote}${firstNextPart.text}`;
46284
- const truncatedText2 = chunk2ZNDDQ6X_cjs.truncateStringByTokens(fallbackText, maxTokens);
46284
+ const truncatedText2 = chunkLEAP5DKB_cjs.truncateStringByTokens(fallbackText, maxTokens);
46285
46285
  const wasTruncated2 = truncatedText2 !== fallbackText;
46286
46286
  return {
46287
46287
  text: truncatedText2,
@@ -46296,7 +46296,7 @@ async function recallPart({
46296
46296
  }
46297
46297
  throw new Error(`Part index ${partIndex} not found in message ${cursor}. Available indices: ${availableIndices}`);
46298
46298
  }
46299
- const truncatedText = chunk2ZNDDQ6X_cjs.truncateStringByTokens(target.text, maxTokens);
46299
+ const truncatedText = chunkLEAP5DKB_cjs.truncateStringByTokens(target.text, maxTokens);
46300
46300
  const wasTruncated = truncatedText !== target.text;
46301
46301
  return {
46302
46302
  text: truncatedText,
@@ -48135,7 +48135,7 @@ ${workingMemory}`;
48135
48135
  "Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version."
48136
48136
  );
48137
48137
  }
48138
- const { ObservationalMemory: OMClass } = await import('./observational-memory-XZTKSWPR.cjs');
48138
+ const { ObservationalMemory: OMClass } = await import('./observational-memory-WZ6JQ4JY.cjs');
48139
48139
  const onIndexObservations = this.hasRetrievalSearch(omConfig.retrieval) ? async (observation) => {
48140
48140
  await this.indexObservation(observation);
48141
48141
  } : void 0;
@@ -49087,7 +49087,7 @@ Notes:
49087
49087
  if (!effectiveConfig) return null;
49088
49088
  const engine = await this.omEngine;
49089
49089
  if (!engine) return null;
49090
- const { ObservationalMemoryProcessor } = await import('./observational-memory-XZTKSWPR.cjs');
49090
+ const { ObservationalMemoryProcessor } = await import('./observational-memory-WZ6JQ4JY.cjs');
49091
49091
  return new ObservationalMemoryProcessor(engine, this, {
49092
49092
  temporalMarkers: effectiveConfig.temporalMarkers
49093
49093
  });
@@ -49114,11 +49114,11 @@ Notes:
49114
49114
 
49115
49115
  Object.defineProperty(exports, "ModelByInputTokens", {
49116
49116
  enumerable: true,
49117
- get: function () { return chunk2ZNDDQ6X_cjs.ModelByInputTokens; }
49117
+ get: function () { return chunkLEAP5DKB_cjs.ModelByInputTokens; }
49118
49118
  });
49119
49119
  Object.defineProperty(exports, "getObservationsAsOf", {
49120
49120
  enumerable: true,
49121
- get: function () { return chunk2ZNDDQ6X_cjs.getObservationsAsOf; }
49121
+ get: function () { return chunkLEAP5DKB_cjs.getObservationsAsOf; }
49122
49122
  });
49123
49123
  Object.defineProperty(exports, "WORKING_MEMORY_STATE_ID", {
49124
49124
  enumerable: true,
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { truncateStringByTokens, resolveToolResultValue, formatToolResultForObserver } from './chunk-3I6H2ABM.js';
2
- export { ModelByInputTokens, getObservationsAsOf } from './chunk-3I6H2ABM.js';
1
+ import { truncateStringByTokens, resolveToolResultValue, formatToolResultForObserver } from './chunk-UHQBCO7I.js';
2
+ export { ModelByInputTokens, getObservationsAsOf } from './chunk-UHQBCO7I.js';
3
3
  export { WORKING_MEMORY_STATE_ID, WORKING_MEMORY_STATE_PROCESSOR_ID, WorkingMemoryStateProcessor } from './chunk-WCGXQIEN.js';
4
4
  import { __export } from './chunk-PZ5AY32C.js';
5
5
  import { MessageList } from '@mastra/core/agent';
@@ -48130,7 +48130,7 @@ ${workingMemory}`;
48130
48130
  "Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version."
48131
48131
  );
48132
48132
  }
48133
- const { ObservationalMemory: OMClass } = await import('./observational-memory-Y5T2OR2Y.js');
48133
+ const { ObservationalMemory: OMClass } = await import('./observational-memory-NC6DQQWD.js');
48134
48134
  const onIndexObservations = this.hasRetrievalSearch(omConfig.retrieval) ? async (observation) => {
48135
48135
  await this.indexObservation(observation);
48136
48136
  } : void 0;
@@ -49082,7 +49082,7 @@ Notes:
49082
49082
  if (!effectiveConfig) return null;
49083
49083
  const engine = await this.omEngine;
49084
49084
  if (!engine) return null;
49085
- const { ObservationalMemoryProcessor } = await import('./observational-memory-Y5T2OR2Y.js');
49085
+ const { ObservationalMemoryProcessor } = await import('./observational-memory-NC6DQQWD.js');
49086
49086
  return new ObservationalMemoryProcessor(engine, this, {
49087
49087
  temporalMarkers: effectiveConfig.temporalMarkers
49088
49088
  });
@@ -1,4 +1,4 @@
1
- export { ModelByInputTokens, OBSERVER_SYSTEM_PROMPT, ObservationalMemory, ObservationalMemoryProcessor, TokenCounter, buildObserverPrompt, buildObserverSystemPrompt, combineObservationGroupRanges, deriveObservationGroupProvenance, extractCurrentTask, formatMessagesForObserver, getObservationsAsOf, hasCurrentTaskSection, injectAnchorIds, optimizeObservationsForContext, parseAnchorId, parseObservationGroups, parseObserverOutput, reconcileObservationGroupsFromReflection, renderObservationGroupsForReflection, stripEphemeralAnchorIds, stripObservationGroups, wrapInObservationGroup } from './chunk-3I6H2ABM.js';
1
+ export { ModelByInputTokens, OBSERVER_SYSTEM_PROMPT, ObservationalMemory, ObservationalMemoryProcessor, TokenCounter, buildObserverPrompt, buildObserverSystemPrompt, combineObservationGroupRanges, deriveObservationGroupProvenance, extractCurrentTask, formatMessagesForObserver, getObservationsAsOf, hasCurrentTaskSection, injectAnchorIds, optimizeObservationsForContext, parseAnchorId, parseObservationGroups, parseObserverOutput, reconcileObservationGroupsFromReflection, renderObservationGroupsForReflection, stripEphemeralAnchorIds, stripObservationGroups, wrapInObservationGroup } from './chunk-UHQBCO7I.js';
2
2
  export { OBSERVATIONAL_MEMORY_DEFAULTS, OBSERVATION_CONTEXT_INSTRUCTIONS, OBSERVATION_CONTEXT_PROMPT, OBSERVATION_CONTINUATION_HINT } from './chunk-LSJJAJAF.js';
3
- //# sourceMappingURL=observational-memory-Y5T2OR2Y.js.map
4
- //# sourceMappingURL=observational-memory-Y5T2OR2Y.js.map
3
+ //# sourceMappingURL=observational-memory-NC6DQQWD.js.map
4
+ //# sourceMappingURL=observational-memory-NC6DQQWD.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-Y5T2OR2Y.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-NC6DQQWD.js"}
@@ -1,101 +1,101 @@
1
1
  'use strict';
2
2
 
3
- var chunk2ZNDDQ6X_cjs = require('./chunk-2ZNDDQ6X.cjs');
3
+ var chunkLEAP5DKB_cjs = require('./chunk-LEAP5DKB.cjs');
4
4
  var chunkD4J4XPGM_cjs = require('./chunk-D4J4XPGM.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "ModelByInputTokens", {
9
9
  enumerable: true,
10
- get: function () { return chunk2ZNDDQ6X_cjs.ModelByInputTokens; }
10
+ get: function () { return chunkLEAP5DKB_cjs.ModelByInputTokens; }
11
11
  });
12
12
  Object.defineProperty(exports, "OBSERVER_SYSTEM_PROMPT", {
13
13
  enumerable: true,
14
- get: function () { return chunk2ZNDDQ6X_cjs.OBSERVER_SYSTEM_PROMPT; }
14
+ get: function () { return chunkLEAP5DKB_cjs.OBSERVER_SYSTEM_PROMPT; }
15
15
  });
16
16
  Object.defineProperty(exports, "ObservationalMemory", {
17
17
  enumerable: true,
18
- get: function () { return chunk2ZNDDQ6X_cjs.ObservationalMemory; }
18
+ get: function () { return chunkLEAP5DKB_cjs.ObservationalMemory; }
19
19
  });
20
20
  Object.defineProperty(exports, "ObservationalMemoryProcessor", {
21
21
  enumerable: true,
22
- get: function () { return chunk2ZNDDQ6X_cjs.ObservationalMemoryProcessor; }
22
+ get: function () { return chunkLEAP5DKB_cjs.ObservationalMemoryProcessor; }
23
23
  });
24
24
  Object.defineProperty(exports, "TokenCounter", {
25
25
  enumerable: true,
26
- get: function () { return chunk2ZNDDQ6X_cjs.TokenCounter; }
26
+ get: function () { return chunkLEAP5DKB_cjs.TokenCounter; }
27
27
  });
28
28
  Object.defineProperty(exports, "buildObserverPrompt", {
29
29
  enumerable: true,
30
- get: function () { return chunk2ZNDDQ6X_cjs.buildObserverPrompt; }
30
+ get: function () { return chunkLEAP5DKB_cjs.buildObserverPrompt; }
31
31
  });
32
32
  Object.defineProperty(exports, "buildObserverSystemPrompt", {
33
33
  enumerable: true,
34
- get: function () { return chunk2ZNDDQ6X_cjs.buildObserverSystemPrompt; }
34
+ get: function () { return chunkLEAP5DKB_cjs.buildObserverSystemPrompt; }
35
35
  });
36
36
  Object.defineProperty(exports, "combineObservationGroupRanges", {
37
37
  enumerable: true,
38
- get: function () { return chunk2ZNDDQ6X_cjs.combineObservationGroupRanges; }
38
+ get: function () { return chunkLEAP5DKB_cjs.combineObservationGroupRanges; }
39
39
  });
40
40
  Object.defineProperty(exports, "deriveObservationGroupProvenance", {
41
41
  enumerable: true,
42
- get: function () { return chunk2ZNDDQ6X_cjs.deriveObservationGroupProvenance; }
42
+ get: function () { return chunkLEAP5DKB_cjs.deriveObservationGroupProvenance; }
43
43
  });
44
44
  Object.defineProperty(exports, "extractCurrentTask", {
45
45
  enumerable: true,
46
- get: function () { return chunk2ZNDDQ6X_cjs.extractCurrentTask; }
46
+ get: function () { return chunkLEAP5DKB_cjs.extractCurrentTask; }
47
47
  });
48
48
  Object.defineProperty(exports, "formatMessagesForObserver", {
49
49
  enumerable: true,
50
- get: function () { return chunk2ZNDDQ6X_cjs.formatMessagesForObserver; }
50
+ get: function () { return chunkLEAP5DKB_cjs.formatMessagesForObserver; }
51
51
  });
52
52
  Object.defineProperty(exports, "getObservationsAsOf", {
53
53
  enumerable: true,
54
- get: function () { return chunk2ZNDDQ6X_cjs.getObservationsAsOf; }
54
+ get: function () { return chunkLEAP5DKB_cjs.getObservationsAsOf; }
55
55
  });
56
56
  Object.defineProperty(exports, "hasCurrentTaskSection", {
57
57
  enumerable: true,
58
- get: function () { return chunk2ZNDDQ6X_cjs.hasCurrentTaskSection; }
58
+ get: function () { return chunkLEAP5DKB_cjs.hasCurrentTaskSection; }
59
59
  });
60
60
  Object.defineProperty(exports, "injectAnchorIds", {
61
61
  enumerable: true,
62
- get: function () { return chunk2ZNDDQ6X_cjs.injectAnchorIds; }
62
+ get: function () { return chunkLEAP5DKB_cjs.injectAnchorIds; }
63
63
  });
64
64
  Object.defineProperty(exports, "optimizeObservationsForContext", {
65
65
  enumerable: true,
66
- get: function () { return chunk2ZNDDQ6X_cjs.optimizeObservationsForContext; }
66
+ get: function () { return chunkLEAP5DKB_cjs.optimizeObservationsForContext; }
67
67
  });
68
68
  Object.defineProperty(exports, "parseAnchorId", {
69
69
  enumerable: true,
70
- get: function () { return chunk2ZNDDQ6X_cjs.parseAnchorId; }
70
+ get: function () { return chunkLEAP5DKB_cjs.parseAnchorId; }
71
71
  });
72
72
  Object.defineProperty(exports, "parseObservationGroups", {
73
73
  enumerable: true,
74
- get: function () { return chunk2ZNDDQ6X_cjs.parseObservationGroups; }
74
+ get: function () { return chunkLEAP5DKB_cjs.parseObservationGroups; }
75
75
  });
76
76
  Object.defineProperty(exports, "parseObserverOutput", {
77
77
  enumerable: true,
78
- get: function () { return chunk2ZNDDQ6X_cjs.parseObserverOutput; }
78
+ get: function () { return chunkLEAP5DKB_cjs.parseObserverOutput; }
79
79
  });
80
80
  Object.defineProperty(exports, "reconcileObservationGroupsFromReflection", {
81
81
  enumerable: true,
82
- get: function () { return chunk2ZNDDQ6X_cjs.reconcileObservationGroupsFromReflection; }
82
+ get: function () { return chunkLEAP5DKB_cjs.reconcileObservationGroupsFromReflection; }
83
83
  });
84
84
  Object.defineProperty(exports, "renderObservationGroupsForReflection", {
85
85
  enumerable: true,
86
- get: function () { return chunk2ZNDDQ6X_cjs.renderObservationGroupsForReflection; }
86
+ get: function () { return chunkLEAP5DKB_cjs.renderObservationGroupsForReflection; }
87
87
  });
88
88
  Object.defineProperty(exports, "stripEphemeralAnchorIds", {
89
89
  enumerable: true,
90
- get: function () { return chunk2ZNDDQ6X_cjs.stripEphemeralAnchorIds; }
90
+ get: function () { return chunkLEAP5DKB_cjs.stripEphemeralAnchorIds; }
91
91
  });
92
92
  Object.defineProperty(exports, "stripObservationGroups", {
93
93
  enumerable: true,
94
- get: function () { return chunk2ZNDDQ6X_cjs.stripObservationGroups; }
94
+ get: function () { return chunkLEAP5DKB_cjs.stripObservationGroups; }
95
95
  });
96
96
  Object.defineProperty(exports, "wrapInObservationGroup", {
97
97
  enumerable: true,
98
- get: function () { return chunk2ZNDDQ6X_cjs.wrapInObservationGroup; }
98
+ get: function () { return chunkLEAP5DKB_cjs.wrapInObservationGroup; }
99
99
  });
100
100
  Object.defineProperty(exports, "OBSERVATIONAL_MEMORY_DEFAULTS", {
101
101
  enumerable: true,
@@ -113,5 +113,5 @@ Object.defineProperty(exports, "OBSERVATION_CONTINUATION_HINT", {
113
113
  enumerable: true,
114
114
  get: function () { return chunkD4J4XPGM_cjs.OBSERVATION_CONTINUATION_HINT; }
115
115
  });
116
- //# sourceMappingURL=observational-memory-XZTKSWPR.cjs.map
117
- //# sourceMappingURL=observational-memory-XZTKSWPR.cjs.map
116
+ //# sourceMappingURL=observational-memory-WZ6JQ4JY.cjs.map
117
+ //# sourceMappingURL=observational-memory-WZ6JQ4JY.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-XZTKSWPR.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-WZ6JQ4JY.cjs"}