# Changelog

## Unreleased

## 0.15.0 – 2026-11-23

- Add the `chumbo/middleware` subpath (`withChumbo`, `chumboMcpHandler`, `withMcpCors`, `withMcpTransportArmor`) so Chumbo's result middleware, lifecycle events, surface proofs, access gates, and durable state compose directly as `@supabase/middleware` pipeline entries on official `@supabase/server` MCP functions, plus official-block detection and safe adoption in `chumbo setup` and `chumbo cloud setup`.
- Add transport armor (`applyMcpTransportArmor`), opt-in browser CORS (`applyMcpCorsPreflight`, `decorateMcpCorsResponse`), normalized `ctx.client` (`resolveMcpClientContext`, `resourceLinkFallbackMiddleware`), and Node disconnect abort propagation in `chumbo/node` so stateless Edge Functions and Node hosts immediately reject unsupported listen streams instead of hanging.
- Add ergonomic `ctx.state` wrappers (`ctx.sessionState`, `issueMcpSessionId`, `activeWorkspaceStore`, `registerUseWorkspace`, `observeResource`, `requireObserved`, `mintPreview`, `consumePreview`) for session-scoped workspace routing, 3-step observation-before-action CAS, and single-use payload-bound preview confirmation tokens.
- Add dual-lane result guidance (`guidedResult`, `renderGuidedResult`, `resultGuidanceSchema`, `withResultGuidance`), open output schemas (`openOutputSchema`, `withOpenOutputSchema`), domain-explicit Supabase error mapping (`fromSupabaseError` with dev-only missing-grant hints on `42501`), composite keyset cursors (`defineCursor`), streamlined `registerCollection` / `collectionResult`, optional `cli` metadata on `defineCapability`, and promoted `chumbo` run-correlation helpers (`RunHandle`, `RunFact`, `withRunInput`, `ctx.run`).
- Add declarative capability profiles (`defineProfile`, `defineProfiles`, `withProfile`), permission-projected input fields (`projectInputFields`, `registerProjectedCapability`), profile-safe guidance rewriting (`scopedGuidance`, `scopedInputSchema`), and canonical vocabulary resolution (`resolveCanonicalVocabulary`).
- Add turnkey MCP Apps (`defineMcpApp`, `registerMcpApp`, `injectAppPresentation`, `buildHubUrl`, `requestIdFieldSchema`, `idempotencyConflictResult`, client `readAppPresentation`, `applyAppPresentation`, `callAppTool`, `createAppMutation`), single-file app scaffolding and bundling (`chumbo app add|build|list`), and an interactive local host simulator (`chumbo dev --workbench --app`).
- Add local project-branded CLI scaffolding, archiving, and in-process testing (`chumbo cli init|status|render|try`), headless `<BINARY>_TOKEN` / `--token-stdin` / `--token` authentication with lazy `@napi-rs/keyring` loading, HMAC-partitioned `tools/list` discovery caching, built-in `<binary> skill <install|status|update>` and escaped `<binary> completions <zsh|bash|fish>`, and the zero-dependency `chumbo/connect` subpath (`describeAgentConnections`, `renderConnectMarkdown`).
- Add the public `chumbo/testing` harness (`createMcpTestClient`, `createTestAuthHarness`, `lintUnmountedToolReferences`, `assertRlsIsolation`), deterministic catalog token budgeting (`estimateCatalogTokens`, `doctor` `context-budget` and SQL `GRANT` remediation), local multi-persona execution (`chumbo try`), Git-committable surface lockfiles (`chumbo surface snapshot|diff`), and payload-free journey contract test scaffolding (`chumbo test scaffold`).

## 0.14.0 – 2026-11-23

- Add self-hosted Insights support with `chumbo setup --insights`, the `chumbo/insights` subpath (`createTelemetrySink`, `composeEventSinks`, `buildRunTimeline`, `collapseStepRepeats`, and `createSupabaseInsightsAdapter`), the `chumbo-telemetry@2` Postgres migration (`templates/migrations/telemetry.sql.tpl`), and a standalone Supabase Auth dashboard (`insights/index.html`) that captures capability names, counts, outcomes, and response times without storing prompts, arguments, or results.
- Upgrade `createRunCorrelation` with `onInvalidHandle: "ignore"` (recording `runRejected` on `capability.finished` instead of failing tool calls when an expired or malformed handle arrives), first-call run preservation when `mint(context)` runs inside a handler, and `sessionHeader` for issuing and verifying HMAC-signed `Mcp-Session-Id` headers across MCP sessions.
- Compose existing `onEvent` sinks with `chumboCloudOnEvent` during `chumbo cloud setup` instead of refusing projects that already record self-hosted telemetry.

## 0.13.0 – 2026-11-09

- Run `chumbo doctor --url` against any Supabase-backed MCP server, including
  one built from Supabase's guide with `withSupabase` and
  `withOAuthProtectedResource`. Checks that only apply to a Chumbo runtime are
  skipped for other servers, and an endpoint that is not an MCP server fails.
- Look for protected-resource and authorization-server metadata in the order
  MCP clients do, and add the `authorization-server-metadata`, `issuer-match`,
  `client-registration`, and `signing-keys` checks. A custom-domain issuer
  mismatch, metadata clients cannot find, a missing registration endpoint, a
  published signing secret, or a legacy HS256 project now shows up before a
  client gives up at discovery.
- Add `--second-token`. With two user tokens, `user-isolation` calls tools the
  server marks `readOnlyHint: true` that need no input, as both users, and
  flags a tool that returns the same non-empty result to each after removing
  each user's own id and email. It is a heuristic, not proof of isolation.
- Add advisory `data-api-grants` and `tool-surface` checks. The first explains
  permission-denied errors caused by tables without Data API grants. The second
  reports missing descriptions, missing `readOnlyHint`, undescribed inputs, and
  results over 16 KiB.
- Doctor requests time out after 10 seconds, discovered URLs must use https
  outside loopback, and requests that carry your token are sent only to the
  URL you name and never follow redirects.
- Describe `limit` and `cursor` in `collectionInputSchema`, so agents see how
  to fill every paginated tool's inputs.
- Find local Supabase Auth metadata below the issuer path when the
  origin-level location returns 404, so OAuth discovery works against
  `chumbo dev`.
- Share the application's Zod through a `^4.2.0` peer dependency, with packed
  consumer checks at the minimum and development versions. Pin generated Edge
  Functions and source-reference tests to Zod 4.6.7.
- Run on `@supabase/server` 1.9.2, the release line behind Supabase's
  `withSupabase` and `withOAuthProtectedResource` helpers, instead of 1.4.1.
  Newly generated Edge Functions pin the same version.
- Mark the reference documentation MCP's tools read-only and describe their
  inputs. Keep only English validation messages in the English-only
  review-queue app, and enforce its 400 kB HTML budget during ordinary checks.

## 0.12.2 – 2026-09-25

- Allow an application-owned OAuth issuer to verify opaque, resource-bound
  access tokens through an optional verifier with explicit issuer and resource
  coordinates. These tokens receive an anonymous Supabase client; the default
  Supabase JWT path remains unchanged.

## 0.12.1 – 2026-09-19

- Refresh cached OAuth discovery when a user explicitly runs a project CLI
  login, so newly enabled or changed authorization-server capabilities are
  picked up across direct Supabase endpoints and custom app URLs. Nested
  command help now renders before required input validation.

## 0.12.0 – 2026-09-19

- Add a shared capability metadata seam that lowers to ordinary scoped MCP tool
  registration while advertising an optional domain-oriented CLI command,
  stable risk/idempotency facts, and presentation hints. Existing raw MCP tool
  registration remains compatible through an explicit CLI fallback.
- Add a configurable Node CLI host for project-branded packages. It discovers
  only the authenticated caller's tools, invokes the same MCP endpoint, supports
  browser PKCE login/status/logout, stores OAuth state in the operating-system
  credential store partitioned by issuer, emits human or stable JSON receipts,
  and fails closed for unconfirmed writes in non-interactive sessions.
- Add a pure package renderer for project-branded CLIs. Package name,
  binary name, display identity, endpoint, support URL, and optional Chumbo
  attribution are configuration. Bounded license, npm access, and canonical
  repository metadata remain user-selected; registry publication remains
  an external release step.
- Make Next.js and standalone Node servers first-class host targets.
  `npx chumbo setup --target next` generates a colocated App Router route
  handler and `--target node` generates a server entry served through the new
  `chumbo/node` adapter (`toNodeHandler` and `serve` over `node:http`, with
  streamed SSE bodies and reverse-proxy URL reconstruction). Both share the
  ordinary `capabilities.ts` seam, access modes, and result contracts; the
  Supabase Edge Function remains the unchanged default target, and the
  application's Supabase project remains the identity and data plane
  everywhere.
- Let `chumbo doctor` probe any deployed MCP URL from any directory: it no
  longer requires `supabase/config.toml`, detects host-target scaffolds for
  local checks, and setup/status resume host targets idempotently with the
  same stable step IDs. The generated smoke now type-checks both host
  scaffolds and proves a live generated Node server through a complete
  doctor round trip.

## 0.11.3 – 2026-09-14

- Make `chumbo cloud setup --deploy` follow the project's declared Supabase
  command when one exists, otherwise prefer its installed local CLI. Function
  import maps now select server-side bundling, and an explicit
  `verify_jwt = true` setting is preserved instead of being overridden.

## 0.11.2 – 2026-09-14

- Let `chumbo cloud setup` recognize typed `createSupabaseMcp<Database>(...)`
  calls. If Cloud task validation or safe patch planning fails after pairing,
  report the session as failed instead of leaving an apparently active agent
  behind.

## 0.11.1 – 2026-09-14

- Add `chumbo cloud setup`, a PKCE-bound device-style handoff that lets a
  builder approve one selected Chumbo Cloud installation in the browser while
  a local agent safely plans, applies, checks, deploys, and verifies the
  corresponding Chumbo analytics hooks. The pairing grant is short-lived and
  scoped; deployment and conflicting application hooks remain explicit stops.
  Cloud responses are schema- and path-validated before use, machine mode
  never prompts, plans show the exact additions, and progress-reporting outages
  do not hide completed local work or deployment.

## 0.11.0 – 2026-09-04

- Add `collectionInputSchema`, `collectionOutputSchema`, `collectionResult` and
  `collectionLimits` for validated, compact list/search pages bounded by count
  and complete encoded response size. Builders own projections and keyset
  queries; continuation follows the last returned item, and oversized records
  produce explicit recoverable errors without skipping.
- Bound additive middleware by each collection's complete response budget.
  Text, structured and deliberate hybrid modes retain their separate uses.
  Dogfood pagination and navigation guidance in docs search and result examples.
- Expand the shipped Chumbo skill with collection, detail, mutation receipt,
  consistency and recovery contracts, and use bounded pagination in its starter
  capability example.

- Make the first-party `chumbo` skill the recommended agent-assisted
  development path. New installs use the canonical `skills/chumbo/` path.

## 0.10.3 – 2026-08-31

- Add bounded `appendResultText`, `prependResultText`, and
  `composeResultContent` helpers plus optional successful-tool result
  middleware. Additions preserve authored structured data, Resources, Apps
  metadata, and future result fields; invalid or failed middleware leaves the
  last valid composition intact and reports through the application error
  hook.
- Complete the local-first generated Edge Function loop with explicit
  Supabase start/serve/probe guidance, classified doctor checks for MCP
  initialization, discovery, and an opt-in named tool call, plus local
  API-key environment loading that stays separate from hosted secrets. Local
  URLs follow each project's configured Supabase API port.

## 0.10.2 – 2026-08-31

- Add an optional builder-owned `onSurface` sink that receives a bounded,
  canonical, redacted proof only after a complete successful `tools/list`.
  Proofs contain the exact effective tool catalog and a stable content digest,
  while excluding caller identity, scopes, credentials, traffic, and arbitrary
  protocol metadata. Unconfigured runtimes do no surface inspection or
  delivery work.

## 0.10.1 – 2026-08-30

- Reduce the generated capability starter to one immediately runnable identity
  tool with an explicit `ctx.supabase` replacement seam. Keep the wider tools,
  Resources, prompts, elicitation, and result-contract surface discoverable and
  executable in the living capability showcase.
- Refresh the public README around Chumbo's setup, deployment, and capability
  path. Clarify that API-key mode resolves an application-owned subject and
  scopes while `ctx.supabase` uses the anonymous Supabase role.

## 0.10.0 – 2026-08-29

- Add opt-in signed application-run handles through `createRunCorrelation`.
  Controlled clients may carry a handle in Chumbo request metadata, while
  builders may expose an explicit field on selected tools. Configured runtimes
  validate correlation before capability execution and emit lifecycle v2 with
  the same bounded opaque run fact; unconfigured lifecycle v1 remains
  unchanged.

## 0.9.0 – 2026-08-29

- Add an optional builder-owned lifecycle-event sink for invoked tools,
  Resources, and prompts. Versioned events contain redacted request and
  capability metadata, distinguish terminal outcomes, preserve concurrent
  caller isolation, and fail open when the sink throws or rejects.

## 0.8.1 – 2026-08-28

- Publish canonical `elsheppo/chumbo` repository, homepage, and issue links in
  the npm package metadata.
- Deploy all six hosted living-reference functions from merged Chumbo source,
  record their active versions and bundle checksums, and verify both canonical
  Chumbo and legacy compatibility runtime fingerprints.
- Make the hosted-reference gate follow its deployment receipt instead of the
  repository package version, and remove the obsolete prototype OAuth consent
  page from MCP health verification.
- Align canonical repository links, public guides, and roadmap status with the
  Chumbo name while retaining legacy identifiers and hosted deployment facts
  that remain part of compatibility or current runtime truth.
- Make the living-reference suite retry only Supabase Auth's explicit
  retryable transport failure and transient Postgres statement timeouts during
  a fresh local-stack reset.

## 0.8.0 – 2026-08-26

- Rename the package and CLI to Chumbo. `chumbo` becomes the canonical npm
  package and command, while the `supa-mcp` binary remains available as a
  transition alias.
- Generate new projects against `chumbo`, introduce Chumbo-branded runtime
  diagnostics, and retain established technical identifiers where changing
  them would break deployed projects or durable state continuity.

## 0.7.0 – 2026-08-26

- Allow opt-in durable state to name a separate Supabase environment for its
  private RPC client while preserving same-project behavior by default. OAuth
  verification and request-scoped data access remain on the application
  environment, and cross-project credential separation is regression-tested.
- Emit stable, matching JavaScript and declaration chunk names, and verify the
  actual packed artifact across Node ESM, strict TypeScript, and Deno rather
  than repairing declaration imports inside a generated-project smoke test.
- Add opt-in authenticated durable state with configured namespace allowlists,
  deployment-secret HMAC credential partitioning, bounded JSON/TTL/key inputs,
  and atomic get/CAS-put/CAS-delete Postgres RPCs. Public and ordinary
  stateless scaffolds remain unchanged.
- Add an executable advanced observation-before-action pattern that separates
  receipt CAS from authoritative resource CAS and proves blind, stale, and
  concurrent edit behavior without changing the generated stateless path.
- Add `--state-namespace` setup generation, private service-role-only SQL, a
  secret-safe runtime context, and local Postgres isolation/race/expiry proof.
- Reclaim unreachable expired credential partitions in index-backed batches of
  at most 16 rows during writes, with concurrent writers using `SKIP LOCKED`.
- Make the required RLS integration gate target its multi-tenant example
  schema and fail closed when that local stack is not running, instead of
  allowing a skipped suite to look successful. Give that fixture dedicated
  local ports so it can coexist with the living-reference stack, and allow the
  real Auth fixture enough time to complete on a cold start without making
  fixture provisioning compete with the concurrent RLS assertions. Ignore its
  local CLI metadata just like the living-reference project's metadata, and
  retry only the local Auth client's explicitly retryable transport failures.
- Keep release-candidate imports aligned with the package version without
  rewriting the hosted deployment record before a real deployment. Hosted
  smoke remains the authority for detecting deployment drift.
- Verify hosted Edge Function runtime fingerprints during the living-reference
  smoke instead of treating content synchronization as deployment proof.
- Document current and established Supabase Edge key compatibility plus the
  distinction between invalid credentials and runtime configuration failures.

## 0.6.6 – 2026-08-25

- Treat an empty modern publishable- or secret-key dictionary as absent so an
  established project can fall through to its singular or legacy key. This
  covers projects where Edge injects an empty modern dictionary alongside a
  still-active legacy key.
- Add an assembled OAuth regression for that exact mixed-generation runtime
  environment.

## 0.6.5 – 2026-08-25

- Normalize platform-injected `SUPABASE_PUBLISHABLE_KEYS` and
  `SUPABASE_SECRET_KEYS` JSON dictionaries into the explicit runtime
  environment passed to Supabase clients. Singular modern variables and legacy
  variables converge on the same shape, with explicit configuration retaining
  precedence.
- Resolve the project URL and inline JWKS from Edge runtime variables when an
  application does not pass them explicitly. Malformed JSON reports only the
  affected variable name and expected shape, never its value.
- Exercise the fully assembled OAuth request against the same modern plural-key
  environment supplied by current Supabase Edge projects.

## 0.6.4 – 2026-08-25

- Accept both current Supabase publishable/secret-key configuration and the
  legacy `SUPABASE_ANON_KEY` / `SUPABASE_SERVICE_ROLE_KEY` variables still
  injected by established Edge Function projects. Explicit modern
  configuration always wins; credentials are never logged or returned.
- Distinguish rejected credentials from post-verification runtime setup
  failures. Callers receive a safe `server_error`, while `onError` identifies
  the `runtime` phase and retains a secret-safe configuration message for
  operators and coding agents.
- Add fully assembled OAuth request proofs for modern and legacy project key
  configurations, plus a missing-key diagnostic and secret-exclusion case.

## 0.6.3 – 2026-08-25

- Cache remote Supabase JWKS snapshots for one minute per Edge runtime instead
  of rebuilding a network-backed resolver for every authenticated request.
  Failed fetches are evicted immediately, responses are bounded to 64 KiB, and
  inline platform JWKS behavior is unchanged.

## 0.6.2 – 2026-08-22

- Add `supa-mcp/app`, a small browser-side MCP Apps workspace helper that
  applies host theme/font tokens and safe areas, replaces content-driven iframe
  growth with one bounded inline viewport, provides an internal-scroll
  contract, and exposes optional fullscreen negotiation without imposing a UI
  kit.

## 0.6.1 – 2026-08-20

- Bundle an optional project-local Supa MCP agent skill that teaches
  application-oriented capability boundaries, explicit result contracts,
  Supabase-native authority, and protocol-level completion evidence.
- Add `supa-mcp skill install`, `skill status`, and `skill update` with plan,
  confirmation, and stable JSON modes for interactive builders and coding
  agents.
- Preserve existing `AGENTS.md` instructions through a marked managed pointer.
  Record installed file hashes in a managed manifest and refuse to overwrite
  local edits during updates.
- Mention the optional skill in guided setup without installing it
  automatically.

## 0.6.0 – 2026-08-20

- Replace automatic JSON-to-text duplication with explicit result contracts:
  `textResult`, `structuredResult`, `renderResult`, and `resourceResult`.
- Remove `jsonResult` and `toMarkdown`. Structured results now preserve the
  exact JSON value, and builders declare the matching tool `outputSchema`.
- Update the generated capability scaffold and living examples to demonstrate
  text-only, structured-only, deliberate hybrid, recoverable error, and
  large-resource result patterns.
- Move complete living documentation bodies to stable MCP Resources at
  `supa-mcp://docs/{kind}/{slug}`. Documentation tools now return compact
  reading cards and resource links instead of duplicated bodies.

## 0.5.0 – 2026-08-20

- Add composed authentication so one MCP endpoint can accept Supabase OAuth
  users and application-owned API keys without collapsing their authority or
  database behavior into one credential path.
- Route every credential to exactly one named strategy before verification.
  Verifier-backed application keys require a non-overlapping prefix in composed
  mode, and a failed match never falls through to OAuth.
- Add normalized `ctx.authentication` and `ctx.principal` context alongside the
  existing `ctx.user`, `ctx.subject`, `ctx.scopes`, and request-scoped Supabase
  client. Supabase users retain their JWT-backed RLS client; application keys
  retain an anonymous client and application-resolved identity and scopes.
- Add a living privileged-capabilities pattern proving that ordinary users and
  privileged application identities receive different tools, resources,
  prompts, and server instructions from the same endpoint.

## 0.4.0 – 2026-08-18

- Add `instructions` to `createSupabaseMcp`: server-level usage guidance
  returned in the `initialize` result, as a static string or a per-request
  `(context) => string` resolver for row-defined servers. Tool descriptions
  were already surfaced; server instructions previously had no pathway.
- Generated scaffold now sets a starter `instructions` value builders are
  expected to rewrite alongside `capabilities.ts`.
- Restructure the README around the builder journey and add reference
  documents for the five-step quickstart, access-mode selection, and MCP
  client connection with a verification-status matrix.

## 0.3.2 – 2026-08-17

- Make `status` and `doctor` distinguish endpoint reachability, responses proven
  to come from Supa MCP, access-gate behavior, and authenticated MCP discovery.
- Add non-secret runtime fingerprint headers for deployed version, auth mode,
  API-key strategy, and advertised resource URL.
- Recognize verifier-backed and custom application-key setups without
  prescribing the generated `MCP_API_KEY` secret.
- Treat the generated capabilities, Deno task, and contract-test layout as
  recommended diagnostics rather than runtime requirements for composed
  functions.
- Keep an uncredentialed but protected endpoint in a ready-to-test state instead
  of reporting a blocking failure or claiming authenticated verification.

## 0.3.1 – 2026-08-15

- Connect guided setup to the live Supa MCP documentation server with an
  agent-ready handoff and a concrete authenticated-tools implementation prompt.
- Add the open-source living Supabase reference project, including executable
  authenticated, model-facing-result, documentation, and many-MCP patterns.
- Add deterministic Git-to-Supabase content synchronization plus clean-clone
  and hosted deployment verification in CI.
- Align the CLI banner, doctor identity, and generated Deno runtime pin with
  the published package version, with a regression test preventing drift.

## 0.3.0 – 2026-08-15

- Make the model-facing text lane first-class. `content[].text` is the portable
  model-facing channel; because some clients do not surface
  `structuredContent` to the model, the result helpers now treat text as a
  complete standalone payload.
- Add `renderResult(value, render)`: the recommended helper. A required
  renderer composes the complete model-facing markdown; the raw value rides
  along as structured content for typed clients.
- Add `toMarkdown(value)`: a generic legible renderer (bolded keys, list
  rows, one-line rows for flat objects, explicit `(none)` empties).
- `jsonResult(value)` with no text now emits `toMarkdown(value)` instead of
  a raw JSON dump. Passing `text` still replaces the rendering verbatim, but
  is discouraged: it hides the payload from the model – use `renderResult`.
- `errorResult(message, nextStep?)` can append a `→ Next:` recovery line so
  errors never leave the model at a dead end.

## 0.2.0 – 2026-08-14

- Add a first-class `api-key` auth mode with a one-secret generated default.
- Add application-owned API-key verification with isolated admin lookup,
  stable subjects, and optional scopes.
- Teach guided setup, generated tests, status, and doctor to understand the
  API-key path without mistaking it for public access or Supabase user auth.
- Include `ctx.subject` in the request context and generated identity examples.

## 0.1.0 – 2026-08-13

- Launch Supa MCP as an end-user MCP runtime and guided setup experience for
  existing Supabase applications.
- Generate a deployable Edge Function with tools, resources, prompts, and an
  MCP multi-round-trip example on the official SDK.
- Use Supabase Auth, request-scoped clients, and application-owned RLS instead
  of introducing another identity or authorization model.
- Support OAuth, bearer-token, and intentionally public access modes, with a
  generated Postgres rate limiter for public servers.
- Add optional capability scopes without imposing an organization, role, or
  entitlement schema on the application.
- Add resumable setup, status, deployment, auth-aware diagnostics, and stable
  JSON next actions for agents and CI.
- Support clean public MCP URLs while keeping Supabase Auth as the independent
  OAuth issuer, and verify that discovery advertises the client-facing URL.
