@mastra/memory 1.37.0-alpha.2 → 1.37.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.
Files changed (47) hide show
  1. package/dist/docs/SKILL.md +1 -1
  2. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  3. package/dist/docs/references/docs-memory-observational-memory.md +17 -15
  4. package/dist/docs/references/docs-subagents.md +1 -0
  5. package/dist/docs/references/reference-memory-observational-memory.md +3 -3
  6. package/dist/index.cjs +1 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +1 -1
  9. package/dist/processors/index.cjs +1 -1
  10. package/dist/processors/index.js +1 -1
  11. package/dist/processors/observational-memory/buffering-coordinator.d.ts +25 -0
  12. package/dist/processors/observational-memory/buffering-coordinator.d.ts.map +1 -1
  13. package/dist/processors/observational-memory/commit-queue.d.ts +46 -0
  14. package/dist/processors/observational-memory/commit-queue.d.ts.map +1 -0
  15. package/dist/processors/observational-memory/observation-strategies/async-buffer.d.ts +7 -4
  16. package/dist/processors/observational-memory/observation-strategies/async-buffer.d.ts.map +1 -1
  17. package/dist/processors/observational-memory/observation-strategies/base.d.ts +93 -6
  18. package/dist/processors/observational-memory/observation-strategies/base.d.ts.map +1 -1
  19. package/dist/processors/observational-memory/observation-strategies/resource-scoped.d.ts +20 -3
  20. package/dist/processors/observational-memory/observation-strategies/resource-scoped.d.ts.map +1 -1
  21. package/dist/processors/observational-memory/observation-strategies/sync.d.ts +10 -3
  22. package/dist/processors/observational-memory/observation-strategies/sync.d.ts.map +1 -1
  23. package/dist/processors/observational-memory/observation-strategies/types.d.ts +30 -0
  24. package/dist/processors/observational-memory/observation-strategies/types.d.ts.map +1 -1
  25. package/dist/processors/observational-memory/observation-turn/step.d.ts +1 -1
  26. package/dist/processors/observational-memory/observation-turn/step.d.ts.map +1 -1
  27. package/dist/processors/observational-memory/observational-memory.d.ts +30 -6
  28. package/dist/processors/observational-memory/observational-memory.d.ts.map +1 -1
  29. package/dist/processors/observational-memory/observer-agent.d.ts +8 -0
  30. package/dist/processors/observational-memory/observer-agent.d.ts.map +1 -1
  31. package/dist/processors/observational-memory/observer-runner.d.ts +1 -1
  32. package/dist/processors/observational-memory/observer-runner.d.ts.map +1 -1
  33. package/dist/processors/observational-memory/processor.d.ts.map +1 -1
  34. package/dist/processors/observational-memory/record-lineage.d.ts +21 -0
  35. package/dist/processors/observational-memory/record-lineage.d.ts.map +1 -0
  36. package/dist/processors/observational-memory/reflector-agent.d.ts.map +1 -1
  37. package/dist/processors/observational-memory/reflector-runner.d.ts +9 -0
  38. package/dist/processors/observational-memory/reflector-runner.d.ts.map +1 -1
  39. package/dist/processors/observational-memory/types.d.ts +10 -8
  40. package/dist/processors/observational-memory/types.d.ts.map +1 -1
  41. package/dist/{src-D-jA6eRb.cjs → src-BpxX0T2g.cjs} +1039 -298
  42. package/dist/src-BpxX0T2g.cjs.map +1 -0
  43. package/dist/{src-B9qhQmNI.js → src-ThciS3vu.js} +1040 -299
  44. package/dist/src-ThciS3vu.js.map +1 -0
  45. package/package.json +7 -7
  46. package/dist/src-B9qhQmNI.js.map +0 -1
  47. package/dist/src-D-jA6eRb.cjs.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.37.0-alpha.2"
6
+ version: "1.37.1-alpha.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.37.0-alpha.2",
2
+ "version": "1.37.1-alpha.0",
3
3
  "package": "@mastra/memory",
4
4
  "exports": {},
5
5
  "modules": {
@@ -468,7 +468,7 @@ With default settings, the context window doesn't grow unbounded. It oscillates
468
468
  3. **Repeat**: History grows from \~6k back toward 30k and shrinks again. Each cycle appends to the observation log, which grows much more slowly than raw history.
469
469
  4. **Observations reach 40k**: The Reflector creates a smaller log from the current observations and any earlier reflections.
470
470
 
471
- In the normal buffered cycle, raw history oscillates between roughly 6k and 30k tokens. The observation log stays around 40k tokens, however long the conversation runs. These are activation thresholds rather than hard caps, so history can grow past the threshold whenever background buffering doesn't keep pace. Above `blockAfter` (default `1.2`, \~36k tokens) activation is allowed to overshoot the retention target instead of activating fewer chunks. It doesn't drain the buffer, and with the default settings it removes the same amount of history as below the threshold. Reflection falls back to a synchronous run above its own `blockAfter` (\~48k tokens).
471
+ In the normal buffered cycle, raw history oscillates between roughly 6k and 30k tokens. The observation log stays around 40k tokens, however long the conversation runs. These are activation thresholds rather than hard caps, so history can grow past the threshold whenever background buffering doesn't keep pace. Between the threshold and `blockAfter` (default `1.2`, \~36k tokens), buffering keeps running in the background and the next ready chunk activates without blocking the agent. At `blockAfter`, a synchronous observation runs if no buffered chunk activates. Reflection falls back to a synchronous run above its own `blockAfter` (\~48k tokens).
472
472
 
473
473
  With [`shareTokenBudget`](https://mastra.ai/reference/memory/observational-memory) enabled, the two budgets pool together. While the observation log is small, message history can expand into the unused observation space (up to \~70k tokens with the defaults) before observation triggers. It then shrinks as observations accumulate.
474
474
 
@@ -796,23 +796,25 @@ When message tokens reach the `messageTokens` threshold, buffered chunks activat
796
796
 
797
797
  Async buffered Observer calls don't generate continuation hints because delayed hints can be stale by activation time. When buffered chunks activate, any previously stored suggested response and current task are cleared. The main agent receives the compressed observations without those hints.
798
798
 
799
- When message production outpaces the Observer, the `blockAfter` safety threshold allows activation to overshoot the retention target instead of using fewer chunks. Activation still uses no more chunks than needed to reach the target, and the default settings remain unaffected. A synchronous observation runs when the `messageTokens` threshold is reached and activating buffered chunks doesn't bring pending tokens back under it. For example, this happens when a large tool result arrives after buffering has stopped. Buffered activation usually preserves a minimum remaining context (the smaller of \~1k tokens or the configured retention floor), but a single buffered chunk that covers the whole pending window still activates and can leave less.
799
+ When message production outpaces the Observer, history can pass `messageTokens` before a buffered chunk is ready. Between `messageTokens` and `blockAfter`, Mastra keeps buffering in the background and activates the chunk on a later step, so the agent doesn't wait on the Observer. A synchronous observation runs if pending tokens still reach `blockAfter` after buffered activation, for example when a large tool result leaves an uncovered tail. Above `blockAfter`, activation may also overshoot the retention target instead of using fewer chunks. Buffered activation usually preserves a minimum remaining context (the smaller of \~1k tokens or the configured retention floor), but a single buffered chunk that covers the whole pending window still activates and can leave less.
800
+
801
+ At `blockAfter`, activation waits a bounded time for a buffered observation that's still being produced so it activates with the rest. If that takes longer, Mastra observes the remaining messages synchronously. A late observation whose messages are all already observed is then dropped instead of stored. Activations triggered by the idle TTL or a model change don't wait.
800
802
 
801
803
  Reflection works similarly: the Reflector runs in the background when observations reach a fraction of the reflection threshold.
802
804
 
803
805
  ### Settings
804
806
 
805
- | Setting | Default | What it controls |
806
- | ------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
807
- | `observation.bufferTokens` | `0.2` | How often to buffer. `0.2` means every 20% of `messageTokens`. With the default 30k threshold, that's roughly every 6k tokens. Can also be an absolute token count (e.g. `5000`). |
808
- | `observation.bufferActivation` | `0.8` | How aggressively to clear the message window on activation. `0.8` means remove enough messages to keep only 20% of `messageTokens` remaining. Lower values keep more message history. |
809
- | `observation.blockAfter` | `1.2` | Safety net if buffering can't keep up. Values from 1 up to (but not including) 100 multiply `messageTokens`. For example, `1.2` creates a threshold of 36k tokens (1.2 × 30k), above which activation may overshoot the retention target rather than use fewer chunks. Values of 100 or more are absolute token counts (e.g. `50_000`) and must be greater than `messageTokens`. |
810
- | `activateAfterIdle` | none | Forces buffered observations to activate after a period of inactivity, even before `observation.messageTokens` is reached. Accepts a numeric millisecond value such as `300_000`, duration strings like `"5m"` or `"1hr"`, `"auto"` for a provider-aware prompt cache TTL, or an object of per-provider TTLs such as `{ default: 'auto', anthropic: '1h' }`. |
811
- | `activateOnProviderChange` | `false` | Forces buffered observations to activate when the next step uses a different `provider/model` than the one that produced the latest assistant step. Use this when switching providers or models would invalidate prompt cache reuse. |
812
- | `reflection.bufferActivation` | `0.5` | When to start background reflection. `0.5` means reflection begins when observations reach 50% of the `observationTokens` threshold. |
813
- | `reflection.activateAfterIdle` | none | Opts buffered reflections into idle activation. Reflections don't inherit top-level `activateAfterIdle`. |
814
- | `reflection.activateOnProviderChange` | `false` | Opts buffered reflections into provider-change activation. Reflections don't inherit top-level `activateOnProviderChange`. |
815
- | `reflection.blockAfter` | `1.2` | Safety threshold for reflection. Same value format as observation (absolute values must be greater than `observationTokens`), but above it reflection runs synchronously when no buffered reflection is ready to activate. |
807
+ | Setting | Default | What it controls |
808
+ | ------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
809
+ | `observation.bufferTokens` | `0.2` | How often to buffer. `0.2` means every 20% of `messageTokens`. With the default 30k threshold, that's roughly every 6k tokens. Can also be an absolute token count (e.g. `5000`). |
810
+ | `observation.bufferActivation` | `0.8` | How aggressively to clear the message window on activation. `0.8` means remove enough messages to keep only 20% of `messageTokens` remaining. Lower values keep more message history. |
811
+ | `observation.blockAfter` | `1.2` | Safety net if buffering can't keep up. Values from 1 up to (but not including) 100 multiply `messageTokens`. For example, `1.2` creates a threshold of 36k tokens (1.2 × 30k). Below it, only background buffering and activation run. Observation runs synchronously if pending tokens still reach it after buffered activation. Activation may also overshoot the retention target. Values of 100 or more are absolute token counts (e.g. `50_000`) and must be greater than `messageTokens`. Set `1` to observe synchronously at `messageTokens`. |
812
+ | `activateAfterIdle` | none | Forces buffered observations to activate after a period of inactivity, even before `observation.messageTokens` is reached. Accepts a numeric millisecond value such as `300_000`, duration strings like `"5m"` or `"1hr"`, `"auto"` for a provider-aware prompt cache TTL, or an object of per-provider TTLs such as `{ default: 'auto', anthropic: '1h' }`. |
813
+ | `activateOnProviderChange` | `false` | Forces buffered observations to activate when the next step uses a different `provider/model` than the one that produced the latest assistant step. Use this when switching providers or models would invalidate prompt cache reuse. |
814
+ | `reflection.bufferActivation` | `0.5` | When to start background reflection. `0.5` means reflection begins when observations reach 50% of the `observationTokens` threshold. |
815
+ | `reflection.activateAfterIdle` | none | Opts buffered reflections into idle activation. Reflections don't inherit top-level `activateAfterIdle`. |
816
+ | `reflection.activateOnProviderChange` | `false` | Opts buffered reflections into provider-change activation. Reflections don't inherit top-level `activateOnProviderChange`. |
817
+ | `reflection.blockAfter` | `1.2` | Safety threshold for reflection. Same value format as observation (absolute values must be greater than `observationTokens`), but above it reflection runs synchronously when no buffered reflection is ready to activate. |
816
818
 
817
819
  If you're relying on prompt caching, set `activateAfterIdle` to `"auto"` or to a specific cache TTL. That way, once a thread has been idle long enough for the cache to expire, the next request can activate buffered observations first and send a smaller compressed context window.
818
820
 
@@ -909,9 +911,9 @@ const memory = new Memory({
909
911
  })
910
912
  ```
911
913
 
912
- - `previousObserverTokens: 2000` → default. Keeps \~2k tokens of recent observations.
914
+ - `previousObserverTokens: false` → default. Sends the full previous observations.
915
+ - `previousObserverTokens: 2000` → keeps \~2k tokens of recent observations.
913
916
  - `previousObserverTokens: 0` → omit previous observations completely.
914
- - `previousObserverTokens: false` → disable truncation and keep full previous observations.
915
917
 
916
918
  ## Hooks
917
919
 
@@ -73,6 +73,7 @@ Called before the parent agent delegates to a subagent. Return an object to cont
73
73
  - `proceed: false`: Reject the delegation with a `rejectionReason`
74
74
  - `modifiedPrompt`: Rewrite the prompt sent to the subagent
75
75
  - `modifiedMaxSteps`: Limit the subagent's iteration count
76
+ - `threadMetadata`: Attach metadata (for example a `tenantId`) to the subagent's thread when it's created, so you can filter threads with `memory.listThreads({ filter: { metadata } })`
76
77
 
77
78
  ```typescript
78
79
  const stream = await parentAgent.stream('Research AI trends', {
@@ -99,7 +99,7 @@ OM performs thresholding with fast local token estimation. Text uses `tokenx`, a
99
99
 
100
100
  **observation.activateOnProviderChange** (`boolean`): Force buffered observations to activate when the actor provider or model changes. If unset, the top-level activateOnProviderChange value is used for observations. Currently only applied when using the standalone ObservationalMemory class; new Memory(...) applies the top-level activateOnProviderChange only.
101
101
 
102
- **observation.blockAfter** (`number`): Safety net for when background buffering can't keep up. Values from 1 up to (but not including) 100 are multipliers of messageTokens: 1.2 resolves to 120% of the threshold (36k tokens with the default 30k). Values of 100 or more are absolute token counts and must be greater than messageTokens. Above this point, activation uses the smallest set of buffered chunks that reaches the retention target, even when that overshoots the target by more than the usual safeguard allows. It never activates more chunks than are needed to reach the retention target, so it removes only slightly more history than a normal activation. It changes the result only when the retention floor is above roughly 20,000 tokens; with the default bufferActivation (a 6k floor) it has no observable effect. Activation usually keeps a minimum remaining context (the smaller of 1000 tokens or the retention floor), but a single buffered chunk that covers the whole pending window still activates and can leave less. Crossing blockAfter does not trigger a blocking observation. A synchronous (blocking) observation runs when the messageTokens threshold is reached and activating buffered chunks doesn't bring pending tokens back under it, for example when a large tool result arrives after buffering has stopped. All remaining buffered chunks are activated first, so the synchronous observation only covers messages no chunk has observed. Only relevant when bufferTokens is set. Defaults to 1.2 when async buffering is enabled.
102
+ **observation.blockAfter** (`number`): Safety net for when background buffering can't keep up. Values from 1 up to (but not including) 100 are multipliers of messageTokens: 1.2 resolves to 120% of the threshold (36k tokens with the default 30k). Multipliers apply to a per-thread messageTokens override when one is set. Values of 100 or more are absolute token counts and must be greater than messageTokens. Between messageTokens and blockAfter, only async buffering and activation run: reaching the threshold without a buffered chunk to activate starts background buffering, and the chunk activates on a later step. A synchronous (blocking) observation runs if pending tokens still reach blockAfter after buffered activation. All remaining buffered chunks are activated first, so the synchronous observation only covers messages no chunk has observed. Set blockAfter: 1 to observe synchronously at messageTokens. Above this point, activation also uses the smallest set of buffered chunks that reaches the retention target, even when that overshoots the target by more than the usual safeguard allows. It never activates more chunks than are needed to reach the retention target, so it removes only slightly more history than a normal activation. It changes the result only when the retention floor is above roughly 20,000 tokens; with the default bufferActivation (a 6k floor) it has no observable effect. Activation usually keeps a minimum remaining context (the smaller of 1000 tokens or the retention floor), but a single buffered chunk that covers the whole pending window still activates and can leave less. Only relevant when bufferTokens is set. Defaults to 1.2 when async buffering is enabled.
103
103
 
104
104
  **observation.previousObserverTokens** (`number | false`): Optional token budget for the observer's previous-observations context. When set to a number, the observations passed to the Observer agent are tail-truncated to fit within this budget while keeping the newest observations and preserving highlighted 🔴 items when possible. When a buffered reflection is pending, the already-reflected observation lines are automatically replaced with the reflection summary before truncation. Set to 0 to omit previous observations entirely, or false to disable truncation explicitly.
105
105
 
@@ -371,7 +371,7 @@ export const agent = new Agent({
371
371
 
372
372
  Async buffering is **enabled by default**. It pre-computes observations in the background as the conversation grows: when the `messageTokens` threshold is reached, buffered observations activate instantly with no blocking LLM call.
373
373
 
374
- The lifecycle follows **buffer → activate → remove messages → repeat**. Background Observer calls run at `bufferTokens` intervals and produce chunks of observations. At the threshold, activation moves observations into the log and removes raw messages from context. Above `blockAfter`, activation may overshoot the retention target instead of activating fewer chunks. A synchronous observation runs if pending tokens are still at or above the threshold after all buffered chunks have been activated.
374
+ The lifecycle follows **buffer → activate → remove messages → repeat**. Background Observer calls run at `bufferTokens` intervals and produce chunks of observations. At the threshold, activation moves observations into the log and removes raw messages from context. Between the threshold and `blockAfter`, buffering continues in the background and the next ready chunk activates on a later step. A synchronous observation runs if pending tokens still reach `blockAfter` after all buffered chunks have been activated. Above `blockAfter`, activation may also overshoot the retention target instead of activating fewer chunks.
375
375
 
376
376
  Default settings:
377
377
 
@@ -402,7 +402,7 @@ export const agent = new Agent({
402
402
  bufferTokens: 5_000,
403
403
  // Activate to retain 30% of threshold
404
404
  bufferActivation: 0.7,
405
- // Above 1.5x the threshold, let activation overshoot the retention target
405
+ // Observe synchronously at 1.5x the threshold if no buffered chunk is ready
406
406
  blockAfter: 1.5,
407
407
  },
408
408
  reflection: {
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("./src-D-jA6eRb.cjs");
2
+ const require_src = require("./src-BpxX0T2g.cjs");
3
3
  let _mastra_core_processors = require("@mastra/core/processors");
4
4
  exports.AUTO_MODEL_BY_PROVIDER = require_src.AUTO_MODEL_BY_PROVIDER;
5
5
  exports.Extractor = require_src.Extractor;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAKhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAI1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EACL,YAAY,EAKb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,0BAA0B,EAC1B,YAAY,EACZ,cAAc,EACf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,oBAAoB,EAA6B,MAAM,4BAA4B,CAAC;AAElG,OAAO,KAAK,EACV,cAAc,EACd,wBAAwB,EACxB,eAAe,EACf,yBAAyB,EAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EACV,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,oCAAoC,EACpC,yBAAyB,EACzB,aAAa,EACb,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EAEzB,gBAAgB,EAChB,cAAc,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAQrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;A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ryExtractor, E as summarizeConversation, G as Subconscious, K as KnowledgeSemanticIndexCoordinator, T as SUMMARIZE_THREAD_DEFAULTS, Y as ModelByInputTokens, a as extractWorkingMemoryContent, c as getObservationsAsOf, d as AUTO_MODEL_BY_PROVIDER, et as Extractor, f as resolveAutoModelId, h as WorkingMemoryStateProcessor, i as WorkingMemory, m as WORKING_MEMORY_STATE_PROCESSOR_ID, n as MessageHistory, o as extractWorkingMemoryTags, p as WORKING_MEMORY_STATE_ID, q as StaleKnowledgeSemanticIndexError, r as SemanticRecall, s as removeWorkingMemoryTags, t as Memory, w as deepMergeWorkingMemory } from "./src-B9qhQmNI.js";
1
+ import { C as WorkingMemoryExtractor, E as summarizeConversation, G as Subconscious, K as KnowledgeSemanticIndexCoordinator, T as SUMMARIZE_THREAD_DEFAULTS, Y as ModelByInputTokens, a as extractWorkingMemoryContent, c as getObservationsAsOf, d as AUTO_MODEL_BY_PROVIDER, et as Extractor, f as resolveAutoModelId, h as WorkingMemoryStateProcessor, i as WorkingMemory, m as WORKING_MEMORY_STATE_PROCESSOR_ID, n as MessageHistory, o as extractWorkingMemoryTags, p as WORKING_MEMORY_STATE_ID, q as StaleKnowledgeSemanticIndexError, r as SemanticRecall, s as removeWorkingMemoryTags, t as Memory, w as deepMergeWorkingMemory } from "./src-ThciS3vu.js";
2
2
  export { AUTO_MODEL_BY_PROVIDER, Extractor, KnowledgeSemanticIndexCoordinator, Memory, MessageHistory, ModelByInputTokens, SUMMARIZE_THREAD_DEFAULTS, SemanticRecall, StaleKnowledgeSemanticIndexError, Subconscious, WORKING_MEMORY_STATE_ID, WORKING_MEMORY_STATE_PROCESSOR_ID, WorkingMemory, WorkingMemoryExtractor, WorkingMemoryStateProcessor, deepMergeWorkingMemory, extractWorkingMemoryContent, extractWorkingMemoryTags, getObservationsAsOf, removeWorkingMemoryTags, resolveAutoModelId, summarizeConversation };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("../src-D-jA6eRb.cjs");
2
+ const require_src = require("../src-BpxX0T2g.cjs");
3
3
  exports.AUTO_MODEL_BY_PROVIDER = require_src.AUTO_MODEL_BY_PROVIDER;
4
4
  exports.Extractor = require_src.Extractor;
5
5
  exports.KnowledgeSemanticIndexCoordinator = require_src.KnowledgeSemanticIndexCoordinator;
@@ -1,2 +1,2 @@
1
- import { $ as renderSubconsciousActivity, A as buildObserverSystemPrompt, B as OBSERVATION_CONTEXT_INSTRUCTIONS, C as WorkingMemoryExtractor, D as TokenCounter, E as summarizeConversation, F as parseObserverOutput, G as Subconscious, H as OBSERVATION_CONTEXT_PROMPT_THREAD, I as injectAnchorIds, J as SubconsciousRemindExtractor, K as KnowledgeSemanticIndexCoordinator, L as parseAnchorId, M as formatMessagesForObserver, N as hasCurrentTaskSection, O as OBSERVER_SYSTEM_PROMPT, P as optimizeObservationsForContext, Q as publishSubconsciousActivity, R as stripEphemeralAnchorIds, S as wrapInObservationGroup, U as OBSERVATION_CONTINUATION_HINT, V as OBSERVATION_CONTEXT_PROMPT, W as getObservationContextPrompt, X as SUBCONSCIOUS_ACTIVITY_STATE_ID, Y as ModelByInputTokens, Z as buildSubconsciousActivitySnapshot, _ as deriveObservationGroupProvenance, b as renderObservationGroupsForReflection, c as getObservationsAsOf, d as AUTO_MODEL_BY_PROVIDER, et as Extractor, f as resolveAutoModelId, g as combineObservationGroupRanges, j as extractCurrentTask, k as buildObserverPrompt, l as ObservationalMemoryProcessor, q as StaleKnowledgeSemanticIndexError, u as ObservationalMemory, v as parseObservationGroups, x as stripObservationGroups, y as reconcileObservationGroupsFromReflection, z as OBSERVATIONAL_MEMORY_DEFAULTS } from "../src-B9qhQmNI.js";
1
+ import { $ as renderSubconsciousActivity, A as buildObserverSystemPrompt, B as OBSERVATION_CONTEXT_INSTRUCTIONS, C as WorkingMemoryExtractor, D as TokenCounter, E as summarizeConversation, F as parseObserverOutput, G as Subconscious, H as OBSERVATION_CONTEXT_PROMPT_THREAD, I as injectAnchorIds, J as SubconsciousRemindExtractor, K as KnowledgeSemanticIndexCoordinator, L as parseAnchorId, M as formatMessagesForObserver, N as hasCurrentTaskSection, O as OBSERVER_SYSTEM_PROMPT, P as optimizeObservationsForContext, Q as publishSubconsciousActivity, R as stripEphemeralAnchorIds, S as wrapInObservationGroup, U as OBSERVATION_CONTINUATION_HINT, V as OBSERVATION_CONTEXT_PROMPT, W as getObservationContextPrompt, X as SUBCONSCIOUS_ACTIVITY_STATE_ID, Y as ModelByInputTokens, Z as buildSubconsciousActivitySnapshot, _ as deriveObservationGroupProvenance, b as renderObservationGroupsForReflection, c as getObservationsAsOf, d as AUTO_MODEL_BY_PROVIDER, et as Extractor, f as resolveAutoModelId, g as combineObservationGroupRanges, j as extractCurrentTask, k as buildObserverPrompt, l as ObservationalMemoryProcessor, q as StaleKnowledgeSemanticIndexError, u as ObservationalMemory, v as parseObservationGroups, x as stripObservationGroups, y as reconcileObservationGroupsFromReflection, z as OBSERVATIONAL_MEMORY_DEFAULTS } from "../src-ThciS3vu.js";
2
2
  export { AUTO_MODEL_BY_PROVIDER, Extractor, KnowledgeSemanticIndexCoordinator, ModelByInputTokens, OBSERVATIONAL_MEMORY_DEFAULTS, OBSERVATION_CONTEXT_INSTRUCTIONS, OBSERVATION_CONTEXT_PROMPT, OBSERVATION_CONTEXT_PROMPT_THREAD, OBSERVATION_CONTINUATION_HINT, OBSERVER_SYSTEM_PROMPT, ObservationalMemory, ObservationalMemoryProcessor, SUBCONSCIOUS_ACTIVITY_STATE_ID, StaleKnowledgeSemanticIndexError, Subconscious, SubconsciousRemindExtractor, TokenCounter, WorkingMemoryExtractor, buildObserverPrompt, buildObserverSystemPrompt, buildSubconsciousActivitySnapshot, combineObservationGroupRanges, deriveObservationGroupProvenance, extractCurrentTask, formatMessagesForObserver, getObservationContextPrompt, getObservationsAsOf, hasCurrentTaskSection, injectAnchorIds, optimizeObservationsForContext, parseAnchorId, parseObservationGroups, parseObserverOutput, publishSubconsciousActivity, reconcileObservationGroupsFromReflection, renderObservationGroupsForReflection, renderSubconsciousActivity, resolveAutoModelId, stripEphemeralAnchorIds, stripObservationGroups, summarizeConversation, wrapInObservationGroup };
@@ -17,11 +17,31 @@ export declare class BufferingCoordinator {
17
17
  * Value: Promise that resolves when buffering completes
18
18
  */
19
19
  static asyncBufferingOps: Map<string, Promise<void>>;
20
+ /**
21
+ * Observation buffer ops that may still append a buffered chunk.
22
+ * Key format: "obs:{lockKey}"
23
+ * Value: Promise that resolves once the op has persisted its chunk (or ended without one)
24
+ *
25
+ * Above the threshold→blockAfter band, activation waits (bounded) on this phase so the chunk
26
+ * activates instead of being re-observed by the sync pass. It is not needed for safety: storage
27
+ * keeps a chunk appended during activation. An op stays in asyncBufferingOps through its
28
+ * post-persist work (indexing, thread title), which activation never waits for.
29
+ */
30
+ static pendingChunkWrites: Map<string, Promise<void>>;
20
31
  /**
21
32
  * Track the last token boundary at which we started buffering.
22
33
  * Key format: "obs:{lockKey}" or "refl:{lockKey}"
23
34
  */
24
35
  static lastBufferedBoundary: Map<string, number>;
36
+ /**
37
+ * The buffer op that set the observation boundary, if one did. Any other write (an activation
38
+ * reset, another op) replaces or clears it, so an op that outlived it never writes its boundary
39
+ * back. Key format: "obs:{lockKey}"
40
+ */
41
+ static observationBoundaryOwners: Map<string, symbol>;
42
+ /** Set the observation boundary; `owner` is the buffer op setting it, if any. */
43
+ static setObservationBoundary(bufferKey: string, tokens: number, owner?: symbol): void;
44
+ static ownsObservationBoundary(bufferKey: string, owner: symbol): boolean;
25
45
  /**
26
46
  * Track the timestamp cursor for buffered messages.
27
47
  * Key format: "obs:{lockKey}"
@@ -43,6 +63,11 @@ export declare class BufferingCoordinator {
43
63
  getObservationBufferKey(lockKey: string): string;
44
64
  getReflectionBufferKey(lockKey: string): string;
45
65
  isAsyncBufferingInProgress(bufferKey: string): boolean;
66
+ /**
67
+ * Mark an observation buffer op as able to append a chunk. Call the returned release
68
+ * function once it no longer can; releasing more than once is a no-op.
69
+ */
70
+ static trackChunkWrite(bufferKey: string): () => void;
46
71
  /**
47
72
  * Clean up static maps for a thread/resource to prevent memory leaks.
48
73
  */
@@ -1 +1 @@
1
- {"version":3,"file":"buffering-coordinator.d.ts","sourceRoot":"","sources":["../../../src/processors/observational-memory/buffering-coordinator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAItE,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnF;;;;;;GAMG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA4B;IAC9D,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA2B;IAC5D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAwB;IAE9C;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,6BAAoC;IAE5D;;;OAGG;IACH,MAAM,CAAC,oBAAoB,sBAA6B;IAExD;;;OAGG;IACH,MAAM,CAAC,kBAAkB,oBAA2B;IAEpD;;;OAGG;IACH,MAAM,CAAC,wBAAwB,sBAA6B;gBAEhD,IAAI,EAAE;QAChB,iBAAiB,EAAE,yBAAyB,CAAC;QAC7C,gBAAgB,EAAE,wBAAwB,CAAC;QAC3C,KAAK,EAAE,QAAQ,GAAG,UAAU,CAAC;KAC9B;IAMD,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM;IAO9F,yBAAyB,IAAI,OAAO;IAIpC,wBAAwB,IAAI,OAAO;IAInC,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAIhD,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAI/C,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAItD;;OAEG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,mBAAmB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI;IAqBrG;;OAEG;IACH,6BAA6B,CAC3B,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,yBAAyB,EACjC,OAAO,CAAC,EAAE;QAAE,2BAA2B,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,EACnF,sBAAsB,CAAC,EAAE,MAAM,GAC9B,OAAO;IAgCV;;OAEG;WACU,cAAc,CACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACrC,KAAK,EAAE,QAAQ,GAAG,UAAU,EAC5B,SAAS,SAAQ,GAChB,OAAO,CAAC,IAAI,CAAC;CA6BjB"}
1
+ {"version":3,"file":"buffering-coordinator.d.ts","sourceRoot":"","sources":["../../../src/processors/observational-memory/buffering-coordinator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAKtE,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnF;;;;;;GAMG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA4B;IAC9D,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA2B;IAC5D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAwB;IAE9C;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,6BAAoC;IAE5D;;;;;;;;;OASG;IACH,MAAM,CAAC,kBAAkB,6BAAoC;IAE7D;;;OAGG;IACH,MAAM,CAAC,oBAAoB,sBAA6B;IAExD;;;;OAIG;IACH,MAAM,CAAC,yBAAyB,sBAA6B;IAE7D,iFAAiF;IACjF,MAAM,CA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B,CAAC,EAAE,MAAM,GAC9B,OAAO;IAkCV;;OAEG;WACU,cAAc,CACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACrC,KAAK,EAAE,QAAQ,GAAG,UAAU,EAC5B,SAAS,SAAQ,GAChB,OAAO,CAAC,IAAI,CAAC;CA6BjB"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Process-wide queue for observational memory storage commits, keyed per thread or resource
3
+ * (the `BufferingCoordinator.getLockKey` scheme).
4
+ *
5
+ * Storage alone keeps every commit correct (other processes never see this queue). The queue
6
+ * adds a deterministic order inside one process: one commit at a time per key, and a waiting
7
+ * reflection commit runs before waiting normal commits, so a due reflection is not held behind
8
+ * a backlog of chunk writes. A running op is never preempted.
9
+ *
10
+ * Ops hold the storage commit, the head read it needs, and in-memory work on that head (such as
11
+ * recomposing observation text against it). No model calls, indexing, or other slow I/O.
12
+ *
13
+ * An op still running after `OM_COMMIT_STALL_MS` (a storage call that never settles, e.g. a
14
+ * Postgres row-lock wait with no `lock_timeout`) releases its key with a warning, so later
15
+ * commits for that thread or resource proceed. The stalled op is not cancelled and its caller
16
+ * keeps waiting for it. If it later lands, it races the newer commits the way a commit from
17
+ * another process does, and storage's generation fencing keeps that correct.
18
+ *
19
+ * Each op runs in the async context of the caller that enqueued it (tracing spans, logger
20
+ * correlation), not the context of the op it waited behind.
21
+ */
22
+ export type OMCommitPriority = 'reflection' | 'normal';
23
+ /** How long an op may hold its key before later ops on that key stop waiting for it. */
24
+ export declare const OM_COMMIT_STALL_MS = 60000;
25
+ /** The per-thread / per-resource key shared by the commit queue and `BufferingCoordinator`. */
26
+ export declare function getOMLockKey(scope: 'thread' | 'resource', threadId: string | null | undefined, resourceId: string | null | undefined): string;
27
+ /**
28
+ * Runs `op` once every earlier op on `key` has settled (reflection-priority ops first among those
29
+ * still waiting) and resolves or rejects with its result. A rejection reaches only this caller.
30
+ *
31
+ * Enqueueing on a key from inside an op that holds the same key, directly or through nested ops
32
+ * on other keys, would deadlock, so it rejects.
33
+ */
34
+ export declare function runOMCommit<T>(key: string, op: () => Promise<T>, { priority }?: {
35
+ priority?: OMCommitPriority;
36
+ }): Promise<T>;
37
+ /** Whether the current async context runs inside an op holding `key`. Test-only. */
38
+ export declare function isInOMCommit(key: string): boolean;
39
+ /** Number of keys with running or waiting ops. Test-only. */
40
+ export declare function activeOMCommitKeys(): number;
41
+ /** Ops waiting (not running) on `key`, by priority. Test-only. */
42
+ export declare function waitingOMCommits(key: string): {
43
+ reflection: number;
44
+ normal: number;
45
+ };
46
+ //# sourceMappingURL=commit-queue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commit-queue.d.ts","sourceRoot":"","sources":["../../../src/processors/observational-memory/commit-queue.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,QAAQ,CAAC;AAEvD,wFAAwF;AACxF,eAAO,MAAM,kBAAkB,QAAS,CAAC;AAEzC,+FAA+F;AAC/F,wBAAgB,YAAY,CAC1B,KAAK,EAAE,QAAQ,GAAG,UAAU,EAC5B,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACpC,MAAM,CAKR;AAuCD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAC3B,GAAG,EAAE,MAAM,EACX,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,EAAE,QAAmB,EAAE,GAAE;IAAE,QAAQ,CAAC,EAAE,gBAAgB,CAAA;CAAO,GAC5D,OAAO,CAAC,CAAC,CAAC,CAuDZ;AAED,oFAAoF;AACpF,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,6DAA6D;AAC7D,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED,kEAAkE;AAClE,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAGpF"}
@@ -1,11 +1,13 @@
1
1
  import type { MastraDBMessage } from '@mastra/core/agent';
2
2
  import { ObservationStrategy } from './base.js';
3
3
  import type { StrategyDeps } from './base.js';
4
- import type { ObservationRunOpts, ObserverOutput, ProcessedObservation } from './types.js';
4
+ import type { ObservationPersistOutcome, ObservationRunOpts, ObserverOutput, ProcessedObservation } from './types.js';
5
5
  export declare class AsyncBufferObservationStrategy extends ObservationStrategy {
6
6
  private readonly startedAt;
7
7
  private readonly cycleId;
8
8
  private priorExtractedValues?;
9
+ /** The generation the chunk was written to (the head when the target was retired). */
10
+ private persistedRecordId?;
9
11
  constructor(deps: StrategyDeps, opts: ObservationRunOpts);
10
12
  get needsLock(): boolean;
11
13
  get needsReflection(): boolean;
@@ -16,7 +18,7 @@ export declare class AsyncBufferObservationStrategy extends ObservationStrategy
16
18
  existingObservations: string;
17
19
  }>;
18
20
  emitStartMarkers(_cycleId: string): Promise<void>;
19
- observe(existingObservations: string, messages: MastraDBMessage[]): Promise<{
21
+ observe(observerContext: string, messages: MastraDBMessage[], wasTruncated: boolean): Promise<{
20
22
  extractedValues: Record<string, unknown> | undefined;
21
23
  extractionFailures: import("../extracted-values").ExtractionFailure[] | undefined;
22
24
  observations: string;
@@ -32,8 +34,9 @@ export declare class AsyncBufferObservationStrategy extends ObservationStrategy
32
34
  providerMetadata?: import("@mastra/core/stream").ProviderMetadata;
33
35
  }>;
34
36
  process(output: ObserverOutput, _existingObservations: string): Promise<ProcessedObservation>;
35
- persist(processed: ProcessedObservation): Promise<boolean>;
36
- emitEndMarkers(_cycleId: string, processed: ProcessedObservation): Promise<void>;
37
+ persist(processed: ProcessedObservation): Promise<ObservationPersistOutcome | void>;
38
+ emitEndMarkers(): Promise<void>;
39
+ private emitBufferingEndMarker;
37
40
  emitFailedMarkers(_cycleId: string, error: unknown): Promise<void>;
38
41
  }
39
42
  //# sourceMappingURL=async-buffer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"async-buffer.d.ts","sourceRoot":"","sources":["../../../../src/processors/observational-memory/observation-strategies/async-buffer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAgB1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAExF,qBAAa,8BAA+B,SAAQ,mBAAmB;IACrE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,oBAAoB,CAAC,CAA0B;gBAE3C,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,kBAAkB;IAMxD,IAAI,SAAS,YAEZ;IACD,IAAI,eAAe,YAElB;IACD,IAAI,gBAAgB,YAEnB;cAEkB,eAAe,IAAI,MAAM;IAItC,OAAO;;;;IAQP,gBAAgB,CAAC,QAAQ,EAAE,MAAM;IAIjC,OAAO,CAAC,oBAAoB,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE;;;;;;;;;uBA8CK,CAAC;wBAAuB,CAAA;uBACnF,CAAC;;;;IADZ,OAAO,CAAC,MAAM,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA6C7F,OAAO,CAAC,SAAS,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;IA0F1D,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,oBAAoB;IA6BhE,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;CAmBzD"}
1
+ {"version":3,"file":"async-buffer.d.ts","sourceRoot":"","sources":["../../../../src/processors/observational-memory/observation-strategies/async-buffer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAiB1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,KAAK,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEnH,qBAAa,8BAA+B,SAAQ,mBAAmB;IACrE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,oBAAoB,CAAC,CAA0B;IACvD,sFAAsF;IACtF,OAAO,CAAC,iBAAiB,CAAC,CAAS;gBAEvB,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,kBAAkB;IAMxD,IAAI,SAAS,YAEZ;IACD,IAAI,eAAe,YAElB;IACD,IAAI,gBAAgB,YAEnB;cAEkB,eAAe,IAAI,MAAM;IAItC,OAAO;;;;IAQP,gBAAgB,CAAC,QAAQ,EAAE,MAAM;IAIjC,OAAO,CAAC,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE,YAAY,EAAE,OAAO;;;;;;;;;uBAsCjF,CAAC;wBAAsB,CAAC;uBAC9B,CAAH;;;;IAQO,OAAO,CAAC,MAAM,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA6C7F,OAAO,CAAC,SAAS,EAAE,oBAAoB,GAAG,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC;IAuJnF,cAAc;YAIN,sBAAsB;IA8B9B,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;CAsBzD"}
@@ -1,12 +1,12 @@
1
1
  import type { MastraDBMessage, MessageList } from '@mastra/core/agent';
2
2
  import type { MessageHistory } from '@mastra/core/processors';
3
- import type { MemoryStorage } from '@mastra/core/storage';
3
+ import type { MemoryStorage, ObservationalMemoryRecord } from '@mastra/core/storage';
4
4
  import type { Memory } from '../../../index.js';
5
5
  import type { ObserverRunner } from '../observer-runner.js';
6
6
  import type { ReflectorRunner } from '../reflector-runner.js';
7
7
  import type { TokenCounter } from '../token-counter.js';
8
8
  import type { ObservationDebugEvent, ObservationMarkerConfig, ResolvedObservationConfig, ResolvedReflectionConfig } from '../types.js';
9
- import type { ObservationRunOpts, ObservationRunResult, ObserverOutput, ProcessedObservation } from './types.js';
9
+ import type { ObservationPersistOutcome, ObservationRunOpts, ObservationRunResult, ObserverOutput, ProcessedObservation } from './types.js';
10
10
  /**
11
11
  * Dependencies injected into observation strategies.
12
12
  * Built by the factory in index.ts from the ObservationalMemory instance.
@@ -34,6 +34,11 @@ export interface StrategyDeps {
34
34
  recordId?: string;
35
35
  }) => Promise<void>;
36
36
  emitDebugEvent: (event: ObservationDebugEvent) => void;
37
+ /** Applies `observation.previousObserverTokens` to the previous observations the Observer sees. */
38
+ prepareObserverContext: (existingObservations: string | undefined, record?: ObservationalMemoryRecord | null) => {
39
+ context: string | undefined;
40
+ wasTruncated: boolean;
41
+ };
37
42
  }
38
43
  /**
39
44
  * Abstract base class for observation strategies.
@@ -87,7 +92,73 @@ export declare abstract class ObservationStrategy {
87
92
  */
88
93
  protected wrapObservations(rawObservations: string, existingObservations: string, threadId: string, lastObservedAt?: Date, messageRange?: string): Promise<string> | string;
89
94
  protected replaceOrAppendThreadSection(existingObservations: string, _threadId: string, newThreadSection: string, lastObservedAt?: Date): string;
95
+ /**
96
+ * Commit composed observations to the current head generation.
97
+ *
98
+ * The write is conditional on the head text the observations were composed from. When the
99
+ * target generation was retired by a reflection, or another writer changed the text, the
100
+ * observations are recomposed against the fresh head and the commit is retried (bounded).
101
+ * When the fresh head's `observedMessageIds` already include every message this cycle observed
102
+ * (another instance observed them first), nothing is written and `alreadyCovered` is set, so
103
+ * callers advance cursors and markers without adding a second copy of the same observations.
104
+ * The cursor alone is not proof: an activation can move it past a message it never covered.
105
+ * Returns null when no commit landed — callers must then leave cursors, markers, and the live
106
+ * context untouched.
107
+ */
108
+ protected commitActiveObservationsToHead(opts: {
109
+ processed: ProcessedObservation;
110
+ composedFrom: string;
111
+ target: ObservationalMemoryRecord;
112
+ recompose: (head: ObservationalMemoryRecord) => Promise<ProcessedObservation>;
113
+ /** Ids of the messages this cycle observed. */
114
+ cycleMessageIds: string[];
115
+ }): Promise<{
116
+ processed: ProcessedObservation;
117
+ record: ObservationalMemoryRecord;
118
+ alreadyCovered?: boolean;
119
+ } | null>;
120
+ private headCoversCycle;
121
+ /** Runs one storage commit in this thread's (or resource's) slot of the process-wide commit queue. */
122
+ protected runCommit<T>(op: () => Promise<T>): Promise<T>;
90
123
  protected indexObservationGroups(observations: string, threadId: string, resourceId: string | undefined, observedAt: Date | undefined, recordId: string): Promise<void>;
124
+ /**
125
+ * Messages this cycle observed for `threadId`, or undefined when the strategy does not
126
+ * place observation lifecycle markers.
127
+ */
128
+ protected getObservedMessagesForThread(_threadId: string): MastraDBMessage[] | undefined;
129
+ /**
130
+ * Persist an observation start/end/failed marker without hiding unobserved content. A completed
131
+ * end marker tells `getUnobservedMessages` that everything before it in that message is observed
132
+ * (whatever thread the marker names), so it must only follow content this cycle observed.
133
+ * Placement, in order:
134
+ * 1. the live MessageList's newest assistant message (this turn's response or its seed), when the
135
+ * list belongs to the marker's thread and the cycle observed that message or it has no
136
+ * unobserved content;
137
+ * 2. the newest observed assistant message; a stored copy (no live list, or another instance's
138
+ * message) gets the marker right after the parts this cycle observed (end/failed markers right
139
+ * after this cycle's start marker), so parts added while the Observer ran stay unobserved;
140
+ * 3. the newest stored assistant message that is not newer than the observed range, only when it
141
+ * has nothing unobserved (or already carries this cycle's start marker); otherwise no marker,
142
+ * and the thread cursor alone records the cycle.
143
+ * Lifecycle markers never go on user messages.
144
+ */
145
+ protected persistMarkerToObservedMessage(marker: {
146
+ type: string;
147
+ data: unknown;
148
+ }, observed: MastraDBMessage[], threadId: string, resourceId?: string): Promise<void>;
149
+ /** What the cycle observed of each message, captured when it placed its first marker there. */
150
+ private readonly observedParts;
151
+ /**
152
+ * Index in `stored` right after the parts the cycle observed in `observed` (and any OM markers
153
+ * directly after them). Parts are only ever appended, so the observed message's non-marker part
154
+ * count locates them, counted from the start of the message or, when `observed` is the trimmed
155
+ * copy `getUnobservedMessages` returns for an already marked message, from just after the stored
156
+ * copy's last completed boundary. Captured at the cycle's first marker, before the Observer runs,
157
+ * because `observed` may be a live reference that grows meanwhile. Falls back to the end when the
158
+ * stored copy has fewer parts than were observed.
159
+ */
160
+ private insertionAfterObserved;
161
+ private attachMarker;
91
162
  /**
92
163
  * Persist a marker to the last assistant message in storage.
93
164
  * Fetches messages directly from the DB so it works even when
@@ -96,7 +167,17 @@ export declare abstract class ObservationStrategy {
96
167
  protected persistMarkerToStorage(marker: {
97
168
  type: string;
98
169
  data: unknown;
99
- }, threadId: string, resourceId?: string): Promise<void>;
170
+ }, threadId: string, resourceId?: string, opts?: {
171
+ notAfter?: Date;
172
+ /** Only mark a message whose content is all observed, or that carries this cycle's start marker. */
173
+ onlyIfObserved?: boolean;
174
+ /**
175
+ * Only mark the message that carries this cycle's start marker. Any newer assistant message
176
+ * may still be streaming: the agent re-saves it whole from its own copy, which would drop the
177
+ * marker, and writing back the copy read here could drop content the agent saved meanwhile.
178
+ */
179
+ onCycleStartMessage?: boolean;
180
+ }): Promise<void>;
100
181
  /**
101
182
  * Persist a marker part on the last assistant message in a MessageList
102
183
  * AND save the updated message to the DB.
@@ -112,14 +193,20 @@ export declare abstract class ObservationStrategy {
112
193
  abstract get needsLock(): boolean;
113
194
  abstract get needsReflection(): boolean;
114
195
  abstract get rethrowOnFailure(): boolean;
196
+ /** `contextRecord`: the record `existingObservations` was read from, when fresher than `opts.record`. */
115
197
  abstract prepare(): Promise<{
116
198
  messages: MastraDBMessage[];
117
199
  existingObservations: string;
200
+ contextRecord?: ObservationalMemoryRecord | null;
118
201
  }>;
119
- abstract observe(existingObservations: string, messages: MastraDBMessage[]): Promise<ObserverOutput>;
202
+ /** `observerContext` is the previous observations after the `previousObserverTokens` budget. */
203
+ abstract observe(observerContext: string, messages: MastraDBMessage[], wasTruncated: boolean): Promise<ObserverOutput>;
120
204
  abstract process(output: ObserverOutput, existingObservations: string): Promise<ProcessedObservation>;
121
- /** Commit the processed observations. Resolves `false` when the cycle intentionally skips the commit. */
122
- abstract persist(processed: ProcessedObservation): Promise<boolean>;
205
+ /**
206
+ * Commit the processed observations. Resolves `undefined` when there was nothing to commit, and
207
+ * `not-committed` when the commit was rejected; only `committed` settles `observationCommitted` true.
208
+ */
209
+ abstract persist(processed: ProcessedObservation): Promise<ObservationPersistOutcome | void>;
123
210
  abstract emitStartMarkers(cycleId: string): Promise<void>;
124
211
  abstract emitEndMarkers(cycleId: string, processed: ProcessedObservation): Promise<void>;
125
212
  abstract emitFailedMarkers(cycleId: string, error: unknown): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/processors/observational-memory/observation-strategies/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAKvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAI3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM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