# Changelog

> What changed in Sypnia Data, newest first.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://data.docs.sypnia.com/reference/changelog/

For agents: Changelog of Sypnia Data. 2026-11-18: @sypnia/data 0.3.1 (init installs @sypnia/cases with the app's package manager, --no-install skips it; depends on @sypnia/cases 0.2), the Data project ↔ Cases map link both ways (PUT/DELETE /v1/projects/{ref}/cases-map; uploaded maps forwarded to the linked Cases map as draft proposals; Cases' service calls on behalf of a person on a few routes); @sypnia/data 0.3.0, @sypnia/data/sypnorm a deprecated re-export of @sypnia/cases/sypnorm (a dependency), npx @sypnia/data map runs npx @sypnia/cases map, init --cases writes src/use-cases/ and the sypnia-cases skill, a case some case listens to runs in its area's service (POST /_cases/<id>), not over the Data API runner. 2026-11-17: documentation published (auth, machines, Data API, SQL, console, Sypnia Cloud, architecture, self-hosting, API reference, security). 2026-11-17 security fix: privileged scopes (sql:*, auth:admin, project:admin) need app_metadata.scopes set by an admin; 403 scope_not_allowed otherwise; account changes need the person's session; CLI default scope data:read data:write offline_access. 2026-11-17: no e-mail on behalf of customer projects (409 email_provider_required without a provider; email_ready, mail_state); protected API keys (409 protected_key, rotate-protected).

## 2026-11-18 — `@sypnia/data` 0.3.1 and the link to Sypnia Cases

- **`npx @sypnia/data init` installs `@sypnia/cases`** in the app when you choose Sypnorm and Sypnia Cases, with the app's package manager (npm, pnpm, yarn or bun); `--no-install` skips it. `@sypnia/data` depends on `@sypnia/cases` 0.2.
- **A Data project links to a Sypnia Cases map, both ways.** Cases writes the link with `PUT /v1/projects/{ref}/cases-map` (and removes it with `DELETE`), and a map uploaded with `npx @sypnia/cases map --upload --project <ref>` is forwarded to the linked Cases map as a draft proposal. Maps uploaded before the link stay in Data ([The link to Sypnia Cases](https://data.docs.sypnia.com/cloud/endpoints-and-limits#the-link-to-sypnia-cases)).
- **Sypnia Cases calls the Cloud API on behalf of a person** (`Authorization: Service <key>`), only on the routes it needs, with that person's role checked as usual.

## 2026-11-18 — `@sypnia/data` 0.3.0: Sypnorm comes from `@sypnia/cases`

- **`@sypnia/data/sypnorm` is deprecated.** It re-exports `@sypnia/cases/sypnorm`, which `@sypnia/data` now installs as a dependency, and prints a `DeprecationWarning` (`SYPNIA_NO_DEPRECATION=1` silences it). `createServer` from `@sypnia/data/server` does the same. Code written for them runs unchanged; results also carry the new fields (`outcome`, `data` and `tell`, next to `value`, `failure` and `message`), so a test that compares a whole result with `toEqual` needs `toMatchObject`. Import from `@sypnia/cases/sypnorm`.
- **`npx @sypnia/data map` runs `npx @sypnia/cases map`**, and says so. `npx @sypnia/cases map --upload --project <ref>` sends the map to the project's [Use cases](https://data.docs.sypnia.com/console/auth-machines-and-use-cases#use-cases).
- **`init --cases`** writes `src/use-cases/` for `@sypnia/cases/sypnorm` and installs the `sypnia-cases` skill, which teaches the case files, `generate`, `ctx.outcome` and the areas' services.
- **A case some case listens to runs in its area's service**, which the app calls with the person's session (`POST /_cases/<id>`, under row-level security); its event is written to the outbox there, with its data. The Data API runner, `createRunner(client, { atomic: true })`, runs the cases nobody listens to and refuses the others ([Runners](https://cases.docs.sypnia.com/sypnorm/runners/)).

## 2026-11-17 — e-mail comes from your own provider; protected keys

- **Sypnia sends no e-mail on behalf of your project.** A Cloud project without a provider answers `409 email_provider_required` to sign-up with confirmation, magic links, codes, recovery, invites, e-mail changes and reauthentication, before anything is written. Google, GitHub and password sign-up without confirmation keep working. `GET /auth/v1/settings` adds `email_ready`; `GET /auth/v1/admin/settings` adds `mail_state` and `mail_providers`. See [E-mail providers](https://data.docs.sypnia.com/auth/email-providers-and-templates#without-a-provider).
- **Self-hosting is unchanged**: every project may use the engine's own sender unless `SYPNIA_DATA_MAIL_DEFAULT_REFS` limits it.
- **Protected API keys.** `protected: true` on a key; revoking it answers `409 protected_key`; `POST /auth/v1/admin/api-keys/{id}/rotate-protected` replaces it in one transaction. The console's key of every Cloud project is protected. Engine migration `install/0004`.

## 2026-11-17: Sypnorm moves to Cases

- **Use any ORM.** Sypnia Data is the data layer: auth, tables, the Data API, SQL, row-level security and MCP. It works with plain SQL, Prisma, Drizzle or any other tool ([Use any ORM](https://data.docs.sypnia.com/data/any-orm)).
- **Sypnorm belongs to Sypnia Cases.** Its pages moved to the [Cases docs](https://cases.docs.sypnia.com/sypnorm/); it is `@sypnia/cases/sypnorm`, and `@sypnia/data/sypnorm` and `npx @sypnia/data map` only hand over to it (2026-11-18).
- The `@sypnia/data` package page moved to [Data → @sypnia/data](https://data.docs.sypnia.com/data/sdk).

## 2026-11-17 — engine: transactions over HTTP, an API description, stricter settings

- **Transactions.** `POST /rest/v1/transaction` runs Data API operations in one transaction as the caller, with increments, expectations and references to earlier results. `POST /sql/v1/transaction` does the same for SQL statements. Sypnorm's `createRunner(client, { atomic: true })` uses it, so atomic use cases work on managed projects (`@sypnia/data` 0.1.3).
- **API description.** `GET /rest/v1/` returns an OpenAPI 3.1 document of the project's Data API.
- **Fresh metadata.** PATs and tokens an app got for a person carry the person's current `app_metadata` and `user_metadata`.
- **Stricter checks.** A Data API call with a token that has neither `data:read` nor `data:write` (only `sql:*`) gets `403 insufficient_scope`. Out-of-range session policies get `400 invalid_session_policy` instead of being adjusted. Templates are checked on save (`400 invalid_template`), and settings return the default templates.
- **SQL limits.** SQL results say `truncated`, plus the `row_limit` applied.
- **Deleting projects.** Deleting a managed project drops its database and roles.
- **MCP.** One MCP server for every project, at `https://mcp.data.sypnia.com`.
- **Self-hosting.** A Docker image, a compose file with Postgres and Mailpit, and an AWS template.

## 2026-11-17 — security fix: privileged scopes need an entitlement

Before launch, a signed-up user could give themselves `sql:write` through a PAT or a device approval.

- `sql:*`, `auth:admin` and `project:admin` now count on a user's token only when an admin lists them in `app_metadata.scopes`. Asking for them otherwise fails with `403 scope_not_allowed`.
- Account changes (password, e-mail, PATs, sessions, linked identities) need the person's own session.
- `npx @sypnia/data login` asks for `data:read data:write offline_access` by default.

See the [threat model](https://data.docs.sypnia.com/security/threat-model#fixed-findings).

## 2026-11-17 — the documentation

The documentation is published: auth, machines and agents, the Data API, SQL, the console, Sypnia Cloud, the architecture, self-hosting, the API reference and security. Every change from here on is listed on this page.
