Skip to content

Configuration

Client configuration values and config-file helpers.

Selects the API endpoint, credentials, config file, and request timeout.

interface RuntaConfig
NameTypeDescription
configPath?stringConfiguration file path.
endpoint?stringResolved Runta API endpoint.
fetch?(input: URL | RequestInfo, init?: RequestInit) => Promise<Response>Custom Fetch implementation.
timeoutMs?numberRequest timeout in milliseconds.
token?stringBearer token used for authentication.
userAgent?stringUser-Agent header sent with requests.

Default Runta control-plane endpoint.

const DEFAULT_ENDPOINT: "https://api.runta.dev"

Reads endpoint and token values from the Runta TOML config file.

function readRuntaConfig(configPath?: string): { endpoint?: string; token?: string }
NameTypeDefaultDescription
configPath?stringOptionalPath to the Runta TOML configuration file.
  • { endpoint?: string; token?: string }

Resolves explicit, environment, and config-file client settings.

function resolveConfig(input: { configPath?: string; endpoint?: string; token?: string }): ResolvedConfig
NameTypeDefaultDescription
input{ configPath?: string; endpoint?: string; token?: string }RequiredExplicit client configuration values.
  • ResolvedConfig