@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 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.1.0**; Node.js 22.13+. This README describes the current rebuild checkout.
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
 
@@ -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[]>;
@@ -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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jungjaehoon/mama-core",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "MAMA Core - Shared modules for Memory-Augmented MCP Assistant",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",