MCPcopy Create free account
hub / github.com/apache/maka / normalizeEntryStatus

Function normalizeEntryStatus

packages/core/src/local-memory.ts:993–1009  ·  view source on GitHub ↗
(
  input: string | undefined,
  missingIsPending: boolean,
)

Source from the content-addressed store, hash-verified

991}
992
993function normalizeEntryStatus(
994 input: string | undefined,
995 missingIsPending: boolean,
996): LocalMemoryEntryStatus {
997 switch (input) {
998 case undefined:
999 return missingIsPending ? 'review_required' : 'active';
1000 case 'draft':
1001 case 'review_required':
1002 case 'active':
1003 case 'archived':
1004 case 'rejected':
1005 return input;
1006 default:
1007 return 'unknown';
1008 }
1009}
1010
1011function normalizeScope(input: string | undefined): LocalMemoryScope {
1012 return input === 'session' ? 'session' : 'workspace';

Callers 4

flushFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected