@revturbine/sdk 0.10.10 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +176 -2
- package/dist/headless.d.ts +185 -51
- package/dist/headless.js +2 -2
- package/dist/headless.js.map +1 -1
- package/dist/index.d.ts +185 -51
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types/server-node/local-server.d.ts +10 -2
- package/dist/types/server-node/local-server.d.ts.map +1 -1
- package/dist/types/web-sdk/browser-runtime.d.ts +27 -6
- package/dist/types/web-sdk/browser-runtime.d.ts.map +1 -1
- package/dist/types/web-sdk/customer-side.d.ts +139 -43
- package/dist/types/web-sdk/customer-side.d.ts.map +1 -1
- package/dist/types/web-sdk/index.d.ts +3 -2
- package/dist/types/web-sdk/index.d.ts.map +1 -1
- package/dist/types/web-sdk/playbook-option.d.ts +39 -0
- package/dist/types/web-sdk/playbook-option.d.ts.map +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -47,6 +47,179 @@ also require a changelog entry.
|
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
50
|
+
## 0.11.1
|
|
51
|
+
|
|
52
|
+
### The generated schema *types* gained their `Playbook*` names (BL-0165)
|
|
53
|
+
|
|
54
|
+
**What changed.** `0.11.0` renamed every option, keyword and method that carries a
|
|
55
|
+
Playbook. It did not rename the **generated type identifiers**, which come from
|
|
56
|
+
scaffold and are vendored here — so a `0.11.0` integration still had to import
|
|
57
|
+
`ExportedConfigSegmentsItem` to name a segment. Those types now have `Playbook*`
|
|
58
|
+
spellings too.
|
|
59
|
+
|
|
60
|
+
| deprecated | canonical |
|
|
61
|
+
|---|---|
|
|
62
|
+
| `ExportedConfigSegmentsItem` | `PlaybookSegmentsItem` |
|
|
63
|
+
| `ExportedConfigSegmentsItemPredicatesItem` | `PlaybookSegmentsItemPredicatesItem` |
|
|
64
|
+
| `ExportedConfigPlacementItem` | `PlaybookPlacementItem` |
|
|
65
|
+
| `ExportedConfigUiPathActionType` | `PlaybookUiPathActionType` |
|
|
66
|
+
| `ExportedConfig` | `Playbook` (already shipped in `0.11.0`) |
|
|
67
|
+
|
|
68
|
+
**This renames nothing on the wire.** The names are generated from exported keys
|
|
69
|
+
of scaffold's Zod barrel: both spellings resolve to the **same schema object**, so
|
|
70
|
+
no payload field, default or validation rule differs between them, and the OpenAPI
|
|
71
|
+
component names are unchanged (they come from `.meta({ id })` on the underlying
|
|
72
|
+
schemas, not from the key). A Playbook written by an older SDK parses byte-for-byte
|
|
73
|
+
identically. Scaffold's payload contract — `bundle_schema_version` /
|
|
74
|
+
`bundle_min_readable_schema_version` — is untouched, so there is no minimum-reader
|
|
75
|
+
floor to raise.
|
|
76
|
+
|
|
77
|
+
**The aliases are duplicate definitions, not type aliases.** Scaffold's generators
|
|
78
|
+
emit one full TS type, Pydantic model and serde struct per barrel key rather than an
|
|
79
|
+
alias, so in Python (`revturbine.types`) and Rust (`revturbine::types`) the old
|
|
80
|
+
names remain as their own complete models/structs, generated from the same schema.
|
|
81
|
+
No hand-written shim exists in either port, and none is wanted: it would collide
|
|
82
|
+
with the generated definition. In TypeScript the `core` barrel re-exports the old
|
|
83
|
+
pair with `@deprecated` TSDoc.
|
|
84
|
+
|
|
85
|
+
Requires `@revt-eng/schema` / `@revt-eng/core` ≥ 0.1.335, which added the
|
|
86
|
+
`Playbook*` keys upstream (scaffold #387).
|
|
87
|
+
|
|
88
|
+
Ruling: Kent, 2026-09-23 (BL-0156 — `ExportedConfig` naming deprecated, Playbook
|
|
89
|
+
canonical).
|
|
90
|
+
|
|
91
|
+
**Landed in** `0.11.1` (additive — every old name still resolves).
|
|
92
|
+
**Fail-closed in** `0.12.0`, when BL-0167 removes the `ExportedConfig*` keys from
|
|
93
|
+
scaffold's barrel and the generated definitions disappear from the vendored types
|
|
94
|
+
along with them. That is the same window as the `0.11.0` option/method aliases, so
|
|
95
|
+
an integration has one removal to absorb, not two.
|
|
96
|
+
|
|
97
|
+
**Proving test:** scaffold's `src/core/zod/playbook-generated-names.test.ts` (each
|
|
98
|
+
`Playbook*` key is the same object as its `RevTurbineConfig*` and `ExportedConfig*`
|
|
99
|
+
counterparts; a legacy `export-config.json` payload parses to an equal result
|
|
100
|
+
through both spellings of the config schema), plus this repo's
|
|
101
|
+
`scripts/check-vendored-types.mjs` (the vendored py/rs copies agree with the pin).
|
|
102
|
+
|
|
103
|
+
**Public-API snapshot: unchanged.** `pnpm check:public-api` still reports the same
|
|
104
|
+
**62** `@public` exports and `web-sdk/generated/public-api.json` is byte-identical,
|
|
105
|
+
because the `core` barrel's type re-exports carry no `@public` tag. Recorded here
|
|
106
|
+
rather than left implicit: a rename touching the SDK's type vocabulary that moves
|
|
107
|
+
*no* snapshot entry is worth stating, so a reader does not go looking for the diff.
|
|
108
|
+
No existing export's signature changed and none was removed.
|
|
109
|
+
|
|
110
|
+
## 0.11.0
|
|
111
|
+
|
|
112
|
+
### `Playbook` is the canonical name for every option that carries one (BL-0156)
|
|
113
|
+
|
|
114
|
+
**What changed.** `ExportedConfig` is dead vocabulary. Plan 118 renamed the
|
|
115
|
+
domain object to **Playbook** and plan 104 renamed the schema type to
|
|
116
|
+
`RevTurbineConfig`, but the *option*, *keyword* and *method* names that carry a
|
|
117
|
+
Playbook around the SDK still spelled it `exportedConfig` / `exported_config`.
|
|
118
|
+
Every one of them now has a `Playbook`-named counterpart; every old name stays
|
|
119
|
+
as a deprecated alias that still works.
|
|
120
|
+
|
|
121
|
+
TypeScript:
|
|
122
|
+
|
|
123
|
+
| deprecated | canonical |
|
|
124
|
+
|---|---|
|
|
125
|
+
| `localRuntime.exportedConfig` | `localRuntime.playbook` (already shipped; see below) |
|
|
126
|
+
| `localRuntime.resolvers.resolveExportedConfig` | `localRuntime.resolvers.resolvePlaybook` |
|
|
127
|
+
| `configProvider.getExportedConfig()` | `configProvider.getPlaybook()` |
|
|
128
|
+
| `sdk.getExportedConfig()` | `sdk.getPlaybook()` |
|
|
129
|
+
| `getPolicy().exportedConfigVersion` | `getPolicy().playbookVersion` |
|
|
130
|
+
| `BrowserRuntimeOptions.exportedConfig` | `BrowserRuntimeOptions.playbook` |
|
|
131
|
+
| `LocalEvaluationServerOptions.exportedConfig` | `LocalEvaluationServerOptions.playbook` |
|
|
132
|
+
| `ExportedConfigProvider` (type) | `RevTurbineConfigProvider`, also exported as `PlaybookProvider` |
|
|
133
|
+
| `ExportedConfig` (type) | `Playbook` |
|
|
134
|
+
|
|
135
|
+
Python: `RevTurbineCustomerSdk(exported_config=…)`, `LocalRuntime(exported_config=…)`,
|
|
136
|
+
`LocalRuntime.get_exported_config()`, `create_static_placement_resolver(exported_config=…)`,
|
|
137
|
+
`derive_local_entitlement_from_configured_rules(exported_config=…)`,
|
|
138
|
+
`configured_plan_name_from_exported_config`, `parse_exported_config_or_throw` and
|
|
139
|
+
`static.ExportedConfig` all gained `playbook`-spelled counterparts.
|
|
140
|
+
|
|
141
|
+
Rust: `configured_plan_name_from_exported_config` is now
|
|
142
|
+
`configured_plan_name_from_playbook`, with the old name kept as the crate's
|
|
143
|
+
first `#[deprecated]` item. Rust has no keyword arguments, so nothing else in
|
|
144
|
+
that port was a caller-visible name.
|
|
145
|
+
|
|
146
|
+
`RevTurbineConfigProvider`'s two accessors are both OPTIONAL on the interface so
|
|
147
|
+
that an existing `implements RevTurbineConfigProvider` clause keeps compiling;
|
|
148
|
+
the `configProvider` option intersects it with a union that still requires
|
|
149
|
+
exactly one of them, so a provider implementing neither is a compile error where
|
|
150
|
+
it is passed.
|
|
151
|
+
|
|
152
|
+
Reading a deprecated name logs **one** development-build warning per runtime
|
|
153
|
+
(one `DeprecationWarning` per process on Python) naming the canonical
|
|
154
|
+
replacement — one flag for every alias, so an integration still spelling several
|
|
155
|
+
of them gets a single line, not a wall. Production builds are silent. Requires
|
|
156
|
+
`@revt-eng/core` ≥ 0.1.331, which made the same rename upstream (scaffold #380).
|
|
157
|
+
|
|
158
|
+
Ruling: Kent, 2026-09-23 (BL-0156).
|
|
159
|
+
|
|
160
|
+
**Landed in** `0.11.0`. **Fail-closed in** `0.12.0` for the `ExportedConfig`
|
|
161
|
+
aliases — until then every old name works and warns once.
|
|
162
|
+
|
|
163
|
+
**Proving test:** `web-sdk/playbook-option.test.ts` (canonical never warns, the
|
|
164
|
+
alias still resolves, one warning across three read sites, both spellings reach
|
|
165
|
+
the same Playbook at every public read site),
|
|
166
|
+
`server-python/tests/test_playbook_option.py` (the same contract plus
|
|
167
|
+
`get_exported_config()`), and `server-rust/src/user_context.rs`
|
|
168
|
+
`playbook_rename_tests` (the alias returns exactly what the canonical returns).
|
|
169
|
+
|
|
170
|
+
### `localRuntime.playbook` is the canonical local-mode config key
|
|
171
|
+
|
|
172
|
+
**What changed.** The record this file owed and never carried: `localRuntime.playbook`
|
|
173
|
+
shipped earlier as the canonical spelling of `localRuntime.exportedConfig`, with
|
|
174
|
+
`resolveLocalPlaybook()` as the single resolver deciding precedence, but no
|
|
175
|
+
changelog entry was ever written for it — so an integration could not date the
|
|
176
|
+
change. It is recorded here rather than back-dated, because the version it
|
|
177
|
+
landed in is not the version this entry appears in and pretending otherwise is
|
|
178
|
+
exactly the confusion the "Landed in" / "Fail-closed in" split exists to
|
|
179
|
+
prevent. As of `0.11.0` the alias also warns once (it did not before).
|
|
180
|
+
|
|
181
|
+
**Landed in** a release before `0.11.0` (additive; the alias never stopped
|
|
182
|
+
working). **Fail-closed in** `0.12.0`, with the rest of the `ExportedConfig`
|
|
183
|
+
aliases.
|
|
184
|
+
|
|
185
|
+
**Proving test:** `web-sdk/playbook-option.test.ts` — `resolveLocalPlaybook`
|
|
186
|
+
accepts either key, prefers `playbook`, and warns only for the alias.
|
|
187
|
+
|
|
188
|
+
### `publicKey` is the only browser credential; `ingestPublicKey` is gone (BL-0113)
|
|
189
|
+
|
|
190
|
+
**What changed.** `0.10.0` made `publicKey` the browser credential and kept
|
|
191
|
+
`apiKey` and `ingestPublicKey` working as aliases "for one minor". This is that
|
|
192
|
+
minor:
|
|
193
|
+
|
|
194
|
+
- **`ingestPublicKey` is removed from `RevTurbineInitOptions`.** Passing it is
|
|
195
|
+
now a **type error**, including when the options are built in a variable
|
|
196
|
+
(`ExactInitOptions` rejects it there too).
|
|
197
|
+
- **`apiKey` is no longer read as a browser credential.** It still exists, and
|
|
198
|
+
still means exactly one thing: the secret **server key**, for
|
|
199
|
+
`@revturbine/sdk/server` and for the headless SDK on a backend. A browser init
|
|
200
|
+
that supplies only `apiKey` now resolves **no** browser credential and fails
|
|
201
|
+
at init, instead of silently sending a server key as the bearer.
|
|
202
|
+
|
|
203
|
+
`resolveBrowserPublicKey()` reads `publicKey` and nothing else, and
|
|
204
|
+
`resetBrowserKeyAliasWarning()` is gone with the warning it reset. Keyless
|
|
205
|
+
local-only init is unchanged, and the plan 95 anonymous `sdk_init` beacon now
|
|
206
|
+
keys off `publicKey` alone.
|
|
207
|
+
|
|
208
|
+
Ruling: Kent, 2026-09-23 (BL-0113), closing the window plan 257 opened.
|
|
209
|
+
|
|
210
|
+
**Landed in** `0.11.0`. **Fail-closed in** `0.11.0` — the same release. This IS
|
|
211
|
+
the fail-closed half of the `0.10.0` entry below; there is no further tolerance
|
|
212
|
+
window.
|
|
213
|
+
|
|
214
|
+
**Proving test:** `web-sdk/public-key-option.test.ts` (`publicKey` is the bearer
|
|
215
|
+
on ingest and every control-plane fetch; `apiKey` resolves nothing; nothing
|
|
216
|
+
warns), `web-sdk/customer-side-ingest.test.ts` (the bearer no longer carries the
|
|
217
|
+
server key), and `web-sdk/init-options-exactness.test-d.ts` (`ingestPublicKey`
|
|
218
|
+
is a type error inline AND in a variable — if the key is ever re-added, `tsc`
|
|
219
|
+
fails on the unused `@ts-expect-error`).
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
50
223
|
## 0.10.10
|
|
51
224
|
|
|
52
225
|
### Trial tokens now reach placement content, not only `getPersonalizationTokens()` (BL-0169)
|
|
@@ -545,8 +718,9 @@ and the plan 95 anonymous `sdk_init` beacon still fires only when no public key
|
|
|
545
718
|
|
|
546
719
|
Ruling: Kent, 2026-09-21, devkit PR #808 (closed).
|
|
547
720
|
|
|
548
|
-
**Landed in** `0.10.0`. **Fail-closed in**
|
|
549
|
-
|
|
721
|
+
**Landed in** `0.10.0`. **Fail-closed in** `0.11.0` — `ingestPublicKey` was
|
|
722
|
+
removed from the options type and `apiKey` stopped being read as a browser
|
|
723
|
+
credential (BL-0113); see the `0.11.0` entry above.
|
|
550
724
|
|
|
551
725
|
**Proving test:** `web-sdk/public-key-option.test.ts` — precedence, the single
|
|
552
726
|
bearer across ingest and control-plane fetches, the browser-only warning, and
|