@mastra/memory 1.32.0-alpha.1 → 1.32.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.
@@ -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.32.0-alpha.1"
6
+ version: "1.32.1-alpha.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -65,7 +65,7 @@ Read the individual reference documents for detailed explanations and code examp
65
65
  - [Reference: Memory.updateThreadResourceId()](references/reference-memory-updateThreadResourceId.md) - The .updateThreadResourceId() method transfers ownership of a thread to a different resource by reassigning its resourceId.
66
66
  - [Migration: AgentNetwork to .network()](references/reference-migrations-agentnetwork.md) - Migrate deprecated AgentNetwork usage to supervisor agents and the standard Agent.generate() or Agent.stream() APIs in current Mastra releases.
67
67
  - [Memory](references/reference-migrations-upgrade-to-v1-memory.md) - Memory configuration now requires explicit parameters, and default settings have been updated for better performance and predictability.
68
- - [Reference: TokenLimiterProcessor](references/reference-processors-token-limiter-processor.md) - Use TokenLimiterProcessor to constrain message tokens during input, per-step input, or output processing with configurable limits and strategies.
68
+ - [Reference: TokenLimiterProcessor](references/reference-processors-token-limiter-processor.md) - Use TokenLimiterProcessor to constrain message tokens during prompt, input, or output processing with configurable limits and strategies.
69
69
  - [Reference: libSQL vector store](references/reference-vectors-libsql.md) - Configure LibSQLVector for similarity search and metadata filtering with local libSQL, SQLite-compatible vector extensions, or Turso databases.
70
70
  - [Reference: MongoDB vector store](references/reference-vectors-mongodb.md) - The MongoDBVector class provides vector search using MongoDB Vector Search. It enables efficient similarity search and metadata filtering within your MongoDB collections.
71
71
  - [Reference: OracleDB vector store](references/reference-vectors-oracledb.md) - OracleVector stores embeddings in Oracle Database VECTOR columns and exposes them through Mastra's vector interface.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.32.0-alpha.1",
2
+ "version": "1.32.1-alpha.0",
3
3
  "package": "@mastra/memory",
4
4
  "exports": {},
5
5
  "modules": {
@@ -186,6 +186,7 @@ const memory = new Memory({
186
186
  - Schema-less extractors are inline string extractors emitted directly in the Observer or Reflector output.
187
187
  - Dynamic extractor functions receive runtime context, including `source`, `threadId`, `resourceId`, `mainAgent`, `memory`, and `requestContext` when available.
188
188
  - `WorkingMemoryExtractor` uses the normal extractor pipeline to update working memory through the active `Memory` instance. It uses structured extraction when working memory has a JSON schema and skips OM metadata persistence, so the working memory payload isn't duplicated under OM extracted metadata.
189
+ - When `workingMemory.schema` is set, `WorkingMemoryExtractor` validates each update against that schema before saving it. If an update doesn't match, it's skipped and reported as an extraction failure while the previous working memory stays in place. Because the schema isn't sent to the model as a structured output constraint, one invalid working memory update can't fail other extractors. A `null` in an optional field is treated as not provided.
189
190
  - `observationalMemory.observation.manageWorkingMemory` adds `WorkingMemoryExtractor` and defaults `workingMemory.agentManaged` to `false`. It defaults `workingMemory.useStateSignals` to `true` when working memory is enabled.
190
191
  - Extraction failures are reported in OM marker data and don't discard other successful extracted values.
191
192
 
@@ -4,10 +4,10 @@
4
4
 
5
5
  # TokenLimiterProcessor
6
6
 
7
- The `TokenLimiterProcessor` limits the number of tokens in messages. It can be used as an input, per-step input, and output processor:
7
+ The `TokenLimiterProcessor` limits the number of tokens in messages. Depending on `trimMode`, it acts as a prompt processor, an input processor, and an output processor:
8
8
 
9
- - **Input processor** (`processInput`): Filters historical messages to fit within the context window before the agentic loop starts, prioritizing recent messages
10
- - **Per-step input processor** (`processInputStep`): Prunes messages at each step of a multi-step agent workflow, preventing unbounded token growth when tools trigger additional LLM calls
9
+ - **Prompt processor** (`processLLMRequest`): In the default `best-fit` and `contiguous` trim modes, enforces the input budget on the provider prompt right before each model call, at every step of the agentic loop. The prompt is measured after earlier prompt processors (such as `ToolCallFilter`) have transformed it, so only tokens that actually reach the model are counted. Tool call and tool result messages are grouped so they're kept or removed together, and trimming is transient: stored messages are never modified.
10
+ - **Input processor** (`processInput`): In `memory-only` trim mode, filters historical messages to fit within the context window before the agentic loop starts, prioritizing recent messages
11
11
  - **Output processor**: Limits generated response tokens via streaming or non-streaming with configurable strategies for handling exceeded limits
12
12
 
13
13
  ## Usage example
@@ -34,7 +34,7 @@ const processor = new TokenLimiterProcessor({
34
34
 
35
35
  **options.countMode** (`'cumulative' | 'part'`): Whether to count tokens from the beginning of the stream or just the current part: 'cumulative' counts all tokens from start, 'part' only counts tokens in current part
36
36
 
37
- **options.trimMode** (`'best-fit' | 'contiguous'`): Controls how messages are trimmed when exceeding the token limit: 'best-fit' keeps as many messages as possible (may create gaps), 'contiguous' stops at the first message that does not fit, ensuring a continuous suffix of conversation history
37
+ **options.trimMode** (`'best-fit' | 'contiguous' | 'memory-only'`): Controls how the token limit is enforced: 'best-fit' trims the provider prompt while keeping as many messages as possible (may create gaps), 'contiguous' trims the provider prompt but stops at the first message that does not fit (keeping a continuous suffix of conversation history), and 'memory-only' trims stored history in processInput instead of the prompt
38
38
 
39
39
  ## Returns
40
40
 
@@ -42,9 +42,11 @@ const processor = new TokenLimiterProcessor({
42
42
 
43
43
  **name** (`string`): Optional processor display name
44
44
 
45
- **processInput** (`(args: { messages: MastraDBMessage[]; abort: (reason?: string) => never }) => Promise<MastraDBMessage[]>`): Filters input messages to fit within token limit before the agentic loop starts, prioritizing recent messages while preserving system messages
45
+ **processInput** (`(args: { messages: MastraDBMessage[]; abort: (reason?: string) => never }) => Promise<MastraDBMessage[]>`): Trims stored history to fit within the token limit before the agentic loop starts in 'memory-only' trim mode, prioritizing recent messages while preserving system messages and the current turn
46
46
 
47
- **processInputStep** (`(args: ProcessInputStepArgs) => Promise<void>`): Prunes messages at each step of the agentic loop (including tool call continuations) to keep the conversation within the token limit. Mutates the messageList directly by removing oldest messages first while preserving system messages.
47
+ **processInputStep** (`(args: ProcessInputStepArgs) => Promise<void>`): In 'memory-only' trim mode, applies stored-history trimming at each step. In the 'best-fit' and 'contiguous' trim modes, it leaves trimming to processLLMRequest when the agent runs that method for this processor. Otherwise it trims stored history, for example in generateLegacy() and streamLegacy() or when the limiter is inside a processor workflow.
48
+
49
+ **processLLMRequest** (`(args: ProcessLLMRequestArgs) => Promise<ProcessLLMRequestResult>`): Enforces the input budget on the provider prompt in the 'best-fit' and 'contiguous' trim modes. Runs after earlier prompt processors have transformed the prompt, counts that exact prompt, and returns a trimmed copy for the model call only. System messages are always preserved, and tool call and tool result messages are grouped so they are kept or removed together.
48
50
 
49
51
  **processOutputStream** (`(args: ProcessOutputStreamArgs) => Promise<ChunkType | null>`): Processes streaming output parts to limit token count during streaming. Only text and object parts count against the limit and can be withheld; lifecycle, reasoning and tool parts always pass through.
50
52
 
@@ -72,10 +74,11 @@ Images and file attachments are estimated instead of tokenized, including `file`
72
74
 
73
75
  ## Error behavior
74
76
 
75
- When used as an input processor (both `processInput` and `processInputStep`), `TokenLimiterProcessor` throws a `TripWire` error in the following cases:
77
+ When trimming input, `TokenLimiterProcessor` throws a `TripWire` error in the following cases:
76
78
 
77
- - **Empty messages**: If there are no messages to process, a TripWire is thrown because you can't send an LLM request with no messages.
79
+ - **Empty messages**: If there are no non-system messages to process, a TripWire is thrown because you can't send an LLM request with no messages.
78
80
  - **System messages exceed limit**: If system messages alone exceed the token limit, a TripWire is thrown because you can't send an LLM request with only system messages and no user/assistant messages.
81
+ - **No messages fit**: If no message fits within the remaining token budget, a TripWire is thrown because you can't send an LLM request with no messages.
79
82
 
80
83
  ```typescript
81
84
  import { TripWire } from '@mastra/core/agent'
@@ -112,9 +115,9 @@ export const agent = new Agent({
112
115
  })
113
116
  ```
114
117
 
115
- ### As a per-step input processor (limit multi-step token growth)
118
+ ### As a per-step processor (limit multi-step token growth)
116
119
 
117
- When an agent uses tools across multiple steps (e.g. `maxSteps > 1`), each step accumulates conversation history from all previous steps. Use `inputProcessors` to also limit tokens at each step of the agentic loop. The `TokenLimiterProcessor` automatically applies to both the initial input and every subsequent step:
120
+ When an agent uses tools across multiple steps (e.g. `maxSteps > 1`), each step accumulates conversation history from all previous steps. `TokenLimiterProcessor` applies its limit at every step, measuring the prompt that's about to be sent after any earlier prompt processors have run. Register prompt-shrinking processors such as `ToolCallFilter` before it, so the limiter counts the prompt the model actually receives:
118
121
 
119
122
  ```typescript
120
123
  import { Agent } from '@mastra/core/agent'
@@ -136,6 +139,8 @@ const result = await agent.generate('Research this topic using your tools', {
136
139
  })
137
140
  ```
138
141
 
142
+ Processor workflows don't run `processLLMRequest`, so a `TokenLimiterProcessor` inside a processor workflow trims stored messages in `processInputStep`, before prompt processors such as `ToolCallFilter` remove anything from the request. To count the prompt the model receives, add the limiter directly to `inputProcessors`.
143
+
139
144
  ### As an output processor (limit response length)
140
145
 
141
146
  Use `outputProcessors` to limit the length of generated responses:
@@ -87,7 +87,9 @@ Creates a new vector index (collection) in MongoDB.
87
87
 
88
88
  **indexName** (`string`): Name of the collection to create
89
89
 
90
- **dimension** (`number`): Vector dimension (must match your embedding model)
90
+ **dimension** (`number`): Vector dimension (must match your embedding model). Required unless autoEmbed is set, where the embedding model determines the dimension. Passing both is an error.
91
+
92
+ **autoEmbed** (`MongoDBAutoEmbedConfig`): Generate the embeddings in MongoDB instead of supplying vectors. See Automated Embedding for the supported fields.
91
93
 
92
94
  **metric** (`'cosine' | 'euclidean' | 'dotproduct'`): Distance metric for similarity search (Default: `cosine`)
93
95
 
@@ -115,13 +117,13 @@ Adds or updates vectors and their metadata in the collection. On a bring-your-ow
115
117
 
116
118
  **indexName** (`string`): Name of the collection to insert into
117
119
 
118
- **vectors** (`number[][]`): Array of embedding vectors
120
+ **vectors** (`number[][]`): Array of embedding vectors. Required unless the index was created with autoEmbed, where MongoDB generates them from documents and supplying vectors is an error.
119
121
 
120
122
  **metadata** (`Record<string, any>[]`): Metadata for each vector
121
123
 
122
124
  **ids** (`string[]`): Optional vector IDs (auto-generated if not provided)
123
125
 
124
- **documents** (`string[]`): Optional document text content to store alongside vectors
126
+ **documents** (`string[]`): Document text content to store alongside vectors. On an autoEmbed index this is the text MongoDB embeds, and it is required.
125
127
 
126
128
  ### `query()`
127
129
 
@@ -129,7 +131,11 @@ Searches for similar vectors with optional metadata filtering.
129
131
 
130
132
  **indexName** (`string`): Name of the collection to search in
131
133
 
132
- **queryVector** (`number[]`): Query vector to find similar vectors for
134
+ **queryVector** (`number[]`): Query vector to find similar vectors for. Supply this or queryText, not both.
135
+
136
+ **queryText** (`string`): Text for MongoDB to embed at query time. autoEmbed indexes only, and mutually exclusive with queryVector. For full-text matching use textQuery() instead.
137
+
138
+ **model** (`string`): Embedding model for this query, overriding the index's. Requires queryText, and must be compatible with the index's model.
133
139
 
134
140
  **topK** (`number`): Number of results to return (Default: `10`)
135
141
 
@@ -226,7 +232,11 @@ Runs a hybrid search that fuses vector similarity with full-text results through
226
232
 
227
233
  **indexName** (`string`): Name of the Mastra index to search
228
234
 
229
- **queryVector** (`number[]`): Query vector for similarity search
235
+ **queryVector** (`number[]`): Query vector for the vector branch. Supply this or queryText, not both.
236
+
237
+ **queryText** (`string`): Text for MongoDB to embed for the vector branch. autoEmbed indexes only. Independent of query, so each branch can search for something different.
238
+
239
+ **model** (`string`): Embedding model for the vector branch, overriding the index's. Requires queryText.
230
240
 
231
241
  **query** (`string`): Full-text search query string
232
242
 
@@ -273,6 +283,8 @@ interface IndexStats {
273
283
  }
274
284
  ```
275
285
 
286
+ On an `autoEmbed` index, `dimension` is read from the index definition and reports MongoDB's default of `1024` when the index doesn't pin one. `count` counts documents that carry the embedded text field, since the generated vectors aren't stored on your documents.
287
+
276
288
  ### `deleteIndex()`
277
289
 
278
290
  Deletes a vector index. Behavior depends on how the index was created:
@@ -367,6 +379,79 @@ try {
367
379
  }
368
380
  ```
369
381
 
382
+ ## Automated Embedding
383
+
384
+ MongoDB can generate the embeddings for you. Create the index with `autoEmbed` and a Voyage AI model, write plain text through `documents`, and search with `queryText`. No embedding provider runs in your application, and no vectors travel through it.
385
+
386
+ ```typescript
387
+ import { MongoDBVector } from '@mastra/mongodb'
388
+
389
+ const store = new MongoDBVector({
390
+ id: 'mongodb-vector',
391
+ uri: process.env.MONGODB_URI,
392
+ dbName: process.env.MONGODB_DB_NAME,
393
+ })
394
+
395
+ // No `dimension`: the embedding model determines it.
396
+ await store.createIndex({
397
+ indexName: 'movies',
398
+ autoEmbed: { model: 'voyage-4' },
399
+ filterFields: ['year'],
400
+ })
401
+
402
+ // Automated Embedding indexes build slower than client-embedded ones.
403
+ await store.waitForIndexReady({ indexName: 'movies', timeoutMs: 300000 })
404
+
405
+ // No `vectors`: MongoDB embeds the text as documents are written.
406
+ await store.upsert({
407
+ indexName: 'movies',
408
+ documents: [
409
+ 'A lonely astronaut adrift near a strange ocean planet.',
410
+ 'A heist crew robs a bank vault in Paris.',
411
+ ],
412
+ metadata: [{ year: 1972 }, { year: 2001 }],
413
+ })
414
+
415
+ // No `queryVector`: MongoDB embeds the query string with the same model.
416
+ const results = await store.query({
417
+ indexName: 'movies',
418
+ queryText: 'space opera about isolation',
419
+ topK: 5,
420
+ filter: { year: { $gt: 1970 } },
421
+ })
422
+ ```
423
+
424
+ ### `autoEmbed` options
425
+
426
+ **model** (`string`): Voyage AI model to embed with, for example voyage-4. MongoDB rejects a name it does not support and lists the ones it does.
427
+
428
+ **path** (`string`): Text field to embed. Defaults to the managed document field that upsert({ documents }) writes. Point it at a field of your own to index an existing collection in place. (Default: `document`)
429
+
430
+ **similarity** (`'cosine' | 'dotProduct' | 'euclidean'`): Vector similarity function. Defaults to MongoDB's own default when omitted.
431
+
432
+ **numDimensions** (`256 | 512 | 1024 | 2048`): Length of the generated embeddings. (Default: `1024`)
433
+
434
+ **quantization** (`'float' | 'scalar' | 'binary' | 'binaryNoRescore'`): Storage format for the generated vectors. (Default: `scalar`)
435
+
436
+ **indexingMethod** (`'hnsw' | 'flat'`): Index structure for the vector field. (Default: `hnsw`)
437
+
438
+ **hnswOptions** (`{ maxEdges?: number; numEdgeCandidates?: number }`): Tuning for the HNSW graph. MongoDB's defaults suit most workloads.
439
+
440
+ Any other field the `autoEmbed` index definition accepts is forwarded to MongoDB as given, so options added after this release work without a package update. Anything omitted keeps MongoDB's default.
441
+
442
+ **Important notes:**
443
+
444
+ - Automated Embedding is a **MongoDB Preview feature**. It requires an Atlas cluster with Automated Embedding available, or the `mongodb/mongodb-atlas-local:preview` image for local development. Self-managed deployments need `mongot` configured with a Voyage AI API key.
445
+ - The Voyage AI API key must be provisioned through the Atlas UI. A key issued directly by Voyage AI is rejected by the default embedding endpoint.
446
+ - **MongoDB stores the generated vectors outside your collection**, so documents carry text only. `includeVector: true` isn't supported on an `autoEmbed` index and throws.
447
+ - Embeddings are generated asynchronously. A query can legitimately return no results for a short time after a write, even once the index reports ready.
448
+ - An index declares either a vector field or an `autoEmbed` field, never both. Omit `autoEmbed` to keep supplying your own vectors. The client-side path is unchanged.
449
+ - Passing `vectors` to an `autoEmbed` index is an error, since they would be written to a field no index reads.
450
+ - When `document` is the embedded field it's no longer a declared filter field, so `documentFilter` uses the `$match` pre-filter automatically. Metadata filters declared through `filterFields` still push into `$vectorSearch`.
451
+ - `updateVector()` rejects a vector update on an `autoEmbed` index. Upsert the document with new text instead, and MongoDB re-embeds it.
452
+ - `queryVector` still works against an `autoEmbed` index, but the vector must come from a compatible model and match the index `quantization`. MongoDB rejects a mismatch.
453
+ - Embedding generation is billed per token, for both documents and queries.
454
+
370
455
  ## Indexing an existing collection
371
456
 
372
457
  You can create a vector index on an existing operational collection instead of using a managed collection. This is useful when you want to add vector search capabilities to documents that already exist in your MongoDB database.
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("./src-C7u5SaET.cjs");
2
+ const require_src = require("./src-DS-duN3y.cjs");
3
3
  let _mastra_core_processors = require("@mastra/core/processors");
4
4
  exports.Extractor = require_src.Extractor;
5
5
  exports.KnowledgeSemanticIndexCoordinator = require_src.KnowledgeSemanticIndexCoordinator;
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { C as SUMMARIZE_THREAD_DEFAULTS, G as StaleKnowledgeSemanticIndexError, Q as Extractor, S as WorkingMemoryExtractor, U as Subconscious, W as KnowledgeSemanticIndexCoordinator, a as extractWorkingMemoryContent, b as WorkingMemoryStateProcessor, c as getObservationsAsOf, i as WorkingMemory, n as MessageHistory, o as extractWorkingMemoryTags, q as ModelByInputTokens, r as SemanticRecall, s as removeWorkingMemoryTags, t as Memory, v as WORKING_MEMORY_STATE_ID, w as summarizeConversation, x as deepMergeWorkingMemory, y as WORKING_MEMORY_STATE_PROCESSOR_ID } from "./src-B0ISVOJX.js";
1
+ import { C as SUMMARIZE_THREAD_DEFAULTS, G as StaleKnowledgeSemanticIndexError, Q as Extractor, S as deepMergeWorkingMemory, U as Subconscious, W as KnowledgeSemanticIndexCoordinator, a as extractWorkingMemoryContent, b as WorkingMemoryStateProcessor, c as getObservationsAsOf, i as WorkingMemory, n as MessageHistory, o as extractWorkingMemoryTags, q as ModelByInputTokens, r as SemanticRecall, s as removeWorkingMemoryTags, t as Memory, v as WORKING_MEMORY_STATE_ID, w as summarizeConversation, x as WorkingMemoryExtractor, y as WORKING_MEMORY_STATE_PROCESSOR_ID } from "./src-DsewkOlu.js";
2
2
  export { 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, summarizeConversation };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("../src-C7u5SaET.cjs");
2
+ const require_src = require("../src-DS-duN3y.cjs");
3
3
  exports.Extractor = require_src.Extractor;
4
4
  exports.KnowledgeSemanticIndexCoordinator = require_src.KnowledgeSemanticIndexCoordinator;
5
5
  exports.ModelByInputTokens = require_src.ModelByInputTokens;
@@ -1,2 +1,2 @@
1
- import { A as formatMessagesForObserver, B as OBSERVATION_CONTEXT_PROMPT_THREAD, D as buildObserverPrompt, E as OBSERVER_SYSTEM_PROMPT, F as parseAnchorId, G as StaleKnowledgeSemanticIndexError, H as getObservationContextPrompt, I as stripEphemeralAnchorIds, J as SUBCONSCIOUS_ACTIVITY_STATE_ID, K as SubconsciousRemindExtractor, L as OBSERVATIONAL_MEMORY_DEFAULTS, M as optimizeObservationsForContext, N as parseObserverOutput, O as buildObserverSystemPrompt, P as injectAnchorIds, Q as Extractor, R as OBSERVATION_CONTEXT_INSTRUCTIONS, S as WorkingMemoryExtractor, T as TokenCounter, U as Subconscious, V as OBSERVATION_CONTINUATION_HINT, W as KnowledgeSemanticIndexCoordinator, X as publishSubconsciousActivity, Y as buildSubconsciousActivitySnapshot, Z as renderSubconsciousActivity, _ as wrapInObservationGroup, c as getObservationsAsOf, d as combineObservationGroupRanges, f as deriveObservationGroupProvenance, g as stripObservationGroups, h as renderObservationGroupsForReflection, j as hasCurrentTaskSection, k as extractCurrentTask, l as ObservationalMemoryProcessor, m as reconcileObservationGroupsFromReflection, p as parseObservationGroups, q as ModelByInputTokens, u as ObservationalMemory, w as summarizeConversation, z as OBSERVATION_CONTEXT_PROMPT } from "../src-B0ISVOJX.js";
1
+ import { A as formatMessagesForObserver, B as OBSERVATION_CONTEXT_PROMPT_THREAD, D as buildObserverPrompt, E as OBSERVER_SYSTEM_PROMPT, F as parseAnchorId, G as StaleKnowledgeSemanticIndexError, H as getObservationContextPrompt, I as stripEphemeralAnchorIds, J as SUBCONSCIOUS_ACTIVITY_STATE_ID, K as SubconsciousRemindExtractor, L as OBSERVATIONAL_MEMORY_DEFAULTS, M as optimizeObservationsForContext, N as parseObserverOutput, O as buildObserverSystemPrompt, P as injectAnchorIds, Q as Extractor, R as OBSERVATION_CONTEXT_INSTRUCTIONS, T as TokenCounter, U as Subconscious, V as OBSERVATION_CONTINUATION_HINT, W as KnowledgeSemanticIndexCoordinator, X as publishSubconsciousActivity, Y as buildSubconsciousActivitySnapshot, Z as renderSubconsciousActivity, _ as wrapInObservationGroup, c as getObservationsAsOf, d as combineObservationGroupRanges, f as deriveObservationGroupProvenance, g as stripObservationGroups, h as renderObservationGroupsForReflection, j as hasCurrentTaskSection, k as extractCurrentTask, l as ObservationalMemoryProcessor, m as reconcileObservationGroupsFromReflection, p as parseObservationGroups, q as ModelByInputTokens, u as ObservationalMemory, w as summarizeConversation, x as WorkingMemoryExtractor, z as OBSERVATION_CONTEXT_PROMPT } from "../src-DsewkOlu.js";
2
2
  export { 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, stripEphemeralAnchorIds, stripObservationGroups, summarizeConversation, wrapInObservationGroup };
@@ -1 +1 @@
1
- {"version":3,"file":"working-memory-extractor.d.ts","sourceRoot":"","sources":["../../../src/processors/observational-memory/working-memory-extractor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAyDxC,qBAAa,sBAAuB,SAAQ,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;;CAqC7F"}
1
+ {"version":3,"file":"working-memory-extractor.d.ts","sourceRoot":"","sources":["../../../src/processors/observational-memory/working-memory-extractor.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAgFxC,qBAAa,sBAAuB,SAAQ,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;;CAyC7F"}