# Changelog

All notable changes to `@napster-corp/edge-mcp` are documented here, following
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
[Semantic Versioning](https://semver.org/).

## [0.3.0] - 2026-08-08

### Removed

- **The dev panel.** `installDevPanel()`, the `@napster-corp/edge-mcp/dev-panel`
  subpath export, and the `edge-mcp-dev-panel.iife.min.js` bundle are gone.
  Chrome's DevTools **WebMCP panel** now covers inspection natively (tools and
  their calls are visible there via the 0.2.0 native-registry integration), and
  the toolkit's console flow logs cover the rest — including live resources,
  which DevTools cannot see. Migration: delete the `installDevPanel` import and
  call; for visibility, use the DevTools WebMCP panel plus
  `setDebug(true)` (or `globalThis.__EDGE_MCP_DEBUG__ = true` from the console).

### Added

- Debug logging now also narrates the consumer side of resources: every
  `readResource` (`resource "…" read →`) and every subscribe/unsubscribe
  (`resource "…" — consumer subscribed/unsubscribed`), so the full
  tools-and-resources flow is visible from the console alone.

## [0.2.0] - 2026-07-23

### Added

- **Native-registry integration.** When the polyfill takes over a *native*
  browser WebMCP surface, it now integrates with that displaced native registry
  so native-registry consumers — Chrome's DevTools WebMCP panel and any built-in
  browser agent that enumerates the native store rather than reading the JS
  `document.modelContext` property — see the tools *and* the calls made to them.
  Previously they saw an empty registry, because the takeover routes all
  `registerTool` calls into our own surface. Two parts:
  1. Every registered tool is **mirrored** into the native registry as a
     discovery replica (the panel lists it). The native replica drops
     annotations (native has no field for them); registration/unregistration
     follows the current AbortSignal lifecycle.
  2. Real (non-testing) executions are **routed through native** (the panel logs
     each call). Our surface stays the front door: args are validated on our
     side first (bad input never reaches native). The tool runs exactly once,
     inside native's execute path; native execution failure is surfaced with no
     local retry. Native shapes the error the calling script sees — it
     substitutes a generic message, so thrown-error detail reaches the DevTools
     panel but not the agent (tools that *return* a `{ ok:false, error }` payload
     keep their detail; only *thrown* errors are flattened).

  Every native call is best-effort — the first failure disables the integration
  so a mismatched native API can never destabilize the primary surface. Opt out
  entirely with `{ mirrorToNativeRegistry: false }`, which keeps everything on
  our own surface (execution local, detailed error formatting intact). No-op
  when there is no native surface or when a foreign polyfill occupied the slot.

## [0.1.0] - 2026-07-08

First official release of Edge MCP — the toolkit that prepares a website for
AI agents, on the WebMCP standard:

- **WebMCP polyfill** (vendored fork): installs `document.modelContext` in
  every browser, carries tool `annotations` through `getTools()`, and owns the
  surface even when a native implementation exists (current native surfaces
  drop annotations and reject foreign tool objects in `executeTool()`).
- **Live-state resources** — `registerResource(...)`, the agent's eyes on
  state that changes out-of-band.
- **Ambient TypeScript types** — `document.modelContext` type-checks (tools
  and resources) as soon as the package is imported; no hand-written
  declarations needed.
- **Dev panel** (opt-in, dev-only) for hand-testing tools and watching
  resources live.
- **Script-tag builds** for sites without npm or a bundler, served from any
  npm CDN (`dist/edge-mcp.iife.min.js`).
- **`edge-mcp` CLI** — `generate`, `install-hook`: keeps the
  registered tool surface in sync with the app's code.
