Different pipes. One standard.

Type to search this site.

Search runs in your browser against a static index built with this site (Pagefind). Nothing you type is sent to a server.

ExtractExperimental

std:stdin #

Source: the runner's standard input as NDJSON.

For example: read records piped into the runner.

A pipe is a data processing step with declared inputs and outputs; standard pipes are built into the runner.

Ports #

std:stdin takes no inputs and produces out.std:stdinoutrecords
std:stdin takes no inputs and produces out.std:stdinoutrecords
Named ports from the latest published contract. Dashed lines are optional ports.

A source: it has no inputs.

Ports of std:stdin
PortDirectionKindRequiredDescription
outoutputrecordsyes

Parameters #

This pipe has no parameters.

When to use it #

  • A pipeline that should always read the runner's standard input, whatever it is started from.
  • A shell pipeline in which the runner is one step between other commands.

When to use something else

  • A pipeline can contain only one std:stdin node, and a runner refuses it where standard input is already bound — for example when openflange run binds a pipeline input to stdin. A pipeline input is usually the simpler choice.

A tested example #

Nothing here is invented: this is the test “the output may be left to the test runner (empty standard input)” from the pipe's own portable test file, which every conformant runner must pass.

Parameters

This test sets no parameters.

Input: —

This test gives the pipe no input.

Expected output: out

The test leaves this output to the runner.

The same step as a node of a pipeline.yaml:

pipeline.yaml
nodes:
  stdin:
    pipe: std:stdin

Notes from the manifest #

The pipe's manifest, OPENFLANGE.md, carries these notes.

Part of the OpenFlange standard library (std, version 0.1).

A source that reads NDJSON from the standard input of the runner process and emits one item per line (UTF-8, one JSON value per line, blank lines and invalid JSON are E_FORMAT). It ends at end of input.

Use it inside a pipeline that should read stdin itself. For a pipeline with a declared input you do not need it: openflange run binds the sole input to stdin by default. A pipeline must not contain more than one std:stdin node, and a runner refuses it (E_UNSUPPORTED) where standard input is already bound. It needs no permission grant.

Reference #

Maturity
Experimental
Manifest version
0.1.0