@letterstory/cli 0.149.1 → 0.150.0
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 +6 -5
- package/lib/commands/admin.mjs +1 -1
- package/lib/commands/automations.mjs +1 -0
- package/lib/commands/org.mjs +25 -7
- package/lib/commands/repo.mjs +5 -1
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
|
|
67
67
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
68
68
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
69
|
-
export const VERSION = "0.
|
|
69
|
+
export const VERSION = "0.150.0";
|
|
70
70
|
|
|
71
71
|
// Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
|
|
72
72
|
// can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
|
|
@@ -969,7 +969,7 @@ Admin (STAFF key — --staff-key / LETTERSTORY_STAFF_API_KEY; acts before an org
|
|
|
969
969
|
| provision <org-id> --plan starter|growth|scale [--ratio 1|2|4|8 (8 needs --why "…")] [--complimentary N] [--stripe-customer cus_…] [--start ISO] [--review D]
|
|
970
970
|
| reconcile [--org <org-id>] | forward
|
|
971
971
|
| payments [--org <org-id>] [--open] | payments retry <lago-invoice-id> | payments run [--dry]
|
|
972
|
-
| signups [--status open|card_saved|provisioned|paid|abandoned]
|
|
972
|
+
| signups [--status open|card_saved|provisioned|paid|abandoned|canceled]
|
|
973
973
|
| cap <org-id> <dollars|off> [--why "…"] | cancel <org-id> --why "…" --yes
|
|
974
974
|
| move <org-id> --plan starter|growth|scale [--ratio N [--why "…"]] [--reason "…"] [--stripe-subscription sub_…] [--dry]
|
|
975
975
|
| changes [--org <org-id>] | changes cancel <org-id>
|
|
@@ -1130,10 +1130,11 @@ Seers (event-driven signals -> drafts):
|
|
|
1130
1130
|
org export --split <dir> …as one file per record (for keeping config in git)
|
|
1131
1131
|
org join <dir> [--file <path>] Rebuild the bundle from a --split directory
|
|
1132
1132
|
org integrations Every integration and whether it's connected
|
|
1133
|
-
org billing [cap <dollars|off> [--why "…"] | request [--note "…"] | cancel [--why "…"] --yes]
|
|
1133
|
+
org billing [cap <dollars|off> [--why "…"] | card | request [--note "…"] | cancel [--why "…"] --yes]
|
|
1134
1134
|
Usage billing: plan, this period against the
|
|
1135
1135
|
allowance and spend cap, failed payments; set
|
|
1136
|
-
the cap
|
|
1136
|
+
the cap or change the card (admins), or ask
|
|
1137
|
+
the admins for more
|
|
1137
1138
|
org billing usage This period by product and collection: quantities,
|
|
1138
1139
|
and tokens and dollars when billed by usage
|
|
1139
1140
|
org linear [teams [--team <id|key>] | set --team <id|key> [--project <id>|none] | disconnect]
|
|
@@ -1502,7 +1503,7 @@ Repo changes (Claude Code edits your repo in a sandbox; the Letter GitHub App op
|
|
|
1502
1503
|
repo merge <run-id> Merge its open PR (a squash; the repo's branch rules decide)
|
|
1503
1504
|
repo revise <run-id> --instructions <text>|--instructions-file <path|->
|
|
1504
1505
|
Ask for more on a preview; it takes over the preview's link
|
|
1505
|
-
repo cancel <run-id>
|
|
1506
|
+
repo cancel <run-id> [--force] Stop it and delete the sandbox; no PR (Discard a preview)
|
|
1506
1507
|
|
|
1507
1508
|
Feedback (tell us what's broken, missing, unclear, or wanted):
|
|
1508
1509
|
feedback submit --category bug|missing_feature|unclear|feature_request|praise|other
|
package/lib/commands/admin.mjs
CHANGED
|
@@ -5213,7 +5213,7 @@ const LAGO_USAGE = `Usage: admin billing lago <command>
|
|
|
5213
5213
|
payments [--org <org-id>] [--open] failed payments and what the retry loop did about each
|
|
5214
5214
|
payments retry <lago-invoice-id> charge one failed invoice again now
|
|
5215
5215
|
payments run [--dry] one pass of the failed-payment loop now (--dry: report only)
|
|
5216
|
-
signups [--status open|card_saved|provisioned|paid|abandoned] new paying orgs on their way onto Lago
|
|
5216
|
+
signups [--status open|card_saved|provisioned|paid|abandoned|canceled] new paying orgs on their way onto Lago
|
|
5217
5217
|
cap <org-id> <dollars|off> [--why "…"] set an account's monthly spend cap on overage (off: no cap)
|
|
5218
5218
|
cancel <org-id> --why "…" --yes end an account's Lago plan now and refund its first invoice
|
|
5219
5219
|
move <org-id> --plan starter [--ratio 4] [--why "…" above 4x] [--reason "…"] [--complimentary 20000] [--review 2027-05-01] [--stripe-subscription sub_…] [--dry]
|
|
@@ -18,6 +18,7 @@ export const ARGS = {
|
|
|
18
18
|
},
|
|
19
19
|
suggest_starter_automations: {
|
|
20
20
|
collection_id: { flag: "collection", required: true },
|
|
21
|
+
ground: { flag: "ground", enum: ["answers", "search"] },
|
|
21
22
|
},
|
|
22
23
|
get_ground_measures: {
|
|
23
24
|
collection_id: { flag: "collection", required: true },
|
package/lib/commands/org.mjs
CHANGED
|
@@ -35,6 +35,7 @@ export const ARGS = {
|
|
|
35
35
|
},
|
|
36
36
|
request_billing_tokens: { note: { flag: "note" } },
|
|
37
37
|
cancel_billing_plan: { reason: { flag: "why" } },
|
|
38
|
+
update_billing_card: {},
|
|
38
39
|
list_integrations: {},
|
|
39
40
|
get_linear_connection: {},
|
|
40
41
|
list_linear_targets: { team_id: { flag: "team" } },
|
|
@@ -111,7 +112,8 @@ const usd = (n) => `$${Number(n).toFixed(2)}`;
|
|
|
111
112
|
/**
|
|
112
113
|
* `org billing`: the org's plan on Lago, this period against its allowance and spend cap, whether
|
|
113
114
|
* it is past due, and its failed payments (get_billing_payments). `org billing cap <dollars|off>`
|
|
114
|
-
* sets the cap (set_billing_spend_cap, admins); `org billing
|
|
115
|
+
* sets the cap (set_billing_spend_cap, admins); `org billing card` links to Stripe's page for a new
|
|
116
|
+
* card (update_billing_card, admins); `org billing request` asks the admins for more
|
|
115
117
|
* (request_billing_tokens); `org billing usage` is this period by product and collection (get_billing).
|
|
116
118
|
*/
|
|
117
119
|
async function orgBilling(ctx) {
|
|
@@ -130,14 +132,30 @@ async function orgBilling(ctx) {
|
|
|
130
132
|
if (positionals[0] === "cancel") {
|
|
131
133
|
refuseUnknownFlags(ctx, ARGS.cancel_billing_plan, ["yes"]);
|
|
132
134
|
if (!flagBool(flags.yes))
|
|
133
|
-
throw new CliError(
|
|
135
|
+
throw new CliError(
|
|
136
|
+
"This ends the plan now and refunds its first invoice (and any overage charged this month). Run again with --yes to do it."
|
|
137
|
+
);
|
|
134
138
|
const result = await client.callTool("cancel_billing_plan", argsFromFlags(ARGS.cancel_billing_plan, flags, []));
|
|
135
139
|
printResult(io, flags, result, (r) =>
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
[
|
|
141
|
+
"Plan cancelled",
|
|
142
|
+
r.firstInvoice === "voided" ? "; its unpaid first invoice is voided" : "",
|
|
143
|
+
r.refundedCents ? `; $${(r.refundedCents / 100).toFixed(2)} refunded to the card` : "",
|
|
144
|
+
r.topUpsRefundedCents ? ` ($${(r.topUpsRefundedCents / 100).toFixed(2)} of it overage)` : "",
|
|
145
|
+
".",
|
|
146
|
+
].join("")
|
|
147
|
+
);
|
|
148
|
+
return 0;
|
|
149
|
+
}
|
|
150
|
+
if (positionals[0] === "card") {
|
|
151
|
+
refuseUnknownFlags(ctx, ARGS.update_billing_card, []);
|
|
152
|
+
const result = await client.callTool("update_billing_card", argsFromFlags(ARGS.update_billing_card, flags, []));
|
|
153
|
+
printResult(
|
|
154
|
+
io,
|
|
155
|
+
flags,
|
|
156
|
+
result,
|
|
157
|
+
(r) =>
|
|
158
|
+
`Enter the new card here${r.expiresAt ? ` (until ${r.expiresAt})` : ""}:\n${r.url}\nIt becomes the card we charge, and any failed plan invoice is charged to it.`
|
|
141
159
|
);
|
|
142
160
|
return 0;
|
|
143
161
|
}
|
package/lib/commands/repo.mjs
CHANGED
|
@@ -221,7 +221,11 @@ const ARGS = {
|
|
|
221
221
|
value: (flags, positionals) => flagStr(flags.message) ?? (positionals.slice(1).join(" ") || undefined),
|
|
222
222
|
},
|
|
223
223
|
},
|
|
224
|
-
cancel_repo_change: {
|
|
224
|
+
cancel_repo_change: {
|
|
225
|
+
run_id: { positional: 0, required: true, label: "run-id" },
|
|
226
|
+
// --force: cancel a change another key or person started.
|
|
227
|
+
force: { flag: "force", type: "bool" },
|
|
228
|
+
},
|
|
225
229
|
publish_repo_change: { run_id: { positional: 0, required: true, label: "run-id" } },
|
|
226
230
|
merge_repo_change: { run_id: { positional: 0, required: true, label: "run-id" } },
|
|
227
231
|
revise_repo_change: {
|