Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 1 | /** |
| 2 | * The note shown before someone starts compute their workspace's plan would | |
| 3 | * refuse (`computeNote` in `@g1t/contracts` compute.ts). Members only: the | |
| 4 | * routes that call it decide who sees it. | |
| 5 | */ | |
| 6 | import { type ComputeKind, computeNote, readEntitlements } from "@g1t/contracts"; | |
| 7 | ||
| 8 | import { billing } from "./services.server"; | |
| 9 | ||
| 10 | /** Null when the plan would let it start, or billing cannot say. */ | |
| 11 | export async function computeNoteFor(workspace: string, kind: ComputeKind, isPublic = false): Promise<string | null> { | |
| 12 | const ent = readEntitlements(await billing.entitlements(workspace.toLowerCase()).catch(() => null)); | |
| 13 | return ent ? computeNote(ent, kind, isPublic, workspace) : null; | |
| 14 | } |