# Changelog

All notable changes to `@buzztrail-ai/engage` will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.2] - 2025-10-24

### Fixed
- **Code-Level Infrastructure Removal**: Renamed all infrastructure-specific identifiers in compiled bundle
  - `TavusClientError` → `ApiClientError`
  - `isTavusApiError` → `isApiError` (implementation, not just type alias)
  - `isDailyPostMessageEvent` → `isCallPostMessageEvent` (implementation)
  - `parseDailyEvent` → `parseCallEvent`
  - `handleDailyEvent` → `handleCallEvent`
  - `buildDailyUrl` → `buildCallUrl`
  - `createDailyTheme` → `createCallTheme`
  - String literal: "User left Daily.co meeting" → "User left conversation"

### Breaking Changes
- None - old function names still exported for backward compatibility where applicable

## [1.0.1] - 2025-10-24

### Fixed
- **Customer-Facing Package**: Removed all infrastructure provider mentions
  - Removed "Tavus" and "Daily.co" from package.json keywords
  - Changed description from "Tavus video avatars" to "AI video presenters"
  - Updated keywords to be infrastructure-agnostic
  - Added "ai-presenter", "video-conversation", "video-widget" keywords

### Documentation
- README now fully customer-facing with no provider names
- All type names genericized (ApiError, CallPostMessageEvent, etc.)
- Terminology changed: "avatar" → "AI presenter", "persona_id" → "presenter_id"

## [1.0.0] - 2025-10-24

### Initial Release

This is the first stable release of `@buzztrail-ai/engage`, a universal NPM package for AI-powered video conversations.

#### Features

- **Universal NPM Package**: Published to npm registry with automatic CDN distribution via jsDelivr and unpkg
- **Multi-Platform Support**: Works on Wix, Webflow, WordPress, Shopify, and custom websites
- **AI Video Integration**: AI-powered video conversations with interactive presenters
- **Lightweight Bundle**: < 15KB gzipped (fits Wix 15KB Custom Code limit)
- **Multiple Build Formats**:
  - IIFE (browser script tag): `buzztrail.min.js`
  - ES Module (modern bundlers): `buzztrail.esm.js`
  - UMD (universal): `buzztrail.umd.js`
- **TypeScript Support**: Full type definitions included
- **Gating Library Integration**: Optional lead capture form integration via `@buzztrail-ai/gating`
- **Domain Locking**: Server-side domain validation for customer configurations
- **Responsive Design**: Automatic breakpoint handling for desktop, tablet, and mobile
- **Auto-Initialization**: CDN script can auto-initialize using data attributes
- **Security**: API keys protected via proxy architecture (never exposed to browser)
- **Customizable UI**: Theme colors, button text, positioning, video settings
- **Multi-language Support**: Built-in i18n with custom labels
- **Browser Compatibility**: Supports modern browsers (> 0.5%, last 2 versions)

#### Distribution

- **NPM**: `npm install @buzztrail-ai/engage`
- **CDN (jsDelivr)**: `https://cdn.jsdelivr.net/npm/@buzztrail-ai/engage@1.0.0/dist/buzztrail.min.js`
- **CDN (unpkg)**: `https://unpkg.com/@buzztrail-ai/engage@1.0.0/dist/buzztrail.min.js`

#### Dependencies

- Completed Epic #167 (Universal NPM Package & CDN Distribution)
- Issue #172: Wix code extraction
- Issue #173: Build system configuration
- Issue #170: Domain locking implementation
- Issue #171: Gating library integration

#### Documentation

- Comprehensive README with installation, usage, and API documentation
- Wix integration guide with Custom Code setup
- TypeScript examples and type definitions
- Browser compatibility information
- Troubleshooting guide

#### Known Limitations

- Customer Config API (Issue #175) still in development - using hardcoded config for now
- TypeScript declarations need to be generated separately (vite-plugin-dts integration pending)
- Bundle size is currently ~30KB uncompressed (8.59KB gzipped) - target is <15KB

#### Security

- `.npmignore` configured to exclude development files, environment variables, and scripts
- Only ships dist/ folder + essential documentation
- No API keys or secrets included in published package
- Domain validation enforced server-side

---

## Release Process

Published using:
```bash
cd dist/libs/engage-package
npm publish --access public
```

CDN auto-sync occurs within 5-10 minutes of npm publish.
