Can a step run somewhere else?
Available — v0.0.1 (experimental)http
Call a remote step
A remote pipe is four HTTP requests: open a session, POST the input, GET the output, read the status. Here openflange serve is the server and curl is the client.
Available in v0.0.1: the files, README and tests are in examples of the openflange-go repository. Commands run from the repository root.
Needs: the openflange CLI, curl and jq.
A pipe is a data-processing step with declared inputs and outputs.
Authorization header.What goes in, what comes out
Terminal 1 — serve a pipe
openflange serve ./examples/email/pipes/lowercase # 127.0.0.1:8080, loopback only, no tokenTerminal 2 — a real transcript
$ curl -s http://127.0.0.1:8080/pipes | jq -c .
{"spec":"openflange.org/http/v0.1","pipes":[{"id":"lowercase","version":"0.1.0","title":"Lowercase","url":"http://127.0.0.1:8080/pipes/lowercase"}]}
$ curl -s -X POST -H 'Content-Type: application/json' \
-d '{"version":"0.1.0","inputs":["text"],"outputs":["text"]}' \
http://127.0.0.1:8080/pipes/lowercase/sessions > session.json
$ jq -c 'del(.sessionToken, .urls) | .sessionId = "<id>"' session.json
{"sessionId":"<id>","expiresAt":"2026-12-03T14:16:16Z","formats":{"inputs":{"text":"application/x-ndjson"},"outputs":{"text":"application/x-ndjson"}}}
$ SID=$(jq -r .sessionId session.json); TOKEN=$(jq -r .sessionToken session.json)
$ S=http://127.0.0.1:8080/sessions/$SID
$ curl -s -H "Authorization: Bearer $TOKEN" $S/outputs/text &
$ printf '"Alice@Example.COM"\n"BOB@example.org"\n' |
curl -s -H "Authorization: Bearer $TOKEN" -X POST -H 'Content-Type: application/x-ndjson' -T - $S/inputs/text
"alice@example.com"
"bob@example.org"
$ curl -s -H "Authorization: Bearer $TOKEN" $S | jq -c '{state, ports}'
{"state":"completed","ports":{"inputs":{"text":{"state":"completed","records":2,"bytes":36}},"outputs":{"text":{"state":"completed","records":2,"bytes":36}}}}Files and further commands
The same pipe as a pipeline node
nodes:
lower:
pipe: http://127.0.0.1:8080/pipes/lowercase
inputs:
text: {from: inputs.text}
grants: {network: ["127.0.0.1:8080"], remoteData: ["127.0.0.1"]}Or as a one-off run
openflange run http://127.0.0.1:8080/pipes/lowercase --trustedWhat to notice
$SIDand$TOKENcome from the session response and are different every time; theexpiresAtvalue is from the recorded run.- The output is read while the input is still being sent (
&), so output starts arriving before the input ends. -X POSTmatters:-Talone sendsPUT, which the server answers with405andAllow: POST.- The response status is sent before the stream finishes, so it cannot tell you how the run ended.
GET /sessions/{id}is the authoritative outcome. - Sending records to another machine is a permission (
remoteData) the caller must grant, together withnetwork. The server binds loopback and needs no token there; a non-loopback address requires one. - The diagram shows the same four requests for a
mask-emailpipe; the transcript serveslowercase.