# Changelog

All notable changes to this project will be documented in this file.

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

## [Unreleased]

*No unreleased changes.*

## [0.0.2] - 2026-03-25

### Added

- `VidereClient.get_spikes_spec()`: Retrieve spike interface metadata for a linked dataset.
- `VidereClient.get_spikes_by_channel()`: Retrieve spike timestamps and neuron labels per recording channel, with optional waveform snippets.
- `VidereClient.get_spikes_by_neuron()`: Same spike data regrouped by sorted neuron identity.
- `VidereClient.get_neurons()`: Retrieve neuron descriptors (spike count, rate, SNR, waveform peak amplitude, probe position) per channel.
- New domain models: `SpikesSpec`, `ChannelSpikeData`, `NeuronSpikeData`, `NeuronsResult`, `NeuronInfo`.
- `DatasetMetadata.associated_spikes_ids`: List of registered spikes datasource IDs discovered when the recording file was linked.

### Changed

- `link_data_file()` now automatically discovers and registers any associated `.spikes` file alongside the recording, populating `DatasetMetadata.associated_spikes_ids`. No change required at the call site.

## [0.0.1] - 2026-03-23

Initial stable release. All three clients (`AllegoClient`, `VidereClient`, `CurateClient`) with zero-config service discovery, strict mypy typing, and Pydantic v2 domain models.

### Added

#### AllegoClient (Real-time Acquisition)

- `healthcheck()`, `get_status()`, `set_stream_state()`, `set_record_state()`, `restart()` for session lifecycle.
- `get_signals()` for real-time signal data retrieval with `FlexTimeRange` / `FlexSignalSpec` convenience types.
- `get_channel_metadata()` for channel information.
- `get_stim_params()`, `set_stim_params()`, `set_trigger_control()` for stimulation control, including `headstage_global_amp_settle`.
- `get_recording_config()` and related methods for recording configuration.
- `get_dsp_group()` and `set_dsp_group()` for real-time filter configuration.
- `get_core_config()` and `set_core_config()` for global hardware settings (sampling frequency, loop duration, cable delays).
- `get_intan_impedance()` for channel impedance measurement and `scan_ports()` for hardware discovery.
- `get_dac_reg()`, `set_dac_gain()`, `set_dac_stream()`, `set_dac_off()`, `set_dac_highpass()` for DAC control.
- `get_dio_reg()`, `set_dio_events()`, `set_dio_manual()`, `set_dio_gated()`, `set_dio_pulse()` for Digital Output control.
- `get_kpi_metrics()`, `get_kpi_status()`, `set_kpi_packet_dur()`, `set_kpi_update_period()` for real-time signal-quality metrics.

#### VidereClient (Offline Analysis)

- `link_data_file()` for linking recorded data files (`.xdat`, `.rhd`).
- `get_signals()` for offline signal data retrieval.
- `get_dsp_group()` and `set_dsp_group()` for offline filter configuration.
- `list_data_sources()`, `list_data_source_ids()`, `clear_data_sources()`, `export_data_source()` for data source management.
- `get_kpi_metrics()`, `get_kpi_status()`, `kpi_calculate()`, `kpi_clear()`, `set_kpi_packet_dur()` for offline signal-quality metrics.

#### CurateClient (Data Curation)

- `link_data_file()` with `Path` support and progress bars.
- `slice_time()` and `slice_channels()` for time and channel subsetting.
- `downsample()` for sample-rate reduction.
- `highpass()`, `lowpass()`, `bandpass()`, `bandstop()`, `notch()` for filtering transforms.
- `car()` for Common Average Reference, `virtual_ref()` and `paired_ref()` for re-referencing.
- `set_protocol()` for registering arbitrary multi-step transform graphs (DAGs).

#### Domain Models

- `StimParams` with stimulation enums and `headstage_global_amp_settle`.
- `DSPGroup`, `DSPParams`, `DSPType`, `FilterStage` for filter configuration.
- `CoreConfig`, `CableDelay`, `SetCoreConfigRequest` for hardware settings.
- `Impedance`, `ImpedanceValue` for impedance data.
- `AnalogOutRegister`, `AnalogOutChannel`, `DACHighPass` for DAC configuration.
- `DigitalOutRegister`, `DigitalOutChannelRegister`, `DIOMode` for DIO configuration.
- `KpiMetric`, `KpiMetricId`, `KpiMetricsResult`, `KpiMode`, `KpiStatus` for signal-quality metrics.
- `TransformNode`, `TransformEdge`, `TransformNodeType` and all transform parameter models for curation protocols.
- `FlexTimeRange` and `FlexSignalSpec` convenience types with Pydantic runtime coercion.

#### Infrastructure

- Zero-config authentication via `AuthInterceptor`.
- Auto-discovery of server UUID and service endpoints.
- `BaseClient` with shared gRPC channel pool and lifecycle management.
- Proto-driven type safety architecture with `_converters/` / `_services/` layer separation.
- MkDocs documentation site with auto-generated API reference.
- Automated PyPI publishing via GitHub Actions (Trusted Publishing).
