# Changelog

All notable user-facing changes to Swival.

## 0.1.36

- Custom commands have been added: executable scripts placed in
  `~/.config/swival/commands/` can be invoked from the REPL with `!name`,
  and their output is injected into the conversation as the next user message.

## 0.1.35

- `/init` workflow discovery is now platform-aware: it detects the current OS
  and architecture and only extracts commands that apply to the host platform.

## 0.1.34

- `/init` now discovers workflow files and validates the generated instructions
  by writing them out and checking the result.
- Transient LLM errors (rate limits, timeouts, server errors) are now retried
  automatically with exponential backoff.
- An interaction-policy system prompt has been added to distinguish REPL and
  autonomous modes, giving the model clearer behavioral guidance for each.

## 0.1.33

- Updated ChangeLog

## 0.1.32

- Last-resort compaction has been added: when the context window is too small for
  tool schemas, all tool definitions are dropped and the system prompt is truncated
  so the conversation can continue as plain chat.
- Command provider now supports tool calling via a `<swival:call>` XML convention,
  allowing external command-based backends to invoke tools.
- Data-URI inlined images are now stripped after HTML-to-markdown conversion to
  avoid bloating context with base64 blobs.
- Markdown comments (`<!-- ... -->`) are now trimmed from skill and agent
  instruction files.
- OpenRouter requests now include `referer` and `title` headers.

## 0.1.31

- The `grep` tool now supports a `context_lines` parameter to show surrounding
  lines before and after each match.
- `/new` has been added as a synonym for `/clear` in the REPL.
- `reasoning_effort` set to `"default"` is now skipped instead of being sent to
  the provider.

## 0.1.30

- Secrets encryption has been added: credential tokens in LLM messages
  can be transparently encrypted before being sent to the provider and decrypted
  on return, preventing accidental leakage through hosted APIs.
- The `--sanitize-thinking` CLI flag has been fixed (it was accepted but ignored
  in 0.1.29).
- `read_multiple_files` now accepts a plain string in addition to an array,
  for resilience with models that pass a single filename as a string.

## 0.1.29

- Command provider has been added for shelling out to external programs as the
  LLM backend: the conversation is passed as a plain-text transcript on stdin,
  and the response is read from stdout.
- Leaked reasoning tags (`<think>`, `</think>`) from models with bogus
  templates can now be stripped. This can be controlled with `sanitize_thinking`
  in config or `--sanitize-thinking`.
- Race conditions when multiple A2A contexts run concurrently have been fixed by
  isolating per-context temporary files (todo, cmd_output) and adding file locks.
- SQLite cross-thread error when `--serve` and `--cache` are combined has been
  fixed.

## 0.1.28

- Support for vision has been added: a new `view_image` tool allows the
agent use vision-enabled models to examine images.
- Skill scanning now skips dot directories.

## 0.1.27

- Skills can now be loaded from `.agents/skills/` and `~/.agents/skills/` directories.
- Global agent instructions via `~/.agents/AGENTS.md` have been added.
- Documentation has been improved with web browsing options, lightpanda MCP server
  usage, and chrome-devtools-mcp examples.

## 0.1.26

- Google Gemini provider has been switched to use the OpenAI-compatible endpoint.
- Built-in help output has been grouped by purpose.
- Documentation and examples have been improved.

## 0.1.25

- Native Google Gemini API support has been added.
- A2A streaming (`SendStreamingMessage`) has been added: real-time SSE delivery of
  status updates, tool lifecycle events, and incremental text.
- `CancelTask` support has been added: per-task cancel flags are checked between
  tool calls and at each turn boundary.
- A2A server hardening has been added: sliding-window rate limiting, request size
  validation, concurrency semaphore, and active-context protection against
  LRU eviction.
- Read access to external skill directories has been auto-granted and supporting
  files are now listed on skill activation.

## 0.1.24

- A2A server mode (`--serve`) has been added: a swival Session can be exposed as
  an A2A endpoint, with context-keyed multi-turn sessions, bearer auth, and
  TTL-based cleanup.
- Customizable A2A server agent card has been added: `--serve-name`,
  `--serve-description`, and `[[serve_skills]]` in `swival.toml` control how the
  agent advertises itself.
- `/tools` REPL command has been added to list available tools.

## 0.1.23

- A2A (Agent-to-Agent) support has been added: remote agents can be connected via
  `[a2a_servers.*]` in `swival.toml` or `--a2a-config`, with tools exposed as
  `a2a__<agent>__<skill>`.
- Budgeted memory injection has been added. `--memory-full` can be used for legacy
  full injection.
- Support for reading questions from stdin when piped has been added.

## 0.1.22

- `--self-review` option has been added: the agent reviews its own work before
  finishing.
- Reviewer feedback visibility has been improved and expected actions have been
  made more explicit.
- Informational stderr from the reviewer is now shown as warnings instead of being
  silently discarded.
- The default number of review rounds has been bumped up to 15.
- A cache miss cascade caused by dropped `tool_call` fields in cached responses
  has been fixed.

## 0.1.21

- Optional SQLite LLM response cache (`--cache`) has been added for faster
  repeated queries, with system-prompt-independent cache keys.
- A deadlock when a shell command backgrounds a child process has been fixed.
- The `todo` tool accepting JSON-encoded array strings instead of proper lists
  has been fixed.

## 0.1.20

- The project-local skills directory has been moved from `skills/` to
  `.swival/skills/`.
- Spurious "shadowed by itself" warnings when `--skills-dir` pointed to the same
  directory as the project-local skills location have been fixed.
- `$skill-name` mention syntax has been added: `$deploy` can be typed in a message
  to automatically activate a skill without the model needing to call `use_skill`.
- The skill catalog in the system prompt has been reworked with file paths, trigger
  rules, and progressive disclosure guidance.
- Auto-injected skills now use assistant+tool message pairs so compaction can
  shrink or drop them under context pressure.
- Auto-activated skills are now recorded in JSON reports.

## 0.1.19

- `/learn` command has been added for interactive skill discovery.

## 0.1.18

- `read_multiple_files` tool has been added for reading several files in a single
  call.
- Continue-here feature has been added: session state is saved on interruption
  (Ctrl+C, max turns, compaction failure) and resumed on next start.
- The `todo` tool has been made to accept multiple tasks in one call.
- The `grep` tool has been extended with additional options.
- Context overflow detection for non-standard exception types has been fixed.

## 0.1.17

- `--reasoning-effort` option has been added.
- Session memories that persist across runs have been added.
- GPT-5.4 has been added to the built-in model list.
- Markdown formatting for agent responses has been added.
- Spinner and progress display have been improved.
- Todo list UI has been improved.
- All CLI options have been listed in `--help` and sorted alphabetically.

## 0.1.16

- Colored diff output has been added to the `edit_file` tool.

## 0.1.15

- `write_file` has been made to coerce JSON content into a string instead of
  erroring.

## 0.1.14

- ChatGPT has been added as a provider (direct OpenAI API).

## 0.1.13

- AgentFS sandbox support has been integrated with auto-session IDs, diff hints,
  and strict read mode.
- "Did you mean?" suggestions for mistyped tool command names have been added.
- MCP servers have been made to inherit the parent process environment variables.

## 0.1.12

- Generic OpenAI-compatible provider has been added for any server that speaks the
  OpenAI API.
- Snapshot tool has been added for proactive context collapse, with `/snapshot` and
  `/restore` REPL commands.
- `--extra-body` option has been added to pass arbitrary JSON to the LLM request
  (useful for disabling thinking, etc.).
- OpenRouter documentation and setup instructions have been added.

## 0.1.11

- MCP (Model Context Protocol) server support has been added. Servers are
  configured in `swival.toml` or `.mcp.json`; tools are exposed as
  `mcp__<server>__<tool>`.
- Configurable size limits for MCP tool output (`MCP_INLINE_LIMIT`,
  `MCP_FILE_LIMIT`) have been added.

## 0.1.10

- Reviewer mode (`--reviewer-mode`) has been added: an LLM-as-judge loop that
  automatically evaluates agent output, with `--objective`, `--verify`,
  and `--review-prompt` options.
- `--max-review-rounds` has been added to cap review iterations.

## 0.1.9

- Graduated context compaction has been introduced: `compact_messages` ->
  `drop_middle_turns` -> `aggressive_drop_turns`, replacing the previous
  all-or-nothing approach.
- `/continue` is now suggested when the agent hits the max turn limit.
- Clamping and retry messages have been improved.

## 0.1.8

- `grep` and `list_files` tools have been made to accept file paths in addition to
  directories.
- `grep` tool output has been improved.
- Whether the model supports vision is now reported.
- Global instructions via `~/.config/swival/AGENTS.md` have been added.
- `--no-instructions` behavior has been clarified.

## 0.1.7

- Configuration file support (`swival.toml` and `~/.config/swival/config.toml`)
  has been added.
- `--add-dir-ro` has been added for read-only additional directories (renamed from
  `--allow-dir`).
- Common command syntax mistakes in yolo mode are now auto-corrected.
- Instructions file has been switched from `ZOK.md` to `AGENT.md`.

## 0.1.6

- `think` tool has been redesigned with numbered thoughts, revisions, and branches.
- CI pipeline has been added.
- `Makefile` with common development commands has been added.
- Trash/undo handling has been fixed.
- Error when the model sends a file size with units has been improved.

## 0.1.5

- `todo` tool has been added: a persistent checklist in `.swival/todo.md` that
  survives context compaction, with periodic reminders and duplicate detection.
- `/init` command has been added for bootstrapping `AGENT.md`.
- A public Python API (`swival.Session`, `swival.run()`) has been exposed.
- A loading spinner during LLM calls has been added.
- The unused `notes` tool has been removed.

## 0.1.4

- OpenRouter has been added as a provider.
- `delete_file` tool has been added.
- `move_file` / `rename_file` tools have been added.
- External reviewer support for automated evaluation has been added.
- Read-before-write is now required: the agent must read a file before editing or
  overwriting it (can be disabled with `--no-read-guard`).
- Final output is now printed even when `--report` is enabled.
- Default values for `temperature` and `top_p` have been removed (the provider
  decides).

## 0.1.3

- Package has been renamed from `swival-agent` to `swival`.
- `--version` flag has been added.
- Recursive skill discovery has been deepened.
- Skill activation events have been included in reports.

## 0.1.2

- `--report` has been added for JSON session reports.
- `--history` has been added to replay previous sessions.
- Thinking tool has been revamped.
- Absolute paths in yolo mode have been allowed.
- Full shell expansion in yolo mode has been added.
- Default max turn limit has been increased.

## 0.1.1

- `--seed` option has been added for deterministic output.

## 0.1.0

Initial release. Core agent loop with tool-use, LM Studio and HuggingFace
providers, file read/write/edit, grep, list_files, run_command, thinking tool,
skills system, and REPL mode.
