@idosgames/core 0.10.0 → 0.11.0

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 CHANGED
@@ -14,6 +14,93 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht
14
14
 
15
15
  ## [Unreleased]
16
16
 
17
+ ## [0.11.0] - 2026-09-10
18
+
19
+ Player chat, the creator reward programme, and push notifications all land at once, alongside a
20
+ from-scratch Store rewrite and the removal of DealOffer's pre-`Purchase`-module legacy. Breaking —
21
+ see below.
22
+
23
+ ### Breaking
24
+
25
+ - **DealOffer sheds its pricing/ads legacy and moves to blocks.** `DealOfferGraphMode`/
26
+ `DealOfferDefinition.GraphMode` are gone — the graph's shape is now derived from
27
+ `RootNodeIDs`/`NextNodeIDs`/`ChoiceGroupID`, never declared, so it cannot disagree with how the
28
+ offer actually plays. `DealPurchaseActionDefinition`/`DealNodeActionDefinition.Purchase` are
29
+ gone — a node's price is `DealNodeDefinition.PriceOptions` like everywhere else on the platform,
30
+ and a node with a price and no options no longer silently charges nothing. Rewarded-video
31
+ `AdPlacementID`/`RequireServerVerification` are gone — a video watch is now an ordinary
32
+ `RewardedVideoCredit` price, verified structurally by `Advertising`, not by a flag nobody read.
33
+ `DealOfferDefinition`'s flat fields (`Name`, `Description`, `Milestones` as a dict,
34
+ `MilestoneClaimMode`, `MilestoneToken`, `AssetPaths`, `Metadata`) are replaced by
35
+ `Identity`/`Availability`/`Behaviour`/`Graph`/`Milestones`/`Pricing`/`Reward` blocks plus
36
+ `PresetBindings` — same shape as `Character`/`Store`. Read node/offer pricing and milestone
37
+ settings from the blocks; the server resolves "not set" (inherit the preset) vs. "set" (final,
38
+ including empty) — there is no client-side default to fall back on.
39
+ - **`CurrencyConversion.FeePercent` is now `Fee`, and it is a FRACTION** — `0.05` means 5%, not
40
+ `5`. Same platform-wide `Percent` → `Rate`-family rename as `SpendRewardDefinition.Rate` in
41
+ 0.10.0; render a percentage if you like, but keep the wire value a fraction.
42
+ - **`CryptoNetworkBinding.MinDeposit` and `.WithdrawFee` are gone.** Dropped on the server; nothing
43
+ here read them, so there is no replacement to reach for.
44
+
45
+ ### Added
46
+
47
+ - **`client.chat`** (`ChatService`) — title channels and 1-on-1 conversations: `getChatDefinitions`,
48
+ `getChannels`, `poll`, `getHistory`, `sendMessage`, `sendDirect`, `openDirectChannel`,
49
+ `getConversations`, `markRead`, `joinChannel`, `leaveChannel`, `reportMessage`, `ignoreUser`,
50
+ `unignoreUser`, plus `chat:*` events. ⚠ One `poll()` covers ALL rooms and never marks anything
51
+ read — looping per channel or per tick multiplies the publisher's API bill for nothing. Port of
52
+ the engine's `Chat` module. Skill `chat-system`.
53
+ - **`client.communityMarketing`** (`CommunityMarketingService`) — the game's half of the creator
54
+ reward programme: `getState`, `getEarnings`, `claim`, `withdrawCryptoReward`,
55
+ `checkJoinEligibility` (only meaningful for `Automatic` participation mode), plus
56
+ `communityMarketing:*` events. ⚠⚠ `Granted` is the promise, `Earned`/`Mature` are estimates that
57
+ can fall as a platform scrubs fake engagement — `Claimable` is derived from `Granted`, never
58
+ `Mature`. A crypto reward never touches the in-game balance (`withdrawCryptoReward`, not
59
+ `claim`) and debits the programme pool the moment the voucher is issued, before anything reaches
60
+ the chain — an interrupted withdrawal is finished by `TitleTransactionID`, never retried as a
61
+ fresh request. Port of the engine's `CommunityMarketing` module. Skill
62
+ `community-marketing-system`.
63
+ - **`client.push`** (`PushService`) — `getConfig`, `getState`, `subscribe`, `unsubscribe`,
64
+ `unsubscribeByHash`, `getSubscriptions`, plus the `push:configLoaded` / `push:subscribed` /
65
+ `push:unsubscribed` events. Port of the engine's `Push` module.
66
+ - **`templates/host-starter/public/sw.js`** — a service worker the game OWNS, shipped in the seed.
67
+ ⚠ It has no `fetch` handler and must never get one: a cached `index.html` points at
68
+ content-hashed chunks the next deploy deletes, and the player gets a white screen from inside
69
+ their own browser, where neither a CDN purge nor Ctrl+F5 reaches.
70
+ - Skill `push-notifications`.
71
+ - **`client.store.getStorefront()`** (`StoreService`) — the shop as this player sees it right now:
72
+ resolved rotation, per-slot refresh timers, first-purchase/sold-out badges and remaining limits.
73
+ ⚠ Draw this, not `getDefinitions()` — rotation is recomputed by the server on every read and
74
+ nothing here can be derived on the client. Also `cachedStorefront`, `nextRefreshAtUtc()`, and a
75
+ new `store:storefrontLoaded` event. `StoreService.purchase()` gains an optional `slot` (
76
+ `storeID`/`sectionID`/`slotID`) so a pooled product's per-window cap applies unambiguously; the
77
+ server re-checks the roll either way and answers a stale card with `OFFER_NOT_IN_ROTATION` —
78
+ reload the shop on that code, do not show it as an error. Full model surface for the new
79
+ `Stores -> Layout.Sections -> Slots` tree and the `StoreOffers` catalog (`StoreDefinition`,
80
+ `StoreSlotDefinition`, `StorefrontView` and friends) is now exported from the package root.
81
+ Rewritten skill `store-system`.
82
+
83
+ ### Changed
84
+
85
+ - **`PlaytimeTracker`'s idle threshold is now 30 minutes, not 5** — matches the server's session
86
+ boundary (`Usage.SessionIdleTimeoutMinutes`, the same rule Firebase/GA4 use) and the Unity SDK.
87
+ The server decides session COUNT from the gap in the player's own activity and ignores the
88
+ client's flag either way; the constant still matters for `SessionDurationSeconds`, so web and
89
+ mobile numbers stay comparable.
90
+
91
+ ### Notes
92
+
93
+ - ⚠⚠ **`subscribe()` must run from a real tap.** Browsers reject the permission prompt outside a
94
+ user gesture, and Chrome permanently blocks an origin after a few dismissals — an automatic
95
+ prompt does not merely fail, it removes the player's ability to ever say yes.
96
+ - ⚠⚠ **Inside the portal iframe the browser blocks the prompt outright**, so `subscribe()` asks
97
+ the website to subscribe on its own top-level document; the engine still does the sending.
98
+ `PushSubscribeResult.Where` says which path ran.
99
+ - The VAPID public key arrives from the server, never baked into the build; `EndpointHash` comes
100
+ from the server and is never computed on the client.
101
+ - ⚠ **Chat's cloned/group channel type is scaffolded but has no provider yet** — the engine has no
102
+ concept of clans, so a `Group` channel is hidden rather than shown empty until one exists.
103
+
17
104
  ## [0.10.0] - 2026-08-31
18
105
 
19
106
  Where a player came from is now captured and delivered automatically, and playtime finally reaches