(header: SessionHeader)
| 1072 | } |
| 1073 | |
| 1074 | function 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 | |
| 1086 | function isValidConversationCopyLineage(header: SessionHeader): boolean { |
| 1087 | const copy = header.conversationCopy; |
no test coverage detected