/** * Kernel enums, lifted verbatim from the Bottom-Up Evolution Atlas ยง10 DDL. * Exposed as const arrays + derived union types so they are usable both as * compile-time types and for runtime validation. */ export const ACTOR_KINDS = ['HUMAN', 'AI', 'SERVICE', 'BOT', 'UNKNOWN'] as const; export type ActorKind = (typeof ACTOR_KINDS)[number]; export const HANDLE_KINDS = [ 'PORTAL_USER', 'EMAIL', 'PHONE', 'WHATSAPP', 'SLACK', 'MATTERMOST', 'TELEGRAM', 'EXTERNAL_VISITOR', ] as const; export type HandleKind = (typeof HANDLE_KINDS)[number]; export const INTERACTION_KINDS = [ 'MESSAGE', 'EMAIL', 'SYSTEM_NOTICE', 'INBOX_WORK', 'SUPPORT_CASE', 'MEETING_REQUEST', 'DIGEST', 'SUMMARY', 'NOTIFICATION', ] as const; export type InteractionKind = (typeof INTERACTION_KINDS)[number]; export const MESSAGE_PART_KINDS = [ 'TEXT', 'HTML', 'MARKDOWN', 'MEDIA_REF', 'FILE_REF', 'VOICE_REF', 'LOCATION', 'STRUCTURED_JSON', ] as const; export type MessagePartKind = (typeof MESSAGE_PART_KINDS)[number]; export const DELIVERY_STATES = [ 'RECEIVED', 'NORMALIZED', 'POLICY_HELD', 'STORED', 'DELIVERED', 'READ', 'FAILED', 'DELETED_LOCAL', 'REDACTED', ] as const; export type DeliveryState = (typeof DELIVERY_STATES)[number];