Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

1.0 KB
Raw Blame
import type { Region } from "@linger/service-kit";
import { serviceCredential } from "@linger/service-kit/node";
import { teamHubBaseUrl } from "../teamhub-base-url.js";

export interface VoiceConfig {
  readonly teamHubBaseUrl: string;
  /** Reads provider keys from TeamHub; undefined without LINGER_SECRET_SEED. */
  readonly teamHubCredential: string | undefined;
  /** Authenticates TeamHub's reconcile notifications. */
  readonly managementCredential: string | undefined;
  /**
   * The download region the installer resolved (SIMPLEX_REGION); model
   * packages come from its registry first. Global when unset.
   */
  readonly region: Region;
}

export function readVoiceConfig(environment: NodeJS.ProcessEnv): VoiceConfig {
  return Object.freeze({
    teamHubBaseUrl: teamHubBaseUrl(environment),
    teamHubCredential: serviceCredential("voice-runtime", environment),
    managementCredential: serviceCredential(
      "node-services-internal",
      environment,
    ),
    region: environment.SIMPLEX_REGION === "cn" ? "cn" : "global",
  });
}