(value: unknown)
| 476 | |
| 477 | /** Strict decoder guard for Host-owned conversation-copy publication state. */ |
| 478 | export function isSessionConversationCopy(value: unknown): value is SessionConversationCopy { |
| 479 | return ( |
| 480 | isRecord(value) && |
| 481 | hasExactShape(value, SESSION_CONVERSATION_COPY_SHAPE) && |
| 482 | (value.kind === 'branch' || value.kind === 'revision') && |
| 483 | isSessionLineageId(value.sourceSessionId) && |
| 484 | isSessionLineageId(value.sourceTurnId) && |
| 485 | typeof value.requestFingerprint === 'string' && |
| 486 | /^sha256:[0-9a-f]{64}$/.test(value.requestFingerprint) && |
| 487 | (value.state === 'preparing' || value.state === 'committed') |
| 488 | ); |
| 489 | } |
| 490 | |
| 491 | export function subagentSessionRuntimeSummary( |
| 492 | value: SubagentSessionRuntime, |
no test coverage detected