@letterstory/cli 0.177.213 → 0.177.215
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 -3
- package/lib/commands/automate.mjs +6 -0
- package/lib/commands/repo.mjs +6 -2
- package/lib/commands/usage.mjs +2 -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.215";
|
|
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;
|
|
@@ -810,7 +810,7 @@ Reviewers:
|
|
|
810
810
|
relink_posts|mention_revisions|fix_autopilot|auto_plan|ai_portrayal] [--letterbase <id>|--host <site>]
|
|
811
811
|
[--name <n>] [--trigger competitor_page|competitor_change|visitor_identified|issue_found|build_suggestion|plan_update|post_ready|
|
|
812
812
|
preview_ready|transact_ask|custom|schedule]
|
|
813
|
-
[--prompt <what Letterpress does with each event>] [--slack-channel <C…>] [--instruction <which events>]
|
|
813
|
+
[--prompt <what Letterpress does with each event>] [--slack-channel <C…>] [--tag <U…>] [--instruction <which events>]
|
|
814
814
|
[--event <name>] [--kind post|landing] [--competitor <host>] [--site <host>]
|
|
815
815
|
[--every <n> --unit hours|days|weeks|months] [--facts <a,b>] [--recipe <id>]
|
|
816
816
|
[--fit-run <run-id> --publication-host <site>]
|
|
@@ -829,7 +829,7 @@ Reviewers:
|
|
|
829
829
|
(relink_posts, mention_revisions: --letterbase;
|
|
830
830
|
auto_plan: --host; fix_autopilot) is made, or added
|
|
831
831
|
back where someone removed it, acting as Letter
|
|
832
|
-
automate set <automation-id> [--name <n>] [--instruction <text>] [--prompt <text>] [--slack-channel <C…>|none]
|
|
832
|
+
automate set <automation-id> [--name <n>] [--instruction <text>] [--prompt <text>] [--slack-channel <C…>|none] [--tag <U…>|none]
|
|
833
833
|
[--backfill all|<YYYY-MM-DD>] [--on|--off] ...
|
|
834
834
|
automate try [<automation-id>] [--trigger <t> --prompt <text> --instruction <text> ...] [--limit <n>]
|
|
835
835
|
What it would do with the latest events (acts on none)
|
|
@@ -86,6 +86,10 @@ const slackChannel = {
|
|
|
86
86
|
? null
|
|
87
87
|
: String(flags["slack-channel"]),
|
|
88
88
|
};
|
|
89
|
+
// --tag U0123ABCD: who each post in the channel starts by tagging (a member of its workspace), or none.
|
|
90
|
+
const slackMention = {
|
|
91
|
+
value: (flags) => (flags.tag === undefined ? undefined : flags.tag === "none" ? null : String(flags.tag)),
|
|
92
|
+
};
|
|
89
93
|
const enabled = { value: (flags) => (flags.off === true ? false : flags.on === true ? true : undefined) };
|
|
90
94
|
// --backfill all (the whole history the trigger's source keeps) or --backfill 2026-09-01 (from that day):
|
|
91
95
|
// also run it on past events, oldest first.
|
|
@@ -167,6 +171,7 @@ export const ARGS = {
|
|
|
167
171
|
instruction: { flag: "instruction" },
|
|
168
172
|
prompt: { flag: "prompt" },
|
|
169
173
|
slack_channel: slackChannel,
|
|
174
|
+
slack_mention: slackMention,
|
|
170
175
|
enabled,
|
|
171
176
|
backfill,
|
|
172
177
|
},
|
|
@@ -179,6 +184,7 @@ export const ARGS = {
|
|
|
179
184
|
instruction: { flag: "instruction" },
|
|
180
185
|
prompt: { flag: "prompt" },
|
|
181
186
|
slack_channel: slackChannel,
|
|
187
|
+
slack_mention: slackMention,
|
|
182
188
|
enabled,
|
|
183
189
|
backfill,
|
|
184
190
|
},
|
package/lib/commands/repo.mjs
CHANGED
|
@@ -188,6 +188,8 @@ const ARGS = {
|
|
|
188
188
|
base_branch: "branch",
|
|
189
189
|
action: { flag: "action", enum: ["build", "build_pr", "build_merge", "slack", "linear"] },
|
|
190
190
|
preview: { flag: "preview", type: "bool" },
|
|
191
|
+
// --keep-open: the organization's auto-merge window never merges its pull request (Merge still does).
|
|
192
|
+
keep_open: { flag: "keep-open", type: "bool" },
|
|
191
193
|
},
|
|
192
194
|
letterprove_open_install_pr: {
|
|
193
195
|
provider,
|
|
@@ -198,6 +200,8 @@ const ARGS = {
|
|
|
198
200
|
repo_name: { value: (flags) => splitRepo(flags).name },
|
|
199
201
|
base_branch: "branch",
|
|
200
202
|
action: { flag: "action", enum: ["build", "build_pr", "build_merge", "slack", "linear"] },
|
|
203
|
+
// --keep-open: the organization's auto-merge window never merges its pull request (Merge still does).
|
|
204
|
+
keep_open: { flag: "keep-open", type: "bool" },
|
|
201
205
|
},
|
|
202
206
|
visitors_open_install_pr: {
|
|
203
207
|
provider,
|
|
@@ -605,7 +609,7 @@ async function followRun(ctx, run) {
|
|
|
605
609
|
/** `repo fix-audit --issue <type> [--audit <id>] [--wait]`: one audit issue → one PR, in the repo verified to build the site. */
|
|
606
610
|
async function repoFixAudit(ctx) {
|
|
607
611
|
const { client, flags, io } = ctx;
|
|
608
|
-
refuseUnknownFlags(ctx, {}, ["issue", "audit", "branch", "action", "preview", "wait"]);
|
|
612
|
+
refuseUnknownFlags(ctx, {}, ["issue", "audit", "branch", "action", "preview", "keep-open", "wait"]);
|
|
609
613
|
if (issueList(flags).length === 0)
|
|
610
614
|
throw new CliError("--issue <issue-type> is required (repeat it to fix several in one PR)");
|
|
611
615
|
const result = await client.callTool(
|
|
@@ -623,7 +627,7 @@ async function repoFixAudit(ctx) {
|
|
|
623
627
|
/** `repo install-letterprove --repo owner/name [--host h] [--branch b] [--wait]`: the Visitors script on the product + identify → one PR. */
|
|
624
628
|
async function repoInstallLetterprove(ctx) {
|
|
625
629
|
const { client, flags, io } = ctx;
|
|
626
|
-
refuseUnknownFlags(ctx, {}, ["repo", "owner", "name", "gitlab", "host", "branch", "action", "wait"]);
|
|
630
|
+
refuseUnknownFlags(ctx, {}, ["repo", "owner", "name", "gitlab", "host", "branch", "action", "keep-open", "wait"]);
|
|
627
631
|
const result = await client.callTool(
|
|
628
632
|
"letterprove_open_install_pr",
|
|
629
633
|
argsFromFlags(ARGS.letterprove_open_install_pr, flags, ctx.positionals)
|
package/lib/commands/usage.mjs
CHANGED
|
@@ -228,6 +228,8 @@ export const ARGS = {
|
|
|
228
228
|
provider: { flag: "provider" },
|
|
229
229
|
base_branch: { flag: "base" },
|
|
230
230
|
mode: { flag: "mode" },
|
|
231
|
+
// --keep-open: the organization's auto-merge window never merges its pull request (Merge still does).
|
|
232
|
+
keep_open: { flag: "keep-open", type: "bool" },
|
|
231
233
|
},
|
|
232
234
|
discover_action_events: {
|
|
233
235
|
source: { flag: "source" },
|