9 Commits

Author SHA1 Message Date
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
8374d18189 feat(bot): add shared topic router 2026-03-12 17:12:26 +04:00
be4d388e2f refactor(config): remove single-household deploy legacy 2026-03-10 18:50:44 +04:00
de86706f4f chore(infra): codify telegram command sync access 2026-03-09 05:29:30 +04:00
89d9d751e4 docs(terraform): align secret id examples 2026-03-09 03:03:59 +04:00
c8b17136be fix(review): harden miniapp auth and finance flows 2026-03-09 00:30:31 +04:00
fd0680c8ef feat(infra): add reminder scheduler jobs 2026-03-08 22:23:19 +04:00
082d0f7dcc fix(infra): align bot runtime config with terraform 2026-03-08 20:10:28 +04:00
d393c08263 feat(WHE-28): add terraform baseline for cloud run and scheduler 2026-03-05 03:36:54 +04:00