- First stable release. Requires
@caveman-ai/sdk1.2.0 or later. - Breaking (license): relicensed from MIT to Apache-2.0, along with the rest of
the repository in Caveman 3.0.0. Releases before this one keep the MIT license. - Release process: prereleases no longer take the
latestdist-tag, each
release gets a GitHub Release with these notes and a CycloneDX SBOM, and the
published dependency graph is audited before publish. - Version gate:
- A framework version outside the tested range, or a prerelease, now
passes content through with oneunsupported_versionwarning instead of
silently doing nothing.acceptFrameworkVersionoverrides it. - Bundled deploys run with a one-time
version_unverifiednotice. - Nothing throws at wrap time; strict mode raises from
ready().
- A framework version outside the tested range, or a prerelease, now
- The framework version is read from the application's installed copy.
Framework peers are declared optional and unranged (*), so Yarn PnP can
resolve them without a plainnpm installfailing with ERESOLVE. require()works, and TypeScript resolves with node10, node16, nodenext
and bundler../compatibilityexposes atier. Importing under
workerd/edge-lightthrows a clear unsupported-runtime error.enginesis
>=22.12.- Every adapter accepts a per-request scope function. Emails and free-text ids
are normalized, and a missingthread_idno longer fails the call. - Adapter exceptions and changed SDK internals pass through as
adapter_error. Every pass-through reason is logged once. - Large histories and earlier images no longer skip the whole call.
manifestBytesandwireBytesare configurable. - A recovery tool-name clash reports
recovery_name_conflict; the OpenAI tools
helper no longer throws. OpenAI Responses turns pass through unless
store:false. The Mastra oversize latch is per thread, not per process. - Entry points that can only record say so at construction and report
recovery_unbound. - LangChain compressed copies no longer embed the original in
lc_kwargs.
Minified bundles keep compressing. - Tiers:
ai-sdk,langchain,openaiandanthropicare certified; the
others are experimental. @anthropic-ai/sdkrange widened to<0.129. Tested up to ai 7.0.114,
openai 7.23.0, @google/genai 2.24.0, langchain 1.5.12, @langchain/core 1.2.12,
strands 1.19.0, mastra 1.70.0 and MCP 1.30.1.- In strict mode, adapter exceptions now raise
MiddlewareError('adapter_error')instead of passing through. - Decline warnings name the adapter instead of
adapter=-. - New
@caveman-ai/middleware/langchain-modelsubpath (withCavemanModel,
CavemanChatModel,scopeFromConfig). It needs only@langchain/core;
/langchainstill exports everything. .d.ctsshims type-check under node16 CommonJS withoutskipLibCheck.CavemanDocumentCompressoris also exported from/langchain-model, so it
needs only@langchain/core.- A
caveman_retrievethe runtime refuses (an unknown or expired handle, or
the runtime being down) now returns{"error":"<code>"}, or an MCP
isErrorresult, instead of crashing the native tool loop. So do
arguments that are not an object with a stringhandle(null, a list):
{"error":"invalid_request"}. - The
fetchoption of the OpenAI and Anthropic wrappers is optional and
defaults to the client's own. Embeddings, files and models calls are no
longer reported as skipped. - Wrapping a client, agent or model twice runs one Caveman layer instead of
turning compression off (or throwing, in LangChain and Strands). - The version gate reads the framework copy the adapter actually runs (openai
and anthropic: the client's own version), whatever the working directory.
It warns when the app resolves a different copy.@ai-sdk/provideris no
longer gated. - LangChain tool errors are marked
status:'error'and never compressed. withCavemanis idempotent, and its bundle stays mutable; only the recovery
tool is frozen.CavemanChatModel.profilereturns the inner model's
profile.- ai-sdk retries reuse one logical call id and one optimization.
- A Mastra thread that overflows the scan budget compresses again on its next
turn. - Recovery context no longer leaks into calls on other clients. The
recovery_unboundhint fires on use. Strict mode raisesadapter_error
from synchronous hooks. - The wire now carries the real package version and the
@langchain/core
version. Every reported reason is a spec §8 catalog code.
Verify this release
- Registry provenance (trusted publishing from this workflow): https://www.npmjs.com/package/@caveman-ai/middleware/v/1.0.0#provenance
- CycloneDX SBOM of the published dependency graph: attached
.cdx.json - Built from annotated, GitHub-verified tag
middleware-ts-v1.0.0onmain