# Changelog

## 1.0.8

### Patch Changes

- 99f396e: Add a `dev:<name>` convenience script (`dev:board` / `dev:display` /
  `dev:mcp-server`) as an alias for the existing demo/dev command — no
  behavior change.
- Updated dependencies [5f9deec]
- Updated dependencies [974549e]
- Updated dependencies [9046309]
  - ultimatedarktowerdata@3.0.0
  - ultimatedarktower@7.1.2

## 1.0.7

### Patch Changes

- 0babfd7: Stop `pnpm` printing a scary `[ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL]` /
  `Command failed with signal "SIGINT"`/`"SIGTERM"` / `[ELIFECYCLE]` block when a
  dev/watch/preview script (`vite`, `tsc --watch`, `tsx watch`,
  `electron-forge start`, …) is stopped normally with Ctrl-C — no behavior
  change to the scripts themselves, just a clean exit code on interactive
  interrupt. (pnpm delivers SIGINT directly for a top-level `--filter` run, but
  SIGTERM when the interrupt is relayed through a nested `pnpm run` alias —
  both are now handled.)
- Updated dependencies [25c9a5e]
- Updated dependencies [0babfd7]
  - ultimatedarktowerdata@2.2.0
  - ultimatedarktower@7.1.1

## 1.0.6

### Patch Changes

- fba6490: Add a `dev:<name>` convenience script (`dev:board` / `dev:display` /
  `dev:mcp-server`) as an alias for the existing demo/dev command — no
  behavior change.
- Updated dependencies [33381f7]
  - ultimatedarktowerdata@2.1.0

## 1.0.5

### Patch Changes

- e4e952c: Internal-only: factor the CJS/Node16 `tsconfig.json` family (this package plus `game-data`, the relay family, and `mcp-server`) into a shared root `tsconfig.node-lib.json`, mirroring the existing `tsconfig.browser-lib.json` pattern for `board`/`display`. Each package keeps only its own path options (`outDir`/`rootDir`/`composite`/`include`/`exclude`); the repeated compiler-options block and its explanatory comment move to the shared file.

  No public API or emitted-JS change for `ultimatedarktower`, `ultimatedarktowerdata`, `ultimatedarktowerrelay-shared`, `ultimatedarktowerrelay-core`, or `ultimatedarktowerrelay-client` — verified byte-for-byte identical `dist/` output before/after.

  `mcp-server-return-to-dark-tower` additionally gains the `noUnusedLocals`/`noUnusedParameters`/`noFallthroughCasesInSwitch` strictness its five siblings already had (it was missed by an earlier alignment pass), which surfaced two genuinely dead write-only fields (`TowerController`'s `connected`/`calibrated`) — removed; the public `connected`/`calibrated` snapshot fields are unaffected, since they already read from the `isConnected`/`isCalibrated` getters, not these fields.

- Updated dependencies [e96bc61]
- Updated dependencies [e4e952c]
  - ultimatedarktower@7.1.0
  - ultimatedarktowerdata@2.0.1

## 1.0.4

### Patch Changes

- 2964044: Fix the streamable-HTTP transport leak, harden `--port`, add a DI seam, and stop over-promising in game-content resource descriptions.

  - **HTTP transport leak:** `POST /mcp` now reuses the transport for an established session and only builds a new one for an initialize handshake (registered via `onsessioninitialized`). Previously every POST constructed a fresh transport and called `server.connect()`, leaking one per request.
  - **`--port` validation:** an invalid or missing `--port` value now prints a clear error and exits instead of passing `NaN` to `app.listen` and crashing with `ERR_SOCKET_BAD_PORT`.
  - **Injection seam:** `TowerController.getInstance()` accepts an optional config whose `towerConfig` is forwarded to the `UltimateDarkTower` constructor, so an embedder/test can inject a BLE adapter (e.g. `MockBluetoothAdapter`) instead of relying on `TOWER_PLATFORM`. Behavior is unchanged when omitted. The rolling diagnostics log buffer is now readable via `getBuffer()`/`getBufferSize()`.
  - **Resource descriptions:** the `game-adversaries`, `game-quests`, `game-items`, `game-heroes`, and `game-lore` resource descriptions now signal that their content is a summary/work-in-progress, matching the placeholder markdown they serve.

## 1.0.3

### Patch Changes

- Updated dependencies [cdf7f37]
- Updated dependencies [cdf7f37]
  - ultimatedarktower@7.0.0
  - ultimatedarktowerdata@2.0.0

## 1.0.2

### Patch Changes

- Updated dependencies [6a89e0e]
- Updated dependencies [6a89e0e]
- Updated dependencies [62da52b]
  - ultimatedarktower@6.0.0
  - ultimatedarktowerdata@1.0.0

## 1.0.1

### Patch Changes

- b25a905: Ship the game-content resources, and report the real version.

  All 8 game-knowledge resources (`tower://game/rules`, `/heroes`, `/lore`, …)
  served the literal string `[File not found: game-content/rules.md]` in v1.0.0.
  `loadAsset()` resolves against `dist/`, but the build was a bare `tsc`, which
  doesn't emit `.md` — so the published tarball contained no game content at all.
  The build now copies the assets, and a missing one throws instead of silently
  degrading to placeholder text.

  The server also reported version `0.1.0` over MCP from a hardcoded constant
  while shipping as `1.0.0`; it now reads from `package.json`.

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.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.0.0] - 2026-02-24

### Added

- Dual-transport MCP server: stdio and HTTP (Streamable HTTP) with session management
- HTTP endpoints: `POST /mcp`, `GET /mcp` (SSE), `DELETE /mcp`, `GET /health`
- CLI flags: `--stdio-only`, `--http-only`, `--port <n>`
- 34 MCP tools across 6 categories:
  - Connection (9): `tower_connect`, `tower_disconnect`, `tower_calibrate`, `tower_status`, `tower_device_info`, `tower_is_responsive`, `tower_reconnect`, `tower_set_connection_monitoring`, `tower_set_battery_monitoring`
  - Audio (3): `tower_play_sound`, `tower_play_sound_by_name`, `tower_list_sounds`
  - Lights (6): `tower_set_lights`, `tower_set_led`, `tower_light_sequence`, `tower_light_sequence_by_name`, `tower_lights_on`, `tower_lights_off`
  - Drums (4): `tower_rotate`, `tower_rotate_drum`, `tower_random_rotate`, `tower_get_drum_positions`
  - Seals (5): `tower_break_seal`, `tower_is_seal_broken`, `tower_get_broken_seals`, `tower_reset_seals`, `tower_random_seal`
  - State & Glyphs (7): `tower_get_state`, `tower_send_state`, `tower_get_glyphs`, `tower_get_glyph`, `tower_glyphs_facing`, `tower_skull_count`, `tower_reset_skull_count`
- 17 MCP resources:
  - Tower state snapshots: `tower://connection`, `tower://device-info`, `tower://battery`, `tower://drums`, `tower://glyphs`, `tower://seals`, `tower://state`, `tower://audio-library`, `tower://light-effects`
  - Game content: `tower://game/rules`, `tower://game/adversaries`, `tower://game/quests`, `tower://game/items`, `tower://game/heroes`, `tower://game/buildings`, `tower://game/lore`, `tower://game/glossary`
- 8 MCP prompt templates: `dramatic_entrance`, `victory_sequence`, `defeat_sequence`, `monthly_transition`, `dungeon_run`, `battle_start`, `game_master_setup`, `sound_browser`
- `TowerController` singleton wrapping `ultimatedarktower` with full connection lifecycle, calibration, state management, and error wrapping via `wrapToolHandler()`
- `TowerSnapshot` interface for resource generation
- Zod validation schemas for all tool inputs (navigation, lights, audio, seals, glyphs)
- Lookup maps for case-insensitive name resolution (sounds, light sequences, light effects)
- MCP-compatible logging bridge (`McpLogOutput`)
- GitHub Flow release process and commit conventions in `CONTRIBUTING.md`
- `ci`, `type-check`, `format`, `format:check`, `prepack`, `prepublishOnly`, `publish:check` npm scripts
- `files` allowlist and `publishConfig` for clean npm publishing

### Removed

- SVG glyph assets (glyphs managed via game state resources)
