@letterstory/cli 0.177.148 → 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 +2 -1
- package/lib/commands/build.mjs +20 -0
- package/package.json +1 -1
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.
|
|
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;
|
|
@@ -1979,6 +1979,7 @@ Build (a change to your site, or launching what isn't code; the Build box's own
|
|
|
1979
1979
|
One turn of a conversation with Build (questions, follow-ups on a build)
|
|
1980
1980
|
build cancel <build-id> Stop a build before it merges: what's being built stops, its
|
|
1981
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
|
|
1982
1983
|
build benchmark <words…> [--prompt <text>] [--site <host>] [--agent letterpress-1|claude-code|codex]...
|
|
1983
1984
|
[--attach <path>]... [--attach-url <name>=<https url>]... [--attach-ref <path>]... [--attach-url-ref <name>=<https url>]...
|
|
1984
1985
|
Staff only. The same prompt on Letterpress-1 (as Build runs it) and on
|
package/lib/commands/build.mjs
CHANGED
|
@@ -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]);
|