@letterstory/cli 0.176.18 → 0.176.19

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.
package/lib/cli.mjs CHANGED
@@ -81,7 +81,7 @@ import {
81
81
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
82
82
 
83
83
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
84
- export const VERSION = "0.176.18";
84
+ export const VERSION = "0.176.19";
85
85
 
86
86
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
87
87
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -143,7 +143,7 @@ async function orgBilling(ctx) {
143
143
  [
144
144
  r.spendCap
145
145
  ? `Spend cap: ${usd(r.spendCap.usd)} of overage a month${r.spendCap.usd === 0 ? " (work stops at the allowance)" : ""}.${r.alert === "failed" ? " The alerts couldn't be moved; the cap holds." : ""}`
146
- : "No spend cap: overage is on.",
146
+ : "No spend cap is set, so overage is on",
147
147
  // The period as the cap leaves it: a cap under the overage already used stops new work now.
148
148
  ...(r.standing?.note ? [r.standing.note] : []),
149
149
  ].join("\n")
@@ -239,7 +239,7 @@ export function billingAccountText(r) {
239
239
  r.plan
240
240
  ? `Plan: ${r.plan.name}${r.plan.ratio !== 1 ? ` (${r.plan.ratio}x)` : ""}${ended ? `, cancelled${r.canceledAt ? ` on ${r.canceledAt.slice(0, 10)}` : ""}.` : r.endsAt ? `, cancelled: ends on ${r.endsAt.slice(0, 10)}.` : ""}`
241
241
  : f
242
- ? "On free tokens: no card yet."
242
+ ? "On free tokens, with no plan yet"
243
243
  : "Not billed by usage yet.",
244
244
  // A free account (no card): its balance, its grants, and whether new work needs a card now.
245
245
  ...(f
@@ -250,8 +250,8 @@ export function billingAccountText(r) {
250
250
  ` +${formatCount(g.tokens)} ${g.source}${g.sourceKey !== g.source ? `: ${g.sourceKey}` : ""}${g.channel === "agent" ? " (an agent signed you up)" : ""} ${g.createdAt.slice(0, 10)}`
251
251
  ),
252
252
  f.cardRequired
253
- ? "No free tokens left: new work needs a card. An admin adds one in Settings → Billing."
254
- : "When they run out, new work needs a card (an admin adds one in Settings → Billing).",
253
+ ? "No free tokens are left, so new work can start once an admin picks a plan in Settings → Billing"
254
+ : "When they run out, new work can start only once an admin picks a plan in Settings → Billing",
255
255
  ]
256
256
  : []),
257
257
  // What an ended plan left owing (earlierPlan): until it is settled a card can't start a new plan, so
@@ -263,8 +263,8 @@ export function billingAccountText(r) {
263
263
  ...(r.addCard && !r.earlierPlan
264
264
  ? [
265
265
  r.addCard.lockedBy
266
- ? `Paying by card starts ${r.addCard.planName}, at ${formatMoney(r.addCard.monthlyUsd)} a month (a signup from ${r.addCard.lockedBy} is in progress): an admin pays in Settings → Billing.`
267
- : `Pay by card: an admin picks a plan in Settings → Billing.${r.addCard.tokensPerMonth ? ` At your usage (about ${formatCount(r.addCard.tokensPerMonth)} tokens a month):` : ""}`,
266
+ ? `This workspace starts on ${r.addCard.planName}, ${formatMoney(r.addCard.monthlyUsd)} a month (a signup from ${r.addCard.lockedBy} is in progress), and an admin pays by card in Settings → Billing`
267
+ : `Plans an admin can start by card in Settings → Billing${r.addCard.tokensPerMonth ? `, priced at your usage (about ${formatCount(r.addCard.tokensPerMonth)} tokens a month)` : ""}:`,
268
268
  ...(r.addCard.lockedBy ? [] : (r.addCard.plans ?? [])).map(
269
269
  (p) =>
270
270
  ` ${p.planName}${[p.badge, p.cheapestForYou ? "Cheapest for you" : null]
@@ -272,7 +272,7 @@ export function billingAccountText(r) {
272
272
  .map((b) => ` [${b}]`)
273
273
  .join(
274
274
  ""
275
- )}: ${formatMoney(p.monthlyUsd)} a month, ${formatCount(p.includedTokens)} tokens, ${formatMoney(p.usdPer1kTokens, { cents: true })} per 1,000, past the pool ${formatMoney(p.overageUsdPer1kTokens, { cents: true })} per 1,000${p.expectedMonthlyUsd !== null ? `; about ${formatMoney(Math.round(p.expectedMonthlyUsd))} a month at your usage` : ""}${p.savesUsdPerMonth ? `, saves ${formatMoney(Math.round(p.savesUsdPerMonth))} a month` : ""}.${p.tagline ? ` ${p.tagline}` : ""}${p.extras?.length ? ` ${p.extras.join(", ")}.` : ""}`
275
+ )}: ${formatMoney(p.monthlyUsd)} a month, ${formatCount(p.includedTokens)} tokens, ${formatMoney(p.usdPer1kTokens)} per 1,000, then ${formatMoney(p.overageUsdPer1kTokens)} per 1,000 past that${p.expectedMonthlyUsd !== null ? `; about ${formatMoney(Math.round(p.expectedMonthlyUsd))} a month at your usage` : ""}${p.savesUsdPerMonth ? `, saves ${formatMoney(Math.round(p.savesUsdPerMonth))} a month` : ""}.${p.tagline ? ` ${p.tagline}` : ""}${p.extras?.length ? ` ${p.extras.join(", ")}.` : ""}`
276
276
  ),
277
277
  ]
278
278
  : []),
@@ -288,7 +288,7 @@ export function billingAccountText(r) {
288
288
  : r.spendCap
289
289
  ? `Spend cap: ${usd(r.spendCap.usd)} of overage a month${u?.availableTokens != null ? `, ${formatCount(Math.max(0, u.availableTokens))} tokens left under it` : ""}.`
290
290
  : r.plan
291
- ? "No spend cap: overage is on."
291
+ ? "No spend cap is set, so overage is on"
292
292
  : null,
293
293
  ...(r.pastDueAt ? [`Past due since ${r.pastDueAt}.`] : []),
294
294
  ...(r.backgroundPause ? [r.backgroundPause.message] : []),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.176.18",
3
+ "version": "0.176.19",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",