Skip to content

Commit 6bfe1fe

Browse files
Sync public snapshot from freebuff-private
Source: CodebuffAI/freebuff-private@5959a34ba5c16dfc53718c30bc18ac5ee5d0cfcc
1 parent bf468de commit 6bfe1fe

3 files changed

Lines changed: 38 additions & 3 deletions

File tree

bun.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/src/constants/freebuff-models.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,6 +2220,25 @@ export function freebuffUpdateRequiredAvailabilityLabel(): string {
22202220
return 'only on this version of Freebuff Desktop — update it to resume your purchased time without another charge'
22212221
}
22222222

2223+
/**
2224+
* What a client that understands `purchasesPaused` says: purchased Desktop
2225+
* sessions are paused, the model is fine, and nothing about the user's build
2226+
* or pick needs changing.
2227+
*/
2228+
export function freebuffPurchasesPausedModelMessage(id: string): string {
2229+
const model = SUPPORTED_FREEBUFF_MODELS.find((m) => m.id === id)
2230+
const name = model?.displayName ?? id
2231+
return `Purchased Desktop sessions are paused right now, so a new one for ${name} can't be started yet — the model itself is fine. Try again shortly.`
2232+
}
2233+
2234+
/** The same fact shaped to sit inside "<model> isn't available right now (…)",
2235+
* which is the only sentence a binary that predates `purchasesPaused` can
2236+
* build. Scopes the unavailability to purchased sessions, so the reader is
2237+
* not told the model is down. */
2238+
export function freebuffPurchasesPausedAvailabilityLabel(): string {
2239+
return 'purchased sessions are paused right now — the model itself is fine; try again shortly'
2240+
}
2241+
22232242
/** Suffix-tolerant like the other model predicates, so a dated provider
22242243
* snapshot of a paused model cannot slip past the pause. */
22252244
export function isFreebuffPausedFreeModelId(

common/src/types/freebuff-session.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,22 @@ export type FreebuffSessionAdmissionResponse = (
889889
* working onto whatever was not.
890890
*/
891891
updateRequired?: boolean
892+
/**
893+
* The MODEL is fine; minting NEW purchased Desktop sessions is paused
894+
* server-side (FREEBUFF_DESKTOP_PURCHASE_ADMISSION), so an up-to-date
895+
* build that needs a fresh purchase is refused rather than charged for
896+
* an hour it could not be issued. Not an update problem and not a
897+
* model problem: the pick works again as soon as the pause lifts, on
898+
* the build the user already has. Set only on the Desktop
899+
* multi-session path.
900+
*
901+
* Older clients ignore it and still render `availableHours`, which is
902+
* worded so the sentence they build around it does not blame the model.
903+
* The refusal it replaces read "<model> isn't available right now
904+
* (Purchased Desktop sessions are temporarily unavailable …)", which a
905+
* reader takes as the model being down and switches away from.
906+
*/
907+
purchasesPaused?: boolean
892908
}
893909
| {
894910
/** Account is banned. Returned from every endpoint so banned bots can't

0 commit comments

Comments
 (0)