Package v0.2.12→v0.2.124: manifest, actions, version graph

This commit is contained in:
Keysat
2026-06-13 13:36:30 -05:00
parent 318c6c4b81
commit 1243f4414c
126 changed files with 2052 additions and 441 deletions
+13
View File
@@ -0,0 +1,13 @@
import { VersionInfo } from '@start9labs/start-sdk'
export const v_0_2_52 = VersionInfo.of({
version: '0.2.52:0',
releaseNotes: {
en_US:
'Tier upgrade now carries Core leftover credits forward. Previously, a Core user with 6 of 6 lifetime credits remaining who activated a Pro license would see their balance flip to "50 / 50 (Pro)" — the 6 unused Core credits silently vanished because Core uses a lifetime counter and Pro uses a separate monthly counter. Now: on the first Core → paid-tier promotion (detected when tier_snapshot is still "core" and the resolved license tier is "pro" or "max"), the unused Core lifetime allotment (coreLifetimeCap lifetime_consumed) is transferred into purchased_balance — the same durable top-up bucket BTCPay credit purchases land in. The transferred credits never expire and stack on top of the new tier\'s monthly allotment, so total = monthly cap + carried-over Core credit + any prior top-up. Net effect for the typical upgrade path: a Core user who has used 0 of 6 lifetime credits and activates Pro now sees 56 total (50 Pro + 6 carried-over) instead of 50. The promotion handler is now centralized in a single `applyTierPromotion(row, newTier)` helper called from both `commitCredit` (the metered transcribe / analyze routes) AND `/relay/balance` (which Recap calls first after license activation to refresh the toolbar). Centralizing it fixes a pre-existing bug where a /relay/balance call between license activation and the first metered call could silently flip tier_snapshot to "pro", causing the subsequent commitCredit to skip the promotion logic entirely. The helper persists immediately when a promotion fires so the leftover transfer is durable across relay restarts.',
},
migrations: {
up: async ({ effects }) => {},
down: async ({ effects }) => {},
},
})