Skip to content

v1.1.0 — Vendor JSON-stream parsers

Latest

Choose a tag to compare

@PythonLuvr PythonLuvr released this 19 May 06:37

First minor release on the v1.x line. Adds dedicated per-CLI adapters that parse each vendor's structured output into semantic Squire events.

New adapters

  • claude-code — parses claude --output-format stream-json --verbose --print into text_delta, thinking_delta, tool_call, tool_result, and usage events.
  • gemini-cli — parses gemini --output-format stream-json into text_delta, tool_call, tool_result, and usage events.

Both adapters fall back to raw stdout events on unparseable lines, so vendor format tweaks degrade gracefully instead of crashing.

New event variants (all additive)

  • tool_call — tool invocation with vendor-supplied id, name, and input.
  • tool_result — matching result for a tool_call.id, with optional isError.
  • thinking_delta — reasoning/thinking text, separate from assistant-visible text_delta.
  • usage — token-usage summary (input, output, cache read, cache write).

The v1.0 event union shapes are unchanged. v1.0 consumers continue to work.

Codex deferred

A dedicated codex adapter was scoped for this release but is deferred. The OpenAI Codex CLI was not installed on the build machine at fixture-capture time, and shipping an invented parser without a real fixture would recreate the v1.0 fake-standalone failure mode. Codex users continue to use the default text-stream adapter; a follow-up release will add the dedicated parser once a real capture is available.

Infrastructure

  • Sanity gate now scans .jsonl files so committed test fixtures pass the same checks as TypeScript and Markdown.
  • Internal NdjsonLineBuffer helper for line-delimited JSON parsing (not exported; reserved for future refactors).
  • 66 tests total (up from 52); 97.3% line coverage on src/.

Install

```bash
npm install @pythonluvr/squire@1.1.0
```

See the CHANGELOG for the full diff against v1.0.0.