Types and values
Build a factoryThe six primitives, the declared types built from them, and how absence and secrets behave.
Every port has a type, and every binding is checked against it. This page describes the value language; The language shows how types are used in units and steps.
The primitives
Only these six are built in:
| type | value |
|---|---|
text |
a Unicode string, encoded as UTF-8 at every external boundary |
int |
a signed 64-bit integer; out-of-range values are rejected, never wrapped |
float |
a finite 64-bit IEEE 754 value; NaN and the infinities are not values |
bool |
true or false |
time |
an RFC 3339 instant, normalized to UTC with exactly three fractional digits (2026-10-06T04:49:52.292Z) |
secret |
a value that is redacted wherever a Run is observed |
A time is an instant, not a local date. Canonical time strings sort
lexicographically in chronological order, and equivalent instants compare
equal regardless of their original offset or precision.
Declared types
Everything else is declared at the top of a module:
type Issue = { id: text, title: text, body: text?, labels: [text] }
type Commit = { sha: text }
type Labels = map(text, text)
type Folder = { path: text }
type Severity = enum { low, medium, high }
type Finding = {
severity: Severity,
location: text,
description: text?
}
type Verdict = choice {
succeeded { summary: text, findings: [Finding] }
failed { error: text }
clarify { question: text }
}
| form | meaning |
|---|---|
{ … } |
a record with named fields |
[T] |
a list of T |
map(K, V) |
a map from K to V |
enum { a, b } |
one of a fixed set of tags |
choice { tag { … } … } |
a tagged value carrying a payload per tag |
T? |
an optional field or port: the value may be absent |
name::Type |
a type imported from another module |
A record type is closed: naming a field it does not declare is an error, not an ignored extra.
Absence and optionals
There is no null. A value is either present or absent, and absence has
exactly one meaning:
- an optional record field may be absent;
- an optional port (
name?:) may be absent on a given Run; - a binding marked
?drops when its source is absent instead of blocking the node; - a composite output may be absent when no binding supplies it.
A missing required value at a step, a trigger seed or an external-port return is a conformance error: the node does not fire with a half-filled record.
Secrets
secret is a primitive because a credential must be able to flow through a
factory without becoming readable. A secret:
- enters as data — a trigger seed, an external-port return or a stored credential — and is checked like any other value;
- is replaced by
********wherever the Run is observed: values, node output, logs and the UI; - is never returned by the secrets API (only keys, labels and timestamps are).
A deployment resolves credential(key) from its secret scopes; see
Secrets and configuration. Secrets are redacted, not
encrypted in transit through the graph — treat any derived text you build
from one as sensitive and do not bind it back into a step that stores it.
Conformance
A value is checked against its type at every boundary: a trigger seed, an
external-port argument or return, a step input, a composite output and file
content. A literal value in a config: or binding is checked when the factory
loads, so a typo is a load error rather than a runtime surprise.
Maps and choices are the two places where a value carries its tag with it. Use
is in a guard to branch on a choice:
step comment:
kind: github_comment
in: { body: review.summary }
when: review.verdict is succeeded
The specification states the exact grammar and the conformance rules for each form.
Your factories will appear here. Create one and open it beside this guide.