# Changelog

## [0.3.9] - 2026-09-26

- Fixed: whitespace-only stdout no longer swallows the stderr fallback in
  `spawnAgy` — a stray newline on stdout with the real message on stderr now
  resolves with the stderr text instead of near-empty output.

## [0.3.8] - 2026-09-26

- Fixed: `spawnAgy` no longer concatenates stderr into the resolved output on success — any stderr warning corrupted the JSON payload for plan/sandbox modes (silently degraded by `parseJsonResponse`). Success now resolves with stdout only; stderr is used only as a fallback when stdout is empty.
- Fixed: broken four-backtick code fence in `skills/agy/SKILL.md` (everything after the install command rendered as one code block); skill `name:` aligned with the directory (`agy-delegate` → `agy`, matching sibling packages).
- Changed: peer dependency swapped from `@sinclair/typebox` to unscoped `typebox`, matching the host SDK (`@earendil-works/pi-coding-agent` bundles and imports `typebox`), mirroring pi-notebooklm 0.1.14.

## [0.3.7] - 2026-09-24

- Changed: `MODEL_MAP` (alias → machine model map) is now exported from `extensions/lib/cli.ts` — the integration smoke test derives its expected models from it instead of hardcoding machine names, eliminating drift when the map updates.

## [0.3.6] - 2026-09-21

- Fixed: removed stale comment in `spawnAgy` claiming a global lock — no serialization exists; concurrent `agy_execute` calls run in parallel (quota-group guidance discourages same-group parallelism).
- Added: integration test for symlink-escape containment — a `dir` symlink pointing outside the workspace root is rejected (README-documented behavior, previously untested).

## [0.3.5] - 2026-09-20

- Refactored: `checkAgyHealth` and `checkAgyConnectivity` share one parameterized spawn runner (`runAgyCheck`) — ~55 duplicated lines removed; both exported signatures, spawn args, and error messages unchanged.

## 0.3.4 (2026-09-12)

### Fixed

- **The install hint was curl/bash on every platform.** `INSTALL_HINT` is now
  selected per platform (`installHint()`): Windows ENOENT errors point at the
  `.ps1` one-liner (`irm …/install.ps1 | iex`); everything else keeps the
  curl installer. All 3 ENOENT error paths use it.
- `parseJsonResponse` now returns `.response` only when it is a string — a
  non-string `.response` (schema drift) fell through `??` and silently
  bypassed the raw-text fallback.

## 0.3.3 (2026-08-30)

### Changed

- Trimmed `agy_execute` model-routing promptGuidelines from 11 lines to 3
  (default model, cross-review rule, diff-review rule) — duplicated the
  model-routing table already in the host context. Saves ~120 tokens/turn.

## 0.3.2 (2026-08-19)

### Changed

- Flash aliases (`flash-low/medium/high`, legacy `flash`/`flash-lo`) now map to
  `gemini-3.7-flash-*` — the current Flash generation in agy 1.1.x. `pro-*`,
  `sonnet`, `opus`, and `gpt-oss` are unchanged. Verified against live
  `agy models` on agy CLI 1.1.14.

## 0.3.1 (2026-08-05)

### Improvements

- Patch version bump for release sync and package documentation update.

All notable changes to `pi-agy` will be documented in this file.

## 0.3.0 (2026-08-02)

### Fixed

- **Write delegation was silently no-oping.** Headless `agy -p` auto-denies
  write/tool permissions; every `accept-edits` (and `sandbox`) call returned
  exit 0 with no edits applied. pi-agy now passes `--dangerously-skip-permissions`
  for the two write modes (`accept-edits`, `sandbox`); `plan` is read-only and
  never receives it.
- **Model names were stale and in the wrong format.** Aliases now map to agy's
  canonical machine names (`gemini-3.6-flash-medium`, `claude-sonnet-4-6`, …)
  from `agy models`, not display names that drift across versions. Added the
  Gemini 3.6 family (previously unmapped). Verified all 8 aliases against live
  `agy 1.1.8`.
- **Install instructions were factually wrong.** agy is a Go binary, not pipx.
  README, SKILL, and the 3 runtime ENOENT error strings now point to the
  official installer (`curl -fsSL https://antigravity.google/cli/install.sh | bash`).

### Added

- **Structured output for `plan`/`sandbox`.** These modes now run with
  `--output-format json`; pi-agy extracts the `.response` field so Pi receives
  the answer, not the raw JSON envelope (with a safe fallback to raw text on
  schema drift).
- **Verify-loop injection for `accept-edits`.** When the project's
  `package.json` has a `test` script, pi-agy appends
  `After editing, run \`npm test\` and fix failures until it passes.` —
  implementing Google's own CLI Best Practices.
- **Phase-aware prompt framing.** `plan` → explore-only prefix; `sandbox` →
  isolation note; `accept-edits` → verify line. Replaces the digest-only prefix.
- Non-mocked live model-name smoke test, gated by `AGY_LIVE=1` (CI stays hermetic).

## 0.2.2 (2026-07-30)

### Improvements

- Patch version bump for release sync and package documentation update.

## 0.2.1 (2026-07-24)

### Features

- Support Pi 0.82.0 with widened peer dependency ranges (`<0.83.0`).

## 0.2.0 (2026-07-16)

### Features

- Added multi-model routing across Gemini, Claude, and GPT-OSS model families.
- Added quota-aware cross-review guidelines and model alias mapping (`flash-low`, `flash-medium`, `flash-high`, `pro-low`, `pro-high`, `sonnet`, `opus`, `gpt-oss`).

## 0.1.0 (2026-07-10)

### Features

- Initial release of Antigravity CLI (`agy`) bridge extension for Pi.
