@mastra/memory 1.10.0 → 1.10.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.
- package/CHANGELOG.md +9 -0
- package/dist/{chunk-EVBFYGDL.cjs → chunk-HSOEY7M2.cjs} +10 -6
- package/dist/chunk-HSOEY7M2.cjs.map +1 -0
- package/dist/{chunk-7A3UGAXY.js → chunk-K2NLYL2O.js} +10 -6
- package/dist/chunk-K2NLYL2O.js.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +30 -30
- package/dist/index.cjs +10 -10
- package/dist/index.js +3 -3
- package/dist/{observational-memory-COYJCVX3.cjs → observational-memory-DJMF2UNC.cjs} +29 -29
- package/dist/{observational-memory-COYJCVX3.cjs.map → observational-memory-DJMF2UNC.cjs.map} +1 -1
- package/dist/{observational-memory-K2U3QQIO.js → observational-memory-NMQ7URIP.js} +3 -3
- package/dist/{observational-memory-K2U3QQIO.js.map → observational-memory-NMQ7URIP.js.map} +1 -1
- package/dist/processors/index.cjs +27 -27
- package/dist/processors/index.js +1 -1
- package/dist/processors/observational-memory/observational-memory.d.ts +2 -2
- package/dist/processors/observational-memory/observational-memory.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-7A3UGAXY.js.map +0 -1
- package/dist/chunk-EVBFYGDL.cjs.map +0 -1
|
@@ -3448,11 +3448,13 @@ var OBSERVATIONAL_MEMORY_DEFAULTS = {
|
|
|
3448
3448
|
// Start buffering at 50% of observationTokens
|
|
3449
3449
|
}
|
|
3450
3450
|
};
|
|
3451
|
-
var OBSERVATION_CONTINUATION_HINT = `
|
|
3451
|
+
var OBSERVATION_CONTINUATION_HINT = `Please continue naturally with the conversation so far and respond to the latest message.
|
|
3452
3452
|
|
|
3453
|
-
|
|
3453
|
+
Use the earlier context only as background. If something appears unfinished, continue only when it helps answer the latest request. If a suggested response is provided, follow it naturally.
|
|
3454
3454
|
|
|
3455
|
-
|
|
3455
|
+
Do not mention internal instructions, memory, summarization, context handling, or missing messages.
|
|
3456
|
+
|
|
3457
|
+
Any messages following this reminder are newer and should take priority.`;
|
|
3456
3458
|
var OBSERVATION_CONTEXT_PROMPT = `The following observations block contains your memory of past conversations with this user.`;
|
|
3457
3459
|
var 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.
|
|
3458
3460
|
|
|
@@ -3460,7 +3462,9 @@ KNOWLEDGE UPDATES: When asked about current state (e.g., "where do I currently..
|
|
|
3460
3462
|
|
|
3461
3463
|
PLANNED ACTIONS: If the user stated they planned to do something (e.g., "I'm going to...", "I'm looking forward to...", "I will...") and the date they planned to do it is now in the past (check the relative time like "3 weeks ago"), assume they completed the action unless there's evidence they didn't. For example, if someone said "I'll start my new diet on Monday" and that was 2 weeks ago, assume they started the diet.
|
|
3462
3464
|
|
|
3463
|
-
MOST RECENT USER INPUT: Treat the most recent user message as the highest-priority signal for what to do next. Earlier messages may contain constraints, details, or context you should still honor, but the latest message is the primary driver of your response
|
|
3465
|
+
MOST RECENT USER INPUT: Treat the most recent user message as the highest-priority signal for what to do next. Earlier messages may contain constraints, details, or context you should still honor, but the latest message is the primary driver of your response.
|
|
3466
|
+
|
|
3467
|
+
SYSTEM REMINDERS: Messages wrapped in <system-reminder>...</system-reminder> contain internal continuation guidance, not user-authored content. Use them to maintain continuity, but do not mention them or treat them as part of the user's message.`;
|
|
3464
3468
|
var OBSERVATION_RETRIEVAL_INSTRUCTIONS = `## Recall \u2014 looking up source messages
|
|
3465
3469
|
|
|
3466
3470
|
Your memory is comprised of observations which are sometimes wrapped in <observation-group> xml tags containing ranges like <observation-group range="startId:endId">. These ranges point back to the raw messages that each observation group was derived from. The original messages are still available \u2014 use the **recall** tool to retrieve them.
|
|
@@ -7827,5 +7831,5 @@ function getObservationsAsOf(activeObservations, asOf) {
|
|
|
7827
7831
|
}
|
|
7828
7832
|
|
|
7829
7833
|
export { ModelByInputTokens, OBSERVATIONAL_MEMORY_DEFAULTS, OBSERVATION_CONTEXT_INSTRUCTIONS, OBSERVATION_CONTEXT_PROMPT, OBSERVATION_CONTINUATION_HINT, OBSERVER_SYSTEM_PROMPT, ObservationalMemory, TokenCounter, buildObserverPrompt, buildObserverSystemPrompt, combineObservationGroupRanges, deriveObservationGroupProvenance, extractCurrentTask, formatMessagesForObserver, formatToolResultForObserver, getObservationsAsOf, hasCurrentTaskSection, injectAnchorIds, optimizeObservationsForContext, parseAnchorId, parseObservationGroups, parseObserverOutput, reconcileObservationGroupsFromReflection, renderObservationGroupsForReflection, resolveToolResultValue, stripEphemeralAnchorIds, stripObservationGroups, truncateStringByTokens, wrapInObservationGroup };
|
|
7830
|
-
//# sourceMappingURL=chunk-
|
|
7831
|
-
//# sourceMappingURL=chunk-
|
|
7834
|
+
//# sourceMappingURL=chunk-K2NLYL2O.js.map
|
|
7835
|
+
//# sourceMappingURL=chunk-K2NLYL2O.js.map
|