Light Dark

Functions

get

fn (key: Str | Var): Any
fn (key: Str | Var, default-value: Any): Any

Retrieve a value from the execution context by key.

With one argument, returns the stored value or null if key is not set. With two arguments, returns default-value when the key is unset or stored as null.

Example


api-key ::hot::ctx/get("anthropic.api.key")
model   ::hot::ctx/get("brain.model", "claude-sonnet-4-5")

set

fn (ctx-map: Map)
fn (key: Str | Var, value: Any): Any

Store value in the execution context under key.

If the key is defined in ctx metadata, the secret setting of the key determines whether the value is masked in logs.

set-secret

fn (ctx-map: Map)
fn (key: Str | Var, value: Any): Any

Store value in the execution context under key, explicitly marking it as a secret.

Prefer this over ::hot::ctx/set for runtime-created secrets that are not defined in ctx metadata, so that the value will be masked in logs.