# Changelog

All notable changes in this branch compared to `main` are documented here.

## [Unreleased]

### Added

- **o11y-data skill: GCP and Alicloud support**
  - Authentication and GS API queries for `gcp` and `alicloud` in addition to `aws`.
  - `o11y_auth_request` in `o11y-data.sh` with provider validation (`aws` | `gcp` | `alicloud`; `azure` explicitly unsupported for credential retrieval).
  - `o11y_gs_query`, `o11y_ds_metrics_base`, `o11y_probe_metrics_target`, `o11y_extract_metrics_uuid`, `o11y_pick_metrics_uuid`, `o11y_find_cluster_record`, and `o11y_resolve_serverless_keyspace` for cluster lookup and metrics target resolution.
  - `o11y_resolve_metrics_targets` to resolve app and infra O11Y UUIDs for a cluster.
  - `o11y_metrics_instant_query` for instant Prometheus queries.
  - Documented region lists per vendor (AWS, GCP, Alicloud) and three-tier cluster lookup (Clinic API → GS API → ask user) in `SKILL.md`.

- **o11y-data skill: documentation and behavior**
  - `SKILL.md` updated for multi-cloud (S3/GCS), Loki, and profiling; trigger phrases extended (e.g. `loki query`, `profiling data`, `topsql`, `control plane logs`).
  - Step 0 rewritten: locate cluster and authenticate with Tier 1 (Clinic API), Tier 2 (GS API scan across vendors/regions), Tier 3 (ask user); bizType ↔ deploy type inference table.
  - Coverage described for Dedicated, Premium, Starter/Essential, and BYOC tiers.

### Changed

- **o11y-data**
  - `o11y-inspect.py`: multi-cloud and inspection flow updates; removal of unused imports and variables; f-strings without placeholders replaced with normal strings where appropriate.
  - `o11y-data.sh`: expanded to support multiple providers and new helpers for metrics resolution and instant queries.
  - `inspect_cluster.py`: extra blank line before `main()`; unused variables removed.
  - `o11y-s3-explore.py`: unused `json` import removed; two blank lines before top-level function definitions and before `if __name__`.

- **Metrics**
  - `metrics/client.py`: removed unused imports (`timezone`, `Union`, and unused `.models`); fixed continuation-line indentation; two blank lines before `export_metrics_to_file`.
  - `metrics/cli.py`: removed unused imports (`timedelta`, `Any`, `Dict`, `Optional`).
  - `metrics/models.py`: removed unused `Union` import.

- **export_metrics_to_s3.py**
  - Removed unused `time` and `timedelta` imports; normalized blank lines (E302, E305); exception variable renamed to avoid F841; argument parser continuation lines reindented (E128).

- **o11y-mcp-server**
  - `server.py`: added `# noqa: F401` for tool imports used for side-effect registration.
  - `src/services/loki_resolve.py`: removed whitespace before `:` in slice notation (E203).
  - Tests: `test_auth_forwarding.py` — removed unused `_ensure_auth_base` import; Loki tool tests — added `# noqa: E402` for imports after `sys.path` setup; `test_read_delta.py` — blank lines (E302, E305), removed unused `req` and `mock_creds` (F841).

### Fixed

- **Code quality (flake8)**
  - F401: unused imports removed or suppressed with noqa where required for side effects.
  - E302 / E305: two blank lines before top-level functions/classes and after function/class definitions.
  - E128: continuation lines under-indented for visual indent (argument lists, comprehensions).
  - E203: whitespace before `:` in slices.
  - E402: module-level imports not at top of file in tests (noqa where path manipulation is required).
  - F541: f-strings without placeholders replaced with normal strings.
  - F841: unused local variables removed or renamed.
