@letterstory/cli 0.176.14 → 0.176.15
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 +3 -1
- package/lib/commands/build.mjs +9 -3
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
81
81
|
|
|
82
82
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
83
|
-
export const VERSION = "0.176.
|
|
83
|
+
export const VERSION = "0.176.15";
|
|
84
84
|
|
|
85
85
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
86
86
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -89,6 +89,8 @@ export const EXIT_PAYMENT_REQUIRED = 3;
|
|
|
89
89
|
// can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
|
|
90
90
|
// `negate` spelling) in a command's ARGS map must be listed; boolean-flags.test.ts enforces it.
|
|
91
91
|
export const BOOLEAN_FLAGS = new Set([
|
|
92
|
+
// build list: also move the builds' open changes along while polling.
|
|
93
|
+
"advance",
|
|
92
94
|
// automations set: stop reading a data feed.
|
|
93
95
|
"no-reads",
|
|
94
96
|
// vary start: pause the test running on the page first.
|
package/lib/commands/build.mjs
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// build benchmarks → list_build_benchmarks (staff only; --id <uuid> for one)
|
|
11
11
|
// build list → list_growth_builds (newest first; --site, --kind, --open/--archived)
|
|
12
12
|
// build status <id> → list_growth_builds (one build: its steps, previews and PRs)
|
|
13
|
-
// build follow <id> → list_growth_builds + get_repo_change_activity, until nothing is at work
|
|
13
|
+
// build follow <id> → list_growth_builds (advance) + get_repo_change_activity, until nothing is at work
|
|
14
14
|
// build conversations → list_build_conversations
|
|
15
15
|
// build conversation <id> → get_build_conversation (--build <id> for the one holding a build)
|
|
16
16
|
|
|
@@ -51,6 +51,8 @@ const ARGS = {
|
|
|
51
51
|
repo: "repo",
|
|
52
52
|
// --action build|build_pr|build_merge: how a build this message starts is delivered (Letter Edit's auto-merge sends build_merge).
|
|
53
53
|
delivery: { flag: "action", enum: ["build", "build_pr", "build_merge"] },
|
|
54
|
+
// --intent build: the words are a command to make the change (what ⌘L's Make Pull Request sends), never answered with only a reply.
|
|
55
|
+
intent: { flag: "intent", enum: ["build"] },
|
|
54
56
|
},
|
|
55
57
|
cancel_growth_build: { id: { positional: 0, required: true, label: "build-id" } },
|
|
56
58
|
start_build_benchmark: {
|
|
@@ -72,6 +74,8 @@ const ARGS = {
|
|
|
72
74
|
domain: "site",
|
|
73
75
|
// --archived: Build's Archived tab; --open: its Open tab; neither: both.
|
|
74
76
|
archived: { flag: "archived", type: "bool", negate: "open" },
|
|
77
|
+
// --advance: also move the builds' open changes along while polling (a queued change takes its sandbox, a merge asked for its next step).
|
|
78
|
+
advance: { flag: "advance", type: "bool" },
|
|
75
79
|
},
|
|
76
80
|
list_build_conversations: { limit: { flag: "limit", type: "num" } },
|
|
77
81
|
get_build_conversation: {
|
|
@@ -192,6 +196,7 @@ async function buildTalk(ctx) {
|
|
|
192
196
|
"harness",
|
|
193
197
|
"repo",
|
|
194
198
|
"action",
|
|
199
|
+
"intent",
|
|
195
200
|
...FILE_FLAGS,
|
|
196
201
|
]);
|
|
197
202
|
const files = await attachedFiles(ctx);
|
|
@@ -232,7 +237,7 @@ async function readBuild(client, args) {
|
|
|
232
237
|
/** `build list`: the organization's builds, newest first. */
|
|
233
238
|
async function buildList(ctx) {
|
|
234
239
|
const { client, flags, io } = ctx;
|
|
235
|
-
refuseUnknownFlags(ctx, {}, ["limit", "kind", "site", "archived", "open"]);
|
|
240
|
+
refuseUnknownFlags(ctx, {}, ["limit", "kind", "site", "archived", "open", "advance"]);
|
|
236
241
|
const args = argsFromFlags(ARGS.list_growth_builds, flags, []);
|
|
237
242
|
const result = await client.callTool("list_growth_builds", args);
|
|
238
243
|
printResult(io, flags, result, (r) =>
|
|
@@ -269,7 +274,8 @@ const FEED_MARK = { progress: "·", stage: "▸", say: "»", think: "◇", tool:
|
|
|
269
274
|
async function buildFollow(ctx) {
|
|
270
275
|
const { client, flags, io } = ctx;
|
|
271
276
|
refuseUnknownFlags(ctx, {}, []);
|
|
272
|
-
|
|
277
|
+
// Following is watching: each read also moves the build's open changes along, as the Build page's poll does.
|
|
278
|
+
const args = { ...argsFromFlags(ARGS.list_growth_builds, {}, ctx.positionals), advance: true };
|
|
273
279
|
if (!args.id) throw new CliError("Missing required <build-id>");
|
|
274
280
|
const emit = (event, text) => io.log(flags.json ? JSON.stringify(event) : text);
|
|
275
281
|
const since = new Map(); // run id → the newest line's `at`
|