sudo no longer speaks of models: the price book page drops its line about models charged at cost plus a margin, a goodwill credit is money paid to Cloudflare alone, and the Usage explorer's plans no longer slice by model or task. An audit line for an old shared invite link leads to Invites, which has no Shared tab since invite-only sign-up went, and the README's test list and its note on @g1t match. Checked: sudo's 153 tests and the TypeScript typecheck.
7 files+11−140/7 viewed
| 179 | 179 | register or rename a workspace to while it exists. **Remove** | |
| 180 | 180 | (`admin_remove_alias`) needs a reason. Both go in sudo's audit log | |
| 181 | 181 | (`alias_added`, `alias_removed`), naming the staff member. `@g1t` in | |
| 182 | − | text still means g1t's agent: it links to how the agent works, never to | |
| 183 | − | `/g1t`. | |
| 182 | + | text still means g1t itself (Ask g1t), never the alias's `/g1t`. | |
| 184 | 183 | - **Enterprises**: customers that pay for several workspaces with one | |
| 185 | 184 | bill, one limit and one set of terms. Each has its workspaces (add or | |
| 186 | 185 | remove them), combined usage, terms, credits, ledger and audit log, and | |
| ⋯ | |||
| 295 | 294 | ||
| 296 | 295 | ```sh | |
| 297 | 296 | npm run typecheck -w @g1t/sudo | |
| 298 | − | npm test -w @g1t/sudo # JWT verification, forms, money, the workspace join, paging, nav, charts, signals, models | |
| 297 | + | npm test -w @g1t/sudo # JWT verification, forms, money, the workspace join, paging, nav, charts, signals | |
| 299 | 298 | npm run build -w @g1t/sudo | |
| 300 | 299 | ``` | |
| 301 | 300 | ||
| 59 | 59 | assert.equal(accountPath("ws_acme"), "/workspaces/acme"); | |
| 60 | 60 | assert.equal(accountPath("ent_bigco"), "/enterprises/ent_bigco"); | |
| 61 | 61 | assert.equal(accountPath("stripe"), null); | |
| 62 | − | // Shared invite links are filed under `ws_invites`: a reserved name, never a workspace. | |
| 63 | − | assert.equal(accountPath("ws_invites"), "/invites?tab=shared"); | |
| 62 | + | // Old shared invite links were filed under `ws_invites`: a reserved name, never a workspace. | |
| 63 | + | assert.equal(accountPath("ws_invites"), "/invites"); | |
| 64 | 64 | assert.equal(accountName("ws_invites"), "Shared invite links"); | |
| 65 | 65 | assert.equal(accountPath("acme"), null); | |
| 66 | 66 | assert.equal(accountPath("ws_-bad"), null); |
| 67 | 67 | */ | |
| 68 | 68 | export function accountPath(account: string | null | undefined): string | null { | |
| 69 | 69 | const id = (account ?? "").trim().toLowerCase(); | |
| 70 | − | // Shared invite links (identity's shared_invites.rs): `invites` is a reserved name, never a workspace's. | |
| 71 | − | if (id === SHARED_INVITES_ACCOUNT) return "/invites?tab=shared"; | |
| 70 | + | // Shared invite links, retired with invite-only registration: `invites` is a reserved name, never a workspace's. | |
| 71 | + | if (id === SHARED_INVITES_ACCOUNT) return "/invites"; | |
| 72 | 72 | const status = /^(incident|maintenance):([a-z0-9-]{1,64})$/.exec(id); | |
| 73 | 73 | if (status) return status[1] === "incident" ? `/incidents/${status[2]}` : `/incidents/maintenance/${status[2]}`; | |
| 74 | 74 | if (ENTERPRISE.test(id)) return `/enterprises/${encodeURIComponent(id)}`; |
| 190 | 190 | label: "Usage explorer", | |
| 191 | 191 | to: "/usage", | |
| 192 | 192 | icon: "usage", | |
| 193 | − | about: "What customers used, sliced by meter, model, repository and day.", | |
| 193 | + | about: "What customers used, sliced by meter, repository and day.", | |
| 194 | 194 | soon: { | |
| 195 | 195 | summary: [ | |
| 196 | 196 | "What customers used, across every workspace, sliced any way: by meter, repository and day. It answers the questions that come up in a sales call or a cost review: who uses the most sandbox time, and what a customer spends per pull request.", | |
| ⋯ | |||
| 198 | 198 | ], | |
| 199 | 199 | plans: [ | |
| 200 | 200 | "Charged, cost and margin over any range, for everyone or one customer", | |
| 201 | − | "Group by meter, model, task, repository or workspace; compare two periods", | |
| 201 | + | "Group by meter, repository or workspace; compare two periods", | |
| 202 | 202 | "The heaviest workspaces this month, and how fast each is growing", | |
| 203 | 203 | "Export to CSV", | |
| 204 | 204 | ], | |
| 84 | 84 | /** | |
| 85 | 85 | * What g1t absorbs of real cost on a goodwill credit: whatever is past its | |
| 86 | 86 | * margin on the overage. The margin is money g1t never had; the rest it | |
| 87 | − | * paid Cloudflare and model providers for. | |
| 87 | + | * paid Cloudflare for. | |
| 88 | 88 | */ | |
| 89 | 89 | export function absorbedMicros(amountMicros: number, marginMicros: number): number { | |
| 90 | 90 | return Math.max(0, amountMicros - Math.max(0, marginMicros)); |
| 143 | 143 | </h2> | |
| 144 | 144 | <p className="mt-2 text-sm text-fg-soft"> | |
| 145 | 145 | A {usd(review.amountMicros)} credit to <span className="font-mono">{review.workspace}</span> is past the {usd(cap)} a goodwill credit | |
| 146 | − | absorbs in one click. That is money g1t already paid Cloudflare and model providers. Say why, for whoever looks next; it goes in the | |
| 146 | + | absorbs in one click. That is money g1t already paid Cloudflare. Say why, for whoever looks next; it goes in the | |
| 147 | 147 | audit log with your email. | |
| 148 | 148 | </p> | |
| 149 | 149 | <form method="post" action={`${pathname}#review`} className="mt-4 space-y-3"> |
| 95 | 95 | {(prices || pricesError) && ( | |
| 96 | 96 | <Section | |
| 97 | 97 | title="The price book today" | |
| 98 | − | description={ | |
| 99 | − | prices ? `Read-only. Models are charged at cost plus ${prices.modelMarginPercent}%.` : undefined | |
| 100 | − | } | |
| 98 | + | description={prices ? "Read-only." : undefined} | |
| 101 | 99 | className="mt-8" | |
| 102 | 100 | > | |
| 103 | 101 | {pricesError ? ( |
Comments
Sign in to comment.