@letterstory/cli 0.177.147 → 0.177.149

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
@@ -93,7 +93,7 @@ import {
93
93
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
94
94
 
95
95
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
96
- export const VERSION = "0.177.147";
96
+ export const VERSION = "0.177.149";
97
97
 
98
98
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
99
99
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -135,6 +135,8 @@ export const BOOLEAN_FLAGS = new Set([
135
135
  "check",
136
136
  // admin invariants: press every startable row as a check too.
137
137
  "presses",
138
+ // admin lost-posts: held posts back to the rework with the draft unchanged.
139
+ "rework",
138
140
  // admin targets check: check every target again, checked or not.
139
141
  "recheck",
140
142
  // build list: also move the builds' open changes along while polling.
@@ -1213,7 +1215,7 @@ Admin (STAFF key — --staff-key / LETTERSTORY_STAFF_API_KEY; acts before an org
1213
1215
  what they hold, grouped with ids. Exits 1 on any.
1214
1216
  admin dropoff [crossing] [--days 30] Where new accounts stopped in an onboarding crossing
1215
1217
  (default letter): the count per step and who. Read only.
1216
- admin lost-posts [--code lost_guard,lost_provider] [--days 7] [--org <id>] [--limit 200] [--apply]
1218
+ admin lost-posts [--code lost_guard,lost_provider|held_guard] [--rework] [--days 7] [--org <id>] [--limit 200] [--apply]
1217
1219
  Letterbase posts lost on our side (a publish guard dropped
1218
1220
  the finished post, a provider outage failed the slot) and
1219
1221
  never published. Lists what it would requeue; --apply puts
@@ -1977,6 +1979,7 @@ Build (a change to your site, or launching what isn't code; the Build box's own
1977
1979
  One turn of a conversation with Build (questions, follow-ups on a build)
1978
1980
  build cancel <build-id> Stop a build before it merges: what's being built stops, its
1979
1981
  preview goes, and its open pull request is closed unmerged
1982
+ build retry <build-id> Try again what failed in a build, once what stopped it is fixed
1980
1983
  build benchmark <words…> [--prompt <text>] [--site <host>] [--agent letterpress-1|claude-code|codex]...
1981
1984
  [--attach <path>]... [--attach-url <name>=<https url>]... [--attach-ref <path>]... [--attach-url-ref <name>=<https url>]...
1982
1985
  Staff only. The same prompt on Letterpress-1 (as Build runs it) and on
@@ -24,7 +24,7 @@
24
24
  // admin letterpress endings [--days N] [--write-cases] (how turns and repo changes ended when not done, by owner)
25
25
  // admin letterpress settings|flip|set … (recipes:read / recipes:write)
26
26
  // admin invariants [--org <id>,…] [--limit N] [--presses] (staff)
27
- // admin lost-posts [--code lost_guard,lost_provider|held_guard] [--days N] [--org <id>] [--limit N] [--apply] (staff)
27
+ // admin lost-posts [--code lost_guard,lost_provider|held_guard] [--rework] [--days N] [--org <id>] [--limit N] [--apply] (staff)
28
28
  // admin demo guide|list|show|set|reset|check|ideas … (demo:read / demo:write)
29
29
  // admin deployments [--health down|failing|blocked|setting_up|live|paused|archived] [--org <id>] [--q <text>] [--archived] [--test] [--no-host] (fleet:read)
30
30
  // admin deployments move <app-id> --to <org-id> (--dry-run | --yes) (fleet:onboard)
@@ -74,6 +74,7 @@ export const ARGS = {
74
74
  requeue_lost_posts: {
75
75
  dry_run: { value: (flags) => !flagBool(flags.apply) },
76
76
  codes: { value: (flags) => (flags.code ? flagCsv(flags.code) : undefined) },
77
+ rework: { flag: "rework", type: "bool" },
77
78
  days: { flag: "days", type: "num" },
78
79
  org_id: { flag: "org" },
79
80
  limit: { flag: "limit", type: "num" },
@@ -5,6 +5,7 @@
5
5
  // build <words…> → start_build (--prompt for a long ask; --again to repeat one)
6
6
  // build talk <words…> → send_build_message (--conversation <id> | --build <id> to continue)
7
7
  // build cancel <id> → cancel_growth_build (stop it before it merges: its PR is closed)
8
+ // build retry <id> → retry_growth_build (try again what failed, once what stopped it is fixed)
8
9
  // build benchmark <words…> → start_build_benchmark (staff only: Letterpress-1, stock Claude Code
9
10
  // and stock Codex on the same prompt, each a preview)
10
11
  // build benchmarks → list_build_benchmarks (staff only; --id <uuid> for one)
@@ -167,6 +168,7 @@ const ARGS = {
167
168
  intent: { flag: "intent", enum: ["build"] },
168
169
  },
169
170
  cancel_growth_build: { id: { positional: 0, required: true, label: "build-id" } },
171
+ retry_growth_build: { id: { positional: 0, required: true, label: "build-id" } },
170
172
  start_build_benchmark: {
171
173
  prompt: { value: (flags, positionals) => flagStr(flags.prompt) ?? (positionals.join(" ").trim() || undefined) },
172
174
  domain: "site",
@@ -221,6 +223,7 @@ async function attachedFiles(ctx) {
221
223
  export async function cmdBuild(ctx) {
222
224
  if (ctx.positionals[0] === "talk") return buildTalk({ ...ctx, positionals: ctx.positionals.slice(1) });
223
225
  if (ctx.positionals[0] === "cancel") return buildCancel({ ...ctx, positionals: ctx.positionals.slice(1) });
226
+ if (ctx.positionals[0] === "retry") return buildRetry({ ...ctx, positionals: ctx.positionals.slice(1) });
224
227
  if (ctx.positionals[0] === "benchmark") return buildBenchmark({ ...ctx, positionals: ctx.positionals.slice(1) });
225
228
  if (ctx.positionals[0] === "benchmarks") return buildBenchmarks({ ...ctx, positionals: ctx.positionals.slice(1) });
226
229
  const read = readCommand(ctx.positionals);
@@ -257,6 +260,23 @@ async function buildCancel(ctx) {
257
260
  return 0;
258
261
  }
259
262
 
263
+ /** `build retry <id>`: try again what failed in a build (retry_growth_build). */
264
+ async function buildRetry(ctx) {
265
+ const { client, flags, io } = ctx;
266
+ refuseUnknownFlags(ctx, {}, []);
267
+ const args = argsFromFlags(ARGS.retry_growth_build, flags, ctx.positionals);
268
+ const result = await client.callTool("retry_growth_build", args);
269
+ printResult(io, flags, result, (r) =>
270
+ [
271
+ r.message,
272
+ ...(r.retried ?? []).map(
273
+ (s) => ` ${s.ok ? "started" : "not started"} ${s.title}${s.message ? `: ${s.message}` : ""}`
274
+ ),
275
+ ].join("\n")
276
+ );
277
+ return 0;
278
+ }
279
+
260
280
  async function buildBenchmark(ctx) {
261
281
  const { client, flags, io } = ctx;
262
282
  refuseUnknownFlags(ctx, {}, ["prompt", "site", "agent", ...FILE_FLAGS]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.147",
3
+ "version": "0.177.149",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",