Add freshness scoring, auto-decay, and USAGE.md

Add lastAccessedAt timestamp to nodes with schema migration and
backfill. Touch timestamp on read, apply exponential freshness decay
(~69-day half-life) to search scoring alongside BM25 and vector
weights. Add auto-decay that marks untouched nodes as stale after a
configurable threshold, with CLI command and server-side daily interval.
Include comprehensive USAGE.md documenting all CLI commands and REST API.
This commit is contained in:
2026-02-02 22:07:06 +01:00
parent d1e3adcb3c
commit f1b59a2d1a
12 changed files with 290 additions and 7 deletions

View File

@@ -14,6 +14,7 @@ export interface CortexNode {
metadata: Record<string, any>;
createdAt: number;
updatedAt: number;
lastAccessedAt?: number;
isStale?: boolean;
}