FlowDrop Workflow Specification 1.0-draft

Assembling messages concatenates in declared port order

The node that joins several message sources into one list. Port order is the message order, and an unwired source adds nothing at all.

The rule

Normative: this is the rule
  1. A message-assembly node takes any number of dynamically declared message-typed inputs and flattens them into one message-typed output.
  2. The declared order of the inputs is the order of the messages.
  3. A connected list contributes each of its items in order; a connected single message contributes one item; an input that is unwired or carries no value contributes nothing; no placeholder is emitted for it.

What it means

The output order follows how the author declared the ports, not the order a caller might expect from the port names or from wiring them up. Declare b before a and wire both — b's messages come first regardless of what the names suggest.

The other clause is the one a reader coming from a message-merging node would get wrong: an input port that is unwired, or carries no value, contributes nothing at all — no null placeholder takes its place in the output. A three-port assembly with the middle port unwired produces a two-item list, not a three-item list with a gap in it.

Example

Two ports declared in the order b, then a, each wired to one message:

Ports declared b before aassembled
{ "b": [{ "role": "user", "content": "second-declared-first" }], "a": [{ "role": "user", "content": "first-declared-second" }] }
What the assembly outputs
[{ "role": "user", "content": "second-declared-first" }, { "role": "user", "content": "first-declared-second" }]

Three ports declared, the middle one left unwired:

in_1 and in_3 wired, in_2 left unwiredassembled
{ "in_1": [{ "role": "user", "content": "a" }], "in_3": [{ "role": "user", "content": "c" }] }
What the assembly outputs
[{ "role": "user", "content": "a" }, { "role": "user", "content": "c" }]
Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0-draft · MEM-4 · changed in spec 1.0