MCPcopy Create free account
hub / github.com/contextgo/contextgo / makeMemory

Function makeMemory

tests/unit/context-engine/contextEngineService.test.ts:38–58  ·  view source on GitHub ↗
(overrides: Partial<MemoryEntry> & Pick<MemoryEntry, 'id' | 'summary'>)

Source from the content-addressed store, hash-verified

36}
37
38function makeMemory(overrides: Partial<MemoryEntry> & Pick<MemoryEntry, 'id' | 'summary'>): MemoryEntry {
39 return {
40 id: overrides.id,
41 spaceId: SPACE_ID,
42 kind: 'workflow',
43 summary: overrides.summary,
44 detail: overrides.detail,
45 sourceIds: overrides.sourceIds ?? ['source-1'],
46 chunkIds: overrides.chunkIds ?? [],
47 confidence: overrides.confidence ?? 0.9,
48 tier: overrides.tier ?? 'experiential',
49 priority: overrides.priority ?? 'high',
50 state: overrides.state ?? 'accepted',
51 supersededById: overrides.supersededById,
52 expiresAt: overrides.expiresAt,
53 lastAccessedAt: overrides.lastAccessedAt,
54 lastConfirmedAt: overrides.lastConfirmedAt,
55 createdAt: overrides.createdAt ?? '2026-03-30T00:00:00.000Z',
56 updatedAt: overrides.updatedAt ?? '2026-03-30T00:00:00.000Z',
57 };
58}
59
60function makeChunk(overrides: Partial<ChunkRecord> & Pick<ChunkRecord, 'id' | 'documentId' | 'text'>): ChunkRecord {
61 return {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected