v1.0.1
Fixed
-
claude CLI 2.1.x streaming format (
internal/ai). claude 2.1.172 changed
its--output-format jsonoutput from a single JSON object to a JSON array
of streaming events.parseClaudeEnvelopefailed to unmarshal the array into
a struct, triggering the legacy fallback which fed the raw event array to
ParseScenariosFromJSON. The parser then silently unmarshaled each event object
(with no matching field names) into a zero-valueScenario— yielding batches
of hollow structs with empty title, steps, priority, and confidence_area. Exit
code was 1 ("review needed") rather than an error, so the defect was silent.parseClaudeEnvelopenow handles both formats:- Single JSON object
{…}— legacy path, unchanged. - JSON array
[…]— finds the last event where"type":"result"and returns
itsis_error/resultfields. Error detection (rate-limit, auth, refusal)
works correctly for both formats.
ParseScenariosFromJSONalso gains a hollow-batch guard: if every parsed
scenario has an emptyscenario_idANDtitle, an explicit error is returned
instead of the silent zero-value batch. This is defense-in-depth that fires even
if the envelope parsing falls back to raw output. - Single JSON object