@letterstory/cli 0.177.172 → 0.177.174
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 -2
- package/lib/commands/build.mjs +24 -0
- package/lib/commands/visits.mjs +2 -2
- 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.174";
|
|
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;
|
|
@@ -2226,7 +2226,7 @@ Refs (Visual Refs: other companies' brands to design something new after, apart
|
|
|
2226
2226
|
Every brand's direction for it, as one file
|
|
2227
2227
|
refs brief-show <brief-id> The brief, once ready
|
|
2228
2228
|
|
|
2229
|
-
|
|
2229
|
+
Evidence (what signed-in people do in your own app):
|
|
2230
2230
|
usage proofs [--id <id>] Read saved proof analysis
|
|
2231
2231
|
usage proof-audit [--id <run>] [--org-id <org>] Passed/not-passed suggestion history
|
|
2232
2232
|
usage find-proofs --since <ISO> --until <ISO> [--focus <text>] Analyze actions
|
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 archive <id> → archive_growth_build (off the Open list; --restore brings it back)
|
|
8
9
|
// build retry <id> → retry_growth_build (try again what failed, once what stopped it is fixed)
|
|
9
10
|
// build benchmark <words…> → start_build_benchmark (staff only: Letterpress-1, stock Claude Code
|
|
10
11
|
// and stock Codex on the same prompt, each a preview)
|
|
@@ -169,6 +170,11 @@ const ARGS = {
|
|
|
169
170
|
},
|
|
170
171
|
cancel_growth_build: { id: { positional: 0, required: true, label: "build-id" } },
|
|
171
172
|
retry_growth_build: { id: { positional: 0, required: true, label: "build-id" } },
|
|
173
|
+
// --restore: back to the Open list.
|
|
174
|
+
archive_growth_build: {
|
|
175
|
+
id: { positional: 0, required: true, label: "build-id" },
|
|
176
|
+
archived: { value: (flags) => (flags.restore ? false : undefined) },
|
|
177
|
+
},
|
|
172
178
|
start_build_benchmark: {
|
|
173
179
|
prompt: { value: (flags, positionals) => flagStr(flags.prompt) ?? (positionals.join(" ").trim() || undefined) },
|
|
174
180
|
domain: "site",
|
|
@@ -223,6 +229,9 @@ async function attachedFiles(ctx) {
|
|
|
223
229
|
export async function cmdBuild(ctx) {
|
|
224
230
|
if (ctx.positionals[0] === "talk") return buildTalk({ ...ctx, positionals: ctx.positionals.slice(1) });
|
|
225
231
|
if (ctx.positionals[0] === "cancel") return buildCancel({ ...ctx, positionals: ctx.positionals.slice(1) });
|
|
232
|
+
// Only `archive <build-id>`: "archive old blog posts" is words to build from.
|
|
233
|
+
if (ctx.positionals[0] === "archive" && /^[0-9a-f-]{36}$/i.test(ctx.positionals[1] ?? ""))
|
|
234
|
+
return buildArchive({ ...ctx, positionals: ctx.positionals.slice(1) });
|
|
226
235
|
if (ctx.positionals[0] === "retry") return buildRetry({ ...ctx, positionals: ctx.positionals.slice(1) });
|
|
227
236
|
if (ctx.positionals[0] === "benchmark") return buildBenchmark({ ...ctx, positionals: ctx.positionals.slice(1) });
|
|
228
237
|
if (ctx.positionals[0] === "benchmarks") return buildBenchmarks({ ...ctx, positionals: ctx.positionals.slice(1) });
|
|
@@ -260,6 +269,21 @@ async function buildCancel(ctx) {
|
|
|
260
269
|
return 0;
|
|
261
270
|
}
|
|
262
271
|
|
|
272
|
+
/** `build archive <id>`: move a build off the Open list, or back with --restore (archive_growth_build). */
|
|
273
|
+
async function buildArchive(ctx) {
|
|
274
|
+
const { client, flags, io } = ctx;
|
|
275
|
+
refuseUnknownFlags(ctx, {}, ["restore"]);
|
|
276
|
+
const args = argsFromFlags(ARGS.archive_growth_build, flags, ctx.positionals);
|
|
277
|
+
const result = await client.callTool("archive_growth_build", args);
|
|
278
|
+
printResult(
|
|
279
|
+
io,
|
|
280
|
+
flags,
|
|
281
|
+
result,
|
|
282
|
+
(r) => `${args.archived === false ? "Back on Open" : "Archived"}: ${r.build?.title ?? args.id}`
|
|
283
|
+
);
|
|
284
|
+
return 0;
|
|
285
|
+
}
|
|
286
|
+
|
|
263
287
|
/** `build retry <id>`: try again what failed in a build (retry_growth_build). */
|
|
264
288
|
async function buildRetry(ctx) {
|
|
265
289
|
const { client, flags, io } = ctx;
|
package/lib/commands/visits.mjs
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
// letterstory visits transact test "What does it cost?"
|
|
33
33
|
// letterstory visits transact asks [--since 7d] [--limit 50]
|
|
34
34
|
// letterstory visits transact learnings [--since 7d]
|
|
35
|
-
// letterstory visits transact site [publish|unpublish] [--domain ask.acme.com | --domain none] [--remove <slug>] the
|
|
35
|
+
// letterstory visits transact site [publish|unpublish] [--domain ask.acme.com | --domain none] [--remove <slug>] the Agent Site tab
|
|
36
36
|
|
|
37
37
|
import { CliError } from "../client.mjs";
|
|
38
38
|
import { flagStr, printResult, argsFromFlags } from "./shared.mjs";
|
|
@@ -460,7 +460,7 @@ async function visitsTransact(ctx) {
|
|
|
460
460
|
flags.remove !== undefined;
|
|
461
461
|
const result = await call(rest, write ? "visitors_set_agent_site" : "visitors_get_agent_site");
|
|
462
462
|
printResult(io, flags, result, (r) => {
|
|
463
|
-
if (!r.available) return "Agent
|
|
463
|
+
if (!r.available) return "Agent Sites aren't available yet";
|
|
464
464
|
if (!r.published) return "Not published";
|
|
465
465
|
const lines = [`Staging: ${r.staging_url}`];
|
|
466
466
|
if (r.domain) {
|