Functions
info core
fn (): RunInfo
Return information about the current run execution context.
Returns a RunInfo containing details about the run, stream, build, project, env, user, and org.
Optional fields return null when not available.
Example
i info()
i.run.id // UUID of the current run
i.run.type // "call", "event", "schedule", "run", "eval", or "repl"
i.run.status // "running"
i.run.start-time // Instant when the run started
i.run.retry-attempt // Current retry attempt (0 = first try, 1 = first retry, etc.)
i.run.max-retries // Maximum retries from function meta (0 = no retries)
i.run.retry-delay // Delay between retries in milliseconds
i.run.origin-run-id // UUID of original run if this is a retry (null otherwise)
i.build.hash // Build hash (null if not available)
i.project.name // Project name (null if not available)
i.env.id // Environment UUID (null if not available)
i.env.name // Environment name (e.g. "development", "production")
i.org.id // Organization UUID (null if not available)
i.org.slug // Organization slug (e.g. "local", "acme-inc")
is-inline-run core
fn ()
Is the run type a direct run type (vs. scheduled or event triggered)
is-local-dev core
fn (): Bool
Check if running in local development mode.
Returns true when the org slug is "local" and the environment name is "development",
which is the default configuration for hot dev and hot run.
Useful for switching behavior between local development and production deployments.
Example
// Use polling in local dev, webhooks in production
if(is-local-dev(), start-polling(), use-webhooks())
Build
Alias of ::hot::info/Build
Env
Alias of ::hot::info/Env
Org
Alias of ::hot::info/Org
Project
Alias of ::hot::info/Project
Stream
Alias of ::hot::stream/Stream
User
Alias of ::hot::info/User
ns
Alias of ::hot::run/
Run context, info, and exit control.
Types
Cancellation core
Cancellation type {
msg: Str,
data: Any
}
Represents a cancelled run execution. Produced by cancel() when
called in a run context and surfaced as a run:cancel event.
Fields
msg— Human-readable cancellation messagedata— Optional structured data
cancel() halts execution; user code does not bind a Cancellation
directly. Inspect it from a halt boundary like ::hot::lang/try
or from the engine's run:cancel event.
Failure core
Failure type {
msg: Str,
err: Any
}
Represents a failed run execution. Produced by fail() when called
in a run context and surfaced as a run:fail event.
Fields
msg— Human-readable error messageerr— Structured error data (any type)
fail() halts execution; user code does not bind a Failure
directly. Inspect it from a halt boundary like ::hot::lang/try
or from the engine's run:fail event.
Run
Run type {
id: Uuid,
type: Str,
status: Str,
start-time: ::hot::time/Instant,
retry-attempt: Int,
max-retries: Int,
retry-delay: Int,
origin-run-id: Uuid?
}
RunInfo
RunInfo type {
run: Run,
stream: ::hot::stream/Stream,
build: ::hot::info/Build,
project: ::hot::info/Project,
env: ::hot::info/Env,
user: ::hot::info/User,
org: ::hot::info/Org
}