revision.ts 683 B

123456789101112131415161718
  1. /** Opaque revision identity for lightweight persistence observations. */
  2. import type { Branded } from '@deepseek-ai/dsh-brand'
  3. /**
  4. * Backend-owned token that identifies both one storage source and one revision
  5. * of a persisted session log.
  6. */
  7. export type SessionPersistenceRevision = Branded<'SessionPersistenceRevision'>
  8. /**
  9. * Brand a backend revision for the provider-neutral persistence contract.
  10. * @param value - backend-owned opaque revision representation.
  11. * @returns the same runtime string with persistence-revision identity.
  12. */
  13. export function SessionPersistenceRevision(value: string): SessionPersistenceRevision {
  14. return value as SessionPersistenceRevision
  15. }