File size: 1,017 Bytes
a8f4b72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { randomUUID } from 'node:crypto';
export { CanonService } from './CanonService.js';
export { FrontierService } from './FrontierService.js';
export { SnapshotService } from './SnapshotService.js';
export { ArchiveService, type ArchiveInput } from './ArchiveService.js';
export { PromotionService, type GovernancePromotionResult, type LogicPromotionResult, type PromotionDependencies } from './PromotionService.js';
export { ConsolidationService, type ConsolidationInput } from './ConsolidationService.js';

export interface KnowledgeRecord { id: string; project: string; kind: string; title: string; created: string; payload: unknown }

export function createKnowledgeRecord(input: Omit<KnowledgeRecord, 'created'>): KnowledgeRecord {
  return { ...input, created: new Date().toISOString() };
}

export function createProjectSnapshot(project: string, payload: unknown): KnowledgeRecord {
  return createKnowledgeRecord({ id: randomUUID(), project, kind: 'snapshot', title: `${project} snapshot`, payload });
}