2.0.0: changelog and skill docs for slugs and environments
Claude-Session: https://claude.ai/code/session_01SMCvdwDmuxoaqGgvGBLk1V
This commit is contained in:
@@ -1,5 +1,38 @@
|
||||
# Changelog
|
||||
|
||||
## 2.0.0
|
||||
|
||||
Breaking change — major bump, required by the backend environments release.
|
||||
Every project now has exactly two environments, `staging` and `prod`, and the
|
||||
SDK key passed as `projectKey` decides which one the player belongs to. The
|
||||
environment never appears in the client API: it is resolved at login and
|
||||
carried inside the access and refresh tokens. Tokens issued before this
|
||||
release have no environment claim and are rejected with 401, so the first call
|
||||
after the backend upgrade refreshes, fails, clears the token store and emits
|
||||
`'signed-out'` to every `onAuthStateChange` listener. Log the player in again
|
||||
with `client.auth.loginWithDevice()` / `loginWithCustom()`.
|
||||
|
||||
Quests, scenarios and offers are addressed by their slug instead of their id,
|
||||
because ids differ between staging and prod while slugs are stable. Renamed
|
||||
accordingly: `Quest.id` is now `Quest.slug`, `client.quests.claim()` takes a
|
||||
quest slug, `reportProgress()` resolves to the slugs of the completed quests
|
||||
(`ReportQuestProgressResponse.completedQuestSlugs`),
|
||||
`client.stores.purchase(storeSlug, offerSlug, options?)` takes an offer slug
|
||||
and `OfferHandle` carries a `slug` alongside its `id`,
|
||||
`QuestMetrics.purchaseOffer(offerSlug)` builds its metric from the offer slug,
|
||||
and every scenario-scoped type exposes `scenarioSlug` instead of `scenarioId` —
|
||||
`PendingEffect`, `ScenarioCompletedEffect`, `ScenarioFailedEffect`, the battle
|
||||
pass requests and `client.battlePass.getProgress(scenarioSlug, nodeId)`.
|
||||
`offer.buy()` is unchanged; it now binds the slug for you. Leaderboards, items
|
||||
and stores already used slugs and are untouched.
|
||||
|
||||
Also shipped here, previously committed but never published: the effects client
|
||||
reconciles against every `GET /sdk/v1/scenarios/pending` response, so a run
|
||||
that disappears server-side (finished elsewhere, expired after a promote) now
|
||||
emits `onScenarioCompleted` instead of lingering; and `run_not_active` joins
|
||||
`unknown_run` and `run_expired` as a terminal rejection that drops the run and
|
||||
emits `onScenarioFailed`.
|
||||
|
||||
## 1.0.0
|
||||
|
||||
- Scenario execution moved server-side. The SDK no longer walks a local DAG
|
||||
|
||||
Reference in New Issue
Block a user