# Fluid Framework v2.101.0 ## Contents - [Fluid Framework v2.101.0](#fluid-framework-v21010) - [Contents](#contents) - [🌳 SharedTree DDS Changes](#-sharedtree-dds-changes) - [Upgrade LangChain dependencies to v1 (#27259)](#upgrade-langchain-dependencies-to-v1-27259) - [Change details](#change-details) - [🐛 Bug Fixes](#-bug-fixes) - [Correct some PropertyDDS "MSG" error constant entries (#26971)](#correct-some-propertydds-msg-error-constant-entries-26971) - [Change details](#change-details-1) - [GC timers are now cancelled when a container closes, not just when it is disposed (#27130)](#gc-timers-are-now-cancelled-when-a-container-closes-not-just-when-it-is-disposed-27130) - [Change details](#change-details-2) - [Add SharedTreeOptionsBeta.healUnresolvableIdentifiersOnDecode to recover documents with corrupted identifiers (#27281)](#add-sharedtreeoptionsbetahealunresolvableidentifiersondecode-to-recover-documents-with-corrupted-identifiers-27281) - [Who is affected](#who-is-affected) - [Change details](#change-details-3) - [Fix a SharedTree document corruption bug (#27292)](#fix-a-sharedtree-document-corruption-bug-27292) - [Who is affected](#who-is-affected-1) - [Change details](#change-details-4) - [⚠️ Deprecations](#️-deprecations) - [Deprecate LogLevel.default and LogLevel.error (#27207)](#deprecate-logleveldefault-and-loglevelerror-27207) - [Migration](#migration) - [Change details](#change-details-5) - [Legacy API Changes](#legacy-api-changes) - [Add legacy beta map compatibility interfaces (#27240)](#add-legacy-beta-map-compatibility-interfaces-27240) - [Change details](#change-details-6) - [Other Changes](#other-changes) - [🛠️ Start Building Today!](#️-start-building-today) ## 🌳 SharedTree DDS Changes ### Upgrade LangChain dependencies to v1 ([#27259](https://github.com/microsoft/FluidFramework/issues/27259)) `@fluidframework/tree-agent-langchain` (and the LangChain dev-dependencies on `@fluidframework/tree-agent`) now target the LangChain v1 line: - `@langchain/core`: `^0.3.80` → `^1.1.44` - `@langchain/anthropic`: `^0.3.24` → `^1.3.28` - `@langchain/google-genai`: `^0.2.16` → `^2.1.30` - `@langchain/openai`: `^0.6.12` → `^1.4.5` LangChain v1 is backward-compatible for the message, tool, and chat-model APIs that `tree-agent-langchain` consumes (`BaseChatModel`, `BaseMessage`, `AIMessage` / `HumanMessage` / `SystemMessage` / `ToolMessage`, `tool()`, `bindTools()`). No source changes are required for consumers using these APIs. The new `contentBlocks` content-block API is opt-in. Consumers of `createLangchainChatModel` who currently install `@langchain/core@^0.3` should bump to `@langchain/core@^1.1.43` (the lowest version that satisfies the peer ranges of all v1 sibling integrations—`@langchain/google-genai@2.1.30` requires `^1.1.43`). #### Change details Commit: [`eeebc23`](https://github.com/microsoft/FluidFramework/commit/eeebc233c692e875fcbf2539fffdcc4f1d28af8b) Affected packages: - @fluidframework/tree-agent-langchain - @fluidframework/tree-agent [⬆️ Table of contents](#contents) ## 🐛 Bug Fixes ### Correct some PropertyDDS "MSG" error constant entries ([#26971](https://github.com/microsoft/FluidFramework/issues/26971)) Several error constants referenced in other PropertyDDS packages did not exist and would produce errors with "undefined" (literal) in error message string. In the past: - `OVERRIDEN_PROP_MUST_HAVE_SAME_CONTEXT_AS_BASE_TYPE` use was replaced by `OVERRIDEN_PROP_MUST_HAVE_SAME_FIELD_VALUES_AS_BASE_TYPE` (but never defined). - `CANNOT_INSERT_UNKNOWN_PROPERTY`, `MISMATCHING_PROPERTY_TYPEID`, and `CANNOT_REMOVE_NON_OPTIONAL_PROP` uses were added without defining them. Those all are now defined `MSG` properties. #### Change details Commit: [`7aec5f1`](https://github.com/microsoft/FluidFramework/commit/7aec5f11ea97542a820f5d851d11051acaf496c5) Affected packages: - @fluid-experimental/property-common [⬆️ Table of contents](#contents) ### GC timers are now cancelled when a container closes, not just when it is disposed ([#27130](https://github.com/microsoft/FluidFramework/issues/27130)) Adds an optional `close()` hook to `IRuntime` that `Container` calls on close. `ContainerRuntime` implements it by cancelling all GC timers (session expiry and unreferenced-node timers) without clearing tracked state. This prevents the timers from causing memory leaks after a `Container` is closed but not disposed. In Node.js environments this also prevents the timers from keeping the event loop alive until `dispose()`. This can reduce the need for Mocha's --exit in tests which create containers which are closed but not disposed. Disposing of closed containers is still recommended, but it is now less critical for avoiding timer-related hangs after close. Disposal still helps clean up resources and can reduce the size of memory leaks if references to the container are leaked. #### Change details Commit: [`86c0fff`](https://github.com/microsoft/FluidFramework/commit/86c0fffbf499981af297f018c7b570802ebdbeeb) Affected packages: - @fluidframework/container-definitions - @fluidframework/container-runtime [⬆️ Table of contents](#contents) ### Add SharedTreeOptionsBeta.healUnresolvableIdentifiersOnDecode to recover documents with corrupted identifiers ([#27281](https://github.com/microsoft/FluidFramework/issues/27281)) A SharedTree bug can result in corrupted documents due to their attach summary compressing identifier-field values in a way that cannot be uncompressed. This bug manifested as remote clients processing the op throwing an error with the message "Unknown op space ID.". This change adds an option (`healUnresolvableIdentifiersOnDecode`) to `configuredSharedTreeBetaLegacy` which will allow documents affected by this bug to load again when enabled. Enabling this option carries some risk, see documentation on the interface itself for more details. #### Who is affected Only SharedTrees attached to a container that was already attached can be impacted. Furthermore, this bug only occurs when the attached tree contains [`identifier`](https://fluidframework.com/docs/api/tree/schemafactory-class#identifier-property) fields which contain implicitly generated default values. #### Change details Commit: [`d9205dd`](https://github.com/microsoft/FluidFramework/commit/d9205ddcd6a9f0ec11d5422b38e30a6a91a9258c) Affected packages: - fluid-framework - @fluidframework/tree [⬆️ Table of contents](#contents) ### Fix a SharedTree document corruption bug ([#27292](https://github.com/microsoft/FluidFramework/issues/27292)) A SharedTree bug which could corrupt documents when attaching them to containers has been fixed. See `healUnresolvableIdentifiersOnDecode` on `configuredSharedTreeBetaLegacy` for a potential mitigation path for documents that were already corrupted by this bug. #### Who is affected Only SharedTrees attached to a container that was already attached can be impacted. Furthermore, this bug only occurs when the attached tree contains [`identifier`](https://fluidframework.com/docs/api/tree/schemafactory-class#identifier-property) fields which contain implicitly generated default values. #### Change details Commit: [`6f4cdcb`](https://github.com/microsoft/FluidFramework/commit/6f4cdcb7a0a76ba215a361c7b3a12943750fe286) Affected packages: - fluid-framework - @fluidframework/tree [⬆️ Table of contents](#contents) ## ⚠️ Deprecations ### Deprecate LogLevel.default and LogLevel.error ([#27207](https://github.com/microsoft/FluidFramework/issues/27207)) `LogLevel.default` and `LogLevel.error` in `@fluidframework/core-interfaces` are deprecated in favor of the semantically clearer `LogLevel.info` and `LogLevel.essential`. #### Migration The recommended replacement for `LogLevel.default` depends on how the value is used: - For an **event's default `logLevel`** (e.g. the `logLevel` argument to `ITelemetryBaseLogger.send`), the recommendation is `LogLevel.essential`. - For a logger's **default `minLogLevel`** (the threshold that filters events), `LogLevel.info` is the recommendation. The replacement for `LogLevel.error` should always be `LogLevel.essential`. See [issue #26969](https://github.com/microsoft/FluidFramework/issues/26969) for full guidance and removal tracking (planned for v3.0). #### Change details Commit: [`77ef335`](https://github.com/microsoft/FluidFramework/commit/77ef3355fdf9611524cad86f00b1ce8ba3263861) Affected packages: - @fluidframework/core-interfaces [⬆️ Table of contents](#contents) ## Legacy API Changes ### Add legacy beta map compatibility interfaces ([#27240](https://github.com/microsoft/FluidFramework/issues/27240)) New legacy beta map interfaces make it possible to type legacy map-like DDS APIs against Fluid's stable map abstraction while preserving the legacy DDS `get` and `set` APIs. ```typescript import type { FluidMapLegacy, IDirectoryBeta, ISharedMapBeta, } from "@fluidframework/map/legacy"; declare const directory: IDirectoryBeta; declare const sharedMap: ISharedMapBeta; const directoryMap: FluidMapLegacy = directory; const sharedMapAsLegacyMap: FluidMapLegacy = sharedMap; ``` #### Change details Commit: [`b765c6a`](https://github.com/microsoft/FluidFramework/commit/b765c6af34359d2500523483c6916feeef947a7a) Affected packages: - @fluidframework/map [⬆️ Table of contents](#contents) ## Other Changes ### 🛠️ Start Building Today! Please continue to engage with us on GitHub [Discussion](https://github.com/microsoft/FluidFramework/discussions) and [Issue](https://github.com/microsoft/FluidFramework/issues) pages as you adopt Fluid Framework!