Commit 87b91cb
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.<name>.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.1 parent cb66498 commit 87b91cb
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
347 | 356 | | |
348 | 357 | | |
349 | 358 | | |
| |||
0 commit comments