Semantic Store
Path:
pi-cybernetic/src/storage/semantic-store.tsRelative: src/storage/semantic-store.tsSubproject: pi-cyberneticCategory: cybernetic-coreLines: 51Bytes: 1,626Imports: 2Exports: 1
Content Preview
- /** Semantic memory — compressed summaries + entity-relation tuples, with promotion. */
- import type { CompressedSummary, EntityRelation } from "../types/index.ts";
- import { nextId } from "../util.ts";
- export class SemanticStore {
- private summaries = new Map<string, CompressedSummary>();
- private relations: EntityRelation[] = [];
- constructor(private readonly promotionCount: number) {}
- /**
- * Record an observed pattern. Creates the summary on first sight, increments
- * occurrences a