learning_ai_clock/backend/.env.example
saravanakumardb1 ea5adcc6ca fix(backend): harden Phase A endpoints — Zod validation, feature flag gate, state filtering
3 bugs fixed in recent Phase A code:

1. POST /api/context-message: Add Zod schema validation, feature flag gate
   (ai_context_messages.enabled), and safe body parsing. Previously had no
   validation and unsafe 'as' cast that could null-ptr on missing body.

2. GET /api/timers/availability: Filter out dismissed/completed/fired timers.
   Previously included inactive timers in occupied intervals, causing the
   endpoint to report less free time than actually available.

3. agent-actions/routes.ts: Import PRODUCT_ID from product-config.ts instead
   of hardcoding 'chronomind' string. Ensures consistency if product identity
   changes.

Also: Add EXTRACTION_SERVICE_URL + PLATFORM_SERVICE_URL to .env.example.

All 219 backend tests pass. No breaking changes.
2026-03-31 23:56:35 -07:00

23 lines
679 B
Plaintext

# ChronoMind Backend — Environment Variables
PORT=4011
HOST=0.0.0.0
NODE_ENV=development
CORS_ORIGIN=http://localhost:3000
COSMOS_ENDPOINT=https://cosmos-mywisprai.documents.azure.com:443/
COSMOS_KEY=
COSMOS_DATABASE=lysnrai
JWT_SECRET=
# RS256 JWKS verification (optional — falls back to HS256 if not set)
# PLATFORM_JWKS_URL=http://localhost:4003/auth/.well-known/jwks.json
# Field-level encryption
FIELD_ENCRYPT_KEY_PROVIDER=memory
FIELD_ENCRYPT_KEY=
FIELD_ENCRYPT_MEK_NAME=chronomind-mek
AZURE_KEYVAULT_URL=
# Platform + extraction services (optional — for AI context messages)
PLATFORM_SERVICE_URL=http://localhost:4003
EXTRACTION_SERVICE_URL=http://localhost:4005