# Copy to .env for local development (never commit .env — see .gitignore). # `npm run dev` loads it through Node's `--env-file-if-exists=.env` # (stable since Node 24.10; verified on this box with tsx watch 2026-09-14). # Production gets its env from the platform — nothing else reads this file. # Config is env-only; business mappings live in the tenant (PRD ARN-004), not here. # HTTP surface WORKER_HOST=0.0.0.0 WORKER_PORT=8080 # Shared bearer token for /webhooks/* and /admin/* (placeholder auth — PRD OQ-6). # Unset => guarded endpoints fail closed with 401. WORKER_BEARER_TOKEN= # Arena PLM (api.arenasolutions.com/v1) ARENA_API_URL=https://api.arenasolutions.com/v1 ARENA_API_EMAIL= ARENA_API_PASSWORD= ARENA_WORKSPACE_ID= # Session cache lifetime in minutes. Arena sessions expire after ~25 min # inactivity [KNOWLEDGE.md 2026-09-04]; default refreshes 1 min early. ARENA_SESSION_TTL_MINUTES=24 # Per-request deadline for Arena HTTP calls (AbortSignal.timeout). ARENA_HTTP_TIMEOUT_MS=30000 # Delta poller ARENA_POLL_INTERVAL_SECONDS=300 # Ingest buffer bound (transient in-memory buffer, ARN-003 — never durable # worker-local storage). When full: webhook => 503 + Retry-After, poll => drop. WEBHOOK_QUEUE_MAX_SIZE=10000 # Graceful shutdown: max wait for in-flight sync runs / poll tick on # SIGINT/SIGTERM. Exit 0 when drained, 1 when this deadline wins. SHUTDOWN_TIMEOUT_MS=30000 # Sync chain execution order (ARN-001). Comma-separated permutation/subset of # PRODUCT,CHANGE_MASTER,BOM,DOCUMENT — each at most once. SYNC_OBJECT_ORDER=PRODUCT,CHANGE_MASTER,BOM,DOCUMENT