12 lines
441 B
TypeScript
12 lines
441 B
TypeScript
export const MEMORY_CATEGORIES = ['facts', 'preferences', 'decisions', 'projects'] as const;
|
|
|
|
export type MemoryCategory = (typeof MEMORY_CATEGORIES)[number];
|
|
|
|
export function isMemoryCategory(value: string): value is MemoryCategory {
|
|
return (MEMORY_CATEGORIES as readonly string[]).includes(value);
|
|
}
|
|
|
|
export function categoryNamespace(baseNamespace: string, category: MemoryCategory): string {
|
|
return `${baseNamespace}/${category}`;
|
|
}
|