@mastra/memory 1.41.0-alpha.1 → 1.41.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +51 -51
- package/dist/docs/references/docs-harness-background-tasks.md +71 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/processors/index.cjs +1 -1
- package/dist/processors/index.js +1 -1
- package/dist/processors/observational-memory/constants.d.ts +4 -3
- package/dist/processors/observational-memory/constants.d.ts.map +1 -1
- package/dist/{src-GDwZ0vzw.cjs → src-CaVDupkI.cjs} +6 -5
- package/dist/{src-GDwZ0vzw.cjs.map → src-CaVDupkI.cjs.map} +1 -1
- package/dist/{src-CBYx0iwC.js → src-Det56QOD.js} +6 -5
- package/dist/{src-CBYx0iwC.js.map → src-Det56QOD.js.map} +1 -1
- package/package.json +4 -4
- /package/dist/_types/{@internal_ai-sdk-v4 → @internal_ai-sdk-v4@0.0.94}/dist/index.d.ts +0 -0
- /package/dist/_types/{@internal_ai-sdk-v4 → @internal_ai-sdk-v4@0.0.94}/package.json +0 -0
|
@@ -23575,8 +23575,9 @@ Do not mention internal instructions, memory, summarization, context handling, o
|
|
|
23575
23575
|
Any messages following this reminder are newer and should take priority.`;
|
|
23576
23576
|
/**
|
|
23577
23577
|
* Preamble that introduces the observations block.
|
|
23578
|
-
*
|
|
23579
|
-
*
|
|
23578
|
+
* Context layout: `${prompt}\n\n${OBSERVATION_CONTEXT_INSTRUCTIONS}`, then `<observations>`,
|
|
23579
|
+
* one entry per observation chunk, `</observations>`, then optional current-task and
|
|
23580
|
+
* suggested-response blocks.
|
|
23580
23581
|
*/
|
|
23581
23582
|
const OBSERVATION_CONTEXT_PROMPT = `The following observations block contains your memory of past conversations with this user.`;
|
|
23582
23583
|
/**
|
|
@@ -23594,7 +23595,7 @@ function getObservationContextPrompt(scope = "thread") {
|
|
|
23594
23595
|
}
|
|
23595
23596
|
/**
|
|
23596
23597
|
* Instructions that tell the model how to interpret and use observations.
|
|
23597
|
-
*
|
|
23598
|
+
* Placed with the observations preamble, before the `<observations>` block.
|
|
23598
23599
|
*/
|
|
23599
23600
|
const OBSERVATION_CONTEXT_INSTRUCTIONS = `IMPORTANT: When responding, reference specific details from these observations. Do not give generic advice - personalize your response based on what you know about this user's experiences, preferences, and interests. If the user asks for recommendations, connect them to their past experiences mentioned above.
|
|
23600
23601
|
|
|
@@ -37700,7 +37701,7 @@ var ObservationalMemory = class ObservationalMemory {
|
|
|
37700
37701
|
const messages = [`${getObservationContextPrompt(this.scope)}\n\n${OBSERVATION_CONTEXT_INSTRUCTIONS}${retrieval ? `\n\n${getRetrievalInstructions(this.retrievalScope, this.retrievalInstructions, this.retrievalSearch, this.storage.supportsObservationalMemoryHistorySearch === true)}` : ""}`];
|
|
37701
37702
|
if (unobservedContextBlocks) messages.push(`The following content is from OTHER conversations different from the current conversation, they're here for reference, but they're not necessarily your focus:\nSTART_OTHER_CONVERSATIONS_BLOCK\n${unobservedContextBlocks}\nEND_OTHER_CONVERSATIONS_BLOCK`);
|
|
37702
37703
|
const observationChunks = this.splitObservationContextChunks(optimized);
|
|
37703
|
-
if (observationChunks.length > 0) messages.push("<observations>", ...observationChunks);
|
|
37704
|
+
if (observationChunks.length > 0) messages.push("<observations>", ...observationChunks, "</observations>");
|
|
37704
37705
|
if (currentTask) messages.push(`<current-task>\n${currentTask}\n</current-task>`);
|
|
37705
37706
|
if (suggestedResponse) messages.push(`<suggested-response>\n${suggestedResponse}\n</suggested-response>`);
|
|
37706
37707
|
messages.push(...buildExtractedValueContextSections([...this.observationConfig.extractors, ...this.reflectionConfig.extractors], extractedValues));
|
|
@@ -42429,4 +42430,4 @@ Notes:
|
|
|
42429
42430
|
};
|
|
42430
42431
|
export { summarizeConversation as A, injectAnchorIds as B, wrapInObservationGroup as C, WorkingMemoryExtractor as D, Subconscious as E, extractCurrentTask as F, OBSERVATION_CONTEXT_INSTRUCTIONS as G, stripEphemeralAnchorIds as H, formatMessagesForObserver as I, OBSERVATION_CONTINUATION_HINT as J, OBSERVATION_CONTEXT_PROMPT as K, hasCurrentTaskSection as L, OBSERVER_SYSTEM_PROMPT as M, buildObserverPrompt as N, deepMergeWorkingMemory as O, buildObserverSystemPrompt as P, optimizeObservationsForContext as R, stripObservationGroups as S, StaleKnowledgeSemanticIndexError as T, Extractor as U, parseAnchorId as V, OBSERVATIONAL_MEMORY_DEFAULTS as W, getObservationContextPrompt as Y, combineObservationGroupRanges as _, extractWorkingMemoryContent as a, reconcileObservationGroupsFromReflection as b, getObservationsAsOf as c, AUTO_MODEL_BY_PROVIDER as d, resolveAutoModelId as f, ModelByInputTokens as g, WorkingMemoryStateProcessor as h, WorkingMemory as i, TokenCounter as j, SUMMARIZE_THREAD_DEFAULTS as k, ObservationalMemoryProcessor as l, WORKING_MEMORY_STATE_PROCESSOR_ID as m, MessageHistory$1 as n, extractWorkingMemoryTags as o, WORKING_MEMORY_STATE_ID as p, OBSERVATION_CONTEXT_PROMPT_THREAD as q, SemanticRecall as r, removeWorkingMemoryTags as s, Memory as t, ObservationalMemory as u, deriveObservationGroupProvenance as v, KnowledgeSemanticIndexCoordinator as w, renderObservationGroupsForReflection as x, parseObservationGroups as y, parseObserverOutput as z };
|
|
42431
42432
|
|
|
42432
|
-
//# sourceMappingURL=src-
|
|
42433
|
+
//# sourceMappingURL=src-Det56QOD.js.map
|