@pilotoo/chat-protocol
Introduction
Section titled “Introduction”@pilotoo/chat-protocol defines what the server and the clients say to each other: commands, events, envelopes and errors, as Zod schemas with every type inferred from them. It is strict about what a client sends and permissive about what it reads. Every other package depends on it, and it depends only on zod. You rarely install it by hand; you import it when you validate messages yourself or write a custom transport.
Installation
Section titled “Installation”@pilotoo/chat-protocol is at version 0.1.0 and is not published to a registry yet. A host gets it today by packing the tarballs from the kit repository:
pnpm installpnpm release:checkrelease:check builds the release packages and writes one .tgz per package to node_modules/.cache/release-check/. Copy the tarballs you need into your project (for example vendor/) and depend on them as files:
{ "dependencies": { "@pilotoo/chat-protocol": "file:vendor/pilotoo-chat-protocol-0.1.0.tgz" }}The release set (chat-protocol, chat-core, chat-ui, ui, agent-runtime, server, local-server) is versioned together: install every kit package you use at the same version. See Installation for the full setup.
Basic usage
Section titled “Basic usage”import { PROTOCOL_VERSION, startRunCommandSchema, type StartRunCommand } from '@pilotoo/chat-protocol';
const command: StartRunCommand = startRunCommandSchema.parse(input);console.log(PROTOCOL_VERSION); // { major: 1, minor: 17 }Entry points
Section titled “Entry points”The package has no exports map; it has a single entry, the package root (main: dist/index.js).
| Import | Provides |
|---|---|
@pilotoo/chat-protocol |
PROTOCOL_VERSION, the command schemas (startRunCommandSchema, resumeRunCommandSchema, …), agUiEventSchema, streamEnvelopeSchema, protocolErrorSchema, threadMessagesResponseSchema and the inferred types. |
Peer dependencies
Section titled “Peer dependencies”None. zod (4.3.6) is a regular dependency.
Learn more
Section titled “Learn more”- Wire protocol: commands, events and versioning.
- The life of a run.
- Packages and boundaries.