# Changelog

## Unreleased

- Refresh Pi's local model catalog before `/agent` model selection and baseline
  restoration, so a long-lived session sees newly configured profile candidates
  without using the parent's model-cycling scope. Report refresh failures without
  changing the active agent.
- Add `profile` frontmatter: activate a named model profile from the shared machine-local `~/.pi/agent/profiles.yaml` (`@pi-kaush/pi-model-profiles`), walking candidates in order and applying the first available model and thinking level.
- Reject agents declaring both `profile` and `model`; precedence is explicit: profile first, then model, then the session default.
- Load `@pi-kaush/pi-model-profiles` lazily so a missing library degrades only profile support; `/agent` remains fully functional without it.

## 0.1.0

- Add the `/agent` command for activating a configured Pi agent as a persistent mode in the current session.
- Support `/agent <name>`, an interactive selector, and `/agent none` / `/agent off` restoration of the pre-activation baseline.
- Capture model, thinking level, and active tools as one baseline on first activation; keep it across agent switches.
- Append agent prompts to Pi's base prompt, apply tool allowlists with missing-tool reporting, and support model thinking suffixes (`:low`, `:high`, `:max`).
- Restore the last active agent across session resume and reload, reading both the namespaced `pi-agent-mode/state` entry and legacy `active-agent-state` entries (newest recognized entry on the active branch wins).
- Keep the package standalone with zero runtime dependencies: discovery and display helpers are self-contained and no delegated-subagent runner is required.
