@mastra/memory 1.13.1 → 1.13.2-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-HNVSYZRA.cjs → chunk-4FMHSWZD.cjs} +23 -19
- package/dist/chunk-4FMHSWZD.cjs.map +1 -0
- package/dist/{chunk-SWCWXIDJ.js → chunk-C7PARRAD.js} +23 -19
- package/dist/chunk-C7PARRAD.js.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +39 -39
- package/dist/index.cjs +12 -12
- package/dist/index.js +4 -4
- package/dist/{observational-memory-4VT6QEB7.cjs → observational-memory-5YDQLKHE.cjs} +26 -26
- package/dist/{observational-memory-4VT6QEB7.cjs.map → observational-memory-5YDQLKHE.cjs.map} +1 -1
- package/dist/{observational-memory-74TRS2R6.js → observational-memory-B7AUSTEY.js} +3 -3
- package/dist/{observational-memory-74TRS2R6.js.map → observational-memory-B7AUSTEY.js.map} +1 -1
- package/dist/processors/index.cjs +24 -24
- package/dist/processors/index.js +1 -1
- package/dist/processors/observational-memory/observation-turn/step.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-HNVSYZRA.cjs.map +0 -1
- package/dist/chunk-SWCWXIDJ.js.map +0 -1
package/dist/docs/SKILL.md
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.13.
|
|
2
|
+
"version": "1.13.2-alpha.0",
|
|
3
3
|
"package": "@mastra/memory",
|
|
4
4
|
"exports": {
|
|
5
5
|
"ModelByInputTokens": {
|
|
6
6
|
"types": "dist/processors/index.d.ts",
|
|
7
|
-
"implementation": "dist/chunk-
|
|
7
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
8
8
|
"line": 666
|
|
9
9
|
},
|
|
10
10
|
"OBSERVER_SYSTEM_PROMPT": {
|
|
11
11
|
"types": "dist/processors/index.d.ts",
|
|
12
|
-
"implementation": "dist/chunk-
|
|
12
|
+
"implementation": "dist/chunk-C7PARRAD.js"
|
|
13
13
|
},
|
|
14
14
|
"ObservationalMemory": {
|
|
15
15
|
"types": "dist/processors/index.d.ts",
|
|
16
|
-
"implementation": "dist/chunk-
|
|
17
|
-
"line":
|
|
16
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
17
|
+
"line": 5803
|
|
18
18
|
},
|
|
19
19
|
"ObservationalMemoryProcessor": {
|
|
20
20
|
"types": "dist/processors/index.d.ts",
|
|
21
|
-
"implementation": "dist/chunk-
|
|
22
|
-
"line":
|
|
21
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
22
|
+
"line": 8364
|
|
23
23
|
},
|
|
24
24
|
"TokenCounter": {
|
|
25
25
|
"types": "dist/processors/index.d.ts",
|
|
26
|
-
"implementation": "dist/chunk-
|
|
27
|
-
"line":
|
|
26
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
27
|
+
"line": 5355
|
|
28
28
|
},
|
|
29
29
|
"buildObserverPrompt": {
|
|
30
30
|
"types": "dist/processors/index.d.ts",
|
|
31
|
-
"implementation": "dist/chunk-
|
|
32
|
-
"line":
|
|
31
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
32
|
+
"line": 3337
|
|
33
33
|
},
|
|
34
34
|
"buildObserverSystemPrompt": {
|
|
35
35
|
"types": "dist/processors/index.d.ts",
|
|
36
|
-
"implementation": "dist/chunk-
|
|
37
|
-
"line":
|
|
36
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
37
|
+
"line": 2811
|
|
38
38
|
},
|
|
39
39
|
"combineObservationGroupRanges": {
|
|
40
40
|
"types": "dist/processors/index.d.ts",
|
|
41
|
-
"implementation": "dist/chunk-
|
|
41
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
42
42
|
"line": 758
|
|
43
43
|
},
|
|
44
44
|
"deriveObservationGroupProvenance": {
|
|
45
45
|
"types": "dist/processors/index.d.ts",
|
|
46
|
-
"implementation": "dist/chunk-
|
|
46
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
47
47
|
"line": 792
|
|
48
48
|
},
|
|
49
49
|
"extractCurrentTask": {
|
|
50
50
|
"types": "dist/processors/index.d.ts",
|
|
51
|
-
"implementation": "dist/chunk-
|
|
52
|
-
"line":
|
|
51
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
52
|
+
"line": 3451
|
|
53
53
|
},
|
|
54
54
|
"formatMessagesForObserver": {
|
|
55
55
|
"types": "dist/processors/index.d.ts",
|
|
56
|
-
"implementation": "dist/chunk-
|
|
57
|
-
"line":
|
|
56
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
57
|
+
"line": 3077
|
|
58
58
|
},
|
|
59
59
|
"getObservationsAsOf": {
|
|
60
60
|
"types": "dist/processors/index.d.ts",
|
|
61
|
-
"implementation": "dist/chunk-
|
|
62
|
-
"line":
|
|
61
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
62
|
+
"line": 8543
|
|
63
63
|
},
|
|
64
64
|
"hasCurrentTaskSection": {
|
|
65
65
|
"types": "dist/processors/index.d.ts",
|
|
66
|
-
"implementation": "dist/chunk-
|
|
67
|
-
"line":
|
|
66
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
67
|
+
"line": 3439
|
|
68
68
|
},
|
|
69
69
|
"injectAnchorIds": {
|
|
70
70
|
"types": "dist/processors/index.d.ts",
|
|
71
|
-
"implementation": "dist/chunk-
|
|
72
|
-
"line":
|
|
71
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
72
|
+
"line": 2368
|
|
73
73
|
},
|
|
74
74
|
"optimizeObservationsForContext": {
|
|
75
75
|
"types": "dist/processors/index.d.ts",
|
|
76
|
-
"implementation": "dist/chunk-
|
|
77
|
-
"line":
|
|
76
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
77
|
+
"line": 3462
|
|
78
78
|
},
|
|
79
79
|
"parseAnchorId": {
|
|
80
80
|
"types": "dist/processors/index.d.ts",
|
|
81
|
-
"implementation": "dist/chunk-
|
|
82
|
-
"line":
|
|
81
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
82
|
+
"line": 2341
|
|
83
83
|
},
|
|
84
84
|
"parseObservationGroups": {
|
|
85
85
|
"types": "dist/processors/index.d.ts",
|
|
86
|
-
"implementation": "dist/chunk-
|
|
86
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
87
87
|
"line": 727
|
|
88
88
|
},
|
|
89
89
|
"parseObserverOutput": {
|
|
90
90
|
"types": "dist/processors/index.d.ts",
|
|
91
|
-
"implementation": "dist/chunk-
|
|
92
|
-
"line":
|
|
91
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
92
|
+
"line": 3347
|
|
93
93
|
},
|
|
94
94
|
"reconcileObservationGroupsFromReflection": {
|
|
95
95
|
"types": "dist/processors/index.d.ts",
|
|
96
|
-
"implementation": "dist/chunk-
|
|
96
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
97
97
|
"line": 816
|
|
98
98
|
},
|
|
99
99
|
"renderObservationGroupsForReflection": {
|
|
100
100
|
"types": "dist/processors/index.d.ts",
|
|
101
|
-
"implementation": "dist/chunk-
|
|
101
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
102
102
|
"line": 772
|
|
103
103
|
},
|
|
104
104
|
"stripEphemeralAnchorIds": {
|
|
105
105
|
"types": "dist/processors/index.d.ts",
|
|
106
|
-
"implementation": "dist/chunk-
|
|
107
|
-
"line":
|
|
106
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
107
|
+
"line": 2398
|
|
108
108
|
},
|
|
109
109
|
"stripObservationGroups": {
|
|
110
110
|
"types": "dist/processors/index.d.ts",
|
|
111
|
-
"implementation": "dist/chunk-
|
|
111
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
112
112
|
"line": 749
|
|
113
113
|
},
|
|
114
114
|
"wrapInObservationGroup": {
|
|
115
115
|
"types": "dist/processors/index.d.ts",
|
|
116
|
-
"implementation": "dist/chunk-
|
|
116
|
+
"implementation": "dist/chunk-C7PARRAD.js",
|
|
117
117
|
"line": 720
|
|
118
118
|
},
|
|
119
119
|
"OBSERVATIONAL_MEMORY_DEFAULTS": {
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"processors": {
|
|
162
162
|
"index": "dist/processors/index.js",
|
|
163
163
|
"chunks": [
|
|
164
|
-
"chunk-
|
|
164
|
+
"chunk-C7PARRAD.js",
|
|
165
165
|
"chunk-LSJJAJAF.js"
|
|
166
166
|
]
|
|
167
167
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkCK4U3AYR_cjs = require('./chunk-CK4U3AYR.cjs');
|
|
4
4
|
var chunkIDRQZVB4_cjs = require('./chunk-IDRQZVB4.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunk4FMHSWZD_cjs = require('./chunk-4FMHSWZD.cjs');
|
|
6
6
|
var v3 = require('zod/v3');
|
|
7
7
|
var zod = require('zod');
|
|
8
8
|
var z4 = require('zod/v4');
|
|
@@ -15702,7 +15702,7 @@ function formatTimestamp(date) {
|
|
|
15702
15702
|
}
|
|
15703
15703
|
function truncateByTokens(text4, maxTokens, hint) {
|
|
15704
15704
|
if (tokenx.estimateTokenCount(text4) <= maxTokens) return { text: text4, wasTruncated: false };
|
|
15705
|
-
const truncated =
|
|
15705
|
+
const truncated = chunk4FMHSWZD_cjs.truncateStringByTokens(text4, maxTokens);
|
|
15706
15706
|
const suffix = hint ? ` [${hint} for more]` : "";
|
|
15707
15707
|
return { text: truncated + suffix, wasTruncated: true };
|
|
15708
15708
|
}
|
|
@@ -15735,11 +15735,11 @@ function formatMessageParts(msg, detail) {
|
|
|
15735
15735
|
} else if (partType === "tool-invocation") {
|
|
15736
15736
|
const inv = part.toolInvocation;
|
|
15737
15737
|
if (inv.state === "result") {
|
|
15738
|
-
const { value: resultValue } =
|
|
15738
|
+
const { value: resultValue } = chunk4FMHSWZD_cjs.resolveToolResultValue(
|
|
15739
15739
|
part,
|
|
15740
15740
|
inv.result
|
|
15741
15741
|
);
|
|
15742
|
-
const resultStr =
|
|
15742
|
+
const resultStr = chunk4FMHSWZD_cjs.formatToolResultForObserver(resultValue, { maxTokens: HIGH_DETAIL_TOOL_RESULT_TOKENS });
|
|
15743
15743
|
const fullText = `[Tool Result: ${inv.toolName}]
|
|
15744
15744
|
${resultStr}`;
|
|
15745
15745
|
parts.push(makePart(msg, i, "tool-result", fullText, detail));
|
|
@@ -15823,7 +15823,7 @@ function renderFormattedParts(parts, timestamps, options) {
|
|
|
15823
15823
|
const text4 = buildRenderedText(parts, timestamps);
|
|
15824
15824
|
let totalTokens = tokenx.estimateTokenCount(text4);
|
|
15825
15825
|
if (totalTokens > options.maxTokens) {
|
|
15826
|
-
const truncated =
|
|
15826
|
+
const truncated = chunk4FMHSWZD_cjs.truncateStringByTokens(text4, options.maxTokens);
|
|
15827
15827
|
return { text: truncated, truncated: true, tokenOffset: totalTokens - options.maxTokens };
|
|
15828
15828
|
}
|
|
15829
15829
|
const truncatedIndices = parts.map((p, i) => ({ part: p, index: i })).filter(({ part }) => part.text !== part.fullText).sort((a, b) => expandPriority(a.part) - expandPriority(b.part));
|
|
@@ -15856,7 +15856,7 @@ function renderFormattedParts(parts, timestamps, options) {
|
|
|
15856
15856
|
if (expandedTokens <= options.maxTokens) {
|
|
15857
15857
|
return { text: expanded, truncated: false, tokenOffset: 0 };
|
|
15858
15858
|
}
|
|
15859
|
-
const hardTruncated =
|
|
15859
|
+
const hardTruncated = chunk4FMHSWZD_cjs.truncateStringByTokens(expanded, options.maxTokens);
|
|
15860
15860
|
return { text: hardTruncated, truncated: true, tokenOffset: expandedTokens - options.maxTokens };
|
|
15861
15861
|
}
|
|
15862
15862
|
async function recallPart({
|
|
@@ -15907,7 +15907,7 @@ async function recallPart({
|
|
|
15907
15907
|
|
|
15908
15908
|
`;
|
|
15909
15909
|
const fallbackText = `${fallbackNote}${firstNextPart.text}`;
|
|
15910
|
-
const truncatedText2 =
|
|
15910
|
+
const truncatedText2 = chunk4FMHSWZD_cjs.truncateStringByTokens(fallbackText, maxTokens);
|
|
15911
15911
|
const wasTruncated2 = truncatedText2 !== fallbackText;
|
|
15912
15912
|
return {
|
|
15913
15913
|
text: truncatedText2,
|
|
@@ -15922,7 +15922,7 @@ async function recallPart({
|
|
|
15922
15922
|
}
|
|
15923
15923
|
throw new Error(`Part index ${partIndex} not found in message ${cursor}. Available indices: ${availableIndices}`);
|
|
15924
15924
|
}
|
|
15925
|
-
const truncatedText =
|
|
15925
|
+
const truncatedText = chunk4FMHSWZD_cjs.truncateStringByTokens(target.text, maxTokens);
|
|
15926
15926
|
const wasTruncated = truncatedText !== target.text;
|
|
15927
15927
|
return {
|
|
15928
15928
|
text: truncatedText,
|
|
@@ -17366,7 +17366,7 @@ ${workingMemory}`;
|
|
|
17366
17366
|
"Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version."
|
|
17367
17367
|
);
|
|
17368
17368
|
}
|
|
17369
|
-
const { ObservationalMemory: OMClass } = await import('./observational-memory-
|
|
17369
|
+
const { ObservationalMemory: OMClass } = await import('./observational-memory-5YDQLKHE.cjs');
|
|
17370
17370
|
const onIndexObservations = this.hasRetrievalSearch(omConfig.retrieval) ? async (observation) => {
|
|
17371
17371
|
await this.indexObservation(observation);
|
|
17372
17372
|
} : void 0;
|
|
@@ -18254,18 +18254,18 @@ Notes:
|
|
|
18254
18254
|
if (!effectiveConfig) return null;
|
|
18255
18255
|
const engine = await this.omEngine;
|
|
18256
18256
|
if (!engine) return null;
|
|
18257
|
-
const { ObservationalMemoryProcessor } = await import('./observational-memory-
|
|
18257
|
+
const { ObservationalMemoryProcessor } = await import('./observational-memory-5YDQLKHE.cjs');
|
|
18258
18258
|
return new ObservationalMemoryProcessor(engine, this);
|
|
18259
18259
|
}
|
|
18260
18260
|
};
|
|
18261
18261
|
|
|
18262
18262
|
Object.defineProperty(exports, "ModelByInputTokens", {
|
|
18263
18263
|
enumerable: true,
|
|
18264
|
-
get: function () { return
|
|
18264
|
+
get: function () { return chunk4FMHSWZD_cjs.ModelByInputTokens; }
|
|
18265
18265
|
});
|
|
18266
18266
|
Object.defineProperty(exports, "getObservationsAsOf", {
|
|
18267
18267
|
enumerable: true,
|
|
18268
|
-
get: function () { return
|
|
18268
|
+
get: function () { return chunk4FMHSWZD_cjs.getObservationsAsOf; }
|
|
18269
18269
|
});
|
|
18270
18270
|
Object.defineProperty(exports, "extractWorkingMemoryContent", {
|
|
18271
18271
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __commonJS, require_token_error, __toESM } from './chunk-SVPZMV27.js';
|
|
2
2
|
import { __commonJS as __commonJS$1, require_token_error as require_token_error$1, __toESM as __toESM$1 } from './chunk-RC6RZVYE.js';
|
|
3
|
-
import { truncateStringByTokens, resolveToolResultValue, formatToolResultForObserver } from './chunk-
|
|
4
|
-
export { ModelByInputTokens, getObservationsAsOf } from './chunk-
|
|
3
|
+
import { truncateStringByTokens, resolveToolResultValue, formatToolResultForObserver } from './chunk-C7PARRAD.js';
|
|
4
|
+
export { ModelByInputTokens, getObservationsAsOf } from './chunk-C7PARRAD.js';
|
|
5
5
|
import { ZodFirstPartyTypeKind } from 'zod/v3';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import * as z4 from 'zod/v4';
|
|
@@ -17344,7 +17344,7 @@ ${workingMemory}`;
|
|
|
17344
17344
|
"Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version."
|
|
17345
17345
|
);
|
|
17346
17346
|
}
|
|
17347
|
-
const { ObservationalMemory: OMClass } = await import('./observational-memory-
|
|
17347
|
+
const { ObservationalMemory: OMClass } = await import('./observational-memory-B7AUSTEY.js');
|
|
17348
17348
|
const onIndexObservations = this.hasRetrievalSearch(omConfig.retrieval) ? async (observation) => {
|
|
17349
17349
|
await this.indexObservation(observation);
|
|
17350
17350
|
} : void 0;
|
|
@@ -18232,7 +18232,7 @@ Notes:
|
|
|
18232
18232
|
if (!effectiveConfig) return null;
|
|
18233
18233
|
const engine = await this.omEngine;
|
|
18234
18234
|
if (!engine) return null;
|
|
18235
|
-
const { ObservationalMemoryProcessor } = await import('./observational-memory-
|
|
18235
|
+
const { ObservationalMemoryProcessor } = await import('./observational-memory-B7AUSTEY.js');
|
|
18236
18236
|
return new ObservationalMemoryProcessor(engine, this);
|
|
18237
18237
|
}
|
|
18238
18238
|
};
|
|
@@ -1,101 +1,101 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk4FMHSWZD_cjs = require('./chunk-4FMHSWZD.cjs');
|
|
4
4
|
var chunkD4J4XPGM_cjs = require('./chunk-D4J4XPGM.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "ModelByInputTokens", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunk4FMHSWZD_cjs.ModelByInputTokens; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "OBSERVER_SYSTEM_PROMPT", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk4FMHSWZD_cjs.OBSERVER_SYSTEM_PROMPT; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "ObservationalMemory", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunk4FMHSWZD_cjs.ObservationalMemory; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "ObservationalMemoryProcessor", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunk4FMHSWZD_cjs.ObservationalMemoryProcessor; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "TokenCounter", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk4FMHSWZD_cjs.TokenCounter; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "buildObserverPrompt", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunk4FMHSWZD_cjs.buildObserverPrompt; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "buildObserverSystemPrompt", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunk4FMHSWZD_cjs.buildObserverSystemPrompt; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "combineObservationGroupRanges", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunk4FMHSWZD_cjs.combineObservationGroupRanges; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "deriveObservationGroupProvenance", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunk4FMHSWZD_cjs.deriveObservationGroupProvenance; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "extractCurrentTask", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunk4FMHSWZD_cjs.extractCurrentTask; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "formatMessagesForObserver", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunk4FMHSWZD_cjs.formatMessagesForObserver; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "getObservationsAsOf", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunk4FMHSWZD_cjs.getObservationsAsOf; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "hasCurrentTaskSection", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunk4FMHSWZD_cjs.hasCurrentTaskSection; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "injectAnchorIds", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunk4FMHSWZD_cjs.injectAnchorIds; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "optimizeObservationsForContext", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunk4FMHSWZD_cjs.optimizeObservationsForContext; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "parseAnchorId", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunk4FMHSWZD_cjs.parseAnchorId; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "parseObservationGroups", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunk4FMHSWZD_cjs.parseObservationGroups; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "parseObserverOutput", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunk4FMHSWZD_cjs.parseObserverOutput; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "reconcileObservationGroupsFromReflection", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunk4FMHSWZD_cjs.reconcileObservationGroupsFromReflection; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "renderObservationGroupsForReflection", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunk4FMHSWZD_cjs.renderObservationGroupsForReflection; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "stripEphemeralAnchorIds", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunk4FMHSWZD_cjs.stripEphemeralAnchorIds; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "stripObservationGroups", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunk4FMHSWZD_cjs.stripObservationGroups; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "wrapInObservationGroup", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunk4FMHSWZD_cjs.wrapInObservationGroup; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "OBSERVATIONAL_MEMORY_DEFAULTS", {
|
|
101
101
|
enumerable: true,
|
|
@@ -113,5 +113,5 @@ Object.defineProperty(exports, "OBSERVATION_CONTINUATION_HINT", {
|
|
|
113
113
|
enumerable: true,
|
|
114
114
|
get: function () { return chunkD4J4XPGM_cjs.OBSERVATION_CONTINUATION_HINT; }
|
|
115
115
|
});
|
|
116
|
-
//# sourceMappingURL=observational-memory-
|
|
117
|
-
//# sourceMappingURL=observational-memory-
|
|
116
|
+
//# sourceMappingURL=observational-memory-5YDQLKHE.cjs.map
|
|
117
|
+
//# sourceMappingURL=observational-memory-5YDQLKHE.cjs.map
|
package/dist/{observational-memory-4VT6QEB7.cjs.map → observational-memory-5YDQLKHE.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-5YDQLKHE.cjs"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ModelByInputTokens, OBSERVER_SYSTEM_PROMPT, ObservationalMemory, ObservationalMemoryProcessor, TokenCounter, buildObserverPrompt, buildObserverSystemPrompt, combineObservationGroupRanges, deriveObservationGroupProvenance, extractCurrentTask, formatMessagesForObserver, getObservationsAsOf, hasCurrentTaskSection, injectAnchorIds, optimizeObservationsForContext, parseAnchorId, parseObservationGroups, parseObserverOutput, reconcileObservationGroupsFromReflection, renderObservationGroupsForReflection, stripEphemeralAnchorIds, stripObservationGroups, wrapInObservationGroup } from './chunk-
|
|
1
|
+
export { ModelByInputTokens, OBSERVER_SYSTEM_PROMPT, ObservationalMemory, ObservationalMemoryProcessor, TokenCounter, buildObserverPrompt, buildObserverSystemPrompt, combineObservationGroupRanges, deriveObservationGroupProvenance, extractCurrentTask, formatMessagesForObserver, getObservationsAsOf, hasCurrentTaskSection, injectAnchorIds, optimizeObservationsForContext, parseAnchorId, parseObservationGroups, parseObserverOutput, reconcileObservationGroupsFromReflection, renderObservationGroupsForReflection, stripEphemeralAnchorIds, stripObservationGroups, wrapInObservationGroup } from './chunk-C7PARRAD.js';
|
|
2
2
|
export { OBSERVATIONAL_MEMORY_DEFAULTS, OBSERVATION_CONTEXT_INSTRUCTIONS, OBSERVATION_CONTEXT_PROMPT, OBSERVATION_CONTINUATION_HINT } from './chunk-LSJJAJAF.js';
|
|
3
|
-
//# sourceMappingURL=observational-memory-
|
|
4
|
-
//# sourceMappingURL=observational-memory-
|
|
3
|
+
//# sourceMappingURL=observational-memory-B7AUSTEY.js.map
|
|
4
|
+
//# sourceMappingURL=observational-memory-B7AUSTEY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-B7AUSTEY.js"}
|
|
@@ -1,101 +1,101 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk4FMHSWZD_cjs = require('../chunk-4FMHSWZD.cjs');
|
|
4
4
|
var chunkD4J4XPGM_cjs = require('../chunk-D4J4XPGM.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "ModelByInputTokens", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunk4FMHSWZD_cjs.ModelByInputTokens; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "OBSERVER_SYSTEM_PROMPT", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk4FMHSWZD_cjs.OBSERVER_SYSTEM_PROMPT; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "ObservationalMemory", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunk4FMHSWZD_cjs.ObservationalMemory; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "ObservationalMemoryProcessor", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunk4FMHSWZD_cjs.ObservationalMemoryProcessor; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "TokenCounter", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk4FMHSWZD_cjs.TokenCounter; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "buildObserverPrompt", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunk4FMHSWZD_cjs.buildObserverPrompt; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "buildObserverSystemPrompt", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunk4FMHSWZD_cjs.buildObserverSystemPrompt; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "combineObservationGroupRanges", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunk4FMHSWZD_cjs.combineObservationGroupRanges; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "deriveObservationGroupProvenance", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunk4FMHSWZD_cjs.deriveObservationGroupProvenance; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "extractCurrentTask", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunk4FMHSWZD_cjs.extractCurrentTask; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "formatMessagesForObserver", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunk4FMHSWZD_cjs.formatMessagesForObserver; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "getObservationsAsOf", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunk4FMHSWZD_cjs.getObservationsAsOf; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "hasCurrentTaskSection", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunk4FMHSWZD_cjs.hasCurrentTaskSection; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "injectAnchorIds", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunk4FMHSWZD_cjs.injectAnchorIds; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "optimizeObservationsForContext", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunk4FMHSWZD_cjs.optimizeObservationsForContext; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "parseAnchorId", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunk4FMHSWZD_cjs.parseAnchorId; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "parseObservationGroups", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunk4FMHSWZD_cjs.parseObservationGroups; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "parseObserverOutput", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunk4FMHSWZD_cjs.parseObserverOutput; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "reconcileObservationGroupsFromReflection", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunk4FMHSWZD_cjs.reconcileObservationGroupsFromReflection; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "renderObservationGroupsForReflection", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunk4FMHSWZD_cjs.renderObservationGroupsForReflection; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "stripEphemeralAnchorIds", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunk4FMHSWZD_cjs.stripEphemeralAnchorIds; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "stripObservationGroups", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunk4FMHSWZD_cjs.stripObservationGroups; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "wrapInObservationGroup", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunk4FMHSWZD_cjs.wrapInObservationGroup; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "OBSERVATIONAL_MEMORY_DEFAULTS", {
|
|
101
101
|
enumerable: true,
|
package/dist/processors/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ModelByInputTokens, OBSERVER_SYSTEM_PROMPT, ObservationalMemory, ObservationalMemoryProcessor, TokenCounter, buildObserverPrompt, buildObserverSystemPrompt, combineObservationGroupRanges, deriveObservationGroupProvenance, extractCurrentTask, formatMessagesForObserver, getObservationsAsOf, hasCurrentTaskSection, injectAnchorIds, optimizeObservationsForContext, parseAnchorId, parseObservationGroups, parseObserverOutput, reconcileObservationGroupsFromReflection, renderObservationGroupsForReflection, stripEphemeralAnchorIds, stripObservationGroups, wrapInObservationGroup } from '../chunk-
|
|
1
|
+
export { ModelByInputTokens, OBSERVER_SYSTEM_PROMPT, ObservationalMemory, ObservationalMemoryProcessor, TokenCounter, buildObserverPrompt, buildObserverSystemPrompt, combineObservationGroupRanges, deriveObservationGroupProvenance, extractCurrentTask, formatMessagesForObserver, getObservationsAsOf, hasCurrentTaskSection, injectAnchorIds, optimizeObservationsForContext, parseAnchorId, parseObservationGroups, parseObserverOutput, reconcileObservationGroupsFromReflection, renderObservationGroupsForReflection, stripEphemeralAnchorIds, stripObservationGroups, wrapInObservationGroup } from '../chunk-C7PARRAD.js';
|
|
2
2
|
export { OBSERVATIONAL_MEMORY_DEFAULTS, OBSERVATION_CONTEXT_INSTRUCTIONS, OBSERVATION_CONTEXT_PROMPT, OBSERVATION_CONTINUATION_HINT } from '../chunk-LSJJAJAF.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../../src/processors/observational-memory/observation-turn/step.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../../src/processors/observational-memory/observation-turn/step.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;GAMG;AACH,qBAAa,eAAe;IAKxB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM;IAL7B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,CAAc;gBAGZ,IAAI,EAAE,eAAe,EAC7B,UAAU,EAAE,MAAM;IAG7B,2CAA2C;IAC3C,IAAI,QAAQ,YAEX;IAED,2EAA2E;IAC3E,IAAI,OAAO,IAAI,WAAW,CAGzB;IAED;;;;;;OAMG;IACG,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC;IAkPrC;;;OAGG;YACW,uBAAuB;CAyEtC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/memory",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.2-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -59,12 +59,12 @@
|
|
|
59
59
|
"typescript-eslint": "^8.57.0",
|
|
60
60
|
"vitest": "4.0.18",
|
|
61
61
|
"zod": "^4.3.6",
|
|
62
|
-
"@internal/ai-sdk-v5": "0.0.26",
|
|
63
62
|
"@internal/ai-sdk-v4": "0.0.26",
|
|
64
63
|
"@internal/ai-v6": "0.0.26",
|
|
64
|
+
"@internal/types-builder": "0.0.54",
|
|
65
65
|
"@internal/lint": "0.0.79",
|
|
66
|
-
"@mastra/core": "1.
|
|
67
|
-
"@internal/
|
|
66
|
+
"@mastra/core": "1.23.0-alpha.0",
|
|
67
|
+
"@internal/ai-sdk-v5": "0.0.26"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@mastra/core": ">=1.4.1-0 <2.0.0-0",
|