@burtson-labs/core-chat
v1.0.6
Published
Shared chat types and utilities for Bandit surfaces.
Readme
@burtson-labs/core-chat
Shared chat message types and sanitizers used across every Bandit surface.
Tiny package, narrow surface — keeps every host on the same ChatMessage shape without dragging in the full runtime.
Install
pnpm add @burtson-labs/core-chatStatus
Stable. The type surface is intentionally narrow; expanding it requires coordinated PRs across the hosts that consume it (CLI, VS Code extension, web UI).
Quick example
import type { ChatMessage } from '@burtson-labs/core-chat';
import { sanitizeModelOutput } from '@burtson-labs/core-chat';
const messages: ChatMessage[] = [
{ role: 'system', content: 'You are Bandit.' },
{ role: 'user', content: 'Hi.' },
];
const cleaned = sanitizeModelOutput(rawModelText);sanitizeModelOutput() is the canonical pass for stripping control tokens, tool-call envelope markup, and other model-emitted artifacts that should never reach the user's screen.
License
Apache License 2.0 — Copyright 2026 Burtson Labs.
