@letterstory/cli 0.177.127 → 0.177.129
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 +4 -2
- package/lib/commands/ask.mjs +9 -0
- package/lib/commands/probes.mjs +33 -2
- package/lib/commands/repo.mjs +8 -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.129";
|
|
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;
|
|
@@ -936,6 +936,7 @@ Offerings (context layered org → offering → collection; a layer sets only wh
|
|
|
936
936
|
probes keep | pause | resume <probe_id> Keep = protect an AI probe from rotation (no pause)
|
|
937
937
|
probes edit <probe_id> <new question text> Fix/sharpen a generated probe
|
|
938
938
|
probes add <question> [--kind mention|citation] [--scope site|company|<blogId>] [--cluster <id>]
|
|
939
|
+
probes priority <t:id|q:id> <high|normal|low|none> Set or remove a prompt's priority
|
|
939
940
|
onboarding status Show the onboarding checklist
|
|
940
941
|
onboarding for <website|seo|geo|visitors|cmd_l> … What Letter is for: the onboarding's first question
|
|
941
942
|
onboarding site ["<what you're building>"] [--brands a.com,b.com] [--backend repo|none|not_app]
|
|
@@ -2021,13 +2022,14 @@ Repo changes (Claude Code edits your repo in a sandbox; the Letter GitHub App op
|
|
|
2021
2022
|
[--slack-channel <C…>|none] [--autopilot-channel <C…>|none] [--listen <C…,C…>|none] [--autopilot on|off] [--autopilot-weekly <1-20>]
|
|
2022
2023
|
[--autopilot-severity critical|warning] [--autopilot-scope all|new]
|
|
2023
2024
|
[--auto-merge 1h|12h|24h|3d|off] [--editor-auto-merge on|off] [--address-reviews on|off]
|
|
2024
|
-
[--agent letterpress-1|claude-code|default]
|
|
2025
|
+
[--prebuild-ideas on|off] [--agent letterpress-1|claude-code|default]
|
|
2025
2026
|
The org's defaults for every fix: build (preview first),
|
|
2026
2027
|
build_pr, or slack (post it to --slack-channel for your
|
|
2027
2028
|
own agent, tagging --slack-agent), and the branch changes go to;
|
|
2028
2029
|
--auto-merge merges Letter's PRs once open that long;
|
|
2029
2030
|
--editor-auto-merge merges Letter Edit's (⌘L) changes once ready;
|
|
2030
2031
|
--address-reviews answers review comments on Letter's PRs;
|
|
2032
|
+
--prebuild-ideas builds the top Ideas ahead as previews;
|
|
2031
2033
|
--agent is who builds every change, on every door.
|
|
2032
2034
|
What Letter posts to Slack on its own is an automation:
|
|
2033
2035
|
automate add --template … --slack-channel <C…>
|
package/lib/commands/ask.mjs
CHANGED
|
@@ -51,6 +51,15 @@ export function ideaLines(item, n) {
|
|
|
51
51
|
// What the row does and its steps ("Next: …", "Turns on … in Automations"), as Ideas shows them.
|
|
52
52
|
if (item.detail && item.detail !== item.why) lines.push(`${pad}${item.detail}`);
|
|
53
53
|
if (item.queued?.line) lines.push(`${pad}${item.queued.line}`);
|
|
54
|
+
// Its change waits as a preview (a pre-build, or a start made as one): where to see it and how to approve it.
|
|
55
|
+
if (item.preview) {
|
|
56
|
+
if (item.preview.url) lines.push(`${pad}Preview: ${item.preview.url}`);
|
|
57
|
+
const runs = item.preview.run_ids ?? [];
|
|
58
|
+
if (runs.length)
|
|
59
|
+
lines.push(
|
|
60
|
+
`${pad}Make PR: ${runs.map((id) => `letterstory repo publish ${id}`).join("; ")} Discard: letterstory build cancel ${item.preview.build_id}`
|
|
61
|
+
);
|
|
62
|
+
}
|
|
54
63
|
if (item.start) lines.push(`${pad}${item.start.label}: ${item.start.does}`);
|
|
55
64
|
// A start that goes live says so, as Ideas asks before it (2026-11-13 audit: the terminal never showed it).
|
|
56
65
|
if (item.start?.live) lines.push(`${pad}Goes live: ${item.start.live} Confirm with a person first.`);
|
package/lib/commands/probes.mjs
CHANGED
|
@@ -5,7 +5,26 @@
|
|
|
5
5
|
// or a script can see and act on exactly what a person can.
|
|
6
6
|
|
|
7
7
|
import { CliError } from "../client.mjs";
|
|
8
|
-
import { flagStr, flagNum, flagBool, requirePositional, printResult, compact, ok } from "./shared.mjs";
|
|
8
|
+
import { flagStr, flagNum, flagBool, requirePositional, printResult, compact, ok, argsFromFlags } from "./shared.mjs";
|
|
9
|
+
|
|
10
|
+
const PRIORITIES = ["high", "normal", "low"];
|
|
11
|
+
|
|
12
|
+
// How every tool this module calls through ARGS gets its arguments — see `argsFromFlags` in shared.mjs.
|
|
13
|
+
export const ARGS = {
|
|
14
|
+
set_prompt_priority: {
|
|
15
|
+
// The row's key from Measure → Prompt tracking (`t:<target id>` or `q:<probe id>`).
|
|
16
|
+
question_key: { positional: 0, label: "t:id|q:id", required: true },
|
|
17
|
+
// `none` removes the priority.
|
|
18
|
+
priority: {
|
|
19
|
+
value: (_flags, positionals) => {
|
|
20
|
+
const v = positionals[1];
|
|
21
|
+
if (v === "none") return null;
|
|
22
|
+
if (!PRIORITIES.includes(v)) throw new CliError("Priority must be one of: high, normal, low, none");
|
|
23
|
+
return v;
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
9
28
|
|
|
10
29
|
export async function cmdProbes(ctx) {
|
|
11
30
|
const sub = ctx.positionals[0];
|
|
@@ -24,8 +43,10 @@ export async function cmdProbes(ctx) {
|
|
|
24
43
|
return probesEdit(rest);
|
|
25
44
|
case "add":
|
|
26
45
|
return probesAdd(rest);
|
|
46
|
+
case "priority":
|
|
47
|
+
return probesPriority(rest);
|
|
27
48
|
default:
|
|
28
|
-
throw new CliError("Usage: probes <list|keep|pause|resume|edit|add>");
|
|
49
|
+
throw new CliError("Usage: probes <list|keep|pause|resume|edit|add|priority>");
|
|
29
50
|
}
|
|
30
51
|
}
|
|
31
52
|
|
|
@@ -91,6 +112,16 @@ async function probesAdd(ctx) {
|
|
|
91
112
|
return 0;
|
|
92
113
|
}
|
|
93
114
|
|
|
115
|
+
async function probesPriority(ctx) {
|
|
116
|
+
const { client, positionals, flags } = ctx;
|
|
117
|
+
const result = await client.callTool(
|
|
118
|
+
"set_prompt_priority",
|
|
119
|
+
argsFromFlags(ARGS.set_prompt_priority, flags, positionals)
|
|
120
|
+
);
|
|
121
|
+
ok(ctx, `Priority saved (${result.question_key}).`);
|
|
122
|
+
return 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
94
125
|
export async function cmdSuggestions(ctx) {
|
|
95
126
|
const sub = ctx.positionals[0];
|
|
96
127
|
const rest = { ...ctx, positionals: ctx.positionals.slice(1) };
|
package/lib/commands/repo.mjs
CHANGED
|
@@ -272,6 +272,13 @@ const ARGS = {
|
|
|
272
272
|
? undefined
|
|
273
273
|
: ["on", "true", "1"].includes(String(flags["address-reviews"])),
|
|
274
274
|
},
|
|
275
|
+
// --prebuild-ideas on|off: Letter builds the top Ideas ahead as previews to approve
|
|
276
|
+
prebuild_ideas: {
|
|
277
|
+
value: (flags) =>
|
|
278
|
+
flags["prebuild-ideas"] === undefined
|
|
279
|
+
? undefined
|
|
280
|
+
: ["on", "true", "1"].includes(String(flags["prebuild-ideas"])),
|
|
281
|
+
},
|
|
275
282
|
},
|
|
276
283
|
get_repo_change: { run_id: { positional: 0, required: true, label: "run-id" } },
|
|
277
284
|
get_repo_change_activity: {
|
|
@@ -976,6 +983,7 @@ async function repoSettings(ctx) {
|
|
|
976
983
|
"auto-merge",
|
|
977
984
|
"editor-auto-merge",
|
|
978
985
|
"address-reviews",
|
|
986
|
+
"prebuild-ideas",
|
|
979
987
|
"agent",
|
|
980
988
|
];
|
|
981
989
|
refuseUnknownFlags(ctx, {}, settingFlags);
|