# Changelog

All notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.4.0] - 2026-09-06

### Added

- Prefer provider-enforced JSON Schema sampling for `ask_rich_questions`, while retaining safe fallback behavior on providers without strict constrained sampling.
- Extract `/rich-questions` forms through an internal constrained `submit_questions` tool and prefer its validated arguments before falling back to JSON text parsing.
- Add fullscreen mouse-wheel scrolling, clickable choice options, searchable-model list clicks, and mouse forwarding to Pi's model-search input and multiline Editor on hosts that expose normalized mouse events.
- Add integration coverage for Pi's real model runtime, including a native extension provider, credential-resolved endpoints, provider environment, and `null` header-deletion markers.

### Changed

- Follow Pi's package guidance by declaring Pi-provided runtime modules as wildcard peers, while keeping exact Pi `0.84.4` and TypeBox `1.3.7` development locks plus an explicit `0.85.x` compatibility test target.
- Route extraction through `ctx.modelRegistry.complete()` so Pi owns provider dispatch, authentication, resolved endpoints, headers, and provider-scoped environment.
- Refresh dynamic model catalogs with a five-second cancellation deadline, report partial provider failures, and continue with the current cached model list.
- Resolve semantic form navigation, confirmation, cancellation, scrolling, submission, newline guidance, and on-screen hints from Pi keybindings.

### Fixed

- Execute `ask_rich_questions` sequentially so concurrent interactive tool calls cannot contend for the terminal UI.
- Remove the obsolete schema cast and legacy `@earendil-works/pi-ai/compat` extraction path.

## [0.3.2] - 2026-07-24

### Added

- Add the real interactive demo GIF as Pi package-gallery preview media so the extension has a visual preview on pi.dev.

## [0.3.1] - 2026-07-24

### Changed

- Redesign the README as a polished product showcase with responsive light and dark banners, a real interactive demo, restrained project badges, a workflow overview, grouped features, and clearer progressive disclosure.
- Include README media assets in the published npm package.

### Fixed

- Expose the package through `extensions/index.ts` to remove the redundant `:pi-rich-questions` suffix from Pi's package provenance label; npm installs now display simply as `pi-rich-questions`.
- Correct README wording while retaining the requested playful opening and clarify the empty-session demo and TUI requirements.

## [0.3.0] - 2026-07-23

### Added

- A progressive-disclosure public README and complete task-oriented documentation set for installation, authoring, configuration/extraction, interaction/accessibility, results, troubleshooting, security/privacy, architecture, development/testing, and releasing/deployment.
- MIT licensing, contribution guidelines, and a private-first vulnerability reporting policy for the public project.
- A friendly empty-session prompt that can hand `demo pi-rich-questions` to the active agent for a natural demonstration.
- Concise first-run extraction setup with the session model and low extraction thinking as the recommended default.
- A searchable picker for authenticated Pi models and model-supported thinking levels, with low thinking initially highlighted and recommended for speed and lower cost.
- Global extraction preferences with `/rich-questions config` and `/rich-questions reset`.
- Automatic retry with the active session model and session thinking setting when a dedicated extraction model is unavailable or fails.

### Changed

- Prepare npm metadata for the public `ArtOfIntel/pi-rich-questions` repository with author, license, repository, homepage, issue tracker, discoverability keywords, and an explicit package-files allowlist.
- Replace the draft documentation outline with maintained public guides and mark documentation TODO #1 complete.
- Define inheritance as using the current session model with low extraction thinking, clamped to model support, rather than inheriting the session thinking level.
- Standardize current naming on display name **Pi Rich Questions**, project/repository and npm package `pi-rich-questions`, extension directory `extensions/pi-rich-questions`, slash command `/rich-questions`, and tool API `ask_rich_questions`.
- Replace the `/answer-rich` command with the unified `/rich-questions` command namespace.

### Fixed

- Make Page Up and Page Down move by a visible page in the searchable extraction-model picker using Pi's injected selection bindings.
- Resolve session fallback credentials lazily for custom extraction models, while retaining configured-first/session-second retry order and the session thinking level on fallback.
- Keep empty-session demo decline behavior friendly while accepted demos flow through a normal user message and agent turn.

## [0.2.1] - 2026-07-21

### Fixed

- Render the rich-question form as a terminal-width modal overlay, isolating its viewport from the underlying Pi transcript so Page Up and Page Down scroll the form content.
- Resolve Page Up and Page Down through Pi's injected `tui.select.pageUp` and `tui.select.pageDown` keybindings instead of hard-coding physical keys.

### Added

- Integration coverage for modal presentation and form-local Page Up/Page Down scrolling.
- A concise `AGENTS.md` project guide and separate documentation outline and task tracker under `docs/`.

## [0.2.0]

### Added

- Modular form, state, rendering, layout, extraction, and formatting implementation.
- Markdown-rich prompts, context, recommendations, caveats, and option details.
- Per-option user notes, multiline editing, review-before-submit, and self-contained model-facing results.
- ANSI/Unicode-safe layout and height-aware form scrolling.
- Type checking and Bun test coverage.

## [0.1.0]

### Added

- Initial single-file local extension with the `ask_rich_questions` tool and `/answer-rich` command.
