Class MemoryConsolidator
Background consolidation service that periodically reads recent daily logs
and updates the long-term MEMORY.md file for each project.
public sealed class MemoryConsolidator : IDisposable
- Inheritance
-
MemoryConsolidator
- Implements
- Inherited Members
Constructors
MemoryConsolidator(IMemoryService, TimeSpan?)
Creates a consolidator that runs in the background, updating MEMORY.md
files every checkInterval.
public MemoryConsolidator(IMemoryService memory, TimeSpan? checkInterval = null)
Parameters
memoryIMemoryServiceThe memory service to read/write.
checkIntervalTimeSpan?How often to check for consolidation (default: 1 hour).
Methods
ConsolidateAsync(CancellationToken)
Triggers an immediate consolidation for all known projects. Called internally on the background schedule; safe to invoke manually.
public Task ConsolidateAsync(CancellationToken ct = default)
Parameters
Returns
ConsolidateProjectAsync(string, CancellationToken)
Consolidates a single project's daily logs into its MEMORY.md file. Reads logs from the last 7 days and appends a summary section.
public Task ConsolidateProjectAsync(string projectId, CancellationToken ct = default)
Parameters
projectIdstringctCancellationToken
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()