---
summary: Security hardening and task tool auth fixes — scope enumeration prevention, ALS context capture for background handlers, structuredContent gating, HTTP session header correction
breaking: false
---

# 0.1.5 — 2026-03-14

Security hardening, task tool auth fixes, and transport correctness improvements.

## Fixed

- **Task tool auth context** — Auth info is now captured from the request's AsyncLocalStorage before the background handler fires. Previously, ALS was gone in the detached context, causing auth scopes and tenant identity to be lost. Scope checks now run in `createTask` (inside ALS) instead of the background handler.
- **`withAuthInfo` operation inheritance** — `requestContextService.withAuthInfo()` now inherits the `operation` name from the parent context instead of hardcoding `'withAuthInfo'`, preserving operation traceability for task handlers.
- **`structuredContent` conditional** — Tool responses only include `structuredContent` when the tool definition has an `output` schema. Prevents sending untyped data as structured content.
- **HTTP session header for `auto` mode** — Session header now uses the resolved `isStateful` flag instead of comparing `config.mcpSessionMode === 'stateful'`, fixing stateful session headers when mode is `'auto'`.
- **Config cache reset after `composeServices()`** — `resetConfig()` is now called after restoring env vars, preventing stale cached config from leaking into subsequent calls in the same process.

## Security

- **Scope enumeration prevention** — Auth error responses no longer include scope names, required scopes, or missing scopes in client-facing error data. Full details remain in server-side logs. Applies to both `withRequiredScopes` and `checkScopes`.

## Changed

- Bumped `js-yaml` optional peer dependency from `^3.14.2` to `^4.0.0`.
- Setup skill: added "update dependencies to latest" as first post-install step.
