11 Commits

Author SHA1 Message Date
0747973c8f feat(db): add rent_payment_destinations column and multi-schema support
- Add migration 0020 for rent_payment_destinations jsonb column
- Add DB_SCHEMA env var support for multi-schema deployments
- Create custom migrate.ts script with proper search_path handling
- Update drizzle.config.ts and client.ts to use DB_SCHEMA
- Add db_schema variable to Terraform with dev=test/prod=public defaults
- Update CD workflow to set DB_SCHEMA based on branch
2026-03-15 20:26:26 +04:00
f38ee499ae feat(bot): unified topic processor replacing router+interpreter stack
Replace 3-layer architecture (gpt-5-nano router + gpt-4o-mini interpreter) with
single unified topic processor (gpt-4o-mini) for simplified message handling.

New components:
- HouseholdContextCache: TTL-based caching (5 min) for household config data
- TopicProcessor: Unified classification + parsing with structured JSON output

Key changes:
- Renamed ASSISTANT_ROUTER_MODEL → TOPIC_PROCESSOR_MODEL
- Added TOPIC_PROCESSOR_TIMEOUT_MS (default 10s)
- Refactored save() → saveWithInterpretation() for pre-parsed interpretations
- Removed deprecated createOpenAiTopicMessageRouter and ~300 lines legacy code
- Fixed typing indicator to only start when needed (purchase routes)
- Fixed amount formatting: convert minor units to major for rawText

Routes: silent, chat_reply, purchase, purchase_clarification, payment,
payment_clarification, topic_helper, dismiss_workflow

All 212 bot tests pass. Typecheck, lint, format, build clean.
2026-03-14 13:33:57 +04:00
60a5cd332e chore(config): align default ai model settings 2026-03-11 04:51:51 +04:00
4dd469a0fe chore(bot): log assistant stage timings 2026-03-11 03:41:03 +04:00
3c0a53981a chore(infra): align bot runtime env configuration 2026-03-11 02:43:28 +04:00
be4d388e2f refactor(config): remove single-household deploy legacy 2026-03-10 18:50:44 +04:00
16f9981fee feat(bot): add multi-household reminder delivery 2026-03-09 16:50:57 +04:00
8645a0a096 feat(observability): add structured pino logging 2026-03-09 01:03:08 +04:00
67e9e2dee2 feat(WHE-22): ingest configured topic messages with idempotent persistence 2026-03-05 04:32:58 +04:00
f8c3e4ccf5 feat(WHE-21): scaffold grammy webhook bot server 2026-03-05 04:17:04 +04:00
8086044938 feat(WHE-27): add drizzle db package and typed env config 2026-03-05 03:05:02 +04:00