@juspay/neurolink
Version:
The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002
53 lines (52 loc) • 2.24 kB
TypeScript
/**
* Environment resolution for the LiveKit voice agent.
*
* Reads LiveKit connection settings and LLM defaults from `process.env` with
* descriptive errors for missing required values. No type assertions: presence
* is verified with explicit string checks.
*
* See docs/features/livekit-voice-agent.md.
*/
import type { LiveKitServerConfig, LiveKitBrainDefaults, RealtimeVoiceConfig } from "../../types/index.js";
/**
* Resolve LiveKit server connection settings from the environment.
*
* Requires `LIVEKIT_URL`, `LIVEKIT_API_KEY`, and `LIVEKIT_API_SECRET`. Works
* identically for LiveKit Cloud, a self-hosted server, or `livekit-server --dev`
* — only the values differ.
*/
export declare function resolveLiveKitServerConfig(): LiveKitServerConfig;
/**
* Resolve the LLM provider/model defaults for the brain.
*
* Defaults to Bedrock / Claude; overridable via `VOICE_LLM_PROVIDER` and
* `VOICE_LLM_MODEL`.
*/
export declare function resolveBrainDefaults(): LiveKitBrainDefaults;
/**
* Resolve the realtime (Gemini Live speech-to-speech) voice configuration from
* the environment.
*
* Every value has a safe default so a worker can run with no realtime-specific
* env at all. Vertex `project` is resolved from `VERTEX_PROJECT`, then the
* service-account project (`GOOGLE_AUTH_BREEZE_PROJECT_ID`), then
* `GOOGLE_CLOUD_PROJECT_ID`. The MCP URL is `VOICE_MCP_URL` if set, otherwise
* `${LIGHTHOUSE_URL}/ai/mcp/v2`.
*/
export declare function resolveRealtimeVoiceConfig(): RealtimeVoiceConfig;
/**
* Resolve the semantic end-of-utterance (EOU) turn-detection settings.
*
* Opt-in via `LIVEKIT_EOU_TURN_DETECTION` (`1`/`true`/`english`/`en`/`on`/`yes`).
* When enabled, the English `@livekit/agents-plugin-livekit` EOU model decides
* whether the user's turn is truly over, layered on top of VAD silence — so
* natural mid-sentence pauses don't split one utterance. English-only; the
* model adds ~200MB RAM per worker and ~10ms per turn-end.
*
* `LIVEKIT_EOU_UNLIKELY_THRESHOLD` optionally overrides the model's confidence
* threshold (lower = end the turn more eagerly).
*/
export declare function resolveEouTurnDetection(): {
enabled: boolean;
unlikelyThreshold: number | undefined;
};