# Changelog

Notable changes to the Board Web SDK (`@board.fun/web-sdk`). The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

> **Note**: The Web SDK is at v1.0.0, first stable. v1.0.0 covers the full public-API surface of the Board platform and is the first version intended for shipping games.

## \[1.0.0\] - 2026-05-31

First stable release. The SDK covers the full public-API surface of the Board platform across the input, session, save, avatar, pause, and application domains, exposed through a single frozen `Board` object. ESM-only, with full TypeScript types.

### Added

- **`Board.input`**: per-frame touch and Piece snapshot stream. `subscribe(callback)` / `unsubscribe(callback)`. Each contact carries `contactId`, `type` (`BoardContactType.Finger` / `Glyph` / `Blob`), `glyphId`, `x`, `y`, `orientation`, and `phase`. Positions are device pixels, origin top-left, Y down. Identify Pieces by `glyphId`. Games diff snapshots themselves to get discrete edges.
- **`Board.session`**: roster and profile management. `getPlayers()`, `getPlayerCount()`, `addGuest()`, `removePlayer()`, `resetPlayers()`, `getActiveProfile()`, `presentAddPlayer(aiTypeIndices?)` and `presentReplacePlayer(sessionId, aiTypeIndices?)` (both resolve `Promise<boolean>`), `setAIPlayerTypes(types)`, and `areServicesReady()`. The roster is OS-owned.
- **`Board.save`**: `create`, `load`, `list`, `update`, plus `removePlayersFromSave`, `removeActiveProfileFromSave`, `loadCoverImage`, `getAppStorageInfo()`, and `getUniquePlayers(saves)`. There is no direct delete: a game removes its own players, and the system deletes the save once no players remain (matching the Unity SDK). Save metadata carries `hasCoverImage`, `payloadChecksum`, `coverImageChecksum`, `players[]`, `playerCount`, and the usual id/timestamps/version/size fields, plus max-size getters.
- **`Board.avatar`**: cached, player-scoped avatar loader. `loadPNG(avatarId)` and `getDefault()` resolve to PNG data URIs; `forPlayer(player)` is a shortcut.
- **`Board.pause`**: system pause overlay. `setContext(context)`, `updateContext(partial)`, `clearContext()`, the `onResult(callback)` subscription (preferred), and a legacy `pollResult()`. The OS owns the menu button.
- **`Board.application`**: `quit()` returns to the launcher; `showProfileSwitcher()` / `hideProfileSwitcher()` drive the OS profile switcher.
- **`Board.isOnDevice`** and **`Board.sdkVersion`** top-level properties.
- **`web-pack` packaging tool**: builds a flat `<appId>.webapp.zip` and a harness-config v1 manifest from a static build directory, using a cross-platform pure-JS zip. Mints a random-UUID `appId` once and persists it to `board.config.json`. Optional `--model` records a Piece Set Model’s sha256.

### Compatibility

- ESM-only. Node 18 or newer for the build toolchain.
- Requires a Board device on the MP.1.9.x OS family or newer for the web-app install and logs workflow (confirm with `board-connect capabilities`).
- Cross-platform tooling (macOS, Linux, Windows).

## Earlier Versions

The 0.x prerelease series is not documented here. v1.0.0 is the first stable release intended for shipping games.
