@zalwan/chatlayer
v0.1.7
Published
Provider-agnostic headless chat state, streaming protocol, and transport for ChatLayer.
Maintainers
Readme
@zalwan/chatlayer
Headless, provider-agnostic chat runtime for ChatLayer — the open-source layer for AI chatbots.
createChat()+ Svelte-compatible stores (messages,status,error)- Streaming-first NDJSON protocol (
message.start→message.delta→message.end→error) HttpTransport+parseNdjsonStream,AbortSignal,retry/regenerate/stop- TypeScript, zero UI, bring your own AI
import { createChat, HttpTransport } from "@zalwan/chatlayer";
const chat = createChat({ transport: new HttpTransport("/api/chat") });
chat.messages.subscribe(console.log);
await chat.send("Hello");See root README and PROTOCOL. Svelte UI lives in @zalwan/chatlayer-svelte.
