Deterministic summary extraction and title generation for support integrations.
- Deterministic, no AI/network dependency
- Tunable extraction/scoring rules
- Presets for Telegram, WhatsApp, and Discord
- Bun-native test suite
- CLI preview mode for fast tuning
- Runtime target: Node.js 26
- Supported runtime versions: Node.js 22, 24, 26
- Toolchain: Bun + Biome + bun test
bun add @wgtechlabs/summary-engineimport { buildTitle, telegramPreset } from "@wgtechlabs/summary-engine";
const title = buildTitle(
{
summary:
"A subset of users cannot complete password reset because reset links intermittently return token expired.",
customerName: "Acme Corp"
},
telegramPreset
);
console.log(title);
// [Telegram] Cannot complete password resetBuilds a full title string with fallback order:
- Prefix + extracted summary
- Prefix + customer + fallback suffix
- Prefix + fallback new ticket
Extracts a compact issue-focused summary clause from noisy support text.
Creates a reusable engine instance with shared config.
bun run preview --summary "I need help with my account login, I can't login for some reason" --customer "Acme Corp" --platform telegrambun run build
bun run typecheck
bun run lint
bun run test
bun run previewGPL-3.0