@tinkerlandai/longplay-sdk 0.0.0-stage → 0.10.4

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +209 -0
  2. package/README.md +485 -2
  3. package/README.zh-CN.md +375 -0
  4. package/THIRD_PARTY_NOTICES.md +101 -0
  5. package/dist/ai-usage-Btwg1nD7.d.ts +247 -0
  6. package/dist/api-5gAz4-Sb.d.ts +16897 -0
  7. package/dist/chunk-2HFA34QO.js +6 -0
  8. package/dist/chunk-7DXL3LHT.js +1 -0
  9. package/dist/chunk-ACF2FBUB.js +1 -0
  10. package/dist/chunk-CLXORAOK.js +1 -0
  11. package/dist/chunk-DSPLGTQI.js +1 -0
  12. package/dist/chunk-EARSGITJ.js +1 -0
  13. package/dist/chunk-G56XGVMS.js +1 -0
  14. package/dist/chunk-HOW7NIIR.js +1 -0
  15. package/dist/chunk-JB46ZKGZ.js +1 -0
  16. package/dist/chunk-KBM7BYQY.js +1 -0
  17. package/dist/chunk-MRN4HP4W.js +1 -0
  18. package/dist/chunk-RE6BIFLN.js +2 -0
  19. package/dist/chunk-SBPTOOYB.js +1 -0
  20. package/dist/chunk-SSLZKIIU.js +1 -0
  21. package/dist/chunk-VMM3GA3L.js +4 -0
  22. package/dist/chunk-VOEFXEPP.js +1 -0
  23. package/dist/chunk-X6BCUINI.js +173 -0
  24. package/dist/chunk-XSVQHPQT.js +17 -0
  25. package/dist/chunk-YQHPEP4X.js +1 -0
  26. package/dist/chunk-ZPZVSC4J.js +1 -0
  27. package/dist/configuration-sync-CywDxRkX.d.ts +1698 -0
  28. package/dist/content-NYMIZRNR.js +1 -0
  29. package/dist/coupon-fA1QujHt.d.ts +184 -0
  30. package/dist/customer-page-km5f1PJZ.d.ts +480 -0
  31. package/dist/funnel-local-client-CVokI0rx.d.ts +46997 -0
  32. package/dist/funnel-node-evaluation-P5B4fPfJ.d.ts +2054 -0
  33. package/dist/funnel-resource-client-Cv5OjfAn.d.ts +14525 -0
  34. package/dist/funnel-runtime-host-UL4DEJDU.js +1 -0
  35. package/dist/growth-rules-B4YYy64R.d.ts +173 -0
  36. package/dist/index.d.ts +23545 -0
  37. package/dist/index.js +1 -0
  38. package/dist/native-shell.d.ts +4 -0
  39. package/dist/native-shell.js +1 -0
  40. package/dist/openrouter.d.ts +43 -0
  41. package/dist/openrouter.js +1 -0
  42. package/dist/page.d.ts +134 -0
  43. package/dist/page.js +1 -0
  44. package/dist/paywall-EJCNWDHK.js +1 -0
  45. package/dist/popup.d.ts +191 -0
  46. package/dist/popup.js +1 -0
  47. package/dist/react-native.d.ts +36701 -0
  48. package/dist/react-native.js +1 -0
  49. package/dist/screen-D81zCpfi.d.ts +3000 -0
  50. package/dist/screen-renderer-JMHV4GPP.js +1 -0
  51. package/dist/server.d.ts +7073 -0
  52. package/dist/server.js +1 -0
  53. package/dist/visual-dom-DQLPBZ2Z.js +1 -0
  54. package/dist/visual.d.ts +87 -0
  55. package/dist/visual.js +1 -0
  56. package/package.json +90 -3
package/CHANGELOG.md ADDED
@@ -0,0 +1,209 @@
1
+ # Changelog
2
+
3
+ ## 0.10.4 — 2026-10-31
4
+
5
+ - Add Longplay public package names, `createLongplay*` factories, error/options aliases, browser readiness and native/Python entry points. Retain legacy exports, commands, downloads, protocol and saved identities; publication is a separate release step.
6
+
7
+ ## 0.10.3 — 2026-10-31
8
+
9
+ - Validate Local Funnel Split routes and configuration dependencies by the assigned Variation ID instead of the experiment's display key or index.
10
+ - Align Python and Go dependency validation with the JavaScript SDK, including rejection of non-string Split values and display-key routes.
11
+ - Regenerate the shared iOS, Android and React Native presentation resources with the corrected Local Funnel validation. Wire protocol remains `0.10`.
12
+
13
+ ## 0.10.2 — 2026-10-30
14
+
15
+ - Move the default production API to `https://api.longplayai.com` in all six SDKs; use `https://api.dev.longplayai.com` explicitly for the test deployment. Wire protocol remains `0.10`.
16
+ - Move the Go module to `longplayai.com/sdk/go`. Update imports and module requirements; the old module path has no compatibility alias.
17
+ - Update visual diagnostics to trust the new Console origins and regenerate bundled native and browser resources.
18
+ - Dismiss Funnel presentations when their Run ends elsewhere and release the corresponding IAM entry host.
19
+
20
+ Release facts and artifact evidence: [SDK release ledger](../../docs/sdk-releases.md).
21
+
22
+ ## 0.10.1 — 2026-10-29
23
+
24
+ - Add the Server SDK supplemental Invoice preparation API with explicit Customer scope, reason normalization and bounded amounts; align Python/Go methods and transport fixtures.
25
+ - Preserve the original merchant purchase while recovering Paywall failures, and open its Checkout only once.
26
+ - Accept the App Console host in visual diagnostics after the public-site domain split.
27
+
28
+ - Support merchant-native purchase, subscription changes, refunds and billing records without requiring Stripe object identifiers or credentials.
29
+ - Upgrade the merchant receiver to version 3 with declared commercial profiles, explicit original-operation lookup and fresh Indiana authority before financial execution. Unknown results retain recovery of the original operation.
30
+ - Add the Server SDK authority resolver and align generated DTOs, financial validation and native merchant-provider entry points across all six SDKs.
31
+ - Use only wire protocol 0.10. Requests and responses from protocol 0.9 are refused; Customer Access/Refresh credentials retain their existing lifecycle.
32
+
33
+ ## 0.9.5 — 2026-10-29
34
+
35
+ - Synchronize JavaScript, React Native, Swift, Kotlin, Python and Go with the current Customer operations, scope checks, response validation and document semantics.
36
+ - Expand Go configuration, Feature and Local Funnel support, and align native content presentation, Customer capabilities and shared renderer resources.
37
+ - Add merchant Server SDK billing records, Merchant Bridge integration and current quantity and prepaid-credit contracts.
38
+ - Validate nested Paywall access decisions in Swift and Kotlin with the same denial and recommendation rules as direct entitlement checks.
39
+ - Make the iOS Push restart-recovery test explicitly retain a failed logout instead of racing a successful background detach.
40
+ - Retain protocol 0.9 as the only supported wire protocol. Missing or older protocol identities have no fallback or compatibility adapter.
41
+
42
+ ## 0.9.2 — 2026-10-29
43
+
44
+ - Add Python Server-Key APIs for Funnel decisions and recovery, Offering resolution, Feature evaluation and marketing events, with synchronous and asynchronous clients.
45
+ - Support Pika V1 marketing data delivery entirely on the merchant backend, without creating or distributing a Customer Token. Keep payment and entitlements in Pika's existing flow.
46
+ - Keep wire protocol 0.9 and the existing JavaScript, React Native, Swift, Kotlin and Go business behavior.
47
+
48
+ ## 0.9.1 — 2026-10-29
49
+
50
+ - Add `showPaywall.onPurchaseIntent` for merchant-owned selection handling, with validated Product and Feature quantities and no SDK quote or payment operation.
51
+ - Return scoped Access/Refresh credential pairs from backend issuance and Guest session resumption. Replace backend renewal with client Refresh Token rotation; backend revocation invalidates both credentials.
52
+ - Automatically refresh in Web, React Native, Swift and Kotlin without resetting Customer state, analytics queues, Funnel Runs or Paywalls. Fence account changes and retain Refresh Tokens after lost responses.
53
+ - Go owns opaque-session lifecycle and authorization policy; PostgreSQL serializes rotation and revocation. Protocol 0.9 requires the matching runtime and SQL migrations and refuses older development protocols.
54
+
55
+ ## 0.8.5 — 2026-10-27
56
+
57
+ - Add direct browser script loading through `/sdk.js`, sharing the npm browser APIs and page/visual experiment factories without requiring a bundler. Website deployment distributes this entry independently of npm publication.
58
+ - Keep IAM release markers attached through host updates, group render-signature queries, and recover bounded visual work without duplicate exposure events.
59
+ - Disable Funnel Back navigation until the current presentation is rendered, and include the SDK version in experiment-event requests.
60
+ - Synchronize the packaged Web, iOS and Android renderers while retaining HTTP protocol 0.8.
61
+
62
+ ## 0.8.4 — 2026-10-26
63
+
64
+ - Add `prepareContent` and `preparePopup` to render authorized content before the opening click and reveal the same iframe on demand.
65
+ - Prepare bounded HTML DOM templates for supplied pages and Product variants; update variable text in place while preserving styles, images and unrelated content. Reuse inactive variants with empty variable slots.
66
+ - Prepare Local Funnel rule definitions once per pure segment and send advance signals without waiting for advisory prediction downloads. Late predictions remain fenced by Run position and identity.
67
+ - Synchronize the packaged Web, iOS and Android renderers. Retain HTTP protocol 0.8 and server authority over Funnel acceptance and commercial operations.
68
+ - Carry the committed Merchandise context through Feature evaluation, page experiments, Analytics events and Coupon applicability; refresh the generated native Paywall schema.
69
+ - Include the committed Android Push recovery proofs, visual target diagnostics and Paywall/Funnel focus restoration fixes.
70
+
71
+ ## 0.8.3 — 2026-10-26
72
+
73
+ - Refresh sanitized custom HTML fallback content when Product availability changes.
74
+ - Preserve the selected Product across empty availability refreshes, keeping purchase disabled while that Product is unavailable.
75
+ - Synchronize the shared Web and native renderers with the current Product selection rules.
76
+ - Align Server SDK request helpers with the committed messaging contract.
77
+
78
+ ## 0.8.1 — 2026-10-25
79
+
80
+ - Organize SDK implementations by capability while preserving public entry points and interfaces.
81
+ - Consolidate Funnel observed state, pending-command and purchase recovery, and shared request validation without changing credential or execution authority.
82
+ - Share Paywall binding and purchase-observation rules across hosts; keep rendering independent of authenticated clients.
83
+ - Keep the current mutation schema in durable command storage and remove an invalid comparison against the unsupported `evaluate` operation.
84
+
85
+ ## 0.8.0 — 2026-10-24
86
+
87
+ - Resolve independent Pages, Popups and Banners and render them through the explicit `mountContent` host entry.
88
+ - Send a Flow Local `commit_segment` as an advance signal with only the parked position, policy revision and configuration generation; the server calculates and accepts the pure path. The local walk is a display-only `controller.prediction` that clears when the accepted response arrives. A pending 0.7 `commit_segment` left in `funnelCommandStorage` is re-derived from the Run's current position instead of replayed. Uses HTTP protocol 0.8; protocol 0.7 is refused.
89
+ - Evaluate every Funnel GB node, Local and Remote, against one attribute view: the Run attributes without raw `parameters`, `answers` or `results`, plus the registered `variables` at that node.
90
+ - Remove the `./iam` entry. Build-time IAM generation moves to `@tinkerlandai/longplay-iam`; the visual entry exports `loadAppManifestRelease` and keeps the `appManifestRelease` option for binding a page to its IAM release.
91
+
92
+ ## 0.7.0 — 2026-10-23
93
+
94
+ - Bundle the Funnel shell and shared renderer in iOS and Android; render independent Paywalls through the same SDK program.
95
+ - Read reviewed Local Funnel and Paywall JSON from immutable CDN artifacts with scope, format, byte-length and SHA-256 checks. Keep personal data and commercial facts in authenticated APIs.
96
+ - Separate presentation loading from Funnel command settlement and durable purchase recovery.
97
+ - Use HTTP protocol 0.7 for the new Paywall delivery contract. Older 0.x protocols are refused before business execution.
98
+
99
+ - Add the independent `@tinkerlandai/longplay-react-native` package and shared React Native core entry for Customer identity, holdings, entitlement checks and backend-mediated usage reporting.
100
+ - Include SwiftPM and Maven distributions in the unified release, with generated native package versions and independent public installation checks.
101
+ - Remove the live-page visual editor handshake: the `__indiana_visual_editor` query parameter no longer pauses page experiments. Visual changes are authored in the Console App page map.
102
+ - Calculate Local Funnel segments (`evaluate_segment`) after `createFunnelClient().start()` and in the native WebView host. The packaged native shell has no network access; the Swift and Kotlin hosts read the public configuration it needs.
103
+ - Give errors the SDK raises locally the `recovery` their message names instead of `contact_support`, for example `recover_operation` for `COMMAND_PENDING` and `DECISION_PENDING`, `reload_state` for `CONFIGURATION_EXPIRED` and `retry_same_request` for `EVENT_QUEUE_FULL`. Server error codes keep their recovery.
104
+
105
+ ## 0.6.3 — 2026-10-23
106
+
107
+ - Align JS, Python and Go package versions at 0.6.3; retain HTTP protocol 0.6 and immutable earlier releases.
108
+ - Bound optional persistent-cache reads and download the pinned Funnel and GB artifacts together, preserving the five-second initialization budget and artifact validation.
109
+ - Wait for the original display acknowledgement to settle and read the current Run before processing the first action; retain the original request identity during recovery.
110
+
111
+ ## 0.6.2 — 2026-10-22
112
+
113
+ - Publish checked artifacts through GitHub Actions with npm Trusted Publishing and verify the public package bytes and independent installation after publication.
114
+ - Export the deterministic hosted renderer shell, content address and CSP from the popup entry so SDK consumers share the same renderer identity.
115
+ - Keep protocol 0.6, the existing API origin and the Customer, entitlement and usage contracts. The 0.6.1 Funnel input, command settlement and Back recovery fixes remain included.
116
+
117
+ ## 0.6.1 — 2026-10-22
118
+
119
+ - Submit only the current Funnel screen's declared input bindings. Preserve historical answers, unsaved drafts during refresh and values when navigating Back.
120
+ - Validate public Local Funnel Feature dependencies against their declared write variables.
121
+ - Settle the original accepted command during host polling so background completion releases the next screen and terminal recovery.
122
+ - Recover a rejected screen display acknowledgement after Back without resubmitting the user's action.
123
+ - Keep protocol 0.6 and the existing immutable renderer identity. Runtime and production acceptance are recorded separately in the release ledger.
124
+
125
+ ## 0.6.0 — 2026-10-21
126
+
127
+ - Default SDK API requests to `https://api.tinker.cash` while retaining explicit `baseUrl` overrides. Public configuration synchronization uses the same default through its optional `origin`; page/visual clients follow the same entry. Test apps explicitly use `https://api.dev.tinker.cash`. Native Swift/Kotlin source follows the default, with separate package releases.
128
+ - Publish on `beta`, retaining `latest = 0.5.0`. Package publication does not deploy runtime/database changes or certify Go business readiness; the latest API entry checks returned HTTP 503 for business readiness.
129
+
130
+ - Use protocol 0.6 and current-page JSON rendering. Local and Remote use one canonical Run, native command/action receipts, business executor and Queue recovery.
131
+ - Add `Customer.forFunnel(...)` to bind exact Funnel/version context for Coupon, Offering, Paywall and attach-quote requests. Independent use retains capability-owned rules.
132
+ - Preserve exact purchase-command restoration; retire optional client observations and cross-capability binding switches. Publication and hosted environment facts are recorded separately in the release ledger.
133
+
134
+ - Adopt Funnel 4 / graph 5 unified variable registration: source-constrained input/node writes, explicit imports, `inputs[].variable`, named `writes` and shared variable reads. Preserve existing answer/result storage, Back invalidation and independent commercial eligibility. Native contracts are regenerated; database acceptance remains separately scoped.
135
+
136
+ - Unify formal Local and Remote Funnels on the same server Run, business executor, command/action idempotency and Queue recovery. Local submits fenced native GB calculations; pending calculations release the worker. Retire the standalone host business executor and presentation-state owner. Preserve original Customer/Key proof, independent Coupon self-claim/grant authorization, exact retries and native wire generation. Old host checkpoints require explicit reconciliation.
137
+
138
+ - Use SDK 0.6.0 / protocol 0.6: Remote Funnel responses embed only the current page document. Local and Remote share JSON rendering; the host no longer downloads page-specific HTML. Preserve authenticated dynamic data, pause handling, accepted-command recovery and server-side execution. Regenerate native wire schemas and restrict native frame navigation to the shared same-origin renderer. Existing npm 0.5.0 keeps its original render-reference contract.
139
+
140
+ - Add opt-in `createConfigurationSync` for shared public Local GB/Funnel/page configuration, bounded initialization, immutable artifact verification and strict control freshness. Remote graphs are excluded, and explicit Indiana commands bypass CDN admission. Matching gateway is restricted to Indiana-test; no npm or production publication is implied.
141
+
142
+ - Add explicit server-side `createFunnelDecisionClient().local()` evaluation for pure Funnels, with scoped configuration reuse, host-persisted Sticky and opt-in session exposure deduplication. A dedicated `local_configuration` operation preserves existing configuration responses; remote `decide` and committed financial/Run receipts retain their authority. Requires matching server source; no package or runtime promotion is implied.
143
+
144
+ ## Distribution tags — 0.5.0 latest — 2026-10-19
145
+
146
+ - Point `latest` to the existing `0.5.0`; retain `beta = 0.5.0`. Default npm installation resolves 0.5.0, matching the separately deployed production protocol 0.5. Package bytes and runtime remain unchanged; no package was republished.
147
+
148
+ ## 0.5.0 — 2026-10-19
149
+
150
+ - Use protocol 0.5 for billing-window `anchor` responses and `sourceKind: manual` Invoices. The anchor semantics come from pinned Autumn; the Invoice source classification is an Indiana response adaptation. Add Invoice management methods and current subscription invoice-mode/anchor inputs. Requires a matching server/database release; package publication does not promote production.
151
+
152
+ - Separate remote Screen navigation (10 seconds), bridge handshake (5 seconds) and first render (5 seconds) startup budgets. Count visible time only, identify the timed-out phase and cancel timers/listeners on render or disposal. A slow valid document no longer consumes the bridge budget before it loads.
153
+
154
+ ## Distribution tags — 2026-10-19
155
+
156
+ - Point `latest` to the existing `0.4.0`; retain `beta = 0.4.0`. Default npm installation now resolves 0.4.0. Package bytes, protocol, and runtime are unchanged; no package was republished.
157
+
158
+ ## 0.4.0 — 2026-10-18
159
+
160
+ - Use protocol 0.4 with environment-scoped behavior, experiment-exposure and Feature-usage collection policies. New required delivery and tracking acknowledgement fields require a matching service release.
161
+ - Acknowledge disabled categories through `skipped`; preserve UUID/timestamp replay identity and keep database enforcement authoritative. Collection settings do not delete history or affect billable usage.
162
+ - Cache SDK collection hints for 30 seconds and refresh on demand after expiry. Identity changes clear hints; re-enabling collection resumes eligible exposure/Feature-usage recording without repeating visual changes.
163
+ - Publish on `beta`; keep `latest` unchanged. Production and native package/store rollout remain separate.
164
+
165
+ ## 0.3.1 — 2026-10-17
166
+
167
+ - Make English the default package README and include a separately linked Simplified Chinese translation.
168
+ - Update the package and SDK request version identifiers to 0.3.1; wire protocol 0.3 and business behavior are unchanged from the immutable 0.3.0 release.
169
+
170
+ ## 0.3.0
171
+
172
+ - 0.3.0 uses wire protocol 0.3 for published screen render references. Obsolete 0.2 and its fixed headerless identity are explicitly refused before business execution; no pre-1.0 compatibility adapter is provided. Existing 0.2.0 publication evidence remains immutable.
173
+ - Add `ScreenPreviewHandle.resizeViewport(height)` to resize previews while preserving their active document and interaction state.
174
+ - Keep Funnel background reads separate from the command lock, so polling cannot swallow a screen action. Unchanged GET/shown data preserves the mounted form and selection.
175
+ - Clear a lost-command error when an external `controller.retry()` settles that exact command. A GET before settlement retains the error; unrelated renderer failures remain visible.
176
+
177
+ - Expose error recovery, retryability, registered business reasons and Retry-After timing on IndianaError. Distinguish unavailable capabilities from missing configuration. Retain HTTP status and request references for non-JSON failures; unknown results, timeouts and lost responses require original-operation recovery and never trigger automatic retries.
178
+
179
+ - Pause renderer startup deadlines while the host document is hidden, preserving the five-second visible-time budget and cancellation on ready/disposal.
180
+ - Identify the wire protocol and package version with `X-Indiana-Protocol` / `X-Indiana-SDK-Version`; verify advertised successful-response protocols. These changes are not in the immutable published 0.2.0 tarball.
181
+ - Add the stable-major compatibility policy, at least 12 calendar months of predecessor support and 180 days of public notice, with a pinned published-old-SDK/current-server regression gate. Current 0.x still rejects obsolete protocols. See [support policy](../../docs/sdk-versioning-and-support.md).
182
+
183
+ ## 0.2.0 — 2026-10-16
184
+
185
+ - Breaking: server Funnel starts and decisions use `customer: { type: "id" | "externalUserId", value }`; optional `customerData` is creation-only and requires an external user reference. Remove start-body `customerToken` and decision `customerId`; no legacy compatibility. Customer-credential starts name no Customer.
186
+ - Export `createFunnelCampaignClient` from `/server` for explicit campaign decisions and starts with durable suppression. Validate returned Funnel and Customer identity before accepting a Run.
187
+ - Use `X-Indiana-Web-View` and `X-Indiana-Telemetry-Subject` response headers. Include current renderer, native shell and Paywall recovery/lifecycle fixes.
188
+ - Route native receipt recovery through independent `subscriptions/native/restore`, including read-only recovery. This package release does not certify or publish Apple/Google store integrations; real store acceptance remains deferred.
189
+
190
+ ## 0.1.0 — 2026-10-16
191
+
192
+ - Web Beta with current Indiana factories, Customer two-table identity, current Funnel runtime, Feature generation, Offering hierarchy and independent Paywall sessions. No legacy API or data compatibility.
193
+ - Converge current request/response contracts and regenerate native shell assets. Include canonical Stripe payment setup, subscription administration and License client contracts. Server availability is documented in README; unfinished billing authorization, batch/conflict, Reward Product and native execution remain outside accepted scope.
194
+ - Keep one npm package with browser, server, popup, OpenRouter and native-shell entries. Swift/Kotlin store acceptance and publication are deferred.
195
+
196
+ - Move Local/Remote evaluation policy to each Funnel. New Funnels default to Local; Owner/Admin manage it in Funnel settings. API keys only authenticate and authorize calls; one key can call different modes. Remove `remoteEval`: `configuration()` reads the Funnel mode and the server enforces rule downloads and API decisions.
197
+ - Add `configuration()` with public Funnel topology and versioned resource references. Remote payloads omit rules and commercial parameters; Local payloads include pure evaluation configuration.
198
+ - Keep business actions server-authoritative. Existing Funnels migrate explicitly to Remote; one API key can call both Local and Remote Funnels.
199
+
200
+ ## 0.0.1 — 2026-10-13
201
+
202
+ - First organizational Beta under `@tinkerlandai/longplay-sdk`, replacing personal-package imports. Publish with the `beta` tag and pin `0.0.1` when installing.
203
+ - Include browser, server, popup, OpenRouter and native-shell ESM entries. Private contracts remain bundled into the SDK.
204
+ - Add browser/server `createFeatureClient` with scoped cached configuration and synchronous GrowthBook evaluation. Generic decisions return immutable `value` JSON with live validity `state`; trusted inputs use `attributes`.
205
+ - Replace customer `metadata` / `tags` inputs with `attributes`, `removeAttributes` and incremental `tagChanges`. No obsolete-format compatibility reader is included.
206
+ - Refine Funnel decision recovery and host resume/close behavior. Include current subscription, native-receipt and prepaid Feature quantity contracts, with the matching generated native host.
207
+ - Include GrowthBook MIT attribution and synchronize installation examples and downloadable archives.
208
+
209
+ Upgrade imports and the matching server/database deployment together. This npm release does not deploy Grow or publish the separate Swift/Kotlin packages. Installed-artifact and offline checks do not certify real payments, native stores or deployed behavior. Browser validation was explicitly omitted at the user's request.