# Changelog

## 2026-05-24 — v2: Products + Inventory API

### 新規

* **Products API** `POST /api/products/bulk-upsert` — 商品マスター一括登録・更新。価格変更ログ自動記録。
* **Inventory Levels API** `POST /api/inventory-levels/bulk-upsert` — 絶対値 + delta 両対応。欠品自動検知 (`stock_zero`)。
* **Inventory Daily Snapshots** — 日次 cron で全在庫を毎日スナップショット保存。

### 破壊的変更

* **External Signals API 廃止** — `POST /rest/v1/external_signals` (Supabase PostgREST 直接) は使用不可。
* **Pixel Events API 廃止** — `POST /api/pixel-events` は使用不可。
* **Shopify Webhooks 自動購読 廃止** — Webhook 依存から外部アプリ push モデルに移行。
* **DB スキーマ再構築** — `sot` / `agent_runtime` / `agent_read` / `public` の 4 スキーマに分離。旧テーブルは全て削除。

### アーキテクチャ変更

* 全データは外部アプリが API 経由で push する設計に統一。
* Base URL が `inventory-os.fly.dev` から `ai.lmile.io` に変更。
* 認証が Supabase service\_role から `x-cron-secret` + `x-shop` ヘッダーに変更。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lmile.gitbook.io/lmile-docs/resources/changelog.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
