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
asyncbecause 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: ERRORand 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.
| Global | Role |
|---|---|
ctx | Read-only snapshot: session, node, parent config, inputs handles |
heat | Helpers: getPath, coerceNumber, parseIso8601, jmespath, dataservice, layout |
HEAT_ARBEX | Type guards: isJsonReader, isTabularReader, isBinaryReader, isInputHandle |
jmespath | { search(expression, data) } (same as heat.jmespath.search) |
console | Log 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)
run(ctx)reads parent data viactx.inputsand may build$heat-dataservicewithheat.dataservice.- Optional
suggestedLayoutConfigurationfromheat.layoutbinds channel ids to widgets. - With
dataserviceOutput.persistence: dataservice-root, the stored output feedsheat-system-next-dimension, then the v2 API andui/dashboard.
Pages in this reference
| Page | Topics |
|---|---|
| Context and inputs | ctx fields, inputs.latest / history, readers |
| Dataservice API | heat.dataservice, channel shapes, realms, buildRoot |
| Layout and ComposableChart | heat.layout, ComposableChart fluent API |
| Outputs and pipelines | Persistence, dimension node, production layout |
Related
- system-arbex-js (profiler, timeouts, security)
- Next data service
- heat-system-next-dimension
- SDK examples:
core/api/Runner/Arbex/sdk/examples/