github nicobailon/pi-subagents v0.69.0

5 hours ago

Gates can now hand back a verdict, not just pass or fail. Point gate at a script that prints JSON and its output becomes the child's structured output, so workflow scripts and lane logic can branch on a post-run classifier without the parent ever reading the child's report. This release also fixes two startup annoyances: terminals that embed Ghostty (like cmux) no longer trigger the Ghostty inspector and its AppleScript errors, and machines without npm start up without a stray command not found line.

Highlights

  • Typed gates: gate: { command, output: "json" } turns a script's JSON stdout into the child's structuredOutput, optionally validated against a schema. Bad or empty output fails the gate instead of silently losing the verdict.
  • Ghostty detection only activates for the standalone Ghostty app, so cmux and other embedding terminals stop getting -1728/-2741 AppleScript errors or the wrong window.
  • Hosts without npm start quietly.
  • The tool reference no longer claims a default maxOutput cap that never existed.

Changelog

Highlights

  • Gates can now return a JSON verdict. Point gate at a script that prints JSON, and its output becomes the child's structured output, so workflows can branch on a post-run check without the parent reading the child's report.
  • Ghostty detection no longer misfires inside terminals like cmux that embed Ghostty, so you stop seeing AppleScript -1728/-2741 errors or the wrong window being targeted.
  • Hosts without npm start up quietly instead of printing npm: command not found.

Added

  • Typed gates: gate accepts { command, output: "json", schema?, timeoutMs? } alongside the plain string form. When the command passes, its JSON stdout becomes the child's structuredOutput (validated against schema when given). Empty, truncated, or invalid output fails the gate rather than silently dropping the verdict. Typed gates always run (they are never cached), and a run cannot combine one with an outputSchema. See docs/ for using command-runner agents as typed workflow steps and examples/typed-gate for a runnable example.

Fixed

  • The Ghostty inspector only activates when the macOS host bundle id identifies the standalone Ghostty app. Terminals that embed Ghostty (such as cmux) set TERM_PROGRAM=ghostty too, which previously targeted an unrelated Ghostty window or emitted -1728/-2741 AppleScript errors; those hosts now fall back to the inspector.command hint. Thanks to @wangpi26 for #2281.
  • Hosts without npm no longer print /bin/sh: npm: command not found during startup; global package-root discovery is optional and now stays silent when the package manager is missing. Thanks to @PhrZer for #2287.
  • Fixed docs/tool-reference.md, which claimed a default maxOutput cap of 200 KB / 5,000 lines. The cap applies only when maxOutput is set.

Don't miss a new pi-subagents release

NewReleases is sending notifications on new releases.