Skip to Content
This documentation is provided with the HEAT environment and is relevant for this HEAT instance only.
RunnersSystem UtilsArbex API referenceOverview

Arbex API reference

Arbex is the sandboxed JavaScript environment for the system-arbex-js node template. Your node configuration script must define async function run(ctx), which reads a parent node’s output and returns JSON-serializable data. For node limits, profiler output, and host failures, see system-arbex-js.

Types for offline editing: heat-arbex.d.ts with /// <reference path="heat-arbex.d.ts" />.


Entry contract

async function run(ctx) { // read ctx.inputs, transform, return plain JSON return { ok: true }; }
  • Use async because input readers call the platform over a bridge (I/O).
  • Return values must survive JSON.stringify (no functions, undefined, or circular refs).
  • Thrown errors set envelope status: ERROR and fail the node.

Globals vs ctx

A common mistake is expecting heat.dataservice or heat.layout on ctx. They are not on the context object.

GlobalRole
ctxRead-only snapshot: session, node, parent config, inputs handles
heatHelpers: getPath, coerceNumber, parseIso8601, jmespath, dataservice, layout
HEAT_ARBEXType guards: isJsonReader, isTabularReader, isBinaryReader, isInputHandle
jmespath{ search(expression, data) } (same as heat.jmespath.search)
consoleLog lines captured in the arbex envelope (not host stdout)

Standard builtins (Math, JSON, Array, Date, …) are available. There is no require, fetch, or fs.


Data flow (v2 Next dashboard)

  1. run(ctx) reads parent data via ctx.inputs and may build $heat-dataservice with heat.dataservice.
  2. Optional suggestedLayoutConfiguration from heat.layout binds channel ids to widgets.
  3. With dataserviceOutput.persistence: dataservice-root, the stored output feeds heat-system-next-dimension, then the v2 API and ui/dashboard.

Pages in this reference

PageTopics
Context and inputsctx fields, inputs.latest / history, readers
Dataservice APIheat.dataservice, channel shapes, realms, buildRoot
Layout and ComposableChartheat.layout, ComposableChart fluent API
Outputs and pipelinesPersistence, dimension node, production layout