## mind v1.5.0

This release makes mind easier to keep in sync, safer to update, and more
reliable for agent workflows.

### Highlights

- Added experimental autosync commands to mirror spaces into versioned `.mind/`
  files for easier review, sharing, and recovery.
- Added safer database migrations with verified backups, automatic restore on
  migration failure, and backup retention.
- Added `mind setup refresh` so existing agent integrations can stay aligned
  after updates without recreating unrelated configs.
- Moved session summaries into `projects/<repo>` as same-space `session-*`
  memories and added a migration command for older summaries.
- Added UUID primary IDs for spaces and memories while preserving public
  name-based CLI and MCP contracts.
- Added safer setup config writes for JSON, JSONC, and TOML agent configuration
  files.
- Fixed the public installer launcher path so new installs run the current
  `src/mind.ts` entry point.
- Improved `mind update` so it validates migrations before refreshing
  integrations.

### Added

- Added autosync commands that mirror spaces into versioned `.mind/` files.
- Added `mind setup refresh` for refreshing detected mind-managed integrations.
- Added `mind migrate sessions <project-space> [--dry-run]` for migrating older
  `sessions/<repo>` summaries into the project space.
- Added maintainer release automation support for curated GitHub release notes
  with `--notes-file <path>` and package-lock version alignment.
- Added OpenCode `opencode.jsonc` support, including comment-preserving edits
  for existing JSONC configuration.

### Changed

- Changed database migrations to create verified backups, restore automatically
  on failure, and keep the latest automatic backups.
- Changed `mind update` to validate migrations before refreshing integrations.
- Changed session summaries to live in `projects/<repo>` instead of
  `sessions/<repo>`.
- Changed internal IDs for spaces and memories from integer autoincrement IDs to
  UUID text primary keys, with `memories.fts_id` retained as the SQLite FTS5
  surrogate.

### Fixed

- Fixed a critical data-loss risk in `mind setup` and `mind setup refresh` where
  malformed JSON or JSONC config files could be overwritten with empty defaults.
- Fixed Codex TOML setup handling so malformed TOML aborts safely and existing
  unrelated tables and comments are preserved.
- Fixed the public installer launcher so new installs run the current entry
  point.
- Fixed protocol wording and update flows that could confuse setup, migration,
  or session recovery workflows.

### Upgrade notes

Run:

```bash
mind update
mind setup refresh
```

If you have older session summaries under `sessions/<repo>`, run:

```bash
mind migrate sessions projects/<repo> --dry-run
mind migrate sessions projects/<repo>
```

Review the dry run before applying the migration.
