Skip to content

Releases: PythonLuvr/squire

v1.1.0 — Vendor JSON-stream parsers

19 May 06:37

Choose a tag to compare

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.

v1.0.0 — general-purpose CLI-agent runtime

18 May 14:45

Choose a tag to compare

General-purpose runtime for spawning CLI AI agents (Claude Code, Codex, Gemini CLI, custom) as subprocesses with structured event streaming, MCP tool forwarding, and Claude Code permission auto-setup.

What it does

  • Cross-platform spawn. Windows .cmd / .bat shell handling, extensionless binary resolution, PATH quirks all handled.
  • Structured event streaming. stdout, stderr, text_delta, message_start, message_stop, error events as a discriminated union.
  • MCP config forwarding. Pass an MCP server config file path into the spawned CLI without owning the file's lifecycle.
  • Claude Code permission auto-setup. Atomic merge into ~/.claude/settings.json to grant tool patterns before spawn.
  • Lifecycle. start(), send(), stop({ graceful }) with SIGTERM-then-SIGKILL fallback.
  • Custom adapters. Public SquireAdapter interface lets you register parsers for additional CLIs.

Out of scope for v1.0

Per-CLI vendor JSON-stream parsers and rich tool_call / tool_result events land in v1.x additively, once real adoption signal warrants the work.

Install

npm install @pythonluvr/squire

Requires Node 20+.

Origin

Extracted from OpenWar's cli-bridge adapter as a standalone package. OpenWar v0.11.0+ depends on this package. See docs/openwar-integration.md.

MIT license. Zero runtime dependencies.