From 87b91cbcc7aebffeb8768ecaf3945ba1177a5f9f Mon Sep 17 00:00:00 2001 From: Talisson Date: Thu, 27 Aug 2026 10:18:46 -0300 Subject: [PATCH] feat(sdk): add flag dependencies to the evaluation context Adds the schema surface needed to evaluate flags that depend on other flags, as an equivalent to LaunchDarkly's flag prerequisites. `EvaluationContext.flags` is a map of already-evaluated flag results keyed by feature name, so that segment conditions can reference `$.flags..enabled`, `.value` and `.variant`. Entries reference `FlagResult` in evaluation-result.json directly, so the context and the result cannot drift, and it is `readOnly` as the engine populates it. No behaviour change; this lands the schema so the engines can generate their context types from it. --- sdk/evaluation-context.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sdk/evaluation-context.json b/sdk/evaluation-context.json index 0af18329fd3b..0a68d850afbe 100644 --- a/sdk/evaluation-context.json +++ b/sdk/evaluation-context.json @@ -344,6 +344,15 @@ "description": "Features to be evaluated in the context.", "title": "Features", "type": "object" + }, + "flags": { + "additionalProperties": { + "$ref": "evaluation-result.json#/$defs/FlagResult" + }, + "description": "Results of features already evaluated for this context, mapped by feature name. Populated by the engine as evaluation progresses, so that segment conditions may reference `$.flags..enabled`, `.value` and `.variant` to express feature dependencies.", + "readOnly": true, + "title": "Flags", + "type": "object" } }, "required": [