decide 0.4.0
Two new flags, and the README's Streaming example now runs as written.
--context-json: a context whose value is parsed as JSON, so the model sees its structure: objects, arrays, numbers, and booleans, not one string. It takes every form--contexttakes:<json>,@<path>, and-, each with<name>=in front. A value that is not valid JSON exits 10 before any model call. Compact JSON with an=inside a string, such as a URL with a query or a base64 field, parses.--each: decide once per line of standard input. Each line is one event, and the-context holds it; the questions run once per event, in order. With--json, every event prints exactly one line: its answers, its fallbacks, or an error record. An unsure event, a remote error, a line that is not valid JSON or UTF-8, and a context too large for the model are per event, and the final code is the highest code any event produced. Lines are read as they arrive, so a live producer such astail -fworks.