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

Function assertValidSessionLineage

packages/storage/src/session-store.ts:1074–1084  ·  view source on GitHub ↗
(header: SessionHeader)

Source from the content-addressed store, hash-verified

1072}
1073
1074function assertValidSessionLineage(header: SessionHeader): void {
1075 if (!isValidConversationCopyLineage(header)) {
1076 throw new Error('Invalid Session conversation-copy lineage');
1077 }
1078 if (!isValidRevisionLineage(header)) {
1079 throw new Error('Invalid session revision lineage');
1080 }
1081 if (!isValidSubagentSessionLineage(header)) {
1082 throw new Error('Invalid subagent session lineage');
1083 }
1084}
1085
1086function isValidConversationCopyLineage(header: SessionHeader): boolean {
1087 const copy = header.conversationCopy;

Callers 1

buildSessionHeaderFunction · 0.85

Calls 3

isValidRevisionLineageFunction · 0.85

Tested by

no test coverage detected