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

Function isSessionConversationCopy

packages/core/src/session.ts:478–489  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

476
477/** Strict decoder guard for Host-owned conversation-copy publication state. */
478export 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
491export function subagentSessionRuntimeSummary(
492 value: SubagentSessionRuntime,

Callers 1

Calls 4

isRecordFunction · 0.90
hasExactShapeFunction · 0.85
isSessionLineageIdFunction · 0.85
testMethod · 0.65

Tested by

no test coverage detected