@mastra/memory 1.21.2-alpha.0 → 1.21.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/CHANGELOG.md +22 -0
- package/dist/{chunk-2ZNDDQ6X.cjs → chunk-LEAP5DKB.cjs} +15 -8
- package/dist/chunk-LEAP5DKB.cjs.map +1 -0
- package/dist/{chunk-3I6H2ABM.js → chunk-UHQBCO7I.js} +15 -8
- package/dist/chunk-UHQBCO7I.js.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +27 -27
- package/dist/docs/references/docs-agents-background-tasks.md +5 -5
- package/dist/index.cjs +13 -13
- package/dist/index.js +4 -4
- package/dist/{observational-memory-Y5T2OR2Y.js → observational-memory-NC6DQQWD.js} +3 -3
- package/dist/{observational-memory-Y5T2OR2Y.js.map → observational-memory-NC6DQQWD.js.map} +1 -1
- package/dist/{observational-memory-XZTKSWPR.cjs → observational-memory-WZ6JQ4JY.cjs} +26 -26
- package/dist/{observational-memory-XZTKSWPR.cjs.map → observational-memory-WZ6JQ4JY.cjs.map} +1 -1
- package/dist/processors/index.cjs +24 -24
- package/dist/processors/index.js +1 -1
- package/dist/processors/observational-memory/observational-memory.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/chunk-2ZNDDQ6X.cjs.map +0 -1
- package/dist/chunk-3I6H2ABM.js.map +0 -1
package/dist/docs/SKILL.md
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.21.2
|
|
2
|
+
"version": "1.21.2",
|
|
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-UHQBCO7I.js",
|
|
8
8
|
"line": 795
|
|
9
9
|
},
|
|
10
10
|
"OBSERVER_SYSTEM_PROMPT": {
|
|
11
11
|
"types": "dist/processors/index.d.ts",
|
|
12
|
-
"implementation": "dist/chunk-
|
|
12
|
+
"implementation": "dist/chunk-UHQBCO7I.js"
|
|
13
13
|
},
|
|
14
14
|
"ObservationalMemory": {
|
|
15
15
|
"types": "dist/processors/index.d.ts",
|
|
16
|
-
"implementation": "dist/chunk-
|
|
16
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
17
17
|
"line": 7194
|
|
18
18
|
},
|
|
19
19
|
"ObservationalMemoryProcessor": {
|
|
20
20
|
"types": "dist/processors/index.d.ts",
|
|
21
|
-
"implementation": "dist/chunk-
|
|
22
|
-
"line":
|
|
21
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
22
|
+
"line": 9773
|
|
23
23
|
},
|
|
24
24
|
"TokenCounter": {
|
|
25
25
|
"types": "dist/processors/index.d.ts",
|
|
26
|
-
"implementation": "dist/chunk-
|
|
26
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
27
27
|
"line": 6525
|
|
28
28
|
},
|
|
29
29
|
"buildObserverPrompt": {
|
|
30
30
|
"types": "dist/processors/index.d.ts",
|
|
31
|
-
"implementation": "dist/chunk-
|
|
31
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
32
32
|
"line": 3782
|
|
33
33
|
},
|
|
34
34
|
"buildObserverSystemPrompt": {
|
|
35
35
|
"types": "dist/processors/index.d.ts",
|
|
36
|
-
"implementation": "dist/chunk-
|
|
36
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
37
37
|
"line": 3053
|
|
38
38
|
},
|
|
39
39
|
"combineObservationGroupRanges": {
|
|
40
40
|
"types": "dist/processors/index.d.ts",
|
|
41
|
-
"implementation": "dist/chunk-
|
|
41
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
42
42
|
"line": 887
|
|
43
43
|
},
|
|
44
44
|
"deriveObservationGroupProvenance": {
|
|
45
45
|
"types": "dist/processors/index.d.ts",
|
|
46
|
-
"implementation": "dist/chunk-
|
|
46
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
47
47
|
"line": 921
|
|
48
48
|
},
|
|
49
49
|
"extractCurrentTask": {
|
|
50
50
|
"types": "dist/processors/index.d.ts",
|
|
51
|
-
"implementation": "dist/chunk-
|
|
51
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
52
52
|
"line": 3896
|
|
53
53
|
},
|
|
54
54
|
"formatMessagesForObserver": {
|
|
55
55
|
"types": "dist/processors/index.d.ts",
|
|
56
|
-
"implementation": "dist/chunk-
|
|
56
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
57
57
|
"line": 3508
|
|
58
58
|
},
|
|
59
59
|
"getObservationsAsOf": {
|
|
60
60
|
"types": "dist/processors/index.d.ts",
|
|
61
|
-
"implementation": "dist/chunk-
|
|
62
|
-
"line":
|
|
61
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
62
|
+
"line": 9993
|
|
63
63
|
},
|
|
64
64
|
"hasCurrentTaskSection": {
|
|
65
65
|
"types": "dist/processors/index.d.ts",
|
|
66
|
-
"implementation": "dist/chunk-
|
|
66
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
67
67
|
"line": 3884
|
|
68
68
|
},
|
|
69
69
|
"injectAnchorIds": {
|
|
70
70
|
"types": "dist/processors/index.d.ts",
|
|
71
|
-
"implementation": "dist/chunk-
|
|
71
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
72
72
|
"line": 2601
|
|
73
73
|
},
|
|
74
74
|
"optimizeObservationsForContext": {
|
|
75
75
|
"types": "dist/processors/index.d.ts",
|
|
76
|
-
"implementation": "dist/chunk-
|
|
76
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
77
77
|
"line": 3907
|
|
78
78
|
},
|
|
79
79
|
"parseAnchorId": {
|
|
80
80
|
"types": "dist/processors/index.d.ts",
|
|
81
|
-
"implementation": "dist/chunk-
|
|
81
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
82
82
|
"line": 2574
|
|
83
83
|
},
|
|
84
84
|
"parseObservationGroups": {
|
|
85
85
|
"types": "dist/processors/index.d.ts",
|
|
86
|
-
"implementation": "dist/chunk-
|
|
86
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
87
87
|
"line": 856
|
|
88
88
|
},
|
|
89
89
|
"parseObserverOutput": {
|
|
90
90
|
"types": "dist/processors/index.d.ts",
|
|
91
|
-
"implementation": "dist/chunk-
|
|
91
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
92
92
|
"line": 3792
|
|
93
93
|
},
|
|
94
94
|
"reconcileObservationGroupsFromReflection": {
|
|
95
95
|
"types": "dist/processors/index.d.ts",
|
|
96
|
-
"implementation": "dist/chunk-
|
|
96
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
97
97
|
"line": 945
|
|
98
98
|
},
|
|
99
99
|
"renderObservationGroupsForReflection": {
|
|
100
100
|
"types": "dist/processors/index.d.ts",
|
|
101
|
-
"implementation": "dist/chunk-
|
|
101
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
102
102
|
"line": 901
|
|
103
103
|
},
|
|
104
104
|
"stripEphemeralAnchorIds": {
|
|
105
105
|
"types": "dist/processors/index.d.ts",
|
|
106
|
-
"implementation": "dist/chunk-
|
|
106
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
107
107
|
"line": 2631
|
|
108
108
|
},
|
|
109
109
|
"stripObservationGroups": {
|
|
110
110
|
"types": "dist/processors/index.d.ts",
|
|
111
|
-
"implementation": "dist/chunk-
|
|
111
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
112
112
|
"line": 878
|
|
113
113
|
},
|
|
114
114
|
"wrapInObservationGroup": {
|
|
115
115
|
"types": "dist/processors/index.d.ts",
|
|
116
|
-
"implementation": "dist/chunk-
|
|
116
|
+
"implementation": "dist/chunk-UHQBCO7I.js",
|
|
117
117
|
"line": 849
|
|
118
118
|
},
|
|
119
119
|
"OBSERVATIONAL_MEMORY_DEFAULTS": {
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"processors": {
|
|
163
163
|
"index": "dist/processors/index.js",
|
|
164
164
|
"chunks": [
|
|
165
|
-
"chunk-
|
|
165
|
+
"chunk-UHQBCO7I.js",
|
|
166
166
|
"chunk-LSJJAJAF.js"
|
|
167
167
|
]
|
|
168
168
|
}
|
|
@@ -49,7 +49,7 @@ Once a tool has opted in, the LLM can optionally include a `_background` field i
|
|
|
49
49
|
|
|
50
50
|
### Tool-level
|
|
51
51
|
|
|
52
|
-
Set `
|
|
52
|
+
Set `background.enabled: true` on the tool definition. Tools opted in at this layer run in the background whenever called by an agent that has the manager enabled.
|
|
53
53
|
|
|
54
54
|
```typescript
|
|
55
55
|
import { createTool } from '@mastra/core/tools'
|
|
@@ -59,7 +59,7 @@ export const researchTool = createTool({
|
|
|
59
59
|
id: 'research',
|
|
60
60
|
description: 'Run a long research job',
|
|
61
61
|
inputSchema: z.object({ topic: z.string() }),
|
|
62
|
-
|
|
62
|
+
background: {
|
|
63
63
|
enabled: true,
|
|
64
64
|
timeoutMs: 600_000,
|
|
65
65
|
maxRetries: 1,
|
|
@@ -111,7 +111,7 @@ The `_background` override is a _modifier_ on tools the developer has already op
|
|
|
111
111
|
When a tool call is dispatched, the resolved background config is computed in this priority order:
|
|
112
112
|
|
|
113
113
|
1. Agent-level `backgroundTasks.tools` entry for the tool.
|
|
114
|
-
2. Tool-level `
|
|
114
|
+
2. Tool-level `background` config.
|
|
115
115
|
3. LLM `_background.enabled` override (only used to enable background dispatch when the tool was opted in at one of the layers above).
|
|
116
116
|
4. Manager defaults (`defaultTimeoutMs`, `defaultRetries`).
|
|
117
117
|
|
|
@@ -200,7 +200,7 @@ const stream = await supervisor.stream('Research AI in education and write an ar
|
|
|
200
200
|
|
|
201
201
|
### Inheriting from the subagent
|
|
202
202
|
|
|
203
|
-
If a subagent isn't listed under the supervisor's `backgroundTasks.tools` but has background-eligible tools of its own (either via tool-level `
|
|
203
|
+
If a subagent isn't listed under the supervisor's `backgroundTasks.tools` but has background-eligible tools of its own (either via tool-level `background.enabled: true` or its own `backgroundTasks.tools` entry) the framework still dispatches the entire subagent invocation as a background task. The supervisor inherits the subagent's intent: the subagent itself becomes the background task, and its inner tools run in the foreground inside the subagent's loop.
|
|
204
204
|
|
|
205
205
|
The background config used for the inherited dispatch (for example `waitTimeoutMs`) is derived from the subagent's own `backgroundTasks` config.
|
|
206
206
|
|
|
@@ -285,7 +285,7 @@ The manager keeps tool executors in process memory. If the process restarts whil
|
|
|
285
285
|
|
|
286
286
|
Each layer can register terminal-state callbacks. They don't replace one another, and success/failure hooks fire for their respective outcomes:
|
|
287
287
|
|
|
288
|
-
- Tool-level `
|
|
288
|
+
- Tool-level `background.onComplete` / `onFailed`: scoped to one tool.
|
|
289
289
|
- Agent-level `backgroundTasks.onTaskComplete` / `onTaskFailed`: scoped to all tasks dispatched by this agent.
|
|
290
290
|
- Manager-level `onTaskComplete` / `onTaskFailed`: scoped globally.
|
|
291
291
|
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkLEAP5DKB_cjs = require('./chunk-LEAP5DKB.cjs');
|
|
4
4
|
var chunk43FJOLKM_cjs = require('./chunk-43FJOLKM.cjs');
|
|
5
5
|
var chunkQ7SFCCGT_cjs = require('./chunk-Q7SFCCGT.cjs');
|
|
6
6
|
var agent = require('@mastra/core/agent');
|
|
@@ -46035,7 +46035,7 @@ function formatTimestamp(date9) {
|
|
|
46035
46035
|
}
|
|
46036
46036
|
function truncateByTokens(text4, maxTokens, hint) {
|
|
46037
46037
|
if (tokenx.estimateTokenCount(text4) <= maxTokens) return { text: text4, wasTruncated: false };
|
|
46038
|
-
const truncated =
|
|
46038
|
+
const truncated = chunkLEAP5DKB_cjs.truncateStringByTokens(text4, maxTokens);
|
|
46039
46039
|
const suffix = hint ? ` [${hint} for more]` : "";
|
|
46040
46040
|
return { text: truncated + suffix, wasTruncated: true };
|
|
46041
46041
|
}
|
|
@@ -46087,11 +46087,11 @@ ${JSON.stringify(inv.args, null, 2)}`;
|
|
|
46087
46087
|
});
|
|
46088
46088
|
}
|
|
46089
46089
|
if (inv.state === "result") {
|
|
46090
|
-
const { value: resultValue } =
|
|
46090
|
+
const { value: resultValue } = chunkLEAP5DKB_cjs.resolveToolResultValue(
|
|
46091
46091
|
part,
|
|
46092
46092
|
inv.result
|
|
46093
46093
|
);
|
|
46094
|
-
const resultStr =
|
|
46094
|
+
const resultStr = chunkLEAP5DKB_cjs.formatToolResultForObserver(resultValue, { maxTokens: HIGH_DETAIL_TOOL_RESULT_TOKENS });
|
|
46095
46095
|
const fullText = `[Tool Result: ${inv.toolName}]
|
|
46096
46096
|
${resultStr}`;
|
|
46097
46097
|
parts.push(makePart(msg, i, "tool-result", fullText, detail, inv.toolName));
|
|
@@ -46118,7 +46118,7 @@ ${typeof rawArgs === "string" ? rawArgs : JSON.stringify(rawArgs, null, 2)}`;
|
|
|
46118
46118
|
const toolName = part.toolName;
|
|
46119
46119
|
if (toolName) {
|
|
46120
46120
|
const rawResult = part.output ?? part.result;
|
|
46121
|
-
const resultStr =
|
|
46121
|
+
const resultStr = chunkLEAP5DKB_cjs.formatToolResultForObserver(rawResult, { maxTokens: HIGH_DETAIL_TOOL_RESULT_TOKENS });
|
|
46122
46122
|
const fullText = `[Tool Result: ${toolName}]
|
|
46123
46123
|
${resultStr}`;
|
|
46124
46124
|
parts.push(makePart(msg, i, "tool-result", fullText, detail, toolName));
|
|
@@ -46197,7 +46197,7 @@ function renderFormattedParts(parts, timestamps, options) {
|
|
|
46197
46197
|
const text4 = buildRenderedText(parts, timestamps);
|
|
46198
46198
|
let totalTokens = tokenx.estimateTokenCount(text4);
|
|
46199
46199
|
if (totalTokens > options.maxTokens) {
|
|
46200
|
-
const truncated =
|
|
46200
|
+
const truncated = chunkLEAP5DKB_cjs.truncateStringByTokens(text4, options.maxTokens);
|
|
46201
46201
|
return { text: truncated, truncated: true, tokenOffset: totalTokens - options.maxTokens };
|
|
46202
46202
|
}
|
|
46203
46203
|
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));
|
|
@@ -46230,7 +46230,7 @@ function renderFormattedParts(parts, timestamps, options) {
|
|
|
46230
46230
|
if (expandedTokens <= options.maxTokens) {
|
|
46231
46231
|
return { text: expanded, truncated: false, tokenOffset: 0 };
|
|
46232
46232
|
}
|
|
46233
|
-
const hardTruncated =
|
|
46233
|
+
const hardTruncated = chunkLEAP5DKB_cjs.truncateStringByTokens(expanded, options.maxTokens);
|
|
46234
46234
|
return { text: hardTruncated, truncated: true, tokenOffset: expandedTokens - options.maxTokens };
|
|
46235
46235
|
}
|
|
46236
46236
|
async function recallPart({
|
|
@@ -46281,7 +46281,7 @@ async function recallPart({
|
|
|
46281
46281
|
|
|
46282
46282
|
`;
|
|
46283
46283
|
const fallbackText = `${fallbackNote}${firstNextPart.text}`;
|
|
46284
|
-
const truncatedText2 =
|
|
46284
|
+
const truncatedText2 = chunkLEAP5DKB_cjs.truncateStringByTokens(fallbackText, maxTokens);
|
|
46285
46285
|
const wasTruncated2 = truncatedText2 !== fallbackText;
|
|
46286
46286
|
return {
|
|
46287
46287
|
text: truncatedText2,
|
|
@@ -46296,7 +46296,7 @@ async function recallPart({
|
|
|
46296
46296
|
}
|
|
46297
46297
|
throw new Error(`Part index ${partIndex} not found in message ${cursor}. Available indices: ${availableIndices}`);
|
|
46298
46298
|
}
|
|
46299
|
-
const truncatedText =
|
|
46299
|
+
const truncatedText = chunkLEAP5DKB_cjs.truncateStringByTokens(target.text, maxTokens);
|
|
46300
46300
|
const wasTruncated = truncatedText !== target.text;
|
|
46301
46301
|
return {
|
|
46302
46302
|
text: truncatedText,
|
|
@@ -48135,7 +48135,7 @@ ${workingMemory}`;
|
|
|
48135
48135
|
"Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version."
|
|
48136
48136
|
);
|
|
48137
48137
|
}
|
|
48138
|
-
const { ObservationalMemory: OMClass } = await import('./observational-memory-
|
|
48138
|
+
const { ObservationalMemory: OMClass } = await import('./observational-memory-WZ6JQ4JY.cjs');
|
|
48139
48139
|
const onIndexObservations = this.hasRetrievalSearch(omConfig.retrieval) ? async (observation) => {
|
|
48140
48140
|
await this.indexObservation(observation);
|
|
48141
48141
|
} : void 0;
|
|
@@ -49087,7 +49087,7 @@ Notes:
|
|
|
49087
49087
|
if (!effectiveConfig) return null;
|
|
49088
49088
|
const engine = await this.omEngine;
|
|
49089
49089
|
if (!engine) return null;
|
|
49090
|
-
const { ObservationalMemoryProcessor } = await import('./observational-memory-
|
|
49090
|
+
const { ObservationalMemoryProcessor } = await import('./observational-memory-WZ6JQ4JY.cjs');
|
|
49091
49091
|
return new ObservationalMemoryProcessor(engine, this, {
|
|
49092
49092
|
temporalMarkers: effectiveConfig.temporalMarkers
|
|
49093
49093
|
});
|
|
@@ -49114,11 +49114,11 @@ Notes:
|
|
|
49114
49114
|
|
|
49115
49115
|
Object.defineProperty(exports, "ModelByInputTokens", {
|
|
49116
49116
|
enumerable: true,
|
|
49117
|
-
get: function () { return
|
|
49117
|
+
get: function () { return chunkLEAP5DKB_cjs.ModelByInputTokens; }
|
|
49118
49118
|
});
|
|
49119
49119
|
Object.defineProperty(exports, "getObservationsAsOf", {
|
|
49120
49120
|
enumerable: true,
|
|
49121
|
-
get: function () { return
|
|
49121
|
+
get: function () { return chunkLEAP5DKB_cjs.getObservationsAsOf; }
|
|
49122
49122
|
});
|
|
49123
49123
|
Object.defineProperty(exports, "WORKING_MEMORY_STATE_ID", {
|
|
49124
49124
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { truncateStringByTokens, resolveToolResultValue, formatToolResultForObserver } from './chunk-
|
|
2
|
-
export { ModelByInputTokens, getObservationsAsOf } from './chunk-
|
|
1
|
+
import { truncateStringByTokens, resolveToolResultValue, formatToolResultForObserver } from './chunk-UHQBCO7I.js';
|
|
2
|
+
export { ModelByInputTokens, getObservationsAsOf } from './chunk-UHQBCO7I.js';
|
|
3
3
|
export { WORKING_MEMORY_STATE_ID, WORKING_MEMORY_STATE_PROCESSOR_ID, WorkingMemoryStateProcessor } from './chunk-WCGXQIEN.js';
|
|
4
4
|
import { __export } from './chunk-PZ5AY32C.js';
|
|
5
5
|
import { MessageList } from '@mastra/core/agent';
|
|
@@ -48130,7 +48130,7 @@ ${workingMemory}`;
|
|
|
48130
48130
|
"Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version."
|
|
48131
48131
|
);
|
|
48132
48132
|
}
|
|
48133
|
-
const { ObservationalMemory: OMClass } = await import('./observational-memory-
|
|
48133
|
+
const { ObservationalMemory: OMClass } = await import('./observational-memory-NC6DQQWD.js');
|
|
48134
48134
|
const onIndexObservations = this.hasRetrievalSearch(omConfig.retrieval) ? async (observation) => {
|
|
48135
48135
|
await this.indexObservation(observation);
|
|
48136
48136
|
} : void 0;
|
|
@@ -49082,7 +49082,7 @@ Notes:
|
|
|
49082
49082
|
if (!effectiveConfig) return null;
|
|
49083
49083
|
const engine = await this.omEngine;
|
|
49084
49084
|
if (!engine) return null;
|
|
49085
|
-
const { ObservationalMemoryProcessor } = await import('./observational-memory-
|
|
49085
|
+
const { ObservationalMemoryProcessor } = await import('./observational-memory-NC6DQQWD.js');
|
|
49086
49086
|
return new ObservationalMemoryProcessor(engine, this, {
|
|
49087
49087
|
temporalMarkers: effectiveConfig.temporalMarkers
|
|
49088
49088
|
});
|
|
@@ -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-UHQBCO7I.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-NC6DQQWD.js.map
|
|
4
|
+
//# sourceMappingURL=observational-memory-NC6DQQWD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-NC6DQQWD.js"}
|
|
@@ -1,101 +1,101 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkLEAP5DKB_cjs = require('./chunk-LEAP5DKB.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 chunkLEAP5DKB_cjs.ModelByInputTokens; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "OBSERVER_SYSTEM_PROMPT", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkLEAP5DKB_cjs.OBSERVER_SYSTEM_PROMPT; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "ObservationalMemory", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkLEAP5DKB_cjs.ObservationalMemory; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "ObservationalMemoryProcessor", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkLEAP5DKB_cjs.ObservationalMemoryProcessor; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "TokenCounter", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkLEAP5DKB_cjs.TokenCounter; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "buildObserverPrompt", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkLEAP5DKB_cjs.buildObserverPrompt; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "buildObserverSystemPrompt", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkLEAP5DKB_cjs.buildObserverSystemPrompt; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "combineObservationGroupRanges", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkLEAP5DKB_cjs.combineObservationGroupRanges; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "deriveObservationGroupProvenance", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkLEAP5DKB_cjs.deriveObservationGroupProvenance; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "extractCurrentTask", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkLEAP5DKB_cjs.extractCurrentTask; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "formatMessagesForObserver", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkLEAP5DKB_cjs.formatMessagesForObserver; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "getObservationsAsOf", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkLEAP5DKB_cjs.getObservationsAsOf; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "hasCurrentTaskSection", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkLEAP5DKB_cjs.hasCurrentTaskSection; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "injectAnchorIds", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkLEAP5DKB_cjs.injectAnchorIds; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "optimizeObservationsForContext", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkLEAP5DKB_cjs.optimizeObservationsForContext; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "parseAnchorId", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkLEAP5DKB_cjs.parseAnchorId; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "parseObservationGroups", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkLEAP5DKB_cjs.parseObservationGroups; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "parseObserverOutput", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkLEAP5DKB_cjs.parseObserverOutput; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "reconcileObservationGroupsFromReflection", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkLEAP5DKB_cjs.reconcileObservationGroupsFromReflection; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "renderObservationGroupsForReflection", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkLEAP5DKB_cjs.renderObservationGroupsForReflection; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "stripEphemeralAnchorIds", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkLEAP5DKB_cjs.stripEphemeralAnchorIds; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "stripObservationGroups", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkLEAP5DKB_cjs.stripObservationGroups; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "wrapInObservationGroup", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkLEAP5DKB_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-WZ6JQ4JY.cjs.map
|
|
117
|
+
//# sourceMappingURL=observational-memory-WZ6JQ4JY.cjs.map
|
package/dist/{observational-memory-XZTKSWPR.cjs.map → observational-memory-WZ6JQ4JY.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"observational-memory-WZ6JQ4JY.cjs"}
|
|
@@ -1,101 +1,101 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkLEAP5DKB_cjs = require('../chunk-LEAP5DKB.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 chunkLEAP5DKB_cjs.ModelByInputTokens; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "OBSERVER_SYSTEM_PROMPT", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkLEAP5DKB_cjs.OBSERVER_SYSTEM_PROMPT; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "ObservationalMemory", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkLEAP5DKB_cjs.ObservationalMemory; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "ObservationalMemoryProcessor", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkLEAP5DKB_cjs.ObservationalMemoryProcessor; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "TokenCounter", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkLEAP5DKB_cjs.TokenCounter; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "buildObserverPrompt", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkLEAP5DKB_cjs.buildObserverPrompt; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "buildObserverSystemPrompt", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkLEAP5DKB_cjs.buildObserverSystemPrompt; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "combineObservationGroupRanges", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkLEAP5DKB_cjs.combineObservationGroupRanges; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "deriveObservationGroupProvenance", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkLEAP5DKB_cjs.deriveObservationGroupProvenance; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "extractCurrentTask", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkLEAP5DKB_cjs.extractCurrentTask; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "formatMessagesForObserver", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkLEAP5DKB_cjs.formatMessagesForObserver; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "getObservationsAsOf", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkLEAP5DKB_cjs.getObservationsAsOf; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "hasCurrentTaskSection", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkLEAP5DKB_cjs.hasCurrentTaskSection; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "injectAnchorIds", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkLEAP5DKB_cjs.injectAnchorIds; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "optimizeObservationsForContext", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkLEAP5DKB_cjs.optimizeObservationsForContext; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "parseAnchorId", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkLEAP5DKB_cjs.parseAnchorId; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "parseObservationGroups", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkLEAP5DKB_cjs.parseObservationGroups; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "parseObserverOutput", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkLEAP5DKB_cjs.parseObserverOutput; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "reconcileObservationGroupsFromReflection", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkLEAP5DKB_cjs.reconcileObservationGroupsFromReflection; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "renderObservationGroupsForReflection", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkLEAP5DKB_cjs.renderObservationGroupsForReflection; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "stripEphemeralAnchorIds", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkLEAP5DKB_cjs.stripEphemeralAnchorIds; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "stripObservationGroups", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkLEAP5DKB_cjs.stripObservationGroups; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "wrapInObservationGroup", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkLEAP5DKB_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-UHQBCO7I.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
|