@mastra/memory 1.11.0-alpha.4 → 1.11.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 +46 -0
- package/dist/{chunk-D4D6ZFBQ.js → chunk-2NZR2XHO.js} +29 -22
- package/dist/chunk-2NZR2XHO.js.map +1 -0
- package/dist/{chunk-VINRPDYQ.cjs → chunk-W2RTLXNQ.cjs} +29 -22
- package/dist/chunk-W2RTLXNQ.cjs.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +43 -43
- package/dist/index.cjs +11 -11
- package/dist/index.js +4 -4
- package/dist/{observational-memory-FATH657E.cjs → observational-memory-JCPPBSVG.cjs} +26 -26
- package/dist/{observational-memory-FATH657E.cjs.map → observational-memory-JCPPBSVG.cjs.map} +1 -1
- package/dist/{observational-memory-SN7GKMHZ.js → observational-memory-SASGM6OW.js} +3 -3
- package/dist/{observational-memory-SN7GKMHZ.js.map → observational-memory-SASGM6OW.js.map} +1 -1
- package/dist/processors/index.cjs +24 -24
- package/dist/processors/index.js +1 -1
- package/dist/processors/observational-memory/observation-groups.d.ts +2 -2
- package/dist/processors/observational-memory/observation-groups.d.ts.map +1 -1
- package/dist/processors/observational-memory/reflector-agent.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/chunk-D4D6ZFBQ.js.map +0 -1
- package/dist/chunk-VINRPDYQ.cjs.map +0 -1
package/dist/docs/SKILL.md
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.11.
|
|
2
|
+
"version": "1.11.1-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-2NZR2XHO.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-2NZR2XHO.js"
|
|
13
13
|
},
|
|
14
14
|
"ObservationalMemory": {
|
|
15
15
|
"types": "dist/processors/index.d.ts",
|
|
16
|
-
"implementation": "dist/chunk-
|
|
17
|
-
"line":
|
|
16
|
+
"implementation": "dist/chunk-2NZR2XHO.js",
|
|
17
|
+
"line": 5705
|
|
18
18
|
},
|
|
19
19
|
"ObservationalMemoryProcessor": {
|
|
20
20
|
"types": "dist/processors/index.d.ts",
|
|
21
|
-
"implementation": "dist/chunk-
|
|
22
|
-
"line":
|
|
21
|
+
"implementation": "dist/chunk-2NZR2XHO.js",
|
|
22
|
+
"line": 8227
|
|
23
23
|
},
|
|
24
24
|
"TokenCounter": {
|
|
25
25
|
"types": "dist/processors/index.d.ts",
|
|
26
|
-
"implementation": "dist/chunk-
|
|
27
|
-
"line":
|
|
26
|
+
"implementation": "dist/chunk-2NZR2XHO.js",
|
|
27
|
+
"line": 5257
|
|
28
28
|
},
|
|
29
29
|
"buildObserverPrompt": {
|
|
30
30
|
"types": "dist/processors/index.d.ts",
|
|
31
|
-
"implementation": "dist/chunk-
|
|
32
|
-
"line":
|
|
31
|
+
"implementation": "dist/chunk-2NZR2XHO.js",
|
|
32
|
+
"line": 3285
|
|
33
33
|
},
|
|
34
34
|
"buildObserverSystemPrompt": {
|
|
35
35
|
"types": "dist/processors/index.d.ts",
|
|
36
|
-
"implementation": "dist/chunk-
|
|
37
|
-
"line":
|
|
36
|
+
"implementation": "dist/chunk-2NZR2XHO.js",
|
|
37
|
+
"line": 2759
|
|
38
38
|
},
|
|
39
39
|
"combineObservationGroupRanges": {
|
|
40
40
|
"types": "dist/processors/index.d.ts",
|
|
41
|
-
"implementation": "dist/chunk-
|
|
42
|
-
"line":
|
|
41
|
+
"implementation": "dist/chunk-2NZR2XHO.js",
|
|
42
|
+
"line": 758
|
|
43
43
|
},
|
|
44
44
|
"deriveObservationGroupProvenance": {
|
|
45
45
|
"types": "dist/processors/index.d.ts",
|
|
46
|
-
"implementation": "dist/chunk-
|
|
47
|
-
"line":
|
|
46
|
+
"implementation": "dist/chunk-2NZR2XHO.js",
|
|
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-2NZR2XHO.js",
|
|
52
|
+
"line": 3399
|
|
53
53
|
},
|
|
54
54
|
"formatMessagesForObserver": {
|
|
55
55
|
"types": "dist/processors/index.d.ts",
|
|
56
|
-
"implementation": "dist/chunk-
|
|
57
|
-
"line":
|
|
56
|
+
"implementation": "dist/chunk-2NZR2XHO.js",
|
|
57
|
+
"line": 3025
|
|
58
58
|
},
|
|
59
59
|
"getObservationsAsOf": {
|
|
60
60
|
"types": "dist/processors/index.d.ts",
|
|
61
|
-
"implementation": "dist/chunk-
|
|
62
|
-
"line":
|
|
61
|
+
"implementation": "dist/chunk-2NZR2XHO.js",
|
|
62
|
+
"line": 8405
|
|
63
63
|
},
|
|
64
64
|
"hasCurrentTaskSection": {
|
|
65
65
|
"types": "dist/processors/index.d.ts",
|
|
66
|
-
"implementation": "dist/chunk-
|
|
67
|
-
"line":
|
|
66
|
+
"implementation": "dist/chunk-2NZR2XHO.js",
|
|
67
|
+
"line": 3387
|
|
68
68
|
},
|
|
69
69
|
"injectAnchorIds": {
|
|
70
70
|
"types": "dist/processors/index.d.ts",
|
|
71
|
-
"implementation": "dist/chunk-
|
|
72
|
-
"line":
|
|
71
|
+
"implementation": "dist/chunk-2NZR2XHO.js",
|
|
72
|
+
"line": 2316
|
|
73
73
|
},
|
|
74
74
|
"optimizeObservationsForContext": {
|
|
75
75
|
"types": "dist/processors/index.d.ts",
|
|
76
|
-
"implementation": "dist/chunk-
|
|
77
|
-
"line":
|
|
76
|
+
"implementation": "dist/chunk-2NZR2XHO.js",
|
|
77
|
+
"line": 3410
|
|
78
78
|
},
|
|
79
79
|
"parseAnchorId": {
|
|
80
80
|
"types": "dist/processors/index.d.ts",
|
|
81
|
-
"implementation": "dist/chunk-
|
|
82
|
-
"line":
|
|
81
|
+
"implementation": "dist/chunk-2NZR2XHO.js",
|
|
82
|
+
"line": 2289
|
|
83
83
|
},
|
|
84
84
|
"parseObservationGroups": {
|
|
85
85
|
"types": "dist/processors/index.d.ts",
|
|
86
|
-
"implementation": "dist/chunk-
|
|
86
|
+
"implementation": "dist/chunk-2NZR2XHO.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-2NZR2XHO.js",
|
|
92
|
+
"line": 3295
|
|
93
93
|
},
|
|
94
94
|
"reconcileObservationGroupsFromReflection": {
|
|
95
95
|
"types": "dist/processors/index.d.ts",
|
|
96
|
-
"implementation": "dist/chunk-
|
|
97
|
-
"line":
|
|
96
|
+
"implementation": "dist/chunk-2NZR2XHO.js",
|
|
97
|
+
"line": 816
|
|
98
98
|
},
|
|
99
99
|
"renderObservationGroupsForReflection": {
|
|
100
100
|
"types": "dist/processors/index.d.ts",
|
|
101
|
-
"implementation": "dist/chunk-
|
|
102
|
-
"line":
|
|
101
|
+
"implementation": "dist/chunk-2NZR2XHO.js",
|
|
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-2NZR2XHO.js",
|
|
107
|
+
"line": 2346
|
|
108
108
|
},
|
|
109
109
|
"stripObservationGroups": {
|
|
110
110
|
"types": "dist/processors/index.d.ts",
|
|
111
|
-
"implementation": "dist/chunk-
|
|
111
|
+
"implementation": "dist/chunk-2NZR2XHO.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-2NZR2XHO.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-2NZR2XHO.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 chunkW2RTLXNQ_cjs = require('./chunk-W2RTLXNQ.cjs');
|
|
6
6
|
var v3 = require('zod/v3');
|
|
7
7
|
var zod = require('zod');
|
|
8
8
|
var z4 = require('zod/v4');
|
|
@@ -15666,7 +15666,7 @@ function formatTimestamp(date) {
|
|
|
15666
15666
|
}
|
|
15667
15667
|
function truncateByTokens(text4, maxTokens, hint) {
|
|
15668
15668
|
if (tokenx.estimateTokenCount(text4) <= maxTokens) return { text: text4, wasTruncated: false };
|
|
15669
|
-
const truncated =
|
|
15669
|
+
const truncated = chunkW2RTLXNQ_cjs.truncateStringByTokens(text4, maxTokens);
|
|
15670
15670
|
const suffix = hint ? ` [${hint} for more]` : "";
|
|
15671
15671
|
return { text: truncated + suffix, wasTruncated: true };
|
|
15672
15672
|
}
|
|
@@ -15699,11 +15699,11 @@ function formatMessageParts(msg, detail) {
|
|
|
15699
15699
|
} else if (partType === "tool-invocation") {
|
|
15700
15700
|
const inv = part.toolInvocation;
|
|
15701
15701
|
if (inv.state === "result") {
|
|
15702
|
-
const { value: resultValue } =
|
|
15702
|
+
const { value: resultValue } = chunkW2RTLXNQ_cjs.resolveToolResultValue(
|
|
15703
15703
|
part,
|
|
15704
15704
|
inv.result
|
|
15705
15705
|
);
|
|
15706
|
-
const resultStr =
|
|
15706
|
+
const resultStr = chunkW2RTLXNQ_cjs.formatToolResultForObserver(resultValue, { maxTokens: HIGH_DETAIL_TOOL_RESULT_TOKENS });
|
|
15707
15707
|
const fullText = `[Tool Result: ${inv.toolName}]
|
|
15708
15708
|
${resultStr}`;
|
|
15709
15709
|
parts.push(makePart(msg, i, "tool-result", fullText, detail));
|
|
@@ -15766,7 +15766,7 @@ function renderFormattedParts(parts, timestamps, options) {
|
|
|
15766
15766
|
const text4 = buildRenderedText(parts, timestamps);
|
|
15767
15767
|
let totalTokens = tokenx.estimateTokenCount(text4);
|
|
15768
15768
|
if (totalTokens > options.maxTokens) {
|
|
15769
|
-
const truncated =
|
|
15769
|
+
const truncated = chunkW2RTLXNQ_cjs.truncateStringByTokens(text4, options.maxTokens);
|
|
15770
15770
|
return { text: truncated, truncated: true, tokenOffset: totalTokens - options.maxTokens };
|
|
15771
15771
|
}
|
|
15772
15772
|
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));
|
|
@@ -15799,7 +15799,7 @@ function renderFormattedParts(parts, timestamps, options) {
|
|
|
15799
15799
|
if (expandedTokens <= options.maxTokens) {
|
|
15800
15800
|
return { text: expanded, truncated: false, tokenOffset: 0 };
|
|
15801
15801
|
}
|
|
15802
|
-
const hardTruncated =
|
|
15802
|
+
const hardTruncated = chunkW2RTLXNQ_cjs.truncateStringByTokens(expanded, options.maxTokens);
|
|
15803
15803
|
return { text: hardTruncated, truncated: true, tokenOffset: expandedTokens - options.maxTokens };
|
|
15804
15804
|
}
|
|
15805
15805
|
async function recallPart({
|
|
@@ -15833,7 +15833,7 @@ async function recallPart({
|
|
|
15833
15833
|
`Part index ${partIndex} not found in message ${cursor}. Available indices: ${allParts.map((p) => p.partIndex).join(", ")}`
|
|
15834
15834
|
);
|
|
15835
15835
|
}
|
|
15836
|
-
const truncatedText =
|
|
15836
|
+
const truncatedText = chunkW2RTLXNQ_cjs.truncateStringByTokens(target.text, maxTokens);
|
|
15837
15837
|
const wasTruncated = truncatedText !== target.text;
|
|
15838
15838
|
return {
|
|
15839
15839
|
text: truncatedText,
|
|
@@ -17248,7 +17248,7 @@ ${workingMemory}`;
|
|
|
17248
17248
|
"Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version."
|
|
17249
17249
|
);
|
|
17250
17250
|
}
|
|
17251
|
-
const { ObservationalMemory: OMClass } = await import('./observational-memory-
|
|
17251
|
+
const { ObservationalMemory: OMClass } = await import('./observational-memory-JCPPBSVG.cjs');
|
|
17252
17252
|
const onIndexObservations = this.hasRetrievalSearch(omConfig.retrieval) ? async (observation) => {
|
|
17253
17253
|
await this.indexObservation(observation);
|
|
17254
17254
|
} : void 0;
|
|
@@ -18136,18 +18136,18 @@ Notes:
|
|
|
18136
18136
|
if (!effectiveConfig) return null;
|
|
18137
18137
|
const engine = await this.omEngine;
|
|
18138
18138
|
if (!engine) return null;
|
|
18139
|
-
const { ObservationalMemoryProcessor } = await import('./observational-memory-
|
|
18139
|
+
const { ObservationalMemoryProcessor } = await import('./observational-memory-JCPPBSVG.cjs');
|
|
18140
18140
|
return new ObservationalMemoryProcessor(engine, this);
|
|
18141
18141
|
}
|
|
18142
18142
|
};
|
|
18143
18143
|
|
|
18144
18144
|
Object.defineProperty(exports, "ModelByInputTokens", {
|
|
18145
18145
|
enumerable: true,
|
|
18146
|
-
get: function () { return
|
|
18146
|
+
get: function () { return chunkW2RTLXNQ_cjs.ModelByInputTokens; }
|
|
18147
18147
|
});
|
|
18148
18148
|
Object.defineProperty(exports, "getObservationsAsOf", {
|
|
18149
18149
|
enumerable: true,
|
|
18150
|
-
get: function () { return
|
|
18150
|
+
get: function () { return chunkW2RTLXNQ_cjs.getObservationsAsOf; }
|
|
18151
18151
|
});
|
|
18152
18152
|
Object.defineProperty(exports, "extractWorkingMemoryContent", {
|
|
18153
18153
|
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-2NZR2XHO.js';
|
|
4
|
+
export { ModelByInputTokens, getObservationsAsOf } from './chunk-2NZR2XHO.js';
|
|
5
5
|
import { ZodFirstPartyTypeKind } from 'zod/v3';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import * as z4 from 'zod/v4';
|
|
@@ -17226,7 +17226,7 @@ ${workingMemory}`;
|
|
|
17226
17226
|
"Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version."
|
|
17227
17227
|
);
|
|
17228
17228
|
}
|
|
17229
|
-
const { ObservationalMemory: OMClass } = await import('./observational-memory-
|
|
17229
|
+
const { ObservationalMemory: OMClass } = await import('./observational-memory-SASGM6OW.js');
|
|
17230
17230
|
const onIndexObservations = this.hasRetrievalSearch(omConfig.retrieval) ? async (observation) => {
|
|
17231
17231
|
await this.indexObservation(observation);
|
|
17232
17232
|
} : void 0;
|
|
@@ -18114,7 +18114,7 @@ Notes:
|
|
|
18114
18114
|
if (!effectiveConfig) return null;
|
|
18115
18115
|
const engine = await this.omEngine;
|
|
18116
18116
|
if (!engine) return null;
|
|
18117
|
-
const { ObservationalMemoryProcessor } = await import('./observational-memory-
|
|
18117
|
+
const { ObservationalMemoryProcessor } = await import('./observational-memory-SASGM6OW.js');
|
|
18118
18118
|
return new ObservationalMemoryProcessor(engine, this);
|
|
18119
18119
|
}
|
|
18120
18120
|
};
|
|
@@ -1,101 +1,101 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkW2RTLXNQ_cjs = require('./chunk-W2RTLXNQ.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 chunkW2RTLXNQ_cjs.ModelByInputTokens; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "OBSERVER_SYSTEM_PROMPT", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkW2RTLXNQ_cjs.OBSERVER_SYSTEM_PROMPT; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "ObservationalMemory", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkW2RTLXNQ_cjs.ObservationalMemory; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "ObservationalMemoryProcessor", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkW2RTLXNQ_cjs.ObservationalMemoryProcessor; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "TokenCounter", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkW2RTLXNQ_cjs.TokenCounter; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "buildObserverPrompt", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkW2RTLXNQ_cjs.buildObserverPrompt; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "buildObserverSystemPrompt", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkW2RTLXNQ_cjs.buildObserverSystemPrompt; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "combineObservationGroupRanges", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkW2RTLXNQ_cjs.combineObservationGroupRanges; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "deriveObservationGroupProvenance", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkW2RTLXNQ_cjs.deriveObservationGroupProvenance; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "extractCurrentTask", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkW2RTLXNQ_cjs.extractCurrentTask; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "formatMessagesForObserver", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkW2RTLXNQ_cjs.formatMessagesForObserver; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "getObservationsAsOf", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkW2RTLXNQ_cjs.getObservationsAsOf; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "hasCurrentTaskSection", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkW2RTLXNQ_cjs.hasCurrentTaskSection; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "injectAnchorIds", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkW2RTLXNQ_cjs.injectAnchorIds; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "optimizeObservationsForContext", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkW2RTLXNQ_cjs.optimizeObservationsForContext; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "parseAnchorId", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkW2RTLXNQ_cjs.parseAnchorId; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "parseObservationGroups", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkW2RTLXNQ_cjs.parseObservationGroups; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "parseObserverOutput", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkW2RTLXNQ_cjs.parseObserverOutput; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "reconcileObservationGroupsFromReflection", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkW2RTLXNQ_cjs.reconcileObservationGroupsFromReflection; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "renderObservationGroupsForReflection", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkW2RTLXNQ_cjs.renderObservationGroupsForReflection; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "stripEphemeralAnchorIds", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkW2RTLXNQ_cjs.stripEphemeralAnchorIds; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "stripObservationGroups", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkW2RTLXNQ_cjs.stripObservationGroups; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "wrapInObservationGroup", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkW2RTLXNQ_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-JCPPBSVG.cjs.map
|
|
117
|
+
//# sourceMappingURL=observational-memory-JCPPBSVG.cjs.map
|
package/dist/{observational-memory-FATH657E.cjs.map → observational-memory-JCPPBSVG.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-JCPPBSVG.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-2NZR2XHO.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-SASGM6OW.js.map
|
|
4
|
+
//# sourceMappingURL=observational-memory-SASGM6OW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-SASGM6OW.js"}
|
|
@@ -1,101 +1,101 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkW2RTLXNQ_cjs = require('../chunk-W2RTLXNQ.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 chunkW2RTLXNQ_cjs.ModelByInputTokens; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "OBSERVER_SYSTEM_PROMPT", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkW2RTLXNQ_cjs.OBSERVER_SYSTEM_PROMPT; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "ObservationalMemory", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkW2RTLXNQ_cjs.ObservationalMemory; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "ObservationalMemoryProcessor", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkW2RTLXNQ_cjs.ObservationalMemoryProcessor; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "TokenCounter", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkW2RTLXNQ_cjs.TokenCounter; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "buildObserverPrompt", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkW2RTLXNQ_cjs.buildObserverPrompt; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "buildObserverSystemPrompt", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkW2RTLXNQ_cjs.buildObserverSystemPrompt; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "combineObservationGroupRanges", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkW2RTLXNQ_cjs.combineObservationGroupRanges; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "deriveObservationGroupProvenance", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkW2RTLXNQ_cjs.deriveObservationGroupProvenance; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "extractCurrentTask", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkW2RTLXNQ_cjs.extractCurrentTask; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "formatMessagesForObserver", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkW2RTLXNQ_cjs.formatMessagesForObserver; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "getObservationsAsOf", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkW2RTLXNQ_cjs.getObservationsAsOf; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "hasCurrentTaskSection", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkW2RTLXNQ_cjs.hasCurrentTaskSection; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "injectAnchorIds", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkW2RTLXNQ_cjs.injectAnchorIds; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "optimizeObservationsForContext", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkW2RTLXNQ_cjs.optimizeObservationsForContext; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "parseAnchorId", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkW2RTLXNQ_cjs.parseAnchorId; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "parseObservationGroups", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkW2RTLXNQ_cjs.parseObservationGroups; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "parseObserverOutput", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkW2RTLXNQ_cjs.parseObserverOutput; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "reconcileObservationGroupsFromReflection", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkW2RTLXNQ_cjs.reconcileObservationGroupsFromReflection; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "renderObservationGroupsForReflection", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkW2RTLXNQ_cjs.renderObservationGroupsForReflection; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "stripEphemeralAnchorIds", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkW2RTLXNQ_cjs.stripEphemeralAnchorIds; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "stripObservationGroups", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkW2RTLXNQ_cjs.stripObservationGroups; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "wrapInObservationGroup", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkW2RTLXNQ_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-2NZR2XHO.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
|
|
@@ -2,10 +2,10 @@ export interface ObservationGroup {
|
|
|
2
2
|
id: string;
|
|
3
3
|
range: string;
|
|
4
4
|
content: string;
|
|
5
|
-
|
|
5
|
+
kind?: string;
|
|
6
6
|
}
|
|
7
7
|
export declare function generateAnchorId(): string;
|
|
8
|
-
export declare function wrapInObservationGroup(observations: string, range: string, id?: string,
|
|
8
|
+
export declare function wrapInObservationGroup(observations: string, range: string, id?: string, _sourceGroupIds?: string[], kind?: string): string;
|
|
9
9
|
export declare function parseObservationGroups(observations: string): ObservationGroup[];
|
|
10
10
|
export declare function stripObservationGroups(observations: string): string;
|
|
11
11
|
export declare function combineObservationGroupRanges(groups: ObservationGroup[]): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observation-groups.d.ts","sourceRoot":"","sources":["../../../src/processors/observational-memory/observation-groups.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,
|
|
1
|
+
{"version":3,"file":"observation-groups.d.ts","sourceRoot":"","sources":["../../../src/processors/observational-memory/observation-groups.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAkDD,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,EACb,EAAE,SAAqB,EACvB,eAAe,CAAC,EAAE,MAAM,EAAE,EAC1B,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM,CAIR;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,MAAM,GAAG,gBAAgB,EAAE,CA0B/E;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CASnE;AASD,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAgBhF;AAED,wBAAgB,oCAAoC,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgBxF;AAOD,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,gBAAgB,EAAE,CAiChH;AAED,wBAAgB,wCAAwC,CAAC,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAyBnH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reflector-agent.d.ts","sourceRoot":"","sources":["../../../src/processors/observational-memory/reflector-agent.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEtE;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAgGvE;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,QAA+B,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,gBAAoB,CAAC;AAEzD;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAwEjE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,QAA0B,CAAC;AAEhE;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,MAAM,EACpB,YAAY,CAAC,EAAE,MAAM,EACrB,gBAAgB,CAAC,EAAE,OAAO,GAAG,gBAAgB,EAC7C,qBAAqB,CAAC,EAAE,OAAO,GAC9B,MAAM,
|
|
1
|
+
{"version":3,"file":"reflector-agent.d.ts","sourceRoot":"","sources":["../../../src/processors/observational-memory/reflector-agent.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEtE;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAgGvE;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,QAA+B,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,gBAAoB,CAAC;AAEzD;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAwEjE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,QAA0B,CAAC;AAEhE;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,MAAM,EACpB,YAAY,CAAC,EAAE,MAAM,EACrB,gBAAgB,CAAC,EAAE,OAAO,GAAG,gBAAgB,EAC7C,qBAAqB,CAAC,EAAE,OAAO,GAC9B,MAAM,CAiCR;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,GAAG,eAAe,CAoBjG;AAsED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAG7F"}
|