mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage-server
synced 2026-05-18 20:08:19 +00:00
- 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>
42 lines
1.7 KiB
TypeScript
42 lines
1.7 KiB
TypeScript
export default () => ({
|
||
port: parseInt(process.env.PORT ?? '4100', 10),
|
||
corsOrigin: process.env.CORS_ORIGIN ?? 'http://localhost:5173',
|
||
platform: {
|
||
graphqlUrl: process.env.PLATFORM_GRAPHQL_URL ?? 'http://localhost:4000/graphql',
|
||
apiKey: process.env.PLATFORM_API_KEY ?? '',
|
||
},
|
||
exotel: {
|
||
apiKey: process.env.EXOTEL_API_KEY ?? '',
|
||
apiToken: process.env.EXOTEL_API_TOKEN ?? '',
|
||
accountSid: process.env.EXOTEL_ACCOUNT_SID ?? '',
|
||
subdomain: process.env.EXOTEL_SUBDOMAIN ?? 'api.exotel.com',
|
||
webhookSecret: process.env.EXOTEL_WEBHOOK_SECRET ?? '',
|
||
},
|
||
redis: {
|
||
url: process.env.REDIS_URL ?? 'redis://localhost:6379',
|
||
},
|
||
sip: {
|
||
domain: process.env.SIP_DOMAIN ?? 'blr-pub-rtc4.ozonetel.com',
|
||
wsPort: process.env.SIP_WS_PORT ?? '444',
|
||
},
|
||
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 100–200 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 ?? '',
|
||
openaiApiKey: process.env.OPENAI_API_KEY ?? '',
|
||
model: process.env.AI_MODEL ?? 'gpt-4o-mini',
|
||
},
|
||
});
|