| 38 | // NewSerialWrite builds a SerialWrite bound to the given text channel. |
| 39 | func NewSerialWrite(id string, value *workflowapi.Expression, toolDescription string, dst channel.TextWriter) *SerialWrite { |
| 40 | return &SerialWrite{ |
| 41 | LinearNode: engine.NewLinearNode(id), |
| 42 | value: value, |
| 43 | toolDescription: toolDescription, |
| 44 | dst: dst, |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | // serialWriteArgs is the tool-call payload. A text channel always takes a |
| 49 | // string, so the schema is derivable from this type. |
| 50 | type serialWriteArgs struct { |
| 51 | Value string `json:"value"` |
| 52 | } |