@kithjs/core
Stable adapter contracts, event types, and policy hooks. This is the foundation package — all other Kith packages depend on it.
Install
bun add @kithjs/core
What's Inside
Adapter Interfaces
RuntimeAdapter— connect/disconnect, sendText, sendAudio, bargeIn, event subscriptionVoiceAdapter— TTS synthesis and voice listingMemoryAdapter— fetch/save turn records (pass-through)ExpressionAdapter— subscribe to avatar/expression eventsObservabilityAdapter— traces, dup-send guards, reconnect tracking
Event Types (KithEvent)
12 normalized events: turn_start, turn_end, tts_start, tts_audio_chunk, tts_end, stt_partial, stt_final, viseme_frame, emotion_state, barge_in_detected, reconnect, error.
See Event Bus for the full reference.
Types
TurnId,ChunkId,SessionId— opaque string identifiersTurnRecord— a single conversational turnRuntimeConfig— session connection configVoiceOptions— provider-agnostic TTS knobsVoiceDescriptor— voice metadata
Policy
TextTransform—(text: string, ctx: TextTransformContext) => stringPersonaMode—"neutral" | "hype" | "calm" | "serious"(extensible via string)