From 9c67a49cc064199a2cf9cd038c043a36435f3c51 Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Tue, 20 Oct 2026 08:23:57 +0000 Subject: [PATCH] chore: update sdk readmes Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> --- docs/reference/sdks/client/dart.mdx | 27 ++--- docs/reference/sdks/client/kotlin.mdx | 2 +- docs/reference/sdks/client/swift.mdx | 98 ++++++++++++++++++- docs/reference/sdks/client/web/angular.mdx | 2 +- docs/reference/sdks/client/web/index.mdx | 2 +- docs/reference/sdks/client/web/react.mdx | 2 +- docs/reference/sdks/server/cpp.mdx | 2 +- docs/reference/sdks/server/dart.mdx | 18 ++-- docs/reference/sdks/server/dotnet.mdx | 2 +- docs/reference/sdks/server/go.mdx | 2 +- docs/reference/sdks/server/java.mdx | 2 +- .../sdks/server/javascript/index.mdx | 2 +- .../sdks/server/javascript/nestjs.mdx | 2 +- docs/reference/sdks/server/php.mdx | 2 +- docs/reference/sdks/server/python.mdx | 2 +- docs/reference/sdks/server/ruby.mdx | 2 +- docs/reference/sdks/server/rust.mdx | 2 +- src/datasets/sdks/sdk-compatibility.json | 8 +- 18 files changed, 139 insertions(+), 40 deletions(-) diff --git a/docs/reference/sdks/client/dart.mdx b/docs/reference/sdks/client/dart.mdx index ace4005bc..75a94a657 100644 --- a/docs/reference/sdks/client/dart.mdx +++ b/docs/reference/sdks/client/dart.mdx @@ -9,7 +9,7 @@ This content has been automatically generated from dart-sdk. Edits should be made here: https://github.com/open-feature/dart-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:26:00 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:55 GMT+0000 (Coordinated Universal Time) --> # OpenFeature Dart Client SDK @@ -17,22 +17,27 @@ This package is the vendor-neutral OpenFeature SDK for Dart client applications. It uses the static-context paradigm. It has no Flutter or `dart:io` dependency. -This source checkout supports Dart 3.10 or later. The published beta below -requires Dart 3.12.2 until a release containing the lower SDK floor is published. +This package supports Dart 3.10 or later within Dart 3.x. Provider packages +can require a higher Dart version; check the chosen provider separately. -The package is in beta. The first beta defines the public client and provider -contracts. It provides synchronous typed evaluation, event handlers, hooks, -ordered context changes, and an in-memory provider. Later beta changes will -complete the remaining conformance work before the first stable release. +Current package version: `0.0.1`. + +**Release status:** `0.0.1` is the first non-beta client release. The SDK +remains pre-1.0. + +This package provides synchronous typed +evaluation, event handlers, hooks, ordered context changes and an in-memory +provider. Pre-1.0 versions do not establish a 1.0 API compatibility commitment. +Consult the conformance matrix and release notes for accepted support scope. ## Install -The published beta requires Dart 3.12.2 or later within Dart 3.x. Flutter +The client SDK requires Dart 3.10 or later within Dart 3.x. Flutter applications need a Flutter release that includes a compatible Dart SDK. ```yaml dependencies: - openfeature_dart_client_sdk: ^0.0.1-beta.1 + openfeature_dart_client_sdk: ^0.0.1 # x-release-please-version ``` Run `dart pub get`, or `flutter pub get` in a Flutter application. @@ -114,5 +119,5 @@ dart tool/stage_client_package.dart --dry-run ``` See the -[beta release procedure](https://github.com/open-feature/dart-sdk/blob/main/doc/client-sdk-release.md) -for the first-publication bootstrap and later automated prereleases. +[client release procedure](https://github.com/open-feature/dart-sdk/blob/main/doc/client-sdk-release.md) +for non-beta release review and historical first-publication instructions. diff --git a/docs/reference/sdks/client/kotlin.mdx b/docs/reference/sdks/client/kotlin.mdx index b7994aa4a..94e8ef291 100644 --- a/docs/reference/sdks/client/kotlin.mdx +++ b/docs/reference/sdks/client/kotlin.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from kotlin-sdk. Edits should be made here: https://github.com/open-feature/kotlin-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:26:00 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:55 GMT+0000 (Coordinated Universal Time) --> import MCPInstall from '@site/src/partials/mcp-install'; diff --git a/docs/reference/sdks/client/swift.mdx b/docs/reference/sdks/client/swift.mdx index 29446dd20..eaaaa686a 100644 --- a/docs/reference/sdks/client/swift.mdx +++ b/docs/reference/sdks/client/swift.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from swift-sdk. Edits should be made here: https://github.com/open-feature/swift-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:26:00 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:55 GMT+0000 (Coordinated Universal Time) --> import MCPInstall from '@site/src/partials/mcp-install'; @@ -22,8 +22,8 @@ import MCPInstall from '@site/src/partials/mcp-install'; - - Release + + Release @@ -67,7 +67,7 @@ First, ensure you have your GitHub account added as an option (+ > Add Source Co If you manage dependencies through SPM, in the dependencies section of Package.swift add: ```swift -.package(url: "git@github.com:open-feature/swift-sdk.git", from: "0.6.0") +.package(url: "git@github.com:open-feature/swift-sdk.git", from: "0.7.0") ``` and in the target dependencies section add: @@ -539,5 +539,95 @@ class BooleanHook: Hook { } ``` +#### Hook data + +Each hook gets its own `hookData` store on the `HookContext`. +It is created fresh for every evaluation and shared across that hook's `before`, `after`, `error` and `finally` stages, but never with other hooks. +Use it to carry per-evaluation state (a timer, a span, a correlation ID) from one stage to the next without touching the evaluation context. + +`EvaluationTimeHook` measures how long each evaluation takes by storing a timestamp in `before` and reading it back in `finally`: + +```swift +class EvaluationTimeHook: Hook { + typealias HookValue = Bool + + func before(ctx: HookContext, hints: [String: Any]) { + ctx.hookData["start"] = Date() + } + + func finally(ctx: HookContext, details: FlagEvaluationDetails, hints: [String: Any]) { + guard let start = ctx.hookData["start"] as? Date else { return } + print("\(ctx.flagKey) evaluated in \(Date().timeIntervalSince(start))s") + } +} +``` + +`CorrelationIDHook` tags every log line of one evaluation with the same ID, whether it succeeds or fails. +Because a correlation ID is useful for every flag, it overrides `supportsFlagValueType` to run for all value types rather than only `Bool`: + +```swift +class CorrelationIDHook: Hook { + typealias HookValue = Bool + + func supportsFlagValueType(flagValueType: FlagValueType) -> Bool { + true + } + + func before(ctx: HookContext, hints: [String: Any]) { + let correlationID = UUID().uuidString + ctx.hookData["correlationID"] = correlationID + print("[\(correlationID)] evaluating \(ctx.flagKey)") + } + + func after(ctx: HookContext, details: FlagEvaluationDetails, hints: [String: Any]) { + print("[\(correlationID(ctx))] \(ctx.flagKey) resolved to \(details.value)") + } + + func error(ctx: HookContext, error: Error, hints: [String: Any]) { + print("[\(correlationID(ctx))] \(ctx.flagKey) failed: \(error)") + } + + private func correlationID(_ ctx: HookContext) -> String { + ctx.hookData["correlationID"] as? String ?? "unknown" + } +} +``` + +Keys are strings and values can be of any type; hook data is never serialised or sent to the provider. + +#### Telemetry + +`Telemetry.createEvaluationEvent` turns a finished evaluation into an [OpenTelemetry-compatible event](/specification/appendix-d): the name `feature_flag.evaluation` plus attributes such as `feature_flag.key`, `feature_flag.result.variant`, `feature_flag.result.value`, `feature_flag.result.reason`, `feature_flag.provider.name` and, when the evaluation failed, `error.type` and `error.message`. +Call it from the `finally` stage, where the evaluation details are complete, and hand the result to your telemetry client as a span event or a log record. +Attribute values are booleans, strings, integers or doubles; object and list flag values arrive as JSON strings, and attributes without a value are left out. + +```swift +class TelemetryHook: Hook { + typealias HookValue = Bool + + /// Forwards an event to your telemetry client, e.g. `span.addEvent(name:attributes:)` or a log record. + private let emit: (_ name: String, _ attributes: TelemetryAttributes) -> Void + + init(emit: @escaping (_ name: String, _ attributes: TelemetryAttributes) -> Void) { + self.emit = emit + } + + // Telemetry is useful for every flag, not only boolean ones. + func supportsFlagValueType(flagValueType: FlagValueType) -> Bool { + true + } + + func finally(ctx: HookContext, details: FlagEvaluationDetails, hints: [String: Any]) { + let event = Telemetry.createEvaluationEvent(hookContext: ctx, evaluationDetails: details) + var attributes = event.attributes + attributes[Telemetry.Attribute.value] = nil // drop the flag value when it may be sensitive or large + emit(event.name, attributes) + } +} +``` + +Map each `TelemetryAttributeValue` to your client's attribute type with a `switch` over its four cases (`.boolean`, `.string`, `.integer`, `.double`). +The SDK has no OpenTelemetry dependency and the utility takes no options: filtering, redacting or truncating attributes is the hook's responsibility, as the specification recommends. + > Built a new hook? [Let us know](https://github.com/open-feature/openfeature.dev/issues/new?assignees=&labels=hook&projects=&template=document-hook.yaml&title=%5BHook%5D%3A+) so we can add it to the docs! diff --git a/docs/reference/sdks/client/web/angular.mdx b/docs/reference/sdks/client/web/angular.mdx index 6c59c8e85..8fc889925 100644 --- a/docs/reference/sdks/client/web/angular.mdx +++ b/docs/reference/sdks/client/web/angular.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk. Edits should be made here: https://github.com/open-feature/js-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:26:00 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:55 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/sdks/client/web/index.mdx b/docs/reference/sdks/client/web/index.mdx index e567b740e..58e9e92be 100644 --- a/docs/reference/sdks/client/web/index.mdx +++ b/docs/reference/sdks/client/web/index.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk. Edits should be made here: https://github.com/open-feature/js-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:25:59 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:54 GMT+0000 (Coordinated Universal Time) --> import MCPInstall from '@site/src/partials/mcp-install'; diff --git a/docs/reference/sdks/client/web/react.mdx b/docs/reference/sdks/client/web/react.mdx index fbc6f67d3..9cd8846f4 100644 --- a/docs/reference/sdks/client/web/react.mdx +++ b/docs/reference/sdks/client/web/react.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk. Edits should be made here: https://github.com/open-feature/js-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:26:00 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:54 GMT+0000 (Coordinated Universal Time) --> import MCPInstall from '@site/src/partials/mcp-install'; diff --git a/docs/reference/sdks/server/cpp.mdx b/docs/reference/sdks/server/cpp.mdx index 183d6aea9..9fe21c510 100644 --- a/docs/reference/sdks/server/cpp.mdx +++ b/docs/reference/sdks/server/cpp.mdx @@ -9,7 +9,7 @@ This content has been automatically generated from cpp-sdk. Edits should be made here: https://github.com/open-feature/cpp-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:26:00 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:55 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/sdks/server/dart.mdx b/docs/reference/sdks/server/dart.mdx index 062e3ae55..30b854294 100644 --- a/docs/reference/sdks/server/dart.mdx +++ b/docs/reference/sdks/server/dart.mdx @@ -9,9 +9,13 @@ This content has been automatically generated from dart-sdk. Edits should be made here: https://github.com/open-feature/dart-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:26:00 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:55 GMT+0000 (Coordinated Universal Time) --> +**Release status:** The server SDK has regular, non-beta releases on +[pub.dev](https://pub.dev/packages/openfeature_dart_server_sdk). It remains +pre-1.0; these releases do not establish a 1.0 API compatibility commitment. + For typed provider event registration, late-handler behavior and compatibility with existing streams, see [the event migration guide](https://github.com/open-feature/dart-sdk/blob/main/packages/openfeature_dart_server_sdk/doc/events-migration.md). For reusable cleanup and experimental isolated API instances, see @@ -35,8 +39,8 @@ registration order and the compatibility decision for legacy priorities. Specification - - Release + + Release @@ -64,7 +68,7 @@ APIs retain their existing value and collection behavior. See the [context migration guide](https://github.com/open-feature/dart-sdk/blob/main/packages/openfeature_dart_server_sdk/doc/evaluation-context-migration.md) for snapshot semantics and the remaining conformance scope. -## Repository source and client SDK beta +## Repository source and client SDK This server package now lives at `packages/openfeature_dart_server_sdk` in the source repository. Pub.dev @@ -76,7 +80,7 @@ repository root must add: path: packages/openfeature_dart_server_sdk ``` -The same repository also contains a separate pure-Dart client SDK beta for +The same repository also contains a separate pure-Dart client SDK for Dart VM, Dart web, and Flutter consumers. The two packages remain independently versioned and published. @@ -87,7 +91,7 @@ versioned and published. - Review the [client SDK conformance matrix](https://github.com/open-feature/dart-sdk/blob/main/doc/client-sdk-conformance-matrix.md). - Read the - [client beta release procedure](https://github.com/open-feature/dart-sdk/blob/main/doc/client-sdk-release.md). + [client release procedure](https://github.com/open-feature/dart-sdk/blob/main/doc/client-sdk-release.md). - Follow [issue #117](https://github.com/open-feature/dart-sdk/issues/117) for implementation progress. @@ -105,7 +109,7 @@ Dart language version: [3.12.2](https://dart.dev/get-dart/archive) ```yaml dependencies: - openfeature_dart_server_sdk: ^0.0.26 + openfeature_dart_server_sdk: ^0.1.0 ``` ### Then run diff --git a/docs/reference/sdks/server/dotnet.mdx b/docs/reference/sdks/server/dotnet.mdx index 61fe6a8ba..49d9fc43f 100644 --- a/docs/reference/sdks/server/dotnet.mdx +++ b/docs/reference/sdks/server/dotnet.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from dotnet-sdk. Edits should be made here: https://github.com/open-feature/dotnet-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:25:59 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:54 GMT+0000 (Coordinated Universal Time) --> import MCPInstall from '@site/src/partials/mcp-install'; diff --git a/docs/reference/sdks/server/go.mdx b/docs/reference/sdks/server/go.mdx index 8a4e0a722..34638396b 100644 --- a/docs/reference/sdks/server/go.mdx +++ b/docs/reference/sdks/server/go.mdx @@ -9,7 +9,7 @@ This content has been automatically generated from go-sdk. Edits should be made here: https://github.com/open-feature/go-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:25:59 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:54 GMT+0000 (Coordinated Universal Time) --> import MCPInstall from '@site/src/partials/mcp-install'; diff --git a/docs/reference/sdks/server/java.mdx b/docs/reference/sdks/server/java.mdx index 0eb1c2efb..291259b3a 100644 --- a/docs/reference/sdks/server/java.mdx +++ b/docs/reference/sdks/server/java.mdx @@ -9,7 +9,7 @@ This content has been automatically generated from java-sdk. Edits should be made here: https://github.com/open-feature/java-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:25:58 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:54 GMT+0000 (Coordinated Universal Time) --> import MCPInstall from '@site/src/partials/mcp-install'; diff --git a/docs/reference/sdks/server/javascript/index.mdx b/docs/reference/sdks/server/javascript/index.mdx index e1c1056c8..a3c4f7923 100644 --- a/docs/reference/sdks/server/javascript/index.mdx +++ b/docs/reference/sdks/server/javascript/index.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk. Edits should be made here: https://github.com/open-feature/js-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:25:59 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:54 GMT+0000 (Coordinated Universal Time) --> import MCPInstall from '@site/src/partials/mcp-install'; diff --git a/docs/reference/sdks/server/javascript/nestjs.mdx b/docs/reference/sdks/server/javascript/nestjs.mdx index de1a8c15d..beda51666 100644 --- a/docs/reference/sdks/server/javascript/nestjs.mdx +++ b/docs/reference/sdks/server/javascript/nestjs.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk. Edits should be made here: https://github.com/open-feature/js-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:25:59 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:54 GMT+0000 (Coordinated Universal Time) --> import MCPInstall from '@site/src/partials/mcp-install'; diff --git a/docs/reference/sdks/server/php.mdx b/docs/reference/sdks/server/php.mdx index 68647f888..9086a051a 100644 --- a/docs/reference/sdks/server/php.mdx +++ b/docs/reference/sdks/server/php.mdx @@ -9,7 +9,7 @@ This content has been automatically generated from php-sdk. Edits should be made here: https://github.com/open-feature/php-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:25:59 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:54 GMT+0000 (Coordinated Universal Time) --> import MCPInstall from '@site/src/partials/mcp-install'; diff --git a/docs/reference/sdks/server/python.mdx b/docs/reference/sdks/server/python.mdx index 73a0c832a..b7245c545 100644 --- a/docs/reference/sdks/server/python.mdx +++ b/docs/reference/sdks/server/python.mdx @@ -9,7 +9,7 @@ This content has been automatically generated from python-sdk. Edits should be made here: https://github.com/open-feature/python-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:25:59 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:54 GMT+0000 (Coordinated Universal Time) --> import MCPInstall from '@site/src/partials/mcp-install'; diff --git a/docs/reference/sdks/server/ruby.mdx b/docs/reference/sdks/server/ruby.mdx index c633a34b1..15f152385 100644 --- a/docs/reference/sdks/server/ruby.mdx +++ b/docs/reference/sdks/server/ruby.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from ruby-sdk. Edits should be made here: https://github.com/open-feature/ruby-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:26:00 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:55 GMT+0000 (Coordinated Universal Time) --> import MCPInstall from '@site/src/partials/mcp-install'; diff --git a/docs/reference/sdks/server/rust.mdx b/docs/reference/sdks/server/rust.mdx index 290c9b71d..27f0c7982 100644 --- a/docs/reference/sdks/server/rust.mdx +++ b/docs/reference/sdks/server/rust.mdx @@ -9,7 +9,7 @@ This content has been automatically generated from rust-sdk. Edits should be made here: https://github.com/open-feature/rust-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Oct 02 2026 08:26:00 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Oct 20 2026 08:23:55 GMT+0000 (Coordinated Universal Time) -->

diff --git a/src/datasets/sdks/sdk-compatibility.json b/src/datasets/sdks/sdk-compatibility.json index 081ed19f4..c71c786b7 100644 --- a/src/datasets/sdks/sdk-compatibility.json +++ b/src/datasets/sdks/sdk-compatibility.json @@ -476,8 +476,8 @@ "path": "/docs/reference/sdks/client/swift", "category": "Client", "release": { - "href": "https://github.com/open-feature/swift-sdk/releases/tag/0.6.0", - "version": "0.6.0", + "href": "https://github.com/open-feature/swift-sdk/releases/tag/0.7.0", + "version": "0.7.0", "stable": false }, "spec": { @@ -592,8 +592,8 @@ "path": "/docs/reference/sdks/server/dart", "category": "Server", "release": { - "href": "https://github.com/open-feature/dart-sdk/releases/tag/v0.0.26", - "version": "0.0.26", + "href": "https://github.com/open-feature/dart-sdk/releases/tag/v0.1.0", + "version": "0.1.0", "stable": false }, "spec": {