agent-working-memory 0.4.3 → 0.5.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.
@@ -40,6 +40,13 @@ export interface Engram {
40
40
  // Episode grouping
41
41
  episodeId: string | null;
42
42
 
43
+ // Memory class
44
+ memoryClass: MemoryClass;
45
+
46
+ // Supersession — "this replaces that" (not retraction — original wasn't wrong, just outdated)
47
+ supersededBy: string | null; // ID of the engram that replaced this one
48
+ supersedes: string | null; // ID of the engram this one replaces
49
+
43
50
  // Task management (null = not a task)
44
51
  taskStatus: TaskStatus | null;
45
52
  taskPriority: TaskPriority | null;
@@ -51,6 +58,18 @@ export type EngramStage = 'staging' | 'active' | 'consolidated' | 'archived';
51
58
  export type TaskStatus = 'open' | 'in_progress' | 'blocked' | 'done';
52
59
  export type TaskPriority = 'urgent' | 'high' | 'medium' | 'low';
53
60
 
61
+ /**
62
+ * Memory class — controls salience floor and recall priority.
63
+ *
64
+ * canonical: Source-of-truth facts (current state, decisions, architecture).
65
+ * Never goes to staging. Minimum salience 0.7.
66
+ * working: Normal observations, learnings, context (default).
67
+ * Standard salience rules apply.
68
+ * ephemeral: Temporary context (debugging traces, session-specific notes).
69
+ * Stronger time decay, lower recall priority.
70
+ */
71
+ export type MemoryClass = 'canonical' | 'working' | 'ephemeral';
72
+
54
73
  /**
55
74
  * Raw feature scores that produced the salience score.
56
75
  * Persisted for auditability and tuning.
@@ -75,6 +94,8 @@ export interface EngramCreate {
75
94
  reasonCodes?: string[];
76
95
  episodeId?: string;
77
96
  ttl?: number;
97
+ memoryClass?: MemoryClass;
98
+ supersedes?: string;
78
99
  taskStatus?: TaskStatus;
79
100
  taskPriority?: TaskPriority;
80
101
  blockedBy?: string;