This draft sets the foundation for an Alexa-skill REST API:
/v1/*endpoints return Alexa-friendly JSON{ ok, speech, card?, data }./openapi.jsonpublishes a placeholder spec for skill-side integration.wrangler.tomlnow points to dist/index.js and includes placeholder bindings for D1, KV, R2.- TypeScript build pipeline via
tsconfig.jsonandpnpm build. /v1/ai/summarydemonstrates Workers AI usage via the Vercel AI SDK.- Configurable AI Models: Environment variables for easy AI model switching without code changes.
- ✅ Generated Runtime Types: Migrated from
@cloudflare/workers-typesto Wrangler v4 generated types - ✅ Configurable AI Models: AI models are now configurable via environment variables (see
AI_MODELS.md) - ✅ WebSocket Support: Durable Object-based WebSocket server for real-time Home Assistant communication
- ✅ Test Coverage: Comprehensive test suite with 11 passing tests
pnpm i
pnpm devpnpm deploy- Implement LAN scan (via Tunnel) and D1 upsert in
/v1/devices/scan. - Implement UniFi Protect client and snapshot-to-R2 in
/v1/protect/*. - Add tracing tables (
events,actions) and KV rate limiting middleware.