Stage 2 · The programming model
Every Code and Code file block in every language follows the same contract:
flowchart LR
U["uses:<br/>trigger.text<br/>steps.lookup.total"] --> F["Temp JSON file (0600)<br/>{trigger:{text}, steps:{lookup:{total}}}"]
F -->|"path in TERMORQ_INPUT"| P["Your program<br/>(cwd = run files/)"]
P -->|"stderr: diagnostics"| L["Block log"]
P -->|"last non-empty stdout line:<br/>one JSON object"| O["Published properties<br/>steps.<id>.<prop>"]Once you understand this stage, you can write blocks in any of the seven supported languages.
Read the input file correctly, keep its nesting, and avoid the three most common mistakes.
Every path you can put in uses
inputs, trigger, steps, loop, and secrets: where each comes from and when it is valid.
Publishing output and the output schema
The last-line rule, declared property types, reserved names, and plain-text output.
The ok boolean convention, used by captured shell blocks and the editor examples.
Test one block with Execute step
Use the code editor, Step input, and input_sample to iterate on a block without a full run.
Working directory, environment, and secrets
Where code runs, the TERMORQ_* variables, the env map, and the block timeout.
Code file: keep source in your repo
Run a local script with code_file, infer its language, and pass whitespace-split args.
What the Git file node is, why the runner rejects kind: git today, and the Code file workaround.