fix+feat: morning QA fixes, worklist pagination, misc sidecar improvements

- caller-resolution: drop cache, use indexed phone filter (lead.contactPhone.primaryPhoneNumber.like)
- worklist: externalize page size (WORKLIST_PAGE_SIZE × WORKLIST_MAX_PAGES), paginate getMissedCalls/getAssignedLeads/getPendingFollowUps
- maint: unlock-agent, force-ready, backfill-caller-resolution, clear-analysis-cache, fix-timestamps
- ozonetel agent.service: force logout+re-login on "already logged in"
- ai chat: context expansion
- livekit-agent: updates
- widget: session handling
- masterdata: clinic list cache

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-15 06:49:02 +05:30
parent b6b597fdda
commit fbe782b5ac
17 changed files with 685 additions and 269 deletions

View File

@@ -22,6 +22,16 @@ export default () => ({
missedQueue: {
pollIntervalMs: parseInt(process.env.MISSED_QUEUE_POLL_INTERVAL_MS ?? '30000', 10),
},
worklist: {
// Per-page fetch size from the platform GraphQL endpoint. Tuned to
// balance response size vs. page count. Platform's Relay pagination
// typically caps at 100200 per page.
pageSize: parseInt(process.env.WORKLIST_PAGE_SIZE ?? '50', 10),
// Hard ceiling on pages fetched per poll. Safety valve against
// unbounded cost when a tenant has thousands of pending callbacks.
// maxPages * pageSize = effective worklist size.
maxPages: parseInt(process.env.WORKLIST_MAX_PAGES ?? '10', 10),
},
ai: {
provider: process.env.AI_PROVIDER ?? 'openai',
anthropicApiKey: process.env.ANTHROPIC_API_KEY ?? '',