@kestrel-agents/conversation is the shared, framework-neutral conversation
kernel used by Kestrel Desktop and Kestrel One. It owns identity-based turn
ownership and causally constrained transcript order,
live and persisted reconciliation, streamed activity accumulation, queue and
composer policy, typed interactions, and mode-switch retry idempotency.
The package does not include React components, native actions, transport, or styling. Each host supplies its own renderers and command adapter.
Install
pnpm add @kestrel-agents/conversation@0.8.5Project a snapshot
import {
projectConversationSnapshot,
type ConversationSnapshot,
} from "@kestrel-agents/conversation";
const projection = projectConversationSnapshot(
snapshot satisfies ConversationSnapshot
);Turn ownership comes from explicit message, turn, run, and request identities. The projector does not infer ownership from text, timestamps, or array position. After ownership is known, the host message array is the durable transcript preference. The projector preserves that order unless the turn input or a linked interaction proves that another message must appear first. Roles and UUIDs do not establish chronology.
Register host renderers
Use ConversationRendererMap<Output> to make host rendering exhaustive across
text, progress, reasoning, tools, citations, artifacts, interactions, links,
status, dialogs, and mode switching. Desktop can bind native link and dialog
actions while Kestrel One keeps its hosted visual components.