# Changelog

All notable changes to `@q5m-ai/cli` are documented here. The format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the package
follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.2.0 - 2026-08-29

### Changed

- Replaced pasted API-key login in the terminal and Pi extension with the OAuth
  device authorization flow. q5m now opens a browser, displays a confirmation
  code, and saves a dedicated key only after the signed-in user approves it.
- Added an explicit OMP extension manifest and an approval-gated `q5m_login`
  tool, enabling `/q5m login` and natural-language sign-in from Pi or OMP chat.
- Device logout now revokes the exact server credential. MCP key rotation remains
  isolated from device, OAuth, and voice credentials.
- Added an opt-in `Q5M_ALLOW_DEVELOPMENT_LOGIN=1` guard for testing device
  authorization against an explicit `Q5M_API_URL`; production remains default.

## 0.1.4 - 2026-08-26

### Changed

- Added a brief q5m.ai introduction and link to the README published on npm and
  the Pi package directory.

## 0.1.3 - 2026-08-25

### Changed

- Login now always connects to the production q5m backend. Removed backend
  selection from both terminal and Pi login flows.

## 0.1.2 - 2026-08-24

### Added

- Added `/q5m login` and `/q5m logout` so Pi can manage q5m authentication
  without a second terminal.
- Added production and development environment selection inside Pi.

### Security

- API keys entered through Pi use a masked local component and never enter model
  context, tool arguments, logs, shell history, or the saved Pi transcript.
- Credentials are validated before q5m persists them.

## 0.1.1 - 2026-08-24

Release-pipeline verification. No runtime behavior changed.

### Fixed

- Normalized npm 11 package metadata so the published package retains the `q5m`
  executable.
- Removed repository-only worktree test instructions from the published package
  README.

## 0.1.0 - 2026-08-23

Initial release of the native q5m CLI and Pi integration (platform issue #884,
PR #885).

### Added

- Installable `q5m` executable for Pi, scripts, and terminal users.
- Native Pi extension that loads Q's instructions and complete tool catalog
  directly from q5m without starting MCP or requiring OMP.
- Dynamic peer-tool registration in Pi using each peer's authoritative input
  schema and read-only or destructive annotations.
- API-key authentication with hidden terminal input, protected local credential
  storage, environment-variable overrides, and verified Home selection.
- Human-readable and stable JSON output for agent discovery, catalog inspection,
  routing, prior-chat recall, Q tool calls, and peer-domain tool calls.
- Programmatic `Q5MClient` API for direct catalog and tool access.
- Stable process exit statuses for usage, input, authentication, authorization,
  network, and server failures.
- Nonzero partial-mutation responses retain created records and continuation
  metadata so automation can resume without duplicating completed work.

### Security

- Destructive q5m tools require confirmation in interactive Pi sessions and are
  rejected in non-interactive Pi modes.
- Credential replacement uses exclusive, unpredictable temporary files followed
  by atomic rename.
- Direct gateway calls preserve q5m reachability, Home, role, integration, and
  domain authorization checks.
