@framers/agentos 0.10.10 → 0.10.12
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/README.md +2 -1
- package/dist/api/generateText.d.ts +10 -3
- package/dist/api/generateText.d.ts.map +1 -1
- package/dist/api/generateText.js.map +1 -1
- package/dist/cognition/memory/AgentMemory.d.ts +4 -0
- package/dist/cognition/memory/AgentMemory.d.ts.map +1 -1
- package/dist/cognition/memory/AgentMemory.js +56 -17
- package/dist/cognition/memory/AgentMemory.js.map +1 -1
- package/dist/cognition/memory/CognitiveMemoryManager.d.ts +6 -0
- package/dist/cognition/memory/CognitiveMemoryManager.d.ts.map +1 -1
- package/dist/cognition/memory/CognitiveMemoryManager.js +100 -8
- package/dist/cognition/memory/CognitiveMemoryManager.js.map +1 -1
- package/dist/cognition/memory/io/extension/CognitiveMemoryExtension.d.ts.map +1 -1
- package/dist/cognition/memory/io/extension/CognitiveMemoryExtension.js +8 -2
- package/dist/cognition/memory/io/extension/CognitiveMemoryExtension.js.map +1 -1
- package/dist/cognition/memory/pipeline/consolidation/ConsolidationPipeline.d.ts +7 -0
- package/dist/cognition/memory/pipeline/consolidation/ConsolidationPipeline.d.ts.map +1 -1
- package/dist/cognition/memory/pipeline/consolidation/ConsolidationPipeline.js +84 -55
- package/dist/cognition/memory/pipeline/consolidation/ConsolidationPipeline.js.map +1 -1
- package/dist/cognition/memory/retrieval/store/Brain.d.ts +14 -2
- package/dist/cognition/memory/retrieval/store/Brain.d.ts.map +1 -1
- package/dist/cognition/memory/retrieval/store/Brain.js +264 -15
- package/dist/cognition/memory/retrieval/store/Brain.js.map +1 -1
- package/dist/cognition/memory/retrieval/store/MemoryStore.d.ts +41 -2
- package/dist/cognition/memory/retrieval/store/MemoryStore.d.ts.map +1 -1
- package/dist/cognition/memory/retrieval/store/MemoryStore.js +676 -131
- package/dist/cognition/memory/retrieval/store/MemoryStore.js.map +1 -1
- package/dist/core/llm/providers/model-effort.d.ts +8 -4
- package/dist/core/llm/providers/model-effort.d.ts.map +1 -1
- package/dist/core/llm/providers/model-effort.js +29 -4
- package/dist/core/llm/providers/model-effort.js.map +1 -1
- package/package.json +1 -1
|
@@ -62,6 +62,8 @@ export declare class MemoryStore {
|
|
|
62
62
|
private embeddingCache;
|
|
63
63
|
/** Process-local deletion barrier for asynchronous vector refreshes and hydration. */
|
|
64
64
|
private tombstonedTraceIds;
|
|
65
|
+
/** Tombstones whose local delete has not been durably confirmed. */
|
|
66
|
+
private authoritativeTombstoneIds;
|
|
65
67
|
/** Track concrete scopes we have seen, so retrieval never falls back to a fake wildcard scope. */
|
|
66
68
|
private knownScopes;
|
|
67
69
|
/** Optional cognitive mechanisms engine for retrieval-time hooks. */
|
|
@@ -75,13 +77,24 @@ export declare class MemoryStore {
|
|
|
75
77
|
private brain;
|
|
76
78
|
/** Whether {@link MemoryStore.ensureHydratedFromBrain} has already run for this instance. */
|
|
77
79
|
private brainHydrated;
|
|
80
|
+
/** Namespace shared by stores that address the same backing resource. */
|
|
81
|
+
private coordinationNamespace;
|
|
82
|
+
/** Lifecycle-registered callbacks used to invalidate sibling store caches. */
|
|
83
|
+
private readonly coordinationTarget;
|
|
84
|
+
private coordinationRegistration;
|
|
85
|
+
private disposed;
|
|
86
|
+
/** Brain attachment is immutable once any memory operation has started. */
|
|
87
|
+
private brainAttachmentLocked;
|
|
78
88
|
constructor(config: MemoryStoreConfig);
|
|
79
89
|
/**
|
|
80
90
|
* Attach a Brain for durable write-through persistence.
|
|
81
91
|
* Once attached, all store/softDelete/recordAccess operations also
|
|
82
|
-
* write to the brain's `memory_traces` table.
|
|
92
|
+
* write to the brain's `memory_traces` table. Initial attachment must happen
|
|
93
|
+
* before any memory operation; after that, only another handle with the same
|
|
94
|
+
* coordination token can be supplied.
|
|
83
95
|
*
|
|
84
96
|
* @param brain - Brain instance (already initialized with schema)
|
|
97
|
+
* @throws When attachment is late or would switch backing resources.
|
|
85
98
|
*/
|
|
86
99
|
setBrain(brain: import('./Brain.js').Brain): void;
|
|
87
100
|
/**
|
|
@@ -89,6 +102,24 @@ export declare class MemoryStore {
|
|
|
89
102
|
* Returns null when no brain is attached (in-memory only mode).
|
|
90
103
|
*/
|
|
91
104
|
getBrain(): import('./Brain.js').Brain | null;
|
|
105
|
+
/**
|
|
106
|
+
* Remove this store from sibling coordination. Recall and mutation methods
|
|
107
|
+
* reject after disposal; diagnostic cache accessors remain available.
|
|
108
|
+
*/
|
|
109
|
+
dispose(): void;
|
|
110
|
+
private assertNotDisposed;
|
|
111
|
+
private beginOperation;
|
|
112
|
+
private markDeletedLocally;
|
|
113
|
+
private evictDeletedLocally;
|
|
114
|
+
private reviveLocally;
|
|
115
|
+
private getDurableTraceRows;
|
|
116
|
+
private reconcileDurableTraceStates;
|
|
117
|
+
/**
|
|
118
|
+
* Return the subset of cached trace IDs that remain recallable after a
|
|
119
|
+
* fail-closed durable-state check. Used by non-vector recall paths such as
|
|
120
|
+
* graph association injection so a tombstone cannot bypass vector filters.
|
|
121
|
+
*/
|
|
122
|
+
filterRecallableTraceIds(traceIds: string[]): Promise<Set<string>>;
|
|
92
123
|
/**
|
|
93
124
|
* Hydrate the in-memory vector store + scope registry from the attached
|
|
94
125
|
* Brain on first use. The Brain is the durable backing store, but the vector
|
|
@@ -106,6 +137,7 @@ export declare class MemoryStore {
|
|
|
106
137
|
* and record as episodic memory in the knowledge graph.
|
|
107
138
|
*/
|
|
108
139
|
store(trace: MemoryTrace): Promise<void>;
|
|
140
|
+
private storeWithTraceLock;
|
|
109
141
|
/**
|
|
110
142
|
* Query memory traces with cognitive scoring.
|
|
111
143
|
*/
|
|
@@ -127,6 +159,7 @@ export declare class MemoryStore {
|
|
|
127
159
|
* Updates decay parameters via spaced repetition.
|
|
128
160
|
*/
|
|
129
161
|
recordAccess(traceId: string): Promise<RetrievalUpdateResult | null>;
|
|
162
|
+
private recordAccessWithTraceLock;
|
|
130
163
|
/**
|
|
131
164
|
* Get all traces for a scope (for consolidation pipeline).
|
|
132
165
|
*
|
|
@@ -149,10 +182,16 @@ export declare class MemoryStore {
|
|
|
149
182
|
* not be durably updated.
|
|
150
183
|
*/
|
|
151
184
|
persistTraceMetadata(traceId: string): Promise<void>;
|
|
185
|
+
private persistTraceMetadataWithTraceLock;
|
|
152
186
|
/**
|
|
153
|
-
* Soft-delete a trace
|
|
187
|
+
* Soft-delete a trace and preserve the local barrier if durable persistence
|
|
188
|
+
* cannot confirm the tombstone.
|
|
189
|
+
*
|
|
190
|
+
* @throws When an attached Brain cannot persist the tombstone or the trace
|
|
191
|
+
* has no durable row to update.
|
|
154
192
|
*/
|
|
155
193
|
softDelete(traceId: string): Promise<void>;
|
|
194
|
+
private softDeleteWithTraceLock;
|
|
156
195
|
/**
|
|
157
196
|
* Get a trace by ID.
|
|
158
197
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryStore.d.ts","sourceRoot":"","sources":["../../../../../src/cognition/memory/retrieval/store/MemoryStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAC1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,yBAAyB,EACzB,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,gCAAgC,CAAC;AAmBxC;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,SAAS,IAAI,MAAM,EAAE,CAExF;AAMD,MAAM,WAAW,iBAAiB;IACh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