@jungjaehoon/mama-core 5.1.0 → 5.2.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/README.md +1 -1
- package/dist/memory/api.d.ts +2 -0
- package/dist/memory/api.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ The shared engine for storage, records and revisions, evidence links, memory, se
|
|
|
4
4
|
runtime drivers. Consumers supply their own database, principals, source access and product
|
|
5
5
|
vocabulary through public exports. Core does not require the MAMA OS daemon.
|
|
6
6
|
|
|
7
|
-
Version **5.
|
|
7
|
+
Version **5.2.0**; Node.js 22.13+. This README describes the current rebuild checkout.
|
|
8
8
|
See [architecture](../../docs/explanation/architecture.md) and
|
|
9
9
|
[the shared-engine goal](../../INTENT.md).
|
|
10
10
|
|
package/dist/memory/api.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export declare function buildDecisionId(topic: string): string;
|
|
|
30
30
|
export interface ReadMemoryRecordsOptions {
|
|
31
31
|
kind?: MemoryKindFilter;
|
|
32
32
|
status?: MemoryStatus | readonly MemoryStatus[];
|
|
33
|
+
/** Leave out records that only amend another (a retirement or an outcome change), as recall does. */
|
|
34
|
+
excludeAmendments?: boolean;
|
|
33
35
|
}
|
|
34
36
|
/** Read complete memory records whose stored scopes intersect the admitted scopes. */
|
|
35
37
|
export declare function readMemoryRecordsInScopes(adapter: DatabaseInstance, scopes: readonly MemoryScopeRef[], options?: ReadMemoryRecordsOptions): Promise<MemoryRecord[]>;
|
package/dist/memory/api.js
CHANGED
|
@@ -167,6 +167,9 @@ async function readMemoryRecordsInScopes(adapter, scopes, options = {}) {
|
|
|
167
167
|
conditions.push(`COALESCE(d.status, 'active') IN (${statuses.map(() => '?').join(', ')})`);
|
|
168
168
|
params.push(...statuses);
|
|
169
169
|
}
|
|
170
|
+
if (options.excludeAmendments === true) {
|
|
171
|
+
conditions.push(`json_extract(d.payload_json, '$.amended') IS NULL`);
|
|
172
|
+
}
|
|
170
173
|
const rows = adapter
|
|
171
174
|
.prepare(`SELECT d.id, d.topic, d.decision, d.reasoning, d.confidence, d.created_at, d.updated_at,
|
|
172
175
|
d.trust_context, d.kind, d.status, d.summary, d.event_date, d.event_datetime,
|